@verdocs/web-sdk 2.0.14 → 2.0.15

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 (260) hide show
  1. package/dist/cjs/{TemplateStore-07e274ab.js → TemplateStore-4041d8af.js} +1 -1
  2. package/dist/cjs/{VerdocsEndpoint-2ff96f90.js → VerdocsEndpoint-45deeb6a.js} +2 -87
  3. package/dist/cjs/ipc-test.cjs.entry.js +37 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  8. package/dist/cjs/{verdocs-button-panel_3.cjs.entry.js → verdocs-button-panel_2.cjs.entry.js} +2 -19
  9. package/dist/cjs/{verdocs-checkbox_4.cjs.entry.js → verdocs-checkbox_5.cjs.entry.js} +17 -0
  10. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-preview.cjs.entry.js +2 -2
  19. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  20. package/dist/cjs/verdocs-radio-button.cjs.entry.js +23 -0
  21. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
  23. package/dist/cjs/verdocs-sign.cjs.entry.js +4 -2
  24. package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +236 -0
  25. package/dist/cjs/{verdocs-template-document-page.cjs.entry.js → verdocs-template-document-page_2.cjs.entry.js} +46 -1
  26. package/dist/cjs/{verdocs-template-attachments_4.cjs.entry.js → verdocs-template-fields_4.cjs.entry.js} +239 -230
  27. package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
  28. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
  29. package/dist/cjs/verdocs-template-star.cjs.entry.js +2 -2
  30. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
  31. package/dist/cjs/verdocs-templates-list.cjs.entry.js +42 -50
  32. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  33. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  34. package/dist/collection/collection-manifest.json +1 -0
  35. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +3 -1
  36. package/dist/collection/components/other/ipctest/ipc-test.css +4 -0
  37. package/dist/collection/components/other/ipctest/ipc-test.js +79 -0
  38. package/dist/collection/components/other/ipctest/ipc-test.stories.js +8 -0
  39. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
  40. package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.css +7 -1
  41. package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +128 -53
  42. package/dist/components/TemplateStore.js +1 -1
  43. package/dist/components/VerdocsEndpoint.js +1 -85
  44. package/dist/components/index.d.ts +1 -0
  45. package/dist/components/index.js +1 -0
  46. package/dist/components/ipc-test.d.ts +11 -0
  47. package/dist/components/ipc-test.js +142 -0
  48. package/dist/components/verdocs-sign.js +3 -1
  49. package/dist/components/verdocs-template-role-properties2.js +1 -1
  50. package/dist/components/verdocs-template-roles2.js +1 -1
  51. package/dist/components/verdocs-template-sender2.js +1 -1
  52. package/dist/components/verdocs-template-star2.js +1 -1
  53. package/dist/components/verdocs-templates-list.js +46 -51
  54. package/dist/docs.json +157 -4
  55. package/dist/esm/{TemplateStore-17700116.js → TemplateStore-01a9d18f.js} +1 -1
  56. package/dist/esm/{VerdocsEndpoint-e447b318.js → VerdocsEndpoint-d58d5544.js} +1 -85
  57. package/dist/esm/ipc-test.entry.js +33 -0
  58. package/dist/esm/loader.js +1 -1
  59. package/dist/esm/{utils-28ea5af7.js → utils-6412577d.js} +1 -1
  60. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  61. package/dist/esm/verdocs-auth.entry.js +1 -1
  62. package/dist/esm/verdocs-build.entry.js +2 -2
  63. package/dist/esm/{verdocs-button-panel_3.entry.js → verdocs-button-panel_2.entry.js} +3 -19
  64. package/dist/esm/{verdocs-checkbox_4.entry.js → verdocs-checkbox_5.entry.js} +17 -1
  65. package/dist/esm/verdocs-contact-picker.entry.js +2 -2
  66. package/dist/esm/verdocs-envelope-document-page.entry.js +2 -2
  67. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  68. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  69. package/dist/esm/verdocs-envelopes-list.entry.js +2 -2
  70. package/dist/esm/verdocs-field-checkbox.entry.js +1 -1
  71. package/dist/esm/verdocs-field-date.entry.js +1 -1
  72. package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
  73. package/dist/esm/verdocs-field-initial.entry.js +1 -1
  74. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  75. package/dist/esm/verdocs-field-radio-button.entry.js +1 -1
  76. package/dist/esm/verdocs-field-signature.entry.js +1 -1
  77. package/dist/esm/verdocs-field-textarea.entry.js +2 -2
  78. package/dist/esm/verdocs-field-textbox.entry.js +2 -2
  79. package/dist/esm/verdocs-field-timestamp.entry.js +1 -1
  80. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  81. package/dist/esm/verdocs-pagination_3.entry.js +1 -1
  82. package/dist/esm/verdocs-preview.entry.js +3 -3
  83. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  84. package/dist/esm/verdocs-radio-button.entry.js +19 -0
  85. package/dist/esm/verdocs-search.entry.js +1 -1
  86. package/dist/esm/verdocs-send.entry.js +3 -3
  87. package/dist/esm/verdocs-sign.entry.js +5 -3
  88. package/dist/esm/verdocs-template-attachments_2.entry.js +231 -0
  89. package/dist/esm/{verdocs-template-document-page.entry.js → verdocs-template-document-page_2.entry.js} +47 -3
  90. package/dist/esm/{verdocs-template-attachments_4.entry.js → verdocs-template-fields_4.entry.js} +237 -228
  91. package/dist/esm/verdocs-template-name.entry.js +2 -2
  92. package/dist/esm/verdocs-template-reminders.entry.js +2 -2
  93. package/dist/esm/verdocs-template-star.entry.js +2 -2
  94. package/dist/esm/verdocs-template-visibility.entry.js +2 -2
  95. package/dist/esm/verdocs-templates-list.entry.js +42 -50
  96. package/dist/esm/verdocs-view.entry.js +2 -2
  97. package/dist/esm/verdocs-web-sdk.js +1 -1
  98. package/dist/esm-es5/{TemplateStore-17700116.js → TemplateStore-01a9d18f.js} +1 -1
  99. package/dist/esm-es5/VerdocsEndpoint-d58d5544.js +1 -0
  100. package/dist/esm-es5/ipc-test.entry.js +1 -0
  101. package/dist/esm-es5/loader.js +1 -1
  102. package/dist/esm-es5/{utils-28ea5af7.js → utils-6412577d.js} +1 -1
  103. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  104. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  105. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  106. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -0
  107. package/dist/esm-es5/{verdocs-checkbox_4.entry.js → verdocs-checkbox_5.entry.js} +1 -1
  108. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  127. package/dist/esm-es5/verdocs-radio-button.entry.js +1 -0
  128. package/dist/esm-es5/verdocs-search.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-template-attachments_2.entry.js +1 -0
  132. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -0
  133. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -0
  134. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  135. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  136. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  137. package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
  138. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  139. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  140. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  141. package/dist/types/components/other/ipctest/ipc-test.d.ts +17 -0
  142. package/dist/types/components/other/ipctest/ipc-test.stories.d.ts +4 -0
  143. package/dist/types/components/templates/verdocs-templates-list/verdocs-templates-list.d.ts +32 -17
  144. package/dist/types/components.d.ts +53 -0
  145. package/dist/verdocs-web-sdk/{p-4ea9eedc.entry.js → p-07dac402.entry.js} +1 -1
  146. package/dist/verdocs-web-sdk/{p-6c181a99.system.entry.js → p-07ec8b75.system.entry.js} +1 -1
  147. package/dist/verdocs-web-sdk/{p-153b3888.entry.js → p-088f106d.entry.js} +1 -1
  148. package/dist/verdocs-web-sdk/{p-f0f8c91a.entry.js → p-10b88811.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-4e335343.system.js → p-13b3dd46.system.js} +1 -1
  150. package/dist/verdocs-web-sdk/{p-b7764fbf.entry.js → p-17d27ba8.entry.js} +1 -1
  151. package/dist/verdocs-web-sdk/{p-db748ddf.entry.js → p-1fea7a7e.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-6b37e85a.system.entry.js → p-25332568.system.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/{p-41a34c27.system.entry.js → p-27c654c5.system.entry.js} +1 -1
  154. package/dist/verdocs-web-sdk/{p-57e55966.system.entry.js → p-2a969dc8.system.entry.js} +1 -1
  155. package/dist/verdocs-web-sdk/{p-05b23b9a.system.entry.js → p-2dc36f82.system.entry.js} +1 -1
  156. package/dist/verdocs-web-sdk/{p-6ef5c42f.system.entry.js → p-31aea61d.system.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/{p-d5eea358.entry.js → p-3a0ba0b8.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-669b845b.system.entry.js → p-3aac3218.system.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/p-3b1bef0f.system.entry.js +1 -0
  160. package/dist/verdocs-web-sdk/{p-55cd3b39.entry.js → p-3c3664ab.entry.js} +1 -1
  161. package/dist/verdocs-web-sdk/p-3dcf8e41.entry.js +1 -0
  162. package/dist/verdocs-web-sdk/{p-ff71a7ed.system.entry.js → p-400a996a.system.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/p-4422958b.system.js +1 -0
  164. package/dist/verdocs-web-sdk/{p-59e55e05.entry.js → p-453bb85d.entry.js} +1 -1
  165. package/dist/verdocs-web-sdk/{p-9d097bc8.system.entry.js → p-460d2320.system.entry.js} +1 -1
  166. package/dist/verdocs-web-sdk/{p-316e6f16.entry.js → p-47dd8143.entry.js} +1 -1
  167. package/dist/verdocs-web-sdk/{p-977dceb3.system.entry.js → p-4a4b097e.system.entry.js} +1 -1
  168. package/dist/verdocs-web-sdk/p-4dc8cc71.system.entry.js +1 -0
  169. package/dist/verdocs-web-sdk/{p-51f09ff0.system.entry.js → p-4edec688.system.entry.js} +1 -1
  170. package/dist/verdocs-web-sdk/p-5080cdfc.entry.js +1 -0
  171. package/dist/verdocs-web-sdk/p-54849116.entry.js +1 -0
  172. package/dist/verdocs-web-sdk/{p-0bda34c0.js → p-55af2ceb.js} +1 -1
  173. package/dist/verdocs-web-sdk/{p-b6c642af.system.entry.js → p-5cae759a.system.entry.js} +1 -1
  174. package/dist/verdocs-web-sdk/p-647cdb84.system.js +1 -1
  175. package/dist/verdocs-web-sdk/{p-ef3df424.system.entry.js → p-657dacc4.system.entry.js} +1 -1
  176. package/dist/verdocs-web-sdk/{p-c97a7232.system.js → p-6d2082b7.system.js} +1 -1
  177. package/dist/verdocs-web-sdk/{p-fa7332f2.system.entry.js → p-7297edd7.system.entry.js} +1 -1
  178. package/dist/verdocs-web-sdk/{p-2ca89535.entry.js → p-755e75c1.entry.js} +1 -1
  179. package/dist/verdocs-web-sdk/{p-66c250cd.entry.js → p-75da0854.entry.js} +1 -1
  180. package/dist/verdocs-web-sdk/p-766f8b54.system.entry.js +1 -0
  181. package/dist/verdocs-web-sdk/{p-75559986.entry.js → p-7bc548bf.entry.js} +1 -1
  182. package/dist/verdocs-web-sdk/{p-2a5678aa.entry.js → p-8638bd27.entry.js} +1 -1
  183. package/dist/verdocs-web-sdk/{p-d4550712.system.entry.js → p-87cf940c.system.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/{p-cd4d7848.entry.js → p-887d13dd.entry.js} +1 -1
  185. package/dist/verdocs-web-sdk/p-8c4fa7fc.entry.js +1 -0
  186. package/dist/verdocs-web-sdk/{p-a6626ecf.system.entry.js → p-8f370d3a.system.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/{p-065babe0.system.entry.js → p-8fc9f797.system.entry.js} +1 -1
  188. package/dist/verdocs-web-sdk/{p-54654ee0.system.entry.js → p-8fdcf4a9.system.entry.js} +1 -1
  189. package/dist/verdocs-web-sdk/{p-53cec4e6.entry.js → p-9176b478.entry.js} +1 -1
  190. package/dist/verdocs-web-sdk/p-a5ce9047.system.entry.js +1 -0
  191. package/dist/verdocs-web-sdk/{p-13135b13.system.entry.js → p-a7013467.system.entry.js} +1 -1
  192. package/dist/verdocs-web-sdk/{p-36995020.entry.js → p-ac1e8dfe.entry.js} +1 -1
  193. package/dist/verdocs-web-sdk/p-af048fad.js +1 -0
  194. package/dist/verdocs-web-sdk/{p-a3e2f68f.system.entry.js → p-b394b580.system.entry.js} +1 -1
  195. package/dist/verdocs-web-sdk/{p-e0379271.entry.js → p-b3bb3dbd.entry.js} +1 -1
  196. package/dist/verdocs-web-sdk/{p-789424cb.system.entry.js → p-b41338e5.system.entry.js} +1 -1
  197. package/dist/verdocs-web-sdk/p-b49e1610.entry.js +1 -0
  198. package/dist/verdocs-web-sdk/{p-3495a410.entry.js → p-b4dee4ca.entry.js} +1 -1
  199. package/dist/verdocs-web-sdk/{p-0e5108f1.system.entry.js → p-b6c70f34.system.entry.js} +1 -1
  200. package/dist/verdocs-web-sdk/p-b987bad4.system.entry.js +1 -0
  201. package/dist/verdocs-web-sdk/{p-520faa8e.entry.js → p-ba5565d4.entry.js} +1 -1
  202. package/dist/verdocs-web-sdk/p-bc943a21.entry.js +1 -0
  203. package/dist/verdocs-web-sdk/p-c23359af.system.entry.js +1 -0
  204. package/dist/verdocs-web-sdk/{p-f6b176b1.system.entry.js → p-c68cec17.system.entry.js} +1 -1
  205. package/dist/verdocs-web-sdk/p-c8d0324d.system.entry.js +1 -0
  206. package/dist/verdocs-web-sdk/{p-bdea2ff9.entry.js → p-c98bb9f4.entry.js} +1 -1
  207. package/dist/verdocs-web-sdk/{p-8d0d4e0c.system.entry.js → p-c9a691bf.system.entry.js} +1 -1
  208. package/dist/verdocs-web-sdk/{p-66d71204.entry.js → p-ccc162ab.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/{p-2db70c48.system.entry.js → p-cfb617a2.system.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/{p-0d5757a8.entry.js → p-cfdd1d5b.entry.js} +1 -1
  211. package/dist/verdocs-web-sdk/{p-b9535c18.entry.js → p-d145cb63.entry.js} +1 -1
  212. package/dist/verdocs-web-sdk/{p-72127c91.entry.js → p-d20e83c7.entry.js} +1 -1
  213. package/dist/verdocs-web-sdk/p-d6941876.entry.js +1 -0
  214. package/dist/verdocs-web-sdk/{p-0c85ee4f.system.entry.js → p-d7e29ce9.system.entry.js} +1 -1
  215. package/dist/verdocs-web-sdk/{p-546de38b.entry.js → p-dca1d739.entry.js} +1 -1
  216. package/dist/verdocs-web-sdk/{p-d5c9930b.entry.js → p-e01dd4e1.entry.js} +1 -1
  217. package/dist/verdocs-web-sdk/{p-672ed964.system.entry.js → p-e9200468.system.entry.js} +1 -1
  218. package/dist/verdocs-web-sdk/{p-23414209.system.entry.js → p-ea87070d.system.entry.js} +1 -1
  219. package/dist/verdocs-web-sdk/{p-9606946c.entry.js → p-ebe13a66.entry.js} +1 -1
  220. package/dist/verdocs-web-sdk/{p-90a11750.entry.js → p-ecf9aa75.entry.js} +1 -1
  221. package/dist/verdocs-web-sdk/{p-febca9d8.entry.js → p-f164307e.entry.js} +1 -1
  222. package/dist/verdocs-web-sdk/{p-74f5031e.entry.js → p-f2057d6b.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/{p-316909a7.system.entry.js → p-f57124fd.system.entry.js} +1 -1
  224. package/dist/verdocs-web-sdk/{p-7254de25.system.entry.js → p-f8940081.system.entry.js} +1 -1
  225. package/dist/verdocs-web-sdk/{p-80ead6ca.system.entry.js → p-fac26def.system.entry.js} +1 -1
  226. package/dist/verdocs-web-sdk/{p-09546ab7.js → p-fc6ce0d8.js} +1 -1
  227. package/dist/verdocs-web-sdk/p-fea16530.entry.js +1 -0
  228. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  229. package/package.json +1 -1
  230. package/dist/cjs/Roles-9b593b95.js +0 -28
  231. package/dist/cjs/verdocs-radio-button_3.cjs.entry.js +0 -241
  232. package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +0 -51
  233. package/dist/custom-elements.json +0 -1898
  234. package/dist/esm/Roles-6eb459df.js +0 -24
  235. package/dist/esm/verdocs-radio-button_3.entry.js +0 -235
  236. package/dist/esm/verdocs-toolbar-icon.entry.js +0 -47
  237. package/dist/esm-es5/Roles-6eb459df.js +0 -1
  238. package/dist/esm-es5/VerdocsEndpoint-e447b318.js +0 -1
  239. package/dist/esm-es5/verdocs-button-panel_3.entry.js +0 -1
  240. package/dist/esm-es5/verdocs-radio-button_3.entry.js +0 -1
  241. package/dist/esm-es5/verdocs-template-attachments_4.entry.js +0 -1
  242. package/dist/esm-es5/verdocs-template-document-page.entry.js +0 -1
  243. package/dist/esm-es5/verdocs-toolbar-icon.entry.js +0 -1
  244. package/dist/verdocs-web-sdk/p-0a86db90.system.entry.js +0 -1
  245. package/dist/verdocs-web-sdk/p-2960c946.entry.js +0 -1
  246. package/dist/verdocs-web-sdk/p-363b3a93.system.entry.js +0 -1
  247. package/dist/verdocs-web-sdk/p-56c6e677.entry.js +0 -1
  248. package/dist/verdocs-web-sdk/p-5a06c069.entry.js +0 -1
  249. package/dist/verdocs-web-sdk/p-633926d8.entry.js +0 -1
  250. package/dist/verdocs-web-sdk/p-8027431e.js +0 -1
  251. package/dist/verdocs-web-sdk/p-8229e6df.system.js +0 -1
  252. package/dist/verdocs-web-sdk/p-9f6d6545.system.entry.js +0 -1
  253. package/dist/verdocs-web-sdk/p-a3820b2c.entry.js +0 -1
  254. package/dist/verdocs-web-sdk/p-a9f25162.entry.js +0 -1
  255. package/dist/verdocs-web-sdk/p-aadfc04d.system.entry.js +0 -1
  256. package/dist/verdocs-web-sdk/p-b2d8c147.system.entry.js +0 -1
  257. package/dist/verdocs-web-sdk/p-d808a494.system.js +0 -1
  258. package/dist/verdocs-web-sdk/p-e06d9588.js +0 -1
  259. package/dist/verdocs-web-sdk/p-f3ac446d.system.entry.js +0 -1
  260. package/dist/verdocs-web-sdk/p-fdf8bc45.entry.js +0 -1
@@ -3,245 +3,45 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1d5fc518.js');
6
- require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-2ff96f90.js');
8
- const TemplateDocuments = require('./TemplateDocuments-e2e0e6b7.js');
9
- const Icons = require('./Icons-a11fb3fc.js');
10
- const TemplateStore = require('./TemplateStore-07e274ab.js');
11
- const errors = require('./errors-0396da3d.js');
12
- const Templates = require('./Templates-f6e75719.js');
13
6
  const interact_min = require('./interact.min-ba5cc513.js');
7
+ require('./Types-f89f9116.js');
8
+ const VerdocsEndpoint = require('./VerdocsEndpoint-45deeb6a.js');
14
9
  const Fields = require('./Fields-705a2168.js');
15
10
  const Primitives = require('./Primitives-be5088cb.js');
16
11
  const utils = require('./utils-ae9b4e3e.js');
17
- const Roles = require('./Roles-9b593b95.js');
12
+ const TemplateStore = require('./TemplateStore-4041d8af.js');
13
+ const errors = require('./errors-0396da3d.js');
18
14
  const Colors = require('./Colors-e809dcc9.js');
19
- require('./index-f664e4d0.js');
15
+ const Templates = require('./Templates-f6e75719.js');
20
16
  require('./_commonjsHelpers-0c557e26.js');
21
17
  require('./Envelopes-dba86ae4.js');
22
18
  require('./Files-4bdc0c0f.js');
23
19
  require('./Types-ee5afdf8.js');
24
20
  require('./index-7c19ba1d.js');
21
+ require('./index-f664e4d0.js');
25
22
 
26
- const verdocsTemplateAttachmentsCss = "verdocs-template-attachments{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}";
27
-
28
- const VerdocsTemplateAttachments = class {
29
- constructor(hostRef) {
30
- index.registerInstance(this, hostRef);
31
- this.exit = index.createEvent(this, "exit", 7);
32
- this.next = index.createEvent(this, "next", 7);
33
- this.templateUpdate = index.createEvent(this, "templateUpdate", 7);
34
- this.sdkError = index.createEvent(this, "sdkError", 7);
35
- this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
36
- this.templateId = '';
37
- this.uploading = false;
38
- this.progressLabel = 'Uploading...';
39
- this.progressPercent = 0;
40
- this.showDeleteError = false;
41
- this.confirmDeleteDocument = null;
42
- this.store = null;
43
- }
44
- async componentWillLoad() {
45
- var _a, _b, _c;
46
- try {
47
- this.endpoint.loadSession();
48
- if (!this.templateId) {
49
- console.log(`[ROLES] Missing required template ID ${this.templateId}`);
50
- return;
51
- }
52
- if (!this.endpoint.session) {
53
- console.log('[ROLES] Unable to start builder session, must be authenticated');
54
- return;
55
- }
56
- this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, false);
57
- }
58
- catch (e) {
59
- console.log('[TEMPLATE ATTACHMENTS] Error loading template', e);
60
- (_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));
61
- }
62
- }
63
- handleCancel(e) {
64
- e.stopPropagation();
65
- this.exit.emit();
66
- }
67
- handleUploadProgress(percent) {
68
- if (percent >= 99) {
69
- this.progressPercent = 100;
70
- this.progressLabel = 'Processing...';
71
- }
72
- else {
73
- this.progressPercent = percent;
74
- }
75
- }
76
- async handleUpload(e) {
77
- var _a, _b, _c;
78
- e.stopPropagation();
79
- const file = e.detail.file;
80
- if (!file) {
81
- return;
82
- }
83
- console.log('[ATTACHMENTS] Uploading...', file);
84
- this.uploading = true;
85
- this.progressLabel = 'Uploading...';
86
- try {
87
- const template = await TemplateDocuments.createTemplateDocument(this.endpoint, this.templateId, file, this.handleUploadProgress.bind(this));
88
- console.log('[ATTACHMENTS] Created attachment', template);
89
- this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
90
- console.log('[ATTACHMENTS] New template', this.store.state);
91
- this.uploading = false;
92
- this.progressLabel = '';
93
- this.progressPercent = 0;
94
- }
95
- catch (e) {
96
- console.log('[ATTACHMENTS] Error creating template', e);
97
- (_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));
98
- this.uploading = false;
99
- }
100
- }
101
- handleNext(e) {
102
- var _a;
103
- e.stopPropagation();
104
- this.uploading = false;
105
- this.progressLabel = '';
106
- this.progressPercent = 0;
107
- (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ template: this.store.state });
108
- }
109
- async confirmDelete() {
110
- await TemplateDocuments.deleteTemplateDocument(this.endpoint, this.templateId, this.confirmDeleteDocument.id);
111
- this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
112
- console.log('[ATTACHMENTS] New template', this.store.state);
113
- this.confirmDeleteDocument = null;
114
- }
115
- async handleDelete(document) {
116
- var _a;
117
- if (((_a = this.store.state) === null || _a === void 0 ? void 0 : _a.template_documents.length) > 1) {
118
- this.confirmDeleteDocument = document;
119
- }
120
- else {
121
- this.showDeleteError = true;
122
- }
123
- }
124
- getFileIcon(document) {
125
- switch (document.mime) {
126
- case 'application/pdf':
127
- return Icons.PdfIcon;
128
- case 'image/jpeg':
129
- return Icons.JpgIcon;
130
- case 'image/png':
131
- return Icons.PngIcon;
132
- case 'application/msword':
133
- case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
134
- return Icons.DocIcon;
135
- }
136
- return Icons.FileIcon;
137
- }
138
- render() {
139
- var _a, _b, _c;
140
- if (!this.endpoint.session) {
141
- return (index.h(index.Host, null, index.h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
142
- }
143
- const templateState = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state;
144
- if (!templateState.isLoaded) {
145
- return (index.h(index.Host, { class: "loading" }, index.h("verdocs-loader", null)));
146
- }
147
- // This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
148
- if (!this.endpoint.session || !templateState.profile_id) {
149
- return index.h(index.Host, { class: "empty" });
150
- }
151
- return (index.h(index.Host, null, index.h("h5", null, "Existing Attachments"), index.h("div", { class: "attachments" }, (_b = this.store) === null || _b === void 0 ? void 0 : _b.state.template_documents.map(document => (index.h("div", { class: "attachment" }, index.h("div", { class: "file-icon", innerHTML: this.getFileIcon(document) }), index.h("div", { class: "filename", title: document.name }, document.name), index.h("div", { class: "pages" }, index.h("div", { class: "count" }, document.page_numbers), index.h("div", { class: "pages-icon", innerHTML: Icons.PageCountIcon })), index.h("div", { class: "trash-icon", innerHTML: Icons.TrashIcon, onClick: () => this.handleDelete(document) }))))), index.h("h5", null, "Attach a New Document"), this.uploading ? (index.h("div", { class: "loader-wrapper" }, index.h("verdocs-loader", null), this.progressLabel && (index.h("div", { class: "progress-wrapper" }, index.h("verdocs-progress-bar", { showPercent: true, percent: this.progressPercent, label: this.progressLabel }))))) : (index.h("verdocs-file-chooser", { onFileSelected: e => this.handleUpload(e) })), index.h("div", { class: "buttons" }, index.h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e), disabled: this.uploading }), index.h("verdocs-button", { label: "Next", size: "small", onClick: e => this.handleNext(e), disabled: !((_c = this.store) === null || _c === void 0 ? void 0 : _c.state.template_documents.length) || this.uploading })), this.showDeleteError && (index.h("verdocs-ok-dialog", { heading: "Unable to Delete Attachment", message: "Templates must contain at least one attachment.", onNext: () => (this.showDeleteError = false) })), this.confirmDeleteDocument && (index.h("verdocs-ok-dialog", { heading: "Delete this Attachment?", message: "This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.", onNext: () => this.confirmDelete(), showCancel: true, onExit: () => {
152
- this.confirmDeleteDocument = null;
153
- } }))));
154
- }
23
+ /**
24
+ * A "role" is an individual participant in a signing flow, such as a signer or CC contact. Roles are identified by
25
+ * their names, which must be unique (e.g. 'Recipient 1'). Template fields are assigned to roles for signing operations,
26
+ * so you may have 'Recipient 1 Signature 1' and so forth.
27
+ *
28
+ * @module
29
+ */
30
+ var createRole = function (endpoint, templateId, params) {
31
+ return endpoint.api //
32
+ .post("/templates/".concat(templateId, "/roles"), params)
33
+ .then(function (r) { return r.data; });
155
34
  };
156
- VerdocsTemplateAttachments.style = verdocsTemplateAttachmentsCss;
157
-
158
- const verdocsTemplateCreateCss = "verdocs-template-create{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}";
159
-
160
- const unicodeNBSP = ' ';
161
- const FileIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';
162
- const VerdocsTemplateCreate = class {
163
- constructor(hostRef) {
164
- index.registerInstance(this, hostRef);
165
- this.exit = index.createEvent(this, "exit", 7);
166
- this.next = index.createEvent(this, "next", 7);
167
- this.sdkError = index.createEvent(this, "sdkError", 7);
168
- this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
169
- this.file = undefined;
170
- this.creating = false;
171
- this.progressLabel = 'Uploading...';
172
- this.progressPercent = 0;
173
- }
174
- componentWillLoad() {
175
- this.endpoint.setTimeout(30000);
176
- this.endpoint.loadSession();
177
- }
178
- handleFileChanged(e) {
179
- var _a;
180
- this.file = ((_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) || null;
181
- console.log('[CREATE] Selected file', this.file);
182
- // this.filePath = e.target.files?.[0]?.name;
183
- }
184
- handleUpload(e) {
185
- e.stopPropagation();
186
- const fileElem = document.getElementById('verdocs-template-create-file');
187
- fileElem.click();
188
- }
189
- handleCancel(e) {
190
- e.stopPropagation();
191
- this.exit.emit();
192
- }
193
- async handleSubmit(e) {
194
- var _a, _b, _c, _d;
195
- e.stopPropagation();
196
- console.log('Submitting');
197
- // Should be true if we're here because onClick is only enabled then. We're just guarding this for Typescript.
198
- if (!this.file) {
199
- return;
200
- }
201
- this.creating = true;
202
- this.progressLabel = 'Uploading...';
203
- try {
204
- const template = await Templates.createTemplate(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
205
- if (percent >= 99) {
206
- this.progressLabel = 'Processing...';
207
- this.progressPercent = 100;
208
- }
209
- else {
210
- this.progressPercent = percent;
211
- }
212
- });
213
- console.log('[CREATE] Created template', template);
214
- (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit(template);
215
- this.creating = false;
216
- this.progressLabel = '';
217
- this.progressPercent = 0;
218
- }
219
- catch (e) {
220
- console.log('[CREATE] Error creating template', e);
221
- (_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new errors.SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
222
- this.creating = false;
223
- }
224
- }
225
- render() {
226
- if (!this.endpoint.session) {
227
- return (index.h(index.Host, null, index.h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
228
- }
229
- return (index.h(index.Host, null, index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("input", { type: "file", id: "verdocs-template-create-file", multiple: true, accept: "application/pdf", style: { display: 'none' }, onChange: e => this.handleFileChanged(e) }), this.creating ? (index.h("div", { class: "loader-wrapper" }, index.h("verdocs-loader", null), this.progressLabel && (index.h("div", { class: "progress-wrapper" }, index.h("verdocs-progress-bar", { showPercent: true, percent: this.progressPercent, label: this.progressLabel }))))) : (index.h("div", { class: "upload-box", onDrop: (e) => {
230
- e.preventDefault();
231
- e.target.classList.remove('drag-over');
232
- this.file = e.dataTransfer.files[0];
233
- }, onDragOver: (e) => {
234
- e.preventDefault();
235
- e.dataTransfer.dropEffect = 'copy';
236
- }, onDragEnter: (e) => e.target.classList.add('drag-over'), onDragLeave: (e) => e.target.classList.remove('drag-over') }, index.h("div", null, index.h("span", { innerHTML: FileIcon })), index.h("div", { style: { marginTop: '20px', fontSize: '20px', fontWeight: 'bold', overflowWrap: 'anywhere' } }, this.file ? this.file.name : 'Drag a file here'), index.h("div", { style: {
237
- marginTop: '20px',
238
- marginBottom: '20px',
239
- fontSize: '16px',
240
- height: '20px',
241
- } }, this.file ? unicodeNBSP : 'Or, if you prefer...'), index.h("verdocs-button", { label: this.file ? 'Select a different file' : 'Select a file from your computer', size: "small", onClick: e => this.handleUpload(e) }))), index.h("div", { class: "buttons" }, index.h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e), disabled: this.creating }), index.h("verdocs-button", { label: "Next", size: "small", onClick: e => this.handleSubmit(e), disabled: !this.file || this.creating })))));
242
- }
35
+ var updateRole = function (endpoint, templateId, roleName, params) {
36
+ return endpoint.api //
37
+ .put("/templates/".concat(templateId, "/roles/").concat(roleName), params)
38
+ .then(function (r) { return r.data; });
39
+ };
40
+ var deleteRole = function (endpoint, templateId, roleName) {
41
+ return endpoint.api //
42
+ .delete("/templates/".concat(templateId, "/roles/").concat(roleName))
43
+ .then(function (r) { return r.data; });
243
44
  };
244
- VerdocsTemplateCreate.style = verdocsTemplateCreateCss;
245
45
 
246
46
  const verdocsTemplateFieldsCss = "verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio_button_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";
247
47
 
@@ -621,6 +421,149 @@ const VerdocsTemplateFields = class {
621
421
  };
622
422
  VerdocsTemplateFields.style = verdocsTemplateFieldsCss;
623
423
 
424
+ const verdocsTemplateRolePropertiesCss = "verdocs-template-role-properties{font-family:\"Inter\", \"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}";
425
+
426
+ const TrashIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>`;
427
+ const VerdocsTemplateRoleProperties = class {
428
+ constructor(hostRef) {
429
+ index.registerInstance(this, hostRef);
430
+ this.close = index.createEvent(this, "close", 7);
431
+ this.delete = index.createEvent(this, "delete", 7);
432
+ this.sdkError = index.createEvent(this, "sdkError", 7);
433
+ this.store = null;
434
+ this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
435
+ this.templateId = '';
436
+ this.roleName = '';
437
+ this.sender = VerdocsEndpoint.TemplateSenderTypes.EVERYONE;
438
+ this.dirty = false;
439
+ this.saving = false;
440
+ this.name = '';
441
+ this.type = 'signer';
442
+ this.fullName = '';
443
+ this.email = '';
444
+ this.phone = '';
445
+ this.allowDelegation = false;
446
+ }
447
+ async componentWillLoad() {
448
+ var _a, _b, _c, _d, _e;
449
+ try {
450
+ this.endpoint.loadSession();
451
+ if (!this.templateId) {
452
+ console.log(`[ROLE_PROPERTIES] Missing required template ID ${this.templateId}`);
453
+ return;
454
+ }
455
+ if (!this.endpoint.session) {
456
+ console.log('[ROLE_PROPERTIES] Unable to start builder session, must be authenticated');
457
+ return;
458
+ }
459
+ this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, false);
460
+ const editingRole = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.roles.find(role => role.name === this.roleName);
461
+ if (editingRole) {
462
+ this.name = editingRole.name;
463
+ this.type = editingRole.type;
464
+ this.fullName = editingRole.full_name;
465
+ this.email = editingRole.email;
466
+ this.phone = editingRole.phone;
467
+ this.allowDelegation = editingRole.delegator;
468
+ console.log('[ROLES] Editing role', editingRole);
469
+ }
470
+ }
471
+ catch (e) {
472
+ console.log('[TEMPLATE ROLE PROPERTIES] Error with preview session', e);
473
+ (_c = this.sdkError) === null || _c === void 0 ? void 0 : _c.emit(new errors.SDKError(e.message, (_d = e.response) === null || _d === void 0 ? void 0 : _d.status, (_e = e.response) === null || _e === void 0 ? void 0 : _e.data));
474
+ }
475
+ }
476
+ handleCancel(e) {
477
+ var _a, _b, _c;
478
+ e.stopPropagation();
479
+ this.name = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.name;
480
+ this.dirty = false;
481
+ (_c = this.close) === null || _c === void 0 ? void 0 : _c.emit();
482
+ }
483
+ async handleSave(e) {
484
+ e.stopPropagation();
485
+ this.saving = true;
486
+ updateRole(this.endpoint, this.templateId, this.roleName, {
487
+ name: this.name,
488
+ type: this.type,
489
+ full_name: this.fullName,
490
+ email: this.email,
491
+ phone: this.phone,
492
+ delegator: this.allowDelegation,
493
+ })
494
+ .then(async (r) => {
495
+ var _a;
496
+ console.log('[ROLE_PROPERTIES] Update result', r);
497
+ this.saving = false;
498
+ this.dirty = false;
499
+ this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
500
+ // this.sortTemplateRoles();
501
+ // this.renumberTemplateRoles();
502
+ // const newRoles = [...this.store.state.roles];
503
+ // newRoles.forEach(role => {
504
+ // if (role.name === this.roleName) {
505
+ // role.name = this.name;
506
+ // role.type = this.type;
507
+ // role.full_name = this.fullName;
508
+ // role.email = this.email;
509
+ // role.phone = this.phone;
510
+ // role.delegator = this.allowDelegation;
511
+ // }
512
+ // });
513
+ // this.store.state.roles = newRoles;
514
+ (_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
515
+ })
516
+ .catch(e => {
517
+ console.log('Update error', e);
518
+ this.saving = false;
519
+ });
520
+ }
521
+ async handleDelete(e) {
522
+ e.stopPropagation();
523
+ if (window.confirm('Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.')) {
524
+ deleteRole(this.endpoint, this.templateId, this.roleName)
525
+ .then(r => {
526
+ var _a;
527
+ console.log('Role deleted', r);
528
+ this.store.state.roles = [...this.store.state.roles.filter(role => role.name !== this.roleName)];
529
+ (_a = this.delete) === null || _a === void 0 ? void 0 : _a.emit({ templateId: this.templateId, roleName: this.roleName });
530
+ })
531
+ .catch(e => {
532
+ console.log('Deletion error', e);
533
+ });
534
+ }
535
+ }
536
+ render() {
537
+ const hasFields = (this.store.state.fields || []).findIndex(field => field.role_name === this.roleName) !== -1;
538
+ return (index.h(index.Host, null, index.h("div", { class: "background-overlay", onClick: e => this.handleCancel(e) }, index.h("div", { class: "dialog" }, index.h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("verdocs-text-input", { id: "verdocs-recipient-name", label: "Role Name", value: this.name, autocomplete: "off", disabled: hasFields, helpText: hasFields
539
+ ? 'This role has fields assigned and can no longer be renamed.'
540
+ : 'A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.', placeholder: "Template Name...", onInput: (e) => {
541
+ this.name = e.target.value;
542
+ this.dirty = true;
543
+ } }), index.h("div", { class: "row" }, index.h("div", { class: "input-label" }, "Type:"), index.h("verdocs-select-input", { value: this.type, options: [
544
+ { label: 'Signer', value: 'signer' },
545
+ { label: 'CC', value: 'cc' },
546
+ { label: 'Approver', value: 'approver' },
547
+ ], onInput: (e) => {
548
+ this.type = e.target.value;
549
+ this.dirty = true;
550
+ } }), index.h("verdocs-help-icon", { text: "Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review." })), index.h("verdocs-text-input", { id: "verdocs-recipient-email", label: "Full Name", value: this.fullName, autocomplete: "off", helpText: "The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Full Name...", onInput: (e) => {
551
+ this.fullName = e.target.value;
552
+ this.dirty = true;
553
+ } }), index.h("verdocs-text-input", { id: "verdocs-recipient-email", label: "Email", value: this.email, autocomplete: "off", helpText: "The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Email Address...", onInput: (e) => {
554
+ this.email = e.target.value;
555
+ this.dirty = true;
556
+ } }), index.h("verdocs-text-input", { id: "verdocs-recipient-phone", label: "Phone", value: this.phone, autocomplete: "off", helpText: "The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.", placeholder: "Phone Number...", onInput: (e) => {
557
+ this.phone = e.target.value;
558
+ this.dirty = true;
559
+ } }), index.h("div", { class: "row" }, index.h("div", { class: "input-label" }, "May Delegate:"), index.h("div", { class: "checkbox-wrapper" }, index.h("verdocs-checkbox", { checked: this.allowDelegation, onInput: (e) => {
560
+ this.allowDelegation = e.target.checked;
561
+ this.dirty = true;
562
+ } })), index.h("verdocs-help-icon", { text: "If enabled, this recipient may delegate their actions to another individual." })), index.h("div", { class: "buttons" }, index.h("button", { class: "delete-button", disabled: this.dirty, onClick: e => this.handleDelete(e), innerHTML: TrashIcon }), index.h("div", { style: { flex: '1' } }), index.h("verdocs-button", { size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), index.h("verdocs-button", { size: "small", label: "Save", disabled: !this.dirty, onClick: e => this.handleSave(e) })))))));
563
+ }
564
+ };
565
+ VerdocsTemplateRoleProperties.style = verdocsTemplateRolePropertiesCss;
566
+
624
567
  const verdocsTemplateRolesCss = "verdocs-template-roles{display:block;min-width:400px;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 15px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{display:-ms-flexbox;display:flex;cursor:pointer;margin:0 0 0 9px}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:2px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-role svg{width:32px;height:32px}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}";
625
568
 
626
569
  const senderLabels = {
@@ -730,7 +673,7 @@ const VerdocsTemplateRoles = class {
730
673
  // We have to update ALL the roles to be sure each gets new proper sequence/order numbers assigned.
731
674
  // TODO: We could optimize this by tracking "dirty" states and only update the roles that have changed. But it's a LOT more
732
675
  // code to do right, and since most workflows will typically only have 2-4 recipients max, it may not be worth it.
733
- Promise.all((_e = (_d = this.store) === null || _d === void 0 ? void 0 : _d.state) === null || _e === void 0 ? void 0 : _e.roles.map(role => Roles.updateRole(this.endpoint, this.templateId, role.name, {
676
+ Promise.all((_e = (_d = this.store) === null || _d === void 0 ? void 0 : _d.state) === null || _e === void 0 ? void 0 : _e.roles.map(role => updateRole(this.endpoint, this.templateId, role.name, {
734
677
  sequence: role.sequence,
735
678
  order: role.order,
736
679
  })))
@@ -812,7 +755,7 @@ const VerdocsTemplateRoles = class {
812
755
  }
813
756
  callCreateRole(name, sequence, order) {
814
757
  console.log('[ROLES] Will create role', { name, sequence, order });
815
- Roles.createRole(this.endpoint, this.templateId, {
758
+ createRole(this.endpoint, this.templateId, {
816
759
  template_id: this.templateId,
817
760
  name,
818
761
  sequence,
@@ -884,7 +827,73 @@ const VerdocsTemplateRoles = class {
884
827
  };
885
828
  VerdocsTemplateRoles.style = verdocsTemplateRolesCss;
886
829
 
887
- exports.verdocs_template_attachments = VerdocsTemplateAttachments;
888
- exports.verdocs_template_create = VerdocsTemplateCreate;
830
+ const verdocsTemplateSenderCss = "verdocs-template-sender{font-family:\"Inter\", \"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}";
831
+
832
+ const VerdocsTemplateSender = class {
833
+ constructor(hostRef) {
834
+ index.registerInstance(this, hostRef);
835
+ this.close = index.createEvent(this, "close", 7);
836
+ this.sdkError = index.createEvent(this, "sdkError", 7);
837
+ this.store = null;
838
+ this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
839
+ this.templateId = '';
840
+ this.sender = VerdocsEndpoint.TemplateSenderTypes.EVERYONE;
841
+ this.saving = false;
842
+ }
843
+ async componentWillLoad() {
844
+ var _a, _b, _c, _d, _e;
845
+ try {
846
+ this.endpoint.loadSession();
847
+ if (!this.templateId) {
848
+ console.log(`[SENDER] Missing required template ID ${this.templateId}`);
849
+ return;
850
+ }
851
+ if (!this.endpoint.session) {
852
+ console.log('[SENDER] Unable to start builder session, must be authenticated');
853
+ return;
854
+ }
855
+ this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, false);
856
+ this.sender = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.sender;
857
+ }
858
+ catch (e) {
859
+ console.log('[SENDER] Error with preview session', e);
860
+ (_c = this.sdkError) === null || _c === void 0 ? void 0 : _c.emit(new errors.SDKError(e.message, (_d = e.response) === null || _d === void 0 ? void 0 : _d.status, (_e = e.response) === null || _e === void 0 ? void 0 : _e.data));
861
+ }
862
+ }
863
+ handleClose() {
864
+ this.close.emit();
865
+ }
866
+ // We need a separate event handler for clicking the background because it can receive events "through" other child components
867
+ handleDismiss(e) {
868
+ if (e.target.className === 'background-overlay') {
869
+ e.preventDefault();
870
+ this.handleClose();
871
+ }
872
+ }
873
+ async handleSelectSetting(value) {
874
+ this.saving = true;
875
+ Templates.updateTemplate(this.endpoint, this.templateId, { sender: value })
876
+ .then(r => {
877
+ var _a;
878
+ console.log('Update result', r);
879
+ if ((_a = this.store) === null || _a === void 0 ? void 0 : _a.state) {
880
+ this.store.state.sender = value;
881
+ }
882
+ this.saving = false;
883
+ this.sender = value;
884
+ })
885
+ .catch(e => {
886
+ console.log('Error saving', e);
887
+ this.saving = false;
888
+ });
889
+ }
890
+ render() {
891
+ return (index.h(index.Host, null, index.h("div", { class: "background-overlay", onClick: e => this.handleDismiss(e) }, index.h("div", { class: "dialog" }, index.h("div", { class: "options" }, index.h("div", { class: "option" }, index.h("verdocs-radio-button", { name: "template-sender", value: VerdocsEndpoint.TemplateSenderTypes.EVERYONE, checked: this.sender === VerdocsEndpoint.TemplateSenderTypes.EVERYONE, onInput: () => this.handleSelectSetting(VerdocsEndpoint.TemplateSenderTypes.EVERYONE) }), index.h("div", { class: "description" }, index.h("div", { class: "name" }, "Anyone on the Web"), index.h("verdocs-help-icon", { text: "Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)" }))), index.h("div", { class: "option" }, index.h("verdocs-radio-button", { name: "template-sender", value: VerdocsEndpoint.TemplateSenderTypes.EVERYONE_AS_CREATOR, checked: this.sender === VerdocsEndpoint.TemplateSenderTypes.EVERYONE_AS_CREATOR, onInput: () => this.handleSelectSetting(VerdocsEndpoint.TemplateSenderTypes.EVERYONE_AS_CREATOR) }), index.h("div", { class: "description" }, index.h("div", { class: "name" }, "Anyone on the Web as me"), index.h("verdocs-help-icon", { text: "Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)" }))), index.h("div", { class: "option" }, index.h("verdocs-radio-button", { name: "template-sender", value: VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER, checked: this.sender === VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER, onInput: () => this.handleSelectSetting(VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER) }), index.h("div", { class: "description" }, index.h("div", { class: "name" }, "Anyone in my organization"), index.h("verdocs-help-icon", { text: "Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')" }))), index.h("div", { class: "option" }, index.h("verdocs-radio-button", { name: "template-sender", value: VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR, checked: this.sender === VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR, onInput: () => this.handleSelectSetting(VerdocsEndpoint.TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR) }), index.h("div", { class: "description" }, index.h("div", { class: "name" }, "Anyone in my organization as me"), index.h("verdocs-help-icon", { text: "Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)" }))), index.h("div", { class: "option" }, index.h("verdocs-radio-button", { name: "template-sender", value: VerdocsEndpoint.TemplateSenderTypes.CREATOR, checked: this.sender === VerdocsEndpoint.TemplateSenderTypes.CREATOR, onInput: () => this.handleSelectSetting(VerdocsEndpoint.TemplateSenderTypes.CREATOR) }), index.h("div", { class: "description" }, index.h("div", { class: "name" }, "Me"), index.h("verdocs-help-icon", { text: "Only I can use this template." })))), index.h("div", { class: "buttons" }, index.h("verdocs-button", { label: "Close", onClick: () => this.handleClose() }))))));
892
+ }
893
+ };
894
+ VerdocsTemplateSender.style = verdocsTemplateSenderCss;
895
+
889
896
  exports.verdocs_template_fields = VerdocsTemplateFields;
897
+ exports.verdocs_template_role_properties = VerdocsTemplateRoleProperties;
890
898
  exports.verdocs_template_roles = VerdocsTemplateRoles;
899
+ exports.verdocs_template_sender = VerdocsTemplateSender;
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1d5fc518.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-2ff96f90.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-45deeb6a.js');
8
8
  const Templates = require('./Templates-f6e75719.js');
9
- const TemplateStore = require('./TemplateStore-07e274ab.js');
9
+ const TemplateStore = require('./TemplateStore-4041d8af.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
11
  require('./index-f664e4d0.js');
12
12
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1d5fc518.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-2ff96f90.js');
8
- const TemplateStore = require('./TemplateStore-07e274ab.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-45deeb6a.js');
8
+ const TemplateStore = require('./TemplateStore-4041d8af.js');
9
9
  const errors = require('./errors-0396da3d.js');
10
10
  const Toast = require('./Toast-06880504.js');
11
11
  require('./index-f664e4d0.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1d5fc518.js');
6
- const VerdocsEndpoint = require('./VerdocsEndpoint-2ff96f90.js');
6
+ const VerdocsEndpoint = require('./VerdocsEndpoint-45deeb6a.js');
7
7
  require('./Types-f89f9116.js');
8
8
 
9
9
  /**
@@ -47,7 +47,7 @@ const VerdocsTemplateStar = class {
47
47
  this.template.star_counter = r.star_counter;
48
48
  this.starChange.emit({
49
49
  templateId: this.template.id,
50
- starred: r.is_starred,
50
+ starred: r.star_counter > 0,
51
51
  count: r.star_counter,
52
52
  });
53
53
  })
@@ -4,9 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-1d5fc518.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-2ff96f90.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-45deeb6a.js');
8
8
  const Templates = require('./Templates-f6e75719.js');
9
- const TemplateStore = require('./TemplateStore-07e274ab.js');
9
+ const TemplateStore = require('./TemplateStore-4041d8af.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
11
  require('./index-f664e4d0.js');
12
12