@verdocs/web-sdk 4.2.88 → 4.2.93

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 (246) hide show
  1. package/dist/cjs/{EnvelopeStore-47a7f67b.js → EnvelopeStore-8ff43359.js} +1 -1
  2. package/dist/cjs/{TemplateFieldStore-90f4d98b.js → TemplateFieldStore-2ad4a148.js} +1 -2
  3. package/dist/cjs/{TemplateRoleStore-f3d11184.js → TemplateRoleStore-fe871897.js} +1 -1
  4. package/dist/cjs/{TemplateStore-eb40fcaf.js → TemplateStore-ea66895c.js} +3 -3
  5. package/dist/cjs/{index-65257ef5.js → index-a27a7f77.js} +1 -4
  6. package/dist/cjs/{index-06e6741b.js → index-c12980a1.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/{utils-813f2cbf.js → utils-b7682f9b.js} +1 -18
  9. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-build.cjs.entry.js +5 -5
  11. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-button_2.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +5 -5
  14. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +2 -2
  15. package/dist/cjs/verdocs-dialog.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +2 -2
  18. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +3 -3
  19. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +3 -3
  20. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +2 -2
  21. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +9 -6
  22. package/dist/cjs/verdocs-field-payment.cjs.entry.js +4 -4
  23. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  24. package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +1 -1
  25. package/dist/cjs/verdocs-loader.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
  27. package/dist/cjs/verdocs-organization-card_2.cjs.entry.js +1 -1
  28. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +2 -2
  29. package/dist/cjs/verdocs-preview_9.cjs.entry.js +6 -6
  30. package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
  31. package/dist/cjs/verdocs-radio-button_3.cjs.entry.js +5 -5
  32. package/dist/cjs/verdocs-search-box.cjs.entry.js +1 -1
  33. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  34. package/dist/cjs/verdocs-sign.cjs.entry.js +17 -16
  35. package/dist/cjs/verdocs-spinner.cjs.entry.js +1 -1
  36. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
  37. package/dist/cjs/verdocs-table.cjs.entry.js +1 -1
  38. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  39. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +4 -4
  40. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  41. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  42. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  43. package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
  44. package/dist/cjs/verdocs-view.cjs.entry.js +2 -2
  45. package/dist/cjs/verdocs-web-sdk.cjs.js +2 -2
  46. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +14 -13
  47. package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +2 -1
  48. package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +3 -1
  49. package/dist/collection/utils/TemplateFieldStore.js +0 -1
  50. package/dist/collection/utils/utils.js +1 -18
  51. package/dist/components/TemplateFieldStore.js +0 -1
  52. package/dist/components/utils.js +1 -18
  53. package/dist/components/verdocs-field-initial2.js +2 -1
  54. package/dist/components/verdocs-field-signature2.js +3 -1
  55. package/dist/components/verdocs-sign.js +14 -13
  56. package/dist/esm/{EnvelopeStore-822889cb.js → EnvelopeStore-27e21856.js} +1 -1
  57. package/dist/esm/{TemplateFieldStore-6113ab4b.js → TemplateFieldStore-4a2e5b85.js} +1 -2
  58. package/dist/esm/{TemplateRoleStore-054bd7ed.js → TemplateRoleStore-6d1bec83.js} +1 -1
  59. package/dist/esm/{TemplateStore-83674f6d.js → TemplateStore-cd995a27.js} +3 -3
  60. package/dist/esm/{index-d3ac9650.js → index-a68c7262.js} +1 -4
  61. package/dist/esm/{index-04235019.js → index-a971a584.js} +1 -1
  62. package/dist/esm/loader.js +3 -3
  63. package/dist/esm/{utils-467fcc6a.js → utils-7b0b77d8.js} +1 -18
  64. package/dist/esm/verdocs-auth.entry.js +1 -1
  65. package/dist/esm/verdocs-build.entry.js +5 -5
  66. package/dist/esm/verdocs-button-panel_2.entry.js +1 -1
  67. package/dist/esm/verdocs-button_2.entry.js +1 -1
  68. package/dist/esm/verdocs-checkbox_5.entry.js +5 -5
  69. package/dist/esm/verdocs-contact-picker_2.entry.js +2 -2
  70. package/dist/esm/verdocs-dialog.entry.js +1 -1
  71. package/dist/esm/verdocs-dropdown.entry.js +1 -1
  72. package/dist/esm/verdocs-envelope-document-page.entry.js +2 -2
  73. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +3 -3
  74. package/dist/esm/verdocs-envelope-sidebar.entry.js +3 -3
  75. package/dist/esm/verdocs-envelopes-list.entry.js +2 -2
  76. package/dist/esm/verdocs-field-attachment_13.entry.js +9 -6
  77. package/dist/esm/verdocs-field-payment.entry.js +4 -4
  78. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  79. package/dist/esm/verdocs-kba-dialog.entry.js +1 -1
  80. package/dist/esm/verdocs-loader.entry.js +1 -1
  81. package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
  82. package/dist/esm/verdocs-organization-card_2.entry.js +1 -1
  83. package/dist/esm/verdocs-pagination_2.entry.js +2 -2
  84. package/dist/esm/verdocs-preview_9.entry.js +6 -6
  85. package/dist/esm/verdocs-quick-functions.entry.js +1 -1
  86. package/dist/esm/verdocs-radio-button_3.entry.js +5 -5
  87. package/dist/esm/verdocs-search-box.entry.js +1 -1
  88. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  89. package/dist/esm/verdocs-sign.entry.js +17 -16
  90. package/dist/esm/verdocs-spinner.entry.js +1 -1
  91. package/dist/esm/verdocs-status-indicator.entry.js +1 -1
  92. package/dist/esm/verdocs-table.entry.js +1 -1
  93. package/dist/esm/verdocs-template-card.entry.js +1 -1
  94. package/dist/esm/verdocs-template-document-page_2.entry.js +4 -4
  95. package/dist/esm/verdocs-template-star.entry.js +1 -1
  96. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  97. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  98. package/dist/esm/verdocs-toggle.entry.js +1 -1
  99. package/dist/esm/verdocs-view.entry.js +2 -2
  100. package/dist/esm/verdocs-web-sdk.js +3 -3
  101. package/dist/esm-es5/{EnvelopeStore-822889cb.js → EnvelopeStore-27e21856.js} +1 -1
  102. package/dist/esm-es5/{TemplateFieldStore-6113ab4b.js → TemplateFieldStore-4a2e5b85.js} +1 -1
  103. package/dist/esm-es5/{TemplateRoleStore-054bd7ed.js → TemplateRoleStore-6d1bec83.js} +1 -1
  104. package/dist/esm-es5/{TemplateStore-83674f6d.js → TemplateStore-cd995a27.js} +1 -1
  105. package/dist/esm-es5/index-a68c7262.js +1 -0
  106. package/dist/esm-es5/{index-04235019.js → index-a971a584.js} +1 -1
  107. package/dist/esm-es5/loader.js +1 -1
  108. package/dist/esm-es5/{utils-467fcc6a.js → utils-7b0b77d8.js} +1 -1
  109. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-button_2.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-dialog.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-dropdown.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-loader.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  127. package/dist/esm-es5/verdocs-organization-card_2.entry.js +1 -1
  128. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  129. package/dist/esm-es5/verdocs-preview_9.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-radio-button_3.entry.js +1 -1
  132. package/dist/esm-es5/verdocs-search-box.entry.js +1 -1
  133. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  134. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  135. package/dist/esm-es5/verdocs-spinner.entry.js +1 -1
  136. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  137. package/dist/esm-es5/verdocs-table.entry.js +1 -1
  138. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  139. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  140. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  141. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  142. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  143. package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
  144. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  145. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  146. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -1
  147. package/dist/verdocs-web-sdk/{p-5c614b25.system.entry.js → p-00828859.system.entry.js} +1 -1
  148. package/dist/verdocs-web-sdk/{p-7f3d895b.entry.js → p-04e53cb3.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-35e7051c.system.entry.js → p-0833c8d4.system.entry.js} +1 -1
  150. package/dist/verdocs-web-sdk/{p-b62aeeda.entry.js → p-08d272d2.entry.js} +1 -1
  151. package/dist/verdocs-web-sdk/{p-5473bbd9.entry.js → p-0b061610.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-bb73f4d8.system.entry.js → p-0eeaf11d.system.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/{p-c86983bc.js → p-1289c3d5.js} +1 -1
  154. package/dist/verdocs-web-sdk/{p-56adb753.entry.js → p-1500a477.entry.js} +1 -1
  155. package/dist/verdocs-web-sdk/{p-e41fa435.system.entry.js → p-17930b47.system.entry.js} +1 -1
  156. package/dist/verdocs-web-sdk/{p-69176f56.entry.js → p-18cdd0d8.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/{p-95aa88de.system.entry.js → p-18dd4952.system.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/p-1acc504b.system.entry.js +1 -0
  159. package/dist/verdocs-web-sdk/{p-d1a1ffaf.entry.js → p-233c47c9.entry.js} +1 -1
  160. package/dist/verdocs-web-sdk/p-267df026.system.js +1 -0
  161. package/dist/verdocs-web-sdk/{p-574853d0.entry.js → p-27d94737.entry.js} +1 -1
  162. package/dist/verdocs-web-sdk/{p-57ce9e5a.system.entry.js → p-281ce405.system.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/{p-921a282f.system.entry.js → p-286a97a7.system.entry.js} +1 -1
  164. package/dist/verdocs-web-sdk/{p-25c7a632.entry.js → p-2a0d1b6e.entry.js} +1 -1
  165. package/dist/verdocs-web-sdk/{p-40880f27.entry.js → p-2c2a9483.entry.js} +1 -1
  166. package/dist/verdocs-web-sdk/{p-808697ac.system.js → p-2cf67caa.system.js} +1 -1
  167. package/dist/verdocs-web-sdk/{p-96e26aea.entry.js → p-2f191d39.entry.js} +1 -1
  168. package/dist/verdocs-web-sdk/{p-7a43f055.entry.js → p-3514f40b.entry.js} +1 -1
  169. package/dist/verdocs-web-sdk/{p-e339ebc4.system.js → p-38778553.system.js} +1 -1
  170. package/dist/verdocs-web-sdk/{p-f5cac080.entry.js → p-38ab701b.entry.js} +1 -1
  171. package/dist/verdocs-web-sdk/{p-7ca7ef58.system.entry.js → p-42a3802e.system.entry.js} +1 -1
  172. package/dist/verdocs-web-sdk/{p-89ccf031.js → p-4372c294.js} +1 -1
  173. package/dist/verdocs-web-sdk/{p-12264105.system.entry.js → p-4475c970.system.entry.js} +1 -1
  174. package/dist/verdocs-web-sdk/{p-c0d3c96f.entry.js → p-44dad7e0.entry.js} +1 -1
  175. package/dist/verdocs-web-sdk/{p-916a38e8.system.entry.js → p-44ef8fc5.system.entry.js} +1 -1
  176. package/dist/verdocs-web-sdk/{p-e744e6c8.system.entry.js → p-4bf58d00.system.entry.js} +1 -1
  177. package/dist/verdocs-web-sdk/{p-bd596213.system.entry.js → p-4dcd1005.system.entry.js} +1 -1
  178. package/dist/verdocs-web-sdk/p-5207d80c.js +2 -0
  179. package/dist/verdocs-web-sdk/{p-e5a426c4.system.js → p-59073837.system.js} +2 -2
  180. package/dist/verdocs-web-sdk/{p-abeb53f5.entry.js → p-5b511018.entry.js} +1 -1
  181. package/dist/verdocs-web-sdk/{p-5a4950f1.system.entry.js → p-5c0c042d.system.entry.js} +1 -1
  182. package/dist/verdocs-web-sdk/{p-4275b4b5.system.entry.js → p-5c50ce79.system.entry.js} +1 -1
  183. package/dist/verdocs-web-sdk/{p-0f6f5c51.system.entry.js → p-6589d38a.system.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/{p-124d8ec6.system.entry.js → p-6bcdfa4f.system.entry.js} +1 -1
  185. package/dist/verdocs-web-sdk/{p-0085540e.system.js → p-701b9cbd.system.js} +1 -1
  186. package/dist/verdocs-web-sdk/{p-4de823b1.entry.js → p-7f52a1c4.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/{p-6ce8381c.js → p-83317d11.js} +1 -1
  188. package/dist/verdocs-web-sdk/{p-9a8c90f4.system.js → p-86ccc8c9.system.js} +1 -1
  189. package/dist/verdocs-web-sdk/{p-d2ad8536.entry.js → p-88437b42.entry.js} +1 -1
  190. package/dist/verdocs-web-sdk/{p-2ac3b1ce.entry.js → p-8b74ca77.entry.js} +1 -1
  191. package/dist/verdocs-web-sdk/{p-9034d0c7.entry.js → p-94852d77.entry.js} +1 -1
  192. package/dist/verdocs-web-sdk/{p-9df7c5b4.entry.js → p-965631d9.entry.js} +1 -1
  193. package/dist/verdocs-web-sdk/p-9753694a.entry.js +1 -0
  194. package/dist/verdocs-web-sdk/{p-8efd4efc.entry.js → p-9ad111fc.entry.js} +1 -1
  195. package/dist/verdocs-web-sdk/{p-17c111cb.system.entry.js → p-9b3bebba.system.entry.js} +1 -1
  196. package/dist/verdocs-web-sdk/{p-ef79cbed.entry.js → p-9cde1db5.entry.js} +1 -1
  197. package/dist/verdocs-web-sdk/{p-5041f47d.system.entry.js → p-9ddaf09d.system.entry.js} +1 -1
  198. package/dist/verdocs-web-sdk/{p-d812d374.js → p-9e371467.js} +1 -1
  199. package/dist/verdocs-web-sdk/p-a1bff034.system.js +1 -0
  200. package/dist/verdocs-web-sdk/{p-12a2b8bb.system.entry.js → p-a324eeca.system.entry.js} +1 -1
  201. package/dist/verdocs-web-sdk/{p-b2cf2cce.system.entry.js → p-a4a60476.system.entry.js} +1 -1
  202. package/dist/verdocs-web-sdk/{p-877e9b3f.system.entry.js → p-a764d4cd.system.entry.js} +1 -1
  203. package/dist/verdocs-web-sdk/{p-87c0f26b.entry.js → p-a87190ad.entry.js} +1 -1
  204. package/dist/verdocs-web-sdk/{p-a5875fbf.entry.js → p-aad40b41.entry.js} +1 -1
  205. package/dist/verdocs-web-sdk/{p-3e4d4e20.system.entry.js → p-b055bec1.system.entry.js} +1 -1
  206. package/dist/verdocs-web-sdk/{p-e66e59d7.system.entry.js → p-b426caa8.system.entry.js} +1 -1
  207. package/dist/verdocs-web-sdk/{p-00db42e2.system.entry.js → p-b743f246.system.entry.js} +1 -1
  208. package/dist/verdocs-web-sdk/{p-b804950e.entry.js → p-b7a0a567.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/{p-04b24f21.entry.js → p-ba8fc3fc.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/{p-218a16f9.system.entry.js → p-bb315de2.system.entry.js} +1 -1
  211. package/dist/verdocs-web-sdk/p-bb4674a6.system.entry.js +1 -0
  212. package/dist/verdocs-web-sdk/{p-15aa84ea.system.entry.js → p-bbdc81d5.system.entry.js} +1 -1
  213. package/dist/verdocs-web-sdk/{p-252a42c7.system.entry.js → p-be2431ed.system.entry.js} +1 -1
  214. package/dist/verdocs-web-sdk/{p-78d37e83.system.entry.js → p-c1978016.system.entry.js} +1 -1
  215. package/dist/verdocs-web-sdk/{p-db46606c.entry.js → p-c8e439cc.entry.js} +1 -1
  216. package/dist/verdocs-web-sdk/{p-a0849dc6.system.entry.js → p-c9b00253.system.entry.js} +1 -1
  217. package/dist/verdocs-web-sdk/{p-2a43465a.entry.js → p-ce085249.entry.js} +1 -1
  218. package/dist/verdocs-web-sdk/{p-b7030c25.system.entry.js → p-cea2766d.system.entry.js} +1 -1
  219. package/dist/verdocs-web-sdk/{p-5180a854.system.js → p-d3b5c957.system.js} +1 -1
  220. package/dist/verdocs-web-sdk/{p-59fa9d51.entry.js → p-d55b1490.entry.js} +1 -1
  221. package/dist/verdocs-web-sdk/{p-679639b1.system.entry.js → p-d754b3d1.system.entry.js} +1 -1
  222. package/dist/verdocs-web-sdk/{p-a9a20b20.entry.js → p-d80305c3.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/{p-048107b2.entry.js → p-dc307e81.entry.js} +1 -1
  224. package/dist/verdocs-web-sdk/{p-80820f5a.entry.js → p-dc4a5bc3.entry.js} +1 -1
  225. package/dist/verdocs-web-sdk/{p-c6d79a0d.entry.js → p-de1f949a.entry.js} +1 -1
  226. package/dist/verdocs-web-sdk/{p-2819b713.system.entry.js → p-e331a1ad.system.entry.js} +1 -1
  227. package/dist/verdocs-web-sdk/{p-b241b339.entry.js → p-e5e05e63.entry.js} +1 -1
  228. package/dist/verdocs-web-sdk/{p-a0839ea6.system.entry.js → p-e8dd697f.system.entry.js} +1 -1
  229. package/dist/verdocs-web-sdk/{p-f4688962.js → p-ed199c97.js} +1 -1
  230. package/dist/verdocs-web-sdk/p-f0449967.entry.js +1 -0
  231. package/dist/verdocs-web-sdk/{p-58071af4.system.entry.js → p-f1a49237.system.entry.js} +1 -1
  232. package/dist/verdocs-web-sdk/p-ff64786a.js +1 -0
  233. package/dist/verdocs-web-sdk/{p-6ecdfe5f.entry.js → p-ffbfc227.entry.js} +1 -1
  234. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  235. package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
  236. package/package.json +2 -2
  237. package/dist/custom-elements.json +0 -2009
  238. package/dist/esm-es5/index-d3ac9650.js +0 -1
  239. package/dist/verdocs-web-sdk/p-1cc7b032.entry.js +0 -1
  240. package/dist/verdocs-web-sdk/p-34325ad6.system.js +0 -1
  241. package/dist/verdocs-web-sdk/p-60e4721d.entry.js +0 -1
  242. package/dist/verdocs-web-sdk/p-67a42e2b.js +0 -2
  243. package/dist/verdocs-web-sdk/p-6ac15c93.system.entry.js +0 -1
  244. package/dist/verdocs-web-sdk/p-a801699f.system.entry.js +0 -1
  245. package/dist/verdocs-web-sdk/p-f0386b87.system.js +0 -1
  246. package/dist/verdocs-web-sdk/p-fdf18146.js +0 -1
@@ -1 +1 @@
1
- import{r as e,c as i,h as s,H as t}from"./p-67a42e2b.js";import{VerdocsEndpoint as n,resendInvitation as o,cancelEnvelope as l,formatFullName as a,userIsEnvelopeOwner as d,capitalize as r}from"@verdocs/js-sdk";import{g as c}from"./p-f4688962.js";import{F as v}from"./p-251c4106.js";import{V as p}from"./p-04c07b7b.js";import{S as h}from"./p-fd97809c.js";import{d as g}from"./p-edaec1b6.js";import"./p-6ce8381c.js";import"./p-a706bac9.js";const w={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'},m=class{constructor(s){e(this,s),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.toggle=i(this,"toggle",7),this.another=i(this,"another",7),this.store=null,this.endpoint=n.getDefault(),this.envelopeId="",this.activeTab=1,this.panelOpen=!1,this.showManageDialog=!1,this.showRecipientDialog="",this.showCancelDialog=!1,this.loading=!0}async componentWillLoad(){var e,i,s;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[SIDEBAR] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[SIDEBAR] Unable to start session, must be authenticated");this.store=await c(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1}catch(t){console.log("[SIDEBAR] Error loading envelope",t),null===(e=this.sdkError)||void 0===e||e.emit(new h(t.message,null===(i=t.response)||void 0===i?void 0:i.status,null===(s=t.response)||void 0===s?void 0:s.data))}}sortEnvelopeRecipients(){var e,i;null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i||i.recipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}setTab(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen,null===(i=this.toggle)||void 0===i||i.emit({open:this.panelOpen}),this.activeTab=e}canResendRecipient(e){var i,s;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.status)}handleRecipientAction(e,i){var s,t;switch(console.log("[SIDEBAR] Recipient action",i,e),i){case"reminder":o(this.endpoint,this.envelopeId,e.role_name).then((()=>{p("Reminder Sent",{style:"success"})})).catch((e=>{console.log("[SIDEBAR] Error resending invitation",e),p("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":case"details":p("This feature will be enabled in a future release. Please try again later.",{style:"info"})}null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:null===(t=this.store)||void 0===t?void 0:t.state,event:i})}cancelEnvelope(){this.loading=!0,l(this.endpoint,this.envelopeId).then((async e=>{var i,s;console.log("[SIDEBAR] Envelope canceled",e),p("Envelope canceled",{style:"success"}),this.store=await c(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:null===(s=this.store)||void 0===s?void 0:s.state,event:"canceled"})})).catch((e=>{console.log("[SIDEBAR] Error canceling envelope",e),this.loading=!1,p("Error canceling envelope: "+e.message,{style:"error"})}))}prepareHistoryEntries(){var e,i,s,t,n,o,l,d,r,c,v,p;const h=[],g=(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.history_entries)||[];h.push({icon:"pencil",message:"Envelope created.",date:new Date(null===(t=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===t?void 0:t.created_at)}),"complete"===(null===(o=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===o?void 0:o.status)&&h.push({icon:"pencil",message:"Envelope completed.",date:new Date(null===(d=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===d?void 0:d.updated_at)});const w=g.some((e=>"owner:canceled"===e.event));return"canceled"!==(null===(c=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===c?void 0:c.status)||w||h.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(null===(p=null===(v=this.store)||void 0===v?void 0:v.state)||void 0===p?void 0:p.canceled_at)}),g.forEach((e=>{var i;const s=null===(i=this.store.state)||void 0===i?void 0:i.recipients.find((i=>i.role_name===e.role_name)),t=a(s);switch(e.event.toLowerCase()){case"recipient:signed":h.push({icon:"gesture",message:`Signed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:declined":h.push({icon:"clear",message:`Declined by ${t}.`,date:new Date(e.created_at)});break;case"recipient:opened":switch(e.event_detail){case"email":case"mail":h.push({icon:"visibility",message:`Opened by ${t}, via email.`,date:new Date(e.created_at)});break;case"sms":h.push({icon:"visibility",message:`Opened by ${t}, via SMS.`,date:new Date(e.created_at)});break;case"in_person_link":h.push({icon:"visibility",message:`Opened by ${t}, via In-person link.`,date:new Date(e.created_at)});break;case"in_app":h.push({icon:"visibility",message:`Opened by ${t}, via dashboard.`,date:new Date(e.created_at)});break;default:h.push({icon:"visibility",message:`Opened by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:submitted":h.push("approver"===e.event_detail?{icon:"check_circle",message:`Approved by ${t}.`,date:new Date(e.created_at)}:{icon:"send",message:`Submitted by ${t}.`,date:new Date(e.created_at)});break;case"recipient:prepared":h.push({icon:"send",message:`Prepared by ${t}.`,date:new Date(e.created_at)});break;case"recipient:claimed":"guest"===e.event_detail?h.push({icon:"account_circle",message:`${t} claimed the Verdoc as a guest.`,date:new Date(e.created_at)}):"profile"===e.event_detail&&h.push({icon:"verified_user",message:`${t} claimed the Verdoc as a verified user.`,date:new Date(e.created_at)});break;case"recipient:agreed":h.push({icon:"done",message:`${t} agreed to use electronic records and signatures.`,date:new Date(e.created_at)});break;case"recipient:invited":h.push("sms"===e.event_detail?{icon:"textsms",message:`${t} has been invited via SMS.`,date:new Date(e.created_at)}:{icon:"mail",message:`${t} has been invited via email.`,date:new Date(e.created_at)});break;case"recipient:reminder":h.push("sms"===e.event_detail?{icon:"textsms",message:`${t} sent a reminder via SMS.`,date:new Date(e.created_at)}:{icon:"mail",message:`${t} sent a reminder via email.`,date:new Date(e.created_at)});break;case"invitation:resent":h.push({icon:"mail",message:`Invitation was resent to ${t} ${"reminder"===e.event_detail?" by reminder":""}.`,date:new Date(e.created_at)});break;case"envelope:cc":h.push({icon:"contact_mail",message:`A copy has been sent to ${t}.`,date:new Date(e.created_at)});break;case"recipient:delegated":h.push({icon:"people",message:e.event_detail,date:new Date(e.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":h.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"created":h.push({icon:"create",message:"Envelope was created.",date:new Date(e.created_at)});break;case"completed":h.push({icon:"done_all",message:"Envelope was completed.",date:new Date(e.created_at)});break;case"canceled":case"owner:canceled":h.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(e.created_at)});break;case"owner:get_in_person_link":h.push({icon:"link",message:`Owner accessed the In-person link for ${s}.`,date:new Date(e.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",e)}})),h.sort(((e,i)=>i.date.getTime()-e.date.getTime())),h}render(){var e,i,n,o,l,c,p,h,m,b,x,f,u,y,k,z,M,D,V,B,E;if(!this.store.state)return s(t,null);const L=d(this.endpoint.profile,this.store.state),S=this.prepareHistoryEntries(),H="pending"!==(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.status)&&"in progress"!==(null===(o=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===o?void 0:o.status);return s(t,{class:this.panelOpen?"open":""},s("div",{class:"side-buttons"},s("button",{class:1===this.activeTab?"active":"",onClick:()=>this.setTab(1),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>'}),s("button",{class:2===this.activeTab?"active":"",onClick:()=>this.setTab(2),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>'}),s("button",{class:3===this.activeTab?"active":"",onClick:()=>this.setTab(3),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>'})),1===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Details"),s("div",{class:"label"},"Envelope ID"),s("div",{class:"value"},null===(c=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===c?void 0:c.id),s("div",{class:"label"},"Date Created"),s("div",{class:"value"},g.format(new Date(null===(h=null===(p=this.store)||void 0===p?void 0:p.state)||void 0===h?void 0:h.created_at),v)),s("div",{class:"label"},"Last Modified"),s("div",{class:"value"},g.format(new Date(null===(b=null===(m=this.store)||void 0===m?void 0:m.state)||void 0===b?void 0:b.updated_at),v)),s("div",{class:"label"},"Status"),s("div",{class:"value"},r(null===(f=null===(x=this.store)||void 0===x?void 0:x.state)||void 0===f?void 0:f.status)),s("div",{class:"label"},"Verdoc Owner ID"),s("div",{class:"value"},null===(y=null===(u=this.store)||void 0===u?void 0:u.state)||void 0===y?void 0:y.profile_id),s("div",{class:"label"},"Verdoc Owner Name"),s("div",{class:"value"},a(null===(z=null===(k=this.store)||void 0===k?void 0:k.state)||void 0===z?void 0:z.profile)),s("div",{class:"label"},"Verdoc Owner Email"),s("div",{class:"value"},null===(V=null===(D=null===(M=this.store)||void 0===M?void 0:M.state)||void 0===D?void 0:D.profile)||void 0===V?void 0:V.email)),2===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Recipients"),null===(E=null===(B=this.store)||void 0===B?void 0:B.state)||void 0===E?void 0:E.recipients.map(((e,i)=>{const t="submitted"!==e.status&&"canceled"!==e.status&&"declined"!==e.status,n=this.canResendRecipient(e),o=a(e);return s("div",{class:"recipient-detail"},s("div",{class:"recipient-header"},s("div",{class:"recipient-number"},i+1),s("div",{class:"recipient-type"},e.role_name),s("div",{class:{"recipient-status":!0,[e.status]:!0}},e.status),L&&!H&&s("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!n},{id:"inperson",label:"Get In-Person Link",disabled:!t}]})),s("dic",{class:"recipient-content"},s("div",{class:"recipient-name"},o),s("div",{class:"recipient-name"},e.email),s("div",{class:"recipient-name"},e.phone)))})),L&&s("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:()=>this.showCancelDialog=!H,disabled:H})),3===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"History"),S.map((e=>s("div",{class:"history-entry"},s("div",{class:"activity-icon",innerHTML:w[e.icon]||e.icon}),s("div",{class:"activity-details"},s("div",{class:"activity-text"},e.message),s("div",{class:"activity-date"},g.format(e.date,v))))))),this.showRecipientDialog&&s("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:()=>this.showRecipientDialog=""}),this.showManageDialog&&s("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:!1,onAnother:()=>{var e;this.showManageDialog=!1,null===(e=this.another)||void 0===e||e.emit({envelope:this.store.state})},onNext:()=>this.showManageDialog=!1}),this.showCancelDialog&&s("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:()=>{this.showCancelDialog=!1,this.cancelEnvelope()}}))}};m.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';export{m as verdocs_envelope_sidebar}
1
+ import{r as e,c as i,h as s,H as t}from"./p-5207d80c.js";import{VerdocsEndpoint as n,resendInvitation as o,cancelEnvelope as l,formatFullName as a,userIsEnvelopeOwner as d,capitalize as r}from"@verdocs/js-sdk";import{g as c}from"./p-ed199c97.js";import{F as v}from"./p-251c4106.js";import{V as p}from"./p-04c07b7b.js";import{S as h}from"./p-fd97809c.js";import{d as g}from"./p-edaec1b6.js";import"./p-83317d11.js";import"./p-a706bac9.js";const w={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'},m=class{constructor(s){e(this,s),this.sdkError=i(this,"sdkError",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.toggle=i(this,"toggle",7),this.another=i(this,"another",7),this.store=null,this.endpoint=n.getDefault(),this.envelopeId="",this.activeTab=1,this.panelOpen=!1,this.showManageDialog=!1,this.showRecipientDialog="",this.showCancelDialog=!1,this.loading=!0}async componentWillLoad(){var e,i,s;try{if(this.endpoint.loadSession(),!this.envelopeId)return void console.log(`[SIDEBAR] Missing required envelope ID ${this.envelopeId}`);if(!this.endpoint.session)return void console.log("[SIDEBAR] Unable to start session, must be authenticated");this.store=await c(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1}catch(t){console.log("[SIDEBAR] Error loading envelope",t),null===(e=this.sdkError)||void 0===e||e.emit(new h(t.message,null===(i=t.response)||void 0===i?void 0:i.status,null===(s=t.response)||void 0===s?void 0:s.data))}}sortEnvelopeRecipients(){var e,i;null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i||i.recipients.sort(((e,i)=>e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence))}setTab(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen,null===(i=this.toggle)||void 0===i||i.emit({open:this.panelOpen}),this.activeTab=e}canResendRecipient(e){var i,s;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes(null===(s=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===s?void 0:s.status)}handleRecipientAction(e,i){var s,t;switch(console.log("[SIDEBAR] Recipient action",i,e),i){case"reminder":o(this.endpoint,this.envelopeId,e.role_name).then((()=>{p("Reminder Sent",{style:"success"})})).catch((e=>{console.log("[SIDEBAR] Error resending invitation",e),p("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":case"details":p("This feature will be enabled in a future release. Please try again later.",{style:"info"})}null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:null===(t=this.store)||void 0===t?void 0:t.state,event:i})}cancelEnvelope(){this.loading=!0,l(this.endpoint,this.envelopeId).then((async e=>{var i,s;console.log("[SIDEBAR] Envelope canceled",e),p("Envelope canceled",{style:"success"}),this.store=await c(this.endpoint,this.envelopeId,!0),this.sortEnvelopeRecipients(),this.loading=!1,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:null===(s=this.store)||void 0===s?void 0:s.state,event:"canceled"})})).catch((e=>{console.log("[SIDEBAR] Error canceling envelope",e),this.loading=!1,p("Error canceling envelope: "+e.message,{style:"error"})}))}prepareHistoryEntries(){var e,i,s,t,n,o,l,d,r,c,v,p;const h=[],g=(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.history_entries)||[];h.push({icon:"pencil",message:"Envelope created.",date:new Date(null===(t=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===t?void 0:t.created_at)}),"complete"===(null===(o=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===o?void 0:o.status)&&h.push({icon:"pencil",message:"Envelope completed.",date:new Date(null===(d=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===d?void 0:d.updated_at)});const w=g.some((e=>"owner:canceled"===e.event));return"canceled"!==(null===(c=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===c?void 0:c.status)||w||h.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date(null===(p=null===(v=this.store)||void 0===v?void 0:v.state)||void 0===p?void 0:p.canceled_at)}),g.forEach((e=>{var i;const s=null===(i=this.store.state)||void 0===i?void 0:i.recipients.find((i=>i.role_name===e.role_name)),t=a(s);switch(e.event.toLowerCase()){case"recipient:signed":h.push({icon:"gesture",message:`Signed by ${t}.`,date:new Date(e.created_at)});break;case"recipient:declined":h.push({icon:"clear",message:`Declined by ${t}.`,date:new Date(e.created_at)});break;case"recipient:opened":switch(e.event_detail){case"email":case"mail":h.push({icon:"visibility",message:`Opened by ${t}, via email.`,date:new Date(e.created_at)});break;case"sms":h.push({icon:"visibility",message:`Opened by ${t}, via SMS.`,date:new Date(e.created_at)});break;case"in_person_link":h.push({icon:"visibility",message:`Opened by ${t}, via In-person link.`,date:new Date(e.created_at)});break;case"in_app":h.push({icon:"visibility",message:`Opened by ${t}, via dashboard.`,date:new Date(e.created_at)});break;default:h.push({icon:"visibility",message:`Opened by ${t}.`,date:new Date(e.created_at)})}break;case"recipient:submitted":h.push("approver"===e.event_detail?{icon:"check_circle",message:`Approved by ${t}.`,date:new Date(e.created_at)}:{icon:"send",message:`Submitted by ${t}.`,date:new Date(e.created_at)});break;case"recipient:prepared":h.push({icon:"send",message:`Prepared by ${t}.`,date:new Date(e.created_at)});break;case"recipient:claimed":"guest"===e.event_detail?h.push({icon:"account_circle",message:`${t} claimed the Verdoc as a guest.`,date:new Date(e.created_at)}):"profile"===e.event_detail&&h.push({icon:"verified_user",message:`${t} claimed the Verdoc as a verified user.`,date:new Date(e.created_at)});break;case"recipient:agreed":h.push({icon:"done",message:`${t} agreed to use electronic records and signatures.`,date:new Date(e.created_at)});break;case"recipient:invited":h.push("sms"===e.event_detail?{icon:"textsms",message:`${t} has been invited via SMS.`,date:new Date(e.created_at)}:{icon:"mail",message:`${t} has been invited via email.`,date:new Date(e.created_at)});break;case"recipient:reminder":h.push("sms"===e.event_detail?{icon:"textsms",message:`${t} sent a reminder via SMS.`,date:new Date(e.created_at)}:{icon:"mail",message:`${t} sent a reminder via email.`,date:new Date(e.created_at)});break;case"invitation:resent":h.push({icon:"mail",message:`Invitation was resent to ${t} ${"reminder"===e.event_detail?" by reminder":""}.`,date:new Date(e.created_at)});break;case"envelope:cc":h.push({icon:"contact_mail",message:`A copy has been sent to ${t}.`,date:new Date(e.created_at)});break;case"recipient:delegated":h.push({icon:"people",message:e.event_detail,date:new Date(e.created_at)});break;case"recipient:updated_info":case"owner:updated_recipient_info":h.push({icon:"perm_identity",message:e.event_detail,date:new Date(e.created_at)});break;case"created":h.push({icon:"create",message:"Envelope was created.",date:new Date(e.created_at)});break;case"completed":h.push({icon:"done_all",message:"Envelope was completed.",date:new Date(e.created_at)});break;case"canceled":case"owner:canceled":h.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(e.created_at)});break;case"owner:get_in_person_link":h.push({icon:"link",message:`Owner accessed the In-person link for ${s}.`,date:new Date(e.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",e)}})),h.sort(((e,i)=>i.date.getTime()-e.date.getTime())),h}render(){var e,i,n,o,l,c,p,h,m,b,x,f,u,y,k,z,M,D,V,B,E;if(!this.store.state)return s(t,null);const L=d(this.endpoint.profile,this.store.state),S=this.prepareHistoryEntries(),H="pending"!==(null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.status)&&"in progress"!==(null===(o=null===(n=this.store)||void 0===n?void 0:n.state)||void 0===o?void 0:o.status);return s(t,{class:this.panelOpen?"open":""},s("div",{class:"side-buttons"},s("button",{class:1===this.activeTab?"active":"",onClick:()=>this.setTab(1),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>'}),s("button",{class:2===this.activeTab?"active":"",onClick:()=>this.setTab(2),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>'}),s("button",{class:3===this.activeTab?"active":"",onClick:()=>this.setTab(3),innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>'})),1===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Details"),s("div",{class:"label"},"Envelope ID"),s("div",{class:"value"},null===(c=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===c?void 0:c.id),s("div",{class:"label"},"Date Created"),s("div",{class:"value"},g.format(new Date(null===(h=null===(p=this.store)||void 0===p?void 0:p.state)||void 0===h?void 0:h.created_at),v)),s("div",{class:"label"},"Last Modified"),s("div",{class:"value"},g.format(new Date(null===(b=null===(m=this.store)||void 0===m?void 0:m.state)||void 0===b?void 0:b.updated_at),v)),s("div",{class:"label"},"Status"),s("div",{class:"value"},r(null===(f=null===(x=this.store)||void 0===x?void 0:x.state)||void 0===f?void 0:f.status)),s("div",{class:"label"},"Verdoc Owner ID"),s("div",{class:"value"},null===(y=null===(u=this.store)||void 0===u?void 0:u.state)||void 0===y?void 0:y.profile_id),s("div",{class:"label"},"Verdoc Owner Name"),s("div",{class:"value"},a(null===(z=null===(k=this.store)||void 0===k?void 0:k.state)||void 0===z?void 0:z.profile)),s("div",{class:"label"},"Verdoc Owner Email"),s("div",{class:"value"},null===(V=null===(D=null===(M=this.store)||void 0===M?void 0:M.state)||void 0===D?void 0:D.profile)||void 0===V?void 0:V.email)),2===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"Recipients"),null===(E=null===(B=this.store)||void 0===B?void 0:B.state)||void 0===E?void 0:E.recipients.map(((e,i)=>{const t="submitted"!==e.status&&"canceled"!==e.status&&"declined"!==e.status,n=this.canResendRecipient(e),o=a(e);return s("div",{class:"recipient-detail"},s("div",{class:"recipient-header"},s("div",{class:"recipient-number"},i+1),s("div",{class:"recipient-type"},e.role_name),s("div",{class:{"recipient-status":!0,[e.status]:!0}},e.status),L&&!H&&s("verdocs-dropdown",{onOptionSelected:i=>this.handleRecipientAction(e,i.detail.id),options:[{id:"reminder",label:"Send Reminder",disabled:!n},{id:"inperson",label:"Get In-Person Link",disabled:!t}]})),s("dic",{class:"recipient-content"},s("div",{class:"recipient-name"},o),s("div",{class:"recipient-name"},e.email),s("div",{class:"recipient-name"},e.phone)))})),L&&s("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:()=>this.showCancelDialog=!H,disabled:H})),3===this.activeTab&&s("div",{class:"content"},s("div",{class:"title"},"History"),S.map((e=>s("div",{class:"history-entry"},s("div",{class:"activity-icon",innerHTML:w[e.icon]||e.icon}),s("div",{class:"activity-details"},s("div",{class:"activity-text"},e.message),s("div",{class:"activity-date"},g.format(e.date,v))))))),this.showRecipientDialog&&s("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:()=>this.showRecipientDialog=""}),this.showManageDialog&&s("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:!1,onAnother:()=>{var e;this.showManageDialog=!1,null===(e=this.another)||void 0===e||e.emit({envelope:this.store.state})},onNext:()=>this.showManageDialog=!1}),this.showCancelDialog&&s("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:()=>{this.showCancelDialog=!1,this.cancelEnvelope()}}))}};m.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';export{m as verdocs_envelope_sidebar}
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,r=1,t=arguments.length;r<t;r++){i=arguments[r];for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))e[s]=i[s]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,i,r){if(r||arguments.length===2)for(var t=0,s=i.length,o;t<s;t++){if(o||!(t in i)){if(!o)o=Array.prototype.slice.call(i,0,t);o[t]=i[t]}}return e.concat(o||Array.prototype.slice.call(i))};System.register(["./p-e5a426c4.system.js","@verdocs/js-sdk","./p-9a8c90f4.system.js","./p-e0ac9edf.system.js","./p-21b1acec.system.js","./p-1a180595.system.js","./p-f24d887c.system.js"],(function(e){"use strict";var i,r,t,s,o,n,a,c;return{setters:[function(e){i=e.r;r=e.c;t=e.h;s=e.H;o=e.g},function(e){n=e.integerSequence},function(e){a=e.h},function(e){c=e.c},function(){},function(){},function(){}],execute:function(){var l='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #654dcb}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#654dcb}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}';var d=l;var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>';var u='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>';var b=5;var p=function(e){var i=e.page,r=e.selected,s=e.onClick;var o;if(i==="first"){o=f}else if(i==="last"){o=u}else{o=String(i+1)}return t("div",{class:"page-button ".concat(i===r?"selected":""),onClick:function(){return s(i)},innerHTML:o})};var h=e("verdocs_pagination",function(){function e(e){i(this,e);this.selectPage=r(this,"selectPage",7);this.selectedPage=0;this.itemCount=1;this.perPage=10}e.prototype.handleSelectPage=function(e){var i;this.selectedPage=e;(i=this.selectPage)===null||i===void 0?void 0:i.emit({selectedPage:e})};e.prototype.render=function(){var e=this;var i=Math.max(0,this.selectedPage-2);var r=this.itemCount>0?Math.ceil(this.itemCount/this.perPage):0;var o=n(0,Math.ceil(this.itemCount/this.perPage)).slice(i,i+b);return t(s,{key:"7f48438c1719d818a477d05970c83b71d1bfb46b"},this.selectedPage>0&&t(p,{key:"04d4a5306146aa3e1e15a429f91030a423d74620",page:"first",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(0)}}),i>0&&t("div",{key:"4cd4b28c503989aa2ae9af13c1cec3a5819cd19c",class:"ellipsis"},"..."),o.map((function(i){return t(p,{page:i,selected:e.selectedPage,onClick:function(i){return e.handleSelectPage(+i)}})})),this.selectedPage<r-1&&t("div",{key:"7aeadf3f795bb8d22911de8a897687a7d75b43d3",class:"ellipsis"},"..."),this.selectedPage<r-1&&t(p,{key:"5c886e32ea166539d84c24f33446337afc462ee6",page:"last",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(r-1)}}))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());h.style=d;var v='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-quick-filter{position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-quick-filter .control{outline:0;height:34px;display:-ms-flexbox;display:flex;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;-webkit-transition:all 100ms ease 0s;transition:all 100ms ease 0s;border:1px solid #cccccc}verdocs-quick-filter .title{padding:0 8px;font-size:14px;max-width:100%;overflow:hidden;color:#33364b;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}verdocs-quick-filter .title .prefix{display:inline;font-weight:700;margin:0 7px 0 0;color:#4c56cb}verdocs-quick-filter .arrow{width:32px;height:32px;border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#ffffff;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s}verdocs-quick-filter .arrow svg{-webkit-transition:0.3s;transition:0.3s;fill:#cccccc}verdocs-quick-filter .separator{width:1px;display:block;margin-top:8px;margin-bottom:8px;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#cccccc}verdocs-quick-filter .items{display:none;z-index:10000;position:absolute;border-radius:4px;background:#ffffff;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px;box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px}verdocs-quick-filter .items[data-show]{display:block}verdocs-quick-filter .option{width:100%;border:none;display:block;font-size:14px;text-align:left;background:none;padding:10px 20px;color:#1e2031}verdocs-quick-filter .option:hover{cursor:pointer;background:rgba(76, 86, 203, 0.2470588235)}verdocs-quick-filter .option[disabled]{color:#aaaaaa}verdocs-quick-filter .option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}verdocs-quick-filter.open .items{display:block}verdocs-quick-filter.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1)}';var g=v;var x='<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" class="css-8mmkcg"><path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>';var k=e("verdocs_quick_filter",function(){function e(e){i(this,e);this.optionSelected=r(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.label="Filter";this.value="";this.placeholder="Select...";this.open=undefined}e.prototype.componentDidLoad=function(){this.popper=c(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-1,14]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};e.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};e.prototype.clickListener=function(e){var i=!(e.target==this.el||this.el.contains(e.target));if(i){this.hide()}};e.prototype.handleSelectOption=function(e,i){e.stopPropagation();this.optionSelected.emit(i);this.value=i.value;this.hide()};e.prototype.showDropdown=function(){var e,i;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(i=this.popper)===null||i===void 0?void 0:i.update().catch((function(){}))};e.prototype.handleHideDropdown=function(e){var i,r;if(((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.localName)==="button"&&((r=e===null||e===void 0?void 0:e.target)===null||r===void 0?void 0:r.className)==="arrow"){return}this.hide()};e.prototype.toggleDropdown=function(e){e.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};e.prototype.hide=function(){var e;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};e.prototype.render=function(){var e=this;var i,r,o;var n=(i=this.options)===null||i===void 0?void 0:i.find((function(i){return i.value===e.value}));var c=(r=this.options)===null||r===void 0?void 0:r.reduce((function(e,i){return e.label.length>i.label.length?e:i}));var l=a((c===null||c===void 0?void 0:c.label)||"FILLER","14px Inter, Barlow, sans-serif");var d=a(this.label,"14px Inter, Barlow, sans-serif");var f="".concat(l+d+40,"px");return t(s,{key:"b77a669e01ef8634d3fb5600146e95bcd58a5bf6",class:{open:!!this.open},style:{minWidth:f,display:"inline-block"}},t("div",{key:"e0eeab46c9f243ef7a189c7fdef267d8f3980625",class:"control",onClick:function(i){return e.toggleDropdown(i)},onBlur:function(i){return e.handleHideDropdown(i)}},t("div",{key:"7494c30a6c5120d2617b239fb5114ddd6d338704",class:"title",ref:function(i){return e.dropdownButton=i}},t("span",{key:"4861fef690eb5cd981a895337b81cd715cd8af1b",class:"prefix"},this.label,":"),n?n.label:this.placeholder),t("div",{key:"a4d2d8b76735232cde5ba1c659b83be452f919f3",style:{flex:"1"}}),t("div",{key:"9f8933c5343f8e188ec25447f9b19d3cb8b781ae",class:"separator"}),t("div",{key:"e66a6fd2dd00cebb3f91e6e8269a68b1f21b5719",class:"arrow",innerHTML:x,"aria-label":"Open Menu"})),t("div",{key:"84ebf56cc3ddb543dd43e818c9571230353cc313",class:"items","aria-hidden":!this.open,ref:function(i){return e.dropdownMenu=i},style:{minWidth:f}},(o=this.options)===null||o===void 0?void 0:o.map((function(i){return i.label?t("button",{onClick:function(r){return e.handleSelectOption(r,i)},class:"option ".concat(i.value===e.value?"selected":""),disabled:i.disabled},i.label):t("div",{class:"separator"})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());k.style=g}}}));
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var i,r=1,t=arguments.length;r<t;r++){i=arguments[r];for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s))e[s]=i[s]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,i,r){if(r||arguments.length===2)for(var t=0,s=i.length,o;t<s;t++){if(o||!(t in i)){if(!o)o=Array.prototype.slice.call(i,0,t);o[t]=i[t]}}return e.concat(o||Array.prototype.slice.call(i))};System.register(["./p-59073837.system.js","@verdocs/js-sdk","./p-86ccc8c9.system.js","./p-e0ac9edf.system.js","./p-21b1acec.system.js","./p-1a180595.system.js","./p-f24d887c.system.js"],(function(e){"use strict";var i,r,t,s,o,n,a,c;return{setters:[function(e){i=e.r;r=e.c;t=e.h;s=e.H;o=e.g},function(e){n=e.integerSequence},function(e){a=e.h},function(e){c=e.c},function(){},function(){},function(){}],execute:function(){var l='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #654dcb}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#654dcb}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}';var d=l;var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>';var u='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>';var b=5;var p=function(e){var i=e.page,r=e.selected,s=e.onClick;var o;if(i==="first"){o=f}else if(i==="last"){o=u}else{o=String(i+1)}return t("div",{class:"page-button ".concat(i===r?"selected":""),onClick:function(){return s(i)},innerHTML:o})};var h=e("verdocs_pagination",function(){function e(e){i(this,e);this.selectPage=r(this,"selectPage",7);this.selectedPage=0;this.itemCount=1;this.perPage=10}e.prototype.handleSelectPage=function(e){var i;this.selectedPage=e;(i=this.selectPage)===null||i===void 0?void 0:i.emit({selectedPage:e})};e.prototype.render=function(){var e=this;var i=Math.max(0,this.selectedPage-2);var r=this.itemCount>0?Math.ceil(this.itemCount/this.perPage):0;var o=n(0,Math.ceil(this.itemCount/this.perPage)).slice(i,i+b);return t(s,{key:"7f48438c1719d818a477d05970c83b71d1bfb46b"},this.selectedPage>0&&t(p,{key:"04d4a5306146aa3e1e15a429f91030a423d74620",page:"first",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(0)}}),i>0&&t("div",{key:"4cd4b28c503989aa2ae9af13c1cec3a5819cd19c",class:"ellipsis"},"..."),o.map((function(i){return t(p,{page:i,selected:e.selectedPage,onClick:function(i){return e.handleSelectPage(+i)}})})),this.selectedPage<r-1&&t("div",{key:"7aeadf3f795bb8d22911de8a897687a7d75b43d3",class:"ellipsis"},"..."),this.selectedPage<r-1&&t(p,{key:"5c886e32ea166539d84c24f33446337afc462ee6",page:"last",selected:this.selectedPage,onClick:function(){return e.handleSelectPage(r-1)}}))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());h.style=d;var v='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-quick-filter{position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-quick-filter .control{outline:0;height:34px;display:-ms-flexbox;display:flex;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;-webkit-transition:all 100ms ease 0s;transition:all 100ms ease 0s;border:1px solid #cccccc}verdocs-quick-filter .title{padding:0 8px;font-size:14px;max-width:100%;overflow:hidden;color:#33364b;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis}verdocs-quick-filter .title .prefix{display:inline;font-weight:700;margin:0 7px 0 0;color:#4c56cb}verdocs-quick-filter .arrow{width:32px;height:32px;border:none;outline:none;cursor:pointer;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;background:#ffffff;-webkit-transition:color 150ms ease 0s;transition:color 150ms ease 0s}verdocs-quick-filter .arrow svg{-webkit-transition:0.3s;transition:0.3s;fill:#cccccc}verdocs-quick-filter .separator{width:1px;display:block;margin-top:8px;margin-bottom:8px;-ms-flex-item-align:stretch;align-self:stretch;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#cccccc}verdocs-quick-filter .items{display:none;z-index:10000;position:absolute;border-radius:4px;background:#ffffff;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px;box-shadow:rgba(0, 0, 0, 0.1) 0 0 0 1px, rgba(0, 0, 0, 0.1) 0 4px 11px}verdocs-quick-filter .items[data-show]{display:block}verdocs-quick-filter .option{width:100%;border:none;display:block;font-size:14px;text-align:left;background:none;padding:10px 20px;color:#1e2031}verdocs-quick-filter .option:hover{cursor:pointer;background:rgba(76, 86, 203, 0.2470588235)}verdocs-quick-filter .option[disabled]{color:#aaaaaa}verdocs-quick-filter .option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}verdocs-quick-filter.open .items{display:block}verdocs-quick-filter.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1)}';var g=v;var x='<svg height="20" width="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false" class="css-8mmkcg"><path d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"></path></svg>';var k=e("verdocs_quick_filter",function(){function e(e){i(this,e);this.optionSelected=r(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.label="Filter";this.value="";this.placeholder="Select...";this.open=undefined}e.prototype.componentDidLoad=function(){this.popper=c(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[-1,14]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};e.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};e.prototype.clickListener=function(e){var i=!(e.target==this.el||this.el.contains(e.target));if(i){this.hide()}};e.prototype.handleSelectOption=function(e,i){e.stopPropagation();this.optionSelected.emit(i);this.value=i.value;this.hide()};e.prototype.showDropdown=function(){var e,i;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(i=this.popper)===null||i===void 0?void 0:i.update().catch((function(){}))};e.prototype.handleHideDropdown=function(e){var i,r;if(((i=e===null||e===void 0?void 0:e.target)===null||i===void 0?void 0:i.localName)==="button"&&((r=e===null||e===void 0?void 0:e.target)===null||r===void 0?void 0:r.className)==="arrow"){return}this.hide()};e.prototype.toggleDropdown=function(e){e.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};e.prototype.hide=function(){var e;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(e=this.popper)===null||e===void 0?void 0:e.setOptions((function(e){return __assign(__assign({},e),{modifiers:__spreadArray(__spreadArray([],e.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};e.prototype.render=function(){var e=this;var i,r,o;var n=(i=this.options)===null||i===void 0?void 0:i.find((function(i){return i.value===e.value}));var c=(r=this.options)===null||r===void 0?void 0:r.reduce((function(e,i){return e.label.length>i.label.length?e:i}));var l=a((c===null||c===void 0?void 0:c.label)||"FILLER","14px Inter, Barlow, sans-serif");var d=a(this.label,"14px Inter, Barlow, sans-serif");var f="".concat(l+d+40,"px");return t(s,{key:"b77a669e01ef8634d3fb5600146e95bcd58a5bf6",class:{open:!!this.open},style:{minWidth:f,display:"inline-block"}},t("div",{key:"e0eeab46c9f243ef7a189c7fdef267d8f3980625",class:"control",onClick:function(i){return e.toggleDropdown(i)},onBlur:function(i){return e.handleHideDropdown(i)}},t("div",{key:"7494c30a6c5120d2617b239fb5114ddd6d338704",class:"title",ref:function(i){return e.dropdownButton=i}},t("span",{key:"4861fef690eb5cd981a895337b81cd715cd8af1b",class:"prefix"},this.label,":"),n?n.label:this.placeholder),t("div",{key:"a4d2d8b76735232cde5ba1c659b83be452f919f3",style:{flex:"1"}}),t("div",{key:"9f8933c5343f8e188ec25447f9b19d3cb8b781ae",class:"separator"}),t("div",{key:"e66a6fd2dd00cebb3f91e6e8269a68b1f21b5719",class:"arrow",innerHTML:x,"aria-label":"Open Menu"})),t("div",{key:"84ebf56cc3ddb543dd43e818c9571230353cc313",class:"items","aria-hidden":!this.open,ref:function(i){return e.dropdownMenu=i},style:{minWidth:f}},(o=this.options)===null||o===void 0?void 0:o.map((function(i){return i.label?t("button",{onClick:function(r){return e.handleSelectOption(r,i)},class:"option ".concat(i.value===e.value?"selected":""),disabled:i.disabled},i.label):t("div",{class:"separator"})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());k.style=g}}}));
@@ -1 +1 @@
1
- import{r as e,c as t,h as s}from"./p-67a42e2b.js";import{VerdocsEndpoint as i,createProfile as o,verifyEmail as a,authenticate as r,getMyUser as l,resendVerification as n,resetPassword as d}from"@verdocs/js-sdk";import{V as c}from"./p-04c07b7b.js";import{S as h}from"./p-fd97809c.js";const u=class{constructor(s){e(this,s),this.authenticated=t(this,"authenticated",7),this.sdkError=t(this,"sdkError",7),this.resendDisabledTimer=null,this.tempAuthEndpoint=new i({baseURL:i.getDefault().getBaseURL(),persist:!1}),this.endpoint=i.getDefault(),this.visible=!0,this.logo="https://app.verdocs.com/assets/blue-logo.svg",this.displayMode="login",this.org_name="",this.first_name="",this.last_name="",this.email="",this.verificationCode="",this.newPassword="",this.password="",this.confirmpass="",this.submitting=!1,this.resendDisabled=!1,this.session=null,this.profile=null}componentWillLoad(){this.endpoint.loadSession(),i.getDefault().onSessionChanged(((e,t,s)=>{var i,o;this.session=t,this.profile=s,t?null===(i=this.authenticated)||void 0===i||i.emit({authenticated:!0,session:t,profile:s}):null===(o=this.authenticated)||void 0===o||o.emit({authenticated:!1,session:t,profile:s})}))}isPasswordComplex(e){const t=e=>/[A-Z]/.test(e),s=e=>/[a-z]/.test(e),i=e=>/[`!@#$%^&*()_\-+=\[\]{};':"\\|,.<>\/?~ ]/.test(e);let o=0,a=0,r=0;for(let l=0;l<e.length;l++){let n=e.charAt(l);t(n)?o++:s(n)?a++:i(n)&&r++}return e.length>=8&&a>0&&o>0&&r>0}handleSignup(){this.isPasswordComplex(this.password)?this.password===this.confirmpass?(this.submitting=!0,this.tempAuthEndpoint.clearSession(),o(this.tempAuthEndpoint,{email:this.email,password:this.password,first_name:this.first_name,last_name:this.last_name,org_name:this.org_name}).then((e=>{console.log("[AUTH] Profile creation result",e),this.tempAuthEndpoint.setToken(e.access_token),this.clearForms(),this.displayMode="verify"})).catch((e=>{var t,s,i,o,a,r;console.log("[AUTH] Signup error",e.response),this.submitting=!1,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,profile:null,session:null}),null===(s=this.sdkError)||void 0===s||s.emit(new h(e.message,null===(i=e.response)||void 0===i?void 0:i.status,null===(o=e.response)||void 0===o?void 0:o.data)),c("Signup failed: "+(null===(r=null===(a=e.response)||void 0===a?void 0:a.data)||void 0===r?void 0:r.error)||"Unknown Error",{style:"error"})}))):c("Passwords do not match.",{style:"error"}):c("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"})}async handleVerification(){this.submitting=!0;try{this.submitting=!1;const e=await a(this.tempAuthEndpoint,{email:this.email,token:this.verificationCode});c("Thank you for verifying your email address.",{style:"success"}),this.completeLogin(e)}catch(e){this.submitting=!1,console.log("Verification error",e),c("Verification error, please check the code and try again.")}}completeLogin(e){this.clearForms(),this.tempAuthEndpoint.clearSession(),this.endpoint.setToken(e.access_token)}async loginAndCheckVerification(){var e;if(!this.submitting){this.submitting=!0,this.tempAuthEndpoint.clearSession();try{this.submitting=!1;const e=await r(this.tempAuthEndpoint,{username:this.email,password:this.password,grant_type:"password"});console.log("[AUTH] Authenticated, checking email verification"),this.tempAuthEndpoint.setToken(e.access_token);const t=await l(this.tempAuthEndpoint);console.log("Got user",t),t.email_verified?(console.log("[AUTH] Email address is verified, completing login"),this.completeLogin(e)):(console.log("[AUTH] Logged in, pending email address verification"),this.displayMode="verify")}catch(t){this.submitting=!1,console.log("[AUTH] Auth failure",(null===(e=t.response)||void 0===e?void 0:e.data)||t),c("Login failed. Please check your credentials and try again.",{style:"error"})}}}clearForms(){this.submitting=!1,this.resendDisabled=!1,this.email="",this.password="",this.newPassword="",this.confirmpass="",this.verificationCode="",this.first_name="",this.last_name="",this.org_name=""}handleLogout(){console.log("logging out"),this.endpoint.clearSession(),this.tempAuthEndpoint.clearSession(),this.clearForms(),this.displayMode="login"}handleResendVerification(){this.resendDisabled=!0,this.resendDisabledTimer=setTimeout((()=>{this.resendDisabled=!1,this.resendDisabledTimer=null}),3e4),n(this.tempAuthEndpoint).then((e=>{console.log("[AUTH] Verification request resent",e),c("Please check your email for a verification code.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to resend verification",e),c("Unable to resend code. Please try again later.",{style:"error"})}))}handleResendReset(){this.resendDisabled=!0,this.resendDisabledTimer=setTimeout((()=>{this.resendDisabled=!1,this.resendDisabledTimer=null}),3e4),d(this.tempAuthEndpoint,{email:this.email}).then((e=>{console.log("[AUTH] Resend-code request resent",e),c("Please check your email again for a verification code.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to resend reset request",e),c("Unable to resend code. Please try again later.",{style:"error"})}))}async handleResetGetCode(){this.submitting=!0,this.confirmpass="",this.newPassword="";try{this.submitting=!1;const e=await d(this.endpoint,{email:this.email});console.log("[AUTH] Reset result",e),c("Please check your email inbox for a password reset code.",{style:"success"}),this.verificationCode="",this.confirmpass="",this.newPassword="",this.displayMode="reset"}catch(e){this.submitting=!1,console.log("Reset request error",e),c("Request failed. Please check your email address and try again.")}}async handleResetPassword(){if(this.isPasswordComplex(this.newPassword))if(this.newPassword===this.confirmpass){this.submitting=!0;try{this.submitting=!1;const e=await d(this.endpoint,{email:this.email,code:this.verificationCode,new_password:this.newPassword});console.log("reset result",e),c("Your password has been reset. You may now use your new password to login.",{style:"success"}),this.verificationCode="",this.confirmpass="",this.newPassword="",this.password="",this.displayMode="login"}catch(e){this.submitting=!1,console.log("Verification error",e),c("Verification error, please check the code and try again.")}}else c("Passwords do not match.",{style:"error"});else c("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"})}async handleReset(){this.submitting=!0;try{const e=await d(this.endpoint,{email:this.email});console.log("[AUTH] Reset sent",e),this.submitting=!1,this.displayMode="login",c("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"})}catch(e){console.log("[AUTH] Unable to reset password",e),this.submitting=!1,c("Unable to reset password. Please check your email address and try again.",{style:"error"})}}render(){if(!this.visible)return s("div",{style:{display:"none"}},"Authenticated");if(this.session)return s("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:()=>this.handleLogout(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}});if("signup"===this.displayMode){const e=this.submitting||!this.first_name||!this.last_name||!this.email||!this.password||!this.confirmpass||!this.org_name;return s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Sign up for a free account"),s("div",{class:"already-have"},"Already have an account?",s("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.submitting})),s("form",{onSubmit:()=>this.handleSignup()},s("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},s("verdocs-text-input",{label:"First Name",autocomplete:"first",required:!0,value:this.first_name,onInput:e=>this.first_name=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:!0,value:this.last_name,onInput:e=>this.last_name=e.target.value,disabled:this.submitting})),s("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:!0,value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",required:!0,autocomplete:"new-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Confirm Password",type:"password",required:!0,autocomplete:"off",value:this.confirmpass,onInput:e=>this.confirmpass=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:!0,value:this.org_name,onInput:e=>this.org_name=e.target.value,disabled:this.submitting,style:{flex:"1"}}),s("div",{style:{marginTop:"30px"}}),s("verdocs-button",{label:"Next",disabled:e,onClick:e?()=>{}:()=>this.handleSignup(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}return"verify"===this.displayMode?s("div",{class:"form"},s("form",{onSubmit:()=>this.handleVerification()},s("p",null,"Please check your e-mail inbox for a verification code and enter it below."),s("verdocs-text-input",{label:"Verification Code",required:!0,value:this.verificationCode,onInput:e=>this.verificationCode=e.target.value,disabled:this.submitting}),s("div",{class:"buttons"},s("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:()=>this.handleLogout()}),s("verdocs-button",{label:"Verify",disabled:this.submitting||!this.verificationCode||6!==this.verificationCode.length,onClick:()=>this.handleVerification()})),s("div",{class:"buttons"},s("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:()=>this.handleResendVerification()})))):"forgot"===this.displayMode?s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Forgot your password?"),s("p",null,"Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."),s("form",{onSubmit:()=>this.handleResetGetCode()},s("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:!0,value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),s("div",{style:{marginTop:"30px"}}),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:()=>this.displayMode="login"}),s("verdocs-button",{label:"Request Code",disabled:this.submitting,onClick:()=>this.handleResetGetCode()})))):"reset"===this.displayMode?s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Forgot your password?"),s("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."),s("form",{onSubmit:()=>this.handleResetPassword()},s("verdocs-text-input",{label:"Verification Code",required:!0,value:this.verificationCode,onInput:e=>this.verificationCode=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",required:!0,autocomplete:"off",value:this.newPassword,onInput:e=>this.newPassword=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Confirm Password",type:"password",required:!0,autocomplete:"off",value:this.confirmpass,onInput:e=>this.confirmpass=e.target.value,disabled:this.submitting}),s("div",{style:{marginTop:"30px"}}),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:()=>this.displayMode="login"}),s("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:()=>this.handleResetPassword()})),s("div",{class:"buttons"},s("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:()=>this.handleResendReset()})))):s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Log in to your account"),s("div",{class:"already-have"},"Don't have an account?",s("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.submitting})),s("form",{onSubmit:()=>this.loginAndCheckVerification()},s("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),s("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="forgot",disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),s("verdocs-button",{label:"Login",disabled:this.submitting,onClick:()=>this.loginAndCheckVerification(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))}};u.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{width:320px;display:-ms-flexbox;display:flex;padding:20px;max-width:90%;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;background:#ffffff}verdocs-auth .logo{width:128px;max-width:100%;margin:20px 0 30px}verdocs-auth h3{text-align:center;font-weight:400;font-size:18px;line-height:1.75;margin:0}verdocs-auth em{font-size:14px;margin:15px 0}verdocs-auth .buttons{gap:20px;margin:20px 0 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p{margin:1em 0;font-size:14px}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}verdocs-auth .already-have{margin:0.5em 0;font-size:14px}';export{u as verdocs_auth}
1
+ import{r as e,c as t,h as s}from"./p-5207d80c.js";import{VerdocsEndpoint as i,createProfile as o,verifyEmail as a,authenticate as r,getMyUser as l,resendVerification as n,resetPassword as d}from"@verdocs/js-sdk";import{V as c}from"./p-04c07b7b.js";import{S as h}from"./p-fd97809c.js";const u=class{constructor(s){e(this,s),this.authenticated=t(this,"authenticated",7),this.sdkError=t(this,"sdkError",7),this.resendDisabledTimer=null,this.tempAuthEndpoint=new i({baseURL:i.getDefault().getBaseURL(),persist:!1}),this.endpoint=i.getDefault(),this.visible=!0,this.logo="https://app.verdocs.com/assets/blue-logo.svg",this.displayMode="login",this.org_name="",this.first_name="",this.last_name="",this.email="",this.verificationCode="",this.newPassword="",this.password="",this.confirmpass="",this.submitting=!1,this.resendDisabled=!1,this.session=null,this.profile=null}componentWillLoad(){this.endpoint.loadSession(),i.getDefault().onSessionChanged(((e,t,s)=>{var i,o;this.session=t,this.profile=s,t?null===(i=this.authenticated)||void 0===i||i.emit({authenticated:!0,session:t,profile:s}):null===(o=this.authenticated)||void 0===o||o.emit({authenticated:!1,session:t,profile:s})}))}isPasswordComplex(e){const t=e=>/[A-Z]/.test(e),s=e=>/[a-z]/.test(e),i=e=>/[`!@#$%^&*()_\-+=\[\]{};':"\\|,.<>\/?~ ]/.test(e);let o=0,a=0,r=0;for(let l=0;l<e.length;l++){let n=e.charAt(l);t(n)?o++:s(n)?a++:i(n)&&r++}return e.length>=8&&a>0&&o>0&&r>0}handleSignup(){this.isPasswordComplex(this.password)?this.password===this.confirmpass?(this.submitting=!0,this.tempAuthEndpoint.clearSession(),o(this.tempAuthEndpoint,{email:this.email,password:this.password,first_name:this.first_name,last_name:this.last_name,org_name:this.org_name}).then((e=>{console.log("[AUTH] Profile creation result",e),this.tempAuthEndpoint.setToken(e.access_token),this.clearForms(),this.displayMode="verify"})).catch((e=>{var t,s,i,o,a,r;console.log("[AUTH] Signup error",e.response),this.submitting=!1,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,profile:null,session:null}),null===(s=this.sdkError)||void 0===s||s.emit(new h(e.message,null===(i=e.response)||void 0===i?void 0:i.status,null===(o=e.response)||void 0===o?void 0:o.data)),c("Signup failed: "+(null===(r=null===(a=e.response)||void 0===a?void 0:a.data)||void 0===r?void 0:r.error)||"Unknown Error",{style:"error"})}))):c("Passwords do not match.",{style:"error"}):c("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"})}async handleVerification(){this.submitting=!0;try{this.submitting=!1;const e=await a(this.tempAuthEndpoint,{email:this.email,token:this.verificationCode});c("Thank you for verifying your email address.",{style:"success"}),this.completeLogin(e)}catch(e){this.submitting=!1,console.log("Verification error",e),c("Verification error, please check the code and try again.")}}completeLogin(e){this.clearForms(),this.tempAuthEndpoint.clearSession(),this.endpoint.setToken(e.access_token)}async loginAndCheckVerification(){var e;if(!this.submitting){this.submitting=!0,this.tempAuthEndpoint.clearSession();try{this.submitting=!1;const e=await r(this.tempAuthEndpoint,{username:this.email,password:this.password,grant_type:"password"});console.log("[AUTH] Authenticated, checking email verification"),this.tempAuthEndpoint.setToken(e.access_token);const t=await l(this.tempAuthEndpoint);console.log("Got user",t),t.email_verified?(console.log("[AUTH] Email address is verified, completing login"),this.completeLogin(e)):(console.log("[AUTH] Logged in, pending email address verification"),this.displayMode="verify")}catch(t){this.submitting=!1,console.log("[AUTH] Auth failure",(null===(e=t.response)||void 0===e?void 0:e.data)||t),c("Login failed. Please check your credentials and try again.",{style:"error"})}}}clearForms(){this.submitting=!1,this.resendDisabled=!1,this.email="",this.password="",this.newPassword="",this.confirmpass="",this.verificationCode="",this.first_name="",this.last_name="",this.org_name=""}handleLogout(){console.log("logging out"),this.endpoint.clearSession(),this.tempAuthEndpoint.clearSession(),this.clearForms(),this.displayMode="login"}handleResendVerification(){this.resendDisabled=!0,this.resendDisabledTimer=setTimeout((()=>{this.resendDisabled=!1,this.resendDisabledTimer=null}),3e4),n(this.tempAuthEndpoint).then((e=>{console.log("[AUTH] Verification request resent",e),c("Please check your email for a verification code.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to resend verification",e),c("Unable to resend code. Please try again later.",{style:"error"})}))}handleResendReset(){this.resendDisabled=!0,this.resendDisabledTimer=setTimeout((()=>{this.resendDisabled=!1,this.resendDisabledTimer=null}),3e4),d(this.tempAuthEndpoint,{email:this.email}).then((e=>{console.log("[AUTH] Resend-code request resent",e),c("Please check your email again for a verification code.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to resend reset request",e),c("Unable to resend code. Please try again later.",{style:"error"})}))}async handleResetGetCode(){this.submitting=!0,this.confirmpass="",this.newPassword="";try{this.submitting=!1;const e=await d(this.endpoint,{email:this.email});console.log("[AUTH] Reset result",e),c("Please check your email inbox for a password reset code.",{style:"success"}),this.verificationCode="",this.confirmpass="",this.newPassword="",this.displayMode="reset"}catch(e){this.submitting=!1,console.log("Reset request error",e),c("Request failed. Please check your email address and try again.")}}async handleResetPassword(){if(this.isPasswordComplex(this.newPassword))if(this.newPassword===this.confirmpass){this.submitting=!0;try{this.submitting=!1;const e=await d(this.endpoint,{email:this.email,code:this.verificationCode,new_password:this.newPassword});console.log("reset result",e),c("Your password has been reset. You may now use your new password to login.",{style:"success"}),this.verificationCode="",this.confirmpass="",this.newPassword="",this.password="",this.displayMode="login"}catch(e){this.submitting=!1,console.log("Verification error",e),c("Verification error, please check the code and try again.")}}else c("Passwords do not match.",{style:"error"});else c("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"})}async handleReset(){this.submitting=!0;try{const e=await d(this.endpoint,{email:this.email});console.log("[AUTH] Reset sent",e),this.submitting=!1,this.displayMode="login",c("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"})}catch(e){console.log("[AUTH] Unable to reset password",e),this.submitting=!1,c("Unable to reset password. Please check your email address and try again.",{style:"error"})}}render(){if(!this.visible)return s("div",{style:{display:"none"}},"Authenticated");if(this.session)return s("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:()=>this.handleLogout(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}});if("signup"===this.displayMode){const e=this.submitting||!this.first_name||!this.last_name||!this.email||!this.password||!this.confirmpass||!this.org_name;return s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Sign up for a free account"),s("div",{class:"already-have"},"Already have an account?",s("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.submitting})),s("form",{onSubmit:()=>this.handleSignup()},s("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},s("verdocs-text-input",{label:"First Name",autocomplete:"first",required:!0,value:this.first_name,onInput:e=>this.first_name=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:!0,value:this.last_name,onInput:e=>this.last_name=e.target.value,disabled:this.submitting})),s("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:!0,value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",required:!0,autocomplete:"new-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Confirm Password",type:"password",required:!0,autocomplete:"off",value:this.confirmpass,onInput:e=>this.confirmpass=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:!0,value:this.org_name,onInput:e=>this.org_name=e.target.value,disabled:this.submitting,style:{flex:"1"}}),s("div",{style:{marginTop:"30px"}}),s("verdocs-button",{label:"Next",disabled:e,onClick:e?()=>{}:()=>this.handleSignup(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}return"verify"===this.displayMode?s("div",{class:"form"},s("form",{onSubmit:()=>this.handleVerification()},s("p",null,"Please check your e-mail inbox for a verification code and enter it below."),s("verdocs-text-input",{label:"Verification Code",required:!0,value:this.verificationCode,onInput:e=>this.verificationCode=e.target.value,disabled:this.submitting}),s("div",{class:"buttons"},s("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:()=>this.handleLogout()}),s("verdocs-button",{label:"Verify",disabled:this.submitting||!this.verificationCode||6!==this.verificationCode.length,onClick:()=>this.handleVerification()})),s("div",{class:"buttons"},s("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:()=>this.handleResendVerification()})))):"forgot"===this.displayMode?s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Forgot your password?"),s("p",null,"Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."),s("form",{onSubmit:()=>this.handleResetGetCode()},s("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:!0,value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),s("div",{style:{marginTop:"30px"}}),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:()=>this.displayMode="login"}),s("verdocs-button",{label:"Request Code",disabled:this.submitting,onClick:()=>this.handleResetGetCode()})))):"reset"===this.displayMode?s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Forgot your password?"),s("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."),s("form",{onSubmit:()=>this.handleResetPassword()},s("verdocs-text-input",{label:"Verification Code",required:!0,value:this.verificationCode,onInput:e=>this.verificationCode=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",required:!0,autocomplete:"off",value:this.newPassword,onInput:e=>this.newPassword=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Confirm Password",type:"password",required:!0,autocomplete:"off",value:this.confirmpass,onInput:e=>this.confirmpass=e.target.value,disabled:this.submitting}),s("div",{style:{marginTop:"30px"}}),s("div",{class:"buttons"},s("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:()=>this.displayMode="login"}),s("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:()=>this.handleResetPassword()})),s("div",{class:"buttons"},s("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:()=>this.handleResendReset()})))):s("div",{class:"form"},s("a",{href:"https://verdocs.com/en/"},s("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),s("h3",null,"Log in to your account"),s("div",{class:"already-have"},"Don't have an account?",s("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.submitting})),s("form",{onSubmit:()=>this.loginAndCheckVerification()},s("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),s("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),s("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="forgot",disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),s("verdocs-button",{label:"Login",disabled:this.submitting,onClick:()=>this.loginAndCheckVerification(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))}};u.style='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{width:320px;display:-ms-flexbox;display:flex;padding:20px;max-width:90%;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;background:#ffffff}verdocs-auth .logo{width:128px;max-width:100%;margin:20px 0 30px}verdocs-auth h3{text-align:center;font-weight:400;font-size:18px;line-height:1.75;margin:0}verdocs-auth em{font-size:14px;margin:15px 0}verdocs-auth .buttons{gap:20px;margin:20px 0 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p{margin:1em 0;font-size:14px}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}verdocs-auth .already-have{margin:0.5em 0;font-size:14px}';export{u as verdocs_auth}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s,H as n}from"./p-67a42e2b.js";import{VerdocsEndpoint as a,getTemplates as l,deleteTemplate as i,integerSequence as d,canPerformTemplateAction as c}from"@verdocs/js-sdk";import{S as r}from"./p-fd97809c.js";import{d as o}from"./p-edaec1b6.js";const h=[{value:"all",label:"All"},{value:"personal",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}],p=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}],v=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}],m=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.viewTemplate=t(this,"viewTemplate",7),this.signNow=t(this,"signNow",7),this.submittedData=t(this,"submittedData",7),this.editTemplate=t(this,"editTemplate",7),this.templateDeleted=t(this,"templateDeleted",7),this.changeSort=t(this,"changeSort",7),this.changeSharing=t(this,"changeSharing",7),this.changeStarred=t(this,"changeStarred",7),this.changeName=t(this,"changeName",7),this.handleOptionSelected=(e,t)=>{var s,n,a,l;"send"===e?null===(s=this.viewTemplate)||void 0===s||s.emit({endpoint:this.endpoint,template:t}):"signnow"===e?null===(n=this.signNow)||void 0===n||n.emit({endpoint:this.endpoint,template:t}):"submitted"===e?null===(a=this.submittedData)||void 0===a||a.emit({endpoint:this.endpoint,template:t}):"edit"===e?null===(l=this.editTemplate)||void 0===l||l.emit({endpoint:this.endpoint,template:t}):"delete"===e&&(this.confirmDelete=t)},this.endpoint=a.getDefault(),this.sharing="all",this.starred="all",this.sort="updated_at",this.name="",this.allowedActions=["send","submitted","link","edit","delete"],this.showPagination=!0,this.rowsPerPage=10,this.selectedPage=0,this.count=0,this.initiallyLoaded=!1,this.loading=!0,this.confirmDelete=null,this.templates=[],this.localNameFilter=""}handleSharingUpdated(){return this.queryTemplates()}handleStarredUpdated(){return this.queryTemplates()}handleSortUpdated(){return this.queryTemplates()}handleNameUpdated(){return this.queryTemplates()}handlePageUpdated(){return this.queryTemplates()}componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[TEMPLATES] Must be authenticated")}async componentDidLoad(){await this.queryTemplates(),this.initiallyLoaded=!0}async queryTemplates(){var e,t,s;console.log("[TEMPLATES] Querying templates"),this.loading=!0;try{let e={page:this.selectedPage,rows:this.rowsPerPage};""!==this.name.trim()&&(e.q=this.name.trim());const t=await l(this.endpoint,e);this.templates=t.templates,this.count=t.count,this.loading=!1}catch(n){this.loading=!1,console.log("[TEMPLATES] Error listing templates",n),null===(e=this.sdkError)||void 0===e||e.emit(new r(n.message,null===(t=n.response)||void 0===t?void 0:t.status,null===(s=n.response)||void 0===s?void 0:s.data))}}deleteTemplate(e){this.confirmDelete=null,i(this.endpoint,e.id).then((()=>{var t;return console.log("[TEMPLATES] Deleted template",e),null===(t=this.templateDeleted)||void 0===t||t.emit({endpoint:this.endpoint,template:e}),this.queryTemplates()})).catch((t=>{var s,n,a;console.log("[TEMPLATES] Error deleting template",e),null===(s=this.sdkError)||void 0===s||s.emit(new r(t.message,null===(n=t.response)||void 0===n?void 0:n.status,null===(a=t.response)||void 0===a?void 0:a.data))}))}render(){const e=this.localNameFilter?this.templates.filter((e=>e.name.toLowerCase().includes(this.localNameFilter.toLowerCase()))):this.templates;return s(n,{key:"9d14c5bae8ea56281a33536160450cb0488dc52f"},s("div",{key:"c59959d7087a0a714b5c6b3a493c5c7446e71906",class:"header"},s("div",{key:"e51316310fbb444100962cb0b5a3e4d373af7d04",class:"filter"},s("verdocs-text-input",{key:"f528b443e50837c14af05aecf3e55cd89fa25f54",id:"verdocs-filter-name",value:this.name,clearable:!0,autocomplete:"off",placeholder:"Filter by Name...",onInput:e=>this.localNameFilter=e.target.value.trim(),onFocusout:e=>{var t;this.name=e.target.value.trim(),this.localNameFilter=e.target.value.trim(),null===(t=this.changeName)||void 0===t||t.emit(this.name)}})),s("verdocs-quick-filter",{key:"80693fdb171cc9ebe2b1488413adaf9c1499f24a",label:"Sharing",value:this.sharing,options:h,onOptionSelected:e=>{var t;this.sharing=e.detail.value,null===(t=this.changeSharing)||void 0===t||t.emit(this.sharing)}}),s("verdocs-quick-filter",{key:"b2ad4b67caf43236a2ace3973d36f27856f51610",label:"Starred",value:this.starred,options:p,onOptionSelected:e=>{var t;this.starred=e.detail.value,null===(t=this.changeStarred)||void 0===t||t.emit(this.starred)}}),s("verdocs-quick-filter",{key:"a448da8ee694fcb964d047cd35c19740abd80d49",label:"Sort By",value:this.sort,options:v,onOptionSelected:e=>{var t;this.sort=e.detail.value,null===(t=this.changeSort)||void 0===t||t.emit(this.sort)}}),this.loading&&s("verdocs-spinner",{key:"f4bc962a22034a2faa3ed815d40d33f47e70c408",mode:"dark",size:24}),s("div",{key:"a0434d9ec54346c558999ac88bbcff024ade0727",style:{display:"flex",flex:"1"}})),e.map((e=>{const t="created_at"===this.sort?"created_at":"updated_at"===this.sort?"updated_at":"last_used_at",n=e[t],a=[],l=[];return this.allowedActions.includes("send")&&a.push({label:"Preview / Send",id:"send",disabled:!c(this.endpoint.profile,"read",e)}),this.allowedActions.includes("signnow")&&a.push({label:"Sign Now",id:"signnow",disabled:!0}),this.allowedActions.includes("submitted")&&(a.push({label:""}),a.push({label:"Submissions",id:"submitted",disabled:!c(this.endpoint.profile,"read",e)})),(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete"))&&(a.push({label:""}),(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete"))&&a.push({label:"Edit",id:"edit",disabled:!l.includes("write")}),(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete"))&&a.push({label:"Delete",id:"delete",disabled:!l.includes("delete")})),s("div",{class:"template",onClick:()=>{var t;null===(t=this.viewTemplate)||void 0===t||t.emit({endpoint:this.endpoint,template:e})}},s("div",{class:"inner"},s("verdocs-template-star",{template:e,endpoint:this.endpoint}),s("div",{class:"spacer icon-spacer"}),s("div",{class:"name"},e.name),s("div",{class:"spacer usage-spacer"}),s("div",{class:"usage"},s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>',title:"Usage Counter"}),e.counter||"--"),s("div",{class:"spacer last-used-spacer"}),s("div",{class:"last-used"},"created_at"===t&&s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>',title:"Created"}),"updated_at"===t&&s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>',title:"Last Updated"}),"last_used_at"===t&&s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>',title:"Last Used"}),n?o.format(new Date(n),"P"):"Never"),s("div",{class:"spacer ownership-spacer"}),e.is_public&&s("div",{class:"ownership"},s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>'})," Public"),!e.is_public&&!e.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>'})," Private"),!e.is_public&&e.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>'})," Shared"),s("verdocs-dropdown",{options:a,onOptionSelected:t=>this.handleOptionSelected(t.detail.id,e)})))})),!this.initiallyLoaded&&s("div",{key:"0f5ae9865209b24176770ab2f9af2657e20fc8f7"},d(0,this.rowsPerPage).map((()=>s("div",{class:"template-placeholder"})))),this.initiallyLoaded&&!this.templates.length&&s("div",{key:"42a3642519dedc31dfb49b798b03179a6c7449c6",class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?s("div",{style:{marginTop:"20px"}},s("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:e=>{this.selectedPage=e.detail.selectedPage}})):s("div",null),this.confirmDelete&&s("verdocs-ok-dialog",{key:"6d5f37081d75a19f0d5579b8387d19e45c585f92",heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:()=>this.deleteTemplate(this.confirmDelete),onExit:()=>this.confirmDelete=null,showCancel:!0}))}static get watchers(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}}};m.style='@-webkit-keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\nverdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';export{m as verdocs_templates_list}
1
+ import{r as e,c as t,h as s,H as n}from"./p-5207d80c.js";import{VerdocsEndpoint as a,getTemplates as l,deleteTemplate as i,integerSequence as d,canPerformTemplateAction as c}from"@verdocs/js-sdk";import{S as r}from"./p-fd97809c.js";import{d as o}from"./p-edaec1b6.js";const h=[{value:"all",label:"All"},{value:"personal",label:"Personal"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}],p=[{value:"all",label:"All"},{value:"starred",label:"Starred"},{value:"unstarred",label:"Not Starred"}],v=[{value:"name",label:"Name"},{value:"created_at",label:"Created"},{value:"updated_at",label:"Last Updated"},{value:"last_used_at",label:"Last Used"},{value:"counter",label:"Most Used"},{value:"star_counter",label:"Most Starred"}],m=class{constructor(s){e(this,s),this.sdkError=t(this,"sdkError",7),this.viewTemplate=t(this,"viewTemplate",7),this.signNow=t(this,"signNow",7),this.submittedData=t(this,"submittedData",7),this.editTemplate=t(this,"editTemplate",7),this.templateDeleted=t(this,"templateDeleted",7),this.changeSort=t(this,"changeSort",7),this.changeSharing=t(this,"changeSharing",7),this.changeStarred=t(this,"changeStarred",7),this.changeName=t(this,"changeName",7),this.handleOptionSelected=(e,t)=>{var s,n,a,l;"send"===e?null===(s=this.viewTemplate)||void 0===s||s.emit({endpoint:this.endpoint,template:t}):"signnow"===e?null===(n=this.signNow)||void 0===n||n.emit({endpoint:this.endpoint,template:t}):"submitted"===e?null===(a=this.submittedData)||void 0===a||a.emit({endpoint:this.endpoint,template:t}):"edit"===e?null===(l=this.editTemplate)||void 0===l||l.emit({endpoint:this.endpoint,template:t}):"delete"===e&&(this.confirmDelete=t)},this.endpoint=a.getDefault(),this.sharing="all",this.starred="all",this.sort="updated_at",this.name="",this.allowedActions=["send","submitted","link","edit","delete"],this.showPagination=!0,this.rowsPerPage=10,this.selectedPage=0,this.count=0,this.initiallyLoaded=!1,this.loading=!0,this.confirmDelete=null,this.templates=[],this.localNameFilter=""}handleSharingUpdated(){return this.queryTemplates()}handleStarredUpdated(){return this.queryTemplates()}handleSortUpdated(){return this.queryTemplates()}handleNameUpdated(){return this.queryTemplates()}handlePageUpdated(){return this.queryTemplates()}componentWillLoad(){this.endpoint.loadSession(),this.endpoint.session||console.log("[TEMPLATES] Must be authenticated")}async componentDidLoad(){await this.queryTemplates(),this.initiallyLoaded=!0}async queryTemplates(){var e,t,s;console.log("[TEMPLATES] Querying templates"),this.loading=!0;try{let e={page:this.selectedPage,rows:this.rowsPerPage};""!==this.name.trim()&&(e.q=this.name.trim());const t=await l(this.endpoint,e);this.templates=t.templates,this.count=t.count,this.loading=!1}catch(n){this.loading=!1,console.log("[TEMPLATES] Error listing templates",n),null===(e=this.sdkError)||void 0===e||e.emit(new r(n.message,null===(t=n.response)||void 0===t?void 0:t.status,null===(s=n.response)||void 0===s?void 0:s.data))}}deleteTemplate(e){this.confirmDelete=null,i(this.endpoint,e.id).then((()=>{var t;return console.log("[TEMPLATES] Deleted template",e),null===(t=this.templateDeleted)||void 0===t||t.emit({endpoint:this.endpoint,template:e}),this.queryTemplates()})).catch((t=>{var s,n,a;console.log("[TEMPLATES] Error deleting template",e),null===(s=this.sdkError)||void 0===s||s.emit(new r(t.message,null===(n=t.response)||void 0===n?void 0:n.status,null===(a=t.response)||void 0===a?void 0:a.data))}))}render(){const e=this.localNameFilter?this.templates.filter((e=>e.name.toLowerCase().includes(this.localNameFilter.toLowerCase()))):this.templates;return s(n,{key:"9d14c5bae8ea56281a33536160450cb0488dc52f"},s("div",{key:"c59959d7087a0a714b5c6b3a493c5c7446e71906",class:"header"},s("div",{key:"e51316310fbb444100962cb0b5a3e4d373af7d04",class:"filter"},s("verdocs-text-input",{key:"f528b443e50837c14af05aecf3e55cd89fa25f54",id:"verdocs-filter-name",value:this.name,clearable:!0,autocomplete:"off",placeholder:"Filter by Name...",onInput:e=>this.localNameFilter=e.target.value.trim(),onFocusout:e=>{var t;this.name=e.target.value.trim(),this.localNameFilter=e.target.value.trim(),null===(t=this.changeName)||void 0===t||t.emit(this.name)}})),s("verdocs-quick-filter",{key:"80693fdb171cc9ebe2b1488413adaf9c1499f24a",label:"Sharing",value:this.sharing,options:h,onOptionSelected:e=>{var t;this.sharing=e.detail.value,null===(t=this.changeSharing)||void 0===t||t.emit(this.sharing)}}),s("verdocs-quick-filter",{key:"b2ad4b67caf43236a2ace3973d36f27856f51610",label:"Starred",value:this.starred,options:p,onOptionSelected:e=>{var t;this.starred=e.detail.value,null===(t=this.changeStarred)||void 0===t||t.emit(this.starred)}}),s("verdocs-quick-filter",{key:"a448da8ee694fcb964d047cd35c19740abd80d49",label:"Sort By",value:this.sort,options:v,onOptionSelected:e=>{var t;this.sort=e.detail.value,null===(t=this.changeSort)||void 0===t||t.emit(this.sort)}}),this.loading&&s("verdocs-spinner",{key:"f4bc962a22034a2faa3ed815d40d33f47e70c408",mode:"dark",size:24}),s("div",{key:"a0434d9ec54346c558999ac88bbcff024ade0727",style:{display:"flex",flex:"1"}})),e.map((e=>{const t="created_at"===this.sort?"created_at":"updated_at"===this.sort?"updated_at":"last_used_at",n=e[t],a=[],l=[];return this.allowedActions.includes("send")&&a.push({label:"Preview / Send",id:"send",disabled:!c(this.endpoint.profile,"read",e)}),this.allowedActions.includes("signnow")&&a.push({label:"Sign Now",id:"signnow",disabled:!0}),this.allowedActions.includes("submitted")&&(a.push({label:""}),a.push({label:"Submissions",id:"submitted",disabled:!c(this.endpoint.profile,"read",e)})),(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete"))&&(a.push({label:""}),(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete"))&&a.push({label:"Edit",id:"edit",disabled:!l.includes("write")}),(this.allowedActions.includes("link")||this.allowedActions.includes("edit")||this.allowedActions.includes("delete"))&&a.push({label:"Delete",id:"delete",disabled:!l.includes("delete")})),s("div",{class:"template",onClick:()=>{var t;null===(t=this.viewTemplate)||void 0===t||t.emit({endpoint:this.endpoint,template:e})}},s("div",{class:"inner"},s("verdocs-template-star",{template:e,endpoint:this.endpoint}),s("div",{class:"spacer icon-spacer"}),s("div",{class:"name"},e.name),s("div",{class:"spacer usage-spacer"}),s("div",{class:"usage"},s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>',title:"Usage Counter"}),e.counter||"--"),s("div",{class:"spacer last-used-spacer"}),s("div",{class:"last-used"},"created_at"===t&&s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>',title:"Created"}),"updated_at"===t&&s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>',title:"Last Updated"}),"last_used_at"===t&&s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>',title:"Last Used"}),n?o.format(new Date(n),"P"):"Never"),s("div",{class:"spacer ownership-spacer"}),e.is_public&&s("div",{class:"ownership"},s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>'})," Public"),!e.is_public&&!e.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>'})," Private"),!e.is_public&&e.is_personal&&s("div",{class:"ownership"},s("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>'})," Shared"),s("verdocs-dropdown",{options:a,onOptionSelected:t=>this.handleOptionSelected(t.detail.id,e)})))})),!this.initiallyLoaded&&s("div",{key:"0f5ae9865209b24176770ab2f9af2657e20fc8f7"},d(0,this.rowsPerPage).map((()=>s("div",{class:"template-placeholder"})))),this.initiallyLoaded&&!this.templates.length&&s("div",{key:"42a3642519dedc31dfb49b798b03179a6c7449c6",class:"empty-text"},"No matching templates found. Please adjust your filters and try again."),this.initiallyLoaded&&this.templates.length&&this.showPagination?s("div",{style:{marginTop:"20px"}},s("verdocs-pagination",{selectedPage:this.selectedPage,perPage:this.rowsPerPage,itemCount:this.count,onSelectPage:e=>{this.selectedPage=e.detail.selectedPage}})):s("div",null),this.confirmDelete&&s("verdocs-ok-dialog",{key:"6d5f37081d75a19f0d5579b8387d19e45c585f92",heading:"Delete this Template?",message:"This operation cannot be undone.",onNext:()=>this.deleteTemplate(this.confirmDelete),onExit:()=>this.confirmDelete=null,showCancel:!0}))}static get watchers(){return{sharing:["handleSharingUpdated"],starred:["handleStarredUpdated"],sort:["handleSortUpdated"],name:["handleNameUpdated"],selectedPage:["handlePageUpdated"]}}};m.style='@-webkit-keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\n@keyframes verdocs-field-pulse {\n 0% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n 50% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.35);\n }\n}\nverdocs-templates-list {\n display: -ms-flexbox;\n display: flex;\n padding: 10px;\n font-size: 18px;\n -ms-flex-wrap: nowrap;\n flex-wrap: nowrap;\n border-radius: 6px;\n color: #33364b;\n -ms-flex-direction: column;\n flex-direction: column;\n font-family: "Inter", "Barlow", sans-serif;\n}\nverdocs-templates-list .header {\n width: 100%;\n row-gap: 4px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-column-gap: 12px;\n -moz-column-gap: 12px;\n column-gap: 12px;\n margin: 0 0 10px 0;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n}\nverdocs-templates-list .header .filter {\n width: 150px;\n}\nverdocs-templates-list .header verdocs-text-input {\n margin: 0;\n}\nverdocs-templates-list .header verdocs-text-input input {\n height: 32px;\n}\nverdocs-templates-list .filter {\n -ms-flex-align: center;\n align-items: center;\n}\nverdocs-templates-list .template-placeholder {\n height: 48px;\n -ms-flex: 0 0 48px;\n flex: 0 0 48px;\n margin: 5px 0;\n border-radius: 5px;\n background: #f5f5fa;\n}\nverdocs-templates-list .template {\n width: 100%;\n margin: 2px 0;\n border: 1px solid #ffffff;\n background: #ffffff;\n}\nverdocs-templates-list .template:hover {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .template .inner {\n gap: 12px;\n display: -ms-flexbox;\n display: flex;\n padding: 8px 14px;\n border-radius: 5px;\n -ms-flex-direction: row;\n flex-direction: row;\n -ms-flex-align: center;\n align-items: center;\n container-type: inline-size;\n}\nverdocs-templates-list .template .inner svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .name {\n -ms-flex: 1;\n flex: 1;\n display: -ms-flexbox;\n display: flex;\n color: black;\n font-size: 16px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n@media screen and (max-width: 1300px) {\n verdocs-templates-list .name {\n font-size: 16px;\n }\n}\nverdocs-templates-list .spacer {\n margin: 0;\n height: 30px;\n -ms-flex: 0 0 1px;\n flex: 0 0 1px;\n display: -ms-flexbox;\n display: flex;\n border-right: 1px solid #dad8dd;\n}\n@media screen and (max-width: 800px) {\n verdocs-templates-list .spacer {\n display: none;\n }\n}\nverdocs-templates-list .empty-text {\n font-size: 20px;\n text-align: center;\n margin: 16px 0 0 0;\n padding: 80px 80px;\n border: 2px solid #ccc;\n}\nverdocs-templates-list .usage,\nverdocs-templates-list .ownership,\nverdocs-templates-list .last-used {\n gap: 10px;\n color: #444;\n display: -ms-flexbox;\n display: flex;\n font-size: 16px;\n margin: 0 0 0 10px;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-direction: row;\n flex-direction: row;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .usage svg,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .ownership svg,\nverdocs-templates-list .last-used span,\nverdocs-templates-list .last-used svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .usage span,\nverdocs-templates-list .ownership span,\nverdocs-templates-list .last-used span {\n display: block;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list verdocs-template-star {\n display: none;\n }\n}\nverdocs-templates-list .ownership {\n -ms-flex: 0 0 100px;\n flex: 0 0 100px;\n}\n@media screen and (max-width: 700px) {\n verdocs-templates-list .ownership {\n display: none;\n }\n}\nverdocs-templates-list .last-used {\n -ms-flex: 0 0 130px;\n flex: 0 0 130px;\n}\nverdocs-templates-list .usage {\n -ms-flex: 0 0 60px;\n flex: 0 0 60px;\n}\nverdocs-templates-list .header-row {\n display: none;\n}\nverdocs-templates-list table {\n container-type: size;\n max-width: 100%;\n overflow: hidden;\n table-layout: fixed;\n}\nverdocs-templates-list .data-row {\n cursor: pointer;\n background: #ededff;\n border: 1px solid #a7a7f5;\n}\nverdocs-templates-list .data-col svg {\n width: 24px;\n height: 24px;\n}\nverdocs-templates-list .col-name {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n@container (max-width:700 px) {\n verdocs-templates-list verdocs-templates-list .col-starred {\n display: none;\n }\n}';export{m as verdocs_templates_list}
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function o(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?r(t.value):i(t.value).then(o,s)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(n=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1];a=s;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(s);break}if(a[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];i=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-e5a426c4.system.js","@verdocs/js-sdk"],(function(t){"use strict";var e,r,n,i,a,o;return{setters:[function(t){e=t.r;r=t.c;n=t.h;i=t.H},function(t){a=t.VerdocsEndpoint;o=t.toggleStar}],execute:function(){var s='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-star{display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-template-star .star{line-height:10px}verdocs-template-star .star.updating{-webkit-animation:spinningStar 2s infinite linear;animation:spinningStar 2s infinite linear}verdocs-template-star .star svg{width:24px;height:24px}verdocs-template-star .count{color:#595c5d;font-size:14px;margin-left:10px}@-webkit-keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}';var c=s;var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /></svg>';var l='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z" clip-rule="evenodd" /></svg>';var u=t("verdocs_template_star",function(){function t(t){e(this,t);this.starChange=r(this,"starChange",7);this.sdkError=r(this,"sdkError",7);this.endpoint=a.getDefault();this.template=undefined;this.updating=false}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return[2]}return[2]}))}))};t.prototype.toggle=function(t){var e=this;t.stopPropagation();this.updating=true;o(a.getDefault(),this.template.id).then((function(t){e.updating=false;e.template.star_counter=t.star_counter;e.starChange.emit({templateId:e.template.id,starred:t.star_counter>0,count:t.star_counter})})).catch((function(t){e.updating=false;console.log("[STAR] Error toggling template star",t.message);e.sdkError.emit(t)}))};t.prototype.render=function(){var t=this;return n(i,{key:"5582f84ac65a8fe90250a8b739859244cabb53ca"},n("div",{key:"3766be1b6d584d8306e1bcb54006e877f1d3f486",class:"star ".concat(this.updating?"updating":""),innerHTML:this.template.star_counter?l:f,onClick:function(e){return t.toggle(e)}}),n("div",{key:"fef0f2f338b176d1e219f5a2a1b3a932a1c404cd",class:"count"},this.template.star_counter||"--"))};return t}());u.style=c}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,e,r,n){function i(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,a){function o(t){try{c(n.next(t))}catch(t){a(t)}}function s(t){try{c(n["throw"](t))}catch(t){a(t)}}function c(t){t.done?r(t.value):i(t.value).then(o,s)}c((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(r=0)),r)try{if(n=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;i=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1];a=s;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(s);break}if(a[2])r.ops.pop();r.trys.pop();continue}s=e.call(t,r)}catch(t){s=[6,t];i=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-59073837.system.js","@verdocs/js-sdk"],(function(t){"use strict";var e,r,n,i,a,o;return{setters:[function(t){e=t.r;r=t.c;n=t.h;i=t.H},function(t){a=t.VerdocsEndpoint;o=t.toggleStar}],execute:function(){var s='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-star{display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-template-star .star{line-height:10px}verdocs-template-star .star.updating{-webkit-animation:spinningStar 2s infinite linear;animation:spinningStar 2s infinite linear}verdocs-template-star .star svg{width:24px;height:24px}verdocs-template-star .count{color:#595c5d;font-size:14px;margin-left:10px}@-webkit-keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinningStar{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}';var c=s;var f='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /></svg>';var l='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z" clip-rule="evenodd" /></svg>';var u=t("verdocs_template_star",function(){function t(t){e(this,t);this.starChange=r(this,"starChange",7);this.sdkError=r(this,"sdkError",7);this.endpoint=a.getDefault();this.template=undefined;this.updating=false}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.endpoint.loadSession();if(!this.endpoint.session){console.log("[TEMPLATES] Must be authenticated");return[2]}return[2]}))}))};t.prototype.toggle=function(t){var e=this;t.stopPropagation();this.updating=true;o(a.getDefault(),this.template.id).then((function(t){e.updating=false;e.template.star_counter=t.star_counter;e.starChange.emit({templateId:e.template.id,starred:t.star_counter>0,count:t.star_counter})})).catch((function(t){e.updating=false;console.log("[STAR] Error toggling template star",t.message);e.sdkError.emit(t)}))};t.prototype.render=function(){var t=this;return n(i,{key:"5582f84ac65a8fe90250a8b739859244cabb53ca"},n("div",{key:"3766be1b6d584d8306e1bcb54006e877f1d3f486",class:"star ".concat(this.updating?"updating":""),innerHTML:this.template.star_counter?l:f,onClick:function(e){return t.toggle(e)}}),n("div",{key:"fef0f2f338b176d1e219f5a2a1b3a932a1c404cd",class:"count"},this.template.star_counter||"--"))};return t}());u.style=c}}}));