@nylas/web-elements 1.1.0-canary.5 → 1.1.0-canary.8

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 (807) hide show
  1. package/dist/cjs/add-circle-icon.cjs.entry.js +1 -1
  2. package/dist/cjs/add-circle-icon_22.cjs.entry.js +242 -101
  3. package/dist/cjs/add-circle-icon_22.cjs.entry.js.map +1 -1
  4. package/dist/cjs/archive-icon.cjs.entry.js +1 -1
  5. package/dist/cjs/archive-icon_7.cjs.entry.js +7 -7
  6. package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
  7. package/dist/cjs/bold-icon.cjs.entry.js +1 -1
  8. package/dist/cjs/bold-icon_3.cjs.entry.js +3 -3
  9. package/dist/cjs/button-component.cjs.entry.js +2 -2
  10. package/dist/cjs/button-component.cjs.entry.js.map +1 -1
  11. package/dist/cjs/calendar-cancel-icon.cjs.entry.js +1 -1
  12. package/dist/cjs/calendar-check-icon.cjs.entry.js +1 -1
  13. package/dist/cjs/calendar-check-icon_2.cjs.entry.js +2 -2
  14. package/dist/cjs/calendar-icon.cjs.entry.js +1 -1
  15. package/dist/cjs/calendar-info-icon.cjs.entry.js +1 -1
  16. package/dist/cjs/calendar-patterns-icon.cjs.entry.js +1 -1
  17. package/dist/cjs/checkmark-circle-icon.cjs.entry.js +1 -1
  18. package/dist/cjs/chevron-icon.cjs.entry.js +1 -1
  19. package/dist/cjs/chevron-icon_3.cjs.entry.js +4 -4
  20. package/dist/cjs/close-icon.cjs.entry.js +1 -1
  21. package/dist/cjs/{constants-6baf1f1d.js → constants-3e962931.js} +11 -1
  22. package/dist/cjs/{constants-6baf1f1d.js.map → constants-3e962931.js.map} +1 -1
  23. package/dist/cjs/{constants-0fba94a4.js → constants-d590922e.js} +11 -1
  24. package/dist/cjs/{constants-0fba94a4.js.map → constants-d590922e.js.map} +1 -1
  25. package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
  26. package/dist/cjs/flow-icon.cjs.entry.js +1 -1
  27. package/dist/cjs/folder-icon.cjs.entry.js +1 -1
  28. package/dist/cjs/forward-icon.cjs.entry.js +1 -1
  29. package/dist/cjs/forward-icon_6.cjs.entry.js +9 -9
  30. package/dist/cjs/globe-icon.cjs.entry.js +1 -1
  31. package/dist/cjs/google-logo-icon.cjs.entry.js +1 -1
  32. package/dist/cjs/google-logo-icon_4.cjs.entry.js +95 -51
  33. package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
  34. package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
  35. package/dist/cjs/index.cjs.js +2 -2
  36. package/dist/cjs/{index.es-b12b7df1.js → index.es-4a7d8d3f.js} +2 -2
  37. package/dist/cjs/{index.es-b12b7df1.js.map → index.es-4a7d8d3f.js.map} +1 -1
  38. package/dist/cjs/{index.es-0a0f2d87.js → index.es-b2cce060.js} +2 -2
  39. package/dist/cjs/{index.es-0a0f2d87.js.map → index.es-b2cce060.js.map} +1 -1
  40. package/dist/cjs/info-icon.cjs.entry.js +1 -1
  41. package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
  42. package/dist/cjs/italic-icon.cjs.entry.js +1 -1
  43. package/dist/cjs/loader.cjs.js +1 -1
  44. package/dist/cjs/loading-icon.cjs.entry.js +1 -1
  45. package/dist/cjs/location-icon.cjs.entry.js +1 -1
  46. package/dist/cjs/location-off-icon.cjs.entry.js +1 -1
  47. package/dist/cjs/{mailbox-store-05fa3bec.js → mailbox-store-a2f858b7.js} +3 -3
  48. package/dist/cjs/{mailbox-store-05fa3bec.js.map → mailbox-store-a2f858b7.js.map} +1 -1
  49. package/dist/cjs/{mailbox-store-14531fd4.js → mailbox-store-ecceb918.js} +3 -3
  50. package/dist/cjs/{mailbox-store-14531fd4.js.map → mailbox-store-ecceb918.js.map} +1 -1
  51. package/dist/cjs/microsoft-logo-icon.cjs.entry.js +1 -1
  52. package/dist/cjs/multi-select-dropdown.cjs.entry.js +3 -3
  53. package/dist/cjs/nylas-additional-participants.cjs.entry.js +3 -3
  54. package/dist/cjs/{nylas-api-request-2a0e7022.js → nylas-api-request-28b4576a.js} +14 -3
  55. package/dist/cjs/nylas-api-request-28b4576a.js.map +1 -0
  56. package/dist/cjs/{nylas-api-request-55923233.js → nylas-api-request-c9e0e347.js} +14 -3
  57. package/dist/cjs/nylas-api-request-c9e0e347.js.map +1 -0
  58. package/dist/cjs/nylas-availability-picker.cjs.entry.js +33 -16
  59. package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
  60. package/dist/cjs/nylas-booked-event-card.cjs.entry.js +3 -3
  61. package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +7 -7
  62. package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js +12 -6
  63. package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js.map +1 -1
  64. package/dist/cjs/nylas-booking-form.cjs.entry.js +2 -2
  65. package/dist/cjs/nylas-buffer-time.cjs.entry.js +2 -2
  66. package/dist/cjs/nylas-calendar-picker.cjs.entry.js +13 -8
  67. package/dist/cjs/nylas-calendar-picker.cjs.entry.js.map +1 -1
  68. package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +3 -3
  69. package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +3 -3
  70. package/dist/cjs/nylas-composer.cjs.entry.js +2 -2
  71. package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +21 -12
  72. package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js.map +1 -1
  73. package/dist/cjs/nylas-date-picker.cjs.entry.js +2 -2
  74. package/dist/cjs/nylas-editor-tabs.cjs.entry.js +69 -40
  75. package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
  76. package/dist/cjs/nylas-event-description.cjs.entry.js +15 -6
  77. package/dist/cjs/nylas-event-description.cjs.entry.js.map +1 -1
  78. package/dist/cjs/nylas-event-duration.cjs.entry.js +15 -10
  79. package/dist/cjs/nylas-event-duration.cjs.entry.js.map +1 -1
  80. package/dist/cjs/nylas-event-info.cjs.entry.js +3 -3
  81. package/dist/cjs/nylas-event-limits.cjs.entry.js +3 -3
  82. package/dist/cjs/nylas-event-title.cjs.entry.js +70 -19
  83. package/dist/cjs/nylas-event-title.cjs.entry.js.map +1 -1
  84. package/dist/cjs/nylas-form-card.cjs.entry.js +3 -3
  85. package/dist/cjs/nylas-if-state.cjs.entry.js +2 -2
  86. package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +24 -11
  87. package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js.map +1 -1
  88. package/dist/cjs/nylas-list-configurations.cjs.entry.js +26 -11
  89. package/dist/cjs/nylas-list-configurations.cjs.entry.js.map +1 -1
  90. package/dist/cjs/nylas-list-folders.cjs.entry.js +3 -3
  91. package/dist/cjs/nylas-list-threads.cjs.entry.js +3 -3
  92. package/dist/cjs/nylas-locale-switch.cjs.entry.js +3 -3
  93. package/dist/cjs/nylas-location-component.cjs.entry.js +17 -6
  94. package/dist/cjs/nylas-location-component.cjs.entry.js.map +1 -1
  95. package/dist/cjs/nylas-login.cjs.entry.js +3 -3
  96. package/dist/cjs/nylas-logo.cjs.entry.js +1 -1
  97. package/dist/cjs/nylas-mailbox-pagination.cjs.entry.js +2 -2
  98. package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +3 -3
  99. package/dist/cjs/nylas-mailbox.cjs.entry.js +4 -4
  100. package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js +28 -13
  101. package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js.map +1 -1
  102. package/dist/cjs/nylas-notification.cjs.entry.js +2 -2
  103. package/dist/cjs/nylas-provider.cjs.entry.js +6 -6
  104. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +18 -18
  105. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
  106. package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
  107. package/dist/cjs/nylas-selected-event-card.cjs.entry.js +3 -3
  108. package/dist/cjs/nylas-summarize-message-button.cjs.entry.js +4 -4
  109. package/dist/cjs/nylas-threads-refresh.cjs.entry.js +4 -4
  110. package/dist/cjs/nylas-threads-search.cjs.entry.js +3 -3
  111. package/dist/cjs/nylas-time-window-picker.cjs.entry.js +2 -2
  112. package/dist/cjs/nylas-timeslot-picker.cjs.entry.js +2 -2
  113. package/dist/cjs/nylas-view-email.cjs.entry.js +2 -2
  114. package/dist/cjs/nylas-view-thread.cjs.entry.js +3 -3
  115. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  116. package/dist/cjs/people-icon.cjs.entry.js +1 -1
  117. package/dist/cjs/play-icon.cjs.entry.js +1 -1
  118. package/dist/cjs/play-icon_2.cjs.entry.js +2 -2
  119. package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
  120. package/dist/cjs/{register-component-c8b6e907.js → register-component-7ecacf90.js} +2 -2
  121. package/dist/cjs/{register-component-09ebdf31.js.map → register-component-7ecacf90.js.map} +1 -1
  122. package/dist/cjs/{register-component-09ebdf31.js → register-component-98ab6f54.js} +2 -2
  123. package/dist/cjs/{register-component-c8b6e907.js.map → register-component-98ab6f54.js.map} +1 -1
  124. package/dist/cjs/reply-all-icon.cjs.entry.js +1 -1
  125. package/dist/cjs/reply-icon.cjs.entry.js +1 -1
  126. package/dist/cjs/{scheduler-config-store-4d93a9b7.js → scheduler-config-store-37690bf0.js} +10 -4
  127. package/dist/cjs/scheduler-config-store-37690bf0.js.map +1 -0
  128. package/dist/cjs/{scheduler-config-store-a0e08cab.js → scheduler-config-store-529c8d7e.js} +10 -4
  129. package/dist/cjs/scheduler-config-store-529c8d7e.js.map +1 -0
  130. package/dist/cjs/{scheduler-store-e148a4cc.js → scheduler-store-22103c86.js} +16 -3
  131. package/dist/cjs/scheduler-store-22103c86.js.map +1 -0
  132. package/dist/cjs/{scheduler-store-a492526c.js → scheduler-store-fad9ed7a.js} +16 -3
  133. package/dist/cjs/scheduler-store-fad9ed7a.js.map +1 -0
  134. package/dist/cjs/search-icon.cjs.entry.js +1 -1
  135. package/dist/cjs/select-dropdown.cjs.entry.js +2 -2
  136. package/dist/cjs/sent-icon.cjs.entry.js +1 -1
  137. package/dist/cjs/spam-icon.cjs.entry.js +1 -1
  138. package/dist/cjs/star-icon.cjs.entry.js +1 -1
  139. package/dist/cjs/stop-icon.cjs.entry.js +1 -1
  140. package/dist/cjs/time-period-selector.cjs.entry.js +2 -2
  141. package/dist/cjs/tooltip-component.cjs.entry.js +1 -1
  142. package/dist/cjs/translate-icon.cjs.entry.js +1 -1
  143. package/dist/cjs/trash-icon.cjs.entry.js +1 -1
  144. package/dist/cjs/underline-icon.cjs.entry.js +1 -1
  145. package/dist/cjs/{utils-20663d54.js → utils-9fc33c77.js} +46 -1
  146. package/dist/cjs/utils-9fc33c77.js.map +1 -0
  147. package/dist/cjs/{utils-2c7f0895.js → utils-d8cfc3be.js} +46 -1
  148. package/dist/cjs/{utils-2c7f0895.js.map → utils-d8cfc3be.js.map} +1 -1
  149. package/dist/cjs/warning-icon.cjs.entry.js +1 -1
  150. package/dist/collection/common/constants.js +9 -0
  151. package/dist/collection/common/constants.js.map +1 -1
  152. package/dist/collection/common/icons/add-circle.js +1 -1
  153. package/dist/collection/common/icons/archive.js +1 -1
  154. package/dist/collection/common/icons/arrow.js +1 -1
  155. package/dist/collection/common/icons/bold.js +1 -1
  156. package/dist/collection/common/icons/calendar-cancel.js +1 -1
  157. package/dist/collection/common/icons/calendar-check.js +1 -1
  158. package/dist/collection/common/icons/calendar-info.js +1 -1
  159. package/dist/collection/common/icons/calendar-patterns.js +1 -1
  160. package/dist/collection/common/icons/calendar.js +1 -1
  161. package/dist/collection/common/icons/checkmark-circle.js +1 -1
  162. package/dist/collection/common/icons/chevron.js +1 -1
  163. package/dist/collection/common/icons/close.js +1 -1
  164. package/dist/collection/common/icons/document-refresh.js +1 -1
  165. package/dist/collection/common/icons/flow.js +1 -1
  166. package/dist/collection/common/icons/folder.js +1 -1
  167. package/dist/collection/common/icons/forward.js +1 -1
  168. package/dist/collection/common/icons/globe.js +1 -1
  169. package/dist/collection/common/icons/google-logo.js +1 -1
  170. package/dist/collection/common/icons/inbox.js +1 -1
  171. package/dist/collection/common/icons/info.js +1 -1
  172. package/dist/collection/common/icons/italic.js +1 -1
  173. package/dist/collection/common/icons/loading.js +1 -1
  174. package/dist/collection/common/icons/location-off.js +1 -1
  175. package/dist/collection/common/icons/location.js +1 -1
  176. package/dist/collection/common/icons/microsoft-logo.js +1 -1
  177. package/dist/collection/common/icons/nylas-logo.js +1 -1
  178. package/dist/collection/common/icons/people.js +1 -1
  179. package/dist/collection/common/icons/play.js +1 -1
  180. package/dist/collection/common/icons/refresh.js +1 -1
  181. package/dist/collection/common/icons/reply-all.js +1 -1
  182. package/dist/collection/common/icons/reply.js +1 -1
  183. package/dist/collection/common/icons/search.js +1 -1
  184. package/dist/collection/common/icons/sent.js +1 -1
  185. package/dist/collection/common/icons/spam.js +1 -1
  186. package/dist/collection/common/icons/star.js +1 -1
  187. package/dist/collection/common/icons/stop.js +1 -1
  188. package/dist/collection/common/icons/translate.js +1 -1
  189. package/dist/collection/common/icons/trash.js +1 -1
  190. package/dist/collection/common/icons/underline.js +1 -1
  191. package/dist/collection/common/icons/warning.js +1 -1
  192. package/dist/collection/common/nylas-api-request.js +12 -1
  193. package/dist/collection/common/nylas-api-request.js.map +1 -1
  194. package/dist/collection/components/design-system/button-component/button-component.css +5 -0
  195. package/dist/collection/components/design-system/button-component/button-component.js +1 -1
  196. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +2 -2
  197. package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +2 -2
  198. package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
  199. package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
  200. package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +1 -1
  201. package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +1 -1
  202. package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +1 -1
  203. package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +1 -1
  204. package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +1 -1
  205. package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +2 -2
  206. package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +2 -2
  207. package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +1 -1
  208. package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +1 -1
  209. package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js +1 -1
  210. package/dist/collection/components/nylas-login/nylas-login.js +1 -1
  211. package/dist/collection/components/nylas-provider/nylas-provider.js +2 -2
  212. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
  213. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +1 -1
  214. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +1 -1
  215. package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
  216. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +1 -1
  217. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +55 -15
  218. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
  219. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +32 -5
  220. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
  221. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +23 -14
  222. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
  223. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +41 -9
  224. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js.map +1 -1
  225. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.css +35 -3
  226. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +99 -36
  227. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  228. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +4 -4
  229. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
  230. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.css +1 -1
  231. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +34 -2
  232. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
  233. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.css +1 -1
  234. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +35 -7
  235. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
  236. package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
  237. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
  238. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.css +8 -1
  239. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +102 -17
  240. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
  241. package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
  242. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +45 -9
  243. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
  244. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.css +39 -2
  245. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +46 -9
  246. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
  247. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.css +2 -2
  248. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js +37 -3
  249. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js.map +1 -1
  250. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +49 -11
  251. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
  252. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +6 -0
  253. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +36 -16
  254. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
  255. package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
  256. package/dist/collection/connector/nylas-scheduler-connector/errors/index.js +8 -0
  257. package/dist/collection/connector/nylas-scheduler-connector/errors/index.js.map +1 -1
  258. package/dist/collection/connector/shared/api/scheduler-config.js +6 -6
  259. package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
  260. package/dist/collection/connector/shared/api/scheduler.js +6 -1
  261. package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
  262. package/dist/collection/index.js +0 -1
  263. package/dist/collection/index.js.map +1 -1
  264. package/dist/collection/stores/scheduler-config-store.js +9 -3
  265. package/dist/collection/stores/scheduler-config-store.js.map +1 -1
  266. package/dist/collection/utils/utils.js +44 -0
  267. package/dist/collection/utils/utils.js.map +1 -1
  268. package/dist/components/add-circle.js +1 -1
  269. package/dist/components/archive.js +1 -1
  270. package/dist/components/arrow.js +1 -1
  271. package/dist/components/bold.js +1 -1
  272. package/dist/components/button-component2.js +2 -2
  273. package/dist/components/button-component2.js.map +1 -1
  274. package/dist/components/calendar-cancel.js +1 -1
  275. package/dist/components/calendar-check.js +1 -1
  276. package/dist/components/calendar-info.js +1 -1
  277. package/dist/components/calendar-patterns.js +1 -1
  278. package/dist/components/calendar.js +1 -1
  279. package/dist/components/checkmark-circle.js +1 -1
  280. package/dist/components/chevron.js +1 -1
  281. package/dist/components/close.js +1 -1
  282. package/dist/components/constants.js +11 -2
  283. package/dist/components/constants.js.map +1 -1
  284. package/dist/components/document-refresh-icon.js +1 -1
  285. package/dist/components/flow.js +1 -1
  286. package/dist/components/focus-visible.js +1 -1
  287. package/dist/components/folder.js +1 -1
  288. package/dist/components/forward.js +1 -1
  289. package/dist/components/globe.js +1 -1
  290. package/dist/components/google-logo.js +1 -1
  291. package/dist/components/inbox.js +1 -1
  292. package/dist/components/index.d.ts +0 -179
  293. package/dist/components/index.es.js +2 -194
  294. package/dist/components/index.es.js.map +1 -1
  295. package/dist/components/index.js +2 -89
  296. package/dist/components/index.js.map +1 -1
  297. package/dist/components/index2.js +196 -0
  298. package/dist/components/index2.js.map +1 -0
  299. package/dist/components/info.js +1 -1
  300. package/dist/components/italic.js +1 -1
  301. package/dist/components/loading.js +1 -1
  302. package/dist/components/location-off.js +1 -1
  303. package/dist/components/location.js +1 -1
  304. package/dist/components/mailbox-store.js +3 -2
  305. package/dist/components/mailbox-store.js.map +1 -1
  306. package/dist/components/microsoft-logo.js +1 -1
  307. package/dist/components/multi-select-dropdown2.js +3 -3
  308. package/dist/components/nylas-additional-participants.js +2 -2
  309. package/dist/{nylas-web-elements/nylas-api-request-4f3dbb72.js → components/nylas-api-request.js} +14 -3
  310. package/dist/components/nylas-api-request.js.map +1 -0
  311. package/dist/components/nylas-availability-picker2.js +33 -14
  312. package/dist/components/nylas-availability-picker2.js.map +1 -1
  313. package/dist/components/nylas-booked-event-card2.js +1 -1
  314. package/dist/components/nylas-booking-calendar-picker2.js +12 -5
  315. package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
  316. package/dist/components/nylas-booking-form2.js +1 -1
  317. package/dist/components/nylas-buffer-time2.js +1 -1
  318. package/dist/components/nylas-calendar-picker2.js +13 -8
  319. package/dist/components/nylas-calendar-picker2.js.map +1 -1
  320. package/dist/components/nylas-cancel-booking-form2.js +2 -2
  321. package/dist/components/nylas-cancelled-event-card2.js +2 -2
  322. package/dist/components/nylas-composer2.js +2 -2
  323. package/dist/components/nylas-custom-booking-flow2.js +23 -12
  324. package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
  325. package/dist/components/nylas-date-picker2.js +1 -1
  326. package/dist/components/nylas-editor-tabs2.js +74 -43
  327. package/dist/components/nylas-editor-tabs2.js.map +1 -1
  328. package/dist/components/nylas-event-description2.js +17 -6
  329. package/dist/components/nylas-event-description2.js.map +1 -1
  330. package/dist/components/nylas-event-duration2.js +16 -9
  331. package/dist/components/nylas-event-duration2.js.map +1 -1
  332. package/dist/components/nylas-event-info2.js +2 -2
  333. package/dist/components/nylas-event-limits2.js +2 -2
  334. package/dist/components/nylas-event-title2.js +74 -20
  335. package/dist/components/nylas-event-title2.js.map +1 -1
  336. package/dist/components/nylas-form-card2.js +2 -2
  337. package/dist/components/nylas-if-state.js +1 -1
  338. package/dist/components/nylas-limit-future-bookings2.js +25 -10
  339. package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
  340. package/dist/components/nylas-list-configurations2.js +28 -11
  341. package/dist/components/nylas-list-configurations2.js.map +1 -1
  342. package/dist/components/nylas-list-folders.js +2 -2
  343. package/dist/components/nylas-list-threads.js +2 -2
  344. package/dist/components/nylas-location-component2.js +18 -5
  345. package/dist/components/nylas-location-component2.js.map +1 -1
  346. package/dist/components/nylas-login.js +1 -1
  347. package/dist/components/nylas-logo2.js +1 -1
  348. package/dist/components/nylas-mailbox-pagination.js +1 -1
  349. package/dist/components/nylas-mailbox-toolbar-button.js +2 -2
  350. package/dist/components/nylas-mailbox.js +2 -2
  351. package/dist/components/nylas-min-cancellation-notice2.js +29 -12
  352. package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
  353. package/dist/components/nylas-notification2.js +2 -2
  354. package/dist/components/nylas-provider.js +2 -2
  355. package/dist/components/nylas-scheduler-editor.js +18 -58
  356. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  357. package/dist/components/nylas-scheduling.js +1 -1
  358. package/dist/components/nylas-selected-event-card2.js +1 -1
  359. package/dist/components/nylas-summarize-message-button2.js +3 -3
  360. package/dist/components/nylas-threads-refresh.js +3 -3
  361. package/dist/components/nylas-threads-search.js +2 -2
  362. package/dist/components/nylas-time-window-picker2.js +2 -2
  363. package/dist/components/nylas-timeslot-picker2.js +1 -1
  364. package/dist/components/nylas-view-email2.js +2 -2
  365. package/dist/components/nylas-view-thread.js +2 -2
  366. package/dist/components/people-icon.js +1 -1
  367. package/dist/components/play.js +1 -1
  368. package/dist/components/refresh.js +1 -1
  369. package/dist/components/register-component.js +1 -1
  370. package/dist/components/reply-all.js +1 -1
  371. package/dist/components/reply.js +1 -1
  372. package/dist/components/scheduler-config-store.js +10 -4
  373. package/dist/components/scheduler-config-store.js.map +1 -1
  374. package/dist/components/scheduler-store.js +16 -3
  375. package/dist/components/scheduler-store.js.map +1 -1
  376. package/dist/components/search.js +1 -1
  377. package/dist/components/select-dropdown2.js +2 -2
  378. package/dist/components/sent.js +1 -1
  379. package/dist/components/spam.js +1 -1
  380. package/dist/components/star.js +1 -1
  381. package/dist/components/stop.js +1 -1
  382. package/dist/components/time-period-selector2.js +2 -2
  383. package/dist/components/toolitp-component.js +1 -1
  384. package/dist/components/translate.js +1 -1
  385. package/dist/components/trash.js +1 -1
  386. package/dist/components/underline.js +1 -1
  387. package/dist/components/utils.js +45 -1
  388. package/dist/components/utils.js.map +1 -1
  389. package/dist/components/warning.js +1 -1
  390. package/dist/esm/add-circle-icon.entry.js +1 -1
  391. package/dist/esm/add-circle-icon_22.entry.js +242 -101
  392. package/dist/esm/add-circle-icon_22.entry.js.map +1 -1
  393. package/dist/esm/archive-icon.entry.js +1 -1
  394. package/dist/esm/archive-icon_7.entry.js +7 -7
  395. package/dist/esm/arrow-icon.entry.js +1 -1
  396. package/dist/esm/bold-icon.entry.js +1 -1
  397. package/dist/esm/bold-icon_3.entry.js +3 -3
  398. package/dist/esm/button-component.entry.js +2 -2
  399. package/dist/esm/button-component.entry.js.map +1 -1
  400. package/dist/esm/calendar-cancel-icon.entry.js +1 -1
  401. package/dist/esm/calendar-check-icon.entry.js +1 -1
  402. package/dist/esm/calendar-check-icon_2.entry.js +2 -2
  403. package/dist/esm/calendar-icon.entry.js +1 -1
  404. package/dist/esm/calendar-info-icon.entry.js +1 -1
  405. package/dist/esm/calendar-patterns-icon.entry.js +1 -1
  406. package/dist/esm/checkmark-circle-icon.entry.js +1 -1
  407. package/dist/esm/chevron-icon.entry.js +1 -1
  408. package/dist/esm/chevron-icon_3.entry.js +4 -4
  409. package/dist/esm/close-icon.entry.js +1 -1
  410. package/dist/esm/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
  411. package/dist/{nylas-web-elements/constants-335dffcf.js.map → esm/constants-bf39e913.js.map} +1 -1
  412. package/dist/esm/{constants-6ee60d6d.js → constants-f34b9c6e.js} +11 -2
  413. package/dist/esm/{constants-6ee60d6d.js.map → constants-f34b9c6e.js.map} +1 -1
  414. package/dist/esm/document-refresh-icon.entry.js +1 -1
  415. package/dist/esm/flow-icon.entry.js +1 -1
  416. package/dist/esm/folder-icon.entry.js +1 -1
  417. package/dist/esm/forward-icon.entry.js +1 -1
  418. package/dist/esm/forward-icon_6.entry.js +9 -9
  419. package/dist/esm/globe-icon.entry.js +1 -1
  420. package/dist/esm/google-logo-icon.entry.js +1 -1
  421. package/dist/esm/google-logo-icon_4.entry.js +95 -51
  422. package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
  423. package/dist/esm/inbox-icon.entry.js +1 -1
  424. package/dist/esm/{index.es-f57e612a.js → index.es-df564f87.js} +2 -2
  425. package/dist/esm/{index.es-f57e612a.js.map → index.es-df564f87.js.map} +1 -1
  426. package/dist/{nylas-web-elements/index.es-2842f8c8.js → esm/index.es-e4f027a2.js} +2 -2
  427. package/dist/esm/{index.es-2842f8c8.js.map → index.es-e4f027a2.js.map} +1 -1
  428. package/dist/esm/index.js +2 -2
  429. package/dist/esm/info-icon.entry.js +1 -1
  430. package/dist/esm/info-icon_2.entry.js +2 -2
  431. package/dist/esm/italic-icon.entry.js +1 -1
  432. package/dist/esm/loader.js +1 -1
  433. package/dist/esm/loading-icon.entry.js +1 -1
  434. package/dist/esm/location-icon.entry.js +1 -1
  435. package/dist/esm/location-off-icon.entry.js +1 -1
  436. package/dist/{nylas-web-elements/mailbox-store-d48269de.js → esm/mailbox-store-5075f820.js} +3 -3
  437. package/dist/{nylas-web-elements/mailbox-store-d48269de.js.map → esm/mailbox-store-5075f820.js.map} +1 -1
  438. package/dist/esm/{mailbox-store-47fc8a1a.js → mailbox-store-69c5c5f6.js} +3 -3
  439. package/dist/esm/{mailbox-store-47fc8a1a.js.map → mailbox-store-69c5c5f6.js.map} +1 -1
  440. package/dist/esm/microsoft-logo-icon.entry.js +1 -1
  441. package/dist/esm/multi-select-dropdown.entry.js +3 -3
  442. package/dist/esm/nylas-additional-participants.entry.js +3 -3
  443. package/dist/esm/{nylas-api-request-4f3dbb72.js → nylas-api-request-6a19db25.js} +14 -3
  444. package/dist/esm/nylas-api-request-6a19db25.js.map +1 -0
  445. package/dist/esm/{nylas-api-request-3120d9ac.js → nylas-api-request-b49b1da6.js} +14 -3
  446. package/dist/esm/nylas-api-request-b49b1da6.js.map +1 -0
  447. package/dist/esm/nylas-availability-picker.entry.js +33 -16
  448. package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
  449. package/dist/esm/nylas-booked-event-card.entry.js +3 -3
  450. package/dist/esm/nylas-booked-event-card_10.entry.js +7 -7
  451. package/dist/esm/nylas-booking-calendar-picker.entry.js +12 -6
  452. package/dist/esm/nylas-booking-calendar-picker.entry.js.map +1 -1
  453. package/dist/esm/nylas-booking-form.entry.js +2 -2
  454. package/dist/esm/nylas-buffer-time.entry.js +2 -2
  455. package/dist/esm/nylas-calendar-picker.entry.js +13 -8
  456. package/dist/esm/nylas-calendar-picker.entry.js.map +1 -1
  457. package/dist/esm/nylas-cancel-booking-form.entry.js +3 -3
  458. package/dist/esm/nylas-cancelled-event-card.entry.js +3 -3
  459. package/dist/esm/nylas-composer.entry.js +2 -2
  460. package/dist/esm/nylas-custom-booking-flow.entry.js +21 -12
  461. package/dist/esm/nylas-custom-booking-flow.entry.js.map +1 -1
  462. package/dist/esm/nylas-date-picker.entry.js +2 -2
  463. package/dist/esm/nylas-editor-tabs.entry.js +69 -40
  464. package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
  465. package/dist/esm/nylas-event-description.entry.js +15 -6
  466. package/dist/esm/nylas-event-description.entry.js.map +1 -1
  467. package/dist/esm/nylas-event-duration.entry.js +15 -10
  468. package/dist/esm/nylas-event-duration.entry.js.map +1 -1
  469. package/dist/esm/nylas-event-info.entry.js +3 -3
  470. package/dist/esm/nylas-event-limits.entry.js +3 -3
  471. package/dist/esm/nylas-event-title.entry.js +70 -19
  472. package/dist/esm/nylas-event-title.entry.js.map +1 -1
  473. package/dist/esm/nylas-form-card.entry.js +3 -3
  474. package/dist/esm/nylas-if-state.entry.js +2 -2
  475. package/dist/esm/nylas-limit-future-bookings.entry.js +24 -11
  476. package/dist/esm/nylas-limit-future-bookings.entry.js.map +1 -1
  477. package/dist/esm/nylas-list-configurations.entry.js +26 -11
  478. package/dist/esm/nylas-list-configurations.entry.js.map +1 -1
  479. package/dist/esm/nylas-list-folders.entry.js +3 -3
  480. package/dist/esm/nylas-list-threads.entry.js +3 -3
  481. package/dist/esm/nylas-locale-switch.entry.js +3 -3
  482. package/dist/esm/nylas-location-component.entry.js +17 -6
  483. package/dist/esm/nylas-location-component.entry.js.map +1 -1
  484. package/dist/esm/nylas-login.entry.js +3 -3
  485. package/dist/esm/nylas-logo.entry.js +1 -1
  486. package/dist/esm/nylas-mailbox-pagination.entry.js +2 -2
  487. package/dist/esm/nylas-mailbox-toolbar-button.entry.js +3 -3
  488. package/dist/esm/nylas-mailbox.entry.js +4 -4
  489. package/dist/esm/nylas-min-cancellation-notice.entry.js +28 -13
  490. package/dist/esm/nylas-min-cancellation-notice.entry.js.map +1 -1
  491. package/dist/esm/nylas-notification.entry.js +2 -2
  492. package/dist/esm/nylas-provider.entry.js +6 -6
  493. package/dist/esm/nylas-scheduler-editor.entry.js +18 -18
  494. package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
  495. package/dist/esm/nylas-scheduling.entry.js +3 -3
  496. package/dist/esm/nylas-selected-event-card.entry.js +3 -3
  497. package/dist/esm/nylas-summarize-message-button.entry.js +4 -4
  498. package/dist/esm/nylas-threads-refresh.entry.js +4 -4
  499. package/dist/esm/nylas-threads-search.entry.js +3 -3
  500. package/dist/esm/nylas-time-window-picker.entry.js +2 -2
  501. package/dist/esm/nylas-timeslot-picker.entry.js +2 -2
  502. package/dist/esm/nylas-view-email.entry.js +2 -2
  503. package/dist/esm/nylas-view-thread.entry.js +3 -3
  504. package/dist/esm/nylas-web-elements.js +1 -1
  505. package/dist/esm/people-icon.entry.js +1 -1
  506. package/dist/esm/play-icon.entry.js +1 -1
  507. package/dist/esm/play-icon_2.entry.js +2 -2
  508. package/dist/esm/refresh-icon.entry.js +1 -1
  509. package/dist/esm/{register-component-cf5c8420.js → register-component-b9cfcbaf.js} +2 -2
  510. package/dist/esm/{register-component-cf5c8420.js.map → register-component-b9cfcbaf.js.map} +1 -1
  511. package/dist/esm/{register-component-e5afe237.js → register-component-ff6f5df4.js} +2 -2
  512. package/dist/esm/{register-component-e5afe237.js.map → register-component-ff6f5df4.js.map} +1 -1
  513. package/dist/esm/reply-all-icon.entry.js +1 -1
  514. package/dist/esm/reply-icon.entry.js +1 -1
  515. package/dist/esm/{scheduler-config-store-6222c0ed.js → scheduler-config-store-07d98279.js} +10 -4
  516. package/dist/esm/scheduler-config-store-07d98279.js.map +1 -0
  517. package/dist/esm/{scheduler-config-store-0efc3519.js → scheduler-config-store-8f2e658e.js} +10 -4
  518. package/dist/esm/scheduler-config-store-8f2e658e.js.map +1 -0
  519. package/dist/esm/{scheduler-store-39d37291.js → scheduler-store-24fd0e91.js} +16 -3
  520. package/dist/esm/scheduler-store-24fd0e91.js.map +1 -0
  521. package/dist/esm/{scheduler-store-8ddcc496.js → scheduler-store-e62b2146.js} +16 -3
  522. package/dist/esm/scheduler-store-e62b2146.js.map +1 -0
  523. package/dist/esm/search-icon.entry.js +1 -1
  524. package/dist/esm/select-dropdown.entry.js +2 -2
  525. package/dist/esm/sent-icon.entry.js +1 -1
  526. package/dist/esm/spam-icon.entry.js +1 -1
  527. package/dist/esm/star-icon.entry.js +1 -1
  528. package/dist/esm/stop-icon.entry.js +1 -1
  529. package/dist/esm/time-period-selector.entry.js +2 -2
  530. package/dist/esm/tooltip-component.entry.js +1 -1
  531. package/dist/esm/translate-icon.entry.js +1 -1
  532. package/dist/esm/trash-icon.entry.js +1 -1
  533. package/dist/esm/underline-icon.entry.js +1 -1
  534. package/dist/{nylas-web-elements/utils-73d8a928.js → esm/utils-3e18e0b2.js} +46 -2
  535. package/dist/esm/{utils-73d8a928.js.map → utils-3e18e0b2.js.map} +1 -1
  536. package/dist/esm/{utils-d6204242.js → utils-db11d29c.js} +46 -2
  537. package/dist/esm/utils-db11d29c.js.map +1 -0
  538. package/dist/esm/warning-icon.entry.js +1 -1
  539. package/dist/nylas-web-elements/add-circle-icon.entry.js +1 -1
  540. package/dist/nylas-web-elements/archive-icon.entry.js +1 -1
  541. package/dist/nylas-web-elements/arrow-icon.entry.js +1 -1
  542. package/dist/nylas-web-elements/bold-icon.entry.js +1 -1
  543. package/dist/nylas-web-elements/button-component.entry.js +2 -2
  544. package/dist/nylas-web-elements/button-component.entry.js.map +1 -1
  545. package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +1 -1
  546. package/dist/nylas-web-elements/calendar-check-icon.entry.js +1 -1
  547. package/dist/nylas-web-elements/calendar-icon.entry.js +1 -1
  548. package/dist/nylas-web-elements/calendar-info-icon.entry.js +1 -1
  549. package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +1 -1
  550. package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +1 -1
  551. package/dist/nylas-web-elements/chevron-icon.entry.js +1 -1
  552. package/dist/nylas-web-elements/close-icon.entry.js +1 -1
  553. package/dist/nylas-web-elements/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
  554. package/dist/{esm/constants-335dffcf.js.map → nylas-web-elements/constants-bf39e913.js.map} +1 -1
  555. package/dist/nylas-web-elements/document-refresh-icon.entry.js +1 -1
  556. package/dist/nylas-web-elements/flow-icon.entry.js +1 -1
  557. package/dist/nylas-web-elements/folder-icon.entry.js +1 -1
  558. package/dist/nylas-web-elements/forward-icon.entry.js +1 -1
  559. package/dist/nylas-web-elements/globe-icon.entry.js +1 -1
  560. package/dist/nylas-web-elements/google-logo-icon.entry.js +1 -1
  561. package/dist/nylas-web-elements/inbox-icon.entry.js +1 -1
  562. package/dist/{esm/index.es-2842f8c8.js → nylas-web-elements/index.es-e4f027a2.js} +2 -2
  563. package/dist/nylas-web-elements/{index.es-2842f8c8.js.map → index.es-e4f027a2.js.map} +1 -1
  564. package/dist/nylas-web-elements/index.esm.js +2 -2
  565. package/dist/nylas-web-elements/info-icon.entry.js +1 -1
  566. package/dist/nylas-web-elements/italic-icon.entry.js +1 -1
  567. package/dist/nylas-web-elements/loading-icon.entry.js +1 -1
  568. package/dist/nylas-web-elements/location-icon.entry.js +1 -1
  569. package/dist/nylas-web-elements/location-off-icon.entry.js +1 -1
  570. package/dist/{esm/mailbox-store-d48269de.js → nylas-web-elements/mailbox-store-5075f820.js} +3 -3
  571. package/dist/{esm/mailbox-store-d48269de.js.map → nylas-web-elements/mailbox-store-5075f820.js.map} +1 -1
  572. package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +1 -1
  573. package/dist/nylas-web-elements/multi-select-dropdown.entry.js +3 -3
  574. package/dist/nylas-web-elements/nylas-additional-participants.entry.js +3 -3
  575. package/dist/nylas-web-elements/nylas-api-request-6a19db25.js +58 -0
  576. package/dist/nylas-web-elements/nylas-api-request-6a19db25.js.map +1 -0
  577. package/dist/nylas-web-elements/nylas-availability-picker.entry.js +33 -16
  578. package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
  579. package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +3 -3
  580. package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +12 -6
  581. package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js.map +1 -1
  582. package/dist/nylas-web-elements/nylas-booking-form.entry.js +2 -2
  583. package/dist/nylas-web-elements/nylas-buffer-time.entry.js +2 -2
  584. package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +13 -8
  585. package/dist/nylas-web-elements/nylas-calendar-picker.entry.js.map +1 -1
  586. package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +3 -3
  587. package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +3 -3
  588. package/dist/nylas-web-elements/nylas-composer.entry.js +2 -2
  589. package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +21 -12
  590. package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js.map +1 -1
  591. package/dist/nylas-web-elements/nylas-date-picker.entry.js +2 -2
  592. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +69 -40
  593. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
  594. package/dist/nylas-web-elements/nylas-event-description.entry.js +15 -6
  595. package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
  596. package/dist/nylas-web-elements/nylas-event-duration.entry.js +15 -10
  597. package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
  598. package/dist/nylas-web-elements/nylas-event-info.entry.js +3 -3
  599. package/dist/nylas-web-elements/nylas-event-limits.entry.js +3 -3
  600. package/dist/nylas-web-elements/nylas-event-title.entry.js +70 -19
  601. package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
  602. package/dist/nylas-web-elements/nylas-form-card.entry.js +3 -3
  603. package/dist/nylas-web-elements/nylas-if-state.entry.js +2 -2
  604. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +24 -11
  605. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js.map +1 -1
  606. package/dist/nylas-web-elements/nylas-list-configurations.entry.js +26 -11
  607. package/dist/nylas-web-elements/nylas-list-configurations.entry.js.map +1 -1
  608. package/dist/nylas-web-elements/nylas-list-folders.entry.js +3 -3
  609. package/dist/nylas-web-elements/nylas-list-threads.entry.js +3 -3
  610. package/dist/nylas-web-elements/nylas-locale-switch.entry.js +3 -3
  611. package/dist/nylas-web-elements/nylas-location-component.entry.js +17 -6
  612. package/dist/nylas-web-elements/nylas-location-component.entry.js.map +1 -1
  613. package/dist/nylas-web-elements/nylas-login.entry.js +3 -3
  614. package/dist/nylas-web-elements/nylas-logo.entry.js +1 -1
  615. package/dist/nylas-web-elements/nylas-mailbox-pagination.entry.js +2 -2
  616. package/dist/nylas-web-elements/nylas-mailbox-toolbar-button.entry.js +3 -3
  617. package/dist/nylas-web-elements/nylas-mailbox.entry.js +4 -4
  618. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +28 -13
  619. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js.map +1 -1
  620. package/dist/nylas-web-elements/nylas-notification.entry.js +2 -2
  621. package/dist/nylas-web-elements/nylas-provider.entry.js +6 -6
  622. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +18 -18
  623. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
  624. package/dist/nylas-web-elements/nylas-scheduling.entry.js +3 -3
  625. package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +3 -3
  626. package/dist/nylas-web-elements/nylas-summarize-message-button.entry.js +4 -4
  627. package/dist/nylas-web-elements/nylas-threads-refresh.entry.js +4 -4
  628. package/dist/nylas-web-elements/nylas-threads-search.entry.js +3 -3
  629. package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +2 -2
  630. package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +2 -2
  631. package/dist/nylas-web-elements/nylas-view-email.entry.js +2 -2
  632. package/dist/nylas-web-elements/nylas-view-thread.entry.js +3 -3
  633. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  634. package/dist/nylas-web-elements/p-00a9efc1.entry.js +2 -0
  635. package/dist/nylas-web-elements/{p-618b94cd.entry.js → p-074919b0.entry.js} +2 -2
  636. package/dist/nylas-web-elements/p-1e445e86.entry.js +2 -0
  637. package/dist/nylas-web-elements/{p-7692056f.entry.js → p-2081b475.entry.js} +2 -2
  638. package/dist/nylas-web-elements/{p-370cdcca.entry.js → p-21c3dcad.entry.js} +2 -2
  639. package/dist/nylas-web-elements/{p-55368bc0.entry.js → p-22531c3d.entry.js} +2 -2
  640. package/dist/nylas-web-elements/{p-7c55dfa0.entry.js → p-2d151de9.entry.js} +2 -2
  641. package/dist/nylas-web-elements/p-343a02e1.entry.js +2 -0
  642. package/dist/nylas-web-elements/{p-1c94940d.entry.js → p-349f07e3.entry.js} +2 -2
  643. package/dist/nylas-web-elements/{p-9c399019.entry.js → p-3b281401.entry.js} +2 -2
  644. package/dist/nylas-web-elements/{p-e03b2592.entry.js → p-4154e97e.entry.js} +2 -2
  645. package/dist/nylas-web-elements/{p-3f6155de.entry.js → p-434fcde2.entry.js} +2 -2
  646. package/dist/nylas-web-elements/p-44a9ce77.entry.js +2 -0
  647. package/dist/nylas-web-elements/{p-e22aa0b0.js → p-47b99cf5.js} +2 -2
  648. package/dist/nylas-web-elements/{p-1819b3d7.js → p-49f716ed.js} +4 -4
  649. package/dist/nylas-web-elements/p-49f716ed.js.map +1 -0
  650. package/dist/nylas-web-elements/p-4c12e1e9.js +2 -0
  651. package/dist/nylas-web-elements/p-4c12e1e9.js.map +1 -0
  652. package/dist/nylas-web-elements/{p-1ab25f04.entry.js → p-50b4a80f.entry.js} +2 -2
  653. package/dist/nylas-web-elements/{p-266f9995.entry.js → p-571472d4.entry.js} +2 -2
  654. package/dist/nylas-web-elements/{p-c199d203.entry.js → p-5caa0f36.entry.js} +2 -2
  655. package/dist/nylas-web-elements/{p-57b753c6.entry.js → p-607b547b.entry.js} +2 -2
  656. package/dist/nylas-web-elements/{p-945caf14.entry.js → p-694b511a.entry.js} +2 -2
  657. package/dist/nylas-web-elements/{p-18a936a3.entry.js → p-73c062f8.entry.js} +2 -2
  658. package/dist/nylas-web-elements/{p-81ea7310.entry.js → p-7614e31e.entry.js} +2 -2
  659. package/dist/nylas-web-elements/{p-fe3b8e66.entry.js → p-7687925d.entry.js} +2 -2
  660. package/dist/nylas-web-elements/{p-c451c9e1.entry.js → p-828165d3.entry.js} +2 -2
  661. package/dist/nylas-web-elements/p-939db546.entry.js +2 -0
  662. package/dist/nylas-web-elements/{p-858f0aad.entry.js → p-95a3094a.entry.js} +2 -2
  663. package/dist/nylas-web-elements/{p-ae893050.entry.js → p-980c32d9.entry.js} +3 -3
  664. package/dist/nylas-web-elements/{p-04e3a98e.entry.js → p-a17f542c.entry.js} +2 -2
  665. package/dist/nylas-web-elements/p-a3b1a98c.js +2 -0
  666. package/dist/nylas-web-elements/p-a3b1a98c.js.map +1 -0
  667. package/dist/nylas-web-elements/{p-41dc0d93.js → p-ad7cf473.js} +2 -2
  668. package/dist/nylas-web-elements/p-ad7cf473.js.map +1 -0
  669. package/dist/nylas-web-elements/{p-8b1a6e27.entry.js → p-b25821e1.entry.js} +2 -2
  670. package/dist/nylas-web-elements/{p-572bf8c2.entry.js → p-b53062f7.entry.js} +2 -2
  671. package/dist/nylas-web-elements/{p-674b6d5d.entry.js → p-bb89e973.entry.js} +2 -2
  672. package/dist/nylas-web-elements/p-c20ab972.entry.js +2 -0
  673. package/dist/nylas-web-elements/p-c529dced.entry.js +2 -0
  674. package/dist/nylas-web-elements/p-c529dced.entry.js.map +1 -0
  675. package/dist/nylas-web-elements/{p-1260ac06.entry.js → p-d5375409.entry.js} +2 -2
  676. package/dist/nylas-web-elements/{p-9d4bffbb.entry.js → p-d8f09631.entry.js} +2 -2
  677. package/dist/nylas-web-elements/p-da74ec1c.entry.js +2 -0
  678. package/dist/nylas-web-elements/p-da74ec1c.entry.js.map +1 -0
  679. package/dist/nylas-web-elements/p-db15d382.js +2 -0
  680. package/dist/nylas-web-elements/p-db15d382.js.map +1 -0
  681. package/dist/nylas-web-elements/{p-9ea458c3.js → p-f0250b7d.js} +2 -2
  682. package/dist/nylas-web-elements/{p-eaa9151b.js → p-f0f3f350.js} +2 -2
  683. package/dist/nylas-web-elements/{p-424f4d9a.entry.js → p-f3974e14.entry.js} +2 -2
  684. package/dist/nylas-web-elements/{p-9b195811.entry.js → p-f47163ac.entry.js} +2 -2
  685. package/dist/nylas-web-elements/{p-1655dec3.entry.js → p-f5d17746.entry.js} +4 -4
  686. package/dist/nylas-web-elements/p-f5d17746.entry.js.map +1 -0
  687. package/dist/nylas-web-elements/people-icon.entry.js +1 -1
  688. package/dist/nylas-web-elements/play-icon.entry.js +1 -1
  689. package/dist/nylas-web-elements/refresh-icon.entry.js +1 -1
  690. package/dist/nylas-web-elements/{register-component-e5afe237.js → register-component-ff6f5df4.js} +2 -2
  691. package/dist/nylas-web-elements/{register-component-e5afe237.js.map → register-component-ff6f5df4.js.map} +1 -1
  692. package/dist/nylas-web-elements/reply-all-icon.entry.js +1 -1
  693. package/dist/nylas-web-elements/reply-icon.entry.js +1 -1
  694. package/dist/nylas-web-elements/{scheduler-config-store-0efc3519.js → scheduler-config-store-8f2e658e.js} +10 -4
  695. package/dist/nylas-web-elements/scheduler-config-store-8f2e658e.js.map +1 -0
  696. package/dist/nylas-web-elements/{scheduler-store-8ddcc496.js → scheduler-store-e62b2146.js} +16 -3
  697. package/dist/nylas-web-elements/scheduler-store-e62b2146.js.map +1 -0
  698. package/dist/nylas-web-elements/search-icon.entry.js +1 -1
  699. package/dist/nylas-web-elements/select-dropdown.entry.js +2 -2
  700. package/dist/nylas-web-elements/sent-icon.entry.js +1 -1
  701. package/dist/nylas-web-elements/spam-icon.entry.js +1 -1
  702. package/dist/nylas-web-elements/star-icon.entry.js +1 -1
  703. package/dist/nylas-web-elements/stop-icon.entry.js +1 -1
  704. package/dist/nylas-web-elements/time-period-selector.entry.js +2 -2
  705. package/dist/nylas-web-elements/tooltip-component.entry.js +1 -1
  706. package/dist/nylas-web-elements/translate-icon.entry.js +1 -1
  707. package/dist/nylas-web-elements/trash-icon.entry.js +1 -1
  708. package/dist/nylas-web-elements/underline-icon.entry.js +1 -1
  709. package/dist/{esm/utils-73d8a928.js → nylas-web-elements/utils-3e18e0b2.js} +46 -2
  710. package/dist/nylas-web-elements/{utils-73d8a928.js.map → utils-3e18e0b2.js.map} +1 -1
  711. package/dist/nylas-web-elements/warning-icon.entry.js +1 -1
  712. package/dist/types/common/constants.d.ts +2 -0
  713. package/dist/types/common/nylas-api-request.d.ts +3 -0
  714. package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +10 -4
  715. package/dist/types/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.d.ts +2 -0
  716. package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +3 -2
  717. package/dist/types/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.d.ts +4 -1
  718. package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +35 -5
  719. package/dist/types/components/scheduler-editor/nylas-event-description/nylas-event-description.d.ts +3 -0
  720. package/dist/types/components/scheduler-editor/nylas-event-duration/nylas-event-duration.d.ts +3 -0
  721. package/dist/types/components/scheduler-editor/nylas-event-title/nylas-event-title.d.ts +7 -1
  722. package/dist/types/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.d.ts +6 -6
  723. package/dist/types/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.d.ts +2 -0
  724. package/dist/types/components/scheduler-editor/nylas-location-component/nylas-location-component.d.ts +3 -0
  725. package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +4 -1
  726. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +3 -2
  727. package/dist/types/components.d.ts +110 -22
  728. package/dist/types/connector/nylas-connector/index.d.ts +1 -1
  729. package/dist/types/connector/nylas-scheduler-config-connector/index.d.ts +1 -1
  730. package/dist/types/connector/nylas-scheduler-connector/errors/index.d.ts +1 -0
  731. package/dist/types/index.d.ts +1 -1
  732. package/dist/types/stores/scheduler-config-store.d.ts +6 -2
  733. package/dist/types/utils/utils.d.ts +1 -0
  734. package/package.json +4 -2
  735. package/dist/cjs/nylas-api-request-2a0e7022.js.map +0 -1
  736. package/dist/cjs/nylas-api-request-55923233.js.map +0 -1
  737. package/dist/cjs/scheduler-config-store-4d93a9b7.js.map +0 -1
  738. package/dist/cjs/scheduler-config-store-a0e08cab.js.map +0 -1
  739. package/dist/cjs/scheduler-store-a492526c.js.map +0 -1
  740. package/dist/cjs/scheduler-store-e148a4cc.js.map +0 -1
  741. package/dist/cjs/utils-20663d54.js.map +0 -1
  742. package/dist/esm/nylas-api-request-3120d9ac.js.map +0 -1
  743. package/dist/esm/nylas-api-request-4f3dbb72.js.map +0 -1
  744. package/dist/esm/scheduler-config-store-0efc3519.js.map +0 -1
  745. package/dist/esm/scheduler-config-store-6222c0ed.js.map +0 -1
  746. package/dist/esm/scheduler-store-39d37291.js.map +0 -1
  747. package/dist/esm/scheduler-store-8ddcc496.js.map +0 -1
  748. package/dist/esm/utils-d6204242.js.map +0 -1
  749. package/dist/nylas-web-elements/nylas-api-request-4f3dbb72.js.map +0 -1
  750. package/dist/nylas-web-elements/p-0edb3b69.entry.js +0 -2
  751. package/dist/nylas-web-elements/p-1655dec3.entry.js.map +0 -1
  752. package/dist/nylas-web-elements/p-1819b3d7.js.map +0 -1
  753. package/dist/nylas-web-elements/p-1aa7b357.js +0 -2
  754. package/dist/nylas-web-elements/p-1aa7b357.js.map +0 -1
  755. package/dist/nylas-web-elements/p-1f843391.js +0 -2
  756. package/dist/nylas-web-elements/p-1f843391.js.map +0 -1
  757. package/dist/nylas-web-elements/p-3116f5cc.js +0 -2
  758. package/dist/nylas-web-elements/p-3116f5cc.js.map +0 -1
  759. package/dist/nylas-web-elements/p-41dc0d93.js.map +0 -1
  760. package/dist/nylas-web-elements/p-47180df9.entry.js +0 -2
  761. package/dist/nylas-web-elements/p-605142a9.entry.js +0 -2
  762. package/dist/nylas-web-elements/p-6dcc9411.entry.js +0 -2
  763. package/dist/nylas-web-elements/p-6dcc9411.entry.js.map +0 -1
  764. package/dist/nylas-web-elements/p-9d0c0340.entry.js +0 -2
  765. package/dist/nylas-web-elements/p-9d75bcb2.entry.js +0 -2
  766. package/dist/nylas-web-elements/p-9d75bcb2.entry.js.map +0 -1
  767. package/dist/nylas-web-elements/p-be7124f0.entry.js +0 -2
  768. package/dist/nylas-web-elements/p-c45ac7c6.entry.js +0 -2
  769. package/dist/nylas-web-elements/scheduler-config-store-0efc3519.js.map +0 -1
  770. package/dist/nylas-web-elements/scheduler-store-8ddcc496.js.map +0 -1
  771. /package/dist/nylas-web-elements/{p-c45ac7c6.entry.js.map → p-00a9efc1.entry.js.map} +0 -0
  772. /package/dist/nylas-web-elements/{p-618b94cd.entry.js.map → p-074919b0.entry.js.map} +0 -0
  773. /package/dist/nylas-web-elements/{p-47180df9.entry.js.map → p-1e445e86.entry.js.map} +0 -0
  774. /package/dist/nylas-web-elements/{p-7692056f.entry.js.map → p-2081b475.entry.js.map} +0 -0
  775. /package/dist/nylas-web-elements/{p-370cdcca.entry.js.map → p-21c3dcad.entry.js.map} +0 -0
  776. /package/dist/nylas-web-elements/{p-55368bc0.entry.js.map → p-22531c3d.entry.js.map} +0 -0
  777. /package/dist/nylas-web-elements/{p-7c55dfa0.entry.js.map → p-2d151de9.entry.js.map} +0 -0
  778. /package/dist/nylas-web-elements/{p-be7124f0.entry.js.map → p-343a02e1.entry.js.map} +0 -0
  779. /package/dist/nylas-web-elements/{p-1c94940d.entry.js.map → p-349f07e3.entry.js.map} +0 -0
  780. /package/dist/nylas-web-elements/{p-9c399019.entry.js.map → p-3b281401.entry.js.map} +0 -0
  781. /package/dist/nylas-web-elements/{p-e03b2592.entry.js.map → p-4154e97e.entry.js.map} +0 -0
  782. /package/dist/nylas-web-elements/{p-3f6155de.entry.js.map → p-434fcde2.entry.js.map} +0 -0
  783. /package/dist/nylas-web-elements/{p-605142a9.entry.js.map → p-44a9ce77.entry.js.map} +0 -0
  784. /package/dist/nylas-web-elements/{p-e22aa0b0.js.map → p-47b99cf5.js.map} +0 -0
  785. /package/dist/nylas-web-elements/{p-1ab25f04.entry.js.map → p-50b4a80f.entry.js.map} +0 -0
  786. /package/dist/nylas-web-elements/{p-266f9995.entry.js.map → p-571472d4.entry.js.map} +0 -0
  787. /package/dist/nylas-web-elements/{p-c199d203.entry.js.map → p-5caa0f36.entry.js.map} +0 -0
  788. /package/dist/nylas-web-elements/{p-57b753c6.entry.js.map → p-607b547b.entry.js.map} +0 -0
  789. /package/dist/nylas-web-elements/{p-945caf14.entry.js.map → p-694b511a.entry.js.map} +0 -0
  790. /package/dist/nylas-web-elements/{p-18a936a3.entry.js.map → p-73c062f8.entry.js.map} +0 -0
  791. /package/dist/nylas-web-elements/{p-81ea7310.entry.js.map → p-7614e31e.entry.js.map} +0 -0
  792. /package/dist/nylas-web-elements/{p-fe3b8e66.entry.js.map → p-7687925d.entry.js.map} +0 -0
  793. /package/dist/nylas-web-elements/{p-c451c9e1.entry.js.map → p-828165d3.entry.js.map} +0 -0
  794. /package/dist/nylas-web-elements/{p-9d0c0340.entry.js.map → p-939db546.entry.js.map} +0 -0
  795. /package/dist/nylas-web-elements/{p-858f0aad.entry.js.map → p-95a3094a.entry.js.map} +0 -0
  796. /package/dist/nylas-web-elements/{p-ae893050.entry.js.map → p-980c32d9.entry.js.map} +0 -0
  797. /package/dist/nylas-web-elements/{p-04e3a98e.entry.js.map → p-a17f542c.entry.js.map} +0 -0
  798. /package/dist/nylas-web-elements/{p-8b1a6e27.entry.js.map → p-b25821e1.entry.js.map} +0 -0
  799. /package/dist/nylas-web-elements/{p-572bf8c2.entry.js.map → p-b53062f7.entry.js.map} +0 -0
  800. /package/dist/nylas-web-elements/{p-674b6d5d.entry.js.map → p-bb89e973.entry.js.map} +0 -0
  801. /package/dist/nylas-web-elements/{p-0edb3b69.entry.js.map → p-c20ab972.entry.js.map} +0 -0
  802. /package/dist/nylas-web-elements/{p-1260ac06.entry.js.map → p-d5375409.entry.js.map} +0 -0
  803. /package/dist/nylas-web-elements/{p-9d4bffbb.entry.js.map → p-d8f09631.entry.js.map} +0 -0
  804. /package/dist/nylas-web-elements/{p-9ea458c3.js.map → p-f0250b7d.js.map} +0 -0
  805. /package/dist/nylas-web-elements/{p-eaa9151b.js.map → p-f0f3f350.js.map} +0 -0
  806. /package/dist/nylas-web-elements/{p-424f4d9a.entry.js.map → p-f3974e14.entry.js.map} +0 -0
  807. /package/dist/nylas-web-elements/{p-9b195811.entry.js.map → p-f47163ac.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"mailbox-store.js","mappings":";;;MAGa,kBAAkB;IAI7B,YAAY,SAAwB,EAAE,cAAkC;QACtE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;KACtC;IAQM,MAAM,eAAe;QAC1B,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxD,IAAI,CAAC,eAAe,EAAE;YAEpB,IAAI,CAAC,MAAM,EAAE,CAAC;SACf;aAAM;YAEL,IAAI,SAAS,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;YACpD,IAAI,SAAS,EAAE;gBAEb,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;gBACtC,MAAM,oBAAoB,GAAG,IAAI,CAAC,KAAK,C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A0B,EAAE,wBAAwB;QACjE,KAAK,CAAC,GAAG,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KACzE,CAAC,CAAC;IAGH,KAAK,CAAC,QAAQ,CAAC,oBAAoB,EAAE,kBAAkB;QAErD,KAAK,CAAC,GAAG,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,EAAE,IAAI,OAAO,CAAC,CAAC;QAE9D,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,kBAAkB,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;KACxE,CAAC,CAAC;IAEH,KAAK,CAAC,KAAK,GAAG;QACZ,KAAK,MAAM,GAAG,IAAI,sBAAsB,EAAE;YACxC,MAAM,KAAK,GAAG,sBAAsB,CAAC,GAA0C,CAAC,CAAC;YACjF,KAAK,CAAC,GAAG,CAAC,GAAU,EAAE,KAAK,CAAC,CAAC;SAC9B;KACF,CAAC;IAEF,OAAO,KAAK,CAAC;AACf;;;;","names":["isNylasErrorResponse","NylasAPIError"],"sources":["src/connector/shared/api/auth.ts","src/connector/shared/api/messages.ts","src/connector/shared/api/threads.ts","src/connector/shared/api/folders.ts","src/routers/hash-router.ts","src/stores/auth-store.ts","src/stores/mailbox-store.ts"],"sourcesContent":["import { debug } from '@/utils/utils';\nimport { NylasAuthStoreType, NylasAuthType, TokenInfo } from '../../..';\n\nexport class NylasAuthConnector {\n private nylasAuth: NylasAuthType;\n private nylasAuthStore: NylasAuthStoreType;\n\n constructor(nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType) {\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n }\n\n /**\n * Validates the current session and updates the store with the token info\n * if the user is authenticated.\n * If the user is not authenticated, the store is reset.\n * @returns {Promise<void>}\n */\n public async validateSession(): Promise<void> {\n const isAuthenticated = await this.isAccessTokenValid();\n if (!isAuthenticated) {\n // Reset the store if the access token is not valid\n this.logout();\n } else {\n // If the user is authenticated, update the store with the token info\n let tokenInfo = await this.nylasAuth.getTokenInfo();\n if (tokenInfo) {\n // If token is expired or about to expire (in 5 minutes), refresh it\n const expireTimeCheck = 5 * 60 * 1000; // 5 minutes\n const currentTimeInSeconds = Math.floor(Date.now() / 1000);\n\n if (tokenInfo.expires_in && tokenInfo.expires_in - currentTimeInSeconds < expireTimeCheck) {\n debug('[NylasAuthConnectorMixin] Refreshing access token');\n tokenInfo = await this.nylasAuth.refreshAccessToken();\n if (!tokenInfo) {\n debug('[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out.');\n this.logout();\n return;\n }\n }\n\n this.nylasAuthStore.state.tokenInfo = tokenInfo;\n }\n }\n this.nylasAuthStore.state.isAuthenticated = isAuthenticated;\n }\n\n /**\n * Returns true if the user is authenticated.\n * @returns {Promise<boolean>}\n */\n public async isAuthenticated(): Promise<boolean> {\n return this.nylasAuth.isAuthenticated();\n }\n\n /**\n * Returns the token info if the user is authenticated.\n * @returns {Promise<TokenInfo>}\n */\n public async getTokenInfo(): Promise<TokenInfo | null> {\n return this.nylasAuth.getTokenInfo();\n }\n\n /**\n * Returns true if the access token is valid.\n * @returns {Promise<boolean>}\n */\n public async isAccessTokenValid(): Promise<boolean> {\n return this.nylasAuth.isAccessTokenValid();\n }\n\n /**\n * Removes the token info from the store and logs the user out.\n * @returns {Promise<void>}\n */\n public async logout(): Promise<void> {\n await this.nylasAuth.logout();\n }\n\n /**\n * Returns the URL to redirect the user to for authentication.\n * @param scopes An array of scopes to request from the user.\n * @param email The email address of the user to authenticate.\n * @param provider The provider to use for authentication.\n * @returns {Promise<string>}\n */\n public async getHostedAuthRedirectURL(scopes?: string[], email?: string, provider?: string): Promise<string> {\n return this.nylasAuth.getHostedAuthRedirectURL(scopes, email, provider);\n }\n\n /**\n * Exchanges the auth code for a token info and updates the store.\n * @param currentUrl The current URL of the page.\n * @returns {Promise<TokenInfo | null>}\n */\n public async manageHostedAuthCodeExchange(currentUrl: string): Promise<TokenInfo | null> {\n const url = new URL(currentUrl);\n const code = url.searchParams.get('code');\n\n if (code) {\n const tokenInfo = await this.nylasAuth.exchangeAuthCodeForTokenInfo(code);\n if (tokenInfo) {\n this.nylasAuthStore.state.tokenInfo = tokenInfo;\n this.nylasAuthStore.state.isAuthenticated = true;\n return tokenInfo;\n }\n }\n\n return null;\n }\n}\n","import { Message, NylasAPIError, NylasAuthType, NylasResponse, isNylasErrorResponse } from '@nylas/core';\nimport { NylasAuthStoreType, NylasMailboxStoreType } from '../../../components';\n\nexport class NylasMessagesConnector {\n private nylasAuth: NylasAuthType;\n private nylasAuthStore: NylasAuthStoreType;\n private nylasMailboxStore: NylasMailboxStoreType;\n\n constructor(nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType, nylasMailboxStore: NylasMailboxStoreType) {\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n this.nylasMailboxStore = nylasMailboxStore;\n }\n\n /**\n * Returns the list of messages.\n * @returns {Promise<Message[]>}\n */\n public async getMessages(): Promise<Message[]> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing message:read-only scope');\n }\n\n // Set the state to loading.\n this.nylasMailboxStore.state.state = 'loading';\n\n // Get the message query parameters from the store.\n const queryParams = this.nylasMailboxStore.state.messgeQueryParams;\n\n // Build the URLSearchParams object.\n const params = new URLSearchParams();\n for (const key in queryParams) {\n const value = queryParams[key as keyof typeof queryParams]?.toString();\n if (value) {\n params.append(key, value);\n }\n }\n\n // Build the URL with the query parameters\n const path = `/v3/grants/me/messages?${params.toString()}`;\n\n // Make the API request.\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Message[]>>(path);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n // Set the messages in the store.\n const messages = response.data;\n this.nylasMailboxStore.state.messages = messages;\n\n // Set the state to ready.\n this.nylasMailboxStore.state.state = 'ready';\n\n return messages;\n }\n\n /**\n * Returns the list of messages for a given thread.\n * @param {string} threadId The thread ID.\n * @returns {Promise<Message[]>}\n * @throws {NylasAPIError}\n */\n public async getThreadMessages(threadId: string): Promise<Message[]> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing message:read-only scope');\n }\n\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Message[]>>(`/v3/grants/me/messages?thread_id=${threadId}&fields=include_headers`);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n const messages = response.data;\n this.nylasMailboxStore.state.messages = messages;\n\n return messages;\n }\n\n /**\n * Downloads the attachments for a given message.\n * @param message The message to download attachments for.\n * @returns {Promise<Blob>[]} An array of promises that will resolve to a Blob.\n */\n public downloadMessageAttachments(message: Message): Promise<Blob>[] {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing message:read-only scope');\n }\n\n // We'll go through each attachment and download it.\n const blobPromises: Promise<Blob>[] = [];\n const attachments = message.attachments || [];\n for (const attachment of attachments) {\n const blob = this.nylasAuth.nylasDownloadFileRequest(`/v3/grants/me/attachments/${attachment.id}?message_id=${message.id}`);\n blobPromises.push(blob);\n }\n\n return blobPromises;\n }\n\n /**\n * Returns a summarized version of the given text.\n * @param text The non-HTML text to summarize.\n * @returns {Promise<string>} The summarized text.\n */\n public async summarizeText(text: string): Promise<string> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing message:read-only scope');\n }\n\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<{ summary: string }>>(\n `/v3/grants/me/mailbox/summarize`,\n 'POST',\n {\n message: {\n body: text,\n },\n },\n true,\n this.nylasAuth.config.elementsApiUri,\n );\n\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n return response.data.summary;\n }\n\n /**\n * Returns a summarized version of the given message.\n * @param message The message to summarize.\n * @returns {Promise<ReadableStream<Uint8Array> | null>} Returns a Fetch API response.\n */\n public async textToSpeech(text: string, abortController?: AbortController): Promise<ReadableStream<Uint8Array> | null> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing message:read-only scope');\n }\n\n return this.nylasAuth.nylasAPIRequest(\n `/v3/grants/me/mailbox/tts`,\n 'POST',\n {\n text,\n },\n false,\n this.nylasAuth.config.elementsApiUri,\n {\n ...(abortController ? { signal: abortController?.signal } : {}),\n },\n );\n }\n}\n","import { debug } from '@/utils/utils';\nimport { NylasAPIError, NylasAuthType, NylasResponse, Thread, ThreadQueryParameters, isNylasErrorResponse } from '@nylas/core';\nimport { NylasAuthStoreType, NylasMailboxStoreType } from '../../../components';\nimport { RouterInterface } from '@/routers/router-interface';\n\nexport class NylasThreadsConnector {\n private nylasAuth: NylasAuthType;\n private nylasAuthStore: NylasAuthStoreType;\n private nylasMailboxStore: NylasMailboxStoreType;\n private router: RouterInterface;\n\n constructor(nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType, nylasMailboxStore: NylasMailboxStoreType, router: RouterInterface) {\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n this.nylasMailboxStore = nylasMailboxStore;\n this.router = router;\n }\n\n /**\n * Returns the list of threads.\n * @todo Re-think how we handle pagination (previous/next page tokens) - there is a separation of logic here that might be confusing.\n * @param {Partial<ThreadQueryParameters> | undefined} overrideQueryParams The query parameters to override from the store.\n * @param {'prepend' | 'append' | 'overwrite'} updateMethod How to update the store with the threads (default: overwrite).\n * @param {boolean} updateState Whether to update the state or not (default: true).\n * @returns {Promise<Thread[]>}\n */\n public async getThreads(\n overrideQueryParams?: Partial<ThreadQueryParameters>,\n updateMethod: 'prepend' | 'append' | 'overwrite' = 'overwrite',\n updateState: boolean = true,\n ): Promise<Thread[]> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing thread:read-only scope');\n }\n\n // Set the state to loading.\n if (updateState) {\n this.nylasMailboxStore.state.state = 'loading';\n }\n\n // Build the URL with the query parameters\n const queryParams = overrideQueryParams || this.nylasMailboxStore.state.threadsQueryParams;\n const params = new URLSearchParams();\n for (const key in queryParams) {\n const value = queryParams[key as keyof typeof queryParams]?.toString();\n if (typeof value !== 'undefined' && value !== null) {\n params.append(key, value);\n }\n }\n\n // TODO: Re-think how to update the router, this seems wrong\n if (queryParams.search_query_native) {\n this.router.navigate(`/?query=${queryParams.search_query_native}`, true);\n } else if (this.nylasMailboxStore.state.threadsQueryParams.search_query_native && !queryParams.search_query_native) {\n this.router.navigate('/', true);\n }\n\n // If page_token is not set, reset the previous page tokens.\n if (!queryParams.page_token) {\n this.nylasMailboxStore.state.previousThreadPageTokens = [];\n }\n\n this.nylasMailboxStore.state.threadsQueryParams = queryParams;\n\n // Make the API request.\n const path = `/v3/grants/me/threads?${params.toString()}`;\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Thread[]>>(path);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n // Set the threads in the store.\n const threads = response.data;\n switch (updateMethod) {\n case 'prepend':\n this.nylasMailboxStore.state.threads = [...threads, ...this.nylasMailboxStore.state.threads];\n break;\n case 'append':\n this.nylasMailboxStore.state.threads = [...this.nylasMailboxStore.state.threads, ...threads];\n break;\n case 'overwrite':\n default:\n this.nylasMailboxStore.state.threads = threads;\n break;\n }\n\n // If we have a next cursor, set it in the store.\n if (response.next_cursor) {\n this.nylasMailboxStore.state.nextThreadPageToken = response.next_cursor;\n } else {\n this.nylasMailboxStore.state.nextThreadPageToken = null;\n }\n\n // Set the state to ready.\n if (updateState) {\n this.nylasMailboxStore.state.state = 'ready';\n }\n\n return threads;\n }\n\n public async getThread(threadId: string): Promise<Thread> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing thread:read-only scope');\n }\n\n // Check if we have the thread in the store already.\n const storeThread = this.nylasMailboxStore.state.threads.find(t => t.id === threadId);\n if (storeThread) {\n return storeThread;\n }\n\n // Set the state to loading.\n this.nylasMailboxStore.state.state = 'loading';\n\n // Make the API request.\n const path = `/v3/grants/me/threads/${threadId}`;\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Thread>>(path);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n // Set the threads in the store.\n const thread = response.data;\n this.nylasMailboxStore.state.threads = this.nylasMailboxStore.state.threads.map(t => {\n if (t.id === thread.id) {\n return thread;\n }\n return t;\n });\n\n // Set the state to ready.\n this.nylasMailboxStore.state.state = 'ready';\n\n return thread;\n }\n\n /**\n * Returns the next page of threads.\n * @param {'prepend' | 'append' | 'overwrite'} updateMethod How to update the store with the threads (default: overwrite).\n * @param {boolean} updateLoadingState Whether to update the loading state or not.\n * @returns {Promise<Thread[]>} The previous page of threads.\n */\n public async nextThreadPage(updateMethod: 'prepend' | 'append' | 'overwrite' = 'overwrite', updateLoadingState: boolean = true): Promise<Thread[]> {\n if (!this.nylasMailboxStore.state.nextThreadPageToken) {\n throw new Error('No next page token');\n }\n\n // If we have a next page token, add it to the previous page tokens.\n this.nylasMailboxStore.state.previousThreadPageTokens = Array.from(\n new Set([...this.nylasMailboxStore.state.previousThreadPageTokens, this.nylasMailboxStore.state.threadsQueryParams.page_token ?? null]),\n );\n\n // Get the last next page token.\n const nextPageToken = this.nylasMailboxStore.state.nextThreadPageToken;\n\n return this.getThreads(\n {\n ...this.nylasMailboxStore.state.threadsQueryParams,\n page_token: nextPageToken,\n },\n updateMethod,\n updateLoadingState,\n );\n }\n\n /**\n * Returns the previous page of threads.\n * @param {'prepend' | 'append' | 'overwrite'} updateMethod How to update the store with the threads (default: overwrite).\n * @param {boolean} updateLoadingState Whether to update the loading state or not.\n * @returns {Promise<Thread[]>} The previous page of threads.\n */\n public async previousThreadPage(aupdateMethod: 'prepend' | 'append' | 'overwrite' = 'overwrite', updateLoadingState: boolean = true): Promise<Thread[]> {\n if (!this.nylasMailboxStore.state.previousThreadPageTokens.length) {\n throw new Error('No previous page token');\n }\n\n // Remove the the last two next page tokens.\n const previousThreadPageTokens = [...this.nylasMailboxStore.state.previousThreadPageTokens];\n const pageToken = previousThreadPageTokens.pop();\n\n // Update the store.\n this.nylasMailboxStore.state.previousThreadPageTokens = previousThreadPageTokens;\n\n return this.getThreads(\n {\n ...this.nylasMailboxStore.state.threadsQueryParams,\n page_token: pageToken ?? undefined,\n },\n aupdateMethod,\n updateLoadingState,\n );\n }\n\n /**\n * Updates the thread query parameters in the store.\n * @param params Partial<ThreadQueryParameters>\n * @returns {void}\n */\n public updateThreadQueryParams(params: Partial<ThreadQueryParameters>): void {\n this.nylasMailboxStore.state.threadsQueryParams = {\n ...this.nylasMailboxStore.state.threadsQueryParams,\n ...params,\n };\n }\n\n /**\n * Back to the mailbox.\n */\n public back(): void {\n this.router.navigate('/', true);\n this.nylasMailboxStore.state.selectedThread = null;\n }\n\n /**\n * Unselects a thread.\n */\n public unSelectThread(): void {\n this.nylasMailboxStore.state.selectedThread = null;\n }\n\n /**\n * Selects a thread.\n * @param {Thread} thread The thread to select.\n * @returns {Promise<void>}\n */\n public async selectThread(thread: Thread): Promise<void> {\n this.router.navigate(`/thread/${thread.id}`, true);\n this.nylasMailboxStore.state.selectedThread = thread;\n\n // Mark the thread as read (async) if it is unread.\n if (thread.unread) {\n this.markThreadAsRead(thread).catch(error => {\n debug('Error marking thread as read', error);\n });\n }\n }\n\n /**\n * Marks a thread as read.\n * @param thread\n * @returns {Promise<Thread>}\n */\n public async markThreadAsRead(thread: Thread): Promise<Thread> {\n return this.updateThread(thread, { unread: false });\n }\n\n /**\n * Updates a thread.\n * @param thread The thread to update.\n * @returns {Promise<Thread>}\n */\n public async updateThread(thread: Thread, updateThread: Partial<Thread>): Promise<Thread> {\n // Make sure we have an authenticated user.\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a modify scope at least.\n if (!this.nylasAuth.hasScopeByType('email', 'modify')) {\n throw new Error('Missing thread:modify scope');\n }\n\n // Make the API request.\n const path = `/v3/grants/me/threads/${thread.id}`;\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Thread>>(path, 'PUT', updateThread);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n // Update the thread in the store.\n const updatedThread = response.data;\n this.nylasMailboxStore.state.threads = this.nylasMailboxStore.state.threads.map(t => {\n if (t.id === updatedThread.id) {\n return updatedThread;\n }\n return t;\n });\n this.nylasMailboxStore.state.selectedThread = updatedThread;\n\n return updatedThread;\n }\n}\n","import { Folder, NylasAPIError, NylasAuthType, NylasResponse, isNylasErrorResponse } from '@nylas/core';\nimport { NylasAuthStoreType, NylasMailboxStoreType } from '../../../components';\n\nexport class NylasFoldersConnector {\n private nylasAuth: NylasAuthType;\n private nylasAuthStore: NylasAuthStoreType;\n private nylasMailboxStore: NylasMailboxStoreType;\n\n constructor(nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType, nylasMailboxStore: NylasMailboxStoreType) {\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n this.nylasMailboxStore = nylasMailboxStore;\n }\n\n /**\n * Returns the list of folders.\n */\n public async getFolders(): Promise<Folder[]> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing thread:read-only scope');\n }\n\n // Set the state to loading.\n this.nylasMailboxStore.state.state = 'loading';\n\n // Make the API request.\n const path = `/v3/grants/me/folders`;\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Folder[]>>(path);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n // Set the threads in the store.\n const folders = response.data;\n this.nylasMailboxStore.state.folders = folders;\n\n // Set the state to ready.\n this.nylasMailboxStore.state.state = 'ready';\n\n return folders;\n }\n\n public async selectFolder(folder: Folder) {\n this.nylasMailboxStore.state.threadsQueryParams = {\n in: folder.id,\n ...(this.nylasMailboxStore.state.threadsQueryParams || {}),\n };\n }\n}\n","import { debug } from '@/utils/utils';\nimport { RouteListener, RouteParams, RoutePath, RouterInterface } from './router-interface';\n\nexport class PolyFillHashChangeEvent extends Event {\n oldURL?: string;\n newURL?: string;\n\n constructor(type: string, eventInitDict: HashChangeEventInit) {\n super(type, eventInitDict);\n this.oldURL = eventInitDict.oldURL;\n this.newURL = eventInitDict.newURL;\n }\n}\n\nexport class HashRouter implements RouterInterface {\n private routeChangeListeners: [route: RoutePath, RouteListener<any>][] = [];\n\n constructor() {\n debug('HashRouter constructor');\n }\n\n // Destroy the router\n public destroy(): void {\n debug('HashRouter destroy');\n window.removeEventListener('hashchange', this.onRouteChange.bind(this));\n }\n\n // Initialize the router\n public init(): void {\n debug('HashRouter init');\n window.addEventListener('hashchange', this.onRouteChange.bind(this));\n\n // Trigger the initial route change\n if (typeof HashChangeEvent !== 'undefined') {\n const event: HashChangeEvent = new HashChangeEvent('hashchange', { oldURL: '', newURL: window.location.href });\n this.onRouteChange(event);\n } else {\n const event: Event = new PolyFillHashChangeEvent('hashchange', { oldURL: '', newURL: window.location.href });\n this.onRouteChange(event as HashChangeEvent);\n }\n }\n\n public addRouteChangeListener<Path extends RoutePath>(route: Path, listener: RouteListener<Path>): void {\n debug('HashRouter addRouteChangeListener');\n this.routeChangeListeners.push([route, listener]);\n }\n\n public navigate(route: string, shallow: boolean): void {\n debug('HashRouter navigate');\n\n // If we're navigating shallow, don't add a new history entry\n if (shallow) {\n return window.history.pushState(null, '', `#${route}`);\n }\n\n window.location.hash = route;\n }\n\n public setRoute(route: string): void {\n debug('HashRouter setRoute');\n window.location.hash = route;\n }\n\n // Matches a route and executes the callback\n public matchRoute(route: string, path: string): boolean {\n const routeParts = route.split('/');\n const pathParts = path.split('/');\n\n // If the route is `/` an the hash is empty, match the route\n debug(`HashRouter matchRoute route=${route} path=${path}`, { routeParts, pathParts });\n if (routeParts[1] === '' && pathParts[0] === '') {\n return true;\n }\n\n if (routeParts.length !== pathParts.length) {\n return false;\n }\n\n for (let i = 0; i < routeParts.length; i++) {\n const routePart = routeParts[i];\n const pathPart = pathParts[i];\n if (routePart.startsWith(':')) {\n continue;\n }\n if (routePart !== pathPart) {\n return false;\n }\n }\n\n return true;\n }\n\n // Parse the route and return the route params\n public getRouteParams<Path extends RoutePath>(route: Path): RouteParams<Path> {\n debug('HashRouter getRouteParams');\n const routeParams: RouteParams<Path> = {} as RouteParams<Path>;\n const routeParts = route.split('/');\n const routeConfigParts = window.location.hash.split('/');\n routeParts.forEach((routePart, index) => {\n if (routePart.startsWith(':')) {\n const key = routePart.substring(1) as keyof RouteParams<Path>;\n routeParams[key] = routeConfigParts[index] as RouteParams<Path>[keyof RouteParams<Path>]; // Cast the value to string\n }\n });\n return routeParams;\n }\n\n public getRouteWithParams(route: string, routeParams: Record<string, any>): string {\n debug('HashRouter getRouteWithParams');\n let routeWithParams = route;\n Object.keys(routeParams).forEach(key => {\n routeWithParams = routeWithParams.replace(`:${key}`, routeParams[key]);\n });\n return routeWithParams;\n }\n\n public getRoute(): string {\n debug('HashRouter getRoute');\n return window.location.hash;\n }\n\n public onRouteChange(event: HashChangeEvent): void {\n this.routeChangeListeners.forEach(async ([route, listener]) => {\n const path = event.newURL.indexOf('#') === -1 ? '' : event.newURL.substring(event.newURL.indexOf('#') + 1);\n debug(`HashRouter onRouteChange route=${route} path=${path}`, { event });\n if (!this.matchRoute(route, path)) {\n debug(`HashRouter onRouteChange route=${route} path=${path} does not match`);\n return;\n }\n const routeParams = this.getRouteParams(route) as RouteParams<RoutePath>;\n await listener(route, path, routeParams);\n });\n }\n\n public getBasePath(): string {\n debug('HashRouter getBasePath');\n return '';\n }\n}\n","import { TokenInfo } from '@nylas/core/dist/auth';\nimport { createStore } from '@stencil/store';\nimport { DataState } from '..';\n\nexport interface NylasAuthStoreState {\n isAuthenticated: boolean;\n tokenInfo: TokenInfo | null;\n state: DataState;\n}\n\nexport type NylasAuthStoreType = ReturnType<typeof CreateNylasAuthStore>;\n\nexport function CreateNylasAuthStore(defaultState: Partial<NylasAuthStoreState> = {}) {\n const defaultNylasStoreState: NylasAuthStoreState = {\n isAuthenticated: false,\n tokenInfo: null,\n state: 'ready',\n ...defaultState,\n };\n const store = createStore<NylasAuthStoreState>(defaultNylasStoreState);\n\n /**\n * Reset the Nylas store to its default state.\n * There is something wrong with the stencil/store reset method,\n * so we have to do it via this hack.\n */\n store.reset = () => {\n for (const key in defaultNylasStoreState) {\n const value = defaultNylasStoreState[key as keyof typeof defaultNylasStoreState];\n store.set(key as any, value);\n }\n };\n\n return store;\n}\n","import type { Folder, Message, MessageQueryParameters, Thread, ThreadQueryParameters } from '@nylas/core';\nimport { createStore } from '@stencil/store';\nimport { DataState } from '../components';\n\nexport interface NylasMailboxStoreState {\n state: DataState;\n messages: Message[];\n threads: Thread[];\n folders: Folder[];\n selectedThread: Thread | null;\n selectedFolder: string;\n searchQuery: string;\n\n nextThreadPageToken: string | null;\n previousThreadPageTokens: (string | null)[];\n hasNextThreadPage: boolean;\n hasPreviousThreadPage: boolean;\n threadsQueryParams: Partial<ThreadQueryParameters>;\n messgeQueryParams: Partial<MessageQueryParameters>;\n}\n\nexport type NylasMailboxStoreType = ReturnType<typeof CreateNylasMailboxStore>;\n\nexport function CreateNylasMailboxStore(defaultState: Partial<NylasMailboxStoreState> = {}) {\n const defaultNylasStoreState: NylasMailboxStoreState = {\n state: 'ready',\n\n messages: [],\n threads: [],\n folders: [],\n selectedThread: null,\n nextThreadPageToken: null,\n previousThreadPageTokens: [],\n searchQuery: '',\n\n hasNextThreadPage: false,\n hasPreviousThreadPage: false,\n\n selectedFolder: 'inbox',\n\n threadsQueryParams: {\n in: 'inbox',\n },\n messgeQueryParams: {\n fields: 'include_headers',\n },\n ...defaultState,\n };\n\n const store = createStore<NylasMailboxStoreState>({ ...defaultNylasStoreState });\n\n // Set our hasNextThreadPage if nextThreadPageToken is not null.\n store.onChange('nextThreadPageToken', nextThreadPageToken => {\n store.set('hasNextThreadPage', nextThreadPageToken !== null);\n });\n // Set our hasPreviousThreadPage if previousThreadPageTokens is not empty.\n store.onChange('previousThreadPageTokens', previousThreadPageTokens => {\n store.set('hasPreviousThreadPage', previousThreadPageTokens.length > 0);\n });\n\n // When threadsQueryParams changes...\n store.onChange('threadsQueryParams', threadsQueryParams => {\n // set our selectedFolder to the in param.\n store.set('selectedFolder', threadsQueryParams.in || 'inbox');\n // set our searchQuery to the search_query_native param.\n store.set('searchQuery', threadsQueryParams.search_query_native || '');\n });\n\n store.reset = () => {\n for (const key in defaultNylasStoreState) {\n const value = defaultNylasStoreState[key as keyof typeof defaultNylasStoreState];\n store.set(key as any, value);\n }\n };\n\n return store;\n}\n"],"version":3}
