@verdocs/web-sdk 4.2.138 → 4.2.140

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 (32) hide show
  1. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +10 -6
  2. package/dist/cjs/verdocs-preview_9.cjs.entry.js +9 -6
  3. package/dist/cjs/verdocs-sign.cjs.entry.js +2 -2
  4. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +11 -8
  5. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +2 -2
  6. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +11 -7
  7. package/dist/components/verdocs-contact-picker2.js +11 -7
  8. package/dist/components/verdocs-send2.js +11 -8
  9. package/dist/components/verdocs-sign.js +2 -2
  10. package/dist/esm/verdocs-contact-picker_2.entry.js +11 -7
  11. package/dist/esm/verdocs-preview_9.entry.js +10 -7
  12. package/dist/esm/verdocs-sign.entry.js +2 -2
  13. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  14. package/dist/esm-es5/verdocs-preview_9.entry.js +1 -1
  15. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  16. package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +2 -1
  17. package/dist/types/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.d.ts +1 -1
  18. package/dist/types/components/envelopes/verdocs-envelope-recipient-summary/verdocs-envelope-recipient-summary.d.ts +1 -0
  19. package/dist/verdocs-web-sdk/p-18b2b2ab.entry.js +1 -0
  20. package/dist/verdocs-web-sdk/p-1e8c7927.entry.js +1 -0
  21. package/dist/verdocs-web-sdk/p-267df026.system.js +1 -1
  22. package/dist/verdocs-web-sdk/p-458eda56.system.entry.js +1 -0
  23. package/dist/verdocs-web-sdk/{p-fd5ffce4.system.entry.js → p-937e21ca.system.entry.js} +1 -1
  24. package/dist/verdocs-web-sdk/p-97fa9395.entry.js +1 -0
  25. package/dist/verdocs-web-sdk/p-e7b20fdc.system.entry.js +1 -0
  26. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  27. package/package.json +4 -4
  28. package/dist/verdocs-web-sdk/p-0f677e5a.system.entry.js +0 -1
  29. package/dist/verdocs-web-sdk/p-28684a2b.entry.js +0 -1
  30. package/dist/verdocs-web-sdk/p-3912a575.entry.js +0 -1
  31. package/dist/verdocs-web-sdk/p-80635ee9.entry.js +0 -1
  32. package/dist/verdocs-web-sdk/p-a6be54b0.system.entry.js +0 -1
