@verdocs/web-sdk 1.14.4 → 1.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-button.cjs.entry.js +2 -2
  3. package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +8 -3
  4. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +3 -1
  5. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  6. package/dist/collection/components/controls/verdocs-button/verdocs-button.css +5 -5
  7. package/dist/collection/components/controls/verdocs-button/verdocs-button.js +1 -1
  8. package/dist/collection/components/envelopes/verdocs-envelope-recipient-summary/verdocs-envelope-recipient-summary.css +1 -0
  9. package/dist/collection/components/envelopes/verdocs-envelope-recipient-summary/verdocs-envelope-recipient-summary.js +8 -2
  10. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +5 -2
  11. package/dist/components/verdocs-button2.js +2 -2
  12. package/dist/components/verdocs-envelope-recipient-summary2.js +9 -3
  13. package/dist/components/verdocs-envelope-sidebar.js +5 -2
  14. package/dist/docs.json +1 -1
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/verdocs-button.entry.js +2 -2
  17. package/dist/esm/verdocs-envelope-recipient-summary.entry.js +8 -3
  18. package/dist/esm/verdocs-envelope-sidebar.entry.js +3 -1
  19. package/dist/esm/verdocs-web-sdk.js +1 -1
  20. package/dist/esm-es5/loader.js +1 -1
  21. package/dist/esm-es5/verdocs-button.entry.js +1 -1
  22. package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
  23. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  24. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  25. package/dist/types/components/envelopes/verdocs-envelope-recipient-summary/verdocs-envelope-recipient-summary.d.ts +1 -0
  26. package/dist/types/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts +1 -0
  27. package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
  28. package/dist/verdocs-web-sdk/p-37f9dcf4.system.entry.js +1 -0
  29. package/dist/verdocs-web-sdk/p-381f2a5f.entry.js +1 -0
  30. package/dist/verdocs-web-sdk/p-3f0517cc.entry.js +1 -0
  31. package/dist/verdocs-web-sdk/p-9c87a748.system.entry.js +1 -0
  32. package/dist/verdocs-web-sdk/{p-37af8e2d.system.entry.js → p-a018c7ab.system.entry.js} +1 -1
  33. package/dist/verdocs-web-sdk/p-e038c2fe.entry.js +1 -0
  34. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  35. package/package.json +1 -1
  36. package/dist/verdocs-web-sdk/p-0a0d0679.system.entry.js +0 -1
  37. package/dist/verdocs-web-sdk/p-13d4ed78.entry.js +0 -1
  38. package/dist/verdocs-web-sdk/p-20620846.entry.js +0 -1
  39. package/dist/verdocs-web-sdk/p-5896ced4.entry.js +0 -1
  40. package/dist/verdocs-web-sdk/p-b824ba92.system.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as t,H as s}from"./p-9cf1a627.js";import{t as n}from"./p-9b73909f.js";import{u as a}from"./p-d869c39c.js";import"./p-05788c2b.js";import{V as o}from"./p-0b4ea5f9.js";import{V as l}from"./p-ed416acf.js";import{S as c}from"./p-7a1b2643.js";import{f as r}from"./p-ab01f71e.js";const d={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>',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>'},p=class{constructor(t){e(this,t),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.endpoint=o.getDefault(),this.envelopeId="",this.envelope=null,this.sortedRecipients=[],this.roleNames=[],this.activeTab=1,this.panelOpen=!1,this.showManageDialog=!1}componentWillLoad(){this.endpoint.loadSession()}async componentWillRender(){var e,i,t;if(this.envelopeId)try{this.envelope=await n(this.endpoint,this.envelopeId),this.sortedRecipients=[...this.envelope.recipients],this.sortedRecipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence)),this.roleNames=this.sortedRecipients.map((e=>e.role_name))}catch(s){null===(e=this.sdkError)||void 0===e||e.emit(new c(s.message,null===(i=s.response)||void 0===i?void 0:i.status,null===(t=s.response)||void 0===t?void 0:t.data))}else console.error("[SIDEBAR] Missing required envelopeId")}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){return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(this.envelope.status)}canModifyRecipient(e){return!e.claimed&&!["declined","signed","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(this.envelope.status)}handleRecipientAction(e,i){var t;switch(console.log("[SIDEBAR] Recipient action",i,e),i){case"reminder":case"modify":case"details":l("This feature will be enabled in a future release. Please try again later.",{style:"info"})}null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:this.envelope,event:i})}prepareHistoryEntries(){const e=[],i=this.envelope.histories||[];e.push({icon:"pencil",message:"Envelope created.",date:new Date(this.envelope.created_at)}),"complete"===this.envelope.status&&e.push({icon:"pencil",message:"Envelope completed.",date:new Date(this.envelope.updated_at)});const t=i.some((e=>"owner:canceled"===e.event));return"canceled"!==this.envelope.status||t||e.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(this.envelope.canceled_at)}),i.forEach((i=>{const t=this.sortedRecipients.find((e=>e.role_name===i.role_name)),s=(null==t?void 0:t.full_name)||"";switch(i.event.toLowerCase()){case"recipient:signed":e.push({icon:"gesture",message:`Signed by ${s}.`,date:new Date(i.created_at)});break;case"recipient:declined":e.push({icon:"clear",message:`Declined by ${s}.`,date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":e.push({icon:"visibility",message:`Opened by ${s}, via email.`,date:new Date(i.created_at)});break;case"sms":e.push({icon:"visibility",message:`Opened by ${s}, via SMS.`,date:new Date(i.created_at)});break;case"in_person_link":e.push({icon:"visibility",message:`Opened by ${s}, via In-person link.`,date:new Date(i.created_at)});break;case"in_app":e.push({icon:"visibility",message:`Opened by ${s}, via dashboard.`,date:new Date(i.created_at)});break;default:e.push({icon:"visibility",message:`Opened by ${s}.`,date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":e.push({icon:"check_circle",message:`Approved by ${s}.`,date:new Date(i.created_at)});break;default:e.push({icon:"send",message:`Submitted by ${s}.`,date:new Date(i.created_at)})}break;case"recipient:prepared":e.push({icon:"send",message:`Prepared by ${s}.`,date:new Date(i.created_at)});break;case"recipient:claimed":"guest"===i.event_detail?e.push({icon:"account_circle",message:`${s} claimed the Verdoc as a guest.`,date:new Date(i.created_at)}):"profile"===i.event_detail&&e.push({icon:"verified_user",message:`${s} claimed the Verdoc as a verified user.`,date:new Date(i.created_at)});break;case"recipient:agreed":e.push({icon:"done",message:`${s} agreed to use electronic records and signatures.`,date:new Date(i.created_at)});break;case"recipient:invited":e.push("sms"===i.event_detail?{icon:"textsms",message:`${s} has been invited via SMS.`,date:new Date(i.created_at)}:{icon:"mail",message:`${s} has been invited via email.`,date:new Date(i.created_at)});break;case"invitation:resent":e.push({icon:"mail",message:`Invitation was resent to ${s} ${"reminder"===i.event_detail?" by reminder":""}.`,date:new Date(i.created_at)});break;case"envelope:cc":e.push({icon:"contact_mail",message:`A copy has been sent to ${s}.`,date:new Date(i.created_at)});break;case"recipient:delegated":e.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":e.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":e.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":e.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"canceled":case"owner:canceled":e.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":e.push({icon:"link",message:`Owner accessed the In-person link for ${t}.`,date:new Date(i.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",i)}})),e.sort(((e,i)=>i.date.getTime()-e.date.getTime())),e}render(){var e,i,n;if(!this.envelope)return t(s,null);const o=this.endpoint.getSession(),l=a(o,this.envelope),c=this.prepareHistoryEntries();return t(s,{class:this.panelOpen?"open":""},t("div",{class:"side-buttons"},t("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>'}),t("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>'}),t("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&&t("div",{class:"content"},t("div",{class:"title"},"Details"),t("div",{class:"label"},"Envelope ID"),t("div",{class:"value"},this.envelope.id),t("div",{class:"label"},"Date Created"),t("div",{class:"value"},r(new Date(this.envelope.created_at),"PP pp")),t("div",{class:"label"},"Last Modified"),t("div",{class:"value"},r(new Date(this.envelope.updated_at),"PP pp")),t("div",{class:"label"},"Status"),t("div",{class:"value"},this.envelope.status),t("div",{class:"label"},"Verdoc Owner ID"),t("div",{class:"value"},this.envelope.profile_id),t("div",{class:"label"},"Verdoc Owner Name"),t("div",{class:"value"},null===(e=this.envelope.profile)||void 0===e?void 0:e.first_name," ",null===(i=this.envelope.profile)||void 0===i?void 0:i.last_name),t("div",{class:"label"},"Verdoc Owner Email"),t("div",{class:"value"},null===(n=this.envelope.profile)||void 0===n?void 0:n.email)),2===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"Recipients"),this.sortedRecipients.map(((e,i)=>t("div",{class:"recipient-detail"},t("div",{class:"recipient-header"},t("div",{class:"recipient-number"},i+1),t("div",{class:"recipient-type"},e.role_name),t("div",{class:{"recipient-status":!0,[e.status]:!0}},e.status),l&&t("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!this.canResendRecipient(e)},{id:"modify",label:"Modify Recipient",disabled:!this.canModifyRecipient(e)}]})),t("dic",{class:"recipient-content"},t("div",{class:"recipient-name"},e.full_name),t("div",{class:"recipient-name"},e.email),t("div",{class:"recipient-name"},e.phone))))),l&&t("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Manage Recipients",onClick:()=>this.showManageDialog=!0})),3===this.activeTab&&t("div",{class:"content"},t("div",{class:"title"},"History"),c.map((e=>t("div",{class:"history-entry"},t("div",{class:"activity-icon",innerHTML:d[e.icon]||e.icon}),t("div",{class:"activity-details"},t("div",{class:"activity-text"},e.message),t("div",{class:"activity-date"},r(e.date,"PP pp"))))))),this.showManageDialog&&t("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.envelope})},onNext:()=>{this.showManageDialog=!1}}))}};p.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;width:400px}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 .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}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}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}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}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{p as verdocs_envelope_sidebar}
@@ -1 +0,0 @@
1
- import{r as t,h as o}from"./p-9cf1a627.js";const n=class{constructor(o){t(this,o),this.label=void 0,this.startIcon=null,this.endIcon=null,this.size="normal",this.type="button",this.variant="standard",this.disabled=!1}render(){return o("button",{disabled:this.disabled,type:this.type,class:`${this.variant} ${this.size} ${this.type}`},this.startIcon?o("span",{class:"icon start",innerHTML:this.startIcon}):null,o("span",{class:"label"},this.label),this.endIcon?o("span",{class:"icon end",innerHTML:this.endIcon}):null)}};n.style='verdocs-button button{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;text-transform:uppercase;-ms-flex-pack:center;justify-content:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;font-weight:700;cursor:pointer;margin:0}verdocs-button button .icon{margin:0 12px}verdocs-button button .icon svg{fill:#ffffff;display:block}verdocs-button button .label{padding:0 12px}verdocs-button button.small{height:34px;font-size:13px}verdocs-button button.small .icon{margin:0 4px}verdocs-button button.small .icon svg{margin:2px 0 0 0;height:20px}verdocs-button button.small .label{padding:0 4px}verdocs-button button.normal{height:44px;font-size:14px}verdocs-button button.normal .icon.start{margin:0 4px 0 8px}verdocs-button button.normal .icon.end{margin:0 8px 0 4px}verdocs-button button.normal .icon svg{margin:2px 0 0 0;height:22px}verdocs-button button.normal .label{padding:0 10px}verdocs-button button.medium{height:52px;font-size:16px}verdocs-button button.medium .icon.start{margin:0 0 0 18px}verdocs-button button.medium .icon.end{margin:0 18px 0 0}verdocs-button button.medium .icon svg{margin:2px 0 0 0;height:26px}verdocs-button button.medium .label{padding:0 20px}verdocs-button button.large{height:60px;font-size:20px}verdocs-button button.large .icon.start{margin:0 0 0 24px}verdocs-button button.large .icon.end{margin:0 24px 0 0}verdocs-button button.large .icon svg{margin:2px 0 0 0;height:32px}verdocs-button button.large .label{padding:0 34px}verdocs-button button.standard{background:#55bc81;border-radius:4px;outline:none;border:none;color:white}verdocs-button button.standard:disabled{background-color:#999999;cursor:default}verdocs-button button.standard:active:not([disabled]){-webkit-filter:brightness(110%);filter:brightness(110%)}verdocs-button button.text{color:#4c56cb;background:transparent;font-weight:500;padding:0 4px;outline:none;border:none}verdocs-button button.text:disabled{color:#999999}verdocs-button button.text:active:not([disabled]){-webkit-filter:brightness(130%);filter:brightness(130%)}verdocs-button button.text .icon svg{fill:#4c56cb}verdocs-button button.outline{border:1px solid #4c56cb;color:#4c56cb;outline:none;background:transparent;border-radius:4px;padding:0 20px}verdocs-button button.outline:disabled{color:#999999;border:1px solid #999999}verdocs-button button.outline:active{background:#4c56cb;color:white}verdocs-button button.outline .icon svg{fill:#4c56cb}';export{n as verdocs_button}
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as o,H as s}from"./p-9cf1a627.js";import{g as t,r}from"./p-d869c39c.js";import{g as n}from"./p-12e54f39.js";import"./p-05788c2b.js";import{V as l}from"./p-0b4ea5f9.js";import{c as a}from"./p-790beec1.js";import{e as c}from"./p-9b73909f.js";import{V as d}from"./p-ed416acf.js";import{S as p}from"./p-7a1b2643.js";const m={},f=class{constructor(o){e(this,o),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=l.getDefault(),this.envelopeId="",this.canSendAnother=!0,this.canView=!0,this.canDone=!0,this.envelope=void 0,this.isOpen=void 0,this.recipientStatusIcons=[],this.containerId=`verdocs-status-indicator-${Math.random().toString(36).substring(2,11)}`,this.gettingLinks={},this.links={}}async componentWillLoad(){var e,i,o;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[RECIPIENTS] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[RECIPIENTS] Unable to start session, must be authenticated");this.store=await(async(e,i,o=!1)=>{let s=!1;m[i]||(console.debug("[ENVELOPES] No envelope store found for ID, creating",i),m[i]=(e=>{const i=(new Date).toISOString();return a({isLoading:!0,isLoaded:!1,isError:!1,error:null,updateCount:0,roleNames:[],id:e,template_id:"",name:"",status:"pending",profile_id:"",organization_id:"",no_contact:!1,created_at:i,updated_at:i,canceled_at:null,reminder_id:null,envelope_document_id:"",certificate_document_id:null,visibility:"private",histories:[],recipients:[],profile:void 0,certificate:void 0,document:void 0,documents:void 0,fields:void 0})})(i),s=!0);const t=m[i];if(t.use({reset:()=>console.debug("[ENVELOPES] Store got reset"),dispose:()=>console.debug("[ENVELOPES] Store got disposed")}),s||o){console.debug("[ENVELOPES] Reloading envelope",{envelopeId:i,created:s,forceReload:o}),t.state.isLoading=!0,t.state.isLoaded=!1,t.state.isError=!1,t.state.error=void 0;try{const o=await c(e,i);console.debug("[ENVELOPES] Got envelope",o),Object.assign(t.state,o),t.state.isLoaded=!0,t.state.isError=!1,t.state.error=void 0}catch(e){throw console.error("[ENVELOPES] Error loading envelope",e),t.state.isLoaded=!1,t.state.isError=!0,t.state.error=e,e}t.state.isLoading=!1,t.state.updateCount++}return t})(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients()}catch(s){console.log("[RECIPIENTS] Error loading envelope",s),null===(e=this.sdkError)||void 0===e||e.emit(new p(s.message,null===(i=s.response)||void 0===i?void 0:i.status,null===(o=s.response)||void 0===o?void 0:o.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))}handleAnother(e){var i;e.preventDefault(),null===(i=this.another)||void 0===i||i.emit({envelope:this.store.state})}handleView(e){var i;e.preventDefault(),null===(i=this.view)||void 0===i||i.emit({envelope:this.store.state})}handleDone(e){var i;e.preventDefault(),null===(i=this.next)||void 0===i||i.emit({envelope:this.store.state})}copyLink(e){navigator.clipboard.writeText(e).then((()=>d("Link copied to clipboard!",{style:"success",duration:3e3}))).catch((e=>{console.warn("[RECIPIENTS] Error copying to clipboard",e),d(`Unable to copy to clipboard: ${e.message}`,{style:"error"})}))}getLink(e){this.gettingLinks={...this.gettingLinks,[e.role_name]:!0},n(this.endpoint,e.envelope_id,e.role_name).then((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},this.links={...this.links,[e.role_name]:i.link},this.copyLink(i.link)})).catch((i=>{this.gettingLinks={...this.gettingLinks,[e.role_name]:!1},console.log("[RECIPIENTS] Error getting link",i),d("Unable to get link: "+i.message,{style:"error"})}))}render(){var e;return o(s,null,o("div",{class:"summary-content"},o("h1",{class:"summary-title"},"Recipient Summary"),o("div",{class:"summary-rows"},null===(e=this.store.state)||void 0===e?void 0:e.recipients.map((e=>{const i=t(this.store.state),s=r(e,i),n=this.links[e.role_name],l=this.gettingLinks[e.role_name];return o("div",{class:"summary-recipient"},o("div",{class:"role-name"},e.role_name),o("div",{class:"role-details"},o("div",{class:"role-info"},o("div",{class:"role-full-name"},e.full_name," (",e.email||e.phone,")"),s&&!n&&o("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:l,onClick:()=>this.getLink(e)})),n&&o("div",{class:"link-wrapper"},o("div",{class:"link"},n),o("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(n)}))))}))),(this.canSendAnother||this.canView||this.canDone)&&o("div",{class:"buttons"},this.canSendAnother&&o("verdocs-button",{size:"small",label:"Send Another",onClick:e=>this.handleAnother(e)}),this.canView&&o("verdocs-button",{size:"small",label:"View Now",onClick:e=>this.handleView(e)}),this.canDone&&o("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};f.style='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}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%}';export{f as verdocs_envelope_recipient_summary}
@@ -1 +0,0 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++){n=arguments[t];for(var 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,t,i){function r(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?t(e.value):r(e.value).then(s,a)}l((i=i.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(n){return l([e,n])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(t)try{if(i=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:t.label++;return{value:s[1],done:false};case 5:t.label++;r=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){t.label=s[1];break}if(s[0]===6&&t.label<o[1]){t.label=o[1];o=s;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(s);break}if(o[2])t.ops.pop();t.trys.pop();continue}s=n.call(e,t)}catch(e){s=[6,e];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-934a39b4.system.js","./p-8c57f5d0.system.js","./p-494d4276.system.js","./p-54498887.system.js","./p-dc849a58.system.js","./p-b4d11d90.system.js","./p-973ebb54.system.js","./p-ca13070e.system.js","./p-187b20b7.system.js"],(function(e){"use strict";var n,t,i,r,o,s,a,l,c,u,d,p;return{setters:[function(e){n=e.r;t=e.c;i=e.h;r=e.H},function(e){o=e.g;s=e.r},function(e){a=e.g},function(){},function(e){l=e.V},function(e){c=e.c},function(e){u=e.e},function(e){d=e.V},function(e){p=e.S}],execute:function(){var f=this;var m=function(e){var n=(new Date).toISOString();return c({isLoading:true,isLoaded:false,isError:false,error:null,updateCount:0,roleNames:[],id:e,template_id:"",name:"",status:"pending",profile_id:"",organization_id:"",no_contact:false,created_at:n,updated_at:n,canceled_at:null,reminder_id:null,envelope_document_id:"",certificate_document_id:null,visibility:"private",histories:[],recipients:[],profile:undefined,certificate:undefined,document:undefined,documents:undefined,fields:undefined})};var v={};var h=function(e,n,t){if(t===void 0){t=false}return __awaiter(f,void 0,void 0,(function(){var i,r,o,s;return __generator(this,(function(a){switch(a.label){case 0:i=false;if(!v[n]){console.debug("[ENVELOPES] No envelope store found for ID, creating",n);v[n]=m(n);i=true}r=v[n];r.use({reset:function(){return console.debug("[ENVELOPES] Store got reset")},dispose:function(){return console.debug("[ENVELOPES] Store got disposed")}});if(!(i||t))return[3,5];console.debug("[ENVELOPES] Reloading envelope",{envelopeId:n,created:i,forceReload:t});r.state.isLoading=true;r.state.isLoaded=false;r.state.isError=false;r.state.error=undefined;a.label=1;case 1:a.trys.push([1,3,,4]);return[4,u(e,n)];case 2:o=a.sent();console.debug("[ENVELOPES] Got envelope",o);Object.assign(r.state,o);r.state.isLoaded=true;r.state.isError=false;r.state.error=undefined;return[3,4];case 3:s=a.sent();console.error("[ENVELOPES] Error loading envelope",s);r.state.isLoaded=false;r.state.isError=true;r.state.error=s;throw s;case 4:r.state.isLoading=false;r.state.updateCount++;a.label=5;case 5:return[2,r]}}))}))};var g='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}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=t(this,"another",7);this.view=t(this,"view",7);this.next=t(this,"next",7);this.sdkError=t(this,"sdkError",7);this.store=null;this.endpoint=l.getDefault();this.envelopeId="";this.canSendAnother=true;this.canView=true;this.canDone=true;this.envelope=undefined;this.isOpen=undefined;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,t,i,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]}i=this;return[4,h(this.endpoint,this.envelopeId,true)];case 1:i.store=o.sent();this.sortEnvelopeRecipients();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 p(r.message,(n=r.response)===null||n===void 0?void 0:n.status,(t=r.response)===null||t===void 0?void 0:t.data));return[3,3];case 3:return[2]}}))}))};e.prototype.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){navigator.clipboard.writeText(e).then((function(){return d("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENTS] Error copying to clipboard",e);d("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var n;var t=this;this.gettingLinks=__assign(__assign({},this.gettingLinks),(n={},n[e.role_name]=true,n));a(this.endpoint,e.envelope_id,e.role_name).then((function(n){var i,r;t.gettingLinks=__assign(__assign({},t.gettingLinks),(i={},i[e.role_name]=false,i));t.links=__assign(__assign({},t.links),(r={},r[e.role_name]=n.link,r));t.copyLink(n.link)})).catch((function(n){var i;t.gettingLinks=__assign(__assign({},t.gettingLinks),(i={},i[e.role_name]=false,i));console.log("[RECIPIENTS] Error getting link",n);d("Unable to get link: "+n.message,{style:"error"})}))};e.prototype.render=function(){var e=this;var n;return i(r,null,i("div",{class:"summary-content"},i("h1",{class:"summary-title"},"Recipient Summary"),i("div",{class:"summary-rows"},(n=this.store.state)===null||n===void 0?void 0:n.recipients.map((function(n){var t=o(e.store.state);var r=s(n,t);var a=e.links[n.role_name];var l=e.gettingLinks[n.role_name];return i("div",{class:"summary-recipient"},i("div",{class:"role-name"},n.role_name),i("div",{class:"role-details"},i("div",{class:"role-info"},i("div",{class:"role-full-name"},n.full_name," (",n.email||n.phone,")"),r&&!a&&i("verdocs-button",{size:"small",variant:"outline",label:"Get Link",disabled:l,onClick:function(){return e.getLink(n)}})),a&&i("div",{class:"link-wrapper"},i("div",{class:"link"},a),i("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(a)}}))))}))),(this.canSendAnother||this.canView||this.canDone)&&i("div",{class:"buttons"},this.canSendAnother&&i("verdocs-button",{size:"small",label:"Send Another",onClick:function(n){return e.handleAnother(n)}}),this.canView&&i("verdocs-button",{size:"small",label:"View Now",onClick:function(n){return e.handleView(n)}}),this.canDone&&i("verdocs-button",{size:"small",label:"Done",onClick:function(n){return e.handleDone(n)}}))))};return e}());x.style=g}}}));