@verdocs/web-sdk 5.0.51 → 5.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/dist/cjs/index-2b9aa26f.js +2 -2
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +6 -6
  5. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +2 -2
  6. package/dist/cjs/{verdocs-kba-dialog_2.cjs.entry.js → verdocs-kba-dialog_3.cjs.entry.js} +91 -5
  7. package/dist/cjs/verdocs-kba-dialog_3.cjs.entry.js.map +1 -0
  8. package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +7 -7
  9. package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-sign.cjs.entry.js +5 -0
  12. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  13. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +2 -2
  14. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js.map +1 -1
  17. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  20. package/dist/collection/collection-manifest.json +1 -0
  21. package/dist/collection/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.css +4 -1
  22. package/dist/collection/components/dialogs/verdocs-otp-dialog/verdocs-otp-dialog.css +163 -0
  23. package/dist/collection/components/dialogs/verdocs-otp-dialog/verdocs-otp-dialog.js +187 -0
  24. package/dist/collection/components/dialogs/verdocs-otp-dialog/verdocs-otp-dialog.js.map +1 -0
  25. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +1 -1
  26. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +1 -1
  27. package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +1 -1
  28. package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +1 -1
  29. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +5 -0
  30. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  31. package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -1
  32. package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +6 -6
  33. package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.js +2 -2
  34. package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.js +1 -1
  35. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +7 -7
  36. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
  37. package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
  38. package/dist/components/index.js +2 -0
  39. package/dist/components/index.js.map +1 -1
  40. package/dist/components/{p-31e18593.js → p-1dccb8a9.js} +2 -2
  41. package/dist/components/{p-31e18593.js.map → p-1dccb8a9.js.map} +1 -1
  42. package/dist/components/{p-a7f85081.js → p-2508f120.js} +8 -8
  43. package/dist/components/{p-a7f85081.js.map → p-2508f120.js.map} +1 -1
  44. package/dist/components/{p-571fe280.js → p-25c19f32.js} +2 -2
  45. package/dist/components/{p-571fe280.js.map → p-25c19f32.js.map} +1 -1
  46. package/dist/components/{p-f9789855.js → p-592a0baf.js} +6 -6
  47. package/dist/components/{p-f9789855.js.map → p-592a0baf.js.map} +1 -1
  48. package/dist/components/{p-f3d501b9.js → p-6130383b.js} +2 -2
  49. package/dist/components/{p-f3d501b9.js.map → p-6130383b.js.map} +1 -1
  50. package/dist/components/{p-43fb3b33.js → p-85b0a2e1.js} +7 -7
  51. package/dist/components/{p-43fb3b33.js.map → p-85b0a2e1.js.map} +1 -1
  52. package/dist/components/p-b663b885.js +116 -0
  53. package/dist/components/p-b663b885.js.map +1 -0
  54. package/dist/components/{p-bae61eb2.js → p-b6e5b0c3.js} +2 -2
  55. package/dist/components/p-b6e5b0c3.js.map +1 -0
  56. package/dist/components/{p-ffa430d4.js → p-bcdf821c.js} +5 -5
  57. package/dist/components/{p-ffa430d4.js.map → p-bcdf821c.js.map} +1 -1
  58. package/dist/components/{p-8203a6af.js → p-c04daa8c.js} +2 -2
  59. package/dist/components/{p-8203a6af.js.map → p-c04daa8c.js.map} +1 -1
  60. package/dist/components/{p-83430ada.js → p-d16c9dd7.js} +2 -2
  61. package/dist/components/{p-83430ada.js.map → p-d16c9dd7.js.map} +1 -1
  62. package/dist/components/{p-d9fd90cc.js → p-de58dbf5.js} +2 -2
  63. package/dist/components/{p-d9fd90cc.js.map → p-de58dbf5.js.map} +1 -1
  64. package/dist/components/{p-e90316c8.js → p-e46946db.js} +2 -2
  65. package/dist/components/{p-e90316c8.js.map → p-e46946db.js.map} +1 -1
  66. package/dist/components/{p-c0e75957.js → p-ec382639.js} +3 -3
  67. package/dist/components/{p-c0e75957.js.map → p-ec382639.js.map} +1 -1
  68. package/dist/components/{p-03b81b12.js → p-f887116b.js} +2 -2
  69. package/dist/components/{p-03b81b12.js.map → p-f887116b.js.map} +1 -1
  70. package/dist/components/verdocs-build.js +10 -10
  71. package/dist/components/verdocs-envelope-document-page.js +1 -1
  72. package/dist/components/verdocs-envelopes-list.js +7 -7
  73. package/dist/components/verdocs-field-attachment.js +1 -1
  74. package/dist/components/verdocs-field-signature.js +1 -1
  75. package/dist/components/verdocs-otp-dialog.d.ts +11 -0
  76. package/dist/components/verdocs-otp-dialog.js +8 -0
  77. package/dist/components/verdocs-otp-dialog.js.map +1 -0
  78. package/dist/components/verdocs-preview.js +1 -1
  79. package/dist/components/verdocs-quick-functions.js +1 -1
  80. package/dist/components/verdocs-search-tabs.js +1 -1
  81. package/dist/components/verdocs-sign.js +26 -15
  82. package/dist/components/verdocs-sign.js.map +1 -1
  83. package/dist/components/verdocs-signature-dialog.js +1 -1
  84. package/dist/components/verdocs-status-indicator.js +1 -1
  85. package/dist/components/verdocs-template-card.js +1 -1
  86. package/dist/components/verdocs-template-document-page.js +1 -1
  87. package/dist/components/verdocs-template-fields.js +1 -1
  88. package/dist/components/verdocs-template-role-properties.js +1 -1
  89. package/dist/components/verdocs-template-roles.js +1 -1
  90. package/dist/components/verdocs-template-star.js +1 -1
  91. package/dist/components/verdocs-template-tags.js +1 -1
  92. package/dist/components/verdocs-templates-list.js +1 -1
  93. package/dist/components/verdocs-toolbar-icon.js +1 -1
  94. package/dist/components/verdocs-upload-dialog.js +1 -1
  95. package/dist/components/verdocs-view.js +1 -1
  96. package/dist/custom-elements.json +2252 -0
  97. package/dist/esm/index-24c3207f.js +2 -2
  98. package/dist/esm/loader.js +1 -1
  99. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  100. package/dist/esm/verdocs-envelopes-list.entry.js +6 -6
  101. package/dist/esm/verdocs-field-attachment_13.entry.js +2 -2
  102. package/dist/esm/{verdocs-kba-dialog_2.entry.js → verdocs-kba-dialog_3.entry.js} +92 -7
  103. package/dist/esm/verdocs-kba-dialog_3.entry.js.map +1 -0
  104. package/dist/esm/verdocs-menu-panel_2.entry.js +7 -7
  105. package/dist/esm/verdocs-quick-functions.entry.js +1 -1
  106. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  107. package/dist/esm/verdocs-sign.entry.js +5 -0
  108. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  109. package/dist/esm/verdocs-status-indicator.entry.js +2 -2
  110. package/dist/esm/verdocs-template-card.entry.js +1 -1
  111. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  112. package/dist/esm/verdocs-template-document-page_2.entry.js.map +1 -1
  113. package/dist/esm/verdocs-template-star.entry.js +1 -1
  114. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  115. package/dist/esm/verdocs-web-sdk.js +1 -1
  116. package/dist/esm-es5/index-24c3207f.js +1 -1
  117. package/dist/esm-es5/loader.js +1 -1
  118. package/dist/esm-es5/loader.js.map +1 -1
  119. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-kba-dialog_3.entry.js +2 -0
  123. package/dist/esm-es5/verdocs-kba-dialog_3.entry.js.map +1 -0
  124. package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  127. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  128. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  129. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  132. package/dist/esm-es5/verdocs-template-document-page_2.entry.js.map +1 -1
  133. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  134. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  135. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  136. package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
  137. package/dist/types/components/dialogs/verdocs-otp-dialog/verdocs-otp-dialog.d.ts +36 -0
  138. package/dist/types/components.d.ts +67 -2
  139. package/dist/verdocs-web-sdk/{p-2386d60c.entry.js → p-05000ccc.entry.js} +2 -2
  140. package/dist/verdocs-web-sdk/{p-10cbb44d.system.entry.js → p-0b26b5c8.system.entry.js} +2 -2
  141. package/dist/verdocs-web-sdk/{p-7d394848.entry.js → p-0fee994b.entry.js} +2 -2
  142. package/dist/verdocs-web-sdk/{p-2cc55fbf.entry.js → p-11c8ffea.entry.js} +2 -2
  143. package/dist/verdocs-web-sdk/{p-4e022197.entry.js → p-153e03e0.entry.js} +2 -2
  144. package/dist/verdocs-web-sdk/{p-72152009.entry.js → p-1872c8f4.entry.js} +2 -2
  145. package/dist/verdocs-web-sdk/p-1872c8f4.entry.js.map +1 -0
  146. package/dist/verdocs-web-sdk/{p-2d892f93.system.entry.js → p-2f68a524.system.entry.js} +2 -2
  147. package/dist/verdocs-web-sdk/{p-b8ccd4e5.entry.js → p-31e15b7b.entry.js} +2 -2
  148. package/dist/verdocs-web-sdk/{p-b8ccd4e5.entry.js.map → p-31e15b7b.entry.js.map} +1 -1
  149. package/dist/verdocs-web-sdk/{p-7b7be644.entry.js → p-437ce063.entry.js} +2 -2
  150. package/dist/verdocs-web-sdk/{p-299bb90e.system.entry.js → p-49c785c1.system.entry.js} +2 -2
  151. package/dist/verdocs-web-sdk/{p-6fe49e4a.system.entry.js → p-4c8b181b.system.entry.js} +2 -2
  152. package/dist/verdocs-web-sdk/{p-9b13c31e.system.entry.js → p-5c1789d5.system.entry.js} +2 -2
  153. package/dist/verdocs-web-sdk/{p-a058e16b.system.entry.js → p-689c27e5.system.entry.js} +2 -2
  154. package/dist/verdocs-web-sdk/{p-f4a233b8.entry.js → p-6bdbbe58.entry.js} +2 -2
  155. package/dist/verdocs-web-sdk/{p-538d5113.entry.js → p-73fe8630.entry.js} +2 -2
  156. package/dist/verdocs-web-sdk/{p-227fdd3a.system.entry.js → p-7a4d7c71.system.entry.js} +2 -2
  157. package/dist/verdocs-web-sdk/{p-227fdd3a.system.entry.js.map → p-7a4d7c71.system.entry.js.map} +1 -1
  158. package/dist/verdocs-web-sdk/p-8a6c7f95.system.js +1 -1
  159. package/dist/verdocs-web-sdk/p-8a6c7f95.system.js.map +1 -1
  160. package/dist/verdocs-web-sdk/{p-410a6003.system.entry.js → p-a0eef7ff.system.entry.js} +2 -2
  161. package/dist/verdocs-web-sdk/{p-594d3edb.system.entry.js → p-a1d64ec5.system.entry.js} +2 -2
  162. package/dist/verdocs-web-sdk/{p-2f9ba82a.entry.js → p-b0d1c5ec.entry.js} +2 -2
  163. package/dist/verdocs-web-sdk/{p-e46ccb3d.entry.js → p-bb84d9fa.entry.js} +2 -2
  164. package/dist/verdocs-web-sdk/{p-e06a796b.system.entry.js → p-c1dfe6e6.system.entry.js} +2 -2
  165. package/dist/verdocs-web-sdk/p-eb08e32c.entry.js +2 -0
  166. package/dist/verdocs-web-sdk/p-eb08e32c.entry.js.map +1 -0
  167. package/dist/verdocs-web-sdk/{p-8669ce44.entry.js → p-ed0f54de.entry.js} +2 -2
  168. package/dist/verdocs-web-sdk/{p-39d89ec1.system.entry.js → p-f14c3ce8.system.entry.js} +2 -2
  169. package/dist/verdocs-web-sdk/p-f14c3ce8.system.entry.js.map +1 -0
  170. package/dist/verdocs-web-sdk/p-f2a3c06d.system.entry.js +2 -0
  171. package/dist/verdocs-web-sdk/p-f2a3c06d.system.entry.js.map +1 -0
  172. package/dist/verdocs-web-sdk/{p-8982eb1c.system.entry.js → p-fe35adce.system.entry.js} +2 -2
  173. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  174. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
  175. package/package.json +1 -1
  176. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js.map +0 -1
  177. package/dist/components/p-bae61eb2.js.map +0 -1
  178. package/dist/esm/verdocs-kba-dialog_2.entry.js.map +0 -1
  179. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +0 -2
  180. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js.map +0 -1
  181. package/dist/verdocs-web-sdk/p-39d89ec1.system.entry.js.map +0 -1
  182. package/dist/verdocs-web-sdk/p-72152009.entry.js.map +0 -1
  183. package/dist/verdocs-web-sdk/p-825259ba.system.entry.js +0 -2
  184. package/dist/verdocs-web-sdk/p-825259ba.system.entry.js.map +0 -1
  185. package/dist/verdocs-web-sdk/p-e7cf98ed.entry.js +0 -2
  186. package/dist/verdocs-web-sdk/p-e7cf98ed.entry.js.map +0 -1
  187. /package/dist/verdocs-web-sdk/{p-2386d60c.entry.js.map → p-05000ccc.entry.js.map} +0 -0
  188. /package/dist/verdocs-web-sdk/{p-10cbb44d.system.entry.js.map → p-0b26b5c8.system.entry.js.map} +0 -0
  189. /package/dist/verdocs-web-sdk/{p-7d394848.entry.js.map → p-0fee994b.entry.js.map} +0 -0
  190. /package/dist/verdocs-web-sdk/{p-2cc55fbf.entry.js.map → p-11c8ffea.entry.js.map} +0 -0
  191. /package/dist/verdocs-web-sdk/{p-4e022197.entry.js.map → p-153e03e0.entry.js.map} +0 -0
  192. /package/dist/verdocs-web-sdk/{p-2d892f93.system.entry.js.map → p-2f68a524.system.entry.js.map} +0 -0
  193. /package/dist/verdocs-web-sdk/{p-7b7be644.entry.js.map → p-437ce063.entry.js.map} +0 -0
  194. /package/dist/verdocs-web-sdk/{p-299bb90e.system.entry.js.map → p-49c785c1.system.entry.js.map} +0 -0
  195. /package/dist/verdocs-web-sdk/{p-6fe49e4a.system.entry.js.map → p-4c8b181b.system.entry.js.map} +0 -0
  196. /package/dist/verdocs-web-sdk/{p-9b13c31e.system.entry.js.map → p-5c1789d5.system.entry.js.map} +0 -0
  197. /package/dist/verdocs-web-sdk/{p-a058e16b.system.entry.js.map → p-689c27e5.system.entry.js.map} +0 -0
  198. /package/dist/verdocs-web-sdk/{p-f4a233b8.entry.js.map → p-6bdbbe58.entry.js.map} +0 -0
  199. /package/dist/verdocs-web-sdk/{p-538d5113.entry.js.map → p-73fe8630.entry.js.map} +0 -0
  200. /package/dist/verdocs-web-sdk/{p-410a6003.system.entry.js.map → p-a0eef7ff.system.entry.js.map} +0 -0
  201. /package/dist/verdocs-web-sdk/{p-594d3edb.system.entry.js.map → p-a1d64ec5.system.entry.js.map} +0 -0
  202. /package/dist/verdocs-web-sdk/{p-2f9ba82a.entry.js.map → p-b0d1c5ec.entry.js.map} +0 -0
  203. /package/dist/verdocs-web-sdk/{p-e46ccb3d.entry.js.map → p-bb84d9fa.entry.js.map} +0 -0
  204. /package/dist/verdocs-web-sdk/{p-e06a796b.system.entry.js.map → p-c1dfe6e6.system.entry.js.map} +0 -0
  205. /package/dist/verdocs-web-sdk/{p-8669ce44.entry.js.map → p-ed0f54de.entry.js.map} +0 -0
  206. /package/dist/verdocs-web-sdk/{p-8982eb1c.system.entry.js.map → p-fe35adce.system.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as i,H as o,F as s,g as a}from"./p-576f984d.js";import{VerdocsEndpoint as r,getTemplateDocumentPageDisplayUri as d,getTemplate as l}from"@verdocs/js-sdk";import{t as c,j as n,g as p}from"./p-0c45b79c.js";import{S as h}from"./p-33300e3a.js";import{c as b}from"./p-68a5aaff.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-12bab948.js";const u="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}";const m=u;const f=class{constructor(i){e(this,i);this.pageRendered=t(this,"pageRendered",7);this.templateListenerId=null;this.endpoint=r.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}async componentWillLoad(){this.pageDisplayUri=await d(this.endpoint,this.documentId,this.pageNumber);this.listenToTemplate()}componentDidLoad(){this.resizeObserver=new ResizeObserver(c((e=>{for(const t of e){const e=t.contentRect.width;this.renderedWidth=e;this.renderedHeight=this.virtualHeight*(e/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}componentDidUpdate(){this.notifyRenderedSize()}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate();h.subscribe("templates",this.templateId,(()=>l(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){h.store.delListener(this.templateListenerId);this.templateListenerId=null}}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}const e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}const t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})}render(){if(this.loading){return i(o,null,i("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}const e=`${this.renderedHeight}px`;return i(o,{id:`${this.containerId}`,style:{height:e,flex:`0 0 ${e}`}},this.layers.map((t=>{var o;return t.type==="div"?i("div",{class:"verdocs-template-document-page-layer",id:`${this.containerId}-${t.name}`,style:{height:e}},t.name==="controls"&&(((o=this.template)===null||o===void 0?void 0:o.fields)||[]).filter((e=>e&&e.page===this.pageNumber)).map((e=>{var t,o;const a=p(e);let{name:r,type:d,multiline:l}=e;const{xScale:c,yScale:h,templateId:b,editable:u,disabled:m,done:f,pageNumber:g}=this;if(((t=e["setting"])===null||t===void 0?void 0:t.leading)>0||((o=e["settings"])===null||o===void 0?void 0:o.leading)>0){d="textarea";l=true}switch(d){case"textbox":return i("verdocs-field-textbox",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,multiline:l,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"textarea":return i("verdocs-field-textarea",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"date":return i("verdocs-field-date",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"attachment":return i("verdocs-field-attachment",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"dropdown":return i("verdocs-field-dropdown",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"initial":return i("verdocs-field-initial",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"signature":return i("verdocs-field-signature",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,this.xScale,this.yScale)});case"timestamp":return i("verdocs-field-timestamp",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"checkbox":return i("verdocs-field-checkbox",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"radio":return i("verdocs-field-radio",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});default:return i(s,null,r)}}))):this.pageDisplayUri?i("img",{class:"verdocs-template-document-page-layer img",id:`${this.containerId}-${t.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:e=>{this.naturalWidth=e.target.naturalWidth;this.naturalHeight=e.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=e.target.offsetWidth/this.aspectRatio}}):i("div",null)})))}get container(){return a(this)}};f.style=m;const g='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';const v=g;const x=class{constructor(t){e(this,t);this.text="";this.icon="";this.placement="bottom";this.containerId=`verdocs-toolbar-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=b(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}show(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((()=>{}))}hide(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")}render(){return i(o,{key:"8163f7ebe7d2f3a13db305b411b454287a4b3729",class:{}},i("div",{key:"1782db14268643ad1620ebcd5efc6a27ff9fcc04","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:e=>this.iconEl=e}),i("div",{key:"54c1bb4abc22a943051ba2df8b557e6c02fdabef",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:e=>this.tooltip=e},this.text,i("div",{key:"4d2c884923f2e79b375ffcfa2592cd914bead68c","data-popper-arrow":"true",class:"arrow"})))}};x.style=v;export{f as verdocs_template_document_page,x as verdocs_toolbar_icon};
2
- //# sourceMappingURL=p-b8ccd4e5.entry.js.map
1
+ import{r as e,c as t,h as i,H as o,F as s,g as a}from"./p-576f984d.js";import{VerdocsEndpoint as r,getTemplateDocumentPageDisplayUri as d,getTemplate as l}from"@verdocs/js-sdk";import{t as c,j as n,g as p}from"./p-0c45b79c.js";import{S as h}from"./p-33300e3a.js";import{c as b}from"./p-68a5aaff.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-12bab948.js";const u="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}";const m=u;const f=class{constructor(i){e(this,i);this.pageRendered=t(this,"pageRendered",7);this.templateListenerId=null;this.endpoint=r.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}async componentWillLoad(){this.pageDisplayUri=await d(this.endpoint,this.documentId,this.pageNumber);this.listenToTemplate()}componentDidLoad(){this.resizeObserver=new ResizeObserver(c((e=>{for(const t of e){const e=t.contentRect.width;this.renderedWidth=e;this.renderedHeight=this.virtualHeight*(e/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}componentDidUpdate(){this.notifyRenderedSize()}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate();h.subscribe("templates",this.templateId,(()=>l(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){h.store.delListener(this.templateListenerId);this.templateListenerId=null}}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}const e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}const t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})}render(){if(this.loading){return i(o,null,i("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}const e=`${this.renderedHeight}px`;return i(o,{id:`${this.containerId}`,style:{height:e,flex:`0 0 ${e}`}},this.layers.map((t=>{var o;return t.type==="div"?i("div",{class:"verdocs-template-document-page-layer",id:`${this.containerId}-${t.name}`,style:{height:e}},t.name==="controls"&&(((o=this.template)===null||o===void 0?void 0:o.fields)||[]).filter((e=>e&&e.page===this.pageNumber)).map((e=>{var t,o;const a=p(e);let{name:r,type:d,multiline:l}=e;const{xScale:c,yScale:h,templateId:b,editable:u,disabled:m,done:f,pageNumber:g}=this;if(((t=e["setting"])===null||t===void 0?void 0:t.leading)>0||((o=e["settings"])===null||o===void 0?void 0:o.leading)>0){d="textarea";l=true}switch(d){case"textbox":return i("verdocs-field-textbox",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,multiline:l,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"textarea":return i("verdocs-field-textarea",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"date":return i("verdocs-field-date",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"attachment":return i("verdocs-field-attachment",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"dropdown":return i("verdocs-field-dropdown",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"initial":return i("verdocs-field-initial",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"signature":return i("verdocs-field-signature",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,this.xScale,this.yScale)});case"timestamp":return i("verdocs-field-timestamp",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"checkbox":return i("verdocs-field-checkbox",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});case"radio":return i("verdocs-field-radio",{id:a,fieldname:r,source:"template",sourceid:b,editable:u,disabled:m,done:f,xscale:c,yscale:h,pagenumber:g,style:n(e,c,h)});default:return i(s,null,r)}}))):this.pageDisplayUri?i("img",{class:"verdocs-template-document-page-layer img",id:`${this.containerId}-${t.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:e=>{this.naturalWidth=e.target.naturalWidth;this.naturalHeight=e.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=e.target.offsetWidth/this.aspectRatio}}):i("div",null)})))}get container(){return a(this)}};f.style=m;const g='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';const v=g;const x=class{constructor(t){e(this,t);this.text="";this.icon="";this.placement="bottom";this.containerId=`verdocs-toolbar-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=b(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}show(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((()=>{}))}hide(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")}render(){return i(o,{key:"8163f7ebe7d2f3a13db305b411b454287a4b3729",class:{}},i("div",{key:"1782db14268643ad1620ebcd5efc6a27ff9fcc04","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:e=>this.iconEl=e}),i("div",{key:"54c1bb4abc22a943051ba2df8b557e6c02fdabef",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:e=>this.tooltip=e},this.text,i("div",{key:"4d2c884923f2e79b375ffcfa2592cd914bead68c","data-popper-arrow":"true",class:"arrow"})))}};x.style=v;export{f as verdocs_template_document_page,x as verdocs_toolbar_icon};
2
+ //# sourceMappingURL=p-31e15b7b.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["verdocsTemplateDocumentPageCss","VerdocsTemplateDocumentPageStyle0","VerdocsTemplateDocumentPage","constructor","hostRef","this","templateListenerId","endpoint","VerdocsEndpoint","getDefault","editable","disabled","done","templateId","documentId","pageNumber","virtualWidth","virtualHeight","layers","name","type","containerId","Math","random","toString","substring","renderedWidth","renderedHeight","naturalWidth","naturalHeight","aspectRatio","skipFirstNotification","pageDisplayUri","xScale","yScale","loading","template","componentWillLoad","getTemplateDocumentPageDisplayUri","listenToTemplate","componentDidLoad","resizeObserver","ResizeObserver","throttle","entries","entry","contentRect","width","notifyRenderedSize","observe","container","componentDidUpdate","disconnectedCallback","_a","disconnect","unlistenToTemplate","Store","subscribe","getTemplate","store","delListener","pageRendered","emit","render","h","Host","src","class","alt","height","id","style","flex","map","layer","fields","filter","field","page","getFieldId","multiline","leading","_b","fieldname","source","sourceid","xscale","yscale","pagenumber","getControlStyles","Fragment","onLoad","e","target","offsetWidth","verdocsToolbarIconCss","VerdocsToolbarIconStyle0","VerdocsToolbarIcon","text","icon","placement","popperInstance","createPopper","iconEl","tooltip","modifiers","options","offset","destroy","show","setAttribute","update","catch","hide","removeAttribute","key","innerHTML","onMouseEnter","onFocus","onMouseLeave","onBlur","ref","el","role"],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx","src/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.scss?tag=verdocs-toolbar-icon","src/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop() templateId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop() documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop() pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-toolbar-icon {\n font-family: $verdocs-primary-font;\n display: inline-block;\n\n .icon {\n display: inline-block;\n cursor: pointer;\n\n svg {\n fill: $choice-available-color;\n }\n }\n\n .tooltip {\n display: none;\n box-shadow: 0 0 10px 1px #999999;\n background: #ffffff;\n color: $label-color;\n max-width: 240px;\n font-weight: bold;\n padding: 5px 10px;\n font-size: 13px;\n position: relative;\n border-radius: 4px;\n z-index: 20000;\n white-space: nowrap;\n\n .arrow,\n .arrow::before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n top: -4px;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n }\n\n &[data-show] {\n display: block;\n }\n\n &[data-popper-placement^='top'] > .arrow {\n bottom: -4px;\n }\n\n &[data-popper-placement^='bottom'] > .arrow {\n top: -4px;\n }\n\n &[data-popper-placement^='left'] > .arrow {\n right: -4px;\n }\n\n &[data-popper-placement^='right'] > .arrow {\n left: -4px;\n }\n\n // For the floating menu\n &[data-popper-placement^='left'] {\n //margin-right: 22px !important;\n padding: 3px 10px;\n\n & > .arrow {\n right: -1px;\n }\n }\n }\n}\n","import {createPopper, Instance} from '@popperjs/core';\nimport {Component, h, Host, Prop, State} from '@stencil/core';\nimport {Placement} from '@popperjs/core/lib/enums';\n// import {Component, Event, EventEmitter, h, Host, Prop, State} from '@stencil/core';\n\n/**\n * Displays a simple help icon. Upon hover or focus, a tooltip will be displayed with help text.\n *\n * ```ts\n * <verdocs-toolbar-icon text=\"Sample tooltip text\" icon={CalendarIcon} />\n * ```\n */\n@Component({\n tag: 'verdocs-toolbar-icon',\n styleUrl: 'verdocs-toolbar-icon.scss',\n shadow: false,\n})\nexport class VerdocsToolbarIcon {\n iconEl: HTMLDivElement;\n tooltip: HTMLDivElement;\n popperInstance: Instance;\n\n /**\n * Help text to display on hover/focus\n */\n @Prop() text: string = '';\n\n /**\n * SVG icon to display\n */\n @Prop() icon: string = '';\n\n /**\n * Override the Popper \"placement\" setting\n */\n @Prop() placement: Placement = 'bottom';\n\n /**\n * Triggered when the icon is pressed\n */\n // @Event({composed: true}) press: EventEmitter;\n\n @State() containerId = `verdocs-toolbar-icon-${Math.random().toString(36).substring(2, 11)}`;\n\n componentDidLoad() {\n this.popperInstance = createPopper(this.iconEl, this.tooltip, {\n placement: this.placement,\n modifiers: this.placement === 'left' ? [{name: 'offset', options: {offset: [0, 20]}}] : [],\n });\n // placement: 'top-end',\n // modifiers: [{name: 'offset', options: {offset: [0, 10]}}],\n // });\n }\n\n disconnectedCallback() {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n show() {\n this.tooltip?.setAttribute('data-show', '');\n this.popperInstance?.update().catch(() => {});\n }\n\n hide() {\n this.tooltip?.removeAttribute('data-show');\n }\n\n // handlePress() {\n // this.press?.emit();\n // }\n\n render() {\n return (\n <Host class={{}}>\n <div\n aria-describedby={this.containerId}\n class=\"icon\"\n innerHTML={this.icon}\n onMouseEnter={() => this.show()}\n onFocus={() => this.show()}\n onMouseLeave={() => this.hide()}\n onBlur={() => this.hide()}\n ref={el => (this.iconEl = el as HTMLDivElement)}\n />\n <div id={this.containerId} role=\"tooltip\" class=\"tooltip\" data-popper-placement={this.placement} ref={el => (this.tooltip = el as HTMLDivElement)}>\n {this.text}\n <div data-popper-arrow=\"true\" class=\"arrow\" />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["verdocsTemplateDocumentPageCss","VerdocsTemplateDocumentPageStyle0","VerdocsTemplateDocumentPage","constructor","hostRef","this","templateListenerId","endpoint","VerdocsEndpoint","getDefault","editable","disabled","done","templateId","documentId","pageNumber","virtualWidth","virtualHeight","layers","name","type","containerId","Math","random","toString","substring","renderedWidth","renderedHeight","naturalWidth","naturalHeight","aspectRatio","skipFirstNotification","pageDisplayUri","xScale","yScale","loading","template","componentWillLoad","getTemplateDocumentPageDisplayUri","listenToTemplate","componentDidLoad","resizeObserver","ResizeObserver","throttle","entries","entry","contentRect","width","notifyRenderedSize","observe","container","componentDidUpdate","disconnectedCallback","_a","disconnect","unlistenToTemplate","Store","subscribe","getTemplate","store","delListener","pageRendered","emit","render","h","Host","src","class","alt","height","id","style","flex","map","layer","fields","filter","field","page","getFieldId","multiline","leading","_b","fieldname","source","sourceid","xscale","yscale","pagenumber","getControlStyles","Fragment","onLoad","e","target","offsetWidth","verdocsToolbarIconCss","VerdocsToolbarIconStyle0","VerdocsToolbarIcon","text","icon","placement","popperInstance","createPopper","iconEl","tooltip","modifiers","options","offset","destroy","show","setAttribute","update","catch","hide","removeAttribute","key","innerHTML","onMouseEnter","onFocus","onMouseLeave","onBlur","ref","el","role"],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx","src/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.scss?tag=verdocs-toolbar-icon","src/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop() templateId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop() documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop() pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-toolbar-icon {\n font-family: $verdocs-primary-font;\n //display: inline-block;\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n\n .icon {\n display: inline-block;\n cursor: pointer;\n\n svg {\n fill: $choice-available-color;\n }\n }\n\n .tooltip {\n display: none;\n box-shadow: 0 0 10px 1px #999999;\n background: #ffffff;\n color: $label-color;\n max-width: 240px;\n font-weight: bold;\n padding: 5px 10px;\n font-size: 13px;\n position: relative;\n border-radius: 4px;\n z-index: 20000;\n white-space: nowrap;\n\n .arrow,\n .arrow::before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n top: -4px;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n }\n\n &[data-show] {\n display: block;\n }\n\n &[data-popper-placement^='top'] > .arrow {\n bottom: -4px;\n }\n\n &[data-popper-placement^='bottom'] > .arrow {\n top: -4px;\n }\n\n &[data-popper-placement^='left'] > .arrow {\n right: -4px;\n }\n\n &[data-popper-placement^='right'] > .arrow {\n left: -4px;\n }\n\n // For the floating menu\n &[data-popper-placement^='left'] {\n //margin-right: 22px !important;\n padding: 3px 10px;\n\n & > .arrow {\n right: -1px;\n }\n }\n }\n}\n","import {createPopper, Instance} from '@popperjs/core';\nimport {Component, h, Host, Prop, State} from '@stencil/core';\nimport {Placement} from '@popperjs/core/lib/enums';\n// import {Component, Event, EventEmitter, h, Host, Prop, State} from '@stencil/core';\n\n/**\n * Displays a simple help icon. Upon hover or focus, a tooltip will be displayed with help text.\n *\n * ```ts\n * <verdocs-toolbar-icon text=\"Sample tooltip text\" icon={CalendarIcon} />\n * ```\n */\n@Component({\n tag: 'verdocs-toolbar-icon',\n styleUrl: 'verdocs-toolbar-icon.scss',\n shadow: false,\n})\nexport class VerdocsToolbarIcon {\n iconEl: HTMLDivElement;\n tooltip: HTMLDivElement;\n popperInstance: Instance;\n\n /**\n * Help text to display on hover/focus\n */\n @Prop() text: string = '';\n\n /**\n * SVG icon to display\n */\n @Prop() icon: string = '';\n\n /**\n * Override the Popper \"placement\" setting\n */\n @Prop() placement: Placement = 'bottom';\n\n /**\n * Triggered when the icon is pressed\n */\n // @Event({composed: true}) press: EventEmitter;\n\n @State() containerId = `verdocs-toolbar-icon-${Math.random().toString(36).substring(2, 11)}`;\n\n componentDidLoad() {\n this.popperInstance = createPopper(this.iconEl, this.tooltip, {\n placement: this.placement,\n modifiers: this.placement === 'left' ? [{name: 'offset', options: {offset: [0, 20]}}] : [],\n });\n // placement: 'top-end',\n // modifiers: [{name: 'offset', options: {offset: [0, 10]}}],\n // });\n }\n\n disconnectedCallback() {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n show() {\n this.tooltip?.setAttribute('data-show', '');\n this.popperInstance?.update().catch(() => {});\n }\n\n hide() {\n this.tooltip?.removeAttribute('data-show');\n }\n\n // handlePress() {\n // this.press?.emit();\n // }\n\n render() {\n return (\n <Host class={{}}>\n <div\n aria-describedby={this.containerId}\n class=\"icon\"\n innerHTML={this.icon}\n onMouseEnter={() => this.show()}\n onFocus={() => this.show()}\n onMouseLeave={() => this.hide()}\n onBlur={() => this.hide()}\n ref={el => (this.iconEl = el as HTMLDivElement)}\n />\n <div id={this.containerId} role=\"tooltip\" class=\"tooltip\" data-popper-placement={this.placement} ref={el => (this.tooltip = el as HTMLDivElement)}>\n {this.text}\n <div data-popper-arrow=\"true\" class=\"arrow\" />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r,h as o,H as e}from"./p-576f984d.js";const a='@-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-tags{font-family:"Inter", "Barlow", sans-serif}verdocs-template-tags span{margin:0 4px;height:28px;font-size:12px;font-weight:600;padding:5px 12px 7px;border-radius:5px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:uppercase;color:#33364b;border:1px solid #707ae5;background-color:#f5f5fa}';const s=a;const t=class{constructor(o){r(this,o)}render(){var r;return o(e,{key:"b04e4243a94f65f70d8477c241370044ae4436b9"},(r=this.tags)===null||r===void 0?void 0:r.map((r=>o("span",null,r))))}};t.style=s;export{t as verdocs_template_tags};
2
- //# sourceMappingURL=p-7b7be644.entry.js.map
1
+ import{r,h as o,H as a}from"./p-576f984d.js";const e='@-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-tags{font-family:"Inter", "Barlow", sans-serif}verdocs-template-tags span{margin:0 4px;height:28px;font-size:12px;font-weight:600;padding:5px 12px 7px;border-radius:5px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:uppercase;color:#33364b;border:1px solid #707ae5;background-color:#f5f5fa}';const s=e;const c=class{constructor(o){r(this,o)}render(){var r;return o(a,{key:"e754a66c64713a7b01c072b1becd919d9768ac66"},(r=this.tags)===null||r===void 0?void 0:r.map((r=>o("span",null,r))))}};c.style=s;export{c as verdocs_template_tags};
2
+ //# sourceMappingURL=p-437ce063.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,n){function s(e){try{l(o.next(e))}catch(e){n(e)}}function a(e){try{l(o["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):r(e.value).then(s,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,r,n,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 l([e,t])}}function l(a){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(o=1,r&&(n=a[0]&2?r["return"]:a[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;if(r=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=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(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(a[0]===6&&i.label<n[1]){i.label=n[1];n=a;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(a);break}if(n[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{o=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-99ed75fb.system.js","@verdocs/js-sdk","./p-c8a15cb7.system.js","./p-ebd42be0.system.js"],(function(e){"use strict";var t,i,o,r,n,s,a,l,c,d,f;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H},function(e){n=e.VerdocsEndpoint;s=e.getTemplate;a=e.updateTemplateRole;l=e.deleteTemplateRole;c=e.isValidEmail},function(e){d=e.S},function(e){f=e.S}],execute:function(){var u='@-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 p=u;var h=e("verdocs_menu_panel",function(){function e(e){t(this,e);this.close=i(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 o(r,{key:"620b2d96ba41fcd87803da3c3d36436f17da02fd",ref:function(t){return e.element=t}},o("slot",{key:"85ac66ee22cf9a5717f4fe5de2644c96c14afd65"}))};return e}());h.style=p;var v='@-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 b=v;var m='<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 x=e("verdocs_template_role_properties",function(){function e(e){t(this,e);this.close=i(this,"close",7);this.delete=i(this,"delete",7);this.sdkError=i(this,"sdkError",7);this.templateListenerId=null;this.endpoint=n.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 d(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();f.subscribe("templates",this.templateId,(function(){return s(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){f.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;a(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(n){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}f.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.")){l(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}));f.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 n=!this.email&&!this.first_name&&!this.last_name||c(this.email)&&!!this.first_name&&!!this.last_name;return o(r,{key:"f010230841b98ad772ce5dfcb14d5a5107356a9b"},o("form",{key:"984327825568276e9ae7b3b5e8f27dba76e8d369",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("div",{key:"12a37971a1b78ce705eba57132d54d180f8ae959"},o("verdocs-text-input",{key:"e6fb3ee6a720e20e45f2d714f95b2dfc9c15b550",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&&o("div",{key:"1f2fbe28388ed74c073f7a9ad10561853b0ff073",class:"instructions"},"This role has fields assigned and can no longer be renamed.")),o("div",{key:"37398ce77a659d5f7bae58cf996168307ca379fd"},o("div",{key:"b2fec5550fc5846e4f9455489e6b39fc0965e990",class:"input-label"},"Type:"),o("verdocs-select-input",{key:"92814c2a302a7d13f1084ee5c1063662d8d6e103",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}})),o("div",{key:"01ecc8409b92938e1e287c32e852dbfc4dff8248"},o("div",{key:"c6cd73663d7306805502a8952b61103ee2af4da2",class:"input-label"},"Default Contact Info:"),o("div",{key:"8952e6cec3aaa9d71308f7080b0c5ba47b92a2e3",class:"first-last"},o("verdocs-text-input",{key:"e7bdf288d8fba7b030741d7ddf9b80ff0a019a1e",id:"verdocs-recipient-first",value:this.first_name,autocomplete:"off",placeholder:"First...",onInput:function(t){e.first_name=t.target.value;e.dirty=true}}),o("verdocs-text-input",{key:"1348b227a57fe128fd73f79492b5d6cf97bde11c",id:"verdocs-recipient-first",value:this.last_name,autocomplete:"off",placeholder:"Last...",onInput:function(t){e.last_name=t.target.value;e.dirty=true}}))),o("div",{key:"f25e5ce43788a9abdb9bb233fa6274e45aef1165"},o("verdocs-text-input",{key:"d907205e60ef2a697f6c58814098e6f988893fb9",id:"verdocs-recipient-email",value:this.email,autocomplete:"off",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),o("div",{key:"dceccf35b7196d886422d560cc8472aab33a2327",style:{height:"15px"}}),o("div",{key:"dba17dc4c9e08538507e886f22051cf121d8ae05"},o("verdocs-text-input",{key:"0c0350dcf40ada1c7d3dc0289da9357c3b8023eb",id:"verdocs-recipient-phone",value:this.phone,autocomplete:"off",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}))),o("div",{key:"32c5eee08b98afd34915bdba2584be167b97553a",class:"buttons"},o("button",{key:"760e8d2c27847118d56e7904ac48d895453cdce2",class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:m}),o("div",{key:"f7fe711384caf9b1f15ac939487d21b0dd9393b2",style:{flex:"1"}}),o("verdocs-button",{key:"d0f126d6d0e1ee9d6c8337bae310ddade0eba415",size:"small",label:"Save",disabled:!this.dirty||!n,onClick:function(t){return e.handleSave(t)}}))))};return e}());x.style=b}}}));
2
- //# sourceMappingURL=p-299bb90e.system.entry.js.map
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,n){function s(e){try{c(o.next(e))}catch(e){n(e)}}function a(e){try{c(o["throw"](e))}catch(e){n(e)}}function c(e){e.done?i(e.value):r(e.value).then(s,a)}c((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},o,r,n,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 c([e,t])}}function c(a){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(o=1,r&&(n=a[0]&2?r["return"]:a[0]?r["throw"]||((n=r["return"])&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;if(r=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=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(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(a[0]===6&&i.label<n[1]){i.label=n[1];n=a;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(a);break}if(n[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{o=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-99ed75fb.system.js","@verdocs/js-sdk","./p-c8a15cb7.system.js","./p-ebd42be0.system.js"],(function(e){"use strict";var t,i,o,r,n,s,a,c,l,d,f;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H},function(e){n=e.VerdocsEndpoint;s=e.getTemplate;a=e.updateTemplateRole;c=e.deleteTemplateRole;l=e.isValidEmail},function(e){d=e.S},function(e){f=e.S}],execute:function(){var u='@-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 p=u;var h=e("verdocs_menu_panel",function(){function e(e){t(this,e);this.close=i(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 o(r,{key:"620b2d96ba41fcd87803da3c3d36436f17da02fd",ref:function(t){return e.element=t}},o("slot",{key:"85ac66ee22cf9a5717f4fe5de2644c96c14afd65"}))};return e}());h.style=p;var v='@-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 b=v;var m='<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 x=e("verdocs_template_role_properties",function(){function e(e){t(this,e);this.close=i(this,"close",7);this.delete=i(this,"delete",7);this.sdkError=i(this,"sdkError",7);this.templateListenerId=null;this.endpoint=n.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 d(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();f.subscribe("templates",this.templateId,(function(){return s(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){f.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;a(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(n){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}f.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.")){c(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}));f.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 n=!this.email&&!this.first_name&&!this.last_name||l(this.email)&&!!this.first_name&&!!this.last_name;return o(r,{key:"0cb90773a405b842fd65dc842bd222393327bfda"},o("form",{key:"5a2f59d5e9453a8e0a28e281a5e8e00e4ff48734",onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("div",{key:"28e488540cbc43fd60f18d7afe22fdd83baa01d6"},o("verdocs-text-input",{key:"a81752032a51aafc103a3c81f359700279800fcc",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&&o("div",{key:"b45732e234d85c3f0f8237dc4935fc7dd3a1be8f",class:"instructions"},"This role has fields assigned and can no longer be renamed.")),o("div",{key:"0b35b31d334f8bec6e76159c34560e8c3655f449"},o("div",{key:"331e86e0dfe93b4ac521cce08e6201c824f58964",class:"input-label"},"Type:"),o("verdocs-select-input",{key:"745cd90f3a39ab8cd34bfd391fb534206e640944",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}})),o("div",{key:"d426d87dd0b1ad7f19e82022e3f8a240a3fc6b48"},o("div",{key:"139647d5ba8f447df5fe8cb727cea2f8c3c4a4ee",class:"input-label"},"Default Contact Info:"),o("div",{key:"58b6407105e6d41247f8efb7b539b3d6100f3ece",class:"first-last"},o("verdocs-text-input",{key:"6bd0d6052ded34db7584231cc6bc5c6bc21e75d4",id:"verdocs-recipient-first",value:this.first_name,autocomplete:"off",placeholder:"First...",onInput:function(t){e.first_name=t.target.value;e.dirty=true}}),o("verdocs-text-input",{key:"135f6024ea458d5b5161919584ebb8bf691c5fe8",id:"verdocs-recipient-first",value:this.last_name,autocomplete:"off",placeholder:"Last...",onInput:function(t){e.last_name=t.target.value;e.dirty=true}}))),o("div",{key:"137098702e8fefd55f80561bf3fa1366fe7a9306"},o("verdocs-text-input",{key:"b3288c2bdda90ec63948821f6e5d9bed0555aea6",id:"verdocs-recipient-email",value:this.email,autocomplete:"off",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),o("div",{key:"892f12c9429c2e2166493563054cd230a7b7f273",style:{height:"15px"}}),o("div",{key:"b26750310aa44563ecb53e585fbd02a3329476ff"},o("verdocs-text-input",{key:"c5ed1eb446c83b8a738f483da47ee405eb3c46d3",id:"verdocs-recipient-phone",value:this.phone,autocomplete:"off",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}))),o("div",{key:"2d588cd5467e22b2ca646d2db6ee1129d4425e36",class:"buttons"},o("button",{key:"d56630b85383cef24d346e126a72edf714b12e11",class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:m}),o("div",{key:"56af532ac7e3f216473ac76c94a8df9fed90ec0d",style:{flex:"1"}}),o("verdocs-button",{key:"21fae0b17777c6d51ffa671bb90a240ea4c38afd",size:"small",label:"Save",disabled:!this.dirty||!n,onClick:function(t){return e.handleSave(t)}}))))};return e}());x.style=b}}}));
2
+ //# sourceMappingURL=p-49c785c1.system.entry.js.map
@@ -1,2 +1,2 @@
1
- System.register(["./p-99ed75fb.system.js"],(function(r){"use strict";var o,e,a;return{setters:[function(r){o=r.r;e=r.h;a=r.H}],execute:function(){var n='@-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-tags{font-family:"Inter", "Barlow", sans-serif}verdocs-template-tags span{margin:0 4px;height:28px;font-size:12px;font-weight:600;padding:5px 12px 7px;border-radius:5px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:uppercase;color:#33364b;border:1px solid #707ae5;background-color:#f5f5fa}';var t=n;var s=r("verdocs_template_tags",function(){function r(r){o(this,r)}r.prototype.render=function(){var r;return e(a,{key:"b04e4243a94f65f70d8477c241370044ae4436b9"},(r=this.tags)===null||r===void 0?void 0:r.map((function(r){return e("span",null,r)})))};return r}());s.style=t}}}));
2
- //# sourceMappingURL=p-6fe49e4a.system.entry.js.map
1
+ System.register(["./p-99ed75fb.system.js"],(function(r){"use strict";var o,e,a;return{setters:[function(r){o=r.r;e=r.h;a=r.H}],execute:function(){var n='@-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-tags{font-family:"Inter", "Barlow", sans-serif}verdocs-template-tags span{margin:0 4px;height:28px;font-size:12px;font-weight:600;padding:5px 12px 7px;border-radius:5px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;text-transform:uppercase;color:#33364b;border:1px solid #707ae5;background-color:#f5f5fa}';var t=n;var c=r("verdocs_template_tags",function(){function r(r){o(this,r)}r.prototype.render=function(){var r;return e(a,{key:"e754a66c64713a7b01c072b1becd919d9768ac66"},(r=this.tags)===null||r===void 0?void 0:r.map((function(r){return e("span",null,r)})))};return r}());c.style=t}}}));
2
+ //# sourceMappingURL=p-4c8b181b.system.entry.js.map
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function o(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?r(t.value):i(t.value).then(o,s)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(n=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1];a=s;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(s);break}if(a[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];i=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-99ed75fb.system.js","@verdocs/js-sdk"],(function(t){"use strict";var e,r,n,i,a,o;return{setters:[function(t){e=t.r;r=t.c;n=t.h;i=t.H},function(t){a=t.VerdocsEndpoint;o=t.toggleStar}],execute:function(){var s='@-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-star{display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-template-star .star{line-height:10px}verdocs-template-star .star.updating{-webkit-animation:spinningStar 2s infinite linear;animation:spinningStar 2s infinite linear}verdocs-template-star .star svg{width:24px;height:24px}verdocs-template-star .count{color:#595c5d;font-size:14px;margin-left:10px}@-webkit-keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}';var c=s;var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /></svg>';var l='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z" clip-rule="evenodd" /></svg>';var u=t("verdocs_template_star",function(){function t(t){e(this,t);this.starChange=r(this,"starChange",7);this.sdkError=r(this,"sdkError",7);this.endpoint=a.getDefault();this.updating=false}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return[2]}return[2]}))}))};t.prototype.toggle=function(t){var e=this;t.stopPropagation();this.updating=true;o(a.getDefault(),this.template.id).then((function(t){e.updating=false;e.template.star_counter=t.star_counter;e.starChange.emit({templateId:e.template.id,starred:t.star_counter>0,count:t.star_counter})})).catch((function(t){e.updating=false;console.log("[STAR] Error toggling template star",t.message);e.sdkError.emit(t)}))};t.prototype.render=function(){var t=this;return n(i,{key:"47e2a56348d70a1f639e71e9e9fd44b7c89a7ee9"},n("div",{key:"239e05c7584572106e603657dcbab5225229caf4",class:"star ".concat(this.updating?"updating":""),innerHTML:this.template.star_counter?l:f,onClick:function(e){return t.toggle(e)}}),n("div",{key:"0ca19ca8c5258b939b8deab73565e335bea550dc",class:"count"},this.template.star_counter||"--"))};return t}());u.style=c}}}));
2
- //# sourceMappingURL=p-9b13c31e.system.entry.js.map
1
+ var __awaiter=this&&this.__awaiter||function(t,e,r,n){function a(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function o(t){try{c(n.next(t))}catch(t){i(t)}}function s(t){try{c(n["throw"](t))}catch(t){i(t)}}function c(t){t.done?r(t.value):a(t.value).then(o,s)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(n=1,a&&(i=s[0]&2?a["return"]:s[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;if(a=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;a=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];a=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-99ed75fb.system.js","@verdocs/js-sdk"],(function(t){"use strict";var e,r,n,a,i,o;return{setters:[function(t){e=t.r;r=t.c;n=t.h;a=t.H},function(t){i=t.VerdocsEndpoint;o=t.toggleStar}],execute:function(){var s='@-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-star{display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-template-star .star{line-height:10px}verdocs-template-star .star.updating{-webkit-animation:spinningStar 2s infinite linear;animation:spinningStar 2s infinite linear}verdocs-template-star .star svg{width:24px;height:24px}verdocs-template-star .count{color:#595c5d;font-size:14px;margin-left:10px}@-webkit-keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}';var c=s;var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /></svg>';var l='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z" clip-rule="evenodd" /></svg>';var u=t("verdocs_template_star",function(){function t(t){e(this,t);this.starChange=r(this,"starChange",7);this.sdkError=r(this,"sdkError",7);this.endpoint=i.getDefault();this.updating=false}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return[2]}return[2]}))}))};t.prototype.toggle=function(t){var e=this;t.stopPropagation();this.updating=true;o(i.getDefault(),this.template.id).then((function(t){e.updating=false;e.template.star_counter=t.star_counter;e.starChange.emit({templateId:e.template.id,starred:t.star_counter>0,count:t.star_counter})})).catch((function(t){e.updating=false;console.log("[STAR] Error toggling template star",t.message);e.sdkError.emit(t)}))};t.prototype.render=function(){var t=this;return n(a,{key:"96d245ead9fb7891ab0f497b37b306b379a20abc"},n("div",{key:"67ceace21c9957fbb27a05a527ef1b7847ac33a9",class:"star ".concat(this.updating?"updating":""),innerHTML:this.template.star_counter?l:f,onClick:function(e){return t.toggle(e)}}),n("div",{key:"3a76f28df10bb79ffb87ca8a046a6ec4e04dc49b",class:"count"},this.template.star_counter||"--"))};return t}());u.style=c}}}));
2
+ //# sourceMappingURL=p-5c1789d5.system.entry.js.map
@@ -1,2 +1,2 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))e[s]=n[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function s(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{l(t.next(e))}catch(e){a(e)}}function r(e){try{l(t["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,r)}l((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(n){return l([e,n])}}function l(r){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,r[0]&&(i=0)),i)try{if(t=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;s=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(r[0]===6&&i.label<a[1]){i.label=a[1];a=r;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(r);break}if(a[2])i.ops.pop();i.trys.pop();continue}r=n.call(e,i)}catch(e){r=[6,e];s=0}finally{t=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,i){if(i||arguments.length===2)for(var t=0,s=n.length,a;t<s;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};System.register(["./p-99ed75fb.system.js","@verdocs/js-sdk","./p-f29eb00a.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var n,i,t,s,a,o,r,l,c,d,p,u,f,v,h;return{setters:[function(e){n=e.r;i=e.c;t=e.h;s=e.H},function(e){a=e.VerdocsEndpoint;o=e.getEnvelopes;r=e.integerSequence;l=e.getRecipientsWithActions;c=e.userCanCancelEnvelope;d=e.userCanAct;p=e.formatFullName;u=e.cancelEnvelope},function(e){f=e.s},function(e){v=e.V},function(e){h=e.S},function(){},function(){},function(){}],execute:function(){var b='@-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-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}';var x=b;var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var m=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var w=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var y=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var _=e("verdocs_envelopes_list",function(){function e(e){n(this,e);this.changeView=i(this,"changeView",7);this.changeStatus=i(this,"changeStatus",7);this.changeSort=i(this,"changeSort",7);this.changeMatch=i(this,"changeMatch",7);this.sdkError=i(this,"sdkError",7);this.viewEnvelope=i(this,"viewEnvelope",7);this.finishEnvelope=i(this,"finishEnvelope",7);this.endpoint=a.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.onSessionChanged((function(e,n,i){console.log("[ENVELOPES_LIST] onSessionChanged",n,i)}));this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,s,a;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.loading=true;t={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":t=__assign({},t);break;case"sent":t=__assign({},t);break;case"action":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"waiting":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"completed":t=__assign(__assign({},t),{status:["complete"]});break;default:t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){t.status=[this.status]}}if(this.match.trim());return[4,o(this.endpoint,t)];case 1:s=r.sent();this.envelopes=s.envelopes;this.count=s.count;this.loading=false;return[3,3];case 2:a=r.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;f(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){f(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return t(s,{key:"65d29f9d52c1e4580e335015941be7f8f20197a9"},t("div",{key:"64a021af11c8a291981bb49f88cddedf5253593d",class:"header"},t("div",{key:"12ae24224cc5bae515cad1b6382b1fa64fce1223",class:"filter"},t("verdocs-text-input",{key:"b895bcdfa7829a5a78460759291890859d5cf6b5",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(n){var i;e.match=n.target.value.trim();(i=e.changeMatch)===null||i===void 0?void 0:i.emit(e.match)}})),t("verdocs-quick-filter",{key:"72e6e429edabd43c71a24d5d74e7be57b44073b8",label:"View",value:this.view,options:m,onOptionSelected:function(n){e.view=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"883d9ed133ad696a6fa1a572aa331aad753296ea",label:"Status",value:this.status,options:w,onOptionSelected:function(n){e.status=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"626d712a6760eb30c9d10a142358f0e9c3ad6548",label:"Sort By",value:this.sort,options:y,onOptionSelected:function(n){e.sort=n.detail.value}}),this.loading&&t("verdocs-spinner",{key:"391ee75435dfe6203eef29e29b14f74cda3a32ab",mode:"dark",size:24}),t("div",{key:"d12b2ce01d44e81728189968947c7b5e9e778293",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&t("verdocs-button",{key:"c2d20419257993759e8cd7c5ea5e58a20db5b15e",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(n){var i;var s=l(n);var a=c(e.endpoint.profile,n);var o=s.find((function(n){var i;return n.email===((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||""}));var r=o&&a&&d(((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||"",s);var f=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!r},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!a}];return t("div",{class:"envelope",key:n.id,onClick:function(){var i;return(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:n})}},t("div",{class:"inner"},t("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===n.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(i){if(i.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[n],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==n.id}))}}}),t("div",{class:"vert-spacer"}),t("span",{innerHTML:g,class:"envelope-icon"}),t("div",{class:"envelope-name"},n.name,":  ",t("div",{class:"envelope-recipients"},n.recipients.map((function(e){return p(e)})))),t("div",{class:"vert-spacer"}),t("verdocs-status-indicator",{envelope:n,style:{width:"125px"}}),t("div",{class:"vert-spacer"}),t("div",{class:"last-modified"},new Date(n.updated_at).toLocaleString()),t("div",{class:"vert-spacer"}),t("verdocs-dropdown",{options:f,onOptionSelected:function(i){var t,s;switch(i.detail.id){case"view":(t=e.viewEnvelope)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:n});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:n});break;case"download":e.downloadEnvelope(n);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){u(e.endpoint,n.id).then((function(){return v("Envelope canceled")})).catch((function(e){return v("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&t("div",{key:"3c1f1711abdeaaf92c12129e8f7e5ab13c06db1d",style:{width:"100%"}},r(0,this.rowsPerPage).map((function(){return t("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&t("div",{key:"1f14c23162b105b4947e3b574e0192fee0f164b5",class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?t("div",{style:{marginTop:"20px"}},t("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(n){e.selectedPage=n.detail.selectedPage}})):t("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:["handleViewUpdated"],status:["handleStatusUpdated"],sort:["handleSortUpdated"],match:["handleMatchUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());_.style=x}}}));
2
- //# sourceMappingURL=p-a058e16b.system.entry.js.map
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var n,i=1,t=arguments.length;i<t;i++){n=arguments[i];for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s))e[s]=n[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,n,i,t){function s(e){return e instanceof i?e:new i((function(n){n(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{l(t.next(e))}catch(e){a(e)}}function r(e){try{l(t["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,r)}l((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,s,a,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(e){return function(n){return l([e,n])}}function l(r){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,r[0]&&(i=0)),i)try{if(t=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;s=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(r[0]===6&&i.label<a[1]){i.label=a[1];a=r;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(r);break}if(a[2])i.ops.pop();i.trys.pop();continue}r=n.call(e,i)}catch(e){r=[6,e];s=0}finally{t=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,i){if(i||arguments.length===2)for(var t=0,s=n.length,a;t<s;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};System.register(["./p-99ed75fb.system.js","@verdocs/js-sdk","./p-f29eb00a.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var n,i,t,s,a,o,r,l,c,d,p,f,u,v,h;return{setters:[function(e){n=e.r;i=e.c;t=e.h;s=e.H},function(e){a=e.VerdocsEndpoint;o=e.getEnvelopes;r=e.integerSequence;l=e.getRecipientsWithActions;c=e.userCanCancelEnvelope;d=e.userCanAct;p=e.formatFullName;f=e.cancelEnvelope},function(e){u=e.s},function(e){v=e.V},function(e){h=e.S},function(){},function(){},function(){}],execute:function(){var b='@-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-envelopes-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", "Barlow", sans-serif}@media screen and (max-width: 800px){verdocs-envelopes-list{font-size:14px}}verdocs-envelopes-list .envelope-placeholder{height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin:5px 0;border-radius:5px;background:#f5f5fa}verdocs-envelopes-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-envelopes-list .header .filter{width:300px}verdocs-envelopes-list .header verdocs-text-input{margin:0}verdocs-envelopes-list .header verdocs-text-input input{height:32px}verdocs-envelopes-list .filter{-ms-flex-align:center;align-items:center}verdocs-envelopes-list .envelope{width:100%;margin:3px 0;background:#ffffff}verdocs-envelopes-list .envelope:hover{cursor:pointer;background:#f5f5fa}verdocs-envelopes-list .envelope .inner{gap:12px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;container-type:inline-size}verdocs-envelopes-list .envelope .inner svg{width:24px;height:24px}verdocs-envelopes-list .vert-spacer{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-envelopes-list .vert-spacer{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list .envelope-icon{display:none}}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-checkbox{display:none}}verdocs-envelopes-list .last-modified{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 180px;flex:0 0 180px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;white-space:nowrap}@media screen and (max-width: 800px){verdocs-envelopes-list .last-modified{display:none}}verdocs-envelopes-list .envelope-name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:#000000;line-height:28px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .envelope-recipients{color:#4b5563;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}verdocs-envelopes-list .empty-text{text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-envelopes-list .containing{gap:12px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media screen and (max-width: 800px){verdocs-envelopes-list verdocs-status-indicator{font-size:14px}}';var x=b;var g='<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var m=[{value:"all",label:"All"},{value:"inbox",label:"Inbox"},{value:"sent",label:"Sent"},{value:"completed",label:"Completed"},{value:"action",label:"Action Required"},{value:"waiting",label:"Waiting on Others"}];var w=[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"in progress",label:"In Progress"},{value:"complete",label:"Completed"},{value:"declined",label:"Declined"},{value:"canceled",label:"Canceled"}];var y=[{value:"created_at",label:"Created"},{value:"updated_at",label:"Updated"},{value:"canceled_at",label:"Canceled"},{value:"envelope_name",label:"Name"},{value:"envelope_status",label:"Status"}];var _=e("verdocs_envelopes_list",function(){function e(e){n(this,e);this.changeView=i(this,"changeView",7);this.changeStatus=i(this,"changeStatus",7);this.changeSort=i(this,"changeSort",7);this.changeMatch=i(this,"changeMatch",7);this.sdkError=i(this,"sdkError",7);this.viewEnvelope=i(this,"viewEnvelope",7);this.finishEnvelope=i(this,"finishEnvelope",7);this.endpoint=a.getDefault();this.view=undefined;this.status="all";this.sort="created_at";this.match="";this.showPagination=true;this.rowsPerPage=10;this.selectedPage=0;this.count=0;this.initiallyLoaded=false;this.loading=true;this.selectedEnvelopes=[];this.envelopes=[]}e.prototype.handleViewUpdated=function(){return this.queryEnvelopes()};e.prototype.handleStatusUpdated=function(){return this.queryEnvelopes()};e.prototype.handleSortUpdated=function(){return this.queryEnvelopes()};e.prototype.handleMatchUpdated=function(){return this.queryEnvelopes()};e.prototype.handlePageUpdated=function(){return this.queryEnvelopes()};e.prototype.componentWillLoad=function(){this.endpoint.onSessionChanged((function(e,n,i){console.log("[ENVELOPES_LIST] onSessionChanged",n,i)}));this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.queryEnvelopes()];case 1:e.sent();this.initiallyLoaded=true;return[2]}}))}))};e.prototype.queryEnvelopes=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,i,t,s,a;return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);this.loading=true;t={page:this.selectedPage,rows:this.rowsPerPage};switch(this.view){case"all":t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]});break;case"inbox":t=__assign({},t);break;case"sent":t=__assign({},t);break;case"action":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"waiting":t=__assign(__assign({},t),{status:["pending","in progress"]});break;case"completed":t=__assign(__assign({},t),{status:["complete"]});break;default:t=__assign(__assign({},t),{status:this.status==="all"?["pending","in progress","complete","declined","canceled"]:[this.status]})}if(this.view==="all"){if(this.status!=="all"){t.status=[this.status]}}if(this.match.trim());return[4,o(this.endpoint,t)];case 1:s=r.sent();this.envelopes=s.envelopes;this.count=s.count;this.loading=false;return[3,3];case 2:a=r.sent();this.loading=false;console.log("[ENVELOPES] Error listing envelopes",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(a.message,(n=a.response)===null||n===void 0?void 0:n.status,(i=a.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleDownload=function(){var e=this;u(this.endpoint,this.selectedEnvelopes).then((function(){e.selectedEnvelopes=[]})).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.downloadEnvelope=function(e){u(this.endpoint,[e]).catch((function(e){console.log("[ENVELOPES] Download error",e);v("Download error: "+e.message,{style:"error"})}))};e.prototype.render=function(){var e=this;return t(s,{key:"c164108740fe2979d49969cff9309faa8c76ab39"},t("div",{key:"89ea7a2cfba74a5efc723b11b85ce73c42785260",class:"header"},t("div",{key:"22d68c923c0904c6b5374fa4ddea39428de3cadc",class:"filter"},t("verdocs-text-input",{key:"82e396b43330b174d708732c22a384cdd5bf710a",id:"verdocs-filter-name",value:this.match,clearable:true,autocomplete:"off",placeholder:"Filter by Name, Recipient, or Field...",onFocusout:function(n){var i;e.match=n.target.value.trim();(i=e.changeMatch)===null||i===void 0?void 0:i.emit(e.match)}})),t("verdocs-quick-filter",{key:"721393026ba97346a14c0622dbc667ad20e612ba",label:"View",value:this.view,options:m,onOptionSelected:function(n){e.view=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"78c069f98e70644dcbd9a03b1dfe512774d424a2",label:"Status",value:this.status,options:w,onOptionSelected:function(n){e.status=n.detail.value}}),this.view==="all"&&t("verdocs-quick-filter",{key:"83df69798d32972d3d48951a283aa7893bde24d1",label:"Sort By",value:this.sort,options:y,onOptionSelected:function(n){e.sort=n.detail.value}}),this.loading&&t("verdocs-spinner",{key:"7a4613ec8b94abdd9679bec26ee131e33ce307b5",mode:"dark",size:24}),t("div",{key:"7438d9a6484afae3e64ff9f2b949e0b306a0311b",style:{display:"flex",flex:"1"}}),this.selectedEnvelopes.length>0&&t("verdocs-button",{key:"984dd9ff7e43b4d9c2f01c7a5effe096a47aa8e5",label:"Download (".concat(this.selectedEnvelopes.length,")"),onClick:function(){return e.handleDownload()}})),this.envelopes.map((function(n){var i;var s=l(n);var a=c(e.endpoint.profile,n);var o=s.find((function(n){var i;return n.email===((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||""}));var r=o&&a&&d(((i=e.endpoint.session)===null||i===void 0?void 0:i.email)||"",s);var u=[{label:"View Envelope",id:"view"},{label:"Finish Envelope",id:"finish",disabled:!r},{label:"Download",id:"download"},{label:"Cancel",id:"cancel",disabled:!a}];return t("div",{class:"envelope",key:n.id,onClick:function(){var i;return(i=e.viewEnvelope)===null||i===void 0?void 0:i.emit({endpoint:e.endpoint,envelope:n})}},t("div",{class:"inner"},t("verdocs-checkbox",{checked:e.selectedEnvelopes.findIndex((function(e){return e.id===n.id}))!==-1,onClick:function(e){return e.stopPropagation()},onInput:function(i){if(i.target.checked){e.selectedEnvelopes=__spreadArray(__spreadArray([],e.selectedEnvelopes,true),[n],false)}else{e.selectedEnvelopes=e.selectedEnvelopes.filter((function(e){return e.id!==n.id}))}}}),t("div",{class:"vert-spacer"}),t("span",{innerHTML:g,class:"envelope-icon"}),t("div",{class:"envelope-name"},n.name,":  ",t("div",{class:"envelope-recipients"},n.recipients.map((function(e){return p(e)})))),t("div",{class:"vert-spacer"}),t("verdocs-status-indicator",{envelope:n,style:{width:"125px"}}),t("div",{class:"vert-spacer"}),t("div",{class:"last-modified"},new Date(n.updated_at).toLocaleString()),t("div",{class:"vert-spacer"}),t("verdocs-dropdown",{options:u,onOptionSelected:function(i){var t,s;switch(i.detail.id){case"view":(t=e.viewEnvelope)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:n});break;case"finish":(s=e.finishEnvelope)===null||s===void 0?void 0:s.emit({endpoint:e.endpoint,envelope:n});break;case"download":e.downloadEnvelope(n);break;case"cancel":if(window.confirm("Are you sure you want to cancel this envelope?")){f(e.endpoint,n.id).then((function(){return v("Envelope canceled")})).catch((function(e){return v("Unable to cancel envelope: "+e.messabge,{style:"error"})}));e.queryEnvelopes().catch((function(){}))}break}}})))})),!this.initiallyLoaded&&t("div",{key:"6cf4b54bdbbfcf76849de4cd9a42eb05babcdfc8",style:{width:"100%"}},r(0,this.rowsPerPage).map((function(){return t("div",{class:"envelope-placeholder"})}))),this.initiallyLoaded&&!this.envelopes.length&&t("div",{key:"19f5866766130424f3eb6944cd61904f509d3f71",class:"empty-text"},"No matching envelopes found. Please adjust your filters and try again."),this.initiallyLoaded&&this.envelopes.length&&this.showPagination?t("div",{style:{marginTop:"20px"}},t("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:function(n){e.selectedPage=n.detail.selectedPage}})):t("div",null))};Object.defineProperty(e,"watchers",{get:function(){return{view:["handleViewUpdated"],status:["handleStatusUpdated"],sort:["handleSortUpdated"],match:["handleMatchUpdated"],selectedPage:["handlePageUpdated"]}},enumerable:false,configurable:true});return e}());_.style=x}}}));
2
+ //# sourceMappingURL=p-689c27e5.system.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as e,h as s,H as i,g as o}from"./p-576f984d.js";import{VerdocsEndpoint as h,getEnvelopeDocumentPageDisplayUri as a}from"@verdocs/js-sdk";import{t as r}from"./p-0c45b79c.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-12bab948.js";const d="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";const c=d;const n=class{constructor(s){t(this,s);this.pageRendered=e(this,"pageRendered",7);this.endpoint=h.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId=`verdocs-envelope-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}async componentWillLoad(){this.pageDisplayUri=await a(this.endpoint,this.documentId,this.pageNumber,this.type)}componentDidLoad(){this.resizeObserver=new ResizeObserver(r((t=>{for(const e of t){const t=e.contentRect.width;this.renderedWidth=t;this.renderedHeight=this.virtualHeight*(t/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}disconnectedCallback(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const t=`${this.renderedHeight}px`;return s(i,{key:"cca4f6b0c00556a1662ee175292d59b249b17604",id:`${this.containerId}`,style:{height:t,flex:`0 0 ${t}`}},this.layers.map((e=>e.type==="div"?s("div",{class:"verdocs-envelope-document-page-layer",id:`${this.containerId}-${e.name}`,style:{height:t}}):this.pageDisplayUri?s("img",{class:"verdocs-envelope-document-page-layer img",id:`${this.containerId}-${e.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:t=>{this.naturalWidth=t.target.naturalWidth;this.naturalHeight=t.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=t.target.offsetWidth/this.aspectRatio}}):s("div",null))))}get container(){return o(this)}};n.style=c;export{n as verdocs_envelope_document_page};
2
- //# sourceMappingURL=p-f4a233b8.entry.js.map
1
+ import{r as t,c as e,h as s,H as i,g as o}from"./p-576f984d.js";import{VerdocsEndpoint as a,getEnvelopeDocumentPageDisplayUri as h}from"@verdocs/js-sdk";import{t as r}from"./p-0c45b79c.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-12bab948.js";const d="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";const c=d;const n=class{constructor(s){t(this,s);this.pageRendered=e(this,"pageRendered",7);this.endpoint=a.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId=`verdocs-envelope-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}async componentWillLoad(){this.pageDisplayUri=await h(this.endpoint,this.documentId,this.pageNumber,this.type)}componentDidLoad(){this.resizeObserver=new ResizeObserver(r((t=>{for(const e of t){const t=e.contentRect.width;this.renderedWidth=t;this.renderedHeight=this.virtualHeight*(t/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}disconnectedCallback(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const t=`${this.renderedHeight}px`;return s(i,{key:"52fea0a651da570fe851a27db144ae889c4301ad",id:`${this.containerId}`,style:{height:t,flex:`0 0 ${t}`}},this.layers.map((e=>e.type==="div"?s("div",{class:"verdocs-envelope-document-page-layer",id:`${this.containerId}-${e.name}`,style:{height:t}}):this.pageDisplayUri?s("img",{class:"verdocs-envelope-document-page-layer img",id:`${this.containerId}-${e.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:t=>{this.naturalWidth=t.target.naturalWidth;this.naturalHeight=t.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=t.target.offsetWidth/this.aspectRatio}}):s("div",null))))}get container(){return o(this)}};n.style=c;export{n as verdocs_envelope_document_page};
2
+ //# sourceMappingURL=p-6bdbbe58.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as e,h as a,H as o}from"./p-576f984d.js";const c='@-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-card{font-family:"Inter", "Barlow", sans-serif;width:320px;height:320px;display:-ms-flexbox;display:flex;padding:25px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;-webkit-box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05);box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05)}verdocs-template-card .thumbnail{width:272px;height:158px;-o-object-fit:cover;object-fit:cover;margin-bottom:22px;-o-object-position:-20% 0;object-position:-20% 0}verdocs-template-card .name{font-size:18px;font-weight:700;margin-bottom:7px}verdocs-template-card .org-name{font-size:14px;font-weight:700;margin-bottom:6px}verdocs-template-card hr{width:100%;margin-bottom:17px;background-color:#aeb4bf}verdocs-template-card .controls{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between;text-align:center;font-size:16px}verdocs-template-card .controls .control{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;margin-right:8px;-ms-flex-align:start;align-items:flex-start;border-right:1px solid #aeb4bf}verdocs-template-card .controls .control.secondary{-ms-flex-pack:center;justify-content:center}verdocs-template-card .controls .control svg{fill:#aeb4bf;height:16px;max-width:16px;margin:0 8px -2px 0}verdocs-template-card .additional-controls svg{margin-right:0;fill:#654dcb}';const t=c;const s=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>`;const l=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"/></svg>`;const r=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"/></svg>`;const i=`<svg width="31" height="29" viewBox="0 0 31 29" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_31553_1553)"><path d="M30.886 11.4917C30.8916 11.0917 30.753 10.7034 30.4962 10.3993C30.2394 10.0953 29.882 9.8964 29.4908 9.83995L29.5182 9.65005L29.4908 9.83995L21.0938 8.60261L17.3412 0.912551C17.2067 0.638179 16.9992 0.407285 16.7421 0.245866C16.485 0.0844465 16.1885 -0.00111389 15.886 -0.00111389C15.5835 -0.00111389 15.287 0.0844465 15.0299 0.245866C14.7728 0.407285 14.5653 0.638179 14.4308 0.912551L10.6781 8.60261L2.28121 9.8392C1.89206 9.89475 1.53611 10.0916 1.2796 10.3931C1.02308 10.6945 0.88348 11.08 0.886776 11.4779C0.886447 11.6961 0.929977 11.912 1.01472 12.1125C1.09946 12.3131 1.22363 12.4941 1.37968 12.6445L7.45563 18.5744L6.01943 27.0241C6.00289 27.1258 5.99449 27.2287 5.99435 27.3317C5.99313 27.7717 6.16395 28.1943 6.4695 28.5071C6.77505 28.82 7.19045 28.9976 7.62496 29.0013C7.88846 29.0008 8.14779 28.9345 8.37992 28.8083L15.8883 24.8217L23.3967 28.8114C23.6287 28.9361 23.8873 29.0015 24.15 29.002C24.5752 28.9998 24.9832 28.8318 25.2893 28.5329C25.4452 28.3832 25.5695 28.2029 25.6544 28.003C25.7392 27.8031 25.783 27.5878 25.783 27.3702C25.7827 27.2731 25.7743 27.176 25.7579 27.0803L24.3209 18.6296L30.3931 12.7022C30.7094 12.3809 30.8867 11.9454 30.886 11.4917ZM22.0759 17.53L21.9437 17.3916L22.0759 17.53C22.0072 17.5977 21.9525 17.6787 21.9152 17.7681C21.8779 17.8575 21.8587 17.9536 21.8587 18.0506L21.8693 18.1737L23.2037 26.0237L16.2164 22.3148C16.1136 22.2602 15.9994 22.2317 15.8833 22.2317C15.7673 22.2317 15.653 22.2602 15.5503 22.3148L8.57132 26.0245L9.90651 18.1745L9.91712 18.0506C9.91696 17.9536 9.89768 17.8576 9.86038 17.7682C9.82308 17.6788 9.76851 17.5978 9.6999 17.53L4.05538 11.9724L11.8576 10.8258C11.9725 10.8088 12.0816 10.7638 12.1755 10.6947C12.2695 10.6256 12.3454 10.5344 12.3969 10.429L15.886 3.27721L19.3797 10.429C19.4313 10.5344 19.5074 10.6256 19.6014 10.6948C19.6955 10.7639 19.8047 10.8088 19.9197 10.8258L27.7197 11.9747L22.0759 17.53Z" fill="#ADB6BD"/></g><defs><clipPath id="clip0_31553_1553"><rect width="30" height="29" fill="white" transform="translate(0.886719)"/></clipPath></defs></svg>`;const d=class{constructor(a){e(this,a)}render(){var e,c,t,d;return a(o,{key:"34dbb55f6c6b8afe8e2a27142d1edd560aa8123e"},a("span",{key:"83a70355f7d740968113d4b7c70223b8b1728199",class:"name"},this.template.name),a("span",{key:"daba1bec48afa7914db6812c092ecc9006f0c0fa",class:"org-name"},((e=this.template.organization)===null||e===void 0?void 0:e.name)||"Public"),a("hr",{key:"f33a1caa30b0e73e490c353aeda95f03ccc8cdc9"}),a("div",{key:"132457e5862298418311e5630cf91ee4c388eb53",class:"controls"},a("div",{key:"4d6a907defae65e3e71468227ff01bf378349325",class:"control"},a("span",{key:"859bf9965d4d4d666b191410269c8e4733abdc3b",class:"icon",innerHTML:i}),a("span",{key:"bb2aa5c6f908aad15c3ffaec48786bf32e4afafe",class:"value"},this.template.star_counter)),a("div",{key:"f908946f9052972407ec26065774aeffe86fd370",class:"control secondary"},a("span",{key:"8703c428b3154521c3156b32a95267fcda3a73ab",class:"icon",innerHTML:r}),a("span",{key:"811320f402296ac578418a0ae4a6b0403455fadc",class:"value"},((d=(t=(c=this.template)===null||c===void 0?void 0:c.documents)===null||t===void 0?void 0:t[0])===null||d===void 0?void 0:d.pages)||1)),a("div",{key:"3fdbd916fd49d41b9c8254d78bce60eff644d008",class:"control secondary"},a("span",{key:"5ca32fdaa0f2fb7ea7a093169d2abc4a531462e3",class:"icon",innerHTML:l}),a("span",{key:"0e37528844b8097102ecd8c5a48fa59efe8a6705",class:"value"},this.template.counter)),a("span",{key:"8877d1faf766e75f1198a5842cf97ec6be28fb6b",class:"additional-controls",innerHTML:s})))}};d.style=t;export{d as verdocs_template_card};
2
- //# sourceMappingURL=p-538d5113.entry.js.map
1
+ import{r as e,h as a,H as o}from"./p-576f984d.js";const c='@-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-card{font-family:"Inter", "Barlow", sans-serif;width:320px;height:320px;display:-ms-flexbox;display:flex;padding:25px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;-webkit-box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05);box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05)}verdocs-template-card .thumbnail{width:272px;height:158px;-o-object-fit:cover;object-fit:cover;margin-bottom:22px;-o-object-position:-20% 0;object-position:-20% 0}verdocs-template-card .name{font-size:18px;font-weight:700;margin-bottom:7px}verdocs-template-card .org-name{font-size:14px;font-weight:700;margin-bottom:6px}verdocs-template-card hr{width:100%;margin-bottom:17px;background-color:#aeb4bf}verdocs-template-card .controls{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between;text-align:center;font-size:16px}verdocs-template-card .controls .control{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;margin-right:8px;-ms-flex-align:start;align-items:flex-start;border-right:1px solid #aeb4bf}verdocs-template-card .controls .control.secondary{-ms-flex-pack:center;justify-content:center}verdocs-template-card .controls .control svg{fill:#aeb4bf;height:16px;max-width:16px;margin:0 8px -2px 0}verdocs-template-card .additional-controls svg{margin-right:0;fill:#654dcb}';const t=c;const s=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>`;const l=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"/></svg>`;const r=`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"/></svg>`;const i=`<svg width="31" height="29" viewBox="0 0 31 29" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_31553_1553)"><path d="M30.886 11.4917C30.8916 11.0917 30.753 10.7034 30.4962 10.3993C30.2394 10.0953 29.882 9.8964 29.4908 9.83995L29.5182 9.65005L29.4908 9.83995L21.0938 8.60261L17.3412 0.912551C17.2067 0.638179 16.9992 0.407285 16.7421 0.245866C16.485 0.0844465 16.1885 -0.00111389 15.886 -0.00111389C15.5835 -0.00111389 15.287 0.0844465 15.0299 0.245866C14.7728 0.407285 14.5653 0.638179 14.4308 0.912551L10.6781 8.60261L2.28121 9.8392C1.89206 9.89475 1.53611 10.0916 1.2796 10.3931C1.02308 10.6945 0.88348 11.08 0.886776 11.4779C0.886447 11.6961 0.929977 11.912 1.01472 12.1125C1.09946 12.3131 1.22363 12.4941 1.37968 12.6445L7.45563 18.5744L6.01943 27.0241C6.00289 27.1258 5.99449 27.2287 5.99435 27.3317C5.99313 27.7717 6.16395 28.1943 6.4695 28.5071C6.77505 28.82 7.19045 28.9976 7.62496 29.0013C7.88846 29.0008 8.14779 28.9345 8.37992 28.8083L15.8883 24.8217L23.3967 28.8114C23.6287 28.9361 23.8873 29.0015 24.15 29.002C24.5752 28.9998 24.9832 28.8318 25.2893 28.5329C25.4452 28.3832 25.5695 28.2029 25.6544 28.003C25.7392 27.8031 25.783 27.5878 25.783 27.3702C25.7827 27.2731 25.7743 27.176 25.7579 27.0803L24.3209 18.6296L30.3931 12.7022C30.7094 12.3809 30.8867 11.9454 30.886 11.4917ZM22.0759 17.53L21.9437 17.3916L22.0759 17.53C22.0072 17.5977 21.9525 17.6787 21.9152 17.7681C21.8779 17.8575 21.8587 17.9536 21.8587 18.0506L21.8693 18.1737L23.2037 26.0237L16.2164 22.3148C16.1136 22.2602 15.9994 22.2317 15.8833 22.2317C15.7673 22.2317 15.653 22.2602 15.5503 22.3148L8.57132 26.0245L9.90651 18.1745L9.91712 18.0506C9.91696 17.9536 9.89768 17.8576 9.86038 17.7682C9.82308 17.6788 9.76851 17.5978 9.6999 17.53L4.05538 11.9724L11.8576 10.8258C11.9725 10.8088 12.0816 10.7638 12.1755 10.6947C12.2695 10.6256 12.3454 10.5344 12.3969 10.429L15.886 3.27721L19.3797 10.429C19.4313 10.5344 19.5074 10.6256 19.6014 10.6948C19.6955 10.7639 19.8047 10.8088 19.9197 10.8258L27.7197 11.9747L22.0759 17.53Z" fill="#ADB6BD"/></g><defs><clipPath id="clip0_31553_1553"><rect width="30" height="29" fill="white" transform="translate(0.886719)"/></clipPath></defs></svg>`;const d=class{constructor(a){e(this,a)}render(){var e,c,t,d;return a(o,{key:"13693fcbf518d8fe03ac7c5f50ad8debd6f962c2"},a("span",{key:"5d923ea6c0483d1a20de46d27a63413b540e1b43",class:"name"},this.template.name),a("span",{key:"44a42e31de8fe839655f7c8582c3efc309e3abea",class:"org-name"},((e=this.template.organization)===null||e===void 0?void 0:e.name)||"Public"),a("hr",{key:"f2939250c0487e1e9c64b2bfbcfe7efef917e85a"}),a("div",{key:"64210513a1c5cd70691909e03b3476716e590117",class:"controls"},a("div",{key:"85206f2d76ba75d1b1c9eb8d1605748f7c8798c5",class:"control"},a("span",{key:"1241834c925c15c6a212248a5e6012d40437c9d7",class:"icon",innerHTML:i}),a("span",{key:"4eeece549be481cd9074bc8818a4c39476a7fdf2",class:"value"},this.template.star_counter)),a("div",{key:"706c7318cff914b1d23f9bdbfa2f33d6ba5ca409",class:"control secondary"},a("span",{key:"f47f963d35854b1a4bd3d4817350224bce558893",class:"icon",innerHTML:r}),a("span",{key:"26ef5faaeea085bdff20e3ebfab7e5a3fb9666e4",class:"value"},((d=(t=(c=this.template)===null||c===void 0?void 0:c.documents)===null||t===void 0?void 0:t[0])===null||d===void 0?void 0:d.pages)||1)),a("div",{key:"e1a479f4e5d64d85e7f0f0902a3f51356f246f9b",class:"control secondary"},a("span",{key:"5ba32c11c733a179f29a3f7a8c0ca322ca7c2132",class:"icon",innerHTML:l}),a("span",{key:"98be53e5b3db4632caf8088520be805e95ec82a6",class:"value"},this.template.counter)),a("span",{key:"49dede0e65c529b094711470317c959d0c512ea1",class:"additional-controls",innerHTML:s})))}};d.style=t;export{d as verdocs_template_card};
2
+ //# sourceMappingURL=p-73fe8630.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,a){function s(e){try{c(o.next(e))}catch(e){a(e)}}function n(e){try{c(o["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):r(e.value).then(s,n)}c((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,r,a,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return c([e,t])}}function c(n){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(i=0)),i)try{if(o=1,r&&(a=n[0]&2?r["return"]:n[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,n[1])).done)return a;if(r=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:i.label++;return{value:n[1],done:false};case 5:i.label++;r=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){i.label=n[1];break}if(n[0]===6&&i.label<a[1]){i.label=a[1];a=n;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(n);break}if(a[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];r=0}finally{o=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-99ed75fb.system.js","@verdocs/js-sdk","./p-f29eb00a.system.js","./p-ebd42be0.system.js","./p-e0ac9edf.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var t,i,o,r,a,s,n,c,d,l,u,h,p,f;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H;a=e.F;s=e.g},function(e){n=e.VerdocsEndpoint;c=e.getTemplateDocumentPageDisplayUri;d=e.getTemplate},function(e){l=e.t;u=e.j;h=e.g},function(e){p=e.S},function(e){f=e.c},function(){},function(){},function(){}],execute:function(){var b="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}";var v=b;var m=e("verdocs_template_document_page",function(){function e(e){t(this,e);this.pageRendered=i(this,"pageRendered",7);this.templateListenerId=null;this.endpoint=n.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,c(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.listenToTemplate();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(l((function(t){for(var i=0,o=t;i<o.length;i++){var r=o[i];var a=r.contentRect.width;e.renderedWidth=a;e.renderedHeight=e.virtualHeight*(a/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();p.subscribe("templates",this.templateId,(function(){return d(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){p.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})};e.prototype.render=function(){var e=this;if(this.loading){return o(r,null,o("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}var t="".concat(this.renderedHeight,"px");return o(r,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){var r;return i.type==="div"?o("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}},i.name==="controls"&&(((r=e.template)===null||r===void 0?void 0:r.fields)||[]).filter((function(t){return t&&t.page===e.pageNumber})).map((function(t){var i,r;var s=h(t);var n=t.name,c=t.type,d=t.multiline;var l=e,p=l.xScale,f=l.yScale,b=l.templateId,v=l.editable,m=l.disabled,g=l.done,y=l.pageNumber;if(((i=t["setting"])===null||i===void 0?void 0:i.leading)>0||((r=t["settings"])===null||r===void 0?void 0:r.leading)>0){c="textarea";d=true}switch(c){case"textbox":return o("verdocs-field-textbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,multiline:d,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"textarea":return o("verdocs-field-textarea",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"date":return o("verdocs-field-date",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"attachment":return o("verdocs-field-attachment",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"dropdown":return o("verdocs-field-dropdown",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"initial":return o("verdocs-field-initial",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"signature":return o("verdocs-field-signature",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,e.xScale,e.yScale)});case"timestamp":return o("verdocs-field-timestamp",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"checkbox":return o("verdocs-field-checkbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});case"radio":return o("verdocs-field-radio",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:f,pagenumber:y,style:u(t,p,f)});default:return o(a,null,n)}}))):e.pageDisplayUri?o("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):o("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());m.style=v;var g='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var y=g;var x=e("verdocs_toolbar_icon",function(){function e(e){t(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=f(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return o(r,{key:"8163f7ebe7d2f3a13db305b411b454287a4b3729",class:{}},o("div",{key:"1782db14268643ad1620ebcd5efc6a27ff9fcc04","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),o("div",{key:"54c1bb4abc22a943051ba2df8b557e6c02fdabef",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,o("div",{key:"4d2c884923f2e79b375ffcfa2592cd914bead68c","data-popper-arrow":"true",class:"arrow"})))};return e}());x.style=y}}}));
2
- //# sourceMappingURL=p-227fdd3a.system.entry.js.map
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,a){function s(e){try{c(o.next(e))}catch(e){a(e)}}function n(e){try{c(o["throw"](e))}catch(e){a(e)}}function c(e){e.done?i(e.value):r(e.value).then(s,n)}c((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,r,a,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(e){return function(t){return c([e,t])}}function c(n){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(i=0)),i)try{if(o=1,r&&(a=n[0]&2?r["return"]:n[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,n[1])).done)return a;if(r=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:i.label++;return{value:n[1],done:false};case 5:i.label++;r=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){i.label=n[1];break}if(n[0]===6&&i.label<a[1]){i.label=a[1];a=n;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(n);break}if(a[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];r=0}finally{o=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-99ed75fb.system.js","@verdocs/js-sdk","./p-f29eb00a.system.js","./p-ebd42be0.system.js","./p-e0ac9edf.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var t,i,o,r,a,s,n,c,l,d,u,f,p,h;return{setters:[function(e){t=e.r;i=e.c;o=e.h;r=e.H;a=e.F;s=e.g},function(e){n=e.VerdocsEndpoint;c=e.getTemplateDocumentPageDisplayUri;l=e.getTemplate},function(e){d=e.t;u=e.j;f=e.g},function(e){p=e.S},function(e){h=e.c},function(){},function(){},function(){}],execute:function(){var b="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}";var v=b;var m=e("verdocs_template_document_page",function(){function e(e){t(this,e);this.pageRendered=i(this,"pageRendered",7);this.templateListenerId=null;this.endpoint=n.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,c(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.listenToTemplate();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(d((function(t){for(var i=0,o=t;i<o.length;i++){var r=o[i];var a=r.contentRect.width;e.renderedWidth=a;e.renderedHeight=e.virtualHeight*(a/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();p.subscribe("templates",this.templateId,(function(){return l(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){p.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})};e.prototype.render=function(){var e=this;if(this.loading){return o(r,null,o("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}var t="".concat(this.renderedHeight,"px");return o(r,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){var r;return i.type==="div"?o("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}},i.name==="controls"&&(((r=e.template)===null||r===void 0?void 0:r.fields)||[]).filter((function(t){return t&&t.page===e.pageNumber})).map((function(t){var i,r;var s=f(t);var n=t.name,c=t.type,l=t.multiline;var d=e,p=d.xScale,h=d.yScale,b=d.templateId,v=d.editable,m=d.disabled,g=d.done,x=d.pageNumber;if(((i=t["setting"])===null||i===void 0?void 0:i.leading)>0||((r=t["settings"])===null||r===void 0?void 0:r.leading)>0){c="textarea";l=true}switch(c){case"textbox":return o("verdocs-field-textbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,multiline:l,disabled:m,done:g,xscale:p,yscale:h,pagenumber:x,style:u(t,p,h)});case"textarea":return o("verdocs-field-textarea",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:h,pagenumber:x,style:u(t,p,h)});case"date":return o("verdocs-field-date",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:h,pagenumber:x,style:u(t,p,h)});case"attachment":return o("verdocs-field-attachment",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:h,pagenumber:x,style:u(t,p,h)});case"dropdown":return o("verdocs-field-dropdown",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:h,pagenumber:x,style:u(t,p,h)});case"initial":return o("verdocs-field-initial",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:h,pagenumber:x,style:u(t,p,h)});case"signature":return o("verdocs-field-signature",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:h,pagenumber:x,style:u(t,e.xScale,e.yScale)});case"timestamp":return o("verdocs-field-timestamp",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:h,pagenumber:x,style:u(t,p,h)});case"checkbox":return o("verdocs-field-checkbox",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:h,pagenumber:x,style:u(t,p,h)});case"radio":return o("verdocs-field-radio",{id:s,fieldname:n,source:"template",sourceid:b,editable:v,disabled:m,done:g,xscale:p,yscale:h,pagenumber:x,style:u(t,p,h)});default:return o(a,null,n)}}))):e.pageDisplayUri?o("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):o("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());m.style=v;var g='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var x=g;var y=e("verdocs_toolbar_icon",function(){function e(e){t(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=h(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return o(r,{key:"8163f7ebe7d2f3a13db305b411b454287a4b3729",class:{}},o("div",{key:"1782db14268643ad1620ebcd5efc6a27ff9fcc04","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),o("div",{key:"54c1bb4abc22a943051ba2df8b557e6c02fdabef",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,o("div",{key:"4d2c884923f2e79b375ffcfa2592cd914bead68c","data-popper-arrow":"true",class:"arrow"})))};return e}());y.style=x}}}));
2
+ //# sourceMappingURL=p-7a4d7c71.system.entry.js.map