@verdocs/web-sdk 5.0.31 → 5.0.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. package/dist/cjs/index-ccac8641.js +8 -4
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-build.cjs.entry.js.map +1 -1
  5. package/dist/cjs/{verdocs-envelope-recipient-link_2.cjs.entry.js → verdocs-envelope-recipient-link.cjs.entry.js} +1 -25
  6. package/dist/cjs/verdocs-envelope-recipient-link.cjs.entry.js.map +1 -0
  7. package/dist/cjs/{verdocs-preview_6.cjs.entry.js → verdocs-preview_7.cjs.entry.js} +147 -15
  8. package/dist/cjs/verdocs-preview_7.cjs.entry.js.map +1 -0
  9. package/dist/cjs/verdocs-switch.cjs.entry.js +32 -0
  10. package/dist/cjs/verdocs-switch.cjs.entry.js.map +1 -0
  11. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  12. package/dist/collection/collection-manifest.json +1 -0
  13. package/dist/collection/components/controls/verdocs-switch/verdocs-switch.css +2 -2
  14. package/dist/collection/components/controls/verdocs-switch/verdocs-switch.js +3 -3
  15. package/dist/collection/components/controls/verdocs-switch/verdocs-switch.js.map +1 -1
  16. package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +1 -1
  17. package/dist/collection/components/embeds/verdocs-build/verdocs-build.js.map +1 -1
  18. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +10 -14
  19. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
  20. package/dist/collection/components/templates/verdocs-template-settings/verdocs-template-settings.css +57 -0
  21. package/dist/collection/components/templates/verdocs-template-settings/verdocs-template-settings.js +282 -0
  22. package/dist/collection/components/templates/verdocs-template-settings/verdocs-template-settings.js.map +1 -0
  23. package/dist/components/index.js +2 -0
  24. package/dist/components/index.js.map +1 -1
  25. package/dist/components/{p-f4e068a9.js → p-38e1fed8.js} +4 -4
  26. package/dist/components/{p-f4e068a9.js.map → p-38e1fed8.js.map} +1 -1
  27. package/dist/components/{p-87d3651e.js → p-4c5164d0.js} +11 -15
  28. package/dist/components/p-4c5164d0.js.map +1 -0
  29. package/dist/components/p-7ad22da6.js +212 -0
  30. package/dist/components/p-7ad22da6.js.map +1 -0
  31. package/dist/components/verdocs-build.js +85 -73
  32. package/dist/components/verdocs-build.js.map +1 -1
  33. package/dist/components/verdocs-envelope-sidebar.js +1 -1
  34. package/dist/components/verdocs-send.js +1 -1
  35. package/dist/components/verdocs-switch.js +1 -1
  36. package/dist/components/verdocs-template-settings.d.ts +11 -0
  37. package/dist/components/verdocs-template-settings.js +8 -0
  38. package/dist/components/verdocs-template-settings.js.map +1 -0
  39. package/dist/custom-elements.json +14 -1
  40. package/dist/esm/index-272d51a4.js +8 -4
  41. package/dist/esm/loader.js +1 -1
  42. package/dist/esm/verdocs-build.entry.js +1 -1
  43. package/dist/esm/verdocs-build.entry.js.map +1 -1
  44. package/dist/esm/{verdocs-envelope-recipient-link_2.entry.js → verdocs-envelope-recipient-link.entry.js} +2 -25
  45. package/dist/esm/verdocs-envelope-recipient-link.entry.js.map +1 -0
  46. package/dist/esm/{verdocs-preview_6.entry.js → verdocs-preview_7.entry.js} +148 -17
  47. package/dist/esm/verdocs-preview_7.entry.js.map +1 -0
  48. package/dist/esm/verdocs-switch.entry.js +28 -0
  49. package/dist/esm/verdocs-switch.entry.js.map +1 -0
  50. package/dist/esm/verdocs-web-sdk.js +1 -1
  51. package/dist/esm-es5/index-272d51a4.js +1 -1
  52. package/dist/esm-es5/index-272d51a4.js.map +1 -1
  53. package/dist/esm-es5/loader.js +1 -1
  54. package/dist/esm-es5/loader.js.map +1 -1
  55. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  56. package/dist/esm-es5/verdocs-build.entry.js.map +1 -1
  57. package/dist/esm-es5/{verdocs-envelope-recipient-link_2.entry.js → verdocs-envelope-recipient-link.entry.js} +2 -2
  58. package/dist/esm-es5/verdocs-envelope-recipient-link.entry.js.map +1 -0
  59. package/dist/esm-es5/verdocs-preview_7.entry.js +8 -0
  60. package/dist/esm-es5/verdocs-preview_7.entry.js.map +1 -0
  61. package/dist/esm-es5/verdocs-switch.entry.js +2 -0
  62. package/dist/esm-es5/verdocs-switch.entry.js.map +1 -0
  63. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  64. package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
  65. package/dist/types/components/controls/verdocs-switch/verdocs-switch.d.ts +1 -1
  66. package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +2 -2
  67. package/dist/types/components/templates/verdocs-template-settings/verdocs-template-settings.d.ts +55 -0
  68. package/dist/types/components.d.ts +79 -4
  69. package/dist/verdocs-web-sdk/p-060dbde7.entry.js +8 -0
  70. package/dist/verdocs-web-sdk/p-060dbde7.entry.js.map +1 -0
  71. package/dist/verdocs-web-sdk/p-17457a7a.entry.js +2 -0
  72. package/dist/verdocs-web-sdk/p-17457a7a.entry.js.map +1 -0
  73. package/dist/verdocs-web-sdk/p-21e9abff.system.entry.js +2 -0
  74. package/dist/verdocs-web-sdk/p-21e9abff.system.entry.js.map +1 -0
  75. package/dist/verdocs-web-sdk/p-27ddc017.system.entry.js +2 -0
  76. package/dist/verdocs-web-sdk/p-27ddc017.system.entry.js.map +1 -0
  77. package/dist/verdocs-web-sdk/{p-6f1e2f2f.entry.js → p-8e699235.entry.js} +2 -2
  78. package/dist/verdocs-web-sdk/p-8e699235.entry.js.map +1 -0
  79. package/dist/verdocs-web-sdk/{p-cabfdb9d.system.entry.js → p-a63b359e.system.entry.js} +2 -2
  80. package/dist/verdocs-web-sdk/p-a63b359e.system.entry.js.map +1 -0
  81. package/dist/verdocs-web-sdk/p-aca6553d.system.entry.js +8 -0
  82. package/dist/verdocs-web-sdk/p-aca6553d.system.entry.js.map +1 -0
  83. package/dist/verdocs-web-sdk/p-dddd328d.entry.js +2 -0
  84. package/dist/verdocs-web-sdk/p-dddd328d.entry.js.map +1 -0
  85. package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
  86. package/dist/verdocs-web-sdk/p-e2b70dfb.system.js.map +1 -1
  87. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  88. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
  89. package/package.json +1 -1
  90. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js.map +0 -1
  91. package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +0 -1
  92. package/dist/components/p-87d3651e.js.map +0 -1
  93. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js.map +0 -1
  94. package/dist/esm/verdocs-preview_6.entry.js.map +0 -1
  95. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js.map +0 -1
  96. package/dist/esm-es5/verdocs-preview_6.entry.js +0 -8
  97. package/dist/esm-es5/verdocs-preview_6.entry.js.map +0 -1
  98. package/dist/verdocs-web-sdk/p-33064db4.system.entry.js +0 -8
  99. package/dist/verdocs-web-sdk/p-33064db4.system.entry.js.map +0 -1
  100. package/dist/verdocs-web-sdk/p-6f1e2f2f.entry.js.map +0 -1
  101. package/dist/verdocs-web-sdk/p-9e04b9f0.entry.js +0 -8
  102. package/dist/verdocs-web-sdk/p-9e04b9f0.entry.js.map +0 -1
  103. package/dist/verdocs-web-sdk/p-b9fee1a7.entry.js +0 -2
  104. package/dist/verdocs-web-sdk/p-b9fee1a7.entry.js.map +0 -1
  105. package/dist/verdocs-web-sdk/p-cabfdb9d.system.entry.js.map +0 -1
  106. package/dist/verdocs-web-sdk/p-e3efeb57.system.entry.js +0 -2
  107. package/dist/verdocs-web-sdk/p-e3efeb57.system.entry.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{r as e,c as i,h as t,H as r}from"./p-b9654a5e.js";import{VerdocsEndpoint as o,getEnvelope as s,getInPersonLink as n,formatFullName as l}from"@verdocs/js-sdk";import{V as c}from"./p-04c07b7b.js";import{S as a}from"./p-fd97809c.js";import{S as d}from"./p-d4be87ef.js";const p='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-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:rgba(0, 0, 0, 0.4980392157)}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:rgb(249, 250, 251)}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:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}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;overflow:hidden;margin:0 6px 0 0;border-radius:4px;white-space:nowrap;-ms-flex-align:center;align-items:center;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}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%}';const h=p;const b=class{constructor(t){e(this,t);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=o.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.gettingLink=true;this.link="";this.loading=true;this.envelope=null;this.recipient=null}async componentWillLoad(){var e,i,t;try{this.endpoint.loadSession();if(!this.envelopeId){console.log(`[RECIPIENT_LINK] Missing required envelope ID ${this.envelopeId}`);return}if(!this.endpoint.session){console.log("[RECIPIENT_LINK] Unable to start session, must be authenticated");return}this.listenToEnvelope()}catch(r){console.log("[RECIPIENT_LINK] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new a(r.message,(i=r.response)===null||i===void 0?void 0:i.status,(t=r.response)===null||t===void 0?void 0:t.data))}}disconnectedCallback(){this.unlistenToEnvelope()}async listenToEnvelope(){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();d.subscribe("envelopes",this.envelopeId,(()=>s(this.endpoint,this.envelopeId)),false,(e=>{var i;this.envelope=e;this.loading=false;this.recipient=(((i=this.envelope)===null||i===void 0?void 0:i.recipients)||[]).find((e=>e.role_name===this.roleName));this.getLink(this.recipient)}))}unlistenToEnvelope(){if(this.envelopeListenerId){d.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}}handleDone(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})}copyLink(e){navigator.clipboard.writeText(e).then((()=>c("Link copied to clipboard!",{style:"success",duration:3e3}))).catch((e=>{console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);c(`Unable to copy to clipboard: ${e.message}`,{style:"error"})}))}getLink(e){this.gettingLink=true;n(this.endpoint,e.envelope_id,e.role_name).then((e=>{this.gettingLink=false;this.link=e.link})).catch((e=>{this.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);c("Unable to get link: "+e.message,{style:"error"})}))}render(){if(this.loading||!this.recipient){return t(r,null)}const e=l(this.recipient);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"},e," (",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:()=>this.getLink(this.recipient)})),this.link&&t("div",{class:"link-wrapper"},t("div",{class:"link"},this.link),t("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:()=>this.copyLink(this.link)}))))),t("div",{class:"buttons"},t("verdocs-button",{size:"small",label:"Done",onClick:e=>this.handleDone(e)}))))}};b.style=h;const f='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-switch{font-family:"Inter", "Barlow", sans-serif}verdocs-switch .switch{display:-ms-inline-flexbox;display:inline-flex;height:24px;width:44px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:12px;border:transparent;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .switch.primary[data-state=checked]{background:#55bc81}verdocs-switch .switch.primary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .switch.secondary[data-state=checked]{background:#4c56cb}verdocs-switch .switch.secondary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .slider{display:block;width:20px;height:20px;border-radius:20px;background:#ffffff;-webkit-box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .slider[data-state=checked]{-webkit-transform:translateX(22px);transform:translateX(22px)}verdocs-switch .slider[data-state=unchecked]{-webkit-transform:translateX(2px);transform:translateX(2px)}verdocs-switch .switch.disabled.primary,verdocs-switch .switch.disabled.secondary{cursor:not-allowed;background:#666666}';const x=f;const m=class{constructor(t){e(this,t);this.checkedChange=i(this,"checkedChange",7);this.checked=false;this.theme="primary";this.disabled=false}render(){return t("button",{key:"e9153549bcee6b924ce7a7d620d1096fa91782d2",value:"on",type:"button",role:"switch",class:`switch ${this.theme} ${this.disabled?"disabled":""}`,"data-state":this.checked?"checked":"unchecked","aria-checked":this.checked?"checked":"unchecked",onClick:()=>{var e;if(!this.disabled){this.checked=!this.checked;(e=this.checkedChange)===null||e===void 0?void 0:e.emit(this.checked)}}},t("span",{key:"61d97d7571b7f52f186ce44daaf0ef7132c6d5f6","data-state":this.checked?"checked":"unchecked",class:"slider"}))}};m.style=x;export{b as verdocs_envelope_recipient_link,m as verdocs_switch};
2
- //# sourceMappingURL=p-b9fee1a7.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["verdocsEnvelopeRecipientLinkCss","VerdocsEnvelopeRecipientLinkStyle0","VerdocsEnvelopeRecipientLink","this","envelopeListenerId","VerdocsEndpoint","getDefault","componentWillLoad","endpoint","loadSession","envelopeId","console","log","session","listenToEnvelope","e","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","disconnectedCallback","unlistenToEnvelope","Store","subscribe","getEnvelope","envelope","loading","recipient","recipients","find","r","role_name","roleName","getLink","store","delListener","handleDone","preventDefault","next","copyLink","link","navigator","clipboard","writeText","then","VerdocsToast","style","duration","catch","warn","gettingLink","getInPersonLink","envelope_id","render","h","Host","fullName","formatFullName","class","email","phone","size","variant","label","disabled","onClick","verdocsSwitchCss","VerdocsSwitchStyle0","VerdocsSwitch","key","value","type","role","theme","checked","checkedChange"],"sources":["src/components/envelopes/verdocs-envelope-recipient-link/verdocs-envelope-recipient-link.scss?tag=verdocs-envelope-recipient-link","src/components/envelopes/verdocs-envelope-recipient-link/verdocs-envelope-recipient-link.tsx","src/components/controls/verdocs-switch/verdocs-switch.scss?tag=verdocs-switch","src/components/controls/verdocs-switch/verdocs-switch.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-envelope-recipient-link {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 100000;\n position: fixed;\n align-items: center;\n justify-content: center;\n font-family: $primary-font;\n background-color: #0000007f;\n\n .summary-content {\n width: 600px;\n display: flex;\n max-width: 90%;\n font-size: 18px;\n flex: 0 0 600px;\n border-radius: 6px;\n background: #ffffff;\n flex-direction: column;\n padding: 30px 20px 20px;\n\n .summary-title {\n font-size: 20px;\n font-weight: 700;\n margin: 0 0 10px 0;\n color: $verdocs-dark-blue;\n }\n }\n\n .summary-recipient {\n display: flex;\n color: $verdocs-grey-1;\n margin: 8px 0 24px 0;\n flex-direction: column;\n\n .role-name {\n flex: 1;\n display: flex;\n font-size: 14px;\n font-weight: 600;\n margin: 0 0 8px 0;\n color: $verdocs-grey-0;\n }\n\n .role-details {\n }\n\n .role-info {\n gap: 5px;\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n }\n\n .role-full-name {\n flex: 1;\n height: 34px;\n display: flex;\n font-size: 16px;\n padding: 0 12px;\n border-radius: 4px;\n align-items: center;\n border: 1px solid #cccccc;\n background: rgb(249, 250, 251);\n }\n\n .recipient-link {\n width: 120px;\n padding: 0 16px;\n font-weight: 500;\n margin: 0 0 0 8px;\n text-align: center;\n font-size: 0.875rem;\n border-radius: 100%;\n color: rgb(55, 65, 81);\n line-height: 1.25rem;\n background-color: #d8d8d8;\n border: 2px solid rgb(156, 163, 175);\n }\n\n .link-wrapper {\n gap: 5px;\n display: flex;\n margin: 4px 0 0 0;\n flex-direction: row;\n\n .link {\n flex: 1;\n height: 34px;\n display: flex;\n font-size: 16px;\n padding: 0 12px;\n overflow: hidden;\n margin: 0 6px 0 0;\n border-radius: 4px;\n white-space: nowrap;\n align-items: center;\n text-overflow: ellipsis;\n border: 1px solid #cccccc;\n background: rgb(249, 250, 251);\n }\n }\n }\n\n .buttons {\n display: flex;\n column-gap: 15px;\n margin: 10px 0 0 0;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n verdocs-button {\n flex: 0 0 120px;\n margin-left: 10px;\n white-space: nowrap;\n\n button {\n width: 100%;\n }\n }\n }\n}\n","import {Component, Prop, Host, h, State, Event, EventEmitter} from '@stencil/core';\nimport {formatFullName, getEnvelope, getInPersonLink, IEnvelope, IRecipient, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Displays a single recipient from an envelope, with the opportunity to copy an in-person\n * signing link for that recipient to use.\n */\n@Component({\n tag: 'verdocs-envelope-recipient-link',\n styleUrl: 'verdocs-envelope-recipient-link.scss',\n})\nexport class VerdocsEnvelopeRecipientLink {\n private envelopeListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The envelope ID to edit.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * The role to load.\n */\n @Prop() roleName: string = '';\n\n /**\n * Event fired when the user clicks Done to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) next: EventEmitter<{envelope: IEnvelope}>;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n @State() isOpen: boolean;\n @State() gettingLink = true;\n @State() link = '';\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n @State() recipient: IRecipient | null = null;\n\n async componentWillLoad() {\n try {\n this.endpoint.loadSession();\n\n if (!this.envelopeId) {\n console.log(`[RECIPIENT_LINK] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n if (!this.endpoint.session) {\n console.log('[RECIPIENT_LINK] Unable to start session, must be authenticated');\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[RECIPIENT_LINK] Error loading envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[SIDEBAR] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n this.loading = false;\n\n this.recipient = (this.envelope?.recipients || []).find(r => r.role_name === this.roleName);\n this.getLink(this.recipient);\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n handleDone(e: any) {\n e.preventDefault();\n this.next?.emit({envelope: this.envelope});\n }\n\n copyLink(link: string) {\n navigator.clipboard\n .writeText(link)\n .then(() => VerdocsToast('Link copied to clipboard!', {style: 'success', duration: 3000}))\n .catch(e => {\n console.warn('[RECIPIENT_LINK] Error copying to clipboard', e);\n VerdocsToast(`Unable to copy to clipboard: ${e.message}`, {style: 'error'});\n });\n }\n\n getLink(recipient: IRecipient) {\n this.gettingLink = true;\n getInPersonLink(this.endpoint, recipient.envelope_id, recipient.role_name)\n .then(response => {\n this.gettingLink = false;\n this.link = response.link;\n // NOTE: Left here for documentation purposes. We don't auto-copy the link because many browsers now\n // error on that because we aren't the focus/gesture-initiator since we're a new component just being\n // drawn in the DOM. So we let the user click to trigger that.\n // this.copyLink(response.link);\n })\n .catch(e => {\n this.gettingLink = false;\n console.log('[RECIPIENT_LINK] Error getting link', e);\n VerdocsToast('Unable to get link: ' + e.message, {style: 'error'});\n });\n }\n\n render() {\n if (this.loading || !this.recipient) {\n return <Host />;\n }\n\n // const recipientsWithActions = getRecipientsWithActions(this.store.state); const showLinkButton = recipientCanAct(recipient, recipientsWithActions); const link =\n // this.links[recipient.role_name]; const gettingLink = this.gettingLinks[recipient.role_name]; return (\n\n const fullName = formatFullName(this.recipient);\n return (\n <Host>\n <div class=\"summary-content\">\n <h1 class=\"summary-title\">In-Person Signing Link</h1>\n <div class=\"summary-rows\">\n <div class=\"summary-recipient\">\n <div class=\"role-name\">{this.recipient.role_name}</div>\n <div class=\"role-details\">\n <div class=\"role-info\">\n <div class=\"role-full-name\">\n {fullName} ({this.recipient.email || this.recipient.phone})\n </div>\n {!this.link && (\n <verdocs-button\n size=\"small\"\n variant=\"outline\"\n label={this.gettingLink ? 'Loading...' : 'Get Link'}\n disabled={this.gettingLink}\n onClick={() => this.getLink(this.recipient)}\n />\n )}\n </div>\n\n {this.link && (\n <div class=\"link-wrapper\">\n <div class=\"link\">{this.link}</div>\n <verdocs-button size=\"small\" variant=\"outline\" label=\"Copy\" onClick={() => this.copyLink(this.link)} />\n </div>\n )}\n </div>\n </div>\n </div>\n\n <div class=\"buttons\">\n <verdocs-button size=\"small\" label=\"Done\" onClick={e => this.handleDone(e)} />\n </div>\n </div>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-switch {\n font-family: $primary-font;\n\n .switch {\n display: inline-flex;\n height: 24px;\n width: 44px;\n flex-shrink: 0;\n align-items: center;\n cursor: pointer;\n border-radius: 12px;\n border: transparent;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n }\n\n .switch.primary[data-state='checked'] {\n background: $primary-color;\n }\n\n .switch.primary[data-state='unchecked'] {\n background: $extra-light-border-color;\n }\n\n .switch.secondary[data-state='checked'] {\n background: $secondary-color;\n }\n\n .switch.secondary[data-state='unchecked'] {\n background: $extra-light-border-color;\n }\n\n .slider {\n display: block;\n width: 20px;\n height: 20px;\n border-radius: 20px;\n background: #ffffff;\n box-shadow:\n 0 10px 15px -3px rgb(0 0 0 / 0.1),\n 0 4px 6px -4px rgb(0 0 0 / 0.1);\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n }\n\n .slider[data-state='checked'] {\n transform: translateX(22px);\n }\n\n .slider[data-state='unchecked'] {\n transform: translateX(2px);\n }\n\n .switch.disabled.primary,\n .switch.disabled.secondary {\n cursor: not-allowed;\n background: $dark-disabled-color;\n }\n}\n","import {Component, Prop, h, EventEmitter, Event} from '@stencil/core';\n\n/**\n * Displays a toggle switch.\n *\n * ```ts\n * <verdocs-switch checked={sendReminders} onCheckedChange={setSendReminders} />\n * ```\n */\n@Component({\n tag: 'verdocs-switch',\n styleUrl: 'verdocs-switch.scss',\n})\nexport class VerdocsSwitch {\n @Prop({mutable: true}) checked: boolean = false;\n\n /**\n * Select purple or green treatments.\n */\n @Prop() theme: 'primary' | 'secondary' = 'primary';\n\n /**\n * Should the field be disabled?\n */\n @Prop() disabled: boolean = false;\n\n @Event({composed: true}) checkedChange: EventEmitter<boolean>;\n\n render() {\n return (\n <button\n value=\"on\"\n type=\"button\"\n role=\"switch\"\n class={`switch ${this.theme} ${this.disabled ? 'disabled' : ''}`}\n data-state={this.checked ? 'checked' : 'unchecked'}\n aria-checked={this.checked ? 'checked' : 'unchecked'}\n onClick={() => {\n if (!this.disabled) {\n this.checked = !this.checked;\n this.checkedChange?.emit(this.checked);\n }\n }}\n >\n <span data-state={this.checked ? 'checked' : 'unchecked'} class=\"slider\"></span>\n </button>\n );\n }\n}\n"],"mappings":"iRAAA,MAAMA,EAAkC,ghGACxC,MAAAC,EAAeD,E,MCaFE,EAA4B,M,uFAC/BC,KAAAC,mBAAqB,K,cAKOC,EAAgBC,a,gBAKvB,G,cAKF,G,uCAeJ,K,UACP,G,aAEG,K,cACmB,K,eACE,I,CAExC,uBAAMC,G,UACJ,IACEJ,KAAKK,SAASC,cAEd,IAAKN,KAAKO,WAAY,CACpBC,QAAQC,IAAI,iDAAiDT,KAAKO,cAClE,M,CAGF,IAAKP,KAAKK,SAASK,QAAS,CAC1BF,QAAQC,IAAI,mEACZ,M,CAGFT,KAAKW,kB,CACL,MAA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A,UAAAe,IAAA,2CACEC,MAAM,KACNC,KAAK,SACLC,KAAK,SACLd,MAAO,UAAU7D,KAAK4E,SAAS5E,KAAKmE,SAAW,WAAa,KAAI,aACpDnE,KAAK6E,QAAU,UAAY,YAAW,eACpC7E,KAAK6E,QAAU,UAAY,YACzCT,QAAS,K,MACP,IAAKpE,KAAKmE,SAAU,CAClBnE,KAAK6E,SAAW7E,KAAK6E,SACrBhE,EAAAb,KAAK8E,iBAAa,MAAAjE,SAAA,SAAAA,EAAEE,KAAKf,KAAK6E,Q,IAIlCpB,EAAA,QAAAe,IAAA,wDAAkBxE,KAAK6E,QAAU,UAAY,YAAahB,MAAM,W","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["verdocsBuildCss","VerdocsBuildStyle0","VerdocsBuild","exports","this","templateListenerId","VerdocsEndpoint","getDefault","class_1","prototype","onTemplateIdChanged","newTemplateId","oldTemplateId","step","loadTemplate","catch","e","console","log","onStepChanged","templateId","componentWillLoad","endpoint","loadSession","session","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","_d","_e","_f","Store","subscribe","getTemplate","_this","template","loading","disconnectedCallback","unlistenToTemplate","store","delListener","handleCancel","handleTemplateCreated","_g","sent","stepChanged","handleRolesUpdated","templateUpdated","detail","handleTemplateUpdated","handleAttachmentsNext","handleRolesNext","handleStepChanged","render","h","Host","class","onSdkError","onExit","onNext","onTemplateUpdated","onRolesUpdated","style","flexDirection","gap","display","maxWidth","margin","backgroundColor","padding","onSend","send","width","flex"],"sources":["src/components/embeds/verdocs-build/verdocs-build.scss?tag=verdocs-build","src/components/embeds/verdocs-build/verdocs-build.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-build {\n display: flex;\n flex-direction: column;\n font-family: $verdocs-primary-font;\n\n .content {\n flex: 1;\n gap: 20px;\n display: flex;\n align-items: center;\n flex-direction: column;\n //box-shadow: 0 0 7px -3px #000000cc;\n }\n\n verdocs-template-attachments,\n verdocs-template-roles {\n margin: 20px;\n }\n\n verdocs-template-fields {\n border-top: 1px solid #777777;\n }\n\n verdocs-template-attachments {\n padding: 20px;\n background: #ffffff;\n }\n\n verdocs-template-fields {\n width: 100%;\n }\n\n verdocs-preview {\n flex: 1;\n }\n\n .preview-container {\n flex-direction: row;\n display: flex;\n width: 100%;\n background-color: #eeeeee;\n max-height: 100%;\n\n @media all and (max-width: 450px) {\n flex-direction: column;\n }\n }\n\n .preview-send-wrapper {\n display: flex;\n flex: 0 0 300px;\n background-color: #ffffff;\n box-shadow: 1px 1px 6px -2px #0000007f;\n\n @media all and (max-width: 450px) {\n flex: 0;\n }\n }\n\n .preview-preview-wrapper {\n display: flex;\n flex: 1;\n justify-content: center;\n overflow-y: scroll;\n }\n}\n","import {getTemplate, ICreateEnvelopeRecipient, IRole, ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, Prop, h, Element, Event, EventEmitter, Host, Watch, State} from '@stencil/core';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nexport type TVerdocsBuildStep = 'attachments' | 'roles' | 'settings' | 'fields' | 'preview';\n\n/**\n * Display a template building experience. Several event callbacks provide status updates to the\n * parent application to support interface updates.\n *\n * ```ts\n * <verdocs-build templateId={templateId} step=\"preview\" onSend={(detail) => {\n * console.log('Sent envelope from template', detail);\n * }} />\n * ```\n */\n@Component({\n tag: 'verdocs-build',\n styleUrl: 'verdocs-build.scss',\n shadow: false,\n})\nexport class VerdocsBuild {\n private templateListenerId = null;\n\n @Element() el!: any;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the template to create the document from. Unlike most other components, this is an optional parameter here.\n * If the template ID is known, `step` may also be specified to force displaying a specific step in the creation process.\n * If it is not specified, `step` will be ignored and the create step will be shown.\n */\n @Prop({reflect: true, mutable: true}) templateId: string | null = null;\n\n /**\n * The step in the creation process to display.\n */\n @Prop({reflect: true, mutable: true}) step: TVerdocsBuildStep = 'preview';\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the user selects a different step.\n */\n @Event({composed: true}) stepChanged: EventEmitter<TVerdocsBuildStep>;\n\n /**\n * The user completed the Send form and clicked send.\n */\n @Event({composed: true}) send: EventEmitter<{recipients: ICreateEnvelopeRecipient[]; name: string; template_id: string}>;\n\n /**\n * Event fired when the template is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n @Event({composed: true}) templateUpdated: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate; event: string}>;\n\n /**\n * Event fired when the template is created by the upload step.\n */\n @Event({composed: true}) templateCreated: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate; event: string}>;\n\n /**\n * Event fired when roles are updated in the roles step.\n */\n @Event({composed: true}) rolesUpdated: EventEmitter<{endpoint: VerdocsEndpoint; templateId: string; event: 'added' | 'deleted' | 'updated'; roles: IRole[]}>;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n @Watch('templateId')\n onTemplateIdChanged(newTemplateId: string, oldTemplateId: string) {\n if (!oldTemplateId && newTemplateId && this.step === 'attachments') {\n this.step = 'preview';\n }\n\n this.loadTemplate(newTemplateId).catch((e: any) => console.log('Unknown Error', e));\n }\n\n @Watch('step')\n onStepChanged() {\n // We reload the template here even if only the step changed in case\n // we were out of sync before\n this.loadTemplate(this.templateId).catch((e: any) => console.log('Unknown Error', e));\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.loadSession();\n if (!this.endpoint.session) {\n console.log('[BUILD] Unable to start builder session, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n console.log(`[BUILD] No template ID, activating upload mode`);\n this.step = 'attachments';\n return;\n }\n\n try {\n this.loadTemplate(this.templateId).catch(e => console.log('[BUILD] Unable to load template', e));\n } catch (e) {\n console.log('[BUILD] Error loading template', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n } catch (e) {\n console.log('[BUILD] Error with builder session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n async loadTemplate(templateId: string) {\n if (templateId) {\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n }\n\n disconnectedCallback() {\n console.log('[BUILD] Disconnected');\n this.unlistenToTemplate();\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n handleCancel() {\n this.step = 'preview';\n }\n\n async handleTemplateCreated(templateId: string) {\n await this.loadTemplate(templateId);\n this.templateId = templateId;\n this.step = 'roles';\n this.stepChanged?.emit('roles');\n }\n\n async handleRolesUpdated(e: any) {\n this.templateUpdated?.emit(e.detail);\n }\n\n async handleTemplateUpdated(e: any) {\n this.templateUpdated?.emit(e.detail);\n }\n\n handleAttachmentsNext() {\n this.step = 'roles';\n this.stepChanged?.emit('roles');\n }\n\n handleRolesNext() {\n this.step = 'fields';\n this.stepChanged?.emit('fields');\n }\n\n handleStepChanged(step: TVerdocsBuildStep) {\n this.step = step;\n this.stepChanged?.emit(step);\n }\n\n render() {\n if (this.loading) {\n return (\n <Host class=\"loading\">\n <verdocs-loader />\n </Host>\n );\n }\n\n if (!this.endpoint.session) {\n return (\n <Host>\n <verdocs-component-error message=\"You must be authenticated to use this module.\" />\n </Host>\n );\n }\n\n return (\n <Host>\n <div class=\"content\">\n <verdocs-template-build-tabs\n endpoint={this.endpoint}\n templateId={this.templateId}\n step={this.step}\n onSdkError={e => this.sdkError?.emit(e.detail)}\n onStepChanged={e => this.handleStepChanged(e.detail)}\n />\n\n {this.step === 'attachments' && (\n <verdocs-template-attachments\n templateId={this.templateId}\n endpoint={this.endpoint}\n onExit={() => this.handleCancel()}\n onNext={() => this.handleAttachmentsNext()}\n onTemplateUpdated={e => this.handleTemplateUpdated(e)}\n />\n )}\n\n {this.step === 'roles' && (\n <verdocs-template-roles\n templateId={this.templateId}\n endpoint={this.endpoint}\n onExit={() => this.handleCancel()}\n onNext={() => this.handleRolesNext()}\n onRolesUpdated={e => this.handleRolesUpdated(e)}\n />\n )}\n\n {this.step === 'settings' && (\n <div style={{flexDirection: 'column', gap: '20px', display: 'flex', maxWidth: '400px', margin: '20px'}}>\n <verdocs-template-name\n templateId={this.templateId}\n endpoint={this.endpoint}\n style={{backgroundColor: '#ffffff', padding: '20px'}}\n onTemplateUpdated={e => this.handleTemplateUpdated(e)}\n />\n <verdocs-template-reminders\n templateId={this.templateId}\n endpoint={this.endpoint}\n style={{backgroundColor: '#ffffff', padding: '20px'}}\n onTemplateUpdated={e => this.handleTemplateUpdated(e)}\n />\n <verdocs-template-visibility\n templateId={this.templateId}\n endpoint={this.endpoint}\n style={{backgroundColor: '#ffffff', padding: '20px'}}\n onTemplateUpdated={e => this.handleTemplateUpdated(e)}\n />\n </div>\n )}\n\n {this.step === 'fields' && <verdocs-template-fields templateId={this.templateId} endpoint={this.endpoint} onTemplateUpdated={e => this.handleTemplateUpdated(e)} />}\n\n {this.step === 'preview' && (\n <div class=\"preview-container\">\n <div class=\"preview-send-wrapper\">\n <verdocs-send templateId={this.templateId} endpoint={this.endpoint} onSend={e => this.send?.emit(e.detail)} style={{width: '100%'}} />\n </div>\n <div class=\"preview-preview-wrapper\">\n <verdocs-preview templateId={this.templateId} endpoint={this.endpoint} style={{display: 'flex', flex: '1', maxWidth: '1000px'}} />\n </div>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"mxDAAA,IAAMA,EAAkB,quDACxB,IAAAC,EAAeD,E,ICqBFE,EAAYC,EAAA,2B,4QACfC,KAAAC,mBAAqB,K,cAOOC,EAAgBC,a,gBAOc,K,UAKF,U,aAiC7C,K,cACmB,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yB,EAAKe,sBAAsBxC,EAA3B,IAE1B6C,EAAA,8BACEzC,WAAYhB,KAAKgB,WACjBE,SAAUlB,KAAKkB,SACf+C,MAAO,CAACM,gBAAiB,UAAWC,QAAS,QAC7CT,kBAAmB,SAAAnD,GAAK,OAAAyB,EAAKe,sBAAsBxC,EAA3B,IAE1B6C,EAAA,+BACEzC,WAAYhB,KAAKgB,WACjBE,SAAUlB,KAAKkB,SACf+C,MAAO,CAACM,gBAAiB,UAAWC,QAAS,QAC7CT,kBAAmB,SAAAnD,GAAK,OAAAyB,EAAKe,sBAAsBxC,EAA3B,KAK7BZ,KAAKS,OAAS,UAAYgD,EAAA,2BAAyBzC,WAAYhB,KAAKgB,WAAYE,SAAUlB,KAAKkB,SAAU6C,kBAAmB,SAAAnD,GAAK,OAAAyB,EAAKe,sBAAsBxC,EAA3B,IAEjIZ,KAAKS,OAAS,WACbgD,EAAA,OAAKE,MAAM,qBACTF,EAAA,OAAKE,MAAM,wBACTF,EAAA,gBAAczC,WAAYhB,KAAKgB,WAAYE,SAAUlB,KAAKkB,SAAUuD,OAAQ,SAAA7D,GAAC,IAAAS,EAAI,OAAAA,EAAAgB,EAAKqC,QAAI,MAAArD,SAAA,SAAAA,EAAEE,KAAKX,EAAEuC,OAAO,EAAEc,MAAO,CAACU,MAAO,WAE7HlB,EAAA,OAAKE,MAAM,2BACTF,EAAA,mBAAiBzC,WAAYhB,KAAKgB,WAAYE,SAAUlB,KAAKkB,SAAU+C,MAAO,CAACG,QAAS,OAAQQ,KAAM,IAAKP,SAAU,e,kRA9O5G,I","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,i,t,r){function n(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function c(e){try{a(r["throw"](e))}catch(e){o(e)}}function a(e){e.done?t(e.value):n(e.value).then(s,c)}a((r=r.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,n,o,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(e){return function(i){return a([e,i])}}function a(c){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,c[0]&&(t=0)),t)try{if(r=1,n&&(o=c[0]&2?n["return"]:c[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;if(n=0,o)c=[c[0]&2,o.value];switch(c[0]){case 0:case 1:o=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;n=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){t.label=c[1];break}if(c[0]===6&&t.label<o[1]){t.label=o[1];o=c;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(c);break}if(o[2])t.ops.pop();t.trys.pop();continue}c=i.call(e,t)}catch(e){c=[6,e];n=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-9186f42e.system.js","@verdocs/js-sdk","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-52c3e8b0.system.js"],(function(e){"use strict";var i,t,r,n,o,s,c,a,l,d,u;return{setters:[function(e){i=e.r;t=e.c;r=e.h;n=e.H},function(e){o=e.VerdocsEndpoint;s=e.getEnvelope;c=e.getInPersonLink;a=e.formatFullName},function(e){l=e.V},function(e){d=e.S},function(e){u=e.S}],execute:function(){var f='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-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:rgba(0, 0, 0, 0.4980392157)}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:rgb(249, 250, 251)}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:rgb(55, 65, 81);line-height:1.25rem;background-color:#d8d8d8;border:2px solid rgb(156, 163, 175)}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;overflow:hidden;margin:0 6px 0 0;border-radius:4px;white-space:nowrap;-ms-flex-align:center;align-items:center;text-overflow:ellipsis;border:1px solid #cccccc;background:rgb(249, 250, 251)}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 p=f;var b=e("verdocs_envelope_recipient_link",function(){function e(e){i(this,e);this.next=t(this,"next",7);this.sdkError=t(this,"sdkError",7);this.envelopeListenerId=null;this.endpoint=o.getDefault();this.envelopeId="";this.roleName="";this.isOpen=undefined;this.gettingLink=true;this.link="";this.loading=true;this.envelope=null;this.recipient=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t;return __generator(this,(function(r){try{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]}this.listenToEnvelope()}catch(r){console.log("[RECIPIENT_LINK] Error loading envelope",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(r.message,(i=r.response)===null||i===void 0?void 0:i.status,(t=r.response)===null||t===void 0?void 0:t.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(i){console.log("[SIDEBAR] Loading envelope",this.envelopeId);this.unlistenToEnvelope();u.subscribe("envelopes",this.envelopeId,(function(){return s(e.endpoint,e.envelopeId)}),false,(function(i){var t;e.envelope=i;e.loading=false;e.recipient=(((t=e.envelope)===null||t===void 0?void 0:t.recipients)||[]).find((function(i){return i.role_name===e.roleName}));e.getLink(e.recipient)}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){u.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.handleDone=function(e){var i;e.preventDefault();(i=this.next)===null||i===void 0?void 0:i.emit({envelope:this.envelope})};e.prototype.copyLink=function(e){navigator.clipboard.writeText(e).then((function(){return l("Link copied to clipboard!",{style:"success",duration:3e3})})).catch((function(e){console.warn("[RECIPIENT_LINK] Error copying to clipboard",e);l("Unable to copy to clipboard: ".concat(e.message),{style:"error"})}))};e.prototype.getLink=function(e){var i=this;this.gettingLink=true;c(this.endpoint,e.envelope_id,e.role_name).then((function(e){i.gettingLink=false;i.link=e.link})).catch((function(e){i.gettingLink=false;console.log("[RECIPIENT_LINK] Error getting link",e);l("Unable to get link: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;if(this.loading||!this.recipient){return r(n,null)}var i=a(this.recipient);return r(n,null,r("div",{class:"summary-content"},r("h1",{class:"summary-title"},"In-Person Signing Link"),r("div",{class:"summary-rows"},r("div",{class:"summary-recipient"},r("div",{class:"role-name"},this.recipient.role_name),r("div",{class:"role-details"},r("div",{class:"role-info"},r("div",{class:"role-full-name"},i," (",this.recipient.email||this.recipient.phone,")"),!this.link&&r("verdocs-button",{size:"small",variant:"outline",label:this.gettingLink?"Loading...":"Get Link",disabled:this.gettingLink,onClick:function(){return e.getLink(e.recipient)}})),this.link&&r("div",{class:"link-wrapper"},r("div",{class:"link"},this.link),r("verdocs-button",{size:"small",variant:"outline",label:"Copy",onClick:function(){return e.copyLink(e.link)}}))))),r("div",{class:"buttons"},r("verdocs-button",{size:"small",label:"Done",onClick:function(i){return e.handleDone(i)}}))))};return e}());b.style=p;var h='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-switch{font-family:"Inter", "Barlow", sans-serif}verdocs-switch .switch{display:-ms-inline-flexbox;display:inline-flex;height:24px;width:44px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;cursor:pointer;border-radius:12px;border:transparent;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .switch.primary[data-state=checked]{background:#55bc81}verdocs-switch .switch.primary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .switch.secondary[data-state=checked]{background:#4c56cb}verdocs-switch .switch.secondary[data-state=unchecked]{background:#e3e3e3}verdocs-switch .slider{display:block;width:20px;height:20px;border-radius:20px;background:#ffffff;-webkit-box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms}verdocs-switch .slider[data-state=checked]{-webkit-transform:translateX(22px);transform:translateX(22px)}verdocs-switch .slider[data-state=unchecked]{-webkit-transform:translateX(2px);transform:translateX(2px)}verdocs-switch .switch.disabled.primary,verdocs-switch .switch.disabled.secondary{cursor:not-allowed;background:#666666}';var x=h;var m=e("verdocs_switch",function(){function e(e){i(this,e);this.checkedChange=t(this,"checkedChange",7);this.checked=false;this.theme="primary";this.disabled=false}e.prototype.render=function(){var e=this;return r("button",{key:"e9153549bcee6b924ce7a7d620d1096fa91782d2",value:"on",type:"button",role:"switch",class:"switch ".concat(this.theme," ").concat(this.disabled?"disabled":""),"data-state":this.checked?"checked":"unchecked","aria-checked":this.checked?"checked":"unchecked",onClick:function(){var i;if(!e.disabled){e.checked=!e.checked;(i=e.checkedChange)===null||i===void 0?void 0:i.emit(e.checked)}}},r("span",{key:"61d97d7571b7f52f186ce44daaf0ef7132c6d5f6","data-state":this.checked?"checked":"unchecked",class:"slider"}))};return e}());m.style=x}}}));
2
- //# sourceMappingURL=p-e3efeb57.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["verdocsEnvelopeRecipientLinkCss","VerdocsEnvelopeRecipientLinkStyle0","VerdocsEnvelopeRecipientLink","exports","this","envelopeListenerId","VerdocsEndpoint","getDefault","class_1","prototype","componentWillLoad","endpoint","loadSession","envelopeId","console","log","concat","session","listenToEnvelope","e","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","disconnectedCallback","unlistenToEnvelope","Store","subscribe","getEnvelope","_this","envelope","loading","recipient","recipients","find","r","role_name","roleName","getLink","store","delListener","handleDone","preventDefault","next","copyLink","link","navigator","clipboard","writeText","then","VerdocsToast","style","duration","catch","warn","gettingLink","getInPersonLink","envelope_id","render","h","Host","fullName","formatFullName","class","email","phone","size","variant","label","disabled","onClick","verdocsSwitchCss","VerdocsSwitchStyle0","VerdocsSwitch","class_2","key","value","type","role","theme","checked","checkedChange"],"sources":["src/components/envelopes/verdocs-envelope-recipient-link/verdocs-envelope-recipient-link.scss?tag=verdocs-envelope-recipient-link","src/components/envelopes/verdocs-envelope-recipient-link/verdocs-envelope-recipient-link.tsx","src/components/controls/verdocs-switch/verdocs-switch.scss?tag=verdocs-switch","src/components/controls/verdocs-switch/verdocs-switch.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-envelope-recipient-link {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 100000;\n position: fixed;\n align-items: center;\n justify-content: center;\n font-family: $primary-font;\n background-color: #0000007f;\n\n .summary-content {\n width: 600px;\n display: flex;\n max-width: 90%;\n font-size: 18px;\n flex: 0 0 600px;\n border-radius: 6px;\n background: #ffffff;\n flex-direction: column;\n padding: 30px 20px 20px;\n\n .summary-title {\n font-size: 20px;\n font-weight: 700;\n margin: 0 0 10px 0;\n color: $verdocs-dark-blue;\n }\n }\n\n .summary-recipient {\n display: flex;\n color: $verdocs-grey-1;\n margin: 8px 0 24px 0;\n flex-direction: column;\n\n .role-name {\n flex: 1;\n display: flex;\n font-size: 14px;\n font-weight: 600;\n margin: 0 0 8px 0;\n color: $verdocs-grey-0;\n }\n\n .role-details {\n }\n\n .role-info {\n gap: 5px;\n display: flex;\n flex-direction: row;\n align-items: flex-end;\n }\n\n .role-full-name {\n flex: 1;\n height: 34px;\n display: flex;\n font-size: 16px;\n padding: 0 12px;\n border-radius: 4px;\n align-items: center;\n border: 1px solid #cccccc;\n background: rgb(249, 250, 251);\n }\n\n .recipient-link {\n width: 120px;\n padding: 0 16px;\n font-weight: 500;\n margin: 0 0 0 8px;\n text-align: center;\n font-size: 0.875rem;\n border-radius: 100%;\n color: rgb(55, 65, 81);\n line-height: 1.25rem;\n background-color: #d8d8d8;\n border: 2px solid rgb(156, 163, 175);\n }\n\n .link-wrapper {\n gap: 5px;\n display: flex;\n margin: 4px 0 0 0;\n flex-direction: row;\n\n .link {\n flex: 1;\n height: 34px;\n display: flex;\n font-size: 16px;\n padding: 0 12px;\n overflow: hidden;\n margin: 0 6px 0 0;\n border-radius: 4px;\n white-space: nowrap;\n align-items: center;\n text-overflow: ellipsis;\n border: 1px solid #cccccc;\n background: rgb(249, 250, 251);\n }\n }\n }\n\n .buttons {\n display: flex;\n column-gap: 15px;\n margin: 10px 0 0 0;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n verdocs-button {\n flex: 0 0 120px;\n margin-left: 10px;\n white-space: nowrap;\n\n button {\n width: 100%;\n }\n }\n }\n}\n","import {Component, Prop, Host, h, State, Event, EventEmitter} from '@stencil/core';\nimport {formatFullName, getEnvelope, getInPersonLink, IEnvelope, IRecipient, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Displays a single recipient from an envelope, with the opportunity to copy an in-person\n * signing link for that recipient to use.\n */\n@Component({\n tag: 'verdocs-envelope-recipient-link',\n styleUrl: 'verdocs-envelope-recipient-link.scss',\n})\nexport class VerdocsEnvelopeRecipientLink {\n private envelopeListenerId = null;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The envelope ID to edit.\n */\n @Prop() envelopeId: string = '';\n\n /**\n * The role to load.\n */\n @Prop() roleName: string = '';\n\n /**\n * Event fired when the user clicks Done to proceed. It is up to the host application\n * to redirect the user to the appropriate next workflow step.\n */\n @Event({composed: true}) next: EventEmitter<{envelope: IEnvelope}>;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n @State() isOpen: boolean;\n @State() gettingLink = true;\n @State() link = '';\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n @State() recipient: IRecipient | null = null;\n\n async componentWillLoad() {\n try {\n this.endpoint.loadSession();\n\n if (!this.envelopeId) {\n console.log(`[RECIPIENT_LINK] Missing required envelope ID ${this.envelopeId}`);\n return;\n }\n\n if (!this.endpoint.session) {\n console.log('[RECIPIENT_LINK] Unable to start session, must be authenticated');\n return;\n }\n\n this.listenToEnvelope();\n } catch (e) {\n console.log('[RECIPIENT_LINK] Error loading envelope', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n disconnectedCallback() {\n this.unlistenToEnvelope();\n }\n\n async listenToEnvelope() {\n console.log('[SIDEBAR] Loading envelope', this.envelopeId);\n this.unlistenToEnvelope();\n Store.subscribe(\n 'envelopes',\n this.envelopeId,\n () => getEnvelope(this.endpoint, this.envelopeId),\n false,\n (envelope: IEnvelope) => {\n this.envelope = envelope;\n this.loading = false;\n\n this.recipient = (this.envelope?.recipients || []).find(r => r.role_name === this.roleName);\n this.getLink(this.recipient);\n },\n );\n }\n\n unlistenToEnvelope() {\n if (this.envelopeListenerId) {\n Store.store.delListener(this.envelopeListenerId);\n this.envelopeListenerId = null;\n }\n }\n\n handleDone(e: any) {\n e.preventDefault();\n this.next?.emit({envelope: this.envelope});\n }\n\n copyLink(link: string) {\n navigator.clipboard\n .writeText(link)\n .then(() => VerdocsToast('Link copied to clipboard!', {style: 'success', duration: 3000}))\n .catch(e => {\n console.warn('[RECIPIENT_LINK] Error copying to clipboard', e);\n VerdocsToast(`Unable to copy to clipboard: ${e.message}`, {style: 'error'});\n });\n }\n\n getLink(recipient: IRecipient) {\n this.gettingLink = true;\n getInPersonLink(this.endpoint, recipient.envelope_id, recipient.role_name)\n .then(response => {\n this.gettingLink = false;\n this.link = response.link;\n // NOTE: Left here for documentation purposes. We don't auto-copy the link because many browsers now\n // error on that because we aren't the focus/gesture-initiator since we're a new component just being\n // drawn in the DOM. So we let the user click to trigger that.\n // this.copyLink(response.link);\n })\n .catch(e => {\n this.gettingLink = false;\n console.log('[RECIPIENT_LINK] Error getting link', e);\n VerdocsToast('Unable to get link: ' + e.message, {style: 'error'});\n });\n }\n\n render() {\n if (this.loading || !this.recipient) {\n return <Host />;\n }\n\n // const recipientsWithActions = getRecipientsWithActions(this.store.state); const showLinkButton = recipientCanAct(recipient, recipientsWithActions); const link =\n // this.links[recipient.role_name]; const gettingLink = this.gettingLinks[recipient.role_name]; return (\n\n const fullName = formatFullName(this.recipient);\n return (\n <Host>\n <div class=\"summary-content\">\n <h1 class=\"summary-title\">In-Person Signing Link</h1>\n <div class=\"summary-rows\">\n <div class=\"summary-recipient\">\n <div class=\"role-name\">{this.recipient.role_name}</div>\n <div class=\"role-details\">\n <div class=\"role-info\">\n <div class=\"role-full-name\">\n {fullName} ({this.recipient.email || this.recipient.phone})\n </div>\n {!this.link && (\n <verdocs-button\n size=\"small\"\n variant=\"outline\"\n label={this.gettingLink ? 'Loading...' : 'Get Link'}\n disabled={this.gettingLink}\n onClick={() => this.getLink(this.recipient)}\n />\n )}\n </div>\n\n {this.link && (\n <div class=\"link-wrapper\">\n <div class=\"link\">{this.link}</div>\n <verdocs-button size=\"small\" variant=\"outline\" label=\"Copy\" onClick={() => this.copyLink(this.link)} />\n </div>\n )}\n </div>\n </div>\n </div>\n\n <div class=\"buttons\">\n <verdocs-button size=\"small\" label=\"Done\" onClick={e => this.handleDone(e)} />\n </div>\n </div>\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-switch {\n font-family: $primary-font;\n\n .switch {\n display: inline-flex;\n height: 24px;\n width: 44px;\n flex-shrink: 0;\n align-items: center;\n cursor: pointer;\n border-radius: 12px;\n border: transparent;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n }\n\n .switch.primary[data-state='checked'] {\n background: $primary-color;\n }\n\n .switch.primary[data-state='unchecked'] {\n background: $extra-light-border-color;\n }\n\n .switch.secondary[data-state='checked'] {\n background: $secondary-color;\n }\n\n .switch.secondary[data-state='unchecked'] {\n background: $extra-light-border-color;\n }\n\n .slider {\n display: block;\n width: 20px;\n height: 20px;\n border-radius: 20px;\n background: #ffffff;\n box-shadow:\n 0 10px 15px -3px rgb(0 0 0 / 0.1),\n 0 4px 6px -4px rgb(0 0 0 / 0.1);\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n }\n\n .slider[data-state='checked'] {\n transform: translateX(22px);\n }\n\n .slider[data-state='unchecked'] {\n transform: translateX(2px);\n }\n\n .switch.disabled.primary,\n .switch.disabled.secondary {\n cursor: not-allowed;\n background: $dark-disabled-color;\n }\n}\n","import {Component, Prop, h, EventEmitter, Event} from '@stencil/core';\n\n/**\n * Displays a toggle switch.\n *\n * ```ts\n * <verdocs-switch checked={sendReminders} onCheckedChange={setSendReminders} />\n * ```\n */\n@Component({\n tag: 'verdocs-switch',\n styleUrl: 'verdocs-switch.scss',\n})\nexport class VerdocsSwitch {\n @Prop({mutable: true}) checked: boolean = false;\n\n /**\n * Select purple or green treatments.\n */\n @Prop() theme: 'primary' | 'secondary' = 'primary';\n\n /**\n * Should the field be disabled?\n */\n @Prop() disabled: boolean = false;\n\n @Event({composed: true}) checkedChange: EventEmitter<boolean>;\n\n render() {\n return (\n <button\n value=\"on\"\n type=\"button\"\n role=\"switch\"\n class={`switch ${this.theme} ${this.disabled ? 'disabled' : ''}`}\n data-state={this.checked ? 'checked' : 'unchecked'}\n aria-checked={this.checked ? 'checked' : 'unchecked'}\n onClick={() => {\n if (!this.disabled) {\n this.checked = !this.checked;\n this.checkedChange?.emit(this.checked);\n }\n }}\n >\n <span data-state={this.checked ? 'checked' : 'unchecked'} class=\"slider\"></span>\n </button>\n );\n }\n}\n"],"mappings":"o2DAAA,IAAMA,EAAkC,ghGACxC,IAAAC,EAAeD,E,ICaFE,EAA4BC,EAAA,6C,sFAC/BC,KAAAC,mBAAqB,K,cAKOC,EAAgBC,a,gBAKvB,G,cAKF,G,uCAeJ,K,UACP,G,aAEG,K,cACmB,K,eACE,I,CAElCC,EAAAC,UAAAC,kBAAN,W,+FACE,IACEN,KAAKO,SAASC,cAEd,IAAKR,KAAKS,WAAY,CACpBC,QAAQC,I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