@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":["node_modules/@verdocs/js-sdk/Envelopes/Recipients.js","src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"names":["__assign","this","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","Promise","reject","fulfilled","step","next","e","rejected","result","done","then","__generator","body","_","label","sent","trys","ops","f","y","g","verb","throw","return","Symbol","iterator","v","op","TypeError","pop","push","updateRecipientStatus","endpoint","envelopeId","roleName","action","params","_a","api","put","concat","role_name","r","data","verdocsSignCss","VerdocsSign","exports","class_1","componentDidLoad","sdkError","emit","SDKError","roleId","_b","inviteCode","_c","VerdocsEndpoint","sessionType","console","log","Envelopes.getSigningSession","_o","_p","session","recipient","signerToken","email","profile_id","setToken","agreed","nextButtonLabel","Envelopes.getEnvelope","envelope","recipientIndex","recipients","findIndex","_this","fields","filter","field","recipient_role","e_1","_d","message","_e","response","status","_f","handleClickAgree","catch","savePDF","fileName","name","updated_at","split","Envelopes.getEnvelopeFile","envelope_document_id","xhr","XMLHttpRequest","responseType","onload","a","document","createElement","href","window","URL","createObjectURL","download","style","display","appendChild","click","remove","url","open","send","handleOptionSelected","detail","id","alert","handleFieldChange","optionId","type","Envelopes.updateEnvelopeField","prepared","error","options","checked","settings","map","option","selected","renderCheckboxGroupOption","page","left","rescale","xScale","x","bottom","yScale","position","transform","backgroundColor","getRGBA","h","onChange","renderRadioGroupOption","onFieldChange","isFieldValid","validator","isValidEmail","isValidPhone","_h","_g","_j","minimum_checked","_k","maximum_checked","_m","_l","handleNext","requiredFields","required","focusedIndex","focusedField","nextFocusedIndex","nextRequiredField","getFieldId","el","getElementById","focusField","renderField","docPage","controlsDiv","containerId","existingField","setControlStyles","setAttribute","addEventListener","handlePageRendered","pageInfo","TemplateStore","page_sequence","renderedPage","pageNumber","forEach","renderDocumentField","getRoleIndex","roleNames","render","Host","menuOptions","disabled","class","onOptionSelected","htmlFor","flex","size","onClick","documents","envelopeDocument","pages","__spreadArray","sort","b","sequence","Fragment","pageImageUri","display_uri","virtualWidth","virtualHeight","onPageRendered","layers"],"mappings":"2xEAAA,IAAIA,EAAYC,WAAQA,UAAKD,UAAa,WACtCA,EAAWE,OAAOC,QAAU,SAASC,GACjC,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAAK,CACjDD,EAAIG,UAAUF,GACd,IAAK,IAAII,KAAKL,EAAG,GAAIH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,GACzDN,EAAEM,GAAKL,EAAEK,GAEjB,OAAON,GAEX,OAAOJ,EAASc,MAAMb,KAAMO,YAEhC,IAAIO,EAAad,WAAQA,UAAKc,WAAc,SAAUC,EAASC,EAAYC,EAAGC,GAC1E,SAASC,EAAMC,GAAS,OAAOA,aAAiBH,EAAIG,EAAQ,IAAIH,GAAE,SAAUI,GAAWA,EAAQD,MAC/F,OAAO,IAAKH,IAAMA,EAAIK,WAAU,SAAUD,EAASE,GAC/C,SAASC,EAAUJ,GAAS,IAAMK,EAAKP,EAAUQ,KAAKN,IAAW,MAAOO,GAAKJ,EAAOI,IACpF,SAASC,EAASR,GAAS,IAAMK,EAAKP,EAAU,SAASE,IAAW,MAAOO,GAAKJ,EAAOI,IACvF,SAASF,EAAKI,GAAUA,EAAOC,KAAOT,EAAQQ,EAAOT,OAASD,EAAMU,EAAOT,OAAOW,KAAKP,EAAWI,GAClGH,GAAMP,EAAYA,EAAUL,MAAME,EAASC,GAAc,KAAKU,YAGtE,IAAIM,EAAehC,WAAQA,UAAKgC,aAAgB,SAAUjB,EAASkB,GAC/D,IAAIC,EAAI,CAAEC,MAAO,EAAGC,KAAM,WAAa,GAAIjC,EAAE,GAAK,EAAG,MAAMA,EAAE,GAAI,OAAOA,EAAE,IAAOkC,KAAM,GAAIC,IAAK,IAAMC,EAAGC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A,QAAA,CAAOmD,QAAQ,4BAEjBnD,EAAA,OAAA,KAAA,sDAGFA,EAAA,MAAA,CAAKpC,MAAO,CAACwF,KAAM,OAErBpD,EAAA,iBAAA,CAAgBqD,KAAK,QAAQxL,MAAOnC,KAAK2F,gBAAiB2H,YAAW1I,EAAA5E,KAAKqF,aAAS,MAAAT,SAAA,OAAA,EAAAA,EAAEc,QAAQkI,QAAS,WAAM,OAAA3H,EAAKqF,uBAMvH/E,EAAAvG,KAAKqF,aAAS,MAAAkB,SAAA,OAAA,EAAAA,EAAEb,QAAS4E,EAAA,MAAA,CAAKiD,MAAM,UAAajD,EAAA,MAAA,CAAKpC,MAAO,CAACC,QAAS,UAEzEmC,EAAA,MAAA,CAAKiD,MAAM,YACTjD,EAAA,MAAA,CAAKiD,MAAM,YACP9G,EAAAzG,KAAK6F,YAAQ,MAAAY,SAAA,OAAA,EAAAA,EAAEoH,YAAa,IAAItE,KAAI,SAAAuE,GACpC,IAAMC,EAAKC,cAAA,IAAQF,IAAgB,MAAhBA,SAAgB,OAAA,EAAhBA,EAAkBC,QAAS,GAAG,MACjDA,EAAME,MAAK,SAACvG,EAAGwG,GAAM,OAAAxG,EAAEyG,SAAWD,EAAEC,YAEpC,OACE7D,EAAC8D,EAAQ,KACNL,EAAMxE,KAAI,SAAAI,GAAI,OACbW,EAAA,wBAAA,CACE+D,aAAc1E,EAAK2E,YACnBC,aAAc,IACdC,cAAe,IACf1B,WAAYnD,EAAKwE,SACjBM,eAAgB,SAAA9M,GAAK,OAAAsE,EAAKwG,mBAAmB9K,IAC7C+M,OAAQ,CACN,CAACzH,KAAM,OAAQ+B,KAAM,UACrB,CAAC/B,KAAM,WAAY+B,KAAM,8BAlezB","sourcesContent":["var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __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};\n/**\n * Update a recipient's status block\n */\nexport var updateRecipientStatus = function (endpoint, envelopeId, roleName, action, params) { 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, \"/recipients/\").concat(roleName), __assign({ role_name: roleName, action: action }, (params || {})))\n .then(function (r) { return r.data; })];\n });\n}); };\nexport var getSignerToken = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"/signer-token\"))\n .then(function (r) { return r.data; });\n};\nexport var getInPersonLink = function (endpoint, envelopeId, roleName) {\n return endpoint.api //\n .get(\"/envelopes/\".concat(envelopeId, \"/recipients/\").concat(encodeURIComponent(roleName), \"?in_person_link=true\"))\n .then(function (r) { return r.data; });\n};\n","@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n box-sizing: border-box;\n }\n\n .header {\n flex: 0;\n display: flex;\n z-index: 1000;\n align-items: center;\n transition: all 0.25s;\n justify-content: center;\n background-color: $medium-bg;\n box-shadow: 0 4px 4px 0 rgb(0 0 0 / 24%), 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .intro {\n width: 100%;\n height: 60px;\n display: flex;\n background: #ffffff;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n .inner {\n width: 100%;\n color: #111111;\n padding: 0 14px;\n font-size: 20px;\n font-weight: 500;\n line-height: 28px;\n max-width: 1024px;\n }\n }\n\n &.agreed {\n .intro {\n //display: none;\n }\n }\n\n .toolbar {\n width: 100%;\n margin: 0 auto;\n padding: 0 14px;\n position: relative;\n }\n\n .tools {\n width: 100%;\n color: #fff;\n height: 56px;\n display: flex;\n font-size: 12px;\n align-items: center;\n flex-direction: row;\n background-color: $medium-bg;\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 999;\n position: absolute;\n background: rgba(0, 0, 0, 0.5);\n }\n\n .document {\n flex: 1;\n height: 100%;\n display: flex;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n flex-direction: column;\n justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .agree {\n flex: 1;\n flex-direction: row;\n display: flex;\n align-items: center;\n margin-right: 10px;\n\n .intro {\n display: none;\n }\n\n .header {\n flex: 0 0 56px;\n }\n\n .agree-checkbox {\n background: #ccc;\n flex: 0 0 20px;\n display: flex;\n width: 20px;\n height: 20px;\n border-radius: 3px;\n position: relative;\n margin: 0 10px 0 14px;\n\n input[type='checkbox']:checked + label:after {\n filter: alpha(opacity=100);\n opacity: 1;\n }\n\n label {\n left: 2px;\n top: 2px;\n width: 16px;\n height: 16px;\n cursor: pointer;\n position: absolute;\n background: #33354c;\n box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.8);\n\n .agree-checkbox label:hover::after {\n filter: alpha(opacity=30);\n opacity: 0.3;\n }\n\n &:after {\n top: 2px;\n left: 3px;\n width: 8px;\n opacity: 0;\n height: 5px;\n content: '';\n position: absolute;\n background: transparent;\n filter: alpha(opacity=0);\n transform: rotate(-45deg);\n border: 2px solid #fcfff4;\n border-top: none;\n border-right: none;\n }\n }\n }\n }\n}\n","// import interact from 'interactjs';\nimport {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Envelopes} from '@verdocs/js-sdk/Envelopes';\nimport {getRGBA} from '@verdocs/js-sdk/Utils/Colors';\nimport {rescale} from '@verdocs/js-sdk/Utils/Fields';\nimport {updateRecipientStatus} from '@verdocs/js-sdk/Envelopes/Recipients';\nimport {isValidEmail, isValidPhone} from '@verdocs/js-sdk/Templates/Validators';\nimport {IEnvelope, IDocumentField, IRecipient} from '@verdocs/js-sdk/Envelopes/Types';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {getFieldId, getRoleIndex, renderDocumentField, setControlStyles} from '../../../utils/utils';\n// import {getFieldId, getRoleIndex, renderDocumentField, setControlStyles, updateCssTransform} from '../../../utils/utils';\nimport {IPageRenderEvent} from '../verdocs-view/verdocs-view';\nimport TemplateStore from '../../../utils/templateStore';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {SDKError} from '../../../utils/errors';\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n endpoint: VerdocsEndpoint = null;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop() envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop() roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop() inviteCode: 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 /**\n * Event fired when any field is updated. Note that the current active endpoint is\n * provided as a parameter as a convenience for callers when this coimponent\n */\n @Event({composed: true}) fieldUpdated: EventEmitter<{endpoint: VerdocsEndpoint}>;\n\n @State() recipient: IRecipient | null = null;\n @State() signerToken = null;\n @State() recipientIndex: number = -1;\n @State() envelope: IEnvelope | null = null;\n @State() fields: IDocumentField[] = [];\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() focusedField = '';\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n const {session, recipient, signerToken} = await Envelopes.getSigningSession(this.endpoint, {\n envelopeId: this.envelopeId,\n roleId: this.roleId,\n inviteCode: this.inviteCode,\n });\n\n console.log(`[SIGN] Loaded signing session ${session.email} / ${session.profile_id}`);\n\n this.recipient = recipient;\n this.signerToken = signerToken;\n this.endpoint.setToken(signerToken);\n\n if (this.recipient.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n const envelope = await Envelopes.getEnvelope(this.endpoint, this.envelopeId);\n this.envelope = envelope;\n console.log('[SIGN] Loaded envelope', envelope);\n\n this.recipientIndex = this.envelope.recipients.findIndex(recipient => recipient.role_name == this.roleId);\n if (this.recipientIndex > -1) {\n console.log('Found recipient', this.envelope.recipients[this.recipientIndex]);\n }\n\n this.fields = this.envelope.fields.filter(field => field.recipient_role === this.roleId);\n console.log('Loaded fields', this.fields);\n\n // TODO: Fix service to allow this?\n // const sigs = await getSignatures();\n // console.log('sigs', sigs);\n } catch (e) {\n console.log('Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleClickAgree() {\n console.log('agree clicked');\n updateRecipientStatus(this.endpoint, this.envelopeId, this.roleId, 'update', {agreed: true})\n .then(r => {\n console.log('update result', r);\n this.nextButtonLabel = 'Next';\n this.recipient = r;\n })\n .catch(e => {\n console.log('update failure', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async savePDF() {\n const fileName = `${this.envelope.name} - ${this.envelope.updated_at.split('T')[0]}.pdf`;\n const data = await Envelopes.getEnvelopeFile(this.endpoint, this.envelopeId, this.envelope.envelope_document_id);\n\n // This is better in React than doing window.href= or similar to trigger a download. For a description of the technique\n // see https://stackoverflow.com/questions/8126623/downloading-canvas-element-to-an-image\n let xhr = new XMLHttpRequest();\n xhr.responseType = 'blob';\n xhr.onload = function () {\n let a = document.createElement('a');\n a.href = window.URL.createObjectURL(xhr.response);\n a.download = fileName;\n a.style.display = 'none';\n document.body.appendChild(a);\n a.click();\n a.remove();\n };\n\n const url = `data:application/pdf;base64,${data}`;\n console.log('url', url.length, url);\n xhr.open('GET', `data:application/pdf;base64,${data}`);\n xhr.send();\n }\n\n async handleOptionSelected(e) {\n switch (e.detail.id) {\n case 'later':\n // this.router.navigate([`view/sign/${this.envelopeId}/role/${this.roleName}/saved`]);\n if (!window?.['STORYBOOK_ENV']) {\n window.alert('User intends to sign later.');\n }\n break;\n case 'claim':\n break;\n case 'decline':\n break;\n case 'print':\n break;\n case 'download':\n this.savePDF().catch(() => {});\n break;\n }\n }\n\n async handleFieldChange(field: IDocumentField, e: any, optionId?: string) {\n console.log('fieldChange', field, e);\n switch (field.type) {\n case 'textbox':\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, field.name, {prepared: false, value: e.detail})\n .then(r => console.log('Update result', r))\n .catch(e => {\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n console.log('jwt expired');\n }\n console.log('Error updating', e);\n });\n break;\n\n case 'checkbox_group':\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, field.name, {prepared: false, value: {options: [{id: optionId, checked: e.detail}]}})\n .then(r => console.log('Update result', r))\n .catch(e => {\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n console.log('Error updating', e);\n });\n break;\n\n case 'radio_button_group':\n const options = field.settings.options.map(option => ({id: option.id, selected: optionId === option.id}));\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, field.name, {prepared: false, value: {options}})\n .then(r => console.log('Update result', r))\n .catch(e => {\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n console.log('Error updating', e);\n });\n break;\n\n case 'dropdown':\n Envelopes.updateEnvelopeField(this.endpoint, this.envelopeId, field.name, {prepared: false, value: e.detail})\n .then(r => console.log('Update result', r))\n .catch(e => {\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n console.log('Error updating', e);\n });\n break;\n\n case 'initial':\n console.log('Got initial', e.detail);\n break;\n\n case 'signature':\n console.log('Got signature', e.detail);\n break;\n }\n }\n\n renderCheckboxGroupOption(page: IDocumentPageInfo, field: IDocumentField, option: any) {\n const left = rescale(page.xScale, option.x);\n const bottom = rescale(page.yScale, option.y);\n\n const style = {\n left: `${left}px`,\n bottom: `${bottom}px`,\n position: 'absolute',\n transform: `scale(${page.xScale}, ${page.yScale})`,\n backgroundColor: getRGBA(this.recipientIndex),\n } as any;\n\n return <verdocs-field-checkbox style={style} field={field} onChange={e => this.handleFieldChange(field, e, option.id)} />;\n }\n\n renderRadioGroupOption(page: IDocumentPageInfo, field: IDocumentField, option: any) {\n const left = rescale(page.xScale, option.x);\n const bottom = rescale(page.yScale, option.y);\n\n const style = {\n left: `${left}px`,\n bottom: `${bottom}px`,\n position: 'absolute',\n transform: `scale(${page.xScale}, ${page.yScale})`,\n backgroundColor: getRGBA(this.recipientIndex),\n } as any;\n\n return <verdocs-field-radio-button style={style} field={field} onFieldChange={e => this.handleFieldChange(field, e, option.id)} />;\n }\n\n isFieldValid(field: IDocumentField) {\n switch (field.type) {\n case 'textbox':\n switch (field.settings?.validator || '') {\n case 'email':\n return isValidEmail(field.settings?.result || '');\n case 'phone':\n return isValidPhone(field.settings?.result || '');\n default:\n return !!field.settings?.result;\n }\n\n case 'signature':\n case 'initial':\n case 'textarea':\n case 'date':\n case 'timestamp':\n case 'attachment':\n return !!field.settings?.result;\n case 'dropdown':\n return !!field.settings?.value;\n case 'checkbox_group':\n const checked = (field.settings?.options?.filter(option => option.checked) || []).length;\n return checked >= (field.settings?.minimum_checked || 0) && checked <= (field.settings?.maximum_checked || 999);\n case 'radio_button_group':\n return (field.settings?.options?.filter(option => option.selected) || []).length > 0;\n // TODO\n // case 'checkbox':\n // return <verdocs-field-checkbox style={style} value={result || ''} id={id} />;\n // case 'payment':\n // return <verdocs-field-payment style={style} field={field} id={id} />;\n default:\n return false;\n }\n }\n\n // (async () => {\n // await customElements.whenDefined('verdocs-field-signature');\n // const els = document.getElementById('verdocs-field-signature');\n // await els.focusField();\n // })();\n\n handleNext() {\n // Find and focus the next incomplete required field\n const requiredFields = this.fields.filter(field => field.required);\n console.log('required Fields', requiredFields);\n\n const focusedIndex = requiredFields.findIndex(field => field.name === this.focusedField);\n console.log('focused Index', focusedIndex);\n\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= requiredFields.length) {\n nextFocusedIndex = 0;\n }\n\n const nextRequiredField = requiredFields[nextFocusedIndex];\n console.log('next required field', nextRequiredField);\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n console.log('focusing', id, el);\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n renderField(field: IDocumentField, docPage: IDocumentPageInfo /*, index: number*/) {\n const controlsDiv = document.getElementById(docPage.containerId + '-controls');\n if (!controlsDiv) {\n return;\n }\n\n const id = getFieldId(field);\n const existingField = document.getElementById(id);\n console.log('field', id, existingField);\n if (existingField) {\n setControlStyles(existingField, field, docPage.xScale, docPage.yScale);\n return;\n }\n\n let el;\n switch (field.type) {\n case 'attachment':\n case 'checkbox_group':\n case 'date':\n case 'dropdown':\n case 'initial':\n case 'payment':\n case 'signature':\n case 'timestamp':\n case 'textarea':\n case 'textbox':\n el = document.createElement(`verdocs-field-${field.type}`);\n break;\n // return field.settings.options.map((option: any, index) => this.renderCheckboxGroupOption(renderOnPage, field, option, index));\n case 'radio_button_group':\n // el = document.createElement('verdocs-field-signature');\n // el.setAttribute('value', base64);\n break;\n // return field.settings.options.map((option: any, index) => this.renderRadioGroupOption(renderOnPage, field, option, index));\n // case 'attachment':\n // el = document.createElement('verdocs-field-attachment');\n // el.setAttribute('value', result || '');\n // break;\n // case 'payment':\n // el = document.createElement('verdocs-field-payment');\n // break;\n default:\n console.log('[SIGN] Skipping unsupported field type', field);\n }\n console.log('created field', el);\n\n if (el) {\n el.field = field;\n el.recipient = this.recipient;\n el.setAttribute('id', id);\n el.setAttribute('roleindex', this.recipientIndex);\n el.addEventListener('fieldChange', e => this.handleFieldChange(field, e));\n setControlStyles(el, field, docPage.xScale, docPage.yScale);\n controlsDiv.appendChild(el);\n }\n }\n\n handlePageRendered(e) {\n const pageInfo = e.detail as IPageRenderEvent;\n console.log('[SIGN] Page rendered', pageInfo);\n\n const fields = TemplateStore.fields.filter(field => field.page_sequence === pageInfo.renderedPage.pageNumber);\n // const fields = this.fields.filter(field => field.page_sequence === pageInfo.renderedPage.pageNumber);\n console.log('[SIGN] Fields on page', fields);\n fields.forEach(field => {\n const el = renderDocumentField(field, pageInfo.renderedPage, getRoleIndex(TemplateStore.roleNames, field.role_name), this.handleFieldChange, true, true, true);\n console.log('rendered element', el);\n // const el = renderDocumentField(field, pageInfo.renderedPage, getRoleIndex(this.roles, field.role_name), this.handleFieldChange, true, true, true);\n if (!el) {\n return;\n }\n\n el.addEventListener('recipientChanged', e => {\n el.setAttribute('roleindex', getRoleIndex(TemplateStore.roleNames, e.detail));\n // el.setAttribute('roleindex', getRoleIndex(this.roles, e.detail));\n });\n\n el.setAttribute('xScale', pageInfo.renderedPage.xScale);\n el.setAttribute('yScale', pageInfo.renderedPage.yScale);\n\n // interact(el).draggable({\n // listeners: {\n // start(event) {\n // console.log('[FIELDS] Drag started', event.type, event.target);\n // },\n // move(event) {\n // const oldX = +(event.target.getAttribute('posX') || 0);\n // const oldY = +(event.target.getAttribute('posY') || 0);\n // const xScale = +(event.target.getAttribute('xScale') || 1);\n // const yScale = +(event.target.getAttribute('yScale') || 1);\n // const newX = event.dx / xScale + oldX;\n // const newY = event.dy / yScale + oldY;\n // event.target.setAttribute('posX', newX);\n // event.target.setAttribute('posy', newY);\n // updateCssTransform(event.target, 'translate', `${newX}px, ${newY}px`);\n // },\n // end(event) {\n // console.log('[FIELDS] Drag ended', event);\n // // event.target.setAttribute('posX', 0);\n // // event.target.setAttribute('posy', 0);\n // // updateCssTransform(event.target, 'translate', `${0}px, ${0}px`);\n // },\n // },\n // });\n });\n }\n // handlePageRendered(e) {\n // const pageInfo = e.detail as IPageRenderEvent;\n // console.log('[SIGN] Page rendered', pageInfo);\n //\n // const fields = this.fields.filter(field => field.page === pageInfo.renderedPage.pageNumber);\n // console.log('[SIGN] Fields on page', fields);\n // fields.forEach(field => this.renderField(field, pageInfo.renderedPage));\n // // .map((field, index) => this.renderField(field, index));\n // // this.pdfPageInfo = e.detail;\n // }\n\n render() {\n if (!this.envelope) {\n return <Host />;\n }\n\n const menuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing'},\n {id: 'download', label: 'Download'},\n ];\n\n return (\n <Host class={{agreed: this.recipient?.agreed}}>\n <div class=\"intro\">\n <div class=\"inner\">Please review and act on these documents.</div>\n </div>\n\n <div class=\"header\">\n <div class=\"inner\">\n <div class=\"toolbar\">\n <div class=\"tools\">\n <verdocs-dropdown options={menuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />\n\n {!this.recipient?.agreed ? (\n <div class=\"agree\">\n <div class=\"agree-checkbox\">\n <input type=\"checkbox\" value=\"None\" id=\"agree-checkbox-element\" name=\"agree\" onChange={() => this.handleClickAgree()} />\n <label htmlFor=\"agree-checkbox-element\" />\n </div>\n <span>I agree to use electronic records and signatures.</span>\n </div>\n ) : (\n <div style={{flex: '1'}} />\n )}\n <verdocs-button size=\"small\" label={this.nextButtonLabel} disabled={!this.recipient?.agreed} onClick={() => this.handleNext()} />\n </div>\n </div>\n </div>\n </div>\n\n {!this.recipient?.agreed ? <div class=\"cover\" /> : <div style={{display: 'none'}} />}\n\n <div class=\"document\">\n <div class=\"inner\">\n {(this.envelope?.documents || []).map(envelopeDocument => {\n const pages = [...(envelopeDocument?.pages || [])];\n pages.sort((a, b) => a.sequence - b.sequence);\n\n return (\n <Fragment>\n {pages.map(page => (\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 </Fragment>\n );\n })}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import{g as t,f as e}from"./p-ff1278ed.js";const n=(t,e,n)=>{const s=t.get(e);if(!s){t.set(e,[n])}else if(!s.includes(n)){s.push(n)}};const s=(t,e)=>{let n;return(...s)=>{if(n){clearTimeout(n)}n=setTimeout((()=>{n=0;t(...s)}),e)}};const o=t=>!("isConnected"in t)||t.isConnected;const r=s((t=>{for(let e of t.keys()){t.set(e,t.get(e).filter(o))}}),2e3);const c=()=>{if(typeof t!=="function"){return{}}const s=new Map;return{dispose:()=>s.clear(),get:e=>{const o=t();if(o){n(s,e,o)}},set:t=>{const n=s.get(t);if(n){s.set(t,n.filter(e))}r(s)},reset:()=>{s.forEach((t=>t.forEach(e)));r(s)}}};const i=t=>typeof t==="function"?t():t;const u=(t,e=((t,e)=>t!==e))=>{const n=i(t);let s=new Map(Object.entries(n!==null&&n!==void 0?n:{}));const o={dispose:[],get:[],set:[],reset:[]};const r=()=>{var e;s=new Map(Object.entries((e=i(t))!==null&&e!==void 0?e:{}));o.reset.forEach((t=>t()))};const c=()=>{o.dispose.forEach((t=>t()));r()};const u=t=>{o.get.forEach((e=>e(t)));return s.get(t)};const p=(t,n)=>{const r=s.get(t);if(e(n,r,t)){s.set(t,n);o.set.forEach((e=>e(t,n,r)))}};const a=typeof Proxy==="undefined"?{}:new Proxy(n,{get(t,e){return u(e)},ownKeys(t){return Array.from(s.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,e){return s.has(e)},set(t,e,n){p(e,n);return true}});const d=(t,e)=>{o[t].push(e);return()=>{f(o[t],e)}};const l=(e,n)=>{const s=d("set",((t,s)=>{if(t===e){n(s)}}));const o=d("reset",(()=>n(i(t)[e])));return()=>{s();o()}};const g=(...t)=>{const e=t.reduce(((t,e)=>{if(e.set){t.push(d("set",e.set))}if(e.get){t.push(d("get",e.get))}if(e.reset){t.push(d("reset",e.reset))}if(e.dispose){t.push(d("dispose",e.dispose))}return t}),[]);return()=>e.forEach((t=>t()))};const y=t=>{const e=s.get(t);o.set.forEach((n=>n(t,e,e)))};return{state:a,get:u,set:p,on:d,onChange:l,use:g,dispose:c,reset:r,forceUpdate:y}};const f=(t,e)=>{const n=t.indexOf(e);if(n>=0){t[n]=t[t.length-1];t.length--}};const p=(t,e)=>{const n=u(t,e);n.use(c());return n};export{p as c};
2
+ //# sourceMappingURL=p-5ea05a1d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["node_modules/@stencil/store/dist/index.mjs"],"names":["appendToMap","map","propName","value","items","get","set","includes","push","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","isConnected","maybeElement","cleanupElements","key","keys","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","unwrap","val","createObservableMap","defaultState","shouldUpdate","a","b","unwrappedState","states","Object","entries","handlers","_a","cb","oldValue","state","Proxy","[object Object]","_","Array","from","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","length","createStore"],"mappings":"2CAEA,MAAMA,EAAc,CAACC,EAAKC,EAAUC,KAChC,MAAMC,EAAQH,EAAII,IAAIH,GACtB,IAAKE,EAAO,CACRH,EAAIK,IAAIJ,EAAU,CAACC,SAElB,IAAKC,EAAMG,SAASJ,GAAQ,CAC7BC,EAAMI,KAAKL,KAGnB,MAAMM,EAAW,CAACC,EAAIC,KAClB,IAAIC,EACJ,MAAO,IAAIC,KACP,GAAID,EAAW,CACXE,aAAaF,GAEjBA,EAAYG,YAAW,KACnBH,EAAY,EACZF,KAAMG,KACPF,KAaX,MAAMK,EAAeC,KAAmB,gBAAiBA,IAAiBA,EAAaD,YACvF,MAAME,EAAkBT,GAAUR,IAC9B,IAAK,IAAIkB,KAAOlB,EAAImB,OAAQ,CACxBnB,EAAIK,IAAIa,EAAKlB,EAAII,IAAIc,GAAKE,OAAOL,OAEtC,KACH,MAAMM,EAAsB,KACxB,UAAWC,IAAoB,WAAY,CAGvC,MAAO,GAEX,MAAMC,EAAe,IAAIC,IACzB,MAAO,CACHC,QAAS,IAAMF,EAAaG,QAC5BtB,IAAMH,IACF,MAAM0B,EAAML,IACZ,GAAIK,EAAK,CACL5B,EAAYwB,EAActB,EAAU0B,KAG5CtB,IAAMJ,IACF,MAAM2B,EAAWL,EAAanB,IAAIH,GAClC,GAAI2B,EAAU,CACVL,EAAalB,IAAIJ,EAAU2B,EAASR,OAAOS,IAE/CZ,EAAgBM,IAEpBO,MAAO,KACHP,EAAaQ,SAASC,GAASA,EAAKD,QAAQF,KAC5CZ,EAAgBM,MAK5B,MAAMU,EAAUC,UAAgBA,IAAQ,WAAaA,IAAQA,EAC7D,MAAMC,EAAsB,CAACC,EAAcC,EAAe,EAACC,EAAGC,IAAMD,IAAMC,MACtE,MAAMC,EAAiBP,EAAOG,GAC9B,IAAIK,EAAS,IAAIjB,IAAIkB,OA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UP,EAAG,SAAS,IAAMX,EAAGb,EAAOG,GAAcnC,MAC1D,MAAO,KACH6D,IACAE,MAGR,MAAMC,EAAM,IAAIC,KACZ,MAAMC,EAASD,EAAcE,QAAO,CAACD,EAAQE,KACzC,GAAIA,EAAahE,IAAK,CAClB8D,EAAO5D,KAAKkD,EAAG,MAAOY,EAAahE,MAEvC,GAAIgE,EAAajE,IAAK,CAClB+D,EAAO5D,KAAKkD,EAAG,MAAOY,EAAajE,MAEvC,GAAIiE,EAAavC,MAAO,CACpBqC,EAAO5D,KAAKkD,EAAG,QAASY,EAAavC,QAEzC,GAAIuC,EAAa5C,QAAS,CACtB0C,EAAO5D,KAAKkD,EAAG,UAAWY,EAAa5C,UAE3C,OAAO0C,IACR,IACH,MAAO,IAAMA,EAAOpC,SAASuC,GAAUA,OAE3C,MAAMzC,EAAeX,IACjB,MAAM6B,EAAWN,EAAOrC,IAAIc,GAC5B0B,EAASvC,IAAI0B,SAASe,GAAOA,EAAG5B,EAAK6B,EAAUA,MAEnD,MAAO,CACHC,MAAAA,EACA5C,IAAAA,EACAC,IAAAA,EACAoD,GAAAA,EACAI,SAAAA,EACAI,IAAAA,EACAxC,QAAAA,EACAK,MAAAA,EACAD,YAAAA,IAGR,MAAM+B,EAAkB,CAACW,EAAOC,KAC5B,MAAMC,EAAQF,EAAMG,QAAQF,GAC5B,GAAIC,GAAS,EAAG,CACZF,EAAME,GAASF,EAAMA,EAAMI,OAAS,GACpCJ,EAAMI,WAIT,MAACC,EAAc,CAACxC,EAAcC,KAC/B,MAAMrC,EAAMmC,EAAoBC,EAAcC,GAC9CrC,EAAIiE,IAAI5C,KACR,OAAOrB","sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n"]}
@@ -0,0 +1,2 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function l(e){try{a(n.next(e))}catch(e){r(e)}}function s(e){try{a(n["throw"](e))}catch(e){r(e)}}function a(e){e.done?i(e.value):o(e.value).then(l,s)}a((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(t){return a([e,t])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(r=l[0]&2?o["return"]:l[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,l[1])).done)return r;if(o=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:i.label++;return{value:l[1],done:false};case 5:i.label++;o=l[1];l=[0];continue;case 7:l=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){i.label=l[1];break}if(l[0]===6&&i.label<r[1]){i.label=r[1];r=l;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(l);break}if(r[2])i.ops.pop();i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e];o=0}finally{n=r=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-05eb4fed.system.js","./p-21ec6ff0.system.js","./p-d1a97a03.system.js","./p-0f6da8c7.system.js"],(function(e){"use strict";var t,i,n,o,r,l,s,a;return{setters:[function(e){t=e.r;i=e.c;n=e.h;o=e.H},function(e){r=e.g},function(e){l=e.a;s=e.g},function(e){a=e.s},function(){}],execute:function(){var u='verdocs-field-textbox{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:150px;height:15px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-textbox.disabled{opacity:0.5}verdocs-field-textbox input{width:100%;height:100%;font-size:11px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87);border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textbox input:focus{outline:none}verdocs-field-textbox input.hide{display:none}verdocs-field-textbox.required{border:1px solid #cc0000}verdocs-field-textbox.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textbox verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textbox verdocs-button-panel[data-active],verdocs-field-textbox verdocs-button-panel:hover{opacity:1}verdocs-field-textbox verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textbox verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-textbox [data-lastpass-icon-root]{display:none !important}';var d='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';var c=e("verdocs_field_textbox",function(){function e(e){t(this,e);this.fieldFocus=i(this,"fieldFocus",7);this.fieldBlur=i(this,"fieldBlur",7);this.fieldChange=i(this,"fieldChange",7);this.fieldInput=i(this,"fieldInput",7);this.recipientChanged=i(this,"recipientChanged",7);this.field=null;this.recipient=undefined;this.disabled=false;this.editable=false;this.moveable=false;this.roleindex=0;this.focused=false}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.focused=true;this.el.focus();this.fieldFocus.emit(true);return[2]}))}))};e.prototype.handleBlur=function(){this.focused=false;this.fieldBlur.emit(true)};e.prototype.handleFocus=function(){this.focused=true;this.fieldFocus.emit(true)};e.prototype.handleChange=function(e){this.fieldChange.emit(e.target.value)};e.prototype.handleInput=function(e){this.fieldInput.emit(e.target.value)};e.prototype.handleChangeRecipient=function(e){var t;console.log("recipient changed",e.detail);(t=this.recipientChanged)===null||t===void 0?void 0:t.emit(e.detail)};e.prototype.render=function(){var e=this;var t,i,u,c;var f=s(this.field);var h=(i=(t=this.disabled)!==null&&t!==void 0?t:f.disabled)!==null&&i!==void 0?i:false;var p=this.field["rgba"]||r(l(a.roleNames,""));return n(o,{class:{focused:this.focused,required:(u=this.field)===null||u===void 0?void 0:u.required,disabled:h},style:{backgroundColor:p}},n("input",{type:"text",placeholder:f===null||f===void 0?void 0:f.placeholder,tabIndex:f===null||f===void 0?void 0:f.order,value:f===null||f===void 0?void 0:f.result,disabled:h,required:(c=this.field)===null||c===void 0?void 0:c.required,ref:function(t){return e.el=t},onBlur:function(){return e.handleBlur()},onFocus:function(){return e.handleFocus()},onChange:function(t){return e.handleChange(t)},onInput:function(t){return e.handleInput(t)}}),this.editable&&n("verdocs-button-panel",{icon:d},n("h6",null,"Field Settings"),n("form",null,n("verdocs-select-input",{label:"Recipient",value:a.roleNames[this.roleindex],options:a.roleNames.map((function(e){return{label:e,value:e}})),onChange:function(t){return e.handleChangeRecipient(t)}}),n("verdocs-text-input",{label:"Field Name",value:"",placeholder:"Stored field name...",onInput:function(e){return console.log("ipt",e)}}),n("verdocs-text-input",{label:"Placeholder",value:"",placeholder:"Placeholder text...",onInput:function(e){return console.log("ipt",e)}}))))};return e}());c.style=u}}}));
2
+ //# sourceMappingURL=p-6802bdd2.system.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/elements/verdocs-field-textbox/verdocs-field-textbox.scss?tag=verdocs-field-textbox","src/components/elements/verdocs-field-textbox/verdocs-field-textbox.tsx"],"names":["verdocsFieldTextboxCss","settingsIcon","VerdocsFieldTextbox","exports","class_1","prototype","focusField","this","focused","el","focus","fieldFocus","emit","handleBlur","fieldBlur","handleFocus","handleChange","e","fieldChange","target","value","handleInput","fieldInput","handleChangeRecipient","console","log","detail","_a","recipientChanged","render","_this","settings","getFieldSettings","field","disabled","_b","backgroundColor","getRGBA","getRoleIndex","TemplateStore","roleNames","h","Host","class","required","_c","style","type","placeholder","tabIndex","order","result","_d","ref","onBlur","onFocus","onChange","onInput","editable","icon","label","roleindex","options","map","role"],"mappings":"quDAAA,IAAMA,EAAyB,6zCCO/B,IAAMC,EACJ,6rCAUWC,EAAmBC,EAAA,wBAAA,6PAM0B,4CAU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EAAUoB,OACjBjB,SAAUA,EACVU,UAAUQ,EAAA7C,KAAK0B,SAAK,MAAAmB,SAAA,OAAA,EAAAA,EAAER,SACtBS,IAAK,SAAA5C,GAAE,OAAKqB,EAAKrB,GAAKA,GACtB6C,OAAQ,WAAM,OAAAxB,EAAKjB,cACnB0C,QAAS,WAAM,OAAAzB,EAAKf,eACpByC,SAAU,SAAAvC,GAAK,OAAAa,EAAKd,aAAaC,IACjCwC,QAAS,SAAAxC,GAAK,OAAAa,EAAKT,YAAYJ,MAGhCV,KAAKmD,UACJjB,EAAA,uBAAA,CAAsBkB,KAAM1D,GAC1BwC,EAAA,KAAA,KAAA,kBACAA,EAAA,OAAA,KACEA,EAAA,uBAAA,CACEmB,MAAM,YACNxC,MAAOmB,EAAcC,UAAUjC,KAAKsD,WACpCC,QAASvB,EAAcC,UAAUuB,KAAI,SAAAC,GAAI,MAAA,CAAMJ,MAAOI,EAAM5C,MAAO4C,MACnER,SAAU,SAAAvC,GAAK,OAAAa,EAAKP,sBAAsBN,MAG5CwB,EAAA,qBAAA,CAAoBmB,MAAM,aAAaxC,MAAM,GAAG4B,YAAY,uBAAuBS,QAAS,SAAAxC,GAAK,OAAAO,QAAQC,IAAI,MAAOR,MACpHwB,EAAA,qBAAA,CAAoBmB,MAAM,cAAcxC,MAAM,GAAG4B,YAAY,sBAAsBS,QAAS,SAAAxC,GAAK,OAAAO,QAAQC,IAAI,MAAOR,mBA9HlG","sourcesContent":["@import '../../../theme.scss';\n\nverdocs-field-textbox {\n font-family: $verdocs-primary-font;\n width: 150px;\n height: 15px;\n display: block;\n font-size: 11px;\n position: relative;\n background-color: transparent;\n transform-origin: bottom left;\n\n &.disabled {\n opacity: 0.5;\n }\n\n input {\n width: 100%;\n height: 100%;\n font-size: 11px;\n background: none;\n font-weight: 500;\n transform-origin: 0 0;\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.87);\n border: 1px solid rgba(0, 0, 0, 0.2);\n\n &:focus {\n outline: none;\n }\n\n &.hide {\n display: none;\n }\n }\n\n &.required {\n border: 1px solid rgb(204, 0, 0);\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.75s 2;\n }\n\n verdocs-button-panel {\n top: -3px;\n left: -2px;\n opacity: 0.5;\n z-index: 1000;\n cursor: pointer;\n position: absolute;\n transform: scale(0.6);\n\n &[data-active],\n &:hover {\n opacity: 1;\n }\n\n .icon {\n svg {\n fill: #333333;\n }\n\n &:hover {\n svg {\n fill: #000000;\n }\n }\n }\n }\n\n // @see https://community.logmein.com/t5/LastPass-Support-Discussions/placeholder-text-overrides-data-lpignore-quot-true-quot/td-p/295135\n // LastPass is ignoring the data-lpignore attribute in some cases\n [data-lastpass-icon-root] {\n display: none !important;\n }\n}\n","import {getRGBA} from '@verdocs/js-sdk/Utils/Colors';\nimport {ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {IDocumentField, IRecipient} from '@verdocs/js-sdk/Envelopes/Types';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Method} from '@stencil/core';\nimport {getFieldSettings, getRoleIndex} from '../../../utils/utils';\nimport TemplateStore from '../../../utils/templateStore';\n\nconst settingsIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20\" width=\"20\"><path d=\"m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z\"/></svg>';\n\n/**\n * Display a text input field.\n */\n@Component({\n tag: 'verdocs-field-textbox',\n styleUrl: 'verdocs-field-textbox.scss',\n shadow: false,\n})\nexport class VerdocsFieldTextbox {\n private el: HTMLInputElement;\n\n /**\n * The document or template field to display.\n */\n @Prop() field: IDocumentField | ITemplateField | null = null;\n\n /**\n * The recipient completing the form, if known.\n */\n @Prop() recipient?: IRecipient;\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If set, a settings icon will be displayed on hover. The settings shown allow the field's recipient and other settings to be\n * changed, so it should typically only be enabled in the Builder.\n */\n @Prop() editable?: boolean = false;\n\n /**\n * If set, the field may be dragged to a new location. This should only be enabled in the Builder, or for self-placed fields.\n */\n @Prop() moveable?: boolean = false;\n\n /**\n * If set, the field will be colored using this index value to select the background color.\n */\n @Prop() roleindex?: number = 0;\n\n /**\n * Event fired when the input field loses focus.\n */\n @Event({composed: true}) fieldFocus: EventEmitter<boolean>;\n\n /**\n * Event fired when the input field gains focus.\n */\n @Event({composed: true}) fieldBlur: EventEmitter<boolean>;\n\n /**\n * Event fired when the input field value changes. Note that this will only be fired on blur, tab-out, ENTER key press, etc.\n * It is generally the best event to subscribe to than `input` for most cases EXCEPT autocomplete fields that need to see every\n * keypress.\n */\n @Event({composed: true}) fieldChange: EventEmitter<string>;\n\n /**\n * Event fired on every character entered into / deleted from the field.\n */\n @Event({composed: true}) fieldInput: EventEmitter<string>;\n\n /**\n * Event fired if the field is configurable when the recipient has changed.\n */\n @Event({composed: true}) recipientChanged: EventEmitter<string>;\n\n @State() focused = false;\n\n @Method() async focusField() {\n this.focused = true;\n this.el.focus();\n this.fieldFocus.emit(true);\n }\n\n handleBlur() {\n this.focused = false;\n this.fieldBlur.emit(true);\n }\n\n handleFocus() {\n this.focused = true;\n this.fieldFocus.emit(true);\n }\n\n handleChange(e: any) {\n this.fieldChange.emit(e.target.value);\n }\n\n handleInput(e: any) {\n this.fieldInput.emit(e.target.value);\n }\n\n handleChangeRecipient(e: any) {\n console.log('recipient changed', e.detail);\n this.recipientChanged?.emit(e.detail);\n }\n\n render() {\n const settings = getFieldSettings(this.field);\n let disabled = this.disabled ?? settings.disabled ?? false;\n // this.roleindex\n const backgroundColor = this.field['rgba'] || getRGBA(getRoleIndex(TemplateStore.roleNames, ''));\n\n return (\n <Host class={{focused: this.focused, required: this.field?.required, disabled}} style={{backgroundColor}}>\n <input\n type=\"text\"\n placeholder={settings?.placeholder}\n tabIndex={settings?.order}\n value={settings?.result}\n disabled={disabled}\n required={this.field?.required}\n ref={el => (this.el = el)}\n onBlur={() => this.handleBlur()}\n onFocus={() => this.handleFocus()}\n onChange={e => this.handleChange(e)}\n onInput={e => this.handleInput(e)}\n />\n\n {this.editable && (\n <verdocs-button-panel icon={settingsIcon}>\n <h6>Field Settings</h6>\n <form>\n <verdocs-select-input\n label=\"Recipient\"\n value={TemplateStore.roleNames[this.roleindex]}\n options={TemplateStore.roleNames.map(role => ({label: role, value: role}))}\n onChange={e => this.handleChangeRecipient(e)}\n />\n\n <verdocs-text-input label=\"Field Name\" value=\"\" placeholder=\"Stored field name...\" onInput={e => console.log('ipt', e)} />\n <verdocs-text-input label=\"Placeholder\" value=\"\" placeholder=\"Placeholder text...\" onInput={e => console.log('ipt', e)} />\n </form>\n </verdocs-button-panel>\n )}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/elements/verdocs-field-textbox/verdocs-field-textbox.scss?tag=verdocs-field-textbox","src/components/elements/verdocs-field-textbox/verdocs-field-textbox.tsx"],"names":["verdocsFieldTextboxCss","settingsIcon","VerdocsFieldTextbox","exports","class_1","prototype","focusField","this","focused","el","focus","fieldFocus","emit","handleBlur","fieldBlur","handleFocus","handleChange","e","fieldChange","target","value","handleInput","fieldInput","handleChangeRecipient","console","log","detail","_a","recipientChanged","render","_this","settings","getFieldSettings","field","disabled","_b","backgroundColor","getRGBA","getRoleIndex","TemplateStore","roleNames","h","Host","class","required","_c","style","type","placeholder","tabIndex","order","result","_d","ref","onBlur","onFocus","onChange","onInput","editable","icon","label","roleindex","options","map","role"],"mappings":"2wDAAA,IAAMA,EAAyB,6zCCO/B,IAAMC,EACJ,6rCAUWC,EAAmBC,EAAA,wBAAA,6PAM0B,4CAU3B,oBAMA,oBAKA,qBAKA,eA6BV,MAEHC,EAAAC,UAAAC,WAAN,gGACRC,KAAKC,QAAU,KACfD,KAAKE,GAAGC,QACRH,KAAKI,WAAWC,KAAK,uBAGvBR,EAAAC,UAAAQ,WAAA,WACEN,KAAKC,QAAU,MACfD,KAAKO,UAAUF,KAAK,OAGtBR,EAAAC,UAAAU,YAAA,WACER,KAAKC,QAAU,KACfD,KAAKI,WAAWC,KAAK,OAGvBR,EAAAC,UAAAW,aAAA,SAAaC,GACXV,KAAKW,YAAYN,KAAKK,EAAEE,OAAOC,QAGjChB,EAAAC,UAAAgB,YAAA,SAAYJ,GACVV,KAAKe,WAAWV,KAAKK,EAAEE,OAAOC,QAGhChB,EAAAC,UAAAkB,sBAAA,SAAsBN,SACpBO,QAAQC,IAAI,oBAAqBR,EAAES,SACnCC,EAAApB,KAAKqB,oBAAgB,MAAAD,SAAA,OAAA,EAAAA,EAAEf,KAAKK,EAAES,SAGhCtB,EAAAC,U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K,OAAAa,EAAKP,sBAAsBN,MAG5CwB,EAAA,qBAAA,CAAoBmB,MAAM,aAAaxC,MAAM,GAAG4B,YAAY,uBAAuBS,QAAS,SAAAxC,GAAK,OAAAO,QAAQC,IAAI,MAAOR,MACpHwB,EAAA,qBAAA,CAAoBmB,MAAM,cAAcxC,MAAM,GAAG4B,YAAY,sBAAsBS,QAAS,SAAAxC,GAAK,OAAAO,QAAQC,IAAI,MAAOR,mBA9HlG","sourcesContent":["@import '../../../theme.scss';\n\nverdocs-field-textbox {\n font-family: $verdocs-primary-font;\n width: 150px;\n height: 15px;\n display: block;\n font-size: 11px;\n position: relative;\n background-color: transparent;\n transform-origin: bottom left;\n\n &.disabled {\n opacity: 0.5;\n }\n\n input {\n width: 100%;\n height: 100%;\n font-size: 11px;\n background: none;\n font-weight: 500;\n transform-origin: 0 0;\n box-sizing: border-box;\n color: rgba(0, 0, 0, 0.87);\n border: 1px solid rgba(0, 0, 0, 0.2);\n\n &:focus {\n outline: none;\n }\n\n &.hide {\n display: none;\n }\n }\n\n &.required {\n border: 1px solid rgb(204, 0, 0);\n }\n\n &.focused {\n animation: verdocs-field-pulse 0.75s 2;\n }\n\n verdocs-button-panel {\n top: -3px;\n left: -2px;\n opacity: 0.5;\n z-index: 1000;\n cursor: pointer;\n position: absolute;\n transform: scale(0.6);\n\n &[data-active],\n &:hover {\n opacity: 1;\n }\n\n .icon {\n svg {\n fill: #333333;\n }\n\n &:hover {\n svg {\n fill: #000000;\n }\n }\n }\n }\n\n // @see https://community.logmein.com/t5/LastPass-Support-Discussions/placeholder-text-overrides-data-lpignore-quot-true-quot/td-p/295135\n // LastPass is ignoring the data-lpignore attribute in some cases\n [data-lastpass-icon-root] {\n display: none !important;\n }\n}\n","import {getRGBA} from '@verdocs/js-sdk/Utils/Colors';\nimport {ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {IDocumentField, IRecipient} from '@verdocs/js-sdk/Envelopes/Types';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Method} from '@stencil/core';\nimport {getFieldSettings, getRoleIndex} from '../../../utils/utils';\nimport TemplateStore from '../../../utils/templateStore';\n\nconst settingsIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"20\" width=\"20\"><path d=\"m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z\"/></svg>';\n\n/**\n * Display a text input field.\n */\n@Component({\n tag: 'verdocs-field-textbox',\n styleUrl: 'verdocs-field-textbox.scss',\n shadow: false,\n})\nexport class VerdocsFieldTextbox {\n private el: HTMLInputElement;\n\n /**\n * The document or template field to display.\n */\n @Prop() field: IDocumentField | ITemplateField | null = null;\n\n /**\n * The recipient completing the form, if known.\n */\n @Prop() recipient?: IRecipient;\n\n /**\n * If set, overrides the field's settings object. Primarily used to support \"preview\" modes where all fields are disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If set, a settings icon will be displayed on hover. The settings shown allow the field's recipient and other settings to be\n * changed, so it should typically only be enabled in the Builder.\n */\n @Prop() editable?: boolean = false;\n\n /**\n * If set, the field may be dragged to a new location. This should only be enabled in the Builder, or for self-placed fields.\n */\n @Prop() moveable?: boolean = false;\n\n /**\n * If set, the field will be colored using this index value to select the background color.\n */\n @Prop() roleindex?: number = 0;\n\n /**\n * Event fired when the input field loses focus.\n */\n @Event({composed: true}) fieldFocus: EventEmitter<boolean>;\n\n /**\n * Event fired when the input field gains focus.\n */\n @Event({composed: true}) fieldBlur: EventEmitter<boolean>;\n\n /**\n * Event fired when the input field value changes. Note that this will only be fired on blur, tab-out, ENTER key press, etc.\n * It is generally the best event to subscribe to than `input` for most cases EXCEPT autocomplete fields that need to see every\n * keypress.\n */\n @Event({composed: true}) fieldChange: EventEmitter<string>;\n\n /**\n * Event fired on every character entered into / deleted from the field.\n */\n @Event({composed: true}) fieldInput: EventEmitter<string>;\n\n /**\n * Event fired if the field is configurable when the recipient has changed.\n */\n @Event({composed: true}) recipientChanged: EventEmitter<string>;\n\n @State() focused = false;\n\n @Method() async focusField() {\n this.focused = true;\n this.el.focus();\n this.fieldFocus.emit(true);\n }\n\n handleBlur() {\n this.focused = false;\n this.fieldBlur.emit(true);\n }\n\n handleFocus() {\n this.focused = true;\n this.fieldFocus.emit(true);\n }\n\n handleChange(e: any) {\n this.fieldChange.emit(e.target.value);\n }\n\n handleInput(e: any) {\n this.fieldInput.emit(e.target.value);\n }\n\n handleChangeRecipient(e: any) {\n console.log('recipient changed', e.detail);\n this.recipientChanged?.emit(e.detail);\n }\n\n render() {\n const settings = getFieldSettings(this.field);\n let disabled = this.disabled ?? settings.disabled ?? false;\n // this.roleindex\n const backgroundColor = this.field['rgba'] || getRGBA(getRoleIndex(TemplateStore.roleNames, ''));\n\n return (\n <Host class={{focused: this.focused, required: this.field?.required, disabled}} style={{backgroundColor}}>\n <input\n type=\"text\"\n placeholder={settings?.placeholder}\n tabIndex={settings?.order}\n value={settings?.result}\n disabled={disabled}\n required={this.field?.required}\n ref={el => (this.el = el)}\n onBlur={() => this.handleBlur()}\n onFocus={() => this.handleFocus()}\n onChange={e => this.handleChange(e)}\n onInput={e => this.handleInput(e)}\n />\n\n {this.editable && (\n <verdocs-button-panel icon={settingsIcon}>\n <h6>Field Settings</h6>\n <form>\n <verdocs-select-input\n label=\"Recipient\"\n value={TemplateStore.roleNames[this.roleindex]}\n options={TemplateStore.roleNames.map(role => ({label: role, value: role}))}\n onChange={e => this.handleChangeRecipient(e)}\n />\n\n <verdocs-text-input label=\"Field Name\" value=\"\" placeholder=\"Stored field name...\" onInput={e => console.log('ipt', e)} />\n <verdocs-text-input label=\"Placeholder\" value=\"\" placeholder=\"Placeholder text...\" onInput={e => console.log('ipt', e)} />\n </form>\n </verdocs-button-panel>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- System.register(["./p-97329951.system.js","./p-a7433630.system.js","./p-6e1ada33.system.js","./p-187b20b7.system.js"],(function(t){"use strict";var e,n,i,s,o;return{setters:[function(t){e=t.r;n=t.c;i=t.h},function(){},function(t){s=t.V},function(t){o=t.S}],execute:function(){var a=function(t,e){return t.api.post("/authentication/login",e).then((function(t){return t.data}))};var r='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}';var l=t("verdocs_auth",function(){function t(t){e(this,t);this.authenticated=n(this,"authenticated",7);this.sdkError=n(this,"sdkError",7);this.endpoint=s.getDefault();this.visible=true;this.logo="https://verdocs.com/assets/blue-logo.svg";this.debug=false;this.isAuthenticated=false;this.displayMode="login";this.username="";this.password="";this.loggingIn=false;this.activeSession=null;this.loginError=null}t.prototype.componentWillLoad=function(){var t,e;this.endpoint.loadSession();if(this.endpoint.session){console.log("[AUTH] Authenticated");this.isAuthenticated=true;this.activeSession=this.endpoint.session;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:true,session:this.endpoint.session})}else{console.log("[AUTH] Anonymous");(e=this.authenticated)===null||e===void 0?void 0:e.emit({authenticated:false,session:null})}};t.prototype.handleLogin=function(){var t=this;this.loggingIn=true;a(this.endpoint,{username:this.username,password:this.password}).then((function(e){var n;t.loggingIn=false;t.endpoint.setToken(e.accessToken);t.activeSession=t.endpoint.session;t.isAuthenticated=true;(n=t.authenticated)===null||n===void 0?void 0:n.emit({authenticated:true,session:t.endpoint.session})})).catch((function(e){var n,i,s,a,r;console.log("[AUTH] Authentication error",e.response,JSON.stringify(e));t.loggingIn=false;t.activeSession=null;(n=t.authenticated)===null||n===void 0?void 0:n.emit({authenticated:false,session:null});(i=t.sdkError)===null||i===void 0?void 0:i.emit(new o(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data));if(((r=e===null||e===void 0?void 0:e.response)===null||r===void 0?void 0:r.status)===403){t.loginError="Please check your username and password and try again."}}))};t.prototype.handleLogout=function(){var t;this.endpoint.clearSession();this.isAuthenticated=false;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:false,session:null})};t.prototype.handleClearError=function(){this.loginError=null};t.prototype.render=function(){var t=this;if(!this.visible){return i("div",{style:{display:"none"}},"Verdocs Auth Placeholder")}if(this.isAuthenticated){if(this.debug){return i("div",{class:"status-result debug"},i("verdocs-button",{label:"Logout",disabled:this.loggingIn,onClick:function(){return t.handleLogout()}}))}return i("div",{class:"status-result"},"Authenticated")}if(this.displayMode==="signup"){return i("div",{class:"signup-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Sign up for an account"),i("h4",null,"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:function(){return t.displayMode="login"},disabled:this.loggingIn})),i("form",{onSubmit:function(){return t.handleLogin()}},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:function(e){return t.username=e.target.value},disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:function(e){return t.password=e.target.value},disabled:this.loggingIn}),i("verdocs-button",{label:"Signup",disabled:this.loggingIn,onClick:function(){return t.handleLogin()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}return i("div",{class:"login-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Log in to your account"),i("h4",null,"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:function(){return t.displayMode="signup"},disabled:this.loggingIn})),i("form",{onSubmit:function(){return t.handleLogin()}},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:function(e){return t.username=e.target.value},disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:function(e){return t.password=e.target.value},disabled:this.loggingIn}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:function(){return t.displayMode="signup"},disabled:this.loggingIn,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.loggingIn,onClick:function(){return t.handleLogin()},style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})),this.loginError?i("verdocs-ok-dialog",{heading:"Login Error",message:this.loginError,onNext:function(){return t.handleClearError()}}):i("div",null))};return t}());l.style=r}}}));
2
- //# sourceMappingURL=p-dee9037d.system.entry.js.map
1
+ System.register(["./p-97329951.system.js","./p-a7433630.system.js","./p-1cd2f7dc.system.js","./p-187b20b7.system.js"],(function(t){"use strict";var e,n,i,s,o;return{setters:[function(t){e=t.r;n=t.c;i=t.h},function(){},function(t){s=t.V},function(t){o=t.S}],execute:function(){var a=function(t,e){return t.api.post("/authentication/login",e).then((function(t){return t.data}))};var r='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}';var l=t("verdocs_auth",function(){function t(t){e(this,t);this.authenticated=n(this,"authenticated",7);this.sdkError=n(this,"sdkError",7);this.endpoint=s.getDefault();this.visible=true;this.logo="https://verdocs.com/assets/blue-logo.svg";this.debug=false;this.isAuthenticated=false;this.displayMode="login";this.username="";this.password="";this.loggingIn=false;this.activeSession=null;this.loginError=null}t.prototype.componentWillLoad=function(){var t,e;this.endpoint.loadSession();if(this.endpoint.session){console.log("[AUTH] Authenticated");this.isAuthenticated=true;this.activeSession=this.endpoint.session;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:true,session:this.endpoint.session})}else{console.log("[AUTH] Anonymous");(e=this.authenticated)===null||e===void 0?void 0:e.emit({authenticated:false,session:null})}};t.prototype.handleLogin=function(){var t=this;this.loggingIn=true;a(this.endpoint,{username:this.username,password:this.password}).then((function(e){var n;t.loggingIn=false;t.endpoint.setToken(e.accessToken);t.activeSession=t.endpoint.session;t.isAuthenticated=true;(n=t.authenticated)===null||n===void 0?void 0:n.emit({authenticated:true,session:t.endpoint.session})})).catch((function(e){var n,i,s,a,r;console.log("[AUTH] Authentication error",e.response,JSON.stringify(e));t.loggingIn=false;t.activeSession=null;(n=t.authenticated)===null||n===void 0?void 0:n.emit({authenticated:false,session:null});(i=t.sdkError)===null||i===void 0?void 0:i.emit(new o(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data));if(((r=e===null||e===void 0?void 0:e.response)===null||r===void 0?void 0:r.status)===403){t.loginError="Please check your username and password and try again."}}))};t.prototype.handleLogout=function(){var t;this.endpoint.clearSession();this.isAuthenticated=false;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:false,session:null})};t.prototype.handleClearError=function(){this.loginError=null};t.prototype.render=function(){var t=this;if(!this.visible){return i("div",{style:{display:"none"}},"Verdocs Auth Placeholder")}if(this.isAuthenticated){if(this.debug){return i("div",{class:"status-result debug"},i("verdocs-button",{label:"Logout",disabled:this.loggingIn,onClick:function(){return t.handleLogout()}}))}return i("div",{class:"status-result"},"Authenticated")}if(this.displayMode==="signup"){return i("div",{class:"signup-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Sign up for an account"),i("h4",null,"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:function(){return t.displayMode="login"},disabled:this.loggingIn})),i("form",{onSubmit:function(){return t.handleLogin()}},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:function(e){return t.username=e.target.value},disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:function(e){return t.password=e.target.value},disabled:this.loggingIn}),i("verdocs-button",{label:"Signup",disabled:this.loggingIn,onClick:function(){return t.handleLogin()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}return i("div",{class:"login-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Log in to your account"),i("h4",null,"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:function(){return t.displayMode="signup"},disabled:this.loggingIn})),i("form",{onSubmit:function(){return t.handleLogin()}},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:function(e){return t.username=e.target.value},disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:function(e){return t.password=e.target.value},disabled:this.loggingIn}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:function(){return t.displayMode="signup"},disabled:this.loggingIn,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.loggingIn,onClick:function(){return t.handleLogin()},style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})),this.loginError?i("verdocs-ok-dialog",{heading:"Login Error",message:this.loginError,onNext:function(){return t.handleClearError()}}):i("div",null))};return t}());l.style=r}}}));
2
+ //# sourceMappingURL=p-6a8ac53e.system.entry.js.map
@@ -1,2 +1,2 @@
1
- System.register(["./p-97329951.system.js","./p-a7433630.system.js","./p-6e1ada33.system.js"],(function(e){"use strict";var t,o,n,a;return{setters:[function(e){t=e.r;o=e.c;n=e.h},function(){},function(e){a=e.V}],execute:function(){var s='verdocs-contact-picker{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;background-color:#ffffff}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:100;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';var i='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';var c='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>';var r='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>';var l=e("verdocs_contact_picker",function(){function e(e){t(this,e);this.searchContacts=o(this,"searchContacts",7);this.cancel=o(this,"cancel",7);this.next=o(this,"next",7);this.endpoint=a.getDefault();this.templateRole=null;this.contactSuggestions=[];this.name=undefined;this.email=undefined;this.phone=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false}e.prototype.componentWillLoad=function(){if(this.templateRole){this.name=this.templateRole.full_name||"";this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!==""}};e.prototype.handleNameChange=function(e){var t;this.name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.name})};e.prototype.handleEmailChange=function(e){this.email=e.target.value};e.prototype.handlePhoneChange=function(e){this.phone=e.target.value};e.prototype.handleMessageChange=function(e){this.message=e.target.value};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})};e.prototype.handleSelectSuggestion=function(e,t){e.stopPropagation();this.name=t.name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;return n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("div",{class:"row"},n("label",{htmlFor:"verdocs-contact-picker-name"},"Name:"),n("input",{id:"verdocs-contact-picker-name",name:"verdocs-contact-picker-name",type:"text","data-lpignore":"true",autocomplete:"off",value:this.name,placeholder:"Recipient Name...",onFocus:function(){var t;return e.showSuggestions=((t=e.contactSuggestions)===null||t===void 0?void 0:t.length)>0},onInput:function(t){return e.handleNameChange(t)}}),this.showSuggestions&&n("div",{class:"dropdown"},this.contactSuggestions.map((function(t){var o;return n("div",{key:(o=t.id)!==null&&o!==void 0?o:t.name,class:"suggestion",onClick:function(o){return e.handleSelectSuggestion(o,t)}},t.avatar?n("img",{alt:"Avatar",class:"avatar",src:t.avatar}):n("div",{class:"avatar",innerHTML:r}),n("div",{class:"details"},n("div",{class:"name"},t.name),t.email&&n("div",{class:"destination"},t.email),t.phone&&n("div",{class:"destination"},t.phone)))})))),n("div",{class:"row"},n("label",{htmlFor:"verdocs-contact-picker-email"},"Email:"),n("input",{id:"verdocs-contact-picker-email",name:"verdocs-contact-picker-email",type:"text","data-lpignore":"true",autoComplete:"off",value:this.email,placeholder:"Email Address...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleEmailChange(t)}})),n("div",{class:"row"},n("label",{htmlFor:"verdocs-contact-picker-phone"},"Phone:"),n("input",{id:"verdocs-contact-picker-phone",name:"verdocs-contact-picker-phone",type:"text","data-lpignore":"true",autocomplete:"off",value:this.phone,placeholder:"Phone Number...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handlePhoneChange(t)}})),this.showMessage&&n("div",{class:"row"},n("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),n("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"off",value:this.message,placeholder:"Invitation Message...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleMessageChange(t)}})),n("div",{class:"buttons"},n("verdocs-toggle-button",{icon:i,size:"small",active:this.showMessage,onToggle:function(t){e.showMessage=t.detail.active;e.showSuggestions=false}}),n("verdocs-toggle-button",{icon:c,size:"small",active:this.delegator,onToggle:function(t){e.delegator=t.detail.active;e.showSuggestions=false}}),n("div",{class:"flex-fill"}),n("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),n("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}());l.style=s}}}));
2
- //# sourceMappingURL=p-2bb98709.system.entry.js.map
1
+ System.register(["./p-97329951.system.js","./p-a7433630.system.js","./p-1cd2f7dc.system.js"],(function(e){"use strict";var t,o,n,a;return{setters:[function(e){t=e.r;o=e.c;n=e.h},function(){},function(e){a=e.V}],execute:function(){var s='verdocs-contact-picker{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;background-color:#ffffff}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:100;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';var i='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';var c='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>';var r='<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>';var l=e("verdocs_contact_picker",function(){function e(e){t(this,e);this.searchContacts=o(this,"searchContacts",7);this.cancel=o(this,"cancel",7);this.next=o(this,"next",7);this.endpoint=a.getDefault();this.templateRole=null;this.contactSuggestions=[];this.name=undefined;this.email=undefined;this.phone=undefined;this.message=undefined;this.showSuggestions=false;this.showMessage=false;this.delegator=false}e.prototype.componentWillLoad=function(){if(this.templateRole){this.name=this.templateRole.full_name||"";this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!==""}};e.prototype.handleNameChange=function(e){var t;this.name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.name})};e.prototype.handleEmailChange=function(e){this.email=e.target.value};e.prototype.handlePhoneChange=function(e){this.phone=e.target.value};e.prototype.handleMessageChange=function(e){this.message=e.target.value};e.prototype.handleCancel=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.cancel)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})};e.prototype.handleSelectSuggestion=function(e,t){e.stopPropagation();this.name=t.name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false};e.prototype.render=function(){var e=this;return n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("div",{class:"row"},n("label",{htmlFor:"verdocs-contact-picker-name"},"Name:"),n("input",{id:"verdocs-contact-picker-name",name:"verdocs-contact-picker-name",type:"text","data-lpignore":"true",autocomplete:"off",value:this.name,placeholder:"Recipient Name...",onFocus:function(){var t;return e.showSuggestions=((t=e.contactSuggestions)===null||t===void 0?void 0:t.length)>0},onInput:function(t){return e.handleNameChange(t)}}),this.showSuggestions&&n("div",{class:"dropdown"},this.contactSuggestions.map((function(t){var o;return n("div",{key:(o=t.id)!==null&&o!==void 0?o:t.name,class:"suggestion",onClick:function(o){return e.handleSelectSuggestion(o,t)}},t.avatar?n("img",{alt:"Avatar",class:"avatar",src:t.avatar}):n("div",{class:"avatar",innerHTML:r}),n("div",{class:"details"},n("div",{class:"name"},t.name),t.email&&n("div",{class:"destination"},t.email),t.phone&&n("div",{class:"destination"},t.phone)))})))),n("div",{class:"row"},n("label",{htmlFor:"verdocs-contact-picker-email"},"Email:"),n("input",{id:"verdocs-contact-picker-email",name:"verdocs-contact-picker-email",type:"text","data-lpignore":"true",autoComplete:"off",value:this.email,placeholder:"Email Address...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleEmailChange(t)}})),n("div",{class:"row"},n("label",{htmlFor:"verdocs-contact-picker-phone"},"Phone:"),n("input",{id:"verdocs-contact-picker-phone",name:"verdocs-contact-picker-phone",type:"text","data-lpignore":"true",autocomplete:"off",value:this.phone,placeholder:"Phone Number...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handlePhoneChange(t)}})),this.showMessage&&n("div",{class:"row"},n("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),n("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"off",value:this.message,placeholder:"Invitation Message...",onFocus:function(){return e.showSuggestions=false},onInput:function(t){return e.handleMessageChange(t)}})),n("div",{class:"buttons"},n("verdocs-toggle-button",{icon:i,size:"small",active:this.showMessage,onToggle:function(t){e.showMessage=t.detail.active;e.showSuggestions=false}}),n("verdocs-toggle-button",{icon:c,size:"small",active:this.delegator,onToggle:function(t){e.delegator=t.detail.active;e.showSuggestions=false}}),n("div",{class:"flex-fill"}),n("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),n("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}());l.style=s}}}));
2
+ //# sourceMappingURL=p-78ec7db1.system.entry.js.map
@@ -1,2 +1,2 @@
1
- System.register(["./p-97329951.system.js","./p-a4041773.system.js"],(function(e){"use strict";var i,t,n,s,r;return{setters:[function(e){i=e.r;t=e.c;n=e.h;s=e.H},function(e){r=e.g}],execute:function(){var a='verdocs-field-payment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;position:relative;border:1px solid #cfa;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-payment.disabled{opacity:0.5}verdocs-field-payment button,verdocs-field-payment div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-payment button{color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-payment button.hide{display:none}verdocs-field-payment input{float:left;font-family:Arial, sans-serif}verdocs-field-payment select{position:absolute;font-family:Arial, sans-serif;background:linear-gradient(55deg, transparent 50%, #333 50%), linear-gradient(125deg, #333 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 4px, calc(100% - 3px) 4px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none}verdocs-field-payment .frame{width:100%;height:100%;background-size:contain;text-align:left}verdocs-field-payment .frame img{position:absolute;height:auto;width:100%}verdocs-field-payment.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var o=e("verdocs_field_payment",function(){function e(e){i(this,e);this.signatureComplete=t(this,"signatureComplete",7);this.initialComplete=t(this,"initialComplete",7);this._fields=[];this.signatureFile=null;this.initialFile=null;this.focusOrderNumber=-1;this.focusFieldName="";this.activeElement=null;this.showError={pageNum:-1,fieldIndex:-1,type:null};this.dialogOpened=false;this.closeAllErrors=false;this.fieldsMap={};this.fieldsForCurrentSigner=[];this.fontSize=11;this.averageFontWidth=5;this.requiredFields=[];this.field=null;this.recipient=undefined;this.disabled=false;this.fields=undefined;this.pageNum=undefined;this.roleName=undefined;this.fieldId=undefined;this.recipients=undefined;this.selectedRoleName=undefined;this.pdfPages=undefined;this.currentSignature=undefined;this.currentSignatureId=undefined;this.currentInitial=undefined;this.currentInitialId=undefined;this.focused=false;this.signed=false;this.preparedMessage=undefined;this.signatureUrl=""}e.prototype.componentWillLoad=function(){console.log("sign field",this.field);if(this.recipients&&this.recipients.length>0){var e=this.recipients.find((function(e){return e.type==="preparer"}));console.log("Found preparer",e);if(e){this.preparedMessage="Prepared by ".concat(e["full_name"])}}};e.prototype.render=function(){var e,i;var t=r(this.field);var a=(i=(e=this.disabled)!==null&&e!==void 0?e:t.disabled)!==null&&i!==void 0?i:false;console.log("Payment field",t);return n(s,{class:{focused:this.focused,disabled:a}},n("button",{class:{hide:this.signed}},"$"),this.signed?n("div",{class:"frame"}):n("div",{style:{display:"none"}}),n("img",{width:"100%",height:"100%",src:this.signatureUrl}))};return e}());o.style=a}}}));
2
- //# sourceMappingURL=p-04708900.system.entry.js.map
1
+ System.register(["./p-97329951.system.js","./p-21ec6ff0.system.js"],(function(e){"use strict";var i,t,n,s,r;return{setters:[function(e){i=e.r;t=e.c;n=e.h;s=e.H},function(e){r=e.g}],execute:function(){var a='verdocs-field-payment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;position:relative;border:1px solid #cfa;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-payment.disabled{opacity:0.5}verdocs-field-payment button,verdocs-field-payment div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-field-payment button{color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-payment button.hide{display:none}verdocs-field-payment input{float:left;font-family:Arial, sans-serif}verdocs-field-payment select{position:absolute;font-family:Arial, sans-serif;background:linear-gradient(55deg, transparent 50%, #333 50%), linear-gradient(125deg, #333 50%, transparent 50%), linear-gradient(to right, transparent, transparent);background-position:calc(100% - 7px) 4px, calc(100% - 3px) 4px, 100% 0;background-size:5px 5px, 5px 5px, 2.5em 2.5em;background-repeat:no-repeat;-webkit-appearance:none;-moz-appearance:none;appearance:none}verdocs-field-payment .frame{width:100%;height:100%;background-size:contain;text-align:left}verdocs-field-payment .frame img{position:absolute;height:auto;width:100%}verdocs-field-payment.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var o=e("verdocs_field_payment",function(){function e(e){i(this,e);this.signatureComplete=t(this,"signatureComplete",7);this.initialComplete=t(this,"initialComplete",7);this._fields=[];this.signatureFile=null;this.initialFile=null;this.focusOrderNumber=-1;this.focusFieldName="";this.activeElement=null;this.showError={pageNum:-1,fieldIndex:-1,type:null};this.dialogOpened=false;this.closeAllErrors=false;this.fieldsMap={};this.fieldsForCurrentSigner=[];this.fontSize=11;this.averageFontWidth=5;this.requiredFields=[];this.field=null;this.recipient=undefined;this.disabled=false;this.fields=undefined;this.pageNum=undefined;this.roleName=undefined;this.fieldId=undefined;this.recipients=undefined;this.selectedRoleName=undefined;this.pdfPages=undefined;this.currentSignature=undefined;this.currentSignatureId=undefined;this.currentInitial=undefined;this.currentInitialId=undefined;this.focused=false;this.signed=false;this.preparedMessage=undefined;this.signatureUrl=""}e.prototype.componentWillLoad=function(){console.log("sign field",this.field);if(this.recipients&&this.recipients.length>0){var e=this.recipients.find((function(e){return e.type==="preparer"}));console.log("Found preparer",e);if(e){this.preparedMessage="Prepared by ".concat(e["full_name"])}}};e.prototype.render=function(){var e,i;var t=r(this.field);var a=(i=(e=this.disabled)!==null&&e!==void 0?e:t.disabled)!==null&&i!==void 0?i:false;console.log("Payment field",t);return n(s,{class:{focused:this.focused,disabled:a}},n("button",{class:{hide:this.signed}},"$"),this.signed?n("div",{class:"frame"}):n("div",{style:{display:"none"}}),n("img",{width:"100%",height:"100%",src:this.signatureUrl}))};return e}());o.style=a}}}));
2
+ //# sourceMappingURL=p-8095fab3.system.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as i,c as t,h as e,H as s}from"./p-ff1278ed.js";import{f as o,g as l}from"./p-7ce27ce2.js";import{g as n}from"./p-6de76553.js";const a='verdocs-field-initial{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-initial.disabled{opacity:0.5}verdocs-field-initial img{display:block;max-width:100%;max-height:100%}verdocs-field-initial button{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-initial button.hide{display:none}verdocs-field-initial.required{border:1px solid #cc0000}verdocs-field-initial.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-initial verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-initial verdocs-button-panel[data-active],verdocs-field-initial verdocs-button-panel:hover{opacity:1}verdocs-field-initial verdocs-button-panel .icon svg{fill:#333333}verdocs-field-initial verdocs-button-panel .icon:hover svg{fill:#000000}';const r='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';const d=class{constructor(e){i(this,e);this.adopt=t(this,"adopt",7);this.cancel=t(this,"cancel",7);this.fieldChange=t(this,"fieldChange",7);this.settingsPress=t(this,"settingsPress",7);this.field=null;this.recipient=undefined;this.disabled=false;this.initials="";this.editable=false;this.moveable=false;this.roleindex=0;this.tempInitials=""}async focusField(){this.handleShow()}hideDialog(){var i;(i=this.dialog)===null||i===void 0?void 0:i.remove();this.dialog=null}handleAdopt(i){var t;console.log("[INITIAL] Adopted initials");this.tempInitials=i.detail;(t=this.fieldChange)===null||t===void 0?void 0:t.emit(this.tempInitials);this.hideDialog()}handleShow(){this.dialog=document.createElement("verdocs-initial-dialog");this.dialog.open=true;this.dialog.initials=this.recipient?o(this.recipient.full_name):this.initials;this.dialog.addEventListener("cancel",(()=>this.hideDialog()));this.dialog.addEventListener("adopt",(i=>this.handleAdopt(i)));document.body.append(this.dialog)}render(){var i,t;const o=l(this.field);const a=this.tempInitials||o.base64;const d=(t=(i=this.disabled)!==null&&i!==void 0?i:o.disabled)!==null&&t!==void 0?t:false;const c=this.field["rgba"]||n(this.roleindex);return e(s,{class:{required:o.required,disabled:d},style:{backgroundColor:c}},a?e("img",{src:this.tempInitials||o.base64,alt:"Initials"}):e("button",{class:{},onClick:()=>!d&&this.handleShow()},"Initials"),this.editable&&e("verdocs-button-panel",{icon:r},e("h6",null,"Field Settings"),e("form",null,e("verdocs-select-input",{label:"Recipient",options:[{label:"Buyer",value:"Buyer"},{label:"Seller",value:"Seller"}]}),e("verdocs-text-input",{label:"Field Name",value:"",placeholder:"Stored field name...",onInput:i=>console.log("ipt",i)}),e("verdocs-text-input",{label:"Placeholder",value:"",placeholder:"Placeholder text...",onInput:i=>console.log("ipt",i)}))))}};d.style=a;export{d as verdocs_field_initial};
2
- //# sourceMappingURL=p-036fc9f9.entry.js.map
1
+ import{r as i,c as t,h as e,H as s}from"./p-ff1278ed.js";import{f as o,g as l}from"./p-92b0fc42.js";import{g as n}from"./p-6de76553.js";const a='verdocs-field-initial{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:83px;height:36px;display:block;font-size:11px;letter-spacing:0.3px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-initial.disabled{opacity:0.5}verdocs-field-initial img{display:block;max-width:100%;max-height:100%}verdocs-field-initial button{-webkit-box-sizing:border-box;box-sizing:border-box;border:none;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px}verdocs-field-initial button.hide{display:none}verdocs-field-initial.required{border:1px solid #cc0000}verdocs-field-initial.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-initial verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-initial verdocs-button-panel[data-active],verdocs-field-initial verdocs-button-panel:hover{opacity:1}verdocs-field-initial verdocs-button-panel .icon svg{fill:#333333}verdocs-field-initial verdocs-button-panel .icon:hover svg{fill:#000000}';const r='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';const d=class{constructor(e){i(this,e);this.adopt=t(this,"adopt",7);this.cancel=t(this,"cancel",7);this.fieldChange=t(this,"fieldChange",7);this.settingsPress=t(this,"settingsPress",7);this.field=null;this.recipient=undefined;this.disabled=false;this.initials="";this.editable=false;this.moveable=false;this.roleindex=0;this.tempInitials=""}async focusField(){this.handleShow()}hideDialog(){var i;(i=this.dialog)===null||i===void 0?void 0:i.remove();this.dialog=null}handleAdopt(i){var t;console.log("[INITIAL] Adopted initials");this.tempInitials=i.detail;(t=this.fieldChange)===null||t===void 0?void 0:t.emit(this.tempInitials);this.hideDialog()}handleShow(){this.dialog=document.createElement("verdocs-initial-dialog");this.dialog.open=true;this.dialog.initials=this.recipient?o(this.recipient.full_name):this.initials;this.dialog.addEventListener("cancel",(()=>this.hideDialog()));this.dialog.addEventListener("adopt",(i=>this.handleAdopt(i)));document.body.append(this.dialog)}render(){var i,t;const o=l(this.field);const a=this.tempInitials||o.base64;const d=(t=(i=this.disabled)!==null&&i!==void 0?i:o.disabled)!==null&&t!==void 0?t:false;const c=this.field["rgba"]||n(this.roleindex);return e(s,{class:{required:o.required,disabled:d},style:{backgroundColor:c}},a?e("img",{src:this.tempInitials||o.base64,alt:"Initials"}):e("button",{class:{},onClick:()=>!d&&this.handleShow()},"Initials"),this.editable&&e("verdocs-button-panel",{icon:r},e("h6",null,"Field Settings"),e("form",null,e("verdocs-select-input",{label:"Recipient",options:[{label:"Buyer",value:"Buyer"},{label:"Seller",value:"Seller"}]}),e("verdocs-text-input",{label:"Field Name",value:"",placeholder:"Stored field name...",onInput:i=>console.log("ipt",i)}),e("verdocs-text-input",{label:"Placeholder",value:"",placeholder:"Placeholder text...",onInput:i=>console.log("ipt",i)}))))}};d.style=a;export{d as verdocs_field_initial};
2
+ //# sourceMappingURL=p-868f497f.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,c as t,h as s,H as i}from"./p-ff1278ed.js";import"./p-8efc9749.js";import{V as o}from"./p-becd8d7e.js";import{l as n}from"./p-0a3d0ca9.js";import{S as l}from"./p-7a1b2643.js";import"./p-d534fffb.js";import"./p-cb7d9ff5.js";import"./p-5ea05a1d.js";import"./p-92b0fc42.js";const r='verdocs-build{display:-ms-flexbox;display:flex;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}';const a=class{constructor(s){e(this,s);this.sdkError=t(this,"sdkError",7);this.fields=[];this.endpoint=o.getDefault();this.templateId=null;this.step="create";this.pdfUrl=null;this.template=null}async componentWillLoad(){var e,t,s;this.endpoint.loadSession();if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return}if(!this.templateId){console.log(`[BUILD] No template ID specified, showing upload option`);this.step="create";return}try{console.log(`[BUILD] Loading template ${this.templateId}`);await n(this.endpoint,this.templateId);this.step="fields"}catch(i){console.log("[BUILD] Error loading template",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new l(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(s=i.response)===null||s===void 0?void 0:s.data))}}handleCancel(e){console.log("Cancel",e.detail);this.step=""}handleTemplateCreated(e){console.log("Created",e.detail);this.step="properties"}handlePropertiesUpdated(e){console.log("updated",e.detail);this.step="recipients"}handleRecipientsUpdated(e){console.log("updated",e.detail);this.step="fields"}render(){return s(i,null,this.step==="create"&&s("verdocs-template-create",{onCancel:e=>this.handleCancel(e),onNext:e=>this.handleTemplateCreated(e)}),this.step==="properties"&&s("verdocs-template-properties",{onCancel:e=>this.handleCancel(e),onNext:e=>this.handlePropertiesUpdated(e)}),this.step==="recipients"&&s("verdocs-template-recipients",{onCancel:e=>this.handleCancel(e),onNext:e=>this.handleRecipientsUpdated(e)}),this.step==="fields"&&s("verdocs-template-fields",{onCancel:e=>this.handleCancel(e),onNext:e=>this.handleCancel(e)}))}};a.style=r;export{a as verdocs_build};
2
+ //# sourceMappingURL=p-9236d9df.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["src/components/embeds/verdocs-build/verdocs-build.scss?tag=verdocs-build","src/components/embeds/verdocs-build/verdocs-build.tsx"],"names":["verdocsBuildCss","VerdocsBuild","this","fields","VerdocsEndpoint","getDefault","[object Object]","endpoint","loadSession","session","console","log","templateId","step","loadTemplate","e","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","detail","h","Host","onCancel","handleCancel","onNext","handleTemplateCreated","handlePropertiesUpdated","handleRecipientsUpdated"],"mappings":"qQAAA,MAAMA,EAAkB,oOCcXC,EAAY,kEAqBvBC,KAAAC,OAA2B,iBAjBSC,EAAgBC,6BAKhB,eAQpB,qBACE,mBACoB,KAItCC,oCACEJ,KAAKK,SAASC,cACd,IAAKN,KAAKK,SAASE,QAAS,CAC1BC,QAAQC,IAAI,kEACZ,OAGF,IAAKT,KAAKU,WAAY,CACpBF,QAAQC,IAAI,2DACZT,KAAKW,KAAO,SACZ,OAGF,IACEH,QAAQC,IAAI,4BAA4BT,KAAKU,oBACvCE,EAAaZ,KAAKK,SAAUL,KAAKU,YACvCV,KAAKW,KAAO,SACZ,MAAOE,GACPL,QAAQC,IAAI,iCAAkCI,IAC9CC,EAAAd,KAAKe,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,QAIhFnB,aAAaS,GACXL,QAAQC,IAAI,SAAUI,EAAEW,QACxBxB,KAAKW,KAAO,GAGdP,sBAAsBS,GACpBL,QAAQC,IAAI,UAAWI,EAAEW,QACzBxB,KAAKW,KAAO,aAGdP,wBAAwBS,GACtBL,QAAQC,IAAI,UAAWI,EAAEW,QACzBxB,KAAKW,KAAO,aAGdP,wBAAwBS,GACtBL,QAAQC,IAAI,UAAWI,EAAEW,QACzBxB,KAAKW,KAAO,SAGdP,SACE,OACEqB,EAACC,EAAI,KACF1B,KAAKW,OAAS,UAAYc,EAAA,0BAAA,CAAyBE,SAAUd,GAAKb,KAAK4B,aAAaf,GAAIgB,OAAQhB,GAAKb,KAAK8B,sBAAsBjB,KAChIb,KAAKW,OAAS,cAAgBc,EAAA,8BAAA,CAA6BE,SAAUd,GAAKb,KAAK4B,aAAaf,GAAIgB,OAAQhB,GAAKb,KAAK+B,wBAAwBlB,KAC1Ib,KAAKW,OAAS,cAAgBc,EAAA,8BAAA,CAA6BE,SAAUd,GAAKb,KAAK4B,aAAaf,GAAIgB,OAAQhB,GAAKb,KAAKgC,wBAAwBnB,KAC1Ib,KAAKW,OAAS,UAAYc,EAAA,0BAAA,CAAyBE,SAAUd,GAAKb,KAAK4B,aAAaf,GAAIgB,OAAQhB,GAAKb,KAAK4B,aAAaf","sourcesContent":["@import '../../../theme.scss';\n\nverdocs-build {\n display: flex;\n font-family: $verdocs-primary-font;\n justify-content: center;\n align-items: center;\n}\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {ITemplate, ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {Component, Prop, State, h, Event, EventEmitter, Host} from '@stencil/core';\nimport {loadTemplate} from '../../../utils/Templates';\nimport {SDKError} from '../../../utils/errors';\n\n/**\n * Display a template building experience.\n */\n@Component({\n tag: 'verdocs-build',\n styleUrl: 'verdocs-build.scss',\n shadow: false,\n})\nexport class VerdocsBuild {\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 @State() step = 'create';\n @State() pdfUrl = null;\n @State() template: ITemplate | null = null;\n\n fields: ITemplateField[] = [];\n\n async componentWillLoad() {\n this.endpoint.loadSession();\n if (!this.endpoint.session) {\n console.log('[BUILD] Unable to start builder session, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n console.log(`[BUILD] No template ID specified, showing upload option`);\n this.step = 'create';\n return;\n }\n\n try {\n console.log(`[BUILD] Loading template ${this.templateId}`);\n await loadTemplate(this.endpoint, this.templateId);\n this.step = 'fields';\n } catch (e) {\n console.log('[BUILD] Error loading template', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleCancel(e: any) {\n console.log('Cancel', e.detail);\n this.step = '';\n }\n\n handleTemplateCreated(e: any) {\n console.log('Created', e.detail);\n this.step = 'properties';\n }\n\n handlePropertiesUpdated(e: any) {\n console.log('updated', e.detail);\n this.step = 'recipients';\n }\n\n handleRecipientsUpdated(e: any) {\n console.log('updated', e.detail);\n this.step = 'fields';\n }\n\n render() {\n return (\n <Host>\n {this.step === 'create' && <verdocs-template-create onCancel={e => this.handleCancel(e)} onNext={e => this.handleTemplateCreated(e)} />}\n {this.step === 'properties' && <verdocs-template-properties onCancel={e => this.handleCancel(e)} onNext={e => this.handlePropertiesUpdated(e)} />}\n {this.step === 'recipients' && <verdocs-template-recipients onCancel={e => this.handleCancel(e)} onNext={e => this.handleRecipientsUpdated(e)} />}\n {this.step === 'fields' && <verdocs-template-fields onCancel={e => this.handleCancel(e)} onNext={e => this.handleCancel(e)} />}\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["src/components/embeds/verdocs-build/verdocs-build.scss?tag=verdocs-build","src/components/embeds/verdocs-build/verdocs-build.tsx"],"names":["verdocsBuildCss","VerdocsBuild","this","fields","VerdocsEndpoint","getDefault","[object Object]","endpoint","loadSession","session","console","log","templateId","step","loadTemplate","e","_a","sdkError","emit","SDKError","message","_b","response","status","_c","data","detail","h","Host","onCancel","handleCancel","onNext","handleTemplateCreated","handlePropertiesUpdated","handleRecipientsUpdated"],"mappings":"6RAAA,MAAMA,EAAkB,oOCcXC,EAAY,kEAqBvBC,KAAAC,OAA2B,iBAjBSC,EAAgBC,6BAKhB,eAQpB,qBACE,mBACoB,KAItCC,oCACEJ,KAAKK,SAASC,cACd,IAAKN,KAAKK,SAASE,QAAS,CAC1BC,QAAQC,IAAI,kEACZ,OAGF,IAAKT,KAAKU,WAAY,CACpBF,QAAQC,IAAI,2DACZT,KAAKW,KAAO,SACZ,OAGF,IACEH,QAAQC,IAAI,4BAA4BT,KAAKU,oBACvCE,EAAaZ,KAAKK,SAAUL,KAAKU,YACvCV,KAAKW,KAAO,SACZ,MAAOE,GACPL,QAAQC,IAAI,iCAAkCI,IAC9CC,EAAAd,KAAKe,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,QAIhFnB,aAAaS,GACXL,QAAQC,IAAI,SAAUI,EAAEW,QACxBxB,KAAKW,KAAO,GAGdP,sBAAsBS,GACpBL,QAAQC,IAAI,UAAWI,EAAEW,QACzBxB,KAAKW,KAAO,aAGdP,wBAAwBS,GACtBL,QAAQC,IAAI,UAAWI,EAAEW,QACzBxB,KAAKW,KAAO,aAGdP,wBAAwBS,GACtBL,QAAQC,IAAI,UAAWI,EAAEW,QACzBxB,KAAKW,KAAO,SAGdP,SACE,OACEqB,EAACC,EAAI,KACF1B,KAAKW,OAAS,UAAYc,EAAA,0BAAA,CAAyBE,SAAUd,GAAKb,KAAK4B,aAAaf,GAAIgB,OAAQhB,GAAKb,KAAK8B,sBAAsBjB,KAChIb,KAAKW,OAAS,cAAgBc,EAAA,8BAAA,CAA6BE,SAAUd,GAAKb,KAAK4B,aAAaf,GAAIgB,OAAQhB,GAAKb,KAAK+B,wBAAwBlB,KAC1Ib,KAAKW,OAAS,cAAgBc,EAAA,8BAAA,CAA6BE,SAAUd,GAAKb,KAAK4B,aAAaf,GAAIgB,OAAQhB,GAAKb,KAAKgC,wBAAwBnB,KAC1Ib,KAAKW,OAAS,UAAYc,EAAA,0BAAA,CAAyBE,SAAUd,GAAKb,KAAK4B,aAAaf,GAAIgB,OAAQhB,GAAKb,KAAK4B,aAAaf","sourcesContent":["@import '../../../theme.scss';\n\nverdocs-build {\n display: flex;\n font-family: $verdocs-primary-font;\n justify-content: center;\n align-items: center;\n}\n","import {VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {ITemplate, ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {Component, Prop, State, h, Event, EventEmitter, Host} from '@stencil/core';\nimport {loadTemplate} from '../../../utils/Templates';\nimport {SDKError} from '../../../utils/errors';\n\n/**\n * Display a template building experience.\n */\n@Component({\n tag: 'verdocs-build',\n styleUrl: 'verdocs-build.scss',\n shadow: false,\n})\nexport class VerdocsBuild {\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 @State() step = 'create';\n @State() pdfUrl = null;\n @State() template: ITemplate | null = null;\n\n fields: ITemplateField[] = [];\n\n async componentWillLoad() {\n this.endpoint.loadSession();\n if (!this.endpoint.session) {\n console.log('[BUILD] Unable to start builder session, must be authenticated');\n return;\n }\n\n if (!this.templateId) {\n console.log(`[BUILD] No template ID specified, showing upload option`);\n this.step = 'create';\n return;\n }\n\n try {\n console.log(`[BUILD] Loading template ${this.templateId}`);\n await loadTemplate(this.endpoint, this.templateId);\n this.step = 'fields';\n } catch (e) {\n console.log('[BUILD] Error loading template', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleCancel(e: any) {\n console.log('Cancel', e.detail);\n this.step = '';\n }\n\n handleTemplateCreated(e: any) {\n console.log('Created', e.detail);\n this.step = 'properties';\n }\n\n handlePropertiesUpdated(e: any) {\n console.log('updated', e.detail);\n this.step = 'recipients';\n }\n\n handleRecipientsUpdated(e: any) {\n console.log('updated', e.detail);\n this.step = 'fields';\n }\n\n render() {\n return (\n <Host>\n {this.step === 'create' && <verdocs-template-create onCancel={e => this.handleCancel(e)} onNext={e => this.handleTemplateCreated(e)} />}\n {this.step === 'properties' && <verdocs-template-properties onCancel={e => this.handleCancel(e)} onNext={e => this.handlePropertiesUpdated(e)} />}\n {this.step === 'recipients' && <verdocs-template-recipients onCancel={e => this.handleCancel(e)} onNext={e => this.handleRecipientsUpdated(e)} />}\n {this.step === 'fields' && <verdocs-template-fields onCancel={e => this.handleCancel(e)} onNext={e => this.handleCancel(e)} />}\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ function e(e,t){return e*t}const t=(e,t)=>Array(t).fill(1).map(((t,n)=>n+e));const n=e=>e.split(" ").map((e=>e[0])).join("");const c=e=>{switch(e.type){case"attachment":case"payment":return 24;case"checkbox":case"checkbox_group":case"radio_button_group":return 14;case"signature":case"initial":return 82}return 150};const s=e=>{switch(e.type){case"attachment":case"payment":return 24;case"checkbox":case"checkbox_group":case"radio_button_group":return 14;case"signature":case"initial":return 41}return 50};const o=(t,n,o,r,a)=>{var i,u,d,l;const f=n.setting||n.settings;let{x:p=0,y:b=0,width:x=c(n),height:g=s(n)}=f;const h=a!==undefined&&f.options[a]?f.options[a]:null;if(h){p=(i=h.x)!==null&&i!==void 0?i:p;b=(u=h.y)!==null&&u!==void 0?u:b;x=(d=h.width)!==null&&d!==void 0?d:x;g=(l=h.height)!==null&&l!==void 0?l:g}t.style.width=`${x}px`;t.style.height=`${g}px`;t.style.position="absolute";t.style.left=`${e(o,p)}px`;t.style.bottom=`${e(r,b)}px`;t.style.transform=`scale(${o}, ${r})`};const r=e=>`verdocs-doc-fld-${e.name}`;const a=(e,t)=>`verdocs-doc-fld-${e.name}-${t}`;const i=(e,t,n,c,s,i=false,u=false)=>{const d=document.getElementById(t.containerId+"-controls");if(!d){return}switch(e.type){case"attachment":case"date":case"dropdown":case"initial":case"payment":case"signature":case"timestamp":case"textarea":case"textbox":{const a=r(e);const l=document.getElementById(a);if(l){o(l,e,t.xScale,t.yScale);return}const f=document.createElement(`verdocs-field-${e.type}`);f.field=e;f.setAttribute("id",a);f.setAttribute("roleindex",n);if(s){f.setAttribute("disabled",true)}if(i){f.setAttribute("editable",true)}if(u){f.setAttribute("draggable",true)}f.addEventListener("fieldChange",(t=>c(e,t)));o(f,e,t.xScale,t.yScale);d.appendChild(f);return f}case"checkbox_group":(e.settings||e.setting||{}).options.forEach(((r,i)=>{const u=a(e,i);const l=document.getElementById(u);if(l){o(l,e,t.xScale,t.yScale);return}const f=document.createElement(`verdocs-field-checkbox`);f.field=e;f.setAttribute("id",u);f.setAttribute("roleindex",n);f.setAttribute("option",i);if(s){f.setAttribute("disabled",true)}f.addEventListener("fieldChange",(t=>c(e,t)));o(f,e,t.xScale,t.yScale);d.appendChild(f);return f}));break;case"radio_button_group":(e.settings||e.setting||{}).options.forEach(((r,i)=>{const u=a(e,i);const l=document.getElementById(u);if(l){o(l,e,t.xScale,t.yScale);return}const f=document.createElement(`verdocs-field-radio-button`);f.field=e;f.setAttribute("id",u);f.setAttribute("roleindex",n);f.setAttribute("option",i);if(s){f.setAttribute("disabled",true)}f.addEventListener("fieldChange",(t=>c(e,t)));o(f,e,t.xScale,t.yScale,i);d.appendChild(f);return f}));break;default:console.log("[PREVIEW] Skipping unsupported field type",e);return null}};const u=(e,t)=>e.indexOf(t)||0;const d=e=>{if(e.setting){return e.setting}if(e.settings){return e.settings}return{x:0,y:0,required:false,disabled:false,result:"",value:""}};const l=(e,t,n)=>{const c=e.style.transform;const s=[...c.matchAll(/(\w+)\(([^)]*)\)/gi)];e.style.transform=[s.filter((e=>e[1]!==t)).map((e=>e[0])),`${t}(${n})`].join(" ")};export{u as a,r as b,e as c,n as f,d as g,t as i,i as r,o as s,l as u};
2
+ //# sourceMappingURL=p-92b0fc42.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["node_modules/@verdocs/js-sdk/Utils/Fields.js","src/utils/utils.ts"],"names":["rescale","r","n","integerSequence","start","count","Array","fill","map","_","index","fullNameToInitials","name","split","word","join","defaultWidth","field","type","defaultHeight","setControlStyles","el","xScale","yScale","option","settings","setting","x","y","width","height","optionSettings","undefined","options","_a","_b","_c","_d","style","position","left","bottom","transform","getFieldId","getFieldOptionId","renderDocumentField","docPage","roleIndex","handleFieldChange","disabled","editable","draggable","controlsDiv","document","getElementById","containerId","id","existingField","createElement","setAttribute","addEventListener","e","appendChild","forEach","checkboxIndex","cbEl","buttonIndex","console","log","getRoleIndex","roles","role","indexOf","getFieldSettings","required","result","value","updateCssTransform","key","currentTransform","components","matchAll","filter","component"],"mappings":"AAqBO,SAASA,EAAQC,EAAGC,GACvB,OAAOD,EAAIC,QCfFC,EAAkB,CAACC,EAAeC,IAC7CC,MAAMD,GACHE,KAAK,GACLC,KAAI,CAACC,EAAGC,IAAUA,EAAQN,UAElBO,EAAsBC,GACjCA,EACGC,MAAM,KACNL,KAAIM,GAAQA,EAAK,KACjBC,KAAK,IAEH,MAAMC,EAAgBC,IAC3B,OAAQA,EAAMC,MACZ,IAAK,aACL,IAAK,UACH,OAAO,GACT,IAAK,WACL,IAAK,iBACL,IAAK,qBACH,OAAO,GACT,IAAK,YACL,IAAK,UACH,OAAO,GAGX,OAAO,KAGF,MAAMC,EAAiBF,IAC5B,OAAQA,EAAMC,MACZ,IAAK,aACL,IAAK,UACH,OAAO,GACT,IAAK,WACL,IAAK,iBACL,IAAK,qBACH,OAAO,GACT,I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) * yRatio;\n}\nexport function getRLeft(x, ratio) {\n return x * ratio;\n}\nexport function getRValue(y, ratio) {\n return y * ratio;\n}\nexport function blobToBase64(image) {\n var fileReader = new FileReader();\n return new Promise(function (resolve, reject) {\n fileReader.onerror = function () {\n reject(new DOMException('Problem reading blob.'));\n };\n fileReader.onload = function () {\n resolve(fileReader.result);\n };\n fileReader.readAsDataURL(image);\n });\n}\nexport function rescale(r, n) {\n return r * n;\n}\n","// These should probably all move to JS-SDK\nimport {rescale} from '@verdocs/js-sdk/Utils/Fields';\n// import {getRGBA} from '@verdocs/js-sdk/Utils/Colors';\nimport {ITemplateField} from '@verdocs/js-sdk/Templates/Types';\nimport {IDocumentField} from '@verdocs/js-sdk/Envelopes/Types';\nimport {IDocumentPageInfo} from './Types';\n\nexport const integerSequence = (start: number, count: number): number[] =>\n Array(count)\n .fill(1)\n .map((_, index) => index + start);\n\nexport const fullNameToInitials = (name: string) =>\n name\n .split(' ')\n .map(word => word[0])\n .join('');\n\nexport const defaultWidth = (field: ITemplateField | IDocumentField) => {\n switch (field.type) {\n case 'attachment':\n case 'payment':\n return 24;\n case 'checkbox':\n case 'checkbox_group':\n case 'radio_button_group':\n return 14;\n case 'signature':\n case 'initial':\n return 82;\n }\n\n return 150;\n};\n\nexport const defaultHeight = (field: ITemplateField | IDocumentField) => {\n switch (field.type) {\n case 'attachment':\n case 'payment':\n return 24;\n case 'checkbox':\n case 'checkbox_group':\n case 'radio_button_group':\n return 14;\n case 'signature':\n case 'initial':\n return 41;\n }\n\n return 50;\n};\n\nexport const setControlStyles = (el: HTMLElement, field: ITemplateField | IDocumentField, xScale: number, yScale: number, option?: number) => {\n const settings = (field as ITemplateField).setting || (field as IDocumentField).settings;\n let {x = 0, y = 0, width = defaultWidth(field), height = defaultHeight(field)} = settings;\n\n const optionSettings = option !== undefined && settings.options[option] ? settings.options[option] : null;\n if (optionSettings) {\n x = optionSettings.x ?? x;\n y = optionSettings.y ?? y;\n width = optionSettings.width ?? width;\n height = optionSettings.height ?? height;\n }\n\n el.style.width = `${width}px`;\n el.style.height = `${height}px`;\n el.style.position = 'absolute';\n el.style.left = `${rescale(xScale, x)}px`;\n el.style.bottom = `${rescale(yScale, y)}px`;\n el.style.transform = `scale(${xScale}, ${yScale})`;\n // el.style.backgroundColor = field['rgba'] || getRGBA(roleIndex);\n};\n\nexport const getFieldId = (field: ITemplateField | IDocumentField) => {\n return `verdocs-doc-fld-${field.name}`;\n};\n\nexport const getFieldOptionId = (field: ITemplateField | IDocumentField, index: number) => {\n return `verdocs-doc-fld-${field.name}-${index}`;\n};\n\nexport const renderDocumentField = (\n field: ITemplateField | IDocumentField,\n docPage: IDocumentPageInfo,\n roleIndex: number,\n handleFieldChange: (field: ITemplateField | IDocumentField, e: any, optionId?: string) => void,\n disabled: boolean,\n editable: boolean = false,\n draggable: boolean = false,\n) => {\n const controlsDiv = document.getElementById(docPage.containerId + '-controls');\n if (!controlsDiv) {\n return;\n }\n\n switch (field.type) {\n case 'attachment':\n case 'date':\n case 'dropdown':\n case 'initial':\n case 'payment':\n case 'signature':\n case 'timestamp':\n case 'textarea':\n case 'textbox': {\n const id = getFieldId(field);\n const existingField = document.getElementById(id);\n if (existingField) {\n setControlStyles(existingField, field, docPage.xScale, docPage.yScale);\n return;\n }\n\n const el: any = document.createElement(`verdocs-field-${field.type}`);\n el.field = field;\n el.setAttribute('id', id);\n el.setAttribute('roleindex', roleIndex);\n if (disabled) {\n el.setAttribute('disabled', true);\n }\n if (editable) {\n el.setAttribute('editable', true);\n }\n if (draggable) {\n el.setAttribute('draggable', true);\n }\n el.addEventListener('fieldChange', e => handleFieldChange(field, e));\n setControlStyles(el, field, docPage.xScale, docPage.yScale);\n controlsDiv.appendChild(el);\n\n return el;\n }\n\n case 'checkbox_group':\n ((field as any).settings || (field as any).setting || {}).options.forEach((_, checkboxIndex) => {\n const id = getFieldOptionId(field, checkboxIndex);\n const existingField = document.getElementById(id);\n if (existingField) {\n setControlStyles(existingField, field, docPage.xScale, docPage.yScale);\n return;\n }\n\n const cbEl: any = document.createElement(`verdocs-field-checkbox`);\n cbEl.field = field;\n cbEl.setAttribute('id', id);\n cbEl.setAttribute('roleindex', roleIndex);\n cbEl.setAttribute('option', checkboxIndex);\n if (disabled) {\n cbEl.setAttribute('disabled', true);\n }\n cbEl.addEventListener('fieldChange', e => handleFieldChange(field, e));\n setControlStyles(cbEl, field, docPage.xScale, docPage.yScale);\n controlsDiv.appendChild(cbEl);\n\n return cbEl;\n });\n\n break;\n\n case 'radio_button_group':\n ((field as any).settings || (field as any).setting || {}).options.forEach((_, buttonIndex) => {\n const id = getFieldOptionId(field, buttonIndex);\n const existingField = document.getElementById(id);\n if (existingField) {\n setControlStyles(existingField, field, docPage.xScale, docPage.yScale);\n return;\n }\n\n const cbEl: any = document.createElement(`verdocs-field-radio-button`);\n cbEl.field = field;\n cbEl.setAttribute('id', id);\n cbEl.setAttribute('roleindex', roleIndex);\n cbEl.setAttribute('option', buttonIndex);\n if (disabled) {\n cbEl.setAttribute('disabled', true);\n }\n cbEl.addEventListener('fieldChange', e => handleFieldChange(field, e));\n setControlStyles(cbEl, field, docPage.xScale, docPage.yScale, buttonIndex);\n controlsDiv.appendChild(cbEl);\n\n return cbEl;\n });\n\n break;\n\n // case 'attachment':\n // el = document.createElement('verdocs-field-attachment');\n // el.setAttribute('value', result || '');\n // break;\n // case 'payment':\n // el = document.createElement('verdocs-field-payment');\n // break;\n default:\n console.log('[PREVIEW] Skipping unsupported field type', field);\n return null;\n }\n};\n\nexport const getRoleIndex = (roles: string[], role: string) => roles.indexOf(role) || 0;\n\n// TODO: We can clean this up a lot if we alter the API to emit both setting and settings regardless of the source type,\n// but then merge the SDK types to encourage developers to use just `settings`.\nexport const getFieldSettings = (field: ITemplateField | IDocumentField) => {\n if ((field as ITemplateField).setting) {\n return (field as ITemplateField).setting;\n }\n\n if ((field as IDocumentField).settings) {\n return (field as IDocumentField).settings;\n }\n\n return {x: 0, y: 0, required: false, disabled: false, result: '', value: ''};\n};\n\n/**\n * Helper function to safely set/update components in a CSS transform attribute. Transform is normally set as a string of\n * `operation1(param) operation2(param) ...` components, which makes updating them a bit of a pain. This will remove the\n * specified component if it's already set and replace it with the new value, without touching the other components that\n * may already be set. Note that this operation moves the component to the end of the transform chain so it's not meant\n * to be used for order-sensitive components e.g. translate-then-rotate.\n */\nexport const updateCssTransform = (el: HTMLElement, key: string, value: string) => {\n // e.g. 'scale(1.87908, 1.87908) translate(0px, 0px);'\n const currentTransform = el.style.transform;\n // e.g. ['scale(1.87908, 1.87908)', 'scale', '1.87908, 1.87908', ...], [ 'translate(0px, 0px)', 'translate', '0px, 0px']]\n const components = [...currentTransform.matchAll(/(\\w+)\\(([^)]*)\\)/gi)];\n el.style.transform = [\n components //\n .filter(component => component[1] !== key) // Remove the entry if it's already set\n .map(component => component[0]), // Convert back the remaining entries\n `${key}(${value})`,\n ].join(' ');\n};\n"]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as s,h as e}from"./p-ff1278ed.js";import"./p-8efc9749.js";import{V as i}from"./p-629237fc.js";import{S as o}from"./p-7a1b2643.js";var n=function(t,s){return t.api.post("/authentication/login",s).then((function(t){return t.data}))};const l='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}';const a=class{constructor(e){t(this,e);this.authenticated=s(this,"authenticated",7);this.sdkError=s(this,"sdkError",7);this.endpoint=i.getDefault();this.visible=true;this.logo="https://verdocs.com/assets/blue-logo.svg";this.debug=false;this.isAuthenticated=false;this.displayMode="login";this.username="";this.password="";this.loggingIn=false;this.activeSession=null;this.loginError=null}componentWillLoad(){var t,s;this.endpoint.loadSession();if(this.endpoint.session){console.log("[AUTH] Authenticated");this.isAuthenticated=true;this.activeSession=this.endpoint.session;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:true,session:this.endpoint.session})}else{console.log("[AUTH] Anonymous");(s=this.authenticated)===null||s===void 0?void 0:s.emit({authenticated:false,session:null})}}handleLogin(){this.loggingIn=true;n(this.endpoint,{username:this.username,password:this.password}).then((t=>{var s;this.loggingIn=false;this.endpoint.setToken(t.accessToken);this.activeSession=this.endpoint.session;this.isAuthenticated=true;(s=this.authenticated)===null||s===void 0?void 0:s.emit({authenticated:true,session:this.endpoint.session})})).catch((t=>{var s,e,i,n,l;console.log("[AUTH] Authentication error",t.response,JSON.stringify(t));this.loggingIn=false;this.activeSession=null;(s=this.authenticated)===null||s===void 0?void 0:s.emit({authenticated:false,session:null});(e=this.sdkError)===null||e===void 0?void 0:e.emit(new o(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(n=t.response)===null||n===void 0?void 0:n.data));if(((l=t===null||t===void 0?void 0:t.response)===null||l===void 0?void 0:l.status)===403){this.loginError="Please check your username and password and try again."}}))}handleLogout(){var t;this.endpoint.clearSession();this.isAuthenticated=false;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:false,session:null})}handleClearError(){this.loginError=null}render(){if(!this.visible){return e("div",{style:{display:"none"}},"Verdocs Auth Placeholder")}if(this.isAuthenticated){if(this.debug){return e("div",{class:"status-result debug"},e("verdocs-button",{label:"Logout",disabled:this.loggingIn,onClick:()=>this.handleLogout()}))}return e("div",{class:"status-result"},"Authenticated")}if(this.displayMode==="signup"){return e("div",{class:"signup-form"},e("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),e("h3",null,"Sign up for an account"),e("h4",null,"Already have an account?",e("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.loggingIn})),e("form",{onSubmit:()=>this.handleLogin()},e("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:t=>this.username=t.target.value,disabled:this.loggingIn}),e("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:t=>this.password=t.target.value,disabled:this.loggingIn}),e("verdocs-button",{label:"Signup",disabled:this.loggingIn,onClick:()=>this.handleLogin(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}return e("div",{class:"login-form"},e("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),e("h3",null,"Log in to your account"),e("h4",null,"Don't have an account?",e("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.loggingIn})),e("form",{onSubmit:()=>this.handleLogin()},e("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:t=>this.username=t.target.value,disabled:this.loggingIn}),e("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:t=>this.password=t.target.value,disabled:this.loggingIn}),e("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.loggingIn,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),e("verdocs-button",{label:"Login",disabled:this.loggingIn,onClick:()=>this.handleLogin(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})),this.loginError?e("verdocs-ok-dialog",{heading:"Login Error",message:this.loginError,onNext:()=>this.handleClearError()}):e("div",null))}};a.style=l;export{a as verdocs_auth};
2
- //# sourceMappingURL=p-d6390915.entry.js.map
1
+ import{r as t,c as s,h as e}from"./p-ff1278ed.js";import"./p-8efc9749.js";import{V as i}from"./p-becd8d7e.js";import{S as o}from"./p-7a1b2643.js";var n=function(t,s){return t.api.post("/authentication/login",s).then((function(t){return t.data}))};const l='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}';const a=class{constructor(e){t(this,e);this.authenticated=s(this,"authenticated",7);this.sdkError=s(this,"sdkError",7);this.endpoint=i.getDefault();this.visible=true;this.logo="https://verdocs.com/assets/blue-logo.svg";this.debug=false;this.isAuthenticated=false;this.displayMode="login";this.username="";this.password="";this.loggingIn=false;this.activeSession=null;this.loginError=null}componentWillLoad(){var t,s;this.endpoint.loadSession();if(this.endpoint.session){console.log("[AUTH] Authenticated");this.isAuthenticated=true;this.activeSession=this.endpoint.session;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:true,session:this.endpoint.session})}else{console.log("[AUTH] Anonymous");(s=this.authenticated)===null||s===void 0?void 0:s.emit({authenticated:false,session:null})}}handleLogin(){this.loggingIn=true;n(this.endpoint,{username:this.username,password:this.password}).then((t=>{var s;this.loggingIn=false;this.endpoint.setToken(t.accessToken);this.activeSession=this.endpoint.session;this.isAuthenticated=true;(s=this.authenticated)===null||s===void 0?void 0:s.emit({authenticated:true,session:this.endpoint.session})})).catch((t=>{var s,e,i,n,l;console.log("[AUTH] Authentication error",t.response,JSON.stringify(t));this.loggingIn=false;this.activeSession=null;(s=this.authenticated)===null||s===void 0?void 0:s.emit({authenticated:false,session:null});(e=this.sdkError)===null||e===void 0?void 0:e.emit(new o(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(n=t.response)===null||n===void 0?void 0:n.data));if(((l=t===null||t===void 0?void 0:t.response)===null||l===void 0?void 0:l.status)===403){this.loginError="Please check your username and password and try again."}}))}handleLogout(){var t;this.endpoint.clearSession();this.isAuthenticated=false;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:false,session:null})}handleClearError(){this.loginError=null}render(){if(!this.visible){return e("div",{style:{display:"none"}},"Verdocs Auth Placeholder")}if(this.isAuthenticated){if(this.debug){return e("div",{class:"status-result debug"},e("verdocs-button",{label:"Logout",disabled:this.loggingIn,onClick:()=>this.handleLogout()}))}return e("div",{class:"status-result"},"Authenticated")}if(this.displayMode==="signup"){return e("div",{class:"signup-form"},e("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),e("h3",null,"Sign up for an account"),e("h4",null,"Already have an account?",e("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.loggingIn})),e("form",{onSubmit:()=>this.handleLogin()},e("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:t=>this.username=t.target.value,disabled:this.loggingIn}),e("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:t=>this.password=t.target.value,disabled:this.loggingIn}),e("verdocs-button",{label:"Signup",disabled:this.loggingIn,onClick:()=>this.handleLogin(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}return e("div",{class:"login-form"},e("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),e("h3",null,"Log in to your account"),e("h4",null,"Don't have an account?",e("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.loggingIn})),e("form",{onSubmit:()=>this.handleLogin()},e("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:t=>this.username=t.target.value,disabled:this.loggingIn}),e("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:t=>this.password=t.target.value,disabled:this.loggingIn}),e("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.loggingIn,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),e("verdocs-button",{label:"Login",disabled:this.loggingIn,onClick:()=>this.handleLogin(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})),this.loginError?e("verdocs-ok-dialog",{heading:"Login Error",message:this.loginError,onNext:()=>this.handleClearError()}):e("div",null))}};a.style=l;export{a as verdocs_auth};
2
+ //# sourceMappingURL=p-a59f1f82.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,c as o,h as i,H as n,F as l,a as r}from"./p-ff1278ed.js";import{a as s,u as a}from"./p-c5a43bb3.js";import"./p-8efc9749.js";import{V as t}from"./p-becd8d7e.js";import{r as d,a as c}from"./p-92b0fc42.js";import{c as v}from"./p-5ea05a1d.js";import{S as u}from"./p-7a1b2643.js";const{state:p,onChange:h}=v({envelope:null,loadProgress:0,loading:true,error:"",roleNames:[],dirty:false});h("envelope",(async e=>{if(!e){console.log("[ENVELOPESTORE] Clearing envelope");p.roleNames=[];p.dirty=false;p.loading=false;p.error="";p.loadProgress=0;return}console.log("[ENVELOPESTORE] Loaded envelope",e);p.roleNames=e.recipients.map((e=>e.role_name));console.log("[ENVELOPESTORE] Loaded roles",p.roleNames)}));const g=async(e,o)=>{var i;p.envelope=null;if(!o){console.log(`[ENVELOPES] Missing required envelope ID`);return}p.error="";p.loading=true;try{console.log(`[ENVELOPES] Loading envelope ${o}`);const i=await s(e,o);if(!i){console.log("[ENVELOPES] Unable to load envelope");return}p.envelope=i;p.loading=false}catch(e){p.loading=false;p.error=((i=e===null||e===void 0?void 0:e.response)===null||i===void 0?void 0:i.status)===401?"Authentication required":e.message;console.log("[ENVELOPES] Error loading envelope",e);throw e}};const f='verdocs-view{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-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}';const b=class{constructor(i){e(this,i);this.sdkError=o(this,"sdkError",7);this.endpoint=t.getDefault();this.envelopeId=""}componentWillLoad(){this.endpoint.loadSession()}async componentDidLoad(){var e,o,i;if(!this.envelopeId){console.error(`[VIEW] Missing reuqired envelopeId`);return}try{await g(this.endpoint,this.envelopeId)}catch(n){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new u(n.message,(o=n.response)===null||o===void 0?void 0:o.status,(i=n.response)===null||i===void 0?void 0:i.data))}}async handleFieldChange(e,o,i){console.log("fieldChange",e,o);switch(e.type){case"textbox":a(this.endpoint,this.envelopeId,e.name,{prepared:false,value:o.detail}).then((e=>console.log("Update result",e))).catch((e=>{var o,i,n,l,r,s;(o=this.sdkError)===null||o===void 0?void 0:o.emit(new u(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(n=e.response)===null||n===void 0?void 0:n.data));if(((l=e.response)===null||l===void 0?void 0:l.status)===401&&((s=(r=e.response)===null||r===void 0?void 0:r.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("jwt expired")}console.log("Error updating",e)}));break;case"checkbox_group":a(this.endpoint,this.envelopeId,e.name,{prepared:false,value:{options:[{id:i,checked:o.detail}]}}).then((e=>console.log("Update result",e))).catch((e=>{var o,i,n;(o=this.sdkError)===null||o===void 0?void 0:o.emit(new u(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(n=e.response)===null||n===void 0?void 0:n.data));console.log("Error updating",e)}));break;case"radio_button_group":const n=e.settings.options.map((e=>({id:e.id,selected:i===e.id})));a(this.endpoint,this.envelopeId,e.name,{prepared:false,value:{options:n}}).then((e=>console.log("Update result",e))).catch((e=>{var o,i,n;(o=this.sdkError)===null||o===void 0?void 0:o.emit(new u(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(n=e.response)===null||n===void 0?void 0:n.data));console.log("Error updating",e)}));break;case"dropdown":a(this.endpoint,this.envelopeId,e.name,{prepared:false,value:o.detail}).then((e=>console.log("Update result",e))).catch((e=>{var o,i,n;(o=this.sdkError)===null||o===void 0?void 0:o.emit(new u(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(n=e.response)===null||n===void 0?void 0:n.data));console.log("Error updating",e)}));break;case"initial":console.log("Got initial",o.detail);break;case"signature":console.log("Got signature",o.detail);break}}handlePageRendered(e){const o=e.detail;console.log("[SIGN] Page rendered",o);p.envelope.recipients.map((e=>{const i=e.fields.filter((e=>e.page===o.pageNumber));console.log("[SIGN] Fields on page",i);i.forEach((e=>{const i=d(e,o,c(p.roleNames,e.recipient_role),this.handleFieldChange,true,false,false);console.log("rendered element",i);if(!i){return}i.addEventListener("recipientChanged",(e=>{i.setAttribute("roleindex",c(p.roleNames,e.detail))}));i.setAttribute("xScale",o.xScale);i.setAttribute("yScale",o.yScale)}))}))}render(){var e;console.log("[VIEW] Rendering",p.error,p.loading,p.envelope);if(p.loading||!p.envelope){return i(n,null,i("verdocs-loader",null))}if(p.error){return i(n,null,i("div",null,p.error))}return i(n,null,(((e=p.envelope)===null||e===void 0?void 0:e.documents)||[]).map((e=>{const o=[...(e===null||e===void 0?void 0:e.pages)||[]];o.sort(((e,o)=>e.sequence-o.sequence));return i(l,null,o.map((e=>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"}]}))))})))}get component(){return r(this)}};b.style=f;export{b as verdocs_view};
2
+ //# sourceMappingURL=p-a760546b.entry.js.map