@verdocs/web-sdk 6.10.6 → 6.12.1

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 (208) hide show
  1. package/dist/cjs/Environment-C3P2cz0J.js +14 -0
  2. package/dist/cjs/Environment-C3P2cz0J.js.map +1 -0
  3. package/dist/cjs/{Icons-TVvtZ5iL.js → Icons-Zdy_DFce.js} +16 -2
  4. package/dist/cjs/{Icons-TVvtZ5iL.js.map → Icons-Zdy_DFce.js.map} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +2 -2
  7. package/dist/cjs/verdocs-auth.cjs.entry.js +271 -15
  8. package/dist/cjs/verdocs-auth.cjs.entry.js.map +1 -1
  9. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +12 -14
  10. package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
  11. package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-preview_6.cjs.entry.js +2 -2
  15. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js.map +1 -1
  18. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  19. package/dist/collection/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.css +2 -1
  20. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +45 -1
  21. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +302 -19
  22. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js.map +1 -1
  23. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +12 -14
  24. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
  25. package/dist/collection/utils/Environment.js +4 -7
  26. package/dist/collection/utils/Environment.js.map +1 -1
  27. package/dist/collection/utils/Icons.js +12 -0
  28. package/dist/collection/utils/Icons.js.map +1 -1
  29. package/dist/components/{p-DCZz2B7h.js → p-6RWROB9R.js} +2 -2
  30. package/dist/components/p-6RWROB9R.js.map +1 -0
  31. package/dist/components/{p-i3o08M2d.js → p-B1UVXqFA.js} +2 -2
  32. package/dist/components/{p-bPe0_Dsn.js → p-B8R4luxA.js} +2 -2
  33. package/dist/components/{p-D-TexkaT.js → p-BXaR1BSS.js} +2 -2
  34. package/dist/components/{p-DL4-aTsZ.js → p-BYLm9aol.js} +2 -2
  35. package/dist/components/{p-DiYuPnJJ.js → p-Bp88Loqg.js} +2 -2
  36. package/dist/components/{p-C43B3SP_.js → p-C7JN32A9.js} +2 -2
  37. package/dist/components/{p-BDv5kBUR.js → p-C7k2AOsW.js} +2 -2
  38. package/dist/components/p-C7k2AOsW.js.map +1 -0
  39. package/dist/components/{p-DKKsPZnz.js → p-CCr_gliS.js} +2 -2
  40. package/dist/components/{p-BELGzhZw.js → p-CFau7OiC.js} +2 -2
  41. package/dist/components/{p-zTcSNwsp.js → p-Ck4pdoyc.js} +2 -2
  42. package/dist/components/{p-DZa0rMk2.js → p-CsF979IT.js} +2 -2
  43. package/dist/components/{p-CYvB5bYX.js → p-CtNpZzq1.js} +2 -2
  44. package/dist/components/{p-B6aUlIQe.js → p-CzKj8wD_.js} +2 -2
  45. package/dist/components/{p-DiwfOWXt.js → p-DJMr11ue.js} +2 -2
  46. package/dist/components/{p-CZwyK_uo.js → p-DLo5dMNn.js} +2 -2
  47. package/dist/components/{p-D1cSgqut.js → p-D_FNSGtS.js} +2 -2
  48. package/dist/components/p-DavVixMP.js +2 -0
  49. package/dist/components/p-DavVixMP.js.map +1 -0
  50. package/dist/components/{p-K_PKw6bs.js → p-DmxiVavg.js} +2 -2
  51. package/dist/components/{p-D7oMWhqM.js → p-DrNmI7Wz.js} +2 -2
  52. package/dist/components/{p-DfIxVX8-.js → p-DubfX0n1.js} +2 -2
  53. package/dist/components/{p-Dy2CRiH8.js → p-b2u0_wDk.js} +1 -1
  54. package/dist/components/p-b2u0_wDk.js.map +1 -0
  55. package/dist/components/{p-CAGp0qKc.js → p-hxWwaOcD.js} +2 -2
  56. package/dist/components/{p-BQUZjuoP.js → p-vcHtLpWY.js} +2 -2
  57. package/dist/components/verdocs-adopt-signature-dialog.js +1 -1
  58. package/dist/components/verdocs-auth.js +1 -1
  59. package/dist/components/verdocs-auth.js.map +1 -1
  60. package/dist/components/verdocs-build.js +1 -1
  61. package/dist/components/verdocs-contact-picker.js +1 -1
  62. package/dist/components/verdocs-delegate-dialog.js +1 -1
  63. package/dist/components/verdocs-field-attachment.js +1 -1
  64. package/dist/components/verdocs-field-checkbox.js +1 -1
  65. package/dist/components/verdocs-field-date.js +1 -1
  66. package/dist/components/verdocs-field-dropdown.js +1 -1
  67. package/dist/components/verdocs-field-initial.js +1 -1
  68. package/dist/components/verdocs-field-payment.js +1 -1
  69. package/dist/components/verdocs-field-radio.js +1 -1
  70. package/dist/components/verdocs-field-signature.js +1 -1
  71. package/dist/components/verdocs-field-textarea.js +1 -1
  72. package/dist/components/verdocs-field-textbox.js +1 -1
  73. package/dist/components/verdocs-field-timestamp.js +1 -1
  74. package/dist/components/verdocs-file-chooser.js +1 -1
  75. package/dist/components/verdocs-otp-dialog.js +1 -1
  76. package/dist/components/verdocs-passcode-dialog.js +1 -1
  77. package/dist/components/verdocs-preview.js +1 -1
  78. package/dist/components/verdocs-send.js +1 -1
  79. package/dist/components/verdocs-sign.js +1 -1
  80. package/dist/components/verdocs-template-attachments.js +1 -1
  81. package/dist/components/verdocs-template-document-page.js +1 -1
  82. package/dist/components/verdocs-template-fields.js +1 -1
  83. package/dist/components/verdocs-toolbar-icon.js +1 -1
  84. package/dist/custom-elements.json +2508 -0
  85. package/dist/esm/Environment-b2u0_wDk.js +12 -0
  86. package/dist/esm/Environment-b2u0_wDk.js.map +1 -0
  87. package/dist/esm/{Icons-BU5rnXp2.js → Icons-DobS6Y7w.js} +15 -3
  88. package/dist/esm/{Icons-BU5rnXp2.js.map → Icons-DobS6Y7w.js.map} +1 -1
  89. package/dist/esm/loader.js +1 -1
  90. package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +2 -2
  91. package/dist/esm/verdocs-auth.entry.js +273 -17
  92. package/dist/esm/verdocs-auth.entry.js.map +1 -1
  93. package/dist/esm/verdocs-contact-picker.entry.js +12 -14
  94. package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
  95. package/dist/esm/verdocs-field-attachment_11.entry.js +1 -1
  96. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  97. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  98. package/dist/esm/verdocs-preview_6.entry.js +2 -2
  99. package/dist/esm/verdocs-sign.entry.js +1 -1
  100. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  101. package/dist/esm/verdocs-template-document-page_2.entry.js.map +1 -1
  102. package/dist/esm/verdocs-web-sdk.js +1 -1
  103. package/dist/esm-es5/{Environment-Dy2CRiH8.js → Environment-b2u0_wDk.js} +1 -1
  104. package/dist/esm-es5/Environment-b2u0_wDk.js.map +1 -0
  105. package/dist/esm-es5/{Icons-BU5rnXp2.js → Icons-DobS6Y7w.js} +2 -2
  106. package/dist/esm-es5/{Icons-BU5rnXp2.js.map → Icons-DobS6Y7w.js.map} +1 -1
  107. package/dist/esm-es5/loader.js +1 -1
  108. package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-auth.entry.js.map +1 -1
  111. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
  113. package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-template-document-page_2.entry.js.map +1 -1
  120. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  121. package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +31 -3
  122. package/dist/types/components.d.ts +18 -7
  123. package/dist/types/utils/Icons.d.ts +2 -0
  124. package/dist/verdocs-web-sdk/{p-869024e0.system.entry.js → p-09f5670e.system.entry.js} +2 -2
  125. package/dist/verdocs-web-sdk/p-0fb8e6e0.system.entry.js +2 -0
  126. package/dist/verdocs-web-sdk/p-0fb8e6e0.system.entry.js.map +1 -0
  127. package/dist/verdocs-web-sdk/{p-e87a29a3.system.entry.js → p-298d799f.system.entry.js} +3 -3
  128. package/dist/verdocs-web-sdk/{p-734c8a8b.entry.js → p-2a6a3bc6.entry.js} +2 -2
  129. package/dist/verdocs-web-sdk/{p-46e52384.system.entry.js → p-39c54b65.system.entry.js} +2 -2
  130. package/dist/verdocs-web-sdk/p-39c54b65.system.entry.js.map +1 -0
  131. package/dist/verdocs-web-sdk/{p-62464041.system.entry.js → p-439d36b0.system.entry.js} +2 -2
  132. package/dist/verdocs-web-sdk/{p-d95705c6.entry.js → p-4930b31d.entry.js} +2 -2
  133. package/dist/verdocs-web-sdk/{p-255e1915.entry.js → p-4e0788f9.entry.js} +2 -2
  134. package/dist/verdocs-web-sdk/p-4e0788f9.entry.js.map +1 -0
  135. package/dist/verdocs-web-sdk/{p-c6f52cd7.entry.js → p-4ea0632f.entry.js} +2 -2
  136. package/dist/verdocs-web-sdk/{p-c6f52cd7.entry.js.map → p-4ea0632f.entry.js.map} +1 -1
  137. package/dist/verdocs-web-sdk/{p-c86111fd.system.entry.js → p-5404f6bf.system.entry.js} +2 -2
  138. package/dist/verdocs-web-sdk/{p-10d47bbd.entry.js → p-5cad2422.entry.js} +2 -2
  139. package/dist/verdocs-web-sdk/{p-4aee15e6.entry.js → p-932e8b9b.entry.js} +2 -2
  140. package/dist/verdocs-web-sdk/{p-6e8ce989.system.entry.js → p-99f7a0fa.system.entry.js} +2 -2
  141. package/dist/verdocs-web-sdk/{p-GqS1qR-V.system.js → p-BHF3ByWV.system.js} +2 -2
  142. package/dist/verdocs-web-sdk/{p-GqS1qR-V.system.js.map → p-BHF3ByWV.system.js.map} +1 -1
  143. package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
  144. package/dist/verdocs-web-sdk/{p-C96xjMgt.system.js → p-COHG5J4h.system.js} +1 -1
  145. package/dist/verdocs-web-sdk/p-COHG5J4h.system.js.map +1 -0
  146. package/dist/verdocs-web-sdk/{p-BU5rnXp2.js → p-DobS6Y7w.js} +2 -2
  147. package/dist/verdocs-web-sdk/{p-BU5rnXp2.js.map → p-DobS6Y7w.js.map} +1 -1
  148. package/dist/verdocs-web-sdk/{p-Dy2CRiH8.js → p-b2u0_wDk.js} +1 -1
  149. package/dist/verdocs-web-sdk/p-b2u0_wDk.js.map +1 -0
  150. package/dist/verdocs-web-sdk/{p-098b3852.system.entry.js → p-ba0d4ff5.system.entry.js} +2 -2
  151. package/dist/verdocs-web-sdk/{p-098b3852.system.entry.js.map → p-ba0d4ff5.system.entry.js.map} +1 -1
  152. package/dist/verdocs-web-sdk/p-c3e9634c.entry.js +2 -0
  153. package/dist/verdocs-web-sdk/p-c3e9634c.entry.js.map +1 -0
  154. package/dist/verdocs-web-sdk/{p-7e1f895c.entry.js → p-dd59aa9a.entry.js} +2 -2
  155. package/dist/verdocs-web-sdk/{p-c3527f3e.system.entry.js → p-f7b14409.system.entry.js} +2 -2
  156. package/dist/verdocs-web-sdk/{p-1df29abb.entry.js → p-fe404347.entry.js} +2 -2
  157. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  158. package/package.json +4 -4
  159. package/dist/cjs/Environment-CUCX3aWX.js +0 -17
  160. package/dist/cjs/Environment-CUCX3aWX.js.map +0 -1
  161. package/dist/components/p-BDv5kBUR.js.map +0 -1
  162. package/dist/components/p-CYqVJ_kJ.js +0 -2
  163. package/dist/components/p-CYqVJ_kJ.js.map +0 -1
  164. package/dist/components/p-DCZz2B7h.js.map +0 -1
  165. package/dist/components/p-Dy2CRiH8.js.map +0 -1
  166. package/dist/esm/Environment-Dy2CRiH8.js +0 -15
  167. package/dist/esm/Environment-Dy2CRiH8.js.map +0 -1
  168. package/dist/esm-es5/Environment-Dy2CRiH8.js.map +0 -1
  169. package/dist/verdocs-web-sdk/p-16d655d4.system.entry.js +0 -2
  170. package/dist/verdocs-web-sdk/p-16d655d4.system.entry.js.map +0 -1
  171. package/dist/verdocs-web-sdk/p-255e1915.entry.js.map +0 -1
  172. package/dist/verdocs-web-sdk/p-43ee0267.entry.js +0 -2
  173. package/dist/verdocs-web-sdk/p-43ee0267.entry.js.map +0 -1
  174. package/dist/verdocs-web-sdk/p-46e52384.system.entry.js.map +0 -1
  175. package/dist/verdocs-web-sdk/p-C96xjMgt.system.js.map +0 -1
  176. package/dist/verdocs-web-sdk/p-Dy2CRiH8.js.map +0 -1
  177. /package/dist/components/{p-i3o08M2d.js.map → p-B1UVXqFA.js.map} +0 -0
  178. /package/dist/components/{p-bPe0_Dsn.js.map → p-B8R4luxA.js.map} +0 -0
  179. /package/dist/components/{p-D-TexkaT.js.map → p-BXaR1BSS.js.map} +0 -0
  180. /package/dist/components/{p-DL4-aTsZ.js.map → p-BYLm9aol.js.map} +0 -0
  181. /package/dist/components/{p-DiYuPnJJ.js.map → p-Bp88Loqg.js.map} +0 -0
  182. /package/dist/components/{p-C43B3SP_.js.map → p-C7JN32A9.js.map} +0 -0
  183. /package/dist/components/{p-DKKsPZnz.js.map → p-CCr_gliS.js.map} +0 -0
  184. /package/dist/components/{p-BELGzhZw.js.map → p-CFau7OiC.js.map} +0 -0
  185. /package/dist/components/{p-zTcSNwsp.js.map → p-Ck4pdoyc.js.map} +0 -0
  186. /package/dist/components/{p-DZa0rMk2.js.map → p-CsF979IT.js.map} +0 -0
  187. /package/dist/components/{p-CYvB5bYX.js.map → p-CtNpZzq1.js.map} +0 -0
  188. /package/dist/components/{p-B6aUlIQe.js.map → p-CzKj8wD_.js.map} +0 -0
  189. /package/dist/components/{p-DiwfOWXt.js.map → p-DJMr11ue.js.map} +0 -0
  190. /package/dist/components/{p-CZwyK_uo.js.map → p-DLo5dMNn.js.map} +0 -0
  191. /package/dist/components/{p-D1cSgqut.js.map → p-D_FNSGtS.js.map} +0 -0
  192. /package/dist/components/{p-K_PKw6bs.js.map → p-DmxiVavg.js.map} +0 -0
  193. /package/dist/components/{p-D7oMWhqM.js.map → p-DrNmI7Wz.js.map} +0 -0
  194. /package/dist/components/{p-DfIxVX8-.js.map → p-DubfX0n1.js.map} +0 -0
  195. /package/dist/components/{p-CAGp0qKc.js.map → p-hxWwaOcD.js.map} +0 -0
  196. /package/dist/components/{p-BQUZjuoP.js.map → p-vcHtLpWY.js.map} +0 -0
  197. /package/dist/verdocs-web-sdk/{p-869024e0.system.entry.js.map → p-09f5670e.system.entry.js.map} +0 -0
  198. /package/dist/verdocs-web-sdk/{p-e87a29a3.system.entry.js.map → p-298d799f.system.entry.js.map} +0 -0
  199. /package/dist/verdocs-web-sdk/{p-734c8a8b.entry.js.map → p-2a6a3bc6.entry.js.map} +0 -0
  200. /package/dist/verdocs-web-sdk/{p-62464041.system.entry.js.map → p-439d36b0.system.entry.js.map} +0 -0
  201. /package/dist/verdocs-web-sdk/{p-d95705c6.entry.js.map → p-4930b31d.entry.js.map} +0 -0
  202. /package/dist/verdocs-web-sdk/{p-c86111fd.system.entry.js.map → p-5404f6bf.system.entry.js.map} +0 -0
  203. /package/dist/verdocs-web-sdk/{p-10d47bbd.entry.js.map → p-5cad2422.entry.js.map} +0 -0
  204. /package/dist/verdocs-web-sdk/{p-4aee15e6.entry.js.map → p-932e8b9b.entry.js.map} +0 -0
  205. /package/dist/verdocs-web-sdk/{p-6e8ce989.system.entry.js.map → p-99f7a0fa.system.entry.js.map} +0 -0
  206. /package/dist/verdocs-web-sdk/{p-7e1f895c.entry.js.map → p-dd59aa9a.entry.js.map} +0 -0
  207. /package/dist/verdocs-web-sdk/{p-c3527f3e.system.entry.js.map → p-f7b14409.system.entry.js.map} +0 -0
  208. /package/dist/verdocs-web-sdk/{p-1df29abb.entry.js.map → p-fe404347.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as e,c as s,h as t,F as i}from"./p-CjTHbolG.js";import{VerdocsEndpoint as o,formatFullName as a,getActiveEntitlements as c,isValidEmail as d}from"@verdocs/js-sdk";import{c as l}from"./p-CGsVCy75.js";import"./p-BglCURB-.js";import"./p-CIxfEdV7.js";const r=()=>`verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-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{gap:12px;width:300px;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#f5f5fa}verdocs-contact-picker form .row{gap:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:start;align-items:flex-start}verdocs-contact-picker form .row .option{gap:4px;display:-ms-flexbox;display:flex;padding:5px 8px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;text-wrap:nowrap}verdocs-contact-picker form .names-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .names-row>input{font-size:14px;width:88px}verdocs-contact-picker form .pin-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .pin-code>input{-ms-flex:0 0 197px;flex:0 0 197px;font-size:14px}verdocs-contact-picker form .address{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .address>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form .zip-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .zip-code>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 80px;flex:0 0 80px;font-size:13px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message textarea{width:100%;padding:5px 7px;border-radius:4px;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;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}#verdocs-contact-picker-suggestions .dropdown{max-height:225px;overflow-y:scroll;background:#ffffff;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-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-suggestions .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-suggestions .dropdown .suggestion svg{width:32px;height:32px}#verdocs-contact-picker-suggestions .dropdown .suggestion .avatar{width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px;margin-right:8px;border-radius:100%}#verdocs-contact-picker-suggestions .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#verdocs-contact-picker-suggestions .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}#verdocs-contact-picker-suggestions .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}#verdocs-contact-picker-suggestions .dropdown .suggestion:hover{background:#eee;cursor:pointer}`;const n=`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-user"><path d="M15 13a3 3 0 1 0-6 0"/><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20"/><circle cx="12" cy="8" r="2"/></svg>`;const f=class{constructor(t){e(this,t);this.searchContacts=s(this,"searchContacts");this.exit=s(this,"exit");this.next=s(this,"next");this.endpoint=o.getDefault();this.templateRole=null;this.contactSuggestions=[];this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.name_locked=false;this.auth_methods=[];this.passcode="";this.firstNameFieldId=`verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2,11)}`;this.lastNameFieldId=`verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2,11)}`;this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`;this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`;this.activeEntitlements={};this.authMethodsLoading=true}async componentWillLoad(){this.endpoint.loadSession();if(this.templateRole){const e=a(this.templateRole);const s=e.split(" ");const t=this.templateRole.first_name||s.shift()||"";const i=this.templateRole.last_name||s.join(" ")||"";this.first_name=t;this.last_name=i;this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.name_locked=this.delegator?false:this.templateRole.name_locked||false;this.message=this.templateRole.message||"";this.showMessage=this.message!=="";this.auth_methods=this.templateRole.auth_methods||[];this.passcode=this.templateRole.passcode||""}this.activeEntitlements=await c(this.endpoint).catch((e=>{console.warn("[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only",e);return{}}));this.authMethodsLoading=false;console.log("[CONTACT PICKER] Loaded entitlements",this.activeEntitlements)}handleFirstNameChange(e){var s;this.first_name=e.target.value;(s=this.searchContacts)===null||s===void 0?void 0:s.emit({query:this.first_name})}handleLastNameChange(e){var s;this.last_name=e.target.value;(s=this.searchContacts)===null||s===void 0?void 0:s.emit({query:this.last_name})}handleCancel(e){var s;e.stopPropagation();this.showSuggestions=false;(s=this.exit)===null||s===void 0?void 0:s.emit()}handleSubmit(e){var s;e.stopPropagation();this.showSuggestions=false;(s=this.next)===null||s===void 0?void 0:s.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator,name_locked:this.name_locked,auth_methods:this.auth_methods,passcode:this.passcode,address:this.address,zip:this.zip})}handleSelectSuggestion(e,s){e.stopPropagation();this.first_name=s.first_name;this.last_name=s.last_name;this.email=s.email;this.phone=s.phone;this.showSuggestions=false}render(){const e=this.first_name&&this.last_name&&d(this.email);const s=!this.auth_methods.length||this.auth_methods.includes("passcode")&&!!this.passcode||this.auth_methods.includes("kba")&&!!this.first_name&&!!this.last_name||this.auth_methods.includes("email")&&!!this.email||this.auth_methods.includes("sms")&&!!this.phone;const o=e&&s;const c=!!this.activeEntitlements.sms_auth;const r=[];r.push({label:"Passcode",value:"passcode"});r.push({label:"Email",value:"email"});if(c){r.push({label:"SMS (One-Time Code)",value:"sms"})}if(!!this.activeEntitlements.kba_auth){r.push({label:"Knowledge-Based (KBA)",value:"kba"})}if(!!this.activeEntitlements.id_auth){r.push({label:"ID Check",value:"id"})}return t("form",{key:"70e2a9e4eb9e9da4bd9f491648d81fd30f9a34a6",onSubmit:e=>e.preventDefault(),autocomplete:"off"},t("div",{key:"9134b3e8bcd2c59f8773ad3db7bdd04d52d9cbf7",class:"row"},t("label",{key:"455c784b89b96afddb46dcde9bd760e3b36c890d",htmlFor:this.firstNameFieldId},"Name:"),t("div",{key:"802e5786743df37c017f6aab4061b01db4207988",class:"names-row"},t("input",{key:"5ee405fd8487c8f2539ede7ccf26e76bb96c3932",id:this.firstNameFieldId,name:this.firstNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.first_name,placeholder:"First...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleFirstNameChange(e)}),t("input",{key:"2de6301b850c7d0986b0418bbb737b0f9e04849f",id:this.lastNameFieldId,name:this.lastNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.last_name,placeholder:"Last...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleLastNameChange(e)})),this.showSuggestions&&t("verdocs-portal",{key:"39c6ccb8a231fe9e01fbd99aebc3e7625dfeef17",anchor:this.firstNameFieldId,onClickAway:()=>{this.showSuggestions=false;document.querySelectorAll(`.verdocs-portal-wrapper`).forEach((e=>e.remove()))},id:"verdocs-contact-picker-suggestions"},t("div",{key:"bbabbff5428faeb5cef999f422d441d3e66fdf62",class:"dropdown"},this.contactSuggestions.filter((e=>{var s;return!this.first_name||((s=e.first_name)===null||s===void 0?void 0:s.toLowerCase().includes(this.first_name.toLowerCase()))})).map((e=>{var s;return t("div",{key:(s=e.id)!==null&&s!==void 0?s:e.email,class:"suggestion",onClick:s=>this.handleSelectSuggestion(s,e)},e.picture?t("img",{alt:"Avatar",class:"avatar",src:e.picture}):t("div",{class:"avatar",innerHTML:n}),t("div",{class:"details"},t("div",{class:"name"},a(e)),e.email&&t("div",{class:"destination"},e.email),e.phone&&t("div",{class:"destination"},e.phone)))}))))),t("div",{key:"31c843f59d029535c1006c682f76d8b18f885dc3",class:"row"},t("label",{key:"540a430d827ec0b44fc2d56d4f2cb5938d663236",htmlFor:this.emailFieldId},"Email:"),t("input",{key:"055b0ecaee8f361a4f222cbaeedcdcfbf536a5cb",id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked","aria-autocomplete":"none",value:this.email,placeholder:"Invite/verify via email...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.email=e.target.value})),c&&t("div",{key:"b9c6dd3118c6eba736add88b35e68ff79715e44d",class:"row"},t("label",{key:"ff687e318625a8cde98b208bf72b111d48659acc",htmlFor:this.phoneFieldId},"Phone:"),t("input",{key:"3c6f09760be62cedde15b43a1d34bbd8c2960600",id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked","aria-autocomplete":"none",value:this.phone,placeholder:"Invite/verify via SMS...",onFocus:()=>this.showSuggestions=false,onInput:e=>{this.phone=l(e.target.value)}})),t(i,{key:"2b652dbfb48a4b0360c2b6e536158492ef06125b"},r.length>0&&t("div",{key:"589c42562ec9e834680969803d747f6e94d00ec2",class:"row pin-code"},t("label",{key:"189c3562f5e0ed7599a816d0300b5fe3c96741cb"},"Verification Methods:"),this.authMethodsLoading?t("verdocs-spinner",{size:10,mode:"dark",style:{margin:"auto"}}):t("div",null,r.map(((e,s)=>t("div",{class:"option"},t("verdocs-checkbox",{size:"small",id:`verdocs-multi-select-opt-${s}`,value:e.value,checked:this.auth_methods.includes(e.value),onInput:s=>{if(s.target.checked){this.auth_methods=[...this.auth_methods,e.value]}else{this.auth_methods=this.auth_methods.filter((s=>s!==e.value))}}}),t("label",{htmlFor:`verdocs-multi-select-option-${s}`},e.label)))))),this.auth_methods.includes("passcode")&&t("div",{key:"6e12581d825a0c8089e20015d1d96fb6a182cdb5",class:"row pin-code"},t("label",{key:"e728bc75adcf8f8a322628c1a38f612d3dd2d2dc",htmlFor:this.phoneFieldId},"Passcode:"),t("input",{key:"59afa58c6563d4fa9a1cb7e65409370fb685d1db",id:"verdocs-passcode",name:"verdocs-passcode",type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.passcode,placeholder:"4-8 digits recommended...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.passcode=e.target.value}))),t("div",{key:"eca3f9921286dba2e5d3ba02f0b886e3d179a23f",class:"row pin-code"},t("label",{key:"04e26414864324205e2ee71173aac15b46350b7e",style:{marginTop:"6px"}},"Options:"),t("div",{key:"f8df70196098a3462df02933d7d7c51cac5c856b"},t("div",{key:"09f4d4f88a355d19ae560203020c9639fe88280e",class:"option"},t("verdocs-checkbox",{key:"e71d71be949fc96c1c074dcbb58ff121c4c3fd05",size:"small",id:"verdocs-delegator",checked:this.delegator,disabled:this.name_locked,onInput:e=>{this.delegator=e.target.checked;if(this.delegator)this.name_locked=false}}),t("label",{key:"b83381a0c733b2fc19502ee1fb64462c77eb20f2",htmlFor:"verdocs-delegator"},"May delegate signing")),t("div",{key:"d3f59732383cded91c3c9d0431001ce27b1998b8",class:"option"},t("verdocs-checkbox",{key:"9c0acbf0601728bf4498e2fe3c89232ee4e9448c",size:"small",id:"verdocs-name-locked",checked:this.name_locked,disabled:this.delegator,onInput:e=>{this.name_locked=e.target.checked;if(this.name_locked)this.delegator=false}}),t("label",{key:"df906c6274917b04c471aa00eedf8fad9b9c15a1",htmlFor:"verdocs-name-locked"},"Name locked")))),t("div",{key:"74e5e6004872803e50c315540c6dc66957d6b9b0",class:"row message"},t("label",{key:"36557fd5a7ccd14cd5fae192bf3bfaaf9f39c136",htmlFor:"verdocs-contact-picker-message"},"Message:"),t("textarea",{key:"c362c8a6b1953330f128bfc5083749060d17727c",id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message","data-lpignore":"true",autocomplete:"blocked",placeholder:"Optional message to include in invitation...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.message=e.target.value},this.message)),t("div",{key:"8864df6dba12af9cc9e476398368f3482ab4982f",class:"buttons"},t("div",{key:"f09409d3f75a7f04dcb4a93189d098dbc68177c4",class:"flex-fill"}),t("verdocs-button",{key:"17a564f49e64ec50a3ef201e0aa5b662ab0f0522",variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),t("verdocs-button",{key:"c731fb4642166fc0b682894cb71f4e41fe7b48e7",label:"OK",size:"small",disabled:!o,onClick:!o?()=>{}:e=>this.handleSubmit(e)})))}};f.style=r();export{f as verdocs_contact_picker};
