@verdocs/web-sdk 4.2.35 → 4.2.36
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/{interact.min-ee721bdc.js → interact.min-40e2f4db.js} +1 -1
- package/dist/cjs/{utils-d9ecd23d.js → utils-330fb889.js} +2 -4
- 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-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_10.cjs.entry.js +4 -6
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +2 -4
- package/dist/collection/utils/utils.js +2 -4
- package/dist/components/utils.js +2 -4
- package/dist/components/verdocs-template-fields2.js +2 -4
- package/dist/custom-elements.json +2066 -0
- package/dist/esm/{interact.min-4fac3f2b.js → interact.min-565d696f.js} +1 -1
- package/dist/esm/{utils-d1c95309.js → utils-8f9e83b4.js} +2 -4
- 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-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_13.entry.js +2 -2
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_10.entry.js +4 -6
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/{interact.min-4fac3f2b.js → interact.min-565d696f.js} +1 -1
- package/dist/esm-es5/{utils-d1c95309.js → utils-8f9e83b4.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-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_10.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-view.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-61266396.system.entry.js → p-11187f8f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-322fa613.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-cc32d84f.js → p-407cb86b.js} +1 -1
- package/dist/verdocs-web-sdk/{p-40d811fe.entry.js → p-50ca92de.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-85519037.system.js → p-54a2a394.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-66146676.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-feddcfe3.entry.js → p-7125a998.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-627f774b.js → p-73182042.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e772c022.system.entry.js → p-77df6385.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-17050bcd.system.entry.js → p-78b461ed.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4291db9f.entry.js → p-7a6cf9a2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ad474154.system.entry.js → p-7c77f3e7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5bec8b75.system.js → p-8d4297c9.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0ff14c4d.entry.js → p-936d6483.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-340d2dfb.entry.js → p-9ef11d2d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-402a35bf.entry.js → p-9f36f128.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-99510d53.system.entry.js → p-a868ee00.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-748ed4ef.entry.js → p-b9d88831.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-72ae790a.system.entry.js → p-c3167b62.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a908ebeb.system.entry.js → p-cc8f27f7.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3a8b2213.system.entry.js → p-da174bed.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a2a0c7b4.system.entry.js → p-e7360a06.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-83c81948.entry.js → p-e9a1c6be.entry.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-ba2761ee.entry.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-b89cf6a4.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";import{i as convertToE164}from"./utils-d1c95309.js";import"./Types-e4a6eba5.js";import"./index-0329eed3.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{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form .label-with-icon{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-contact-picker form .label-with-icon verdocs-help-icon svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;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{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;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 placeholderIcon='<svg focusable="false" viewBox="0 0 24 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 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></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.name=undefined;this.email=undefined;this.phone=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.showKba=false;this.kbaMethod="";this.pinCode="";this.nameFieldId="verdocs-contact-picker-name-".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){this.name=this.templateRole.full_name||"";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.kbaMethod=this.templateRole.kba_method||"";this.showKba=!!this.kbaMethod;this.pinCode=""}};e.prototype.handleNameChange=function(e){var o;this.name=e.target.value;(o=this.searchContacts)===null||o===void 0?void 0:o.emit({query:this.name})};e.prototype.handleEmailChange=function(e){this.email=e.target.value};e.prototype.handlePhoneChange=function(e){this.phone=convertToE164(e.target.value)};e.prototype.handleMessageChange=function(e){this.message=e.target.value};e.prototype.handleCancel=function(e){var o;e.stopPropagation();this.showSuggestions=false;(o=this.exit)===null||o===void 0?void 0:o.emit()};e.prototype.handleSubmit=function(e){var o;e.stopPropagation();this.showSuggestions=false;(o=this.next)===null||o===void 0?void 0:o.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})};e.prototype.handleSelectSuggestion=function(e,o){e.stopPropagation();this.name=o.name;this.email=o.email;this.phone=o.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;return h("form",{key:"d5f351153f58ec275d6bc7225db6aee53a5c54e6",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{key:"960ec06a72d7b14c6ad4609ccba90639b746e93e",class:"row"},h("label",{key:"0ab66bf6689aa26132718cf673d7275708945ae4",htmlFor:this.nameFieldId},"Name:"),h("input",{key:"25e2406d5b1ad78ada9c999fdefd3c16bccb60eb",id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:function(){var o;return e.showSuggestions=((o=e.contactSuggestions)===null||o===void 0?void 0:o.length)>0},onInput:function(o){return e.handleNameChange(o)}}),this.showSuggestions&&h("div",{key:"ec9dfb86c52a462005b00d857f2f945b6a5861a8",class:"dropdown"},this.contactSuggestions.map((function(o){var t;return h("div",{key:(t=o.id)!==null&&t!==void 0?t:o.name,class:"suggestion",onClick:function(t){return e.handleSelectSuggestion(t,o)}},o.avatar?h("img",{alt:"Avatar",class:"avatar",src:o.avatar}):h("div",{class:"avatar",innerHTML:placeholderIcon}),h("div",{class:"details"},h("div",{class:"name"},o.name),o.email&&h("div",{class:"destination"},o.email),o.phone&&h("div",{class:"destination"},o.phone)))})))),h("div",{key:"e8f2ee3647ffc37a31cb4f1d8a043183ce608268",class:"row"},h("label",{key:"99840da172556066187691124358fd64c19c466d",htmlFor:this.emailFieldId},"Email:"),h("input",{key:"bba477caa2c14def36cf90f66bc164d58ccae999",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(o){return e.handleEmailChange(o)}})),h("div",{key:"a3e045ec2fe78e1662c389c2fdb742165e67cbfd",class:"row"},h("label",{key:"19257fb97c8b0163c7d3882130bb298388c57901",htmlFor:this.phoneFieldId},"Phone:"),h("input",{key:"ae3bbc51bed7039b716153675e3036abdf161382",id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:function(){return e.showSuggestions=false},onInput:function(o){return e.handlePhoneChange(o)}})),this.showKba&&h("div",{key:"b05e51e9e9f1abb359113bea8cbc1c61c2979dbc",class:"row"},h("div",{key:"a905229b77e8b7941586834d4f942530d0b3d254",class:"label-with-icon"},h("label",{key:"b438b090c40ef5cd4c6550cd3cd57c676ab49061"},"KBA:"),h("verdocs-help-icon",{key:"72fd391e008444b1f55c99833cc6f6e13670f199",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."})),h("verdocs-select-input",{key:"8af56bf9b367faaec0777d4f0d555f9a0f1f4145",value:this.kbaMethod,onInput:function(o){return e.kbaMethod=o.target.value},options:[{label:"None",value:""},{label:"PIN Code",value:"pin"},{label:"Full Verification",value:"kba"}]}),this.kbaMethod==="pin"&&h("input",{key:"504c018a9c8ad9087ddd6b253b794c493bb16686",id:"verdocs-pin-code",name:"verdocs-pin-code",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.pinCode,placeholder:"KBA PIN Code...",onFocus:function(){return e.showSuggestions=false},onInput:function(o){return e.handleMessageChange(o)}})),this.showMessage&&h("div",{key:"0506d342d5fcbdc812498ffbf19bcd9bd2d1abca",class:"row"},h("label",{key:"e62684bc9178188fed71eb77954b186511a0c29d",htmlFor:"verdocs-contact-picker-message"},"Message:"),h("input",{key:"b9638d6435b7d0dc8815f20e42c2b5498ab308a0",id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:function(){return e.showSuggestions=false},onInput:function(o){return e.handleMessageChange(o)}})),h("div",{key:"efc4e30feb9b3c58cc39e85725a6b780d424ca6e",class:"buttons"},h("verdocs-toggle-button",{key:"6146346933119b33a1cd494e21e0d1a0195378cc",icon:kbaIcon,size:"small",active:this.showKba,onToggle:function(o){e.showKba=o.detail.active;if(!o.detail.active){e.pinCode="";e.kbaMethod=""}e.showSuggestions=false}}),h("verdocs-toggle-button",{key:"ba3139369cb582ec7ca246f4ad08a58998eca1eb",icon:messageIcon,size:"small",active:this.showMessage,onToggle:function(o){e.showMessage=o.detail.active;e.showSuggestions=false}}),h("div",{key:"52ab10bc5857dc55244d064c20a2d59eb67bca82",class:"flex-fill"}),h("verdocs-button",{key:"4eedb7f847d8004567c24f25c7efa2ae9d6da61b",variant:"outline",label:"Cancel",size:"small",onClick:function(o){return e.handleCancel(o)}}),h("verdocs-button",{key:"4b4b461f150eaf575e4b22760388ecea92f7da54",label:"OK",size:"small",onClick:function(o){return e.handleSubmit(o)}})))};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 o;e.stopPropagation();var t=!this._active;this._active=t;(o=this.toggle)===null||o===void 0?void 0:o.emit({active:t})};e.prototype.render=function(){var e=this;return h(Host,{key:"19b820fa8c54c87afebe8fbd24d70282eab6922c",class:"size-".concat(this.size)},this.icon?h("button",{innerHTML:this.icon,class:{active:this._active},onClick:function(o){return e.handleToggle(o)}}):h("button",{class:{active:this._active},onClick:function(o){return e.handleToggle(o)}},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,H as Host}from"./index-b89cf6a4.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";import{i as convertToE164}from"./utils-8f9e83b4.js";import"./Types-e4a6eba5.js";import"./index-0329eed3.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{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form .label-with-icon{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-contact-picker form .label-with-icon verdocs-help-icon svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;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{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;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 placeholderIcon='<svg focusable="false" viewBox="0 0 24 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 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></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.name=undefined;this.email=undefined;this.phone=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.showKba=false;this.kbaMethod="";this.pinCode="";this.nameFieldId="verdocs-contact-picker-name-".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){this.name=this.templateRole.full_name||"";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.kbaMethod=this.templateRole.kba_method||"";this.showKba=!!this.kbaMethod;this.pinCode=""}};e.prototype.handleNameChange=function(e){var o;this.name=e.target.value;(o=this.searchContacts)===null||o===void 0?void 0:o.emit({query:this.name})};e.prototype.handleEmailChange=function(e){this.email=e.target.value};e.prototype.handlePhoneChange=function(e){this.phone=convertToE164(e.target.value)};e.prototype.handleMessageChange=function(e){this.message=e.target.value};e.prototype.handleCancel=function(e){var o;e.stopPropagation();this.showSuggestions=false;(o=this.exit)===null||o===void 0?void 0:o.emit()};e.prototype.handleSubmit=function(e){var o;e.stopPropagation();this.showSuggestions=false;(o=this.next)===null||o===void 0?void 0:o.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})};e.prototype.handleSelectSuggestion=function(e,o){e.stopPropagation();this.name=o.name;this.email=o.email;this.phone=o.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;return h("form",{key:"d5f351153f58ec275d6bc7225db6aee53a5c54e6",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{key:"960ec06a72d7b14c6ad4609ccba90639b746e93e",class:"row"},h("label",{key:"0ab66bf6689aa26132718cf673d7275708945ae4",htmlFor:this.nameFieldId},"Name:"),h("input",{key:"25e2406d5b1ad78ada9c999fdefd3c16bccb60eb",id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:function(){var o;return e.showSuggestions=((o=e.contactSuggestions)===null||o===void 0?void 0:o.length)>0},onInput:function(o){return e.handleNameChange(o)}}),this.showSuggestions&&h("div",{key:"ec9dfb86c52a462005b00d857f2f945b6a5861a8",class:"dropdown"},this.contactSuggestions.map((function(o){var t;return h("div",{key:(t=o.id)!==null&&t!==void 0?t:o.name,class:"suggestion",onClick:function(t){return e.handleSelectSuggestion(t,o)}},o.avatar?h("img",{alt:"Avatar",class:"avatar",src:o.avatar}):h("div",{class:"avatar",innerHTML:placeholderIcon}),h("div",{class:"details"},h("div",{class:"name"},o.name),o.email&&h("div",{class:"destination"},o.email),o.phone&&h("div",{class:"destination"},o.phone)))})))),h("div",{key:"e8f2ee3647ffc37a31cb4f1d8a043183ce608268",class:"row"},h("label",{key:"99840da172556066187691124358fd64c19c466d",htmlFor:this.emailFieldId},"Email:"),h("input",{key:"bba477caa2c14def36cf90f66bc164d58ccae999",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(o){return e.handleEmailChange(o)}})),h("div",{key:"a3e045ec2fe78e1662c389c2fdb742165e67cbfd",class:"row"},h("label",{key:"19257fb97c8b0163c7d3882130bb298388c57901",htmlFor:this.phoneFieldId},"Phone:"),h("input",{key:"ae3bbc51bed7039b716153675e3036abdf161382",id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:function(){return e.showSuggestions=false},onInput:function(o){return e.handlePhoneChange(o)}})),this.showKba&&h("div",{key:"b05e51e9e9f1abb359113bea8cbc1c61c2979dbc",class:"row"},h("div",{key:"a905229b77e8b7941586834d4f942530d0b3d254",class:"label-with-icon"},h("label",{key:"b438b090c40ef5cd4c6550cd3cd57c676ab49061"},"KBA:"),h("verdocs-help-icon",{key:"72fd391e008444b1f55c99833cc6f6e13670f199",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."})),h("verdocs-select-input",{key:"8af56bf9b367faaec0777d4f0d555f9a0f1f4145",value:this.kbaMethod,onInput:function(o){return e.kbaMethod=o.target.value},options:[{label:"None",value:""},{label:"PIN Code",value:"pin"},{label:"Full Verification",value:"kba"}]}),this.kbaMethod==="pin"&&h("input",{key:"504c018a9c8ad9087ddd6b253b794c493bb16686",id:"verdocs-pin-code",name:"verdocs-pin-code",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.pinCode,placeholder:"KBA PIN Code...",onFocus:function(){return e.showSuggestions=false},onInput:function(o){return e.handleMessageChange(o)}})),this.showMessage&&h("div",{key:"0506d342d5fcbdc812498ffbf19bcd9bd2d1abca",class:"row"},h("label",{key:"e62684bc9178188fed71eb77954b186511a0c29d",htmlFor:"verdocs-contact-picker-message"},"Message:"),h("input",{key:"b9638d6435b7d0dc8815f20e42c2b5498ab308a0",id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:function(){return e.showSuggestions=false},onInput:function(o){return e.handleMessageChange(o)}})),h("div",{key:"efc4e30feb9b3c58cc39e85725a6b780d424ca6e",class:"buttons"},h("verdocs-toggle-button",{key:"6146346933119b33a1cd494e21e0d1a0195378cc",icon:kbaIcon,size:"small",active:this.showKba,onToggle:function(o){e.showKba=o.detail.active;if(!o.detail.active){e.pinCode="";e.kbaMethod=""}e.showSuggestions=false}}),h("verdocs-toggle-button",{key:"ba3139369cb582ec7ca246f4ad08a58998eca1eb",icon:messageIcon,size:"small",active:this.showMessage,onToggle:function(o){e.showMessage=o.detail.active;e.showSuggestions=false}}),h("div",{key:"52ab10bc5857dc55244d064c20a2d59eb67bca82",class:"flex-fill"}),h("verdocs-button",{key:"4eedb7f847d8004567c24f25c7efa2ae9d6da61b",variant:"outline",label:"Cancel",size:"small",onClick:function(o){return e.handleCancel(o)}}),h("verdocs-button",{key:"4b4b461f150eaf575e4b22760388ecea92f7da54",label:"OK",size:"small",onClick:function(o){return e.handleSubmit(o)}})))};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 o;e.stopPropagation();var t=!this._active;this._active=t;(o=this.toggle)===null||o===void 0?void 0:o.emit({active:t})};e.prototype.render=function(){var e=this;return h(Host,{key:"19b820fa8c54c87afebe8fbd24d70282eab6922c",class:"size-".concat(this.size)},this.icon?h("button",{innerHTML:this.icon,class:{active:this._active},onClick:function(o){return e.handleToggle(o)}}):h("button",{class:{active:this._active},onClick:function(o){return e.handleToggle(o)}},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-b89cf6a4.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-b89cf6a4.js";import{VerdocsEndpoint,getEnvelopeDocumentPageDisplayUri}from"@verdocs/js-sdk";import{t as throttle}from"./utils-8f9e83b4.js";import"./Types-e4a6eba5.js";import"./index-0329eed3.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.envelopeId,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();console.log("[PAGE] Disconnected",this.containerId)};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:"1626cbea713462254f8d518479181a39156fd599",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 __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++){n=arguments[t];for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))e[s]=n[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,t,i){function s(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,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?t(e.value):s(e.value).then(o,a)}l((i=i.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={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(n){return l([e,n])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(t=0)),t)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: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(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=n.call(e,t)}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,n,t){if(t||arguments.length===2)for(var i=0,s=n.length,r;i<s;i++){if(r||!(i in n)){if(!r)r=Array.prototype.slice.call(n,0,i);r[i]=n[i]}}return e.concat(r||Array.prototype.slice.call(n))};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-b89cf6a4.js";import{VerdocsEndpoint,getEnvelopes,integerSequence,getRecipientsWithActions,userCanCancelEnvelope,userCanAct,cancelEnvelope}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-d1c95309.js";import{V as VerdocsToast}from"./Toast-3e2645fc.js";import{S as SDKError}from"./errors-887f1e88.js";import"./Types-e4a6eba5.js";import"./index-0329eed3.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,n,t){console.log("[ENVELOPES_LIST] onSessionChanged",n,t)}));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,n,t,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,(n=r.response)===null||n===void 0?void 0:n.status,(t=r.response)===null||t===void 0?void 0:t.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:"c97d8d4415fb171c1335d3fbef9a885329740613"},h("div",{key:"dc0117f6476648985fdad07525e3c10c0a4542d3",class:"header"},h("div",{key:"ebd6521d3e9afd5ff9883829c7f66c55f31e7659",class:"filter"},h("verdocs-text-input",{key:"a5c15206146898551ac7ec9e22385335d1215d0a",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(n){var t;e.match=n.target.value.trim();(t=e.changeMatch)===null||t===void 0?void 0:t.emit(e.match)}})),h("verdocs-quick-filter",{key:"497b419b0789a338264523b52e6c2f15de6d02fe",label:"View",value:this.view,options:ViewFilters,onOptionSelected:function(n){e.view=n.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"ca4c1472e25cf458699a5b3cbd7bd55156938a59",label:"Status",value:this.status,options:StatusFilters,onOptionSelected:function(n){e.status=n.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"232cacdc7d067961da8d1c9482d07c6e76b84d38",label:"Sort By",value:this.sort,options:SortFilters,onOptionSelected:function(n){e.sort=n.detail.value}}),this.loading&&h("verdocs-spinner",{key:"44c39036f7ac8358a9c8b658e533c393413dc4db",mode:"dark",size:24}),h("div",{key:"f5b8246bf8cdfa9737b8675b59e44fc45df3cc06",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&h("verdocs-button",{key:"9c6f32a107c15af7173ae4fd2ac16265bcc8be6f",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(n){var t;var i=getRecipientsWithActions(n);var s=userCanCancelEnvelope(e.endpoint.profile,n);var r=i.find((function(n){var t;return n.email===((t=e.endpoint.session)===null||t===void 0?void 0:t.email)||""}));var o=r&&s&&userCanAct(((t=e.endpoint.session)===null||t===void 0?void 0:t.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:n.id,onClick:function(){var t;return(t=e.viewEnvelope)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:n})}},h("div",{class:"inner"},h("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===n.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(t){if(t.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[n],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==n.id}))}}}),h("div",{class:"vert-spacer"}),h("span",{innerHTML:DocumentIcon,class:"envelope-icon"}),h("div",{class:"envelope-name"},n.name,": ",h("div",{class:"envelope-recipients"},n.recipients.map((function(e){return e.full_name})).join(", "))),h("div",{class:"vert-spacer"}),h("verdocs-status-indicator",{envelope:n,style:{width:"125px"}}),h("div",{class:"vert-spacer"}),h("div",{class:"last-modified"},new Date(n.updated_at).toLocaleString()),h("div",{class:"vert-spacer"}),h("verdocs-dropdown",{options:a,onOptionSelected:function(t){var i,s;switch(t.detail.id){case"view":(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:n});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:n});break;case"download":e.downloadEnvelope(n);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){cancelEnvelope(e.endpoint,n.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:"3008dcd8a557d2f47041455cf9fa554bbcc0b229",style:{width:"100%"}},integerSequence(0,this.rowsPerPage).map((function(){return h("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&h("div",{key:"f1e6ffe23cd5c2d9cf18bafadbf0b61e70984f4d",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(n){e.selectedPage=n.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 n,t=1,i=arguments.length;t<i;t++){n=arguments[t];for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))e[s]=n[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,t,i){function s(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,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?t(e.value):s(e.value).then(o,a)}l((i=i.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={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(n){return l([e,n])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(t=0)),t)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: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(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){t.label=a[1];break}if(a[0]===6&&t.label<r[1]){t.label=r[1];r=a;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(a);break}if(r[2])t.ops.pop();t.trys.pop();continue}a=n.call(e,t)}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,n,t){if(t||arguments.length===2)for(var i=0,s=n.length,r;i<s;i++){if(r||!(i in n)){if(!r)r=Array.prototype.slice.call(n,0,i);r[i]=n[i]}}return e.concat(r||Array.prototype.slice.call(n))};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-b89cf6a4.js";import{VerdocsEndpoint,getEnvelopes,integerSequence,getRecipientsWithActions,userCanCancelEnvelope,userCanAct,cancelEnvelope}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-8f9e83b4.js";import{V as VerdocsToast}from"./Toast-3e2645fc.js";import{S as SDKError}from"./errors-887f1e88.js";import"./Types-e4a6eba5.js";import"./index-0329eed3.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,n,t){console.log("[ENVELOPES_LIST] onSessionChanged",n,t)}));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,n,t,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,(n=r.response)===null||n===void 0?void 0:n.status,(t=r.response)===null||t===void 0?void 0:t.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:"c97d8d4415fb171c1335d3fbef9a885329740613"},h("div",{key:"dc0117f6476648985fdad07525e3c10c0a4542d3",class:"header"},h("div",{key:"ebd6521d3e9afd5ff9883829c7f66c55f31e7659",class:"filter"},h("verdocs-text-input",{key:"a5c15206146898551ac7ec9e22385335d1215d0a",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(n){var t;e.match=n.target.value.trim();(t=e.changeMatch)===null||t===void 0?void 0:t.emit(e.match)}})),h("verdocs-quick-filter",{key:"497b419b0789a338264523b52e6c2f15de6d02fe",label:"View",value:this.view,options:ViewFilters,onOptionSelected:function(n){e.view=n.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"ca4c1472e25cf458699a5b3cbd7bd55156938a59",label:"Status",value:this.status,options:StatusFilters,onOptionSelected:function(n){e.status=n.detail.value}}),this.view==="all"&&h("verdocs-quick-filter",{key:"232cacdc7d067961da8d1c9482d07c6e76b84d38",label:"Sort By",value:this.sort,options:SortFilters,onOptionSelected:function(n){e.sort=n.detail.value}}),this.loading&&h("verdocs-spinner",{key:"44c39036f7ac8358a9c8b658e533c393413dc4db",mode:"dark",size:24}),h("div",{key:"f5b8246bf8cdfa9737b8675b59e44fc45df3cc06",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&h("verdocs-button",{key:"9c6f32a107c15af7173ae4fd2ac16265bcc8be6f",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(n){var t;var i=getRecipientsWithActions(n);var s=userCanCancelEnvelope(e.endpoint.profile,n);var r=i.find((function(n){var t;return n.email===((t=e.endpoint.session)===null||t===void 0?void 0:t.email)||""}));var o=r&&s&&userCanAct(((t=e.endpoint.session)===null||t===void 0?void 0:t.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:n.id,onClick:function(){var t;return(t=e.viewEnvelope)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:n})}},h("div",{class:"inner"},h("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===n.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(t){if(t.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[n],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==n.id}))}}}),h("div",{class:"vert-spacer"}),h("span",{innerHTML:DocumentIcon,class:"envelope-icon"}),h("div",{class:"envelope-name"},n.name,": ",h("div",{class:"envelope-recipients"},n.recipients.map((function(e){return e.full_name})).join(", "))),h("div",{class:"vert-spacer"}),h("verdocs-status-indicator",{envelope:n,style:{width:"125px"}}),h("div",{class:"vert-spacer"}),h("div",{class:"last-modified"},new Date(n.updated_at).toLocaleString()),h("div",{class:"vert-spacer"}),h("verdocs-dropdown",{options:a,onOptionSelected:function(t){var i,s;switch(t.detail.id){case"view":(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:n});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:n});break;case"download":e.downloadEnvelope(n);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){cancelEnvelope(e.endpoint,n.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:"3008dcd8a557d2f47041455cf9fa554bbcc0b229",style:{width:"100%"}},integerSequence(0,this.rowsPerPage).map((function(){return h("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&h("div",{key:"f1e6ffe23cd5c2d9cf18bafadbf0b61e70984f4d",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(n){e.selectedPage=n.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};
|