@verdocs/web-sdk 1.10.1 → 1.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/dist/cjs/Roles-927719de.js +28 -0
  2. package/dist/cjs/{VerdocsEndpoint-38feb32a.js → VerdocsEndpoint-25056c73.js} +42 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/verdocs-auth.cjs.entry.js +1 -2
  5. package/dist/cjs/verdocs-build.cjs.entry.js +1 -2
  6. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -2
  8. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -2
  9. package/dist/cjs/verdocs-help-icon_2.cjs.entry.js +11 -8
  10. package/dist/cjs/verdocs-preview.cjs.entry.js +1 -2
  11. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -2
  12. package/dist/cjs/verdocs-radio-button.cjs.entry.js +23 -0
  13. package/dist/cjs/verdocs-search.cjs.entry.js +1 -2
  14. package/dist/cjs/verdocs-send.cjs.entry.js +1 -2
  15. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -2
  16. package/dist/cjs/verdocs-template-attachments.cjs.entry.js +53 -0
  17. package/dist/cjs/verdocs-template-create_2.cjs.entry.js +1 -2
  18. package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -3
  19. package/dist/cjs/verdocs-template-properties.cjs.entry.js +1 -2
  20. package/dist/cjs/verdocs-template-recipients.cjs.entry.js +159 -136
  21. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +3 -4
  22. package/dist/cjs/verdocs-template-role-properties_2.cjs.entry.js +228 -0
  23. package/dist/cjs/verdocs-template-visibility.cjs.entry.js +3 -4
  24. package/dist/cjs/verdocs-view.cjs.entry.js +1 -2
  25. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  26. package/dist/collection/collection-manifest.json +3 -1
  27. package/dist/collection/components/controls/verdocs-help-icon/verdocs-help-icon.css +5 -0
  28. package/dist/collection/components/controls/verdocs-select-input/verdocs-select-input.css +1 -1
  29. package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.js +20 -1
  30. package/dist/collection/components/elements/verdocs-contact-picker/verdocs-contact-picker.stories.js +1 -1
  31. package/dist/collection/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.stories.js +1 -1
  32. package/dist/collection/components/templates/verdocs-template-attachments/verdocs-template-attachments.css +23 -0
  33. package/dist/collection/components/templates/verdocs-template-attachments/verdocs-template-attachments.js +137 -0
  34. package/dist/collection/components/templates/verdocs-template-attachments/verdocs-template-attachments.stories.js +19 -0
  35. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.stories.js +2 -2
  36. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +2 -3
  37. package/dist/collection/components/templates/verdocs-template-name/verdocs-template-name.css +3 -2
  38. package/dist/collection/components/templates/verdocs-template-name/verdocs-template-name.stories.js +4 -4
  39. package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.stories.js +2 -2
  40. package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.css +89 -30
  41. package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.js +154 -133
  42. package/dist/collection/components/templates/verdocs-template-recipients/verdocs-template-recipients.stories.js +5 -4
  43. package/dist/collection/components/templates/verdocs-template-reminders/verdocs-template-reminders.css +7 -0
  44. package/dist/collection/components/templates/verdocs-template-reminders/verdocs-template-reminders.js +2 -2
  45. package/dist/collection/components/templates/verdocs-template-reminders/verdocs-template-reminders.stories.js +2 -2
  46. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.css +105 -0
  47. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +303 -0
  48. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.stories.js +13 -0
  49. package/dist/collection/components/{dialogs/verdocs-template-sender-dialog/verdocs-template-sender-dialog.css → templates/verdocs-template-sender/verdocs-template-sender.css} +11 -11
  50. package/dist/collection/components/templates/verdocs-template-sender/verdocs-template-sender.js +193 -0
  51. package/dist/collection/components/templates/verdocs-template-sender/verdocs-template-sender.stories.js +13 -0
  52. package/dist/collection/components/templates/verdocs-template-visibillity/verdocs-template-visibility.css +14 -6
  53. package/dist/collection/components/templates/verdocs-template-visibillity/verdocs-template-visibility.js +2 -2
  54. package/dist/collection/components/templates/verdocs-template-visibillity/verdocs-template-visibility.stories.js +2 -2
  55. package/dist/components/VerdocsEndpoint.js +43 -1
  56. package/dist/components/index.d.ts +3 -1
  57. package/dist/components/index.js +3 -1
  58. package/dist/components/verdocs-auth.js +8 -3
  59. package/dist/components/verdocs-build.js +0 -1
  60. package/dist/components/verdocs-contact-picker2.js +0 -1
  61. package/dist/components/verdocs-envelope-sidebar.js +0 -1
  62. package/dist/components/verdocs-field-date.js +8 -2
  63. package/dist/components/verdocs-field-initial.js +10 -4
  64. package/dist/components/verdocs-field-signature.js +10 -4
  65. package/dist/components/verdocs-field-textarea.js +8 -2
  66. package/dist/components/verdocs-field-textbox.js +8 -2
  67. package/dist/components/verdocs-field-timestamp.js +8 -2
  68. package/dist/components/verdocs-help-icon2.js +1 -1
  69. package/dist/components/verdocs-initial-dialog2.js +8 -2
  70. package/dist/components/verdocs-preview.js +0 -1
  71. package/dist/components/verdocs-quick-functions2.js +0 -1
  72. package/dist/components/verdocs-search-activity2.js +0 -1
  73. package/dist/components/verdocs-search-box2.js +0 -1
  74. package/dist/components/verdocs-search.js +0 -1
  75. package/dist/components/verdocs-select-input2.js +1 -1
  76. package/dist/components/verdocs-send.js +1 -2
  77. package/dist/components/verdocs-sign.js +1 -2
  78. package/dist/components/verdocs-signature-dialog2.js +8 -2
  79. package/dist/components/verdocs-template-attachments.d.ts +11 -0
  80. package/dist/components/verdocs-template-attachments.js +73 -0
  81. package/dist/components/verdocs-template-create2.js +0 -1
  82. package/dist/components/verdocs-template-fields2.js +0 -1
  83. package/dist/components/verdocs-template-name.js +9 -4
  84. package/dist/components/verdocs-template-properties.js +12 -7
  85. package/dist/components/verdocs-template-recipients.js +186 -137
  86. package/dist/components/verdocs-template-reminders.js +14 -9
  87. package/dist/components/verdocs-template-role-properties.d.ts +11 -0
  88. package/dist/components/verdocs-template-role-properties.js +6 -0
  89. package/dist/components/verdocs-template-role-properties2.js +229 -0
  90. package/dist/components/verdocs-template-sender.d.ts +11 -0
  91. package/dist/components/verdocs-template-sender.js +6 -0
  92. package/dist/components/verdocs-template-sender2.js +116 -0
  93. package/dist/components/verdocs-template-visibility.js +2 -3
  94. package/dist/components/verdocs-text-input2.js +10 -2
  95. package/dist/components/verdocs-view2.js +0 -1
  96. package/dist/custom-elements.json +82 -6
  97. package/dist/docs.json +399 -33
  98. package/dist/esm/Roles-2488d047.js +24 -0
  99. package/dist/esm/{VerdocsEndpoint-6df32d3a.js → VerdocsEndpoint-7f17b088.js} +43 -1
  100. package/dist/esm/loader.js +1 -1
  101. package/dist/esm/verdocs-auth.entry.js +1 -2
  102. package/dist/esm/verdocs-build.entry.js +1 -2
  103. package/dist/esm/verdocs-button-panel_2.entry.js +1 -1
  104. package/dist/esm/verdocs-contact-picker.entry.js +1 -2
  105. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -2
  106. package/dist/esm/verdocs-help-icon_2.entry.js +11 -8
  107. package/dist/esm/verdocs-preview.entry.js +1 -2
  108. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -2
  109. package/dist/esm/verdocs-radio-button.entry.js +19 -0
  110. package/dist/esm/verdocs-search.entry.js +1 -2
  111. package/dist/esm/verdocs-send.entry.js +1 -2
  112. package/dist/esm/verdocs-sign.entry.js +1 -2
  113. package/dist/esm/verdocs-template-attachments.entry.js +49 -0
  114. package/dist/esm/verdocs-template-create_2.entry.js +1 -2
  115. package/dist/esm/verdocs-template-name.entry.js +2 -3
  116. package/dist/esm/verdocs-template-properties.entry.js +1 -2
  117. package/dist/esm/verdocs-template-recipients.entry.js +155 -132
  118. package/dist/esm/verdocs-template-reminders.entry.js +3 -4
  119. package/dist/esm/verdocs-template-role-properties_2.entry.js +223 -0
  120. package/dist/esm/verdocs-template-visibility.entry.js +3 -4
  121. package/dist/esm/verdocs-view.entry.js +1 -2
  122. package/dist/esm/verdocs-web-sdk.js +1 -1
  123. package/dist/esm-es5/Roles-2488d047.js +1 -0
  124. package/dist/esm-es5/VerdocsEndpoint-7f17b088.js +1 -0
  125. package/dist/esm-es5/loader.js +1 -1
  126. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  127. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  128. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  129. package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-help-icon_2.entry.js +1 -1
  132. package/dist/esm-es5/verdocs-preview.entry.js +1 -1
  133. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  134. package/dist/esm-es5/verdocs-radio-button.entry.js +1 -0
  135. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  136. package/dist/esm-es5/verdocs-send.entry.js +1 -1
  137. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  138. package/dist/esm-es5/verdocs-template-attachments.entry.js +1 -0
  139. package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
  140. package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
  141. package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
  142. package/dist/esm-es5/verdocs-template-recipients.entry.js +1 -1
  143. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  144. package/dist/esm-es5/verdocs-template-role-properties_2.entry.js +1 -0
  145. package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
  146. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  147. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  148. package/dist/types/components/controls/verdocs-text-input/verdocs-text-input.d.ts +4 -0
  149. package/dist/types/components/templates/verdocs-template-attachments/verdocs-template-attachments.d.ts +29 -0
  150. package/dist/types/components/templates/verdocs-template-attachments/verdocs-template-attachments.stories.d.ts +7 -0
  151. package/dist/types/components/templates/verdocs-template-create/verdocs-template-create.stories.d.ts +1 -1
  152. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.stories.d.ts +1 -1
  153. package/dist/types/components/templates/verdocs-template-name/verdocs-template-name.stories.d.ts +1 -1
  154. package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.stories.d.ts +1 -1
  155. package/dist/types/components/templates/verdocs-template-recipients/verdocs-template-recipients.d.ts +8 -15
  156. package/dist/types/components/templates/verdocs-template-recipients/verdocs-template-recipients.stories.d.ts +1 -1
  157. package/dist/types/components/templates/verdocs-template-reminders/verdocs-template-reminders.d.ts +1 -1
  158. package/dist/types/components/templates/verdocs-template-reminders/verdocs-template-reminders.stories.d.ts +1 -1
  159. package/dist/types/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.d.ts +56 -0
  160. package/dist/types/components/{dialogs/verdocs-template-sender-dialog/verdocs-template-sender-dialog.stories.d.ts → templates/verdocs-template-role-properties/verdocs-template-role-properties.stories.d.ts} +2 -3
  161. package/dist/types/components/templates/verdocs-template-sender/verdocs-template-sender.d.ts +36 -0
  162. package/dist/types/components/templates/verdocs-template-sender/verdocs-template-sender.stories.d.ts +7 -0
  163. package/dist/types/components/templates/verdocs-template-visibillity/verdocs-template-visibility.d.ts +1 -1
  164. package/dist/types/components/templates/verdocs-template-visibillity/verdocs-template-visibility.stories.d.ts +1 -1
  165. package/dist/types/components.d.ts +144 -18
  166. package/dist/verdocs-web-sdk/p-0ee57bd9.entry.js +1 -0
  167. package/dist/verdocs-web-sdk/p-12c732a7.entry.js +1 -0
  168. package/dist/verdocs-web-sdk/p-130fe919.system.entry.js +1 -0
  169. package/dist/verdocs-web-sdk/p-15aef735.entry.js +1 -0
  170. package/dist/verdocs-web-sdk/p-19849b9e.entry.js +1 -0
  171. package/dist/verdocs-web-sdk/p-205027db.entry.js +1 -0
  172. package/dist/verdocs-web-sdk/p-2144b8be.entry.js +1 -0
  173. package/dist/verdocs-web-sdk/p-261dcea1.system.js +1 -0
  174. package/dist/verdocs-web-sdk/p-26b4ae0d.system.entry.js +1 -0
  175. package/dist/verdocs-web-sdk/p-285eaf3c.system.entry.js +1 -0
  176. package/dist/verdocs-web-sdk/p-2d4712ea.js +1 -0
  177. package/dist/verdocs-web-sdk/p-34db97b7.entry.js +1 -0
  178. package/dist/verdocs-web-sdk/p-37a493a6.entry.js +1 -0
  179. package/dist/verdocs-web-sdk/p-3da4b4cb.entry.js +1 -0
  180. package/dist/verdocs-web-sdk/p-3fbe602a.system.entry.js +1 -0
  181. package/dist/verdocs-web-sdk/p-4352529d.entry.js +1 -0
  182. package/dist/verdocs-web-sdk/p-464adbad.system.entry.js +1 -0
  183. package/dist/verdocs-web-sdk/p-4a1c9aa1.system.entry.js +1 -0
  184. package/dist/verdocs-web-sdk/p-50d7e990.system.entry.js +1 -0
  185. package/dist/verdocs-web-sdk/p-5ee985be.system.entry.js +1 -0
  186. package/dist/verdocs-web-sdk/p-6121f103.system.entry.js +1 -0
  187. package/dist/verdocs-web-sdk/{p-45ac2230.system.entry.js → p-61b824ca.system.entry.js} +1 -1
  188. package/dist/verdocs-web-sdk/p-74e1ae92.entry.js +1 -0
  189. package/dist/verdocs-web-sdk/p-7b111f2b.system.entry.js +1 -0
  190. package/dist/verdocs-web-sdk/p-7d909ce4.entry.js +1 -0
  191. package/dist/verdocs-web-sdk/p-8c53e0ff.system.entry.js +1 -0
  192. package/dist/verdocs-web-sdk/p-91539130.entry.js +1 -0
  193. package/dist/verdocs-web-sdk/p-9717a531.system.entry.js +1 -0
  194. package/dist/verdocs-web-sdk/p-98aa17a8.system.entry.js +1 -0
  195. package/dist/verdocs-web-sdk/p-9b854a18.system.entry.js +1 -0
  196. package/dist/verdocs-web-sdk/p-9f17b920.entry.js +1 -0
  197. package/dist/verdocs-web-sdk/p-a17a81a3.entry.js +1 -0
  198. package/dist/verdocs-web-sdk/p-a6872a88.system.entry.js +1 -0
  199. package/dist/verdocs-web-sdk/p-b4fee0ae.system.entry.js +1 -0
  200. package/dist/verdocs-web-sdk/p-bda7353b.entry.js +1 -0
  201. package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
  202. package/dist/verdocs-web-sdk/p-cd70bb21.system.entry.js +1 -0
  203. package/dist/verdocs-web-sdk/p-d08fca9c.entry.js +1 -0
  204. package/dist/verdocs-web-sdk/p-d5a95369.entry.js +1 -0
  205. package/dist/verdocs-web-sdk/p-daedc6c2.system.entry.js +1 -0
  206. package/dist/verdocs-web-sdk/p-de5c37cd.system.entry.js +1 -0
  207. package/dist/verdocs-web-sdk/p-df4f1a5e.entry.js +1 -0
  208. package/dist/verdocs-web-sdk/p-e223553c.system.entry.js +1 -0
  209. package/dist/verdocs-web-sdk/{p-6b205bb5.entry.js → p-ead5322f.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/p-f3e9be57.entry.js +1 -0
  211. package/dist/verdocs-web-sdk/p-fbc81799.system.js +1 -0
  212. package/dist/verdocs-web-sdk/p-ffe60abd.js +1 -0
  213. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  214. package/package.json +5 -4
  215. package/dist/cjs/Types-da57ce69.js +0 -43
  216. package/dist/cjs/verdocs-template-sender-dialog.cjs.entry.js +0 -43
  217. package/dist/cjs/verdocs-text-input.cjs.entry.js +0 -25
  218. package/dist/collection/components/dialogs/verdocs-template-sender-dialog/verdocs-template-sender-dialog.js +0 -114
  219. package/dist/collection/components/dialogs/verdocs-template-sender-dialog/verdocs-template-sender-dialog.stories.js +0 -46
  220. package/dist/components/Types.js +0 -43
  221. package/dist/components/verdocs-template-sender-dialog.d.ts +0 -11
  222. package/dist/components/verdocs-template-sender-dialog.js +0 -6
  223. package/dist/components/verdocs-template-sender-dialog2.js +0 -75
  224. package/dist/esm/Types-ab9f6af8.js +0 -43
  225. package/dist/esm/verdocs-template-sender-dialog.entry.js +0 -39
  226. package/dist/esm/verdocs-text-input.entry.js +0 -21
  227. package/dist/esm-es5/Types-ab9f6af8.js +0 -1
  228. package/dist/esm-es5/VerdocsEndpoint-6df32d3a.js +0 -1
  229. package/dist/esm-es5/verdocs-template-sender-dialog.entry.js +0 -1
  230. package/dist/esm-es5/verdocs-text-input.entry.js +0 -1
  231. package/dist/types/components/dialogs/verdocs-template-sender-dialog/verdocs-template-sender-dialog.d.ts +0 -26
  232. package/dist/verdocs-web-sdk/p-069fcbbe.system.entry.js +0 -1
  233. package/dist/verdocs-web-sdk/p-09cd92b4.system.entry.js +0 -1
  234. package/dist/verdocs-web-sdk/p-0e06dc54.entry.js +0 -1
  235. package/dist/verdocs-web-sdk/p-11c26f99.system.entry.js +0 -1
  236. package/dist/verdocs-web-sdk/p-17fd7860.entry.js +0 -1
  237. package/dist/verdocs-web-sdk/p-1dc5393d.entry.js +0 -1
  238. package/dist/verdocs-web-sdk/p-1f06f0d0.entry.js +0 -1
  239. package/dist/verdocs-web-sdk/p-266e163c.entry.js +0 -1
  240. package/dist/verdocs-web-sdk/p-26f16c4a.system.entry.js +0 -1
  241. package/dist/verdocs-web-sdk/p-2e4dfdc6.js +0 -1
  242. package/dist/verdocs-web-sdk/p-34a2538f.system.entry.js +0 -1
  243. package/dist/verdocs-web-sdk/p-453218bc.system.entry.js +0 -1
  244. package/dist/verdocs-web-sdk/p-46bb5543.system.entry.js +0 -1
  245. package/dist/verdocs-web-sdk/p-4a09c8df.entry.js +0 -1
  246. package/dist/verdocs-web-sdk/p-4edc67af.system.entry.js +0 -1
  247. package/dist/verdocs-web-sdk/p-5231a690.system.entry.js +0 -1
  248. package/dist/verdocs-web-sdk/p-52be34b3.system.entry.js +0 -1
  249. package/dist/verdocs-web-sdk/p-54102f3d.entry.js +0 -1
  250. package/dist/verdocs-web-sdk/p-5f09d34b.system.entry.js +0 -1
  251. package/dist/verdocs-web-sdk/p-619098f5.entry.js +0 -1
  252. package/dist/verdocs-web-sdk/p-6f742462.entry.js +0 -1
  253. package/dist/verdocs-web-sdk/p-7abcf805.entry.js +0 -1
  254. package/dist/verdocs-web-sdk/p-7d855960.entry.js +0 -1
  255. package/dist/verdocs-web-sdk/p-86a8b6ad.system.entry.js +0 -1
  256. package/dist/verdocs-web-sdk/p-898b46ce.entry.js +0 -1
  257. package/dist/verdocs-web-sdk/p-8a2dbb48.entry.js +0 -1
  258. package/dist/verdocs-web-sdk/p-8cf35e23.entry.js +0 -1
  259. package/dist/verdocs-web-sdk/p-8d36c969.system.entry.js +0 -1
  260. package/dist/verdocs-web-sdk/p-8efc9749.js +0 -1
  261. package/dist/verdocs-web-sdk/p-952b9288.system.entry.js +0 -1
  262. package/dist/verdocs-web-sdk/p-a0b23dbe.system.entry.js +0 -1
  263. package/dist/verdocs-web-sdk/p-a39b334f.entry.js +0 -1
  264. package/dist/verdocs-web-sdk/p-a4dc6a79.system.js +0 -1
  265. package/dist/verdocs-web-sdk/p-a7433630.system.js +0 -1
  266. package/dist/verdocs-web-sdk/p-acfa887e.entry.js +0 -1
  267. package/dist/verdocs-web-sdk/p-b505db92.system.entry.js +0 -1
  268. package/dist/verdocs-web-sdk/p-bdce7b62.system.entry.js +0 -1
  269. package/dist/verdocs-web-sdk/p-cf8f8562.entry.js +0 -1
  270. package/dist/verdocs-web-sdk/p-d876f216.system.entry.js +0 -1
  271. package/dist/verdocs-web-sdk/p-e1da9867.entry.js +0 -1
  272. package/dist/verdocs-web-sdk/p-e5ed6342.entry.js +0 -1
  273. package/dist/verdocs-web-sdk/p-e9e83cbb.system.entry.js +0 -1
@@ -0,0 +1,303 @@
1
+ import { VerdocsEndpoint } from '@verdocs/js-sdk';
2
+ import { deleteRole, updateRole } from '@verdocs/js-sdk/Templates/Roles';
3
+ import { h, Host } from '@stencil/core';
4
+ import { TemplateSenderTypes } from '@verdocs/js-sdk/Templates/Types';
5
+ import TemplateStore from '../../../utils/templateStore';
6
+ import { loadTemplate } from '../../../utils/Templates';
7
+ import { SDKError } from '../../../utils/errors';
8
+ 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>`;
9
+ /**
10
+ * Display a dialog that allows a template sender to be selected.
11
+ */
12
+ export class VerdocsTemplateRoleProperties {
13
+ constructor() {
14
+ this.endpoint = VerdocsEndpoint.getDefault();
15
+ this.templateId = '';
16
+ this.roleName = '';
17
+ this.sender = TemplateSenderTypes.EVERYONE;
18
+ this.dirty = false;
19
+ this.saving = false;
20
+ this.name = '';
21
+ this.type = 'signer';
22
+ this.fullName = '';
23
+ this.email = '';
24
+ this.phone = '';
25
+ this.allowDelegation = false;
26
+ }
27
+ async componentWillLoad() {
28
+ var _a, _b, _c, _d, _e, _f;
29
+ try {
30
+ this.endpoint.loadSession();
31
+ if (!this.templateId) {
32
+ console.log(`[TEMPLATE ROLE PROPERTIES] Missing required template ID ${this.templateId}`);
33
+ return;
34
+ }
35
+ if (!this.endpoint.session) {
36
+ console.log('[TEMPLATE ROLE PROPERTIES] Unable to start builder session, must be authenticated');
37
+ return;
38
+ }
39
+ try {
40
+ console.log(`[TEMPLATE ROLE PROPERTIES] Loading template ${this.templateId}`, this.endpoint.session);
41
+ await loadTemplate(this.endpoint, this.templateId);
42
+ }
43
+ catch (e) {
44
+ console.log('[TEMPLATE ROLE PROPERTIES] Error loading template', e);
45
+ (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new 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));
46
+ }
47
+ const editingRole = TemplateStore.template.roles.find(role => role.name === this.roleName);
48
+ if (editingRole) {
49
+ this.name = editingRole.name;
50
+ this.type = editingRole.type;
51
+ this.fullName = editingRole.full_name;
52
+ this.email = editingRole.email;
53
+ this.phone = editingRole.phone;
54
+ this.allowDelegation = editingRole.delegator;
55
+ console.log('Got role', editingRole);
56
+ }
57
+ }
58
+ catch (e) {
59
+ console.log('[TEMPLATE ROLE PROPERTIES] Error with preview session', e);
60
+ (_d = this.sdkError) === null || _d === void 0 ? void 0 : _d.emit(new SDKError(e.message, (_e = e.response) === null || _e === void 0 ? void 0 : _e.status, (_f = e.response) === null || _f === void 0 ? void 0 : _f.data));
61
+ }
62
+ }
63
+ handleCancel(e) {
64
+ var _a;
65
+ e.stopPropagation();
66
+ this.name = TemplateStore.template.name;
67
+ this.dirty = false;
68
+ (_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
69
+ }
70
+ async handleSave(e) {
71
+ e.stopPropagation();
72
+ this.saving = true;
73
+ updateRole(this.endpoint, this.templateId, this.roleName, {
74
+ name: this.name,
75
+ type: this.type,
76
+ full_name: this.fullName,
77
+ email: this.email,
78
+ phone: this.phone,
79
+ delegator: this.allowDelegation,
80
+ })
81
+ .then(r => {
82
+ var _a;
83
+ console.log('Update result', r);
84
+ this.saving = false;
85
+ this.dirty = false;
86
+ TemplateStore.template.roles.forEach(role => {
87
+ if (role.name === this.roleName) {
88
+ role.name = this.name;
89
+ role.type = this.type;
90
+ role.full_name = this.fullName;
91
+ role.email = this.email;
92
+ role.phone = this.phone;
93
+ role.delegator = this.allowDelegation;
94
+ }
95
+ });
96
+ (_a = this.close) === null || _a === void 0 ? void 0 : _a.emit();
97
+ })
98
+ .catch(e => {
99
+ console.log('Uopdate error', e);
100
+ this.saving = false;
101
+ });
102
+ }
103
+ async handleDelete(e) {
104
+ e.stopPropagation();
105
+ 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.')) {
106
+ deleteRole(this.endpoint, this.templateId, this.roleName)
107
+ .then(r => {
108
+ var _a;
109
+ console.log('Role deleted', r);
110
+ TemplateStore.template.roles = [...TemplateStore.template.roles.filter(role => role.name !== this.roleName)];
111
+ (_a = this.delete) === null || _a === void 0 ? void 0 : _a.emit({ templateId: this.templateId, roleName: this.roleName });
112
+ })
113
+ .catch(e => {
114
+ console.log('Deletion error', e);
115
+ });
116
+ }
117
+ }
118
+ render() {
119
+ return (h(Host, null, h("div", { class: "background-overlay", onClick: e => this.handleCancel(e) }, h("div", { class: "dialog" }, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("verdocs-text-input", { id: "verdocs-recipient-name", label: "Role Name", value: this.name, autocomplete: "off", helpText: "A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.", placeholder: "Template Name...", onInput: (e) => {
120
+ this.name = e.target.value;
121
+ this.dirty = true;
122
+ } }), h("div", { class: "row" }, h("div", { class: "input-label" }, "Type:"), h("verdocs-select-input", { value: this.type, options: [
123
+ { label: 'Signer', value: 'signer' },
124
+ { label: 'CC', value: 'cc' },
125
+ { label: 'Approver', value: 'approver' },
126
+ ], onInput: (e) => {
127
+ this.type = e.target.value;
128
+ this.dirty = true;
129
+ } }), 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." })), 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) => {
130
+ this.fullName = e.target.value;
131
+ this.dirty = true;
132
+ } }), 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) => {
133
+ this.email = e.target.value;
134
+ this.dirty = true;
135
+ } }), 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) => {
136
+ this.phone = e.target.value;
137
+ this.dirty = true;
138
+ } }), h("div", { class: "row" }, h("div", { class: "input-label" }, "May Delegate:"), h("div", { class: "checkbox-wrapper" }, h("verdocs-checkbox", { checked: this.allowDelegation, onInput: (e) => {
139
+ this.allowDelegation = e.target.checked;
140
+ this.dirty = true;
141
+ } })), h("verdocs-help-icon", { text: "If enabled, this recipient may delegate their actions to another individual." })), h("div", { class: "buttons" }, h("button", { class: "delete-button", disabled: this.dirty, onClick: e => this.handleDelete(e), innerHTML: TrashIcon }), h("div", { style: { flex: '1' } }), h("verdocs-button", { size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), h("verdocs-button", { size: "small", label: "Save", disabled: !this.dirty, onClick: e => this.handleSave(e) })))))));
142
+ }
143
+ static get is() { return "verdocs-template-role-properties"; }
144
+ static get originalStyleUrls() {
145
+ return {
146
+ "$": ["verdocs-template-role-properties.scss"]
147
+ };
148
+ }
149
+ static get styleUrls() {
150
+ return {
151
+ "$": ["verdocs-template-role-properties.css"]
152
+ };
153
+ }
154
+ static get properties() {
155
+ return {
156
+ "endpoint": {
157
+ "type": "unknown",
158
+ "mutable": false,
159
+ "complexType": {
160
+ "original": "VerdocsEndpoint",
161
+ "resolved": "VerdocsEndpoint",
162
+ "references": {
163
+ "VerdocsEndpoint": {
164
+ "location": "import",
165
+ "path": "@verdocs/js-sdk"
166
+ }
167
+ }
168
+ },
169
+ "required": false,
170
+ "optional": false,
171
+ "docs": {
172
+ "tags": [],
173
+ "text": "The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used."
174
+ },
175
+ "defaultValue": "VerdocsEndpoint.getDefault()"
176
+ },
177
+ "templateId": {
178
+ "type": "string",
179
+ "mutable": false,
180
+ "complexType": {
181
+ "original": "string",
182
+ "resolved": "string",
183
+ "references": {}
184
+ },
185
+ "required": false,
186
+ "optional": false,
187
+ "docs": {
188
+ "tags": [],
189
+ "text": "The template ID to edit."
190
+ },
191
+ "attribute": "template-id",
192
+ "reflect": false,
193
+ "defaultValue": "''"
194
+ },
195
+ "roleName": {
196
+ "type": "string",
197
+ "mutable": false,
198
+ "complexType": {
199
+ "original": "string",
200
+ "resolved": "string",
201
+ "references": {}
202
+ },
203
+ "required": false,
204
+ "optional": false,
205
+ "docs": {
206
+ "tags": [],
207
+ "text": "The role name to edit."
208
+ },
209
+ "attribute": "role-name",
210
+ "reflect": false,
211
+ "defaultValue": "''"
212
+ },
213
+ "sender": {
214
+ "type": "string",
215
+ "mutable": false,
216
+ "complexType": {
217
+ "original": "TTemplateSender",
218
+ "resolved": "\"creator\" | \"everyone\" | \"everyone_as_creator\" | \"organization_member\" | \"organization_member_as_creator\"",
219
+ "references": {
220
+ "TTemplateSender": {
221
+ "location": "import",
222
+ "path": "@verdocs/js-sdk/Templates/Types"
223
+ }
224
+ }
225
+ },
226
+ "required": false,
227
+ "optional": false,
228
+ "docs": {
229
+ "tags": [],
230
+ "text": "Whether the dialog is currently being displayed. This allows it to be added to the DOM before being displayed."
231
+ },
232
+ "attribute": "sender",
233
+ "reflect": false,
234
+ "defaultValue": "TemplateSenderTypes.EVERYONE"
235
+ }
236
+ };
237
+ }
238
+ static get states() {
239
+ return {
240
+ "dirty": {},
241
+ "saving": {},
242
+ "name": {},
243
+ "type": {},
244
+ "fullName": {},
245
+ "email": {},
246
+ "phone": {},
247
+ "allowDelegation": {}
248
+ };
249
+ }
250
+ static get events() {
251
+ return [{
252
+ "method": "close",
253
+ "name": "close",
254
+ "bubbles": true,
255
+ "cancelable": true,
256
+ "composed": true,
257
+ "docs": {
258
+ "tags": [],
259
+ "text": "Event fired when the user cancels the dialog."
260
+ },
261
+ "complexType": {
262
+ "original": "any",
263
+ "resolved": "any",
264
+ "references": {}
265
+ }
266
+ }, {
267
+ "method": "delete",
268
+ "name": "delete",
269
+ "bubbles": true,
270
+ "cancelable": true,
271
+ "composed": true,
272
+ "docs": {
273
+ "tags": [],
274
+ "text": "Event fired when the user deletes the role. The parent should update its UI to reflect the removal. When this event is emitted,\nthe role will have already been deleted server-side."
275
+ },
276
+ "complexType": {
277
+ "original": "{templateId: string; roleName: string}",
278
+ "resolved": "{ templateId: string; roleName: string; }",
279
+ "references": {}
280
+ }
281
+ }, {
282
+ "method": "sdkError",
283
+ "name": "sdkError",
284
+ "bubbles": true,
285
+ "cancelable": true,
286
+ "composed": true,
287
+ "docs": {
288
+ "tags": [],
289
+ "text": "Event fired if an error occurs. The event details will contain information about the error. Most errors will\nterminate the process, and the calling application should correct the condition and re-render the component."
290
+ },
291
+ "complexType": {
292
+ "original": "SDKError",
293
+ "resolved": "SDKError",
294
+ "references": {
295
+ "SDKError": {
296
+ "location": "import",
297
+ "path": "../../../utils/errors"
298
+ }
299
+ }
300
+ }
301
+ }];
302
+ }
303
+ }
@@ -0,0 +1,13 @@
1
+ import { html } from 'lit-html';
2
+ export default {
3
+ title: 'Templates/Role Properties',
4
+ component: 'verdocs-template-role-properties',
5
+ args: {
6
+ templateId: '056b837f-b183-4039-b50a-d68acbf81b67',
7
+ // templateId: 'd2338742-f3a1-465b-8592-806587413cc1',
8
+ },
9
+ argTypes: {
10
+ onClose: { action: 'close' },
11
+ },
12
+ };
13
+ export const RoleProperties = ({ value, onClose }) => html `<verdocs-template-role-properties .value=${value} @close=${onClose} />`;
@@ -1,11 +1,11 @@
1
- verdocs-template-sender-dialog {
1
+ verdocs-template-sender {
2
2
  font-family: "Barlow", sans-serif;
3
3
  box-sizing: border-box;
4
4
  }
5
- verdocs-template-sender-dialog div {
5
+ verdocs-template-sender div {
6
6
  box-sizing: border-box;
7
7
  }
8
- verdocs-template-sender-dialog .background-overlay {
8
+ verdocs-template-sender .background-overlay {
9
9
  position: absolute;
10
10
  z-index: 10000;
11
11
  top: 0;
@@ -17,7 +17,7 @@ verdocs-template-sender-dialog .background-overlay {
17
17
  justify-content: center;
18
18
  background: #0000007f;
19
19
  }
20
- verdocs-template-sender-dialog .dialog {
20
+ verdocs-template-sender .dialog {
21
21
  width: 340px;
22
22
  display: flex;
23
23
  flex-direction: column;
@@ -27,33 +27,33 @@ verdocs-template-sender-dialog .dialog {
27
27
  padding: 16px;
28
28
  box-shadow: 3px 3px 5px 1px rgba(40, 40, 40, 0.4);
29
29
  }
30
- verdocs-template-sender-dialog .heading {
30
+ verdocs-template-sender .heading {
31
31
  display: flex;
32
32
  font-size: 20px;
33
33
  font-weight: 500;
34
34
  flex-direction: row;
35
35
  }
36
- verdocs-template-sender-dialog .buttons {
36
+ verdocs-template-sender .buttons {
37
37
  display: flex;
38
38
  margin-top: 10px;
39
39
  align-items: center;
40
40
  flex-direction: row;
41
41
  justify-content: flex-end;
42
42
  }
43
- verdocs-template-sender-dialog .buttons verdocs-button {
43
+ verdocs-template-sender .buttons verdocs-button {
44
44
  margin-left: 16px;
45
45
  }
46
- verdocs-template-sender-dialog .options {
46
+ verdocs-template-sender .options {
47
47
  row-gap: 10px;
48
48
  }
49
- verdocs-template-sender-dialog .options .option {
49
+ verdocs-template-sender .options .option {
50
50
  display: flex;
51
51
  flex-direction: row;
52
52
  }
53
- verdocs-template-sender-dialog .options .option .description {
53
+ verdocs-template-sender .options .option .description {
54
54
  margin-left: 10px;
55
55
  }
56
- verdocs-template-sender-dialog .options .option .description .name {
56
+ verdocs-template-sender .options .option .description .name {
57
57
  display: inline-block;
58
58
  vertical-align: top;
59
59
  margin-top: 4px;
@@ -0,0 +1,193 @@
1
+ import { VerdocsEndpoint } from '@verdocs/js-sdk';
2
+ import { updateTemplate } from '@verdocs/js-sdk/Templates/Templates';
3
+ import { h, Host } from '@stencil/core';
4
+ import { TemplateSenderTypes } from '@verdocs/js-sdk/Templates/Types';
5
+ import TemplateStore from '../../../utils/templateStore';
6
+ import { loadTemplate } from '../../../utils/Templates';
7
+ import { SDKError } from '../../../utils/errors';
8
+ /**
9
+ * Display a dialog that allows a template sender to be selected.
10
+ */
11
+ export class VerdocsTemplateSender {
12
+ constructor() {
13
+ this.endpoint = VerdocsEndpoint.getDefault();
14
+ this.templateId = '';
15
+ this.sender = TemplateSenderTypes.EVERYONE;
16
+ this.saving = false;
17
+ }
18
+ async componentWillLoad() {
19
+ var _a, _b, _c, _d, _e, _f;
20
+ try {
21
+ this.endpoint.loadSession();
22
+ if (!this.templateId) {
23
+ console.log(`[TEMPLATE SENDER] Missing required template ID ${this.templateId}`);
24
+ return;
25
+ }
26
+ if (!this.endpoint.session) {
27
+ console.log('[TEMPLATE SENDER] Unable to start builder session, must be authenticated');
28
+ return;
29
+ }
30
+ try {
31
+ console.log(`[TEMPLATE SENDER] Loading template ${this.templateId}`, this.endpoint.session);
32
+ await loadTemplate(this.endpoint, this.templateId);
33
+ }
34
+ catch (e) {
35
+ console.log('[TEMPLATE SENDER] Error loading template', e);
36
+ (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new 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));
37
+ }
38
+ this.sender = TemplateStore.template.sender;
39
+ console.log('s', this.sender);
40
+ }
41
+ catch (e) {
42
+ console.log('[TEMPLATE SENDER] Error with preview session', e);
43
+ (_d = this.sdkError) === null || _d === void 0 ? void 0 : _d.emit(new SDKError(e.message, (_e = e.response) === null || _e === void 0 ? void 0 : _e.status, (_f = e.response) === null || _f === void 0 ? void 0 : _f.data));
44
+ }
45
+ }
46
+ handleClose() {
47
+ this.close.emit();
48
+ }
49
+ // We need a separate event handler for clicking the background because it can receive events "through" other child components
50
+ handleDismiss(e) {
51
+ if (e.target.className === 'background-overlay') {
52
+ e.preventDefault();
53
+ this.handleClose();
54
+ }
55
+ }
56
+ async handleSelectSetting(value) {
57
+ this.saving = true;
58
+ updateTemplate(this.endpoint, this.templateId, { sender: value })
59
+ .then(r => {
60
+ console.log('Update result', r);
61
+ TemplateStore.template.sender = value;
62
+ this.saving = false;
63
+ this.sender = value;
64
+ })
65
+ .catch(e => {
66
+ console.log('Error saving', e);
67
+ this.saving = false;
68
+ });
69
+ }
70
+ render() {
71
+ return (h(Host, null, h("div", { class: "background-overlay", onClick: e => this.handleDismiss(e) }, h("div", { class: "dialog" }, h("div", { class: "options" }, h("div", { class: "option" }, h("verdocs-radio-button", { name: "template-sender", value: TemplateSenderTypes.EVERYONE, checked: this.sender === TemplateSenderTypes.EVERYONE, onInput: () => this.handleSelectSetting(TemplateSenderTypes.EVERYONE) }), h("div", { class: "description" }, h("div", { class: "name" }, "Anyone on the Web"), h("verdocs-help-icon", { text: "Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)" }))), h("div", { class: "option" }, h("verdocs-radio-button", { name: "template-sender", value: TemplateSenderTypes.EVERYONE_AS_CREATOR, checked: this.sender === TemplateSenderTypes.EVERYONE_AS_CREATOR, onInput: () => this.handleSelectSetting(TemplateSenderTypes.EVERYONE_AS_CREATOR) }), h("div", { class: "description" }, h("div", { class: "name" }, "Anyone on the Web as me"), h("verdocs-help-icon", { text: "Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)" }))), h("div", { class: "option" }, h("verdocs-radio-button", { name: "template-sender", value: TemplateSenderTypes.ORGANIZATION_MEMBER, checked: this.sender === TemplateSenderTypes.ORGANIZATION_MEMBER, onInput: () => this.handleSelectSetting(TemplateSenderTypes.ORGANIZATION_MEMBER) }), h("div", { class: "description" }, h("div", { class: "name" }, "Anyone in my organization"), h("verdocs-help-icon", { text: "Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')" }))), h("div", { class: "option" }, h("verdocs-radio-button", { name: "template-sender", value: TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR, checked: this.sender === TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR, onInput: () => this.handleSelectSetting(TemplateSenderTypes.ORGANIZATION_MEMBER_AS_CREATOR) }), h("div", { class: "description" }, h("div", { class: "name" }, "Anyone in my organization as me"), 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'.)" }))), h("div", { class: "option" }, h("verdocs-radio-button", { name: "template-sender", value: TemplateSenderTypes.CREATOR, checked: this.sender === TemplateSenderTypes.CREATOR, onInput: () => this.handleSelectSetting(TemplateSenderTypes.CREATOR) }), h("div", { class: "description" }, h("div", { class: "name" }, "Me"), h("verdocs-help-icon", { text: "Only I can use this template." })))), h("div", { class: "buttons" }, h("verdocs-button", { label: "Close", onClick: () => this.handleClose() }))))));
72
+ }
73
+ static get is() { return "verdocs-template-sender"; }
74
+ static get originalStyleUrls() {
75
+ return {
76
+ "$": ["verdocs-template-sender.scss"]
77
+ };
78
+ }
79
+ static get styleUrls() {
80
+ return {
81
+ "$": ["verdocs-template-sender.css"]
82
+ };
83
+ }
84
+ static get properties() {
85
+ return {
86
+ "endpoint": {
87
+ "type": "unknown",
88
+ "mutable": false,
89
+ "complexType": {
90
+ "original": "VerdocsEndpoint",
91
+ "resolved": "VerdocsEndpoint",
92
+ "references": {
93
+ "VerdocsEndpoint": {
94
+ "location": "import",
95
+ "path": "@verdocs/js-sdk"
96
+ }
97
+ }
98
+ },
99
+ "required": false,
100
+ "optional": false,
101
+ "docs": {
102
+ "tags": [],
103
+ "text": "The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used."
104
+ },
105
+ "defaultValue": "VerdocsEndpoint.getDefault()"
106
+ },
107
+ "templateId": {
108
+ "type": "string",
109
+ "mutable": false,
110
+ "complexType": {
111
+ "original": "string",
112
+ "resolved": "string",
113
+ "references": {}
114
+ },
115
+ "required": false,
116
+ "optional": false,
117
+ "docs": {
118
+ "tags": [],
119
+ "text": "The template ID to edit."
120
+ },
121
+ "attribute": "template-id",
122
+ "reflect": false,
123
+ "defaultValue": "''"
124
+ },
125
+ "sender": {
126
+ "type": "string",
127
+ "mutable": false,
128
+ "complexType": {
129
+ "original": "TTemplateSender",
130
+ "resolved": "\"creator\" | \"everyone\" | \"everyone_as_creator\" | \"organization_member\" | \"organization_member_as_creator\"",
131
+ "references": {
132
+ "TTemplateSender": {
133
+ "location": "import",
134
+ "path": "@verdocs/js-sdk/Templates/Types"
135
+ }
136
+ }
137
+ },
138
+ "required": false,
139
+ "optional": false,
140
+ "docs": {
141
+ "tags": [],
142
+ "text": "Whether the dialog is currently being displayed. This allows it to be added to the DOM before being displayed."
143
+ },
144
+ "attribute": "sender",
145
+ "reflect": false,
146
+ "defaultValue": "TemplateSenderTypes.EVERYONE"
147
+ }
148
+ };
149
+ }
150
+ static get states() {
151
+ return {
152
+ "saving": {}
153
+ };
154
+ }
155
+ static get events() {
156
+ return [{
157
+ "method": "close",
158
+ "name": "close",
159
+ "bubbles": true,
160
+ "cancelable": true,
161
+ "composed": true,
162
+ "docs": {
163
+ "tags": [],
164
+ "text": "Event fired when the user cancels the dialog."
165
+ },
166
+ "complexType": {
167
+ "original": "any",
168
+ "resolved": "any",
169
+ "references": {}
170
+ }
171
+ }, {
172
+ "method": "sdkError",
173
+ "name": "sdkError",
174
+ "bubbles": true,
175
+ "cancelable": true,
176
+ "composed": true,
177
+ "docs": {
178
+ "tags": [],
179
+ "text": "Event fired if an error occurs. The event details will contain information about the error. Most errors will\nterminate the process, and the calling application should correct the condition and re-render the component."
180
+ },
181
+ "complexType": {
182
+ "original": "SDKError",
183
+ "resolved": "SDKError",
184
+ "references": {
185
+ "SDKError": {
186
+ "location": "import",
187
+ "path": "../../../utils/errors"
188
+ }
189
+ }
190
+ }
191
+ }];
192
+ }
193
+ }
@@ -0,0 +1,13 @@
1
+ import { html } from 'lit-html';
2
+ export default {
3
+ title: 'Dialogs/Sender',
4
+ component: 'verdocs-template-sender',
5
+ args: {
6
+ templateId: '056b837f-b183-4039-b50a-d68acbf81b67',
7
+ // templateId: 'd2338742-f3a1-465b-8592-806587413cc1',
8
+ },
9
+ argTypes: {
10
+ onClose: { action: 'close' },
11
+ },
12
+ };
13
+ export const Sender = ({ value, onClose }) => html `<verdocs-template-sender-dialog .value=${value} @close=${onClose} />`;
@@ -16,16 +16,21 @@ verdocs-template-visibility form {
16
16
  verdocs-template-visibility form .description {
17
17
  font-size: 14px;
18
18
  text-align: justify;
19
- margin-bottom: 20px;
20
19
  color: #5c6575;
21
20
  }
21
+ verdocs-template-visibility form h5 {
22
+ font-size: 16px;
23
+ font-weight: bold;
24
+ color: #4c56cb;
25
+ margin: 0;
26
+ }
22
27
  verdocs-template-visibility form label {
23
28
  flex: 1;
24
29
  display: flex;
25
- font-size: 18px;
30
+ font-size: 16px;
26
31
  font-weight: 500;
27
32
  margin: 0 0 4px 0;
28
- color: #5c6575;
33
+ color: #33364b;
29
34
  }
30
35
  verdocs-template-visibility form input {
31
36
  border: none;
@@ -39,7 +44,7 @@ verdocs-template-visibility form input:focus {
39
44
  }
40
45
  verdocs-template-visibility form .input-row {
41
46
  display: flex;
42
- margin: 0 0 10px 0;
47
+ margin: 20px 0 0 0;
43
48
  align-items: center;
44
49
  flex-direction: row;
45
50
  }
@@ -52,14 +57,17 @@ verdocs-template-visibility form .input-row verdocs-text-input input {
52
57
  text-align: center;
53
58
  }
54
59
  verdocs-template-visibility form .input-row verdocs-checkbox {
60
+ flex: 0;
55
61
  display: flex;
56
- flex: 0 0 40px;
57
62
  justify-content: center;
58
63
  }
64
+ verdocs-template-visibility form .input-row verdocs-checkbox label > input[type=checkbox] + *::before {
65
+ margin-right: 0;
66
+ }
59
67
  verdocs-template-visibility .buttons {
60
68
  display: flex;
61
69
  column-gap: 8px;
62
- margin-top: 16px;
70
+ margin-top: 25px;
63
71
  flex-direction: row;
64
72
  }
65
73
  verdocs-template-visibility ::placeholder {
@@ -5,7 +5,7 @@ import TemplateStore from '../../../utils/templateStore';
5
5
  import { loadTemplate } from '../../../utils/Templates';
6
6
  import { SDKError } from '../../../utils/errors';
7
7
  /**
8
- * Displays a collection of settings boxes that allow a user to configure a template's behavior.
8
+ * Displays an edit form that allows the user to adjust a template's visibility.
9
9
  */
10
10
  export class VerdocsTemplateVisibility {
11
11
  constructor() {
@@ -57,7 +57,7 @@ export class VerdocsTemplateVisibility {
57
57
  if (!this.endpoint.session || !TemplateStore.template) {
58
58
  return h(Host, { class: "empty" });
59
59
  }
60
- return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("div", { class: "input-row" }, h("label", { htmlFor: "verdocs-is-personal" }, "Personal"), h("verdocs-checkbox", { id: "verdocs-is-personal", name: "is-personal", checked: this.personal, value: "on", onInput: (e) => {
60
+ return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("h5", null, "Visibility"), h("div", { class: "input-row" }, h("label", { htmlFor: "verdocs-is-personal" }, "Personal"), h("verdocs-checkbox", { id: "verdocs-is-personal", name: "is-personal", checked: this.personal, value: "on", onInput: (e) => {
61
61
  this.personal = e.target.checked;
62
62
  this.dirty = true;
63
63
  } })), h("div", { class: "description" }, "Personal templates are hidden from other members of your Organization (if any)."), h("div", { class: "input-row" }, h("label", { htmlFor: "verdocs-is-public" }, "Public"), h("verdocs-checkbox", { id: "verdocs-is-public", name: "is-public", checked: this.public, value: "on", onInput: (e) => {