@verdocs/web-sdk 1.9.10 → 1.9.14

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 (398) hide show
  1. package/dist/cjs/{Envelopes-22a0c02f.js → Envelopes-aec4ee3d.js} +4 -15
  2. package/dist/cjs/Envelopes-aec4ee3d.js.map +1 -0
  3. package/dist/cjs/{Templates-399073ea.js → Templates-0051d647.js} +2 -2
  4. package/dist/cjs/{Templates-399073ea.js.map → Templates-0051d647.js.map} +1 -1
  5. package/dist/cjs/VerdocsEndpoint-8c408e5b.js +3569 -0
  6. package/dist/cjs/VerdocsEndpoint-8c408e5b.js.map +1 -0
  7. package/dist/cjs/{templateStore-92828c3c.js → index-eb130f52.js} +2 -41
  8. package/dist/cjs/index-eb130f52.js.map +1 -0
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/templateStore-974781a8.js +46 -0
  11. package/dist/cjs/templateStore-974781a8.js.map +1 -0
  12. package/dist/cjs/{utils-84236321.js → utils-e0f38696.js} +23 -3
  13. package/dist/cjs/utils-e0f38696.js.map +1 -0
  14. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-build.cjs.entry.js +5 -4
  16. package/dist/cjs/verdocs-build.cjs.entry.js.map +1 -1
  17. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-document-page_2.cjs.entry.js +94 -0
  19. package/dist/cjs/verdocs-document-page_2.cjs.entry.js.map +1 -0
  20. package/dist/cjs/verdocs-dropdown_3.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-field-date.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +1 -1
  23. package/dist/cjs/verdocs-field-initial.cjs.entry.js +1 -1
  24. package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
  25. package/dist/cjs/verdocs-field-signature_3.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
  27. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -2
  28. package/dist/cjs/verdocs-field-textbox.cjs.entry.js.map +1 -1
  29. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +1 -1
  30. package/dist/cjs/verdocs-preview.cjs.entry.js +17 -11
  31. package/dist/cjs/verdocs-preview.cjs.entry.js.map +1 -1
  32. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  33. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  34. package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
  35. package/dist/cjs/verdocs-sign.cjs.entry.js +91 -22
  36. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  37. package/dist/cjs/verdocs-template-create_4.cjs.entry.js +52 -36
  38. package/dist/cjs/verdocs-template-create_4.cjs.entry.js.map +1 -1
  39. package/dist/cjs/verdocs-view.cjs.entry.js +331 -0
  40. package/dist/cjs/verdocs-view.cjs.entry.js.map +1 -0
  41. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  42. package/dist/collection/collection-manifest.json +1 -3
  43. package/dist/collection/components/elements/verdocs-document-page/verdocs-document-page.js +1 -4
  44. package/dist/collection/components/elements/verdocs-document-page/verdocs-document-page.js.map +1 -1
  45. package/dist/collection/components/elements/verdocs-template-fields/verdocs-template-fields.css +14 -1
  46. package/dist/collection/components/elements/verdocs-template-fields/verdocs-template-fields.js +17 -30
  47. package/dist/collection/components/elements/verdocs-template-fields/verdocs-template-fields.js.map +1 -1
  48. package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.css +15 -0
  49. package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +14 -7
  50. package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js.map +1 -1
  51. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +124 -47
  52. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  53. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +122 -175
  54. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js.map +1 -1
  55. package/dist/collection/components/embeds/verdocs-view/verdocs-view.stories.js +2 -3
  56. package/dist/collection/components/embeds/verdocs-view/verdocs-view.stories.js.map +1 -1
  57. package/dist/collection/utils/Envelopes.js +31 -0
  58. package/dist/collection/utils/Envelopes.js.map +1 -0
  59. package/dist/collection/utils/envelopeStore.js +28 -0
  60. package/dist/collection/utils/envelopeStore.js.map +1 -0
  61. package/dist/collection/utils/utils.js +21 -2
  62. package/dist/collection/utils/utils.js.map +1 -1
  63. package/dist/{esm/Envelopes-df05b3c7.js → components/Envelopes.js} +5 -15
  64. package/dist/components/Envelopes.js.map +1 -0
  65. package/dist/components/VerdocsEndpoint.js +2185 -1051
  66. package/dist/components/VerdocsEndpoint.js.map +1 -1
  67. package/dist/components/index.d.ts +0 -2
  68. package/dist/components/index.js +0 -2
  69. package/dist/components/index.js.map +1 -1
  70. package/dist/components/index2.js +196 -0
  71. package/dist/components/index2.js.map +1 -0
  72. package/dist/components/templateStore.js +1 -192
  73. package/dist/components/templateStore.js.map +1 -1
  74. package/dist/components/utils.js +22 -3
  75. package/dist/components/utils.js.map +1 -1
  76. package/dist/components/verdocs-build.js +34 -52
  77. package/dist/components/verdocs-build.js.map +1 -1
  78. package/dist/components/verdocs-document-page2.js +1 -4
  79. package/dist/components/verdocs-document-page2.js.map +1 -1
  80. package/dist/components/verdocs-preview.js +16 -29
  81. package/dist/components/verdocs-preview.js.map +1 -1
  82. package/dist/components/verdocs-sign.js +100 -57
  83. package/dist/components/verdocs-sign.js.map +1 -1
  84. package/dist/components/verdocs-template-create2.js +29 -1
  85. package/dist/components/verdocs-template-create2.js.map +1 -1
  86. package/dist/components/verdocs-template-fields2.js +36 -67
  87. package/dist/components/verdocs-template-fields2.js.map +1 -1
  88. package/dist/components/verdocs-view.js +353 -1
  89. package/dist/components/verdocs-view.js.map +1 -1
  90. package/dist/docs.json +38 -568
  91. package/dist/esm/Envelopes-b031f847.js +93 -0
  92. package/dist/esm/Envelopes-b031f847.js.map +1 -0
  93. package/dist/esm/{Templates-91922342.js → Templates-1034fade.js} +2 -2
  94. package/dist/esm/{Templates-91922342.js.map → Templates-1034fade.js.map} +1 -1
  95. package/dist/esm/VerdocsEndpoint-dac04424.js +3566 -0
  96. package/dist/esm/VerdocsEndpoint-dac04424.js.map +1 -0
  97. package/dist/esm/{templateStore-3b26e38d.js → index-fd7b8a34.js} +2 -41
  98. package/dist/esm/index-fd7b8a34.js.map +1 -0
  99. package/dist/esm/loader.js +1 -1
  100. package/dist/esm/templateStore-96a39844.js +44 -0
  101. package/dist/esm/templateStore-96a39844.js.map +1 -0
  102. package/dist/esm/{utils-3f23facc.js → utils-99a3c1f0.js} +23 -4
  103. package/dist/esm/utils-99a3c1f0.js.map +1 -0
  104. package/dist/esm/verdocs-auth.entry.js +1 -1
  105. package/dist/esm/verdocs-build.entry.js +5 -4
  106. package/dist/esm/verdocs-build.entry.js.map +1 -1
  107. package/dist/esm/verdocs-contact-picker.entry.js +1 -1
  108. package/dist/esm/verdocs-document-page_2.entry.js +89 -0
  109. package/dist/esm/verdocs-document-page_2.entry.js.map +1 -0
  110. package/dist/esm/verdocs-dropdown_3.entry.js +1 -1
  111. package/dist/esm/verdocs-field-date.entry.js +1 -1
  112. package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
  113. package/dist/esm/verdocs-field-initial.entry.js +1 -1
  114. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  115. package/dist/esm/verdocs-field-signature_3.entry.js +1 -1
  116. package/dist/esm/verdocs-field-textarea.entry.js +1 -1
  117. package/dist/esm/verdocs-field-textbox.entry.js +3 -2
  118. package/dist/esm/verdocs-field-textbox.entry.js.map +1 -1
  119. package/dist/esm/verdocs-field-timestamp.entry.js +1 -1
  120. package/dist/esm/verdocs-preview.entry.js +17 -11
  121. package/dist/esm/verdocs-preview.entry.js.map +1 -1
  122. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  123. package/dist/esm/verdocs-search.entry.js +1 -1
  124. package/dist/esm/verdocs-send.entry.js +2 -2
  125. package/dist/esm/verdocs-sign.entry.js +92 -23
  126. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  127. package/dist/esm/verdocs-template-create_4.entry.js +50 -34
  128. package/dist/esm/verdocs-template-create_4.entry.js.map +1 -1
  129. package/dist/esm/verdocs-view.entry.js +327 -0
  130. package/dist/esm/verdocs-view.entry.js.map +1 -0
  131. package/dist/esm/verdocs-web-sdk.js +1 -1
  132. package/dist/esm-es5/Envelopes-b031f847.js +2 -0
  133. package/dist/esm-es5/Envelopes-b031f847.js.map +1 -0
  134. package/dist/esm-es5/{Templates-91922342.js → Templates-1034fade.js} +2 -2
  135. package/dist/esm-es5/{Templates-91922342.js.map → Templates-1034fade.js.map} +0 -0
  136. package/dist/esm-es5/VerdocsEndpoint-dac04424.js +2 -0
  137. package/dist/esm-es5/VerdocsEndpoint-dac04424.js.map +1 -0
  138. package/dist/esm-es5/index-fd7b8a34.js +2 -0
  139. package/dist/esm-es5/index-fd7b8a34.js.map +1 -0
  140. package/dist/esm-es5/loader.js +1 -1
  141. package/dist/esm-es5/loader.js.map +1 -1
  142. package/dist/esm-es5/templateStore-96a39844.js +2 -0
  143. package/dist/esm-es5/templateStore-96a39844.js.map +1 -0
  144. package/dist/esm-es5/utils-99a3c1f0.js +2 -0
  145. package/dist/esm-es5/utils-99a3c1f0.js.map +1 -0
  146. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  147. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  148. package/dist/esm-es5/verdocs-build.entry.js.map +1 -1
  149. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  150. package/dist/esm-es5/verdocs-document-page_2.entry.js +2 -0
  151. package/dist/esm-es5/verdocs-document-page_2.entry.js.map +1 -0
  152. package/dist/esm-es5/verdocs-dropdown_3.entry.js +1 -1
  153. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  154. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  155. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  156. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  157. package/dist/esm-es5/verdocs-field-signature_3.entry.js +1 -1
  158. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  159. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  160. package/dist/esm-es5/verdocs-field-textbox.entry.js.map +1 -1
  161. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  162. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  163. package/dist/esm-es5/verdocs-preview.entry.js.map +1 -1
  164. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  165. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  166. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  167. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  168. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  169. package/dist/esm-es5/verdocs-template-create_4.entry.js +1 -1
  170. package/dist/esm-es5/verdocs-template-create_4.entry.js.map +1 -1
  171. package/dist/esm-es5/verdocs-view.entry.js +2 -0
  172. package/dist/esm-es5/verdocs-view.entry.js.map +1 -0
  173. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  174. package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
  175. package/dist/types/components/embeds/verdocs-preview/verdocs-preview.d.ts +3 -1
  176. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +23 -8
  177. package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +5 -40
  178. package/dist/types/components/embeds/verdocs-view/verdocs-view.stories.d.ts +1 -2
  179. package/dist/types/components.d.ts +6 -219
  180. package/dist/types/utils/Envelopes.d.ts +2 -0
  181. package/dist/types/utils/envelopeStore.d.ts +10 -0
  182. package/dist/types/utils/utils.d.ts +10 -2
  183. package/dist/verdocs-web-sdk/{p-ff4840d2.system.entry.js → p-0a2efec0.system.entry.js} +2 -2
  184. package/dist/verdocs-web-sdk/{p-ff4840d2.system.entry.js.map → p-0a2efec0.system.entry.js.map} +0 -0
  185. package/dist/verdocs-web-sdk/p-0a3d0ca9.js +2 -0
  186. package/dist/verdocs-web-sdk/{p-36700fe4.js.map → p-0a3d0ca9.js.map} +0 -0
  187. package/dist/verdocs-web-sdk/p-0f6da8c7.system.js +2 -0
  188. package/dist/verdocs-web-sdk/p-0f6da8c7.system.js.map +1 -0
  189. package/dist/verdocs-web-sdk/{p-d2d3b56d.system.entry.js → p-112c8e05.system.entry.js} +2 -2
  190. package/dist/verdocs-web-sdk/{p-d2d3b56d.system.entry.js.map → p-112c8e05.system.entry.js.map} +0 -0
  191. package/dist/verdocs-web-sdk/p-1cd2f7dc.system.js +2 -0
  192. package/dist/verdocs-web-sdk/p-1cd2f7dc.system.js.map +1 -0
  193. package/dist/verdocs-web-sdk/p-21ec6ff0.system.js +2 -0
  194. package/dist/verdocs-web-sdk/p-21ec6ff0.system.js.map +1 -0
  195. package/dist/verdocs-web-sdk/p-2cf3843a.entry.js +2 -0
  196. package/dist/verdocs-web-sdk/{p-e47e3154.entry.js.map → p-2cf3843a.entry.js.map} +1 -1
  197. package/dist/verdocs-web-sdk/{p-f11b14a1.entry.js → p-2fe5b678.entry.js} +2 -2
  198. package/dist/verdocs-web-sdk/{p-f11b14a1.entry.js.map → p-2fe5b678.entry.js.map} +0 -0
  199. package/dist/verdocs-web-sdk/p-30424967.entry.js +2 -0
  200. package/dist/verdocs-web-sdk/p-30424967.entry.js.map +1 -0
  201. package/dist/verdocs-web-sdk/p-32c7bce8.system.entry.js +2 -0
  202. package/dist/verdocs-web-sdk/p-32c7bce8.system.entry.js.map +1 -0
  203. package/dist/verdocs-web-sdk/{p-63d01d16.system.js → p-32da34af.system.js} +2 -2
  204. package/dist/verdocs-web-sdk/{p-63d01d16.system.js.map → p-32da34af.system.js.map} +0 -0
  205. package/dist/verdocs-web-sdk/{p-2510c268.entry.js → p-32e3a428.entry.js} +2 -2
  206. package/dist/verdocs-web-sdk/{p-2510c268.entry.js.map → p-32e3a428.entry.js.map} +0 -0
  207. package/dist/verdocs-web-sdk/{p-f5eb353f.system.entry.js → p-3585534a.system.entry.js} +2 -2
  208. package/dist/verdocs-web-sdk/{p-f5eb353f.system.entry.js.map → p-3585534a.system.entry.js.map} +0 -0
  209. package/dist/verdocs-web-sdk/{p-c37ea778.system.entry.js → p-35fec075.system.entry.js} +2 -2
  210. package/dist/verdocs-web-sdk/{p-c37ea778.system.entry.js.map → p-35fec075.system.entry.js.map} +0 -0
  211. package/dist/verdocs-web-sdk/{p-ab23a9d1.entry.js → p-4b4c610f.entry.js} +2 -2
  212. package/dist/verdocs-web-sdk/{p-ab23a9d1.entry.js.map → p-4b4c610f.entry.js.map} +0 -0
  213. package/dist/verdocs-web-sdk/{p-8c549b7f.entry.js → p-5b636344.entry.js} +2 -2
  214. package/dist/verdocs-web-sdk/{p-8c549b7f.entry.js.map → p-5b636344.entry.js.map} +0 -0
  215. package/dist/verdocs-web-sdk/p-5bb42252.system.entry.js +2 -0
  216. package/dist/verdocs-web-sdk/{p-508192bb.system.entry.js.map → p-5bb42252.system.entry.js.map} +1 -1
  217. package/dist/verdocs-web-sdk/p-5d341c89.system.entry.js +2 -0
  218. package/dist/verdocs-web-sdk/p-5d341c89.system.entry.js.map +1 -0
  219. package/dist/verdocs-web-sdk/p-5ea05a1d.js +2 -0
  220. package/dist/verdocs-web-sdk/p-5ea05a1d.js.map +1 -0
  221. package/dist/verdocs-web-sdk/p-6802bdd2.system.entry.js +2 -0
  222. package/dist/verdocs-web-sdk/{p-ccf983c7.system.entry.js.map → p-6802bdd2.system.entry.js.map} +1 -1
  223. package/dist/verdocs-web-sdk/{p-dee9037d.system.entry.js → p-6a8ac53e.system.entry.js} +2 -2
  224. package/dist/verdocs-web-sdk/{p-dee9037d.system.entry.js.map → p-6a8ac53e.system.entry.js.map} +0 -0
  225. package/dist/verdocs-web-sdk/{p-2bb98709.system.entry.js → p-78ec7db1.system.entry.js} +2 -2
  226. package/dist/verdocs-web-sdk/{p-2bb98709.system.entry.js.map → p-78ec7db1.system.entry.js.map} +0 -0
  227. package/dist/verdocs-web-sdk/{p-04708900.system.entry.js → p-8095fab3.system.entry.js} +2 -2
  228. package/dist/verdocs-web-sdk/{p-04708900.system.entry.js.map → p-8095fab3.system.entry.js.map} +0 -0
  229. package/dist/verdocs-web-sdk/{p-036fc9f9.entry.js → p-868f497f.entry.js} +2 -2
  230. package/dist/verdocs-web-sdk/{p-036fc9f9.entry.js.map → p-868f497f.entry.js.map} +0 -0
  231. package/dist/verdocs-web-sdk/p-9236d9df.entry.js +2 -0
  232. package/dist/verdocs-web-sdk/{p-f06218ed.entry.js.map → p-9236d9df.entry.js.map} +1 -1
  233. package/dist/verdocs-web-sdk/p-92b0fc42.js +2 -0
  234. package/dist/verdocs-web-sdk/p-92b0fc42.js.map +1 -0
  235. package/dist/verdocs-web-sdk/{p-d6390915.entry.js → p-a59f1f82.entry.js} +2 -2
  236. package/dist/verdocs-web-sdk/{p-d6390915.entry.js.map → p-a59f1f82.entry.js.map} +0 -0
  237. package/dist/verdocs-web-sdk/p-a760546b.entry.js +2 -0
  238. package/dist/verdocs-web-sdk/p-a760546b.entry.js.map +1 -0
  239. package/dist/verdocs-web-sdk/p-a7ac4da8.system.entry.js +2 -0
  240. package/dist/verdocs-web-sdk/p-a7ac4da8.system.entry.js.map +1 -0
  241. package/dist/verdocs-web-sdk/{p-8574c48b.system.entry.js → p-a8c25a4a.system.entry.js} +2 -2
  242. package/dist/verdocs-web-sdk/{p-8574c48b.system.entry.js.map → p-a8c25a4a.system.entry.js.map} +0 -0
  243. package/dist/verdocs-web-sdk/{p-bcae2278.entry.js → p-a9068845.entry.js} +2 -2
  244. package/dist/verdocs-web-sdk/{p-bcae2278.entry.js.map → p-a9068845.entry.js.map} +0 -0
  245. package/dist/verdocs-web-sdk/{p-0d12be64.system.entry.js → p-aa2d9932.system.entry.js} +2 -2
  246. package/dist/verdocs-web-sdk/{p-0d12be64.system.entry.js.map → p-aa2d9932.system.entry.js.map} +0 -0
  247. package/dist/verdocs-web-sdk/{p-ffff808d.entry.js → p-af1063e3.entry.js} +2 -2
  248. package/dist/verdocs-web-sdk/{p-ffff808d.entry.js.map → p-af1063e3.entry.js.map} +0 -0
  249. package/dist/verdocs-web-sdk/{p-cf8ecaaf.system.entry.js → p-b5882803.system.entry.js} +2 -2
  250. package/dist/verdocs-web-sdk/{p-cf8ecaaf.system.entry.js.map → p-b5882803.system.entry.js.map} +0 -0
  251. package/dist/verdocs-web-sdk/{p-68319ca5.system.entry.js → p-b6c24f97.system.entry.js} +2 -2
  252. package/dist/verdocs-web-sdk/{p-68319ca5.system.entry.js.map → p-b6c24f97.system.entry.js.map} +0 -0
  253. package/dist/verdocs-web-sdk/{p-2da21c85.entry.js → p-baa985a4.entry.js} +2 -2
  254. package/dist/verdocs-web-sdk/{p-2da21c85.entry.js.map → p-baa985a4.entry.js.map} +0 -0
  255. package/dist/verdocs-web-sdk/{p-650e0b71.entry.js → p-be8004c0.entry.js} +2 -2
  256. package/dist/verdocs-web-sdk/{p-650e0b71.entry.js.map → p-be8004c0.entry.js.map} +0 -0
  257. package/dist/verdocs-web-sdk/p-becd8d7e.js +2 -0
  258. package/dist/verdocs-web-sdk/p-becd8d7e.js.map +1 -0
  259. package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
  260. package/dist/verdocs-web-sdk/p-c16b6ca4.system.js.map +1 -1
  261. package/dist/verdocs-web-sdk/p-c4357387.entry.js +2 -0
  262. package/dist/verdocs-web-sdk/p-c4357387.entry.js.map +1 -0
  263. package/dist/verdocs-web-sdk/{p-6f1440dd.js → p-c5a43bb3.js} +2 -2
  264. package/dist/verdocs-web-sdk/p-c5a43bb3.js.map +1 -0
  265. package/dist/verdocs-web-sdk/p-cb7d9ff5.js +2 -0
  266. package/dist/verdocs-web-sdk/p-cb7d9ff5.js.map +1 -0
  267. package/dist/verdocs-web-sdk/{p-f9901184.system.js → p-cd7b475a.system.js} +2 -2
  268. package/dist/verdocs-web-sdk/p-cd7b475a.system.js.map +1 -0
  269. package/dist/verdocs-web-sdk/p-d1a97a03.system.js +2 -0
  270. package/dist/verdocs-web-sdk/p-d1a97a03.system.js.map +1 -0
  271. package/dist/verdocs-web-sdk/{p-473165ae.system.entry.js → p-dd864f36.system.entry.js} +2 -2
  272. package/dist/verdocs-web-sdk/{p-473165ae.system.entry.js.map → p-dd864f36.system.entry.js.map} +0 -0
  273. package/dist/verdocs-web-sdk/p-e4569806.system.entry.js +2 -0
  274. package/dist/verdocs-web-sdk/p-e4569806.system.entry.js.map +1 -0
  275. package/dist/verdocs-web-sdk/p-e4fa4969.entry.js +2 -0
  276. package/dist/verdocs-web-sdk/p-e4fa4969.entry.js.map +1 -0
  277. package/dist/verdocs-web-sdk/{p-932571a1.entry.js → p-f19e600e.entry.js} +2 -2
  278. package/dist/verdocs-web-sdk/{p-932571a1.entry.js.map → p-f19e600e.entry.js.map} +0 -0
  279. package/dist/verdocs-web-sdk/p-f8c49765.system.entry.js +2 -0
  280. package/dist/verdocs-web-sdk/p-f8c49765.system.entry.js.map +1 -0
  281. package/dist/verdocs-web-sdk/{p-6f938ce3.entry.js → p-f9a9b3a2.entry.js} +2 -2
  282. package/dist/verdocs-web-sdk/{p-6f938ce3.entry.js.map → p-f9a9b3a2.entry.js.map} +0 -0
  283. package/dist/verdocs-web-sdk/{p-259fd8de.entry.js → p-fac05414.entry.js} +2 -2
  284. package/dist/verdocs-web-sdk/{p-259fd8de.entry.js.map → p-fac05414.entry.js.map} +0 -0
  285. package/dist/verdocs-web-sdk/p-fc93f2f3.entry.js +2 -0
  286. package/dist/verdocs-web-sdk/p-fc93f2f3.entry.js.map +1 -0
  287. package/dist/verdocs-web-sdk/{p-ed8e3256.system.entry.js → p-ff0b44f9.system.entry.js} +2 -2
  288. package/dist/verdocs-web-sdk/{p-ed8e3256.system.entry.js.map → p-ff0b44f9.system.entry.js.map} +0 -0
  289. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  290. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
  291. package/package.json +2 -2
  292. package/dist/cjs/Envelopes-22a0c02f.js.map +0 -1
  293. package/dist/cjs/TemplateDocuments-01c6e570.js +0 -45
  294. package/dist/cjs/TemplateDocuments-01c6e570.js.map +0 -1
  295. package/dist/cjs/VerdocsEndpoint-db38e942.js +0 -2435
  296. package/dist/cjs/VerdocsEndpoint-db38e942.js.map +0 -1
  297. package/dist/cjs/templateStore-92828c3c.js.map +0 -1
  298. package/dist/cjs/utils-84236321.js.map +0 -1
  299. package/dist/cjs/verdocs-document-page.cjs.entry.js +0 -84
  300. package/dist/cjs/verdocs-document-page.cjs.entry.js.map +0 -1
  301. package/dist/cjs/verdocs-loader_4.cjs.entry.js +0 -553
  302. package/dist/cjs/verdocs-loader_4.cjs.entry.js.map +0 -1
  303. package/dist/collection/components/elements/verdocs-view-envelope-document/verdocs-view-envelope-document.css +0 -16
  304. package/dist/collection/components/elements/verdocs-view-envelope-document/verdocs-view-envelope-document.js +0 -390
  305. package/dist/collection/components/elements/verdocs-view-envelope-document/verdocs-view-envelope-document.js.map +0 -1
  306. package/dist/collection/components/elements/verdocs-view-envelope-document/verdocs-view-envelope-document.stories.js +0 -15
  307. package/dist/collection/components/elements/verdocs-view-envelope-document/verdocs-view-envelope-document.stories.js.map +0 -1
  308. package/dist/collection/components/elements/verdocs-view-template-document/verdocs-view-template-document.css +0 -16
  309. package/dist/collection/components/elements/verdocs-view-template-document/verdocs-view-template-document.js +0 -388
  310. package/dist/collection/components/elements/verdocs-view-template-document/verdocs-view-template-document.js.map +0 -1
  311. package/dist/collection/components/elements/verdocs-view-template-document/verdocs-view-template-document.stories.js +0 -15
  312. package/dist/collection/components/elements/verdocs-view-template-document/verdocs-view-template-document.stories.js.map +0 -1
  313. package/dist/components/TemplateDocuments.js +0 -42
  314. package/dist/components/TemplateDocuments.js.map +0 -1
  315. package/dist/components/verdocs-view-envelope-document.d.ts +0 -11
  316. package/dist/components/verdocs-view-envelope-document.js +0 -8
  317. package/dist/components/verdocs-view-envelope-document.js.map +0 -1
  318. package/dist/components/verdocs-view-envelope-document2.js +0 -306
  319. package/dist/components/verdocs-view-envelope-document2.js.map +0 -1
  320. package/dist/components/verdocs-view-template-document.d.ts +0 -11
  321. package/dist/components/verdocs-view-template-document.js +0 -8
  322. package/dist/components/verdocs-view-template-document.js.map +0 -1
  323. package/dist/components/verdocs-view-template-document2.js +0 -209
  324. package/dist/components/verdocs-view-template-document2.js.map +0 -1
  325. package/dist/components/verdocs-view2.js +0 -229
  326. package/dist/components/verdocs-view2.js.map +0 -1
  327. package/dist/esm/Envelopes-df05b3c7.js.map +0 -1
  328. package/dist/esm/TemplateDocuments-89ba2276.js +0 -42
  329. package/dist/esm/TemplateDocuments-89ba2276.js.map +0 -1
  330. package/dist/esm/VerdocsEndpoint-82f4600d.js +0 -2432
  331. package/dist/esm/VerdocsEndpoint-82f4600d.js.map +0 -1
  332. package/dist/esm/templateStore-3b26e38d.js.map +0 -1
  333. package/dist/esm/utils-3f23facc.js.map +0 -1
  334. package/dist/esm/verdocs-document-page.entry.js +0 -80
  335. package/dist/esm/verdocs-document-page.entry.js.map +0 -1
  336. package/dist/esm/verdocs-loader_4.entry.js +0 -546
  337. package/dist/esm/verdocs-loader_4.entry.js.map +0 -1
  338. package/dist/esm-es5/Envelopes-df05b3c7.js +0 -2
  339. package/dist/esm-es5/Envelopes-df05b3c7.js.map +0 -1
  340. package/dist/esm-es5/TemplateDocuments-89ba2276.js +0 -2
  341. package/dist/esm-es5/TemplateDocuments-89ba2276.js.map +0 -1
  342. package/dist/esm-es5/VerdocsEndpoint-82f4600d.js +0 -2
  343. package/dist/esm-es5/VerdocsEndpoint-82f4600d.js.map +0 -1
  344. package/dist/esm-es5/templateStore-3b26e38d.js +0 -2
  345. package/dist/esm-es5/templateStore-3b26e38d.js.map +0 -1
  346. package/dist/esm-es5/utils-3f23facc.js +0 -2
  347. package/dist/esm-es5/utils-3f23facc.js.map +0 -1
  348. package/dist/esm-es5/verdocs-document-page.entry.js +0 -2
  349. package/dist/esm-es5/verdocs-document-page.entry.js.map +0 -1
  350. package/dist/esm-es5/verdocs-loader_4.entry.js +0 -2
  351. package/dist/esm-es5/verdocs-loader_4.entry.js.map +0 -1
  352. package/dist/types/components/elements/verdocs-view-envelope-document/verdocs-view-envelope-document.d.ts +0 -79
  353. package/dist/types/components/elements/verdocs-view-envelope-document/verdocs-view-envelope-document.stories.d.ts +0 -7
  354. package/dist/types/components/elements/verdocs-view-template-document/verdocs-view-template-document.d.ts +0 -77
  355. package/dist/types/components/elements/verdocs-view-template-document/verdocs-view-template-document.stories.d.ts +0 -7
  356. package/dist/verdocs-web-sdk/p-142295dd.system.entry.js +0 -2
  357. package/dist/verdocs-web-sdk/p-142295dd.system.entry.js.map +0 -1
  358. package/dist/verdocs-web-sdk/p-2fbd4e25.entry.js +0 -2
  359. package/dist/verdocs-web-sdk/p-2fbd4e25.entry.js.map +0 -1
  360. package/dist/verdocs-web-sdk/p-3035b6c5.system.js +0 -2
  361. package/dist/verdocs-web-sdk/p-3035b6c5.system.js.map +0 -1
  362. package/dist/verdocs-web-sdk/p-36700fe4.js +0 -2
  363. package/dist/verdocs-web-sdk/p-3a4126d5.system.entry.js +0 -2
  364. package/dist/verdocs-web-sdk/p-3a4126d5.system.entry.js.map +0 -1
  365. package/dist/verdocs-web-sdk/p-48d9e0d6.entry.js +0 -2
  366. package/dist/verdocs-web-sdk/p-48d9e0d6.entry.js.map +0 -1
  367. package/dist/verdocs-web-sdk/p-508192bb.system.entry.js +0 -2
  368. package/dist/verdocs-web-sdk/p-629237fc.js +0 -2
  369. package/dist/verdocs-web-sdk/p-629237fc.js.map +0 -1
  370. package/dist/verdocs-web-sdk/p-6e1ada33.system.js +0 -2
  371. package/dist/verdocs-web-sdk/p-6e1ada33.system.js.map +0 -1
  372. package/dist/verdocs-web-sdk/p-6f1440dd.js.map +0 -1
  373. package/dist/verdocs-web-sdk/p-70c732b7.js +0 -2
  374. package/dist/verdocs-web-sdk/p-70c732b7.js.map +0 -1
  375. package/dist/verdocs-web-sdk/p-7ce27ce2.js +0 -2
  376. package/dist/verdocs-web-sdk/p-7ce27ce2.js.map +0 -1
  377. package/dist/verdocs-web-sdk/p-8fd9dc5a.js +0 -2
  378. package/dist/verdocs-web-sdk/p-8fd9dc5a.js.map +0 -1
  379. package/dist/verdocs-web-sdk/p-a4041773.system.js +0 -2
  380. package/dist/verdocs-web-sdk/p-a4041773.system.js.map +0 -1
  381. package/dist/verdocs-web-sdk/p-b348e0ee.entry.js +0 -2
  382. package/dist/verdocs-web-sdk/p-b348e0ee.entry.js.map +0 -1
  383. package/dist/verdocs-web-sdk/p-b95cb372.entry.js +0 -2
  384. package/dist/verdocs-web-sdk/p-b95cb372.entry.js.map +0 -1
  385. package/dist/verdocs-web-sdk/p-c827cc19.system.js +0 -2
  386. package/dist/verdocs-web-sdk/p-c827cc19.system.js.map +0 -1
  387. package/dist/verdocs-web-sdk/p-ca6a1398.system.entry.js +0 -2
  388. package/dist/verdocs-web-sdk/p-ca6a1398.system.entry.js.map +0 -1
  389. package/dist/verdocs-web-sdk/p-ccf983c7.system.entry.js +0 -2
  390. package/dist/verdocs-web-sdk/p-cf2d7761.system.entry.js +0 -2
  391. package/dist/verdocs-web-sdk/p-cf2d7761.system.entry.js.map +0 -1
  392. package/dist/verdocs-web-sdk/p-e47e3154.entry.js +0 -2
  393. package/dist/verdocs-web-sdk/p-f06218ed.entry.js +0 -2
  394. package/dist/verdocs-web-sdk/p-f9901184.system.js.map +0 -1
  395. package/dist/verdocs-web-sdk/p-fc3a0e2d.system.entry.js +0 -2
  396. package/dist/verdocs-web-sdk/p-fc3a0e2d.system.entry.js.map +0 -1
  397. package/dist/verdocs-web-sdk/p-fe512c19.entry.js +0 -2
  398. package/dist/verdocs-web-sdk/p-fe512c19.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/components/elements/verdocs-document-page/verdocs-document-page.scss?tag=verdocs-document-page","src/components/elements/verdocs-document-page/verdocs-document-page.tsx","src/components/controls/verdocs-loader/verdocs-loader.scss?tag=verdocs-loader","src/components/controls/verdocs-loader/verdocs-loader.tsx"],"names":["verdocsDocumentPageCss","VerdocsDocumentPage","name","type","Math","random","toString","substring","this","virtualWidth","virtualHeight","[object Object]","resizeObserver","ResizeObserver","entries","entry","renderedWidth","contentRect","width","renderedHeight","notifyRenderedSize","observe","container","_a","disconnect","skipFirstNotification","pageRendered","emit","containerId","pageNumber","naturalWidth","naturalHeight","xScale","yScale","height","h","Host","id","style","layers","map","layer","class","src","pageImageUri","alt","aria-hidden","onLoad","e","target","aspectRatio","verdocsLoaderCss","VerdocsLoader"],"mappings":"gEAAA,MAAMA,EAAyB,iTCelBC,EAAmB,4FAOC,mBAMF,oBAME,uBAMC,gBAcD,CAAC,CAACC,KAAM,OAAQC,KAAM,4BAO9B,yBAAyBC,KAAKC,SAASC,SAAS,IAAIC,UAAU,EAAG,yBAEvDC,KAAKC,iCACJD,KAAKE,gCACPF,KAAKC,gCACJD,KAAKE,+BACPF,KAAKC,aAAeD,KAAKE,yCAEvB,KAEjCC,mBACEH,KAAKI,eAAiB,IAAIC,gBAAeC,IACvC,IAAK,MAAMC,KAASD,EAAS,CAC3B,MAAME,EAAgBD,EAAME,YAAYC,MACxCV,KAAKQ,cAAgBA,EACrBR,KAAKW,eAAiBX,KAAKE,eAAiBM,EAAgBR,KAAKC,cAGnED,KAAKY,wBAGPZ,KAAKI,eAAeS,QAAQb,KAAKc,WAGnCX,8BACEY,EAAAf,KAAKI,kBAAc,MAAAW,SAAA,OAAA,EAAAA,EAAEC,aASvBb,qBAGE,GAAIH,KAAKiB,sBAAuB,CAC9BjB,KAAKiB,sBAAwB,MAC7B,OAGFjB,KAAKkB,aAAaC,KAAK,CACrBL,UAAWd,KAAKc,UAChBM,YAAapB,KAAKoB,YAClBC,WAAYrB,KAAKqB,WACjBpB,aAAcD,KAAKC,aACnBC,cAAeF,KAAKE,cACpBM,cAAeR,KAAKQ,cACpBG,eAAgBX,KAAKW,eACrBW,aAActB,KAAKsB,aACnBC,cAAevB,KAAKuB,cACpBC,OAAQxB,KAAKQ,cAAgBR,KAAKsB,aAClCG,OAAQzB,KAAKW,eAAiBX,KAAKuB,gBAIvCpB,SACE,MAAMuB,EAAS,GAAG1B,KAAKW,mBAEvB,OACEgB,EAACC,EAAI,CAACC,GAAI,GAAG7B,KAAKoB,cAAeU,MAAO,CAACJ,OAAAA,IACtC1B,KAAK+B,OAAOC,KAAIC,GACfA,EAAMtC,OAAS,MACbgC,EAAA,MAAA,CAAKO,MAAM,8BAA8BL,GAAI,GAAG7B,KAAKoB,eAAea,EAAMvC,OAAQoC,MAAO,CAACJ,OAAAA,KAE1FC,EAAA,MAAA,CACEO,MAAM,kCACNL,GAAI,GAAG7B,KAAKoB,eAAea,EAAMvC,OACjCyC,IAAKnC,KAAKoC,aACVC,IAAK,QAAQrC,KAAKqB,aAAYiB,cACjB,KACbC,OAASC,IACPxC,KAAKsB,aAAekB,EAAEC,OAAOnB,aAC7BtB,KAAKuB,cAAgBiB,EAAEC,OAAOlB,cAC9BvB,KAAK0C,YAAc1C,KAAKsB,aAAetB,KAAKuB,+DCxI5D,MAAMoB,EAAmB,kqUCUZC,EAAa,+BACxBzC,SACE,OAAOwB,EAACC,EAAI","sourcesContent":["@import '../../../theme.scss';\n\nverdocs-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-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 max-width: 100%;\n }\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\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-document-page',\n styleUrl: 'verdocs-document-page.scss',\n shadow: false,\n})\nexport class VerdocsDocumentPage {\n @Element() container: HTMLElement;\n private resizeObserver: ResizeObserver;\n\n /**\n * The URL of the image to render as the page background.\n */\n @Prop() pageImageUri: string = '';\n\n /**\n * The page number being rendered. Not used internally, but included in callbacks/events beacuse page numbers\n * are used everywhere in document handling. (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() 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\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\n @State() skipFirstNotification = true;\n\n componentDidLoad(): void {\n this.resizeObserver = new ResizeObserver(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 });\n\n this.resizeObserver.observe(this.container);\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n }\n\n // Left here for documentation purposes in case we find an edge case where this isn't true. But we apparently don't need this.\n // When we add the resize observer it will always be triggered at least once so notifying here as well is just a dupe.\n // componentDidRender() {\n // this.notifyRenderedSize();\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 this.pageRendered.emit({\n container: this.container,\n containerId: this.containerId,\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 xScale: this.renderedWidth / this.naturalWidth,\n yScale: this.renderedHeight / this.naturalHeight,\n });\n }\n\n render() {\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}} />\n ) : (\n <img\n class=\"verdocs-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageImageUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n onLoad={(e: any) => {\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n }}\n />\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-loader {\n display: block;\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -20px;\n margin-top: -20px;\n font-size: 24px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n text-indent: -9999em;\n -webkit-animation: load5 1.1s infinite ease;\n animation: verdocs-loader-kf 1.1s infinite ease;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n}\n\n@keyframes verdocs-loader-kf {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em $verdocs-bg-2, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em $verdocs-bg-2, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em $verdocs-bg-2, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em $verdocs-bg-2,\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4),\n 0em 2.5em 0 0em $verdocs-bg-2, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em $verdocs-bg-2, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em $verdocs-bg-2, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em $verdocs-bg-2;\n }\n}\n","import {Component, h, Host} from '@stencil/core';\n\n/**\n * Animated loader placeholder. There are currently no configuration options for this control.\n */\n@Component({\n tag: 'verdocs-loader',\n styleUrl: 'verdocs-loader.scss',\n shadow: false,\n})\nexport class VerdocsLoader {\n render() {\n return <Host />;\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{d as n}from"./p-629237fc.js";var e=undefined&&undefined.__awaiter||function(n,e,r,t){function i(n){return n instanceof r?n:new r((function(e){e(n)}))}return new(r||(r=Promise))((function(r,o){function u(n){try{c(t.next(n))}catch(n){o(n)}}function f(n){try{c(t["throw"](n))}catch(n){o(n)}}function c(n){n.done?r(n.value):i(n.value).then(u,f)}c((t=t.apply(n,e||[])).next())}))};var r=undefined&&undefined.__generator||function(n,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,i,o,u;return u={next:f(0),throw:f(1),return:f(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function f(n){return function(e){return c([n,e])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(r)try{if(t=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1];o=u;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(u);break}if(o[2])r.ops.pop();r.trys.pop();continue}u=e.call(n,r)}catch(n){u=[6,n];i=0}finally{t=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var t=function(t,i){return e(void 0,void 0,void 0,(function(){return r(this,(function(e){return[2,t.api.get("/envelopes/".concat(i.envelopeId,"/recipients/").concat(encodeURIComponent(i.roleId),"/invitation/").concat(i.inviteCode)).then((function(e){var r,i;var o=((r=e.headers)===null||r===void 0?void 0:r.signer_token)||"";var u=n(o);t.setToken((i=e.headers)===null||i===void 0?void 0:i.signer_token);return{recipient:e.data,session:u,signerToken:o}}))]}))}))};var i=function(n,t){return e(void 0,void 0,void 0,(function(){return r(this,(function(e){return[2,n.api.get("/envelopes/".concat(t)).then((function(n){return n.data}))]}))}))};var o=function(n,t,i){return e(void 0,void 0,void 0,(function(){return r(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/envelope_documents/").concat(i)).then((function(n){return n.data}))]}))}))};var u=function(n,t,i){return e(void 0,void 0,void 0,(function(){return r(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/envelope_documents/").concat(i,"?file=true"),{responseType:"arraybuffer"}).then((function(n){return Buffer.from(n.data,"binary").toString("base64")}))]}))}))};var f=function(n,t,i,o){return e(void 0,void 0,void 0,(function(){return r(this,(function(e){return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(i),o).then((function(n){return n.data}))]}))}))};export{i as a,u as b,o as c,t as g,f as u};
