@verdocs/web-sdk 1.15.1 → 1.15.3

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 (277) hide show
  1. package/dist/cjs/{TemplateStore-fe148e97.js → TemplateStore-a7745f0a.js} +1 -1
  2. package/dist/cjs/{Templates-1a86703d.js → Templates-6fb62dcd.js} +15 -0
  3. package/dist/cjs/{index-7c19ba1d.js → index-961181ce.js} +37 -602
  4. package/dist/cjs/index-db620f37.js +575 -0
  5. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{utils-2c6835c6.js → utils-67dac0c3.js} +1 -1
  8. package/dist/cjs/verdocs-activity-box.cjs.entry.js +6 -7
  9. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  10. package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +2 -2
  11. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +3 -2
  12. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +2 -1
  13. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +5 -6
  14. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -2
  15. package/dist/cjs/verdocs-field-date.cjs.entry.js +3 -2
  16. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -2
  17. package/dist/cjs/verdocs-field-initial.cjs.entry.js +3 -2
  18. package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -2
  19. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -2
  20. package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -2
  21. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +3 -2
  22. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -2
  23. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +3 -2
  24. package/dist/cjs/verdocs-organization-card.cjs.entry.js +2 -1
  25. package/dist/cjs/verdocs-pagination_3.cjs.entry.js +169 -0
  26. package/dist/cjs/verdocs-preview.cjs.entry.js +5 -4
  27. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  28. package/dist/cjs/verdocs-send.cjs.entry.js +5 -4
  29. package/dist/cjs/verdocs-sign.cjs.entry.js +3 -2
  30. package/dist/cjs/{verdocs-pagination_4.cjs.entry.js → verdocs-status-indicator.cjs.entry.js} +0 -161
  31. package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +2 -2
  32. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +3 -2
  33. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +5 -4
  34. package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
  35. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
  36. package/dist/cjs/verdocs-template-star.cjs.entry.js +67 -0
  37. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
  38. package/dist/cjs/verdocs-templates-list.cjs.entry.js +595 -111
  39. package/dist/cjs/verdocs-view.cjs.entry.js +3 -2
  40. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  41. package/dist/collection/collection-manifest.json +1 -0
  42. package/dist/collection/components/envelopes/verdocs-activity-box/verdocs-activity-box.js +1 -1
  43. package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +38 -43
  44. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.css +31 -0
  45. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +144 -0
  46. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.stories.js +27 -0
  47. package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.css +98 -17
  48. package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +175 -221
  49. package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.stories.js +8 -6
  50. package/dist/components/Templates.js +15 -1
  51. package/dist/components/index.d.ts +1 -0
  52. package/dist/components/index.js +1 -0
  53. package/dist/components/index2.js +1 -1
  54. package/dist/components/verdocs-activity-box.js +6 -7
  55. package/dist/components/verdocs-envelopes-list.js +4 -7
  56. package/dist/components/verdocs-template-star.d.ts +11 -0
  57. package/dist/components/verdocs-template-star.js +6 -0
  58. package/dist/components/verdocs-template-star2.js +82 -0
  59. package/dist/components/verdocs-templates-list.js +634 -123
  60. package/dist/custom-elements.json +1890 -0
  61. package/dist/docs.json +223 -61
  62. package/dist/esm/{TemplateStore-c15956ae.js → TemplateStore-ad36abff.js} +1 -1
  63. package/dist/esm/{Templates-3760f311.js → Templates-1893bda7.js} +15 -1
  64. package/dist/esm/{index-914ed6f7.js → index-2685d184.js} +1 -566
  65. package/dist/esm/index-8dc8fdc4.js +568 -0
  66. package/dist/esm/ipc-test.entry.js +2 -2
  67. package/dist/esm/loader.js +1 -1
  68. package/dist/esm/{utils-a8284581.js → utils-ef800713.js} +2 -2
  69. package/dist/esm/verdocs-activity-box.entry.js +6 -7
  70. package/dist/esm/verdocs-build.entry.js +2 -2
  71. package/dist/esm/verdocs-button-panel_3.entry.js +2 -2
  72. package/dist/esm/verdocs-envelope-document-page.entry.js +3 -2
  73. package/dist/esm/verdocs-envelope-sidebar.entry.js +2 -1
  74. package/dist/esm/verdocs-envelopes-list.entry.js +5 -6
  75. package/dist/esm/verdocs-field-checkbox.entry.js +3 -2
  76. package/dist/esm/verdocs-field-date.entry.js +3 -2
  77. package/dist/esm/verdocs-field-dropdown.entry.js +3 -2
  78. package/dist/esm/verdocs-field-initial.entry.js +3 -2
  79. package/dist/esm/verdocs-field-payment.entry.js +3 -2
  80. package/dist/esm/verdocs-field-radio-button.entry.js +3 -2
  81. package/dist/esm/verdocs-field-signature.entry.js +3 -2
  82. package/dist/esm/verdocs-field-textarea.entry.js +3 -2
  83. package/dist/esm/verdocs-field-textbox.entry.js +3 -2
  84. package/dist/esm/verdocs-field-timestamp.entry.js +3 -2
  85. package/dist/esm/verdocs-organization-card.entry.js +2 -1
  86. package/dist/esm/verdocs-pagination_3.entry.js +163 -0
  87. package/dist/esm/verdocs-preview.entry.js +5 -4
  88. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  89. package/dist/esm/verdocs-send.entry.js +5 -4
  90. package/dist/esm/verdocs-sign.entry.js +3 -2
  91. package/dist/esm/{verdocs-pagination_4.entry.js → verdocs-status-indicator.entry.js} +2 -160
  92. package/dist/esm/verdocs-template-attachments_2.entry.js +2 -2
  93. package/dist/esm/verdocs-template-document-page_2.entry.js +3 -2
  94. package/dist/esm/verdocs-template-fields_4.entry.js +5 -4
  95. package/dist/esm/verdocs-template-name.entry.js +2 -2
  96. package/dist/esm/verdocs-template-reminders.entry.js +2 -2
  97. package/dist/esm/verdocs-template-star.entry.js +63 -0
  98. package/dist/esm/verdocs-template-visibility.entry.js +2 -2
  99. package/dist/esm/verdocs-templates-list.entry.js +592 -108
  100. package/dist/esm/verdocs-view.entry.js +3 -2
  101. package/dist/esm/verdocs-web-sdk.js +1 -1
  102. package/dist/esm-es5/{TemplateStore-c15956ae.js → TemplateStore-ad36abff.js} +1 -1
  103. package/dist/esm-es5/{Templates-3760f311.js → Templates-1893bda7.js} +1 -1
  104. package/dist/esm-es5/index-2685d184.js +1 -0
  105. package/dist/esm-es5/index-8dc8fdc4.js +1 -0
  106. package/dist/esm-es5/ipc-test.entry.js +1 -1
  107. package/dist/esm-es5/loader.js +1 -1
  108. package/dist/esm-es5/{utils-a8284581.js → utils-ef800713.js} +2 -2
  109. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -0
  127. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  128. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  129. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -0
  132. package/dist/esm-es5/verdocs-template-attachments_2.entry.js +1 -1
  133. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  134. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  135. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  136. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  137. package/dist/esm-es5/verdocs-template-star.entry.js +1 -0
  138. package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
  139. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  140. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  141. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  142. package/dist/types/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.d.ts +8 -16
  143. package/dist/types/components/templates/verdocs-template-star/verdocs-template-star.d.ts +35 -0
  144. package/dist/types/components/templates/verdocs-template-star/verdocs-template-star.stories.d.ts +6 -0
  145. package/dist/types/components/templates/verdocs-templates-list/verdocs-templates-list.d.ts +24 -29
  146. package/dist/types/components.d.ts +89 -27
  147. package/dist/verdocs-web-sdk/p-067b43ba.system.entry.js +1 -0
  148. package/dist/verdocs-web-sdk/p-09ee5e46.entry.js +1 -0
  149. package/dist/verdocs-web-sdk/p-0ae14e45.system.entry.js +1 -0
  150. package/dist/verdocs-web-sdk/{p-831e2651.system.entry.js → p-0b369a3e.system.entry.js} +1 -1
  151. package/dist/verdocs-web-sdk/{p-b2a0cef4.entry.js → p-0e1c0da5.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/p-11942b39.entry.js +1 -0
  153. package/dist/verdocs-web-sdk/p-11de0d75.system.js +1 -0
  154. package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
  155. package/dist/verdocs-web-sdk/p-1d010a79.system.js +1 -0
  156. package/dist/verdocs-web-sdk/{p-46013b8a.entry.js → p-20fcfef9.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/p-2118b452.system.entry.js +1 -0
  158. package/dist/verdocs-web-sdk/p-21629ed8.entry.js +1 -0
  159. package/dist/verdocs-web-sdk/p-253b6f06.entry.js +1 -0
  160. package/dist/verdocs-web-sdk/p-2961d1a8.system.entry.js +1 -0
  161. package/dist/verdocs-web-sdk/p-2a4566ab.system.entry.js +1 -0
  162. package/dist/verdocs-web-sdk/p-35841b7c.js +1 -0
  163. package/dist/verdocs-web-sdk/p-38d7c3f2.system.entry.js +1 -0
  164. package/dist/verdocs-web-sdk/p-3ed5dc5c.entry.js +1 -0
  165. package/dist/verdocs-web-sdk/p-3fe6dc00.system.entry.js +1 -0
  166. package/dist/verdocs-web-sdk/p-42f1012f.system.entry.js +1 -0
  167. package/dist/verdocs-web-sdk/p-45b1c6cd.entry.js +1 -0
  168. package/dist/verdocs-web-sdk/{p-e34783b1.entry.js → p-4615a245.entry.js} +1 -1
  169. package/dist/verdocs-web-sdk/p-4a7dcb1b.system.entry.js +1 -0
  170. package/dist/verdocs-web-sdk/{p-3399a2a2.system.entry.js → p-4eb69794.system.entry.js} +1 -1
  171. package/dist/verdocs-web-sdk/p-4fe4e161.js +1 -0
  172. package/dist/verdocs-web-sdk/{p-dee333ac.system.entry.js → p-52f9cfba.system.entry.js} +1 -1
  173. package/dist/verdocs-web-sdk/p-5612d642.entry.js +1 -0
  174. package/dist/verdocs-web-sdk/p-56943696.entry.js +1 -0
  175. package/dist/verdocs-web-sdk/p-5abf9fab.entry.js +1 -0
  176. package/dist/verdocs-web-sdk/p-5c5a5baf.system.entry.js +1 -0
  177. package/dist/verdocs-web-sdk/{p-3cac4136.system.js → p-5ef54155.system.js} +2 -2
  178. package/dist/verdocs-web-sdk/p-62f70c53.system.entry.js +1 -0
  179. package/dist/verdocs-web-sdk/p-63f9586c.system.entry.js +1 -0
  180. package/dist/verdocs-web-sdk/p-6570268f.js +1 -0
  181. package/dist/verdocs-web-sdk/p-67df4e57.system.entry.js +1 -0
  182. package/dist/verdocs-web-sdk/p-68dc38f8.entry.js +1 -0
  183. package/dist/verdocs-web-sdk/p-6cc3de8d.entry.js +1 -0
  184. package/dist/verdocs-web-sdk/{p-c02c16e1.js → p-6f4149c4.js} +1 -1
  185. package/dist/verdocs-web-sdk/{p-90f5c0fa.system.entry.js → p-7028e5fd.system.entry.js} +1 -1
  186. package/dist/verdocs-web-sdk/{p-eac4674e.system.entry.js → p-715c5b9d.system.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/p-73371d7a.system.entry.js +1 -0
  188. package/dist/verdocs-web-sdk/{p-fb3d4091.system.js → p-75455b2d.system.js} +1 -1
  189. package/dist/verdocs-web-sdk/{p-4cdc37f8.entry.js → p-78c38cec.entry.js} +1 -1
  190. package/dist/verdocs-web-sdk/{p-63abfff5.system.entry.js → p-79cf7768.system.entry.js} +1 -1
  191. package/dist/verdocs-web-sdk/p-7bc3f0ae.system.entry.js +1 -0
  192. package/dist/verdocs-web-sdk/p-7d992b01.entry.js +1 -0
  193. package/dist/verdocs-web-sdk/p-80f083a4.system.entry.js +1 -0
  194. package/dist/verdocs-web-sdk/p-812ed1e7.entry.js +1 -0
  195. package/dist/verdocs-web-sdk/p-823225c2.entry.js +1 -0
  196. package/dist/verdocs-web-sdk/p-82f6faac.system.entry.js +1 -0
  197. package/dist/verdocs-web-sdk/p-8603a0d0.entry.js +1 -0
  198. package/dist/verdocs-web-sdk/p-8c4abfcc.entry.js +1 -0
  199. package/dist/verdocs-web-sdk/p-90371251.entry.js +1 -0
  200. package/dist/verdocs-web-sdk/p-951d9c70.entry.js +1 -0
  201. package/dist/verdocs-web-sdk/p-9dde58a8.system.js +1 -0
  202. package/dist/verdocs-web-sdk/p-a3ac0082.entry.js +1 -0
  203. package/dist/verdocs-web-sdk/{p-cb17023f.entry.js → p-a3b3cdf5.entry.js} +1 -1
  204. package/dist/verdocs-web-sdk/{p-3a10e87d.entry.js → p-a6a8d20f.entry.js} +1 -1
  205. package/dist/verdocs-web-sdk/p-ac18bc08.system.entry.js +1 -0
  206. package/dist/verdocs-web-sdk/p-b2c5baae.system.entry.js +1 -0
  207. package/dist/verdocs-web-sdk/p-b3401d8e.entry.js +1 -0
  208. package/dist/verdocs-web-sdk/p-b6dba09e.system.entry.js +1 -0
  209. package/dist/verdocs-web-sdk/p-b995ebab.entry.js +1 -0
  210. package/dist/verdocs-web-sdk/p-bd077b3e.system.entry.js +1 -0
  211. package/dist/verdocs-web-sdk/{p-aefbafc3.system.entry.js → p-bf8cf9ff.system.entry.js} +1 -1
  212. package/dist/verdocs-web-sdk/p-c6c2b890.entry.js +1 -0
  213. package/dist/verdocs-web-sdk/{p-a6ecbbd5.js → p-c8b879d1.js} +2 -2
  214. package/dist/verdocs-web-sdk/p-cb283760.system.entry.js +1 -0
  215. package/dist/verdocs-web-sdk/p-ce097fdf.entry.js +1 -0
  216. package/dist/verdocs-web-sdk/{p-783d4ad4.system.entry.js → p-ce626e5b.system.entry.js} +1 -1
  217. package/dist/verdocs-web-sdk/p-d2d18696.system.entry.js +1 -0
  218. package/dist/verdocs-web-sdk/p-d4765b46.system.entry.js +1 -0
  219. package/dist/verdocs-web-sdk/p-db67fbd1.entry.js +1 -0
  220. package/dist/verdocs-web-sdk/{p-efcde7ca.entry.js → p-dda7674c.entry.js} +1 -1
  221. package/dist/verdocs-web-sdk/p-e32ec792.entry.js +1 -0
  222. package/dist/verdocs-web-sdk/{p-4e02f533.entry.js → p-f88d1bb0.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/p-fc8bba36.system.entry.js +1 -0
  224. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  225. package/package.json +2 -2
  226. package/dist/esm-es5/index-914ed6f7.js +0 -1
  227. package/dist/esm-es5/verdocs-pagination_4.entry.js +0 -1
  228. package/dist/verdocs-web-sdk/p-01de4163.system.entry.js +0 -1
  229. package/dist/verdocs-web-sdk/p-134aad4b.system.entry.js +0 -1
  230. package/dist/verdocs-web-sdk/p-14638f0c.system.entry.js +0 -1
  231. package/dist/verdocs-web-sdk/p-1a0cccea.system.entry.js +0 -1
  232. package/dist/verdocs-web-sdk/p-23686c43.entry.js +0 -1
  233. package/dist/verdocs-web-sdk/p-2730089c.system.entry.js +0 -1
  234. package/dist/verdocs-web-sdk/p-2dbe3de7.system.entry.js +0 -1
  235. package/dist/verdocs-web-sdk/p-2e164979.system.entry.js +0 -1
  236. package/dist/verdocs-web-sdk/p-2ff7c8c3.entry.js +0 -1
  237. package/dist/verdocs-web-sdk/p-38434761.system.entry.js +0 -1
  238. package/dist/verdocs-web-sdk/p-3ad85ae0.system.entry.js +0 -1
  239. package/dist/verdocs-web-sdk/p-3d80bb1e.entry.js +0 -1
  240. package/dist/verdocs-web-sdk/p-3eccbc81.system.entry.js +0 -1
  241. package/dist/verdocs-web-sdk/p-3fadef3d.entry.js +0 -1
  242. package/dist/verdocs-web-sdk/p-40f3a175.js +0 -1
  243. package/dist/verdocs-web-sdk/p-42acf76c.entry.js +0 -1
  244. package/dist/verdocs-web-sdk/p-4bbc74d9.entry.js +0 -1
  245. package/dist/verdocs-web-sdk/p-5ba13ab8.system.entry.js +0 -1
  246. package/dist/verdocs-web-sdk/p-5c2d7886.entry.js +0 -1
  247. package/dist/verdocs-web-sdk/p-634a5760.system.entry.js +0 -1
  248. package/dist/verdocs-web-sdk/p-6c267fdd.entry.js +0 -1
  249. package/dist/verdocs-web-sdk/p-871f33f9.system.entry.js +0 -1
  250. package/dist/verdocs-web-sdk/p-8d32aca4.system.entry.js +0 -1
  251. package/dist/verdocs-web-sdk/p-90f5a645.entry.js +0 -1
  252. package/dist/verdocs-web-sdk/p-92917e74.system.entry.js +0 -1
  253. package/dist/verdocs-web-sdk/p-92b2d9e4.entry.js +0 -1
  254. package/dist/verdocs-web-sdk/p-92ca2aef.system.js +0 -1
  255. package/dist/verdocs-web-sdk/p-9416d327.entry.js +0 -1
  256. package/dist/verdocs-web-sdk/p-95332ec8.system.entry.js +0 -1
  257. package/dist/verdocs-web-sdk/p-9f76bbe1.system.entry.js +0 -1
  258. package/dist/verdocs-web-sdk/p-a4391c14.entry.js +0 -1
  259. package/dist/verdocs-web-sdk/p-a7eef6e9.entry.js +0 -1
  260. package/dist/verdocs-web-sdk/p-a824c9a6.system.entry.js +0 -1
  261. package/dist/verdocs-web-sdk/p-c0d8f0db.entry.js +0 -1
  262. package/dist/verdocs-web-sdk/p-c220af42.js +0 -1
  263. package/dist/verdocs-web-sdk/p-c53aefe5.entry.js +0 -1
  264. package/dist/verdocs-web-sdk/p-cd0eb575.entry.js +0 -1
  265. package/dist/verdocs-web-sdk/p-d497b3c1.system.entry.js +0 -1
  266. package/dist/verdocs-web-sdk/p-dc9c4361.system.js +0 -1
  267. package/dist/verdocs-web-sdk/p-e2e972fc.system.entry.js +0 -1
  268. package/dist/verdocs-web-sdk/p-e646e8ef.system.entry.js +0 -1
  269. package/dist/verdocs-web-sdk/p-e6512cc3.entry.js +0 -1
  270. package/dist/verdocs-web-sdk/p-e72c075e.entry.js +0 -1
  271. package/dist/verdocs-web-sdk/p-e971511e.entry.js +0 -1
  272. package/dist/verdocs-web-sdk/p-e989b3ce.entry.js +0 -1
  273. package/dist/verdocs-web-sdk/p-f623b887.entry.js +0 -1
  274. package/dist/verdocs-web-sdk/p-f6594380.system.entry.js +0 -1
  275. package/dist/verdocs-web-sdk/p-f7ea7b36.entry.js +0 -1
  276. package/dist/verdocs-web-sdk/p-fbd3e8df.system.entry.js +0 -1
  277. package/dist/verdocs-web-sdk/p-ff3e5717.entry.js +0 -1
@@ -2,12 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-70677d67.js');
5
+ const index$1 = require('./index-70677d67.js');
6
6
  require('./Types-f89f9116.js');
7
7
  const VerdocsEndpoint = require('./VerdocsEndpoint-cb0b1329.js');
8
- const Templates = require('./Templates-1a86703d.js');
8
+ const Templates = require('./Templates-6fb62dcd.js');
9
9
  const Toast = require('./Toast-06880504.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
+ const index = require('./index-db620f37.js');
11
12
 
12
13
  /**
13
14
  * Confirm whether the user has all of the specified permissions.
@@ -16,6 +17,491 @@ var userHasPermissions = function (session, permissions) {
16
17
  return permissions.every(function (perm) { return ((session === null || session === void 0 ? void 0 : session.permissions) || []).includes(perm); });
17
18
  };
18
19
 
20
+ /**
21
+ * @name compareAsc
22
+ * @category Common Helpers
23
+ * @summary Compare the two dates and return -1, 0 or 1.
24
+ *
25
+ * @description
26
+ * Compare the two dates and return 1 if the first date is after the second,
27
+ * -1 if the first date is before the second or 0 if dates are equal.
28
+ *
29
+ * @param {Date|Number} dateLeft - the first date to compare
30
+ * @param {Date|Number} dateRight - the second date to compare
31
+ * @returns {Number} the result of the comparison
32
+ * @throws {TypeError} 2 arguments required
33
+ *
34
+ * @example
35
+ * // Compare 11 February 1987 and 10 July 1989:
36
+ * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))
37
+ * //=> -1
38
+ *
39
+ * @example
40
+ * // Sort the array of dates:
41
+ * const result = [
42
+ * new Date(1995, 6, 2),
43
+ * new Date(1987, 1, 11),
44
+ * new Date(1989, 6, 10)
45
+ * ].sort(compareAsc)
46
+ * //=> [
47
+ * // Wed Feb 11 1987 00:00:00,
48
+ * // Mon Jul 10 1989 00:00:00,
49
+ * // Sun Jul 02 1995 00:00:00
50
+ * // ]
51
+ */
52
+ function compareAsc(dirtyDateLeft, dirtyDateRight) {
53
+ index.requiredArgs(2, arguments);
54
+ var dateLeft = index.toDate(dirtyDateLeft);
55
+ var dateRight = index.toDate(dirtyDateRight);
56
+ var diff = dateLeft.getTime() - dateRight.getTime();
57
+ if (diff < 0) {
58
+ return -1;
59
+ } else if (diff > 0) {
60
+ return 1;
61
+ // Return 0 if diff is 0; return NaN if diff is NaN
62
+ } else {
63
+ return diff;
64
+ }
65
+ }
66
+
67
+ /**
68
+ * @name differenceInCalendarMonths
69
+ * @category Month Helpers
70
+ * @summary Get the number of calendar months between the given dates.
71
+ *
72
+ * @description
73
+ * Get the number of calendar months between the given dates.
74
+ *
75
+ * @param {Date|Number} dateLeft - the later date
76
+ * @param {Date|Number} dateRight - the earlier date
77
+ * @returns {Number} the number of calendar months
78
+ * @throws {TypeError} 2 arguments required
79
+ *
80
+ * @example
81
+ * // How many calendar months are between 31 January 2014 and 1 September 2014?
82
+ * const result = differenceInCalendarMonths(
83
+ * new Date(2014, 8, 1),
84
+ * new Date(2014, 0, 31)
85
+ * )
86
+ * //=> 8
87
+ */
88
+ function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {
89
+ index.requiredArgs(2, arguments);
90
+ var dateLeft = index.toDate(dirtyDateLeft);
91
+ var dateRight = index.toDate(dirtyDateRight);
92
+ var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();
93
+ var monthDiff = dateLeft.getMonth() - dateRight.getMonth();
94
+ return yearDiff * 12 + monthDiff;
95
+ }
96
+
97
+ /**
98
+ * @name differenceInMilliseconds
99
+ * @category Millisecond Helpers
100
+ * @summary Get the number of milliseconds between the given dates.
101
+ *
102
+ * @description
103
+ * Get the number of milliseconds between the given dates.
104
+ *
105
+ * @param {Date|Number} dateLeft - the later date
106
+ * @param {Date|Number} dateRight - the earlier date
107
+ * @returns {Number} the number of milliseconds
108
+ * @throws {TypeError} 2 arguments required
109
+ *
110
+ * @example
111
+ * // How many milliseconds are between
112
+ * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?
113
+ * const result = differenceInMilliseconds(
114
+ * new Date(2014, 6, 2, 12, 30, 21, 700),
115
+ * new Date(2014, 6, 2, 12, 30, 20, 600)
116
+ * )
117
+ * //=> 1100
118
+ */
119
+ function differenceInMilliseconds(dateLeft, dateRight) {
120
+ index.requiredArgs(2, arguments);
121
+ return index.toDate(dateLeft).getTime() - index.toDate(dateRight).getTime();
122
+ }
123
+
124
+ var roundingMap = {
125
+ ceil: Math.ceil,
126
+ round: Math.round,
127
+ floor: Math.floor,
128
+ trunc: function trunc(value) {
129
+ return value < 0 ? Math.ceil(value) : Math.floor(value);
130
+ } // Math.trunc is not supported by IE
131
+ };
132
+
133
+ var defaultRoundingMethod = 'trunc';
134
+ function getRoundingMethod(method) {
135
+ return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];
136
+ }
137
+
138
+ /**
139
+ * @name endOfDay
140
+ * @category Day Helpers
141
+ * @summary Return the end of a day for the given date.
142
+ *
143
+ * @description
144
+ * Return the end of a day for the given date.
145
+ * The result will be in the local timezone.
146
+ *
147
+ * @param {Date|Number} date - the original date
148
+ * @returns {Date} the end of a day
149
+ * @throws {TypeError} 1 argument required
150
+ *
151
+ * @example
152
+ * // The end of a day for 2 September 2014 11:55:00:
153
+ * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))
154
+ * //=> Tue Sep 02 2014 23:59:59.999
155
+ */
156
+ function endOfDay(dirtyDate) {
157
+ index.requiredArgs(1, arguments);
158
+ var date = index.toDate(dirtyDate);
159
+ date.setHours(23, 59, 59, 999);
160
+ return date;
161
+ }
162
+
163
+ /**
164
+ * @name endOfMonth
165
+ * @category Month Helpers
166
+ * @summary Return the end of a month for the given date.
167
+ *
168
+ * @description
169
+ * Return the end of a month for the given date.
170
+ * The result will be in the local timezone.
171
+ *
172
+ * @param {Date|Number} date - the original date
173
+ * @returns {Date} the end of a month
174
+ * @throws {TypeError} 1 argument required
175
+ *
176
+ * @example
177
+ * // The end of a month for 2 September 2014 11:55:00:
178
+ * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
179
+ * //=> Tue Sep 30 2014 23:59:59.999
180
+ */
181
+ function endOfMonth(dirtyDate) {
182
+ index.requiredArgs(1, arguments);
183
+ var date = index.toDate(dirtyDate);
184
+ var month = date.getMonth();
185
+ date.setFullYear(date.getFullYear(), month + 1, 0);
186
+ date.setHours(23, 59, 59, 999);
187
+ return date;
188
+ }
189
+
190
+ /**
191
+ * @name isLastDayOfMonth
192
+ * @category Month Helpers
193
+ * @summary Is the given date the last day of a month?
194
+ *
195
+ * @description
196
+ * Is the given date the last day of a month?
197
+ *
198
+ * @param {Date|Number} date - the date to check
199
+ * @returns {Boolean} the date is the last day of a month
200
+ * @throws {TypeError} 1 argument required
201
+ *
202
+ * @example
203
+ * // Is 28 February 2014 the last day of a month?
204
+ * const result = isLastDayOfMonth(new Date(2014, 1, 28))
205
+ * //=> true
206
+ */
207
+ function isLastDayOfMonth(dirtyDate) {
208
+ index.requiredArgs(1, arguments);
209
+ var date = index.toDate(dirtyDate);
210
+ return endOfDay(date).getTime() === endOfMonth(date).getTime();
211
+ }
212
+
213
+ /**
214
+ * @name differenceInMonths
215
+ * @category Month Helpers
216
+ * @summary Get the number of full months between the given dates.
217
+ *
218
+ * @description
219
+ * Get the number of full months between the given dates using trunc as a default rounding method.
220
+ *
221
+ * @param {Date|Number} dateLeft - the later date
222
+ * @param {Date|Number} dateRight - the earlier date
223
+ * @returns {Number} the number of full months
224
+ * @throws {TypeError} 2 arguments required
225
+ *
226
+ * @example
227
+ * // How many full months are between 31 January 2014 and 1 September 2014?
228
+ * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))
229
+ * //=> 7
230
+ */
231
+ function differenceInMonths(dirtyDateLeft, dirtyDateRight) {
232
+ index.requiredArgs(2, arguments);
233
+ var dateLeft = index.toDate(dirtyDateLeft);
234
+ var dateRight = index.toDate(dirtyDateRight);
235
+ var sign = compareAsc(dateLeft, dateRight);
236
+ var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));
237
+ var result;
238
+
239
+ // Check for the difference of less than month
240
+ if (difference < 1) {
241
+ result = 0;
242
+ } else {
243
+ if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {
244
+ // This will check if the date is end of Feb and assign a higher end of month date
245
+ // to compare it with Jan
246
+ dateLeft.setDate(30);
247
+ }
248
+ dateLeft.setMonth(dateLeft.getMonth() - sign * difference);
249
+
250
+ // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full
251
+ // If so, result must be decreased by 1 in absolute value
252
+ var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign;
253
+
254
+ // Check for cases of one full calendar month
255
+ if (isLastDayOfMonth(index.toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {
256
+ isLastMonthNotFull = false;
257
+ }
258
+ result = sign * (difference - Number(isLastMonthNotFull));
259
+ }
260
+
261
+ // Prevent negative zero
262
+ return result === 0 ? 0 : result;
263
+ }
264
+
265
+ /**
266
+ * @name differenceInSeconds
267
+ * @category Second Helpers
268
+ * @summary Get the number of seconds between the given dates.
269
+ *
270
+ * @description
271
+ * Get the number of seconds between the given dates.
272
+ *
273
+ * @param {Date|Number} dateLeft - the later date
274
+ * @param {Date|Number} dateRight - the earlier date
275
+ * @param {Object} [options] - an object with options.
276
+ * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)
277
+ * @returns {Number} the number of seconds
278
+ * @throws {TypeError} 2 arguments required
279
+ *
280
+ * @example
281
+ * // How many seconds are between
282
+ * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?
283
+ * const result = differenceInSeconds(
284
+ * new Date(2014, 6, 2, 12, 30, 20, 0),
285
+ * new Date(2014, 6, 2, 12, 30, 7, 999)
286
+ * )
287
+ * //=> 12
288
+ */
289
+ function differenceInSeconds(dateLeft, dateRight, options) {
290
+ index.requiredArgs(2, arguments);
291
+ var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;
292
+ return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
293
+ }
294
+
295
+ function assign(target, object) {
296
+ if (target == null) {
297
+ throw new TypeError('assign requires that input parameter not be null or undefined');
298
+ }
299
+ for (var property in object) {
300
+ if (Object.prototype.hasOwnProperty.call(object, property)) {
301
+ target[property] = object[property];
302
+ }
303
+ }
304
+ return target;
305
+ }
306
+
307
+ function cloneObject(object) {
308
+ return assign({}, object);
309
+ }
310
+
311
+ var MINUTES_IN_DAY = 1440;
312
+ var MINUTES_IN_ALMOST_TWO_DAYS = 2520;
313
+ var MINUTES_IN_MONTH = 43200;
314
+ var MINUTES_IN_TWO_MONTHS = 86400;
315
+
316
+ /**
317
+ * @name formatDistance
318
+ * @category Common Helpers
319
+ * @summary Return the distance between the given dates in words.
320
+ *
321
+ * @description
322
+ * Return the distance between the given dates in words.
323
+ *
324
+ * | Distance between dates | Result |
325
+ * |-------------------------------------------------------------------|---------------------|
326
+ * | 0 ... 30 secs | less than a minute |
327
+ * | 30 secs ... 1 min 30 secs | 1 minute |
328
+ * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |
329
+ * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |
330
+ * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |
331
+ * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |
332
+ * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |
333
+ * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |
334
+ * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |
335
+ * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |
336
+ * | 1 yr ... 1 yr 3 months | about 1 year |
337
+ * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |
338
+ * | 1 yr 9 months ... 2 yrs | almost 2 years |
339
+ * | N yrs ... N yrs 3 months | about N years |
340
+ * | N yrs 3 months ... N yrs 9 months | over N years |
341
+ * | N yrs 9 months ... N+1 yrs | almost N+1 years |
342
+ *
343
+ * With `options.includeSeconds == true`:
344
+ * | Distance between dates | Result |
345
+ * |------------------------|----------------------|
346
+ * | 0 secs ... 5 secs | less than 5 seconds |
347
+ * | 5 secs ... 10 secs | less than 10 seconds |
348
+ * | 10 secs ... 20 secs | less than 20 seconds |
349
+ * | 20 secs ... 40 secs | half a minute |
350
+ * | 40 secs ... 60 secs | less than a minute |
351
+ * | 60 secs ... 90 secs | 1 minute |
352
+ *
353
+ * @param {Date|Number} date - the date
354
+ * @param {Date|Number} baseDate - the date to compare with
355
+ * @param {Object} [options] - an object with options.
356
+ * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed
357
+ * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first
358
+ * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
359
+ * @returns {String} the distance in words
360
+ * @throws {TypeError} 2 arguments required
361
+ * @throws {RangeError} `date` must not be Invalid Date
362
+ * @throws {RangeError} `baseDate` must not be Invalid Date
363
+ * @throws {RangeError} `options.locale` must contain `formatDistance` property
364
+ *
365
+ * @example
366
+ * // What is the distance between 2 July 2014 and 1 January 2015?
367
+ * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))
368
+ * //=> '6 months'
369
+ *
370
+ * @example
371
+ * // What is the distance between 1 January 2015 00:00:15
372
+ * // and 1 January 2015 00:00:00, including seconds?
373
+ * const result = formatDistance(
374
+ * new Date(2015, 0, 1, 0, 0, 15),
375
+ * new Date(2015, 0, 1, 0, 0, 0),
376
+ * { includeSeconds: true }
377
+ * )
378
+ * //=> 'less than 20 seconds'
379
+ *
380
+ * @example
381
+ * // What is the distance from 1 January 2016
382
+ * // to 1 January 2015, with a suffix?
383
+ * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {
384
+ * addSuffix: true
385
+ * })
386
+ * //=> 'about 1 year ago'
387
+ *
388
+ * @example
389
+ * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?
390
+ * import { eoLocale } from 'date-fns/locale/eo'
391
+ * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {
392
+ * locale: eoLocale
393
+ * })
394
+ * //=> 'pli ol 1 jaro'
395
+ */
396
+
397
+ function formatDistance(dirtyDate, dirtyBaseDate, options) {
398
+ var _ref, _options$locale;
399
+ index.requiredArgs(2, arguments);
400
+ var defaultOptions = index.getDefaultOptions();
401
+ var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : index.locale;
402
+ if (!locale.formatDistance) {
403
+ throw new RangeError('locale must contain formatDistance property');
404
+ }
405
+ var comparison = compareAsc(dirtyDate, dirtyBaseDate);
406
+ if (isNaN(comparison)) {
407
+ throw new RangeError('Invalid time value');
408
+ }
409
+ var localizeOptions = assign(cloneObject(options), {
410
+ addSuffix: Boolean(options === null || options === void 0 ? void 0 : options.addSuffix),
411
+ comparison: comparison
412
+ });
413
+ var dateLeft;
414
+ var dateRight;
415
+ if (comparison > 0) {
416
+ dateLeft = index.toDate(dirtyBaseDate);
417
+ dateRight = index.toDate(dirtyDate);
418
+ } else {
419
+ dateLeft = index.toDate(dirtyDate);
420
+ dateRight = index.toDate(dirtyBaseDate);
421
+ }
422
+ var seconds = differenceInSeconds(dateRight, dateLeft);
423
+ var offsetInSeconds = (index.getTimezoneOffsetInMilliseconds(dateRight) - index.getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;
424
+ var minutes = Math.round((seconds - offsetInSeconds) / 60);
425
+ var months;
426
+
427
+ // 0 up to 2 mins
428
+ if (minutes < 2) {
429
+ if (options !== null && options !== void 0 && options.includeSeconds) {
430
+ if (seconds < 5) {
431
+ return locale.formatDistance('lessThanXSeconds', 5, localizeOptions);
432
+ } else if (seconds < 10) {
433
+ return locale.formatDistance('lessThanXSeconds', 10, localizeOptions);
434
+ } else if (seconds < 20) {
435
+ return locale.formatDistance('lessThanXSeconds', 20, localizeOptions);
436
+ } else if (seconds < 40) {
437
+ return locale.formatDistance('halfAMinute', 0, localizeOptions);
438
+ } else if (seconds < 60) {
439
+ return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);
440
+ } else {
441
+ return locale.formatDistance('xMinutes', 1, localizeOptions);
442
+ }
443
+ } else {
444
+ if (minutes === 0) {
445
+ return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);
446
+ } else {
447
+ return locale.formatDistance('xMinutes', minutes, localizeOptions);
448
+ }
449
+ }
450
+
451
+ // 2 mins up to 0.75 hrs
452
+ } else if (minutes < 45) {
453
+ return locale.formatDistance('xMinutes', minutes, localizeOptions);
454
+
455
+ // 0.75 hrs up to 1.5 hrs
456
+ } else if (minutes < 90) {
457
+ return locale.formatDistance('aboutXHours', 1, localizeOptions);
458
+
459
+ // 1.5 hrs up to 24 hrs
460
+ } else if (minutes < MINUTES_IN_DAY) {
461
+ var hours = Math.round(minutes / 60);
462
+ return locale.formatDistance('aboutXHours', hours, localizeOptions);
463
+
464
+ // 1 day up to 1.75 days
465
+ } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {
466
+ return locale.formatDistance('xDays', 1, localizeOptions);
467
+
468
+ // 1.75 days up to 30 days
469
+ } else if (minutes < MINUTES_IN_MONTH) {
470
+ var days = Math.round(minutes / MINUTES_IN_DAY);
471
+ return locale.formatDistance('xDays', days, localizeOptions);
472
+
473
+ // 1 month up to 2 months
474
+ } else if (minutes < MINUTES_IN_TWO_MONTHS) {
475
+ months = Math.round(minutes / MINUTES_IN_MONTH);
476
+ return locale.formatDistance('aboutXMonths', months, localizeOptions);
477
+ }
478
+ months = differenceInMonths(dateRight, dateLeft);
479
+
480
+ // 2 months up to 12 months
481
+ if (months < 12) {
482
+ var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);
483
+ return locale.formatDistance('xMonths', nearestMonth, localizeOptions);
484
+
485
+ // 1 year up to max Date
486
+ } else {
487
+ var monthsSinceStartOfYear = months % 12;
488
+ var years = Math.floor(months / 12);
489
+
490
+ // N years up to 1 years 3 months
491
+ if (monthsSinceStartOfYear < 3) {
492
+ return locale.formatDistance('aboutXYears', years, localizeOptions);
493
+
494
+ // N years 3 months up to N years 9 months
495
+ } else if (monthsSinceStartOfYear < 9) {
496
+ return locale.formatDistance('overXYears', years, localizeOptions);
497
+
498
+ // N years 9 months up to N year 12 months
499
+ } else {
500
+ return locale.formatDistance('almostXYears', years + 1, localizeOptions);
501
+ }
502
+ }
503
+ }
504
+
19
505
  /**
20
506
  * Various helpers to identify available operations for a template by a user.
21
507
  *
@@ -42,49 +528,93 @@ var userCanCreateTemplate = function (session) {
42
528
  return userCanCreatePersonalTemplate(session) || userCanCreateOrgTemplate(session) || userCanCreatePublicTemplate(session);
43
529
  };
44
530
 
45
- const verdocsTemplatesListCss = "verdocs-templates-list{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-templates-list .template{display:-ms-flexbox;display:flex;margin:3px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:1px solid #eee;background:#fff;padding:8px 20px}verdocs-templates-list .template svg{width:32px;height:32px}@media screen and (max-width: 1300px){verdocs-templates-list .template svg{width:24px;height:24px}}verdocs-templates-list .name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:black;font-size:18px;margin-left:10px}@media screen and (max-width: 1300px){verdocs-templates-list .name{font-size:16px}}verdocs-templates-list .spacer{display:-ms-flexbox;display:flex;-ms-flex:0 0 1px;flex:0 0 1px;height:50px;margin:0 12px;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-templates-list .spacer{margin:12px 0;border-top:1px solid #dad8dd;border-right:none}}";
531
+ const verdocsTemplatesListCss = "verdocs-templates-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-templates-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .header .filter{width:150px}verdocs-templates-list .header verdocs-text-input{margin:0}verdocs-templates-list .header verdocs-text-input input{height:32px}verdocs-templates-list .filter{-ms-flex-align:center;align-items:center}verdocs-templates-list .template{width:100%;margin:3px 0;background:#ffffff}verdocs-templates-list .template:hover{cursor:pointer;background:#f5f5fa}verdocs-templates-list .template .inner{gap:10px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-templates-list .template .inner svg{width:24px;height:24px}verdocs-templates-list .name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:black;font-size:18px;margin-left:10px}@media screen and (max-width: 1300px){verdocs-templates-list .name{font-size:16px}}verdocs-templates-list .spacer{margin:0;height:30px;-ms-flex:0 0 1px;flex:0 0 1px;display:-ms-flexbox;display:flex;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-templates-list .spacer{margin:12px 0;border-top:1px solid #dad8dd;border-right:none}}verdocs-templates-list .empty-text{font-size:20px;text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-templates-list .ownership{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 100px;flex:0 0 100px;font-size:16px;margin:0 0 0 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .ownership svg{width:24px;height:24px;margin-right:8px}verdocs-templates-list .last-used{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 280px;flex:0 0 280px;font-size:16px;margin:0 0 0 10px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-templates-list .last-used svg{width:24px;height:24px;margin-right:8px}verdocs-templates-list .usage{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;font-size:16px;margin:0 0 0 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .usage svg{width:24px;height:24px;margin-right:8px}";
46
532
 
47
- const TemplateIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" /></svg>`;
533
+ const TemplateIcon = `<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="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" /></svg>`;
534
+ const GlobeAltIcon = `<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>`;
535
+ const LockClosedIcon = `<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>`;
536
+ const BuildingOfficeIcon = `<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>`;
537
+ const CalendarIcon = `<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="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5" /></svg>`;
538
+ const EnvelopeIcon = `<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>`;
539
+ const SharingFilters = [
540
+ { value: 'all', label: 'All' },
541
+ { value: 'personal', label: 'Personal' },
542
+ { value: 'shared', label: 'Shared' },
543
+ { value: 'public', label: 'Public' },
544
+ ];
545
+ const StarredFilters = [
546
+ { value: 'all', label: 'All' },
547
+ { value: 'starred', label: 'Starred' },
548
+ { value: 'unstarred', label: 'Not Starred' },
549
+ ];
550
+ const SortOptions = [
551
+ { value: 'name', label: 'Name' },
552
+ { value: 'created_at', label: 'Created' },
553
+ { value: 'updated_at', label: 'Last Updated' },
554
+ { value: 'last_used_at', label: 'Last Used' },
555
+ { value: 'counter', label: 'Most Used' },
556
+ { value: 'star_counter', label: 'Most Starred' },
557
+ ];
48
558
  const VerdocsTemplatesList = class {
49
559
  constructor(hostRef) {
50
- index.registerInstance(this, hostRef);
51
- this.sdkError = index.createEvent(this, "sdkError", 7);
52
- this.viewEnvelope = index.createEvent(this, "viewEnvelope", 7);
53
- this.finishLater = index.createEvent(this, "finishLater", 7);
54
- this.viewAll = index.createEvent(this, "viewAll", 7);
55
- this.handleOptionSelected = (id, summary) => {
56
- console.log('option selected', id, summary);
57
- if (id === 'createdoc') ;
58
- else if (id === 'createlink') {
59
- // Create a link to this template
60
- Toast.VerdocsToast('Link creation is coming soon!');
560
+ index$1.registerInstance(this, hostRef);
561
+ this.sdkError = index$1.createEvent(this, "sdkError", 7);
562
+ this.viewTemplate = index$1.createEvent(this, "viewTemplate", 7);
563
+ this.editTemplate = index$1.createEvent(this, "editTemplate", 7);
564
+ this.templateDeleted = index$1.createEvent(this, "templateDeleted", 7);
565
+ this.handleOptionSelected = (option, template) => {
566
+ var _a, _b;
567
+ if (option === 'createdoc') {
568
+ (_a = this.viewTemplate) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: template });
569
+ }
570
+ else if (option === 'createlink') {
571
+ Toast.VerdocsToast('This feature is coming soon!');
572
+ }
573
+ else if (option === 'signnow') {
574
+ Toast.VerdocsToast('This feature is coming soon!');
575
+ }
576
+ else if (option === 'submitted') {
577
+ Toast.VerdocsToast('This feature is coming soon!');
578
+ }
579
+ else if (option === 'link') {
580
+ Toast.VerdocsToast('This feature is coming soon!');
581
+ }
582
+ else if (option === 'edit') {
583
+ (_b = this.editTemplate) === null || _b === void 0 ? void 0 : _b.emit({ endpoint: this.endpoint, template: template });
584
+ }
585
+ else if (option === 'delete') {
586
+ this.confirmDelete = template;
61
587
  }
62
- else ;
63
588
  };
64
589
  this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
65
- this.items = 5;
66
- this.view = undefined;
67
- this.page = 0;
68
- this.count = 0;
69
- this.loading = true;
70
- this.name = '';
71
- this.containing = '';
72
590
  this.sharing = 'all';
73
591
  this.starred = 'all';
74
592
  this.sort = 'updated_at';
75
- this.selectedTemplates = [];
593
+ this.name = '';
594
+ this.selectedPage = 0;
595
+ this.count = 0;
596
+ this.loading = true;
597
+ this.confirmDelete = null;
76
598
  this.templates = [];
77
599
  }
78
600
  async componentWillLoad() {
601
+ this.endpoint.loadSession();
602
+ if (!this.endpoint.session) {
603
+ console.log('[TEMPLATES] Must be authenticated');
604
+ return;
605
+ }
606
+ return this.queryTemplates();
607
+ }
608
+ async queryTemplates() {
79
609
  var _a, _b, _c;
80
610
  try {
81
611
  this.endpoint.loadSession();
82
612
  if (!this.endpoint.session) {
83
- console.log('[ENVELOPES] Must be authenticated');
613
+ console.log('[TEMPLATES] Must be authenticated');
84
614
  return;
85
615
  }
86
616
  let queryParams = {
87
- page: this.page,
617
+ page: this.selectedPage,
88
618
  ascending: this.sort === 'name' || this.sort === 'star_counter',
89
619
  sort_by: this.sort,
90
620
  };
@@ -93,20 +623,20 @@ const VerdocsTemplatesList = class {
93
623
  queryParams.is_public = this.sharing === 'public';
94
624
  }
95
625
  if (this.starred !== 'all') {
96
- // TODO: Update the js-sdk type
97
- queryParams['is_starred'] = this.starred === 'starred';
626
+ queryParams.is_starred = this.starred === 'starred';
98
627
  }
99
628
  if (this.name.trim() !== '') {
100
629
  queryParams.name = this.name.trim();
101
630
  }
631
+ console.log('qp', queryParams, this.name);
102
632
  const response = await Templates.getSummary(this.endpoint, queryParams);
103
- console.log('[TEMPLATES] Got envelopes', response);
633
+ console.log('[TEMPLATES] Got templates', response);
104
634
  this.templates = response.result;
105
635
  this.count = response.total;
106
636
  this.loading = false;
107
637
  }
108
638
  catch (e) {
109
- console.log('[ENVELOPES] Error with preview session', e);
639
+ console.log('[TEMPLATES] Error with preview session', e);
110
640
  (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new errors.SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
111
641
  }
112
642
  }
@@ -130,15 +660,35 @@ const VerdocsTemplatesList = class {
130
660
  // return hasPermission && canPreview;
131
661
  return hasPermission;
132
662
  }
663
+ deleteTemplate(template) {
664
+ this.confirmDelete = null;
665
+ Templates.deleteTemplate(this.endpoint, template.id)
666
+ .then(() => {
667
+ var _a;
668
+ console.log('[TEMPLATES] Deleted template', template);
669
+ (_a = this.templateDeleted) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: template });
670
+ return this.queryTemplates();
671
+ })
672
+ .catch(e => {
673
+ var _a, _b, _c;
674
+ console.log('[TEMPLATES] Error deleting template', template);
675
+ (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new errors.SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
676
+ });
677
+ }
133
678
  render() {
134
- if (this.loading) {
135
- return (index.h(index.Host, { style: { minHeight: '300px' } }, index.h("verdocs-loader", null)));
136
- }
137
- return (index.h(index.Host, null, index.h("div", { class: "header" }, index.h("div", { class: "filter" }, index.h("verdocs-text-input", { id: "verdocs-filter-name", value: this.name, autocomplete: "off", placeholder: "Filter by Name...", onInput: (e) => {
679
+ return (index$1.h(index$1.Host, null, index$1.h("div", { class: "header" }, index$1.h("div", { class: "filter" }, index$1.h("verdocs-text-input", { id: "verdocs-filter-name", value: this.name, autocomplete: "off", placeholder: "Filter by Name...", onFocusout: (e) => {
138
680
  this.name = e.target.value;
139
- } })), index.h("div", { class: "flex flex-row gap-3 items-center" }, index.h("div", { class: "filter" }, index.h("verdocs-text-input", { id: "verdocs-filter-containing", value: this.containing, autocomplete: "off", placeholder: "Fields Containing...", onInput: (e) => {
140
- this.containing = e.target.value;
141
- } }))), index.h("div", { class: "flex flex-1" })), this.templates.slice(0, this.items || 100).map(summary => {
681
+ return this.queryTemplates();
682
+ } })), index$1.h("verdocs-quick-filter", { label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
683
+ this.sharing = e.detail.value;
684
+ return this.queryTemplates();
685
+ } }), index$1.h("verdocs-quick-filter", { label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
686
+ this.starred = e.detail.value;
687
+ return this.queryTemplates();
688
+ } }), index$1.h("verdocs-quick-filter", { label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
689
+ this.sort = e.detail.value;
690
+ return this.queryTemplates();
691
+ } }), this.loading && index$1.h("verdocs-spinner", { mode: "dark", size: 24 }), index$1.h("div", { style: { display: 'flex', flex: '1' } })), this.templates.map(summary => {
142
692
  const MENU_OPTIONS = [
143
693
  // [disabled]="!canSendEnvelope"
144
694
  { label: 'Preview / Send', id: 'createdoc', disabled: !this.canPreview(summary) },
@@ -154,80 +704,14 @@ const VerdocsTemplatesList = class {
154
704
  { label: 'Edit', id: 'edit', disabled: !this.canEdit(summary) },
155
705
  { label: 'Delete', id: 'delete', disabled: !this.canDelete(summary) },
156
706
  ];
157
- return (index.h("div", { class: "template", onClick: () => { } }, index.h("span", { innerHTML: TemplateIcon }), index.h("div", { class: "name" }, summary.name), index.h("div", { class: "spacer" }), index.h("div", { style: { marginTop: '12px' } }, index.h("verdocs-dropdown", { options: MENU_OPTIONS, onOptionSelected: e => this.handleOptionSelected(e.detail.id, summary) })))
158
- //
159
- // <div class="envelope" key={envelope.id} onClick={() => this.viewEnvelope?.emit({endpoint: this.endpoint, envelope})}>
160
- // <div class="inner">
161
- // <verdocs-checkbox
162
- // checked={this.selectedEnvelopes.findIndex(e => e.id === envelope.id) !== -1}
163
- // onClick={e => e.stopPropagation()} // So this doesn't trigger navigation
164
- // onInput={(e: any) => {
165
- // if (e.target.checked) {
166
- // this.selectedEnvelopes = [...this.selectedEnvelopes, envelope];
167
- // } else {
168
- // this.selectedEnvelopes = this.selectedEnvelopes.filter(e => e.id !== envelope.id);
169
- // }
170
- // }}
171
- // />
172
- //
173
- // <div class="vert-spacer" />
174
- //
175
- // <span innerHTML={DocumentIcon} />
176
- //
177
- // <div class="envelope-name">
178
- // {envelope.name}:&nbsp; <div class="envelope-recipients">{envelope.recipients.map(r => r.full_name).join(', ')}</div>
179
- // </div>
180
- //
181
- // <div class="vert-spacer" />
182
- //
183
- // <verdocs-status-indicator envelope={envelope} style={{width: '125px'}} />
184
- //
185
- // <div class="vert-spacer" />
186
- //
187
- // <div class="last-modified">{new Date(envelope.updated_at).toLocaleString()}</div>
188
- //
189
- // <div class="vert-spacer" />
190
- //
191
- // <verdocs-dropdown
192
- // options={[
193
- // {label: 'View Envelope', id: 'view'},
194
- // {label: 'Finish Envelope', id: 'finish', disabled: !userCanFinish},
195
- // {label: 'Download', id: 'download'},
196
- // {label: 'Cancel', id: 'cancel', disabled: !userCanCancel},
197
- // ]}
198
- // onOptionSelected={e => {
199
- // switch (e.detail.id) {
200
- // case 'view':
201
- // this.viewEnvelope?.emit({endpoint: this.endpoint, envelope});
202
- // break;
203
- // case 'finish':
204
- // this.finishLater?.emit({endpoint: this.endpoint, envelope});
205
- // break;
206
- // case 'download':
207
- // this.downloadEnvelope(envelope);
208
- // break;
209
- // case 'cancel':
210
- // if (window.confirm('Are you sure you want to cancel this envelope?')) {
211
- // cancelEnvelope(this.endpoint, envelope.id)
212
- // .then(r => {
213
- // console.log('Cancel result', r);
214
- // VerdocsToast('Envelope canceled');
215
- // })
216
- // .catch(e => {
217
- // console.log('cxl error', e);
218
- // VerdocsToast('Unable to cancel envelope: ' + e.messabge, {style: 'error'});
219
- // });
220
- // }
221
- // break;
222
- // }
223
- // }}
224
- // />
225
- // </div>
226
- // </div>
227
- );
228
- }), !this.templates.length ? (index.h("div", { class: "mt-4 border-2 px-20 py-20 text-center" }, "No matching templates found. Please adjust your filters and try again.")) : (index.h("div", null)
229
- // <Pagination page={this.page} total={this.count} onSelectPage={setPage} />
230
- )));
707
+ return (index$1.h("div", { class: "template", onClick: () => {
708
+ var _a;
709
+ (_a = this.viewTemplate) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: summary });
710
+ } }, index$1.h("div", { class: "inner" }, index$1.h("verdocs-template-star", { template: summary, endpoint: this.endpoint }), index$1.h("div", { class: "spacer icon-spacer" }), index$1.h("span", { innerHTML: TemplateIcon }), index$1.h("div", { class: "name" }, summary.name), index$1.h("div", { class: "spacer usage-spacer" }), index$1.h("div", { class: "usage" }, index$1.h("span", { innerHTML: EnvelopeIcon }), summary.counter || '--'), index$1.h("div", { class: "spacer last-used-spacer" }), index$1.h("div", { class: "last-used" }, index$1.h("span", { innerHTML: CalendarIcon }), index$1.h("span", { style: { marginRight: '5px' } }, "Last Used:"), summary.last_used_at ? formatDistance(new Date(summary.last_used_at), new Date()) : 'Never'), index$1.h("div", { class: "spacer ownership-spacer" }), summary.is_public && (index$1.h("div", { class: "ownership" }, index$1.h("span", { innerHTML: GlobeAltIcon }), " Public")), !summary.is_public && !summary.is_personal && (index$1.h("div", { class: "ownership" }, index$1.h("span", { innerHTML: LockClosedIcon }), " Private")), !summary.is_public && summary.is_personal && (index$1.h("div", { class: "ownership" }, index$1.h("span", { innerHTML: BuildingOfficeIcon }), " Shared")), index$1.h("verdocs-dropdown", { options: MENU_OPTIONS, onOptionSelected: e => this.handleOptionSelected(e.detail.id, summary) }))));
711
+ }), !this.templates.length ? (index$1.h("div", { class: "empty-text" }, "No matching templates found. Please adjust your filters and try again.")) : (index$1.h("div", { style: { marginTop: '10px' } }, index$1.h("verdocs-pagination", { selectedPage: this.selectedPage, perPage: 10, itemCount: this.count, onSelectPage: e => {
712
+ this.selectedPage = e.detail.selectedPage;
713
+ return this.queryTemplates();
714
+ } }))), this.confirmDelete && (index$1.h("verdocs-ok-dialog", { heading: "Delete this Template?", message: "This operation cannot be undone.", onNext: () => this.deleteTemplate(this.confirmDelete), onExit: () => (this.confirmDelete = null), showCancel: true }))));
231
715
  }
232
716
  };
233
717
  VerdocsTemplatesList.style = verdocsTemplatesListCss;