@verdocs/web-sdk 4.2.122 → 4.2.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-6a8c3390.js → utils-5accd019.js} +1 -1
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +4 -2
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +15 -6
- package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_9.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +43 -13
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +44 -12
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +4 -3
- package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +4 -2
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +3 -4
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +4 -1
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +8 -1
- package/dist/collection/utils/utils.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +4 -2
- package/dist/components/verdocs-field-attachment2.js +3 -4
- package/dist/components/verdocs-field-date2.js +4 -1
- package/dist/components/verdocs-field-dropdown2.js +8 -1
- package/dist/components/verdocs-sign.js +45 -13
- package/dist/components/verdocs-view2.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-8f3ace81.js → utils-6ecd6558.js} +1 -1
- package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +4 -2
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_13.entry.js +15 -6
- package/dist/esm/verdocs-kba-dialog_2.entry.js +4 -4
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_9.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +44 -14
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-8f3ace81.js → utils-6ecd6558.js} +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_9.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +2 -0
- package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +1 -1
- package/dist/types/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts +1 -1
- package/dist/types/components/fields/verdocs-field-date/verdocs-field-date.d.ts +2 -0
- package/dist/verdocs-web-sdk/p-02af8123.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-267df026.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-f3d00620.entry.js → p-28684a2b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-188e327d.system.entry.js → p-2ee3549e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7a3a3c2c.system.entry.js → p-43a7fce5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4ee43d61.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-c5b6c6b0.entry.js → p-5313e672.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-04cb12eb.system.js → p-5381847c.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2510a25a.system.entry.js → p-6a57c036.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7f8c83da.entry.js → p-72b47a99.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-43b81463.entry.js → p-77f12464.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-7cad3ec7.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e621a28c.system.entry.js → p-7d7ca35a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6ab8ef68.system.entry.js → p-932ec5e5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e9513023.system.entry.js → p-a6be54b0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e723c6b1.entry.js → p-acf595c9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-147f2526.entry.js → p-bc9928a8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c5e65e9d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ddb7b790.entry.js → p-c9f545fe.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0f7e164f.system.entry.js → p-d119854a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e0ffd00f.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-d69410c4.system.entry.js → p-f96de332.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3b6dfc9f.js → p-fae63f89.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/verdocs-web-sdk/p-1ef68dfb.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5f27e1c5.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6cadd2b5.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7764870c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a3bc322b.entry.js +0 -1
@@ -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-8f3ace81.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}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 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n["throw"](e))}catch(e){o(e)}}function c(e){e.done?i(e.value):r(e.value).then(s,a)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-a68c7262.js";import{VerdocsEndpoint,getEnvelopeDocumentPageDisplayUri}from"@verdocs/js-sdk";import{t as throttle}from"./utils-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n["throw"](e))}catch(e){o(e)}}function c(e){e.done?i(e.value):r(e.value).then(s,a)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-a68c7262.js";import{VerdocsEndpoint,getEnvelopeDocumentPageDisplayUri}from"@verdocs/js-sdk";import{t as throttle}from"./utils-6ecd6558.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./format-b8602175.js";var verdocsEnvelopeDocumentPageCss="@-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-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";var VerdocsEnvelopeDocumentPageStyle0=verdocsEnvelopeDocumentPageCss;var VerdocsEnvelopeDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered",7);this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,getEnvelopeDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber,this.type)];case 1:e.pageDisplayUri=t.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(t){for(var i=0,n=t;i<n.length;i++){var r=n[i];var o=r.contentRect.width;e.renderedWidth=o;e.renderedHeight=e.virtualHeight*(o/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};e.prototype.render=function(){var e=this;var t="".concat(this.renderedHeight,"px");return h(Host,{key:"cca4f6b0c00556a1662ee175292d59b249b17604",id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){return i.type==="div"?h("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}}):e.pageDisplayUri?h("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):h("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsEnvelopeDocumentPage.style=VerdocsEnvelopeDocumentPageStyle0;export{VerdocsEnvelopeDocumentPage as verdocs_envelope_document_page};
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,i,t,n){function s(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?t(e.value):s(e.value).then(r,a)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;s=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){t.label=a[1];break}if(a[0]===6&&t.label<o[1]){t.label=o[1];o=a;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(a);break}if(o[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host}from"./index-a68c7262.js";import{VerdocsEndpoint,resendInvitation,cancelEnvelope,formatFullName,updateEnvelope,userIsEnvelopeOwner,capitalize}from"@verdocs/js-sdk";import{g as getEnvelopeStore,u as updateStoreEnvelope}from"./EnvelopeStore-8b1d4755.js";import{F as FORMAT_TIMESTAMP}from"./Types-95d86a44.js";import{V as VerdocsToast}from"./Toast-c4843828.js";import{S as SDKError}from"./errors-887f1e88.js";import{f as format}from"./format-b8602175.js";import"./index-7588a071.js";import"./index-a971a584.js";var verdocsEnvelopeSidebarCss='@-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-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;font-size:14px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;gap:6px;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-name{-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:0 0 100px;flex:0 0 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}verdocs-envelope-sidebar .reminders{margin:15px 0 30px 0}verdocs-envelope-sidebar .reminders .form-row{margin:8px 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-sidebar .reminders .form-row .reminders-label{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row .form-label{-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row verdocs-text-input{margin:0;width:100px}';var VerdocsEnvelopeSidebarStyle0=verdocsEnvelopeSidebarCss;var MS_PER_DAY=24*60*60*1e3;var InformationCircle='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var Users='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var ClipboardDocuments='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var ActivityIcons={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="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-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'};var VerdocsEnvelopeSidebar=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.toggle=createEvent(this,"toggle",7);this.another=createEvent(this,"another",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false;this.showRecipientDialog="";this.showCancelDialog=false;this.loading=true;this.remindersEnabled=false;this.updatingReminders=false;this.initialReminder=null;this.followupReminders=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,s,o,r,a,l;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[SIDEBAR] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return[2]}a=this;return[4,getEnvelopeStore(this.endpoint,this.envelopeId,true)];case 1:a.store=d.sent();this.sortEnvelopeRecipients();this.initialReminder=(i=(e=this.store)===null||e===void 0?void 0:e.state)===null||i===void 0?void 0:i.initial_reminder;this.followupReminders=(n=(t=this.store)===null||t===void 0?void 0:t.state)===null||n===void 0?void 0:n.followup_reminders;this.remindersEnabled=!!this.initialReminder;this.loading=false;return[3,3];case 2:l=d.sent();console.log("[SIDEBAR] Error loading envelope",l);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new SDKError(l.message,(o=l.response)===null||o===void 0?void 0:o.status,(r=l.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,i;(i=(e=this.store)===null||e===void 0?void 0:e.state)===null||i===void 0?void 0:i.recipients.sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.setTab=function(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen;(i=this.toggle)===null||i===void 0?void 0:i.emit({open:this.panelOpen});this.activeTab=e};e.prototype.canResendRecipient=function(e){var i,t;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.status)};e.prototype.handleRecipientAction=function(e,i){var t,n;console.log("[SIDEBAR] Recipient action",i,e);switch(i){case"reminder":resendInvitation(this.endpoint,this.envelopeId,e.role_name).then((function(){VerdocsToast("Reminder Sent",{style:"success"})})).catch((function(e){console.log("[SIDEBAR] Error resending invitation",e);VerdocsToast("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":VerdocsToast("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":VerdocsToast("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:(n=this.store)===null||n===void 0?void 0:n.state,event:i})};e.prototype.cancelEnvelope=function(){var e=this;this.loading=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(i){return __awaiter(e,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(s){switch(s.label){case 0:console.log("[SIDEBAR] Envelope canceled",i);VerdocsToast("Envelope canceled",{style:"success"});n=this;return[4,getEnvelopeStore(this.endpoint,this.envelopeId,true)];case 1:n.store=s.sent();this.sortEnvelopeRecipients();this.loading=false;this.panelOpen=false;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:(t=this.store)===null||t===void 0?void 0:t.state,event:"canceled"});return[2]}}))}))})).catch((function(i){console.log("[SIDEBAR] Error canceling envelope",i);e.loading=false;VerdocsToast("Error canceling envelope: "+i.message,{style:"error"})}))};e.prototype.prepareHistoryEntries=function(){var e=this;var i,t,n,s,o,r,a,l,d,c,v,h;var p=[];var u=((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.history_entries)||[];p.push({icon:"pencil",message:"Envelope created.",date:new Date((s=(n=this.store)===null||n===void 0?void 0:n.state)===null||s===void 0?void 0:s.created_at)});if(((r=(o=this.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.status)==="complete"){p.push({icon:"pencil",message:"Envelope completed.",date:new Date((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.updated_at)})}var f=u.some((function(e){return e.event==="owner:canceled"}));if(((c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.status)==="canceled"&&!f){p.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((h=(v=this.store)===null||v===void 0?void 0:v.state)===null||h===void 0?void 0:h.canceled_at)})}u.forEach((function(i){var t;var n=(t=e.store.state)===null||t===void 0?void 0:t.recipients.find((function(e){return e.role_name===i.role_name}));var s=formatFullName(n);switch(i.event.toLowerCase()){case"recipient:signed":p.push({icon:"gesture",message:"Signed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:declined":p.push({icon:"clear",message:"Declined by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":p.push({icon:"visibility",message:"Opened by ".concat(s,", via email."),date:new Date(i.created_at)});break;case"sms":p.push({icon:"visibility",message:"Opened by ".concat(s,", via SMS."),date:new Date(i.created_at)});break;case"in_person_link":p.push({icon:"visibility",message:"Opened by ".concat(s,", via In-person link."),date:new Date(i.created_at)});break;case"in_app":p.push({icon:"visibility",message:"Opened by ".concat(s,", via dashboard."),date:new Date(i.created_at)});break;default:p.push({icon:"visibility",message:"Opened by ".concat(s,"."),date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":p.push({icon:"check_circle",message:"Approved by ".concat(s,"."),date:new Date(i.created_at)});break;default:p.push({icon:"send",message:"Submitted by ".concat(s,"."),date:new Date(i.created_at)});break}break;case"recipient:prepared":p.push({icon:"send",message:"Prepared by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:claimed":if(i.event_detail==="guest"){p.push({icon:"account_circle",message:"".concat(s," claimed the Envelope as a guest."),date:new Date(i.created_at)})}else if(i.event_detail==="profile"){p.push({icon:"verified_user",message:"".concat(s," claimed the Envelope as a verified user."),date:new Date(i.created_at)})}break;case"recipient:agreed":p.push({icon:"done",message:"".concat(s," agreed to use electronic records and signatures."),date:new Date(i.created_at)});break;case"recipient:invited":if(i.event_detail==="sms"){p.push({icon:"textsms",message:"".concat(s," has been invited via SMS."),date:new Date(i.created_at)})}else{p.push({icon:"mail",message:"".concat(s," has been invited via email."),date:new Date(i.created_at)})}break;case"recipient:reminder":if(i.event_detail==="sms"){p.push({icon:"textsms",message:"".concat(s," sent a reminder via SMS."),date:new Date(i.created_at)})}else{p.push({icon:"mail",message:"".concat(s," sent a reminder via email."),date:new Date(i.created_at)})}break;case"invitation:resent":p.push({icon:"mail",message:"Invitation was resent to ".concat(s).concat(i.event_detail==="reminder"?" by reminder":"","."),date:new Date(i.created_at)});break;case"envelope:cc":p.push({icon:"contact_mail",message:"A copy has been sent to ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:delegated":p.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":p.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"owner:updated_recipient_info":p.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":p.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":p.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"envelope_canceled":case"canceled":case"owner:canceled":p.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":p.push({icon:"link",message:"Owner accessed the In-person link for ".concat(n,"."),date:new Date(i.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",i);break}}));p.sort((function(e,i){return i.date.getTime()-e.date.getTime()}));return p};e.prototype.handleToggleReminders=function(){if(this.remindersEnabled){return this.handleSetReminders(null,null)}else{return this.handleSetReminders(MS_PER_DAY,3*MS_PER_DAY)}};e.prototype.handleSetReminders=function(e,i){var t=this;console.log("Updating reminders...");this.updatingReminders=true;updateEnvelope(this.endpoint,this.envelopeId,{initial_reminder:e,followup_reminders:i}).then((function(e){console.log("Updated",e);updateStoreEnvelope(t.store,e);t.initialReminder=e.initial_reminder;t.followupReminders=e.followup_reminders;t.remindersEnabled=!!e.initial_reminder;t.updatingReminders=false})).catch((function(e){var i,n,s,o,r,a;console.log("Error updating envelope",e);t.initialReminder=(n=(i=t.store)===null||i===void 0?void 0:i.state)===null||n===void 0?void 0:n.initial_reminder;t.followupReminders=(o=(s=t.store)===null||s===void 0?void 0:s.state)===null||o===void 0?void 0:o.followup_reminders;t.remindersEnabled=!!((a=(r=t.store)===null||r===void 0?void 0:r.state)===null||a===void 0?void 0:a.initial_reminder);t.updatingReminders=false;alert(e.response.data.error)}))};e.prototype.render=function(){var e=this;var i,t,n,s,o,r,a,l,d,c,v,p,u,f,m,w,g,b,x,y,k,z,E;if(!this.store.state){return h(Host,null)}var M=userIsEnvelopeOwner(this.endpoint.profile,this.store.state);var S=this.prepareHistoryEntries();var _=((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.status)!=="pending"&&((s=(n=this.store)===null||n===void 0?void 0:n.state)===null||s===void 0?void 0:s.status)!=="in progress";return h(Host,{class:this.panelOpen?"open":""},h("div",{class:"side-buttons"},h("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:InformationCircle}),h("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:Users}),h("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:ClipboardDocuments})),this.activeTab===1&&h("div",{class:"content"},h("div",{class:"title"},"Details"),h("div",{class:"label"},"Envelope ID"),h("div",{class:"value"},(r=(o=this.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.id),h("div",{class:"label"},"Date Created"),h("div",{class:"value"},format(new Date((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.created_at),FORMAT_TIMESTAMP)),h("div",{class:"label"},"Last Modified"),h("div",{class:"value"},format(new Date((c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.updated_at),FORMAT_TIMESTAMP)),h("div",{class:"label"},"Status"),h("div",{class:"value"},capitalize((p=(v=this.store)===null||v===void 0?void 0:v.state)===null||p===void 0?void 0:p.status)),h("div",{class:"label"},"Owner ID"),h("div",{class:"value"},(f=(u=this.store)===null||u===void 0?void 0:u.state)===null||f===void 0?void 0:f.profile_id),h("div",{class:"label"},"Owner Name"),h("div",{class:"value"},formatFullName((w=(m=this.store)===null||m===void 0?void 0:m.state)===null||w===void 0?void 0:w.profile)),h("div",{class:"label"},"Owner Email"),h("div",{class:"value"},(x=(b=(g=this.store)===null||g===void 0?void 0:g.state)===null||b===void 0?void 0:b.profile)===null||x===void 0?void 0:x.email)),this.activeTab===2&&h("div",{class:"content"},h("div",{class:"title"},"Recipients"),(k=(y=this.store)===null||y===void 0?void 0:y.state)===null||k===void 0?void 0:k.recipients.map((function(i,t){var n;var s=i.status!=="submitted"&&i.status!=="canceled"&&i.status!=="declined";var o=e.canResendRecipient(i);var r=formatFullName(i);return h("div",{class:"recipient-detail"},h("div",{class:"recipient-header"},h("div",{class:"recipient-number"},t+1),h("div",{class:"recipient-name"},i.role_name),h("div",{class:(n={"recipient-status":true},n[i.status]=true,n)},i.status),M&&!_&&h("verdocs-dropdown",{onOptionSelected:function(t){return e.handleRecipientAction(i,t.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!o},{id:"inperson",label:"Get In-Person Link",disabled:!s}]})),h("dic",{class:"recipient-content"},h("div",{class:"recipient-name"},r),h("div",{class:"recipient-name"},i.email),h("div",{class:"recipient-name"},i.phone)))})),M&&h("div",{class:"reminders"},h("div",{class:"form-row"},h("div",{class:"reminders-label"},"Reminders"),h("verdocs-switch",{disabled:_||this.updatingReminders,checked:this.remindersEnabled,onCheckedChange:function(){return e.handleToggleReminders()}})),this.remindersEnabled&&h(Fragment,null,h("div",{class:"form-row"},"NOTE: Reminders will only be sent for up to 14 days."),h("div",{class:"form-row"},h("div",{class:"form-label"},"Initial Reminder (days):"),h("verdocs-text-input",{placeholder:"In hours...",disabled:_||this.updatingReminders,value:String(Math.floor(this.initialReminder/MS_PER_DAY)),onBlur:function(i){e.initialReminder=Number(i.target.value)*MS_PER_DAY;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),h("div",{class:"form-row"},h("div",{class:"form-label"},"Follow-up Reminders:"),h("verdocs-text-input",{placeholder:"In hours...",disabled:_||this.updatingReminders,value:String(Math.floor(this.followupReminders/MS_PER_DAY)),onBlur:function(i){e.followupReminders=Number(i.target.value)*MS_PER_DAY;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),h("div",{class:"form-row"},h("div",{class:"form-label"},"Next Reminder:"),h("div",{style:{color:"#dddddd"}},format(new Date((E=(z=this.store)===null||z===void 0?void 0:z.state)===null||E===void 0?void 0:E.next_reminder),"P p"))))),M&&h("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Envelope",onClick:function(){return e.showCancelDialog=!_},disabled:_})),this.activeTab===3&&h("div",{class:"content"},h("div",{class:"title"},"History"),S.map((function(e){return h("div",{class:"history-entry"},h("div",{class:"activity-icon",innerHTML:ActivityIcons[e.icon]||e.icon}),h("div",{class:"activity-details"},h("div",{class:"activity-text"},e.message),h("div",{class:"activity-date"},format(e.date,FORMAT_TIMESTAMP))))}))),this.showRecipientDialog&&h("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:function(){return e.showRecipientDialog=""}}),this.showCancelDialog&&h("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:function(){e.showCancelDialog=false;e.cancelEnvelope()}}))};return e}();VerdocsEnvelopeSidebar.style=VerdocsEnvelopeSidebarStyle0;export{VerdocsEnvelopeSidebar as verdocs_envelope_sidebar};
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,i,t,n){function s(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?t(e.value):s(e.value).then(r,a)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;s=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){t.label=a[1];break}if(a[0]===6&&t.label<o[1]){t.label=o[1];o=a;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(a);break}if(o[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host}from"./index-a68c7262.js";import{VerdocsEndpoint,resendInvitation,cancelEnvelope,formatFullName,updateEnvelope,userIsEnvelopeOwner,capitalize}from"@verdocs/js-sdk";import{g as getEnvelopeStore,u as updateStoreEnvelope}from"./EnvelopeStore-8b1d4755.js";import{F as FORMAT_TIMESTAMP}from"./Types-95d86a44.js";import{V as VerdocsToast}from"./Toast-c4843828.js";import{S as SDKError}from"./errors-887f1e88.js";import{f as format}from"./format-b8602175.js";import"./index-7588a071.js";import"./index-a971a584.js";var verdocsEnvelopeSidebarCss='@-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-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;font-size:14px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;gap:6px;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-name{-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:0 0 100px;flex:0 0 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}verdocs-envelope-sidebar .reminders{margin:15px 0 30px 0}verdocs-envelope-sidebar .reminders .form-row{margin:8px 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-sidebar .reminders .form-row .reminders-label{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row .form-label{-ms-flex:1;flex:1}verdocs-envelope-sidebar .reminders .form-row verdocs-text-input{margin:0;width:100px}';var VerdocsEnvelopeSidebarStyle0=verdocsEnvelopeSidebarCss;var MS_PER_DAY=24*60*60*1e3;var InformationCircle='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var Users='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var ClipboardDocuments='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var ActivityIcons={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="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-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'};var VerdocsEnvelopeSidebar=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.toggle=createEvent(this,"toggle",7);this.another=createEvent(this,"another",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false;this.showRecipientDialog="";this.showCancelDialog=false;this.loading=true;this.remindersEnabled=false;this.updatingReminders=false;this.initialReminder=null;this.followupReminders=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,s,o,r,a,l;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[SIDEBAR] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return[2]}a=this;return[4,getEnvelopeStore(this.endpoint,this.envelopeId,true)];case 1:a.store=d.sent();this.sortEnvelopeRecipients();this.initialReminder=(i=(e=this.store)===null||e===void 0?void 0:e.state)===null||i===void 0?void 0:i.initial_reminder;this.followupReminders=(n=(t=this.store)===null||t===void 0?void 0:t.state)===null||n===void 0?void 0:n.followup_reminders;this.remindersEnabled=!!this.initialReminder;this.loading=false;return[3,3];case 2:l=d.sent();console.log("[SIDEBAR] Error loading envelope",l);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new SDKError(l.message,(o=l.response)===null||o===void 0?void 0:o.status,(r=l.response)===null||r===void 0?void 0:r.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,i;(i=(e=this.store)===null||e===void 0?void 0:e.state)===null||i===void 0?void 0:i.recipients.sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.setTab=function(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen;(i=this.toggle)===null||i===void 0?void 0:i.emit({open:this.panelOpen});this.activeTab=e};e.prototype.canResendRecipient=function(e){var i,t;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.status)};e.prototype.handleRecipientAction=function(e,i){var t,n;console.log("[SIDEBAR] Recipient action",i,e);switch(i){case"reminder":resendInvitation(this.endpoint,this.envelopeId,e.role_name).then((function(){VerdocsToast("Reminder Sent",{style:"success"})})).catch((function(e){console.log("[SIDEBAR] Error resending invitation",e);VerdocsToast("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":VerdocsToast("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":VerdocsToast("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:(n=this.store)===null||n===void 0?void 0:n.state,event:i})};e.prototype.handleCancelEnvelope=function(){var e=this;this.loading=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(i){return __awaiter(e,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(s){switch(s.label){case 0:console.log("[SIDEBAR] Envelope canceled",i);VerdocsToast("Envelope canceled",{style:"success"});n=this;return[4,getEnvelopeStore(this.endpoint,this.envelopeId,true)];case 1:n.store=s.sent();this.sortEnvelopeRecipients();this.loading=false;this.panelOpen=false;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:(t=this.store)===null||t===void 0?void 0:t.state,event:"canceled"});return[2]}}))}))})).catch((function(i){console.log("[SIDEBAR] Error canceling envelope",i);e.loading=false;VerdocsToast("Error canceling envelope: "+i.message,{style:"error"})}))};e.prototype.prepareHistoryEntries=function(){var e=this;var i,t,n,s,o,r,a,l,d,c,v,h;var p=[];var u=((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.history_entries)||[];p.push({icon:"pencil",message:"Envelope created.",date:new Date((s=(n=this.store)===null||n===void 0?void 0:n.state)===null||s===void 0?void 0:s.created_at)});if(((r=(o=this.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.status)==="complete"){p.push({icon:"pencil",message:"Envelope completed.",date:new Date((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.updated_at)})}var f=u.some((function(e){return e.event==="owner:canceled"}));if(((c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.status)==="canceled"&&!f){p.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((h=(v=this.store)===null||v===void 0?void 0:v.state)===null||h===void 0?void 0:h.canceled_at)})}u.forEach((function(i){var t;var n=(t=e.store.state)===null||t===void 0?void 0:t.recipients.find((function(e){return e.role_name===i.role_name}));var s=formatFullName(n);switch(i.event.toLowerCase()){case"recipient:signed":p.push({icon:"gesture",message:"Signed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:declined":p.push({icon:"clear",message:"Declined by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":p.push({icon:"visibility",message:"Opened by ".concat(s,", via email."),date:new Date(i.created_at)});break;case"sms":p.push({icon:"visibility",message:"Opened by ".concat(s,", via SMS."),date:new Date(i.created_at)});break;case"in_person_link":p.push({icon:"visibility",message:"Opened by ".concat(s,", via In-person link."),date:new Date(i.created_at)});break;case"in_app":p.push({icon:"visibility",message:"Opened by ".concat(s,", via dashboard."),date:new Date(i.created_at)});break;default:p.push({icon:"visibility",message:"Opened by ".concat(s,"."),date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":p.push({icon:"check_circle",message:"Approved by ".concat(s,"."),date:new Date(i.created_at)});break;default:p.push({icon:"send",message:"Submitted by ".concat(s,"."),date:new Date(i.created_at)});break}break;case"recipient:prepared":p.push({icon:"send",message:"Prepared by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:claimed":if(i.event_detail==="guest"){p.push({icon:"account_circle",message:"".concat(s," claimed the Envelope as a guest."),date:new Date(i.created_at)})}else if(i.event_detail==="profile"){p.push({icon:"verified_user",message:"".concat(s," claimed the Envelope as a verified user."),date:new Date(i.created_at)})}break;case"recipient:agreed":p.push({icon:"done",message:"".concat(s," agreed to use electronic records and signatures."),date:new Date(i.created_at)});break;case"recipient:invited":if(i.event_detail==="sms"){p.push({icon:"textsms",message:"".concat(s," has been invited via SMS."),date:new Date(i.created_at)})}else{p.push({icon:"mail",message:"".concat(s," has been invited via email."),date:new Date(i.created_at)})}break;case"recipient:reminder":if(i.event_detail==="sms"){p.push({icon:"textsms",message:"".concat(s," sent a reminder via SMS."),date:new Date(i.created_at)})}else{p.push({icon:"mail",message:"".concat(s," sent a reminder via email."),date:new Date(i.created_at)})}break;case"invitation:resent":p.push({icon:"mail",message:"Invitation was resent to ".concat(s).concat(i.event_detail==="reminder"?" by reminder":"","."),date:new Date(i.created_at)});break;case"envelope:cc":p.push({icon:"contact_mail",message:"A copy has been sent to ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:delegated":p.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":p.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"owner:updated_recipient_info":p.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":p.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":p.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"envelope:canceled":case"envelope_canceled":case"canceled":case"owner:canceled":p.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":p.push({icon:"link",message:"Owner accessed the In-person link for ".concat(n,"."),date:new Date(i.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",i);break}}));p.sort((function(e,i){return i.date.getTime()-e.date.getTime()}));return p};e.prototype.handleToggleReminders=function(){if(this.remindersEnabled){return this.handleSetReminders(null,null)}else{return this.handleSetReminders(MS_PER_DAY,3*MS_PER_DAY)}};e.prototype.handleSetReminders=function(e,i){var t=this;console.log("Updating reminders...");this.updatingReminders=true;updateEnvelope(this.endpoint,this.envelopeId,{initial_reminder:e,followup_reminders:i}).then((function(e){console.log("Updated",e);updateStoreEnvelope(t.store,e);t.initialReminder=e.initial_reminder;t.followupReminders=e.followup_reminders;t.remindersEnabled=!!e.initial_reminder;t.updatingReminders=false})).catch((function(e){var i,n,s,o,r,a;console.log("Error updating envelope",e);t.initialReminder=(n=(i=t.store)===null||i===void 0?void 0:i.state)===null||n===void 0?void 0:n.initial_reminder;t.followupReminders=(o=(s=t.store)===null||s===void 0?void 0:s.state)===null||o===void 0?void 0:o.followup_reminders;t.remindersEnabled=!!((a=(r=t.store)===null||r===void 0?void 0:r.state)===null||a===void 0?void 0:a.initial_reminder);t.updatingReminders=false;alert(e.response.data.error)}))};e.prototype.render=function(){var e=this;var i,t,n,s,o,r,a,l,d,c,v,p,u,f,m,w,g,b,x,y,k,z,E;if(!this.store.state){return h(Host,null)}var M=userIsEnvelopeOwner(this.endpoint.profile,this.store.state);var S=this.prepareHistoryEntries();var _=((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.status)!=="pending"&&((s=(n=this.store)===null||n===void 0?void 0:n.state)===null||s===void 0?void 0:s.status)!=="in progress";return h(Host,{class:this.panelOpen?"open":""},h("div",{class:"side-buttons"},h("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:InformationCircle}),h("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:Users}),h("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:ClipboardDocuments})),this.activeTab===1&&h("div",{class:"content"},h("div",{class:"title"},"Details"),h("div",{class:"label"},"Envelope ID"),h("div",{class:"value"},(r=(o=this.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.id),h("div",{class:"label"},"Date Created"),h("div",{class:"value"},format(new Date((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.created_at),FORMAT_TIMESTAMP)),h("div",{class:"label"},"Last Modified"),h("div",{class:"value"},format(new Date((c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.updated_at),FORMAT_TIMESTAMP)),h("div",{class:"label"},"Status"),h("div",{class:"value"},capitalize((p=(v=this.store)===null||v===void 0?void 0:v.state)===null||p===void 0?void 0:p.status)),h("div",{class:"label"},"Owner ID"),h("div",{class:"value"},(f=(u=this.store)===null||u===void 0?void 0:u.state)===null||f===void 0?void 0:f.profile_id),h("div",{class:"label"},"Owner Name"),h("div",{class:"value"},formatFullName((w=(m=this.store)===null||m===void 0?void 0:m.state)===null||w===void 0?void 0:w.profile)),h("div",{class:"label"},"Owner Email"),h("div",{class:"value"},(x=(b=(g=this.store)===null||g===void 0?void 0:g.state)===null||b===void 0?void 0:b.profile)===null||x===void 0?void 0:x.email)),this.activeTab===2&&h("div",{class:"content"},h("div",{class:"title"},"Recipients"),(k=(y=this.store)===null||y===void 0?void 0:y.state)===null||k===void 0?void 0:k.recipients.map((function(i,t){var n;var s=i.status!=="submitted"&&i.status!=="canceled"&&i.status!=="declined";var o=e.canResendRecipient(i);var r=formatFullName(i);return h("div",{class:"recipient-detail"},h("div",{class:"recipient-header"},h("div",{class:"recipient-number"},t+1),h("div",{class:"recipient-name"},i.role_name),h("div",{class:(n={"recipient-status":true},n[i.status]=true,n)},i.status),M&&!_&&h("verdocs-dropdown",{onOptionSelected:function(t){return e.handleRecipientAction(i,t.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!o},{id:"inperson",label:"Get In-Person Link",disabled:!s}]})),h("dic",{class:"recipient-content"},h("div",{class:"recipient-name"},r),h("div",{class:"recipient-name"},i.email),h("div",{class:"recipient-name"},i.phone)))})),M&&h("div",{class:"reminders"},h("div",{class:"form-row"},h("div",{class:"reminders-label"},"Reminders"),h("verdocs-switch",{disabled:_||this.updatingReminders,checked:this.remindersEnabled,onCheckedChange:function(){return e.handleToggleReminders()}})),this.remindersEnabled&&h(Fragment,null,h("div",{class:"form-row"},"NOTE: Reminders will only be sent for up to 14 days."),h("div",{class:"form-row"},h("div",{class:"form-label"},"Initial Reminder (days):"),h("verdocs-text-input",{placeholder:"In hours...",disabled:_||this.updatingReminders,value:String(Math.floor(this.initialReminder/MS_PER_DAY)),onBlur:function(i){e.initialReminder=Number(i.target.value)*MS_PER_DAY;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),h("div",{class:"form-row"},h("div",{class:"form-label"},"Follow-up Reminders:"),h("verdocs-text-input",{placeholder:"In hours...",disabled:_||this.updatingReminders,value:String(Math.floor(this.followupReminders/MS_PER_DAY)),onBlur:function(i){e.followupReminders=Number(i.target.value)*MS_PER_DAY;e.handleSetReminders(e.initialReminder,e.followupReminders)}})),h("div",{class:"form-row"},h("div",{class:"form-label"},"Next Reminder:"),h("div",{style:{color:"#dddddd"}},format(new Date((E=(z=this.store)===null||z===void 0?void 0:z.state)===null||E===void 0?void 0:E.next_reminder),"P p"))))),M&&h("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Envelope",onClick:function(){return e.showCancelDialog=!_},disabled:_})),this.activeTab===3&&h("div",{class:"content"},h("div",{class:"title"},"History"),S.map((function(e){return h("div",{class:"history-entry"},h("div",{class:"activity-icon",innerHTML:ActivityIcons[e.icon]||e.icon}),h("div",{class:"activity-details"},h("div",{class:"activity-text"},e.message),h("div",{class:"activity-date"},format(e.date,FORMAT_TIMESTAMP))))}))),this.showRecipientDialog&&h("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:function(){return e.showRecipientDialog=""}}),this.showCancelDialog&&h("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:function(){e.showCancelDialog=false;e.handleCancelEnvelope()}}))};return e}();VerdocsEnvelopeSidebar.style=VerdocsEnvelopeSidebarStyle0;export{VerdocsEnvelopeSidebar as verdocs_envelope_sidebar};
|
@@ -1 +1 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?n(e.value):s(e.value).then(o,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,s,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(n=0)),n)try{if(i=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;s=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){n.label=a[1];break}if(a[0]===6&&n.label<r[1]){n.label=r[1];r=a;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(a);break}if(r[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];s=0}finally{i=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,r;i<s;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-a68c7262.js";import{VerdocsEndpoint,getEnvelopes,integerSequence,getRecipientsWithActions,userCanCancelEnvelope,userCanAct,formatFullName,cancelEnvelope}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-8f3ace81.js";import{V as VerdocsToast}from"./Toast-c4843828.js";import{S as SDKError}from"./errors-887f1e88.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./format-b8602175.js";var verdocsEnvelopesListCss='@-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-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}';var VerdocsEnvelopesListStyle0=verdocsEnvelopesListCss;var DocumentIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var ViewFilters=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var StatusFilters=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var SortFilters=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var VerdocsEnvelopesList=function(){function e(e){registerInstance(this,e);this.changeView=createEvent(this,"changeView",7);this.changeStatus=createEvent(this,"changeStatus",7);this.changeSort=createEvent(this,"changeSort",7);this.changeMatch=createEvent(this,"changeMatch",7);this.sdkError=createEvent(this,"sdkError",7);this.viewEnvelope=createEvent(this,"viewEnvelope",7);this.finishEnvelope=createEvent(this,"finishEnvelope",7);this.endpoint=VerdocsEndpoint.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.onSessionChanged((function(e,t,n){console.log("[ENVELOPES_LIST] onSessionChanged",t,n)}));this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,s,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.loading=true;i={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":i=__assign({},i);break;case"sent":i=__assign({},i);break;case"action":i=__assign(__assign({},i),{status:["pending","in progress"]});break;case"waiting":i=__assign(__assign({},i),{status:["pending","in progress"]});break;case"completed":i=__assign(__assign({},i),{status:["complete"]});break;default:i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){i.status=[this.status]}}if(this.match.trim());return[4,getEnvelopes(this.endpoint,i)];case 1:s=o.sent();this.envelopes=s.envelopes;this.count=s.count;this.loading=false;return[3,3];case 2:r=o.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;saveEnvelopesAsZip(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);VerdocsToast("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){saveEnvelopesAsZip(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);VerdocsToast("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return h(Host,{key:"65d29f9d52c1e4580e335015941be7f8f20197a9"},h("div",{key:"64a021af11c8a291981bb49f88cddedf5253593d",class:"header"},h("div",{key:"12ae24224cc5bae515cad1b6382b1fa64fce1223",class:"filter"},h("verdocs-text-input",{key:"b895bcdfa7829a5a78460759291890859d5cf6b5",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(t){var n;e.match=t.target.value.trim();(n=e.changeMatch)===null||n===void 0?void 0:n.emit(e.match)}})),h("verdocs-quick-filter",{key:"72e6e429edabd43c71a24d5d74e7be57b44073b8",label:"View",value:this.view,options:ViewFilters,onOptionSelected:function(t){e.view=t.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"883d9ed133ad696a6fa1a572aa331aad753296ea",label:"Status",value:this.status,options:StatusFilters,onOptionSelected:function(t){e.status=t.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"626d712a6760eb30c9d10a142358f0e9c3ad6548",label:"Sort By",value:this.sort,options:SortFilters,onOptionSelected:function(t){e.sort=t.detail.value}}),this.loading&&h("verdocs-spinner",{key:"391ee75435dfe6203eef29e29b14f74cda3a32ab",mode:"dark",size:24}),h("div",{key:"d12b2ce01d44e81728189968947c7b5e9e778293",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&h("verdocs-button",{key:"c2d20419257993759e8cd7c5ea5e58a20db5b15e",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(t){var n;var i=getRecipientsWithActions(t);var s=userCanCancelEnvelope(e.endpoint.profile,t);var r=i.find((function(t){var n;return t.email===((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||""}));var o=r&&s&&userCanAct(((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||"",i);var a=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!o},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!s}];return h("div",{class:"envelope",key:t.id,onClick:function(){var n;return(n=e.viewEnvelope)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,envelope:t})}},h("div",{class:"inner"},h("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===t.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(n){if(n.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[t],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==t.id}))}}}),h("div",{class:"vert-spacer"}),h("span",{innerHTML:DocumentIcon,class:"envelope-icon"}),h("div",{class:"envelope-name"},t.name,": ",h("div",{class:"envelope-recipients"},t.recipients.map((function(e){return formatFullName(e)})))),h("div",{class:"vert-spacer"}),h("verdocs-status-indicator",{envelope:t,style:{width:"125px"}}),h("div",{class:"vert-spacer"}),h("div",{class:"last-modified"},new Date(t.updated_at).toLocaleString()),h("div",{class:"vert-spacer"}),h("verdocs-dropdown",{options:a,onOptionSelected:function(n){var i,s;switch(n.detail.id){case"view":(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:t});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:t});break;case"download":e.downloadEnvelope(t);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){cancelEnvelope(e.endpoint,t.id).then((function(){return VerdocsToast("Envelope canceled")})).catch((function(e){return VerdocsToast("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&h("div",{key:"3c1f1711abdeaaf92c12129e8f7e5ab13c06db1d",style:{width:"100%"}},integerSequence(0,this.rowsPerPage).map((function(){return h("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&h("div",{key:"1f14c23162b105b4947e3b574e0192fee0f164b5",class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?h("div",{style:{marginTop:"20px"}},h("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):h("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:["handleViewUpdated"],status:["handleStatusUpdated"],sort:["handleSortUpdated"],match:["handleMatchUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}();VerdocsEnvelopesList.style=VerdocsEnvelopesListStyle0;export{VerdocsEnvelopesList as verdocs_envelopes_list};
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?n(e.value):s(e.value).then(o,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,s,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(n=0)),n)try{if(i=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;s=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){n.label=a[1];break}if(a[0]===6&&n.label<r[1]){n.label=r[1];r=a;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(a);break}if(r[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];s=0}finally{i=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,r;i<s;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-a68c7262.js";import{VerdocsEndpoint,getEnvelopes,integerSequence,getRecipientsWithActions,userCanCancelEnvelope,userCanAct,formatFullName,cancelEnvelope}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-6ecd6558.js";import{V as VerdocsToast}from"./Toast-c4843828.js";import{S as SDKError}from"./errors-887f1e88.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./format-b8602175.js";var verdocsEnvelopesListCss='@-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-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}';var VerdocsEnvelopesListStyle0=verdocsEnvelopesListCss;var DocumentIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var ViewFilters=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var StatusFilters=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var SortFilters=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var VerdocsEnvelopesList=function(){function e(e){registerInstance(this,e);this.changeView=createEvent(this,"changeView",7);this.changeStatus=createEvent(this,"changeStatus",7);this.changeSort=createEvent(this,"changeSort",7);this.changeMatch=createEvent(this,"changeMatch",7);this.sdkError=createEvent(this,"sdkError",7);this.viewEnvelope=createEvent(this,"viewEnvelope",7);this.finishEnvelope=createEvent(this,"finishEnvelope",7);this.endpoint=VerdocsEndpoint.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.onSessionChanged((function(e,t,n){console.log("[ENVELOPES_LIST] onSessionChanged",t,n)}));this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,s,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.loading=true;i={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":i=__assign({},i);break;case"sent":i=__assign({},i);break;case"action":i=__assign(__assign({},i),{status:["pending","in progress"]});break;case"waiting":i=__assign(__assign({},i),{status:["pending","in progress"]});break;case"completed":i=__assign(__assign({},i),{status:["complete"]});break;default:i=__assign(__assign({},i),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){i.status=[this.status]}}if(this.match.trim());return[4,getEnvelopes(this.endpoint,i)];case 1:s=o.sent();this.envelopes=s.envelopes;this.count=s.count;this.loading=false;return[3,3];case 2:r=o.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(n=r.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;saveEnvelopesAsZip(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);VerdocsToast("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){saveEnvelopesAsZip(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);VerdocsToast("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return h(Host,{key:"65d29f9d52c1e4580e335015941be7f8f20197a9"},h("div",{key:"64a021af11c8a291981bb49f88cddedf5253593d",class:"header"},h("div",{key:"12ae24224cc5bae515cad1b6382b1fa64fce1223",class:"filter"},h("verdocs-text-input",{key:"b895bcdfa7829a5a78460759291890859d5cf6b5",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(t){var n;e.match=t.target.value.trim();(n=e.changeMatch)===null||n===void 0?void 0:n.emit(e.match)}})),h("verdocs-quick-filter",{key:"72e6e429edabd43c71a24d5d74e7be57b44073b8",label:"View",value:this.view,options:ViewFilters,onOptionSelected:function(t){e.view=t.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"883d9ed133ad696a6fa1a572aa331aad753296ea",label:"Status",value:this.status,options:StatusFilters,onOptionSelected:function(t){e.status=t.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"626d712a6760eb30c9d10a142358f0e9c3ad6548",label:"Sort By",value:this.sort,options:SortFilters,onOptionSelected:function(t){e.sort=t.detail.value}}),this.loading&&h("verdocs-spinner",{key:"391ee75435dfe6203eef29e29b14f74cda3a32ab",mode:"dark",size:24}),h("div",{key:"d12b2ce01d44e81728189968947c7b5e9e778293",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&h("verdocs-button",{key:"c2d20419257993759e8cd7c5ea5e58a20db5b15e",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(t){var n;var i=getRecipientsWithActions(t);var s=userCanCancelEnvelope(e.endpoint.profile,t);var r=i.find((function(t){var n;return t.email===((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||""}));var o=r&&s&&userCanAct(((n=e.endpoint.session)===null||n===void 0?void 0:n.email)||"",i);var a=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!o},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!s}];return h("div",{class:"envelope",key:t.id,onClick:function(){var n;return(n=e.viewEnvelope)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,envelope:t})}},h("div",{class:"inner"},h("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===t.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(n){if(n.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[t],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==t.id}))}}}),h("div",{class:"vert-spacer"}),h("span",{innerHTML:DocumentIcon,class:"envelope-icon"}),h("div",{class:"envelope-name"},t.name,": ",h("div",{class:"envelope-recipients"},t.recipients.map((function(e){return formatFullName(e)})))),h("div",{class:"vert-spacer"}),h("verdocs-status-indicator",{envelope:t,style:{width:"125px"}}),h("div",{class:"vert-spacer"}),h("div",{class:"last-modified"},new Date(t.updated_at).toLocaleString()),h("div",{class:"vert-spacer"}),h("verdocs-dropdown",{options:a,onOptionSelected:function(n){var i,s;switch(n.detail.id){case"view":(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:t});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:t});break;case"download":e.downloadEnvelope(t);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){cancelEnvelope(e.endpoint,t.id).then((function(){return VerdocsToast("Envelope canceled")})).catch((function(e){return VerdocsToast("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&h("div",{key:"3c1f1711abdeaaf92c12129e8f7e5ab13c06db1d",style:{width:"100%"}},integerSequence(0,this.rowsPerPage).map((function(){return h("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&h("div",{key:"1f14c23162b105b4947e3b574e0192fee0f164b5",class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?h("div",{style:{marginTop:"20px"}},h("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):h("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:["handleViewUpdated"],status:["handleStatusUpdated"],sort:["handleSortUpdated"],match:["handleMatchUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}();VerdocsEnvelopesList.style=VerdocsEnvelopesListStyle0;export{VerdocsEnvelopesList as verdocs_envelopes_list};
|