@verdocs/web-sdk 2.3.70 → 2.3.72
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/{TemplateStore-89072ea0.js → TemplateStore-ae59084b.js} +1 -1
- package/dist/cjs/{VerdocsEndpoint-8f298664.js → VerdocsEndpoint-f4ef9333.js} +5 -2
- package/dist/cjs/ipc-test.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_15.cjs.entry.js +6 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_8.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +5 -4
- package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.js +4 -0
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +1 -1
- package/dist/components/VerdocsEndpoint.js +5 -2
- package/dist/components/verdocs-field-textbox2.js +5 -4
- package/dist/components/verdocs-template-document-page2.js +4 -0
- package/dist/components/verdocs-template-fields2.js +1 -1
- package/dist/custom-elements.json +2143 -0
- package/dist/docs.json +5 -5
- package/dist/esm/{TemplateStore-7fba801e.js → TemplateStore-99bf97f0.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-56fa3371.js → VerdocsEndpoint-eab308f6.js} +5 -2
- package/dist/esm/ipc-test.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-activity-box.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-checkbox_5.entry.js +2 -2
- package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_15.entry.js +6 -1
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-preview_8.entry.js +2 -2
- package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm/verdocs-settings.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +3 -3
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{TemplateStore-7fba801e.js → TemplateStore-99bf97f0.js} +1 -1
- package/dist/esm-es5/VerdocsEndpoint-eab308f6.js +1 -0
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- 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_15.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.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/templates/verdocs-template-document-page/verdocs-template-document-page.d.ts +1 -0
- package/dist/verdocs-web-sdk/{p-cf703fe4.entry.js → p-06618569.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d7f90328.system.entry.js → p-0b0cc39b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ea80fcea.entry.js → p-0e4f5403.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-10310263.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-db5de7e8.entry.js → p-159aeaf2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-80e69a68.entry.js → p-2d47c6af.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9fc06f7b.entry.js → p-332141f2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d1092a62.system.entry.js → p-356e4c15.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f2a169d8.entry.js → p-38ea0d20.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-26646a40.entry.js → p-3fa35da3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9d4a5fd8.entry.js → p-40f5b1c5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-47c63cc7.js → p-45ecd6eb.js} +1 -1
- package/dist/verdocs-web-sdk/{p-116f7900.entry.js → p-501d9168.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0abf0058.system.entry.js → p-58e85310.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9054234f.entry.js → p-5ddc43f4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4861684b.entry.js → p-6a93295c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-17598002.system.entry.js → p-7519fe6e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-17bf98f2.system.entry.js → p-77c145b3.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b6231fd3.system.entry.js → p-7b3dfc4b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4d98f194.system.entry.js → p-7e5a1766.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-508808d2.entry.js → p-84679597.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d0a09719.entry.js → p-8a7324b6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-997a4959.entry.js → p-90539070.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-151c33dd.system.entry.js → p-9a816526.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-77d3c570.entry.js → p-9d748d04.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e13b21ca.system.entry.js → p-a50982c8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c80237f9.entry.js → p-a7907ccf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9ceff040.system.entry.js → p-a9b80271.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8b0a5309.entry.js → p-ac042888.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-035a3ce2.entry.js → p-ac07d476.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5050f8a2.system.entry.js → p-b0e0084b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-b252cfb6.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-637187de.entry.js → p-b8063124.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-72f22ee9.system.entry.js → p-baf16d17.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a16eba51.system.entry.js → p-bea26fb0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-00e8cfa6.system.entry.js → p-bf8e6ba1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c118d024.system.entry.js → p-c5fd0435.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d39e4a26.system.entry.js → p-c73e78c8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-cff87d52.system.js → p-d0d9ac6d.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ea96b41e.entry.js → p-d315d7ca.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bb2ff79c.entry.js → p-d53aec0f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e04d8f5d.js +1 -0
- package/dist/verdocs-web-sdk/{p-e311d75f.system.entry.js → p-e0e99a5d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6384f444.system.entry.js → p-e3623a0c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d0bbe952.system.entry.js → p-e4b14b93.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-04ac4336.system.entry.js → p-f0dfd635.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f246348c.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-3995b09b.system.entry.js → p-f3947f39.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/VerdocsEndpoint-56fa3371.js +0 -1
- package/dist/verdocs-web-sdk/p-035f6b38.js +0 -1
- package/dist/verdocs-web-sdk/p-358ce165.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3efa7c26.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9bf2d124.system.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-9bf2d124.system.js","./p-cd20fb77.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js"],(function(e){"use strict";var t,i,n,s,o,a,l,r;return{setters:[function(e){t=e.r;i=e.c;n=e.h},function(e){s=e.d},function(e){o=e.V},function(e){a=e.c},function(e){l=e.V},function(e){r=e.S}],execute:function(){var u=function(e,t){return e.api.post("/authentication/login",t).then((function(e){return e.data}))};var c=function(e,t){return e.api.post("/user/reset_password",t).then((function(e){return e.data}))};var d=function(e,t){return e.api.post("/user/email_verification",{},t?{headers:{Authorization:"Bearer ".concat(t)}}:{}).then((function(e){return e.data}))};var h='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth h4 verdocs-button button.normal .button-label{padding:0}verdocs-auth .buttons{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}';var p=5e3;var f=[{value:"",label:""},{value:"Accounting & Tax",label:"Accounting & Tax"},{value:"Business Services / Consulting",label:"Business Services / Consulting"},{value:"Construction",label:"Construction"},{value:"Education",label:"Education"},{value:"Financial Services",label:"Financial Services"},{value:"Government",label:"Government"},{value:"Healthcare - Health Plans & Payers",label:"Healthcare - Health Plans & Payers"},{value:"Healthcare - Providers",label:"Healthcare - Providers"},{value:"Insurance",label:"Insurance"},{value:"Legal",label:"Legal"},{value:"Life Sciences",label:"Life Sciences"},{value:"Manufacturing",label:"Manufacturing"},{value:"Mortgage",label:"Mortgage"},{value:"Not For Profit",label:"Not For Profit"},{value:"Real Estate - Commercial",label:"Real Estate - Commercial"},{value:"Real Estate - Residential",label:"Real Estate - Residential"},{value:"Retail",label:"Retail"},{value:"Technology",label:"Technology"},{value:"Other",label:"Other"}];var m=[{value:"",label:""},{value:"I want to send a document for signature.",label:"I want to send a document for signature."},{value:"I just need to sign a document today.",label:"I just need to sign a document today."},{value:"I'm evaluating it for my business.",label:"I'm evaluating it for my business."},{value:"I'm evaluating it for my personal use.",label:"I'm evaluating it for my personal use."},{value:"I'm a developer building an integration.",label:"I'm a developer building an integration."}];var g=[{value:"",label:""},{value:"Solo",label:"Solo"},{value:"2-10",label:"2-10"},{value:"11-50",label:"11-50"},{value:"51-200",label:"51-200"},{value:"201-500",label:"201-500"},{value:"501-1000",label:"501-1000"},{value:"1000+",label:"1000+"}];var v=e("verdocs_auth",function(){function e(e){t(this,e);this.authenticated=i(this,"authenticated",7);this.sdkError=i(this,"sdkError",7);this.recheckTimer=null;this.resendDisabledTimer=null;this.accessTokenForVerification=null;this.endpoint=o.getDefault();this.visible=true;this.logo="https://app.verdocs.com/assets/blue-logo.svg";this.isAuthenticated=false;this.displayMode="login";this.orgname="";this.first="";this.last="";this.username="";this.phone="";this.password="";this.submitting=false;this.activeSession=null;this.accountType="org";this.howHear="";this.industry="";this.companySize="";this.reason="";this.signupStep=1;this.resendDisabled=false;this.checkingOrg=false}e.prototype.componentWillLoad=function(){var e,t;this.endpoint.loadSession();if(this.endpoint.session){console.log("[AUTH] Authenticated");this.isAuthenticated=true;this.activeSession=this.endpoint.session;(e=this.authenticated)===null||e===void 0?void 0:e.emit({authenticated:true,session:this.endpoint.session})}else{console.log("[AUTH] Anonymous");(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:false,session:null})}};e.prototype.disconnectedCallback=function(){this.cancelRecheckTimer()};e.prototype.cancelRecheckTimer=function(){if(this.recheckTimer){try{clearTimeout(this.recheckTimer)}catch(e){}this.recheckTimer=null}if(this.resendDisabledTimer){try{clearTimeout(this.resendDisabledTimer)}catch(e){}this.resendDisabledTimer=null}};e.prototype.handleSignup=function(){var e=this;this.submitting=true;this.accessTokenForVerification=null;a(this.endpoint,{email:this.username,password:this.password,firstName:this.first,lastName:this.last,orgName:this.orgname}).then((function(t){console.log("Result",t);console.log("[AUTH] Created profile",t.profile);console.log("[AUTH] Created organization",t.organization);e.loginAndCheckVerification()})).catch((function(t){var i,n,s,o,a;console.log("[AUTH] Signup error",t.response,JSON.stringify(t));e.submitting=false;e.activeSession=null;(i=e.authenticated)===null||i===void 0?void 0:i.emit({authenticated:false,session:null});(n=e.sdkError)===null||n===void 0?void 0:n.emit(new r(t.message,(s=t.response)===null||s===void 0?void 0:s.status,(o=t.response)===null||o===void 0?void 0:o.data));l("Signup failed: "+((a=t.response)===null||a===void 0?void 0:a.data),{style:"error"})}))};e.prototype.loginAndCheckVerification=function(){var e=this;this.submitting=true;this.accessTokenForVerification=null;u(this.endpoint,{username:this.username,password:this.password}).then((function(t){var i;e.cancelRecheckTimer();e.submitting=false;var n=s(t.accessToken);console.log("[AUTH] Got access token body",n);if(n===null||n===void 0?void 0:n.email_verified){console.log("[AUTH] Email address is verified, completing login");e.displayMode="login";e.accessTokenForVerification=null;e.endpoint.setToken(t.accessToken);e.activeSession=e.endpoint.session;e.isAuthenticated=true;(i=e.authenticated)===null||i===void 0?void 0:i.emit({authenticated:true,session:e.endpoint.session})}else{console.log("[AUTH] Logged in, pending email address verification");e.displayMode="verify";e.accessTokenForVerification=t.accessToken;e.recheckTimer=setTimeout((function(){return e.loginAndCheckVerification()}),p)}})).catch((function(t){var i,n,s,o;e.cancelRecheckTimer();console.log("[AUTH] Authentication error",t.response,JSON.stringify(t));e.displayMode="login";e.submitting=false;e.activeSession=null;(i=e.authenticated)===null||i===void 0?void 0:i.emit({authenticated:false,session:null});(n=e.sdkError)===null||n===void 0?void 0:n.emit(new r(t.message,(s=t.response)===null||s===void 0?void 0:s.status,(o=t.response)===null||o===void 0?void 0:o.data));l("Login failed. Please check your username and password and try again.",{style:"error"})}))};e.prototype.handleLogout=function(){var e;this.endpoint.clearSession();this.isAuthenticated=false;this.accessTokenForVerification=null;(e=this.authenticated)===null||e===void 0?void 0:e.emit({authenticated:false,session:null})};e.prototype.handleResend=function(){var e=this;this.resendDisabled=true;this.resendDisabledTimer=setTimeout((function(){e.resendDisabled=false;e.resendDisabledTimer=null}),3e4);d(this.endpoint,this.accessTokenForVerification).then((function(e){console.log("[AUTH] Verification request resent",e);l("Please check your email for a message with verification instructions.",{style:"info"})})).catch((function(e){console.log("[AUTH] Unable to resend verification",e)}))};e.prototype.handleReset=function(){var e=this;this.submitting=true;c(this.endpoint,{email:this.username}).then((function(t){console.log("[AUTH] Reset sent",t);e.submitting=false;e.displayMode="login";l("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"})})).catch((function(t){console.log("[AUTH] Unable to reset password",t);e.submitting=false}))};e.prototype.render=function(){var e=this;if(!this.visible){return n("div",{style:{display:"none"}},"Authenticated")}if(this.isAuthenticated){return n("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:function(){return e.handleLogout()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})}if(this.displayMode==="signup"){var t=this.submitting||!this.first||!this.last||!this.username||!this.password||!this.orgname;return n("div",{class:"form"},n("a",{href:"https://verdocs.com/en/"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),n("h3",null,"Sign up for a trial account"),n("h4",null,"Already have an account?",n("verdocs-button",{label:"Log In",variant:"text",onClick:function(){return e.displayMode="login"},disabled:this.submitting})),this.signupStep===1&&n("form",{onSubmit:function(){return e.handleSignup()}},n("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},n("verdocs-text-input",{label:"First Name",autocomplete:"first",required:true,value:this.first,onInput:function(t){return e.first=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:true,value:this.last,onInput:function(t){return e.last=t.target.value},disabled:this.submitting})),n("verdocs-text-input",{label:"Email",autocomplete:"email",required:true,value:this.username,onInput:function(t){return e.username=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Phone #",autocomplete:"phone",value:this.phone,onInput:function(t){return e.phone=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Password",type:"password",required:true,autocomplete:"current-password",value:this.password,onInput:function(t){return e.password=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:true,value:this.orgname,onInput:function(t){return e.orgname=t.target.value},disabled:this.submitting,style:{flex:"1"}}),n("div",{style:{marginTop:"30px"}}),n("verdocs-button",{label:"Next",disabled:t,onClick:function(){return e.signupStep=2},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),this.signupStep===2&&n("form",{onSubmit:function(){return e.handleSignup()}},n("verdocs-text-input",{label:"How did you hear about Verdocs?",value:this.howHear,onInput:function(t){return e.howHear=t.target.value},disabled:this.submitting}),n("verdocs-select-input",{label:"Your Industry",options:f,value:this.industry,onInput:function(t){return e.industry=t.target.value},disabled:this.submitting}),n("verdocs-select-input",{label:"Company Size",options:g,value:this.companySize,onInput:function(t){return e.companySize=t.target.value},disabled:this.submitting}),n("verdocs-select-input",{label:"Purpose",options:m,value:this.reason,onInput:function(t){return e.reason=t.target.value},disabled:this.submitting}),n("div",{style:{marginTop:"30px"}}),n("verdocs-button",{label:"Create Account",disabled:this.submitting,onClick:function(){return e.handleSignup()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),this.signupStep===3&&n("form",{onSubmit:function(){return e.handleSignup()}},n("p",null,"Please check your e-mail inbox for a verification code and follow the instructions provided."),n("p",null,n("em",null,"Verification messages may take up to 1 hour to arrive. If you do not receive the invitation, ",n("a",{href:"#"},"Click Here")," to resend it. Be sure to check your spam folder.")),n("div",{style:{display:"flex",flexDirection:"row",gap:"20px"}},n("verdocs-button",{label:"Back",disabled:this.submitting,onClick:function(){e.signupStep=2},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}),n("verdocs-button",{label:"Go to Dashboard",disabled:true,onClick:function(){return e.handleSignup()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}))))}if(this.displayMode==="forgot"){return n("div",{class:"form"},n("a",{href:"https://verdocs.com/en/"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),n("h3",null,"Forgot your password?"),n("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox."),n("p",null,n("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),n("form",{onSubmit:function(){return e.handleSignup()}},n("verdocs-text-input",{label:"Email",autocomplete:"email",required:true,value:this.username,onInput:function(t){return e.username=t.target.value},disabled:this.submitting}),n("div",{style:{marginTop:"30px"}}),n("div",{class:"buttons"},n("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:function(){return e.displayMode="login"}}),n("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:function(){return e.handleReset()}}))))}if(this.displayMode==="verify"){return n("div",{class:"form"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),n("h3",null,"Please Verify your Email Address"),n("p",null,"Check your e-mail inbox for a verification email, and follow the instructions provided."),n("p",null,n("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),n("div",{class:"buttons"},n("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:function(){e.username="";e.password="";e.cancelRecheckTimer();e.displayMode="login"}}),n("verdocs-button",{label:"Resend Email",disabled:this.resendDisabled,onClick:function(){return e.handleResend()}})))}return n("div",{class:"form"},n("a",{href:"https://verdocs.com/en/"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),n("h3",null,"Log in to your account"),n("h4",null,"Don't have an account?",n("verdocs-button",{label:"Sign Up",variant:"text",onClick:function(){e.displayMode="signup";e.signupStep=1},disabled:this.submitting})),n("form",{onSubmit:function(){return e.loginAndCheckVerification()}},n("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:function(t){return e.username=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:function(t){return e.password=t.target.value},disabled:this.submitting}),n("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:function(){return e.displayMode="forgot"},disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),n("verdocs-button",{label:"Login",disabled:this.submitting,onClick:function(){return e.loginAndCheckVerification()},style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))};return e}());v.style=h}}}));
|
1
|
+
System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-f246348c.system.js","./p-cd20fb77.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js"],(function(e){"use strict";var t,i,n,s,o,a,l,r;return{setters:[function(e){t=e.r;i=e.c;n=e.h},function(e){s=e.d},function(e){o=e.V},function(e){a=e.c},function(e){l=e.V},function(e){r=e.S}],execute:function(){var u=function(e,t){return e.api.post("/authentication/login",t).then((function(e){return e.data}))};var c=function(e,t){return e.api.post("/user/reset_password",t).then((function(e){return e.data}))};var d=function(e,t){return e.api.post("/user/email_verification",{},t?{headers:{Authorization:"Bearer ".concat(t)}}:{}).then((function(e){return e.data}))};var h='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth h4 verdocs-button button.normal .button-label{padding:0}verdocs-auth .buttons{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}';var p=5e3;var f=[{value:"",label:""},{value:"Accounting & Tax",label:"Accounting & Tax"},{value:"Business Services / Consulting",label:"Business Services / Consulting"},{value:"Construction",label:"Construction"},{value:"Education",label:"Education"},{value:"Financial Services",label:"Financial Services"},{value:"Government",label:"Government"},{value:"Healthcare - Health Plans & Payers",label:"Healthcare - Health Plans & Payers"},{value:"Healthcare - Providers",label:"Healthcare - Providers"},{value:"Insurance",label:"Insurance"},{value:"Legal",label:"Legal"},{value:"Life Sciences",label:"Life Sciences"},{value:"Manufacturing",label:"Manufacturing"},{value:"Mortgage",label:"Mortgage"},{value:"Not For Profit",label:"Not For Profit"},{value:"Real Estate - Commercial",label:"Real Estate - Commercial"},{value:"Real Estate - Residential",label:"Real Estate - Residential"},{value:"Retail",label:"Retail"},{value:"Technology",label:"Technology"},{value:"Other",label:"Other"}];var m=[{value:"",label:""},{value:"I want to send a document for signature.",label:"I want to send a document for signature."},{value:"I just need to sign a document today.",label:"I just need to sign a document today."},{value:"I'm evaluating it for my business.",label:"I'm evaluating it for my business."},{value:"I'm evaluating it for my personal use.",label:"I'm evaluating it for my personal use."},{value:"I'm a developer building an integration.",label:"I'm a developer building an integration."}];var g=[{value:"",label:""},{value:"Solo",label:"Solo"},{value:"2-10",label:"2-10"},{value:"11-50",label:"11-50"},{value:"51-200",label:"51-200"},{value:"201-500",label:"201-500"},{value:"501-1000",label:"501-1000"},{value:"1000+",label:"1000+"}];var v=e("verdocs_auth",function(){function e(e){t(this,e);this.authenticated=i(this,"authenticated",7);this.sdkError=i(this,"sdkError",7);this.recheckTimer=null;this.resendDisabledTimer=null;this.accessTokenForVerification=null;this.endpoint=o.getDefault();this.visible=true;this.logo="https://app.verdocs.com/assets/blue-logo.svg";this.isAuthenticated=false;this.displayMode="login";this.orgname="";this.first="";this.last="";this.username="";this.phone="";this.password="";this.submitting=false;this.activeSession=null;this.accountType="org";this.howHear="";this.industry="";this.companySize="";this.reason="";this.signupStep=1;this.resendDisabled=false;this.checkingOrg=false}e.prototype.componentWillLoad=function(){var e,t;this.endpoint.loadSession();if(this.endpoint.session){console.log("[AUTH] Authenticated");this.isAuthenticated=true;this.activeSession=this.endpoint.session;(e=this.authenticated)===null||e===void 0?void 0:e.emit({authenticated:true,session:this.endpoint.session})}else{console.log("[AUTH] Anonymous");(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:false,session:null})}};e.prototype.disconnectedCallback=function(){this.cancelRecheckTimer()};e.prototype.cancelRecheckTimer=function(){if(this.recheckTimer){try{clearTimeout(this.recheckTimer)}catch(e){}this.recheckTimer=null}if(this.resendDisabledTimer){try{clearTimeout(this.resendDisabledTimer)}catch(e){}this.resendDisabledTimer=null}};e.prototype.handleSignup=function(){var e=this;this.submitting=true;this.accessTokenForVerification=null;a(this.endpoint,{email:this.username,password:this.password,firstName:this.first,lastName:this.last,orgName:this.orgname}).then((function(t){console.log("Result",t);console.log("[AUTH] Created profile",t.profile);console.log("[AUTH] Created organization",t.organization);e.loginAndCheckVerification()})).catch((function(t){var i,n,s,o,a;console.log("[AUTH] Signup error",t.response,JSON.stringify(t));e.submitting=false;e.activeSession=null;(i=e.authenticated)===null||i===void 0?void 0:i.emit({authenticated:false,session:null});(n=e.sdkError)===null||n===void 0?void 0:n.emit(new r(t.message,(s=t.response)===null||s===void 0?void 0:s.status,(o=t.response)===null||o===void 0?void 0:o.data));l("Signup failed: "+((a=t.response)===null||a===void 0?void 0:a.data),{style:"error"})}))};e.prototype.loginAndCheckVerification=function(){var e=this;this.submitting=true;this.accessTokenForVerification=null;u(this.endpoint,{username:this.username,password:this.password}).then((function(t){var i;e.cancelRecheckTimer();e.submitting=false;var n=s(t.accessToken);console.log("[AUTH] Got access token body",n);if(n===null||n===void 0?void 0:n.email_verified){console.log("[AUTH] Email address is verified, completing login");e.displayMode="login";e.accessTokenForVerification=null;e.endpoint.setToken(t.accessToken);e.activeSession=e.endpoint.session;e.isAuthenticated=true;(i=e.authenticated)===null||i===void 0?void 0:i.emit({authenticated:true,session:e.endpoint.session})}else{console.log("[AUTH] Logged in, pending email address verification");e.displayMode="verify";e.accessTokenForVerification=t.accessToken;e.recheckTimer=setTimeout((function(){return e.loginAndCheckVerification()}),p)}})).catch((function(t){var i,n,s,o;e.cancelRecheckTimer();console.log("[AUTH] Authentication error",t.response,JSON.stringify(t));e.displayMode="login";e.submitting=false;e.activeSession=null;(i=e.authenticated)===null||i===void 0?void 0:i.emit({authenticated:false,session:null});(n=e.sdkError)===null||n===void 0?void 0:n.emit(new r(t.message,(s=t.response)===null||s===void 0?void 0:s.status,(o=t.response)===null||o===void 0?void 0:o.data));l("Login failed. Please check your username and password and try again.",{style:"error"})}))};e.prototype.handleLogout=function(){var e;this.endpoint.clearSession();this.isAuthenticated=false;this.accessTokenForVerification=null;(e=this.authenticated)===null||e===void 0?void 0:e.emit({authenticated:false,session:null})};e.prototype.handleResend=function(){var e=this;this.resendDisabled=true;this.resendDisabledTimer=setTimeout((function(){e.resendDisabled=false;e.resendDisabledTimer=null}),3e4);d(this.endpoint,this.accessTokenForVerification).then((function(e){console.log("[AUTH] Verification request resent",e);l("Please check your email for a message with verification instructions.",{style:"info"})})).catch((function(e){console.log("[AUTH] Unable to resend verification",e)}))};e.prototype.handleReset=function(){var e=this;this.submitting=true;c(this.endpoint,{email:this.username}).then((function(t){console.log("[AUTH] Reset sent",t);e.submitting=false;e.displayMode="login";l("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"})})).catch((function(t){console.log("[AUTH] Unable to reset password",t);e.submitting=false}))};e.prototype.render=function(){var e=this;if(!this.visible){return n("div",{style:{display:"none"}},"Authenticated")}if(this.isAuthenticated){return n("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:function(){return e.handleLogout()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})}if(this.displayMode==="signup"){var t=this.submitting||!this.first||!this.last||!this.username||!this.password||!this.orgname;return n("div",{class:"form"},n("a",{href:"https://verdocs.com/en/"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),n("h3",null,"Sign up for a trial account"),n("h4",null,"Already have an account?",n("verdocs-button",{label:"Log In",variant:"text",onClick:function(){return e.displayMode="login"},disabled:this.submitting})),this.signupStep===1&&n("form",{onSubmit:function(){return e.handleSignup()}},n("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},n("verdocs-text-input",{label:"First Name",autocomplete:"first",required:true,value:this.first,onInput:function(t){return e.first=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:true,value:this.last,onInput:function(t){return e.last=t.target.value},disabled:this.submitting})),n("verdocs-text-input",{label:"Email",autocomplete:"email",required:true,value:this.username,onInput:function(t){return e.username=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Phone #",autocomplete:"phone",value:this.phone,onInput:function(t){return e.phone=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Password",type:"password",required:true,autocomplete:"current-password",value:this.password,onInput:function(t){return e.password=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:true,value:this.orgname,onInput:function(t){return e.orgname=t.target.value},disabled:this.submitting,style:{flex:"1"}}),n("div",{style:{marginTop:"30px"}}),n("verdocs-button",{label:"Next",disabled:t,onClick:function(){return e.signupStep=2},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),this.signupStep===2&&n("form",{onSubmit:function(){return e.handleSignup()}},n("verdocs-text-input",{label:"How did you hear about Verdocs?",value:this.howHear,onInput:function(t){return e.howHear=t.target.value},disabled:this.submitting}),n("verdocs-select-input",{label:"Your Industry",options:f,value:this.industry,onInput:function(t){return e.industry=t.target.value},disabled:this.submitting}),n("verdocs-select-input",{label:"Company Size",options:g,value:this.companySize,onInput:function(t){return e.companySize=t.target.value},disabled:this.submitting}),n("verdocs-select-input",{label:"Purpose",options:m,value:this.reason,onInput:function(t){return e.reason=t.target.value},disabled:this.submitting}),n("div",{style:{marginTop:"30px"}}),n("verdocs-button",{label:"Create Account",disabled:this.submitting,onClick:function(){return e.handleSignup()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})),this.signupStep===3&&n("form",{onSubmit:function(){return e.handleSignup()}},n("p",null,"Please check your e-mail inbox for a verification code and follow the instructions provided."),n("p",null,n("em",null,"Verification messages may take up to 1 hour to arrive. If you do not receive the invitation, ",n("a",{href:"#"},"Click Here")," to resend it. Be sure to check your spam folder.")),n("div",{style:{display:"flex",flexDirection:"row",gap:"20px"}},n("verdocs-button",{label:"Back",disabled:this.submitting,onClick:function(){e.signupStep=2},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}),n("verdocs-button",{label:"Go to Dashboard",disabled:true,onClick:function(){return e.handleSignup()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}))))}if(this.displayMode==="forgot"){return n("div",{class:"form"},n("a",{href:"https://verdocs.com/en/"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),n("h3",null,"Forgot your password?"),n("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox."),n("p",null,n("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),n("form",{onSubmit:function(){return e.handleSignup()}},n("verdocs-text-input",{label:"Email",autocomplete:"email",required:true,value:this.username,onInput:function(t){return e.username=t.target.value},disabled:this.submitting}),n("div",{style:{marginTop:"30px"}}),n("div",{class:"buttons"},n("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:function(){return e.displayMode="login"}}),n("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:function(){return e.handleReset()}}))))}if(this.displayMode==="verify"){return n("div",{class:"form"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),n("h3",null,"Please Verify your Email Address"),n("p",null,"Check your e-mail inbox for a verification email, and follow the instructions provided."),n("p",null,n("em",null,"Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")),n("div",{class:"buttons"},n("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:function(){e.username="";e.password="";e.cancelRecheckTimer();e.displayMode="login"}}),n("verdocs-button",{label:"Resend Email",disabled:this.resendDisabled,onClick:function(){return e.handleResend()}})))}return n("div",{class:"form"},n("a",{href:"https://verdocs.com/en/"},n("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),n("h3",null,"Log in to your account"),n("h4",null,"Don't have an account?",n("verdocs-button",{label:"Sign Up",variant:"text",onClick:function(){e.displayMode="signup";e.signupStep=1},disabled:this.submitting})),n("form",{onSubmit:function(){return e.loginAndCheckVerification()}},n("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:function(t){return e.username=t.target.value},disabled:this.submitting}),n("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:function(t){return e.password=t.target.value},disabled:this.submitting}),n("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:function(){return e.displayMode="forgot"},disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),n("verdocs-button",{label:"Login",disabled:this.submitting,onClick:function(){return e.loginAndCheckVerification()},style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))};return e}());v.style=h}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,s){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,l){function a(e){try{o(s.next(e))}catch(e){l(e)}}function r(e){try{o(s["throw"](e))}catch(e){l(e)}}function o(e){e.done?n(e.value):i(e.value).then(a,r)}o((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},s,i,l,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(e){return function(t){return o([e,t])}}function o(a){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,i&&(l=a[0]&2?i["return"]:a[0]?i["throw"]||((l=i["return"])&&l.call(i),0):i.next)&&!(l=l.call(i,a[1])).done)return l;if(i=0,l)a=[a[0]&2,l.value];switch(a[0]){case 0:case 1:l=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(l=n.trys,l=l.length>0&&l[l.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!l||a[1]>l[0]&&a[1]<l[3])){n.label=a[1];break}if(a[0]===6&&n.label<l[1]){n.label=l[1];l=a;break}if(l&&n.label<l[2]){n.label=l[2];n.ops.push(a);break}if(l[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];i=0}finally{s=l=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-9bf2d124.system.js","./p-3bcd86ea.system.js","./p-187b20b7.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,n,s,i,l,a,r,o,c,d,p,h;return{setters:[function(e){t=e.r;n=e.c;s=e.h;i=e.H},function(){},function(e){l=e.V;a=e.l;r=e.d;o=e.c;c=e.a},function(e){d=e.i},function(e){p=e.S},function(e){h=e.f}],execute:function(){var u='verdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';var m='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>';var v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>';var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>';var w='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>';var x='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>';var b='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>';var y=[{value:"all",label:"All"},{value:"personal",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];var z=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];var M=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];var S=e("verdocs_templates_list",function(){function e(e){var s=this;t(this,e);this.sdkError=n(this,"sdkError",7);this.viewTemplate=n(this,"viewTemplate",7);this.signNow=n(this,"signNow",7);this.submittedData=n(this,"submittedData",7);this.editTemplate=n(this,"editTemplate",7);this.templateDeleted=n(this,"templateDeleted",7);this.changeSort=n(this,"changeSort",7);this.changeSharing=n(this,"changeSharing",7);this.changeStarred=n(this,"changeStarred",7);this.changeName=n(this,"changeName",7);this.handleOptionSelected=function(e,t){var n,i,l,a;if(e==="send"){(n=s.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:s.endpoint,template:t})}else if(e==="signnow"){(i=s.signNow)===null||i===void 0?void 0:i.emit({endpoint:s.endpoint,template:t})}else if(e==="submitted"){(l=s.submittedData)===null||l===void 0?void 0:l.emit({endpoint:s.endpoint,template:t})}else if(e==="edit"){(a=s.editTemplate)===null||a===void 0?void 0:a.emit({endpoint:s.endpoint,template:t})}else if(e==="delete"){s.confirmDelete=t}};this.endpoint=l.getDefault();this.sharing="all";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter=""}e.prototype.handleSharingUpdated=function(){return this.queryTemplates()};e.prototype.handleStarredUpdated=function(){return this.queryTemplates()};e.prototype.handleSortUpdated=function(){return this.queryTemplates()};e.prototype.handleNameUpdated=function(){return this.queryTemplates()};e.prototype.handlePageUpdated=function(){return this.queryTemplates()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryTemplates()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryTemplates=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s,i,l;return __generator(this,(function(r){switch(r.label){case 0:console.log("[TEMPLATES] Querying templates");this.loading=true;r.label=1;case 1:r.trys.push([1,3,,4]);s={page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){s.q=this.name.trim()}return[4,a(this.endpoint,s)];case 2:i=r.sent();this.templates=i.templates;this.count=i.total;this.loading=false;return[3,4];case 3:l=r.sent();this.loading=false;console.log("[TEMPLATES] Error listing templates",l);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(l.message,(t=l.response)===null||t===void 0?void 0:t.status,(n=l.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.deleteTemplate=function(e){var t=this;this.confirmDelete=null;r(this.endpoint,e.id).then((function(){var n;console.log("[TEMPLATES] Deleted template",e);(n=t.templateDeleted)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,template:e});return t.queryTemplates()})).catch((function(n){var s,i,l;console.log("[TEMPLATES] Error deleting template",e);(s=t.sdkError)===null||s===void 0?void 0:s.emit(new p(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(l=n.response)===null||l===void 0?void 0:l.data))}))};e.prototype.render=function(){var e=this;var t=!this.localNameFilter?this.templates:this.templates.filter((function(t){return t.name.toLowerCase().includes(e.localNameFilter.toLowerCase())}));return s(i,null,s("div",{class:"header"},s("div",{class:"filter"},s("verdocs-text-input",{id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:function(t){return e.localNameFilter=t.target.value.trim()},onFocusout:function(t){var n;e.name=t.target.value.trim();e.localNameFilter=t.target.value.trim();(n=e.changeName)===null||n===void 0?void 0:n.emit(e.name)}})),s("verdocs-quick-filter",{label:"Sharing",value:this.sharing,options:y,onOptionSelected:function(t){var n;e.sharing=t.detail.value;(n=e.changeSharing)===null||n===void 0?void 0:n.emit(e.sharing)}}),s("verdocs-quick-filter",{label:"Starred",value:this.starred,options:z,onOptionSelected:function(t){var n;e.starred=t.detail.value;(n=e.changeStarred)===null||n===void 0?void 0:n.emit(e.starred)}}),s("verdocs-quick-filter",{label:"Sort By",value:this.sort,options:M,onOptionSelected:function(t){var n;e.sort=t.detail.value;(n=e.changeSort)===null||n===void 0?void 0:n.emit(e.sort)}}),this.loading&&s("verdocs-spinner",{mode:"dark",size:24}),s("div",{style:{display:"flex",flex:"1"}})),t.map((function(t){var n=e.sort==="created_at"?"created_at":e.sort==="updated_at"?"updated_at":"last_used_at";var i=t[n];var l=[];var a=[];if(e.allowedActions.includes("send")){l.push({label:"Preview / Send",id:"send",disabled:!o(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("signnow")){l.push({label:"Sign Now",id:"signnow",disabled:true})}if(e.allowedActions.includes("submitted")){l.push({label:""});l.push({label:"Submissions",id:"submitted",disabled:!o(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:""});if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Edit",id:"edit",disabled:!a.includes(c.WRITE)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Delete",id:"delete",disabled:!a.includes(c.DELETE)})}}return s("div",{class:"template",onClick:function(){var n;(n=e.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,template:t})}},s("div",{class:"inner"},s("verdocs-template-star",{template:t,endpoint:e.endpoint}),s("div",{class:"spacer icon-spacer"}),s("div",{class:"name"},t.name),s("div",{class:"spacer usage-spacer"}),s("div",{class:"usage"},s("span",{innerHTML:g,title:"Usage Counter"}),t.counter||"--"),s("div",{class:"spacer last-used-spacer"}),s("div",{class:"last-used"},n==="created_at"&&s("span",{innerHTML:w,title:"Created"}),n==="updated_at"&&s("span",{innerHTML:b,title:"Last Updated"}),n==="last_used_at"&&s("span",{innerHTML:x,title:"Last Used"}),i?h(new Date(i),"P"):"Never"),s("div",{class:"spacer ownership-spacer"}),t.is_public&&s("div",{class:"ownership"},s("span",{innerHTML:m})," Public"),!t.is_public&&!t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:v})," Private"),!t.is_public&&t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:f})," Shared"),s("verdocs-dropdown",{options:l,onOptionSelected:function(n){return e.handleOptionSelected(n.detail.id,t)}})))})),!this.initiallyLoaded&&s("div",null,d(0,this.rowsPerPage).map((function(){return s("div",{class:"template-placeholder"})}))),this.initiallyLoaded&&!this.templates.length&&s("div",{class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?s("div",{style:{marginTop:"20px"}},s("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):s("div",null),this.confirmDelete&&s("verdocs-ok-dialog",{heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:function(){return e.deleteTemplate(e.confirmDelete)},onExit:function(){return e.confirmDelete=null},showCancel:true}))};Object.defineProperty(e,"watchers",{get:function(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());S.style=u}}}));
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,s){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,l){function a(e){try{o(s.next(e))}catch(e){l(e)}}function r(e){try{o(s["throw"](e))}catch(e){l(e)}}function o(e){e.done?n(e.value):i(e.value).then(a,r)}o((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},s,i,l,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(e){return function(t){return o([e,t])}}function o(a){if(s)throw new TypeError("Generator is already executing.");while(n)try{if(s=1,i&&(l=a[0]&2?i["return"]:a[0]?i["throw"]||((l=i["return"])&&l.call(i),0):i.next)&&!(l=l.call(i,a[1])).done)return l;if(i=0,l)a=[a[0]&2,l.value];switch(a[0]){case 0:case 1:l=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(l=n.trys,l=l.length>0&&l[l.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!l||a[1]>l[0]&&a[1]<l[3])){n.label=a[1];break}if(a[0]===6&&n.label<l[1]){n.label=l[1];l=a;break}if(l&&n.label<l[2]){n.label=l[2];n.ops.push(a);break}if(l[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];i=0}finally{s=l=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-f246348c.system.js","./p-3bcd86ea.system.js","./p-187b20b7.system.js","./p-dc9c4361.system.js"],(function(e){"use strict";var t,n,s,i,l,a,r,o,c,d,p,h;return{setters:[function(e){t=e.r;n=e.c;s=e.h;i=e.H},function(){},function(e){l=e.V;a=e.l;r=e.d;o=e.c;c=e.a},function(e){d=e.i},function(e){p=e.S},function(e){h=e.f}],execute:function(){var u='verdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';var m='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>';var v='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>';var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>';var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>';var w='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>';var x='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>';var b='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>';var y=[{value:"all",label:"All"},{value:"personal",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}];var z=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}];var M=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}];var S=e("verdocs_templates_list",function(){function e(e){var s=this;t(this,e);this.sdkError=n(this,"sdkError",7);this.viewTemplate=n(this,"viewTemplate",7);this.signNow=n(this,"signNow",7);this.submittedData=n(this,"submittedData",7);this.editTemplate=n(this,"editTemplate",7);this.templateDeleted=n(this,"templateDeleted",7);this.changeSort=n(this,"changeSort",7);this.changeSharing=n(this,"changeSharing",7);this.changeStarred=n(this,"changeStarred",7);this.changeName=n(this,"changeName",7);this.handleOptionSelected=function(e,t){var n,i,l,a;if(e==="send"){(n=s.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:s.endpoint,template:t})}else if(e==="signnow"){(i=s.signNow)===null||i===void 0?void 0:i.emit({endpoint:s.endpoint,template:t})}else if(e==="submitted"){(l=s.submittedData)===null||l===void 0?void 0:l.emit({endpoint:s.endpoint,template:t})}else if(e==="edit"){(a=s.editTemplate)===null||a===void 0?void 0:a.emit({endpoint:s.endpoint,template:t})}else if(e==="delete"){s.confirmDelete=t}};this.endpoint=l.getDefault();this.sharing="all";this.starred="all";this.sort="updated_at";this.name="";this.allowedActions=["send","submitted","link","edit","delete"];this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.confirmDelete=null;this.templates=[];this.localNameFilter=""}e.prototype.handleSharingUpdated=function(){return this.queryTemplates()};e.prototype.handleStarredUpdated=function(){return this.queryTemplates()};e.prototype.handleSortUpdated=function(){return this.queryTemplates()};e.prototype.handleNameUpdated=function(){return this.queryTemplates()};e.prototype.handlePageUpdated=function(){return this.queryTemplates()};e.prototype.componentWillLoad=function(){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryTemplates()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryTemplates=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n,s,i,l;return __generator(this,(function(r){switch(r.label){case 0:console.log("[TEMPLATES] Querying templates");this.loading=true;r.label=1;case 1:r.trys.push([1,3,,4]);s={page:this.selectedPage,rows:this.rowsPerPage};if(this.name.trim()!==""){s.q=this.name.trim()}return[4,a(this.endpoint,s)];case 2:i=r.sent();this.templates=i.templates;this.count=i.total;this.loading=false;return[3,4];case 3:l=r.sent();this.loading=false;console.log("[TEMPLATES] Error listing templates",l);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new p(l.message,(t=l.response)===null||t===void 0?void 0:t.status,(n=l.response)===null||n===void 0?void 0:n.data));return[3,4];case 4:return[2]}}))}))};e.prototype.deleteTemplate=function(e){var t=this;this.confirmDelete=null;r(this.endpoint,e.id).then((function(){var n;console.log("[TEMPLATES] Deleted template",e);(n=t.templateDeleted)===null||n===void 0?void 0:n.emit({endpoint:t.endpoint,template:e});return t.queryTemplates()})).catch((function(n){var s,i,l;console.log("[TEMPLATES] Error deleting template",e);(s=t.sdkError)===null||s===void 0?void 0:s.emit(new p(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(l=n.response)===null||l===void 0?void 0:l.data))}))};e.prototype.render=function(){var e=this;var t=!this.localNameFilter?this.templates:this.templates.filter((function(t){return t.name.toLowerCase().includes(e.localNameFilter.toLowerCase())}));return s(i,null,s("div",{class:"header"},s("div",{class:"filter"},s("verdocs-text-input",{id:"verdocs-filter-name",value:this.name,clearable:true,autocomplete:"off",placeholder:"Filter by Name...",onInput:function(t){return e.localNameFilter=t.target.value.trim()},onFocusout:function(t){var n;e.name=t.target.value.trim();e.localNameFilter=t.target.value.trim();(n=e.changeName)===null||n===void 0?void 0:n.emit(e.name)}})),s("verdocs-quick-filter",{label:"Sharing",value:this.sharing,options:y,onOptionSelected:function(t){var n;e.sharing=t.detail.value;(n=e.changeSharing)===null||n===void 0?void 0:n.emit(e.sharing)}}),s("verdocs-quick-filter",{label:"Starred",value:this.starred,options:z,onOptionSelected:function(t){var n;e.starred=t.detail.value;(n=e.changeStarred)===null||n===void 0?void 0:n.emit(e.starred)}}),s("verdocs-quick-filter",{label:"Sort By",value:this.sort,options:M,onOptionSelected:function(t){var n;e.sort=t.detail.value;(n=e.changeSort)===null||n===void 0?void 0:n.emit(e.sort)}}),this.loading&&s("verdocs-spinner",{mode:"dark",size:24}),s("div",{style:{display:"flex",flex:"1"}})),t.map((function(t){var n=e.sort==="created_at"?"created_at":e.sort==="updated_at"?"updated_at":"last_used_at";var i=t[n];var l=[];var a=[];if(e.allowedActions.includes("send")){l.push({label:"Preview / Send",id:"send",disabled:!o(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("signnow")){l.push({label:"Sign Now",id:"signnow",disabled:true})}if(e.allowedActions.includes("submitted")){l.push({label:""});l.push({label:"Submissions",id:"submitted",disabled:!o(e.endpoint.session,"read",t)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:""});if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Edit",id:"edit",disabled:!a.includes(c.WRITE)})}if(e.allowedActions.includes("link")||e.allowedActions.includes("edit")||e.allowedActions.includes("delete")){l.push({label:"Delete",id:"delete",disabled:!a.includes(c.DELETE)})}}return s("div",{class:"template",onClick:function(){var n;(n=e.viewTemplate)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,template:t})}},s("div",{class:"inner"},s("verdocs-template-star",{template:t,endpoint:e.endpoint}),s("div",{class:"spacer icon-spacer"}),s("div",{class:"name"},t.name),s("div",{class:"spacer usage-spacer"}),s("div",{class:"usage"},s("span",{innerHTML:g,title:"Usage Counter"}),t.counter||"--"),s("div",{class:"spacer last-used-spacer"}),s("div",{class:"last-used"},n==="created_at"&&s("span",{innerHTML:w,title:"Created"}),n==="updated_at"&&s("span",{innerHTML:b,title:"Last Updated"}),n==="last_used_at"&&s("span",{innerHTML:x,title:"Last Used"}),i?h(new Date(i),"P"):"Never"),s("div",{class:"spacer ownership-spacer"}),t.is_public&&s("div",{class:"ownership"},s("span",{innerHTML:m})," Public"),!t.is_public&&!t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:v})," Private"),!t.is_public&&t.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:f})," Shared"),s("verdocs-dropdown",{options:l,onOptionSelected:function(n){return e.handleOptionSelected(n.detail.id,t)}})))})),!this.initiallyLoaded&&s("div",null,d(0,this.rowsPerPage).map((function(){return s("div",{class:"template-placeholder"})}))),this.initiallyLoaded&&!this.templates.length&&s("div",{class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?s("div",{style:{marginTop:"20px"}},s("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(t){e.selectedPage=t.detail.selectedPage}})):s("div",null),this.confirmDelete&&s("verdocs-ok-dialog",{heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:function(){return e.deleteTemplate(e.confirmDelete)},onExit:function(){return e.confirmDelete=null},showCancel:true}))};Object.defineProperty(e,"watchers",{get:function(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());S.style=u}}}));
|
@@ -1 +1 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function a(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):a(t.value).then(i,s)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,a,o,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return l([t,e])}}function l(i){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,a&&(o=i[0]&2?a["return"]:i[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,i[1])).done)return o;if(a=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;a=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=e.call(t,n)}catch(t){i=[6,t];a=0}finally{r=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,e,n,r){function a(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function i(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r["throw"](t))}catch(t){o(t)}}function l(t){t.done?n(t.value):a(t.value).then(i,s)}l((r=r.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,a,o,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return l([t,e])}}function l(i){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,a&&(o=i[0]&2?a["return"]:i[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,i[1])).done)return o;if(a=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;a=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){n.label=i[1];break}if(i[0]===6&&n.label<o[1]){n.label=o[1];o=i;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(i);break}if(o[2])n.ops.pop();n.trys.pop();continue}i=e.call(t,n)}catch(t){i=[6,t];a=0}finally{r=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-f246348c.system.js","./p-54498887.system.js"],(function(t){"use strict";var e,n,r,a,o;return{setters:[function(t){e=t.r;n=t.c;r=t.h;a=t.H},function(t){o=t.V},function(){}],execute:function(){var i=function(t,e){return t.api.post("/templates/".concat(e,"/stars/toggle")).then((function(t){return t.data}))};var s='verdocs-template-star{display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-template-star .star{line-height:10px}verdocs-template-star .star.updating{-webkit-animation:spinningStar 2s infinite linear;animation:spinningStar 2s infinite linear}verdocs-template-star .star svg{width:24px;height:24px}verdocs-template-star .count{color:#595c5d;font-size:14px;margin-left:10px}@-webkit-keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}';var l='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /></svg>';var c='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z" clip-rule="evenodd" /></svg>';var u=t("verdocs_template_star",function(){function t(t){e(this,t);this.starChange=n(this,"starChange",7);this.sdkError=n(this,"sdkError",7);this.endpoint=o.getDefault();this.template=undefined;this.updating=false}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return[2]}return[2]}))}))};t.prototype.toggle=function(t){var e=this;t.stopPropagation();this.updating=true;i(o.getDefault(),this.template.id).then((function(t){e.updating=false;e.template.star_counter=t.star_counter;e.starChange.emit({templateId:e.template.id,starred:t.star_counter>0,count:t.star_counter})})).catch((function(t){e.updating=false;console.log("[STAR] Error toggling template star",t.message);e.sdkError.emit(t)}))};t.prototype.render=function(){var t=this;return r(a,null,r("div",{class:"star ".concat(this.updating?"updating":""),innerHTML:this.template.star_counter?c:l,onClick:function(e){return t.toggle(e)}}),r("div",{class:"count"},this.template.star_counter||"--"))};return t}());u.style=s}}}));
|
@@ -1 +1 @@
|
|
1
|
-
System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-
|
1
|
+
System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-f246348c.system.js"],(function(e){"use strict";var s,r,t;return{setters:[function(e){s=e.r;r=e.h},function(){},function(e){t=e.V}],execute:function(){var i='verdocs-search{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;background-color:#1e2031}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}';var n=e("verdocs_search",function(){function e(e){s(this,e);this.endpoint=t.getDefault()}e.prototype.render=function(){return r("div",{class:"container"},r("verdocs-search-box",{endpoint:this.endpoint}),r("div",{class:"boxes"},r("verdocs-search-activity",{type:"recent",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"saved",endpoint:this.endpoint}),r("verdocs-search-activity",{type:"starred",endpoint:this.endpoint}),r("verdocs-quick-functions",{endpoint:this.endpoint})))};return e}());n.style=i}}}));
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,h as s,H as e}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as i}from"./p-
|
1
|
+
import{r as t,h as s,H as e}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as i}from"./p-e04d8f5d.js";import{g as o}from"./p-45ecd6eb.js";import"./p-7648c449.js";import"./p-b086f9be.js";import"./p-ef20cb50.js";const l=class{constructor(s){t(this,s),this.store=null,this.endpoint=i.getDefault(),this.templateId="e997b94c-9d1b-4c85-8552-dedd24e35550"}async componentWillLoad(){try{this.endpoint.loadSession(),this.store=await o(this.endpoint,this.templateId,!1)}catch(t){console.log("[TEMPLATE VISIBILITY] Error loading template",t)}}render(){return console.log("[IPC] Rendering"),s(e,null,s("div",null,s("pre",null,s("code",null,JSON.stringify(this.store.state,null,2)))),s("verdocs-template-roles",{templateId:this.templateId}),s("verdocs-template-fields",{templateId:this.templateId}))}};l.style="ipc-test{max-width:800px;display:block}";export{l as ipc_test}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as t,h as o}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as i}from"./p-
|
1
|
+
import{r as e,c as t,h as o}from"./p-14b44491.js";import"./p-05788c2b.js";import{V as i}from"./p-e04d8f5d.js";const r=class{constructor(o){e(this,o),this.createTemplate=t(this,"createTemplate",7),this.createDocument=t(this,"createDocument",7),this.endpoint=i.getDefault()}handleCreateTemplate(){this.createTemplate.emit()}handleCreateDocument(){this.createDocument.emit()}render(){return o("div",{class:"container"},o("p",{class:"title"},"Quick Create"),o("button",{onClick:()=>this.handleCreateTemplate(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>'},"Template"),o("button",{onClick:()=>this.handleCreateDocument(),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>'},"Document"))}};r.style='verdocs-quick-functions{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:#1e2031;text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#55bc81}verdocs-quick-functions button svg{fill:#ffffff}';const s=class{constructor(o){e(this,o),this.searchClicked=t(this,"searchClicked",7),this.typeChanged=t(this,"typeChanged",7),this.queryChanged=t(this,"queryChanged",7),this.endpoint=i.getDefault(),this.placeholder="Search envelopes, templates, organizations...",this.type="all",this.query="",this.grabsFocus=!1}async focusField(){this.inputEl.focus()}componentDidRender(){this.grabsFocus&&this.inputEl.focus()}handleSearch(e){return this.searchClicked.emit({type:this.type,query:this.query}),e.preventDefault(),!1}handleChange(e){this.queryChanged.emit(e.target.value)}handleClearFilter(){this.typeChanged.emit("all")}handleKeyUp(e){"Enter"===e.key&&this.searchClicked.emit({type:this.type,query:this.query})}render(){return o("form",{onSubmit:e=>this.handleSearch(e)},void 0!==this.type&&"all"!==this.type&&o("span",{class:"type"},this.type,"s ",o("button",{class:"remove",innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/></svg>',onClick:()=>this.handleClearFilter()})),o("input",{type:"text",value:this.query,placeholder:this.placeholder,onInput:e=>this.handleChange(e),onKeyUp:e=>this.handleKeyUp(e),ref:e=>this.inputEl=e}),o("button",{onClick:e=>this.handleSearch(e),class:"search"},o("span",{innerHTML:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/></svg>'}),"Search"))}};s.style='verdocs-search-box{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:#707ae5}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#55bc81;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}';export{r as verdocs_quick_functions,s as verdocs_search_box}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,c as i,h as s,H as t}from"./p-14b44491.js";import{c as n}from"./p-dc2ad047.js";import{u as o}from"./p-29f64c27.js";import{r as l}from"./p-3cd894ff.js";import"./p-05788c2b.js";import{V as a}from"./p-035f6b38.js";import{g as d}from"./p-321da456.js";import{F as r}from"./p-839f6f0d.js";import{V as c}from"./p-ed416acf.js";import{S as v}from"./p-7a1b2643.js";import{f as p}from"./p-c220af42.js";import"./p-7648c449.js";const h={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>'},w=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=a.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 d(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 v(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":l(this.endpoint,this.envelopeId,e.role_name).then((()=>{c("Reminder Sent",{style:"success"})})).catch((e=>{console.log("[SIDEBAR] Error resending invitation",e),c("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":case"details":c("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,n(this.endpoint,this.envelopeId).then((async e=>{var i,s;console.log("[SIDEBAR] Envelope canceled",e),c("Envelope canceled",{style:"success"}),this.store=await d(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,c("Error canceling envelope: "+e.message,{style:"error"})}))}prepareHistoryEntries(){var e,i,s,t,n,o,l,a,d,r,c,v;const p=[],h=(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.histories)||[];p.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)&&p.push({icon:"pencil",message:"Envelope completed.",date:new Date(null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.updated_at)});const w=h.some((e=>"owner:canceled"===e.event));return"canceled"!==(null===(r=null===(d=this.store)||void 0===d?void 0:d.state)||void 0===r?void 0:r.status)||w||p.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(null===(v=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===v?void 0:v.canceled_at)}),h.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=(null==s?void 0:s.full_name)||"";switch(e.event.toLowerCase()){case"recipient:signed":p.push({icon:"gesture",message:`Signed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:declined":p.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":p.push({icon:"visibility",message:`Opened by ${t}, via email.`,date:new Date(e.created_at)});break;case"sms":p.push({icon:"visibility",message:`Opened by ${t}, via SMS.`,date:new Date(e.created_at)});break;case"in_person_link":p.push({icon:"visibility",message:`Opened by ${t}, via In-person link.`,date:new Date(e.created_at)});break;case"in_app":p.push({icon:"visibility",message:`Opened by ${t}, via dashboard.`,date:new Date(e.created_at)});break;default:p.push({icon:"visibility",message:`Opened by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:submitted":switch(e.event_detail){case"approver":p.push({icon:"check_circle",message:`Approved by ${t}.`,date:new Date(e.created_at)});break;default:p.push({icon:"send",message:`Submitted by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:prepared":p.push({icon:"send",message:`Prepared by ${t}.`,date:new Date(e.created_at)});break;case"recipient:claimed":"guest"===e.event_detail?p.push({icon:"account_circle",message:`${t} claimed the Verdoc as a guest.`,date:new Date(e.created_at)}):"profile"===e.event_detail&&p.push({icon:"verified_user",message:`${t} claimed the Verdoc as a verified user.`,date:new Date(e.created_at)});break;case"recipient:agreed":p.push({icon:"done",message:`${t} agreed to use electronic records and signatures.`,date:new Date(e.created_at)});break;case"recipient:invited":p.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"invitation:resent":p.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":p.push({icon:"contact_mail",message:`A copy has been sent to ${t}.`,date:new Date(e.created_at)});break;case"recipient:delegated":p.push({icon:"people",message:e.event_detail,date:new Date(e.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":p.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"created":p.push({icon:"create",message:"Envelope was created.",date:new Date(e.created_at)});break;case"completed":p.push({icon:"done_all",message:"Envelope was completed.",date:new Date(e.created_at)});break;case"canceled":case"owner:canceled":p.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(e.created_at)});break;case"owner:get_in_person_link":p.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)}})),p.sort(((e,i)=>i.date.getTime()-e.date.getTime())),p}render(){var e,i,n,l,a,d,c,v,w,g,m,x,b,f,u,y,z,k,M,D,V,B,E,L,H;if(!this.store.state)return s(t,null);const S=this.endpoint.getSession(),_=o(S,this.store.state),$=this.prepareHistoryEntries(),I="pending"!==(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.status)&&"in progress"!==(null===(l=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===l?void 0:l.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===(d=null===(a=this.store)||void 0===a?void 0:a.state)||void 0===d?void 0:d.id),s("div",{class:"label"},"Date Created"),s("div",{class:"value"},p(new Date(null===(v=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===v?void 0:v.created_at),r)),s("div",{class:"label"},"Last Modified"),s("div",{class:"value"},p(new Date(null===(g=null===(w=this.store)||void 0===w?void 0:w.state)||void 0===g?void 0:g.updated_at),r)),s("div",{class:"label"},"Status"),s("div",{class:"value"},null===(x=null===(m=this.store)||void 0===m?void 0:m.state)||void 0===x?void 0:x.status),s("div",{class:"label"},"Verdoc Owner ID"),s("div",{class:"value"},null===(f=null===(b=this.store)||void 0===b?void 0:b.state)||void 0===f?void 0:f.profile_id),s("div",{class:"label"},"Verdoc Owner Name"),s("div",{class:"value"},null===(z=null===(y=null===(u=this.store)||void 0===u?void 0:u.state)||void 0===y?void 0:y.profile)||void 0===z?void 0:z.first_name," ",null===(D=null===(M=null===(k=this.store)||void 0===k?void 0:k.state)||void 0===M?void 0:M.profile)||void 0===D?void 0:D.last_name),s("div",{class:"label"},"Verdoc Owner Email"),s("div",{class:"value"},null===(E=null===(B=null===(V=this.store)||void 0===V?void 0:V.state)||void 0===B?void 0:B.profile)||void 0===E?void 0:E.email)),2===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Recipients"),null===(H=null===(L=this.store)||void 0===L?void 0:L.state)||void 0===H?void 0:H.recipients.map(((e,i)=>{const t="submitted"!==e.status&&"canceled"!==e.status&&"declined"!==e.status,n=this.canResendRecipient(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),_&&!I&&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"},e.full_name),s("div",{class:"recipient-name"},e.email),s("div",{class:"recipient-name"},e.phone)))})),_&&s("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:()=>this.showCancelDialog=!I,disabled:I})),3===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"History"),$.map((e=>s("div",{class:"history-entry"},s("div",{class:"activity-icon",innerHTML:h[e.icon]||e.icon}),s("div",{class:"activity-details"},s("div",{class:"activity-text"},e.message),s("div",{class:"activity-date"},p(e.date,r))))))),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()}}))}};w.style='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{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{w as verdocs_envelope_sidebar}
|
1
|
+
import{r as e,c as i,h as s,H as t}from"./p-14b44491.js";import{c as n}from"./p-dc2ad047.js";import{u as o}from"./p-29f64c27.js";import{r as l}from"./p-3cd894ff.js";import"./p-05788c2b.js";import{V as a}from"./p-e04d8f5d.js";import{g as d}from"./p-321da456.js";import{F as r}from"./p-839f6f0d.js";import{V as c}from"./p-ed416acf.js";import{S as v}from"./p-7a1b2643.js";import{f as p}from"./p-c220af42.js";import"./p-7648c449.js";const h={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>'},w=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=a.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 d(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 v(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":l(this.endpoint,this.envelopeId,e.role_name).then((()=>{c("Reminder Sent",{style:"success"})})).catch((e=>{console.log("[SIDEBAR] Error resending invitation",e),c("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":case"details":c("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,n(this.endpoint,this.envelopeId).then((async e=>{var i,s;console.log("[SIDEBAR] Envelope canceled",e),c("Envelope canceled",{style:"success"}),this.store=await d(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,c("Error canceling envelope: "+e.message,{style:"error"})}))}prepareHistoryEntries(){var e,i,s,t,n,o,l,a,d,r,c,v;const p=[],h=(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.histories)||[];p.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)&&p.push({icon:"pencil",message:"Envelope completed.",date:new Date(null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.updated_at)});const w=h.some((e=>"owner:canceled"===e.event));return"canceled"!==(null===(r=null===(d=this.store)||void 0===d?void 0:d.state)||void 0===r?void 0:r.status)||w||p.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(null===(v=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===v?void 0:v.canceled_at)}),h.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=(null==s?void 0:s.full_name)||"";switch(e.event.toLowerCase()){case"recipient:signed":p.push({icon:"gesture",message:`Signed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:declined":p.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":p.push({icon:"visibility",message:`Opened by ${t}, via email.`,date:new Date(e.created_at)});break;case"sms":p.push({icon:"visibility",message:`Opened by ${t}, via SMS.`,date:new Date(e.created_at)});break;case"in_person_link":p.push({icon:"visibility",message:`Opened by ${t}, via In-person link.`,date:new Date(e.created_at)});break;case"in_app":p.push({icon:"visibility",message:`Opened by ${t}, via dashboard.`,date:new Date(e.created_at)});break;default:p.push({icon:"visibility",message:`Opened by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:submitted":switch(e.event_detail){case"approver":p.push({icon:"check_circle",message:`Approved by ${t}.`,date:new Date(e.created_at)});break;default:p.push({icon:"send",message:`Submitted by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:prepared":p.push({icon:"send",message:`Prepared by ${t}.`,date:new Date(e.created_at)});break;case"recipient:claimed":"guest"===e.event_detail?p.push({icon:"account_circle",message:`${t} claimed the Verdoc as a guest.`,date:new Date(e.created_at)}):"profile"===e.event_detail&&p.push({icon:"verified_user",message:`${t} claimed the Verdoc as a verified user.`,date:new Date(e.created_at)});break;case"recipient:agreed":p.push({icon:"done",message:`${t} agreed to use electronic records and signatures.`,date:new Date(e.created_at)});break;case"recipient:invited":p.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"invitation:resent":p.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":p.push({icon:"contact_mail",message:`A copy has been sent to ${t}.`,date:new Date(e.created_at)});break;case"recipient:delegated":p.push({icon:"people",message:e.event_detail,date:new Date(e.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":p.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"created":p.push({icon:"create",message:"Envelope was created.",date:new Date(e.created_at)});break;case"completed":p.push({icon:"done_all",message:"Envelope was completed.",date:new Date(e.created_at)});break;case"canceled":case"owner:canceled":p.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(e.created_at)});break;case"owner:get_in_person_link":p.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)}})),p.sort(((e,i)=>i.date.getTime()-e.date.getTime())),p}render(){var e,i,n,l,a,d,c,v,w,g,m,x,b,f,u,y,z,k,M,D,V,B,E,L,H;if(!this.store.state)return s(t,null);const S=this.endpoint.getSession(),_=o(S,this.store.state),$=this.prepareHistoryEntries(),I="pending"!==(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.status)&&"in progress"!==(null===(l=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===l?void 0:l.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===(d=null===(a=this.store)||void 0===a?void 0:a.state)||void 0===d?void 0:d.id),s("div",{class:"label"},"Date Created"),s("div",{class:"value"},p(new Date(null===(v=null===(c=this.store)||void 0===c?void 0:c.state)||void 0===v?void 0:v.created_at),r)),s("div",{class:"label"},"Last Modified"),s("div",{class:"value"},p(new Date(null===(g=null===(w=this.store)||void 0===w?void 0:w.state)||void 0===g?void 0:g.updated_at),r)),s("div",{class:"label"},"Status"),s("div",{class:"value"},null===(x=null===(m=this.store)||void 0===m?void 0:m.state)||void 0===x?void 0:x.status),s("div",{class:"label"},"Verdoc Owner ID"),s("div",{class:"value"},null===(f=null===(b=this.store)||void 0===b?void 0:b.state)||void 0===f?void 0:f.profile_id),s("div",{class:"label"},"Verdoc Owner Name"),s("div",{class:"value"},null===(z=null===(y=null===(u=this.store)||void 0===u?void 0:u.state)||void 0===y?void 0:y.profile)||void 0===z?void 0:z.first_name," ",null===(D=null===(M=null===(k=this.store)||void 0===k?void 0:k.state)||void 0===M?void 0:M.profile)||void 0===D?void 0:D.last_name),s("div",{class:"label"},"Verdoc Owner Email"),s("div",{class:"value"},null===(E=null===(B=null===(V=this.store)||void 0===V?void 0:V.state)||void 0===B?void 0:B.profile)||void 0===E?void 0:E.email)),2===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Recipients"),null===(H=null===(L=this.store)||void 0===L?void 0:L.state)||void 0===H?void 0:H.recipients.map(((e,i)=>{const t="submitted"!==e.status&&"canceled"!==e.status&&"declined"!==e.status,n=this.canResendRecipient(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),_&&!I&&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"},e.full_name),s("div",{class:"recipient-name"},e.email),s("div",{class:"recipient-name"},e.phone)))})),_&&s("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:()=>this.showCancelDialog=!I,disabled:I})),3===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"History"),$.map((e=>s("div",{class:"history-entry"},s("div",{class:"activity-icon",innerHTML:h[e.icon]||e.icon}),s("div",{class:"activity-details"},s("div",{class:"activity-text"},e.message),s("div",{class:"activity-date"},p(e.date,r))))))),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()}}))}};w.style='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{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{w as verdocs_envelope_sidebar}
|
@@ -1 +1 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function r(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{a(t.next(e))}catch(e){o(e)}}function l(e){try{a(t["throw"](e))}catch(e){o(e)}}function a(e){e.done?i(e.value):r(e.value).then(s,l)}a((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(n){return a([e,n])}}function a(s){if(t)throw new TypeError("Generator is already executing.");while(i)try{if(t=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=n.call(e,i)}catch(e){s=[6,e];r=0}finally{t=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-eaf0b189.system.js","./p-9bf2d124.system.js","./p-4098a4a2.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-1d60151a.system.js","./p-3af6b910.system.js","./p-8aae8d16.system.js"],(function(e){"use strict";var n,i,t,r,o,s,l,a,c,p,d;return{setters:[function(e){n=e.r;i=e.c;t=e.h;r=e.H},function(){},function(e){o=e.g},function(e){s=e.V},function(e){l=e.g},function(e){a=e.V},function(e){c=e.S},function(e){p=e.g;d=e.r},function(){},function(){}],execute:function(){var u='verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var f=e("verdocs_envelope_recipient_link",function(){function e(e){n(this,e);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.recipient=null;this.endpoint=s.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.loading=true;this.gettingLink=true;this.link=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r,o,s,a;var p=this;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}s=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:s.store=d.sent();this.loading=false;this.gettingLink=true;this.recipient=(i=(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients)===null||i===void 0?void 0:i.find((function(e){return e.role_name===p.roleName}));this.getLink(this.recipient);return[3,3];case 2:a=d.sent();console.log("[RECIPIENT_LINK] Error loading envelope",a);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(a.message,(r=a.response)===null||r===void 0?void 0:r.status,(o=a.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return a("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);a("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var n=this;this.gettingLink=true;o(this.endpoint,e.envelope_id,e.role_name).then((function(e){n.gettingLink=false;n.link=e.link})).catch((function(e){n.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);a("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},this.recipient.full_name," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());f.style=u;var m='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var x=e("verdocs_envelope_recipient_summary",function(){function e(e){n(this,e);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.endpoint=s.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.loading=true;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}t=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:t.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:r=o.sent();console.log("[RECIPIENTS] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(r.message,(n=r.response)===null||n===void 0?void 0:n.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,n;(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients.sort((function(e,n){return e.sequence===n.sequence?e.order-n.order:e.sequence-n.sequence}))};e.prototype.handleAnother=function(e){var n;e.preventDefault();(n=this.another)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleView=function(e){var n;e.preventDefault();(n=this.view)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){var n=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=n.sdkError)===null||i===void 0?void 0:i.emit(e)}))};e.prototype.getLink=function(e){var n;var i=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(n={},n[e.role_name]=true,n));o(this.endpoint,e.envelope_id,e.role_name).then((function(n){var t,r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));i.links=__assign(__assign({},i.links),(r={},r[e.role_name]=n.link,r));i.copyLink(n.link)})).catch((function(n){var t;var r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));console.log("[RECIPIENTS] Error getting link",n);(r=i.sdkError)===null||r===void 0?void 0:r.emit(n)}))};e.prototype.render=function(){var e=this;var n,i;if(this.loading){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"Recipient Summary"),t("div",{class:"summary-rows"},(((i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.recipients)||[]).map((function(n){var i=p(e.store.state);var r=d(n,i);var o=e.links[n.role_name];var s=e.gettingLinks[n.role_name];return t("div",{class:"summary-recipient"},t("div",{class:"role-name"},n.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},n.full_name," (",n.email||n.phone,")"),r&&!o&&t("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(n)}})),o&&t("div",{class:"link-wrapper"},t("div",{class:"link"},o),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&t("div",{class:"buttons"},this.canSendAnother&&t("verdocs-button",{size:"small",label:"Send Another",onClick:function(n){return e.handleAnother(n)}}),this.canView&&t("verdocs-button",{size:"small",label:"View Now",onClick:function(n){return e.handleView(n)}}),this.canDone&&t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());x.style=m}}}));
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function r(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{a(t.next(e))}catch(e){o(e)}}function l(e){try{a(t["throw"](e))}catch(e){o(e)}}function a(e){e.done?i(e.value):r(e.value).then(s,l)}a((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,r,o,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(n){return a([e,n])}}function a(s){if(t)throw new TypeError("Generator is already executing.");while(i)try{if(t=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;r=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=n.call(e,i)}catch(e){s=[6,e];r=0}finally{t=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-fbb8023f.system.js","./p-54498887.system.js","./p-eaf0b189.system.js","./p-f246348c.system.js","./p-4098a4a2.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js","./p-1d60151a.system.js","./p-3af6b910.system.js","./p-8aae8d16.system.js"],(function(e){"use strict";var n,i,t,r,o,s,l,a,c,p,d;return{setters:[function(e){n=e.r;i=e.c;t=e.h;r=e.H},function(){},function(e){o=e.g},function(e){s=e.V},function(e){l=e.g},function(e){a=e.V},function(e){c=e.S},function(e){p=e.g;d=e.r},function(){},function(){}],execute:function(){var u='verdocs-envelope-recipient-link{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-link .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-link .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-link .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-link .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-link .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-link .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-link .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-link .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-link .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-link .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-link .buttons verdocs-button button{width:100%}';var f=e("verdocs_envelope_recipient_link",function(){function e(e){n(this,e);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.recipient=null;this.endpoint=s.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.loading=true;this.gettingLink=true;this.link=""}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r,o,s,a;var p=this;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENT_LINK] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return[2]}s=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:s.store=d.sent();this.loading=false;this.gettingLink=true;this.recipient=(i=(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients)===null||i===void 0?void 0:i.find((function(e){return e.role_name===p.roleName}));this.getLink(this.recipient);return[3,3];case 2:a=d.sent();console.log("[RECIPIENT_LINK] Error loading envelope",a);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new c(a.message,(r=a.response)===null||r===void 0?void 0:r.status,(o=a.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return a("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);a("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var n=this;this.gettingLink=true;o(this.endpoint,e.envelope_id,e.role_name).then((function(e){n.gettingLink=false;n.link=e.link})).catch((function(e){n.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);a("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"In-Person Signing Link"),t("div",{class:"summary-rows"},t("div",{class:"summary-recipient"},t("div",{class:"role-name"},this.recipient.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},this.recipient.full_name," (",this.recipient.email||this.recipient.phone,")"),!this.link&&t("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());f.style=u;var m='verdocs-envelope-recipient-summary{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:100000;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-family:"Inter", "Barlow", sans-serif;background-color:#0000007f}verdocs-envelope-recipient-summary .summary-content{width:600px;display:-ms-flexbox;display:flex;max-width:90%;font-size:18px;-ms-flex:0 0 600px;flex:0 0 600px;border-radius:6px;background:#ffffff;-ms-flex-direction:column;flex-direction:column;padding:30px 20px 20px}verdocs-envelope-recipient-summary .summary-content .summary-title{font-size:20px;font-weight:700;margin:0 0 10px 0;color:#33364b}verdocs-envelope-recipient-summary .summary-recipient{display:-ms-flexbox;display:flex;color:#33364b;margin:8px 0 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-envelope-recipient-summary .summary-recipient .role-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;margin:0 0 8px 0;color:#092c4c}verdocs-envelope-recipient-summary .summary-recipient .role-info{gap:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end}verdocs-envelope-recipient-summary .summary-recipient .role-full-name{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .summary-recipient .recipient-link{width:120px;padding:0 16px;font-weight:500;margin:0 0 0 8px;text-align:center;font-size:0.875rem;border-radius:100%;color:#374151;line-height:1.25rem;background-color:#d8d8d8;border:2px solid #9ca3af}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper{gap:5px;display:-ms-flexbox;display:flex;margin:4px 0 0 0;-ms-flex-direction:row;flex-direction:row}verdocs-envelope-recipient-summary .summary-recipient .link-wrapper .link{-ms-flex:1;flex:1;height:34px;display:-ms-flexbox;display:flex;font-size:16px;padding:0 12px;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#f9fafb}verdocs-envelope-recipient-summary .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:10px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-envelope-recipient-summary .buttons verdocs-button{-ms-flex:0 0 120px;flex:0 0 120px;margin-left:10px;white-space:nowrap}verdocs-envelope-recipient-summary .buttons verdocs-button button{width:100%}';var x=e("verdocs_envelope_recipient_summary",function(){function e(e){n(this,e);this.another=i(this,"another",7);this.view=i(this,"view",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.endpoint=s.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.isOpen=undefined;this.loading=true;this.recipientStatusIcons=[];this.containerId="verdocs-status-indicator-".concat(Math.random().toString(36).substring(2,11));this.gettingLinks={};this.links={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,r;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[RECIPIENTS] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[RECIPIENTS] Unable to start session, must be authenticated");return[2]}t=this;return[4,l(this.endpoint,this.envelopeId,true)];case 1:t.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:r=o.sent();console.log("[RECIPIENTS] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(r.message,(n=r.response)===null||n===void 0?void 0:n.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,n;(n=(e=this.store)===null||e===void 0?void 0:e.state)===null||n===void 0?void 0:n.recipients.sort((function(e,n){return e.sequence===n.sequence?e.order-n.order:e.sequence-n.sequence}))};e.prototype.handleAnother=function(e){var n;e.preventDefault();(n=this.another)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleView=function(e){var n;e.preventDefault();(n=this.view)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.handleDone=function(e){var n;e.preventDefault();(n=this.next)===null||n===void 0?void 0:n.emit({envelope:this.store.state})};e.prototype.copyLink=function(e){var n=this;navigator.clipboard.writeText(e).then((function(){})).catch((function(e){var i;console.warn("[RECIPIENTS] Error copying to clipboard",e);(i=n.sdkError)===null||i===void 0?void 0:i.emit(e)}))};e.prototype.getLink=function(e){var n;var i=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(n={},n[e.role_name]=true,n));o(this.endpoint,e.envelope_id,e.role_name).then((function(n){var t,r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));i.links=__assign(__assign({},i.links),(r={},r[e.role_name]=n.link,r));i.copyLink(n.link)})).catch((function(n){var t;var r;i.gettingLinks=__assign(__assign({},i.gettingLinks),(t={},t[e.role_name]=false,t));console.log("[RECIPIENTS] Error getting link",n);(r=i.sdkError)===null||r===void 0?void 0:r.emit(n)}))};e.prototype.render=function(){var e=this;var n,i;if(this.loading){return t(r,null)}return t(r,null,t("div",{class:"summary-content"},t("h1",{class:"summary-title"},"Recipient Summary"),t("div",{class:"summary-rows"},(((i=(n=this.store)===null||n===void 0?void 0:n.state)===null||i===void 0?void 0:i.recipients)||[]).map((function(n){var i=p(e.store.state);var r=d(n,i);var o=e.links[n.role_name];var s=e.gettingLinks[n.role_name];return t("div",{class:"summary-recipient"},t("div",{class:"role-name"},n.role_name),t("div",{class:"role-details"},t("div",{class:"role-info"},t("div",{class:"role-full-name"},n.full_name," (",n.email||n.phone,")"),r&&!o&&t("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:s,onClick:function(){return e.getLink(n)}})),o&&t("div",{class:"link-wrapper"},t("div",{class:"link"},o),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(o)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&t("div",{class:"buttons"},this.canSendAnother&&t("verdocs-button",{size:"small",label:"Send Another",onClick:function(n){return e.handleAnother(n)}}),this.canView&&t("verdocs-button",{size:"small",label:"View Now",onClick:function(n){return e.handleView(n)}}),this.canDone&&t("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());x.style=m}}}));
|