1
+ {"file":"mailbox-store.js","mappings":";;;;MAGa,kBAAkB;IAI7B,YAAY,SAAwB,EAAE,cAAkC;QACtE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;KACtC;IAQM,MAAM,eAAe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Z;QACD,iBAAiB,EAAE;YACjB,MAAM,EAAE,iBAAiB;SAC1B;QACD,GAAG,YAAY;KAChB,CAAC;IAEF,MAAM,KAAK,GAAG,WAAW,CAAyB,EAAE,GAAG,sBAAsB,EAAE,CAAC,CAAC;IAGjF,KAAK,CAAC,QAAQ,CAAC,qBAAqB,EAAE,mBAAmB;QACvD,KAAK,CAAC,GAAG,CAAC,mBAAmB,EAAE,mBAAmB,KAAK,IAAI,CAAC,CAAC;KAC9D,CAAC,CAAC;IAEH,KAAK,CAAC,QAAQ,CAAC,0BAA0B,EAAE,wBAAwB;QACjE,KAAK,CAAC,GAAG,CAAC,uBAAuB,EAAE,wBAAwB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KACzE,CAAC,CAAC;IAGH,KAAK,CAAC,QAAQ,CAAC,oBAAoB,EAAE,kBAAkB;QAErD,KAAK,CAAC,GAAG,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,EAAE,IAAI,OAAO,CAAC,CAAC;QAE9D,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,kBAAkB,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC;KACxE,CAAC,CAAC;IAEH,KAAK,CAAC,KAAK,GAAG;QACZ,KAAK,MAAM,GAAG,IAAI,sBAAsB,EAAE;YACxC,MAAM,KAAK,GAAG,sBAAsB,CAAC,GAA0C,CAAC,CAAC;YACjF,KAAK,CAAC,GAAG,CAAC,GAAU,EAAE,KAAK,CAAC,CAAC;SAC9B;KACF,CAAC;IAEF,OAAO,KAAK,CAAC;AACf;;;;","names":["isNylasErrorResponse","NylasAPIError"],"sources":["src/connector/shared/api/auth.ts","src/connector/shared/api/messages.ts","src/connector/shared/api/threads.ts","src/connector/shared/api/folders.ts","src/routers/hash-router.ts","src/stores/auth-store.ts","src/stores/mailbox-store.ts"],"sourcesContent":["import { debug } from '@/utils/utils';\nimport { NylasAuthStoreType, NylasAuthType, TokenInfo } from '../../..';\n\nexport class NylasAuthConnector {\n private nylasAuth: NylasAuthType;\n private nylasAuthStore: NylasAuthStoreType;\n\n constructor(nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType) {\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n }\n\n /**\n * Validates the current session and updates the store with the token info\n * if the user is authenticated.\n * If the user is not authenticated, the store is reset.\n * @returns {Promise<void>}\n */\n public async validateSession(): Promise<void> {\n const isAuthenticated = await this.isAccessTokenValid();\n if (!isAuthenticated) {\n // Reset the store if the access token is not valid\n this.logout();\n } else {\n // If the user is authenticated, update the store with the token info\n let tokenInfo = await this.nylasAuth.getTokenInfo();\n if (tokenInfo) {\n // If token is expired or about to expire (in 5 minutes), refresh it\n const expireTimeCheck = 5 * 60 * 1000; // 5 minutes\n const currentTimeInSeconds = Math.floor(Date.now() / 1000);\n\n if (tokenInfo.expires_in && tokenInfo.expires_in - currentTimeInSeconds < expireTimeCheck) {\n debug('[NylasAuthConnectorMixin] Refreshing access token');\n tokenInfo = await this.nylasAuth.refreshAccessToken();\n if (!tokenInfo) {\n debug('[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out.');\n this.logout();\n return;\n }\n }\n\n this.nylasAuthStore.state.tokenInfo = tokenInfo;\n }\n }\n this.nylasAuthStore.state.isAuthenticated = isAuthenticated;\n }\n\n /**\n * Returns true if the user is authenticated.\n * @returns {Promise<boolean>}\n */\n public async isAuthenticated(): Promise<boolean> {\n return this.nylasAuth.isAuthenticated();\n }\n\n /**\n * Returns the token info if the user is authenticated.\n * @returns {Promise<TokenInfo>}\n */\n public async getTokenInfo(): Promise<TokenInfo | null> {\n return this.nylasAuth.getTokenInfo();\n }\n\n /**\n * Returns true if the access token is valid.\n * @returns {Promise<boolean>}\n */\n public async isAccessTokenValid(): Promise<boolean> {\n return this.nylasAuth.isAccessTokenValid();\n }\n\n /**\n * Removes the token info from the store and logs the user out.\n * @returns {Promise<void>}\n */\n public async logout(): Promise<void> {\n await this.nylasAuth.logout();\n }\n\n /**\n * Returns the URL to redirect the user to for authentication.\n * @param scopes An array of scopes to request from the user.\n * @param email The email address of the user to authenticate.\n * @param provider The provider to use for authentication.\n * @returns {Promise<string>}\n */\n public async getHostedAuthRedirectURL(scopes?: string[], email?: string, provider?: string): Promise<string> {\n return this.nylasAuth.getHostedAuthRedirectURL(scopes, email, provider);\n }\n\n /**\n * Exchanges the auth code for a token info and updates the store.\n * @param currentUrl The current URL of the page.\n * @returns {Promise<TokenInfo | null>}\n */\n public async manageHostedAuthCodeExchange(currentUrl: string): Promise<TokenInfo | null> {\n const url = new URL(currentUrl);\n const code = url.searchParams.get('code');\n\n if (code) {\n const tokenInfo = await this.nylasAuth.exchangeAuthCodeForTokenInfo(code);\n if (tokenInfo) {\n this.nylasAuthStore.state.tokenInfo = tokenInfo;\n this.nylasAuthStore.state.isAuthenticated = true;\n return tokenInfo;\n }\n }\n\n return null;\n }\n}\n","import { Message, NylasAPIError, NylasAuthType, NylasResponse, isNylasErrorResponse } from '@nylas/core';\nimport { NylasAuthStoreType, NylasMailboxStoreType } from '../../../components';\n\nexport class NylasMessagesConnector {\n private nylasAuth: NylasAuthType;\n private nylasAuthStore: NylasAuthStoreType;\n private nylasMailboxStore: NylasMailboxStoreType;\n\n constructor(nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType, nylasMailboxStore: NylasMailboxStoreType) {\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n this.nylasMailboxStore = nylasMailboxStore;\n }\n\n /**\n * Returns the list of messages.\n * @returns {Promise<Message[]>}\n */\n public async getMessages(): Promise<Message[]> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing message:read-only scope');\n }\n\n // Set the state to loading.\n this.nylasMailboxStore.state.state = 'loading';\n\n // Get the message query parameters from the store.\n const queryParams = this.nylasMailboxStore.state.messgeQueryParams;\n\n // Build the URLSearchParams object.\n const params = new URLSearchParams();\n for (const key in queryParams) {\n const value = queryParams[key as keyof typeof queryParams]?.toString();\n if (value) {\n params.append(key, value);\n }\n }\n\n // Build the URL with the query parameters\n const path = `/v3/grants/me/messages?${params.toString()}`;\n\n // Make the API request.\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Message[]>>(path);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n // Set the messages in the store.\n const messages = response.data;\n this.nylasMailboxStore.state.messages = messages;\n\n // Set the state to ready.\n this.nylasMailboxStore.state.state = 'ready';\n\n return messages;\n }\n\n /**\n * Returns the list of messages for a given thread.\n * @param {string} threadId The thread ID.\n * @returns {Promise<Message[]>}\n * @throws {NylasAPIError}\n */\n public async getThreadMessages(threadId: string): Promise<Message[]> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing message:read-only scope');\n }\n\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Message[]>>(`/v3/grants/me/messages?thread_id=${threadId}&fields=include_headers`);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n const messages = response.data;\n this.nylasMailboxStore.state.messages = messages;\n\n return messages;\n }\n\n /**\n * Downloads the attachments for a given message.\n * @param message The message to download attachments for.\n * @returns {Promise<Blob>[]} An array of promises that will resolve to a Blob.\n */\n public downloadMessageAttachments(message: Message): Promise<Blob>[] {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing message:read-only scope');\n }\n\n // We'll go through each attachment and download it.\n const blobPromises: Promise<Blob>[] = [];\n const attachments = message.attachments || [];\n for (const attachment of attachments) {\n const blob = this.nylasAuth.nylasDownloadFileRequest(`/v3/grants/me/attachments/${attachment.id}?message_id=${message.id}`);\n blobPromises.push(blob);\n }\n\n return blobPromises;\n }\n\n /**\n * Returns a summarized version of the given text.\n * @param text The non-HTML text to summarize.\n * @returns {Promise<string>} The summarized text.\n */\n public async summarizeText(text: string): Promise<string> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing message:read-only scope');\n }\n\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<{ summary: string }>>(\n `/v3/grants/me/mailbox/summarize`,\n 'POST',\n {\n message: {\n body: text,\n },\n },\n true,\n this.nylasAuth.config.elementsApiUri,\n );\n\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n return response.data.summary;\n }\n\n /**\n * Returns a summarized version of the given message.\n * @param message The message to summarize.\n * @returns {Promise<ReadableStream<Uint8Array> | null>} Returns a Fetch API response.\n */\n public async textToSpeech(text: string, abortController?: AbortController): Promise<ReadableStream<Uint8Array> | null> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing message:read-only scope');\n }\n\n return this.nylasAuth.nylasAPIRequest(\n `/v3/grants/me/mailbox/tts`,\n 'POST',\n {\n text,\n },\n false,\n this.nylasAuth.config.elementsApiUri,\n {\n ...(abortController ? { signal: abortController?.signal } : {}),\n },\n );\n }\n}\n","import { debug } from '@/utils/utils';\nimport { NylasAPIError, NylasAuthType, NylasResponse, Thread, ThreadQueryParameters, isNylasErrorResponse } from '@nylas/core';\nimport { NylasAuthStoreType, NylasMailboxStoreType } from '../../../components';\nimport { RouterInterface } from '@/routers/router-interface';\n\nexport class NylasThreadsConnector {\n private nylasAuth: NylasAuthType;\n private nylasAuthStore: NylasAuthStoreType;\n private nylasMailboxStore: NylasMailboxStoreType;\n private router: RouterInterface;\n\n constructor(nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType, nylasMailboxStore: NylasMailboxStoreType, router: RouterInterface) {\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n this.nylasMailboxStore = nylasMailboxStore;\n this.router = router;\n }\n\n /**\n * Returns the list of threads.\n * @todo Re-think how we handle pagination (previous/next page tokens) - there is a separation of logic here that might be confusing.\n * @param {Partial<ThreadQueryParameters> | undefined} overrideQueryParams The query parameters to override from the store.\n * @param {'prepend' | 'append' | 'overwrite'} updateMethod How to update the store with the threads (default: overwrite).\n * @param {boolean} updateState Whether to update the state or not (default: true).\n * @returns {Promise<Thread[]>}\n */\n public async getThreads(\n overrideQueryParams?: Partial<ThreadQueryParameters>,\n updateMethod: 'prepend' | 'append' | 'overwrite' = 'overwrite',\n updateState: boolean = true,\n ): Promise<Thread[]> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing thread:read-only scope');\n }\n\n // Set the state to loading.\n if (updateState) {\n this.nylasMailboxStore.state.state = 'loading';\n }\n\n // Build the URL with the query parameters\n const queryParams = overrideQueryParams || this.nylasMailboxStore.state.threadsQueryParams;\n const params = new URLSearchParams();\n for (const key in queryParams) {\n const value = queryParams[key as keyof typeof queryParams]?.toString();\n if (typeof value !== 'undefined' && value !== null) {\n params.append(key, value);\n }\n }\n\n // TODO: Re-think how to update the router, this seems wrong\n if (queryParams.search_query_native) {\n this.router.navigate(`/?query=${queryParams.search_query_native}`, true);\n } else if (this.nylasMailboxStore.state.threadsQueryParams.search_query_native && !queryParams.search_query_native) {\n this.router.navigate('/', true);\n }\n\n // If page_token is not set, reset the previous page tokens.\n if (!queryParams.page_token) {\n this.nylasMailboxStore.state.previousThreadPageTokens = [];\n }\n\n this.nylasMailboxStore.state.threadsQueryParams = queryParams;\n\n // Make the API request.\n const path = `/v3/grants/me/threads?${params.toString()}`;\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Thread[]>>(path);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n // Set the threads in the store.\n const threads = response.data;\n switch (updateMethod) {\n case 'prepend':\n this.nylasMailboxStore.state.threads = [...threads, ...this.nylasMailboxStore.state.threads];\n break;\n case 'append':\n this.nylasMailboxStore.state.threads = [...this.nylasMailboxStore.state.threads, ...threads];\n break;\n case 'overwrite':\n default:\n this.nylasMailboxStore.state.threads = threads;\n break;\n }\n\n // If we have a next cursor, set it in the store.\n if (response.next_cursor) {\n this.nylasMailboxStore.state.nextThreadPageToken = response.next_cursor;\n } else {\n this.nylasMailboxStore.state.nextThreadPageToken = null;\n }\n\n // Set the state to ready.\n if (updateState) {\n this.nylasMailboxStore.state.state = 'ready';\n }\n\n return threads;\n }\n\n public async getThread(threadId: string): Promise<Thread> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing thread:read-only scope');\n }\n\n // Check if we have the thread in the store already.\n const storeThread = this.nylasMailboxStore.state.threads.find(t => t.id === threadId);\n if (storeThread) {\n return storeThread;\n }\n\n // Set the state to loading.\n this.nylasMailboxStore.state.state = 'loading';\n\n // Make the API request.\n const path = `/v3/grants/me/threads/${threadId}`;\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Thread>>(path);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n // Set the threads in the store.\n const thread = response.data;\n this.nylasMailboxStore.state.threads = this.nylasMailboxStore.state.threads.map(t => {\n if (t.id === thread.id) {\n return thread;\n }\n return t;\n });\n\n // Set the state to ready.\n this.nylasMailboxStore.state.state = 'ready';\n\n return thread;\n }\n\n /**\n * Returns the next page of threads.\n * @param {'prepend' | 'append' | 'overwrite'} updateMethod How to update the store with the threads (default: overwrite).\n * @param {boolean} updateLoadingState Whether to update the loading state or not.\n * @returns {Promise<Thread[]>} The previous page of threads.\n */\n public async nextThreadPage(updateMethod: 'prepend' | 'append' | 'overwrite' = 'overwrite', updateLoadingState: boolean = true): Promise<Thread[]> {\n if (!this.nylasMailboxStore.state.nextThreadPageToken) {\n throw new Error('No next page token');\n }\n\n // If we have a next page token, add it to the previous page tokens.\n this.nylasMailboxStore.state.previousThreadPageTokens = Array.from(\n new Set([...this.nylasMailboxStore.state.previousThreadPageTokens, this.nylasMailboxStore.state.threadsQueryParams.page_token ?? null]),\n );\n\n // Get the last next page token.\n const nextPageToken = this.nylasMailboxStore.state.nextThreadPageToken;\n\n return this.getThreads(\n {\n ...this.nylasMailboxStore.state.threadsQueryParams,\n page_token: nextPageToken,\n },\n updateMethod,\n updateLoadingState,\n );\n }\n\n /**\n * Returns the previous page of threads.\n * @param {'prepend' | 'append' | 'overwrite'} updateMethod How to update the store with the threads (default: overwrite).\n * @param {boolean} updateLoadingState Whether to update the loading state or not.\n * @returns {Promise<Thread[]>} The previous page of threads.\n */\n public async previousThreadPage(aupdateMethod: 'prepend' | 'append' | 'overwrite' = 'overwrite', updateLoadingState: boolean = true): Promise<Thread[]> {\n if (!this.nylasMailboxStore.state.previousThreadPageTokens.length) {\n throw new Error('No previous page token');\n }\n\n // Remove the the last two next page tokens.\n const previousThreadPageTokens = [...this.nylasMailboxStore.state.previousThreadPageTokens];\n const pageToken = previousThreadPageTokens.pop();\n\n // Update the store.\n this.nylasMailboxStore.state.previousThreadPageTokens = previousThreadPageTokens;\n\n return this.getThreads(\n {\n ...this.nylasMailboxStore.state.threadsQueryParams,\n page_token: pageToken ?? undefined,\n },\n aupdateMethod,\n updateLoadingState,\n );\n }\n\n /**\n * Updates the thread query parameters in the store.\n * @param params Partial<ThreadQueryParameters>\n * @returns {void}\n */\n public updateThreadQueryParams(params: Partial<ThreadQueryParameters>): void {\n this.nylasMailboxStore.state.threadsQueryParams = {\n ...this.nylasMailboxStore.state.threadsQueryParams,\n ...params,\n };\n }\n\n /**\n * Back to the mailbox.\n */\n public back(): void {\n this.router.navigate('/', true);\n this.nylasMailboxStore.state.selectedThread = null;\n }\n\n /**\n * Unselects a thread.\n */\n public unSelectThread(): void {\n this.nylasMailboxStore.state.selectedThread = null;\n }\n\n /**\n * Selects a thread.\n * @param {Thread} thread The thread to select.\n * @returns {Promise<void>}\n */\n public async selectThread(thread: Thread): Promise<void> {\n this.router.navigate(`/thread/${thread.id}`, true);\n this.nylasMailboxStore.state.selectedThread = thread;\n\n // Mark the thread as read (async) if it is unread.\n if (thread.unread) {\n this.markThreadAsRead(thread).catch(error => {\n debug('Error marking thread as read', error);\n });\n }\n }\n\n /**\n * Marks a thread as read.\n * @param thread\n * @returns {Promise<Thread>}\n */\n public async markThreadAsRead(thread: Thread): Promise<Thread> {\n return this.updateThread(thread, { unread: false });\n }\n\n /**\n * Updates a thread.\n * @param thread The thread to update.\n * @returns {Promise<Thread>}\n */\n public async updateThread(thread: Thread, updateThread: Partial<Thread>): Promise<Thread> {\n // Make sure we have an authenticated user.\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a modify scope at least.\n if (!this.nylasAuth.hasScopeByType('email', 'modify')) {\n throw new Error('Missing thread:modify scope');\n }\n\n // Make the API request.\n const path = `/v3/grants/me/threads/${thread.id}`;\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Thread>>(path, 'PUT', updateThread);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n // Update the thread in the store.\n const updatedThread = response.data;\n this.nylasMailboxStore.state.threads = this.nylasMailboxStore.state.threads.map(t => {\n if (t.id === updatedThread.id) {\n return updatedThread;\n }\n return t;\n });\n this.nylasMailboxStore.state.selectedThread = updatedThread;\n\n return updatedThread;\n }\n}\n","import { Folder, NylasAPIError, NylasAuthType, NylasResponse, isNylasErrorResponse } from '@nylas/core';\nimport { NylasAuthStoreType, NylasMailboxStoreType } from '../../../components';\n\nexport class NylasFoldersConnector {\n private nylasAuth: NylasAuthType;\n private nylasAuthStore: NylasAuthStoreType;\n private nylasMailboxStore: NylasMailboxStoreType;\n\n constructor(nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType, nylasMailboxStore: NylasMailboxStoreType) {\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n this.nylasMailboxStore = nylasMailboxStore;\n }\n\n /**\n * Returns the list of folders.\n */\n public async getFolders(): Promise<Folder[]> {\n if (!this.nylasAuthStore.state.isAuthenticated) {\n throw new Error('Not authenticated');\n }\n\n // Now make sure we have a read-only or modify scopes\n if (!this.nylasAuth.hasScopeByType('email', ['read-only', 'modify'])) {\n throw new Error('Missing thread:read-only scope');\n }\n\n // Set the state to loading.\n this.nylasMailboxStore.state.state = 'loading';\n\n // Make the API request.\n const path = `/v3/grants/me/folders`;\n const response = await this.nylasAuth.nylasAPIRequest<NylasResponse<Folder[]>>(path);\n if (isNylasErrorResponse(response)) {\n throw new NylasAPIError(response.error);\n }\n\n // Set the threads in the store.\n const folders = response.data;\n this.nylasMailboxStore.state.folders = folders;\n\n // Set the state to ready.\n this.nylasMailboxStore.state.state = 'ready';\n\n return folders;\n }\n\n public async selectFolder(folder: Folder) {\n this.nylasMailboxStore.state.threadsQueryParams = {\n in: folder.id,\n ...(this.nylasMailboxStore.state.threadsQueryParams || {}),\n };\n }\n}\n","import { debug } from '@/utils/utils';\nimport { RouteListener, RouteParams, RoutePath, RouterInterface } from './router-interface';\n\nexport class PolyFillHashChangeEvent extends Event {\n oldURL?: string;\n newURL?: string;\n\n constructor(type: string, eventInitDict: HashChangeEventInit) {\n super(type, eventInitDict);\n this.oldURL = eventInitDict.oldURL;\n this.newURL = eventInitDict.newURL;\n }\n}\n\nexport class HashRouter implements RouterInterface {\n private routeChangeListeners: [route: RoutePath, RouteListener<any>][] = [];\n\n constructor() {\n debug('HashRouter constructor');\n }\n\n // Destroy the router\n public destroy(): void {\n debug('HashRouter destroy');\n window.removeEventListener('hashchange', this.onRouteChange.bind(this));\n }\n\n // Initialize the router\n public init(): void {\n debug('HashRouter init');\n window.addEventListener('hashchange', this.onRouteChange.bind(this));\n\n // Trigger the initial route change\n if (typeof HashChangeEvent !== 'undefined') {\n const event: HashChangeEvent = new HashChangeEvent('hashchange', { oldURL: '', newURL: window.location.href });\n this.onRouteChange(event);\n } else {\n const event: Event = new PolyFillHashChangeEvent('hashchange', { oldURL: '', newURL: window.location.href });\n this.onRouteChange(event as HashChangeEvent);\n }\n }\n\n public addRouteChangeListener<Path extends RoutePath>(route: Path, listener: RouteListener<Path>): void {\n debug('HashRouter addRouteChangeListener');\n this.routeChangeListeners.push([route, listener]);\n }\n\n public navigate(route: string, shallow: boolean): void {\n debug('HashRouter navigate');\n\n // If we're navigating shallow, don't add a new history entry\n if (shallow) {\n return window.history.pushState(null, '', `#${route}`);\n }\n\n window.location.hash = route;\n }\n\n public setRoute(route: string): void {\n debug('HashRouter setRoute');\n window.location.hash = route;\n }\n\n // Matches a route and executes the callback\n public matchRoute(route: string, path: string): boolean {\n const routeParts = route.split('/');\n const pathParts = path.split('/');\n\n // If the route is `/` an the hash is empty, match the route\n debug(`HashRouter matchRoute route=${route} path=${path}`, { routeParts, pathParts });\n if (routeParts[1] === '' && pathParts[0] === '') {\n return true;\n }\n\n if (routeParts.length !== pathParts.length) {\n return false;\n }\n\n for (let i = 0; i < routeParts.length; i++) {\n const routePart = routeParts[i];\n const pathPart = pathParts[i];\n if (routePart.startsWith(':')) {\n continue;\n }\n if (routePart !== pathPart) {\n return false;\n }\n }\n\n return true;\n }\n\n // Parse the route and return the route params\n public getRouteParams<Path extends RoutePath>(route: Path): RouteParams<Path> {\n debug('HashRouter getRouteParams');\n const routeParams: RouteParams<Path> = {} as RouteParams<Path>;\n const routeParts = route.split('/');\n const routeConfigParts = window.location.hash.split('/');\n routeParts.forEach((routePart, index) => {\n if (routePart.startsWith(':')) {\n const key = routePart.substring(1) as keyof RouteParams<Path>;\n routeParams[key] = routeConfigParts[index] as RouteParams<Path>[keyof RouteParams<Path>]; // Cast the value to string\n }\n });\n return routeParams;\n }\n\n public getRouteWithParams(route: string, routeParams: Record<string, any>): string {\n debug('HashRouter getRouteWithParams');\n let routeWithParams = route;\n Object.keys(routeParams).forEach(key => {\n routeWithParams = routeWithParams.replace(`:${key}`, routeParams[key]);\n });\n return routeWithParams;\n }\n\n public getRoute(): string {\n debug('HashRouter getRoute');\n return window.location.hash;\n }\n\n public onRouteChange(event: HashChangeEvent): void {\n this.routeChangeListeners.forEach(async ([route, listener]) => {\n const path = event.newURL.indexOf('#') === -1 ? '' : event.newURL.substring(event.newURL.indexOf('#') + 1);\n debug(`HashRouter onRouteChange route=${route} path=${path}`, { event });\n if (!this.matchRoute(route, path)) {\n debug(`HashRouter onRouteChange route=${route} path=${path} does not match`);\n return;\n }\n const routeParams = this.getRouteParams(route) as RouteParams<RoutePath>;\n await listener(route, path, routeParams);\n });\n }\n\n public getBasePath(): string {\n debug('HashRouter getBasePath');\n return '';\n }\n}\n","import { TokenInfo } from '@nylas/core/dist/auth';\nimport { createStore } from '@stencil/store';\nimport { DataState } from '..';\n\nexport interface NylasAuthStoreState {\n isAuthenticated: boolean;\n tokenInfo: TokenInfo | null;\n state: DataState;\n}\n\nexport type NylasAuthStoreType = ReturnType<typeof CreateNylasAuthStore>;\n\nexport function CreateNylasAuthStore(defaultState: Partial<NylasAuthStoreState> = {}) {\n const defaultNylasStoreState: NylasAuthStoreState = {\n isAuthenticated: false,\n tokenInfo: null,\n state: 'ready',\n ...defaultState,\n };\n const store = createStore<NylasAuthStoreState>(defaultNylasStoreState);\n\n /**\n * Reset the Nylas store to its default state.\n * There is something wrong with the stencil/store reset method,\n * so we have to do it via this hack.\n */\n store.reset = () => {\n for (const key in defaultNylasStoreState) {\n const value = defaultNylasStoreState[key as keyof typeof defaultNylasStoreState];\n store.set(key as any, value);\n }\n };\n\n return store;\n}\n","import type { Folder, Message, MessageQueryParameters, Thread, ThreadQueryParameters } from '@nylas/core';\nimport { createStore } from '@stencil/store';\nimport { DataState } from '../components';\n\nexport interface NylasMailboxStoreState {\n state: DataState;\n messages: Message[];\n threads: Thread[];\n folders: Folder[];\n selectedThread: Thread | null;\n selectedFolder: string;\n searchQuery: string;\n\n nextThreadPageToken: string | null;\n previousThreadPageTokens: (string | null)[];\n hasNextThreadPage: boolean;\n hasPreviousThreadPage: boolean;\n threadsQueryParams: Partial<ThreadQueryParameters>;\n messgeQueryParams: Partial<MessageQueryParameters>;\n}\n\nexport type NylasMailboxStoreType = ReturnType<typeof CreateNylasMailboxStore>;\n\nexport function CreateNylasMailboxStore(defaultState: Partial<NylasMailboxStoreState> = {}) {\n const defaultNylasStoreState: NylasMailboxStoreState = {\n state: 'ready',\n\n messages: [],\n threads: [],\n folders: [],\n selectedThread: null,\n nextThreadPageToken: null,\n previousThreadPageTokens: [],\n searchQuery: '',\n\n hasNextThreadPage: false,\n hasPreviousThreadPage: false,\n\n selectedFolder: 'inbox',\n\n threadsQueryParams: {\n in: 'inbox',\n },\n messgeQueryParams: {\n fields: 'include_headers',\n },\n ...defaultState,\n };\n\n const store = createStore<NylasMailboxStoreState>({ ...defaultNylasStoreState });\n\n // Set our hasNextThreadPage if nextThreadPageToken is not null.\n store.onChange('nextThreadPageToken', nextThreadPageToken => {\n store.set('hasNextThreadPage', nextThreadPageToken !== null);\n });\n // Set our hasPreviousThreadPage if previousThreadPageTokens is not empty.\n store.onChange('previousThreadPageTokens', previousThreadPageTokens => {\n store.set('hasPreviousThreadPage', previousThreadPageTokens.length > 0);\n });\n\n // When threadsQueryParams changes...\n store.onChange('threadsQueryParams', threadsQueryParams => {\n // set our selectedFolder to the in param.\n store.set('selectedFolder', threadsQueryParams.in || 'inbox');\n // set our searchQuery to the search_query_native param.\n store.set('searchQuery', threadsQueryParams.search_query_native || '');\n });\n\n store.reset = () => {\n for (const key in defaultNylasStoreState) {\n const value = defaultNylasStoreState[key as keyof typeof defaultNylasStoreState];\n store.set(key as any, value);\n }\n };\n\n return store;\n}\n"],"version":3}
@@ -10,7 +10,7 @@ const MicrosoftLogoIcon = proxyCustomElement(class MicrosoftLogoIcon extends HTM
10
10
  this.height = '22';
11
11
  }
