@verdocs/web-sdk 4.2.94 → 4.2.96
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/{Types-db1bd1d8.js → Types-7a726ff3.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-b7682f9b.js → utils-2da37620.js} +3 -7
- package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +6 -8
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +4 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +70 -49
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-preview_9.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-sign.cjs.entry.js +35 -25
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-view.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.css +1 -1
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +44 -30
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +33 -23
- package/dist/collection/components/envelopes/verdocs-envelope-recipient-summary/verdocs-envelope-recipient-summary.css +3 -0
- package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +3 -0
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.css +12 -0
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +1 -0
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.css +18 -3
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +35 -8
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.css +12 -0
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.css +12 -0
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +2 -1
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.css +12 -0
- package/dist/collection/components/fields/verdocs-field-payment/verdocs-field-payment.css +12 -0
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.css +14 -2
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.js +5 -6
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.css +12 -0
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.css +12 -0
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.css +12 -0
- package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +6 -8
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +1 -1
- package/dist/collection/utils/Types.js +1 -1
- package/dist/collection/utils/utils.js +2 -6
- package/dist/components/Types.js +1 -1
- package/dist/components/utils.js +2 -6
- package/dist/components/verdocs-envelope-recipient-summary2.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +3 -0
- package/dist/components/verdocs-field-attachment2.js +2 -1
- package/dist/components/verdocs-field-checkbox2.js +19 -8
- package/dist/components/verdocs-field-date2.js +1 -1
- package/dist/components/verdocs-field-dropdown2.js +3 -2
- package/dist/components/verdocs-field-initial2.js +1 -1
- package/dist/components/verdocs-field-payment.js +1 -1
- package/dist/components/verdocs-field-radio2.js +6 -7
- package/dist/components/verdocs-field-signature2.js +1 -1
- package/dist/components/verdocs-field-textarea2.js +1 -1
- package/dist/components/verdocs-field-textbox2.js +1 -1
- package/dist/components/verdocs-sign.js +33 -23
- package/dist/components/verdocs-template-field-properties2.js +6 -8
- package/dist/components/verdocs-template-fields2.js +1 -1
- package/dist/components/verdocs-upload-dialog2.js +37 -27
- package/dist/esm/{Types-e4a6eba5.js → Types-95d86a44.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-7b0b77d8.js → utils-a79aa5dd.js} +3 -7
- package/dist/esm/verdocs-checkbox_5.entry.js +6 -8
- package/dist/esm/verdocs-contact-picker_2.entry.js +2 -2
- package/dist/esm/verdocs-envelope-document-page.entry.js +2 -2
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +4 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +2 -2
- package/dist/esm/verdocs-field-attachment_13.entry.js +71 -50
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +2 -2
- package/dist/esm/verdocs-preview_9.entry.js +3 -3
- package/dist/esm/verdocs-sign.entry.js +35 -25
- package/dist/esm/verdocs-template-document-page_2.entry.js +2 -2
- package/dist/esm/verdocs-view.entry.js +2 -2
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/Types-95d86a44.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-7b0b77d8.js → utils-a79aa5dd.js} +2 -2
- package/dist/esm-es5/verdocs-checkbox_5.entry.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-recipient-link_2.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-field-payment.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-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.d.ts +2 -3
- package/dist/types/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.d.ts +2 -0
- package/dist/types/components.d.ts +5 -4
- package/dist/types/utils/Types.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +0 -1
- package/dist/verdocs-web-sdk/{p-04e53cb3.entry.js → p-01199d7a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-18dd4952.system.entry.js → p-143f1bdf.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-42a3802e.system.entry.js → p-18188ae5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c8e439cc.entry.js → p-1c04628f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dc4a5bc3.entry.js → p-2531fcad.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-267df026.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-44ef8fc5.system.entry.js → p-35ca7ec1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dc307e81.entry.js → p-380541d9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-393b2a8e.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-0833c8d4.system.entry.js → p-39453c48.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-437de527.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-9cde1db5.entry.js → p-4e97fc5c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4efb0a48.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-38ab701b.entry.js → p-61860777.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-965631d9.entry.js → p-61a3e6ab.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-27d94737.entry.js → p-65596be9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6589d38a.system.entry.js → p-71783a91.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f1a49237.system.entry.js → p-8302dcf5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7f52a1c4.entry.js → p-85aaa229.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a4a60476.system.entry.js → p-9d383fad.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5c50ce79.system.entry.js → p-a5b56406.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-86ccc8c9.system.js → p-ae347813.system.js} +2 -2
- package/dist/verdocs-web-sdk/p-b4ae9308.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-aad40b41.entry.js → p-ba2d11a0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e8dd697f.system.entry.js → p-be7fa476.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c7ee88c7.js +1 -0
- package/dist/verdocs-web-sdk/{p-1289c3d5.js → p-ca7ef3ff.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1a180595.system.js → p-d738b5db.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2c2a9483.entry.js → p-e5435d6f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-fd782917.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-a324eeca.system.entry.js → p-fe1b68ae.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +3 -3
- package/dist/esm-es5/Types-e4a6eba5.js +0 -1
- package/dist/verdocs-web-sdk/p-251c4106.js +0 -1
- package/dist/verdocs-web-sdk/p-5c0c042d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7778c24f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c74b4f50.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d9e1e5dc.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ddb7eb02.system.entry.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,i,t,n){function r(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function s(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):r(e.value).then(s,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,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(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)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:t.label++;return{value:a[1],done:false};case 5:t.label++;r=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];r=0}finally{n=o=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,i,t){if(t||arguments.length===2)for(var n=0,r=i.length,o;n<r;n++){if(o||!(n in i)){if(!o)o=Array.prototype.slice.call(i,0,n);o[n]=i[n]}}return e.concat(o||Array.prototype.slice.call(i))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment}from"./index-a68c7262.js";import{VerdocsEndpoint,startSigningSession,envelopeRecipientAgree,envelopeRecipientDecline,updateEnvelopeField,createSignature,updateEnvelopeFieldSignature,createInitials,updateEnvelopeFieldInitials,isValidPhone,isValidEmail,envelopeRecipientSubmit,uploadEnvelopeFieldAttachment,formatFullName,fullNameToInitials,integerSequence}from"@verdocs/js-sdk";import{a as saveAttachment,u as updateDocumentFieldValue,r as renderDocumentField,g as getFieldId}from"./utils-7b0b77d8.js";import{a as createTemplateFieldStoreFromEnvelope}from"./TemplateFieldStore-4a2e5b85.js";import{V as VerdocsToast}from"./Toast-c4843828.js";import{S as SDKError}from"./errors-887f1e88.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-e4a6eba5.js";import"./index-0329eed3.js";import"./index-a971a584.js";var verdocsSignCss='@-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-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}';var VerdocsSignStyle0=verdocsSignCss;var inProgressMenuOptions=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var doneMenuOptions=[{id:"print",label:"Print"},{id:"download",label:"Download"}];var VerdocsSign=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeLoaded=createEvent(this,"envelopeLoaded",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.recipientIndex=-1;this.endpoint=null;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.envelope=null;this.roleNames=[];this.sortedRecipients=[];this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.errorMessage="";this.focusedField="";this.submitting=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document"}e.prototype.componentWillLoad=function(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new VerdocsEndpoint({sessionType:"signing"})}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,r,o,s,a,l,c,d;var u=this;return __generator(this,(function(h){switch(h.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new SDKError("[SIGN] Missing required inviteCode",500,""));return[2]}h.label=1;case 1:h.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,startSigningSession(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:a=h.sent(),l=a.envelope,c=a.recipient;console.log("[SIGN] Loaded signing session",l,c);this.recipient=c;this.envelope=l;if(this.agreed){this.nextButtonLabel="Next"}createTemplateFieldStoreFromEnvelope(this.envelope);this.sortedRecipients=__spreadArray([],this.envelope.recipients,true);this.sortedRecipients.sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}));this.roleNames=this.sortedRecipients.map((function(e){return e.role_name}));if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.recipientIndex=this.roleNames.findIndex((function(e){return e==u.roleId}));if(this.recipientIndex>-1){this.recipient=this.sortedRecipients[this.recipientIndex];this.agreed=this.recipient.agreed}else{console.warn("[SIGN] Could not find our recipient record",this.roleId,this.sortedRecipients)}this.isDone=["submitted","canceled","declined"].includes(this.recipient.status);this.checkRecipientFields();(n=this.envelopeLoaded)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope});return[3,4];case 3:d=h.sent();console.log("Error with signing session",d);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new SDKError(d.message,(o=d.response)===null||o===void 0?void 0:o.status,(s=d.response)===null||s===void 0?void 0:s.data));this.showLoadError=true;return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var i=document.getElementById("verdocs-sign-header");if(e&&i){console.log("[SIGN] Moving header");i.remove();e.append(i)}};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;envelopeRecipientAgree(this.endpoint,this.envelopeId,this.roleId,true).then((function(){var i;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(i=e.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(i){var t,n,r;console.log("Update failure",i);e.submitting=false;(t=e.sdkError)===null||t===void 0?void 0:t.emit(new SDKError(i.message,(n=i.response)===null||n===void 0?void 0:n.status,(r=i.response)===null||r===void 0?void 0:r.data))}))};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var i,t,n,r,o,s,a,l;return __generator(this,(function(c){switch(c.label){case 0:s=e.detail.id;switch(s){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});return[3,7];case 2:VerdocsToast("This feature will be available in an upcoming release.");(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});return[3,7];case 3:this.submitting=true;return[4,envelopeRecipientDecline(this.endpoint,this.envelopeId,this.roleId)];case 4:a=c.sent();console.log("Decline result",a);(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.isDone=true;return[3,7];case 5:window.print();(r=this.envelopeUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,7];case 6:{l=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(l){saveAttachment(this.endpoint,this.envelope,l.id).catch((function(e){console.log("Error downloading PDF",e)}));(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}return[3,7];case 7:return[2]}}))}))};e.prototype.updateRecipientFieldValue=function(e,i){var t=this;console.log("[SIGN] updateRecipientFieldValue",e);this.getRecipientFields().forEach((function(n){if(n.name===e){n.value=i.value;n.settings=i.settings;updateDocumentFieldValue(n);t.checkRecipientFields()}}))};e.prototype.saveFieldChange=function(e,i){var t=this;console.log("[SIGN] updateRecipientFieldValue",e);updateEnvelopeField(this.endpoint,this.envelopeId,e,i).then((function(i){return t.updateRecipientFieldValue(e,i)})).catch((function(e){var i,n,r,o,s,a;if(((i=e.response)===null||i===void 0?void 0:i.status)===401&&((r=(n=e.response)===null||n===void 0?void 0:n.data)===null||r===void 0?void 0:r.error)==="jwt expired"){console.log("[SIGN] Signing session expired");t.errorMessage="Signing session expired. Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(o=t.sdkError)===null||o===void 0?void 0:o.emit(new SDKError(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,i){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,s,a,l,c,d;var u=this;return __generator(this,(function(h){switch(h.label){case 0:t=i.target,n=t.value,r=t.checked;o=e.type;switch(o){case"textbox":return[3,1];case"checkbox":return[3,2];case"radio":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:n})];case 2:{return[2,this.saveFieldChange(e.name,{prepared:false,value:i.target.checked})]}h.label=3;case 3:{return[2,this.saveFieldChange(e.name,{prepared:false,value:i.target.value===i.target.checked})]}h.label=4;case 4:return[2,this.saveFieldChange(e.name,{prepared:false,value:i.detail})];case 5:if(!i.detail){return[2]}return[4,fetch(i.detail)];case 6:return[4,h.sent().blob()];case 7:s=h.sent();return[2,createInitials(this.endpoint,"initial",s).then((function(i){return __awaiter(u,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,updateEnvelopeFieldInitials(this.endpoint,this.envelopeId,e.name,i.id)];case 1:t=n.sent();this.updateRecipientFieldValue(e.name,t);return[2]}}))}))}))];case 8:if(!i.detail){return[2]}return[4,fetch(i.detail)];case 9:return[4,h.sent().blob()];case 10:a=h.sent();return[2,createSignature(this.endpoint,"signature",a).then((function(i){return __awaiter(u,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:console.log("Signature update result",i);return[4,updateEnvelopeFieldSignature(this.endpoint,this.envelopeId,e.name,i.id)];case 1:t=n.sent();this.updateRecipientFieldValue(e.name,t);return[2]}}))}))})).catch((function(e){console.warn("Error updating signature",e)}))];case 11:l=i.detail,c=l.date,d=l.formattedDate;if(d){console.log("dt",{date:c,formattedDate:d});return[2,this.saveFieldChange(e.name,{prepared:false,value:d})]}return[3,14];case 12:console.log("Updating timestamp",{value:n,ts:i.target.getAttribute("timestamp")});return[3,14];case 13:console.log("Unhandled field update",{value:n,checked:r},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldFilled=function(e){var i=e.value,t=i===void 0?"":i;switch(e.type){case"textbox":switch(e.validator||""){case"email":return isValidEmail(t);case"phone":return isValidPhone(t);default:return t!==""}case"signature":return t==="signed";case"initial":return t==="initialed";case"timestamp":return true;case"textarea":case"date":case"attachment":return t!=="";case"dropdown":return t!=="";case"checkbox":return!!t;case"radio":return!!t;default:return false}};e.prototype.isFieldValid=function(e){var i=e.required,t=i===void 0?false:i;return!t||this.isFieldFilled(e)};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));e.sort((function(e,i){var t=e.x||0;var n=e.y||0;var r=i.x||0;var o=i.y||0;var s=Math.floor(n/5);var a=Math.floor(o/5);return a!==s?a-s:t-r}));return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,r,o,s,a,l,c,d;var u=this;return __generator(this,(function(h){switch(h.label){case 0:if(!this.nextSubmits)return[3,5];h.label=1;case 1:h.trys.push([1,3,,4]);(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;return[4,envelopeRecipientSubmit(this.endpoint,this.envelopeId,this.roleId)];case 2:t=h.sent();console.log("[SIGN] Submitted successfully",t);this.recipient.status="submitted";this.showDone=true;this.isDone=true;return[3,4];case 3:n=h.sent();console.log("[SIGN] Error submitting",n);return[3,4];case 4:this.submitting=false;return[2];case 5:r=this.getSortedFillableFields().filter((function(e){return!u.isFieldFilled(e)}));r.sort((function(e,i){var t=e.x||0;var n=e.y||0;var r=i.x||0;var o=i.y||0;var s=Math.floor(n/5);var a=Math.floor(o/5);return a!==s?a-s:t-r}));o=r.findIndex((function(e){return e.name===u.focusedField}));s=o+1;if(s>=r.length){s=0}a=r[s];l=0;if(l<r.length&&["signature","initial"].includes(a.type)&&((i=a.settings)===null||i===void 0?void 0:i.result)==="signed"){l++;s++;if(s>=r.length){s=0}a=r[s]}if(l>=r.length){a=null}if(a){c=getFieldId(a);d=document.getElementById(c);console.log("Jumping to next field",a);d===null||d===void 0?void 0:d.focusField();d===null||d===void 0?void 0:d.scrollTo({behavior:"smooth",top:0});this.focusedField=a.name}return[2]}}))}))};e.prototype.getRecipientFields=function(){var e=this;return this.envelope.fields.filter((function(i){return i.role_name===e.recipient.role_name}))};e.prototype.checkRecipientFields=function(){var e=this;var i=this.getRecipientFields().filter((function(i){return!e.isFieldValid(i)}));if(i.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{console.log("[SIGN] Invalid fields remaining",i);this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,i,t){var n=this;t.addEventListener("input",(function(e){if(e.target.name.includes("date")||e.target.name.includes("checkbox")||e.target.name.includes("radio")){n.handleFieldChange(i,e).finally((function(){return n.checkRecipientFields()}))}else{n.checkRecipientFields()}}));t.addEventListener("attached",(function(e){return __awaiter(n,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:console.log("[SIGN] onAttached",e.detail,e.target.value);return[4,uploadEnvelopeFieldAttachment(this.endpoint,this.envelopeId,this.roleId,i.name,e.detail)];case 1:t=n.sent();console.log("upload result",t);this.checkRecipientFields();return[2]}}))}))}));t.addEventListener("removed",(function(e){console.log("[SIGN] onRemoved",e.detail,e.target.value)}));t.addEventListener("focusout",(function(e){return n.handleFieldChange(i,e).finally((function(){return n.checkRecipientFields()}))}));t.addEventListener("fieldChange",(function(e){return n.handleFieldChange(i,e).finally((function(){return n.checkRecipientFields()}))}));t.setAttribute("templateid",this.envelope.template_id);t.setAttribute("fieldname",i.name);t.setAttribute("page",e.pageNumber);t.setAttribute("xScale",e.xScale);t.setAttribute("yScale",e.yScale);var r=formatFullName(this.recipient);t.setAttribute("initials",fullNameToInitials(r));t.setAttribute("name",r)};e.prototype.handlePageRendered=function(e){var i=this;var t=e.detail;var n=this.getSortedFillableFields();console.log("Recipient fields",n);n.forEach((function(e,n){if(e.page!==t.pageNumber){return}if(e.type==="signature"){console.log("rendering",e)}var r=renderDocumentField(e,t,{disabled:false,editable:false,draggable:false,done:i.isDone},n);if(!r){return}if(Array.isArray(r)){r.map((function(n){return i.attachFieldAttributes(t,e,n)}))}else{i.attachFieldAttributes(t,e,r)}}));this.sortedRecipients.filter((function(e){return e.role_name!==i.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending")})).forEach((function(){i.getRecipientFields().filter((function(e){return e.page===t.pageNumber})).forEach((function(e){var n=renderDocumentField(e,t,{disabled:true,editable:false,draggable:false,done:i.isDone});if(!n){return}if(Array.isArray(n)){n.map((function(n){return i.attachFieldAttributes(t,e,n)}))}else{i.attachFieldAttributes(t,e,n)}}))}));this.checkRecipientFields()};e.prototype.render=function(){var e=this;if(!this.envelope){return h(Host,null,h("verdocs-loader",null))}if(this.isDone){return h(Host,{class:{agreed:this.agreed}},h("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(i){var t;return(t=e.sdkError)===null||t===void 0?void 0:t.emit(i.detail)}}),this.errorMessage&&h("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:function(){return e.errorMessage=""}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.submitting&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))}return h(Host,{class:{agreed:this.agreed}},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),this.agreed&&!this.finishLater&&h("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:function(){return e.handleNext()}}),h("div",{style:{marginLeft:"10px"}}),this.agreed&&h("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?inProgressMenuOptions:doneMenuOptions,onOptionSelected:function(i){return e.handleOptionSelected(i)}}))),this.agreed&&h("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((function(i){var t=integerSequence(1,i.pages);return h(Fragment,null,t.map((function(t){return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:i.id,endpoint:e.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:t,onPageRendered:function(i){return e.handlePageRendered(i)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&h("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.errorMessage&&h("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:function(){return e.errorMessage=""}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.showLoadError&&h("verdocs-ok-dialog",{heading:"Error Loading Document",message:"Please check with the sender to ensure it has not been canceled, and try again later.",buttonLabel:"Retry",onNext:function(){e.showLoadError=false;window.location.reload()}}),this.submitting&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)),!this.agreed&&h("div",{class:"cover"},h("div",{class:"agree"},h("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:function(){return e.handleClickAgree()}}),h("ul",null,h("li",null,"Agree to use electronic records and signatures, and confirm you have read the"," ",h("a",{href:"https://verdocs.com/en/electronic-record-signature-disclosure/",target:"_blank"},"Electronic Record and Signatures Disclosure"),"."),h("li",null,"Agree to Verdocs"," ",h("a",{href:"https://verdocs.com/en/eula",target:"_blank"},"End User License Agreement")," ","and confirm you have read Verdocs'"," ",h("a",{href:"https://verdocs.com/en/privacy-policy/",target:"_blank"},"Privacy Policy"),".")))))};return e}();VerdocsSign.style=VerdocsSignStyle0;export{VerdocsSign as verdocs_sign};
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,i,t,n){function r(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function s(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):r(e.value).then(s,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,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(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)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:t.label++;return{value:a[1],done:false};case 5:t.label++;r=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];r=0}finally{n=o=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,i,t){if(t||arguments.length===2)for(var n=0,r=i.length,o;n<r;n++){if(o||!(n in i)){if(!o)o=Array.prototype.slice.call(i,0,n);o[n]=i[n]}}return e.concat(o||Array.prototype.slice.call(i))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment}from"./index-a68c7262.js";import{VerdocsEndpoint,startSigningSession,envelopeRecipientAgree,envelopeRecipientDecline,updateEnvelopeField,createSignature,updateEnvelopeFieldSignature,createInitials,updateEnvelopeFieldInitials,isValidPhone,isValidEmail,envelopeRecipientSubmit,uploadEnvelopeFieldAttachment,formatFullName,fullNameToInitials,integerSequence}from"@verdocs/js-sdk";import{a as saveAttachment,u as updateDocumentFieldValue,r as renderDocumentField,g as getFieldId}from"./utils-a79aa5dd.js";import{a as createTemplateFieldStoreFromEnvelope}from"./TemplateFieldStore-4a2e5b85.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"./index-0329eed3.js";import"./index-a971a584.js";var verdocsSignCss='@-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-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}';var VerdocsSignStyle0=verdocsSignCss;var inProgressMenuOptions=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var doneMenuOptions=[{id:"print",label:"Print"},{id:"download",label:"Download"}];var VerdocsSign=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeLoaded=createEvent(this,"envelopeLoaded",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.recipientIndex=-1;this.endpoint=null;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.envelope=null;this.roleNames=[];this.sortedRecipients=[];this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.errorMessage="";this.focusedField="";this.submitting=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document"}e.prototype.componentWillLoad=function(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new VerdocsEndpoint({sessionType:"signing"})}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,r,o,s,a,l,c,d;var u=this;return __generator(this,(function(h){switch(h.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new SDKError("[SIGN] Missing required inviteCode",500,""));return[2]}h.label=1;case 1:h.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,startSigningSession(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:a=h.sent(),l=a.envelope,c=a.recipient;console.log("[SIGN] Loaded signing session",l,c);this.recipient=c;this.envelope=l;if(this.agreed){this.nextButtonLabel="Next"}createTemplateFieldStoreFromEnvelope(this.envelope);this.sortedRecipients=__spreadArray([],this.envelope.recipients,true);this.sortedRecipients.sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}));this.roleNames=this.sortedRecipients.map((function(e){return e.role_name}));if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.recipientIndex=this.roleNames.findIndex((function(e){return e==u.roleId}));if(this.recipientIndex>-1){this.recipient=this.sortedRecipients[this.recipientIndex];this.agreed=this.recipient.agreed}else{console.warn("[SIGN] Could not find our recipient record",this.roleId,this.sortedRecipients)}this.isDone=["submitted","canceled","declined"].includes(this.recipient.status);this.checkRecipientFields();(n=this.envelopeLoaded)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope});return[3,4];case 3:d=h.sent();console.log("[SIGN] Error with signing session",d);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new SDKError(d.message,(o=d.response)===null||o===void 0?void 0:o.status,(s=d.response)===null||s===void 0?void 0:s.data));this.showLoadError=true;return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var i=document.getElementById("verdocs-sign-header");if(e&&i){console.log("[SIGN] Moving header");i.remove();e.append(i)}};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;envelopeRecipientAgree(this.endpoint,this.envelopeId,this.roleId,true).then((function(){var i;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(i=e.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(i){var t,n,r;console.log("[SIGN] Update failure",i);e.submitting=false;(t=e.sdkError)===null||t===void 0?void 0:t.emit(new SDKError(i.message,(n=i.response)===null||n===void 0?void 0:n.status,(r=i.response)===null||r===void 0?void 0:r.data))}))};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var i,t,n,r,o,s,a,l;return __generator(this,(function(c){switch(c.label){case 0:s=e.detail.id;switch(s){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});return[3,7];case 2:VerdocsToast("This feature will be available in an upcoming release.");(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});return[3,7];case 3:this.submitting=true;return[4,envelopeRecipientDecline(this.endpoint,this.envelopeId,this.roleId)];case 4:a=c.sent();console.log("[SIGN] Decline result",a);(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.isDone=true;return[3,7];case 5:window.print();(r=this.envelopeUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,7];case 6:{l=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(l){saveAttachment(this.endpoint,this.envelope,l.id).catch((function(e){console.log("[SIGN] Error downloading PDF",e)}));(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}return[3,7];case 7:return[2]}}))}))};e.prototype.updateRecipientFieldValue=function(e,i){var t=this;console.log("[SIGN] updateRecipientFieldValue",e);this.getRecipientFields().forEach((function(n){if(n.name===e){n.value=i.value;n.settings=i.settings;updateDocumentFieldValue(n);t.checkRecipientFields()}}))};e.prototype.saveFieldChange=function(e,i){var t=this;console.log("[SIGN] updateRecipientFieldValue",e);updateEnvelopeField(this.endpoint,this.envelopeId,e,i).then((function(i){return t.updateRecipientFieldValue(e,i)})).catch((function(e){var i,n,r,o,s,a;if(((i=e.response)===null||i===void 0?void 0:i.status)===401&&((r=(n=e.response)===null||n===void 0?void 0:n.data)===null||r===void 0?void 0:r.error)==="jwt expired"){console.log("[SIGN] Signing session expired");t.errorMessage="Signing session expired. Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(o=t.sdkError)===null||o===void 0?void 0:o.emit(new SDKError(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,i){return __awaiter(this,void 0,void 0,(function(){var t,n,r,o,s,a,l;var c=this;return __generator(this,(function(d){switch(d.label){case 0:t=i.target,n=t.value,r=t.checked;o=e.type;switch(o){case"textbox":return[3,1];case"checkbox":return[3,2];case"radio":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:n})];case 2:{return[2,this.saveFieldChange(e.name,{prepared:false,value:i.target.checked})]}d.label=3;case 3:{return[2,this.saveFieldChange(e.name,{prepared:false,value:i.target.checked})]}d.label=4;case 4:console.log("Saving dropdown",e.name,i.detail);return[2,this.saveFieldChange(e.name,{prepared:false,value:i.detail})];case 5:if(!i.detail){return[2]}return[4,fetch(i.detail)];case 6:return[4,d.sent().blob()];case 7:s=d.sent();return[2,createInitials(this.endpoint,"initial",s).then((function(i){return __awaiter(c,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,updateEnvelopeFieldInitials(this.endpoint,this.envelopeId,e.name,i.id)];case 1:t=n.sent();this.updateRecipientFieldValue(e.name,t);return[2]}}))}))}))];case 8:if(!i.detail){return[2]}return[4,fetch(i.detail)];case 9:return[4,d.sent().blob()];case 10:a=d.sent();return[2,createSignature(this.endpoint,"signature",a).then((function(i){return __awaiter(c,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:console.log("Signature update result",i);return[4,updateEnvelopeFieldSignature(this.endpoint,this.envelopeId,e.name,i.id)];case 1:t=n.sent();this.updateRecipientFieldValue(e.name,t);return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e)}))];case 11:l=i.detail.formattedDate;if(l){return[2,this.saveFieldChange(e.name,{prepared:false,value:l})]}return[3,14];case 12:console.log("[SIGN] Updating timestamp",{value:n,ts:i.target.getAttribute("timestamp")});return[3,14];case 13:console.log("[SIGN] Unhandled field update",{value:n,checked:r},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldFilled=function(e){var i=e.value,t=i===void 0?"":i;switch(e.type){case"textbox":switch(e.validator||""){case"email":return isValidEmail(t);case"phone":return isValidPhone(t);default:return t!==""}case"signature":return t==="signed";case"initial":return t==="initialed";case"timestamp":return true;case"textarea":case"date":return t!=="";case"attachment":return t==="attached";case"dropdown":return t!=="";case"checkbox":return t==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((function(i){return i.group===e.group})).some((function(e){return e.value==="true"}))}return e.value==="true";default:return false}};e.prototype.isFieldValid=function(e){return!e.required||this.isFieldFilled(e)};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));e.sort((function(e,i){var t=e.x||0;var n=e.y||0;var r=i.x||0;var o=i.y||0;var s=Math.floor(n/5);var a=Math.floor(o/5);return a!==s?a-s:t-r}));return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,r,o,s,a,l,c,d;var u=this;return __generator(this,(function(h){switch(h.label){case 0:if(!this.nextSubmits)return[3,5];h.label=1;case 1:h.trys.push([1,3,,4]);(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;return[4,envelopeRecipientSubmit(this.endpoint,this.envelopeId,this.roleId)];case 2:t=h.sent();console.log("[SIGN] Submitted successfully",t);this.recipient.status="submitted";this.showDone=true;this.isDone=true;return[3,4];case 3:n=h.sent();console.log("[SIGN] Error submitting",n);return[3,4];case 4:this.submitting=false;return[2];case 5:r=this.getSortedFillableFields().filter((function(e){return!u.isFieldFilled(e)}));r.sort((function(e,i){var t=e.x||0;var n=e.y||0;var r=i.x||0;var o=i.y||0;var s=Math.floor(n/5);var a=Math.floor(o/5);return a!==s?a-s:t-r}));o=r.findIndex((function(e){return e.name===u.focusedField}));s=o+1;if(s>=r.length){s=0}a=r[s];l=0;if(l<r.length&&["signature","initial"].includes(a.type)&&((i=a.settings)===null||i===void 0?void 0:i.result)==="signed"){l++;s++;if(s>=r.length){s=0}a=r[s]}if(l>=r.length){a=null}if(a){c=getFieldId(a);d=document.getElementById(c);d===null||d===void 0?void 0:d.focusField();d===null||d===void 0?void 0:d.scrollTo({behavior:"smooth",top:0});this.focusedField=a.name}return[2]}}))}))};e.prototype.getRecipientFields=function(){var e=this;return this.envelope.fields.filter((function(i){return i.role_name===e.recipient.role_name}))};e.prototype.checkRecipientFields=function(){var e=this;var i=this.getRecipientFields().filter((function(i){return!e.isFieldValid(i)}));if(i.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{console.log("[SIGN] Invalid fields remaining",i);this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,i,t){var n=this;t.addEventListener("input",(function(e){console.log("onInput",e.target.type,e.target.name);if(e.target.type==="radio"||e.target.type==="checkbox"){n.handleFieldChange(i,e).finally((function(){return n.checkRecipientFields()}))}else{n.checkRecipientFields()}}));t.addEventListener("attached",(function(e){return __awaiter(n,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:console.log("[SIGN] onAttached",e.detail,e.target.value);return[4,uploadEnvelopeFieldAttachment(this.endpoint,this.envelopeId,i.name,e.detail)];case 1:t=n.sent();console.log("upload result",t);this.checkRecipientFields();return[2]}}))}))}));t.addEventListener("removed",(function(e){console.log("[SIGN] onRemoved",e.detail,e.target.value)}));t.addEventListener("focusout",(function(e){if(i.type!=="dropdown"){n.handleFieldChange(i,e).finally((function(){return n.checkRecipientFields()}))}}));t.addEventListener("fieldChange",(function(e){n.handleFieldChange(i,e).finally((function(){return n.checkRecipientFields()}))}));t.setAttribute("templateid",this.envelope.template_id);t.setAttribute("fieldname",i.name);t.setAttribute("page",e.pageNumber);t.setAttribute("xScale",e.xScale);t.setAttribute("yScale",e.yScale);var r=formatFullName(this.recipient);t.setAttribute("initials",fullNameToInitials(r));t.setAttribute("name",r)};e.prototype.handlePageRendered=function(e){var i=this;var t=e.detail;var n=this.getSortedFillableFields();console.log("Recipient fields",n);n.forEach((function(e,n){if(e.page!==t.pageNumber){return}var r=renderDocumentField(e,t,{disabled:false,editable:false,draggable:false,done:i.isDone},n);if(!r){return}if(Array.isArray(r)){r.map((function(n){return i.attachFieldAttributes(t,e,n)}))}else{i.attachFieldAttributes(t,e,r)}}));this.sortedRecipients.filter((function(e){return e.role_name!==i.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending")})).forEach((function(){i.getRecipientFields().filter((function(e){return e.page===t.pageNumber})).forEach((function(e){var n=renderDocumentField(e,t,{disabled:true,editable:false,draggable:false,done:i.isDone});if(!n){return}if(Array.isArray(n)){n.map((function(n){return i.attachFieldAttributes(t,e,n)}))}else{i.attachFieldAttributes(t,e,n)}}))}));this.checkRecipientFields()};e.prototype.render=function(){var e=this;if(!this.envelope){return h(Host,null,h("verdocs-loader",null))}if(this.isDone){return h(Host,{class:{agreed:this.agreed}},h("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(i){var t;return(t=e.sdkError)===null||t===void 0?void 0:t.emit(i.detail)}}),this.errorMessage&&h("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:function(){return e.errorMessage=""}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.submitting&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))}return h(Host,{class:{agreed:this.agreed}},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),this.agreed&&!this.finishLater&&h("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:function(){return e.handleNext()}}),h("div",{style:{marginLeft:"10px"}}),this.agreed&&h("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?inProgressMenuOptions:doneMenuOptions,onOptionSelected:function(i){return e.handleOptionSelected(i)}}))),this.agreed&&h("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((function(i){var t=integerSequence(1,i.pages);return h(Fragment,null,t.map((function(t){return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:i.id,endpoint:e.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:t,onPageRendered:function(i){return e.handlePageRendered(i)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&h("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.errorMessage&&h("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:function(){return e.errorMessage=""}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.showLoadError&&h("verdocs-ok-dialog",{heading:"Error Loading Document",message:"Please check with the sender to ensure it has not been canceled, and try again later.",buttonLabel:"Retry",onNext:function(){e.showLoadError=false;window.location.reload()}}),this.submitting&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)),!this.agreed&&h("div",{class:"cover"},h("div",{class:"agree"},h("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:function(){return e.handleClickAgree()}}),h("ul",null,h("li",null,"Agree to use electronic records and signatures, and confirm you have read the"," ",h("a",{href:"https://verdocs.com/en/electronic-record-signature-disclosure/",target:"_blank"},"Electronic Record and Signatures Disclosure"),"."),h("li",null,"Agree to Verdocs"," ",h("a",{href:"https://verdocs.com/en/eula",target:"_blank"},"End User License Agreement")," ","and confirm you have read Verdocs'"," ",h("a",{href:"https://verdocs.com/en/privacy-policy/",target:"_blank"},"Privacy Policy"),".")))))};return e}();VerdocsSign.style=VerdocsSignStyle0;export{VerdocsSign as verdocs_sign};
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,i){function r(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function n(e){try{l(i["throw"](e))}catch(e){a(e)}}function l(e){e.done?o(e.value):r(e.value).then(s,n)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return l([e,t])}}function l(n){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(o=0)),o)try{if(i=1,r&&(a=n[0]&2?r["return"]:n[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,n[1])).done)return a;if(r=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:o.label++;return{value:n[1],done:false};case 5:o.label++;r=n[1];n=[0];continue;case 7:n=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){o=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){o.label=n[1];break}if(n[0]===6&&o.label<a[1]){o.label=a[1];a=n;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(n);break}if(a[2])o.ops.pop();o.trys.pop();continue}n=t.call(e,o)}catch(e){n=[6,e];r=0}finally{i=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-a68c7262.js";import{VerdocsEndpoint,getTemplateDocumentPageDisplayUri}from"@verdocs/js-sdk";import{g as getTemplateFieldStore}from"./TemplateFieldStore-4a2e5b85.js";import{t as throttle,i as getControlStyles,g as getFieldId}from"./utils-7b0b77d8.js";import{c as createPopper}from"./popper-0fbeff6d.js";import"./index-a971a584.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-e4a6eba5.js";import"./index-0329eed3.js";var verdocsTemplateDocumentPageCss="@-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-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-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-template-document-page .verdocs-template-document-page-layer.img{width:100%}";var VerdocsTemplateDocumentPageStyle0=verdocsTemplateDocumentPageCss;var VerdocsTemplateDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered",7);this.fieldStore=null;this.endpoint=VerdocsEndpoint.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-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="";this.xScale=1;this.yScale=1}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,getTemplateDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.fieldStore=getTemplateFieldStore(this.templateId);return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(t){for(var o=0,i=t;o<i.length;o++){var r=i[o];var a=r.contentRect.width;e.renderedWidth=a;e.renderedHeight=e.virtualHeight*(a/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};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}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}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:e,yScale:t})};e.prototype.render=function(){var e=this;var t="".concat(this.renderedHeight,"px");return h(Host,{key:"e792fce0cb958bdd5783ae873b83c2a7918f1e5f",id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(o){return o.type==="div"?h("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(o.name),style:{height:t}},o.name==="controls"&&e.fieldStore.get("fields").filter((function(t){return t&&t.page===e.pageNumber})).map((function(t){var o,i;var r=getFieldId(t);var a=t.name,s=t.type,n=t.multiline;var l=e,c=l.xScale,d=l.yScale,p=l.templateId,u=l.editable,f=l.disabled,b=l.done,m=l.pageNumber;if(((o=t["setting"])===null||o===void 0?void 0:o.leading)>0||((i=t["settings"])===null||i===void 0?void 0:i.leading)>0){s="textarea";n=true}switch(s){case"textbox":return h("verdocs-field-textbox",{id:r,fieldname:a,templateid:p,editable:u,multiline:n,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"textarea":return h("verdocs-field-textarea",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"date":return h("verdocs-field-date",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"attachment":return h("verdocs-field-attachment",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"dropdown":return h("verdocs-field-dropdown",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"initial":return h("verdocs-field-initial",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"signature":return h("verdocs-field-signature",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,e.xScale,e.yScale)});case"timestamp":return h("verdocs-field-timestamp",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"checkbox":return h("verdocs-field-checkbox",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"radio":return h("verdocs-field-radio",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});default:return h(Fragment,null,a)}}))):e.pageDisplayUri?h("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(o.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}();VerdocsTemplateDocumentPage.style=VerdocsTemplateDocumentPageStyle0;var verdocsToolbarIconCss='@-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-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var VerdocsToolbarIconStyle0=verdocsToolbarIconCss;var VerdocsToolbarIcon=function(){function e(e){registerInstance(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=createPopper(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return h(Host,{key:"313eea120d6b657fe64327a1a2175cee3944030e",class:{}},h("div",{key:"0383546d1bb7a830ac79c946f50801144950161c","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),h("div",{key:"5138031ef44538c476609455ded0e8f862e86345",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,h("div",{key:"91e3f9858016f0628332175b521d9f4ba4a5fc5a","data-popper-arrow":"true",class:"arrow"})))};return e}();VerdocsToolbarIcon.style=VerdocsToolbarIconStyle0;export{VerdocsTemplateDocumentPage as verdocs_template_document_page,VerdocsToolbarIcon as verdocs_toolbar_icon};
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,o,i){function r(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,a){function s(e){try{l(i.next(e))}catch(e){a(e)}}function n(e){try{l(i["throw"](e))}catch(e){a(e)}}function l(e){e.done?o(e.value):r(e.value).then(s,n)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return l([e,t])}}function l(n){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(o=0)),o)try{if(i=1,r&&(a=n[0]&2?r["return"]:n[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,n[1])).done)return a;if(r=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:o.label++;return{value:n[1],done:false};case 5:o.label++;r=n[1];n=[0];continue;case 7:n=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){o=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){o.label=n[1];break}if(n[0]===6&&o.label<a[1]){o.label=a[1];a=n;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(n);break}if(a[2])o.ops.pop();o.trys.pop();continue}n=t.call(e,o)}catch(e){n=[6,e];r=0}finally{i=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-a68c7262.js";import{VerdocsEndpoint,getTemplateDocumentPageDisplayUri}from"@verdocs/js-sdk";import{g as getTemplateFieldStore}from"./TemplateFieldStore-4a2e5b85.js";import{t as throttle,i as getControlStyles,g as getFieldId}from"./utils-a79aa5dd.js";import{c as createPopper}from"./popper-0fbeff6d.js";import"./index-a971a584.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./index-0329eed3.js";var verdocsTemplateDocumentPageCss="@-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-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-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-template-document-page .verdocs-template-document-page-layer.img{width:100%}";var VerdocsTemplateDocumentPageStyle0=verdocsTemplateDocumentPageCss;var VerdocsTemplateDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered",7);this.fieldStore=null;this.endpoint=VerdocsEndpoint.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-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="";this.xScale=1;this.yScale=1}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,getTemplateDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.fieldStore=getTemplateFieldStore(this.templateId);return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(t){for(var o=0,i=t;o<i.length;o++){var r=i[o];var a=r.contentRect.width;e.renderedWidth=a;e.renderedHeight=e.virtualHeight*(a/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};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}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}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:e,yScale:t})};e.prototype.render=function(){var e=this;var t="".concat(this.renderedHeight,"px");return h(Host,{key:"e792fce0cb958bdd5783ae873b83c2a7918f1e5f",id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(o){return o.type==="div"?h("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(o.name),style:{height:t}},o.name==="controls"&&e.fieldStore.get("fields").filter((function(t){return t&&t.page===e.pageNumber})).map((function(t){var o,i;var r=getFieldId(t);var a=t.name,s=t.type,n=t.multiline;var l=e,c=l.xScale,d=l.yScale,p=l.templateId,u=l.editable,f=l.disabled,b=l.done,m=l.pageNumber;if(((o=t["setting"])===null||o===void 0?void 0:o.leading)>0||((i=t["settings"])===null||i===void 0?void 0:i.leading)>0){s="textarea";n=true}switch(s){case"textbox":return h("verdocs-field-textbox",{id:r,fieldname:a,templateid:p,editable:u,multiline:n,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"textarea":return h("verdocs-field-textarea",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"date":return h("verdocs-field-date",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"attachment":return h("verdocs-field-attachment",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"dropdown":return h("verdocs-field-dropdown",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"initial":return h("verdocs-field-initial",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"signature":return h("verdocs-field-signature",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,e.xScale,e.yScale)});case"timestamp":return h("verdocs-field-timestamp",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"checkbox":return h("verdocs-field-checkbox",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});case"radio":return h("verdocs-field-radio",{id:r,fieldname:a,templateid:p,editable:u,disabled:f,done:b,xscale:c,yscale:d,pagenumber:m,style:getControlStyles(t,c,d)});default:return h(Fragment,null,a)}}))):e.pageDisplayUri?h("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(o.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}();VerdocsTemplateDocumentPage.style=VerdocsTemplateDocumentPageStyle0;var verdocsToolbarIconCss='@-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-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var VerdocsToolbarIconStyle0=verdocsToolbarIconCss;var VerdocsToolbarIcon=function(){function e(e){registerInstance(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=createPopper(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return h(Host,{key:"313eea120d6b657fe64327a1a2175cee3944030e",class:{}},h("div",{key:"0383546d1bb7a830ac79c946f50801144950161c","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),h("div",{key:"5138031ef44538c476609455ded0e8f862e86345",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,h("div",{key:"91e3f9858016f0628332175b521d9f4ba4a5fc5a","data-popper-arrow":"true",class:"arrow"})))};return e}();VerdocsToolbarIcon.style=VerdocsToolbarIconStyle0;export{VerdocsTemplateDocumentPage as verdocs_template_document_page,VerdocsToolbarIcon as verdocs_toolbar_icon};
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,n,i,t){function o(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(t.next(e))}catch(e){r(e)}}function a(e){try{l(t["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,o,r,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(n){return l([e,n])}}function l(a){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(t=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=n.call(e,i)}catch(e){a=[6,e];o=0}finally{t=r=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,F as Fragment,g as getElement}from"./index-a68c7262.js";import{VerdocsEndpoint,getEnvelope,getDocumentDownloadLink,cancelEnvelope,userCanCancelEnvelope,integerSequence}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-7b0b77d8.js";import{S as SDKError}from"./errors-887f1e88.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-e4a6eba5.js";import"./index-0329eed3.js";var verdocsViewCss='@-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-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var VerdocsViewStyle0=verdocsViewCss;var VerdocsView=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.another=createEvent(this,"another",7);this.view=createEvent(this,"view",7);this.next=createEvent(this,"next",7);this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.envelope=null;this.roleNames=[];this.showCancelDone=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,o;var r=this;return __generator(this,(function(s){switch(s.label){case 0:this.endpoint.loadSession();if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}console.log("[VIEW] Loading envelope...");s.label=1;case 1:s.trys.push([1,3,,4]);t=this;return[4,getEnvelope(this.endpoint,this.envelopeId)];case 2:t.envelope=s.sent();console.log("[VIEW] Loaded envelope",this.envelope);this.roleNames=this.envelope.recipients.map((function(e){return e.role_name}));setTimeout((function(){return __awaiter(r,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:console.log("[VIEW] Reloading envelope...");e=this;return[4,getEnvelope(this.endpoint,this.envelopeId)];case 1:e.envelope=n.sent();console.log("[VIEW] Reloaded envelope",this.envelope);return[2]}}))}))}),2e3);return[3,4];case 3:o=s.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(o.message,(n=o.response)===null||n===void 0?void 0:n.status,(i=o.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var n=document.getElementById("verdocs-view-header");if(e&&n){console.log("[VIEW] Moving header");n.remove();e.append(n)}};e.prototype.handlePageRendered=function(e){var n=e.detail;console.log("[VIEW] Page rendered",n)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var n,i,t,o,r,s,r;var a=this;return __generator(this,(function(l){switch(l.label){case 0:t=e.detail.id;switch(t){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,6];case"download-all":return[3,9]}return[3,10];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(e){a.canceling=false;console.log("[VIEW] Envelope canceled",e);return getEnvelope(a.endpoint,a.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);a.envelope=e})).catch((function(e){var n,i,t;a.canceling=false;console.log("[VIEW] Error canceling envelope",e);(n=a.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(t=e.response)===null||t===void 0?void 0:t.data))}));this.showCancelDone=true;(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,10];case 2:window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,10];case 3:o=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(!o)return[3,5];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,o.id)];case 4:r=l.sent();window.open(r,"_blank");l.label=5;case 5:return[3,10];case 6:s=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!s)return[3,8];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,s.id)];case 7:r=l.sent();window.open(r,"_blank");l.label=8;case 8:return[3,10];case 9:saveEnvelopesAsZip(this.endpoint,[this.envelope]).then((function(){var e;(e=a.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:a.endpoint,envelope:a.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,10];case 10:return[2]}}))}))};e.prototype.render=function(){var e=this;var n;if(!this.envelope){return h(Host,null,h("img",{src:"https://verdocs-public-assets.s3.amazonaws.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var i=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.profile,this.envelope)){i.push({id:"cancel",label:"Cancel"})}var t=this.envelope.documents.length>0;var o=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var r=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(t||r){i.push({label:""});if(t){i.push({id:"download-attachments",label:o>1?"Download Documents":"Download Document"})}if(r){i.push({id:"download-certificate",label:"Download Certificate"})}if(t&&r){i.push({id:"download-all",label:"Download All Files"})}}return h(Host,null,h("div",{id:"verdocs-view-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:i,onOptionSelected:function(n){return e.handleOptionSelected(n)}}))),h("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((n=this.envelope)===null||n===void 0?void 0:n.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(n){var i=integerSequence(1,n.pages);return h(Fragment,null,i.map((function(i){return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:n.id,endpoint:e.endpoint,type:"filled",virtualWidth:612,virtualHeight:792,pageNumber:i,onPageRendered:function(n){return e.handlePageRendered(n)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&h("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsView.style=VerdocsViewStyle0;export{VerdocsView as verdocs_view};
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,n,i,t){function o(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(t.next(e))}catch(e){r(e)}}function a(e){try{l(t["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},t,o,r,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(n){return l([e,n])}}function l(a){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(t=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=n.call(e,i)}catch(e){a=[6,e];o=0}finally{t=r=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,F as Fragment,g as getElement}from"./index-a68c7262.js";import{VerdocsEndpoint,getEnvelope,getDocumentDownloadLink,cancelEnvelope,userCanCancelEnvelope,integerSequence}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-a79aa5dd.js";import{S as SDKError}from"./errors-887f1e88.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./index-0329eed3.js";var verdocsViewCss='@-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-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var VerdocsViewStyle0=verdocsViewCss;var VerdocsView=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.another=createEvent(this,"another",7);this.view=createEvent(this,"view",7);this.next=createEvent(this,"next",7);this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.envelope=null;this.roleNames=[];this.showCancelDone=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,o;var r=this;return __generator(this,(function(s){switch(s.label){case 0:this.endpoint.loadSession();if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}console.log("[VIEW] Loading envelope...");s.label=1;case 1:s.trys.push([1,3,,4]);t=this;return[4,getEnvelope(this.endpoint,this.envelopeId)];case 2:t.envelope=s.sent();console.log("[VIEW] Loaded envelope",this.envelope);this.roleNames=this.envelope.recipients.map((function(e){return e.role_name}));setTimeout((function(){return __awaiter(r,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:console.log("[VIEW] Reloading envelope...");e=this;return[4,getEnvelope(this.endpoint,this.envelopeId)];case 1:e.envelope=n.sent();console.log("[VIEW] Reloaded envelope",this.envelope);return[2]}}))}))}),2e3);return[3,4];case 3:o=s.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(o.message,(n=o.response)===null||n===void 0?void 0:n.status,(i=o.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var n=document.getElementById("verdocs-view-header");if(e&&n){console.log("[VIEW] Moving header");n.remove();e.append(n)}};e.prototype.handlePageRendered=function(e){var n=e.detail;console.log("[VIEW] Page rendered",n)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var n,i,t,o,r,s,r;var a=this;return __generator(this,(function(l){switch(l.label){case 0:t=e.detail.id;switch(t){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,6];case"download-all":return[3,9]}return[3,10];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(e){a.canceling=false;console.log("[VIEW] Envelope canceled",e);return getEnvelope(a.endpoint,a.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);a.envelope=e})).catch((function(e){var n,i,t;a.canceling=false;console.log("[VIEW] Error canceling envelope",e);(n=a.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(t=e.response)===null||t===void 0?void 0:t.data))}));this.showCancelDone=true;(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,10];case 2:window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,10];case 3:o=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(!o)return[3,5];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,o.id)];case 4:r=l.sent();window.open(r,"_blank");l.label=5;case 5:return[3,10];case 6:s=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!s)return[3,8];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,s.id)];case 7:r=l.sent();window.open(r,"_blank");l.label=8;case 8:return[3,10];case 9:saveEnvelopesAsZip(this.endpoint,[this.envelope]).then((function(){var e;(e=a.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:a.endpoint,envelope:a.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,10];case 10:return[2]}}))}))};e.prototype.render=function(){var e=this;var n;if(!this.envelope){return h(Host,null,h("img",{src:"https://verdocs-public-assets.s3.amazonaws.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var i=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.profile,this.envelope)){i.push({id:"cancel",label:"Cancel"})}var t=this.envelope.documents.length>0;var o=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var r=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(t||r){i.push({label:""});if(t){i.push({id:"download-attachments",label:o>1?"Download Documents":"Download Document"})}if(r){i.push({id:"download-certificate",label:"Download Certificate"})}if(t&&r){i.push({id:"download-all",label:"Download All Files"})}}return h(Host,null,h("div",{id:"verdocs-view-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:i,onOptionSelected:function(n){return e.handleOptionSelected(n)}}))),h("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((n=this.envelope)===null||n===void 0?void 0:n.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(n){var i=integerSequence(1,n.pages);return h(Fragment,null,i.map((function(i){return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:n.id,endpoint:e.endpoint,type:"filled",virtualWidth:612,virtualHeight:792,pageNumber:i,onPageRendered:function(n){return e.handlePageRendered(n)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&h("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsView.style=VerdocsViewStyle0;export{VerdocsView as verdocs_view};
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,i){function d(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o["throw"](e))}catch(e){i(e)}}function l(e){e.done?a(e.value):n(e.value).then(d,s)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,d;return d={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(t){return l([e,t])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(d&&(d=0,s[0]&&(a=0)),a)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:a.label++;return{value:s[1],done:false};case 5:a.label++;n=s[1];s=[0];continue;case 7:s=a.ops.pop();a.trys.pop();continue;default:if(!(i=a.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1];i=s;break}if(i&&a.label<i[2]){a.label=i[2];a.ops.push(s);break}if(i[2])a.ops.pop();a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{p as promiseResolve,b as bootstrapLazy}from"./index-a68c7262.js";export{s as setNonce}from"./index-a68c7262.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,globalScripts()];case 1:t.sent();return[2,bootstrapLazy(JSON.parse('[["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"templateStore":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["verdocs-envelopes-list",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["verdocs-templates-list",[[0,"verdocs-templates-list",{"endpoint":[16],"sharing":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]},null,{"sharing":["handleSharingUpdated"],"starred":["handleStarredUpdated"],"sort":["handleSortUpdated"],"name":["handleNameUpdated"],"selectedPage":["handlePageUpdated"]}]]],["verdocs-sign",[[0,"verdocs-sign",{"endpoint":[1040],"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"headerTargetId":[1,"header-target-id"],"envelope":[32],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"submitting":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showManageDialog":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"loading":[32]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"displayMode":[32],"org_name":[32],"first_name":[32],"last_name":[32],"email":[32],"verificationCode":[32],"newPassword":[32],"password":[32],"confirmpass":[32],"submitting":[32],"resendDisabled":[32],"session":[32],"profile":[32]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-dialog",[[4,"verdocs-dialog"]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"templateid":[1],"fieldname":[1],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-quick-functions",[[0,"verdocs-quick-functions",{"endpoint":[16]}]]],["verdocs-search-box",[[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-table",[[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-button_2",[[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["verdocs-view",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"envelope":[32],"roleNames":[32],"showCancelDone":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["verdocs-template-star",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["verdocs-envelope-recipient-link_2",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"loading":[32],"gettingLink":[32],"link":[32]}],[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"loading":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32]}]]],["verdocs-envelope-document-page",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["verdocs-button-panel_2",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["verdocs-pagination_2",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["verdocs-spinner",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["verdocs-checkbox_5",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"loading":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}]]],["verdocs-template-document-page_2",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32]}]]],["verdocs-contact-picker_2",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"showKba":[32],"kbaMethod":[32],"pinCode":[32],"nameFieldId":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-file-chooser_2",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["verdocs-dropdown",[[0,"verdocs-dropdown",{"options":[16]},[[9,"resize","handleResize"]]]]],["verdocs-radio-button_3",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"delegator":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}],[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-loader",[[0,"verdocs-loader"]]],["verdocs-organization-card_2",[[0,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[4,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["verdocs-field-attachment_13",[[0,"verdocs-field-attachment",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"selectedFile":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"templateid":[513],"fieldname":[513],"disabled":[516],"initials":[513],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"templateid":[513],"fieldname":[513],"name":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"templateid":[513],"fieldname":[513],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio",{"templateid":[513],"fieldname":[513],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"multiline":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-preview_9",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"loading":[32]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"templateStore":[32],"roleStore":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"store":[32]}],[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"templateStore":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}],[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"personal":[32],"public":[32]}]]]]'),e)]}}))}))}));
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,a,o){function n(e){return e instanceof a?e:new a((function(t){t(e)}))}return new(a||(a=Promise))((function(a,i){function d(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o["throw"](e))}catch(e){i(e)}}function l(e){e.done?a(e.value):n(e.value).then(d,s)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,d;return d={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(t){return l([e,t])}}function l(s){if(o)throw new TypeError("Generator is already executing.");while(d&&(d=0,s[0]&&(a=0)),a)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:a.label++;return{value:s[1],done:false};case 5:a.label++;n=s[1];s=[0];continue;case 7:s=a.ops.pop();a.trys.pop();continue;default:if(!(i=a.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1];i=s;break}if(i&&a.label<i[2]){a.label=i[2];a.ops.push(s);break}if(i[2])a.ops.pop();a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{p as promiseResolve,b as bootstrapLazy}from"./index-a68c7262.js";export{s as setNonce}from"./index-a68c7262.js";import{g as globalScripts}from"./app-globals-0f993ce5.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,globalScripts()];case 1:t.sent();return[2,bootstrapLazy(JSON.parse('[["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"templateStore":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}]]],["verdocs-envelopes-list",[[0,"verdocs-envelopes-list",{"endpoint":[16],"view":[1537],"status":[1537],"sort":[1537],"match":[1537],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"selectedEnvelopes":[32],"envelopes":[32]},null,{"view":["handleViewUpdated"],"status":["handleStatusUpdated"],"sort":["handleSortUpdated"],"match":["handleMatchUpdated"],"selectedPage":["handlePageUpdated"]}]]],["verdocs-templates-list",[[0,"verdocs-templates-list",{"endpoint":[16],"sharing":[1537],"starred":[1537],"sort":[1537],"name":[1537],"allowedActions":[1040],"showPagination":[4,"show-pagination"],"rowsPerPage":[2,"rows-per-page"],"selectedPage":[2,"selected-page"],"count":[32],"initiallyLoaded":[32],"loading":[32],"confirmDelete":[32],"templates":[32],"localNameFilter":[32]},null,{"sharing":["handleSharingUpdated"],"starred":["handleStarredUpdated"],"sort":["handleSortUpdated"],"name":["handleNameUpdated"],"selectedPage":["handlePageUpdated"]}]]],["verdocs-sign",[[0,"verdocs-sign",{"endpoint":[1040],"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"headerTargetId":[1,"header-target-id"],"envelope":[32],"roleNames":[32],"sortedRecipients":[32],"recipient":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"submitting":[32],"isDone":[32],"showDone":[32],"showLoadError":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32],"showManageDialog":[32],"showRecipientDialog":[32],"showCancelDialog":[32],"loading":[32]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"displayMode":[32],"org_name":[32],"first_name":[32],"last_name":[32],"email":[32],"verificationCode":[32],"newPassword":[32],"password":[32],"confirmpass":[32],"submitting":[32],"resendDisabled":[32],"session":[32],"profile":[32]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-dialog",[[4,"verdocs-dialog"]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"templateid":[1],"fieldname":[1],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"xscale":[2],"yscale":[2],"pagenumber":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-quick-functions",[[0,"verdocs-quick-functions",{"endpoint":[16]}]]],["verdocs-search-box",[[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-table",[[0,"verdocs-table",{"columns":[16],"data":[16]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-button_2",[[0,"verdocs-help-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"buttonLabel":[1,"button-label"],"showCancel":[4,"show-cancel"],"closed":[32]}]]],["verdocs-view",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"canceling":[32],"envelope":[32],"roleNames":[32],"showCancelDone":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"containerId":[32]}]]],["verdocs-template-star",[[0,"verdocs-template-star",{"endpoint":[16],"template":[1040],"updating":[32]}]]],["verdocs-envelope-recipient-link_2",[[0,"verdocs-envelope-recipient-link",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"roleName":[1,"role-name"],"isOpen":[32],"loading":[32],"gettingLink":[32],"link":[32]}],[0,"verdocs-envelope-recipient-summary",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"canSendAnother":[4,"can-send-another"],"canView":[4,"can-view"],"canDone":[4,"can-done"],"isOpen":[32],"loading":[32],"recipientStatusIcons":[32],"containerId":[32],"gettingLinks":[32],"links":[32]}]]],["verdocs-envelope-document-page",[[0,"verdocs-envelope-document-page",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"type":[1],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}]]],["verdocs-button-panel_2",[[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[4,"verdocs-tabs",{"tabs":[16],"selectedTab":[2,"selected-tab"]}]]],["verdocs-pagination_2",[[0,"verdocs-pagination",{"selectedPage":[1538,"selected-page"],"itemCount":[2,"item-count"],"perPage":[2,"per-page"]}],[0,"verdocs-quick-filter",{"options":[16],"label":[1],"value":[1537],"placeholder":[1],"open":[32]}]]],["verdocs-spinner",[[0,"verdocs-spinner",{"size":[2],"mode":[1]}]]],["verdocs-checkbox_5",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1025,"field-name"],"helpText":[1,"help-text"],"dirty":[32],"loading":[32],"label":[32],"type":[32],"name":[32],"required":[32],"roleName":[32],"group":[32],"fieldType":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-text-input",{"value":[1537],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"clearable":[4],"copyable":[4],"type":[1],"disabled":[4],"required":[4],"showingPw":[32]}]]],["verdocs-template-document-page_2",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}],[0,"verdocs-template-document-page",{"endpoint":[16],"editable":[4],"disabled":[4],"done":[4],"templateId":[1,"template-id"],"documentId":[1,"document-id"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32],"xScale":[32],"yScale":[32]}]]],["verdocs-contact-picker_2",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"showKba":[32],"kbaMethod":[32],"pinCode":[32],"nameFieldId":[32],"firstNameFieldId":[32],"lastNameFieldId":[32],"emailFieldId":[32],"phoneFieldId":[32]}],[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-file-chooser_2",[[0,"verdocs-file-chooser",{"endpoint":[16],"file":[32]}],[0,"verdocs-progress-bar",{"label":[1],"showPercent":[4,"show-percent"],"percent":[2]}]]],["verdocs-dropdown",[[0,"verdocs-dropdown",{"options":[16]},[[9,"resize","handleResize"]]]]],["verdocs-radio-button_3",[[0,"verdocs-template-role-properties",{"endpoint":[16],"templateId":[1,"template-id"],"roleName":[1,"role-name"],"sender":[1],"dirty":[32],"saving":[32],"name":[32],"type":[32],"first_name":[32],"last_name":[32],"email":[32],"phone":[32],"delegator":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}],[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-loader",[[0,"verdocs-loader"]]],["verdocs-organization-card_2",[[0,"verdocs-organization-card",{"organization":[16],"hovered":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseout","onMouseOut"]]],[4,"verdocs-portal",{"anchor":[1],"voffset":[2]},[[11,"scroll","handleScroll"],[9,"resize","handleResize"],[4,"click","handleClick"]]]]],["verdocs-field-attachment_13",[[0,"verdocs-field-attachment",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"selectedFile":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-initial",{"templateid":[513],"fieldname":[513],"disabled":[516],"initials":[513],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-signature",{"templateid":[513],"fieldname":[513],"name":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-checkbox",{"templateid":[513],"fieldname":[513],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-date",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"field":[16],"containerId":[32],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-dropdown",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-radio",{"templateid":[513],"fieldname":[513],"disabled":[516],"done":[516],"editable":[516],"moveable":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textarea",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-textbox",{"endpoint":[16],"templateid":[513],"fieldname":[513],"disabled":[516],"multiline":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[514],"showingProperties":[32],"focused":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-field-timestamp",{"templateid":[513],"fieldname":[513],"disabled":[516],"editable":[516],"moveable":[516],"done":[516],"xscale":[514],"yscale":[514],"pagenumber":[2],"showingProperties":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}],[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}],[0,"verdocs-upload-dialog",{"draggingOver":[32],"selectedFiles":[32]}]]],["verdocs-preview_9",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"showMustSelectRole":[32],"selectedRoleName":[32],"loading":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"loading":[32]}],[0,"verdocs-send",{"endpoint":[16],"templateId":[513,"template-id"],"environment":[1],"containerId":[32],"showPickerForId":[32],"sessionContacts":[32],"sending":[32],"rolesCompleted":[32],"templateStore":[32],"roleStore":[32],"reset":[64]},null,{"templateId":["onTemplateIdChanged"]}],[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"uploading":[32],"progressLabel":[32],"progressPercent":[32],"showDeleteError":[32],"confirmDeleteDocument":[32],"store":[32]}],[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32],"progressLabel":[32],"progressPercent":[32]}],[0,"verdocs-template-build-tabs",{"endpoint":[16],"templateId":[1537,"template-id"],"step":[1537],"templateStore":[32]},null,{"templateId":["onTemplateIdChanged"],"step":["onStepChanged"]}],[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"personal":[32],"public":[32]}]]]]'),e)]}}))}))}));
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { IFileWithData } from '@verdocs/js-sdk';
|
2
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
3
2
|
/**
|
4
3
|
* Display a file upload tool. Note that the file is not actually transmitted, so it may be used by
|
@@ -14,9 +13,9 @@ export declare class VerdocsUploadDialog {
|
|
14
13
|
/**
|
15
14
|
* Event fired when the dialog is closed. The event data will contain the file selected.
|
16
15
|
*/
|
17
|
-
next: EventEmitter<
|
16
|
+
next: EventEmitter<File[]>;
|
18
17
|
draggingOver: boolean;
|
19
|
-
|
18
|
+
selectedFiles: File[];
|
20
19
|
handleCancel(): void;
|
21
20
|
handleDismiss(e: any): void;
|
22
21
|
handleDone(): void;
|
@@ -57,6 +57,8 @@ export declare class VerdocsFieldCheckbox {
|
|
57
57
|
fieldName: string;
|
58
58
|
}>;
|
59
59
|
showingProperties?: boolean;
|
60
|
+
focused?: boolean;
|
61
|
+
focusField(): Promise<void>;
|
60
62
|
showSettingsPanel(): Promise<void>;
|
61
63
|
hideSettingsPanel(): Promise<void>;
|
62
64
|
fieldStore: TTemplateFieldStore;
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
6
6
|
*/
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
8
|
-
import { ICreateEnvelopeRecipient, IEnvelope,
|
8
|
+
import { ICreateEnvelopeRecipient, IEnvelope, IOrganization, IRecipient, IRole, ITemplate, ITemplateField, ITemplateFieldSetting, TEnvelopeStatus, TRecipientStatus, TTemplateSenderType, VerdocsEndpoint } from "@verdocs/js-sdk";
|
9
9
|
import { IAuthStatus } from "./components/embeds/verdocs-auth/verdocs-auth";
|
10
10
|
import { SDKError } from "./utils/errors";
|
11
11
|
import { TVerdocsBuildStep } from "./components/embeds/verdocs-build/verdocs-build";
|
@@ -22,7 +22,7 @@ import { TVerdocsBuildStep as TVerdocsBuildStep1 } from "./components/templates/
|
|
22
22
|
import { TAllowedTemplateAction } from "./components/templates/verdocs-templates-list/verdocs-templates-list";
|
23
23
|
import { IToggleIconButtons } from "./components/controls/verdocs-toggle/verdocs-toggle";
|
24
24
|
import { Placement } from "@popperjs/core/lib/enums";
|
25
|
-
export { ICreateEnvelopeRecipient, IEnvelope,
|
25
|
+
export { ICreateEnvelopeRecipient, IEnvelope, IOrganization, IRecipient, IRole, ITemplate, ITemplateField, ITemplateFieldSetting, TEnvelopeStatus, TRecipientStatus, TTemplateSenderType, VerdocsEndpoint } from "@verdocs/js-sdk";
|
26
26
|
export { IAuthStatus } from "./components/embeds/verdocs-auth/verdocs-auth";
|
27
27
|
export { SDKError } from "./utils/errors";
|
28
28
|
export { TVerdocsBuildStep } from "./components/embeds/verdocs-build/verdocs-build";
|
@@ -477,6 +477,7 @@ export namespace Components {
|
|
477
477
|
* The name of the field to display.
|
478
478
|
*/
|
479
479
|
"fieldname": string;
|
480
|
+
"focusField": () => Promise<void>;
|
480
481
|
"hideSettingsPanel": () => Promise<void>;
|
481
482
|
/**
|
482
483
|
* If set, the field may be dragged to a new location. This should only be enabled in the Builder, or for self-placed fields.
|
@@ -3531,7 +3532,7 @@ declare global {
|
|
3531
3532
|
};
|
3532
3533
|
interface HTMLVerdocsUploadDialogElementEventMap {
|
3533
3534
|
"exit": any;
|
3534
|
-
"next":
|
3535
|
+
"next": File[];
|
3535
3536
|
}
|
3536
3537
|
/**
|
3537
3538
|
* Display a file upload tool. Note that the file is not actually transmitted, so it may be used by
|
@@ -5932,7 +5933,7 @@ declare namespace LocalJSX {
|
|
5932
5933
|
/**
|
5933
5934
|
* Event fired when the dialog is closed. The event data will contain the file selected.
|
5934
5935
|
*/
|
5935
|
-
"onNext"?: (event: VerdocsUploadDialogCustomEvent<
|
5936
|
+
"onNext"?: (event: VerdocsUploadDialogCustomEvent<File[]>) => void;
|
5936
5937
|
}
|
5937
5938
|
/**
|
5938
5939
|
* Render the documents attached to an envelope in read-only (view) mode. All documents are
|
@@ -12,7 +12,6 @@ export declare const getControlStyles: (field: ITemplateField | IEnvelopeField,
|
|
12
12
|
transform: string;
|
13
13
|
};
|
14
14
|
export declare const getFieldId: (field: ITemplateField | IEnvelopeField) => string;
|
15
|
-
export declare const getFieldOptionId: (field: ITemplateField | IEnvelopeField, index: number) => string;
|
16
15
|
interface IFieldOptions {
|
17
16
|
disabled?: boolean;
|
18
17
|
editable?: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as i,h as s,H as t}from"./p-5207d80c.js";import{VerdocsEndpoint as n,resendInvitation as o,cancelEnvelope as l,formatFullName as a,userIsEnvelopeOwner as d,capitalize as r}from"@verdocs/js-sdk";import{g as c}from"./p-ed199c97.js";import{F as v}from"./p-251c4106.js";import{V as p}from"./p-04c07b7b.js";import{S as h}from"./p-fd97809c.js";import{d as g}from"./p-edaec1b6.js";import"./p-83317d11.js";import"./p-a706bac9.js";const w={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>'},m=class{constructor(s){e(this,s),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.toggle=i(this,"toggle",7),this.another=i(this,"another",7),this.store=null,this.endpoint=n.getDefault(),this.envelopeId="",this.activeTab=1,this.panelOpen=!1,this.showManageDialog=!1,this.showRecipientDialog="",this.showCancelDialog=!1,this.loading=!0}async componentWillLoad(){var e,i,s;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[SIDEBAR] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[SIDEBAR] Unable to start session, must be authenticated");this.store=await c(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1}catch(t){console.log("[SIDEBAR] Error loading envelope",t),null===(e=this.sdkError)||void 0===e||e.emit(new h(t.message,null===(i=t.response)||void 0===i?void 0:i.status,null===(s=t.response)||void 0===s?void 0:s.data))}}sortEnvelopeRecipients(){var e,i;null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i||i.recipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}setTab(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen,null===(i=this.toggle)||void 0===i||i.emit({open:this.panelOpen}),this.activeTab=e}canResendRecipient(e){var i,s;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.status)}handleRecipientAction(e,i){var s,t;switch(console.log("[SIDEBAR] Recipient action",i,e),i){case"reminder":o(this.endpoint,this.envelopeId,e.role_name).then((()=>{p("Reminder Sent",{style:"success"})})).catch((e=>{console.log("[SIDEBAR] Error resending invitation",e),p("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":case"details":p("This feature will be enabled in a future release. Please try again later.",{style:"info"})}null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:null===(t=this.store)||void 0===t?void 0:t.state,event:i})}cancelEnvelope(){this.loading=!0,l(this.endpoint,this.envelopeId).then((async e=>{var i,s;console.log("[SIDEBAR] Envelope canceled",e),p("Envelope canceled",{style:"success"}),this.store=await c(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:null===(s=this.store)||void 0===s?void 0:s.state,event:"canceled"})})).catch((e=>{console.log("[SIDEBAR] Error canceling envelope",e),this.loading=!1,p("Error canceling envelope: "+e.message,{style:"error"})}))}prepareHistoryEntries(){var e,i,s,t,n,o,l,d,r,c,v,p;const h=[],g=(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.history_entries)||[];h.push({icon:"pencil",message:"Envelope created.",date:new Date(null===(t=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===t?void 0:t.created_at)}),"complete"===(null===(o=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===o?void 0:o.status)&&h.push({icon:"pencil",message:"Envelope completed.",date:new Date(null===(d=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===d?void 0:d.updated_at)});const w=g.some((e=>"owner:canceled"===e.event));return"canceled"!==(null===(c=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===c?void 0:c.status)||w||h.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(null===(p=null===(v=this.store)||void 0===v?void 0:v.state)||void 0===p?void 0:p.canceled_at)}),g.forEach((e=>{var i;const s=null===(i=this.store.state)||void 0===i?void 0:i.recipients.find((i=>i.role_name===e.role_name)),t=a(s);switch(e.event.toLowerCase()){case"recipient:signed":h.push({icon:"gesture",message:`Signed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:declined":h.push({icon:"clear",message:`Declined by ${t}.`,date:new Date(e.created_at)});break;case"recipient:opened":switch(e.event_detail){case"email":case"mail":h.push({icon:"visibility",message:`Opened by ${t}, via email.`,date:new Date(e.created_at)});break;case"sms":h.push({icon:"visibility",message:`Opened by ${t}, via SMS.`,date:new Date(e.created_at)});break;case"in_person_link":h.push({icon:"visibility",message:`Opened by ${t}, via In-person link.`,date:new Date(e.created_at)});break;case"in_app":h.push({icon:"visibility",message:`Opened by ${t}, via dashboard.`,date:new Date(e.created_at)});break;default:h.push({icon:"visibility",message:`Opened by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:submitted":h.push("approver"===e.event_detail?{icon:"check_circle",message:`Approved by ${t}.`,date:new Date(e.created_at)}:{icon:"send",message:`Submitted by ${t}.`,date:new Date(e.created_at)});break;case"recipient:prepared":h.push({icon:"send",message:`Prepared by ${t}.`,date:new Date(e.created_at)});break;case"recipient:claimed":"guest"===e.event_detail?h.push({icon:"account_circle",message:`${t} claimed the Verdoc as a guest.`,date:new Date(e.created_at)}):"profile"===e.event_detail&&h.push({icon:"verified_user",message:`${t} claimed the Verdoc as a verified user.`,date:new Date(e.created_at)});break;case"recipient:agreed":h.push({icon:"done",message:`${t} agreed to use electronic records and signatures.`,date:new Date(e.created_at)});break;case"recipient:invited":h.push("sms"===e.event_detail?{icon:"textsms",message:`${t} has been invited via SMS.`,date:new Date(e.created_at)}:{icon:"mail",message:`${t} has been invited via email.`,date:new Date(e.created_at)});break;case"recipient:reminder":h.push("sms"===e.event_detail?{icon:"textsms",message:`${t} sent a reminder via SMS.`,date:new Date(e.created_at)}:{icon:"mail",message:`${t} sent a reminder via email.`,date:new Date(e.created_at)});break;case"invitation:resent":h.push({icon:"mail",message:`Invitation was resent to ${t} ${"reminder"===e.event_detail?" by reminder":""}.`,date:new Date(e.created_at)});break;case"envelope:cc":h.push({icon:"contact_mail",message:`A copy has been sent to ${t}.`,date:new Date(e.created_at)});break;case"recipient:delegated":h.push({icon:"people",message:e.event_detail,date:new Date(e.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":h.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"created":h.push({icon:"create",message:"Envelope was created.",date:new Date(e.created_at)});break;case"completed":h.push({icon:"done_all",message:"Envelope was completed.",date:new Date(e.created_at)});break;case"canceled":case"owner:canceled":h.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(e.created_at)});break;case"owner:get_in_person_link":h.push({icon:"link",message:`Owner accessed the In-person link for ${s}.`,date:new Date(e.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",e)}})),h.sort(((e,i)=>i.date.getTime()-e.date.getTime())),h}render(){var e,i,n,o,l,c,p,h,m,b,x,f,u,y,k,z,M,D,V,B,E;if(!this.store.state)return s(t,null);const L=d(this.endpoint.profile,this.store.state),S=this.prepareHistoryEntries(),H="pending"!==(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.status)&&"in progress"!==(null===(o=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===o?void 0:o.status);return s(t,{class:this.panelOpen?"open":""},s("div",{class:"side-buttons"},s("button",{class:1===this.activeTab?"active":"",onClick:()=>this.setTab(1),innerHTML:'<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>'}),s("button",{class:2===this.activeTab?"active":"",onClick:()=>this.setTab(2),innerHTML:'<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>'}),s("button",{class:3===this.activeTab?"active":"",onClick:()=>this.setTab(3),innerHTML:'<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>'})),1===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Details"),s("div",{class:"label"},"Envelope ID"),s("div",{class:"value"},null===(c=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===c?void 0:c.id),s("div",{class:"label"},"Date Created"),s("div",{class:"value"},g.format(new Date(null===(h=null===(p=this.store)||void 0===p?void 0:p.state)||void 0===h?void 0:h.created_at),v)),s("div",{class:"label"},"Last Modified"),s("div",{class:"value"},g.format(new Date(null===(b=null===(m=this.store)||void 0===m?void 0:m.state)||void 0===b?void 0:b.updated_at),v)),s("div",{class:"label"},"Status"),s("div",{class:"value"},r(null===(f=null===(x=this.store)||void 0===x?void 0:x.state)||void 0===f?void 0:f.status)),s("div",{class:"label"},"Verdoc Owner ID"),s("div",{class:"value"},null===(y=null===(u=this.store)||void 0===u?void 0:u.state)||void 0===y?void 0:y.profile_id),s("div",{class:"label"},"Verdoc Owner Name"),s("div",{class:"value"},a(null===(z=null===(k=this.store)||void 0===k?void 0:k.state)||void 0===z?void 0:z.profile)),s("div",{class:"label"},"Verdoc Owner Email"),s("div",{class:"value"},null===(V=null===(D=null===(M=this.store)||void 0===M?void 0:M.state)||void 0===D?void 0:D.profile)||void 0===V?void 0:V.email)),2===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Recipients"),null===(E=null===(B=this.store)||void 0===B?void 0:B.state)||void 0===E?void 0:E.recipients.map(((e,i)=>{const t="submitted"!==e.status&&"canceled"!==e.status&&"declined"!==e.status,n=this.canResendRecipient(e),o=a(e);return s("div",{class:"recipient-detail"},s("div",{class:"recipient-header"},s("div",{class:"recipient-number"},i+1),s("div",{class:"recipient-type"},e.role_name),s("div",{class:{"recipient-status":!0,[e.status]:!0}},e.status),L&&!H&&s("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!n},{id:"inperson",label:"Get In-Person Link",disabled:!t}]})),s("dic",{class:"recipient-content"},s("div",{class:"recipient-name"},o),s("div",{class:"recipient-name"},e.email),s("div",{class:"recipient-name"},e.phone)))})),L&&s("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:()=>this.showCancelDialog=!H,disabled:H})),3===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"History"),S.map((e=>s("div",{class:"history-entry"},s("div",{class:"activity-icon",innerHTML:w[e.icon]||e.icon}),s("div",{class:"activity-details"},s("div",{class:"activity-text"},e.message),s("div",{class:"activity-date"},g.format(e.date,v))))))),this.showRecipientDialog&&s("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:()=>this.showRecipientDialog=""}),this.showManageDialog&&s("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:!1,onAnother:()=>{var e;this.showManageDialog=!1,null===(e=this.another)||void 0===e||e.emit({envelope:this.store.state})},onNext:()=>this.showManageDialog=!1}),this.showCancelDialog&&s("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:()=>{this.showCancelDialog=!1,this.cancelEnvelope()}}))}};m.style='@-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;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;place-content:center space-between;-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;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 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}';export{m as verdocs_envelope_sidebar}
|
1
|
+
import{r as e,c as i,h as s,H as t}from"./p-5207d80c.js";import{VerdocsEndpoint as n,resendInvitation as o,cancelEnvelope as l,formatFullName as a,userIsEnvelopeOwner as d,capitalize as r}from"@verdocs/js-sdk";import{g as c}from"./p-ed199c97.js";import{F as v}from"./p-c7ee88c7.js";import{V as p}from"./p-04c07b7b.js";import{S as h}from"./p-fd97809c.js";import{d as g}from"./p-edaec1b6.js";import"./p-83317d11.js";import"./p-a706bac9.js";const w={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>'},m=class{constructor(s){e(this,s),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.toggle=i(this,"toggle",7),this.another=i(this,"another",7),this.store=null,this.endpoint=n.getDefault(),this.envelopeId="",this.activeTab=1,this.panelOpen=!1,this.showManageDialog=!1,this.showRecipientDialog="",this.showCancelDialog=!1,this.loading=!0}async componentWillLoad(){var e,i,s;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[SIDEBAR] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[SIDEBAR] Unable to start session, must be authenticated");this.store=await c(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1}catch(t){console.log("[SIDEBAR] Error loading envelope",t),null===(e=this.sdkError)||void 0===e||e.emit(new h(t.message,null===(i=t.response)||void 0===i?void 0:i.status,null===(s=t.response)||void 0===s?void 0:s.data))}}sortEnvelopeRecipients(){var e,i;null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i||i.recipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}setTab(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen,null===(i=this.toggle)||void 0===i||i.emit({open:this.panelOpen}),this.activeTab=e}canResendRecipient(e){var i,s;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.status)}handleRecipientAction(e,i){var s,t;switch(console.log("[SIDEBAR] Recipient action",i,e),i){case"reminder":o(this.endpoint,this.envelopeId,e.role_name).then((()=>{p("Reminder Sent",{style:"success"})})).catch((e=>{console.log("[SIDEBAR] Error resending invitation",e),p("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":case"details":p("This feature will be enabled in a future release. Please try again later.",{style:"info"})}null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:null===(t=this.store)||void 0===t?void 0:t.state,event:i})}cancelEnvelope(){this.loading=!0,l(this.endpoint,this.envelopeId).then((async e=>{var i,s;console.log("[SIDEBAR] Envelope canceled",e),p("Envelope canceled",{style:"success"}),this.store=await c(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:null===(s=this.store)||void 0===s?void 0:s.state,event:"canceled"})})).catch((e=>{console.log("[SIDEBAR] Error canceling envelope",e),this.loading=!1,p("Error canceling envelope: "+e.message,{style:"error"})}))}prepareHistoryEntries(){var e,i,s,t,n,o,l,d,r,c,v,p;const h=[],g=(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.history_entries)||[];h.push({icon:"pencil",message:"Envelope created.",date:new Date(null===(t=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===t?void 0:t.created_at)}),"complete"===(null===(o=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===o?void 0:o.status)&&h.push({icon:"pencil",message:"Envelope completed.",date:new Date(null===(d=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===d?void 0:d.updated_at)});const w=g.some((e=>"owner:canceled"===e.event));return"canceled"!==(null===(c=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===c?void 0:c.status)||w||h.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(null===(p=null===(v=this.store)||void 0===v?void 0:v.state)||void 0===p?void 0:p.canceled_at)}),g.forEach((e=>{var i;const s=null===(i=this.store.state)||void 0===i?void 0:i.recipients.find((i=>i.role_name===e.role_name)),t=a(s);switch(e.event.toLowerCase()){case"recipient:signed":h.push({icon:"gesture",message:`Signed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:declined":h.push({icon:"clear",message:`Declined by ${t}.`,date:new Date(e.created_at)});break;case"recipient:opened":switch(e.event_detail){case"email":case"mail":h.push({icon:"visibility",message:`Opened by ${t}, via email.`,date:new Date(e.created_at)});break;case"sms":h.push({icon:"visibility",message:`Opened by ${t}, via SMS.`,date:new Date(e.created_at)});break;case"in_person_link":h.push({icon:"visibility",message:`Opened by ${t}, via In-person link.`,date:new Date(e.created_at)});break;case"in_app":h.push({icon:"visibility",message:`Opened by ${t}, via dashboard.`,date:new Date(e.created_at)});break;default:h.push({icon:"visibility",message:`Opened by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:submitted":h.push("approver"===e.event_detail?{icon:"check_circle",message:`Approved by ${t}.`,date:new Date(e.created_at)}:{icon:"send",message:`Submitted by ${t}.`,date:new Date(e.created_at)});break;case"recipient:prepared":h.push({icon:"send",message:`Prepared by ${t}.`,date:new Date(e.created_at)});break;case"recipient:claimed":"guest"===e.event_detail?h.push({icon:"account_circle",message:`${t} claimed the Verdoc as a guest.`,date:new Date(e.created_at)}):"profile"===e.event_detail&&h.push({icon:"verified_user",message:`${t} claimed the Verdoc as a verified user.`,date:new Date(e.created_at)});break;case"recipient:agreed":h.push({icon:"done",message:`${t} agreed to use electronic records and signatures.`,date:new Date(e.created_at)});break;case"recipient:invited":h.push("sms"===e.event_detail?{icon:"textsms",message:`${t} has been invited via SMS.`,date:new Date(e.created_at)}:{icon:"mail",message:`${t} has been invited via email.`,date:new Date(e.created_at)});break;case"recipient:reminder":h.push("sms"===e.event_detail?{icon:"textsms",message:`${t} sent a reminder via SMS.`,date:new Date(e.created_at)}:{icon:"mail",message:`${t} sent a reminder via email.`,date:new Date(e.created_at)});break;case"invitation:resent":h.push({icon:"mail",message:`Invitation was resent to ${t} ${"reminder"===e.event_detail?" by reminder":""}.`,date:new Date(e.created_at)});break;case"envelope:cc":h.push({icon:"contact_mail",message:`A copy has been sent to ${t}.`,date:new Date(e.created_at)});break;case"recipient:delegated":h.push({icon:"people",message:e.event_detail,date:new Date(e.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":h.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"created":h.push({icon:"create",message:"Envelope was created.",date:new Date(e.created_at)});break;case"completed":h.push({icon:"done_all",message:"Envelope was completed.",date:new Date(e.created_at)});break;case"envelope_canceled":case"canceled":case"owner:canceled":h.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(e.created_at)});break;case"owner:get_in_person_link":h.push({icon:"link",message:`Owner accessed the In-person link for ${s}.`,date:new Date(e.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",e)}})),h.sort(((e,i)=>i.date.getTime()-e.date.getTime())),h}render(){var e,i,n,o,l,c,p,h,m,b,x,f,u,y,k,z,M,D,V,B,E;if(!this.store.state)return s(t,null);const L=d(this.endpoint.profile,this.store.state),S=this.prepareHistoryEntries(),H="pending"!==(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.status)&&"in progress"!==(null===(o=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===o?void 0:o.status);return s(t,{class:this.panelOpen?"open":""},s("div",{class:"side-buttons"},s("button",{class:1===this.activeTab?"active":"",onClick:()=>this.setTab(1),innerHTML:'<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>'}),s("button",{class:2===this.activeTab?"active":"",onClick:()=>this.setTab(2),innerHTML:'<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>'}),s("button",{class:3===this.activeTab?"active":"",onClick:()=>this.setTab(3),innerHTML:'<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>'})),1===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Details"),s("div",{class:"label"},"Envelope ID"),s("div",{class:"value"},null===(c=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===c?void 0:c.id),s("div",{class:"label"},"Date Created"),s("div",{class:"value"},g.format(new Date(null===(h=null===(p=this.store)||void 0===p?void 0:p.state)||void 0===h?void 0:h.created_at),v)),s("div",{class:"label"},"Last Modified"),s("div",{class:"value"},g.format(new Date(null===(b=null===(m=this.store)||void 0===m?void 0:m.state)||void 0===b?void 0:b.updated_at),v)),s("div",{class:"label"},"Status"),s("div",{class:"value"},r(null===(f=null===(x=this.store)||void 0===x?void 0:x.state)||void 0===f?void 0:f.status)),s("div",{class:"label"},"Verdoc Owner ID"),s("div",{class:"value"},null===(y=null===(u=this.store)||void 0===u?void 0:u.state)||void 0===y?void 0:y.profile_id),s("div",{class:"label"},"Verdoc Owner Name"),s("div",{class:"value"},a(null===(z=null===(k=this.store)||void 0===k?void 0:k.state)||void 0===z?void 0:z.profile)),s("div",{class:"label"},"Verdoc Owner Email"),s("div",{class:"value"},null===(V=null===(D=null===(M=this.store)||void 0===M?void 0:M.state)||void 0===D?void 0:D.profile)||void 0===V?void 0:V.email)),2===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Recipients"),null===(E=null===(B=this.store)||void 0===B?void 0:B.state)||void 0===E?void 0:E.recipients.map(((e,i)=>{const t="submitted"!==e.status&&"canceled"!==e.status&&"declined"!==e.status,n=this.canResendRecipient(e),o=a(e);return s("div",{class:"recipient-detail"},s("div",{class:"recipient-header"},s("div",{class:"recipient-number"},i+1),s("div",{class:"recipient-type"},e.role_name),s("div",{class:{"recipient-status":!0,[e.status]:!0}},e.status),L&&!H&&s("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!n},{id:"inperson",label:"Get In-Person Link",disabled:!t}]})),s("dic",{class:"recipient-content"},s("div",{class:"recipient-name"},o),s("div",{class:"recipient-name"},e.email),s("div",{class:"recipient-name"},e.phone)))})),L&&s("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:()=>this.showCancelDialog=!H,disabled:H})),3===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"History"),S.map((e=>s("div",{class:"history-entry"},s("div",{class:"activity-icon",innerHTML:w[e.icon]||e.icon}),s("div",{class:"activity-details"},s("div",{class:"activity-text"},e.message),s("div",{class:"activity-date"},g.format(e.date,v))))))),this.showRecipientDialog&&s("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:()=>this.showRecipientDialog=""}),this.showManageDialog&&s("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:!1,onAnother:()=>{var e;this.showManageDialog=!1,null===(e=this.another)||void 0===e||e.emit({envelope:this.store.state})},onNext:()=>this.showManageDialog=!1}),this.showCancelDialog&&s("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:()=>{this.showCancelDialog=!1,this.cancelEnvelope()}}))}};m.style='@-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;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;place-content:center space-between;-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;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 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}';export{m as verdocs_envelope_sidebar}
|