@@ -310,6 +310,7 @@ const VerdocsSign = class {
310
310
  isFieldFilled(field) {
311
311
  const { value = '' } = field;
312
312
  switch (field.type) {
313
+ case 'textarea':
313
314
  case 'textbox':
314
315
  switch (field.validator || '') {
315
316
  case 'email':
@@ -326,9 +327,8 @@ const VerdocsSign = class {
326
327
  // Timestamp fields get automatically filled when the envelope is submitted.
327
328
  case 'timestamp':
328
329
  return true;
329
- case 'textarea':
330
330
  case 'date':
331
- return value !== '';
331
+ return !!value;
332
332
  case 'attachment':
333
333
  return value === 'attached';
334
334
  case 'dropdown':
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host}from"./index-a68c7262.js";import{VerdocsEndpoint,formatFullName}from"@verdocs/js-sdk";import{f as convertToE164}from"./utils-6ecd6558.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./format-b8602175.js";var verdocsContactPickerCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", 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:center;align-items:center}verdocs-contact-picker form .row.message{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}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:103px}verdocs-contact-picker form .kba-row{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 .kba-row verdocs-select-input{margin:0}verdocs-contact-picker form .pin-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 .pin-code>input{-ms-flex:0;flex:0;width:133px;font-size:14px;margin-left:58px}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:0;flex:0;width:133px;font-size:14px;margin-left:58px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;font-size:14px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message label{-ms-flex:0;flex:0}verdocs-contact-picker form .row.message input{width:100%}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;background:rgba(0, 0, 0, 0.0196078431);border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;max-height:225px;overflow-y:scroll;position:absolute;background:#ffffff;-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 .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 form .dropdown .suggestion svg{width:32px;height:32px}verdocs-contact-picker form .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 form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}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}';var VerdocsContactPickerStyle0=verdocsContactPickerCss;var messageIcon='<svg focusable="false" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';var kbaIcon='<svg focusable="false" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M4.5 3.75a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3h-15Zm4.125 3a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Zm-3.873 8.703a4.126 4.126 0 0 1 7.746 0 .75.75 0 0 1-.351.92 7.47 7.47 0 0 1-3.522.877 7.47 7.47 0 0 1-3.522-.877.75.75 0 0 1-.351-.92ZM15 8.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15ZM14.25 12a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H15a.75.75 0 0 1-.75-.75Zm.75 2.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15Z" clip-rule="evenodd" /></svg>';var 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>';var VerdocsContactPicker=function(){function e(e){registerInstance(this,e);this.searchContacts=createEvent(this,"searchContacts",7);this.exit=createEvent(this,"exit",7);this.next=createEvent(this,"next",7);this.endpoint=VerdocsEndpoint.getDefault();this.templateRole=null;this.contactSuggestions=[];this.first_name=undefined;this.last_name=undefined;this.email=undefined;this.phone=undefined;this.zip=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.showKba=false;this.kba_method="";this.kba_pin="";this.nameFieldId="verdocs-contact-picker-name-".concat(Math.random().toString(36).substring(2,11));this.firstNameFieldId="verdocs-contact-picker-firstname-".concat(Math.random().toString(36).substring(2,11));this.lastNameFieldId="verdocs-contact-picker-lastname-".concat(Math.random().toString(36).substring(2,11));this.emailFieldId="verdocs-contact-picker-email-".concat(Math.random().toString(36).substring(2,11));this.phoneFieldId="verdocs-contact-picker-phone-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentWillLoad=function(){if(this.templateRole){var e=formatFullName(this.templateRole);var t=e.split(" ");var o=this.templateRole.first_name||t.shift()||"";var c=this.templateRole.last_name||t.join(" ")||"";this.first_name=o;this.last_name=c;this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!=="";this.kba_method=this.templateRole.kba_method||"";this.kba_pin=this.templateRole.kba_pin||"";this.showKba=!!this.kba_method}};e.prototype.handleFirstNameChange=function(e){var t;this.first_name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.first_name})};e.prototype.handleLastNameChange=function(e){var t;this.last_name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.last_name})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator,kba_method:this.kba_method,kba_pin:this.kba_pin,zip:this.zip})};e.prototype.handleSelectSuggestion=function(e,t){e.stopPropagation();this.first_name=t.first_name;this.last_name=t.last_name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;var t=this.first_name&&this.last_name&&(this.email||this.phone);var o=!this.kba_method||this.kba_method==="pin"&&this.kba_pin||this.kba_method==="identity"&&this.zip;var c=t&&o;return h("form",{key:"7294747ca679694dc795001c654c3451602430ea",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{key:"15c6ac1100095543590800d0ab09b6e1fb270d18",class:"row"},h("label",{key:"1b06b8a15f67015eee52012ebf4f179ceb0e0442",htmlFor:this.nameFieldId},"Name:"),h("div",{key:"3578e8898d0d4f62784e46c7be13d38bb017b54d",class:"names-row"},h("input",{key:"e23199d423f95756526551efc9ee59cc0fac35d7",id:this.firstNameFieldId,name:this.firstNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.first_name,placeholder:"First...",onFocus:function(){var t;return e.showSuggestions=((t=e.contactSuggestions)===null||t===void 0?void 0:t.length)>0},onInput:function(t){return e.handleFirstNameChange(t)}}),h("input",{key:"f32adffb0b5de42ced7c866c21d0e316efea6c43",id:this.lastNameFieldId,name:this.lastNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.last_name,placeholder:"Last...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleLastNameChange(t)}})),this.showSuggestions&&h("div",{key:"581c0c9332814b3e9fe2c6a5accc17537eff2527",class:"dropdown"},this.contactSuggestions.filter((function(t){return!e.first_name||t.first_name.toLowerCase().includes(e.first_name.toLowerCase())})).map((function(t){var o;return h("div",{key:(o=t.id)!==null&&o!==void 0?o:t.email,class:"suggestion",onClick:function(o){return e.handleSelectSuggestion(o,t)}},t.picture?h("img",{alt:"Avatar",class:"avatar",src:t.picture}):h("div",{class:"avatar",innerHTML:addrBookIcon}),h("div",{class:"details"},h("div",{class:"name"},formatFullName(t)),t.email&&h("div",{class:"destination"},t.email),t.phone&&h("div",{class:"destination"},t.phone)))})))),h("div",{key:"206cac1ceb6f07d79022fdf7157e19f9683ba2cf",class:"row"},h("label",{key:"a695a0975d7d1786d5e7a61bf31bb6f6c3aeb6f8",htmlFor:this.emailFieldId},"Email:"),h("input",{key:"9f3c8ae1475eda947a2f9ea78de2df3d088058ad",id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email address...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.email=t.target.value}})),h("div",{key:"557cbc19d97671dc89e0e3a94a925f41963924cc",class:"row"},h("label",{key:"e94c9521ff3e15bdff1c1d00b1039220ace4a15e",htmlFor:this.phoneFieldId},"Phone:"),h("input",{key:"4a32ee79ec7280fccafaab5c20b4de9fbd4a07c6",id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone (SMS)...",onFocus:function(){return e.showSuggestions=false},onInput:function(e){return convertToE164(e.target.value)}})),this.showKba&&h(Fragment,{key:"85605b9ad8792de727994fce8f571a277781e60e"},h("div",{key:"72f588d9842917bf07a978fa6f22f3e0b2a5d400",class:"kba-row"},h("label",{key:"84b55053d2ba286f3c319e995973c9bba3eca481"},"KBA:"),h("verdocs-select-input",{key:"82aa458e82904711790e814e631061093d0f808b",value:this.kba_method,onInput:function(t){e.kba_method=t.target.value;e.zip="";e.kba_pin=""},options:[{label:"None",value:""},{label:"PIN Code",value:"pin"},{label:"Full Verification",value:"identity"}]}),h("div",{key:"473a6afc0526166923ee52dbf3d58ac010417632",style:{flex:"1"}}),h("verdocs-help-icon",{key:"19a702f79ee06507a8d7d5df39e7bf143afee1ba",text:"Knowledge-Based Authentication adds additional authentication for this user either via a simple PIN code or full address validation. NOTE: There may be a fee for using this feature."})),this.kba_method==="pin"&&h("div",{key:"d6b40b1635f8b34babad7e5aa5f59c805f498675",class:"row pin-code"},h("input",{key:"5d5b69f18b8d6fc730a25796c4988ca8089f8713",id:"verdocs-pin-code",name:"verdocs-pin-code",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.kba_pin,placeholder:"PIN Code...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.kba_pin=t.target.value}})),this.kba_method==="identity"&&h("div",{key:"1fd10328d614a60d046e8e5bb5256b7cedf48031",class:"row zip-code"},h("input",{key:"5bc3fe7cf69208cfdd4ab0471ce50d4ce6488f34",id:"verdocs-zip-code",name:"verdocs-zip-code",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.zip,placeholder:"Zip Code...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.zip=t.target.value}}))),this.showMessage&&h("div",{key:"a618f1924afbf97051d92cbac1b60fac6b1b41c0",class:"row message"},h("label",{key:"013453934007a7146d4cd1b7216de02f4f592cf8",htmlFor:"verdocs-contact-picker-message"},"Message:"),h("input",{key:"a7984b0dc78ae4b4aba2dff258ffce6258742049",id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Message shown in invitation...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.message=t.target.value}})),h("div",{key:"c8c3cdc7b905dda4d430b050a42d12fe5a4330d6",class:"buttons"},h("verdocs-toggle-button",{key:"ed784a9910c000ca8704a6281dc1851beedbd8cb",icon:kbaIcon,size:"small",active:this.showKba,onToggle:function(t){e.showKba=t.detail.active;if(!t.detail.active){e.kba_pin="";e.kba_method="";e.zip=""}e.showSuggestions=false}}),h("verdocs-toggle-button",{key:"b6d705f7d20d22e3f7d97b399096507912f8c11b",icon:messageIcon,size:"small",active:this.showMessage,onToggle:function(t){e.showMessage=t.detail.active;e.showSuggestions=false}}),h("div",{key:"73db7367acc8b9573bcd51eafc5d5c6c6d09f04c",class:"flex-fill"}),h("verdocs-button",{key:"9cf8f79300ed93a65d6e570f87151c131327109b",variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{key:"c4f6732a45409ccc7bd9927c3fd7ab97db8c301d",label:"OK",size:"small",disabled:!c,onClick:function(t){return e.handleSubmit(t)}})))};return e}();VerdocsContactPicker.style=VerdocsContactPickerStyle0;var verdocsToggleButtonCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-toggle-button{font-family:"Inter", "Barlow", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}';var VerdocsToggleButtonStyle0=verdocsToggleButtonCss;var VerdocsToggleButton=function(){function e(e){registerInstance(this,e);this.toggle=createEvent(this,"toggle",7);this.active=false;this.icon=null;this.label=null;this.size="normal";this._active=false}e.prototype.componentWillLoad=function(){this._active=this.active};e.prototype.handleToggle=function(e){var t;e.stopPropagation();var o=!this._active;this._active=o;(t=this.toggle)===null||t===void 0?void 0:t.emit({active:o})};e.prototype.render=function(){var e=this;return h(Host,{key:"db3a997f301462b848daf9e052eee25232b89b1d",class:"size-".concat(this.size)},this.icon?h("button",{innerHTML:this.icon,class:{active:this._active},onClick:function(t){return e.handleToggle(t)}}):h("button",{class:{active:this._active},onClick:function(t){return e.handleToggle(t)}},this.label))};return e}();VerdocsToggleButton.style=VerdocsToggleButtonStyle0;export{VerdocsContactPicker as verdocs_contact_picker,VerdocsToggleButton as verdocs_toggle_button};
1
+ import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host}from"./index-a68c7262.js";import{VerdocsEndpoint,formatFullName,isValidEmail}from"@verdocs/js-sdk";import{f as convertToE164}from"./utils-6ecd6558.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./format-b8602175.js";var verdocsContactPickerCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", 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:center;align-items:center}verdocs-contact-picker form .row.message{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}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:103px}verdocs-contact-picker form .kba-row{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 .kba-row verdocs-select-input{margin:0}verdocs-contact-picker form .pin-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 .pin-code>input{-ms-flex:0;flex:0;width:133px;font-size:14px;margin-left:58px}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:0;flex:0;width:133px;font-size:14px;margin-left:58px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;font-size:14px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message label{-ms-flex:0;flex:0}verdocs-contact-picker form .row.message input{width:100%}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;background:rgba(0, 0, 0, 0.0196078431);border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;max-height:225px;overflow-y:scroll;position:absolute;background:#ffffff;-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 .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 form .dropdown .suggestion svg{width:32px;height:32px}verdocs-contact-picker form .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 form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}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}';var VerdocsContactPickerStyle0=verdocsContactPickerCss;var messageIcon='<svg focusable="false" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';var kbaIcon='<svg focusable="false" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M4.5 3.75a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3h-15Zm4.125 3a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Zm-3.873 8.703a4.126 4.126 0 0 1 7.746 0 .75.75 0 0 1-.351.92 7.47 7.47 0 0 1-3.522.877 7.47 7.47 0 0 1-3.522-.877.75.75 0 0 1-.351-.92ZM15 8.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15ZM14.25 12a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H15a.75.75 0 0 1-.75-.75Zm.75 2.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15Z" clip-rule="evenodd" /></svg>';var 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>';var VerdocsContactPicker=function(){function e(e){registerInstance(this,e);this.searchContacts=createEvent(this,"searchContacts",7);this.exit=createEvent(this,"exit",7);this.next=createEvent(this,"next",7);this.endpoint=VerdocsEndpoint.getDefault();this.templateRole=null;this.contactSuggestions=[];this.first_name=undefined;this.last_name=undefined;this.email=undefined;this.phone=undefined;this.zip=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.showKba=false;this.kba_method="";this.kba_pin="";this.nameFieldId="verdocs-contact-picker-name-".concat(Math.random().toString(36).substring(2,11));this.firstNameFieldId="verdocs-contact-picker-firstname-".concat(Math.random().toString(36).substring(2,11));this.lastNameFieldId="verdocs-contact-picker-lastname-".concat(Math.random().toString(36).substring(2,11));this.emailFieldId="verdocs-contact-picker-email-".concat(Math.random().toString(36).substring(2,11));this.phoneFieldId="verdocs-contact-picker-phone-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentWillLoad=function(){if(this.templateRole){var e=formatFullName(this.templateRole);var t=e.split(" ");var o=this.templateRole.first_name||t.shift()||"";var i=this.templateRole.last_name||t.join(" ")||"";this.first_name=o;this.last_name=i;this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!=="";this.kba_method=this.templateRole.kba_method||"";this.kba_pin=this.templateRole.kba_pin||"";this.showKba=!!this.kba_method}};e.prototype.handleFirstNameChange=function(e){var t;this.first_name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.first_name})};e.prototype.handleLastNameChange=function(e){var t;this.last_name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.last_name})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator,kba_method:this.kba_method,kba_pin:this.kba_pin,zip:this.zip})};e.prototype.handleSelectSuggestion=function(e,t){e.stopPropagation();this.first_name=t.first_name;this.last_name=t.last_name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;var t=this.first_name&&this.last_name&&isValidEmail(this.email);var o=!this.kba_method||this.kba_method==="pin"&&this.kba_pin||this.kba_method==="identity"&&this.zip;var i=t&&o;return h("form",{key:"ac497c45c40d7ed22d7f3e8b0c022bb000ba5d9f",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{key:"8b858443d6b0ce08b53ec248ec016cd4c1abff91",class:"row"},h("label",{key:"894dff4bd6734e07513a674dfd5e6ae075258a71",htmlFor:this.nameFieldId},"Name:"),h("div",{key:"8f11b864815f4b22bc27fb9497c4a3a45514ff63",class:"names-row"},h("input",{key:"2012ff376bee8b61d08656c430e56c537c6ec2e9",id:this.firstNameFieldId,name:this.firstNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.first_name,placeholder:"First...",onFocus:function(){var t;return e.showSuggestions=((t=e.contactSuggestions)===null||t===void 0?void 0:t.length)>0},onInput:function(t){return e.handleFirstNameChange(t)}}),h("input",{key:"31e7c09b4e7ba0d9b952329a925a2e96012ba32a",id:this.lastNameFieldId,name:this.lastNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.last_name,placeholder:"Last...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleLastNameChange(t)}})),this.showSuggestions&&h("div",{key:"f179ec1c0ca6fb570bbdf26d9e647cd13a992139",class:"dropdown"},this.contactSuggestions.filter((function(t){return!e.first_name||t.first_name.toLowerCase().includes(e.first_name.toLowerCase())})).map((function(t){var o;return h("div",{key:(o=t.id)!==null&&o!==void 0?o:t.email,class:"suggestion",onClick:function(o){return e.handleSelectSuggestion(o,t)}},t.picture?h("img",{alt:"Avatar",class:"avatar",src:t.picture}):h("div",{class:"avatar",innerHTML:addrBookIcon}),h("div",{class:"details"},h("div",{class:"name"},formatFullName(t)),t.email&&h("div",{class:"destination"},t.email),t.phone&&h("div",{class:"destination"},t.phone)))})))),h("div",{key:"3373a462ee3e69d997a841fa0b244e548d1c0e3a",class:"row"},h("label",{key:"f8860a8fb9c6733a3d782325b04e58be65fd55e5",htmlFor:this.emailFieldId},"Email:"),h("input",{key:"478d60f899f8f0951764ef2a049c0e200e5e764a",id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email address...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.email=t.target.value}})),h("div",{key:"8ef1b72ce461d00993e369dc7005485dfa7479ea",class:"row"},h("label",{key:"dfbfc89ac11b4265dcdfe208cfa6272c51378ff4",htmlFor:this.phoneFieldId},"Phone:"),h("input",{key:"c49f4e0c2fad08ded0be201c56f3033b57569ae9",id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone (SMS)...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){e.phone=convertToE164(t.target.value)}})),this.showKba&&h(Fragment,{key:"f20803d8a91d8fe4d3e80a996e05609334b1fc63"},h("div",{key:"7eaffb6e155a39e396240815167fd9028d88f594",class:"kba-row"},h("label",{key:"7369126fb396b09408a0b7b52167e2b5377718d5"},"KBA:"),h("verdocs-select-input",{key:"876420a587fa61b45a882cae0c3b07a4d746de4e",value:this.kba_method,onInput:function(t){e.kba_method=t.target.value;e.zip="";e.kba_pin=""},options:[{label:"None",value:""},{label:"PIN Code",value:"pin"},{label:"Full Verification",value:"identity"}]}),h("div",{key:"9882f4052c4ed7c1519ac16f4aa887654a2fa9df",style:{flex:"1"}}),h("verdocs-help-icon",{key:"cece16cdbcddfd61acbdebaf8506de14d86e2735",text:"Knowledge-Based Authentication adds additional authentication for this user either via a simple PIN code or full address validation. NOTE: There may be a fee for using this feature."})),this.kba_method==="pin"&&h("div",{key:"f8d1b4060415b706ce6dc41af1681b5fb578801e",class:"row pin-code"},h("input",{key:"a4631db4a4f8d4fb19fdbc3fae7ab6e72ba960b2",id:"verdocs-pin-code",name:"verdocs-pin-code",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.kba_pin,placeholder:"PIN Code...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.kba_pin=t.target.value}})),this.kba_method==="identity"&&h("div",{key:"7089bcc65028634e993bcee9b488c015771ae18e",class:"row zip-code"},h("input",{key:"27dd173d1c2b5bad25d81a1a584d3fe8b273b383",id:"verdocs-zip-code",name:"verdocs-zip-code",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.zip,placeholder:"Zip Code...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.zip=t.target.value}}))),this.showMessage&&h("div",{key:"f4d1e8940b6a38131b4dddd12f0d2198ed72a510",class:"row message"},h("label",{key:"e85ef31b8e9fa8a55291f3b938105bc71ae1af7c",htmlFor:"verdocs-contact-picker-message"},"Message:"),h("input",{key:"d5db9fe70914891ecb387992dc9511facacff22d",id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Message shown in invitation...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.message=t.target.value}})),h("div",{key:"4bea6011ba9bca1235910bb7c03c13516360a117",class:"buttons"},h("verdocs-toggle-button",{key:"988bb21d4bc07c717d448f58c78e96d52ff9488c",icon:kbaIcon,size:"small",active:this.showKba,onToggle:function(t){e.showKba=t.detail.active;if(!t.detail.active){e.kba_pin="";e.kba_method="";e.zip=""}e.showSuggestions=false}}),h("verdocs-toggle-button",{key:"5db03c19e9847453bc45ec14033f9391beb4de18",icon:messageIcon,size:"small",active:this.showMessage,onToggle:function(t){e.showMessage=t.detail.active;e.showSuggestions=false}}),h("div",{key:"34c811113655950d04dc339d4ea8faeb1a9d46ca",class:"flex-fill"}),h("verdocs-button",{key:"f85404fbb9deffd6a5a81816cfd12ccaf52cf619",variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{key:"f75dafadb24638f5322de5a9a9cbd15b51a6c81f",label:"OK",size:"small",disabled:!i,onClick:!i?function(){}:function(t){return e.handleSubmit(t)}})))};return e}();VerdocsContactPicker.style=VerdocsContactPickerStyle0;var verdocsToggleButtonCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-toggle-button{font-family:"Inter", "Barlow", sans-serif}verdocs-toggle-button button{border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#cccccc;color:#33364b}verdocs-toggle-button button svg{max-width:100%;max-height:100%;fill:#33364b}verdocs-toggle-button button.active{background:#55bc81;color:#f5f5fa}verdocs-toggle-button button.active svg{fill:#f5f5fa}verdocs-toggle-button button:focus{border:none;outline:none}verdocs-toggle-button.size-normal button{width:40px;height:40px;padding:6px;border-radius:4px}verdocs-toggle-button.size-small button{width:34px;height:34px;padding:4px;border-radius:2px}';var VerdocsToggleButtonStyle0=verdocsToggleButtonCss;var VerdocsToggleButton=function(){function e(e){registerInstance(this,e);this.toggle=createEvent(this,"toggle",7);this.active=false;this.icon=null;this.label=null;this.size="normal";this._active=false}e.prototype.componentWillLoad=function(){this._active=this.active};e.prototype.handleToggle=function(e){var t;e.stopPropagation();var o=!this._active;this._active=o;(t=this.toggle)===null||t===void 0?void 0:t.emit({active:o})};e.prototype.render=function(){var e=this;return h(Host,{key:"db3a997f301462b848daf9e052eee25232b89b1d",class:"size-".concat(this.size)},this.icon?h("button",{innerHTML:this.icon,class:{active:this._active},onClick:function(t){return e.handleToggle(t)}}):h("button",{class:{active:this._active},onClick:function(t){return e.handleToggle(t)}},this.label))};return e}();VerdocsToggleButton.style=VerdocsToggleButtonStyle0;export{VerdocsContactPicker as verdocs_contact_picker,VerdocsToggleButton as verdocs_toggle_button};