2
- //# sourceMappingURL=p-255e1915.entry.js.map
1
+ import{r as e,c as s,h as t,F as i}from"./p-CjTHbolG.js";import{VerdocsEndpoint as o,formatFullName as a,getActiveEntitlements as c,isValidEmail as d}from"@verdocs/js-sdk";import{c as l}from"./p-CGsVCy75.js";import"./p-BglCURB-.js";import"./p-CIxfEdV7.js";const r=()=>`verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-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{gap:12px;width:300px;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#f5f5fa}verdocs-contact-picker form .row{gap:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:start;align-items:flex-start}verdocs-contact-picker form .row .option{gap:4px;display:-ms-flexbox;display:flex;padding:5px 8px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;text-wrap:nowrap}verdocs-contact-picker form .names-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .names-row>input{font-size:14px;width:88px}verdocs-contact-picker form .pin-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .pin-code>input{-ms-flex:0 0 197px;flex:0 0 197px;font-size:14px}verdocs-contact-picker form .address{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .address>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form .zip-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .zip-code>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 80px;flex:0 0 80px;font-size:13px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message textarea{width:100%;padding:5px 7px;border-radius:4px;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;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}#verdocs-contact-picker-suggestions .dropdown{max-height:225px;overflow-y:scroll;background:#ffffff;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);-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-suggestions .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-suggestions .dropdown .suggestion svg{width:32px;height:32px}#verdocs-contact-picker-suggestions .dropdown .suggestion .avatar{width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px;margin-right:8px;border-radius:100%}#verdocs-contact-picker-suggestions .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#verdocs-contact-picker-suggestions .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}#verdocs-contact-picker-suggestions .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}#verdocs-contact-picker-suggestions .dropdown .suggestion:hover{background:#eee;cursor:pointer}`;const n=`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-user"><path d="M15 13a3 3 0 1 0-6 0"/><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20"/><circle cx="12" cy="8" r="2"/></svg>`;const f=class{constructor(t){e(this,t);this.searchContacts=s(this,"searchContacts");this.exit=s(this,"exit");this.next=s(this,"next");this.endpoint=o.getDefault();this.templateRole=null;this.contactSuggestions=[];this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.name_locked=false;this.auth_methods=[];this.passcode="";this.firstNameFieldId=`verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2,11)}`;this.lastNameFieldId=`verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2,11)}`;this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`;this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`;this.activeEntitlements={};this.authMethodsLoading=true}async componentWillLoad(){this.endpoint.loadSession();if(this.templateRole){const e=a(this.templateRole);const s=e.split(" ");const t=this.templateRole.first_name||s.shift()||"";const i=this.templateRole.last_name||s.join(" ")||"";this.first_name=t;this.last_name=i;this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.name_locked=this.delegator?false:this.templateRole.name_locked||false;this.message=this.templateRole.message||"";this.showMessage=this.message!=="";this.auth_methods=this.templateRole.auth_methods||[];this.passcode=this.templateRole.passcode||""}this.activeEntitlements=await c(this.endpoint).catch((e=>{console.warn("[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only",e);return{}}));this.authMethodsLoading=false;console.log("[CONTACT PICKER] Loaded entitlements",this.activeEntitlements)}handleFirstNameChange(e){var s;this.first_name=e.target.value;(s=this.searchContacts)===null||s===void 0?void 0:s.emit({query:this.first_name})}handleLastNameChange(e){var s;this.last_name=e.target.value;(s=this.searchContacts)===null||s===void 0?void 0:s.emit({query:this.last_name})}handleCancel(e){var s;e.stopPropagation();this.showSuggestions=false;(s=this.exit)===null||s===void 0?void 0:s.emit()}handleSubmit(e){var s;e.stopPropagation();this.showSuggestions=false;(s=this.next)===null||s===void 0?void 0:s.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator,name_locked:this.name_locked,auth_methods:this.auth_methods,passcode:this.passcode,address:this.address,zip:this.zip})}handleSelectSuggestion(e,s){e.stopPropagation();this.first_name=s.first_name;this.last_name=s.last_name;this.email=s.email;this.phone=s.phone;this.showSuggestions=false}render(){const e=this.first_name&&this.last_name&&d(this.email);const s=!this.auth_methods.length||this.auth_methods.includes("passcode")&&!!this.passcode||this.auth_methods.includes("kba")&&!!this.first_name&&!!this.last_name||this.auth_methods.includes("email")&&!!this.email||this.auth_methods.includes("sms")&&!!this.phone;const o=e&&s;const c=!!this.activeEntitlements.sms_auth;const r=[];r.push({label:"Passcode",value:"passcode"});r.push({label:"Email",value:"email"});if(c){r.push({label:"SMS (One-Time Code)",value:"sms"})}if(!!this.activeEntitlements.kba_auth){r.push({label:"Knowledge-Based (KBA)",value:"kba"})}if(!!this.activeEntitlements.id_auth){r.push({label:"ID Check",value:"id"})}return t("form",{key:"6709871235915b9c57af981cb4ab8560c040c29f",onSubmit:e=>e.preventDefault(),autocomplete:"off"},t("div",{key:"b4792f8bf7a38bd1eca0a684da63e06607b29d4a",class:"row"},t("label",{key:"75f1386774dcf2dba1ae074e2ef86b9d04525763",htmlFor:this.firstNameFieldId},"Name:"),t("div",{key:"36916fdd64584ef209620a6311c4db381e55ea82",class:"names-row"},t("input",{key:"8ab3867864dad6e2726a09666e8c3334f6bbc713",id:this.firstNameFieldId,name:this.firstNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.first_name,placeholder:"First...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleFirstNameChange(e)}),t("input",{key:"000acb6f26cfa8a78105b211df519ef3851dc474",id:this.lastNameFieldId,name:this.lastNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.last_name,placeholder:"Last...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleLastNameChange(e)})),this.showSuggestions&&t("verdocs-portal",{key:"4e9c8ee57f464fcf09578430e1fe09981e87bafc",anchor:this.firstNameFieldId,onClickAway:()=>{this.showSuggestions=false;document.querySelectorAll(`.verdocs-portal-wrapper`).forEach((e=>e.remove()))},id:"verdocs-contact-picker-suggestions"},t("div",{key:"5cbf60f0f1186f318f686ef6bdc8d791072e4d41",class:"dropdown"},this.contactSuggestions.filter((e=>{var s;return!this.first_name||((s=e.first_name)===null||s===void 0?void 0:s.toLowerCase().includes(this.first_name.toLowerCase()))})).map((e=>{var s;return t("div",{key:(s=e.id)!==null&&s!==void 0?s:e.email,class:"suggestion",onClick:s=>this.handleSelectSuggestion(s,e)},e.picture?t("img",{alt:"Avatar",class:"avatar",src:e.picture}):t("div",{class:"avatar",innerHTML:n}),t("div",{class:"details"},t("div",{class:"name"},a(e)),e.email&&t("div",{class:"destination"},e.email),e.phone&&t("div",{class:"destination"},e.phone)))}))))),t("div",{key:"3d6aaa5e5bd3f0bc5681c4b788f222b6dfb45584",class:"row"},t("label",{key:"67e9b6d47602d8c455a46e47b94bf008d2ac3a4e",htmlFor:this.emailFieldId},"Email:"),t("input",{key:"b65569322f9a9864fe82ac3371ffcf4e769b69f1",id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked","aria-autocomplete":"none",value:this.email,placeholder:"Invite/verify via email...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.email=e.target.value})),c&&t("div",{key:"defed17223c457db6eea0aff5c13598a70882157",class:"row"},t("label",{key:"7a06bd13e92cd70c51f23228bbe4ed5be59919bb",htmlFor:this.phoneFieldId},"Phone:"),t("input",{key:"770012fd3d838449afa88309f7b003c600e10a1c",id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked","aria-autocomplete":"none",value:this.phone,placeholder:"Invite/verify via SMS...",onFocus:()=>this.showSuggestions=false,onInput:e=>{this.phone=l(e.target.value)}})),t(i,{key:"e0071e7e2fb5521685c8863dab279f31089bf20e"},r.length>0&&t("div",{key:"7f769fdb13d206c769b813eef2c68e810bc635f3",class:"row pin-code"},t("label",{key:"4ebf33f0821f3b1f2a63ac918d3d2923b8f38e38"},"Verification Methods:"),this.authMethodsLoading?t("verdocs-spinner",{size:10,mode:"dark",style:{margin:"auto"}}):t("div",null,r.map(((e,s)=>t("div",{class:"option"},t("verdocs-checkbox",{size:"small",id:`verdocs-multi-select-opt-${s}`,value:e.value,checked:this.auth_methods.includes(e.value),onInput:s=>{if(s.target.checked){this.auth_methods=[...this.auth_methods,e.value]}else{this.auth_methods=this.auth_methods.filter((s=>s!==e.value))}}}),t("label",{htmlFor:`verdocs-multi-select-option-${s}`},e.label)))))),this.auth_methods.includes("passcode")&&t("div",{key:"79feab0e29cbfbbb825f285a995d21576732bb8a",class:"row pin-code"},t("label",{key:"7fd8dd8c3f254e9d6eba0e657f3a02f0fd47b05e",htmlFor:this.phoneFieldId},"Passcode:"),t("input",{key:"a9d0055ca2669776bc465ed4d7a1ce414bb628a4",id:"verdocs-passcode",name:"verdocs-passcode",type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.passcode,placeholder:"4-8 digits recommended...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.passcode=e.target.value}))),t("div",{key:"71101e3ae9adab93ffde79f43431ab91657df8cd",class:"row pin-code"},t("label",{key:"312a0dafe35171d1ebc61e62f868e2fdcd8a8e8d",style:{marginTop:"6px"}},"Options:"),t("div",{key:"38341490838ffe88ee03800e886d46b163f1d21a"},t("div",{key:"68fbb6b02029ba082da5db49687989e2d0228235",class:"option"},t("verdocs-checkbox",{key:"57c933a6ebc171d8a0c86452ff26504270175463",size:"small",id:"verdocs-delegator",checked:this.delegator,disabled:this.name_locked,onInput:e=>{this.delegator=e.target.checked;if(this.delegator)this.name_locked=false}}),t("label",{key:"8d4bbaef0ca5cea8100777fa37d520f1bd5a1d1e",htmlFor:"verdocs-delegator"},"May delegate signing")),t("div",{key:"d1278133af51917475ae1778c28da315072ca4a6",class:"option"},t("verdocs-checkbox",{key:"32f6401902c5f850f52c58fb06def2d16fc65e99",size:"small",id:"verdocs-name-locked",checked:this.name_locked,disabled:this.delegator,onInput:e=>{this.name_locked=e.target.checked;if(this.name_locked)this.delegator=false}}),t("label",{key:"82d3cb3a2c48c66e8dd4bf917e35ed85327d994d",htmlFor:"verdocs-name-locked"},"Name locked")))),t("div",{key:"01f4e93445daee8493eb67f41640865753db54bb",class:"row message"},t("label",{key:"499b65b9368abe5f355ece31825fdd6b92905b55",htmlFor:"verdocs-contact-picker-message"},"Message:"),t("textarea",{key:"817c16d982edb9af18f8ebee829ed77068d431b5",id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message","data-lpignore":"true",autocomplete:"blocked",placeholder:"Optional message to include in invitation...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.message=e.target.value},this.message)),t("div",{key:"044a45c3a9ba57334c6e10f12e0b1f19ce5c3403",class:"buttons"},t("div",{key:"6aa3536c73eef3852f7d483deee3773413167f5d",class:"flex-fill"}),t("verdocs-button",{key:"7dc65ba7bcb927c9822cc19d00b3a74278db8688",variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),t("verdocs-button",{key:"7f3434aa2547d87ad2a54610374bec0511aa7940",label:"OK",size:"small",disabled:!o,onClick:!o?()=>{}:e=>this.handleSubmit(e)})))}};f.style=r();export{f as verdocs_contact_picker};
2
+ //# sourceMappingURL=p-4e0788f9.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["verdocsContactPickerCss","addrBookIcon","VerdocsContactPicker","constructor","hostRef","this","endpoint","VerdocsEndpoint","getDefault","templateRole","contactSuggestions","showSuggestions","showMessage","delegator","name_locked","auth_methods","passcode","firstNameFieldId","Math","random","toString","substring","lastNameFieldId","emailFieldId","phoneFieldId","activeEntitlements","authMethodsLoading","componentWillLoad","loadSession","fullName","formatFullName","nameComponents","split","firstName","first_name","shift","lastName","last_name","join","email","phone","message","getActiveEntitlements","catch","e","console","warn","log","handleFirstNameChange","target","value","_a","searchContacts","emit","query","handleLastNameChange","handleCancel","stopPropagation","exit","handleSubmit","next","address","zip","handleSelectSuggestion","suggestion","render","hasBasics","isValidEmail","hasAuthRequirements","length","includes","canSubmit","hasSMSAuth","sms_auth","verificationOptions","push","label","kba_auth","id_auth","h","key","onSubmit","preventDefault","autocomplete","class","htmlFor","id","name","type","placeholder","onFocus","setTimeout","onInput","anchor","onClickAway","document","querySelectorAll","forEach","el","remove","filter","toLowerCase","map","onClick","picture","alt","src","innerHTML","autoComplete","convertToE164","Fragment","size","mode","style","margin","option","i","checked","selected","marginTop","disabled","variant"],"sources":["src/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.scss?tag=verdocs-contact-picker","src/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-contact-picker {\n display: block;\n border: 1px solid #ebebeb;\n background-color: $verdocs-grey-4;\n font-family: $verdocs-primary-font;\n box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);\n\n form {\n gap: 12px;\n width: 300px;\n padding: 12px;\n display: flex;\n flex-direction: column;\n background-color: $verdocs-grey-3;\n\n .row {\n gap: 8px;\n display: flex;\n position: relative;\n flex-direction: row;\n align-items: flex-start;\n\n .option {\n gap: 4px;\n display: flex;\n padding: 5px 8px;\n align-items: center;\n flex-direction: row;\n text-wrap: nowrap;\n }\n }\n\n .names-row {\n gap: 8px;\n display: flex;\n flex-direction: row;\n\n > input {\n font-size: 14px;\n width: 88px;\n }\n }\n\n .pin-code {\n gap: 8px;\n display: flex;\n align-items: flex-start;\n flex-direction: row;\n\n > input {\n flex: 0 0 197px;\n font-size: 14px;\n //margin-left: 88px;\n }\n }\n\n .address {\n gap: 8px;\n display: flex;\n align-items: center;\n flex-direction: row;\n\n > input {\n flex: 1;\n font-size: 14px;\n //margin-left: 88px;\n }\n }\n\n .zip-code {\n gap: 8px;\n display: flex;\n align-items: center;\n flex-direction: row;\n\n > input {\n flex: 1;\n font-size: 14px;\n //margin-left: 88px;\n }\n }\n\n label {\n display: flex;\n flex: 0 0 80px;\n font-size: 13px;\n font-weight: 500;\n color: $verdocs-bg-4;\n }\n\n .row.message textarea {\n width: 100%;\n padding: 5px 7px;\n border-radius: 4px;\n font-family: $verdocs-primary-font;\n }\n\n input {\n flex: 1;\n padding: 6px;\n font-size: 14px;\n border-radius: 3px;\n //background: #00000005;\n border: 1px solid $border-color-extralight;\n\n &:focus {\n outline: none;\n }\n }\n }\n\n .buttons {\n display: flex;\n column-gap: 6px;\n margin-top: 16px;\n flex-direction: row;\n\n .flex-fill {\n flex: 1;\n }\n }\n\n ::placeholder {\n color: $verdocs-bg-2;\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\n#verdocs-contact-picker-suggestions {\n .dropdown {\n max-height: 225px;\n overflow-y: scroll;\n background: #ffffff;\n font-family: $verdocs-primary-font;\n box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);\n\n .suggestion {\n display: flex;\n padding: 6px 12px;\n align-items: center;\n flex-direction: row;\n\n svg {\n width: 32px;\n height: 32px;\n }\n\n .avatar {\n width: 32px;\n height: 32px;\n flex: 0 0 32px;\n margin-right: 8px;\n border-radius: 100%;\n }\n\n .details {\n display: flex;\n flex-direction: column;\n }\n\n .name {\n font-size: 16px;\n font-weight: 500;\n margin-bottom: 3px;\n color: $verdocs-grey-0;\n }\n\n .destination {\n font-size: 14px;\n margin-bottom: 3px;\n color: $verdocs-grey-1;\n }\n\n &:hover {\n background: #eee;\n cursor: pointer;\n }\n }\n }\n}\n","import {Component, h, Event, EventEmitter, Fragment, Prop, State} from '@stencil/core';\nimport {formatFullName, getActiveEntitlements, IEntitlement, IProfile, IRecipient, isValidEmail, TEntitlement, TRecipientAuthMethod, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {convertToE164} from '../../../utils/utils';\n\nconst addrBookIcon = `<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"lucide lucide-book-user\"><path d=\"M15 13a3 3 0 1 0-6 0\"/><path d=\"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20\"/><circle cx=\"12\" cy=\"8\" r=\"2\"/></svg>`;\n\nexport interface IContactSearchEvent {\n query: string;\n}\n\nexport interface IContactSelectEvent {\n first_name: string;\n last_name: string;\n email: string;\n phone: string;\n message: string;\n delegator: boolean;\n name_locked: boolean;\n auth_methods: TRecipientAuthMethod[];\n passcode: string;\n address: string;\n zip: string;\n}\n\nexport type TPickerContact = Partial<IProfile>;\n\n/**\n * Display a contact picker suitable for filling out Recipient objects when sending Envelopes.\n *\n * This picker can also be integrated with a backend to provide contact list / suggestion / address-book style behavior. As the\n * user interacts with the component, the text entered in the name fields is sent back to the parent via the `searchContacts` event.\n * The parent can use that text as a query string to call a backend to obtain appropriate contacts to show. This list may also be\n * hard-coded ahead of time to provide the user with smart suggestions on initial display, such as \"Recently Used\" contacts, or\n * to always display the user's own contact record.\n *\n * ```ts\n * <verdocs-contact-picker\n * templateRole={role}\n * contactSuggestions={[]}\n * onNext={e => console.log('Contact completed', e.detail)}\n * />\n * ```\n */\n@Component({\n tag: 'verdocs-contact-picker',\n styleUrl: 'verdocs-contact-picker.scss',\n shadow: false,\n})\nexport class VerdocsContactPicker {\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 role that this contact will be assigned to.\n */\n @Prop() templateRole: Partial<IRecipient> | null = null;\n\n /**\n * If set, suggestions will be displayed in a drop-down list to the user. It is recommended that the number\n * of suggestions be limited to the 5 best matching records.\n */\n @Prop() contactSuggestions: TPickerContact[] = [];\n\n /**\n * Event fired when the user enters text in the search field. The calling application may use this to update\n * the `contactSuggestions` property.\n */\n @Event({composed: true}) searchContacts: EventEmitter<IContactSearchEvent>;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * Event fired when the user changes the type.\n */\n @Event({composed: true}) next: EventEmitter<IContactSelectEvent>;\n\n @State() first_name: string;\n @State() last_name: string;\n @State() email: string;\n @State() phone: string;\n @State() zip: string;\n @State() address: string;\n @State() message: string;\n @State() showSuggestions: boolean = false;\n @State() showMessage: boolean = false;\n @State() delegator: boolean = false;\n @State() name_locked: boolean = false;\n @State() auth_methods: TRecipientAuthMethod[] = [];\n @State() passcode: string = '';\n\n @State() firstNameFieldId = `verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2, 11)}`;\n @State() lastNameFieldId = `verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2, 11)}`;\n @State() emailFieldId = `verdocs-contact-picker-email-${Math.random().toString(36).substring(2, 11)}`;\n @State() phoneFieldId = `verdocs-contact-picker-phone-${Math.random().toString(36).substring(2, 11)}`;\n\n @State() activeEntitlements: Partial<Record<TEntitlement, IEntitlement>> = {};\n @State() authMethodsLoading: boolean = true\n\n async componentWillLoad() {\n this.endpoint.loadSession();\n\n if (this.templateRole) {\n const fullName = formatFullName(this.templateRole);\n const nameComponents = fullName.split(' ');\n const firstName = this.templateRole.first_name || nameComponents.shift() || '';\n const lastName = this.templateRole.last_name || nameComponents.join(' ') || '';\n this.first_name = firstName;\n this.last_name = lastName;\n\n this.email = this.templateRole.email || '';\n this.phone = this.templateRole.phone || '';\n // delegator and name_locked are mutually exclusive; delegator takes precedence if both are somehow set\n this.delegator = this.templateRole.delegator || false;\n this.name_locked = this.delegator ? false : (this.templateRole.name_locked || false);\n this.message = this.templateRole.message || '';\n this.showMessage = this.message !== '';\n this.auth_methods = this.templateRole.auth_methods || [];\n this.passcode = this.templateRole.passcode || '';\n }\n\n // Entitlements only gate optional methods like KBA. We need error handling here in case the getActiveEntitlements\n // call fails or we stay loading forever.\n this.activeEntitlements = await getActiveEntitlements(this.endpoint).catch(e => {\n console.warn('[CONTACT PICKER] Unable to load entitlements, continuing with base auth methods only', e);\n return {} as Partial<Record<TEntitlement, IEntitlement>>;\n });\n\n this.authMethodsLoading = false;\n console.log('[CONTACT PICKER] Loaded entitlements', this.activeEntitlements);\n }\n\n handleFirstNameChange(e: any) {\n this.first_name = e.target.value;\n this.searchContacts?.emit({query: this.first_name});\n }\n\n handleLastNameChange(e: any) {\n this.last_name = e.target.value;\n this.searchContacts?.emit({query: this.last_name});\n }\n\n handleCancel(e: any) {\n e.stopPropagation();\n this.showSuggestions = false;\n this.exit?.emit();\n }\n\n handleSubmit(e: any) {\n e.stopPropagation();\n\n this.showSuggestions = false;\n this.next?.emit({\n first_name: this.first_name,\n last_name: this.last_name,\n email: this.email,\n phone: this.phone,\n message: this.message,\n delegator: this.delegator,\n name_locked: this.name_locked,\n auth_methods: this.auth_methods,\n passcode: this.passcode,\n address: this.address,\n zip: this.zip,\n });\n }\n\n handleSelectSuggestion(e: any, suggestion: TPickerContact) {\n e.stopPropagation();\n\n this.first_name = suggestion.first_name;\n this.last_name = suggestion.last_name;\n this.email = suggestion.email;\n this.phone = suggestion.phone;\n this.showSuggestions = false;\n }\n\n // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them\n // and show a duplicate autocomplete picker on top of our own.\n render() {\n // const hasBasics = this.first_name && this.last_name && (isValidEmail(this.email) || isValidPhone(this.phone));\n const hasBasics = this.first_name && this.last_name && isValidEmail(this.email);\n const hasAuthRequirements =\n !this.auth_methods.length ||\n (this.auth_methods.includes('passcode') && !!this.passcode) ||\n (this.auth_methods.includes('kba') && !!this.first_name && !!this.last_name) ||\n (this.auth_methods.includes('email') && !!this.email) ||\n (this.auth_methods.includes('sms') && !!this.phone);\n const canSubmit = hasBasics && hasAuthRequirements;\n const hasSMSAuth = !!this.activeEntitlements.sms_auth\n\n const verificationOptions = [];\n\n verificationOptions.push({label: 'Passcode', value: 'passcode'});\n verificationOptions.push({label: 'Email', value: 'email'});\n\n if (hasSMSAuth) {\n verificationOptions.push({label: 'SMS (One-Time Code)', value: 'sms'});\n }\n\n if (!!this.activeEntitlements.kba_auth) {\n verificationOptions.push({label: 'Knowledge-Based (KBA)', value: 'kba'});\n }\n\n if (!!this.activeEntitlements.id_auth) {\n verificationOptions.push({label: 'ID Check', value: 'id'});\n }\n\n return (\n <form\n onSubmit={e => e.preventDefault()}\n // onClick={e => e.stopPropagation()}\n autocomplete=\"off\"\n >\n <div class=\"row\">\n <label htmlFor={this.firstNameFieldId}>Name:</label>\n <div class=\"names-row\">\n <input\n id={this.firstNameFieldId}\n name={this.firstNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.first_name}\n placeholder=\"First...\"\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleFirstNameChange(e)}\n />\n <input\n id={this.lastNameFieldId}\n name={this.lastNameFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.last_name}\n placeholder=\"Last...\"\n onFocus={() => {\n // Give the blur event a chance to hide it first if going between first/last\n setTimeout(() => {\n this.showSuggestions = this.contactSuggestions?.length > 0;\n }, 100);\n }}\n onInput={e => this.handleLastNameChange(e)}\n />\n </div>\n\n {this.showSuggestions && (\n <verdocs-portal\n anchor={this.firstNameFieldId}\n onClickAway={() => {\n this.showSuggestions = false;\n document.querySelectorAll(`.verdocs-portal-wrapper`).forEach(el => el.remove());\n }}\n id=\"verdocs-contact-picker-suggestions\"\n >\n <div class=\"dropdown\">\n {this.contactSuggestions\n .filter(suggestion => !this.first_name || suggestion.first_name?.toLowerCase().includes(this.first_name.toLowerCase()))\n .map(suggestion => (\n <div key={suggestion.id ?? suggestion.email} class=\"suggestion\" onClick={e => this.handleSelectSuggestion(e, suggestion)}>\n {suggestion.picture ? <img alt=\"Avatar\" class=\"avatar\" src={suggestion.picture} /> : <div class=\"avatar\" innerHTML={addrBookIcon} />}\n <div class=\"details\">\n <div class=\"name\">{formatFullName(suggestion)}</div>\n {suggestion.email && <div class=\"destination\">{suggestion.email}</div>}\n {suggestion.phone && <div class=\"destination\">{suggestion.phone}</div>}\n </div>\n </div>\n ))}\n </div>\n </verdocs-portal>\n )}\n </div>\n\n <div class=\"row\">\n <label htmlFor={this.emailFieldId}>Email:</label>\n <input\n id={this.emailFieldId}\n name={this.emailFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.email}\n placeholder=\"Invite/verify via email...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.email = e.target.value)}\n />\n </div>\n\n {hasSMSAuth && (\n <div class=\"row\">\n <label htmlFor={this.phoneFieldId}>Phone:</label>\n <input\n id={this.phoneFieldId}\n name={this.phoneFieldId}\n type=\"text\"\n data-lpignore=\"true\"\n autoComplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.phone}\n placeholder=\"Invite/verify via SMS...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => {\n this.phone = convertToE164(e.target.value);\n }}\n />\n </div>\n )}\n\n <Fragment>\n {verificationOptions.length > 0 && (\n <div class=\"row pin-code\">\n <label>Verification Methods:</label>\n {this.authMethodsLoading ? (\n <verdocs-spinner size={10} mode=\"dark\" style={{margin: 'auto'}} />\n ) : (\n <div>\n {verificationOptions.map((option, i) => (\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id={`verdocs-multi-select-opt-${i}`}\n value={option.value}\n checked={this.auth_methods.includes(option.value)}\n onInput={(e: any) => {\n if (e.target.checked) {\n this.auth_methods = [...this.auth_methods, option.value];\n } else {\n this.auth_methods = this.auth_methods.filter(selected => selected !== option.value);\n }\n }}\n />\n <label htmlFor={`verdocs-multi-select-option-${i}`}>{option.label}</label>\n </div>\n ))}\n </div>\n )}\n </div>\n )}\n\n {this.auth_methods.includes('passcode') && (\n <div class=\"row pin-code\">\n <label htmlFor={this.phoneFieldId}>Passcode:</label>\n <input\n id=\"verdocs-passcode\"\n name=\"verdocs-passcode\"\n type=\"text\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n aria-autocomplete=\"none\"\n value={this.passcode}\n placeholder=\"4-8 digits recommended...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.passcode = e.target.value)}\n />\n </div>\n )}\n </Fragment>\n\n <div class=\"row pin-code\">\n <label style={{marginTop: '6px'}}>Options:</label>\n <div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-delegator\"\n checked={this.delegator}\n disabled={this.name_locked}\n onInput={(e: any) => {\n this.delegator = e.target.checked;\n if (this.delegator) this.name_locked = false;\n }}\n />\n <label htmlFor=\"verdocs-delegator\">May delegate signing</label>\n </div>\n <div class=\"option\">\n <verdocs-checkbox\n size=\"small\"\n id=\"verdocs-name-locked\"\n checked={this.name_locked}\n disabled={this.delegator}\n onInput={(e: any) => {\n this.name_locked = e.target.checked;\n if (this.name_locked) this.delegator = false;\n }}\n />\n <label htmlFor=\"verdocs-name-locked\">Name locked</label>\n </div>\n </div>\n </div>\n\n <div class=\"row message\">\n <label htmlFor=\"verdocs-contact-picker-message\">Message:</label>\n <textarea\n id=\"verdocs-contact-picker-message\"\n name=\"verdocs-contact-picker-message\"\n data-lpignore=\"true\"\n autocomplete=\"blocked\"\n placeholder=\"Optional message to include in invitation...\"\n onFocus={() => (this.showSuggestions = false)}\n onInput={(e: any) => (this.message = e.target.value)}\n >\n {this.message}\n </textarea>\n </div>\n\n <div class=\"buttons\">\n <div class=\"flex-fill\" />\n\n <verdocs-button variant=\"outline\" label=\"Cancel\" size=\"small\" onClick={e => this.handleCancel(e)} />\n <verdocs-button label=\"OK\" size=\"small\" disabled={!canSubmit} onClick={!canSubmit ? () => {} : e => this.handleSubmit(e)} />\n </div>\n </form>\n );\n }\n}\n"],"mappings":"gQAAA,MAAMA,EAA0B,IAAM,u7HCItC,MAAMC,EAAe,oU,MA4CRC,EAAoB,MALjC,WAAAC,CAAAC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AAEK,OAAOoE,QAC5B,GAAIhH,KAAKS,YAAaT,KAAKQ,UAAY,KAAK,IAGhDkE,EAAA,SAAAC,IAAA,2CAAOK,QAAQ,uBAAqB,kBAK1CN,EAAA,OAAAC,IAAA,2CAAKI,MAAM,eACTL,EAAA,SAAAC,IAAA,2CAAOK,QAAQ,kCAAgC,YAC/CN,EAAA,YAAAC,IAAA,2CACEM,GAAG,iCACHC,KAAK,iCAAgC,gBACvB,OACdJ,aAAa,UACbM,YAAY,+CACZC,QAAS,IAAOrF,KAAKM,gBAAkB,MACvCiF,QAAUhD,GAAYvC,KAAKoC,QAAUG,EAAEK,OAAOC,OAE7C7C,KAAKoC,UAIVsC,EAAA,OAAAC,IAAA,2CAAKI,MAAM,WACTL,EAAA,OAAAC,IAAA,2CAAKI,MAAM,cAEXL,EAAA,kBAAAC,IAAA,2CAAgByC,QAAQ,UAAU7C,MAAM,SAASmC,KAAK,QAAQR,QAAS3D,GAAKvC,KAAKmD,aAAaZ,KAC9FmC,EAAA,kBAAAC,IAAA,2CAAgBJ,MAAM,KAAKmC,KAAK,QAAQS,UAAWjD,EAAWgC,SAAUhC,EAAY,OAAW3B,GAAKvC,KAAKsD,aAAaf,M","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as i,H as s,F as o,g as a}from"./p-CjTHbolG.js";import{VerdocsEndpoint as r,getTemplateDocumentPageDisplayUri as d,getTemplate as l}from"@verdocs/js-sdk";import{t as c,f as n,g as h}from"./p-CGsVCy75.js";import{S as p}from"./p-C7hFgM52.js";import{c as u}from"./p-BfP9ezJQ.js";import"./p-BglCURB-.js";import"./p-CIxfEdV7.js";const m=()=>`verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}`;const b=class{constructor(i){e(this,i);this.pageRendered=t(this,"pageRendered");this.templateListenerId=null;this.endpoint=r.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}async componentWillLoad(){this.pageDisplayUri=await d(this.endpoint,this.documentId,this.pageNumber);this.listenToTemplate()}componentDidLoad(){this.resizeObserver=new ResizeObserver(c((e=>{for(const t of e){const e=t.contentRect.width;this.renderedWidth=e;this.renderedHeight=this.virtualHeight*(e/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}componentDidUpdate(){this.notifyRenderedSize()}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate();p.subscribe("templates",this.templateId,(()=>l(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){p.store.delListener(this.templateListenerId);this.templateListenerId=null}}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}const e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}const t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})}render(){if(this.loading){return i(s,null,i("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}const e=`${this.renderedHeight}px`;return i(s,{id:`${this.containerId}`,style:{height:e,flex:`0 0 ${e}`}},this.layers.map((t=>{var s;return t.type==="div"?i("div",{class:"verdocs-template-document-page-layer",id:`${this.containerId}-${t.name}`,style:{height:e}},t.name==="controls"&&(((s=this.template)===null||s===void 0?void 0:s.fields)||[]).filter((e=>e&&e.document_id===this.documentId&&e.page===this.pageNumber)).map((e=>{var t,s;const a=h(e);let{name:r,type:d,multiline:l}=e;const{xScale:c,yScale:p,templateId:u,editable:m,disabled:b,done:f,pageNumber:v}=this;if(((t=e["setting"])===null||t===void 0?void 0:t.leading)>0||((s=e["settings"])===null||s===void 0?void 0:s.leading)>0){d="textarea";l=true}switch(d){case"textbox":return i("verdocs-field-textbox",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,multiline:l,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"textarea":return i("verdocs-field-textarea",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"date":return i("verdocs-field-date",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"attachment":return i("verdocs-field-attachment",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"dropdown":return i("verdocs-field-dropdown",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"initial":return i("verdocs-field-initial",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"signature":return i("verdocs-field-signature",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,this.xScale,this.yScale)});case"timestamp":return i("verdocs-field-timestamp",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"checkbox":return i("verdocs-field-checkbox",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"radio":return i("verdocs-field-radio",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});default:return i(o,null,r)}}))):this.pageDisplayUri?i("img",{class:"verdocs-template-document-page-layer img",id:`${this.containerId}-${t.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:e=>{this.naturalWidth=e.target.naturalWidth;this.naturalHeight=e.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=e.target.offsetWidth/this.aspectRatio}}):i("div",null)})))}get container(){return a(this)}};b.style=m();const f=()=>`verdocs-toolbar-icon{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}`;const v=class{constructor(t){e(this,t);this.text="";this.icon="";this.placement="bottom";this.containerId=`verdocs-toolbar-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=u(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}show(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((()=>{}))}hide(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")}render(){return i(s,{key:"56dd7cebb5a2761547a5e24ec76652f7052906b2",class:{}},i("div",{key:"8d2f5e8578bdf5b25db200406460d9e2724c168e","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:e=>this.iconEl=e}),i("div",{key:"371c80cf2be530cf3fd8ddb7308fd30f65f3b3f4",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:e=>this.tooltip=e},this.text,i("div",{key:"39b43e589f2b52f1658562e79a3d6388478bdcbe","data-popper-arrow":"true",class:"arrow"})))}};v.style=f();export{b as verdocs_template_document_page,v as verdocs_toolbar_icon};
2
- //# sourceMappingURL=p-c6f52cd7.entry.js.map
1
+ import{r as e,c as t,h as i,H as s,F as o,g as a}from"./p-CjTHbolG.js";import{VerdocsEndpoint as r,getTemplateDocumentPageDisplayUri as d,getTemplate as l}from"@verdocs/js-sdk";import{t as c,f as n,g as h}from"./p-CGsVCy75.js";import{S as p}from"./p-C7hFgM52.js";import{c as u}from"./p-BfP9ezJQ.js";import"./p-BglCURB-.js";import"./p-CIxfEdV7.js";const m=()=>`verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}`;const b=class{constructor(i){e(this,i);this.pageRendered=t(this,"pageRendered");this.templateListenerId=null;this.endpoint=r.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}async componentWillLoad(){this.pageDisplayUri=await d(this.endpoint,this.documentId,this.pageNumber);this.listenToTemplate()}componentDidLoad(){this.resizeObserver=new ResizeObserver(c((e=>{for(const t of e){const e=t.contentRect.width;this.renderedWidth=e;this.renderedHeight=this.virtualHeight*(e/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}componentDidUpdate(){this.notifyRenderedSize()}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate();p.subscribe("templates",this.templateId,(()=>l(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){p.store.delListener(this.templateListenerId);this.templateListenerId=null}}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}const e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}const t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:e,yScale:t})}render(){if(this.loading){return i(s,null,i("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}const e=`${this.renderedHeight}px`;return i(s,{id:`${this.containerId}`,style:{height:e,flex:`0 0 ${e}`}},this.layers.map((t=>{var s;return t.type==="div"?i("div",{class:"verdocs-template-document-page-layer",id:`${this.containerId}-${t.name}`,style:{height:e}},t.name==="controls"&&(((s=this.template)===null||s===void 0?void 0:s.fields)||[]).filter((e=>e&&e.document_id===this.documentId&&e.page===this.pageNumber)).map((e=>{var t,s;const a=h(e);let{name:r,type:d,multiline:l}=e;const{xScale:c,yScale:p,templateId:u,editable:m,disabled:b,done:f,pageNumber:v}=this;if(((t=e["setting"])===null||t===void 0?void 0:t.leading)>0||((s=e["settings"])===null||s===void 0?void 0:s.leading)>0){d="textarea";l=true}switch(d){case"textbox":return i("verdocs-field-textbox",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,multiline:l,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"textarea":return i("verdocs-field-textarea",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"date":return i("verdocs-field-date",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"attachment":return i("verdocs-field-attachment",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"dropdown":return i("verdocs-field-dropdown",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"initial":return i("verdocs-field-initial",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"signature":return i("verdocs-field-signature",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,this.xScale,this.yScale)});case"timestamp":return i("verdocs-field-timestamp",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"checkbox":return i("verdocs-field-checkbox",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});case"radio":return i("verdocs-field-radio",{id:a,fieldname:r,source:"template",sourceid:u,editable:m,disabled:b,done:f,xscale:c,yscale:p,pagenumber:v,isPreview:true,style:n(e,c,p)});default:return i(o,null,r)}}))):this.pageDisplayUri?i("img",{class:"verdocs-template-document-page-layer img",id:`${this.containerId}-${t.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:e=>{this.naturalWidth=e.target.naturalWidth;this.naturalHeight=e.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=e.target.offsetWidth/this.aspectRatio}}):i("div",null)})))}get container(){return a(this)}};b.style=m();const f=()=>`verdocs-toolbar-icon{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:absolute;pointer-events:none;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}`;const v=class{constructor(t){e(this,t);this.text="";this.icon="";this.placement="bottom";this.containerId=`verdocs-toolbar-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=u(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}show(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((()=>{}))}hide(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")}render(){return i(s,{key:"56dd7cebb5a2761547a5e24ec76652f7052906b2",class:{}},i("div",{key:"8d2f5e8578bdf5b25db200406460d9e2724c168e","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:e=>this.iconEl=e}),i("div",{key:"371c80cf2be530cf3fd8ddb7308fd30f65f3b3f4",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:e=>this.tooltip=e},this.text,i("div",{key:"39b43e589f2b52f1658562e79a3d6388478bdcbe","data-popper-arrow":"true",class:"arrow"})))}};v.style=f();export{b as verdocs_template_document_page,v as verdocs_toolbar_icon};
2
+ //# sourceMappingURL=p-4ea0632f.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["verdocsTemplateDocumentPageCss","VerdocsTemplateDocumentPage","constructor","hostRef","this","templateListenerId","endpoint","VerdocsEndpoint","getDefault","editable","disabled","done","templateId","documentId","pageNumber","virtualWidth","virtualHeight","layers","name","type","containerId","Math","random","toString","substring","renderedWidth","renderedHeight","naturalWidth","naturalHeight","aspectRatio","skipFirstNotification","pageDisplayUri","xScale","yScale","loading","template","componentWillLoad","getTemplateDocumentPageDisplayUri","listenToTemplate","componentDidLoad","resizeObserver","ResizeObserver","throttle","entries","entry","contentRect","width","notifyRenderedSize","observe","container","componentDidUpdate","disconnectedCallback","_a","disconnect","unlistenToTemplate","Store","subscribe","getTemplate","store","delListener","pageRendered","emit","render","h","Host","src","class","alt","height","id","style","flex","map","layer","fields","filter","field","document_id","page","getFieldId","multiline","leading","_b","fieldname","source","sourceid","xscale","yscale","pagenumber","isPreview","getControlStyles","Fragment","onLoad","e","target","offsetWidth","verdocsToolbarIconCss","VerdocsToolbarIcon","text","icon","placement","popperInstance","createPopper","iconEl","tooltip","modifiers","options","offset","destroy","show","setAttribute","update","catch","hide","removeAttribute","key","innerHTML","onMouseEnter","onFocus","onMouseLeave","onBlur","ref","el","role"],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx","src/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.scss?tag=verdocs-toolbar-icon","src/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop({reflect: true}) templateId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop({reflect: true}) documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop({reflect: true}) pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.document_id === this.documentId && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-toolbar-icon {\n font-family: $verdocs-primary-font;\n //display: inline-block;\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n\n .icon {\n display: inline-block;\n cursor: pointer;\n\n svg {\n fill: $choice-available-color;\n }\n }\n\n .tooltip {\n display: none;\n box-shadow: 0 0 10px 1px #999999;\n background: #ffffff;\n color: $label-color;\n max-width: 240px;\n font-weight: bold;\n padding: 5px 10px;\n font-size: 13px;\n position: relative;\n border-radius: 4px;\n z-index: 20000;\n white-space: nowrap;\n\n .arrow,\n .arrow::before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n top: -4px;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n }\n\n &[data-show] {\n display: block;\n }\n\n &[data-popper-placement^='top'] > .arrow {\n bottom: -4px;\n }\n\n &[data-popper-placement^='bottom'] > .arrow {\n top: -4px;\n }\n\n &[data-popper-placement^='left'] > .arrow {\n right: -4px;\n }\n\n &[data-popper-placement^='right'] > .arrow {\n left: -4px;\n }\n\n // For the floating menu\n &[data-popper-placement^='left'] {\n //margin-right: 22px !important;\n padding: 3px 10px;\n\n & > .arrow {\n right: -1px;\n }\n }\n }\n}\n","import {createPopper, Instance} from '@popperjs/core';\nimport {Component, h, Host, Prop, State} from '@stencil/core';\nimport {Placement} from '@popperjs/core/lib/enums';\n// import {Component, Event, EventEmitter, h, Host, Prop, State} from '@stencil/core';\n\n/**\n * Displays a simple help icon. Upon hover or focus, a tooltip will be displayed with help text.\n *\n * ```ts\n * <verdocs-toolbar-icon text=\"Sample tooltip text\" icon={CalendarIcon} />\n * ```\n */\n@Component({\n tag: 'verdocs-toolbar-icon',\n styleUrl: 'verdocs-toolbar-icon.scss',\n shadow: false,\n})\nexport class VerdocsToolbarIcon {\n iconEl: HTMLDivElement;\n tooltip: HTMLDivElement;\n popperInstance: Instance;\n\n /**\n * Help text to display on hover/focus\n */\n @Prop() text: string = '';\n\n /**\n * SVG icon to display\n */\n @Prop() icon: string = '';\n\n /**\n * Override the Popper \"placement\" setting\n */\n @Prop() placement: Placement = 'bottom';\n\n /**\n * Triggered when the icon is pressed\n */\n // @Event({composed: true}) press: EventEmitter;\n\n @State() containerId = `verdocs-toolbar-icon-${Math.random().toString(36).substring(2, 11)}`;\n\n componentDidLoad() {\n this.popperInstance = createPopper(this.iconEl, this.tooltip, {\n placement: this.placement,\n modifiers: this.placement === 'left' ? [{name: 'offset', options: {offset: [0, 20]}}] : [],\n });\n // placement: 'top-end',\n // modifiers: [{name: 'offset', options: {offset: [0, 10]}}],\n // });\n }\n\n disconnectedCallback() {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n show() {\n this.tooltip?.setAttribute('data-show', '');\n this.popperInstance?.update().catch(() => {});\n }\n\n hide() {\n this.tooltip?.removeAttribute('data-show');\n }\n\n // handlePress() {\n // this.press?.emit();\n // }\n\n render() {\n return (\n <Host class={{}}>\n <div\n aria-describedby={this.containerId}\n class=\"icon\"\n innerHTML={this.icon}\n onMouseEnter={() => this.show()}\n onFocus={() => this.show()}\n onMouseLeave={() => this.hide()}\n onBlur={() => this.hide()}\n ref={el => (this.iconEl = el as HTMLDivElement)}\n />\n <div id={this.containerId} role=\"tooltip\" class=\"tooltip\" data-popper-placement={this.placement} ref={el => (this.tooltip = el as HTMLDivElement)}>\n {this.text}\n <div data-popper-arrow=\"true\" class=\"arrow\" />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"2VAAA,MAAMA,EAAiC,IAAM,yjB,MCmBhCC,EAA2B,MALxC,WAAAC,CAAAC,G,mDAMUC,KAAAC,mBAAqB,KAQrBD,KAAAE,SAA4BC,EAAgBC,aAK5CJ,KAAAK,SAAW,MAKXL,KAAAM,SAAW,MAKXN,KAAAO,KAAO,MAKQP,KAAAQ,WAAqB,GAKrBR,KAAAS,WAAqB,GAKrBT,KAAAU,WAAqB,EAMpCV,KAAAW,aAAuB,IAMRX,KAAAY,cAAwB,IAcvCZ,KAAAa,OAAuB,CAAC,CAACC,KAAM,OAAQC,KAAM,WAO5Cf,KAAAgB,YAAc,yBAAyBC,KAAKC,SAASC,SAAS,IAAIC,UAAU,EAAG,MAC/EpB,KAAAqB,cAAwBrB,K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BAAc,MAAAnB,SAAA,SAAAA,EAAE6B,SAASC,OAAM,Q,CAGtC,IAAAC,G,OACE7D,EAAAhD,KAAKoG,WAAO,MAAApD,SAAA,SAAAA,EAAE8D,gBAAgB,Y,CAOhC,MAAApD,GACE,OACEC,EAACC,EAAI,CAAAmD,IAAA,2CAACjD,MAAO,IACXH,EAAA,OAAAoD,IAAA,8DACoB/G,KAAKgB,YACvB8C,MAAM,OACNkD,UAAWhH,KAAK+F,KAChBkB,aAAc,IAAMjH,KAAKyG,OACzBS,QAAS,IAAMlH,KAAKyG,OACpBU,aAAc,IAAMnH,KAAK6G,OACzBO,OAAQ,IAAMpH,KAAK6G,OACnBQ,IAAKC,GAAOtH,KAAKmG,OAASmB,IAE5B3D,EAAA,OAAAoD,IAAA,2CAAK9C,GAAIjE,KAAKgB,YAAauG,KAAK,UAAUzD,MAAM,UAAS,wBAAwB9D,KAAKgG,UAAWqB,IAAKC,GAAOtH,KAAKoG,QAAUkB,GACzHtH,KAAK8F,KACNnC,EAAA,OAAAoD,IAAA,+DAAuB,OAAOjD,MAAM,W","ignoreList":[]}
1
+ {"version":3,"names":["verdocsTemplateDocumentPageCss","VerdocsTemplateDocumentPage","constructor","hostRef","this","templateListenerId","endpoint","VerdocsEndpoint","getDefault","editable","disabled","done","templateId","documentId","pageNumber","virtualWidth","virtualHeight","layers","name","type","containerId","Math","random","toString","substring","renderedWidth","renderedHeight","naturalWidth","naturalHeight","aspectRatio","skipFirstNotification","pageDisplayUri","xScale","yScale","loading","template","componentWillLoad","getTemplateDocumentPageDisplayUri","listenToTemplate","componentDidLoad","resizeObserver","ResizeObserver","throttle","entries","entry","contentRect","width","notifyRenderedSize","observe","container","componentDidUpdate","disconnectedCallback","_a","disconnect","unlistenToTemplate","Store","subscribe","getTemplate","store","delListener","pageRendered","emit","render","h","Host","src","class","alt","height","id","style","flex","map","layer","fields","filter","field","document_id","page","getFieldId","multiline","leading","_b","fieldname","source","sourceid","xscale","yscale","pagenumber","isPreview","getControlStyles","Fragment","onLoad","e","target","offsetWidth","verdocsToolbarIconCss","VerdocsToolbarIcon","text","icon","placement","popperInstance","createPopper","iconEl","tooltip","modifiers","options","offset","destroy","show","setAttribute","update","catch","hide","removeAttribute","key","innerHTML","onMouseEnter","onFocus","onMouseLeave","onBlur","ref","el","role"],"sources":["src/components/templates/verdocs-template-document-page/verdocs-template-document-page.scss?tag=verdocs-template-document-page","src/components/templates/verdocs-template-document-page/verdocs-template-document-page.tsx","src/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.scss?tag=verdocs-toolbar-icon","src/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-document-page {\n width: 100%;\n position: relative;\n\n .verdocs-template-document-page-layer {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n box-shadow: 0 0 10px 5px #0000000f;\n\n &.img {\n width: 100%;\n }\n }\n\n .placeholder {\n opacity: 0.1;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n }\n}\n","// NOTE: This component does not have a story because it's not intended for external use.\n\nimport {getTemplate, getTemplateDocumentPageDisplayUri, type ITemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {Component, h, Host, Prop, Event, EventEmitter, State, Element, Fragment} from '@stencil/core';\nimport {IDocumentPageInfo, IPageLayer} from '../../../utils/Types';\nimport {getControlStyles, getFieldId} from '../../../utils/utils';\nimport {throttle} from '../../../utils/utils';\nimport {Store} from '../../../utils/Datastore';\n\n/**\n * Represents one document page. This is primarily a layout container used to coordinate positions of\n * page-related layers such as the page itself, signature fields, etc. It is not intended to be used\n * on its own as an individual component.\n */\n@Component({\n tag: 'verdocs-template-document-page',\n styleUrl: 'verdocs-template-document-page.scss',\n shadow: false,\n})\nexport class VerdocsTemplateDocumentPage {\n private templateListenerId = null;\n private resizeObserver: ResizeObserver;\n\n @Element() container: HTMLElement;\n\n /**\n * The endpoint to load from.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * Whether the fields should be editable (Builder)\n */\n @Prop() editable = false;\n\n /**\n * Whether the fields should be disabled (Builder)\n */\n @Prop() disabled = false;\n\n /**\n * Whether the field are interactable (done/submitted disables this)\n */\n @Prop() done = false;\n\n /**\n * The ID of the template the document is for.\n */\n @Prop({reflect: true}) templateId: string = '';\n\n /**\n * The ID of the document to display.\n */\n @Prop({reflect: true}) documentId: string = '';\n\n /**\n * The page number being rendered. (Reminder: page numbers are 1-based.)\n */\n @Prop({reflect: true}) pageNumber: number = 1;\n\n /**\n * The \"virtual\" width of the page canvas. Defaults to 612 which at 72dpi is 8.5\" wide. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop() virtualWidth: number = 612;\n\n /**\n * The \"virtual\" height of the page canvas. Defaults to 792 which at 72dpi is 11\" tall. This is used to compute\n * the aspect ratio of the final rendered element when scaling up/down.\n */\n @Prop({mutable: true}) virtualHeight: number = 792;\n\n /**\n * The layers that will be rendered. The DOM structure will be a DIV container with one child DIV for each layer.\n * The parent DIV will have a unique ID, and each child DIV will have that ID with the layer name appended, e.g.\n * if `pages` was ['page', 'fields'] the structure will be:\n *\n * ```\n * <div id=\"verdocs-document-page-ker2fr1p9\">\n * <div id=\"verdocs-document-page-ker2fr1p9-page\"></div>\n * <div id=\"verdocs-document-page-ker2fr1p9-fields\"></div>\n * </div>\n * ```\n */\n @Prop() layers: IPageLayer[] = [{name: 'page', type: 'canvas'}];\n\n /**\n * Fired when a page has been rendered. This is also fired when the page is resized.\n */\n @Event() pageRendered: EventEmitter<IDocumentPageInfo>;\n\n @State() containerId = `verdocs-document-page-${Math.random().toString(36).substring(2, 11)}`;\n @State() renderedWidth: number = this.virtualWidth;\n @State() renderedHeight: number = this.virtualHeight;\n @State() naturalWidth: number = this.virtualWidth;\n @State() naturalHeight: number = this.virtualHeight;\n @State() aspectRatio: number = this.virtualWidth / this.virtualHeight;\n @State() skipFirstNotification = true;\n @State() pageDisplayUri = '';\n @State() xScale = 1;\n @State() yScale = 1;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n async componentWillLoad() {\n this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);\n this.listenToTemplate();\n }\n\n componentDidLoad() {\n this.resizeObserver = new ResizeObserver(\n throttle(entries => {\n for (const entry of entries) {\n const renderedWidth = entry.contentRect.width;\n this.renderedWidth = renderedWidth;\n this.renderedHeight = this.virtualHeight * (renderedWidth / this.virtualWidth);\n }\n\n this.notifyRenderedSize();\n }, 100),\n );\n\n this.resizeObserver.observe(this.container);\n }\n\n componentDidUpdate() {\n // This is fired when fields are updated and triggers the parent to re-attach behaviors like drag-and-drop\n this.notifyRenderedSize();\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect();\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n this.template = template;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n notifyRenderedSize() {\n // We skip one notification because by default we will always get at least two, one when rendering the initial size\n // and a second once we're able to compute the scale size, when the resizeObserver sets renderedWidth/renderedHeight.\n if (this.skipFirstNotification) {\n this.skipFirstNotification = false;\n return;\n }\n\n const xScale = this.renderedWidth / this.virtualWidth;\n if (this.xScale !== xScale) {\n this.xScale = xScale;\n }\n\n const yScale = this.renderedHeight / this.virtualHeight;\n if (this.yScale !== yScale) {\n this.yScale = yScale;\n }\n\n this.pageRendered.emit({\n // container: this.container,\n containerId: this.containerId,\n documentId: this.documentId,\n pageNumber: this.pageNumber,\n virtualWidth: this.virtualWidth,\n virtualHeight: this.virtualHeight,\n renderedWidth: this.renderedWidth,\n renderedHeight: this.renderedHeight,\n naturalWidth: this.naturalWidth,\n naturalHeight: this.naturalHeight,\n aspectRatio: this.aspectRatio,\n xScale,\n yScale,\n });\n }\n\n render() {\n if (this.loading) {\n return (\n <Host>\n <img src=\"https://public-assets.verdocs.com/loading-placeholder.png\" class=\"placeholder\" alt=\"Placeholder page\" />\n </Host>\n );\n }\n\n const height = `${this.renderedHeight}px`;\n\n return (\n <Host id={`${this.containerId}`} style={{height, flex: `0 0 ${height}`}}>\n {this.layers.map(layer =>\n layer.type === 'div' ? (\n <div class=\"verdocs-template-document-page-layer\" id={`${this.containerId}-${layer.name}`} style={{height}}>\n {layer.name === 'controls' &&\n (this.template?.fields || [])\n .filter(field => field && field.document_id === this.documentId && field.page === this.pageNumber)\n .map(field => {\n const id = getFieldId(field);\n let {name, type, multiline} = field;\n const {xScale, yScale, templateId, editable, disabled, done, pageNumber} = this;\n if (field['setting']?.leading > 0 || field['settings']?.leading > 0) {\n type = 'textarea';\n multiline = true;\n }\n switch (type as any) {\n case 'textbox':\n return (\n <verdocs-field-textbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n multiline={multiline}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'textarea':\n return (\n <verdocs-field-textarea\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'date':\n return (\n <verdocs-field-date\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'attachment':\n return (\n <verdocs-field-attachment\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'dropdown':\n return (\n <verdocs-field-dropdown\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'initial':\n return (\n <verdocs-field-initial\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'signature':\n return (\n <verdocs-field-signature\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, this.xScale, this.yScale)}\n />\n );\n case 'timestamp':\n return (\n <verdocs-field-timestamp\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'checkbox':\n return (\n <verdocs-field-checkbox\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n case 'radio':\n return (\n <verdocs-field-radio\n id={id}\n fieldname={name}\n source=\"template\"\n sourceid={templateId}\n editable={editable}\n disabled={disabled}\n done={done}\n xscale={xScale}\n yscale={yScale}\n pagenumber={pageNumber}\n isPreview\n style={getControlStyles(field, xScale, yScale)}\n />\n );\n default:\n return <Fragment>{name}</Fragment>;\n }\n })}\n </div>\n ) : this.pageDisplayUri ? (\n <img\n class=\"verdocs-template-document-page-layer img\"\n id={`${this.containerId}-${layer.name}`}\n src={this.pageDisplayUri}\n alt={`Page ${this.pageNumber}`}\n aria-hidden={true}\n loading=\"lazy\"\n onLoad={(e: any) => {\n // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that\n // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).\n // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values\n // for a field are based on the responsive Web view the Template editor was seeing. The IMG was scaled down there in the\n // exact same way, so we just honor it. We capture the natural width and height here more as information. Then we use the\n // aspect ratio to adjust the \"virtual\" height in case the page is not 8.5\"x11\".\n // TODO: Store this in the DB with each page.\n this.naturalWidth = e.target.naturalWidth;\n this.naturalHeight = e.target.naturalHeight;\n this.aspectRatio = this.naturalWidth / this.naturalHeight;\n this.virtualHeight = this.virtualWidth / this.aspectRatio;\n this.renderedHeight = e.target.offsetWidth / this.aspectRatio;\n }}\n />\n ) : (\n <div></div>\n ),\n )}\n </Host>\n );\n }\n}\n","@import '../../../theme.scss';\n\nverdocs-toolbar-icon {\n font-family: $verdocs-primary-font;\n //display: inline-block;\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n\n .icon {\n display: inline-block;\n cursor: pointer;\n\n svg {\n fill: $choice-available-color;\n }\n }\n\n .tooltip {\n display: none;\n box-shadow: 0 0 10px 1px #999999;\n background: #ffffff;\n color: $label-color;\n max-width: 240px;\n font-weight: bold;\n padding: 5px 10px;\n font-size: 13px;\n // MUST be absolute. Popper positions the tooltip with inline transforms and assumes it is out\n // of the normal flow. With position:relative the tooltip instead occupies space inside the\n // flex container when shown, which widens the toolbar and shifts the icon out from under the\n // pointer. That fires mouseleave -> hide -> layout collapses -> mouseenter -> show, an endless\n // flicker where the icon can never be clicked. It only bites where the toolbar has no slack to\n // absorb the width change (e.g. the Teams tab), which is why it looked fine in the web app.\n position: absolute;\n // The tooltip is decoration; never let it capture the hover it was triggered by.\n pointer-events: none;\n border-radius: 4px;\n z-index: 20000;\n white-space: nowrap;\n\n .arrow,\n .arrow::before {\n position: absolute;\n width: 8px;\n height: 8px;\n background: inherit;\n }\n\n .arrow {\n visibility: hidden;\n top: -4px;\n }\n\n .arrow::before {\n visibility: visible;\n content: '';\n transform: rotate(45deg);\n }\n\n &[data-show] {\n display: block;\n }\n\n &[data-popper-placement^='top'] > .arrow {\n bottom: -4px;\n }\n\n &[data-popper-placement^='bottom'] > .arrow {\n top: -4px;\n }\n\n &[data-popper-placement^='left'] > .arrow {\n right: -4px;\n }\n\n &[data-popper-placement^='right'] > .arrow {\n left: -4px;\n }\n\n // For the floating menu\n &[data-popper-placement^='left'] {\n //margin-right: 22px !important;\n padding: 3px 10px;\n\n & > .arrow {\n right: -1px;\n }\n }\n }\n}\n","import {createPopper, Instance} from '@popperjs/core';\nimport {Component, h, Host, Prop, State} from '@stencil/core';\nimport {Placement} from '@popperjs/core/lib/enums';\n// import {Component, Event, EventEmitter, h, Host, Prop, State} from '@stencil/core';\n\n/**\n * Displays a simple help icon. Upon hover or focus, a tooltip will be displayed with help text.\n *\n * ```ts\n * <verdocs-toolbar-icon text=\"Sample tooltip text\" icon={CalendarIcon} />\n * ```\n */\n@Component({\n tag: 'verdocs-toolbar-icon',\n styleUrl: 'verdocs-toolbar-icon.scss',\n shadow: false,\n})\nexport class VerdocsToolbarIcon {\n iconEl: HTMLDivElement;\n tooltip: HTMLDivElement;\n popperInstance: Instance;\n\n /**\n * Help text to display on hover/focus\n */\n @Prop() text: string = '';\n\n /**\n * SVG icon to display\n */\n @Prop() icon: string = '';\n\n /**\n * Override the Popper \"placement\" setting\n */\n @Prop() placement: Placement = 'bottom';\n\n /**\n * Triggered when the icon is pressed\n */\n // @Event({composed: true}) press: EventEmitter;\n\n @State() containerId = `verdocs-toolbar-icon-${Math.random().toString(36).substring(2, 11)}`;\n\n componentDidLoad() {\n this.popperInstance = createPopper(this.iconEl, this.tooltip, {\n placement: this.placement,\n modifiers: this.placement === 'left' ? [{name: 'offset', options: {offset: [0, 20]}}] : [],\n });\n // placement: 'top-end',\n // modifiers: [{name: 'offset', options: {offset: [0, 10]}}],\n // });\n }\n\n disconnectedCallback() {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n show() {\n this.tooltip?.setAttribute('data-show', '');\n this.popperInstance?.update().catch(() => {});\n }\n\n hide() {\n this.tooltip?.removeAttribute('data-show');\n }\n\n // handlePress() {\n // this.press?.emit();\n // }\n\n render() {\n return (\n <Host class={{}}>\n <div\n aria-describedby={this.containerId}\n class=\"icon\"\n innerHTML={this.icon}\n onMouseEnter={() => this.show()}\n onFocus={() => this.show()}\n onMouseLeave={() => this.hide()}\n onBlur={() => this.hide()}\n ref={el => (this.iconEl = el as HTMLDivElement)}\n />\n <div id={this.containerId} role=\"tooltip\" class=\"tooltip\" data-popper-placement={this.placement} ref={el => (this.tooltip = el as HTMLDivElement)}>\n {this.text}\n <div data-popper-arrow=\"true\" class=\"arrow\" />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"2VAAA,MAAMA,EAAiC,IAAM,yjB,MCmBhCC,EAA2B,MALxC,WAAAC,CAAAC,G,mDAMUC,KAAAC,mBAAqB,KAQrBD,KAAAE,SAA4BC,EAAgBC,aAK5CJ,KAAAK,SAAW,MAKXL,KAAAM,SAAW,MAKXN,KAAAO,KAAO,MAKQP,KAAAQ,WAAqB,GAKrBR,KAAAS,WAAqB,GAKrBT,KAAAU,WAAqB,EAMpCV,KAAAW,aAAuB,IAMRX,KAAAY,cAAwB,IAcvCZ,KAAAa,OAAuB,CAAC,CAACC,KAAM,OAAQC,KAAM,WAO5Cf,KAAAgB,YAAc,yBAAyBC,KAAKC,SAASC,SAAS,IAAIC,UAAU,EAAG,MAC/EpB,KAAAqB,cAAwBrB,KAAKW,aAC7BX,KAAAsB,eAAyBtB,KAAKY,cAC9BZ,KAAAuB,aAAu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