@verdocs/web-sdk 6.10.6 → 6.10.7

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 (90) hide show
  1. package/dist/cjs/Environment-C3P2cz0J.js +14 -0
  2. package/dist/cjs/Environment-C3P2cz0J.js.map +1 -0
  3. package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +12 -14
  5. package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
  6. package/dist/cjs/verdocs-preview_6.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js.map +1 -1
  9. package/dist/collection/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.css +2 -1
  10. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +12 -14
  11. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
  12. package/dist/collection/utils/Environment.js +4 -7
  13. package/dist/collection/utils/Environment.js.map +1 -1
  14. package/dist/components/{p-DCZz2B7h.js → p-6RWROB9R.js} +2 -2
  15. package/dist/components/p-6RWROB9R.js.map +1 -0
  16. package/dist/components/{p-i3o08M2d.js → p-B1UVXqFA.js} +2 -2
  17. package/dist/components/{p-C43B3SP_.js → p-BYVQkYYg.js} +2 -2
  18. package/dist/components/{p-zTcSNwsp.js → p-Ck4pdoyc.js} +2 -2
  19. package/dist/components/{p-DZa0rMk2.js → p-CsF979IT.js} +2 -2
  20. package/dist/components/{p-DiwfOWXt.js → p-DJMr11ue.js} +2 -2
  21. package/dist/components/p-DavVixMP.js +2 -0
  22. package/dist/components/p-DavVixMP.js.map +1 -0
  23. package/dist/components/{p-Dy2CRiH8.js → p-b2u0_wDk.js} +1 -1
  24. package/dist/components/p-b2u0_wDk.js.map +1 -0
  25. package/dist/components/verdocs-build.js +1 -1
  26. package/dist/components/verdocs-contact-picker.js +1 -1
  27. package/dist/components/verdocs-delegate-dialog.js +1 -1
  28. package/dist/components/verdocs-otp-dialog.js +1 -1
  29. package/dist/components/verdocs-passcode-dialog.js +1 -1
  30. package/dist/components/verdocs-send.js +1 -1
  31. package/dist/components/verdocs-sign.js +1 -1
  32. package/dist/components/verdocs-template-fields.js +1 -1
  33. package/dist/components/verdocs-toolbar-icon.js +1 -1
  34. package/dist/esm/Environment-b2u0_wDk.js +12 -0
  35. package/dist/esm/Environment-b2u0_wDk.js.map +1 -0
  36. package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +1 -1
  37. package/dist/esm/verdocs-contact-picker.entry.js +12 -14
  38. package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
  39. package/dist/esm/verdocs-preview_6.entry.js +1 -1
  40. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  41. package/dist/esm/verdocs-template-document-page_2.entry.js.map +1 -1
  42. package/dist/esm-es5/{Environment-Dy2CRiH8.js → Environment-b2u0_wDk.js} +1 -1
  43. package/dist/esm-es5/Environment-b2u0_wDk.js.map +1 -0
  44. package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
  45. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  46. package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
  47. package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
  48. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  49. package/dist/esm-es5/verdocs-template-document-page_2.entry.js.map +1 -1
  50. package/dist/verdocs-web-sdk/{p-46e52384.system.entry.js → p-39c54b65.system.entry.js} +2 -2
  51. package/dist/verdocs-web-sdk/p-39c54b65.system.entry.js.map +1 -0
  52. package/dist/verdocs-web-sdk/{p-255e1915.entry.js → p-4e0788f9.entry.js} +2 -2
  53. package/dist/verdocs-web-sdk/p-4e0788f9.entry.js.map +1 -0
  54. package/dist/verdocs-web-sdk/{p-4aee15e6.entry.js → p-4e091415.entry.js} +2 -2
  55. package/dist/verdocs-web-sdk/{p-c6f52cd7.entry.js → p-4ea0632f.entry.js} +2 -2
  56. package/dist/verdocs-web-sdk/{p-c6f52cd7.entry.js.map → p-4ea0632f.entry.js.map} +1 -1
  57. package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
  58. package/dist/verdocs-web-sdk/{p-C96xjMgt.system.js → p-COHG5J4h.system.js} +1 -1
  59. package/dist/verdocs-web-sdk/p-COHG5J4h.system.js.map +1 -0
  60. package/dist/verdocs-web-sdk/{p-Dy2CRiH8.js → p-b2u0_wDk.js} +1 -1
  61. package/dist/verdocs-web-sdk/p-b2u0_wDk.js.map +1 -0
  62. package/dist/verdocs-web-sdk/{p-098b3852.system.entry.js → p-ba0d4ff5.system.entry.js} +2 -2
  63. package/dist/verdocs-web-sdk/{p-098b3852.system.entry.js.map → p-ba0d4ff5.system.entry.js.map} +1 -1
  64. package/dist/verdocs-web-sdk/{p-c3527f3e.system.entry.js → p-ceda04bc.system.entry.js} +2 -2
  65. package/dist/verdocs-web-sdk/{p-1df29abb.entry.js → p-ee92c074.entry.js} +2 -2
  66. package/dist/verdocs-web-sdk/{p-e87a29a3.system.entry.js → p-fad90cf9.system.entry.js} +3 -3
  67. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  68. package/package.json +2 -2
  69. package/dist/cjs/Environment-CUCX3aWX.js +0 -17
  70. package/dist/cjs/Environment-CUCX3aWX.js.map +0 -1
  71. package/dist/components/p-CYqVJ_kJ.js +0 -2
  72. package/dist/components/p-CYqVJ_kJ.js.map +0 -1
  73. package/dist/components/p-DCZz2B7h.js.map +0 -1
  74. package/dist/components/p-Dy2CRiH8.js.map +0 -1
  75. package/dist/esm/Environment-Dy2CRiH8.js +0 -15
  76. package/dist/esm/Environment-Dy2CRiH8.js.map +0 -1
  77. package/dist/esm-es5/Environment-Dy2CRiH8.js.map +0 -1
  78. package/dist/verdocs-web-sdk/p-255e1915.entry.js.map +0 -1
  79. package/dist/verdocs-web-sdk/p-46e52384.system.entry.js.map +0 -1
  80. package/dist/verdocs-web-sdk/p-C96xjMgt.system.js.map +0 -1
  81. package/dist/verdocs-web-sdk/p-Dy2CRiH8.js.map +0 -1
  82. /package/dist/components/{p-i3o08M2d.js.map → p-B1UVXqFA.js.map} +0 -0
  83. /package/dist/components/{p-C43B3SP_.js.map → p-BYVQkYYg.js.map} +0 -0
  84. /package/dist/components/{p-zTcSNwsp.js.map → p-Ck4pdoyc.js.map} +0 -0
  85. /package/dist/components/{p-DZa0rMk2.js.map → p-CsF979IT.js.map} +0 -0
  86. /package/dist/components/{p-DiwfOWXt.js.map → p-DJMr11ue.js.map} +0 -0
  87. /package/dist/verdocs-web-sdk/{p-4aee15e6.entry.js.map → p-4e091415.entry.js.map} +0 -0
  88. /package/dist/verdocs-web-sdk/{p-c3527f3e.system.entry.js.map → p-ceda04bc.system.entry.js.map} +0 -0
  89. /package/dist/verdocs-web-sdk/{p-1df29abb.entry.js.map → p-ee92c074.entry.js.map} +0 -0
  90. /package/dist/verdocs-web-sdk/{p-e87a29a3.system.entry.js.map → p-fad90cf9.system.entry.js.map} +0 -0
@@ -66,10 +66,8 @@ export class VerdocsContactPicker {
66
66
  this.auth_methods = this.templateRole.auth_methods || [];
67
67
  this.passcode = this.templateRole.passcode || '';
68
68
  }
