@nylas/web-elements 2.0.1 → 2.0.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 (241) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +191 -95
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +10418 -10260
  3. package/dist/cjs/{abstract-provider-ca4f7e4f.js → abstract-provider-f84a6735.js} +2 -2
  4. package/dist/cjs/{abstract-provider-ca4f7e4f.js.map → abstract-provider-f84a6735.js.map} +1 -1
  5. package/dist/cjs/app-globals-ee500b74.js.map +1 -1
  6. package/dist/cjs/calendar-agenda-fill-icon_36.cjs.entry.js +36 -21
  7. package/dist/cjs/calendar-agenda-fill-icon_36.cjs.entry.js.map +1 -1
  8. package/dist/cjs/{calendar-check-icon_2.cjs.entry.js → calendar-check-icon.cjs.entry.js} +3 -19
  9. package/dist/cjs/calendar-check-icon.cjs.entry.js.map +1 -0
  10. package/dist/cjs/checkbox-component_2.cjs.entry.js +1 -1
  11. package/dist/cjs/checkbox-group_4.cjs.entry.js +3 -3
  12. package/dist/cjs/checkmark-circle-icon.cjs.entry.js +24 -0
  13. package/dist/cjs/checkmark-circle-icon.cjs.entry.js.map +1 -0
  14. package/dist/cjs/checkmark-icon_15.cjs.entry.js +11 -7
  15. package/dist/cjs/checkmark-icon_15.cjs.entry.js.map +1 -1
  16. package/dist/cjs/{customParseFormat-bb3a23c5.js → customParseFormat-95790293.js} +2 -2
  17. package/dist/cjs/{customParseFormat-bb3a23c5.js.map → customParseFormat-95790293.js.map} +1 -1
  18. package/dist/cjs/{feedbackSync-1c5ec9aa.js → feedbackSync-4ed99749.js} +2 -2
  19. package/dist/cjs/{feedbackSync-1c5ec9aa.js.map → feedbackSync-4ed99749.js.map} +1 -1
  20. package/dist/cjs/globe-icon_2.cjs.entry.js +2 -2
  21. package/dist/cjs/google-logo-icon_6.cjs.entry.js +8 -8
  22. package/dist/cjs/index-e07e3a7e.js +6 -2
  23. package/dist/cjs/index.cjs.js +2 -2
  24. package/dist/cjs/{index.es-c563f3ba.js → index.es-62161daa.js} +2 -2
  25. package/dist/cjs/{index.es-c563f3ba.js.map → index.es-62161daa.js.map} +1 -1
  26. package/dist/cjs/input-component.cjs.entry.js +1 -1
  27. package/dist/cjs/input-dropdown_2.cjs.entry.js +1 -1
  28. package/dist/cjs/loader.cjs.js +1 -1
  29. package/dist/cjs/multi-select-dropdown.cjs.entry.js +1 -1
  30. package/dist/cjs/{nylas-api-request-4d148ff1.js → nylas-api-request-03d7f604.js} +2 -2
  31. package/dist/cjs/{nylas-api-request-4d148ff1.js.map → nylas-api-request-03d7f604.js.map} +1 -1
  32. package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js +82 -25
  33. package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js.map +1 -1
  34. package/dist/cjs/nylas-form-card.cjs.entry.js +2 -2
  35. package/dist/cjs/nylas-notification_2.cjs.entry.js +1 -1
  36. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +6 -6
  37. package/dist/cjs/nylas-scheduling.cjs.entry.js +42 -14
  38. package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
  39. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  40. package/dist/cjs/{register-component-70744713.js → register-component-f4ad9751.js} +2 -2
  41. package/dist/cjs/{register-component-70744713.js.map → register-component-f4ad9751.js.map} +1 -1
  42. package/dist/cjs/textarea-component.cjs.entry.js +1 -1
  43. package/dist/cjs/{utils-dd3b6f4c.js → utils-03b13826.js} +154 -55
  44. package/dist/cjs/utils-03b13826.js.map +1 -0
  45. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +11 -3
  46. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
  47. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +49 -4
  48. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
  49. package/dist/collection/components/scheduler/nylas-booking-form/test/nylas-booking-form.spec.js +3 -3
  50. package/dist/collection/components/scheduler/nylas-booking-form/test/nylas-booking-form.spec.js.map +1 -1
  51. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +37 -1
  52. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js.map +1 -1
  53. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +34 -2
  54. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js.map +1 -1
  55. package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.css +1 -1
  56. package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js +34 -1
  57. package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js.map +1 -1
  58. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +10 -4
  59. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
  60. package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js +10 -2
  61. package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js.map +1 -1
  62. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.css +13 -0
  63. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +66 -7
  64. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
  65. package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js +33 -0
  66. package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js.map +1 -1
  67. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +20 -5
  68. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js.map +1 -1
  69. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
  70. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +12 -6
  71. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
  72. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +1 -1
  73. package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js +12 -6
  74. package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js.map +1 -1
  75. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js +6 -3
  76. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js.map +1 -1
  77. package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js +14 -8
  78. package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js.map +1 -1
  79. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +3 -3
  80. package/dist/collection/components/scheduler-editor/nylas-event-calendar/nylas-event-calendar.js +1 -1
  81. package/dist/collection/components/scheduler-editor/nylas-reminder-emails/nylas-reminder-emails.js +8 -4
  82. package/dist/collection/components/scheduler-editor/nylas-reminder-emails/nylas-reminder-emails.js.map +1 -1
  83. package/dist/components/index.js.map +1 -1
  84. package/dist/components/nylas-additional-participants2.js +12 -6
  85. package/dist/components/nylas-additional-participants2.js.map +1 -1
  86. package/dist/components/nylas-booked-event-card2.js +13 -6
  87. package/dist/components/nylas-booked-event-card2.js.map +1 -1
  88. package/dist/components/nylas-booking-confirmation-redirect2.js +12 -6
  89. package/dist/components/nylas-booking-confirmation-redirect2.js.map +1 -1
  90. package/dist/components/nylas-booking-form2.js +28 -6
  91. package/dist/components/nylas-booking-form2.js.map +1 -1
  92. package/dist/components/nylas-cancel-booking-form2.js +13 -3
  93. package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
  94. package/dist/components/nylas-cancelled-event-card2.js +12 -3
  95. package/dist/components/nylas-cancelled-event-card2.js.map +1 -1
  96. package/dist/components/nylas-confirmation-email2.js +6 -3
  97. package/dist/components/nylas-confirmation-email2.js.map +1 -1
  98. package/dist/components/nylas-confirmed-event-card2.js +18 -8
  99. package/dist/components/nylas-confirmed-event-card2.js.map +1 -1
  100. package/dist/components/nylas-custom-event-slug2.js +15 -9
  101. package/dist/components/nylas-custom-event-slug2.js.map +1 -1
  102. package/dist/components/nylas-date-picker2.js +1 -1
  103. package/dist/components/nylas-date-picker2.js.map +1 -1
  104. package/dist/components/nylas-editor-tabs-group2.js +2 -2
  105. package/dist/components/nylas-editor-tabs2.js +2 -2
  106. package/dist/components/nylas-organizer-confirmation-card2.js +12 -5
  107. package/dist/components/nylas-organizer-confirmation-card2.js.map +1 -1
  108. package/dist/components/nylas-reminder-emails2.js +8 -4
  109. package/dist/components/nylas-reminder-emails2.js.map +1 -1
  110. package/dist/components/nylas-scheduler-editor.js +2 -2
  111. package/dist/components/nylas-scheduling.js +42 -12
  112. package/dist/components/nylas-scheduling.js.map +1 -1
  113. package/dist/components/nylas-selected-event-card2.js +12 -5
  114. package/dist/components/nylas-selected-event-card2.js.map +1 -1
  115. package/dist/components/nylas-timeslot-picker2.js.map +1 -1
  116. package/dist/components/utils.js +153 -54
  117. package/dist/components/utils.js.map +1 -1
  118. package/dist/esm/{abstract-provider-efe136bd.js → abstract-provider-bdb7d9b4.js} +2 -2
  119. package/dist/esm/{abstract-provider-efe136bd.js.map → abstract-provider-bdb7d9b4.js.map} +1 -1
  120. package/dist/esm/app-globals-295a87be.js.map +1 -1
  121. package/dist/esm/calendar-agenda-fill-icon_36.entry.js +36 -21
  122. package/dist/esm/calendar-agenda-fill-icon_36.entry.js.map +1 -1
  123. package/dist/esm/{calendar-check-icon_2.entry.js → calendar-check-icon.entry.js} +4 -19
  124. package/dist/esm/calendar-check-icon.entry.js.map +1 -0
  125. package/dist/esm/checkbox-component_2.entry.js +1 -1
  126. package/dist/esm/checkbox-group_4.entry.js +3 -3
  127. package/dist/esm/checkmark-circle-icon.entry.js +20 -0
  128. package/dist/esm/checkmark-circle-icon.entry.js.map +1 -0
  129. package/dist/esm/checkmark-icon_15.entry.js +11 -7
  130. package/dist/esm/checkmark-icon_15.entry.js.map +1 -1
  131. package/dist/esm/{customParseFormat-edc38d83.js → customParseFormat-f0d21eb3.js} +2 -2
  132. package/dist/esm/{customParseFormat-edc38d83.js.map → customParseFormat-f0d21eb3.js.map} +1 -1
  133. package/dist/esm/{feedbackSync-e4378c0b.js → feedbackSync-b9c9e719.js} +2 -2
  134. package/dist/esm/{feedbackSync-e4378c0b.js.map → feedbackSync-b9c9e719.js.map} +1 -1
  135. package/dist/esm/globe-icon_2.entry.js +2 -2
  136. package/dist/esm/google-logo-icon_6.entry.js +8 -8
  137. package/dist/esm/index-091600eb.js +6 -2
  138. package/dist/esm/{index.es-6a9d55cf.js → index.es-ccb2a286.js} +2 -2
  139. package/dist/esm/{index.es-6a9d55cf.js.map → index.es-ccb2a286.js.map} +1 -1
  140. package/dist/esm/index.js +2 -2
  141. package/dist/esm/input-component.entry.js +1 -1
  142. package/dist/esm/input-dropdown_2.entry.js +1 -1
  143. package/dist/esm/loader.js +1 -1
  144. package/dist/esm/multi-select-dropdown.entry.js +1 -1
  145. package/dist/esm/{nylas-api-request-f2e4e9b6.js → nylas-api-request-7d702661.js} +2 -2
  146. package/dist/esm/{nylas-api-request-f2e4e9b6.js.map → nylas-api-request-7d702661.js.map} +1 -1
  147. package/dist/esm/nylas-booked-event-card_11.entry.js +82 -25
  148. package/dist/esm/nylas-booked-event-card_11.entry.js.map +1 -1
  149. package/dist/esm/nylas-form-card.entry.js +2 -2
  150. package/dist/esm/nylas-notification_2.entry.js +1 -1
  151. package/dist/esm/nylas-scheduler-editor.entry.js +6 -6
  152. package/dist/esm/nylas-scheduling.entry.js +43 -15
  153. package/dist/esm/nylas-scheduling.entry.js.map +1 -1
  154. package/dist/esm/nylas-web-elements.js +1 -1
  155. package/dist/esm/{register-component-a1c3d7b4.js → register-component-9d4ceee5.js} +2 -2
  156. package/dist/esm/{register-component-a1c3d7b4.js.map → register-component-9d4ceee5.js.map} +1 -1
  157. package/dist/esm/textarea-component.entry.js +1 -1
  158. package/dist/esm/{utils-b7f9cbcc.js → utils-fb8a9ce4.js} +154 -55
  159. package/dist/esm/utils-fb8a9ce4.js.map +1 -0
  160. package/dist/nylas-web-elements/index.esm.js +1 -1
  161. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  162. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  163. package/dist/nylas-web-elements/{p-3ce8e281.js → p-094be30f.js} +2 -2
  164. package/dist/nylas-web-elements/p-18c58ea1.entry.js +2 -0
  165. package/dist/nylas-web-elements/p-18c58ea1.entry.js.map +1 -0
  166. package/dist/nylas-web-elements/{p-c12c18b2.entry.js → p-1dbaf879.entry.js} +2 -2
  167. package/dist/nylas-web-elements/p-2830522f.entry.js +2 -0
  168. package/dist/nylas-web-elements/p-2830522f.entry.js.map +1 -0
  169. package/dist/nylas-web-elements/{p-35297f33.entry.js → p-3b56d656.entry.js} +2 -2
  170. package/dist/nylas-web-elements/{p-8e7882a1.js → p-3c8b7ba1.js} +2 -2
  171. package/dist/nylas-web-elements/{p-3204882f.entry.js → p-3f5e1e6b.entry.js} +2 -2
  172. package/dist/nylas-web-elements/{p-5aae729f.js → p-4c1fafb4.js} +2 -2
  173. package/dist/nylas-web-elements/p-522270a2.entry.js +2 -0
  174. package/dist/nylas-web-elements/p-522270a2.entry.js.map +1 -0
  175. package/dist/nylas-web-elements/p-67e936ce.entry.js +2 -0
  176. package/dist/nylas-web-elements/p-67e936ce.entry.js.map +1 -0
  177. package/dist/nylas-web-elements/{p-9e11eb2c.js → p-6d8e2c6b.js} +2 -2
  178. package/dist/nylas-web-elements/{p-3362cf82.entry.js → p-8f82f281.entry.js} +2 -2
  179. package/dist/nylas-web-elements/p-920812bd.entry.js +8 -0
  180. package/dist/nylas-web-elements/p-920812bd.entry.js.map +1 -0
  181. package/dist/nylas-web-elements/{p-b40f7a77.entry.js → p-a42f41f7.entry.js} +2 -2
  182. package/dist/nylas-web-elements/p-a6e2e49c.js.map +1 -1
  183. package/dist/nylas-web-elements/{p-8340d845.entry.js → p-aad611b4.entry.js} +2 -2
  184. package/dist/nylas-web-elements/{p-6e56eb3f.js → p-ab88518b.js} +2 -2
  185. package/dist/nylas-web-elements/{p-5cf6301e.entry.js → p-b3500bf1.entry.js} +2 -2
  186. package/dist/nylas-web-elements/{p-4d8f9740.entry.js → p-b6d863e0.entry.js} +2 -2
  187. package/dist/nylas-web-elements/{p-50c255fa.entry.js → p-b8cf836f.entry.js} +2 -2
  188. package/dist/nylas-web-elements/{p-996c827d.entry.js → p-bf37be06.entry.js} +2 -2
  189. package/dist/nylas-web-elements/p-de4b01ac.entry.js +2 -0
  190. package/dist/nylas-web-elements/p-de4b01ac.entry.js.map +1 -0
  191. package/dist/nylas-web-elements/{p-308e7adb.entry.js → p-f42e87c6.entry.js} +3 -3
  192. package/dist/nylas-web-elements/{p-dea32251.js → p-f4825eb1.js} +2 -2
  193. package/dist/nylas-web-elements/p-faa30369.js +14 -0
  194. package/dist/nylas-web-elements/{p-59e4ab2d.js.map → p-faa30369.js.map} +1 -1
  195. package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +2 -0
  196. package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +7 -0
  197. package/dist/types/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.d.ts +3 -0
  198. package/dist/types/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.d.ts +3 -1
  199. package/dist/types/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.d.ts +3 -1
  200. package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +2 -1
  201. package/dist/types/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.d.ts +2 -0
  202. package/dist/types/components/scheduler/nylas-scheduling/nylas-scheduling.d.ts +6 -0
  203. package/dist/types/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.d.ts +3 -1
  204. package/dist/types/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.d.ts +2 -1
  205. package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +2 -0
  206. package/dist/types/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.d.ts +2 -0
  207. package/dist/types/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.d.ts +2 -0
  208. package/dist/types/components.d.ts +46 -6
  209. package/package.json +3 -5
  210. package/dist/cjs/calendar-check-icon_2.cjs.entry.js.map +0 -1
  211. package/dist/cjs/utils-dd3b6f4c.js.map +0 -1
  212. package/dist/esm/calendar-check-icon_2.entry.js.map +0 -1
  213. package/dist/esm/utils-b7f9cbcc.js.map +0 -1
  214. package/dist/nylas-web-elements/p-2b52b854.entry.js +0 -2
  215. package/dist/nylas-web-elements/p-2b52b854.entry.js.map +0 -1
  216. package/dist/nylas-web-elements/p-59e4ab2d.js +0 -14
  217. package/dist/nylas-web-elements/p-8a3965ba.entry.js +0 -2
  218. package/dist/nylas-web-elements/p-8a3965ba.entry.js.map +0 -1
  219. package/dist/nylas-web-elements/p-97128be4.entry.js +0 -8
  220. package/dist/nylas-web-elements/p-97128be4.entry.js.map +0 -1
  221. package/dist/nylas-web-elements/p-d69f9d47.entry.js +0 -2
  222. package/dist/nylas-web-elements/p-d69f9d47.entry.js.map +0 -1
  223. package/dist/nylas-web-elements/p-dcc8ca35.entry.js +0 -2
  224. package/dist/nylas-web-elements/p-dcc8ca35.entry.js.map +0 -1
  225. /package/dist/nylas-web-elements/{p-3ce8e281.js.map → p-094be30f.js.map} +0 -0
  226. /package/dist/nylas-web-elements/{p-c12c18b2.entry.js.map → p-1dbaf879.entry.js.map} +0 -0
  227. /package/dist/nylas-web-elements/{p-35297f33.entry.js.map → p-3b56d656.entry.js.map} +0 -0
  228. /package/dist/nylas-web-elements/{p-8e7882a1.js.map → p-3c8b7ba1.js.map} +0 -0
  229. /package/dist/nylas-web-elements/{p-3204882f.entry.js.map → p-3f5e1e6b.entry.js.map} +0 -0
  230. /package/dist/nylas-web-elements/{p-5aae729f.js.map → p-4c1fafb4.js.map} +0 -0
  231. /package/dist/nylas-web-elements/{p-9e11eb2c.js.map → p-6d8e2c6b.js.map} +0 -0
  232. /package/dist/nylas-web-elements/{p-3362cf82.entry.js.map → p-8f82f281.entry.js.map} +0 -0
  233. /package/dist/nylas-web-elements/{p-b40f7a77.entry.js.map → p-a42f41f7.entry.js.map} +0 -0
  234. /package/dist/nylas-web-elements/{p-8340d845.entry.js.map → p-aad611b4.entry.js.map} +0 -0
  235. /package/dist/nylas-web-elements/{p-6e56eb3f.js.map → p-ab88518b.js.map} +0 -0
  236. /package/dist/nylas-web-elements/{p-5cf6301e.entry.js.map → p-b3500bf1.entry.js.map} +0 -0
  237. /package/dist/nylas-web-elements/{p-4d8f9740.entry.js.map → p-b6d863e0.entry.js.map} +0 -0
  238. /package/dist/nylas-web-elements/{p-50c255fa.entry.js.map → p-b8cf836f.entry.js.map} +0 -0
  239. /package/dist/nylas-web-elements/{p-996c827d.entry.js.map → p-bf37be06.entry.js.map} +0 -0
  240. /package/dist/nylas-web-elements/{p-308e7adb.entry.js.map → p-f42e87c6.entry.js.map} +0 -0
  241. /package/dist/nylas-web-elements/{p-dea32251.js.map → p-f4825eb1.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- import { b as debug, e as uniqueID, f as formatEventName } from './utils-b7f9cbcc.js';
1
+ import { b as debug, e as uniqueID, f as formatEventName } from './utils-fb8a9ce4.js';
2
2
 
3
3
  class NylasAbstractProvider {
4
4
  constructor(host, stores, automaticComponentRegistration = true, eventOverrides) {
@@ -279,4 +279,4 @@ class NylasBaseProvider extends NylasAbstractProvider {
279
279
 
280
280
  export { NylasBaseProvider as N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,CAAC,IAAI,WAAW,OAAO,CAAC,QAAQ,EAAE,SAAS,QAAQ,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;qBAClK,CAAC,CAAC;iBACJ;aACF,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ;IAKD,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,gBAAgB,CAAC;KAC9D;CACF;MAEY,iBAAgE,SAAQ,qBAAwB;;;;;","names":[],"sources":["src/common/abstract-provider.ts"],"sourcesContent":["import { RegisteredComponent } from '@/common/register-component';\nimport { BaseNylasConnectorInterface } from '@/connector/connector-interface';\nimport { debug, formatEventName, uniqueID } from '@/utils/utils';\nimport { ObservableMap } from '@stencil/store';\nimport { EventOverride } from './component-types';\nimport { HTMLStencilElement } from '@stencil/core/internal';\n\nexport type PropKey = string | number | symbol;\nexport type StoreKey = string;\nexport type StoreName<T> = keyof T;\nexport type StateKey = string;\nexport type ElementID = string;\nexport type PropStateRegistration = { elementId: ElementID; propKey: PropKey };\nexport type EventListenerRegistration = [HTMLElement, PropKey, (event: CustomEvent<any>) => Promise<void>];\n\nexport interface NylasProviderInterface<Stores extends Record<string, ObservableMap<any>>> {\n nylasConnector?: BaseNylasConnectorInterface;\n stores: Stores;\n host?: HTMLElement;\n automaticComponentRegistration: boolean;\n registeredComponents: Record<ElementID, RegisteredComponent<any, any>>;\n propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>>;\n eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]>;\n componentWillLoad(nylasConnector: BaseNylasConnectorInterface): Promise<void>;\n componentDidLoad(): Promise<void>;\n componentDisconnected(): Promise<void>;\n getStore<K extends keyof ThisType<this['stores']>>(name: K): ThisType<this['stores']>[K];\n registerComponent(component: RegisteredComponent<any, any>): void;\n unregisterComponent(component: RegisteredComponent<any, any>): void;\n}\n\nexport abstract class NylasAbstractProvider<Stores extends Record<string, ObservableMap<any>>> implements NylasProviderInterface<Stores> {\n /**\n * The NylasConnector instance.\n * This is used to provide access to the NylasConnector instance to all components.\n */\n public nylasConnector?: BaseNylasConnectorInterface;\n\n /**\n * A list of stores that are used by the provider.\n * This is used to provide access to the stores to all components.\n */\n public stores: Stores;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n public host!: HTMLElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n public automaticComponentRegistration: boolean = true;\n\n /**\n * A list of registered components that are listening for store changes.\n * Each component is registered with a unique id so that we can easily track the component\n * for various other operations (see `propStateRegistrations` and `eventListenerRegistrations`).\n */\n public registeredComponents: Record<ElementID, RegisteredComponent<any, any>> = {};\n\n /**\n * A list of registered components that are listening for store changes.\n * To make lookups more efficient, we use a Map of our prop registrations that we need to map to differnet\n * state keys. When a component is unregistered, we can use this map to remove the prop registration.\n */\n public propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>> = new Map();\n\n /**\n * A list of registered event listeners.\n * To make lookups more efficient, we use a Map of our event listeners that we need to map to differnet\n * nylas connector methods. When a component is unregistered, we can use this map to remove the event listener.\n */\n public eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]> = new Map();\n\n /**\n * A list of event overrides that are used by the provider.\n * This is used to provide an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduler eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n public eventOverrides: EventOverride<Exclude<BaseNylasConnectorInterface, undefined>>;\n\n /**\n * The constructor for the AbstractNylasProvider.\n * @param host The host element (usually the HTMLElement of the provider)\n * @param stores A list of stores that are used by the provider\n * @param automaticComponentRegistration A boolean that determines if components should be automatically registered\n * @param eventOverrides A list of event overrides that are used by the provider\n */\n constructor(host: HTMLElement, stores: Stores, automaticComponentRegistration: boolean = true, eventOverrides: EventOverride<any>) {\n this.host = host;\n this.stores = stores;\n this.automaticComponentRegistration = automaticComponentRegistration;\n this.eventOverrides = eventOverrides;\n\n debug(`[${this.hostTagName}] Initializing (abstract) provider.`, { eventOverrides });\n\n this.registerComponent = this.registerComponent.bind(this);\n this.getStore = this.getStore.bind(this);\n\n // Init propStateRegistrations with store names\n Object.keys(this.stores).forEach(storeName => {\n this.propStateRegistrations.set(storeName, new Map());\n });\n }\n\n /**\n * This method is called before the component is loaded.\n * We're passing the NylasConnector instance to the provider so that we can\n * provide access to the NylasConnector instance to all components.\n *\n * However, because the NylasConnector is often constructed after the component's\n * constructor is called, set the NylasConnector instance here.\n * @param nylasConnector The NylasConnector instance\n */\n async componentWillLoad(nylasConnector: BaseNylasConnectorInterface) {\n debug(`[${this.hostTagName}] Will load`);\n\n // For each of our stores, configure the listeners for changes in the\n // store state.\n this.setupStoreListeners();\n\n // Set the NylasConnector instance\n this.nylasConnector = nylasConnector;\n\n /**\n * This is a very static way of registering components, but it happens fairly\n * early in the component lifecycle, so it can be beneficial to do it here.\n *\n * The big downside to this is that it will not pick up any components that\n * are dynamically added to the DOM after this method is called.\n *\n * So we should evaluate if this is the best way to register components.\n */\n const childComponents = Array.from(this.host.querySelectorAll('*')).filter(child => child.tagName.toLowerCase().startsWith('nylas-'));\n debug(`[${this.hostTagName}] Found ${childComponents.length} child component(s).`, { childComponents });\n\n const registrations = childComponents.map(async child => {\n const component = child as any; // It unfortunately makes life a whole lot easier to just cast this to any\n if (!component) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} does not have a name. Skipping.`);\n return;\n }\n\n // Skip components that don't have the `registerNylasComponent` prop\n if (!component.registerNylasComponent) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} is not a component that can be registered. Skipping.`, { component });\n return;\n }\n\n const registeredComponent: RegisteredComponent<any, any> = {\n element: component as HTMLStencilElement,\n name: component.tagName.toLowerCase(),\n getStoresToProp: component.getStoresToProp,\n storeToProps: component.storeToProps,\n stateToProps: component.stateToProps,\n authToProp: component.authToProp,\n eventToProps: component.eventToProps,\n connectorToProp: component.connectorToProp,\n localPropsToProp: component.localPropsToProp,\n };\n\n await this.registerComponent(registeredComponent);\n });\n\n await Promise.all(registrations);\n }\n\n /**\n * This method is called after the component is loaded.\n * We're using this method to add event listeners to the host element.\n */\n async componentDidLoad() {\n debug(`[~${this.hostTagName}] (componentDidLoad) Did load`);\n }\n\n /**\n * This method is called when the component is disconnected from the DOM.\n * We're using this method to dispose of the stores.\n */\n async componentDisconnected() {\n // Loop through each store and and dispose\n Object.values(this.stores).forEach(store => {\n store.dispose();\n });\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${event.detail.name}.`);\n return;\n }\n\n await this.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${event.detail.name}.`);\n return;\n }\n\n this.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to register a component with the provider\n * @param component component to register\n * @returns void\n */\n public async registerComponent(component: RegisteredComponent<any, any>): Promise<void> {\n debug(`~[${this.hostTagName}] (registerComponent) Registering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n const isReregistration = elementId && this.registeredComponents[elementId];\n\n // If this is a re-registration, clean up previous registrations first\n if (isReregistration) {\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} already registered. Updating registration.`);\n // Clean up event listeners but keep the component ID\n this.cleanupComponentRegistration(elementId, false);\n } else {\n // Set a unique data id on the element for new registrations\n component.element.dataset.nylasId = elementId || uniqueID();\n }\n\n // Register/update the component to ensure the component is tracked even while waiting for definition\n const nylasId = component.element.dataset.nylasId;\n if (nylasId) {\n this.registeredComponents[nylasId] = component;\n }\n\n // Wait for the component to be defined in the custom elements registry before we attempt to\n // complete the component registration. While this means that the component will not be loaded with\n // props immediately, it does ensure that when we do set the props, the component is ready to receive them.\n debug(`[${this.hostTagName}] (registerComponent) Waiting for \"${component.element.localName}\" component to be defined`, { component });\n try {\n await customElements.whenDefined(component.element.tagName.toLowerCase());\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.element.localName}\" is now defined`);\n } catch (error) {\n debug(`[${this.hostTagName}] (registerComponent) Error waiting for component \"${component.element.localName}\" to be defined:`, error);\n // Continue with registration anyway, as the component might be defined later\n }\n\n const eventOverrides = this.eventOverrides;\n const { stateToProps, getStoresToProp, eventToProps, storeToProps, connectorToProp, localPropsToProp, element } = component;\n\n /**\n * We allow components to map an event to a prop. These events can automatically\n * call a method on the nylasConnector instance.\n */\n eventToProps?.forEach((customEventHandler, propKey) => {\n const nylasConnector = this.nylasConnector;\n const handler = async (event: CustomEvent<any>) => {\n debug(`[${this.hostTagName}] (registerComponent) Handling \"${component.name}\" prop \"${String(propKey)}\" event.`, { event });\n if (propKey in eventOverrides) {\n debug(`[${this.hostTagName}] (registerComponent) Found event override for \"${String(propKey)}\" event. Calling override.`);\n await eventOverrides[propKey](event, nylasConnector);\n }\n\n if (!event.defaultPrevented) {\n await customEventHandler(event, nylasConnector);\n }\n\n return;\n };\n\n const elementId = component.element.dataset.nylasId;\n\n if (elementId && !this.eventListenerRegistrations.has(elementId)) {\n this.eventListenerRegistrations.set(elementId, []);\n }\n\n if (elementId) {\n this.eventListenerRegistrations.get(elementId)?.push([element, propKey, handler]);\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Setting \"${component.name}\" event \"${String(propKey)}\" to automcially call NylasConnector method.`);\n\n // We should immediately call the event handler to make sure the prop is set\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (registerComponent) Adding event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.addEventListener(eventName, handler as unknown as EventListener);\n });\n\n /**\n * This is a rather simple way for us to set the initial props for a component.\n * For each prop, we check if the prop is mapped to a store. If it is, we set\n * the prop to the store value.\n */\n stateToProps?.forEach((propKey, stateKey) => {\n const [storeName, stateName] = stateKey.split('.');\n const store = this.getStore(storeName as keyof typeof this.stores);\n const stateValue = store.state[stateName as keyof typeof store.state];\n\n // Make sure this component was registered and has a nylasId\n if (!element.dataset.nylasId) {\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.name}\" not registered. Skipping.`, { component });\n return;\n }\n\n // We need to keep track of the store and prop key so that we can update the\n // prop when the store changes\n if (!this.propStateRegistrations.has(storeName as keyof typeof this.stores)) {\n this.propStateRegistrations.set(storeName as keyof typeof this.stores, new Map());\n }\n\n if (!this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.has(stateName)) {\n this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.set(stateName, [\n {\n elementId: element.dataset.nylasId,\n propKey,\n },\n ]);\n } else {\n this.propStateRegistrations\n .get(storeName as keyof typeof this.stores)\n ?.get(stateName)\n ?.push({\n elementId: element.dataset.nylasId,\n propKey,\n });\n }\n\n // Set the prop value on the component\n (element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey}\" value.`, { stateValue });\n });\n\n /**\n * We allow components to also map props from the provider to the component.\n */\n localPropsToProp?.forEach((propKey, value) => {\n const mappedPropValue = this.host[value]; // TODO: Is this safe? We should find a way to only limit it to public properties and no methods.\n (element as { [key: string]: any })[propKey.toString()] = mappedPropValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to the value of \"${value}\" value.`, { value, mappedPropValue });\n });\n\n /**\n * We allow components to access the getStore method directly.\n */\n if (getStoresToProp) {\n (element as { [key: string]: any })[getStoresToProp?.toString()] = this.getStore;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${getStoresToProp.toString()}\" to \"getStore\" method.`);\n }\n\n /**\n * We allow components to map a store to a prop for direct access.\n */\n storeToProps?.forEach((propKey, storeKey) => {\n const store = this.getStore(storeKey);\n (element as { [key: string]: any })[propKey.toString()] = store;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${storeKey}\" store.`, { store });\n });\n\n /**\n * We allow components to map the NylasConnector instance to a prop for direct access.\n */\n if (connectorToProp) {\n (element as { [key: string]: any })[connectorToProp?.toString()] = this.nylasConnector;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${connectorToProp.toString()}\" to \"nylasConnector\" value.`, { connectorToProp });\n }\n\n /**\n * We allow components to fire an event when they are registered.\n */\n if (typeof element.registerCallback === 'function') {\n debug(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for \"${component.name}\".`);\n await element.registerCallback();\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} registered.`);\n }\n\n /**\n * Cleans up registrations for a component without fully unregistering it\n * @param elementId The ID of the element to clean up\n * @param removeFromRegistry Whether to remove the component from the registry\n */\n private cleanupComponentRegistration(elementId: string, removeFromRegistry: boolean = true): void {\n // Remove event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n if (eventListenerRegistrations) {\n eventListenerRegistrations.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n this.eventListenerRegistrations.delete(elementId);\n }\n\n // Clean up prop state registrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((props, stateKey) => {\n const filteredProps = props.filter(prop => prop.elementId !== elementId);\n if (filteredProps.length !== props.length) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Remove from registry if requested\n if (removeFromRegistry) {\n delete this.registeredComponents[elementId];\n }\n }\n\n /**\n * This is a method that is used to unregister a component with the provider.\n * @param component HTMLElement to unregister\n * @returns void\n */\n public unregisterComponent(component: RegisteredComponent<any, any>): void {\n debug(`[${this.hostTagName}] Unregistering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n if (!elementId) {\n debug(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${component.name}.`);\n return;\n }\n\n // Make sure the component is not already registered\n if (this.registeredComponents[elementId]) {\n debug(`[${this.hostTagName}] (unregisterComponent) Component ${component.name} not registered. Skipping.`);\n return;\n }\n\n // Remove the component prop registration from propStateRegistrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((_, stateKey) => {\n const props = this.propStateRegistrations.get(storeName)?.get(stateKey);\n const filteredProps = props?.filter(prop => prop.elementId !== elementId);\n if (filteredProps) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Before we unregister the component, we need to remove any event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n eventListenerRegistrations?.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (unregisterComponent) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n\n // Unregister the component\n delete this.registeredComponents[elementId];\n }\n\n /**\n * This method is used to dynamically retrieve the appropriate store\n * @param name store name\n */\n public getStore<K extends keyof Stores>(name: K): Stores[K] {\n const store = this.stores[name];\n if (!store) {\n throw new Error(`[${this.hostTagName}] Store \"${name.toString()}\" not found.`);\n }\n return store;\n }\n\n /**\n * This method is called when the component is connected to the DOM.\n * We're using this method to listen for changes in the store and update\n * the registered components with the new values.\n */\n private async setupStoreListeners() {\n const self = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n /**\n * This is a rather simple way for us to listen for changes in the store\n * and make sure our registered components are updated with the new values.\n *\n * For each store change, we loop through each registered component and\n * check if the store change is mapped to a prop on the component. If it is,\n * we set the prop to the new value.\n *\n * We call this super early in the provider lifecycle so that we can make sure\n * that all components have the correct props before they are rendered.\n */\n Object.entries(this.stores).forEach(([storeName, store]) => {\n debug(`[${self.hostTagName}] (setupStoreListeners) Listening for changes in \"${storeName}\" store.`);\n store.use({\n set(stateKey, newValue, oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" changed`, { newValue, oldValue });\n if (newValue === oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" unchanged. Skipping.`);\n return;\n }\n\n const registeredComponents = self.registeredComponents;\n if (!registeredComponents) {\n debug(`[${self.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);\n return;\n }\n\n // Get our prop registrations for this store\n const props = self.propStateRegistrations.get(storeName as keyof typeof self.stores as string)?.get(stateKey.toString()) || [];\n debug(`[${self.hostTagName}] (setupStoreListeners) Found ${props.length} prop(s) registered for \"${stateKey.toString()}\" store.`, {\n props,\n propStateRegistrations: self.propStateRegistrations,\n });\n\n // Loop through each registered component and update the prop\n props.forEach(({ elementId, propKey }) => {\n const component = registeredComponents[elementId];\n if (!component) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Component \"${elementId}\" not found. Skipping.`, { component });\n return;\n }\n\n // Get the appropriate store\n const loadedStore = self.getStore(storeName as keyof typeof self.stores as string);\n const stateValue = loadedStore.state[stateKey as unknown as keyof typeof loadedStore.state];\n (component.element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${self.hostTagName}] (setupStoreListeners) Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey.toString()}\" value.`, { stateValue });\n });\n },\n });\n });\n }\n\n /**\n * Simple getter for the host element tag name.\n */\n private get hostTagName(): string {\n return this.host?.tagName?.toLowerCase() ?? 'nylas-provider';\n }\n}\n\nexport class NylasBaseProvider<T extends Record<string, ObservableMap<any>>> extends NylasAbstractProvider<T> {}\n"],"version":3}
1
+ {"file":"abstract-provider-bdb7d9b4.js","mappings":";;MA+BsB,qBAAqB;IAkEzC,YAAY,IAAiB,EAAE,MAAc,EAAE,iCAA0C,IAAI,EAAE,cAAkC;QAzC1H,mCAA8B,GAAY,IAAI,CAAC;QAO/C,yBAAoB,GAAqD,EAAE,CAAC;QAO5E,2BAAsB,GAA2E,IAAI,GAAG,EAAE,CAAC;QAO3G,+BAA0B,GAAgD,IAAI,GAAG,EAAE,CAAC;QAqBzF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,8BAA8B,GAAG,8BAA8B,CAAC;QACrE,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QAErC,KAAK,CAAC,IAAI,IAAI,CAAC,WAAW,qCAAqC,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;QAErF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAGzC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS;YACxC,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,GA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W,GAAG,IAAI,CAAC,QAAQ,CAAC,SAA+C,CAAC,CAAC;wBACnF,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,QAAqD,CAAC,CAAC;wBAC3F,SAAS,CAAC,OAAkC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,GAAG,UAAU,CAAC;wBAC/E,KAAK,CAAC,IAAI,IAAI,CAAC,WAAW,oCAAoC,SAAS,CAAC,IAAI,WAAW,OAAO,CAAC,QAAQ,EAAE,SAAS,QAAQ,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;qBAClK,CAAC,CAAC;iBACJ;aACF,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ;IAKD,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,gBAAgB,CAAC;KAC9D;CACF;MAEY,iBAAgE,SAAQ,qBAAwB;;;;;","names":[],"sources":["src/common/abstract-provider.ts"],"sourcesContent":["import { RegisteredComponent } from '@/common/register-component';\nimport { BaseNylasConnectorInterface } from '@/connector/connector-interface';\nimport { debug, formatEventName, uniqueID } from '@/utils/utils';\nimport { ObservableMap } from '@stencil/store';\nimport { EventOverride } from './component-types';\nimport { HTMLStencilElement } from '@stencil/core/internal';\n\nexport type PropKey = string | number | symbol;\nexport type StoreKey = string;\nexport type StoreName<T> = keyof T;\nexport type StateKey = string;\nexport type ElementID = string;\nexport type PropStateRegistration = { elementId: ElementID; propKey: PropKey };\nexport type EventListenerRegistration = [HTMLElement, PropKey, (event: CustomEvent<any>) => Promise<void>];\n\nexport interface NylasProviderInterface<Stores extends Record<string, ObservableMap<any>>> {\n nylasConnector?: BaseNylasConnectorInterface;\n stores: Stores;\n host?: HTMLElement;\n automaticComponentRegistration: boolean;\n registeredComponents: Record<ElementID, RegisteredComponent<any, any>>;\n propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>>;\n eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]>;\n componentWillLoad(nylasConnector: BaseNylasConnectorInterface): Promise<void>;\n componentDidLoad(): Promise<void>;\n componentDisconnected(): Promise<void>;\n getStore<K extends keyof ThisType<this['stores']>>(name: K): ThisType<this['stores']>[K];\n registerComponent(component: RegisteredComponent<any, any>): void;\n unregisterComponent(component: RegisteredComponent<any, any>): void;\n}\n\nexport abstract class NylasAbstractProvider<Stores extends Record<string, ObservableMap<any>>> implements NylasProviderInterface<Stores> {\n /**\n * The NylasConnector instance.\n * This is used to provide access to the NylasConnector instance to all components.\n */\n public nylasConnector?: BaseNylasConnectorInterface;\n\n /**\n * A list of stores that are used by the provider.\n * This is used to provide access to the stores to all components.\n */\n public stores: Stores;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n public host!: HTMLElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n public automaticComponentRegistration: boolean = true;\n\n /**\n * A list of registered components that are listening for store changes.\n * Each component is registered with a unique id so that we can easily track the component\n * for various other operations (see `propStateRegistrations` and `eventListenerRegistrations`).\n */\n public registeredComponents: Record<ElementID, RegisteredComponent<any, any>> = {};\n\n /**\n * A list of registered components that are listening for store changes.\n * To make lookups more efficient, we use a Map of our prop registrations that we need to map to differnet\n * state keys. When a component is unregistered, we can use this map to remove the prop registration.\n */\n public propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>> = new Map();\n\n /**\n * A list of registered event listeners.\n * To make lookups more efficient, we use a Map of our event listeners that we need to map to differnet\n * nylas connector methods. When a component is unregistered, we can use this map to remove the event listener.\n */\n public eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]> = new Map();\n\n /**\n * A list of event overrides that are used by the provider.\n * This is used to provide an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduler eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n public eventOverrides: EventOverride<Exclude<BaseNylasConnectorInterface, undefined>>;\n\n /**\n * The constructor for the AbstractNylasProvider.\n * @param host The host element (usually the HTMLElement of the provider)\n * @param stores A list of stores that are used by the provider\n * @param automaticComponentRegistration A boolean that determines if components should be automatically registered\n * @param eventOverrides A list of event overrides that are used by the provider\n */\n constructor(host: HTMLElement, stores: Stores, automaticComponentRegistration: boolean = true, eventOverrides: EventOverride<any>) {\n this.host = host;\n this.stores = stores;\n this.automaticComponentRegistration = automaticComponentRegistration;\n this.eventOverrides = eventOverrides;\n\n debug(`[${this.hostTagName}] Initializing (abstract) provider.`, { eventOverrides });\n\n this.registerComponent = this.registerComponent.bind(this);\n this.getStore = this.getStore.bind(this);\n\n // Init propStateRegistrations with store names\n Object.keys(this.stores).forEach(storeName => {\n this.propStateRegistrations.set(storeName, new Map());\n });\n }\n\n /**\n * This method is called before the component is loaded.\n * We're passing the NylasConnector instance to the provider so that we can\n * provide access to the NylasConnector instance to all components.\n *\n * However, because the NylasConnector is often constructed after the component's\n * constructor is called, set the NylasConnector instance here.\n * @param nylasConnector The NylasConnector instance\n */\n async componentWillLoad(nylasConnector: BaseNylasConnectorInterface) {\n debug(`[${this.hostTagName}] Will load`);\n\n // For each of our stores, configure the listeners for changes in the\n // store state.\n this.setupStoreListeners();\n\n // Set the NylasConnector instance\n this.nylasConnector = nylasConnector;\n\n /**\n * This is a very static way of registering components, but it happens fairly\n * early in the component lifecycle, so it can be beneficial to do it here.\n *\n * The big downside to this is that it will not pick up any components that\n * are dynamically added to the DOM after this method is called.\n *\n * So we should evaluate if this is the best way to register components.\n */\n const childComponents = Array.from(this.host.querySelectorAll('*')).filter(child => child.tagName.toLowerCase().startsWith('nylas-'));\n debug(`[${this.hostTagName}] Found ${childComponents.length} child component(s).`, { childComponents });\n\n const registrations = childComponents.map(async child => {\n const component = child as any; // It unfortunately makes life a whole lot easier to just cast this to any\n if (!component) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} does not have a name. Skipping.`);\n return;\n }\n\n // Skip components that don't have the `registerNylasComponent` prop\n if (!component.registerNylasComponent) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} is not a component that can be registered. Skipping.`, { component });\n return;\n }\n\n const registeredComponent: RegisteredComponent<any, any> = {\n element: component as HTMLStencilElement,\n name: component.tagName.toLowerCase(),\n getStoresToProp: component.getStoresToProp,\n storeToProps: component.storeToProps,\n stateToProps: component.stateToProps,\n authToProp: component.authToProp,\n eventToProps: component.eventToProps,\n connectorToProp: component.connectorToProp,\n localPropsToProp: component.localPropsToProp,\n };\n\n await this.registerComponent(registeredComponent);\n });\n\n await Promise.all(registrations);\n }\n\n /**\n * This method is called after the component is loaded.\n * We're using this method to add event listeners to the host element.\n */\n async componentDidLoad() {\n debug(`[~${this.hostTagName}] (componentDidLoad) Did load`);\n }\n\n /**\n * This method is called when the component is disconnected from the DOM.\n * We're using this method to dispose of the stores.\n */\n async componentDisconnected() {\n // Loop through each store and and dispose\n Object.values(this.stores).forEach(store => {\n store.dispose();\n });\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${event.detail.name}.`);\n return;\n }\n\n await this.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${event.detail.name}.`);\n return;\n }\n\n this.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to register a component with the provider\n * @param component component to register\n * @returns void\n */\n public async registerComponent(component: RegisteredComponent<any, any>): Promise<void> {\n debug(`~[${this.hostTagName}] (registerComponent) Registering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n const isReregistration = elementId && this.registeredComponents[elementId];\n\n // If this is a re-registration, clean up previous registrations first\n if (isReregistration) {\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} already registered. Updating registration.`);\n // Clean up event listeners but keep the component ID\n this.cleanupComponentRegistration(elementId, false);\n } else {\n // Set a unique data id on the element for new registrations\n component.element.dataset.nylasId = elementId || uniqueID();\n }\n\n // Register/update the component to ensure the component is tracked even while waiting for definition\n const nylasId = component.element.dataset.nylasId;\n if (nylasId) {\n this.registeredComponents[nylasId] = component;\n }\n\n // Wait for the component to be defined in the custom elements registry before we attempt to\n // complete the component registration. While this means that the component will not be loaded with\n // props immediately, it does ensure that when we do set the props, the component is ready to receive them.\n debug(`[${this.hostTagName}] (registerComponent) Waiting for \"${component.element.localName}\" component to be defined`, { component });\n try {\n await customElements.whenDefined(component.element.tagName.toLowerCase());\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.element.localName}\" is now defined`);\n } catch (error) {\n debug(`[${this.hostTagName}] (registerComponent) Error waiting for component \"${component.element.localName}\" to be defined:`, error);\n // Continue with registration anyway, as the component might be defined later\n }\n\n const eventOverrides = this.eventOverrides;\n const { stateToProps, getStoresToProp, eventToProps, storeToProps, connectorToProp, localPropsToProp, element } = component;\n\n /**\n * We allow components to map an event to a prop. These events can automatically\n * call a method on the nylasConnector instance.\n */\n eventToProps?.forEach((customEventHandler, propKey) => {\n const nylasConnector = this.nylasConnector;\n const handler = async (event: CustomEvent<any>) => {\n debug(`[${this.hostTagName}] (registerComponent) Handling \"${component.name}\" prop \"${String(propKey)}\" event.`, { event });\n if (propKey in eventOverrides) {\n debug(`[${this.hostTagName}] (registerComponent) Found event override for \"${String(propKey)}\" event. Calling override.`);\n await eventOverrides[propKey](event, nylasConnector);\n }\n\n if (!event.defaultPrevented) {\n await customEventHandler(event, nylasConnector);\n }\n\n return;\n };\n\n const elementId = component.element.dataset.nylasId;\n\n if (elementId && !this.eventListenerRegistrations.has(elementId)) {\n this.eventListenerRegistrations.set(elementId, []);\n }\n\n if (elementId) {\n this.eventListenerRegistrations.get(elementId)?.push([element, propKey, handler]);\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Setting \"${component.name}\" event \"${String(propKey)}\" to automcially call NylasConnector method.`);\n\n // We should immediately call the event handler to make sure the prop is set\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (registerComponent) Adding event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.addEventListener(eventName, handler as unknown as EventListener);\n });\n\n /**\n * This is a rather simple way for us to set the initial props for a component.\n * For each prop, we check if the prop is mapped to a store. If it is, we set\n * the prop to the store value.\n */\n stateToProps?.forEach((propKey, stateKey) => {\n const [storeName, stateName] = stateKey.split('.');\n const store = this.getStore(storeName as keyof typeof this.stores);\n const stateValue = store.state[stateName as keyof typeof store.state];\n\n // Make sure this component was registered and has a nylasId\n if (!element.dataset.nylasId) {\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.name}\" not registered. Skipping.`, { component });\n return;\n }\n\n // We need to keep track of the store and prop key so that we can update the\n // prop when the store changes\n if (!this.propStateRegistrations.has(storeName as keyof typeof this.stores)) {\n this.propStateRegistrations.set(storeName as keyof typeof this.stores, new Map());\n }\n\n if (!this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.has(stateName)) {\n this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.set(stateName, [\n {\n elementId: element.dataset.nylasId,\n propKey,\n },\n ]);\n } else {\n this.propStateRegistrations\n .get(storeName as keyof typeof this.stores)\n ?.get(stateName)\n ?.push({\n elementId: element.dataset.nylasId,\n propKey,\n });\n }\n\n // Set the prop value on the component\n (element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey}\" value.`, { stateValue });\n });\n\n /**\n * We allow components to also map props from the provider to the component.\n */\n localPropsToProp?.forEach((propKey, value) => {\n const mappedPropValue = this.host[value]; // TODO: Is this safe? We should find a way to only limit it to public properties and no methods.\n (element as { [key: string]: any })[propKey.toString()] = mappedPropValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to the value of \"${value}\" value.`, { value, mappedPropValue });\n });\n\n /**\n * We allow components to access the getStore method directly.\n */\n if (getStoresToProp) {\n (element as { [key: string]: any })[getStoresToProp?.toString()] = this.getStore;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${getStoresToProp.toString()}\" to \"getStore\" method.`);\n }\n\n /**\n * We allow components to map a store to a prop for direct access.\n */\n storeToProps?.forEach((propKey, storeKey) => {\n const store = this.getStore(storeKey);\n (element as { [key: string]: any })[propKey.toString()] = store;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${storeKey}\" store.`, { store });\n });\n\n /**\n * We allow components to map the NylasConnector instance to a prop for direct access.\n */\n if (connectorToProp) {\n (element as { [key: string]: any })[connectorToProp?.toString()] = this.nylasConnector;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${connectorToProp.toString()}\" to \"nylasConnector\" value.`, { connectorToProp });\n }\n\n /**\n * We allow components to fire an event when they are registered.\n */\n if (typeof element.registerCallback === 'function') {\n debug(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for \"${component.name}\".`);\n await element.registerCallback();\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} registered.`);\n }\n\n /**\n * Cleans up registrations for a component without fully unregistering it\n * @param elementId The ID of the element to clean up\n * @param removeFromRegistry Whether to remove the component from the registry\n */\n private cleanupComponentRegistration(elementId: string, removeFromRegistry: boolean = true): void {\n // Remove event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n if (eventListenerRegistrations) {\n eventListenerRegistrations.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n this.eventListenerRegistrations.delete(elementId);\n }\n\n // Clean up prop state registrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((props, stateKey) => {\n const filteredProps = props.filter(prop => prop.elementId !== elementId);\n if (filteredProps.length !== props.length) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Remove from registry if requested\n if (removeFromRegistry) {\n delete this.registeredComponents[elementId];\n }\n }\n\n /**\n * This is a method that is used to unregister a component with the provider.\n * @param component HTMLElement to unregister\n * @returns void\n */\n public unregisterComponent(component: RegisteredComponent<any, any>): void {\n debug(`[${this.hostTagName}] Unregistering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n if (!elementId) {\n debug(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${component.name}.`);\n return;\n }\n\n // Make sure the component is not already registered\n if (this.registeredComponents[elementId]) {\n debug(`[${this.hostTagName}] (unregisterComponent) Component ${component.name} not registered. Skipping.`);\n return;\n }\n\n // Remove the component prop registration from propStateRegistrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((_, stateKey) => {\n const props = this.propStateRegistrations.get(storeName)?.get(stateKey);\n const filteredProps = props?.filter(prop => prop.elementId !== elementId);\n if (filteredProps) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Before we unregister the component, we need to remove any event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n eventListenerRegistrations?.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (unregisterComponent) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n\n // Unregister the component\n delete this.registeredComponents[elementId];\n }\n\n /**\n * This method is used to dynamically retrieve the appropriate store\n * @param name store name\n */\n public getStore<K extends keyof Stores>(name: K): Stores[K] {\n const store = this.stores[name];\n if (!store) {\n throw new Error(`[${this.hostTagName}] Store \"${name.toString()}\" not found.`);\n }\n return store;\n }\n\n /**\n * This method is called when the component is connected to the DOM.\n * We're using this method to listen for changes in the store and update\n * the registered components with the new values.\n */\n private async setupStoreListeners() {\n const self = this; // eslint-disable-line @typescript-eslint/no-this-alias\n\n /**\n * This is a rather simple way for us to listen for changes in the store\n * and make sure our registered components are updated with the new values.\n *\n * For each store change, we loop through each registered component and\n * check if the store change is mapped to a prop on the component. If it is,\n * we set the prop to the new value.\n *\n * We call this super early in the provider lifecycle so that we can make sure\n * that all components have the correct props before they are rendered.\n */\n Object.entries(this.stores).forEach(([storeName, store]) => {\n debug(`[${self.hostTagName}] (setupStoreListeners) Listening for changes in \"${storeName}\" store.`);\n store.use({\n set(stateKey, newValue, oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" changed`, { newValue, oldValue });\n if (newValue === oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" unchanged. Skipping.`);\n return;\n }\n\n const registeredComponents = self.registeredComponents;\n if (!registeredComponents) {\n debug(`[${self.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);\n return;\n }\n\n // Get our prop registrations for this store\n const props = self.propStateRegistrations.get(storeName as keyof typeof self.stores as string)?.get(stateKey.toString()) || [];\n debug(`[${self.hostTagName}] (setupStoreListeners) Found ${props.length} prop(s) registered for \"${stateKey.toString()}\" store.`, {\n props,\n propStateRegistrations: self.propStateRegistrations,\n });\n\n // Loop through each registered component and update the prop\n props.forEach(({ elementId, propKey }) => {\n const component = registeredComponents[elementId];\n if (!component) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Component \"${elementId}\" not found. Skipping.`, { component });\n return;\n }\n\n // Get the appropriate store\n const loadedStore = self.getStore(storeName as keyof typeof self.stores as string);\n const stateValue = loadedStore.state[stateKey as unknown as keyof typeof loadedStore.state];\n (component.element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${self.hostTagName}] (setupStoreListeners) Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey.toString()}\" value.`, { stateValue });\n });\n },\n });\n });\n }\n\n /**\n * Simple getter for the host element tag name.\n */\n private get hostTagName(): string {\n return this.host?.tagName?.toLowerCase() ?? 'nylas-provider';\n }\n}\n\nexport class NylasBaseProvider<T extends Record<string, ObservableMap<any>>> extends NylasAbstractProvider<T> {}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"app-globals-295a87be.js","mappings":"AAAe;;ACCH,MAAC,aAAa,GAAG;;;;","names":[],"sources":["src/common/global.ts","@stencil/core/internal/app-globals"],"sourcesContent":["export default async function () {}\n","import appGlobalScript from '/home/runner/work/nylas/nylas/packages/nylas-web-elements/src/common/global.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
1
+ {"file":"app-globals-295a87be.js","mappings":"AAAe;;ACCH,MAAC,aAAa,GAAG;;;;","names":[],"sources":["src/common/global.ts","@stencil/core/internal/app-globals"],"sourcesContent":["export default async function () {}\n","import appGlobalScript from '/Users/pooja.g/poojaguggari/github/nylas/packages/nylas-web-elements/src/common/global.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, c as createEvent, H as Host, a as getElement } from './index-091600eb.js';
2
- import { R as RegisterComponent } from './register-component-a1c3d7b4.js';
3
- import { b as debug, i as instance, E as timeToMinutes, F as convertTo12HourFormat, G as convertTo24HourFormat, H as minutesToTime, I as isValidUrl, r as sanitize, J as checkForMissingSlots } from './utils-b7f9cbcc.js';
2
+ import { R as RegisterComponent } from './register-component-9d4ceee5.js';
3
+ import { b as debug, i as instance, E as timeToMinutes, F as convertTo12HourFormat, G as convertTo24HourFormat, H as minutesToTime, I as isValidUrl, r as sanitize, J as checkForMissingSlots } from './utils-fb8a9ce4.js';
4
4
  import { T as TIMEZONE_MAP, D as DEFAULT_OPEN_HOURS, d as DEFAULT_FORM_FIELD_TYPES, F as FIELD_TYPES, a as LANGUAGE_MAP, L as LANGUAGE_CODE } from './constants-f51538ef.js';
5
5
 
6
6
  const iconCss$9 = ".sc-calendar-agenda-fill-icon-h{display:flex}";
@@ -650,6 +650,8 @@ const NylasBookingConfirmationRedirect = class {
650
650
  this.currentRedirectUrl = '';
651
651
  this.acceptUrl = undefined;
652
652
  this.componentLoaded = false;
653
+ this.requiredError = '';
654
+ this.patternError = '';
653
655
  }
654
656
  elementNameChangedHandler(newValue) {
655
657
  debug('nylas-booking-confirmation-redirect', 'elementNameChangedHandler', newValue);
@@ -666,6 +668,8 @@ const NylasBookingConfirmationRedirect = class {
666
668
  if (newVal === oldVal)
667
669
  return;
668
670
  instance.changeLanguage(newVal);
671
+ this.requiredError = instance.t('fieldRequired', { field: instance.t('redirectUrl') });
672
+ this.patternError = instance.t('invalidInputFormat', { field: instance.t('redirectUrl') });
669
673
  }
670
674
  connectedCallback() {
671
675
  debug('nylas-booking-confirmation-redirect', 'connectedCallback');
@@ -723,8 +727,8 @@ const NylasBookingConfirmationRedirect = class {
723
727
  if (this.acceptUrl && name === 'confirmation-redirect') {
724
728
  this.redirectUrlErrorMessage = '';
725
729
  if (!isValidUrl(this.currentRedirectUrl)) {
726
- this.internals.setValidity({ customError: true }, 'Please enter a valid URL.');
727
- this.redirectUrlErrorMessage = 'Please enter a valid URL.';
730
+ this.internals.setValidity({ customError: true }, instance.t('nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage'));
731
+ this.redirectUrlErrorMessage = instance.t('nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage');
728
732
  return;
729
733
  }
730
734
  this.internals.setValidity({});
@@ -737,8 +741,8 @@ const NylasBookingConfirmationRedirect = class {
737
741
  }
738
742
  formSubmittedHandler(_event) {
739
743
  if (this.acceptUrl && !isValidUrl(this.currentRedirectUrl)) {
740
- this.internals.setValidity({ customError: true }, 'Please enter a valid URL.');
741
- this.redirectUrlErrorMessage = 'Please enter a valid URL.';
744
+ this.internals.setValidity({ customError: true }, instance.t('nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage'));
745
+ this.redirectUrlErrorMessage = instance.t('nylasBookingConfirmationRedirect.customRedirectUrlErrorMessage');
742
746
  }
743
747
  else {
744
748
  this.internals.setValidity({});
@@ -755,7 +759,7 @@ const NylasBookingConfirmationRedirect = class {
755
759
  value: 'custom',
756
760
  },
757
761
  ];
758
- return (h(Host, { key: 'cdeb8b02f983324f32eab10e0562d104e6502aaf' }, h("div", { key: '5e3acf615cebba5d2d78fbfd2c3cf6e4fe4dcd2a', class: "nylas-booking-confirmation-redirect", part: "nbcr" }, redirectOptions.length > 0 && (h("div", { class: "nylas-booking-confirmation-redirect__dropdown" }, h("span", { class: "label" }, instance.t('nylasBookingConfirmationRedirect.dropdownLabel'), h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, instance.t('nylasBookingConfirmationRedirect.tooltip.desc')))), this.componentLoaded && (h("select-dropdown", { name: "confirmation-redirect-dropdown", options: redirectOptions, withSearch: false, defaultSelectedOption: redirectOptions.find(option => option.value === (this.acceptUrl ? 'custom' : 'default')), exportparts: "sd_dropdown: nbcr__dropdown, sd_dropdown-button: nbcr__dropdown-button, sd_dropdown-content: nbcr__dropdown-content" })), this.acceptUrl && (h("div", null, h("input-component", { name: "confirmation-redirect", id: "confirmation-redirect", type: "text", placeholder: "Enter custom redirect URL", required: false, part: "ic__input_wrapper: nbcr__input-textfield", defaultValue: this.currentRedirectUrl }), this.redirectUrlErrorMessage && h("span", { class: "error-message" }, this.redirectUrlErrorMessage))))))));
762
+ return (h(Host, { key: '3f0b860be075b40c1c4c128b3300de4ecccd8057' }, h("div", { key: '75bd98cf98b22ede61543e1c6d4cb3e1a2fab868', class: "nylas-booking-confirmation-redirect", part: "nbcr" }, redirectOptions.length > 0 && (h("div", { class: "nylas-booking-confirmation-redirect__dropdown" }, h("span", { class: "label" }, instance.t('nylasBookingConfirmationRedirect.dropdownLabel'), h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, instance.t('nylasBookingConfirmationRedirect.tooltip.desc')))), this.componentLoaded && (h("select-dropdown", { name: "confirmation-redirect-dropdown", options: redirectOptions, withSearch: false, defaultSelectedOption: redirectOptions.find(option => option.value === (this.acceptUrl ? 'custom' : 'default')), exportparts: "sd_dropdown: nbcr__dropdown, sd_dropdown-button: nbcr__dropdown-button, sd_dropdown-content: nbcr__dropdown-content" })), this.acceptUrl && (h("div", null, h("input-component", { name: "confirmation-redirect", id: "confirmation-redirect", type: "text", placeholder: instance.t('nylasBookingConfirmationRedirect.customRedirectUrlPlaceholder'), required: false, part: "ic__input_wrapper: nbcr__input-textfield", requiredError: this.requiredError, patternError: this.patternError, defaultValue: this.currentRedirectUrl }), this.redirectUrlErrorMessage && h("span", { class: "error-message" }, this.redirectUrlErrorMessage))))))));
759
763
  }
760
764
  static get formAssociated() { return true; }
761
765
  get host() { return getElement(this); }
@@ -4621,11 +4625,14 @@ const NylasConfirmationEmail = class {
4621
4625
  render() {
4622
4626
  const organizer = this.participantsState.find(p => p.is_organizer);
4623
4627
  const organizerName = organizer?.name || organizer?.email;
4624
- return (h(Host, { key: 'f97ea75387183c592ff2d7c125c1749cd5786540' }, h("div", { key: '9a28805654e4c8fb4778d821b92c45cb8c616730', class: "nylas-confirmation-email", part: "nce" }, h("div", { key: '3c9f7313a008cfbe506a211b46b361da4447a481', class: "header", part: "nce__header" }, h("div", { key: '4c980155e1b10a49b50202a6c34e45c3d8882e22' }, h("h3", { key: 'e56be66a98d11404875372d40ea1bca5564c1ba1' }, this.confirmationEmail?.booking_confirmed?.title ||
4625
- instance.t('nylasConfirmationEmail.headerTitle', { organizerName: `${organizerName ? ` with ${organizerName}` : ''}` })), h("p", { key: 'c4ceda25ce206e9ca78cfcc4bb887a89a7498b73' }, instance.t('nylasConfirmationEmail.headerSubTitle'))), this.isConfirmationEmailOpen ? (h("div", { class: "confirmation-email-toggle", part: "nce__confirmation-email-toggle--container" }, h("span", { class: `chevron ${this.isConfirmationEmailOpen ? 'open' : 'closed'} `, onClick: () => this.toggleConfirmationEmail() }, h("chevron-icon", { width: "24", height: "24" })))) : (h("button-component", { variant: 'basic', clickHandler: event => {
4628
+ return (h(Host, { key: 'f97ea75387183c592ff2d7c125c1749cd5786540' }, h("div", { key: '9a28805654e4c8fb4778d821b92c45cb8c616730', class: "nylas-confirmation-email", part: "nce" }, h("div", { key: '3c9f7313a008cfbe506a211b46b361da4447a481', class: "header", part: "nce__header" }, h("div", { key: '4c980155e1b10a49b50202a6c34e45c3d8882e22' }, h("h3", { key: 'e56be66a98d11404875372d40ea1bca5564c1ba1' }, this.confirmationEmail?.booking_confirmed?.title || organizerName
4629
+ ? instance.t('nylasConfirmationEmail.headerTitle_withOrganizer', { organizerName: organizerName })
4630
+ : instance.t('nylasConfirmationEmail.headerTitle')), h("p", { key: 'bf710ceb827923da51a2ab5e79217491d39cbc66' }, instance.t('nylasConfirmationEmail.headerSubTitle'))), this.isConfirmationEmailOpen ? (h("div", { class: "confirmation-email-toggle", part: "nce__confirmation-email-toggle--container" }, h("span", { class: `chevron ${this.isConfirmationEmailOpen ? 'open' : 'closed'} `, onClick: () => this.toggleConfirmationEmail() }, h("chevron-icon", { width: "24", height: "24" })))) : (h("button-component", { variant: 'basic', clickHandler: event => {
4626
4631
  event.preventDefault();
4627
4632
  this.toggleConfirmationEmail();
4628
- } }, h("edit-icon", { width: "16", height: "16" }), instance.t('nylasConfirmationEmail.editButtonText')))), this.isConfirmationEmailOpen ? (h("div", { class: "nylas-confirmation-email__body", part: "nce__body" }, h("div", { class: "nylas-confirmation-email__section" }, this.nylasBranding && (h("div", { class: "nylas-confirmation-email__row" }, h("label", null, instance.t('nylasConfirmationEmail.nylasBranding.label'), h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, instance.t('nylasConfirmationEmail.nylasBranding.tooltip.desc'))))), h("toggle-switch", { exportparts: "ts_label: nce__toggle-label, ts_input: nce_toggle-input, ts_slider: nce_toggle-slider", name: `confirmation-email-show-branding`, checked: this.confirmationEmail?.show_nylas_branding }))), h("div", { class: "nylas-confirmation-email__row" }, h("div", { class: "subsection" }, h("div", { class: "input-container" }, h("label", null, instance.t('nylasConfirmationEmail.companyLogoUrl.label'), h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, instance.t('nylasConfirmationEmail.companyLogoUrl.tooltip.desc'))))), this.confirmationEmail && (h("input-image-url", { name: "confirmation-email-logo", exportparts: "iiu__logo-input-textfield: nce__input-image-url", errorMessage: this.invalidImageErrorMessage, imageUrl: this.confirmationEmail?.logo ?? '' }))))), h("div", { class: "nylas-confirmation-email__row full-width-col" }, h("div", { class: "subsection" }, h("h3", null, instance.t('nylasConfirmationEmail.emailMessage.header')), h("div", { class: "input-container" }, h("label", { htmlFor: "title" }, instance.t('nylasConfirmationEmail.emailMessage.label'), h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, instance.t('nylasConfirmationEmail.emailMessage.tooltip.desc'))))), h("input-component", { name: "confirmation-email-title", maxLength: 60, placeholder: instance.t('nylasConfirmationEmail.headerTitle', { organizerName: `${organizerName ? ` with ${organizerName}` : ''}` }), defaultValue: this.confirmationEmail?.booking_confirmed?.title ?? '' })), h("div", { class: "input-container" }, h("textarea-component", { label: instance.t('nylasConfirmationEmail.emailMessage.additionalInfoLabel'), name: "confirmation-email-body", id: "confirmation-email-body", placeholder: instance.t('nylasConfirmationEmail.emailMessage.additionalInfoPlaceholder'), tooltip: instance.t('nylasConfirmationEmail.emailMessage.additionalInfoTooltip'), maxLength: 500, defaultValue: this.confirmationEmail?.booking_confirmed?.body ?? '' }))))))) : (h("div", { class: "nylas-confirmation-email__summary", part: "nce__summary" }, h("p", null, h("span", { class: "summary-icon" }, h("person-clipboard-icon", null)), instance.t('nylasConfirmationEmail.allHosts')), h("p", null, h("span", { class: "summary-icon" }, h("clock-icon", null)), instance.t('nylasConfirmationEmail.immediatelyUponBooking')))))));
4633
+ } }, h("edit-icon", { width: "16", height: "16" }), instance.t('nylasConfirmationEmail.editButtonText')))), this.isConfirmationEmailOpen ? (h("div", { class: "nylas-confirmation-email__body", part: "nce__body" }, h("div", { class: "nylas-confirmation-email__section" }, this.nylasBranding && (h("div", { class: "nylas-confirmation-email__row" }, h("label", null, instance.t('nylasConfirmationEmail.nylasBranding.label'), h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, instance.t('nylasConfirmationEmail.nylasBranding.tooltip.desc'))))), h("toggle-switch", { exportparts: "ts_label: nce__toggle-label, ts_input: nce_toggle-input, ts_slider: nce_toggle-slider", name: `confirmation-email-show-branding`, checked: this.confirmationEmail?.show_nylas_branding }))), h("div", { class: "nylas-confirmation-email__row" }, h("div", { class: "subsection" }, h("div", { class: "input-container" }, h("label", null, instance.t('nylasConfirmationEmail.companyLogoUrl.label'), h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, instance.t('nylasConfirmationEmail.companyLogoUrl.tooltip.desc'))))), this.confirmationEmail && (h("input-image-url", { name: "confirmation-email-logo", exportparts: "iiu__logo-input-textfield: nce__input-image-url", errorMessage: this.invalidImageErrorMessage, imageUrl: this.confirmationEmail?.logo ?? '' }))))), h("div", { class: "nylas-confirmation-email__row full-width-col" }, h("div", { class: "subsection" }, h("h3", null, instance.t('nylasConfirmationEmail.emailMessage.header')), h("div", { class: "input-container" }, h("label", { htmlFor: "title" }, instance.t('nylasConfirmationEmail.emailMessage.label'), h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, instance.t('nylasConfirmationEmail.emailMessage.tooltip.desc'))))), h("input-component", { name: "confirmation-email-title", maxLength: 60, placeholder: organizerName
4634
+ ? instance.t('nylasConfirmationEmail.headerTitle_withOrganizer', { organizerName: organizerName })
4635
+ : instance.t('nylasConfirmationEmail.headerTitle'), defaultValue: this.confirmationEmail?.booking_confirmed?.title ?? '' })), h("div", { class: "input-container" }, h("textarea-component", { label: instance.t('nylasConfirmationEmail.emailMessage.additionalInfoLabel'), name: "confirmation-email-body", id: "confirmation-email-body", placeholder: instance.t('nylasConfirmationEmail.emailMessage.additionalInfoPlaceholder'), tooltip: instance.t('nylasConfirmationEmail.emailMessage.additionalInfoTooltip'), maxLength: 500, defaultValue: this.confirmationEmail?.booking_confirmed?.body ?? '' }))))))) : (h("div", { class: "nylas-confirmation-email__summary", part: "nce__summary" }, h("p", null, h("span", { class: "summary-icon" }, h("person-clipboard-icon", null)), instance.t('nylasConfirmationEmail.allHosts')), h("p", null, h("span", { class: "summary-icon" }, h("clock-icon", null)), instance.t('nylasConfirmationEmail.immediatelyUponBooking')))))));
4629
4636
  }
