@verdocs/web-sdk 1.13.23 → 1.13.25

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 (276) hide show
  1. package/dist/cjs/Recipients-2b21fdea.js +79 -0
  2. package/dist/cjs/{TemplateStore-b298da9c.js → TemplateStore-95728963.js} +1 -1
  3. package/dist/cjs/ipc-test.cjs.entry.js +36 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{utils-461b1a90.js → utils-12a82a63.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 +2 -2
  9. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +2 -2
  11. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +18 -3
  12. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-field-date.cjs.entry.js +3 -3
  14. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-field-initial.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +1 -1
  18. package/dist/cjs/verdocs-field-signature.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
  20. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +1 -1
  21. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -2
  22. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  23. package/dist/cjs/verdocs-preview.cjs.entry.js +3 -3
  24. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  25. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-send.cjs.entry.js +3 -3
  27. package/dist/cjs/verdocs-sign.cjs.entry.js +7 -127
  28. package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +235 -0
  29. package/dist/cjs/{verdocs-template-document-page.cjs.entry.js → verdocs-template-document-page_2.cjs.entry.js} +47 -2
  30. package/dist/cjs/{verdocs-template-attachments_4.cjs.entry.js → verdocs-template-fields_4.cjs.entry.js} +239 -230
  31. package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
  32. package/dist/cjs/verdocs-template-properties.cjs.entry.js +2 -2
  33. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
  34. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
  35. package/dist/cjs/verdocs-view.cjs.entry.js +2 -2
  36. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  37. package/dist/collection/collection-manifest.json +8 -7
  38. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +1 -1
  39. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +1 -57
  40. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +3 -3
  41. package/dist/collection/components/{elements → envelopes}/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +15 -3
  42. package/dist/collection/components/{elements → envelopes}/verdocs-envelope-sidebar/verdocs-envelope-sidebar.stories.js +1 -1
  43. package/dist/collection/components/{controls → envelopes}/verdocs-status-indicator/verdocs-status-indicator.stories.js +1 -1
  44. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +2 -2
  45. package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js +1 -1
  46. package/dist/collection/components/other/ipctest/ipc-test.css +4 -0
  47. package/dist/collection/components/other/ipctest/ipc-test.js +79 -0
  48. package/dist/collection/components/other/ipctest/ipc-test.stories.js +8 -0
  49. package/dist/collection/components/{controls → templates}/verdocs-template-card/verdocs-template-card.stories.js +1 -1
  50. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.css +4 -3
  51. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +4 -1
  52. package/dist/collection/components/{controls → templates}/verdocs-template-tags/verdocs-template-tags.stories.js +1 -1
  53. package/dist/collection/utils/utils.js +1 -1
  54. package/dist/components/Recipients.js +74 -0
  55. package/dist/components/VerdocsEndpoint.js +30 -30
  56. package/dist/components/index.d.ts +8 -7
  57. package/dist/components/index.js +1 -0
  58. package/dist/components/ipc-test.d.ts +11 -0
  59. package/dist/components/ipc-test.js +142 -0
  60. package/dist/components/utils.js +1 -1
  61. package/dist/components/verdocs-envelope-sidebar.js +17 -2
  62. package/dist/components/verdocs-field-date.js +2 -2
  63. package/dist/components/verdocs-field-timestamp.js +1 -1
  64. package/dist/components/verdocs-sign.js +2 -122
  65. package/dist/components/verdocs-template-role-properties2.js +5 -2
  66. package/dist/custom-elements.json +13 -0
  67. package/dist/docs.json +109 -8
  68. package/dist/esm/Recipients-198b2531.js +74 -0
  69. package/dist/esm/{TemplateStore-e10b2d6a.js → TemplateStore-09fc7336.js} +1 -1
  70. package/dist/esm/ipc-test.entry.js +32 -0
  71. package/dist/esm/loader.js +1 -1
  72. package/dist/esm/{utils-666d38e6.js → utils-81958236.js} +2 -2
  73. package/dist/esm/verdocs-auth.entry.js +1 -1
  74. package/dist/esm/verdocs-build.entry.js +2 -2
  75. package/dist/esm/verdocs-button-panel_3.entry.js +2 -2
  76. package/dist/esm/verdocs-contact-picker.entry.js +1 -1
  77. package/dist/esm/verdocs-dropdown_2.entry.js +2 -2
  78. package/dist/esm/verdocs-envelope-sidebar.entry.js +18 -3
  79. package/dist/esm/verdocs-field-checkbox.entry.js +1 -1
  80. package/dist/esm/verdocs-field-date.entry.js +3 -3
  81. package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
  82. package/dist/esm/verdocs-field-initial.entry.js +1 -1
  83. package/dist/esm/verdocs-field-payment.entry.js +1 -1
  84. package/dist/esm/verdocs-field-radio-button.entry.js +1 -1
  85. package/dist/esm/verdocs-field-signature.entry.js +1 -1
  86. package/dist/esm/verdocs-field-textarea.entry.js +1 -1
  87. package/dist/esm/verdocs-field-textbox.entry.js +1 -1
  88. package/dist/esm/verdocs-field-timestamp.entry.js +2 -2
  89. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  90. package/dist/esm/verdocs-preview.entry.js +3 -3
  91. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  92. package/dist/esm/verdocs-search.entry.js +1 -1
  93. package/dist/esm/verdocs-send.entry.js +3 -3
  94. package/dist/esm/verdocs-sign.entry.js +4 -124
  95. package/dist/esm/verdocs-template-attachments_2.entry.js +230 -0
  96. package/dist/esm/{verdocs-template-document-page.entry.js → verdocs-template-document-page_2.entry.js} +47 -3
  97. package/dist/esm/{verdocs-template-attachments_4.entry.js → verdocs-template-fields_4.entry.js} +236 -227
  98. package/dist/esm/verdocs-template-name.entry.js +2 -2
  99. package/dist/esm/verdocs-template-properties.entry.js +2 -2
  100. package/dist/esm/verdocs-template-reminders.entry.js +2 -2
  101. package/dist/esm/verdocs-template-visibility.entry.js +2 -2
  102. package/dist/esm/verdocs-view.entry.js +2 -2
  103. package/dist/esm/verdocs-web-sdk.js +1 -1
  104. package/dist/esm-es5/Recipients-198b2531.js +1 -0
  105. package/dist/esm-es5/{TemplateStore-e10b2d6a.js → TemplateStore-09fc7336.js} +1 -1
  106. package/dist/esm-es5/{VerdocsEndpoint-6d7a17ce.js → VerdocsEndpoint-5b92f115.js} +1 -1
  107. package/dist/esm-es5/ipc-test.entry.js +1 -0
  108. package/dist/esm-es5/loader.js +1 -1
  109. package/dist/esm-es5/{utils-666d38e6.js → utils-81958236.js} +1 -1
  110. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-dropdown_2.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  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-search.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  132. package/dist/esm-es5/verdocs-template-attachments_2.entry.js +1 -0
  133. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -0
  134. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -0
  135. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  136. package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
  137. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  138. package/dist/esm-es5/verdocs-template-visibility.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/embeds/verdocs-send/verdocs-send.d.ts +1 -1
  142. package/dist/types/components/{controls → envelopes}/verdocs-status-indicator/verdocs-status-indicator.d.ts +1 -1
  143. package/dist/types/components/other/ipctest/ipc-test.d.ts +17 -0
  144. package/dist/types/components/other/ipctest/ipc-test.stories.d.ts +4 -0
  145. package/dist/types/components.d.ts +31 -2
  146. package/dist/types/utils/utils.d.ts +2 -2
  147. package/dist/verdocs-web-sdk/p-0190ff6e.entry.js +1 -0
  148. package/dist/verdocs-web-sdk/p-05e83caa.system.entry.js +1 -0
  149. package/dist/verdocs-web-sdk/p-06f625f2.system.entry.js +1 -0
  150. package/dist/verdocs-web-sdk/{p-ff662b13.js → p-0b4ea5f9.js} +1 -1
  151. package/dist/verdocs-web-sdk/{p-e4a79e4e.system.entry.js → p-0cb24fef.system.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/p-0f66f6bb.entry.js +1 -0
  153. package/dist/verdocs-web-sdk/{p-69f2485d.system.entry.js → p-0fb5286f.system.entry.js} +1 -1
  154. package/dist/verdocs-web-sdk/p-109fb530.entry.js +1 -0
  155. package/dist/verdocs-web-sdk/{p-ac858763.entry.js → p-1102db6a.entry.js} +1 -1
  156. package/dist/verdocs-web-sdk/p-12e54f39.js +1 -0
  157. package/dist/verdocs-web-sdk/{p-9c73497e.system.entry.js → p-135f1746.system.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-ca3e8884.entry.js → p-15505723.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/{p-6cfa1d78.entry.js → p-1748d4d6.entry.js} +1 -1
  160. package/dist/verdocs-web-sdk/{p-92dfbbfc.system.entry.js → p-1a0aa7fd.system.entry.js} +1 -1
  161. package/dist/verdocs-web-sdk/{p-86e2eeed.entry.js → p-1b5e57bb.entry.js} +1 -1
  162. package/dist/verdocs-web-sdk/{p-7d45c1e8.system.entry.js → p-1b71f48b.system.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
  164. package/dist/verdocs-web-sdk/{p-04ed4943.entry.js → p-1fe05339.entry.js} +1 -1
  165. package/dist/verdocs-web-sdk/{p-7399931a.system.entry.js → p-21e90bbf.system.entry.js} +1 -1
  166. package/dist/verdocs-web-sdk/{p-e01505dd.system.entry.js → p-25bd103e.system.entry.js} +1 -1
  167. package/dist/verdocs-web-sdk/{p-62421ca6.system.entry.js → p-27ebad6b.system.entry.js} +1 -1
  168. package/dist/verdocs-web-sdk/{p-571e7b9f.system.entry.js → p-2e9fb01e.system.entry.js} +1 -1
  169. package/dist/verdocs-web-sdk/{p-c3f9589d.system.entry.js → p-2ee6b0a0.system.entry.js} +1 -1
  170. package/dist/verdocs-web-sdk/{p-86eda4dc.entry.js → p-31295791.entry.js} +1 -1
  171. package/dist/verdocs-web-sdk/{p-3d743079.js → p-31f88d95.js} +1 -1
  172. package/dist/verdocs-web-sdk/{p-9d90ed3d.system.entry.js → p-3e4f73cb.system.entry.js} +1 -1
  173. package/dist/verdocs-web-sdk/{p-0e7b3b3e.entry.js → p-4157aa74.entry.js} +1 -1
  174. package/dist/verdocs-web-sdk/p-494d4276.system.js +1 -0
  175. package/dist/verdocs-web-sdk/{p-a4f4ab22.system.entry.js → p-4c988fa0.system.entry.js} +1 -1
  176. package/dist/verdocs-web-sdk/{p-670b93df.entry.js → p-4cf7c407.entry.js} +1 -1
  177. package/dist/verdocs-web-sdk/{p-0803ccbb.system.entry.js → p-4d5c78b4.system.entry.js} +1 -1
  178. package/dist/verdocs-web-sdk/{p-020e4628.system.entry.js → p-4fdcfed5.system.entry.js} +1 -1
  179. package/dist/verdocs-web-sdk/{p-3050ac80.system.entry.js → p-52f39e6b.system.entry.js} +1 -1
  180. package/dist/verdocs-web-sdk/{p-e27e0d11.entry.js → p-542994b3.entry.js} +1 -1
  181. package/dist/verdocs-web-sdk/p-54c4ca7d.system.entry.js +1 -0
  182. package/dist/verdocs-web-sdk/p-5597b4b3.entry.js +1 -0
  183. package/dist/verdocs-web-sdk/{p-28ed5eb8.system.entry.js → p-61979b22.system.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/{p-9829a091.entry.js → p-661654d8.entry.js} +1 -1
  185. package/dist/verdocs-web-sdk/{p-e616c947.system.entry.js → p-6c9a3b1d.system.entry.js} +1 -1
  186. package/dist/verdocs-web-sdk/{p-f61f02a7.entry.js → p-6e62e65a.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/{p-5ee8cd47.entry.js → p-6e7a1333.entry.js} +1 -1
  188. package/dist/verdocs-web-sdk/{p-05f9d3db.entry.js → p-7ab07c61.entry.js} +1 -1
  189. package/dist/verdocs-web-sdk/{p-ededd783.entry.js → p-7ac080d6.entry.js} +1 -1
  190. package/dist/verdocs-web-sdk/{p-120f29bd.system.entry.js → p-7c10cd2f.system.entry.js} +1 -1
  191. package/dist/verdocs-web-sdk/{p-508faaf0.entry.js → p-7c86d53a.entry.js} +1 -1
  192. package/dist/verdocs-web-sdk/p-8aa4815e.entry.js +1 -0
  193. package/dist/verdocs-web-sdk/{p-14aebbbf.entry.js → p-8c536274.entry.js} +1 -1
  194. package/dist/verdocs-web-sdk/{p-c80f119a.js → p-92664ee4.js} +1 -1
  195. package/dist/verdocs-web-sdk/{p-ad0c0136.system.entry.js → p-938031a9.system.entry.js} +1 -1
  196. package/dist/verdocs-web-sdk/{p-34ea6a57.system.entry.js → p-963a4b4a.system.entry.js} +1 -1
  197. package/dist/verdocs-web-sdk/{p-7a1a44ca.entry.js → p-98ef1df0.entry.js} +1 -1
  198. package/dist/verdocs-web-sdk/p-9b18321e.system.entry.js +1 -0
  199. package/dist/verdocs-web-sdk/p-9be9c835.entry.js +1 -0
  200. package/dist/verdocs-web-sdk/{p-e9f96f72.entry.js → p-a294ef80.entry.js} +1 -1
  201. package/dist/verdocs-web-sdk/{p-0251b5d9.entry.js → p-a80035a6.entry.js} +1 -1
  202. package/dist/verdocs-web-sdk/p-aa9627a3.entry.js +1 -0
  203. package/dist/verdocs-web-sdk/{p-988be3bf.entry.js → p-b507c2a5.entry.js} +1 -1
  204. package/dist/verdocs-web-sdk/{p-69f112cd.system.entry.js → p-b7d66b24.system.entry.js} +1 -1
  205. package/dist/verdocs-web-sdk/p-c5bb9a72.entry.js +1 -0
  206. package/dist/verdocs-web-sdk/{p-b85beb7d.system.js → p-c5dde9c7.system.js} +1 -1
  207. package/dist/verdocs-web-sdk/{p-5efae6e5.entry.js → p-c99689c1.entry.js} +1 -1
  208. package/dist/verdocs-web-sdk/{p-097248a9.system.entry.js → p-d9843ba6.system.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/{p-26cfd4f0.entry.js → p-db5f1a7d.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/{p-365a0216.system.js → p-dc849a58.system.js} +1 -1
  211. package/dist/verdocs-web-sdk/{p-6fb72d5d.system.entry.js → p-de9c4feb.system.entry.js} +1 -1
  212. package/dist/verdocs-web-sdk/p-e0386f1b.entry.js +1 -0
  213. package/dist/verdocs-web-sdk/{p-faf68b59.system.entry.js → p-e7058963.system.entry.js} +1 -1
  214. package/dist/verdocs-web-sdk/{p-7e69f7d0.system.entry.js → p-f1cc5b3c.system.entry.js} +1 -1
  215. package/dist/verdocs-web-sdk/p-f43112b2.system.entry.js +1 -0
  216. package/dist/verdocs-web-sdk/{p-99c6e729.system.js → p-f4c4f8dd.system.js} +1 -1
  217. package/dist/verdocs-web-sdk/p-f57e126e.system.entry.js +1 -0
  218. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  219. package/package.json +1 -1
  220. package/dist/cjs/Roles-9b593b95.js +0 -28
  221. package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +0 -220
  222. package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +0 -51
  223. package/dist/esm/Roles-6eb459df.js +0 -24
  224. package/dist/esm/verdocs-template-role-properties_2.entry.js +0 -215
  225. package/dist/esm/verdocs-toolbar-icon.entry.js +0 -47
  226. package/dist/esm-es5/Roles-6eb459df.js +0 -1
  227. package/dist/esm-es5/verdocs-template-attachments_4.entry.js +0 -1
  228. package/dist/esm-es5/verdocs-template-document-page.entry.js +0 -1
  229. package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +0 -1
  230. package/dist/esm-es5/verdocs-toolbar-icon.entry.js +0 -1
  231. package/dist/verdocs-web-sdk/p-020f3b2e.entry.js +0 -1
  232. package/dist/verdocs-web-sdk/p-10d370b9.entry.js +0 -1
  233. package/dist/verdocs-web-sdk/p-2d9420df.system.entry.js +0 -1
  234. package/dist/verdocs-web-sdk/p-32006e06.entry.js +0 -1
  235. package/dist/verdocs-web-sdk/p-42aa31a9.entry.js +0 -1
  236. package/dist/verdocs-web-sdk/p-5e535535.system.entry.js +0 -1
  237. package/dist/verdocs-web-sdk/p-671bb1f3.entry.js +0 -1
  238. package/dist/verdocs-web-sdk/p-8027431e.js +0 -1
  239. package/dist/verdocs-web-sdk/p-8229e6df.system.js +0 -1
  240. package/dist/verdocs-web-sdk/p-91fbe6aa.system.entry.js +0 -1
  241. package/dist/verdocs-web-sdk/p-99b4096d.entry.js +0 -1
  242. package/dist/verdocs-web-sdk/p-a3931094.system.entry.js +0 -1
  243. package/dist/verdocs-web-sdk/p-b5ea612a.entry.js +0 -1
  244. package/dist/verdocs-web-sdk/p-c908ce71.system.entry.js +0 -1
  245. package/dist/verdocs-web-sdk/p-d8afc5d2.entry.js +0 -1
  246. package/dist/verdocs-web-sdk/p-e7298e7a.system.entry.js +0 -1
  247. package/dist/verdocs-web-sdk/p-f5075faa.entry.js +0 -1
  248. package/dist/cjs/{VerdocsEndpoint-e6517a50.js → VerdocsEndpoint-f2af9468.js} +30 -30
  249. package/dist/collection/components/{elements → controls}/verdocs-component-error/verdocs-component-error.css +0 -0
  250. package/dist/collection/components/{elements → controls}/verdocs-component-error/verdocs-component-error.js +0 -0
  251. package/dist/collection/components/{elements → envelopes}/verdocs-contact-picker/verdocs-contact-picker.css +0 -0
  252. package/dist/collection/components/{elements → envelopes}/verdocs-contact-picker/verdocs-contact-picker.js +0 -0
  253. package/dist/collection/components/{elements → envelopes}/verdocs-contact-picker/verdocs-contact-picker.stories.js +0 -0
  254. package/dist/collection/components/{elements → envelopes}/verdocs-envelope-document-page/verdocs-envelope-document-page.css +0 -0
  255. package/dist/collection/components/{elements → envelopes}/verdocs-envelope-document-page/verdocs-envelope-document-page.js +0 -0
  256. package/dist/collection/components/{elements → envelopes}/verdocs-envelope-sidebar/verdocs-envelope-sidebar.css +0 -0
  257. package/dist/collection/components/{controls → envelopes}/verdocs-status-indicator/recipient-flow.js +0 -0
  258. package/dist/collection/components/{controls → envelopes}/verdocs-status-indicator/verdocs-status-indicator.css +0 -0
  259. package/dist/collection/components/{controls → envelopes}/verdocs-status-indicator/verdocs-status-indicator.js +0 -0
  260. package/dist/collection/components/{controls → templates}/verdocs-template-card/verdocs-template-card.css +0 -0
  261. package/dist/collection/components/{controls → templates}/verdocs-template-card/verdocs-template-card.js +0 -0
  262. package/dist/collection/components/{controls → templates}/verdocs-template-tags/verdocs-template-tags.css +0 -0
  263. package/dist/collection/components/{controls → templates}/verdocs-template-tags/verdocs-template-tags.js +0 -0
  264. package/dist/esm/{VerdocsEndpoint-6d7a17ce.js → VerdocsEndpoint-5b92f115.js} +30 -30
  265. /package/dist/types/components/{elements → controls}/verdocs-component-error/verdocs-component-error.d.ts +0 -0
  266. /package/dist/types/components/{elements → envelopes}/verdocs-contact-picker/verdocs-contact-picker.d.ts +0 -0
  267. /package/dist/types/components/{elements → envelopes}/verdocs-contact-picker/verdocs-contact-picker.stories.d.ts +0 -0
  268. /package/dist/types/components/{elements → envelopes}/verdocs-envelope-document-page/verdocs-envelope-document-page.d.ts +0 -0
  269. /package/dist/types/components/{elements → envelopes}/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts +0 -0
  270. /package/dist/types/components/{elements → envelopes}/verdocs-envelope-sidebar/verdocs-envelope-sidebar.stories.d.ts +0 -0
  271. /package/dist/types/components/{controls → envelopes}/verdocs-status-indicator/recipient-flow.d.ts +0 -0
  272. /package/dist/types/components/{controls → envelopes}/verdocs-status-indicator/verdocs-status-indicator.stories.d.ts +0 -0
  273. /package/dist/types/components/{controls → templates}/verdocs-template-card/verdocs-template-card.d.ts +0 -0
  274. /package/dist/types/components/{controls → templates}/verdocs-template-card/verdocs-template-card.stories.d.ts +0 -0
  275. /package/dist/types/components/{controls → templates}/verdocs-template-tags/verdocs-template-tags.d.ts +0 -0
  276. /package/dist/types/components/{controls → templates}/verdocs-template-tags/verdocs-template-tags.stories.d.ts +0 -0
@@ -3,243 +3,43 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-70677d67.js');
6
- require('./Types-f89f9116.js');
7
- const TemplateDocuments = require('./TemplateDocuments-e2e0e6b7.js');
8
- const VerdocsEndpoint = require('./VerdocsEndpoint-e6517a50.js');
9
- const Icons = require('./Icons-a11fb3fc.js');
10
- const TemplateStore = require('./TemplateStore-b298da9c.js');
11
- const errors = require('./errors-0396da3d.js');
12
- const Templates = require('./Templates-24580a13.js');
13
6
  const interact_min = require('./interact.min-ba5cc513.js');
7
+ require('./Types-f89f9116.js');
14
8
  const Fields = require('./Fields-705a2168.js');
9
+ const VerdocsEndpoint = require('./VerdocsEndpoint-f2af9468.js');
15
10
  const Primitives = require('./Primitives-be5088cb.js');
16
- const utils = require('./utils-461b1a90.js');
17
- const Roles = require('./Roles-9b593b95.js');
11
+ const utils = require('./utils-12a82a63.js');
12
+ const TemplateStore = require('./TemplateStore-95728963.js');
13
+ const errors = require('./errors-0396da3d.js');
18
14
  const Colors = require('./Colors-e809dcc9.js');
15
+ const Templates = require('./Templates-24580a13.js');
19
16
  require('./_commonjsHelpers-0c557e26.js');
20
17
  require('./Envelopes-699531b7.js');
21
18
  require('./Files-4bdc0c0f.js');
22
19
  require('./index-6528b430.js');
23
20
 
24
- 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}";
25
-
26
- const VerdocsTemplateAttachments = class {
27
- constructor(hostRef) {
28
- index.registerInstance(this, hostRef);
29
- this.exit = index.createEvent(this, "exit", 7);
30
- this.next = index.createEvent(this, "next", 7);
31
- this.templateUpdate = index.createEvent(this, "templateUpdate", 7);
32
- this.sdkError = index.createEvent(this, "sdkError", 7);
33
- this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
34
- this.templateId = '';
35
- this.uploading = false;
36
- this.progressLabel = 'Uploading...';
37
- this.progressPercent = 0;
38
- this.showDeleteError = false;
39
- this.confirmDeleteDocument = null;
40
- this.store = null;
41
- }
42
- async componentWillLoad() {
43
- var _a, _b, _c;
44
- try {
45
- this.endpoint.loadSession();
46
- if (!this.templateId) {
47
- console.log(`[ROLES] Missing required template ID ${this.templateId}`);
48
- return;
49
- }
50
- if (!this.endpoint.session) {
51
- console.log('[ROLES] Unable to start builder session, must be authenticated');
52
- return;
53
- }
54
- this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, false);
55
- }
56
- catch (e) {
57
- console.log('[TEMPLATE ATTACHMENTS] Error loading template', e);
58
- (_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));
59
- }
60
- }
61
- handleCancel(e) {
62
- e.stopPropagation();
63
- this.exit.emit();
64
- }
65
- handleUploadProgress(percent) {
66
- if (percent >= 99) {
67
- this.progressPercent = 100;
68
- this.progressLabel = 'Processing...';
69
- }
70
- else {
71
- this.progressPercent = percent;
72
- }
73
- }
74
- async handleUpload(e) {
75
- var _a, _b, _c;
76
- e.stopPropagation();
77
- const file = e.detail.file;
78
- if (!file) {
79
- return;
80
- }
81
- console.log('[ATTACHMENTS] Uploading...', file);
82
- this.uploading = true;
83
- this.progressLabel = 'Uploading...';
84
- try {
85
- const template = await TemplateDocuments.createTemplateDocument(this.endpoint, this.templateId, file, this.handleUploadProgress.bind(this));
86
- console.log('[ATTACHMENTS] Created attachment', template);
87
- this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
88
- console.log('[ATTACHMENTS] New template', this.store.state);
89
- this.uploading = false;
90
- this.progressLabel = '';
91
- this.progressPercent = 0;
92
- }
93
- catch (e) {
94
- console.log('[ATTACHMENTS] Error creating template', e);
95
- (_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));
96
- this.uploading = false;
97
- }
98
- }
99
- handleNext(e) {
100
- var _a;
101
- e.stopPropagation();
102
- this.uploading = false;
103
- this.progressLabel = '';
104
- this.progressPercent = 0;
105
- (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({ template: this.store.state });
106
- }
107
- async confirmDelete() {
108
- await TemplateDocuments.deleteTemplateDocument(this.endpoint, this.templateId, this.confirmDeleteDocument.id);
109
- this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
110
- console.log('[ATTACHMENTS] New template', this.store.state);
111
- this.confirmDeleteDocument = null;
112
- }
113
- async handleDelete(document) {
114
- var _a;
115
- if (((_a = this.store.state) === null || _a === void 0 ? void 0 : _a.template_documents.length) > 1) {
116
- this.confirmDeleteDocument = document;
117
- }
118
- else {
119
- this.showDeleteError = true;
120
- }
121
- }
122
- getFileIcon(document) {
123
- switch (document.mime) {
124
- case 'application/pdf':
125
- return Icons.PdfIcon;
126
- case 'image/jpeg':
127
- return Icons.JpgIcon;
128
- case 'image/png':
129
- return Icons.PngIcon;
130
- case 'application/msword':
131
- case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
132
- return Icons.DocIcon;
133
- }
134
- return Icons.FileIcon;
135
- }
136
- render() {
137
- var _a, _b, _c;
138
- if (!this.endpoint.session) {
139
- return (index.h(index.Host, null, index.h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
140
- }
141
- const templateState = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state;
142
- if (!templateState.isLoaded) {
143
- return (index.h(index.Host, { class: "loading" }, index.h("verdocs-loader", null)));
144
- }
145
- // This is meant to be a companion for larger visual experiences so we just go blank on errors for now.
146
- if (!this.endpoint.session || !templateState.profile_id) {
147
- return index.h(index.Host, { class: "empty" });
148
- }
149
- 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: () => {
150
- this.confirmDeleteDocument = null;
151
- } }))));
152
- }
21
+ /**
22
+ * A "role" is an individual participant in a signing flow, such as a signer or CC contact. Roles are identified by
23
+ * their names, which must be unique (e.g. 'Recipient 1'). Template fields are assigned to roles for signing operations,
24
+ * so you may have 'Recipient 1 Signature 1' and so forth.
25
+ *
26
+ * @module
27
+ */
28
+ var createRole = function (endpoint, templateId, params) {
29
+ return endpoint.api //
30
+ .post("/templates/".concat(templateId, "/roles"), params)
31
+ .then(function (r) { return r.data; });
153
32
  };
154
- VerdocsTemplateAttachments.style = verdocsTemplateAttachmentsCss;
155
-
156
- 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}";
157
-
158
- const unicodeNBSP = ' ';
159
- 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>';
160
- const VerdocsTemplateCreate = class {
161
- constructor(hostRef) {
162
- index.registerInstance(this, hostRef);
163
- this.exit = index.createEvent(this, "exit", 7);
164
- this.next = index.createEvent(this, "next", 7);
165
- this.sdkError = index.createEvent(this, "sdkError", 7);
166
- this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
167
- this.file = undefined;
168
- this.creating = false;
169
- this.progressLabel = 'Uploading...';
170
- this.progressPercent = 0;
171
- }
172
- componentWillLoad() {
173
- this.endpoint.setTimeout(30000);
174
- this.endpoint.loadSession();
175
- }
176
- handleFileChanged(e) {
177
- var _a;
178
- this.file = ((_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0]) || null;
179
- console.log('[CREATE] Selected file', this.file);
180
- // this.filePath = e.target.files?.[0]?.name;
181
- }
182
- handleUpload(e) {
183
- e.stopPropagation();
184
- const fileElem = document.getElementById('verdocs-template-create-file');
185
- fileElem.click();
186
- }
187
- handleCancel(e) {
188
- e.stopPropagation();
189
- this.exit.emit();
190
- }
191
- async handleSubmit(e) {
192
- var _a, _b, _c, _d;
193
- e.stopPropagation();
194
- console.log('Submitting');
195
- // Should be true if we're here because onClick is only enabled then. We're just guarding this for Typescript.
196
- if (!this.file) {
197
- return;
198
- }
199
- this.creating = true;
200
- this.progressLabel = 'Uploading...';
201
- try {
202
- const template = await Templates.createTemplate(this.endpoint, { name: this.file.name, documents: [this.file] }, percent => {
203
- if (percent >= 99) {
204
- this.progressLabel = 'Processing...';
205
- this.progressPercent = 100;
206
- }
207
- else {
208
- this.progressPercent = percent;
209
- }
210
- });
211
- console.log('[CREATE] Created template', template);
212
- (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit(template);
213
- this.creating = false;
214
- this.progressLabel = '';
215
- this.progressPercent = 0;
216
- }
217
- catch (e) {
218
- console.log('[CREATE] Error creating template', e);
219
- (_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));
220
- this.creating = false;
221
- }
222
- }
223
- render() {
224
- if (!this.endpoint.session) {
225
- return (index.h(index.Host, null, index.h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
226
- }
227
- 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) => {
228
- e.preventDefault();
229
- e.target.classList.remove('drag-over');
230
- this.file = e.dataTransfer.files[0];
231
- }, onDragOver: (e) => {
232
- e.preventDefault();
233
- e.dataTransfer.dropEffect = 'copy';
234
- }, 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: {
235
- marginTop: '20px',
236
- marginBottom: '20px',
237
- fontSize: '16px',
238
- height: '20px',
239
- } }, 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 })))));
240
- }
33
+ var updateRole = function (endpoint, templateId, roleName, params) {
34
+ return endpoint.api //
35
+ .put("/templates/".concat(templateId, "/roles/").concat(roleName), params)
36
+ .then(function (r) { return r.data; });
37
+ };
38
+ var deleteRole = function (endpoint, templateId, roleName) {
39
+ return endpoint.api //
40
+ .delete("/templates/".concat(templateId, "/roles/").concat(roleName))
41
+ .then(function (r) { return r.data; });
241
42
  };