12
12
  render() {
13
- return (h("svg", { key: '48516ac28c70d446ba44e3b65252920c4e8d3b06', width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '29c0f58e11eb99e946fd2dcb33ef603620305d9d', d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), h("path", { key: '6b5303ad19e48b6c0ad9842ee748dc7db17e2a68', d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), h("path", { key: '278ce5362ac072c57040ad1bf944557f71809b5f', d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), h("path", { key: '9c2b9b9c87a902dd80cae38db0c46c94435903c2', d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" })));
13
+ return (h("svg", { key: 'de39bfb3167fbd60d21025e74c1bc19cdd7d4dc9', width: this.width, height: this.height, viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '0f80864e892ff36e6e76ef03f5f36d62007d99ee', d: "M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z", fill: "#F35325" }), h("path", { key: 'ab0e85f803a3cf2e32055ebeff1b0705edebe048', d: "M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z", fill: "#81BC06" }), h("path", { key: 'b6359dcb76ade260f2a9e9bdf1be21ba84b77b79', d: "M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z", fill: "#05A6F0" }), h("path", { key: 'cf38a555c09aaef94a15fd26b0951e2642eaad6d', d: "M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z", fill: "#FFBA08" })));
14
14
  }
15
15
  static get style() { return iconCss; }
16
16
  }, [2, "microsoft-logo-icon", {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
- import { d as debug } from './utils.js';
2
+ import { a as debug } from './utils.js';
3
3
  import { d as defineCustomElement$2 } from './chevron.js';
4
4
  import { d as defineCustomElement$1 } from './close.js';
5
5
 
@@ -127,9 +127,9 @@ const MultiSelectDropdown = proxyCustomElement(class MultiSelectDropdown extends
127
127
  }, class: { selected: !!option.selected } }, h("label", { htmlFor: option.value }, h("input", { "aria-hidden": "true", id: option.value, type: "checkbox", checked: option.selected }), h("span", null, option.label))));
128
128
  }
129
129
  render() {
130
- return (h(Host, { key: '7502de7e6d986d6e2536849703ee28c79b5c1195' }, h("div", { key: '1ddfc9626f7864703fee5e0c3c9bfd09036a17ce', class: "dropdown", part: "msd_dropdown" }, h("label", { key: '8da2bb175a29fe6680fadfd926e3d05240635391', class: "dropdown-label" }, this.label, h("slot", { key: 'e1eccd82254cd095768c3e5ae36cff3134ca747f', name: "label-icon", "aria-hidden": "true" })), h("button", { key: '6d56072472b3e51f08e7980ddcff9650fc35c13a', part: "msd_dropdown-button", class: { dropbtn: true, open: this.isOpen }, onClick: () => this.toggleDropdown(), "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-label": this.name, onKeyDown: e => this.handleSelectButtonKeyDown(e) }, h("slot", { key: '11dee24f8003354b0316e19833e5001c913f4a9e', name: "select-icon", "aria-hidden": "true" }), h("span", { key: '65c1709b1be19a34be367455062a4719598f51a2', class: "selected-option", part: "msd_dropdown-button-selected-label" }, this.getSelectedOptions().length > 1
130
+ return (h(Host, { key: '4ef13670e3dfbf55e023ac7532d93c48d21f3004' }, h("div", { key: '8626f138f5be677421697067460ef76d0a7cc697', class: "dropdown", part: "msd_dropdown" }, h("label", { key: 'b723c488dac91c39f285aae1a3f7928844753bf1', class: "dropdown-label" }, this.label, h("slot", { key: '5bdec320647a41de57671c75523a453ccb07af2a', name: "label-icon", "aria-hidden": "true" })), h("button", { key: 'f7d7cf144ac2fec93171b5ac6cd42be4be6b5c93', part: "msd_dropdown-button", class: { dropbtn: true, open: this.isOpen }, onClick: () => this.toggleDropdown(), "aria-haspopup": "listbox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-label": this.name, onKeyDown: e => this.handleSelectButtonKeyDown(e) }, h("slot", { key: '021e59628b8da260b308819614297c177a666334', name: "select-icon", "aria-hidden": "true" }), h("span", { key: '4a8c921538a23abe4c7efbeb176fb806587092c9', class: "selected-option", part: "msd_dropdown-button-selected-label" }, this.getSelectedOptions().length > 1
131
131
  ? `Multiple ${this.name}s selected`
132
- : this.availableOptions.filter(o => o.selected)[0]?.label ?? this.availableOptions[0]?.label), h("span", { key: '81d7d8b18144b4276f6c19682c8fd78072a8074b', class: this.isOpen ? 'open' : 'closed', "aria-hidden": "true" }, h("chevron-icon", { key: '36afd55e13491d5af7af22be2aca5a1dff6c2315', width: "16", height: "16" }))), this.isOpen ? null : (h("div", { class: 'selected-options' }, this.getSelectedOptions().map(option => (h("span", { class: "selected-option" }, option.label, h("button", { key: option.label, onClick: () => this.selectOption(option) }, h("close-icon", null))))))), this.isOpen ? (h("div", { class: "dropdown-content", part: "msd_dropdown-content" }, h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-multiselectable": true, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: e => this.handleListboxKeydown(e) }, this.availableOptions.map(option => this.renderOption(option))))) : null)));
132
+ : this.availableOptions.filter(o => o.selected)[0]?.label ?? this.availableOptions[0]?.label), h("span", { key: 'fc771549d102fb27e33d128504d09fa6151154e9', class: this.isOpen ? 'open' : 'closed', "aria-hidden": "true" }, h("chevron-icon", { key: 'bd8282695d11bcfb617da05a75d0a2335650f705', width: "16", height: "16" }))), this.isOpen ? null : (h("div", { class: 'selected-options' }, this.getSelectedOptions().map(option => (h("span", { class: "selected-option" }, option.label, h("button", { key: option.label, onClick: () => this.selectOption(option) }, h("close-icon", null))))))), this.isOpen ? (h("div", { class: "dropdown-content", part: "msd_dropdown-content" }, h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-multiselectable": true, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: e => this.handleListboxKeydown(e) }, this.availableOptions.map(option => this.renderOption(option))))) : null)));
133
133
  }
134
134
  get el() { return this; }
135
135
  static get style() { return multiSelectDropdownCss; }
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { R as RegisterComponent } from './register-component.js';
3
- import { d as debug } from './utils.js';
3
+ import { a as debug } from './utils.js';
4
4
  import { d as defineCustomElement$3 } from './close.js';
5
5
  import { d as defineCustomElement$2 } from './nylas-form-card2.js';
6
6
 
@@ -72,7 +72,7 @@ const NylasAdditionalParticipants$1 = proxyCustomElement(class NylasAdditionalPa
72
72
  this.internals.setFormValue(JSON.stringify(this.participants), 'participants');
73
73
  }
74
74
  render() {
75
- return (h(Host, { key: 'ebe0dbf83d5474ee92f2cfad34a70754399e0652' }, h("nylas-form-card", { key: '629fe506dad5d048c6a9f941b98966ce79be84d3' }, h("h3", { key: 'ec27e6784081daff0de147ae92ddc40d50ebe156', slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Additional participants"), h("p", { key: '1f8824d73a0676d184fde73c5f80493ad86568a7', slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add anyone else who would be joining for this event."), h("div", { key: '4db703ffd3c01113814c6d19d36bf89af0a886d3', slot: "content", class: "nylas-additional-participants__content" }, h("div", { key: '65ce22e63fcbd4094ac3c75651400cdfcd85afe6' }, this.participants.map((participant, index) => {
75
+ return (h(Host, { key: '2cee2dd98939f98fdfc950f609fce3f6045ced9f' }, h("nylas-form-card", { key: 'e587c19e99fa1b40c9d876123fd50cde51e8882c' }, h("h3", { key: '6c4a90291f5918e98d62e03b599619ff4f345391', slot: "header-title", class: "nylas-additional-participants__title", part: "nap__title" }, "Additional participants"), h("p", { key: 'ad4fac5ca4cdb1430f889c723215d9a1538a266f', slot: "header-subtitle", class: "nylas-additional-participants__subtitle", part: "nap__subtitle" }, "Add anyone else who would be joining for this event."), h("div", { key: '80b29a9b1275363dac86274be18cc52210e59de7', slot: "content", class: "nylas-additional-participants__content" }, h("div", { key: '5adf8a7d2be8c780dbc5859b8b634efc114536c2' }, this.participants.map((participant, index) => {
76
76
  return (h("div", { class: 'nylas-additional-participants__input_group', part: "nap__input_group" }, h("label", null, participant.is_organizer ? 'Organizer' : `Participant ${index}`), h("div", { part: "nap__input_wrapper", class: `nylas-additional-participants__input_wrapper ${participant.is_organizer && 'nylas-additional-participants__input_wrapper_organizer'} ${participant.is_valid === false && 'nylas-additional-participants__input_wrapper_invalid'}` }, h("div", { class: "nylas-additional-participants__input", part: "nap__input" }, h("input", { type: "text", value: participant.email, onInput: e => {
77
77
  this.onParticipantChange(e, index);
78
78
  }, readOnly: participant.is_organizer, onBlur: () => this.validate(participant.email, index) })), !participant.is_organizer && (h("button", { onClick: () => this.removeParticipant(participant.email), part: "nap__remove-participant" }, h("close-icon", null))))));
@@ -1,9 +1,10 @@
1
- import { d as dataResponse } from './utils-73d8a928.js';
1
+ import { d as dataResponse } from './utils.js';
2
2
 
3
3
  class NylasApiRequest {
4
4
  }
5
5
  class NylasIdentityRequestWrapper {
6
6
  constructor(session) {
7
+ this.defaultAuthArgs = {};
7
8
  this.session = session;
8
9
  }
9
10
  setActiveGrantId(grantId) {
@@ -17,6 +18,9 @@ class NylasIdentityRequestWrapper {
17
18
  body,
18
19
  ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),
19
20
  });
21
+ if (typeof response === 'undefined') {
22
+ throw new Error('Response is undefined');
23
+ }
20
24
  return dataResponse(response);
21
25
  }
22
26
  catch (error) {
@@ -38,10 +42,17 @@ class NylasIdentityRequestWrapper {
38
42
  };
39
43
  }
40
44
  async authenticationUrl(authArgs) {
41
- return this.session.auth(authArgs || {});
45
+ let args = this.defaultAuthArgs || {};
46
+ if (authArgs) {
47
+ args = { ...args, ...authArgs };
48
+ }
49
+ return this.session.auth(args);
50
+ }
51
+ setDefaultAuthArgs(authArgs) {
52
+ this.defaultAuthArgs = authArgs;
42
53
  }
43
54
  }
44
55
 
45
56
  export { NylasIdentityRequestWrapper as N };
46
57
 
47
- //# sourceMappingURL=nylas-api-request-4f3dbb72.js.map
58
+ //# sourceMappingURL=nylas-api-request.js.map
@@ -0,0 +1 @@
1
+ {"file":"nylas-api-request.js","mappings":";;MA2CsB,eAAe;CAwBpC;MAOY,2BAA2B;IAqBtC,YAAY,OAAsB;QAN1B,oBAAe,GAAa,EAAE,CAAC;QAOrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;KACxB;IAQD,gBAAgB,CAAC,OAAe;QAC9B,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC;KAC9B;IAWD,MAAM,OAAO,CAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAoB;QAChE,IAAI;YACF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,IAAI,EAAE,EAAE;gBAC7D,MAAM;gBACN,OAAO,EAAE,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS;gBACnD,IAAI;gBACJ,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,IAAI,CAAC,aAAa,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC;aACjG,CAAC,CAAC;YAIH,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;gBACnC,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;aAC1C;YAED,OAAO,YAAY,CAAC,QAAa,CAAC,CAAC;SACpC;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,YAAY,CAAC,IAAS,EAAE;gBAC7B,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC;aACvB,CAAC,CAAC;SACJ;KACF;IAOD,MAAM,WAAW;QACf,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC;QAC/E,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QACvD,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,IAAI,CAAC;SACb;QAED,OAAO;YACL,EAAE,EAAE,OAAO,CAAC,GAAG;YACf,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,IAAI,EAAE,OAAO,CAAC,IAAI;SACnB,CAAC;KACH;IAOD,MAAM,iBAAiB,CAAC,QAAmB;QACzC,IAAI,IAAI,GAAG,IAAI,CAAC,eAAe,IAAI,EAAE,CAAC;QACtC,IAAI,QAAQ,EAAE;YACZ,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,EAAE,CAAC;SACjC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAChC;IAMD,kBAAkB,CAAC,QAAkB;QACnC,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;KACjC;;;;;","names":[],"sources":["src/common/nylas-api-request.ts"],"sourcesContent":["import { dataResponse } from '@/utils/utils';\nimport type { NylasSessions } from '@nylas/identity';\nimport { DataResponseReturnType } from './types';\n\n/**\n * Arguments for making a request to the Nylas API.\n */\nexport type NylasRequestArgs = {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: any;\n headers?: Record<string, string>;\n};\n\n/**\n * A model representing a user in the Nylas Identity system.\n */\nexport type User = {\n id: string;\n email: string;\n name?: string;\n};\n\n/**\n * Arguments for authenticating a user with the Nylas Identity system.\n */\nexport type AuthArgs = {\n provider?: string;\n scope?: Array<string>;\n loginHint?: string;\n includeGrantScopes?: boolean;\n prompt?: string;\n metadata?: string;\n state?: string;\n};\n\n/**\n * Interface for making requests to the Nylas API.\n *\n * This is an abstract class that is meant to be implemented by customers to provide their own\n * implementation of making requests to the Nylas API. This allows customers to use their own\n * authentication mechanism, or to use a different HTTP client library.\n */\nexport abstract class NylasApiRequest {\n /**\n * This method should make an authenticated request to the Nylas API.\n * Note: It should not throw an error if the request fails, but should return an object with the error\n * information as part of the tuple returned.\n * @param args NylasRequestArgs\n */\n abstract request<T = any>(args: NylasRequestArgs): Promise<DataResponseReturnType<T>>;\n\n /**\n * This method should return the current user's information.\n */\n\n abstract currentUser(): Promise<User | null>;\n\n /**\n * This method should set the default authentication arguments to use when authenticating the user.\n */\n abstract setDefaultAuthArgs(authArgs: AuthArgs): void;\n\n /**\n * This method should return the URL to redirect the user to for authentication.\n */\n abstract authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined>;\n}\n\n/**\n * A wrapper around the Nylas Identity session that implements the NylasApiRequest interface.\n * This class is used by the Nylas Web Elements to make requests to the Nylas API if no custom\n * implementation of NylasApiRequest is provided.\n */\nexport class NylasIdentityRequestWrapper implements NylasApiRequest {\n /**\n * The Nylas Identity session instance.\n */\n private session: NylasSessions;\n\n /**\n * The grant_id to use for requests, if there is multi-account support\n * enabled in the Nylas Identity settings.\n */\n private activeGrantId?: string;\n\n /**\n * The default authentication arguments to use when authenticating the user.\n */\n private defaultAuthArgs: AuthArgs = {};\n\n /**\n * Constructor for the NylasIdentityRequestWrapper class.\n * @param session The Nylas Identity session instance.\n */\n constructor(session: NylasSessions) {\n this.session = session;\n }\n\n /**\n * This method sets the grant_id to use for requests.\n * This is used when there is multi-account support enabled in the Nylas Identity settings.\n *\n * @param grantId\n */\n setActiveGrantId(grantId: string) {\n this.activeGrantId = grantId;\n }\n\n /**\n * This method makes a request to the Nylas API, using the Nylas Identity's fetch method.\n *\n * The `grants/me/` prefix is added because all requests made from the browser to the Nylas API\n * must be made on behalf of the currently logged in user with a valid access token.\n *\n * @param NylasRequestArgs\n * @returns Promise<[T | null, NylasErrorResponse['error'] | null]>\n */\n async request<T>({ method, path, body, headers }: NylasRequestArgs): Promise<DataResponseReturnType<T>> {\n try {\n const response = await this.session.fetch(`grants/me/${path}`, {\n method,\n headers: headers ? new Headers(headers) : undefined,\n body,\n ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),\n });\n\n // Sometimes the Nylas identity session fetch method returns undefined.\n // Possibly due to CORS issues. In this case, we throw an error.\n if (typeof response === 'undefined') {\n throw new Error('Response is undefined');\n }\n\n return dataResponse(response as T);\n } catch (error) {\n return dataResponse(null as T, {\n message: String(error),\n });\n }\n }\n\n /**\n * This method returns the current (logged in) user's information.\n * If the user is not logged in, it returns null.\n * @returns Promise<User | null>\n */\n async currentUser(): Promise<User | null> {\n const grantId = this.session.isMultiAccount() ? this.activeGrantId : undefined;\n const idToken = await this.session.getProfile(grantId);\n if (!idToken) {\n return null;\n }\n\n return {\n id: idToken.sub,\n email: idToken.email,\n name: idToken.name,\n };\n }\n\n /**\n * This method returns the URL to redirect the user to for authentication.\n * @param authConfig authArgs\n * @returns Promise<string | undefined>\n */\n async authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined> {\n let args = this.defaultAuthArgs || {};\n if (authArgs) {\n args = { ...args, ...authArgs };\n }\n return this.session.auth(args);\n }\n\n /**\n * This method sets the default authentication arguments to use when authenticating the user.\n * @param authArgs authArgs\n */\n setDefaultAuthArgs(authArgs: AuthArgs) {\n this.defaultAuthArgs = authArgs;\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { R as RegisterComponent } from './register-component.js';
3
- import { d as debug, i as timeToMinutes, j as convertTo12HourFormat, m as minutesToTime, k as convertTo24HourFormat } from './utils.js';
3
+ import { a as debug, t as timeToMinutes, c as convertTo12HourFormat, m as minutesToTime, b as convertTo24HourFormat } from './utils.js';
4
4
  import { T as TIMEZONE_MAP } from './constants.js';
5
5
  import { d as defineCustomElement$9 } from './add-circle.js';
6
6
  import { d as defineCustomElement$8 } from './chevron.js';
@@ -35,6 +35,7 @@ const NylasAvailabilityPicker = proxyCustomElement(class NylasAvailabilityPicker
35
35
  this.__attachShadow();
36
36
  this.valueChanged = createEvent(this, "valueChanged", 7);
37
37
  this.internals = this.attachInternals();
38
+ this.selectedConfiguration = undefined;
38
39
  this.openHours = undefined;
39
40
  this.name = 'availability';
40
41
  this.defaultTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
@@ -54,10 +55,19 @@ const NylasAvailabilityPicker = proxyCustomElement(class NylasAvailabilityPicker
54
55
  debug('nylas-calendar-picker', 'elementNameChangedHandler', newValue);
55
56
  this.host.setAttribute('name', newValue);
56
57
  }
58
+ configChangedHandler(newConfig) {
59
+ const organizerParticipant = newConfig?.participants?.find(p => p.is_organizer);
60
+ if (organizerParticipant && organizerParticipant?.availability?.open_hours) {
61
+ this.openHoursToSchedule(organizerParticipant?.availability?.open_hours);
62
+ }
63
+ }
57
64
  scheduleChanged(newValue, oldValue) {
58
65
  if (newValue !== oldValue) {
59
66
  this.valueChanged.emit({
60
- value: this.scheduleToOpenHours(newValue, this.timezone),
67
+ value: {
68
+ openHours: this.scheduleToOpenHours(newValue),
69
+ timezone: this.timezone,
70
+ },
61
71
  name: this.name,
62
72
  });
63
73
  let overlapDays = {};
@@ -82,7 +92,10 @@ const NylasAvailabilityPicker = proxyCustomElement(class NylasAvailabilityPicker
82
92
  }
83
93
  else {
84
94
  this.internals.setValidity({ customError: false });
85
- this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(newValue, this.timezone)));
95
+ this.internals.setFormValue(JSON.stringify({
96
+ openHours: this.scheduleToOpenHours(this.schedule),
97
+ timezone: this.timezone,
98
+ }));
86
99
  }
87
100
  }
88
101
  }
@@ -93,7 +106,10 @@ const NylasAvailabilityPicker = proxyCustomElement(class NylasAvailabilityPicker
93
106
  if (typeof this.internals.setFormValue !== 'function') {
94
107
  return;
95
108
  }
96
- this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(this.schedule, this.timezone)));
109
+ this.internals.setFormValue(JSON.stringify({
110
+ openHours: this.scheduleToOpenHours(this.schedule),
111
+ timezone: this.timezone,
112
+ }));
97
113
  }
98
114
  }
99
115
  connectedCallback() {
@@ -109,12 +125,15 @@ const NylasAvailabilityPicker = proxyCustomElement(class NylasAvailabilityPicker
109
125
  componentDidLoad() {
110
126
  debug('nylas-availability-picker', 'componentDidLoad');
111
127
  if (this.openHours && this.openHours.length > 0) {
112
- this.updateSchedule(this.openHours);
128
+ this.openHoursToSchedule(this.openHours);
113
129
  }
114
130
  if (typeof this.internals.setFormValue !== 'function') {
115
131
  return;
116
132
  }
117
- this.internals.setFormValue(JSON.stringify(this.scheduleToOpenHours(this.schedule, this.timezone)));
133
+ this.internals.setFormValue(JSON.stringify({
134
+ openHours: this.scheduleToOpenHours(this.schedule),
135
+ timezone: this.timezone,
136
+ }));
118
137
  }
119
138
  getOverlaps(timeRanges) {
120
139
  let timeRangesInMinutes = timeRanges.map((range, index) => ({
@@ -207,7 +226,7 @@ const NylasAvailabilityPicker = proxyCustomElement(class NylasAvailabilityPicker
207
226
  this.internals.setValidity({ customError: true }, `Invalid ${timeType} time`, element);
208
227
  }
209
228
  }
210
- updateSchedule(openHours) {
229
+ openHoursToSchedule(openHours) {
211
230
  const newSchedule = {
212
231
  SUN: [],
213
232
  MON: [],
@@ -237,17 +256,14 @@ const NylasAvailabilityPicker = proxyCustomElement(class NylasAvailabilityPicker
237
256
  }
238
257
  });
239
258
  });
240
- if (openHours.length === 0) {
241
- this.timezone = openHours[0].timezone;
242
- }
243
- this.timezone = openHours[0].timezone;
259
+ this.timezone = this.defaultTimezone;
244
260
  this.schedule = newSchedule;
245
261
  }
246
262
  getDayKey(dayIndex) {
247
263
  const days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
248
264
  return days[dayIndex];
249
265
  }
250
- scheduleToOpenHours(schedule, timezone = 'UTC') {
266
+ scheduleToOpenHours(schedule) {
251
267
  const dayKeys = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
252
268
  let openHoursMap = new Map();
253
269
  dayKeys.forEach((dayKey, index) => {
@@ -275,7 +291,6 @@ const NylasAvailabilityPicker = proxyCustomElement(class NylasAvailabilityPicker
275
291
  days: value.days,
276
292
  start: value.start,
277
293
  end: value.end,
278
- timezone: timezone,
279
294
  });
280
295
  });
281
296
  return selectedOpenHours;
@@ -285,7 +300,7 @@ const NylasAvailabilityPicker = proxyCustomElement(class NylasAvailabilityPicker
285
300
  label: TIMEZONE_MAP[key],
286
301
  value: key,
287
302
  }));
288
- return (h(Host, { key: '440dc2f314a9c47eb8186f4ed965ed3052301ddf' }, h("div", { key: '2d31ef10ae53275fc065f4e9f68c32f42b60d829', class: "nylas-availability-picker" }, h("div", { key: 'aa6695b6054b81ece7ede5f5e089545a041800f6', class: "header", part: "nap__header" }, h("h3", { key: '86e0d18ca7b70d74159c5cead0d6f5a17a145fa7' }, "General availability"), h("p", { key: '05da67e03befbe936793af5ee98f801b512d28e7' }, "Set your availability for scheduling meetings.")), h("div", { key: '84c6bf714ccea4aff07d6e660d8ca3f96ce9a8cc', class: "content" }, h("div", { key: '16edf74e06bed5440df5f5ea73e90cfa83d08b29', class: "select-timezone", part: "nap__select-timezone" }, h("h4", { key: '1025677efcaf114cb86ce57324c299eeea79b37e', class: "sub-header" }, "Select timezone", h("span", { key: '6d65a6457da202c5a3d5c5cd4e185903a12cec7f', class: "icon" }, h("tooltip-component", { key: '61a40ea06c06f1d306a8b352d9ae883d09768249' }, h("info-icon", { key: '2d447cc2e6a619ee7b1cf1fd3e2b6424fcd6db5b', slot: "tooltip-icon" }), h("span", { key: '35742354ba0841bc1c17170094bab09d536208e6', slot: "tooltip-content" }, "Select your timezone for displaying availability.")))), h("select-dropdown", { key: '3532c95b077fc701cdbf89cd13668acc675cf0e4', name: "timezone", exportparts: "sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content", options: timezoneOptions, defaultSelectedOption: timezoneOptions.find(i => i.value === this.defaultTimezone) }, h("span", { key: 'c1e870c593966e29d72c3f519f3309f84e4b9a9a', slot: "select-icon" }, h("globe-icon", { key: 'df23e31168778926b6118651cd636ab801f062f1', width: "20", height: "20" })))), h("div", { key: '5ad8cf7078dc104d1258f77e1c69bebf8c82d8dd', class: "availability", part: "nap__availability" }, Object.keys(this.schedule).map(key => {
303
+ return (h(Host, { key: '396ba889df619966df24cb5eb33de1a77be3a2ba' }, h("div", { key: 'bb2a28befc3aa0481fe265a6af99049b528fca42', class: "nylas-availability-picker" }, h("div", { key: '729c24276d5e773dfbc67791fede7aa0c0bcc747', class: "header", part: "nap__header" }, h("h3", { key: 'ba7c73778a8b3dd197ca850cead346d2f00836b7' }, "General availability"), h("p", { key: '6f946e8e00921f0620b16a3412f290f176dd5b9b' }, "Set your availability for scheduling meetings.")), h("div", { key: '7753c38b6160be28c495cc9803015e0dc0003b2a', class: "content" }, h("div", { key: '8d79379263f772f29443b24f5996d017db12e764', class: "select-timezone", part: "nap__select-timezone" }, h("h4", { key: 'e6a3658ecf3d92c0dda352532a3a0c71fb59f96e', class: "sub-header" }, "Select timezone", h("span", { key: 'fdb95f85f111a1557897309ff0bd682a77499684', class: "icon" }, h("tooltip-component", { key: '37b47d8e5b24bd4620e6be932ea23c8553b4822f' }, h("info-icon", { key: 'f1192d767cc0e1c67f989b47af093e3539d7c55c', slot: "tooltip-icon" }), h("span", { key: '2b3b949fc18e0118199a3ed9668ec0ca19283c79', slot: "tooltip-content" }, "Select your timezone for displaying availability.")))), h("select-dropdown", { key: '4729bd6e7b7c05a3fb47cf94010a00db51394c7e', name: "timezone", exportparts: "sd_dropdown: nap__timezone-container, sd_dropdown-button: nap__timezone-button, sd_dropdown-content: nap__timezone-dropdown-content", options: timezoneOptions, defaultSelectedOption: timezoneOptions.find(i => i.value === this.defaultTimezone) }, h("span", { key: '2157b7fb691541f42713a77dc1338dbb9f0e26c2', slot: "select-icon" }, h("globe-icon", { key: '17138c37b7df667e46873af1caa5278120fa4ce1', width: "20", height: "20" })))), h("div", { key: '9a49a84812b5fb544ebfd07d5dd1aba35679224e', class: "availability", part: "nap__availability" }, Object.keys(this.schedule).map(key => {
289
304
  const day = key;
290
305
  const timeRanges = this.schedule[key];
291
306
  return (h("div", { class: "availability-day" }, h("div", { class: "day", part: "nap__day" }, h("input", { type: "checkbox", name: day, id: day, checked: timeRanges.length > 0, onClick: () => {
@@ -308,10 +323,12 @@ const NylasAvailabilityPicker = proxyCustomElement(class NylasAvailabilityPicker
308
323
  get host() { return this; }
309
324
  static get watchers() { return {
310
325
  "name": ["elementNameChangedHandler"],
326
+ "selectedConfiguration": ["configChangedHandler"],
311
327
  "schedule": ["scheduleChanged"]
312
328
  }; }
313
329
  static get style() { return nylasAvailabilityPickerCss; }
314
330
  }, [65, "nylas-availability-picker", {
331
+ "selectedConfiguration": [16],
315
332
  "openHours": [16],
316
333
  "name": [1],
317
334
  "defaultTimezone": [1, "default-timezone"],
@@ -320,11 +337,13 @@ const NylasAvailabilityPicker = proxyCustomElement(class NylasAvailabilityPicker
320
337
  "overlapDays": [32]
321
338
  }, [[0, "selectedOptionChanged", "selectedOptionChangedHandler"]], {
322
339
  "name": ["elementNameChangedHandler"],
340
+ "selectedConfiguration": ["configChangedHandler"],
323
341
  "schedule": ["scheduleChanged"]
324
342
  }]);
325
343
  __decorate([
326
344
  RegisterComponent({
327
345
  name: 'nylas-availability-picker',
346
+ stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
328
347
  fireRegisterEvent: true,
329
348
  }),
330
349
  __metadata("design:type", Function),