69
- // Entitlements only gate the OPTIONAL methods (SMS, KBA, ID). Passcode and Email are always
70
- // offered, so a failure here must not block them: without this catch the await rejects,
71
- // authMethodsLoading stays true forever, and the user sees a spinner where every verification
72
- // option should be. Degrade to "no optional entitlements" instead.
69
+ // Entitlements only gate optional methods like KBA. We need error handling here in case the getActiveEntitlements
70
+ // call fails or we stay loading forever.
73
71
  this.activeEntitlements = await getActiveEntitlements(this.endpoint).catch(e => {
74
72
  console.warn('[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only', e);
75
73
  return {};
@@ -143,46 +141,46 @@ export class VerdocsContactPicker {
143
141
  if (!!this.activeEntitlements.id_auth) {
144
142
  verificationOptions.push({ label: 'ID Check', value: 'id' });
145
143
  }
146
- return (h("form", { key: '70e2a9e4eb9e9da4bd9f491648d81fd30f9a34a6', onSubmit: e => e.preventDefault(),
144
+ return (h("form", { key: '6709871235915b9c57af981cb4ab8560c040c29f', onSubmit: e => e.preventDefault(),
147
145
  // onClick={e => e.stopPropagation()}
148
- autocomplete: "off" }, h("div", { key: '9134b3e8bcd2c59f8773ad3db7bdd04d52d9cbf7', class: "row" }, h("label", { key: '455c784b89b96afddb46dcde9bd760e3b36c890d', htmlFor: this.firstNameFieldId }, "Name:"), h("div", { key: '802e5786743df37c017f6aab4061b01db4207988', class: "names-row" }, h("input", { key: '5ee405fd8487c8f2539ede7ccf26e76bb96c3932', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.first_name, placeholder: "First...", onFocus: () => {
146
+ autocomplete: "off" }, h("div", { key: 'b4792f8bf7a38bd1eca0a684da63e06607b29d4a', class: "row" }, h("label", { key: '75f1386774dcf2dba1ae074e2ef86b9d04525763', htmlFor: this.firstNameFieldId }, "Name:"), h("div", { key: '36916fdd64584ef209620a6311c4db381e55ea82', class: "names-row" }, h("input", { key: '8ab3867864dad6e2726a09666e8c3334f6bbc713', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.first_name, placeholder: "First...", onFocus: () => {
149
147
  // Give the blur event a chance to hide it first if going between first/last
150
148
  setTimeout(() => {
151
149
  var _a;
152
150
  this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0;
153
151
  }, 100);
154
- }, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: '2de6301b850c7d0986b0418bbb737b0f9e04849f', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.last_name, placeholder: "Last...", onFocus: () => {
152
+ }, onInput: e => this.handleFirstNameChange(e) }), h("input", { key: '000acb6f26cfa8a78105b211df519ef3851dc474', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", "aria-autocomplete": "none", value: this.last_name, placeholder: "Last...", onFocus: () => {
155
153
  // Give the blur event a chance to hide it first if going between first/last
156
154
  setTimeout(() => {
157
155
  var _a;
158
156
  this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0;
159
157
  }, 100);
160
- }, onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("verdocs-portal", { key: '39c6ccb8a231fe9e01fbd99aebc3e7625dfeef17', anchor: this.firstNameFieldId, onClickAway: () => {
158
+ }, onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (h("verdocs-portal", { key: '4e9c8ee57f464fcf09578430e1fe09981e87bafc', anchor: this.firstNameFieldId, onClickAway: () => {
161
159
  this.showSuggestions = false;
162
160
  document.querySelectorAll(`.verdocs-portal-wrapper`).forEach(el => el.remove());
163
- }, id: "verdocs-contact-picker-suggestions" }, h("div", { key: 'bbabbff5428faeb5cef999f422d441d3e66fdf62', class: "dropdown" }, this.contactSuggestions
161
+ }, id: "verdocs-contact-picker-suggestions" }, h("div", { key: '5cbf60f0f1186f318f686ef6bdc8d791072e4d41', class: "dropdown" }, this.contactSuggestions
164
162
  .filter(suggestion => { var _a; return !this.first_name || ((_a = suggestion.first_name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(this.first_name.toLowerCase())); })
165
163
  .map(suggestion => {
166
164
  var _a;
167
165
  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))));
168
- }))))), h("div", { key: '31c843f59d029535c1006c682f76d8b18f885dc3', class: "row" }, h("label", { key: '540a430d827ec0b44fc2d56d4f2cb5938d663236', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: '055b0ecaee8f361a4f222cbaeedcdcfbf536a5cb', 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) })), hasSMSAuth && (h("div", { key: 'b9c6dd3118c6eba736add88b35e68ff79715e44d', class: "row" }, h("label", { key: 'ff687e318625a8cde98b208bf72b111d48659acc', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: '3c6f09760be62cedde15b43a1d34bbd8c2960600', 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) => {
166
+ }))))), h("div", { key: '3d6aaa5e5bd3f0bc5681c4b788f222b6dfb45584', class: "row" }, h("label", { key: '67e9b6d47602d8c455a46e47b94bf008d2ac3a4e', htmlFor: this.emailFieldId }, "Email:"), h("input", { key: 'b65569322f9a9864fe82ac3371ffcf4e769b69f1', 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) })), hasSMSAuth && (h("div", { key: 'defed17223c457db6eea0aff5c13598a70882157', class: "row" }, h("label", { key: '7a06bd13e92cd70c51f23228bbe4ed5be59919bb', htmlFor: this.phoneFieldId }, "Phone:"), h("input", { key: '770012fd3d838449afa88309f7b003c600e10a1c', 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) => {
169
167
  this.phone = convertToE164(e.target.value);
170
- } }))), h(Fragment, { key: '2b652dbfb48a4b0360c2b6e536158492ef06125b' }, verificationOptions.length > 0 && (h("div", { key: '589c42562ec9e834680969803d747f6e94d00ec2', class: "row pin-code" }, h("label", { key: '189c3562f5e0ed7599a816d0300b5fe3c96741cb' }, "Verification Methods:"), this.authMethodsLoading ? (h("verdocs-spinner", { size: 10, mode: "dark", style: { margin: 'auto' } })) : (h("div", null, verificationOptions.map((option, i) => (h("div", { class: "option" }, h("verdocs-checkbox", { size: "small", id: `verdocs-multi-select-opt-${i}`, value: option.value, checked: this.auth_methods.includes(option.value), onInput: (e) => {
168
+ } }))), h(Fragment, { key: 'e0071e7e2fb5521685c8863dab279f31089bf20e' }, verificationOptions.length > 0 && (h("div", { key: '7f769fdb13d206c769b813eef2c68e810bc635f3', class: "row pin-code" }, h("label", { key: '4ebf33f0821f3b1f2a63ac918d3d2923b8f38e38' }, "Verification Methods:"), this.authMethodsLoading ? (h("verdocs-spinner", { size: 10, mode: "dark", style: { margin: 'auto' } })) : (h("div", null, verificationOptions.map((option, i) => (h("div", { class: "option" }, h("verdocs-checkbox", { size: "small", id: `verdocs-multi-select-opt-${i}`, value: option.value, checked: this.auth_methods.includes(option.value), onInput: (e) => {
171
169
  if (e.target.checked) {
172
170
  this.auth_methods = [...this.auth_methods, option.value];
173
171
  }
174
172
  else {
175
173
  this.auth_methods = this.auth_methods.filter(selected => selected !== option.value);
176
174
  }
177
- } }), h("label", { htmlFor: `verdocs-multi-select-option-${i}` }, option.label)))))))), this.auth_methods.includes('passcode') && (h("div", { key: '6e12581d825a0c8089e20015d1d96fb6a182cdb5', class: "row pin-code" }, h("label", { key: 'e728bc75adcf8f8a322628c1a38f612d3dd2d2dc', htmlFor: this.phoneFieldId }, "Passcode:"), h("input", { key: '59afa58c6563d4fa9a1cb7e65409370fb685d1db', 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: 'eca3f9921286dba2e5d3ba02f0b886e3d179a23f', class: "row pin-code" }, h("label", { key: '04e26414864324205e2ee71173aac15b46350b7e', style: { marginTop: '6px' } }, "Options:"), h("div", { key: 'f8df70196098a3462df02933d7d7c51cac5c856b' }, h("div", { key: '09f4d4f88a355d19ae560203020c9639fe88280e', class: "option" }, h("verdocs-checkbox", { key: 'e71d71be949fc96c1c074dcbb58ff121c4c3fd05', size: "small", id: "verdocs-delegator", checked: this.delegator, disabled: this.name_locked, onInput: (e) => {
175
+ } }), h("label", { htmlFor: `verdocs-multi-select-option-${i}` }, option.label)))))))), this.auth_methods.includes('passcode') && (h("div", { key: '79feab0e29cbfbbb825f285a995d21576732bb8a', class: "row pin-code" }, h("label", { key: '7fd8dd8c3f254e9d6eba0e657f3a02f0fd47b05e', htmlFor: this.phoneFieldId }, "Passcode:"), h("input", { key: 'a9d0055ca2669776bc465ed4d7a1ce414bb628a4', 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: '71101e3ae9adab93ffde79f43431ab91657df8cd', class: "row pin-code" }, h("label", { key: '312a0dafe35171d1ebc61e62f868e2fdcd8a8e8d', style: { marginTop: '6px' } }, "Options:"), h("div", { key: '38341490838ffe88ee03800e886d46b163f1d21a' }, h("div", { key: '68fbb6b02029ba082da5db49687989e2d0228235', class: "option" }, h("verdocs-checkbox", { key: '57c933a6ebc171d8a0c86452ff26504270175463', size: "small", id: "verdocs-delegator", checked: this.delegator, disabled: this.name_locked, onInput: (e) => {
178
176
  this.delegator = e.target.checked;
179
177
  if (this.delegator)
180
178
  this.name_locked = false;
181
- } }), h("label", { key: 'b83381a0c733b2fc19502ee1fb64462c77eb20f2', htmlFor: "verdocs-delegator" }, "May delegate signing")), h("div", { key: 'd3f59732383cded91c3c9d0431001ce27b1998b8', class: "option" }, h("verdocs-checkbox", { key: '9c0acbf0601728bf4498e2fe3c89232ee4e9448c', size: "small", id: "verdocs-name-locked", checked: this.name_locked, disabled: this.delegator, onInput: (e) => {
179
+ } }), h("label", { key: '8d4bbaef0ca5cea8100777fa37d520f1bd5a1d1e', htmlFor: "verdocs-delegator" }, "May delegate signing")), h("div", { key: 'd1278133af51917475ae1778c28da315072ca4a6', class: "option" }, h("verdocs-checkbox", { key: '32f6401902c5f850f52c58fb06def2d16fc65e99', size: "small", id: "verdocs-name-locked", checked: this.name_locked, disabled: this.delegator, onInput: (e) => {
182
180
  this.name_locked = e.target.checked;
183
181
  if (this.name_locked)
184
182
  this.delegator = false;
185
- } }), h("label", { key: 'df906c6274917b04c471aa00eedf8fad9b9c15a1', htmlFor: "verdocs-name-locked" }, "Name locked")))), h("div", { key: '74e5e6004872803e50c315540c6dc66957d6b9b0', class: "row message" }, h("label", { key: '36557fd5a7ccd14cd5fae192bf3bfaaf9f39c136', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("textarea", { key: 'c362c8a6b1953330f128bfc5083749060d17727c', 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: '8864df6dba12af9cc9e476398368f3482ab4982f', class: "buttons" }, h("div", { key: 'f09409d3f75a7f04dcb4a93189d098dbc68177c4', class: "flex-fill" }), h("verdocs-button", { key: '17a564f49e64ec50a3ef201e0aa5b662ab0f0522', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: 'c731fb4642166fc0b682894cb71f4e41fe7b48e7', label: "OK", size: "small", disabled: !canSubmit, onClick: !canSubmit ? () => { } : e => this.handleSubmit(e) }))));
183
+ } }), h("label", { key: '82d3cb3a2c48c66e8dd4bf917e35ed85327d994d', htmlFor: "verdocs-name-locked" }, "Name locked")))), h("div", { key: '01f4e93445daee8493eb67f41640865753db54bb', class: "row message" }, h("label", { key: '499b65b9368abe5f355ece31825fdd6b92905b55', htmlFor: "verdocs-contact-picker-message" }, "Message:"), h("textarea", { key: '817c16d982edb9af18f8ebee829ed77068d431b5', 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: '044a45c3a9ba57334c6e10f12e0b1f19ce5c3403', class: "buttons" }, h("div", { key: '6aa3536c73eef3852f7d483deee3773413167f5d', class: "flex-fill" }), h("verdocs-button", { key: '7dc65ba7bcb927c9822cc19d00b3a74278db8688', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { key: '7f3434aa2547d87ad2a54610374bec0511aa7940', label: "OK", size: "small", disabled: !canSubmit, onClick: !canSubmit ? () => { } : e => this.handleSubmit(e) }))));
186
184
  }
187
185
  static get is() { return "verdocs-contact-picker"; }
188
186
  static get originalStyleUrls() {
@@ -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,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,iBAAi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AgC,EACnC,IAAI,EAAC,gCAAgC,mBACvB,MAAM,EACpB,YAAY,EAAC,SAAS,EACtB,WAAW,EAAC,8CAA8C,EAC1D,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,EAC7C,OAAO,EAAE,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAEnD,IAAI,CAAC,OAAO,CACJ,CACP;YAEN,4DAAK,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 {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 name_locked: 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() name_locked: 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() activeEntitlements: Partial<Record<TEntitlement, IEntitlement>> = {};\n @State() authMethodsLoading: boolean = true\n\n async 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 // delegator and name_locked are mutually exclusive; delegator takes precedence if both are somehow set\n this.delegator = this.templateRole.delegator || false;\n this.name_locked = this.delegator ? false : (this.templateRole.name_locked || 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 // Entitlements only gate the OPTIONAL methods (SMS, KBA, ID). Passcode and Email are always\n // offered, so a failure here must not block them: without this catch the await rejects,\n // authMethodsLoading stays true forever, and the user sees a spinner where every verification\n // option should be. Degrade to \"no optional entitlements\" instead.\n this.activeEntitlements = await getActiveEntitlements(this.endpoint).catch(e => {\n console.warn('[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only', e);\n return {} as Partial<Record<TEntitlement, IEntitlement>>;\n });\n this.authMethodsLoading = false;\n console.log('[CONTACT PICKER] Loaded entitlements', this.activeEntitlements);\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 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 name_locked: this.name_locked,\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 hasSMSAuth = !!this.activeEntitlements.sms_auth\n\n const verificationOptions = [];\n\n verificationOptions.push({label: 'Passcode', value: 'passcode'});\n verificationOptions.push({label: 'Email', value: 'email'});\n\n if (hasSMSAuth) {\n verificationOptions.push({label: 'SMS (One-Time Code)', value: 'sms'});\n }\n\n if (!!this.activeEntitlements.kba_auth) {\n verificationOptions.push({label: 'Knowledge-Based (KBA)', value: 'kba'});\n }\n\n if (!!this.activeEntitlements.id_auth) {\n verificationOptions.push({label: 'ID Check', value: 'id'});\n }\n\n return (\n <form\n onSubmit={e => e.preventDefault()}\n // onClick={e => e.stopPropagation()}\n autocomplete=\"off\"\n >\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\n anchor={this.firstNameFieldId}\n onClickAway={() => {\n this.showSuggestions = false;\n document.querySelectorAll(`.verdocs-portal-wrapper`).forEach(el => el.remove());\n }}\n id=\"verdocs-contact-picker-suggestions\"\n >\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 {hasSMSAuth && (\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 pin-code\">\n <label>Verification Methods:</label>\n {this.authMethodsLoading ? (\n <verdocs-spinner size={10} mode=\"dark\" style={{margin: 'auto'}} />\n ) : (\n <div>\n {verificationOptions.map((option, i) => (\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id={`verdocs-multi-select-opt-${i}`}\n value={option.value}\n checked={this.auth_methods.includes(option.value)}\n onInput={(e: any) => {\n if (e.target.checked) {\n this.auth_methods = [...this.auth_methods, option.value];\n } else {\n this.auth_methods = this.auth_methods.filter(selected => selected !== option.value);\n }\n }}\n />\n <label htmlFor={`verdocs-multi-select-option-${i}`}>{option.label}</label>\n </div>\n ))}\n </div>\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 pin-code\">\n <label style={{marginTop: '6px'}}>Options:</label>\n <div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-delegator\"\n checked={this.delegator}\n disabled={this.name_locked}\n onInput={(e: any) => {\n this.delegator = e.target.checked;\n if (this.delegator) this.name_locked = false;\n }}\n />\n <label htmlFor=\"verdocs-delegator\">May delegate signing</label>\n </div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-name-locked\"\n checked={this.name_locked}\n disabled={this.delegator}\n onInput={(e: any) => {\n this.name_locked = e.target.checked;\n if (this.name_locked) this.delegator = false;\n }}\n />\n <label htmlFor=\"verdocs-name-locked\">Name locked</label>\n </div>\n </div>\n </div>\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,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAEnD,MAAM,YAAY,GAAG,mUAAmU,CAAC;AAsBzV;;;;;;;;;;;;;;;;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,GAAY,KAAK,CAAC;QAC7B,cAAS,GAAY,KAAK,CAAC;QAC3B,gBAAW,GAAY,KAAK,CAAC;QAC7B,iBAAY,GAA2B,EAAE,CAAC;QAC1C,aAAQ,GAAW,EAAE,CAAC;QAEtB,qBAAgB,GAAG,oCAAoC,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;QACrG,oBAAe,GAAG,mCAAmC,IAAI,CAAC,MA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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 {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 name_locked: 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() name_locked: 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() activeEntitlements: Partial<Record<TEntitlement, IEntitlement>> = {};\n @State() authMethodsLoading: boolean = true\n\n async 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 // delegator and name_locked are mutually exclusive; delegator takes precedence if both are somehow set\n this.delegator = this.templateRole.delegator || false;\n this.name_locked = this.delegator ? false : (this.templateRole.name_locked || 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 // Entitlements only gate optional methods like KBA. We need error handling here in case the getActiveEntitlements\n // call fails or we stay loading forever.\n this.activeEntitlements = await getActiveEntitlements(this.endpoint).catch(e => {\n console.warn('[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only', e);\n return {} as Partial<Record<TEntitlement, IEntitlement>>;\n });\n\n this.authMethodsLoading = false;\n console.log('[CONTACT PICKER] Loaded entitlements', this.activeEntitlements);\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 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 name_locked: this.name_locked,\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 hasSMSAuth = !!this.activeEntitlements.sms_auth\n\n const verificationOptions = [];\n\n verificationOptions.push({label: 'Passcode', value: 'passcode'});\n verificationOptions.push({label: 'Email', value: 'email'});\n\n if (hasSMSAuth) {\n verificationOptions.push({label: 'SMS (One-Time Code)', value: 'sms'});\n }\n\n if (!!this.activeEntitlements.kba_auth) {\n verificationOptions.push({label: 'Knowledge-Based (KBA)', value: 'kba'});\n }\n\n if (!!this.activeEntitlements.id_auth) {\n verificationOptions.push({label: 'ID Check', value: 'id'});\n }\n\n return (\n <form\n onSubmit={e => e.preventDefault()}\n // onClick={e => e.stopPropagation()}\n autocomplete=\"off\"\n >\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\n anchor={this.firstNameFieldId}\n onClickAway={() => {\n this.showSuggestions = false;\n document.querySelectorAll(`.verdocs-portal-wrapper`).forEach(el => el.remove());\n }}\n id=\"verdocs-contact-picker-suggestions\"\n >\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 {hasSMSAuth && (\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 pin-code\">\n <label>Verification Methods:</label>\n {this.authMethodsLoading ? (\n <verdocs-spinner size={10} mode=\"dark\" style={{margin: 'auto'}} />\n ) : (\n <div>\n {verificationOptions.map((option, i) => (\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id={`verdocs-multi-select-opt-${i}`}\n value={option.value}\n checked={this.auth_methods.includes(option.value)}\n onInput={(e: any) => {\n if (e.target.checked) {\n this.auth_methods = [...this.auth_methods, option.value];\n } else {\n this.auth_methods = this.auth_methods.filter(selected => selected !== option.value);\n }\n }}\n />\n <label htmlFor={`verdocs-multi-select-option-${i}`}>{option.label}</label>\n </div>\n ))}\n </div>\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 pin-code\">\n <label style={{marginTop: '6px'}}>Options:</label>\n <div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-delegator\"\n checked={this.delegator}\n disabled={this.name_locked}\n onInput={(e: any) => {\n this.delegator = e.target.checked;\n if (this.delegator) this.name_locked = false;\n }}\n />\n <label htmlFor=\"verdocs-delegator\">May delegate signing</label>\n </div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-name-locked\"\n checked={this.name_locked}\n disabled={this.delegator}\n onInput={(e: any) => {\n this.name_locked = e.target.checked;\n if (this.name_locked) this.delegator = false;\n }}\n />\n <label htmlFor=\"verdocs-name-locked\">Name locked</label>\n </div>\n </div>\n </div>\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"]}
@@ -2,12 +2,9 @@ import { VerdocsEndpoint } from "@verdocs/js-sdk";
2
2
  export const BETA_ORIGINS = ['https://beta.verdocs.com', 'https://stage.verdocs.com', 'http://localhost:6006', 'http://localhost:5173'];
3
3
  export const IS_BETA = BETA_ORIGINS.includes(window.location.origin);
4
4
  export const API_URL = IS_BETA ? 'https://stage-api.verdocs.com' : 'https://api.verdocs.com';
5
- // NOTE: deliberately does NOT call setBaseURL(). VerdocsEndpoint's constructor already applies this
6
- // exact origin-based default (same BETA_ORIGINS list), so setting it here was redundant and
7
- // harmful: the default endpoint is a global singleton (Symbol.for('verdocs-default-endpoint')), and
8
- // this module is a lazily-loaded chunk that evaluates the first time a component renders. That
9
- // meant it silently overwrote whatever baseURL the host app had configured at startup. Apps
10
- // embedded on origins we don't recognize (e.g. the Verdocs Teams tab, served from
11
- // *.azurestaticapps.net) were repointed at production even after explicitly selecting stage.
5
+ // NOTE: Do not call setBaseURL(). The constructor already does, but more important, in most environments
6
+ // this particular code block is lazily loaded and gets run on a component render. That creates a race
7
+ // condition that silently overwrites a host-app preference and is hard to track down. (Definitely breaks
8
+ // the Teams app, among other things.)
12
9
  export const DefaultEndpoint = VerdocsEndpoint.getDefault();
13
10
  //# sourceMappingURL=Environment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.js","sourceRoot":"","sources":["../../src/utils/Environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,0BAA0B,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;AAExI,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,yBAAyB,CAAC;AAE7F,oGAAoG;AACpG,8FAA8F;AAC9F,oGAAoG;AACpG,+FAA+F;AAC/F,4FAA4F;AAC5F,kFAAkF;AAClF,6FAA6F;AAC7F,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,UAAU,EAAE,CAAC","sourcesContent":["import {VerdocsEndpoint} from '@verdocs/js-sdk';\n\nexport const BETA_ORIGINS = ['https://beta.verdocs.com', 'https://stage.verdocs.com', 'http://localhost:6006', 'http://localhost:5173'];\n\nexport const IS_BETA = BETA_ORIGINS.includes(window.location.origin);\n\nexport const API_URL = IS_BETA ? 'https://stage-api.verdocs.com' : 'https://api.verdocs.com';\n\n// NOTE: deliberately does NOT call setBaseURL(). VerdocsEndpoint's constructor already applies this\n// exact origin-based default (same BETA_ORIGINS list), so setting it here was redundant — and\n// harmful: the default endpoint is a global singleton (Symbol.for('verdocs-default-endpoint')), and\n// this module is a lazily-loaded chunk that evaluates the first time a component renders. That\n// meant it silently overwrote whatever baseURL the host app had configured at startup. Apps\n// embedded on origins we don't recognize (e.g. the Verdocs Teams tab, served from\n// *.azurestaticapps.net) were repointed at production even after explicitly selecting stage.\nexport const DefaultEndpoint = VerdocsEndpoint.getDefault();\n"]}
1
+ {"version":3,"file":"Environment.js","sourceRoot":"","sources":["../../src/utils/Environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,0BAA0B,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;AAExI,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,yBAAyB,CAAC;AAE7F,yGAAyG;AACzG,sGAAsG;AACtG,yGAAyG;AACzG,sCAAsC;AACtC,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC,UAAU,EAAE,CAAC","sourcesContent":["import {VerdocsEndpoint} from '@verdocs/js-sdk';\n\nexport const BETA_ORIGINS = ['https://beta.verdocs.com', 'https://stage.verdocs.com', 'http://localhost:6006', 'http://localhost:5173'];\n\nexport const IS_BETA = BETA_ORIGINS.includes(window.location.origin);\n\nexport const API_URL = IS_BETA ? 'https://stage-api.verdocs.com' : 'https://api.verdocs.com';\n\n// NOTE: Do not call setBaseURL(). The constructor already does, but more important, in most environments\n// this particular code block is lazily loaded and gets run on a component render. That creates a race\n// condition that silently overwrites a host-app preference and is hard to track down. (Definitely breaks\n// the Teams app, among other things.)\nexport const DefaultEndpoint = VerdocsEndpoint.getDefault();\n"]}
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,c as t,h as o,F as i,t as a}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as c,formatFullName as d,getActiveEntitlements as r,isValidEmail as l}from"@verdocs/js-sdk";import{c as n}from"./p-BCwFpXpV.js";import{d as f}from"./p-C0SHIuoK.js";import{d as p}from"./p-DVx4efoX.js";import{d as h}from"./p-D9yawpPk.js";import{d as m}from"./p-CIgqf7hj.js";import{d as b}from"./p-CoeB7U-_.js";const u=()=>`verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{gap:12px;width:300px;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#f5f5fa}verdocs-contact-picker form .row{gap:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:start;align-items:flex-start}verdocs-contact-picker form .row .option{gap:4px;display:-ms-flexbox;display:flex;padding:5px 8px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;text-wrap:nowrap}verdocs-contact-picker form .names-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .names-row>input{font-size:14px;width:88px}verdocs-contact-picker form .pin-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .pin-code>input{-ms-flex:0 0 197px;flex:0 0 197px;font-size:14px}verdocs-contact-picker form .address{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .address>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form .zip-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .zip-code>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 80px;flex:0 0 80px;font-size:13px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message textarea{width:100%;padding:5px 7px;border-radius:4px;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}#verdocs-contact-picker-suggestions .dropdown{max-height:225px;overflow-y:scroll;background:#ffffff;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}#verdocs-contact-picker-suggestions .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-contact-picker-suggestions .dropdown .suggestion svg{width:32px;height:32px}#verdocs-contact-picker-suggestions .dropdown .suggestion .avatar{width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px;margin-right:8px;border-radius:100%}#verdocs-contact-picker-suggestions .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#verdocs-contact-picker-suggestions .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}#verdocs-contact-picker-suggestions .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}#verdocs-contact-picker-suggestions .dropdown .suggestion:hover{background:#eee;cursor:pointer}`;const v=`<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>`;const x=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.searchContacts=t(this,"searchContacts");this.exit=t(this,"exit");this.next=t(this,"next");this.endpoint=c.getDefault();this.templateRole=null;this.contactSuggestions=[];this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.name_locked=false;this.auth_methods=[];this.passcode="";this.firstNameFieldId=`verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2,11)}`;this.lastNameFieldId=`verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2,11)}`;this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`;this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`;this.activeEntitlements={};this.authMethodsLoading=true}async componentWillLoad(){this.endpoint.loadSession();if(this.templateRole){const e=d(this.templateRole);const s=e.split(" ");const t=this.templateRole.first_name||s.shift()||"";const o=this.templateRole.last_name||s.join(" ")||"";this.first_name=t;this.last_name=o;this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.name_locked=this.delegator?false:this.templateRole.name_locked||false;this.message=this.templateRole.message||"";this.showMessage=this.message!=="";this.auth_methods=this.templateRole.auth_methods||[];this.passcode=this.templateRole.passcode||""}this.activeEntitlements=await r(this.endpoint).catch((e=>{console.warn("[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only",e);return{}}));this.authMethodsLoading=false;console.log("[CONTACT PICKER] Loaded entitlements",this.activeEntitlements)}handleFirstNameChange(e){var s;this.first_name=e.target.value;(s=this.searchContacts)===null||s===void 0?void 0:s.emit({query:this.first_name})}handleLastNameChange(e){var s;this.last_name=e.target.value;(s=this.searchContacts)===null||s===void 0?void 0:s.emit({query:this.last_name})}handleCancel(e){var s;e.stopPropagation();this.showSuggestions=false;(s=this.exit)===null||s===void 0?void 0:s.emit()}handleSubmit(e){var s;e.stopPropagation();this.showSuggestions=false;(s=this.next)===null||s===void 0?void 0:s.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator,name_locked:this.name_locked,auth_methods:this.auth_methods,passcode:this.passcode,address:this.address,zip:this.zip})}handleSelectSuggestion(e,s){e.stopPropagation();this.first_name=s.first_name;this.last_name=s.last_name;this.email=s.email;this.phone=s.phone;this.showSuggestions=false}render(){const e=this.first_name&&this.last_name&&l(this.email);const s=!this.auth_methods.length||this.auth_methods.includes("passcode")&&!!this.passcode||this.auth_methods.includes("kba")&&!!this.first_name&&!!this.last_name||this.auth_methods.includes("email")&&!!this.email||this.auth_methods.includes("sms")&&!!this.phone;const t=e&&s;const a=!!this.activeEntitlements.sms_auth;const c=[];c.push({label:"Passcode",value:"passcode"});c.push({label:"Email",value:"email"});if(a){c.push({label:"SMS (One-Time Code)",value:"sms"})}if(!!this.activeEntitlements.kba_auth){c.push({label:"Knowledge-Based (KBA)",value:"kba"})}if(!!this.activeEntitlements.id_auth){c.push({label:"ID Check",value:"id"})}return o("form",{key:"70e2a9e4eb9e9da4bd9f491648d81fd30f9a34a6",onSubmit:e=>e.preventDefault(),autocomplete:"off"},o("div",{key:"9134b3e8bcd2c59f8773ad3db7bdd04d52d9cbf7",class:"row"},o("label",{key:"455c784b89b96afddb46dcde9bd760e3b36c890d",htmlFor:this.firstNameFieldId},"Name:"),o("div",{key:"802e5786743df37c017f6aab4061b01db4207988",class:"names-row"},o("input",{key:"5ee405fd8487c8f2539ede7ccf26e76bb96c3932",id:this.firstNameFieldId,name:this.firstNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.first_name,placeholder:"First...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleFirstNameChange(e)}),o("input",{key:"2de6301b850c7d0986b0418bbb737b0f9e04849f",id:this.lastNameFieldId,name:this.lastNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.last_name,placeholder:"Last...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleLastNameChange(e)})),this.showSuggestions&&o("verdocs-portal",{key:"39c6ccb8a231fe9e01fbd99aebc3e7625dfeef17",anchor:this.firstNameFieldId,onClickAway:()=>{this.showSuggestions=false;document.querySelectorAll(`.verdocs-portal-wrapper`).forEach((e=>e.remove()))},id:"verdocs-contact-picker-suggestions"},o("div",{key:"bbabbff5428faeb5cef999f422d441d3e66fdf62",class:"dropdown"},this.contactSuggestions.filter((e=>{var s;return!this.first_name||((s=e.first_name)===null||s===void 0?void 0:s.toLowerCase().includes(this.first_name.toLowerCase()))})).map((e=>{var s;return o("div",{key:(s=e.id)!==null&&s!==void 0?s:e.email,class:"suggestion",onClick:s=>this.handleSelectSuggestion(s,e)},e.picture?o("img",{alt:"Avatar",class:"avatar",src:e.picture}):o("div",{class:"avatar",innerHTML:v}),o("div",{class:"details"},o("div",{class:"name"},d(e)),e.email&&o("div",{class:"destination"},e.email),e.phone&&o("div",{class:"destination"},e.phone)))}))))),o("div",{key:"31c843f59d029535c1006c682f76d8b18f885dc3",class:"row"},o("label",{key:"540a430d827ec0b44fc2d56d4f2cb5938d663236",htmlFor:this.emailFieldId},"Email:"),o("input",{key:"055b0ecaee8f361a4f222cbaeedcdcfbf536a5cb",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})),a&&o("div",{key:"b9c6dd3118c6eba736add88b35e68ff79715e44d",class:"row"},o("label",{key:"ff687e318625a8cde98b208bf72b111d48659acc",htmlFor:this.phoneFieldId},"Phone:"),o("input",{key:"3c6f09760be62cedde15b43a1d34bbd8c2960600",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=>{this.phone=n(e.target.value)}})),o(i,{key:"2b652dbfb48a4b0360c2b6e536158492ef06125b"},c.length>0&&o("div",{key:"589c42562ec9e834680969803d747f6e94d00ec2",class:"row pin-code"},o("label",{key:"189c3562f5e0ed7599a816d0300b5fe3c96741cb"},"Verification Methods:"),this.authMethodsLoading?o("verdocs-spinner",{size:10,mode:"dark",style:{margin:"auto"}}):o("div",null,c.map(((e,s)=>o("div",{class:"option"},o("verdocs-checkbox",{size:"small",id:`verdocs-multi-select-opt-${s}`,value:e.value,checked:this.auth_methods.includes(e.value),onInput:s=>{if(s.target.checked){this.auth_methods=[...this.auth_methods,e.value]}else{this.auth_methods=this.auth_methods.filter((s=>s!==e.value))}}}),o("label",{htmlFor:`verdocs-multi-select-option-${s}`},e.label)))))),this.auth_methods.includes("passcode")&&o("div",{key:"6e12581d825a0c8089e20015d1d96fb6a182cdb5",class:"row pin-code"},o("label",{key:"e728bc75adcf8f8a322628c1a38f612d3dd2d2dc",htmlFor:this.phoneFieldId},"Passcode:"),o("input",{key:"59afa58c6563d4fa9a1cb7e65409370fb685d1db",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}))),o("div",{key:"eca3f9921286dba2e5d3ba02f0b886e3d179a23f",class:"row pin-code"},o("label",{key:"04e26414864324205e2ee71173aac15b46350b7e",style:{marginTop:"6px"}},"Options:"),o("div",{key:"f8df70196098a3462df02933d7d7c51cac5c856b"},o("div",{key:"09f4d4f88a355d19ae560203020c9639fe88280e",class:"option"},o("verdocs-checkbox",{key:"e71d71be949fc96c1c074dcbb58ff121c4c3fd05",size:"small",id:"verdocs-delegator",checked:this.delegator,disabled:this.name_locked,onInput:e=>{this.delegator=e.target.checked;if(this.delegator)this.name_locked=false}}),o("label",{key:"b83381a0c733b2fc19502ee1fb64462c77eb20f2",htmlFor:"verdocs-delegator"},"May delegate signing")),o("div",{key:"d3f59732383cded91c3c9d0431001ce27b1998b8",class:"option"},o("verdocs-checkbox",{key:"9c0acbf0601728bf4498e2fe3c89232ee4e9448c",size:"small",id:"verdocs-name-locked",checked:this.name_locked,disabled:this.delegator,onInput:e=>{this.name_locked=e.target.checked;if(this.name_locked)this.delegator=false}}),o("label",{key:"df906c6274917b04c471aa00eedf8fad9b9c15a1",htmlFor:"verdocs-name-locked"},"Name locked")))),o("div",{key:"74e5e6004872803e50c315540c6dc66957d6b9b0",class:"row message"},o("label",{key:"36557fd5a7ccd14cd5fae192bf3bfaaf9f39c136",htmlFor:"verdocs-contact-picker-message"},"Message:"),o("textarea",{key:"c362c8a6b1953330f128bfc5083749060d17727c",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)),o("div",{key:"8864df6dba12af9cc9e476398368f3482ab4982f",class:"buttons"},o("div",{key:"f09409d3f75a7f04dcb4a93189d098dbc68177c4",class:"flex-fill"}),o("verdocs-button",{key:"17a564f49e64ec50a3ef201e0aa5b662ab0f0522",variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),o("verdocs-button",{key:"c731fb4642166fc0b682894cb71f4e41fe7b48e7",label:"OK",size:"small",disabled:!t,onClick:!t?()=>{}:e=>this.handleSubmit(e)})))}static get style(){return u()}},[0,"verdocs-contact-picker",{endpoint:[16],templateRole:[16],contactSuggestions:[16],first_name:[32],last_name:[32],email:[32],phone:[32],zip:[32],address:[32],message:[32],showSuggestions:[32],showMessage:[32],delegator:[32],name_locked:[32],auth_methods:[32],passcode:[32],firstNameFieldId:[32],lastNameFieldId:[32],emailFieldId:[32],phoneFieldId:[32],activeEntitlements:[32],authMethodsLoading:[32]}]);function k(){if(typeof customElements==="undefined"){return}const e=["verdocs-contact-picker","verdocs-button","verdocs-checkbox","verdocs-flag","verdocs-portal","verdocs-spinner"];e.forEach((e=>{switch(e){case"verdocs-contact-picker":if(!customElements.get(a(e))){customElements.define(a(e),x)}break;case"verdocs-button":if(!customElements.get(a(e))){f()}break;case"verdocs-checkbox":if(!customElements.get(a(e))){p()}break;case"verdocs-flag":if(!customElements.get(a(e))){h()}break;case"verdocs-portal":if(!customElements.get(a(e))){m()}break;case"verdocs-spinner":if(!customElements.get(a(e))){b()}break}}))}export{x as V,k as d};
2
- //# sourceMappingURL=p-DCZz2B7h.js.map
1
+ import{p as e,H as s,c as t,h as o,F as a,t as i}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as c,formatFullName as d,getActiveEntitlements as r,isValidEmail as l}from"@verdocs/js-sdk";import{c as n}from"./p-BCwFpXpV.js";import{d as f}from"./p-C0SHIuoK.js";import{d as p}from"./p-DVx4efoX.js";import{d as h}from"./p-D9yawpPk.js";import{d as m}from"./p-CIgqf7hj.js";import{d as b}from"./p-CoeB7U-_.js";const u=()=>`verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{gap:12px;width:300px;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#f5f5fa}verdocs-contact-picker form .row{gap:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:start;align-items:flex-start}verdocs-contact-picker form .row .option{gap:4px;display:-ms-flexbox;display:flex;padding:5px 8px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;text-wrap:nowrap}verdocs-contact-picker form .names-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .names-row>input{font-size:14px;width:88px}verdocs-contact-picker form .pin-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .pin-code>input{-ms-flex:0 0 197px;flex:0 0 197px;font-size:14px}verdocs-contact-picker form .address{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .address>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form .zip-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .zip-code>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 80px;flex:0 0 80px;font-size:13px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message textarea{width:100%;padding:5px 7px;border-radius:4px;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}#verdocs-contact-picker-suggestions .dropdown{max-height:225px;overflow-y:scroll;background:#ffffff;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}#verdocs-contact-picker-suggestions .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-contact-picker-suggestions .dropdown .suggestion svg{width:32px;height:32px}#verdocs-contact-picker-suggestions .dropdown .suggestion .avatar{width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px;margin-right:8px;border-radius:100%}#verdocs-contact-picker-suggestions .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#verdocs-contact-picker-suggestions .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}#verdocs-contact-picker-suggestions .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}#verdocs-contact-picker-suggestions .dropdown .suggestion:hover{background:#eee;cursor:pointer}`;const v=`<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>`;const x=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.searchContacts=t(this,"searchContacts");this.exit=t(this,"exit");this.next=t(this,"next");this.endpoint=c.getDefault();this.templateRole=null;this.contactSuggestions=[];this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.name_locked=false;this.auth_methods=[];this.passcode="";this.firstNameFieldId=`verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2,11)}`;this.lastNameFieldId=`verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2,11)}`;this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`;this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`;this.activeEntitlements={};this.authMethodsLoading=true}async componentWillLoad(){this.endpoint.loadSession();if(this.templateRole){const e=d(this.templateRole);const s=e.split(" ");const t=this.templateRole.first_name||s.shift()||"";const o=this.templateRole.last_name||s.join(" ")||"";this.first_name=t;this.last_name=o;this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.name_locked=this.delegator?false:this.templateRole.name_locked||false;this.message=this.templateRole.message||"";this.showMessage=this.message!=="";this.auth_methods=this.templateRole.auth_methods||[];this.passcode=this.templateRole.passcode||""}this.activeEntitlements=await r(this.endpoint).catch((e=>{console.warn("[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only",e);return{}}));this.authMethodsLoading=false;console.log("[CONTACT PICKER] Loaded entitlements",this.activeEntitlements)}handleFirstNameChange(e){var s;this.first_name=e.target.value;(s=this.searchContacts)===null||s===void 0?void 0:s.emit({query:this.first_name})}handleLastNameChange(e){var s;this.last_name=e.target.value;(s=this.searchContacts)===null||s===void 0?void 0:s.emit({query:this.last_name})}handleCancel(e){var s;e.stopPropagation();this.showSuggestions=false;(s=this.exit)===null||s===void 0?void 0:s.emit()}handleSubmit(e){var s;e.stopPropagation();this.showSuggestions=false;(s=this.next)===null||s===void 0?void 0:s.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator,name_locked:this.name_locked,auth_methods:this.auth_methods,passcode:this.passcode,address:this.address,zip:this.zip})}handleSelectSuggestion(e,s){e.stopPropagation();this.first_name=s.first_name;this.last_name=s.last_name;this.email=s.email;this.phone=s.phone;this.showSuggestions=false}render(){const e=this.first_name&&this.last_name&&l(this.email);const s=!this.auth_methods.length||this.auth_methods.includes("passcode")&&!!this.passcode||this.auth_methods.includes("kba")&&!!this.first_name&&!!this.last_name||this.auth_methods.includes("email")&&!!this.email||this.auth_methods.includes("sms")&&!!this.phone;const t=e&&s;const i=!!this.activeEntitlements.sms_auth;const c=[];c.push({label:"Passcode",value:"passcode"});c.push({label:"Email",value:"email"});if(i){c.push({label:"SMS (One-Time Code)",value:"sms"})}if(!!this.activeEntitlements.kba_auth){c.push({label:"Knowledge-Based (KBA)",value:"kba"})}if(!!this.activeEntitlements.id_auth){c.push({label:"ID Check",value:"id"})}return o("form",{key:"6709871235915b9c57af981cb4ab8560c040c29f",onSubmit:e=>e.preventDefault(),autocomplete:"off"},o("div",{key:"b4792f8bf7a38bd1eca0a684da63e06607b29d4a",class:"row"},o("label",{key:"75f1386774dcf2dba1ae074e2ef86b9d04525763",htmlFor:this.firstNameFieldId},"Name:"),o("div",{key:"36916fdd64584ef209620a6311c4db381e55ea82",class:"names-row"},o("input",{key:"8ab3867864dad6e2726a09666e8c3334f6bbc713",id:this.firstNameFieldId,name:this.firstNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.first_name,placeholder:"First...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleFirstNameChange(e)}),o("input",{key:"000acb6f26cfa8a78105b211df519ef3851dc474",id:this.lastNameFieldId,name:this.lastNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.last_name,placeholder:"Last...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleLastNameChange(e)})),this.showSuggestions&&o("verdocs-portal",{key:"4e9c8ee57f464fcf09578430e1fe09981e87bafc",anchor:this.firstNameFieldId,onClickAway:()=>{this.showSuggestions=false;document.querySelectorAll(`.verdocs-portal-wrapper`).forEach((e=>e.remove()))},id:"verdocs-contact-picker-suggestions"},o("div",{key:"5cbf60f0f1186f318f686ef6bdc8d791072e4d41",class:"dropdown"},this.contactSuggestions.filter((e=>{var s;return!this.first_name||((s=e.first_name)===null||s===void 0?void 0:s.toLowerCase().includes(this.first_name.toLowerCase()))})).map((e=>{var s;return o("div",{key:(s=e.id)!==null&&s!==void 0?s:e.email,class:"suggestion",onClick:s=>this.handleSelectSuggestion(s,e)},e.picture?o("img",{alt:"Avatar",class:"avatar",src:e.picture}):o("div",{class:"avatar",innerHTML:v}),o("div",{class:"details"},o("div",{class:"name"},d(e)),e.email&&o("div",{class:"destination"},e.email),e.phone&&o("div",{class:"destination"},e.phone)))}))))),o("div",{key:"3d6aaa5e5bd3f0bc5681c4b788f222b6dfb45584",class:"row"},o("label",{key:"67e9b6d47602d8c455a46e47b94bf008d2ac3a4e",htmlFor:this.emailFieldId},"Email:"),o("input",{key:"b65569322f9a9864fe82ac3371ffcf4e769b69f1",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})),i&&o("div",{key:"defed17223c457db6eea0aff5c13598a70882157",class:"row"},o("label",{key:"7a06bd13e92cd70c51f23228bbe4ed5be59919bb",htmlFor:this.phoneFieldId},"Phone:"),o("input",{key:"770012fd3d838449afa88309f7b003c600e10a1c",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=>{this.phone=n(e.target.value)}})),o(a,{key:"e0071e7e2fb5521685c8863dab279f31089bf20e"},c.length>0&&o("div",{key:"7f769fdb13d206c769b813eef2c68e810bc635f3",class:"row pin-code"},o("label",{key:"4ebf33f0821f3b1f2a63ac918d3d2923b8f38e38"},"Verification Methods:"),this.authMethodsLoading?o("verdocs-spinner",{size:10,mode:"dark",style:{margin:"auto"}}):o("div",null,c.map(((e,s)=>o("div",{class:"option"},o("verdocs-checkbox",{size:"small",id:`verdocs-multi-select-opt-${s}`,value:e.value,checked:this.auth_methods.includes(e.value),onInput:s=>{if(s.target.checked){this.auth_methods=[...this.auth_methods,e.value]}else{this.auth_methods=this.auth_methods.filter((s=>s!==e.value))}}}),o("label",{htmlFor:`verdocs-multi-select-option-${s}`},e.label)))))),this.auth_methods.includes("passcode")&&o("div",{key:"79feab0e29cbfbbb825f285a995d21576732bb8a",class:"row pin-code"},o("label",{key:"7fd8dd8c3f254e9d6eba0e657f3a02f0fd47b05e",htmlFor:this.phoneFieldId},"Passcode:"),o("input",{key:"a9d0055ca2669776bc465ed4d7a1ce414bb628a4",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}))),o("div",{key:"71101e3ae9adab93ffde79f43431ab91657df8cd",class:"row pin-code"},o("label",{key:"312a0dafe35171d1ebc61e62f868e2fdcd8a8e8d",style:{marginTop:"6px"}},"Options:"),o("div",{key:"38341490838ffe88ee03800e886d46b163f1d21a"},o("div",{key:"68fbb6b02029ba082da5db49687989e2d0228235",class:"option"},o("verdocs-checkbox",{key:"57c933a6ebc171d8a0c86452ff26504270175463",size:"small",id:"verdocs-delegator",checked:this.delegator,disabled:this.name_locked,onInput:e=>{this.delegator=e.target.checked;if(this.delegator)this.name_locked=false}}),o("label",{key:"8d4bbaef0ca5cea8100777fa37d520f1bd5a1d1e",htmlFor:"verdocs-delegator"},"May delegate signing")),o("div",{key:"d1278133af51917475ae1778c28da315072ca4a6",class:"option"},o("verdocs-checkbox",{key:"32f6401902c5f850f52c58fb06def2d16fc65e99",size:"small",id:"verdocs-name-locked",checked:this.name_locked,disabled:this.delegator,onInput:e=>{this.name_locked=e.target.checked;if(this.name_locked)this.delegator=false}}),o("label",{key:"82d3cb3a2c48c66e8dd4bf917e35ed85327d994d",htmlFor:"verdocs-name-locked"},"Name locked")))),o("div",{key:"01f4e93445daee8493eb67f41640865753db54bb",class:"row message"},o("label",{key:"499b65b9368abe5f355ece31825fdd6b92905b55",htmlFor:"verdocs-contact-picker-message"},"Message:"),o("textarea",{key:"817c16d982edb9af18f8ebee829ed77068d431b5",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)),o("div",{key:"044a45c3a9ba57334c6e10f12e0b1f19ce5c3403",class:"buttons"},o("div",{key:"6aa3536c73eef3852f7d483deee3773413167f5d",class:"flex-fill"}),o("verdocs-button",{key:"7dc65ba7bcb927c9822cc19d00b3a74278db8688",variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),o("verdocs-button",{key:"7f3434aa2547d87ad2a54610374bec0511aa7940",label:"OK",size:"small",disabled:!t,onClick:!t?()=>{}:e=>this.handleSubmit(e)})))}static get style(){return u()}},[0,"verdocs-contact-picker",{endpoint:[16],templateRole:[16],contactSuggestions:[16],first_name:[32],last_name:[32],email:[32],phone:[32],zip:[32],address:[32],message:[32],showSuggestions:[32],showMessage:[32],delegator:[32],name_locked:[32],auth_methods:[32],passcode:[32],firstNameFieldId:[32],lastNameFieldId:[32],emailFieldId:[32],phoneFieldId:[32],activeEntitlements:[32],authMethodsLoading:[32]}]);function k(){if(typeof customElements==="undefined"){return}const e=["verdocs-contact-picker","verdocs-button","verdocs-checkbox","verdocs-flag","verdocs-portal","verdocs-spinner"];e.forEach((e=>{switch(e){case"verdocs-contact-picker":if(!customElements.get(i(e))){customElements.define(i(e),x)}break;case"verdocs-button":if(!customElements.get(i(e))){f()}break;case"verdocs-checkbox":if(!customElements.get(i(e))){p()}break;case"verdocs-flag":if(!customElements.get(i(e))){h()}break;case"verdocs-portal":if(!customElements.get(i(e))){m()}break;case"verdocs-spinner":if(!customElements.get(i(e))){b()}break}}))}export{x as V,k as d};
2
+ //# sourceMappingURL=p-6RWROB9R.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["verdocsContactPickerCss","addrBookIcon","VerdocsContactPicker","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","endpoint","VerdocsEndpoint","getDefault","templateRole","contactSuggestions","showSuggestions","showMessage","delegator","name_locked","auth_methods","passcode","firstNameFieldId","Math","random","toString","substring","lastNameFieldId","emailFieldId","phoneFieldId","activeEntitlements","authMethodsLoading","componentWillLoad","loadSession","fullName","formatFullName","nameComponents","split","firstName","first_name","shift","lastName","last_name","join","email","phone","message","getActiveEntitlements","catch","e","console","warn","log","handleFirstNameChange","target","value","_a","searchContacts","emit","query","handleLastNameChange","handleCancel","stopPropagation","exit","handleSubmit","next","address","zip","handleSelectSuggestion","suggestion","render","hasBasics","isValidEmail","hasAuthRequirements","length","includes","canSubmit","hasSMSAuth","sms_auth","verificationOptions","push","label","kba_auth","id_auth","h","key","onSubmit","preventDefault","autocomplete","class","htmlFor","id","name","type","placeholder","onFocus","setTimeout","onInput","anchor","onClickAway","document","querySelectorAll","forEach","el","remove","filter","toLowerCase","map","onClick","picture","alt","src","innerHTML","autoComplete","convertToE164","Fragment","size","mode","style","margin","option","i","checked","selected","marginTop","disabled","variant"],"sources":["src/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.scss?tag=verdocs-contact-picker","src/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-contact-picker {\n display: block;\n border: 1px solid #ebebeb;\n background-color: $verdocs-grey-4;\n font-family: $verdocs-primary-font;\n box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);\n\n form {\n gap: 12px;\n width: 300px;\n padding: 12px;\n display: flex;\n flex-direction: column;\n background-color: $verdocs-grey-3;\n\n .row {\n gap: 8px;\n display: flex;\n position: relative;\n flex-direction: row;\n align-items: flex-start;\n\n .option {\n gap: 4px;\n display: flex;\n padding: 5px 8px;\n align-items: center;\n flex-direction: row;\n text-wrap: nowrap;\n }\n }\n\n .names-row {\n gap: 8px;\n display: flex;\n flex-direction: row;\n\n > input {\n font-size: 14px;\n width: 88px;\n }\n }\n\n .pin-code {\n gap: 8px;\n display: flex;\n align-items: flex-start;\n flex-direction: row;\n\n > input {\n flex: 0 0 197px;\n font-size: 14px;\n //margin-left: 88px;\n }\n }\n\n .address {\n gap: 8px;\n display: flex;\n align-items: center;\n flex-direction: row;\n\n > input {\n flex: 1;\n font-size: 14px;\n //margin-left: 88px;\n }\n }\n\n .zip-code {\n gap: 8px;\n display: flex;\n align-items: center;\n flex-direction: row;\n\n > input {\n flex: 1;\n font-size: 14px;\n //margin-left: 88px;\n }\n }\n\n label {\n display: flex;\n flex: 0 0 80px;\n font-size: 13px;\n font-weight: 500;\n color: $verdocs-bg-4;\n }\n\n .row.message textarea {\n width: 100%;\n padding: 5px 7px;\n border-radius: 4px;\n font-family: $verdocs-primary-font;\n }\n\n input {\n flex: 1;\n padding: 6px;\n font-size: 14px;\n border-radius: 3px;\n //background: #00000005;\n border: 1px solid $border-color-extralight;\n\n &:focus {\n outline: none;\n }\n }\n }\n\n .buttons {\n display: flex;\n column-gap: 6px;\n margin-top: 16px;\n flex-direction: row;\n\n .flex-fill {\n flex: 1;\n }\n }\n\n ::placeholder {\n color: $verdocs-bg-2;\n }\n\n // @see https://community.logmein.com/t5/LastPass-Support-Discussions/placeholder-text-overrides-data-lpignore-quot-true-quot/td-p/295135\n // LastPass is ignoring the data-lpignore attribute in some cases\n [data-lastpass-icon-root] {\n display: none !important;\n }\n}\n\n#verdocs-contact-picker-suggestions {\n .dropdown {\n max-height: 225px;\n overflow-y: scroll;\n background: #ffffff;\n font-family: $verdocs-primary-font;\n box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);\n\n .suggestion {\n display: flex;\n padding: 6px 12px;\n align-items: center;\n flex-direction: row;\n\n svg {\n width: 32px;\n height: 32px;\n }\n\n .avatar {\n width: 32px;\n height: 32px;\n flex: 0 0 32px;\n margin-right: 8px;\n border-radius: 100%;\n }\n\n .details {\n display: flex;\n flex-direction: column;\n }\n\n .name {\n font-size: 16px;\n font-weight: 500;\n margin-bottom: 3px;\n color: $verdocs-grey-0;\n }\n\n .destination {\n font-size: 14px;\n margin-bottom: 3px;\n color: $verdocs-grey-1;\n }\n\n &:hover {\n background: #eee;\n cursor: pointer;\n }\n }\n }\n}\n","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 {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 name_locked: 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() name_locked: 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() activeEntitlements: Partial<Record<TEntitlement, IEntitlement>> = {};\n @State() authMethodsLoading: boolean = true\n\n async 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 // delegator and name_locked are mutually exclusive; delegator takes precedence if both are somehow set\n this.delegator = this.templateRole.delegator || false;\n this.name_locked = this.delegator ? false : (this.templateRole.name_locked || 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 // Entitlements only gate optional methods like KBA. We need error handling here in case the getActiveEntitlements\n // call fails or we stay loading forever.\n this.activeEntitlements = await getActiveEntitlements(this.endpoint).catch(e => {\n console.warn('[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only', e);\n return {} as Partial<Record<TEntitlement, IEntitlement>>;\n });\n\n this.authMethodsLoading = false;\n console.log('[CONTACT PICKER] Loaded entitlements', this.activeEntitlements);\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 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 name_locked: this.name_locked,\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 hasSMSAuth = !!this.activeEntitlements.sms_auth\n\n const verificationOptions = [];\n\n verificationOptions.push({label: 'Passcode', value: 'passcode'});\n verificationOptions.push({label: 'Email', value: 'email'});\n\n if (hasSMSAuth) {\n verificationOptions.push({label: 'SMS (One-Time Code)', value: 'sms'});\n }\n\n if (!!this.activeEntitlements.kba_auth) {\n verificationOptions.push({label: 'Knowledge-Based (KBA)', value: 'kba'});\n }\n\n if (!!this.activeEntitlements.id_auth) {\n verificationOptions.push({label: 'ID Check', value: 'id'});\n }\n\n return (\n <form\n onSubmit={e => e.preventDefault()}\n // onClick={e => e.stopPropagation()}\n autocomplete=\"off\"\n >\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\n anchor={this.firstNameFieldId}\n onClickAway={() => {\n this.showSuggestions = false;\n document.querySelectorAll(`.verdocs-portal-wrapper`).forEach(el => el.remove());\n }}\n id=\"verdocs-contact-picker-suggestions\"\n >\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 {hasSMSAuth && (\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 pin-code\">\n <label>Verification Methods:</label>\n {this.authMethodsLoading ? (\n <verdocs-spinner size={10} mode=\"dark\" style={{margin: 'auto'}} />\n ) : (\n <div>\n {verificationOptions.map((option, i) => (\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id={`verdocs-multi-select-opt-${i}`}\n value={option.value}\n checked={this.auth_methods.includes(option.value)}\n onInput={(e: any) => {\n if (e.target.checked) {\n this.auth_methods = [...this.auth_methods, option.value];\n } else {\n this.auth_methods = this.auth_methods.filter(selected => selected !== option.value);\n }\n }}\n />\n <label htmlFor={`verdocs-multi-select-option-${i}`}>{option.label}</label>\n </div>\n ))}\n </div>\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 pin-code\">\n <label style={{marginTop: '6px'}}>Options:</label>\n <div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-delegator\"\n checked={this.delegator}\n disabled={this.name_locked}\n onInput={(e: any) => {\n this.delegator = e.target.checked;\n if (this.delegator) this.name_locked = false;\n }}\n />\n <label htmlFor=\"verdocs-delegator\">May delegate signing</label>\n </div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-name-locked\"\n checked={this.name_locked}\n disabled={this.delegator}\n onInput={(e: any) => {\n this.name_locked = e.target.checked;\n if (this.name_locked) this.delegator = false;\n }}\n />\n <label htmlFor=\"verdocs-name-locked\">Name locked</label>\n </div>\n </div>\n </div>\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"],"mappings":"kZAAA,MAAMA,EAA0B,IAAM,u7HCItC,MAAMC,EAAe,oU,MA4CRC,EAAoBC,EAAA,MAAAD,UAAAE,EALjC,WAAAC,CAAAC,G,2IASUC,KAAAC,SAA4BC,EAAgBC,aAK5CH,KAAAI,aAA2C,KAM3CJ,KAAAK,mBAAuC,GAyBtCL,KAAAM,gBAA2B,MAC3BN,KAAAO,YAAuB,MACvBP,KAAAQ,UAAqB,MACrBR,KAAAS,YAAuB,MACvBT,KAAAU,aAAuC,GACvCV,KAA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C,YAC/CN,EAAA,YAAAC,IAAA,2CACEM,GAAG,iCACHC,KAAK,iCAAgC,gBACvB,OACdJ,aAAa,UACbM,YAAY,+CACZC,QAAS,IAAOrF,KAAKM,gBAAkB,MACvCiF,QAAUhD,GAAYvC,KAAKoC,QAAUG,EAAEK,OAAOC,OAE7C7C,KAAKoC,UAIVsC,EAAA,OAAAC,IAAA,2CAAKI,MAAM,WACTL,EAAA,OAAAC,IAAA,2CAAKI,MAAM,cAEXL,EAAA,kBAAAC,IAAA,2CAAgByC,QAAQ,UAAU7C,MAAM,SAASmC,KAAK,QAAQR,QAAS3D,GAAKvC,KAAKmD,aAAaZ,KAC9FmC,EAAA,kBAAAC,IAAA,2CAAgBJ,MAAM,KAAKmC,KAAK,QAAQS,UAAWjD,EAAWgC,SAAUhC,EAAY,OAAW3B,GAAKvC,KAAKsD,aAAaf,M","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,c as o,h as t,d as a,t as d}from"./p-yZBlG3YQ.js";import{verifySigner as i}from"@verdocs/js-sdk";import{D as c}from"./p-Dy2CRiH8.js";import{V as l}from"./p-D97GxsI-.js";import{d as n}from"./p-C0SHIuoK.js";import{d as r}from"./p-JGWMBIGy.js";import{d as f}from"./p-CxIhMndz.js";import{d as p}from"./p-BMGs9CCD.js";const b=()=>`verdocs-passcode-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-passcode-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-passcode-dialog .heading{width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-passcode-dialog .heading .title{font-size:20px;font-weight:500}verdocs-passcode-dialog .step{color:#666;margin-left:6px}verdocs-passcode-dialog .help-box{padding:0;color:black;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;margin-bottom:20px}verdocs-passcode-dialog .help-details{gap:5px;display:-ms-flexbox;display:flex;margin-left:0;font-size:14px;-ms-flex-direction:column;flex-direction:column}verdocs-passcode-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-passcode-dialog .help-text{font-weight:400}verdocs-passcode-dialog .buttons{width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-passcode-dialog .buttons verdocs-button{margin-left:16px}`;const m=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.exit=o(this,"exit");this.next=o(this,"next");this.endpoint=c;this.response=""}handleCancel(){this.exit.emit()}handleSubmit(){i(this.endpoint,{auth_method:"passcode",code:this.response}).then((e=>{console.log("Verification completed",e);this.next.emit({response:e})})).catch((e=>{l("Invalid passcode. Please try again.");console.log("Invalid code",e)}));this.response=""}render(){return t(a,{key:"3b129d56369777ca4b6a7fbb5a98f937aafae0aa"},t("verdocs-dialog",{key:"26573497a36f1036e0b317ae6b7f289ce19a8f06",persistent:true,onExit:()=>this.handleCancel()},t("div",{key:"e403d2050639b3796350917a9cd04fcb734bb5ab",slot:"heading",class:"heading"},t("div",{key:"e24ca397c7e47a6a0d492a84e0b9f4f50639f8c5",class:"title"},"Passcode Required")),t("div",{key:"a67188270a2d984579f0704083c9162c5619ae22",slot:"content",class:"content"},t("div",{key:"5582495c434ff9dc96740670765071cdb776aa0b",class:"help-box"},t("div",{key:"6d6ce967f4c6b13ba727135c0f4471e444777ef8",class:"help-details"},t("div",{key:"5a79e2ad94e747e0ca02316cd92baec3258c61d4",class:"help-text"},"This document is protected by a passcode. Please enter it below to proceed. If you do not have one, please contact the sender."))),t("verdocs-text-input",{key:"6fdd12c6f98e48c04958733b067db509afadb357",id:"verdocs-passcode-input",value:this.response,onClick:e=>e.stopPropagation(),placeholder:"Enter passcode...",onInput:e=>this.response=e.target.value})),t("div",{key:"74615d4a6d0edf18cbe03ae73ff8eb8d692e65c0",slot:"footer",class:"buttons footer"},t("verdocs-button",{key:"c0e8a8509c626ed817e6560dcc77ece31abf2f87",label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),t("verdocs-button",{key:"dc1da5e42cda0871236aadbfe24b5aa3b8660e59",label:"Submit",onClick:()=>this.handleSubmit(),disabled:!this.response}))))}static get style(){return b()}},[0,"verdocs-passcode-dialog",{endpoint:[1040],response:[32]}]);function x(){if(typeof customElements==="undefined"){return}const e=["verdocs-passcode-dialog","verdocs-button","verdocs-dialog","verdocs-help-icon","verdocs-text-input"];e.forEach((e=>{switch(e){case"verdocs-passcode-dialog":if(!customElements.get(d(e))){customElements.define(d(e),m)}break;case"verdocs-button":if(!customElements.get(d(e))){n()}break;case"verdocs-dialog":if(!customElements.get(d(e))){r()}break;case"verdocs-help-icon":if(!customElements.get(d(e))){f()}break;case"verdocs-text-input":if(!customElements.get(d(e))){p()}break}}))}export{m as V,x as d};
2
- //# sourceMappingURL=p-i3o08M2d.js.map
1
+ import{p as e,H as s,c as o,h as t,d as a,t as d}from"./p-yZBlG3YQ.js";import{verifySigner as i}from"@verdocs/js-sdk";import{D as c}from"./p-b2u0_wDk.js";import{V as l}from"./p-D97GxsI-.js";import{d as n}from"./p-C0SHIuoK.js";import{d as r}from"./p-JGWMBIGy.js";import{d as f}from"./p-CxIhMndz.js";import{d as p}from"./p-BMGs9CCD.js";const b=()=>`verdocs-passcode-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-passcode-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-passcode-dialog .heading{width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-passcode-dialog .heading .title{font-size:20px;font-weight:500}verdocs-passcode-dialog .step{color:#666;margin-left:6px}verdocs-passcode-dialog .help-box{padding:0;color:black;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;margin-bottom:20px}verdocs-passcode-dialog .help-details{gap:5px;display:-ms-flexbox;display:flex;margin-left:0;font-size:14px;-ms-flex-direction:column;flex-direction:column}verdocs-passcode-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-passcode-dialog .help-text{font-weight:400}verdocs-passcode-dialog .buttons{width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-passcode-dialog .buttons verdocs-button{margin-left:16px}`;const m=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.exit=o(this,"exit");this.next=o(this,"next");this.endpoint=c;this.response=""}handleCancel(){this.exit.emit()}handleSubmit(){i(this.endpoint,{auth_method:"passcode",code:this.response}).then((e=>{console.log("Verification completed",e);this.next.emit({response:e})})).catch((e=>{l("Invalid passcode. Please try again.");console.log("Invalid code",e)}));this.response=""}render(){return t(a,{key:"3b129d56369777ca4b6a7fbb5a98f937aafae0aa"},t("verdocs-dialog",{key:"26573497a36f1036e0b317ae6b7f289ce19a8f06",persistent:true,onExit:()=>this.handleCancel()},t("div",{key:"e403d2050639b3796350917a9cd04fcb734bb5ab",slot:"heading",class:"heading"},t("div",{key:"e24ca397c7e47a6a0d492a84e0b9f4f50639f8c5",class:"title"},"Passcode Required")),t("div",{key:"a67188270a2d984579f0704083c9162c5619ae22",slot:"content",class:"content"},t("div",{key:"5582495c434ff9dc96740670765071cdb776aa0b",class:"help-box"},t("div",{key:"6d6ce967f4c6b13ba727135c0f4471e444777ef8",class:"help-details"},t("div",{key:"5a79e2ad94e747e0ca02316cd92baec3258c61d4",class:"help-text"},"This document is protected by a passcode. Please enter it below to proceed. If you do not have one, please contact the sender."))),t("verdocs-text-input",{key:"6fdd12c6f98e48c04958733b067db509afadb357",id:"verdocs-passcode-input",value:this.response,onClick:e=>e.stopPropagation(),placeholder:"Enter passcode...",onInput:e=>this.response=e.target.value})),t("div",{key:"74615d4a6d0edf18cbe03ae73ff8eb8d692e65c0",slot:"footer",class:"buttons footer"},t("verdocs-button",{key:"c0e8a8509c626ed817e6560dcc77ece31abf2f87",label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),t("verdocs-button",{key:"dc1da5e42cda0871236aadbfe24b5aa3b8660e59",label:"Submit",onClick:()=>this.handleSubmit(),disabled:!this.response}))))}static get style(){return b()}},[0,"verdocs-passcode-dialog",{endpoint:[1040],response:[32]}]);function x(){if(typeof customElements==="undefined"){return}const e=["verdocs-passcode-dialog","verdocs-button","verdocs-dialog","verdocs-help-icon","verdocs-text-input"];e.forEach((e=>{switch(e){case"verdocs-passcode-dialog":if(!customElements.get(d(e))){customElements.define(d(e),m)}break;case"verdocs-button":if(!customElements.get(d(e))){n()}break;case"verdocs-dialog":if(!customElements.get(d(e))){r()}break;case"verdocs-help-icon":if(!customElements.get(d(e))){f()}break;case"verdocs-text-input":if(!customElements.get(d(e))){p()}break}}))}export{m as V,x as d};
2
+ //# sourceMappingURL=p-B1UVXqFA.js.map