242
- VerdocsTemplateCreate.style = verdocsTemplateCreateCss;
243
43
 
244
44
  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}";
245
45
 
@@ -638,6 +438,149 @@ const VerdocsTemplateFields = class {
638
438
  };
639
439
  VerdocsTemplateFields.style = verdocsTemplateFieldsCss;
640
440
 
441
+ const verdocsTemplateRolePropertiesCss = "verdocs-template-role-properties{font-family:\"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}";
442
+
443
+ 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>`;
444
+ const VerdocsTemplateRoleProperties = class {
445
+ constructor(hostRef) {
446
+ index.registerInstance(this, hostRef);
447
+ this.close = index.createEvent(this, "close", 7);
448
+ this.delete = index.createEvent(this, "delete", 7);
449
+ this.sdkError = index.createEvent(this, "sdkError", 7);
450
+ this.store = null;
451
+ this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
452
+ this.templateId = '';
453
+ this.roleName = '';
454
+ this.sender = VerdocsEndpoint.TemplateSenderTypes.EVERYONE;
455
+ this.dirty = false;
456
+ this.saving = false;
457
+ this.name = '';
458
+ this.type = 'signer';
459
+ this.fullName = '';
460
+ this.email = '';
461
+ this.phone = '';
462
+ this.allowDelegation = false;
463
+ }
464
+ async componentWillLoad() {
465
+ var _a, _b, _c, _d, _e;
466
+ try {
467
+ this.endpoint.loadSession();
468
+ if (!this.templateId) {
469
+ console.log(`[ROLE_PROPERTIES] Missing required template ID ${this.templateId}`);
470
+ return;
471
+ }
472
+ if (!this.endpoint.session) {
473
+ console.log('[ROLE_PROPERTIES] Unable to start builder session, must be authenticated');
474
+ return;
475
+ }
476
+ this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, false);
477
+ 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);
478
+ if (editingRole) {
479
+ this.name = editingRole.name;
480
+ this.type = editingRole.type;
481
+ this.fullName = editingRole.full_name;
482
+ this.email = editingRole.email;
483
+ this.phone = editingRole.phone;
484
+ this.allowDelegation = editingRole.delegator;
485
+ console.log('[ROLES] Editing role', editingRole);
486
+ }
487
+ }
488
+ catch (e) {
489
+ console.log('[TEMPLATE ROLE PROPERTIES] Error with preview session', e);
490
+ (_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));
491
+ }
492
+ }
493
+ handleCancel(e) {
494
+ var _a, _b, _c;
495
+ e.stopPropagation();
496
+ this.name = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.name;
497
+ this.dirty = false;
498
+ (_c = this.close) === null || _c === void 0 ? void 0 : _c.emit();
499
+ }
500
+ async handleSave(e) {
501
+ e.stopPropagation();
502
+ this.saving = true;
503
+ updateRole(this.endpoint, this.templateId, this.roleName, {
504
+ name: this.name,
505
+ type: this.type,
506
+ full_name: this.fullName,
507
+ email: this.email,
508
+ phone: this.phone,
509
+ delegator: this.allowDelegation,
510
+ })
511
+ .then(async (r) => {
512
+ var _a;
513
+ console.log('[ROLE_PROPERTIES] Update result', r);
514
+ this.saving = false;
515
+ this.dirty = false;
516
+ this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, true);
517
+ // this.sortTemplateRoles();
518
+ // this.renumberTemplateRoles();
519
+ // const newRoles = [...this.store.state.roles];
520
+ // newRoles.forEach(role => {
521
+ // if (role.name === this.roleName) {
522
+ // role.name = this.name;
523
+ // role.type = this.type;
524
+ // role.full_name = this.fullName;
525
+ // role.email = this.email;
526
+ // role.phone = this.phone;
527
+ // role.delegator = this.allowDelegation;
528
+ // }
529
+ // });
530
+ // this.store.state.roles = newRoles;
531
+ (_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
532
+ })
533
+ .catch(e => {
534
+ console.log('Update error', e);
535
+ this.saving = false;
536
+ });
537
+ }
538
+ async handleDelete(e) {
539
+ e.stopPropagation();
540
+ 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.')) {
541
+ deleteRole(this.endpoint, this.templateId, this.roleName)
542
+ .then(r => {
543
+ var _a;
544
+ console.log('Role deleted', r);
545
+ this.store.state.roles = [...this.store.state.roles.filter(role => role.name !== this.roleName)];
546
+ (_a = this.delete) === null || _a === void 0 ? void 0 : _a.emit({ templateId: this.templateId, roleName: this.roleName });
547
+ })
548
+ .catch(e => {
549
+ console.log('Deletion error', e);
550
+ });
551
+ }
552
+ }
553
+ render() {
554
+ const hasFields = (this.store.state.fields || []).findIndex(field => field.role_name === this.roleName) !== -1;
555
+ 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
556
+ ? 'This role has fields assigned and can no longer be renamed.'
557
+ : 'A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.', placeholder: "Template Name...", onInput: (e) => {
558
+ this.name = e.target.value;
559
+ this.dirty = true;
560
+ } }), index.h("div", { class: "row" }, index.h("div", { class: "input-label" }, "Type:"), index.h("verdocs-select-input", { value: this.type, options: [
561
+ { label: 'Signer', value: 'signer' },
562
+ { label: 'CC', value: 'cc' },
563
+ { label: 'Approver', value: 'approver' },
564
+ ], onInput: (e) => {
565
+ this.type = e.target.value;
566
+ this.dirty = true;
567
+ } }), 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) => {
568
+ this.fullName = e.target.value;
569
+ this.dirty = true;
570
+ } }), 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) => {
571
+ this.email = e.target.value;
572
+ this.dirty = true;
573
+ } }), 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) => {
574
+ this.phone = e.target.value;
575
+ this.dirty = true;
576
+ } }), 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) => {
577
+ this.allowDelegation = e.target.checked;
578
+ this.dirty = true;
579
+ } })), 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) })))))));
580
+ }
581
+ };
582
+ VerdocsTemplateRoleProperties.style = verdocsTemplateRolePropertiesCss;
583
+
641
584
  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;display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-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}";
642
585
 
643
586
  const senderLabels = {
@@ -747,7 +690,7 @@ const VerdocsTemplateRoles = class {
747
690
  // We have to update ALL the roles to be sure each gets new proper sequence/order numbers assigned.
748
691
  // TODO: We could optimize this by tracking "dirty" states and only update the roles that have changed. But it's a LOT more
749
692
  // code to do right, and since most workflows will typically only have 2-4 recipients max, it may not be worth it.
750
- 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, {
693
+ 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, {
751
694
  sequence: role.sequence,
752
695
  order: role.order,
753
696
  })))
@@ -829,7 +772,7 @@ const VerdocsTemplateRoles = class {
829
772
  }
830
773
  callCreateRole(name, sequence, order) {
831
774
  console.log('[ROLES] Will create role', { name, sequence, order });
832
- Roles.createRole(this.endpoint, this.templateId, {
775
+ createRole(this.endpoint, this.templateId, {
833
776
  template_id: this.templateId,
834
777
  name,
835
778
  sequence,
@@ -901,7 +844,73 @@ const VerdocsTemplateRoles = class {
901
844
  };
902
845
  VerdocsTemplateRoles.style = verdocsTemplateRolesCss;
903
846
 
904
- exports.verdocs_template_attachments = VerdocsTemplateAttachments;
905
- exports.verdocs_template_create = VerdocsTemplateCreate;
847
+ const verdocsTemplateSenderCss = "verdocs-template-sender{font-family:\"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}";
848
+
849
+ const VerdocsTemplateSender = class {
850
+ constructor(hostRef) {
851
+ index.registerInstance(this, hostRef);
852
+ this.close = index.createEvent(this, "close", 7);
853
+ this.sdkError = index.createEvent(this, "sdkError", 7);
854
+ this.store = null;
855
+ this.endpoint = VerdocsEndpoint.VerdocsEndpoint.getDefault();
856
+ this.templateId = '';
857
+ this.sender = VerdocsEndpoint.TemplateSenderTypes.EVERYONE;
858
+ this.saving = false;
859
+ }
860
+ async componentWillLoad() {
861
+ var _a, _b, _c, _d, _e;
862
+ try {
863
+ this.endpoint.loadSession();
864
+ if (!this.templateId) {
865
+ console.log(`[SENDER] Missing required template ID ${this.templateId}`);
866
+ return;
867
+ }
868
+ if (!this.endpoint.session) {
869
+ console.log('[SENDER] Unable to start builder session, must be authenticated');
870
+ return;
871
+ }
872
+ this.store = await TemplateStore.getTemplateStore(this.endpoint, this.templateId, false);
873
+ this.sender = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.sender;
874
+ }
875
+ catch (e) {
876
+ console.log('[SENDER] Error with preview session', e);
877
+ (_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));
878
+ }
879
+ }
880
+ handleClose() {
881
+ this.close.emit();
882
+ }
883
+ // We need a separate event handler for clicking the background because it can receive events "through" other child components
884
+ handleDismiss(e) {
885
+ if (e.target.className === 'background-overlay') {
886
+ e.preventDefault();
887
+ this.handleClose();
888
+ }
889
+ }
890
+ async handleSelectSetting(value) {
891
+ this.saving = true;
892
+ Templates.updateTemplate(this.endpoint, this.templateId, { sender: value })
893
+ .then(r => {
894
+ var _a;
895
+ console.log('Update result', r);
896
+ if ((_a = this.store) === null || _a === void 0 ? void 0 : _a.state) {
897
+ this.store.state.sender = value;
898
+ }
899
+ this.saving = false;
900
+ this.sender = value;
901
+ })
902
+ .catch(e => {
903
+ console.log('Error saving', e);
904
+ this.saving = false;
905
+ });
906
+ }
907
+ render() {
908
+ 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() }))))));
909
+ }
910
+ };
911
+ VerdocsTemplateSender.style = verdocsTemplateSenderCss;
912
+
906
913
  exports.verdocs_template_fields = VerdocsTemplateFields;
914
+ exports.verdocs_template_role_properties = VerdocsTemplateRoleProperties;
907
915
  exports.verdocs_template_roles = VerdocsTemplateRoles;
916
+ exports.verdocs_template_sender = VerdocsTemplateSender;
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-70677d67.js');
6
6
  require('./Types-f89f9116.js');
7
7
  const Templates = require('./Templates-24580a13.js');
8
- const VerdocsEndpoint = require('./VerdocsEndpoint-e6517a50.js');
9
- const TemplateStore = require('./TemplateStore-b298da9c.js');
8
+ const VerdocsEndpoint = require('./VerdocsEndpoint-f2af9468.js');
9
+ const TemplateStore = require('./TemplateStore-95728963.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
11
 
12
12
  const verdocsTemplateNameCss = "";
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-70677d67.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-e6517a50.js');
8
- const TemplateStore = require('./TemplateStore-b298da9c.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-f2af9468.js');
8
+ const TemplateStore = require('./TemplateStore-95728963.js');
9
9
  const errors = require('./errors-0396da3d.js');
10
10
  require('./Templates-24580a13.js');
11
11
 
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-70677d67.js');
6
6
  require('./Types-f89f9116.js');
7
- const VerdocsEndpoint = require('./VerdocsEndpoint-e6517a50.js');
8
- const TemplateStore = require('./TemplateStore-b298da9c.js');
7
+ const VerdocsEndpoint = require('./VerdocsEndpoint-f2af9468.js');
8
+ const TemplateStore = require('./TemplateStore-95728963.js');
9
9
  const errors = require('./errors-0396da3d.js');
10
10
  require('./Templates-24580a13.js');
11
11
 
@@ -5,8 +5,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-70677d67.js');
6
6
  require('./Types-f89f9116.js');
7
7
  const Templates = require('./Templates-24580a13.js');
8
- const VerdocsEndpoint = require('./VerdocsEndpoint-e6517a50.js');
9
- const TemplateStore = require('./TemplateStore-b298da9c.js');
8
+ const VerdocsEndpoint = require('./VerdocsEndpoint-f2af9468.js');
9
+ const TemplateStore = require('./TemplateStore-95728963.js');
10
10
  const errors = require('./errors-0396da3d.js');
11
11
 
12
12
  const verdocsTemplateVisibilityCss = "verdocs-template-visibility{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-visibility.loading{min-height:300px;position:relative;display:block}verdocs-template-visibility.empty{display:none}verdocs-template-visibility form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-visibility form .description{font-size:14px;text-align:justify;color:#5c6575}verdocs-template-visibility form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0}verdocs-template-visibility form label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:500;margin:0 0 4px 0;color:#33364b}verdocs-template-visibility form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-visibility form input:focus{outline:none}verdocs-template-visibility form .input-row{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-visibility form .input-row verdocs-text-input input{text-align:center}verdocs-template-visibility form .input-row verdocs-checkbox{-ms-flex:0;flex:0;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}verdocs-template-visibility form .input-row verdocs-checkbox label>input[type=checkbox]+*::before{margin-right:0}verdocs-template-visibility .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:25px;-ms-flex-direction:row;flex-direction:row}verdocs-template-visibility ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-moz-placeholder{color:#aaaaaa}verdocs-template-visibility :-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-visibility ::placeholder{color:#aaaaaa}";
@@ -5,9 +5,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-70677d67.js');
6
6
  const Envelopes = require('./Envelopes-699531b7.js');
7
7
  const Types = require('./Types-f89f9116.js');
8
- const VerdocsEndpoint = require('./VerdocsEndpoint-e6517a50.js');
8
+ const VerdocsEndpoint = require('./VerdocsEndpoint-f2af9468.js');
9
9
  const Primitives = require('./Primitives-be5088cb.js');
10
- const utils = require('./utils-461b1a90.js');
10
+ const utils = require('./utils-12a82a63.js');
11
11
  const errors = require('./errors-0396da3d.js');
12
12
  require('./_commonjsHelpers-0c557e26.js');
13
13
  require('./Files-4bdc0c0f.js');