@verdocs/web-sdk 5.0.25 → 5.0.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. package/dist/cjs/{Datastore-931fd77e.js → Datastore-e39f8315.js} +29 -24
  2. package/dist/cjs/Datastore-e39f8315.js.map +1 -0
  3. package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-checkbox_6.cjs.entry.js +1 -1
  5. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-preview_6.cjs.entry.js +6 -4
  13. package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
  14. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  16. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +4 -1
  17. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js.map +1 -1
  18. package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +1 -2
  19. package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js.map +1 -1
  20. package/dist/components/{p-e4a97ad5.js → p-143a763f.js} +3 -3
  21. package/dist/components/{p-e4a97ad5.js.map → p-143a763f.js.map} +1 -1
  22. package/dist/components/{p-2d8b46e5.js → p-16b073b8.js} +2 -2
  23. package/dist/components/{p-2d8b46e5.js.map → p-16b073b8.js.map} +1 -1
  24. package/dist/components/{p-e9528d9f.js → p-1d4829fb.js} +3 -3
  25. package/dist/components/{p-e9528d9f.js.map → p-1d4829fb.js.map} +1 -1
  26. package/dist/components/{p-ca3e45f3.js → p-27a8eef0.js} +2 -2
  27. package/dist/components/{p-ca3e45f3.js.map → p-27a8eef0.js.map} +1 -1
  28. package/dist/components/{p-fcf13666.js → p-550377ba.js} +13 -13
  29. package/dist/components/{p-fcf13666.js.map → p-550377ba.js.map} +1 -1
  30. package/dist/components/{p-1ce18a42.js → p-619747d7.js} +2 -2
  31. package/dist/components/{p-1ce18a42.js.map → p-619747d7.js.map} +1 -1
  32. package/dist/components/{p-e95ded6b.js → p-631808d5.js} +18 -15
  33. package/dist/components/p-631808d5.js.map +1 -0
  34. package/dist/components/{p-e4799d51.js → p-7bd7baa6.js} +3 -3
  35. package/dist/components/{p-e4799d51.js.map → p-7bd7baa6.js.map} +1 -1
  36. package/dist/components/{p-1ab01232.js → p-813ed998.js} +3 -3
  37. package/dist/components/{p-1ab01232.js.map → p-813ed998.js.map} +1 -1
  38. package/dist/components/{p-a415ce22.js → p-8c965486.js} +3 -3
  39. package/dist/components/{p-a415ce22.js.map → p-8c965486.js.map} +1 -1
  40. package/dist/components/{p-78de9e65.js → p-90e3fae6.js} +4 -5
  41. package/dist/components/p-90e3fae6.js.map +1 -0
  42. package/dist/components/{p-681e7dd4.js → p-99128b47.js} +3 -3
  43. package/dist/components/{p-681e7dd4.js.map → p-99128b47.js.map} +1 -1
  44. package/dist/components/{p-53168eec.js → p-ac7694c0.js} +2 -2
  45. package/dist/components/{p-53168eec.js.map → p-ac7694c0.js.map} +1 -1
  46. package/dist/components/{p-ecfc85ae.js → p-b5e479db.js} +3 -3
  47. package/dist/components/{p-ecfc85ae.js.map → p-b5e479db.js.map} +1 -1
  48. package/dist/components/{p-f6156f7a.js → p-c422d9a0.js} +3 -3
  49. package/dist/components/{p-f6156f7a.js.map → p-c422d9a0.js.map} +1 -1
  50. package/dist/components/{p-c4c9feda.js → p-c4310332.js} +3 -3
  51. package/dist/components/{p-c4c9feda.js.map → p-c4310332.js.map} +1 -1
  52. package/dist/components/{p-91d65fde.js → p-c5045788.js} +3 -3
  53. package/dist/components/{p-91d65fde.js.map → p-c5045788.js.map} +1 -1
  54. package/dist/components/{p-3828cb31.js → p-d4be87ef.js} +29 -24
  55. package/dist/components/p-d4be87ef.js.map +1 -0
  56. package/dist/components/{p-28e3b2e3.js → p-d54466ed.js} +14 -14
  57. package/dist/components/{p-28e3b2e3.js.map → p-d54466ed.js.map} +1 -1
  58. package/dist/components/{p-eb2ad8d0.js → p-e39c327c.js} +2 -2
  59. package/dist/components/{p-eb2ad8d0.js.map → p-e39c327c.js.map} +1 -1
  60. package/dist/components/{p-eb12a71c.js → p-f238b25b.js} +2 -2
  61. package/dist/components/{p-eb12a71c.js.map → p-f238b25b.js.map} +1 -1
  62. package/dist/components/{p-bfed2f8d.js → p-f7cf2401.js} +2 -2
  63. package/dist/components/{p-bfed2f8d.js.map → p-f7cf2401.js.map} +1 -1
  64. package/dist/components/verdocs-build.js +20 -20
  65. package/dist/components/verdocs-envelope-recipient-link.js +1 -1
  66. package/dist/components/verdocs-envelope-recipient-summary.js +1 -1
  67. package/dist/components/verdocs-envelope-sidebar.js +2 -2
  68. package/dist/components/verdocs-field-attachment.js +1 -1
  69. package/dist/components/verdocs-field-checkbox.js +1 -1
  70. package/dist/components/verdocs-field-date.js +1 -1
  71. package/dist/components/verdocs-field-dropdown.js +1 -1
  72. package/dist/components/verdocs-field-initial.js +1 -1
  73. package/dist/components/verdocs-field-payment.js +2 -2
  74. package/dist/components/verdocs-field-radio.js +1 -1
  75. package/dist/components/verdocs-field-signature.js +1 -1
  76. package/dist/components/verdocs-field-textarea.js +1 -1
  77. package/dist/components/verdocs-field-textbox.js +1 -1
  78. package/dist/components/verdocs-field-timestamp.js +1 -1
  79. package/dist/components/verdocs-preview.js +1 -1
  80. package/dist/components/verdocs-send.js +1 -1
  81. package/dist/components/verdocs-sign.js +2 -2
  82. package/dist/components/verdocs-template-attachments.js +1 -1
  83. package/dist/components/verdocs-template-build-tabs.js +1 -1
  84. package/dist/components/verdocs-template-document-page.js +1 -1
  85. package/dist/components/verdocs-template-field-properties.js +1 -1
  86. package/dist/components/verdocs-template-fields.js +1 -1
  87. package/dist/components/verdocs-template-role-properties.js +1 -1
  88. package/dist/components/verdocs-template-roles.js +1 -1
  89. package/dist/components/verdocs-view.js +1 -1
  90. package/dist/esm/{Datastore-3f924d94.js → Datastore-77cb8d9c.js} +29 -24
  91. package/dist/esm/Datastore-77cb8d9c.js.map +1 -0
  92. package/dist/esm/verdocs-build.entry.js +1 -1
  93. package/dist/esm/verdocs-checkbox_6.entry.js +1 -1
  94. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  95. package/dist/esm/verdocs-envelope-recipient-summary.entry.js +1 -1
  96. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  97. package/dist/esm/verdocs-field-attachment_13.entry.js +1 -1
  98. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  99. package/dist/esm/verdocs-kba-dialog_2.entry.js +1 -1
  100. package/dist/esm/verdocs-menu-panel_2.entry.js +1 -1
  101. package/dist/esm/verdocs-preview_6.entry.js +6 -4
  102. package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
  103. package/dist/esm/verdocs-sign.entry.js +1 -1
  104. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  105. package/dist/esm-es5/Datastore-77cb8d9c.js +2 -0
  106. package/dist/esm-es5/Datastore-77cb8d9c.js.map +1 -0
  107. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  108. package/dist/esm-es5/verdocs-checkbox_6.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-preview_6.entry.js +2 -2
  117. package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
  118. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  120. package/dist/verdocs-web-sdk/{p-f6ed768d.entry.js → p-00063a35.entry.js} +2 -2
  121. package/dist/verdocs-web-sdk/{p-b1a9dc79.entry.js → p-0a745e87.entry.js} +3 -3
  122. package/dist/verdocs-web-sdk/p-0a745e87.entry.js.map +1 -0
  123. package/dist/verdocs-web-sdk/{p-1902bf04.entry.js → p-104863b5.entry.js} +2 -2
  124. package/dist/verdocs-web-sdk/{p-9ab8bcaa.system.entry.js → p-1f2c019d.system.entry.js} +2 -2
  125. package/dist/verdocs-web-sdk/{p-fc29a754.entry.js → p-25aa3bd3.entry.js} +2 -2
  126. package/dist/verdocs-web-sdk/p-52c3e8b0.system.js +2 -0
  127. package/dist/verdocs-web-sdk/p-52c3e8b0.system.js.map +1 -0
  128. package/dist/verdocs-web-sdk/{p-7975ec40.system.entry.js → p-578e65d4.system.entry.js} +2 -2
  129. package/dist/verdocs-web-sdk/{p-407c0725.system.entry.js → p-5bcf921b.system.entry.js} +2 -2
  130. package/dist/verdocs-web-sdk/{p-26106576.system.entry.js → p-5c065719.system.entry.js} +2 -2
  131. package/dist/verdocs-web-sdk/{p-7ffebea3.entry.js → p-5ebfe76c.entry.js} +2 -2
  132. package/dist/verdocs-web-sdk/{p-086ee7f1.system.entry.js → p-6eee289a.system.entry.js} +2 -2
  133. package/dist/verdocs-web-sdk/{p-cc230abf.entry.js → p-6f1e2f2f.entry.js} +2 -2
  134. package/dist/verdocs-web-sdk/{p-4e3790db.system.entry.js → p-70247599.system.entry.js} +2 -2
  135. package/dist/verdocs-web-sdk/{p-e84cf41e.entry.js → p-8369273d.entry.js} +2 -2
  136. package/dist/verdocs-web-sdk/{p-f84ba101.entry.js → p-a285560f.entry.js} +2 -2
  137. package/dist/verdocs-web-sdk/{p-80952d72.system.entry.js → p-a41e6f04.system.entry.js} +3 -3
  138. package/dist/verdocs-web-sdk/p-a41e6f04.system.entry.js.map +1 -0
  139. package/dist/verdocs-web-sdk/{p-75e53ae1.entry.js → p-b7799ec0.entry.js} +2 -2
  140. package/dist/verdocs-web-sdk/{p-a4d94e2e.entry.js → p-b8945173.entry.js} +2 -2
  141. package/dist/verdocs-web-sdk/{p-d4aff253.entry.js → p-b9fee1a7.entry.js} +2 -2
  142. package/dist/verdocs-web-sdk/{p-34c2298e.system.entry.js → p-cabfdb9d.system.entry.js} +2 -2
  143. package/dist/verdocs-web-sdk/{p-90690dde.system.entry.js → p-d1d95df4.system.entry.js} +2 -2
  144. package/dist/verdocs-web-sdk/{p-60da8e6b.entry.js → p-d3a8c6b8.entry.js} +2 -2
  145. package/dist/verdocs-web-sdk/p-d4be87ef.js +2 -0
  146. package/dist/verdocs-web-sdk/p-d4be87ef.js.map +1 -0
  147. package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
  148. package/dist/verdocs-web-sdk/{p-208a8b41.system.entry.js → p-e3efeb57.system.entry.js} +2 -2
  149. package/dist/verdocs-web-sdk/{p-dc5c275f.system.entry.js → p-e83d06d4.system.entry.js} +2 -2
  150. package/dist/verdocs-web-sdk/{p-32cf09f0.system.entry.js → p-ecfe8987.system.entry.js} +2 -2
  151. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  152. package/package.json +3 -3
  153. package/dist/cjs/Datastore-931fd77e.js.map +0 -1
  154. package/dist/components/p-3828cb31.js.map +0 -1
  155. package/dist/components/p-78de9e65.js.map +0 -1
  156. package/dist/components/p-e95ded6b.js.map +0 -1
  157. package/dist/esm/Datastore-3f924d94.js.map +0 -1
  158. package/dist/esm-es5/Datastore-3f924d94.js +0 -2
  159. package/dist/esm-es5/Datastore-3f924d94.js.map +0 -1
  160. package/dist/verdocs-web-sdk/p-3828cb31.js +0 -2
  161. package/dist/verdocs-web-sdk/p-3828cb31.js.map +0 -1
  162. package/dist/verdocs-web-sdk/p-65be7617.system.js +0 -2
  163. package/dist/verdocs-web-sdk/p-65be7617.system.js.map +0 -1
  164. package/dist/verdocs-web-sdk/p-80952d72.system.entry.js.map +0 -1
  165. package/dist/verdocs-web-sdk/p-b1a9dc79.entry.js.map +0 -1
  166. /package/dist/verdocs-web-sdk/{p-f6ed768d.entry.js.map → p-00063a35.entry.js.map} +0 -0
  167. /package/dist/verdocs-web-sdk/{p-1902bf04.entry.js.map → p-104863b5.entry.js.map} +0 -0
  168. /package/dist/verdocs-web-sdk/{p-9ab8bcaa.system.entry.js.map → p-1f2c019d.system.entry.js.map} +0 -0
  169. /package/dist/verdocs-web-sdk/{p-fc29a754.entry.js.map → p-25aa3bd3.entry.js.map} +0 -0
  170. /package/dist/verdocs-web-sdk/{p-7975ec40.system.entry.js.map → p-578e65d4.system.entry.js.map} +0 -0
  171. /package/dist/verdocs-web-sdk/{p-407c0725.system.entry.js.map → p-5bcf921b.system.entry.js.map} +0 -0
  172. /package/dist/verdocs-web-sdk/{p-26106576.system.entry.js.map → p-5c065719.system.entry.js.map} +0 -0
  173. /package/dist/verdocs-web-sdk/{p-7ffebea3.entry.js.map → p-5ebfe76c.entry.js.map} +0 -0
  174. /package/dist/verdocs-web-sdk/{p-086ee7f1.system.entry.js.map → p-6eee289a.system.entry.js.map} +0 -0
  175. /package/dist/verdocs-web-sdk/{p-cc230abf.entry.js.map → p-6f1e2f2f.entry.js.map} +0 -0
  176. /package/dist/verdocs-web-sdk/{p-4e3790db.system.entry.js.map → p-70247599.system.entry.js.map} +0 -0
  177. /package/dist/verdocs-web-sdk/{p-e84cf41e.entry.js.map → p-8369273d.entry.js.map} +0 -0
  178. /package/dist/verdocs-web-sdk/{p-f84ba101.entry.js.map → p-a285560f.entry.js.map} +0 -0
  179. /package/dist/verdocs-web-sdk/{p-75e53ae1.entry.js.map → p-b7799ec0.entry.js.map} +0 -0
  180. /package/dist/verdocs-web-sdk/{p-a4d94e2e.entry.js.map → p-b8945173.entry.js.map} +0 -0
  181. /package/dist/verdocs-web-sdk/{p-d4aff253.entry.js.map → p-b9fee1a7.entry.js.map} +0 -0
  182. /package/dist/verdocs-web-sdk/{p-34c2298e.system.entry.js.map → p-cabfdb9d.system.entry.js.map} +0 -0
  183. /package/dist/verdocs-web-sdk/{p-90690dde.system.entry.js.map → p-d1d95df4.system.entry.js.map} +0 -0
  184. /package/dist/verdocs-web-sdk/{p-60da8e6b.entry.js.map → p-d3a8c6b8.entry.js.map} +0 -0
  185. /package/dist/verdocs-web-sdk/{p-208a8b41.system.entry.js.map → p-e3efeb57.system.entry.js.map} +0 -0
  186. /package/dist/verdocs-web-sdk/{p-dc5c275f.system.entry.js.map → p-e83d06d4.system.entry.js.map} +0 -0
  187. /package/dist/verdocs-web-sdk/{p-32cf09f0.system.entry.js.map → p-ecfe8987.system.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{d(i.next(e))}catch(e){o(e)}}function a(e){try{d(i["throw"](e))}catch(e){o(e)}}function d(e){e.done?n(e.value):r(e.value).then(s,a)}d((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={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(t){return d([e,t])}}function d(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host}from"./index-272d51a4.js";import{getRGBA}from"@verdocs/js-sdk";import{S as SettingsIcon}from"./Icons-faf0377f.js";import{S as Store}from"./Datastore-3f924d94.js";var verdocsFieldPaymentCss='@-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-field-payment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;border:1px solid #cfa;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-payment.disabled{opacity:0.5}verdocs-field-payment button,verdocs-field-payment div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-payment button{color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-payment button.hide{display:none}verdocs-field-payment input{float:left;font-family:Arial, sans-serif}verdocs-field-payment select{position:absolute;font-family:Arial, sans-serif;background:linear-gradient(55deg, transparent 50%, #333 50%), linear-gradient(125deg, #333 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 4px, calc(100% - 3px) 4px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none}verdocs-field-payment .frame{width:100%;height:100%;background-size:contain;text-align:left}verdocs-field-payment .frame img{position:absolute;height:auto;width:100%}verdocs-field-payment.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-payment .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-payment .settings-icon svg{fill:#707ae5}verdocs-field-payment .settings-icon:hover{opacity:1}@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)}}';var VerdocsFieldPaymentStyle0=verdocsFieldPaymentCss;var VerdocsFieldPayment=function(){function e(e){registerInstance(this,e);this.settingsChanged=createEvent(this,"settingsChanged",7);this.deleted=createEvent(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.done=false;this.editable=false;this.moveable=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false;this.fields=undefined;this.pageNum=undefined;this.roleName=undefined;this.fieldId=undefined;this.recipients=undefined;this.selectedRoleName=undefined;this.pdfPages=undefined;this.currentSignature=undefined;this.currentSignatureId=undefined;this.currentInitial=undefined;this.currentInitialId=undefined;this.signed=false;this.preparedMessage=undefined;this.signatureUrl="";this.roleindex=0}e.prototype.componentWillLoad=function(){if(this.recipients&&this.recipients.length>0){var e=this.recipients.find((function(e){return e.type==="preparer"}));console.log("Found preparer",e);if(e){this.preparedMessage="Prepared by ".concat(e["full_name"])}}};e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.focused=true;setTimeout((function(){e.focused=false}),500);return[2]}))}))};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.fieldname));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.fieldname));if(e&&e.hidePanel){e.hidePanel()}return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,n=t.source,i=t.sourceid,r=t.fieldname,o=t.editable,s=o===void 0?false:o,a=t.done,d=a===void 0?false:a,c=t.disabled,l=c===void 0?false:c,f=t.focused,u=t.xscale,p=u===void 0?1:u,g=t.yscale,v=g===void 0?1:g;var m=Store.getField(n,i,r,this.field),b=m.index,y=m.field;var k=getRGBA(b);if(!y){return h(Fragment,null)}if(d){return h(Host,{class:{done:d}},"$✓")}return h(Host,{class:{focused:f,disabled:l},style:{backgroundColor:k}},h("button",{class:{hide:this.signed}},"$"),this.signed?h("div",{class:"frame"}):h("div",{style:{display:"none"}}),h("img",{width:"100%",height:"100%",src:this.signatureUrl,alt:"Payment Icon"}),s&&h(Fragment,null,h("div",{id:"verdocs-settings-panel-trigger-".concat(r),style:{transform:"scale(".concat(Math.floor(1/p*1e3)/1e3,", ").concat(Math.floor(1/v*1e3)/1e3,")")},class:"settings-icon",innerHTML:SettingsIcon,onClick:function(t){t.stopPropagation();e.showingProperties=!e.showingProperties}}),this.showingProperties&&h("verdocs-portal",{anchor:"verdocs-settings-panel-trigger-".concat(y.name),onClickAway:function(){return e.showingProperties=false}},h("verdocs-template-field-properties",{templateId:i,fieldName:y.name,onClose:function(){return e.showingProperties=false},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:r});return e.hideSettingsPanel()},onSettingsChanged:function(t){var n;(n=e.settingsChanged)===null||n===void 0?void 0:n.emit(t.detail);return e.hideSettingsPanel()},helpText:"Check boxes allow the user to select one or more (non-exclusive) options."}))))};return e}();VerdocsFieldPayment.style=VerdocsFieldPaymentStyle0;export{VerdocsFieldPayment as verdocs_field_payment};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{d(i.next(e))}catch(e){o(e)}}function a(e){try{d(i["throw"](e))}catch(e){o(e)}}function d(e){e.done?n(e.value):r(e.value).then(s,a)}d((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={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(t){return d([e,t])}}function d(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host}from"./index-272d51a4.js";import{getRGBA}from"@verdocs/js-sdk";import{S as SettingsIcon}from"./Icons-faf0377f.js";import{S as Store}from"./Datastore-77cb8d9c.js";var verdocsFieldPaymentCss='@-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-field-payment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;position:relative;scroll-margin:20px 0;border:1px solid #cfa;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-payment.disabled{opacity:0.5}verdocs-field-payment button,verdocs-field-payment div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-payment button{color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-payment button.hide{display:none}verdocs-field-payment input{float:left;font-family:Arial, sans-serif}verdocs-field-payment select{position:absolute;font-family:Arial, sans-serif;background:linear-gradient(55deg, transparent 50%, #333 50%), linear-gradient(125deg, #333 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 4px, calc(100% - 3px) 4px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none}verdocs-field-payment .frame{width:100%;height:100%;background-size:contain;text-align:left}verdocs-field-payment .frame img{position:absolute;height:auto;width:100%}verdocs-field-payment.focused{-webkit-animation:verdocs-field-pulse 0.4s 1;animation:verdocs-field-pulse 0.4s 1}verdocs-field-payment .settings-icon{position:absolute;top:-3px;left:-20px;display:inline-block;cursor:pointer;opacity:0.3}verdocs-field-payment .settings-icon svg{fill:#707ae5}verdocs-field-payment .settings-icon:hover{opacity:1}@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)}}';var VerdocsFieldPaymentStyle0=verdocsFieldPaymentCss;var VerdocsFieldPayment=function(){function e(e){registerInstance(this,e);this.settingsChanged=createEvent(this,"settingsChanged",7);this.deleted=createEvent(this,"deleted",7);this.source="template";this.sourceid="";this.fieldname="";this.field=null;this.disabled=false;this.done=false;this.editable=false;this.moveable=false;this.xscale=1;this.yscale=1;this.pagenumber=1;this.showingProperties=false;this.focused=false;this.fields=undefined;this.pageNum=undefined;this.roleName=undefined;this.fieldId=undefined;this.recipients=undefined;this.selectedRoleName=undefined;this.pdfPages=undefined;this.currentSignature=undefined;this.currentSignatureId=undefined;this.currentInitial=undefined;this.currentInitialId=undefined;this.signed=false;this.preparedMessage=undefined;this.signatureUrl="";this.roleindex=0}e.prototype.componentWillLoad=function(){if(this.recipients&&this.recipients.length>0){var e=this.recipients.find((function(e){return e.type==="preparer"}));console.log("Found preparer",e);if(e){this.preparedMessage="Prepared by ".concat(e["full_name"])}}};e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.focused=true;setTimeout((function(){e.focused=false}),500);return[2]}))}))};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.fieldname));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.fieldname));if(e&&e.hidePanel){e.hidePanel()}return[2]}))}))};e.prototype.render=function(){var e=this;var t=this,n=t.source,i=t.sourceid,r=t.fieldname,o=t.editable,s=o===void 0?false:o,a=t.done,d=a===void 0?false:a,c=t.disabled,l=c===void 0?false:c,f=t.focused,u=t.xscale,p=u===void 0?1:u,g=t.yscale,v=g===void 0?1:g;var m=Store.getField(n,i,r,this.field),b=m.index,y=m.field;var k=getRGBA(b);if(!y){return h(Fragment,null)}if(d){return h(Host,{class:{done:d}},"$✓")}return h(Host,{class:{focused:f,disabled:l},style:{backgroundColor:k}},h("button",{class:{hide:this.signed}},"$"),this.signed?h("div",{class:"frame"}):h("div",{style:{display:"none"}}),h("img",{width:"100%",height:"100%",src:this.signatureUrl,alt:"Payment Icon"}),s&&h(Fragment,null,h("div",{id:"verdocs-settings-panel-trigger-".concat(r),style:{transform:"scale(".concat(Math.floor(1/p*1e3)/1e3,", ").concat(Math.floor(1/v*1e3)/1e3,")")},class:"settings-icon",innerHTML:SettingsIcon,onClick:function(t){t.stopPropagation();e.showingProperties=!e.showingProperties}}),this.showingProperties&&h("verdocs-portal",{anchor:"verdocs-settings-panel-trigger-".concat(y.name),onClickAway:function(){return e.showingProperties=false}},h("verdocs-template-field-properties",{templateId:i,fieldName:y.name,onClose:function(){return e.showingProperties=false},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:r});return e.hideSettingsPanel()},onSettingsChanged:function(t){var n;(n=e.settingsChanged)===null||n===void 0?void 0:n.emit(t.detail);return e.hideSettingsPanel()},helpText:"Check boxes allow the user to select one or more (non-exclusive) options."}))))};return e}();VerdocsFieldPayment.style=VerdocsFieldPaymentStyle0;export{VerdocsFieldPayment as verdocs_field_payment};