4630
4637
  static get formAssociated() { return true; }
4631
4638
  get host() { return getElement(this); }
@@ -4987,6 +4994,8 @@ const NylasCustomEventSlug = class {
4987
4994
  this.urlSlug = undefined;
4988
4995
  this.focus = false;
4989
4996
  this.copied = false;
4997
+ this.requiredError = instance.t('fieldRequired', { field: 'Slug' });
4998
+ this.patternError = instance.t('invalidInputFormat', { field: 'Slug' });
4990
4999
  }
4991
5000
  connectedCallback() {
4992
5001
  debug('nylas-custom-event-slug', 'connectedCallback');
@@ -5032,6 +5041,8 @@ const NylasCustomEventSlug = class {
5032
5041
  if (newVal === oldVal)
5033
5042
  return;
5034
5043
  instance.changeLanguage(newVal);
5044
+ this.requiredError = instance.t('fieldRequired', { field: 'Slug' });
5045
+ this.patternError = instance.t('invalidInputFormat', { field: 'Slug' });
5035
5046
  }
5036
5047
  async nylasFormInputChangeHandler(event) {
5037
5048
  const { name, value } = event.detail;
@@ -5049,14 +5060,14 @@ const NylasCustomEventSlug = class {
5049
5060
  this.slugErrorMessage = '';
5050
5061
  this.internals.setValidity({});
5051
5062
  this.focus = false;
5052
- if (this.requiresSlug && this.urlSlug === '') {
5053
- this.internals.setValidity({ customError: true }, 'Slug is required');
5054
- this.slugErrorMessage = 'Slug cannot be blank';
5063
+ if (this.requiresSlug && this.urlSlug.trim() === '') {
5064
+ this.internals.setValidity({ customError: true }, instance.t('nylasCustomEventSlug.slugRequiredErrorMessage'));
5065
+ this.slugErrorMessage = instance.t('nylasCustomEventSlug.slugRequiredErrorMessage');
5055
5066
  return;
5056
5067
  }
5057
- if (!/^[A-Za-z0-9_-]*$/.test(this.urlSlug)) {
5058
- this.internals.setValidity({ customError: true }, 'Invalid slug: Only letters, numbers, and hyphens are allowed.');
5059
- this.slugErrorMessage = 'Invalid slug: Only letters, numbers, and hyphens are allowed.';
5068
+ if (!/^[A-Za-z0-9._-]*$/.test(this.urlSlug.trim())) {
5069
+ this.internals.setValidity({ customError: true }, instance.t('nylasCustomEventSlug.slugErrorMessage'));
5070
+ this.slugErrorMessage = instance.t('nylasCustomEventSlug.slugErrorMessage');
5060
5071
  }
5061
5072
  }
5062
5073
  formSubmittedHandler(event) {
@@ -5082,7 +5093,7 @@ const NylasCustomEventSlug = class {
5082
5093
  if (!this.requiresSlug)
5083
5094
  return null;
5084
5095
  const isComponentReady = typeof this.urlSlug !== 'undefined';
5085
- return (h(Host, null, h("div", { class: "nylas-custom-event-slug", part: "nces" }, h("div", { class: "header", part: "nces__header" }, h("div", null, h("h3", null, instance.t('nylasCustomEventSlug.headerTitle')), h("p", null, instance.t('nylasCustomEventSlug.headerSubTitle'))), h("div", { class: "drawer-toggle", part: "nces__drawer-toggle--container" }, h("span", { class: `chevron ${this.isOpen ? 'open' : 'closed'} `, onClick: () => this.toggleDrawer() }, h("chevron-icon", { width: "24", height: "24" })))), this.isOpen && (h("div", { class: "nylas-custom-event-slug__body", part: "nces__body" }, h("div", { class: "nylas-custom-event-slug__section" }, h("div", { class: "nylas-custom-event-slug__row" }, h("div", { class: "input-container" }, h("label", null, instance.t('nylasCustomEventSlug.eventSlugLabel'), h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, instance.t('nylasCustomEventSlug.tooltip.desc'))))), h("div", { class: { 'nylas-custom-event-slug__input-wrapper': true, 'focus': this.focus, 'error': !!this.slugErrorMessage } }, h("div", { slot: "prefix", class: "prefix" }, "/"), isComponentReady && (h("input-component", { name: "event-slug", id: "event-slug", type: "text", required: false, placeholder: "my-link-name", exportparts: "ic_input: nces__input-textfield", defaultValue: this.urlSlug })), h("div", { slot: "icon", class: { icon: true, disabled: !this.urlSlug }, onClick: () => !this.copied && !!this.urlSlug && this.copyToClipboard() }, this.copied ? (h("div", { class: "copied" }, h("checkmark-icon", { width: "12", height: "18" }), " ", instance.t('nylasCustomEventSlug.copied'))) : (h("copy-icon", { width: "12", height: "18" })))), this.slugErrorMessage && h("span", { class: "error-message" }, this.slugErrorMessage)))))))));
5096
+ return (h(Host, null, h("div", { class: "nylas-custom-event-slug", part: "nces" }, h("div", { class: "header", part: "nces__header" }, h("div", null, h("h3", null, instance.t('nylasCustomEventSlug.headerTitle')), h("p", null, instance.t('nylasCustomEventSlug.headerSubTitle'))), h("div", { class: "drawer-toggle", part: "nces__drawer-toggle--container" }, h("span", { class: `chevron ${this.isOpen ? 'open' : 'closed'} `, onClick: () => this.toggleDrawer() }, h("chevron-icon", { width: "24", height: "24" })))), this.isOpen && (h("div", { class: "nylas-custom-event-slug__body", part: "nces__body" }, h("div", { class: "nylas-custom-event-slug__section" }, h("div", { class: "nylas-custom-event-slug__row" }, h("div", { class: "input-container" }, h("label", null, instance.t('nylasCustomEventSlug.eventSlugLabel'), h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, instance.t('nylasCustomEventSlug.tooltip.desc'))))), h("div", { class: { 'nylas-custom-event-slug__input-wrapper': true, 'focus': this.focus, 'error': !!this.slugErrorMessage } }, h("div", { slot: "prefix", class: "prefix" }, "/"), isComponentReady && (h("input-component", { name: "event-slug", id: "event-slug", type: "text", required: false, placeholder: "my-link-name", exportparts: "ic_input: nces__input-textfield", defaultValue: this.urlSlug, requiredError: this.requiredError, patternError: this.patternError })), h("div", { slot: "icon", class: { icon: true, disabled: !this.urlSlug }, onClick: () => !this.copied && !!this.urlSlug && this.copyToClipboard() }, this.copied ? (h("div", { class: "copied" }, h("checkmark-icon", { width: "12", height: "18" }), " ", instance.t('nylasCustomEventSlug.copied'))) : (h("copy-icon", { width: "12", height: "18" })))), this.slugErrorMessage && h("span", { class: "error-message" }, this.slugErrorMessage)))))))));
5086
5097
  }