2
- //# sourceMappingURL=p-6f1440dd.js.map
1
+ import{d as n}from"./p-becd8d7e.js";var e=undefined&&undefined.__awaiter||function(n,e,r,t){function i(n){return n instanceof r?n:new r((function(e){e(n)}))}return new(r||(r=Promise))((function(r,o){function u(n){try{c(t.next(n))}catch(n){o(n)}}function f(n){try{c(t["throw"](n))}catch(n){o(n)}}function c(n){n.done?r(n.value):i(n.value).then(u,f)}c((t=t.apply(n,e||[])).next())}))};var r=undefined&&undefined.__generator||function(n,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},t,i,o,u;return u={next:f(0),throw:f(1),return:f(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function f(n){return function(e){return c([n,e])}}function c(u){if(t)throw new TypeError("Generator is already executing.");while(r)try{if(t=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1];o=u;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(u);break}if(o[2])r.ops.pop();r.trys.pop();continue}u=e.call(n,r)}catch(n){u=[6,n];i=0}finally{t=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var t=function(t,i){return e(void 0,void 0,void 0,(function(){return r(this,(function(e){return[2,t.api.get("/envelopes/".concat(i.envelopeId,"/recipients/").concat(encodeURIComponent(i.roleId),"/invitation/").concat(i.inviteCode)).then((function(e){var r;var i=((r=e.headers)===null||r===void 0?void 0:r.signer_token)||"";var o=n(i);t.setToken(i);return{recipient:e.data,session:o,signerToken:i}}))]}))}))};var i=function(n,t){return e(void 0,void 0,void 0,(function(){return r(this,(function(e){return[2,n.api.get("/envelopes/".concat(t)).then((function(n){return n.data}))]}))}))};var o=function(n,t,i){return e(void 0,void 0,void 0,(function(){return r(this,(function(e){return[2,n.api.get("/envelopes/".concat(t,"/envelope_documents/").concat(i,"?file=true"),{responseType:"arraybuffer"}).then((function(n){return Buffer.from(n.data,"binary").toString("base64")}))]}))}))};var u=function(n,t,i,o){return e(void 0,void 0,void 0,(function(){return r(this,(function(e){return[2,n.api.put("/envelopes/".concat(t,"/fields/").concat(i),o).then((function(n){return n.data}))]}))}))};export{i as a,o as b,t as g,u};
2
+ //# sourceMappingURL=p-c5a43bb3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["node_modules/@verdocs/js-sdk/Envelopes/Envelopes.js"],"names":["__awaiter","this","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","apply","__generator","body","_","label","sent","t","trys","ops","f","y","g","verb","throw","return","Symbol","iterator","n","v","op","TypeError","call","pop","length","push","getSigningSession","endpoint","params","_a","api","get","concat","envelopeId","encodeURIComponent","roleId","inviteCode","r","signerToken","headers","signer_token","session","decodeAccessTokenBody","setToken","recipient","data","getEnvelope","getEnvelopeFile","documentId","responseType","Buffer","from","toString","updateEnvelopeField","fieldName","put"],"mappings":"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","sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { decodeAccessTokenBody } from '../Utils/Token';\n/**\n * Create an envelope\n *\n * ```typescript\n * import {Envelopes, ICreateEnvelopeRole, ICreateEnvelopeRequest} from '@verdocs/js-sdk/Envelopes';\n *\n * const role1: ICreateEnvelopeRole = {\n * type: 'signer',\n * name: 'Seller',\n * full_name: 'Paige Turner',\n * email: 'paige.turner@nomail.com',\n * phone: '',\n * sequence: 1,\n * delegator: false,\n * message: '',\n * };\n *\n * const role2: ICreateEnvelopeRole = {\n * type: 'signer',\n * name: 'Buyer',\n * full_name: 'Will Power',\n * email: 'will.power@nomail.com',\n * phone: '',\n * sequence: 2,\n * delegator: false,\n * message: '',\n * };\n *\n * const request: ICreateEnvelopeRequest = {template_id: 'd2338742-f3a1-465b-8592-806587413cc1', name: 'Bill of Sale', roles: [role1, role2]};\n * const {id, recipients} = await Envelopes.createEnvelope(VerdocsEndpoint.getDefault(), request);\n * ```\n */\nexport var createEnvelope = function (endpoint, request) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .post('/envelopes', request)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Get a summary of currently active envelopes.\n *\n * ```typescript\n * import {Envelopes} from '@verdocs/js-sdk/Envelopes';\n *\n * const {action_required, completed, waiting_on_others} = await Envelopes.getSummary(VerdocsEndpoint.getDefault());\n * ```\n */\nexport var getSummary = function (endpoint, page) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .post('/envelopes/summary', { page: page })\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Search for envelopes matching various criteria.\n *\n * ```typescript\n * import {Envelopes} from '@verdocs/js-sdk/Envelopes';\n *\n * const {result, page, total} = await Envelopes.search(VerdocsEndpoint.getDefault(), { ... });\n * ```\n */\nexport var searchEnvelopes = function (endpoint, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .post('/envelopes/search', params)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Get a signing session for an Envelope.\n */\nexport var getSigningSession = function (endpoint, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .get(\"/envelopes/\".concat(params.envelopeId, \"/recipients/\").concat(encodeURIComponent(params.roleId), \"/invitation/\").concat(params.inviteCode))\n .then(function (r) {\n var _a;\n // Avoiding a jsonwebtoken dependency here - we don't actually need the whole library\n var signerToken = ((_a = r.headers) === null || _a === void 0 ? void 0 : _a.signer_token) || '';\n var session = decodeAccessTokenBody(signerToken);\n endpoint.setToken(signerToken);\n return { recipient: r.data, session: session, signerToken: signerToken };\n })];\n });\n}); };\n/**\n * Get the list of recipients for an Envelope.\n */\nexport var getEnvelopeRecipients = function (endpoint, envelopeId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients\"))\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Get all metadata for an Envelope.\n */\nexport var getEnvelope = function (endpoint, envelopeId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId))\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Get all metadata for an Envelope.\n */\nexport var getEnvelopeDocument = function (endpoint, envelopeId, documentId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/envelope_documents/\").concat(documentId))\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Cancel an Envelope.\n */\nexport var cancelEnvelope = function (endpoint, envelopeId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId), { action: 'cancel' })\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Returns true if the recipient has a pending action. Note that this does not necessarily mean the recipient can act (yet).\n */\nexport var recipientHasAction = function (recipient) { return !['submitted', 'canceled', 'declined'].includes(recipient.status); };\n/**\n * Returns the recipients who still have a pending action. Note that not all of these recipients may be able to act (yet).\n */\nexport var getRecipientsWithActions = function (envelope) { return ((envelope === null || envelope === void 0 ? void 0 : envelope.recipients) || []).filter(recipientHasAction); };\n/**\n * Returns true if the recipient can act.\n */\nexport var recipientCanAct = function (recipient, recipientsWithActions) { var _a; return recipient.sequence === ((_a = recipientsWithActions === null || recipientsWithActions === void 0 ? void 0 : recipientsWithActions[0]) === null || _a === void 0 ? void 0 : _a.sequence); };\n/**\n * Returns true if the user can act.\n */\nexport var userCanAct = function (email, recipientsWithActions) {\n var _a;\n var recipient = recipientsWithActions.find(function (r) { return r.email === email; });\n return recipient && recipient.sequence === ((_a = recipientsWithActions === null || recipientsWithActions === void 0 ? void 0 : recipientsWithActions[0]) === null || _a === void 0 ? void 0 : _a.sequence);\n};\n/**\n * Get (binary download) a file attached to an Envelope. It is important to use this method\n * rather than a direct A HREF or similar link to set the authorization headers for the\n * request.\n */\nexport var getEnvelopeFile = function (endpoint, envelopeId, documentId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/envelope_documents/\").concat(documentId, \"?file=true\"), {\n responseType: 'arraybuffer',\n })\n .then(function (r) { return Buffer.from(r.data, 'binary').toString('base64'); })];\n });\n}); };\n/**\n * Update a Document field. Typically called during the signing process as a Recipient fills in fields.\n */\nexport var updateEnvelopeField = function (endpoint, envelopeId, fieldName, value) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/fields/\").concat(fieldName), value)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Update a Document signature field. Signature fields are ID-driven. Call `Document.createSignature()` first to create a\n * signature for a Recipient, then call `Documents.updateDocumentFieldSignature()` to attach it to a field.\n */\nexport var updateEnvelopeFieldSignature = function (endpoint, envelopeId, fieldName, signatureId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/fields/\").concat(fieldName, \"/signature/\").concat(signatureId))\n .then(function (r) { return r.data; })];\n });\n}); };\n"]}
@@ -0,0 +1,2 @@
1
+ import{c as e}from"./p-5ea05a1d.js";import{i as s}from"./p-92b0fc42.js";const{state:a,onChange:o}=e({template:null,loadProgress:0,loading:true,pageNumbers:[],pageUris:{},roleNames:[],fields:[],dirty:false});o("template",(async e=>{if(!e){console.log("[TEMPLATESTORE] Clearing template");a.fields=[];a.roleNames=[];a.pageNumbers=[];a.dirty=false;a.loading=false;a.loadProgress=0;return}console.log("[TEMPLATESTORE] Template loaded",e);a.roleNames=e.roles.map((e=>e.name));console.log("[TEMPLATESTORE] Loaded roles",a.roleNames);a.fields=[];e.roles.forEach((e=>{a.fields.push(...e.fields)}));console.log("[TEMPLATESTORE] Loaded fields",a.fields);a.pageNumbers=s(1,e.pages.length)}));o("fields",(e=>{console.log("[TEMPLATESTORE] Field changed",e);a.dirty=true}));export{a as s};
2
+ //# sourceMappingURL=p-cb7d9ff5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/utils/templateStore.ts"],"names":["state","onChange","createStore","template","loadProgress","loading","pageNumbers","pageUris","roleNames","fields","dirty","async","newTemplate","console","log","roles","map","role","name","forEach","push","integerSequence","pages","length","newField"],"mappings":"8EAUMA,MAACA,EAAKC,SAAEA,GAAYC,EAAY,CACpCC,SAAU,KACVC,aAAc,EACdC,QAAS,KAETC,YAAa,GACbC,SAAU,GACVC,UAAW,GACXC,OAAQ,GACRC,MAAO,QAGTT,EAAS,YAAYU,MAAMC,IACzB,IAAKA,EAAa,CAChBC,QAAQC,IAAI,qCACZd,EAAMS,OAAS,GACfT,EAAMQ,UAAY,GAClBR,EAAMM,YAAc,GACpBN,EAAMU,MAAQ,MACdV,EAAMK,QAAU,MAChBL,EAAMI,aAAe,EACrB,OAGFS,QAAQC,IAAI,kCAAmCF,GAE/CZ,EAAMQ,UAAYI,EAAYG,MAAMC,KAAIC,GAAQA,EAAKC,OACrDL,QAAQC,IAAI,+BAAgCd,EAAMQ,WAElDR,EAAMS,OAAS,GACfG,EAAYG,MAAMI,SAAQF,IACxBjB,EAAMS,OAAOW,QAAQH,EAAKR,WAG5BI,QAAQC,IAAI,gCAAiCd,EAAMS,QAEnDT,EAAMM,YAAce,EAAgB,EAAGT,EAAYU,MAAMC,WAG3DtB,EAAS,UAAUuB,IACjBX,QAAQC,IAAI,gCAAiCU,GAC7CxB,EAAMU,MAAQ","sourcesContent":["// NOTE: Do not attempt to convert this to a named-export module. It triggers compilation issues in Rollup that I spent days trying to\n// resolve. This needs to export a single default value of the store's state. Any helper functions should go in Templates.ts here.\n\nimport {createStore} from '@stencil/store';\nimport {ITemplate, ITemplateField} from '@verdocs/js-sdk/Templates/Types';\n// import {VerdocsEndpoint} from '@verdocs/js-sdk';\n// import {getTemplate} from '@verdocs/js-sdk/Templates/Templates';\nimport {integerSequence} from './utils';\n// import {getPageImage} from '@verdocs/js-sdk/Templates/Pages';\n\nconst {state, onChange} = createStore({\n template: null as ITemplate | null,\n loadProgress: 0,\n loading: true,\n\n pageNumbers: [] as number[],\n pageUris: {} as Record<number, string>,\n roleNames: [] as string[],\n fields: [] as ITemplateField[],\n dirty: false,\n});\n\nonChange('template', async newTemplate => {\n if (!newTemplate) {\n console.log('[TEMPLATESTORE] Clearing template');\n state.fields = [];\n state.roleNames = [];\n state.pageNumbers = [];\n state.dirty = false;\n state.loading = false;\n state.loadProgress = 0;\n return;\n }\n\n console.log('[TEMPLATESTORE] Template loaded', newTemplate);\n\n state.roleNames = newTemplate.roles.map(role => role.name);\n console.log('[TEMPLATESTORE] Loaded roles', state.roleNames);\n\n state.fields = [];\n newTemplate.roles.forEach(role => {\n state.fields.push(...role.fields);\n });\n\n console.log('[TEMPLATESTORE] Loaded fields', state.fields);\n\n state.pageNumbers = integerSequence(1, newTemplate.pages.length);\n});\n\nonChange('fields', newField => {\n console.log('[TEMPLATESTORE] Field changed', newField);\n state.dirty = true;\n});\n\nexport default state;\n"]}
@@ -1,2 +1,2 @@
1
- System.register(["./p-6e1ada33.system.js"],(function(n){"use strict";var e;return{setters:[function(n){e=n.d}],execute:function(){var t=undefined&&undefined.__awaiter||function(n,e,t,r){function o(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,i){function u(n){try{c(r.next(n))}catch(n){i(n)}}function a(n){try{c(r["throw"](n))}catch(n){i(n)}}function c(n){n.done?t(n.value):o(n.value).then(u,a)}c((r=r.apply(n,e||[])).next())}))};var r=undefined&&undefined.__generator||function(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(e){return c([n,e])}}function c(u){if(r)throw new TypeError("Generator is already executing.");while(t)try{if(r=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;o=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){t.label=u[1];break}if(u[0]===6&&t.label<i[1]){t.label=i[1];i=u;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(u);break}if(i[2])t.ops.pop();t.trys.pop();continue}u=e.call(n,t)}catch(n){u=[6,n];o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var o=n("g",(function(n,o){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,n.api.get("/envelopes/".concat(o.envelopeId,"/recipients/").concat(encodeURIComponent(o.roleId),"/invitation/").concat(o.inviteCode)).then((function(t){var r,o;var i=((r=t.headers)===null||r===void 0?void 0:r.signer_token)||"";var u=e(i);n.setToken((o=t.headers)===null||o===void 0?void 0:o.signer_token);return{recipient:t.data,session:u,signerToken:i}}))]}))}))}));var i=n("a",(function(n,e){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,n.api.get("/envelopes/".concat(e)).then((function(n){return n.data}))]}))}))}));var u=n("c",(function(n,e,o){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,n.api.get("/envelopes/".concat(e,"/envelope_documents/").concat(o)).then((function(n){return n.data}))]}))}))}));var a=n("b",(function(n,e,o){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,n.api.get("/envelopes/".concat(e,"/envelope_documents/").concat(o,"?file=true"),{responseType:"arraybuffer"}).then((function(n){return Buffer.from(n.data,"binary").toString("base64")}))]}))}))}));var c=n("u",(function(n,e,o,i){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,n.api.put("/envelopes/".concat(e,"/fields/").concat(o),i).then((function(n){return n.data}))]}))}))}))}}}));
2
- //# sourceMappingURL=p-f9901184.system.js.map
1
+ System.register(["./p-1cd2f7dc.system.js"],(function(n){"use strict";var e;return{setters:[function(n){e=n.d}],execute:function(){var t=undefined&&undefined.__awaiter||function(n,e,t,r){function o(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,i){function u(n){try{c(r.next(n))}catch(n){i(n)}}function a(n){try{c(r["throw"](n))}catch(n){i(n)}}function c(n){n.done?t(n.value):o(n.value).then(u,a)}c((r=r.apply(n,e||[])).next())}))};var r=undefined&&undefined.__generator||function(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(n){return function(e){return c([n,e])}}function c(u){if(r)throw new TypeError("Generator is already executing.");while(t)try{if(r=1,o&&(i=u[0]&2?o["return"]:u[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;if(o=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:t.label++;return{value:u[1],done:false};case 5:t.label++;o=u[1];u=[0];continue;case 7:u=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){t.label=u[1];break}if(u[0]===6&&t.label<i[1]){t.label=i[1];i=u;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(u);break}if(i[2])t.ops.pop();t.trys.pop();continue}u=e.call(n,t)}catch(n){u=[6,n];o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var o=n("g",(function(n,o){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,n.api.get("/envelopes/".concat(o.envelopeId,"/recipients/").concat(encodeURIComponent(o.roleId),"/invitation/").concat(o.inviteCode)).then((function(t){var r;var o=((r=t.headers)===null||r===void 0?void 0:r.signer_token)||"";var i=e(o);n.setToken(o);return{recipient:t.data,session:i,signerToken:o}}))]}))}))}));var i=n("a",(function(n,e){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,n.api.get("/envelopes/".concat(e)).then((function(n){return n.data}))]}))}))}));var u=n("b",(function(n,e,o){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,n.api.get("/envelopes/".concat(e,"/envelope_documents/").concat(o,"?file=true"),{responseType:"arraybuffer"}).then((function(n){return Buffer.from(n.data,"binary").toString("base64")}))]}))}))}));var a=n("u",(function(n,e,o,i){return t(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,n.api.put("/envelopes/".concat(e,"/fields/").concat(o),i).then((function(n){return n.data}))]}))}))}))}}}));
2
+ //# sourceMappingURL=p-cd7b475a.system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["node_modules/@verdocs/js-sdk/Envelopes/Envelopes.js"],"names":["__awaiter","this","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","apply","__generator","body","_","label","sent","t","trys","ops","f","y","g","verb","throw","return","Symbol","iterator","n","v","op","TypeError","call","pop","length","push","getSigningSession","exports","endpoint","params","_a","api","get","concat","envelopeId","encodeURIComponent","roleId","inviteCode","r","signerToken","headers","signer_token","session","decodeAccessTokenBody","setToken","recipient","data","getEnvelope","getEnvelopeFile","documentId","responseType","Buffer","from","toString","updateEnvelopeField","fieldName","put"],"mappings":"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","sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { decodeAccessTokenBody } from '../Utils/Token';\n/**\n * Create an envelope\n *\n * ```typescript\n * import {Envelopes, ICreateEnvelopeRole, ICreateEnvelopeRequest} from '@verdocs/js-sdk/Envelopes';\n *\n * const role1: ICreateEnvelopeRole = {\n * type: 'signer',\n * name: 'Seller',\n * full_name: 'Paige Turner',\n * email: 'paige.turner@nomail.com',\n * phone: '',\n * sequence: 1,\n * delegator: false,\n * message: '',\n * };\n *\n * const role2: ICreateEnvelopeRole = {\n * type: 'signer',\n * name: 'Buyer',\n * full_name: 'Will Power',\n * email: 'will.power@nomail.com',\n * phone: '',\n * sequence: 2,\n * delegator: false,\n * message: '',\n * };\n *\n * const request: ICreateEnvelopeRequest = {template_id: 'd2338742-f3a1-465b-8592-806587413cc1', name: 'Bill of Sale', roles: [role1, role2]};\n * const {id, recipients} = await Envelopes.createEnvelope(VerdocsEndpoint.getDefault(), request);\n * ```\n */\nexport var createEnvelope = function (endpoint, request) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .post('/envelopes', request)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Get a summary of currently active envelopes.\n *\n * ```typescript\n * import {Envelopes} from '@verdocs/js-sdk/Envelopes';\n *\n * const {action_required, completed, waiting_on_others} = await Envelopes.getSummary(VerdocsEndpoint.getDefault());\n * ```\n */\nexport var getSummary = function (endpoint, page) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .post('/envelopes/summary', { page: page })\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Search for envelopes matching various criteria.\n *\n * ```typescript\n * import {Envelopes} from '@verdocs/js-sdk/Envelopes';\n *\n * const {result, page, total} = await Envelopes.search(VerdocsEndpoint.getDefault(), { ... });\n * ```\n */\nexport var searchEnvelopes = function (endpoint, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .post('/envelopes/search', params)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Get a signing session for an Envelope.\n */\nexport var getSigningSession = function (endpoint, params) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .get(\"/envelopes/\".concat(params.envelopeId, \"/recipients/\").concat(encodeURIComponent(params.roleId), \"/invitation/\").concat(params.inviteCode))\n .then(function (r) {\n var _a;\n // Avoiding a jsonwebtoken dependency here - we don't actually need the whole library\n var signerToken = ((_a = r.headers) === null || _a === void 0 ? void 0 : _a.signer_token) || '';\n var session = decodeAccessTokenBody(signerToken);\n endpoint.setToken(signerToken);\n return { recipient: r.data, session: session, signerToken: signerToken };\n })];\n });\n}); };\n/**\n * Get the list of recipients for an Envelope.\n */\nexport var getEnvelopeRecipients = function (endpoint, envelopeId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients\"))\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Get all metadata for an Envelope.\n */\nexport var getEnvelope = function (endpoint, envelopeId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId))\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Get all metadata for an Envelope.\n */\nexport var getEnvelopeDocument = function (endpoint, envelopeId, documentId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/envelope_documents/\").concat(documentId))\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Cancel an Envelope.\n */\nexport var cancelEnvelope = function (endpoint, envelopeId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId), { action: 'cancel' })\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Returns true if the recipient has a pending action. Note that this does not necessarily mean the recipient can act (yet).\n */\nexport var recipientHasAction = function (recipient) { return !['submitted', 'canceled', 'declined'].includes(recipient.status); };\n/**\n * Returns the recipients who still have a pending action. Note that not all of these recipients may be able to act (yet).\n */\nexport var getRecipientsWithActions = function (envelope) { return ((envelope === null || envelope === void 0 ? void 0 : envelope.recipients) || []).filter(recipientHasAction); };\n/**\n * Returns true if the recipient can act.\n */\nexport var recipientCanAct = function (recipient, recipientsWithActions) { var _a; return recipient.sequence === ((_a = recipientsWithActions === null || recipientsWithActions === void 0 ? void 0 : recipientsWithActions[0]) === null || _a === void 0 ? void 0 : _a.sequence); };\n/**\n * Returns true if the user can act.\n */\nexport var userCanAct = function (email, recipientsWithActions) {\n var _a;\n var recipient = recipientsWithActions.find(function (r) { return r.email === email; });\n return recipient && recipient.sequence === ((_a = recipientsWithActions === null || recipientsWithActions === void 0 ? void 0 : recipientsWithActions[0]) === null || _a === void 0 ? void 0 : _a.sequence);\n};\n/**\n * Get (binary download) a file attached to an Envelope. It is important to use this method\n * rather than a direct A HREF or similar link to set the authorization headers for the\n * request.\n */\nexport var getEnvelopeFile = function (endpoint, envelopeId, documentId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/envelope_documents/\").concat(documentId, \"?file=true\"), {\n responseType: 'arraybuffer',\n })\n .then(function (r) { return Buffer.from(r.data, 'binary').toString('base64'); })];\n });\n}); };\n/**\n * Update a Document field. Typically called during the signing process as a Recipient fills in fields.\n */\nexport var updateEnvelopeField = function (endpoint, envelopeId, fieldName, value) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/fields/\").concat(fieldName), value)\n .then(function (r) { return r.data; })];\n });\n}); };\n/**\n * Update a Document signature field. Signature fields are ID-driven. Call `Document.createSignature()` first to create a\n * signature for a Recipient, then call `Documents.updateDocumentFieldSignature()` to attach it to a field.\n */\nexport var updateEnvelopeFieldSignature = function (endpoint, envelopeId, fieldName, signatureId) { return __awaiter(void 0, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, endpoint.api //\n .put(\"/envelopes/\".concat(envelopeId, \"/fields/\").concat(fieldName, \"/signature/\").concat(signatureId))\n .then(function (r) { return r.data; })];\n });\n}); };\n"]}
@@ -0,0 +1,2 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function l(e){try{s(r.next(e))}catch(e){a(e)}}function i(e){try{s(r["throw"](e))}catch(e){a(e)}}function s(e){e.done?n(e.value):o(e.value).then(l,i)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,l;return l={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function i(e){return function(t){return s([e,t])}}function s(l){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(a=l[0]&2?o["return"]:l[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,l[1])).done)return a;if(o=0,a)l=[l[0]&2,a.value];switch(l[0]){case 0:case 1:a=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;o=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1];a=l;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(l);break}if(a[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];o=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-0f6da8c7.system.js","./p-21ec6ff0.system.js"],(function(e){"use strict";var t,n;return{setters:[function(e){t=e.c},function(e){n=e.i}],execute:function(){var r=this;var o=t({template:null,loadProgress:0,loading:true,pageNumbers:[],pageUris:{},roleNames:[],fields:[],dirty:false}),a=o.state,l=o.onChange;e("s",a);l("template",(function(e){return __awaiter(r,void 0,void 0,(function(){return __generator(this,(function(t){if(!e){console.log("[TEMPLATESTORE] Clearing template");a.fields=[];a.roleNames=[];a.pageNumbers=[];a.dirty=false;a.loading=false;a.loadProgress=0;return[2]}console.log("[TEMPLATESTORE] Template loaded",e);a.roleNames=e.roles.map((function(e){return e.name}));console.log("[TEMPLATESTORE] Loaded roles",a.roleNames);a.fields=[];e.roles.forEach((function(e){var t;(t=a.fields).push.apply(t,e.fields)}));console.log("[TEMPLATESTORE] Loaded fields",a.fields);a.pageNumbers=n(1,e.pages.length);return[2]}))}))}));l("fields",(function(e){console.log("[TEMPLATESTORE] Field changed",e);a.dirty=true}))}}}));
2
+ //# sourceMappingURL=p-d1a97a03.system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/utils/templateStore.ts"],"names":["_a","createStore","template","loadProgress","loading","pageNumbers","pageUris","roleNames","fields","dirty","state","onChange","exports","newTemplate","__awaiter","_this","console","log","roles","map","role","name","forEach","push","apply","integerSequence","pages","length","newField"],"mappings":"onDAUM,IAAAA,EAAoBC,EAAY,CACpCC,SAAU,KACVC,aAAc,EACdC,QAAS,KAETC,YAAa,GACbC,SAAU,GACVC,UAAW,GACXC,OAAQ,GACRC,MAAO,QATFC,EAAKV,EAAAU,MAAEC,EAAQX,EAAAW,SAUrBC,EAAA,IAAAF,GAEDC,EAAS,YAAY,SAAME,GAAW,OAAAC,UAAAC,OAAA,OAAA,GAAA,gDACpC,IAAKF,EAAa,CAChBG,QAAQC,IAAI,qCACZP,EAAMF,OAAS,GACfE,EAAMH,UAAY,GAClBG,EAAML,YAAc,GACpBK,EAAMD,MAAQ,MACdC,EAAMN,QAAU,MAChBM,EAAMP,aAAe,EACrB,MAAA,CAAA,GAGFa,QAAQC,IAAI,kCAAmCJ,GAE/CH,EAAMH,UAAYM,EAAYK,MAAMC,KAAI,SAAAC,GAAQ,OAAAA,EAAKC,QACrDL,QAAQC,IAAI,+BAAgCP,EAAMH,WAElDG,EAAMF,OAAS,GACfK,EAAYK,MAAMI,SAAQ,SAAAF,UACxBpB,EAAAU,EAAMF,QAAOe,KAAIC,MAAAxB,EAAIoB,EAAKZ,WAG5BQ,QAAQC,IAAI,gCAAiCP,EAAMF,QAEnDE,EAAML,YAAcoB,EAAgB,EAAGZ,EAAYa,MAAMC,2BAG3DhB,EAAS,UAAU,SAAAiB,GACjBZ,QAAQC,IAAI,gCAAiCW,GAC7ClB,EAAMD,MAAQ","sourcesContent":["// NOTE: Do not attempt to convert this to a named-export module. It triggers compilation issues in Rollup that I spent days trying to\n// resolve. This needs to export a single default value of the store's state. Any helper functions should go in Templates.ts here.\n\nimport {createStore} from '@stencil/store';\nimport {ITemplate, ITemplateField} from '@verdocs/js-sdk/Templates/Types';\n// import {VerdocsEndpoint} from '@verdocs/js-sdk';\n// import {getTemplate} from '@verdocs/js-sdk/Templates/Templates';\nimport {integerSequence} from './utils';\n// import {getPageImage} from '@verdocs/js-sdk/Templates/Pages';\n\nconst {state, onChange} = createStore({\n template: null as ITemplate | null,\n loadProgress: 0,\n loading: true,\n\n pageNumbers: [] as number[],\n pageUris: {} as Record<number, string>,\n roleNames: [] as string[],\n fields: [] as ITemplateField[],\n dirty: false,\n});\n\nonChange('template', async newTemplate => {\n if (!newTemplate) {\n console.log('[TEMPLATESTORE] Clearing template');\n state.fields = [];\n state.roleNames = [];\n state.pageNumbers = [];\n state.dirty = false;\n state.loading = false;\n state.loadProgress = 0;\n return;\n }\n\n console.log('[TEMPLATESTORE] Template loaded', newTemplate);\n\n state.roleNames = newTemplate.roles.map(role => role.name);\n console.log('[TEMPLATESTORE] Loaded roles', state.roleNames);\n\n state.fields = [];\n newTemplate.roles.forEach(role => {\n state.fields.push(...role.fields);\n });\n\n console.log('[TEMPLATESTORE] Loaded fields', state.fields);\n\n state.pageNumbers = integerSequence(1, newTemplate.pages.length);\n});\n\nonChange('fields', newField => {\n console.log('[TEMPLATESTORE] Field changed', newField);\n state.dirty = true;\n});\n\nexport default state;\n"]}
@@ -1,2 +1,2 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function l(e){try{a(i.next(e))}catch(e){o(e)}}function r(e){try{a(i["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):s(e.value).then(l,r)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,s,o,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(e){return function(t){return a([e,t])}}function a(l){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,s&&(o=l[0]&2?s["return"]:l[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,l[1])).done)return o;if(s=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;s=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];s=0}finally{i=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-97329951.system.js","./p-df878df9.system.js","./p-a7433630.system.js","./p-7efdefa3.system.js","./p-05eb4fed.system.js","./p-6e1ada33.system.js","./p-a4041773.system.js"],(function(e){"use strict";var t,n,i,s,o,l,r,a,c,d;return{setters:[function(e){t=e.r;n=e.c;i=e.h;s=e.H},function(e){o=e.g},function(){},function(e){l=e.i;r=e.a},function(e){a=e.g},function(e){c=e.V},function(e){d=e.a}],execute:function(){var p='verdocs-send{display:-ms-flexbox;display:flex;padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';var u='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';var f='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var h='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var v='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var x=e("verdocs_send",function(){function e(e){t(this,e);this.send=n(this,"send",7);this.cancel=n(this,"cancel",7);this.sdkError=n(this,"sdkError",7);this.levels=[];this.endpoint=c.getDefault();this.templateId=null;this.template=null;this.pdfUrl=null;this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.recipientsAssigned={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){switch(i.label){case 0:this.sessionContacts=[];i.label=1;case 1:i.trys.push([1,3,,4]);return[4,this.endpoint.loadSession()];case 2:t=i.sent();if((e=t.session)===null||e===void 0?void 0:e.profile){this.sessionContacts.push({id:t.session.profile.id,name:"".concat(t.session.profile.first_name," ").concat(t.session.profile.last_name),email:t.session.profile.email,phone:t.session.profile.phone})}return[3,4];case 3:n=i.sent();console.log("Error loading session",n);return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){switch(i.label){case 0:console.log("[SEND] Showing template",this.templateId);i.label=1;case 1:i.trys.push([1,3,,4]);console.log("[SEND] Loading template ".concat(this.templateId));return[4,o(this.endpoint,this.templateId)];case 2:e=i.sent();console.log("[SEND] Got template",e);this.template=e;if(e===null||e===void 0?void 0:e.roles){t={};e.roles.forEach((function(e){var n=e.sequence-1;t[n]||(t[n]=[]);var i="r-".concat(n,"-").concat(t[n].length);t[n].push(__assign(__assign({},e),{id:i}))}));this.rolesAtLevel=t;this.levels=Object.keys(t).map((function(e){return+e}));this.levels.sort((function(e,t){return e-t}))}return[3,4];case 3:n=i.sent();console.log("[SEND] Error getting template",n);return[3,4];case 4:return[2]}}))}))};e.prototype.getLevelIcon=function(e){if(e<0){return i("div",{class:"level-icon",innerHTML:f})}else if(e>=this.levels.length){return i("div",{class:"level-icon",innerHTML:v})}else{return i("div",{class:"level-icon",innerHTML:h})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.recipientsAssigned[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t;e.stopPropagation();(t=this.send)===null||t===void 0?void 0:t.emit({recipientsAssigned:Object.values(this.recipientsAssigned)})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t,n,o;var c=((n=(t=this.template)===null||t===void 0?void 0:t.roles)===null||n===void 0?void 0:n.map((function(e){return e.name})))||[];var p=Object.values(this.recipientsAssigned).filter((function(e){console.log("valid email",l(e.email),e.email);console.log("valid phone",r(e.phone),e.phone);return l(e.email)||r(e.phone)})).length>=((o=this.template)===null||o===void 0?void 0:o.roles.length);console.log("assigned",p);return i(s,{class:{}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Document")),this.levels.map((function(t){return i("div",{class:"level level-".concat(t)},e.getLevelIcon(t),e.rolesAtLevel[t].map((function(t){var n,s,o;return i("div",{class:"recipient",style:{backgroundColor:a(d(c,t.name))},onClick:function(n){return e.handleClickRole(n,t)}},(s=(n=e.recipientsAssigned[t.id])===null||n===void 0?void 0:n.full_name)!==null&&s!==void 0?s:t.name,i("div",{class:"icon",innerHTML:u}),e.showPickerForId===t.id&&i("verdocs-contact-picker",{onCancel:function(){return e.showPickerForId=""},onNext:function(n){return e.handleSelectContact(n,t)},contactSuggestions:e.sessionContacts,templateRole:(o=e.recipientsAssigned[t.id])!==null&&o!==void 0?o:t,onSearchContacts:function(e){return console.log("Search",e.detail)}}))})))})),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Document Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{label:"Send",size:"small",disabled:!p,onClick:function(t){return e.handleSend(t)}})))};return e}());x.style=p}}}));
2
- //# sourceMappingURL=p-473165ae.system.entry.js.map
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function l(e){try{a(i.next(e))}catch(e){o(e)}}function r(e){try{a(i["throw"](e))}catch(e){o(e)}}function a(e){e.done?n(e.value):s(e.value).then(l,r)}a((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,s,o,l;return l={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function r(e){return function(t){return a([e,t])}}function a(l){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,s&&(o=l[0]&2?s["return"]:l[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,l[1])).done)return o;if(s=0,o)l=[l[0]&2,o.value];switch(l[0]){case 0:case 1:o=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;s=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){n.label=l[1];break}if(l[0]===6&&n.label<o[1]){n.label=o[1];o=l;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(l);break}if(o[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(e){l=[6,e];s=0}finally{i=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};System.register(["./p-97329951.system.js","./p-df878df9.system.js","./p-a7433630.system.js","./p-7efdefa3.system.js","./p-05eb4fed.system.js","./p-1cd2f7dc.system.js","./p-21ec6ff0.system.js"],(function(e){"use strict";var t,n,i,s,o,l,r,a,c,d;return{setters:[function(e){t=e.r;n=e.c;i=e.h;s=e.H},function(e){o=e.g},function(){},function(e){l=e.i;r=e.a},function(e){a=e.g},function(e){c=e.V},function(e){d=e.a}],execute:function(){var p='verdocs-send{display:-ms-flexbox;display:flex;padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';var u='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';var f='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var h='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var v='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var x=e("verdocs_send",function(){function e(e){t(this,e);this.send=n(this,"send",7);this.cancel=n(this,"cancel",7);this.sdkError=n(this,"sdkError",7);this.levels=[];this.endpoint=c.getDefault();this.templateId=null;this.template=null;this.pdfUrl=null;this.containerId="verdocs-send-".concat(Math.random().toString(36).substring(2,11));this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.recipientsAssigned={}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){switch(i.label){case 0:this.sessionContacts=[];i.label=1;case 1:i.trys.push([1,3,,4]);return[4,this.endpoint.loadSession()];case 2:t=i.sent();if((e=t.session)===null||e===void 0?void 0:e.profile){this.sessionContacts.push({id:t.session.profile.id,name:"".concat(t.session.profile.first_name," ").concat(t.session.profile.last_name),email:t.session.profile.email,phone:t.session.profile.phone})}return[3,4];case 3:n=i.sent();console.log("Error loading session",n);return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){switch(i.label){case 0:console.log("[SEND] Showing template",this.templateId);i.label=1;case 1:i.trys.push([1,3,,4]);console.log("[SEND] Loading template ".concat(this.templateId));return[4,o(this.endpoint,this.templateId)];case 2:e=i.sent();console.log("[SEND] Got template",e);this.template=e;if(e===null||e===void 0?void 0:e.roles){t={};e.roles.forEach((function(e){var n=e.sequence-1;t[n]||(t[n]=[]);var i="r-".concat(n,"-").concat(t[n].length);t[n].push(__assign(__assign({},e),{id:i}))}));this.rolesAtLevel=t;this.levels=Object.keys(t).map((function(e){return+e}));this.levels.sort((function(e,t){return e-t}))}return[3,4];case 3:n=i.sent();console.log("[SEND] Error getting template",n);return[3,4];case 4:return[2]}}))}))};e.prototype.getLevelIcon=function(e){if(e<0){return i("div",{class:"level-icon",innerHTML:f})}else if(e>=this.levels.length){return i("div",{class:"level-icon",innerHTML:v})}else{return i("div",{class:"level-icon",innerHTML:h})}};e.prototype.handleSelectContact=function(e,t){e.preventDefault();this.recipientsAssigned[t.id]=__assign(__assign({},t),e.detail);this.showPickerForId=""};e.prototype.handleClickRole=function(e,t){e.stopPropagation();this.showPickerForId=t.id};e.prototype.handleSend=function(e){var t;e.stopPropagation();(t=this.send)===null||t===void 0?void 0:t.emit({recipientsAssigned:Object.values(this.recipientsAssigned)})};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.render=function(){var e=this;var t,n,o;var c=((n=(t=this.template)===null||t===void 0?void 0:t.roles)===null||n===void 0?void 0:n.map((function(e){return e.name})))||[];var p=Object.values(this.recipientsAssigned).filter((function(e){console.log("valid email",l(e.email),e.email);console.log("valid phone",r(e.phone),e.phone);return l(e.email)||r(e.phone)})).length>=((o=this.template)===null||o===void 0?void 0:o.roles.length);console.log("assigned",p);return i(s,{class:{}},i("div",{class:"recipients"},i("div",{class:"left-line"}),i("div",{class:"level level-start"},this.getLevelIcon(-1),i("div",{class:"complete"},"Send Document")),this.levels.map((function(t){return i("div",{class:"level level-".concat(t)},e.getLevelIcon(t),e.rolesAtLevel[t].map((function(t){var n,s,o;return i("div",{class:"recipient",style:{backgroundColor:a(d(c,t.name))},onClick:function(n){return e.handleClickRole(n,t)}},(s=(n=e.recipientsAssigned[t.id])===null||n===void 0?void 0:n.full_name)!==null&&s!==void 0?s:t.name,i("div",{class:"icon",innerHTML:u}),e.showPickerForId===t.id&&i("verdocs-contact-picker",{onCancel:function(){return e.showPickerForId=""},onNext:function(n){return e.handleSelectContact(n,t)},contactSuggestions:e.sessionContacts,templateRole:(o=e.recipientsAssigned[t.id])!==null&&o!==void 0?o:t,onSearchContacts:function(e){return console.log("Search",e.detail)}}))})))})),i("div",{class:"level level-done"},this.getLevelIcon(this.levels.length),i("div",{class:"complete"},"Document Complete"))),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{label:"Send",size:"small",disabled:!p,onClick:function(t){return e.handleSend(t)}})))};return e}());x.style=p}}}));
2
+ //# sourceMappingURL=p-dd864f36.system.entry.js.map
@@ -0,0 +1,2 @@
1
+ System.register(["./p-97329951.system.js"],(function(e){"use strict";var m,a,r,b,t;return{setters:[function(e){m=e.r;a=e.c;r=e.h;b=e.H;t=e.a}],execute:function(){var g="verdocs-document-page{width:100%;position:relative}verdocs-document-page .verdocs-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-document-page .verdocs-document-page-layer.img{max-width:100%}";var i=e("verdocs_document_page",function(){function e(e){m(this,e);this.pageRendered=a(this,"pageRendered",7);this.pageImageUri="";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}e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver((function(m){for(var a=0,r=m;a<r.length;a++){var b=r[a];var t=b.contentRect.width;e.renderedWidth=t;e.renderedHeight=e.virtualHeight*(t/e.virtualWidth)}e.notifyRenderedSize()}));this.resizeObserver.observe(this.container)};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({container:this.container,containerId:this.containerId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,xScale:this.renderedWidth/this.naturalWidth,yScale:this.renderedHeight/this.naturalHeight})};e.prototype.render=function(){var e=this;var m="".concat(this.renderedHeight,"px");return r(b,{id:"".concat(this.containerId),style:{height:m}},this.layers.map((function(a){return a.type==="div"?r("div",{class:"verdocs-document-page-layer",id:"".concat(e.containerId,"-").concat(a.name),style:{height:m}}):r("img",{class:"verdocs-document-page-layer img",id:"".concat(e.containerId,"-").concat(a.name),src:e.pageImageUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,onLoad:function(m){e.naturalWidth=m.target.naturalWidth;e.naturalHeight=m.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight}})})))};Object.defineProperty(e.prototype,"container",{get:function(){return t(this)},enumerable:false,configurable:true});return e}());i.style=g;var o="verdocs-loader{display:block;position:absolute;top:50%;left:50%;margin-left:-20px;margin-top:-20px;font-size:24px;width:24px;height:24px;border-radius:50%;text-indent:-9999em;-webkit-animation:load5 1.1s infinite ease;animation:verdocs-loader-kf 1.1s infinite ease;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}@-webkit-keyframes verdocs-loader-kf{0%,100%{-webkit-box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4)}12.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3)}25%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}37.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}50%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}62.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}75%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}87.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa;box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa}}@keyframes verdocs-loader-kf{0%,100%{-webkit-box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);box-shadow:0em -2.6em 0em 0em #aaaaaa, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4)}12.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em #aaaaaa, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3)}25%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em #aaaaaa, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}37.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em #aaaaaa, 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}50%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4), 0em 2.5em 0 0em #aaaaaa, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}62.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3), 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em #aaaaaa, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}75%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em #aaaaaa, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2)}87.5%{-webkit-box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa;box-shadow:0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2), 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em #aaaaaa}}";var s=e("verdocs_loader",function(){function e(e){m(this,e)}e.prototype.render=function(){return r(b,null)};return e}());s.style=o}}}));
2
+ //# sourceMappingURL=p-e4569806.system.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/components/elements/verdocs-document-page/verdocs-document-page.scss?tag=verdocs-document-page","src/components/elements/verdocs-document-page/verdocs-document-page.tsx","src/components/controls/verdocs-loader/verdocs-loader.scss?tag=verdocs-loader","src/components/controls/verdocs-loader/verdocs-loader.tsx"],"names":["verdocsDocumentPageCss","VerdocsDocumentPage","exports","name","type","concat","Math","random","toString","substring","this","virtualWidth","virtualHeight","class_1","prototype","componentDidLoad","_this","resizeObserver","ResizeObserver","entries","_i","entries_1","length","entry","renderedWidth","contentRect","width","renderedHeight","notifyRenderedSize","observe","container","disconnectedCallback","_a","disconnect","skipFirstNotification","pageRendered","emit","containerId","pageNumber","naturalWidth","naturalHeight","xScale","yScale","render","height","h","Host","id","style","layers","map","layer","class","src","pageImageUri","alt","aria-hidden","onLoad","e","target","aspectRatio","verdocsLoaderCss","VerdocsLoader","class_2"],"mappings":"kKAAA,IAAMA,EAAyB,+SCelBC,EAAmBC,EAAA,wBAAA,gGAOC,mBAMF,oBAME,uBAMC,gBAcD,CAAC,CAACC,KAAM,OAAQC,KAAM,4BAO9B,yBAAAC,OAAyBC,KAAKC,SAASC,SAAS,IAAIC,UAAU,EAAG,wBAEvDC,KAAKC,iCACJD,KAAKE,gCACPF,KAAKC,gCACJD,KAAKE,+BACPF,KAAKC,aAAeD,KAAKE,yCAEvB,KAEjCC,EAAAC,UAAAC,iBAAA,WAAA,IAAAC,EAAAN,KACEA,KAAKO,eAAiB,IAAIC,gBAAe,SAAAC,GACvC,IAAoB,IAAAC,EAAA,EAAAC,EAAAF,EAAAC,EAAAC,EAAAC,OAAAF,IAAS,CAAxB,IAAMG,EAAKF,EAAAD,GACd,IAAMI,EAAgBD,EAAME,YAAYC,MACxCV,EAAKQ,cAAgBA,EACrBR,EAAKW,eAAiBX,EAAKJ,eAAiBY,EAAgBR,EAAKL,cAGnEK,EAAKY,wBAGPlB,KAAKO,eAAeY,QAAQnB,KAAKoB,YAGnCjB,EAAAC,UAAAiB,qBAAA,kBACEC,EAAAtB,KAAKO,kBAAc,MAAAe,SAAA,OAAA,EAAAA,EAAEC,cASvBpB,EAAAC,UAAAc,mBAAA,WAGE,GAAIlB,KAAKwB,sBAAuB,CAC9BxB,KAAKwB,sBAAwB,MAC7B,OAGFxB,KAAKyB,aAAaC,KAAK,CACrBN,UAAWpB,KAAKoB,UAChBO,YAAa3B,KAAK2B,YAClBC,WAAY5B,KAAK4B,WACjB3B,aAAcD,KAAKC,aACnBC,cAAeF,KAAKE,cACpBY,cAAed,KAAKc,cACpBG,eAAgBjB,KAAKiB,eACrBY,aAAc7B,KAAK6B,aACnBC,cAAe9B,KAAK8B,cACpBC,OAAQ/B,KAAKc,cAAgBd,KAAK6B,aAClCG,OAAQhC,KAAKiB,eAAiBjB,KAAK8B,iBAIvC3B,EAAAC,UAAA6B,OAAA,WAAA,IAAA3B,EAAAN,KACE,IAAMkC,EAAS,GAAAvC,OAAGK,KAAKiB,eAAc,MAErC,OACEkB,EAACC,EAAI,CAACC,GAAI,GAAA1C,OAAGK,KAAK2B,aAAeW,MAAO,CAACJ,OAAMA,IAC5ClC,KAAKuC,OAAOC,KAAI,SAAAC,GACf,OAAAA,EAAM/C,OAAS,MACbyC,EAAA,MAAA,CAAKO,MAAM,8BAA8BL,GAAI,GAAA1C,OAAGW,EAAKqB,YAAW,KAAAhC,OAAI8C,EAAMhD,MAAQ6C,MAAO,CAACJ,OAAMA,KAEhGC,EAAA,MAAA,CACEO,MAAM,kCACNL,GAAI,GAAA1C,OAAGW,EAAKqB,YAAW,KAAAhC,OAAI8C,EAAMhD,MACjCkD,IAAKrC,EAAKsC,aACVC,IAAK,QAAAlD,OAAQW,EAAKsB,YAAYkB,cACjB,KACbC,OAAQ,SAACC,GACP1C,EAAKuB,aAAemB,EAAEC,OAAOpB,aAC7BvB,EAAKwB,cAAgBkB,EAAEC,OAAOnB,cAC9BxB,EAAK4C,YAAc5C,EAAKuB,aAAevB,EAAKwB,kJAzH5B,cCfhC,IAAMqB,EAAmB,gqUCUZC,EAAa5D,EAAA,iBAAA,mCACxB6D,EAAAjD,UAAA6B,OAAA,WACE,OAAOE,EAACC,EAAI,gBAFU","sourcesContent":["@import '../../../theme.scss';\n\nverdocs-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-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 max-width: 100%;\n }\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\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-document-page',\n styleUrl: 'verdocs-document-page.scss',\n shadow: false,\n})\nexport class VerdocsDocumentPage {\n @Element() container: HTMLElement;\n private resizeObserver: ResizeObserver;\n\n /**\n * The URL of the image to render as the page background.\n */\n @Prop() pageImageUri: string = '';\n\n /**\n * The page number being rendered. Not used internally, but included in callbacks/events beacuse page numbers\n * are used everywhere in document handling. (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() 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\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\n @State() skipFirstNotification = true;\n\n componentDidLoad(): void {\n this.resizeObserver = new ResizeObserver(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 });\n\n this.resizeObserver.observe(this.container);\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n }\n\n // Left here for documentation purposes in case we find an edge case where this isn't true. But we apparently don't need this.\n // When we add the resize observer it will always be triggered at least once so notifying here as well is just a dupe.\n // componentDidRender() {\n // this.notifyRenderedSize();\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 this.pageRendered.emit({\n container: this.container,\n containerId: this.containerId,\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 xScale: this.renderedWidth / this.naturalWidth,\n yScale: this.renderedHeight / this.naturalHeight,\n });\n }\n\n render() {\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}} />\n ) : (\n <img\n class=\"verdocs-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageImageUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n onLoad={(e: any) => {\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n }}\n />\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-loader {\n display: block;\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -20px;\n margin-top: -20px;\n font-size: 24px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n text-indent: -9999em;\n -webkit-animation: load5 1.1s infinite ease;\n animation: verdocs-loader-kf 1.1s infinite ease;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n}\n\n@keyframes verdocs-loader-kf {\n 0%,\n 100% {\n box-shadow: 0em -2.6em 0em 0em $verdocs-bg-2, 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.3), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4);\n }\n 12.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.4), 1.8em -1.8em 0 0em $verdocs-bg-2, 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3);\n }\n 25% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.3), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.4), 2.5em 0em 0 0em $verdocs-bg-2, 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 37.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.3), 2.5em 0em 0 0em rgba(0, 0, 0, 0.4), 1.75em 1.75em 0 0em $verdocs-bg-2,\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 50% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.3), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.4),\n 0em 2.5em 0 0em $verdocs-bg-2, -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.2), -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 62.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.3),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.4), -1.8em 1.8em 0 0em $verdocs-bg-2, -2.6em 0em 0 0em rgba(0, 0, 0, 0.2), -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 75% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.3), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.4), -2.6em 0em 0 0em $verdocs-bg-2, -1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2);\n }\n 87.5% {\n box-shadow: 0em -2.6em 0em 0em rgba(0, 0, 0, 0.2), 1.8em -1.8em 0 0em rgba(0, 0, 0, 0.2), 2.5em 0em 0 0em rgba(0, 0, 0, 0.2), 1.75em 1.75em 0 0em rgba(0, 0, 0, 0.2),\n 0em 2.5em 0 0em rgba(0, 0, 0, 0.2), -1.8em 1.8em 0 0em rgba(0, 0, 0, 0.3), -2.6em 0em 0 0em rgba(0, 0, 0, 0.4), -1.8em -1.8em 0 0em $verdocs-bg-2;\n }\n}\n","import {Component, h, Host} from '@stencil/core';\n\n/**\n * Animated loader placeholder. There are currently no configuration options for this control.\n */\n@Component({\n tag: 'verdocs-loader',\n styleUrl: 'verdocs-loader.scss',\n shadow: false,\n})\nexport class VerdocsLoader {\n render() {\n return <Host />;\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as o,h as i,H as s}from"./p-ff1278ed.js";import"./p-8efc9749.js";import{V as r}from"./p-becd8d7e.js";import{r as n,a as t}from"./p-92b0fc42.js";import{s as a}from"./p-cb7d9ff5.js";import{l as d}from"./p-0a3d0ca9.js";import{S as l}from"./p-7a1b2643.js";import"./p-5ea05a1d.js";import"./p-d534fffb.js";const p='verdocs-preview{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-preview div,verdocs-preview canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';const c=class{constructor(i){e(this,i);this.sdkError=o(this,"sdkError",7);this.endpoint=r.getDefault();this.templateId=null}async componentDidLoad(){var e,o,i;this.endpoint.loadSession();if(!this.templateId){console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);return}try{console.log(`[PREVIEW] Loading template ${this.templateId}`);await d(this.endpoint,this.templateId)}catch(s){console.log("[PREVIEW] Error loading template",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(s.message,(o=s.response)===null||o===void 0?void 0:o.status,(i=s.response)===null||i===void 0?void 0:i.data))}}async handleFieldChange(e,o,i){console.log("[PREVIEW] handleFieldChange",e,o,i)}handlePageRendered(e){const o=e.detail;console.log("[PREVIEW] Page rendered",o);const i=a.fields.filter((e=>e.page_sequence===o.renderedPage.pageNumber));console.log("[PREVIEW] Fields on page",i);i.forEach((e=>n(e,o.renderedPage,t(a.roleNames,e.role_name),this.handleFieldChange,true)))}render(){if(a.loading||!a.template){return i(s,null,i("verdocs-loader",null))}const e=[...a.template.pages];e.sort(((e,o)=>e.sequence-o.sequence));return i(s,null,e.map((e=>{console.log("rendering page",e);return i("verdocs-document-page",{pageImageUri:e.display_uri,virtualWidth:612,virtualHeight:792,pageNumber:e.sequence,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}};c.style=p;export{c as verdocs_preview};
2
+ //# sourceMappingURL=p-e4fa4969.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["src/components/embeds/verdocs-preview/verdocs-preview.scss?tag=verdocs-preview","src/components/embeds/verdocs-preview/verdocs-preview.tsx"],"names":["verdocsPreviewCss","VerdocsPreview","VerdocsEndpoint","getDefault","[object Object]","this","endpoint","loadSession","templateId","console","log","loadTemplate","e","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","field","optionId","pageInfo","detail","fields","TemplateStore","filter","page_sequence","renderedPage","pageNumber","forEach","renderDocumentField","getRoleIndex","roleNames","role_name","handleFieldChange","loading","template","h","Host","pages","sort","a","b","sequence","map","page","pageImageUri","display_uri","virtualWidth","virtualHeight","onPageRendered","handlePageRendered","layers","name","type"],"mappings":"4TAAA,MAAMA,EAAoB,0bCoBbC,EAAc,gFAIWC,EAAgBC,6BAKhB,KASpCC,mCACEC,KAAKC,SAASC,cAEd,IAAKF,KAAKG,WAAY,CACpBC,QAAQC,IAAI,0CAA0CL,KAAKG,cAC3D,OAGF,IACEC,QAAQC,IAAI,8BAA8BL,KAAKG,oBACzCG,EAAaN,KAAKC,SAAUD,KAAKG,YACvC,MAAOI,GACPH,QAAQC,IAAI,mCAAoCE,IAChDC,EAAAR,KAAKS,YAAQ,MAAAD,SAAA,OAAA,EAAAA,EAAEE,KAAK,IAAIC,EAASJ,EAAEK,SAASC,EAAAN,EAAEO,YAAQ,MAAAD,SAAA,OAAA,EAAAA,EAAEE,QAAQC,EAAAT,EAAEO,YAAQ,MAAAE,SAAA,OAAA,EAAAA,EAAEC,QAIhFlB,wBAAwBmB,EAAuBX,EAAQY,GACrDf,QAAQC,IAAI,8BAA+Ba,EAAOX,EAAGY,GAGvDpB,mBAAmBQ,GACjB,MAAMa,EAAWb,EAAEc,OACnBjB,QAAQC,IAAI,0BAA2Be,GAEvC,MAAME,EAASC,EAAcD,OAAOE,QAAON,GAASA,EAAMO,gBAAkBL,EAASM,aAAaC,aAClGvB,QAAQC,IAAI,2BAA4BiB,GACxCA,EAAOM,SAAQV,GAASW,EAAoBX,EAAOE,EAASM,aAAcI,EAAaP,EAAcQ,UAAWb,EAAMc,WAAYhC,KAAKiC,kBAAmB,QAG5JlC,SAEE,GAAIwB,EAAcW,UAAYX,EAAcY,SAAU,CACpD,OACEC,EAACC,EAAI,KACHD,EAAA,iBAAA,OAKN,MAAME,EAAQ,IAAIf,EAAcY,SAASG,OACzCA,EAAMC,MAAK,CAACC,EAAGC,IAAMD,EAAEE,SAAWD,EAAEC,WAEpC,OACEN,EAACC,EAAI,KACFC,EAAMK,KAAIC,IACTxC,QAAQC,IAAI,iBAAkBuC,GAC9B,OACER,EAAA,wBAAA,CACES,aAAcD,EAAKE,YACnBC,aAAc,IACdC,cAAe,IACfrB,WAAYiB,EAAKF,SACjBO,eAAgB1C,GAAKP,KAAKkD,mBAAmB3C,GAC7C4C,OAAQ,CACN,CAACC,KAAM,OAAQC,KAAM,UACrB,CAACD,KAAM,WAAYC,KAAM","sourcesContent":["@import '../../../theme.scss';\n\nverdocs-preview {\n font-family: $verdocs-primary-font;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n min-height: 200px;\n position: relative;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n\n div,\n canvas {\n box-sizing: border-box;\n }\n}\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, Prop, h} from '@stencil/core';\nimport {Event, EventEmitter, Host} from '@stencil/core';\nimport {ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {getRoleIndex, renderDocumentField} from '../../../utils/utils';\nimport {IPageRenderEvent} from '../verdocs-view/verdocs-view';\nimport TemplateStore from '../../../utils/templateStore';\nimport {loadTemplate} from '../../../utils/Templates';\nimport {SDKError} from '../../../utils/errors';\n\n/**\n * Display a template preview experience. This will display the template's attached\n * documents with signing fields overlaid on each page. Fields will be color-coded\n * by recipient, and will be read-only (cannot be filled, moved, or altered).\n */\n@Component({\n tag: 'verdocs-preview',\n styleUrl: 'verdocs-preview.scss',\n shadow: false,\n})\nexport class VerdocsPreview {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The ID of the template to create the document from.\n */\n @Prop() templateId: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n // TODO: Move to state store so we can load this one time\n async componentDidLoad() {\n this.endpoint.loadSession();\n\n if (!this.templateId) {\n console.log(`[PREVIEW] Missing required template ID ${this.templateId}`);\n return;\n }\n\n try {\n console.log(`[PREVIEW] Loading template ${this.templateId}`);\n await loadTemplate(this.endpoint, this.templateId);\n } catch (e) {\n console.log('[PREVIEW] Error loading template', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n async handleFieldChange(field: ITemplateField, e: any, optionId?: string) {\n console.log('[PREVIEW] handleFieldChange', field, e, optionId);\n }\n\n handlePageRendered(e) {\n const pageInfo = e.detail as IPageRenderEvent;\n console.log('[PREVIEW] Page rendered', pageInfo);\n\n const fields = TemplateStore.fields.filter(field => field.page_sequence === pageInfo.renderedPage.pageNumber);\n console.log('[PREVIEW] Fields on page', fields);\n fields.forEach(field => renderDocumentField(field, pageInfo.renderedPage, getRoleIndex(TemplateStore.roleNames, field.role_name), this.handleFieldChange, true));\n }\n\n render() {\n // TODO: Render a better error\n if (TemplateStore.loading || !TemplateStore.template) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n const pages = [...TemplateStore.template.pages];\n pages.sort((a, b) => a.sequence - b.sequence);\n\n return (\n <Host>\n {pages.map(page => {\n console.log('rendering page', page);\n return (\n <verdocs-document-page\n pageImageUri={page.display_uri}\n virtualWidth={612}\n virtualHeight={792}\n pageNumber={page.sequence}\n onPageRendered={e => this.handlePageRendered(e)}\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as e,c as i,h as s,H as o}from"./p-ff1278ed.js";import{g as t}from"./p-d534fffb.js";import"./p-8efc9749.js";import{i as l,a as n}from"./p-e662f81b.js";import{g as d}from"./p-6de76553.js";import{V as a}from"./p-629237fc.js";import{a as c}from"./p-7ce27ce2.js";const r='verdocs-send{display:-ms-flexbox;display:flex;padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';const p='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';const x='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';const h='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';const v='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';const f=class{constructor(s){e(this,s);this.send=i(this,"send",7);this.cancel=i(this,"cancel",7);this.sdkError=i(this,"sdkError",7);this.levels=[];this.endpoint=a.getDefault();this.templateId=null;this.template=null;this.pdfUrl=null;this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`;this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.recipientsAssigned={}}async componentWillLoad(){var e;this.sessionContacts=[];try{const i=await this.endpoint.loadSession();if((e=i.session)===null||e===void 0?void 0:e.profile){this.sessionContacts.push({id:i.session.profile.id,name:`${i.session.profile.first_name} ${i.session.profile.last_name}`,email:i.session.profile.email,phone:i.session.profile.phone})}}catch(e){console.log("Error loading session",e)}}async componentDidLoad(){console.log("[SEND] Showing template",this.templateId);try{console.log(`[SEND] Loading template ${this.templateId}`);const e=await t(this.endpoint,this.templateId);console.log("[SEND] Got template",e);this.template=e;if(e===null||e===void 0?void 0:e.roles){const i={};e.roles.forEach((e=>{const s=e.sequence-1;i[s]||(i[s]=[]);const o=`r-${s}-${i[s].length}`;i[s].push({...e,id:o})}));this.rolesAtLevel=i;this.levels=Object.keys(i).map((e=>+e));this.levels.sort(((e,i)=>e-i))}}catch(e){console.log("[SEND] Error getting template",e)}}getLevelIcon(e){if(e<0){return s("div",{class:"level-icon",innerHTML:x})}else if(e>=this.levels.length){return s("div",{class:"level-icon",innerHTML:v})}else{return s("div",{class:"level-icon",innerHTML:h})}}handleSelectContact(e,i){e.preventDefault();this.recipientsAssigned[i.id]={...i,...e.detail};this.showPickerForId=""}handleClickRole(e,i){e.stopPropagation();this.showPickerForId=i.id}handleSend(e){var i;e.stopPropagation();(i=this.send)===null||i===void 0?void 0:i.emit({recipientsAssigned:Object.values(this.recipientsAssigned)})}handleCancel(e){var i;e.stopPropagation();(i=this.cancel)===null||i===void 0?void 0:i.emit()}render(){var e,i,t;const a=((i=(e=this.template)===null||e===void 0?void 0:e.roles)===null||i===void 0?void 0:i.map((e=>e.name)))||[];const r=Object.values(this.recipientsAssigned).filter((e=>{console.log("valid email",l(e.email),e.email);console.log("valid phone",n(e.phone),e.phone);return l(e.email)||n(e.phone)})).length>=((t=this.template)===null||t===void 0?void 0:t.roles.length);console.log("assigned",r);return s(o,{class:{}},s("div",{class:"recipients"},s("div",{class:"left-line"}),s("div",{class:`level level-start`},this.getLevelIcon(-1),s("div",{class:"complete"},"Send Document")),this.levels.map((e=>s("div",{class:`level level-${e}`},this.getLevelIcon(e),this.rolesAtLevel[e].map((e=>{var i,o,t;return s("div",{class:"recipient",style:{backgroundColor:d(c(a,e.name))},onClick:i=>this.handleClickRole(i,e)},(o=(i=this.recipientsAssigned[e.id])===null||i===void 0?void 0:i.full_name)!==null&&o!==void 0?o:e.name,s("div",{class:"icon",innerHTML:p}),this.showPickerForId===e.id&&s("verdocs-contact-picker",{onCancel:()=>this.showPickerForId="",onNext:i=>this.handleSelectContact(i,e),contactSuggestions:this.sessionContacts,templateRole:(t=this.recipientsAssigned[e.id])!==null&&t!==void 0?t:e,onSearchContacts:e=>console.log("Search",e.detail)}))}))))),s("div",{class:`level level-done`},this.getLevelIcon(this.levels.length),s("div",{class:"complete"},"Document Complete"))),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e)}),s("verdocs-button",{label:"Send",size:"small",disabled:!r,onClick:e=>this.handleSend(e)})))}};f.style=r;export{f as verdocs_send};
2
- //# sourceMappingURL=p-932571a1.entry.js.map
1
+ import{r as e,c as i,h as s,H as o}from"./p-ff1278ed.js";import{g as t}from"./p-d534fffb.js";import"./p-8efc9749.js";import{i as l,a as n}from"./p-e662f81b.js";import{g as d}from"./p-6de76553.js";import{V as a}from"./p-becd8d7e.js";import{a as c}from"./p-92b0fc42.js";const r='verdocs-send{display:-ms-flexbox;display:flex;padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid #97979744}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:#00000089}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}';const p='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';const x='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';const h='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';const v='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';const f=class{constructor(s){e(this,s);this.send=i(this,"send",7);this.cancel=i(this,"cancel",7);this.sdkError=i(this,"sdkError",7);this.levels=[];this.endpoint=a.getDefault();this.templateId=null;this.template=null;this.pdfUrl=null;this.containerId=`verdocs-send-${Math.random().toString(36).substring(2,11)}`;this.rolesAtLevel={};this.showPickerForId="";this.sessionContacts=[];this.recipientsAssigned={}}async componentWillLoad(){var e;this.sessionContacts=[];try{const i=await this.endpoint.loadSession();if((e=i.session)===null||e===void 0?void 0:e.profile){this.sessionContacts.push({id:i.session.profile.id,name:`${i.session.profile.first_name} ${i.session.profile.last_name}`,email:i.session.profile.email,phone:i.session.profile.phone})}}catch(e){console.log("Error loading session",e)}}async componentDidLoad(){console.log("[SEND] Showing template",this.templateId);try{console.log(`[SEND] Loading template ${this.templateId}`);const e=await t(this.endpoint,this.templateId);console.log("[SEND] Got template",e);this.template=e;if(e===null||e===void 0?void 0:e.roles){const i={};e.roles.forEach((e=>{const s=e.sequence-1;i[s]||(i[s]=[]);const o=`r-${s}-${i[s].length}`;i[s].push({...e,id:o})}));this.rolesAtLevel=i;this.levels=Object.keys(i).map((e=>+e));this.levels.sort(((e,i)=>e-i))}}catch(e){console.log("[SEND] Error getting template",e)}}getLevelIcon(e){if(e<0){return s("div",{class:"level-icon",innerHTML:x})}else if(e>=this.levels.length){return s("div",{class:"level-icon",innerHTML:v})}else{return s("div",{class:"level-icon",innerHTML:h})}}handleSelectContact(e,i){e.preventDefault();this.recipientsAssigned[i.id]={...i,...e.detail};this.showPickerForId=""}handleClickRole(e,i){e.stopPropagation();this.showPickerForId=i.id}handleSend(e){var i;e.stopPropagation();(i=this.send)===null||i===void 0?void 0:i.emit({recipientsAssigned:Object.values(this.recipientsAssigned)})}handleCancel(e){var i;e.stopPropagation();(i=this.cancel)===null||i===void 0?void 0:i.emit()}render(){var e,i,t;const a=((i=(e=this.template)===null||e===void 0?void 0:e.roles)===null||i===void 0?void 0:i.map((e=>e.name)))||[];const r=Object.values(this.recipientsAssigned).filter((e=>{console.log("valid email",l(e.email),e.email);console.log("valid phone",n(e.phone),e.phone);return l(e.email)||n(e.phone)})).length>=((t=this.template)===null||t===void 0?void 0:t.roles.length);console.log("assigned",r);return s(o,{class:{}},s("div",{class:"recipients"},s("div",{class:"left-line"}),s("div",{class:`level level-start`},this.getLevelIcon(-1),s("div",{class:"complete"},"Send Document")),this.levels.map((e=>s("div",{class:`level level-${e}`},this.getLevelIcon(e),this.rolesAtLevel[e].map((e=>{var i,o,t;return s("div",{class:"recipient",style:{backgroundColor:d(c(a,e.name))},onClick:i=>this.handleClickRole(i,e)},(o=(i=this.recipientsAssigned[e.id])===null||i===void 0?void 0:i.full_name)!==null&&o!==void 0?o:e.name,s("div",{class:"icon",innerHTML:p}),this.showPickerForId===e.id&&s("verdocs-contact-picker",{onCancel:()=>this.showPickerForId="",onNext:i=>this.handleSelectContact(i,e),contactSuggestions:this.sessionContacts,templateRole:(t=this.recipientsAssigned[e.id])!==null&&t!==void 0?t:e,onSearchContacts:e=>console.log("Search",e.detail)}))}))))),s("div",{class:`level level-done`},this.getLevelIcon(this.levels.length),s("div",{class:"complete"},"Document Complete"))),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",size:"small",variant:"outline",onClick:e=>this.handleCancel(e)}),s("verdocs-button",{label:"Send",size:"small",disabled:!r,onClick:e=>this.handleSend(e)})))}};f.style=r;export{f as verdocs_send};
2
+ //# sourceMappingURL=p-f19e600e.entry.js.map