2
2
  //# sourceMappingURL=verdocs-field-payment.entry.js.map
@@ -1,2 +1,2 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,t=1,o=arguments.length;t<o;t++){i=arguments[t];for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))e[n]=i[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,i,t,o){function n(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{a(o.next(e))}catch(e){s(e)}}function l(e){try{a(o["throw"](e))}catch(e){s(e)}}function a(e){e.done?t(e.value):n(e.value).then(r,l)}a((o=o.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,n,s,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(i){return a([e,i])}}function a(l){if(o)throw new TypeError("Generator is already executing.");while(r&&(r=0,l[0]&&(t=0)),t)try{if(o=1,n&&(s=l[0]&2?n["return"]:l[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,l[1])).done)return s;if(n=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;n=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1];s=l;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(l);break}if(s[2])t.ops.pop();t.trys.pop();continue}l=i.call(e,t)}catch(e){l=[6,e];n=0}finally{o=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-272d51a4.js";import{VerdocsEndpoint,getEnvelope,getDocumentDownloadLink,cancelEnvelope,userCanCancelEnvelope,integerSequence}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-bd656c37.js";import{S as SDKError}from"./errors-887f1e88.js";import{S as Store}from"./Datastore-3f924d94.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./format-b8602175.js";var verdocsKbaDialogCss='@-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-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-kba-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-kba-dialog .field label{-ms-flex:0 0 100px;flex:0 0 100px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-kba-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';var VerdocsKbaDialogStyle0=verdocsKbaDialogCss;var QuestionIcon='<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>';var VerdocsKbaDialog=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit",7);this.pinEntered=createEvent(this,"pinEntered",7);this.next=createEvent(this,"next",7);this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.recipient=null;this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.response="";this.updatedRecipient=null}e.prototype.componentDidLoad=function(){this.updatedRecipient=__assign({},this.recipient||{})};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){if(e.target.class==="background-overlay"){e.preventDefault();this.handleCancel()}};e.prototype.handleDone=function(){this.next.emit(this.response);this.response=""};e.prototype.handleConfirmID=function(){this.next.emit(this.updatedRecipient)};e.prototype.render=function(){var e=this;var i,t,o,n,s,r,l,a,d,c,u;if(this.mode==="choice"){return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"choices"},this.choices.map((function(i){return h("div",{class:"choice ".concat(i===e.response?"selected":""),onClick:function(){console.log("Selected",i);e.response=i}},i)}))),h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:this.step<this.steps?"Next":"Submit",onClick:function(){return e.handleDone()},disabled:!this.response})))))}if(this.mode==="identity"){return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Confirm Your Identity"),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},"Identity verification is required"),h("div",{class:"help-text"},"NOTE: Only four fields are required, but providing more details will allow us to complete the verification process more quickly."))),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-first"},"Your Name:",h("span",{class:"required"},"*")),h("input",{required:true,type:"text",id:"verdocs-kba-first",name:"verdocs-kba-first",placeholder:"First name...",value:(i=this.updatedRecipient)===null||i===void 0?void 0:i.first_name,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{first_name:i.target.value})}}),h("input",{type:"text",id:"verdocs-kba-last",name:"verdocs-kba-last",placeholder:"Last name...",required:true,value:(t=this.updatedRecipient)===null||t===void 0?void 0:t.last_name,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{last_name:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-address"},"Address:",h("span",{class:"required"},"*")),h("input",{type:"text",id:"verdocs-kba-address",name:"verdocs-kba-address",placeholder:"Address...",value:(o=this.updatedRecipient)===null||o===void 0?void 0:o.address,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{address:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-city"},"City:"),h("input",{type:"text",id:"verdocs-kba-city",name:"verdocs-kba-city",placeholder:"City...",value:(n=this.updatedRecipient)===null||n===void 0?void 0:n.city,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{city:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-state"},"State:"),h("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"State...",value:(s=this.updatedRecipient)===null||s===void 0?void 0:s.state,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{state:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-zip"},"Zip Code:",h("span",{class:"required"},"*")),h("input",{type:"text",id:"verdocs-kba-zip",name:"verdocs-kba-zip",placeholder:"Zip Code...",required:true,value:(r=this.updatedRecipient)===null||r===void 0?void 0:r.zip,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{zip:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-address"},"SSN Last 4:"),h("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"Last 4 digits of your SSN...",value:(l=this.updatedRecipient)===null||l===void 0?void 0:l.ssn_last_4,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{ssn_last_4:i.target.value})}})),h("div",{class:"buttons"},h("verdocs-button",{label:"Submit",onClick:function(){return e.handleConfirmID()},disabled:!((a=this.updatedRecipient)===null||a===void 0?void 0:a.first_name)||!((d=this.updatedRecipient)===null||d===void 0?void 0:d.last_name)||!((c=this.updatedRecipient)===null||c===void 0?void 0:c.address)||!((u=this.updatedRecipient)===null||u===void 0?void 0:u.zip)})))))}return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Please Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"input"},h("label",{htmlFor:"verdocs-kba-input"},this.label),h("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:function(i){return e.response=i.target.value}})),h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:"Submit",onClick:function(){return e.handleDone()},disabled:!this.response})))))};return e}();VerdocsKbaDialog.style=VerdocsKbaDialogStyle0;var verdocsViewCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var VerdocsViewStyle0=verdocsViewCss;var VerdocsView=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.another=createEvent(this,"another",7);this.view=createEvent(this,"view",7);this.next=createEvent(this,"next",7);this.envelopeListenerId=null;this.endpoint=null;this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.showCancelDone=false;this.showLoadError=false;this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,o,n;return __generator(this,(function(s){switch(s.label){case 0:if(!this.endpoint){this.endpoint=VerdocsEndpoint.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}this.listenToEnvelope();if(!!this.envelope)return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);console.log("[VIEW] Loading envelope...");o=this;return[4,getEnvelope(this.endpoint,this.envelopeId)];case 2:o.envelope=s.sent();console.log("[VIEW] Loaded envelope",this.envelope);return[3,4];case 3:n=s.sent();this.showLoadError=true;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(t=n.response)===null||t===void 0?void 0:t.data));return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var i=document.getElementById("verdocs-view-header");if(e&&i){console.log("[VIEW] Moving header");i.remove();e.append(i)}};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();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),true,(function(i){e.envelope=i;e.loading=false}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){Store.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.handlePageRendered=function(e){};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var i,t,o,n,s,r,s;var l=this;return __generator(this,(function(a){switch(a.label){case 0:o=e.detail.id;switch(o){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,6];case"download-all":return[3,9]}return[3,10];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(e){l.canceling=false;console.log("[VIEW] Envelope canceled",e);return getEnvelope(l.endpoint,l.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);l.envelope=e})).catch((function(e){var i,t,o;l.canceling=false;console.log("[VIEW] Error canceling envelope",e);(i=l.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(o=e.response)===null||o===void 0?void 0:o.data))}));this.showCancelDone=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,10];case 2:window.print();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,10];case 3:n=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(!n)return[3,5];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,n.id)];case 4:s=a.sent();window.open(s,"_blank");a.label=5;case 5:return[3,10];case 6:r=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!r)return[3,8];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,r.id)];case 7:s=a.sent();window.open(s,"_blank");a.label=8;case 8:return[3,10];case 9:saveEnvelopesAsZip(this.endpoint,[this.envelope]).then((function(){var e;(e=l.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:l.endpoint,envelope:l.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,10];case 10:return[2]}}))}))};e.prototype.render=function(){var e=this;var i;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:"Sorry, that envelope is not valid.",buttonLabel:"OK",onNext:function(){e.showLoadError=false}}))}if(!this.envelope){return h(Host,null,h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var t=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.profile,this.envelope)){t.push({id:"cancel",label:"Cancel"})}var o=this.envelope.documents.length>0;var n=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var s=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(o||s){t.push({label:""});if(o){t.push({id:"download-attachments",label:n>1?"Download Documents":"Download Document"})}if(s){t.push({id:"download-certificate",label:"Download Certificate"})}if(o&&s){t.push({id:"download-all",label:"Download All Files"})}}return h(Host,null,h("div",{id:"verdocs-view-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:t,onOptionSelected:function(i){return e.handleOptionSelected(i)}}))),h("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((i=this.envelope)===null||i===void 0?void 0:i.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(i){var t=integerSequence(1,i.pages);return h(Fragment,null,t.map((function(t){var o;var n=((o=i.page_sizes)===null||o===void 0?void 0:o[t])||{width:612,height:792};return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:i.id,endpoint:e.endpoint,type:"filled",virtualWidth:n.width,virtualHeight:n.height,pageNumber:t,onPageRendered:function(i){return e.handlePageRendered(i)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&h("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsView.style=VerdocsViewStyle0;export{VerdocsKbaDialog as verdocs_kba_dialog,VerdocsView as verdocs_view};
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,t=1,o=arguments.length;t<o;t++){i=arguments[t];for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))e[n]=i[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,i,t,o){function n(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,s){function r(e){try{a(o.next(e))}catch(e){s(e)}}function l(e){try{a(o["throw"](e))}catch(e){s(e)}}function a(e){e.done?t(e.value):n(e.value).then(r,l)}a((o=o.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,n,s,r;return r={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function l(e){return function(i){return a([e,i])}}function a(l){if(o)throw new TypeError("Generator is already executing.");while(r&&(r=0,l[0]&&(t=0)),t)try{if(o=1,n&&(s=l[0]&2?n["return"]:l[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,l[1])).done)return s;if(n=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;n=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1];s=l;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(l);break}if(s[2])t.ops.pop();t.trys.pop();continue}l=i.call(e,t)}catch(e){l=[6,e];n=0}finally{o=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-272d51a4.js";import{VerdocsEndpoint,getEnvelope,getDocumentDownloadLink,cancelEnvelope,userCanCancelEnvelope,integerSequence}from"@verdocs/js-sdk";import{s as saveEnvelopesAsZip}from"./utils-bd656c37.js";import{S as SDKError}from"./errors-887f1e88.js";import{S as Store}from"./Datastore-77cb8d9c.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-95d86a44.js";import"./format-b8602175.js";var verdocsKbaDialogCss='@-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-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;gap:14px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .field{gap:10px;margin:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;max-width:100%}verdocs-kba-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-kba-dialog .field label{-ms-flex:0 0 100px;flex:0 0 100px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-kba-dialog .field input{width:40%;-ms-flex-positive:1;flex-grow:1;padding:2px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';var VerdocsKbaDialogStyle0=verdocsKbaDialogCss;var QuestionIcon='<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>';var VerdocsKbaDialog=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit",7);this.pinEntered=createEvent(this,"pinEntered",7);this.next=createEvent(this,"next",7);this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.recipient=null;this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.response="";this.updatedRecipient=null}e.prototype.componentDidLoad=function(){this.updatedRecipient=__assign({},this.recipient||{})};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){if(e.target.class==="background-overlay"){e.preventDefault();this.handleCancel()}};e.prototype.handleDone=function(){this.next.emit(this.response);this.response=""};e.prototype.handleConfirmID=function(){this.next.emit(this.updatedRecipient)};e.prototype.render=function(){var e=this;var i,t,o,n,s,r,l,a,d,c,u;if(this.mode==="choice"){return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"choices"},this.choices.map((function(i){return h("div",{class:"choice ".concat(i===e.response?"selected":""),onClick:function(){console.log("Selected",i);e.response=i}},i)}))),h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:this.step<this.steps?"Next":"Submit",onClick:function(){return e.handleDone()},disabled:!this.response})))))}if(this.mode==="identity"){return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Confirm Your Identity"),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},"Identity verification is required"),h("div",{class:"help-text"},"NOTE: Only four fields are required, but providing more details will allow us to complete the verification process more quickly."))),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-first"},"Your Name:",h("span",{class:"required"},"*")),h("input",{required:true,type:"text",id:"verdocs-kba-first",name:"verdocs-kba-first",placeholder:"First name...",value:(i=this.updatedRecipient)===null||i===void 0?void 0:i.first_name,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{first_name:i.target.value})}}),h("input",{type:"text",id:"verdocs-kba-last",name:"verdocs-kba-last",placeholder:"Last name...",required:true,value:(t=this.updatedRecipient)===null||t===void 0?void 0:t.last_name,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{last_name:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-address"},"Address:",h("span",{class:"required"},"*")),h("input",{type:"text",id:"verdocs-kba-address",name:"verdocs-kba-address",placeholder:"Address...",value:(o=this.updatedRecipient)===null||o===void 0?void 0:o.address,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{address:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-city"},"City:"),h("input",{type:"text",id:"verdocs-kba-city",name:"verdocs-kba-city",placeholder:"City...",value:(n=this.updatedRecipient)===null||n===void 0?void 0:n.city,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{city:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-state"},"State:"),h("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"State...",value:(s=this.updatedRecipient)===null||s===void 0?void 0:s.state,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{state:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-zip"},"Zip Code:",h("span",{class:"required"},"*")),h("input",{type:"text",id:"verdocs-kba-zip",name:"verdocs-kba-zip",placeholder:"Zip Code...",required:true,value:(r=this.updatedRecipient)===null||r===void 0?void 0:r.zip,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{zip:i.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-address"},"SSN Last 4:"),h("input",{type:"text",id:"verdocs-kba-state",name:"verdocs-kba-state",placeholder:"Last 4 digits of your SSN...",value:(l=this.updatedRecipient)===null||l===void 0?void 0:l.ssn_last_4,onInput:function(i){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{ssn_last_4:i.target.value})}})),h("div",{class:"buttons"},h("verdocs-button",{label:"Submit",onClick:function(){return e.handleConfirmID()},disabled:!((a=this.updatedRecipient)===null||a===void 0?void 0:a.first_name)||!((d=this.updatedRecipient)===null||d===void 0?void 0:d.last_name)||!((c=this.updatedRecipient)===null||c===void 0?void 0:c.address)||!((u=this.updatedRecipient)===null||u===void 0?void 0:u.zip)})))))}return h(Host,null,h("div",{class:"background-overlay",onClick:function(i){return e.handleDismiss(i)}},h("div",{class:"dialog"},h("div",{class:"heading"},"Please Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"input"},h("label",{htmlFor:"verdocs-kba-input"},this.label),h("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:function(i){return e.response=i.target.value}})),h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:"Submit",onClick:function(){return e.handleDone()},disabled:!this.response})))))};return e}();VerdocsKbaDialog.style=VerdocsKbaDialogStyle0;var verdocsViewCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var VerdocsViewStyle0=verdocsViewCss;var VerdocsView=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.another=createEvent(this,"another",7);this.view=createEvent(this,"view",7);this.next=createEvent(this,"next",7);this.envelopeListenerId=null;this.endpoint=null;this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.showCancelDone=false;this.showLoadError=false;this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,o,n;return __generator(this,(function(s){switch(s.label){case 0:if(!this.endpoint){this.endpoint=VerdocsEndpoint.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}this.listenToEnvelope();if(!!this.envelope)return[3,4];s.label=1;case 1:s.trys.push([1,3,,4]);console.log("[VIEW] Loading envelope...");o=this;return[4,getEnvelope(this.endpoint,this.envelopeId)];case 2:o.envelope=s.sent();console.log("[VIEW] Loaded envelope",this.envelope);return[3,4];case 3:n=s.sent();this.showLoadError=true;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(t=n.response)===null||t===void 0?void 0:t.data));return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var i=document.getElementById("verdocs-view-header");if(e&&i){console.log("[VIEW] Moving header");i.remove();e.append(i)}};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();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),true,(function(i){e.envelope=i;e.loading=false}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){Store.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.handlePageRendered=function(e){};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var i,t,o,n,s,r,s;var l=this;return __generator(this,(function(a){switch(a.label){case 0:o=e.detail.id;switch(o){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,6];case"download-all":return[3,9]}return[3,10];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(e){l.canceling=false;console.log("[VIEW] Envelope canceled",e);return getEnvelope(l.endpoint,l.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);l.envelope=e})).catch((function(e){var i,t,o;l.canceling=false;console.log("[VIEW] Error canceling envelope",e);(i=l.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(e.message,(t=e.response)===null||t===void 0?void 0:t.status,(o=e.response)===null||o===void 0?void 0:o.data))}));this.showCancelDone=true;(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,10];case 2:window.print();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,10];case 3:n=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(!n)return[3,5];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,n.id)];case 4:s=a.sent();window.open(s,"_blank");a.label=5;case 5:return[3,10];case 6:r=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!r)return[3,8];return[4,getDocumentDownloadLink(this.endpoint,this.envelopeId,r.id)];case 7:s=a.sent();window.open(s,"_blank");a.label=8;case 8:return[3,10];case 9:saveEnvelopesAsZip(this.endpoint,[this.envelope]).then((function(){var e;(e=l.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:l.endpoint,envelope:l.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,10];case 10:return[2]}}))}))};e.prototype.render=function(){var e=this;var i;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:"Sorry, that envelope is not valid.",buttonLabel:"OK",onNext:function(){e.showLoadError=false}}))}if(!this.envelope){return h(Host,null,h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var t=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.profile,this.envelope)){t.push({id:"cancel",label:"Cancel"})}var o=this.envelope.documents.length>0;var n=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var s=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(o||s){t.push({label:""});if(o){t.push({id:"download-attachments",label:n>1?"Download Documents":"Download Document"})}if(s){t.push({id:"download-certificate",label:"Download Certificate"})}if(o&&s){t.push({id:"download-all",label:"Download All Files"})}}return h(Host,null,h("div",{id:"verdocs-view-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:t,onOptionSelected:function(i){return e.handleOptionSelected(i)}}))),h("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((i=this.envelope)===null||i===void 0?void 0:i.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(i){var t=integerSequence(1,i.pages);return h(Fragment,null,t.map((function(t){var o;var n=((o=i.page_sizes)===null||o===void 0?void 0:o[t])||{width:612,height:792};return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:i.id,endpoint:e.endpoint,type:"filled",virtualWidth:n.width,virtualHeight:n.height,pageNumber:t,onPageRendered:function(i){return e.handlePageRendered(i)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&h("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))};Object.defineProperty(e.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsView.style=VerdocsViewStyle0;export{VerdocsKbaDialog as verdocs_kba_dialog,VerdocsView as verdocs_view};
2
2
  //# sourceMappingURL=verdocs-kba-dialog_2.entry.js.map
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function n(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):r(e.value).then(n,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,r,s,n;return n={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function a(e){return function(t){return l([e,t])}}function l(a){if(o)throw new TypeError("Generator is already executing.");while(n&&(n=0,a[0]&&(i=0)),i)try{if(o=1,r&&(s=a[0]&2?r["return"]:a[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;if(r=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{o=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-272d51a4.js";import{VerdocsEndpoint,getTemplate,updateTemplateRole,deleteTemplateRole,isValidEmail}from"@verdocs/js-sdk";import{S as SDKError}from"./errors-887f1e88.js";import{S as Store}from"./Datastore-3f924d94.js";var verdocsMenuPanelCss='@-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-menu-panel-overlay{top:0;left:0;width:100%;height:100%;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.4980392157)}#verdocs-menu-panel{opacity:0;z-index:10001;position:fixed;overflow-y:scroll;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-animation:showVerdocsMenuPanel 0.35s;-webkit-animation-fill-mode:forwards}@-webkit-keyframes showVerdocsMenuPanel{0%{opacity:0;right:-300px}100%{right:0;opacity:1}}';var VerdocsMenuPanelStyle0=verdocsMenuPanelCss;var VerdocsMenuPanel=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close",7);this.moved=false;this.overlayId="verdocs-menu-panel-overlay";this.panelId="verdocs-menu-panel";this.side="right";this.overlay=true;this.width=300}e.prototype.handleClick=function(e){var t;if(!this.element.contains(e.target)){this.hide();(t=this.close)===null||t===void 0?void 0:t.emit()}};e.prototype.componentWillLoad=function(){this.hide();if(this.overlay){this.portal=document.createElement("div");this.portal.setAttribute("id",this.overlayId);document.body.append(this.portal)}this.portal=document.createElement("div");this.portal.setAttribute("id",this.panelId);this.portal.style.top="0px";this.portal.style.bottom="0px";this.portal.style.width="".concat(this.width,"px");if(this.side==="left"){this.portal.style.left="0px"}else{this.portal.style.right="0px"}document.body.append(this.portal)};e.prototype.componentDidLoad=function(){this.portal.appendChild(this.element)};e.prototype.disconnectedCallback=function(){this.moved?this.portal.remove():this.moved=true};e.prototype.hide=function(){var e,t;(e=document.getElementById(this.overlayId))===null||e===void 0?void 0:e.remove();(t=document.getElementById(this.panelId))===null||t===void 0?void 0:t.remove()};e.prototype.render=function(){var e=this;return h(Host,{key:"1d8fd8a0d6035917184972712ab812f5c6141a1f",ref:function(t){return e.element=t}},h("slot",{key:"696879936056ff36c4054e4a235455f9308605af"}))};return e}();VerdocsMenuPanel.style=VerdocsMenuPanelStyle0;var verdocsTemplateRolePropertiesCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-role-properties{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form{gap:15px;padding:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-role-properties form .instructions{margin:7px 0 0 0;font-size:12px;font-style:italic}verdocs-template-role-properties form .input-label{display:block;font-size:14px;-ms-flex:0 0 100px;flex:0 0 100px;font-weight:700;margin:0 0 4px 0;color:#555570}verdocs-template-role-properties form .first-last{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form verdocs-help-icon{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-role-properties verdocs-select-input label{display:block}verdocs-template-role-properties verdocs-text-input{margin:0}verdocs-template-role-properties verdocs-text-input label{display:block}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';var VerdocsTemplateRolePropertiesStyle0=verdocsTemplateRolePropertiesCss;var TrashIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var VerdocsTemplateRoleProperties=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close",7);this.delete=createEvent(this,"delete",7);this.sdkError=createEvent(this,"sdkError",7);this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.roleName="";this.dirty=false;this.saving=false;this.name="";this.type="signer";this.first_name="";this.last_name="";this.email="";this.phone="";this.delegator=false;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(o){try{this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}this.listenToTemplate()}catch(o){console.log("[ROLES Error with preview session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){console.log("[ROLES] Loading tempate",this.templateId);this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){var i;console.log("[BUILD] Template Updated",t);e.template=t;e.loading=false;var o=(i=e.template)===null||i===void 0?void 0:i.roles.find((function(t){return t.name===e.roleName}));if(o){e.name=o.name;e.type=o.type;e.first_name=o.first_name;e.last_name=o.last_name;e.email=o.email;e.phone=o.phone;e.delegator=o.delegator;console.log("[ROLES] Editing role",o)}}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handleCancel=function(e){var t=this;var i,o;e.stopPropagation();var r=(i=this.template)===null||i===void 0?void 0:i.roles.find((function(e){return e.name===t.roleName}));if(r){this.name=r.name;this.type=r.type;this.first_name=r.first_name;this.last_name=r.last_name;this.email=r.email;this.phone=r.phone;this.delegator=r.delegator}this.dirty=false;(o=this.close)===null||o===void 0?void 0:o.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();this.saving=true;updateTemplateRole(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,delegator:this.delegator}).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t,i,o;var r=this;return __generator(this,(function(s){console.log("[ROLES] Update result",e);this.saving=false;this.dirty=false;i=JSON.parse(JSON.stringify(this.template));o=i.roles.findIndex((function(e){return e.name===r.roleName}));if(o>-1){i.roles[o]=e}Store.updateTemplate(this.templateId,i);(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}))}))})).catch((function(e){console.log("[ROLES Update error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){deleteTemplateRole(this.endpoint,this.templateId,this.roleName).then((function(){var e,i;var o=JSON.parse(JSON.stringify(t.template));o.roles=o.roles.filter((function(e){return e.name!==t.roleName}));Store.getTemplate(t.endpoint,t.templateId,true);(e=t.delete)===null||e===void 0?void 0:e.emit({templateId:t.templateId,roleName:t.roleName});(i=t.close)===null||i===void 0?void 0:i.emit()})).catch((function(e){console.log("[ROLES Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t;var i=(((t=this.template)===null||t===void 0?void 0:t.fields)||[]).some((function(t){return t.role_name===e.roleName}));var o=!this.email&&!this.first_name&&!this.last_name||isValidEmail(this.email)&&!!this.first_name&&!!this.last_name;return h(Host,{key:"a1895798db1e9b9f63c42e79556bdb76029217c2"},h("form",{key:"8be859da1a954e4d086d630e0d5aeaa991f88640",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{key:"a37025fa1b286d43493bd142f77f8310b02ee701"},h("verdocs-text-input",{key:"eea1b7844b0a60c30a6ee50a123399b7fe6fac4a",id:"verdocs-role-name",label:"Role Name (Must be unique)",value:this.name,autocomplete:"off",disabled:i,placeholder:"Role Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),i&&h("div",{key:"5945d4e7a64f9b4a513bbd975fb821f662e452a4",class:"instructions"},"This role has fields assigned and can no longer be renamed.")),h("div",{key:"14cfb01f29a5889f1fcb2c90366ba4f215341a2c"},h("div",{key:"9095e3b2f1f378c9d3937898ca68d6742d89be54",class:"input-label"},"Type:"),h("verdocs-select-input",{key:"b07e4afc086e7d1563f58bb3c43aa0d909d8a65e",value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}})),h("div",{key:"5e1ed5226be0707cc5430c1e7bd38ad6e4df5dd5"},h("div",{key:"fc4a467cb0da25a80c421134c8226480369d2a83",class:"input-label"},"Default Contact Info:"),h("div",{key:"f6cb36cde86b8067c374e4bf0cffa6549851888d",class:"first-last"},h("verdocs-text-input",{key:"a52d5426c87419f45482ef6004ef11597400ea87",id:"verdocs-recipient-first",value:this.first_name,autocomplete:"off",placeholder:"First...",onInput:function(t){e.first_name=t.target.value;e.dirty=true}}),h("verdocs-text-input",{key:"b9035b299231319dce05f19c15c4d427ad6cd2f3",id:"verdocs-recipient-first",value:this.last_name,autocomplete:"off",placeholder:"Last...",onInput:function(t){e.last_name=t.target.value;e.dirty=true}}))),h("div",{key:"d42c1ce5ae61db11a0ac32b3fa7bc3816e3068c6"},h("verdocs-text-input",{key:"63436a7be6b3f35c2341dc88d137bd2f6b061978",id:"verdocs-recipient-email",value:this.email,autocomplete:"off",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),h("div",{key:"5a7ed36cfa657fb9ee11cf62998abbab2cc641e9",style:{height:"15px"}}),h("div",{key:"c974f4e78235706788dfa54f69f6f5ec7d37d00e"},h("verdocs-text-input",{key:"2be4c29396c6e6bc4f687819646ea219fce97e82",id:"verdocs-recipient-phone",value:this.phone,autocomplete:"off",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}))),h("div",{key:"a0eba03681cab8b491e5bd833c9d718d85979d92",class:"buttons"},h("button",{key:"145ae41f583a843a6e64743b9f18a0f3c23c370c",class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:TrashIcon}),h("div",{key:"e81da0df0eceae434bb1fbaa5b642edacc978a4a",style:{flex:"1"}}),h("verdocs-button",{key:"bb0cd0eae3b51a84b2729531508d888cb03dad10",size:"small",label:"Save",disabled:!this.dirty||!o,onClick:function(t){return e.handleSave(t)}}))))};return e}();VerdocsTemplateRoleProperties.style=VerdocsTemplateRolePropertiesStyle0;export{VerdocsMenuPanel as verdocs_menu_panel,VerdocsTemplateRoleProperties as verdocs_template_role_properties};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function n(e){try{l(o.next(e))}catch(e){s(e)}}function a(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):r(e.value).then(n,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,r,s,n;return n={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function a(e){return function(t){return l([e,t])}}function l(a){if(o)throw new TypeError("Generator is already executing.");while(n&&(n=0,a[0]&&(i=0)),i)try{if(o=1,r&&(s=a[0]&2?r["return"]:a[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;if(r=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){i.label=a[1];break}if(a[0]===6&&i.label<s[1]){i.label=s[1];s=a;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(a);break}if(s[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{o=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-272d51a4.js";import{VerdocsEndpoint,getTemplate,updateTemplateRole,deleteTemplateRole,isValidEmail}from"@verdocs/js-sdk";import{S as SDKError}from"./errors-887f1e88.js";import{S as Store}from"./Datastore-77cb8d9c.js";var verdocsMenuPanelCss='@-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-menu-panel-overlay{top:0;left:0;width:100%;height:100%;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.4980392157)}#verdocs-menu-panel{opacity:0;z-index:10001;position:fixed;overflow-y:scroll;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-animation:showVerdocsMenuPanel 0.35s;-webkit-animation-fill-mode:forwards}@-webkit-keyframes showVerdocsMenuPanel{0%{opacity:0;right:-300px}100%{right:0;opacity:1}}';var VerdocsMenuPanelStyle0=verdocsMenuPanelCss;var VerdocsMenuPanel=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close",7);this.moved=false;this.overlayId="verdocs-menu-panel-overlay";this.panelId="verdocs-menu-panel";this.side="right";this.overlay=true;this.width=300}e.prototype.handleClick=function(e){var t;if(!this.element.contains(e.target)){this.hide();(t=this.close)===null||t===void 0?void 0:t.emit()}};e.prototype.componentWillLoad=function(){this.hide();if(this.overlay){this.portal=document.createElement("div");this.portal.setAttribute("id",this.overlayId);document.body.append(this.portal)}this.portal=document.createElement("div");this.portal.setAttribute("id",this.panelId);this.portal.style.top="0px";this.portal.style.bottom="0px";this.portal.style.width="".concat(this.width,"px");if(this.side==="left"){this.portal.style.left="0px"}else{this.portal.style.right="0px"}document.body.append(this.portal)};e.prototype.componentDidLoad=function(){this.portal.appendChild(this.element)};e.prototype.disconnectedCallback=function(){this.moved?this.portal.remove():this.moved=true};e.prototype.hide=function(){var e,t;(e=document.getElementById(this.overlayId))===null||e===void 0?void 0:e.remove();(t=document.getElementById(this.panelId))===null||t===void 0?void 0:t.remove()};e.prototype.render=function(){var e=this;return h(Host,{key:"1d8fd8a0d6035917184972712ab812f5c6141a1f",ref:function(t){return e.element=t}},h("slot",{key:"696879936056ff36c4054e4a235455f9308605af"}))};return e}();VerdocsMenuPanel.style=VerdocsMenuPanelStyle0;var verdocsTemplateRolePropertiesCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-role-properties{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form{gap:15px;padding:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-role-properties form .instructions{margin:7px 0 0 0;font-size:12px;font-style:italic}verdocs-template-role-properties form .input-label{display:block;font-size:14px;-ms-flex:0 0 100px;flex:0 0 100px;font-weight:700;margin:0 0 4px 0;color:#555570}verdocs-template-role-properties form .first-last{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form verdocs-help-icon{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-role-properties verdocs-select-input label{display:block}verdocs-template-role-properties verdocs-text-input{margin:0}verdocs-template-role-properties verdocs-text-input label{display:block}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';var VerdocsTemplateRolePropertiesStyle0=verdocsTemplateRolePropertiesCss;var TrashIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var VerdocsTemplateRoleProperties=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close",7);this.delete=createEvent(this,"delete",7);this.sdkError=createEvent(this,"sdkError",7);this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.roleName="";this.dirty=false;this.saving=false;this.name="";this.type="signer";this.first_name="";this.last_name="";this.email="";this.phone="";this.delegator=false;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(o){try{this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}this.listenToTemplate()}catch(o){console.log("[ROLES Error with preview session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(i=o.response)===null||i===void 0?void 0:i.data))}return[2]}))}))};e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){console.log("[ROLES] Loading tempate",this.templateId);this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){var i;console.log("[BUILD] Template Updated",t);e.template=t;e.loading=false;var o=(i=e.template)===null||i===void 0?void 0:i.roles.find((function(t){return t.name===e.roleName}));if(o){e.name=o.name;e.type=o.type;e.first_name=o.first_name;e.last_name=o.last_name;e.email=o.email;e.phone=o.phone;e.delegator=o.delegator;console.log("[ROLES] Editing role",o)}}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.handleCancel=function(e){var t=this;var i,o;e.stopPropagation();var r=(i=this.template)===null||i===void 0?void 0:i.roles.find((function(e){return e.name===t.roleName}));if(r){this.name=r.name;this.type=r.type;this.first_name=r.first_name;this.last_name=r.last_name;this.email=r.email;this.phone=r.phone;this.delegator=r.delegator}this.dirty=false;(o=this.close)===null||o===void 0?void 0:o.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();this.saving=true;updateTemplateRole(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,delegator:this.delegator}).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t,i,o;var r=this;return __generator(this,(function(s){console.log("[ROLES] Update result",e);this.saving=false;this.dirty=false;i=JSON.parse(JSON.stringify(this.template));o=i.roles.findIndex((function(e){return e.name===r.roleName}));if(o>-1){i.roles[o]=e}Store.updateTemplate(this.templateId,i);(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}))}))})).catch((function(e){console.log("[ROLES Update error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(i){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){deleteTemplateRole(this.endpoint,this.templateId,this.roleName).then((function(){var e,i;var o=JSON.parse(JSON.stringify(t.template));o.roles=o.roles.filter((function(e){return e.name!==t.roleName}));Store.getTemplate(t.endpoint,t.templateId,true);(e=t.delete)===null||e===void 0?void 0:e.emit({templateId:t.templateId,roleName:t.roleName});(i=t.close)===null||i===void 0?void 0:i.emit()})).catch((function(e){console.log("[ROLES Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t;var i=(((t=this.template)===null||t===void 0?void 0:t.fields)||[]).some((function(t){return t.role_name===e.roleName}));var o=!this.email&&!this.first_name&&!this.last_name||isValidEmail(this.email)&&!!this.first_name&&!!this.last_name;return h(Host,{key:"a1895798db1e9b9f63c42e79556bdb76029217c2"},h("form",{key:"8be859da1a954e4d086d630e0d5aeaa991f88640",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{key:"a37025fa1b286d43493bd142f77f8310b02ee701"},h("verdocs-text-input",{key:"eea1b7844b0a60c30a6ee50a123399b7fe6fac4a",id:"verdocs-role-name",label:"Role Name (Must be unique)",value:this.name,autocomplete:"off",disabled:i,placeholder:"Role Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),i&&h("div",{key:"5945d4e7a64f9b4a513bbd975fb821f662e452a4",class:"instructions"},"This role has fields assigned and can no longer be renamed.")),h("div",{key:"14cfb01f29a5889f1fcb2c90366ba4f215341a2c"},h("div",{key:"9095e3b2f1f378c9d3937898ca68d6742d89be54",class:"input-label"},"Type:"),h("verdocs-select-input",{key:"b07e4afc086e7d1563f58bb3c43aa0d909d8a65e",value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}})),h("div",{key:"5e1ed5226be0707cc5430c1e7bd38ad6e4df5dd5"},h("div",{key:"fc4a467cb0da25a80c421134c8226480369d2a83",class:"input-label"},"Default Contact Info:"),h("div",{key:"f6cb36cde86b8067c374e4bf0cffa6549851888d",class:"first-last"},h("verdocs-text-input",{key:"a52d5426c87419f45482ef6004ef11597400ea87",id:"verdocs-recipient-first",value:this.first_name,autocomplete:"off",placeholder:"First...",onInput:function(t){e.first_name=t.target.value;e.dirty=true}}),h("verdocs-text-input",{key:"b9035b299231319dce05f19c15c4d427ad6cd2f3",id:"verdocs-recipient-first",value:this.last_name,autocomplete:"off",placeholder:"Last...",onInput:function(t){e.last_name=t.target.value;e.dirty=true}}))),h("div",{key:"d42c1ce5ae61db11a0ac32b3fa7bc3816e3068c6"},h("verdocs-text-input",{key:"63436a7be6b3f35c2341dc88d137bd2f6b061978",id:"verdocs-recipient-email",value:this.email,autocomplete:"off",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),h("div",{key:"5a7ed36cfa657fb9ee11cf62998abbab2cc641e9",style:{height:"15px"}}),h("div",{key:"c974f4e78235706788dfa54f69f6f5ec7d37d00e"},h("verdocs-text-input",{key:"2be4c29396c6e6bc4f687819646ea219fce97e82",id:"verdocs-recipient-phone",value:this.phone,autocomplete:"off",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}))),h("div",{key:"a0eba03681cab8b491e5bd833c9d718d85979d92",class:"buttons"},h("button",{key:"145ae41f583a843a6e64743b9f18a0f3c23c370c",class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:TrashIcon}),h("div",{key:"e81da0df0eceae434bb1fbaa5b642edacc978a4a",style:{flex:"1"}}),h("verdocs-button",{key:"bb0cd0eae3b51a84b2729531508d888cb03dad10",size:"small",label:"Save",disabled:!this.dirty||!o,onClick:function(t){return e.handleSave(t)}}))))};return e}();VerdocsTemplateRoleProperties.style=VerdocsTemplateRolePropertiesStyle0;export{VerdocsMenuPanel as verdocs_menu_panel,VerdocsTemplateRoleProperties as verdocs_template_role_properties};
2
2
  //# sourceMappingURL=verdocs-menu-panel_2.entry.js.map