5087
5098
  static get formAssociated() { return true; }
5088
5099
  get host() { return getElement(this); }
@@ -7160,7 +7171,9 @@ const NylasReminderEmails = class {
7160
7171
  recipientOptions = recipientOptions.filter(option => option.value !== 'all');
7161
7172
  }
7162
7173
  return (h(Host, { key: 'a14f383c9531076b75a3c8848b1a866199675f95' }, h("div", { key: 'bfa9969c2318b4f3c23bc159524da0f05b571b51', class: "cards-container" }, this.reminders.map((reminder, index) => {
7163
- return reminder.type !== 'webhook' ? (h("div", { class: "nylas-reminder-email", part: "nre" }, h("div", { class: "header", part: "nre__header" }, h("div", null, h("h3", null, instance.t('nylasReminderEmails.headerTitle', { organizerName: organizerName ? ` with ${organizerName} ` : '' })), h("p", null, instance.t('nylasReminderEmails.headerSubTitle'))), !reminder.editing ? (h("button-component", { variant: 'basic', key: `edit-${index} `, clickHandler: event => {
7174
+ return reminder.type !== 'webhook' ? (h("div", { class: "nylas-reminder-email", part: "nre" }, h("div", { class: "header", part: "nre__header" }, h("div", null, h("h3", null, organizerName
7175
+ ? instance.t('nylasReminderEmails.headerTitle_withOrganizer', { organizerName: ` ${organizerName}` })
7176
+ : instance.t('nylasReminderEmails.headerTitle')), h("p", null, instance.t('nylasReminderEmails.headerSubTitle'))), !reminder.editing ? (h("button-component", { variant: 'basic', key: `edit-${index} `, clickHandler: event => {
7164
7177
  event.preventDefault();
7165
7178
  reminder.editing = true;
7166
7179
  this.reminders = [...this.reminders];
@@ -7172,11 +7185,13 @@ const NylasReminderEmails = class {
7172
7185
  this.reminders = [...this.reminders];
7173
7186
  } }, h("chevron-icon", { width: "24", height: "24" }))))), reminder.editing ? (h("div", { class: "nylas-reminder-email__body", part: "nre__body" }, h("div", { class: "nylas-reminder-email__section" }, h("div", { class: "nylas-reminder-email__row" }, h("label", null, instance.t('nylasReminderEmails.emailRecipients.label')), h("select-dropdown", { name: `recipient-${index}`, options: recipientOptions, defaultSelectedOption: recipientOptions.find(i => i.value === reminder.recipient) ?? recipientOptions[0], withSearch: false })), h("div", { class: "nylas-reminder-email__row" }, h("label", null, instance.t('nylasReminderEmails.sendConfirmation.label'), h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, instance.t('nylasReminderEmails.sendConfirmation.tooltip.desc'))))), h("div", null, h("nylas-reminder-time", { name: `reminder-time-${index}`, eventReminderTimeMinutes: reminder.minutes_before_event, exportparts: "nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector" }), this.reminderErrors[`reminder-time-${index}`]?.error && (h("p", { class: "error-message" }, this.reminderErrors[`reminder-time-${index}`]?.error, ' ', h("button-component", { variant: "invisible", onClick: _e => {
7174
7187
  this.nylasSuggestReminderMinutes.emit({ minutes: this.reminderErrors[`reminder-time-${index}`]?.suggestion });
7175
- } }, this.reminderErrors[`reminder-time-${index}`]?.suggestion))))), h("div", { class: "nylas-reminder-email__block" }, h("label", null, instance.t('nylasReminderEmails.emailSubject.label')), h("input-component", { name: `reminder-subject-${index}`, maxLength: 60, placeholder: instance.t('nylasReminderEmails.emailSubject.placeholder', { organizerName: organizerName ? ` with ${organizerName}` : '' }), defaultValue: reminder?.email_subject || '' }))))) : (h("div", { class: "nylas-reminder-email__summary", part: "nre__summary" }, h("p", null, h("span", { class: "summary-icon" }, h("person-clipboard-icon", null)), recipientOptions.find(i => i.value === reminder.recipient)?.label), h("p", null, h("span", { class: "summary-icon" }, h("clock-icon", null)), this.formatReminderTime(reminder.minutes_before_event), " ", instance.t('nylasReminderEmails.beforeTheEvent')))))) : null;
7176
- })), h("button-component", { key: '7ce94e57ade399ef39bb69df3bef3c0eec4c94ce', class: "create-reminder", variant: 'basic', clickHandler: event => {
7188
+ } }, this.reminderErrors[`reminder-time-${index}`]?.suggestion))))), h("div", { class: "nylas-reminder-email__block" }, h("label", null, instance.t('nylasReminderEmails.emailSubject.label')), h("input-component", { name: `reminder-subject-${index}`, maxLength: 60, placeholder: organizerName
7189
+ ? instance.t('nylasReminderEmails.emailSubject.placeholder_withOrganizer', { organizerName: organizerName })
7190
+ : instance.t('nylasReminderEmails.emailSubject.placeholder'), defaultValue: reminder?.email_subject || '' }))))) : (h("div", { class: "nylas-reminder-email__summary", part: "nre__summary" }, h("p", null, h("span", { class: "summary-icon" }, h("person-clipboard-icon", null)), recipientOptions.find(i => i.value === reminder.recipient)?.label), h("p", null, h("span", { class: "summary-icon" }, h("clock-icon", null)), this.formatReminderTime(reminder.minutes_before_event), " ", instance.t('nylasReminderEmails.beforeTheEvent')))))) : null;
7191
+ })), h("button-component", { key: 'c3ed905e5bb3a2dfd208e2ee15d687af5bce77b7', class: "create-reminder", variant: 'basic', clickHandler: event => {
7177
7192
  event.preventDefault();
7178
7193
  this.addReminder();
7179
- } }, h("plus-icon", { key: '9c40a99b724f31d196f81640c882d2c673f31f43', width: "16", height: "16" }), instance.t('nylasReminderEmails.newReminderButtonText'))));
7194
+ } }, h("plus-icon", { key: '7ad8981e96e6bafc71a8ee0853412b40d04063c8', width: "16", height: "16" }), instance.t('nylasReminderEmails.newReminderButtonText'))));
7180
7195
  }
7181
7196
  static get formAssociated() { return true; }
7182
7197
  get host() { return getElement(this); }