@nylas/web-elements 1.1.0-canary.4 → 1.1.0-canary.7

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 (939) 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 +224 -94
  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 +467 -0
  33. package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -0
  34. package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
  35. package/dist/cjs/index-7af03e3f.js +1 -158
  36. package/dist/cjs/index-c14ea8f5.js +1 -358
  37. package/dist/cjs/index.cjs.js +3 -1
  38. package/dist/cjs/index.cjs.js.map +1 -1
  39. package/dist/cjs/{index.es-68425511.js → index.es-0a0f2d87.js} +9 -4
  40. package/dist/cjs/index.es-0a0f2d87.js.map +1 -0
  41. package/dist/cjs/{index.es-447c5aca.js → index.es-b12b7df1.js} +9 -4
  42. package/dist/cjs/index.es-b12b7df1.js.map +1 -0
  43. package/dist/cjs/info-icon.cjs.entry.js +1 -1
  44. package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
  45. package/dist/cjs/italic-icon.cjs.entry.js +1 -1
  46. package/dist/cjs/loader.cjs.js +1 -1
  47. package/dist/cjs/loading-icon.cjs.entry.js +1 -1
  48. package/dist/cjs/location-icon.cjs.entry.js +1 -1
  49. package/dist/cjs/location-off-icon.cjs.entry.js +1 -1
  50. package/dist/cjs/{mailbox-store-556bc7b6.js → mailbox-store-05fa3bec.js} +3 -3
  51. package/dist/cjs/{mailbox-store-556bc7b6.js.map → mailbox-store-05fa3bec.js.map} +1 -1
  52. package/dist/cjs/{mailbox-store-aacd75ff.js → mailbox-store-14531fd4.js} +3 -3
  53. package/dist/cjs/{mailbox-store-aacd75ff.js.map → mailbox-store-14531fd4.js.map} +1 -1
  54. package/dist/cjs/microsoft-logo-icon.cjs.entry.js +1 -1
  55. package/dist/cjs/multi-select-dropdown.cjs.entry.js +3 -3
  56. package/dist/cjs/nylas-additional-participants.cjs.entry.js +3 -3
  57. package/dist/cjs/nylas-api-request-27c25287.js +60 -0
  58. package/dist/cjs/nylas-api-request-27c25287.js.map +1 -0
  59. package/dist/cjs/nylas-api-request-abdb8dd8.js +58 -0
  60. package/dist/cjs/nylas-api-request-abdb8dd8.js.map +1 -0
  61. package/dist/cjs/nylas-availability-picker.cjs.entry.js +33 -16
  62. package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
  63. package/dist/cjs/nylas-booked-event-card.cjs.entry.js +3 -3
  64. package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +7 -7
  65. package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js +12 -6
  66. package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js.map +1 -1
  67. package/dist/cjs/nylas-booking-form.cjs.entry.js +2 -2
  68. package/dist/cjs/nylas-buffer-time.cjs.entry.js +2 -2
  69. package/dist/cjs/nylas-calendar-picker.cjs.entry.js +13 -8
  70. package/dist/cjs/nylas-calendar-picker.cjs.entry.js.map +1 -1
  71. package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +3 -3
  72. package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +3 -3
  73. package/dist/cjs/nylas-composer.cjs.entry.js +2 -2
  74. package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +21 -12
  75. package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js.map +1 -1
  76. package/dist/cjs/nylas-date-picker.cjs.entry.js +2 -2
  77. package/dist/cjs/nylas-editor-tabs.cjs.entry.js +85 -39
  78. package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
  79. package/dist/cjs/nylas-event-description.cjs.entry.js +15 -6
  80. package/dist/cjs/nylas-event-description.cjs.entry.js.map +1 -1
  81. package/dist/cjs/nylas-event-duration.cjs.entry.js +15 -10
  82. package/dist/cjs/nylas-event-duration.cjs.entry.js.map +1 -1
  83. package/dist/cjs/nylas-event-info.cjs.entry.js +3 -3
  84. package/dist/cjs/nylas-event-limits.cjs.entry.js +3 -3
  85. package/dist/cjs/nylas-event-title.cjs.entry.js +52 -12
  86. package/dist/cjs/nylas-event-title.cjs.entry.js.map +1 -1
  87. package/dist/cjs/nylas-form-card.cjs.entry.js +3 -3
  88. package/dist/cjs/nylas-if-state.cjs.entry.js +2 -2
  89. package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +24 -11
  90. package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js.map +1 -1
  91. package/dist/cjs/nylas-list-configurations.cjs.entry.js +129 -0
  92. package/dist/cjs/nylas-list-configurations.cjs.entry.js.map +1 -0
  93. package/dist/cjs/nylas-list-folders.cjs.entry.js +3 -3
  94. package/dist/cjs/nylas-list-threads.cjs.entry.js +3 -3
  95. package/dist/cjs/nylas-locale-switch.cjs.entry.js +3 -3
  96. package/dist/cjs/nylas-location-component.cjs.entry.js +17 -6
  97. package/dist/cjs/nylas-location-component.cjs.entry.js.map +1 -1
  98. package/dist/cjs/nylas-login.cjs.entry.js +3 -3
  99. package/dist/cjs/nylas-logo.cjs.entry.js +1 -1
  100. package/dist/cjs/nylas-mailbox-pagination.cjs.entry.js +2 -2
  101. package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +3 -3
  102. package/dist/cjs/nylas-mailbox.cjs.entry.js +4 -4
  103. package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js +28 -13
  104. package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js.map +1 -1
  105. package/dist/cjs/nylas-notification.cjs.entry.js +2 -2
  106. package/dist/cjs/nylas-provider.cjs.entry.js +6 -6
  107. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +201 -75
  108. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
  109. package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
  110. package/dist/cjs/nylas-selected-event-card.cjs.entry.js +3 -3
  111. package/dist/cjs/nylas-summarize-message-button.cjs.entry.js +4 -4
  112. package/dist/cjs/nylas-threads-refresh.cjs.entry.js +4 -4
  113. package/dist/cjs/nylas-threads-search.cjs.entry.js +3 -3
  114. package/dist/cjs/nylas-time-window-picker.cjs.entry.js +2 -2
  115. package/dist/cjs/nylas-timeslot-picker.cjs.entry.js +2 -2
  116. package/dist/cjs/nylas-view-email.cjs.entry.js +2 -2
  117. package/dist/cjs/nylas-view-thread.cjs.entry.js +3 -3
  118. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  119. package/dist/cjs/people-icon.cjs.entry.js +1 -1
  120. package/dist/cjs/play-icon.cjs.entry.js +1 -1
  121. package/dist/cjs/play-icon_2.cjs.entry.js +2 -2
  122. package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
  123. package/dist/cjs/{register-component-d729f3f7.js → register-component-09ebdf31.js} +8 -2
  124. package/dist/cjs/register-component-09ebdf31.js.map +1 -0
  125. package/dist/cjs/{register-component-f1ebc65d.js → register-component-c8b6e907.js} +8 -2
  126. package/dist/cjs/register-component-c8b6e907.js.map +1 -0
  127. package/dist/cjs/reply-all-icon.cjs.entry.js +1 -1
  128. package/dist/cjs/reply-icon.cjs.entry.js +1 -1
  129. package/dist/cjs/scheduler-config-store-37690bf0.js +32 -0
  130. package/dist/cjs/scheduler-config-store-37690bf0.js.map +1 -0
  131. package/dist/cjs/scheduler-config-store-529c8d7e.js +32 -0
  132. package/dist/cjs/scheduler-config-store-529c8d7e.js.map +1 -0
  133. package/dist/cjs/{scheduler-store-7320f5d0.js → scheduler-store-0081970d.js} +16 -3
  134. package/dist/cjs/scheduler-store-0081970d.js.map +1 -0
  135. package/dist/cjs/{scheduler-store-4cb46b3c.js → scheduler-store-67dc1986.js} +16 -3
  136. package/dist/cjs/scheduler-store-67dc1986.js.map +1 -0
  137. package/dist/cjs/search-icon.cjs.entry.js +1 -1
  138. package/dist/cjs/select-dropdown.cjs.entry.js +2 -2
  139. package/dist/cjs/sent-icon.cjs.entry.js +1 -1
  140. package/dist/cjs/spam-icon.cjs.entry.js +1 -1
  141. package/dist/cjs/star-icon.cjs.entry.js +1 -1
  142. package/dist/cjs/stop-icon.cjs.entry.js +1 -1
  143. package/dist/cjs/time-period-selector.cjs.entry.js +2 -2
  144. package/dist/cjs/tooltip-component.cjs.entry.js +1 -1
  145. package/dist/cjs/translate-icon.cjs.entry.js +1 -1
  146. package/dist/cjs/trash-icon.cjs.entry.js +1 -1
  147. package/dist/cjs/underline-icon.cjs.entry.js +1 -1
  148. package/dist/cjs/{utils-53dd7574.js → utils-20663d54.js} +19 -1
  149. package/dist/cjs/utils-20663d54.js.map +1 -0
  150. package/dist/cjs/{utils-53298b01.js → utils-2c7f0895.js} +19 -1
  151. package/dist/cjs/{utils-53298b01.js.map → utils-2c7f0895.js.map} +1 -1
  152. package/dist/cjs/warning-icon.cjs.entry.js +1 -1
  153. package/dist/collection/collection-manifest.json +1 -0
  154. package/dist/collection/common/abstract-provider.js +7 -2
  155. package/dist/collection/common/abstract-provider.js.map +1 -1
  156. package/dist/collection/common/component-types.js.map +1 -1
  157. package/dist/collection/common/constants.js +9 -0
  158. package/dist/collection/common/constants.js.map +1 -1
  159. package/dist/collection/common/icons/add-circle.js +1 -1
  160. package/dist/collection/common/icons/archive.js +1 -1
  161. package/dist/collection/common/icons/arrow.js +1 -1
  162. package/dist/collection/common/icons/bold.js +1 -1
  163. package/dist/collection/common/icons/calendar-cancel.js +1 -1
  164. package/dist/collection/common/icons/calendar-check.js +1 -1
  165. package/dist/collection/common/icons/calendar-info.js +1 -1
  166. package/dist/collection/common/icons/calendar-patterns.js +1 -1
  167. package/dist/collection/common/icons/calendar.js +1 -1
  168. package/dist/collection/common/icons/checkmark-circle.js +1 -1
  169. package/dist/collection/common/icons/chevron.js +1 -1
  170. package/dist/collection/common/icons/close.js +1 -1
  171. package/dist/collection/common/icons/document-refresh.js +1 -1
  172. package/dist/collection/common/icons/flow.js +1 -1
  173. package/dist/collection/common/icons/folder.js +1 -1
  174. package/dist/collection/common/icons/forward.js +1 -1
  175. package/dist/collection/common/icons/globe.js +1 -1
  176. package/dist/collection/common/icons/google-logo.js +1 -1
  177. package/dist/collection/common/icons/inbox.js +1 -1
  178. package/dist/collection/common/icons/info.js +1 -1
  179. package/dist/collection/common/icons/italic.js +1 -1
  180. package/dist/collection/common/icons/loading.js +1 -1
  181. package/dist/collection/common/icons/location-off.js +1 -1
  182. package/dist/collection/common/icons/location.js +1 -1
  183. package/dist/collection/common/icons/microsoft-logo.js +1 -1
  184. package/dist/collection/common/icons/nylas-logo.js +1 -1
  185. package/dist/collection/common/icons/people.js +1 -1
  186. package/dist/collection/common/icons/play.js +1 -1
  187. package/dist/collection/common/icons/refresh.js +1 -1
  188. package/dist/collection/common/icons/reply-all.js +1 -1
  189. package/dist/collection/common/icons/reply.js +1 -1
  190. package/dist/collection/common/icons/search.js +1 -1
  191. package/dist/collection/common/icons/sent.js +1 -1
  192. package/dist/collection/common/icons/spam.js +1 -1
  193. package/dist/collection/common/icons/star.js +1 -1
  194. package/dist/collection/common/icons/stop.js +1 -1
  195. package/dist/collection/common/icons/translate.js +1 -1
  196. package/dist/collection/common/icons/trash.js +1 -1
  197. package/dist/collection/common/icons/underline.js +1 -1
  198. package/dist/collection/common/icons/warning.js +1 -1
  199. package/dist/collection/common/nylas-api-request.js +27 -7
  200. package/dist/collection/common/nylas-api-request.js.map +1 -1
  201. package/dist/collection/common/register-component.js +6 -0
  202. package/dist/collection/common/register-component.js.map +1 -1
  203. package/dist/collection/common/types.js.map +1 -1
  204. package/dist/collection/components/design-system/button-component/button-component.css +5 -0
  205. package/dist/collection/components/design-system/button-component/button-component.js +1 -1
  206. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +2 -2
  207. package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +2 -2
  208. package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
  209. package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
  210. package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +1 -1
  211. package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +1 -1
  212. package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +1 -1
  213. package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +1 -1
  214. package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +1 -1
  215. package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +2 -2
  216. package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +2 -2
  217. package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +1 -1
  218. package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +1 -1
  219. package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js +1 -1
  220. package/dist/collection/components/nylas-login/nylas-login.js +1 -1
  221. package/dist/collection/components/nylas-provider/nylas-provider.js +2 -2
  222. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
  223. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +1 -1
  224. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +1 -1
  225. package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
  226. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +1 -1
  227. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +55 -15
  228. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
  229. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +32 -5
  230. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
  231. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +23 -14
  232. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
  233. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +41 -9
  234. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js.map +1 -1
  235. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.css +48 -9
  236. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +167 -36
  237. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  238. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +4 -4
  239. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
  240. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.css +1 -1
  241. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +34 -2
  242. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
  243. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.css +1 -1
  244. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +35 -7
  245. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
  246. package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
  247. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
  248. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.css +8 -1
  249. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +83 -9
  250. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
  251. package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
  252. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +45 -9
  253. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
  254. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.css +142 -0
  255. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +330 -0
  256. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -0
  257. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.css +2 -2
  258. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js +37 -3
  259. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js.map +1 -1
  260. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +49 -11
  261. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
  262. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/LoginRequired.js +30 -0
  263. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/LoginRequired.js.map +1 -0
  264. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +23 -2
  265. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +108 -53
  266. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
  267. package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
  268. package/dist/collection/connector/nylas-scheduler-config-connector/index.js.map +1 -1
  269. package/dist/collection/connector/nylas-scheduler-connector/errors/index.js +8 -0
  270. package/dist/collection/connector/nylas-scheduler-connector/errors/index.js.map +1 -1
  271. package/dist/collection/connector/shared/api/scheduler-config.js +118 -30
  272. package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
  273. package/dist/collection/connector/shared/api/scheduler.js +6 -1
  274. package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
  275. package/dist/collection/index.js +0 -1
  276. package/dist/collection/index.js.map +1 -1
  277. package/dist/collection/stores/scheduler-config-store.js +15 -2
  278. package/dist/collection/stores/scheduler-config-store.js.map +1 -1
  279. package/dist/collection/utils/utils.js +16 -0
  280. package/dist/collection/utils/utils.js.map +1 -1
  281. package/dist/collection/utils/utils.spec.js +8 -1
  282. package/dist/collection/utils/utils.spec.js.map +1 -1
  283. package/dist/components/add-circle.js +1 -2
  284. package/dist/components/add-circle.js.map +1 -1
  285. package/dist/components/archive.js +1 -2
  286. package/dist/components/archive.js.map +1 -1
  287. package/dist/components/arrow.js +1 -2
  288. package/dist/components/arrow.js.map +1 -1
  289. package/dist/components/bold.js +1 -2
  290. package/dist/components/bold.js.map +1 -1
  291. package/dist/components/button-component2.js +2 -3
  292. package/dist/components/button-component2.js.map +1 -1
  293. package/dist/components/calendar-cancel.js +1 -2
  294. package/dist/components/calendar-cancel.js.map +1 -1
  295. package/dist/components/calendar-check.js +1 -2
  296. package/dist/components/calendar-check.js.map +1 -1
  297. package/dist/components/calendar-info.js +1 -2
  298. package/dist/components/calendar-info.js.map +1 -1
  299. package/dist/components/calendar-patterns.js +1 -2
  300. package/dist/components/calendar-patterns.js.map +1 -1
  301. package/dist/components/calendar.js +1 -2
  302. package/dist/components/calendar.js.map +1 -1
  303. package/dist/components/checkmark-circle.js +1 -2
  304. package/dist/components/checkmark-circle.js.map +1 -1
  305. package/dist/components/chevron.js +1 -2
  306. package/dist/components/chevron.js.map +1 -1
  307. package/dist/components/close.js +1 -2
  308. package/dist/components/close.js.map +1 -1
  309. package/dist/components/constants.js +11 -2
  310. package/dist/components/constants.js.map +1 -1
  311. package/dist/components/document-refresh-icon.js +1 -2
  312. package/dist/components/document-refresh-icon.js.map +1 -1
  313. package/dist/components/flow.js +1 -2
  314. package/dist/components/flow.js.map +1 -1
  315. package/dist/components/focus-visible.js +1 -1
  316. package/dist/components/folder.js +1 -2
  317. package/dist/components/folder.js.map +1 -1
  318. package/dist/components/forward.js +1 -2
  319. package/dist/components/forward.js.map +1 -1
  320. package/dist/components/globe.js +1 -2
  321. package/dist/components/globe.js.map +1 -1
  322. package/dist/components/google-logo.js +1 -2
  323. package/dist/components/google-logo.js.map +1 -1
  324. package/dist/components/inbox.js +1 -2
  325. package/dist/components/inbox.js.map +1 -1
  326. package/dist/components/index.es.js +8 -3
  327. package/dist/components/index.es.js.map +1 -1
  328. package/dist/components/info.js +1 -2
  329. package/dist/components/info.js.map +1 -1
  330. package/dist/components/italic.js +1 -2
  331. package/dist/components/italic.js.map +1 -1
  332. package/dist/components/loading.js +1 -2
  333. package/dist/components/loading.js.map +1 -1
  334. package/dist/components/location-off.js +1 -2
  335. package/dist/components/location-off.js.map +1 -1
  336. package/dist/components/location.js +1 -2
  337. package/dist/components/location.js.map +1 -1
  338. package/dist/components/mailbox-store.js +1 -1
  339. package/dist/components/microsoft-logo.js +1 -2
  340. package/dist/components/microsoft-logo.js.map +1 -1
  341. package/dist/components/multi-select-dropdown2.js +3 -4
  342. package/dist/components/multi-select-dropdown2.js.map +1 -1
  343. package/dist/components/nylas-additional-participants.js +2 -3
  344. package/dist/components/nylas-additional-participants.js.map +1 -1
  345. package/dist/components/nylas-api-request.js +28 -7
  346. package/dist/components/nylas-api-request.js.map +1 -1
  347. package/dist/components/nylas-availability-picker2.js +33 -15
  348. package/dist/components/nylas-availability-picker2.js.map +1 -1
  349. package/dist/components/nylas-booked-event-card2.js +1 -2
  350. package/dist/components/nylas-booked-event-card2.js.map +1 -1
  351. package/dist/components/nylas-booking-calendar-picker2.js +12 -6
  352. package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
  353. package/dist/components/nylas-booking-form2.js +1 -2
  354. package/dist/components/nylas-booking-form2.js.map +1 -1
  355. package/dist/components/nylas-buffer-time2.js +1 -2
  356. package/dist/components/nylas-buffer-time2.js.map +1 -1
  357. package/dist/components/nylas-calendar-picker2.js +13 -9
  358. package/dist/components/nylas-calendar-picker2.js.map +1 -1
  359. package/dist/components/nylas-cancel-booking-form2.js +2 -3
  360. package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
  361. package/dist/components/nylas-cancelled-event-card2.js +2 -3
  362. package/dist/components/nylas-cancelled-event-card2.js.map +1 -1
  363. package/dist/components/nylas-composer2.js +2 -3
  364. package/dist/components/nylas-composer2.js.map +1 -1
  365. package/dist/components/nylas-custom-booking-flow2.js +23 -13
  366. package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
  367. package/dist/components/nylas-date-picker2.js +1 -2
  368. package/dist/components/nylas-date-picker2.js.map +1 -1
  369. package/dist/components/nylas-editor-tabs2.js +91 -43
  370. package/dist/components/nylas-editor-tabs2.js.map +1 -1
  371. package/dist/components/nylas-event-description2.js +17 -7
  372. package/dist/components/nylas-event-description2.js.map +1 -1
  373. package/dist/components/nylas-event-duration2.js +16 -10
  374. package/dist/components/nylas-event-duration2.js.map +1 -1
  375. package/dist/components/nylas-event-info2.js +2 -3
  376. package/dist/components/nylas-event-info2.js.map +1 -1
  377. package/dist/components/nylas-event-limits2.js +2 -3
  378. package/dist/components/nylas-event-limits2.js.map +1 -1
  379. package/dist/components/nylas-event-title2.js +56 -14
  380. package/dist/components/nylas-event-title2.js.map +1 -1
  381. package/dist/components/nylas-form-card2.js +2 -3
  382. package/dist/components/nylas-form-card2.js.map +1 -1
  383. package/dist/components/nylas-if-state.js +1 -2
  384. package/dist/components/nylas-if-state.js.map +1 -1
  385. package/dist/components/nylas-limit-future-bookings2.js +25 -11
  386. package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
  387. package/dist/components/nylas-list-configurations.d.ts +11 -0
  388. package/dist/components/nylas-list-configurations.js +8 -0
  389. package/dist/components/nylas-list-configurations.js.map +1 -0
  390. package/dist/components/nylas-list-configurations2.js +159 -0
  391. package/dist/components/nylas-list-configurations2.js.map +1 -0
  392. package/dist/components/nylas-list-folders.js +2 -3
  393. package/dist/components/nylas-list-folders.js.map +1 -1
  394. package/dist/components/nylas-list-threads.js +2 -3
  395. package/dist/components/nylas-list-threads.js.map +1 -1
  396. package/dist/components/nylas-locale-switch2.js +0 -1
  397. package/dist/components/nylas-locale-switch2.js.map +1 -1
  398. package/dist/components/nylas-location-component2.js +18 -6
  399. package/dist/components/nylas-location-component2.js.map +1 -1
  400. package/dist/components/nylas-login.js +1 -2
  401. package/dist/components/nylas-login.js.map +1 -1
  402. package/dist/components/nylas-logo2.js +1 -2
  403. package/dist/components/nylas-logo2.js.map +1 -1
  404. package/dist/components/nylas-mailbox-pagination.js +1 -2
  405. package/dist/components/nylas-mailbox-pagination.js.map +1 -1
  406. package/dist/components/nylas-mailbox-toolbar-button.js +2 -3
  407. package/dist/components/nylas-mailbox-toolbar-button.js.map +1 -1
  408. package/dist/components/nylas-mailbox.js +2 -3
  409. package/dist/components/nylas-mailbox.js.map +1 -1
  410. package/dist/components/nylas-min-cancellation-notice2.js +29 -13
  411. package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
  412. package/dist/components/nylas-notification2.js +2 -3
  413. package/dist/components/nylas-notification2.js.map +1 -1
  414. package/dist/components/nylas-provider.js +2 -3
  415. package/dist/components/nylas-provider.js.map +1 -1
  416. package/dist/components/nylas-scheduler-editor.js +270 -136
  417. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  418. package/dist/components/nylas-scheduling.js +1 -2
  419. package/dist/components/nylas-scheduling.js.map +1 -1
  420. package/dist/components/nylas-selected-event-card2.js +1 -2
  421. package/dist/components/nylas-selected-event-card2.js.map +1 -1
  422. package/dist/components/nylas-summarize-message-button2.js +3 -4
  423. package/dist/components/nylas-summarize-message-button2.js.map +1 -1
  424. package/dist/components/nylas-threads-refresh.js +3 -4
  425. package/dist/components/nylas-threads-refresh.js.map +1 -1
  426. package/dist/components/nylas-threads-search.js +2 -3
  427. package/dist/components/nylas-threads-search.js.map +1 -1
  428. package/dist/components/nylas-time-window-picker2.js +2 -4
  429. package/dist/components/nylas-time-window-picker2.js.map +1 -1
  430. package/dist/components/nylas-timeslot-picker2.js +1 -2
  431. package/dist/components/nylas-timeslot-picker2.js.map +1 -1
  432. package/dist/components/nylas-view-email2.js +2 -4
  433. package/dist/components/nylas-view-email2.js.map +1 -1
  434. package/dist/components/nylas-view-thread.js +2 -3
  435. package/dist/components/nylas-view-thread.js.map +1 -1
  436. package/dist/components/people-icon.js +1 -2
  437. package/dist/components/people-icon.js.map +1 -1
  438. package/dist/components/play.js +1 -2
  439. package/dist/components/play.js.map +1 -1
  440. package/dist/components/refresh.js +1 -2
  441. package/dist/components/refresh.js.map +1 -1
  442. package/dist/components/register-component.js +7 -1
  443. package/dist/components/register-component.js.map +1 -1
  444. package/dist/components/reply-all.js +1 -2
  445. package/dist/components/reply-all.js.map +1 -1
  446. package/dist/components/reply.js +1 -2
  447. package/dist/components/reply.js.map +1 -1
  448. package/dist/components/scheduler-config-store.js +15 -2
  449. package/dist/components/scheduler-config-store.js.map +1 -1
  450. package/dist/components/scheduler-store.js +15 -2
  451. package/dist/components/scheduler-store.js.map +1 -1
  452. package/dist/components/search.js +1 -2
  453. package/dist/components/search.js.map +1 -1
  454. package/dist/components/select-dropdown2.js +2 -3
  455. package/dist/components/select-dropdown2.js.map +1 -1
  456. package/dist/components/sent.js +1 -2
  457. package/dist/components/sent.js.map +1 -1
  458. package/dist/components/spam.js +1 -2
  459. package/dist/components/spam.js.map +1 -1
  460. package/dist/components/star.js +1 -2
  461. package/dist/components/star.js.map +1 -1
  462. package/dist/components/stop.js +1 -2
  463. package/dist/components/stop.js.map +1 -1
  464. package/dist/components/time-period-selector2.js +2 -3
  465. package/dist/components/time-period-selector2.js.map +1 -1
  466. package/dist/components/toolitp-component.js +1 -2
  467. package/dist/components/toolitp-component.js.map +1 -1
  468. package/dist/components/translate.js +1 -2
  469. package/dist/components/translate.js.map +1 -1
  470. package/dist/components/trash.js +1 -2
  471. package/dist/components/trash.js.map +1 -1
  472. package/dist/components/underline.js +1 -2
  473. package/dist/components/underline.js.map +1 -1
  474. package/dist/components/utils.js +49 -2
  475. package/dist/components/utils.js.map +1 -1
  476. package/dist/components/warning.js +1 -2
  477. package/dist/components/warning.js.map +1 -1
  478. package/dist/esm/add-circle-icon.entry.js +1 -1
  479. package/dist/esm/add-circle-icon_22.entry.js +224 -94
  480. package/dist/esm/add-circle-icon_22.entry.js.map +1 -1
  481. package/dist/esm/archive-icon.entry.js +1 -1
  482. package/dist/esm/archive-icon_7.entry.js +7 -7
  483. package/dist/esm/arrow-icon.entry.js +1 -1
  484. package/dist/esm/bold-icon.entry.js +1 -1
  485. package/dist/esm/bold-icon_3.entry.js +3 -3
  486. package/dist/esm/button-component.entry.js +2 -2
  487. package/dist/esm/button-component.entry.js.map +1 -1
  488. package/dist/esm/calendar-cancel-icon.entry.js +1 -1
  489. package/dist/esm/calendar-check-icon.entry.js +1 -1
  490. package/dist/esm/calendar-check-icon_2.entry.js +2 -2
  491. package/dist/esm/calendar-icon.entry.js +1 -1
  492. package/dist/esm/calendar-info-icon.entry.js +1 -1
  493. package/dist/esm/calendar-patterns-icon.entry.js +1 -1
  494. package/dist/esm/checkmark-circle-icon.entry.js +1 -1
  495. package/dist/esm/chevron-icon.entry.js +1 -1
  496. package/dist/esm/chevron-icon_3.entry.js +4 -4
  497. package/dist/esm/close-icon.entry.js +1 -1
  498. package/dist/esm/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
  499. package/dist/esm/{constants-335dffcf.js.map → constants-bf39e913.js.map} +1 -1
  500. package/dist/esm/{constants-6ee60d6d.js → constants-f34b9c6e.js} +11 -2
  501. package/dist/esm/{constants-6ee60d6d.js.map → constants-f34b9c6e.js.map} +1 -1
  502. package/dist/esm/document-refresh-icon.entry.js +1 -1
  503. package/dist/esm/flow-icon.entry.js +1 -1
  504. package/dist/esm/folder-icon.entry.js +1 -1
  505. package/dist/esm/forward-icon.entry.js +1 -1
  506. package/dist/esm/forward-icon_6.entry.js +9 -9
  507. package/dist/esm/globe-icon.entry.js +1 -1
  508. package/dist/esm/google-logo-icon.entry.js +1 -1
  509. package/dist/esm/google-logo-icon_4.entry.js +460 -0
  510. package/dist/esm/google-logo-icon_4.entry.js.map +1 -0
  511. package/dist/esm/inbox-icon.entry.js +1 -1
  512. package/dist/esm/index-7cb0dd3d.js +1 -158
  513. package/dist/esm/index-8362ce5c.js +1 -358
  514. package/dist/{nylas-web-elements/index.es-bd511719.js → esm/index.es-2842f8c8.js} +9 -4
  515. package/dist/esm/index.es-2842f8c8.js.map +1 -0
  516. package/dist/esm/{index.es-2578c6a5.js → index.es-f57e612a.js} +9 -4
  517. package/dist/esm/index.es-f57e612a.js.map +1 -0
  518. package/dist/esm/index.js +3 -1
  519. package/dist/esm/index.js.map +1 -1
  520. package/dist/esm/info-icon.entry.js +1 -1
  521. package/dist/esm/info-icon_2.entry.js +2 -2
  522. package/dist/esm/italic-icon.entry.js +1 -1
  523. package/dist/esm/loader.js +1 -1
  524. package/dist/esm/loading-icon.entry.js +1 -1
  525. package/dist/esm/location-icon.entry.js +1 -1
  526. package/dist/esm/location-off-icon.entry.js +1 -1
  527. package/dist/esm/{mailbox-store-bb21512c.js → mailbox-store-47fc8a1a.js} +3 -3
  528. package/dist/esm/{mailbox-store-150cc456.js.map → mailbox-store-47fc8a1a.js.map} +1 -1
  529. package/dist/esm/{mailbox-store-150cc456.js → mailbox-store-d48269de.js} +3 -3
  530. package/dist/{nylas-web-elements/mailbox-store-150cc456.js.map → esm/mailbox-store-d48269de.js.map} +1 -1
  531. package/dist/esm/microsoft-logo-icon.entry.js +1 -1
  532. package/dist/esm/multi-select-dropdown.entry.js +3 -3
  533. package/dist/esm/nylas-additional-participants.entry.js +3 -3
  534. package/dist/esm/nylas-api-request-8932547a.js +56 -0
  535. package/dist/esm/nylas-api-request-8932547a.js.map +1 -0
  536. package/dist/esm/nylas-api-request-b085294d.js +58 -0
  537. package/dist/esm/nylas-api-request-b085294d.js.map +1 -0
  538. package/dist/esm/nylas-availability-picker.entry.js +33 -16
  539. package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
  540. package/dist/esm/nylas-booked-event-card.entry.js +3 -3
  541. package/dist/esm/nylas-booked-event-card_10.entry.js +7 -7
  542. package/dist/esm/nylas-booking-calendar-picker.entry.js +12 -6
  543. package/dist/esm/nylas-booking-calendar-picker.entry.js.map +1 -1
  544. package/dist/esm/nylas-booking-form.entry.js +2 -2
  545. package/dist/esm/nylas-buffer-time.entry.js +2 -2
  546. package/dist/esm/nylas-calendar-picker.entry.js +13 -8
  547. package/dist/esm/nylas-calendar-picker.entry.js.map +1 -1
  548. package/dist/esm/nylas-cancel-booking-form.entry.js +3 -3
  549. package/dist/esm/nylas-cancelled-event-card.entry.js +3 -3
  550. package/dist/esm/nylas-composer.entry.js +2 -2
  551. package/dist/esm/nylas-custom-booking-flow.entry.js +21 -12
  552. package/dist/esm/nylas-custom-booking-flow.entry.js.map +1 -1
  553. package/dist/esm/nylas-date-picker.entry.js +2 -2
  554. package/dist/esm/nylas-editor-tabs.entry.js +86 -40
  555. package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
  556. package/dist/esm/nylas-event-description.entry.js +15 -6
  557. package/dist/esm/nylas-event-description.entry.js.map +1 -1
  558. package/dist/esm/nylas-event-duration.entry.js +15 -10
  559. package/dist/esm/nylas-event-duration.entry.js.map +1 -1
  560. package/dist/esm/nylas-event-info.entry.js +3 -3
  561. package/dist/esm/nylas-event-limits.entry.js +3 -3
  562. package/dist/esm/nylas-event-title.entry.js +52 -12
  563. package/dist/esm/nylas-event-title.entry.js.map +1 -1
  564. package/dist/esm/nylas-form-card.entry.js +3 -3
  565. package/dist/esm/nylas-if-state.entry.js +2 -2
  566. package/dist/esm/nylas-limit-future-bookings.entry.js +24 -11
  567. package/dist/esm/nylas-limit-future-bookings.entry.js.map +1 -1
  568. package/dist/esm/nylas-list-configurations.entry.js +125 -0
  569. package/dist/esm/nylas-list-configurations.entry.js.map +1 -0
  570. package/dist/esm/nylas-list-folders.entry.js +3 -3
  571. package/dist/esm/nylas-list-threads.entry.js +3 -3
  572. package/dist/esm/nylas-locale-switch.entry.js +3 -3
  573. package/dist/esm/nylas-location-component.entry.js +17 -6
  574. package/dist/esm/nylas-location-component.entry.js.map +1 -1
  575. package/dist/esm/nylas-login.entry.js +3 -3
  576. package/dist/esm/nylas-logo.entry.js +1 -1
  577. package/dist/esm/nylas-mailbox-pagination.entry.js +2 -2
  578. package/dist/esm/nylas-mailbox-toolbar-button.entry.js +3 -3
  579. package/dist/esm/nylas-mailbox.entry.js +4 -4
  580. package/dist/esm/nylas-min-cancellation-notice.entry.js +28 -13
  581. package/dist/esm/nylas-min-cancellation-notice.entry.js.map +1 -1
  582. package/dist/esm/nylas-notification.entry.js +2 -2
  583. package/dist/esm/nylas-provider.entry.js +6 -6
  584. package/dist/esm/nylas-scheduler-editor.entry.js +202 -76
  585. package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
  586. package/dist/esm/nylas-scheduling.entry.js +3 -3
  587. package/dist/esm/nylas-selected-event-card.entry.js +3 -3
  588. package/dist/esm/nylas-summarize-message-button.entry.js +4 -4
  589. package/dist/esm/nylas-threads-refresh.entry.js +4 -4
  590. package/dist/esm/nylas-threads-search.entry.js +3 -3
  591. package/dist/esm/nylas-time-window-picker.entry.js +2 -2
  592. package/dist/esm/nylas-timeslot-picker.entry.js +2 -2
  593. package/dist/esm/nylas-view-email.entry.js +2 -2
  594. package/dist/esm/nylas-view-thread.entry.js +3 -3
  595. package/dist/esm/nylas-web-elements.js +1 -1
  596. package/dist/esm/people-icon.entry.js +1 -1
  597. package/dist/esm/play-icon.entry.js +1 -1
  598. package/dist/esm/play-icon_2.entry.js +2 -2
  599. package/dist/esm/refresh-icon.entry.js +1 -1
  600. package/dist/esm/{register-component-dc659dc3.js → register-component-cf5c8420.js} +8 -2
  601. package/dist/esm/register-component-cf5c8420.js.map +1 -0
  602. package/dist/{nylas-web-elements/register-component-0645dce0.js → esm/register-component-e5afe237.js} +8 -2
  603. package/dist/esm/register-component-e5afe237.js.map +1 -0
  604. package/dist/esm/reply-all-icon.entry.js +1 -1
  605. package/dist/esm/reply-icon.entry.js +1 -1
  606. package/dist/esm/scheduler-config-store-07d98279.js +30 -0
  607. package/dist/esm/scheduler-config-store-07d98279.js.map +1 -0
  608. package/dist/esm/scheduler-config-store-8f2e658e.js +30 -0
  609. package/dist/esm/scheduler-config-store-8f2e658e.js.map +1 -0
  610. package/dist/{nylas-web-elements/scheduler-store-4d0a4f8a.js → esm/scheduler-store-66c2168c.js} +16 -3
  611. package/dist/esm/scheduler-store-66c2168c.js.map +1 -0
  612. package/dist/esm/{scheduler-store-72116723.js → scheduler-store-a175fc3e.js} +16 -3
  613. package/dist/esm/scheduler-store-a175fc3e.js.map +1 -0
  614. package/dist/esm/search-icon.entry.js +1 -1
  615. package/dist/esm/select-dropdown.entry.js +2 -2
  616. package/dist/esm/sent-icon.entry.js +1 -1
  617. package/dist/esm/spam-icon.entry.js +1 -1
  618. package/dist/esm/star-icon.entry.js +1 -1
  619. package/dist/esm/stop-icon.entry.js +1 -1
  620. package/dist/esm/time-period-selector.entry.js +2 -2
  621. package/dist/esm/tooltip-component.entry.js +1 -1
  622. package/dist/esm/translate-icon.entry.js +1 -1
  623. package/dist/esm/trash-icon.entry.js +1 -1
  624. package/dist/esm/underline-icon.entry.js +1 -1
  625. package/dist/esm/{utils-3a8d433a.js → utils-73d8a928.js} +18 -2
  626. package/dist/{nylas-web-elements/utils-3a8d433a.js.map → esm/utils-73d8a928.js.map} +1 -1
  627. package/dist/esm/{utils-c00bdc3c.js → utils-d6204242.js} +18 -2
  628. package/dist/esm/utils-d6204242.js.map +1 -0
  629. package/dist/esm/warning-icon.entry.js +1 -1
  630. package/dist/nylas-web-elements/add-circle-icon.entry.js +1 -1
  631. package/dist/nylas-web-elements/archive-icon.entry.js +1 -1
  632. package/dist/nylas-web-elements/arrow-icon.entry.js +1 -1
  633. package/dist/nylas-web-elements/bold-icon.entry.js +1 -1
  634. package/dist/nylas-web-elements/button-component.entry.js +2 -2
  635. package/dist/nylas-web-elements/button-component.entry.js.map +1 -1
  636. package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +1 -1
  637. package/dist/nylas-web-elements/calendar-check-icon.entry.js +1 -1
  638. package/dist/nylas-web-elements/calendar-icon.entry.js +1 -1
  639. package/dist/nylas-web-elements/calendar-info-icon.entry.js +1 -1
  640. package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +1 -1
  641. package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +1 -1
  642. package/dist/nylas-web-elements/chevron-icon.entry.js +1 -1
  643. package/dist/nylas-web-elements/close-icon.entry.js +1 -1
  644. package/dist/nylas-web-elements/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
  645. package/dist/nylas-web-elements/{constants-335dffcf.js.map → constants-bf39e913.js.map} +1 -1
  646. package/dist/nylas-web-elements/document-refresh-icon.entry.js +1 -1
  647. package/dist/nylas-web-elements/flow-icon.entry.js +1 -1
  648. package/dist/nylas-web-elements/folder-icon.entry.js +1 -1
  649. package/dist/nylas-web-elements/forward-icon.entry.js +1 -1
  650. package/dist/nylas-web-elements/globe-icon.entry.js +1 -1
  651. package/dist/nylas-web-elements/google-logo-icon.entry.js +1 -1
  652. package/dist/nylas-web-elements/inbox-icon.entry.js +1 -1
  653. package/dist/{esm/index.es-bd511719.js → nylas-web-elements/index.es-2842f8c8.js} +9 -4
  654. package/dist/nylas-web-elements/index.es-2842f8c8.js.map +1 -0
  655. package/dist/nylas-web-elements/index.esm.js +3 -1
  656. package/dist/nylas-web-elements/index.esm.js.map +1 -1
  657. package/dist/nylas-web-elements/info-icon.entry.js +1 -1
  658. package/dist/nylas-web-elements/italic-icon.entry.js +1 -1
  659. package/dist/nylas-web-elements/loading-icon.entry.js +1 -1
  660. package/dist/nylas-web-elements/location-icon.entry.js +1 -1
  661. package/dist/nylas-web-elements/location-off-icon.entry.js +1 -1
  662. package/dist/nylas-web-elements/{mailbox-store-150cc456.js → mailbox-store-d48269de.js} +3 -3
  663. package/dist/{esm/mailbox-store-bb21512c.js.map → nylas-web-elements/mailbox-store-d48269de.js.map} +1 -1
  664. package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +1 -1
  665. package/dist/nylas-web-elements/multi-select-dropdown.entry.js +3 -3
  666. package/dist/nylas-web-elements/nylas-additional-participants.entry.js +3 -3
  667. package/dist/nylas-web-elements/nylas-api-request-b085294d.js +58 -0
  668. package/dist/nylas-web-elements/nylas-api-request-b085294d.js.map +1 -0
  669. package/dist/nylas-web-elements/nylas-availability-picker.entry.js +33 -16
  670. package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
  671. package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +3 -3
  672. package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +12 -6
  673. package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js.map +1 -1
  674. package/dist/nylas-web-elements/nylas-booking-form.entry.js +2 -2
  675. package/dist/nylas-web-elements/nylas-buffer-time.entry.js +2 -2
  676. package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +13 -8
  677. package/dist/nylas-web-elements/nylas-calendar-picker.entry.js.map +1 -1
  678. package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +3 -3
  679. package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +3 -3
  680. package/dist/nylas-web-elements/nylas-composer.entry.js +2 -2
  681. package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +21 -12
  682. package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js.map +1 -1
  683. package/dist/nylas-web-elements/nylas-date-picker.entry.js +2 -2
  684. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +86 -40
  685. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
  686. package/dist/nylas-web-elements/nylas-event-description.entry.js +15 -6
  687. package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
  688. package/dist/nylas-web-elements/nylas-event-duration.entry.js +15 -10
  689. package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
  690. package/dist/nylas-web-elements/nylas-event-info.entry.js +3 -3
  691. package/dist/nylas-web-elements/nylas-event-limits.entry.js +3 -3
  692. package/dist/nylas-web-elements/nylas-event-title.entry.js +52 -12
  693. package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
  694. package/dist/nylas-web-elements/nylas-form-card.entry.js +3 -3
  695. package/dist/nylas-web-elements/nylas-if-state.entry.js +2 -2
  696. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +24 -11
  697. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js.map +1 -1
  698. package/dist/nylas-web-elements/nylas-list-configurations.entry.js +125 -0
  699. package/dist/nylas-web-elements/nylas-list-configurations.entry.js.map +1 -0
  700. package/dist/nylas-web-elements/nylas-list-folders.entry.js +3 -3
  701. package/dist/nylas-web-elements/nylas-list-threads.entry.js +3 -3
  702. package/dist/nylas-web-elements/nylas-locale-switch.entry.js +3 -3
  703. package/dist/nylas-web-elements/nylas-location-component.entry.js +17 -6
  704. package/dist/nylas-web-elements/nylas-location-component.entry.js.map +1 -1
  705. package/dist/nylas-web-elements/nylas-login.entry.js +3 -3
  706. package/dist/nylas-web-elements/nylas-logo.entry.js +1 -1
  707. package/dist/nylas-web-elements/nylas-mailbox-pagination.entry.js +2 -2
  708. package/dist/nylas-web-elements/nylas-mailbox-toolbar-button.entry.js +3 -3
  709. package/dist/nylas-web-elements/nylas-mailbox.entry.js +4 -4
  710. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +28 -13
  711. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js.map +1 -1
  712. package/dist/nylas-web-elements/nylas-notification.entry.js +2 -2
  713. package/dist/nylas-web-elements/nylas-provider.entry.js +6 -6
  714. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +202 -76
  715. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
  716. package/dist/nylas-web-elements/nylas-scheduling.entry.js +3 -3
  717. package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +3 -3
  718. package/dist/nylas-web-elements/nylas-summarize-message-button.entry.js +4 -4
  719. package/dist/nylas-web-elements/nylas-threads-refresh.entry.js +4 -4
  720. package/dist/nylas-web-elements/nylas-threads-search.entry.js +3 -3
  721. package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +2 -2
  722. package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +2 -2
  723. package/dist/nylas-web-elements/nylas-view-email.entry.js +2 -2
  724. package/dist/nylas-web-elements/nylas-view-thread.entry.js +3 -3
  725. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  726. package/dist/nylas-web-elements/p-00a9efc1.entry.js +2 -0
  727. package/dist/nylas-web-elements/p-1a91cce5.entry.js +2 -0
  728. package/dist/nylas-web-elements/p-1a91cce5.entry.js.map +1 -0
  729. package/dist/nylas-web-elements/{p-3631e6e5.entry.js → p-1d25ca06.entry.js} +2 -2
  730. package/dist/nylas-web-elements/p-1e445e86.entry.js +2 -0
  731. package/dist/nylas-web-elements/{p-395f49eb.entry.js → p-2081b475.entry.js} +2 -2
  732. package/dist/nylas-web-elements/p-22e5436c.js +2 -0
  733. package/dist/nylas-web-elements/p-22e5436c.js.map +1 -0
  734. package/dist/nylas-web-elements/p-2b636359.entry.js +2 -0
  735. package/dist/nylas-web-elements/p-2b636359.entry.js.map +1 -0
  736. package/dist/nylas-web-elements/{p-4ee6f11e.entry.js → p-30784693.entry.js} +2 -2
  737. package/dist/nylas-web-elements/{p-40ed7eab.entry.js → p-33b940fb.entry.js} +2 -2
  738. package/dist/nylas-web-elements/p-343a02e1.entry.js +2 -0
  739. package/dist/nylas-web-elements/{p-4d9fceeb.entry.js → p-343b8684.entry.js} +2 -2
  740. package/dist/nylas-web-elements/p-3909ec3f.entry.js +2 -0
  741. package/dist/nylas-web-elements/{p-d85eecf4.entry.js.map → p-3909ec3f.entry.js.map} +1 -1
  742. package/dist/nylas-web-elements/{p-409d4410.entry.js → p-3b281401.entry.js} +2 -2
  743. package/dist/nylas-web-elements/{p-901f9612.js → p-41dc0d93.js} +2 -2
  744. package/dist/nylas-web-elements/p-41dc0d93.js.map +1 -0
  745. package/dist/nylas-web-elements/{p-5a3809a7.entry.js → p-42791515.entry.js} +2 -2
  746. package/dist/nylas-web-elements/p-44a9ce77.entry.js +2 -0
  747. package/dist/nylas-web-elements/{p-1819b3d7.js → p-49f716ed.js} +4 -4
  748. package/dist/nylas-web-elements/p-49f716ed.js.map +1 -0
  749. package/dist/nylas-web-elements/{p-b2208193.entry.js → p-50b4a80f.entry.js} +2 -2
  750. package/dist/nylas-web-elements/{p-42a4c2fd.entry.js → p-571472d4.entry.js} +2 -2
  751. package/dist/nylas-web-elements/{p-2523c292.entry.js → p-607b547b.entry.js} +2 -2
  752. package/dist/nylas-web-elements/{p-006ab406.entry.js → p-6110351b.entry.js} +2 -2
  753. package/dist/nylas-web-elements/{p-65062d50.entry.js → p-665ef10b.entry.js} +4 -4
  754. package/dist/nylas-web-elements/p-665ef10b.entry.js.map +1 -0
  755. package/dist/nylas-web-elements/{p-deafc6bc.entry.js → p-694b511a.entry.js} +2 -2
  756. package/dist/nylas-web-elements/{p-64364434.entry.js → p-73c062f8.entry.js} +2 -2
  757. package/dist/nylas-web-elements/p-75a8d077.entry.js +2 -0
  758. package/dist/nylas-web-elements/{p-41c1654e.entry.js.map → p-75a8d077.entry.js.map} +1 -1
  759. package/dist/nylas-web-elements/p-7c55dfa0.entry.js +2 -0
  760. package/dist/nylas-web-elements/{p-ba3d383f.entry.js.map → p-7c55dfa0.entry.js.map} +1 -1
  761. package/dist/nylas-web-elements/{p-3da66838.entry.js → p-80d6175c.entry.js} +2 -2
  762. package/dist/nylas-web-elements/p-939db546.entry.js +2 -0
  763. package/dist/nylas-web-elements/{p-a1e27dc5.entry.js → p-95a3094a.entry.js} +2 -2
  764. package/dist/nylas-web-elements/p-9ea458c3.js +2 -0
  765. package/dist/nylas-web-elements/p-9ea458c3.js.map +1 -0
  766. package/dist/nylas-web-elements/p-a628eaeb.js +2 -0
  767. package/dist/nylas-web-elements/p-a628eaeb.js.map +1 -0
  768. package/dist/nylas-web-elements/p-ad64c2b8.entry.js +2 -0
  769. package/dist/nylas-web-elements/{p-baa620b4.entry.js → p-b25821e1.entry.js} +2 -2
  770. package/dist/nylas-web-elements/{p-374527e6.entry.js → p-b53062f7.entry.js} +2 -2
  771. package/dist/nylas-web-elements/p-bbf9aff2.entry.js +2 -0
  772. package/dist/nylas-web-elements/p-c20ab972.entry.js +2 -0
  773. package/dist/nylas-web-elements/{p-7b1bb792.entry.js → p-cc674b3b.entry.js} +3 -3
  774. package/dist/nylas-web-elements/p-d8f09631.entry.js +2 -0
  775. package/dist/nylas-web-elements/p-db15d382.js +2 -0
  776. package/dist/nylas-web-elements/p-db15d382.js.map +1 -0
  777. package/dist/nylas-web-elements/{p-9dac153b.entry.js → p-df6d54c7.entry.js} +2 -2
  778. package/dist/nylas-web-elements/{p-d224c7af.entry.js → p-e03b2592.entry.js} +2 -2
  779. package/dist/nylas-web-elements/{p-9f168ff0.js → p-e22aa0b0.js} +2 -2
  780. package/dist/nylas-web-elements/{p-408dda49.js → p-eaa9151b.js} +2 -2
  781. package/dist/nylas-web-elements/p-eaa9151b.js.map +1 -0
  782. package/dist/nylas-web-elements/{p-ad9c3cab.entry.js → p-f154a362.entry.js} +2 -2
  783. package/dist/nylas-web-elements/{p-ae01e1cb.entry.js → p-f1f8f745.entry.js} +2 -2
  784. package/dist/nylas-web-elements/people-icon.entry.js +1 -1
  785. package/dist/nylas-web-elements/play-icon.entry.js +1 -1
  786. package/dist/nylas-web-elements/refresh-icon.entry.js +1 -1
  787. package/dist/{esm/register-component-0645dce0.js → nylas-web-elements/register-component-e5afe237.js} +8 -2
  788. package/dist/nylas-web-elements/register-component-e5afe237.js.map +1 -0
  789. package/dist/nylas-web-elements/reply-all-icon.entry.js +1 -1
  790. package/dist/nylas-web-elements/reply-icon.entry.js +1 -1
  791. package/dist/nylas-web-elements/scheduler-config-store-8f2e658e.js +30 -0
  792. package/dist/nylas-web-elements/scheduler-config-store-8f2e658e.js.map +1 -0
  793. package/dist/{esm/scheduler-store-4d0a4f8a.js → nylas-web-elements/scheduler-store-66c2168c.js} +16 -3
  794. package/dist/nylas-web-elements/scheduler-store-66c2168c.js.map +1 -0
  795. package/dist/nylas-web-elements/search-icon.entry.js +1 -1
  796. package/dist/nylas-web-elements/select-dropdown.entry.js +2 -2
  797. package/dist/nylas-web-elements/sent-icon.entry.js +1 -1
  798. package/dist/nylas-web-elements/spam-icon.entry.js +1 -1
  799. package/dist/nylas-web-elements/star-icon.entry.js +1 -1
  800. package/dist/nylas-web-elements/stop-icon.entry.js +1 -1
  801. package/dist/nylas-web-elements/time-period-selector.entry.js +2 -2
  802. package/dist/nylas-web-elements/tooltip-component.entry.js +1 -1
  803. package/dist/nylas-web-elements/translate-icon.entry.js +1 -1
  804. package/dist/nylas-web-elements/trash-icon.entry.js +1 -1
  805. package/dist/nylas-web-elements/underline-icon.entry.js +1 -1
  806. package/dist/nylas-web-elements/{utils-3a8d433a.js → utils-73d8a928.js} +18 -2
  807. package/dist/{esm/utils-3a8d433a.js.map → nylas-web-elements/utils-73d8a928.js.map} +1 -1
  808. package/dist/nylas-web-elements/warning-icon.entry.js +1 -1
  809. package/dist/types/common/component-types.d.ts +3 -1
  810. package/dist/types/common/constants.d.ts +2 -0
  811. package/dist/types/common/nylas-api-request.d.ts +6 -2
  812. package/dist/types/common/register-component.d.ts +1 -0
  813. package/dist/types/common/types.d.ts +3 -1
  814. package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +10 -4
  815. package/dist/types/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.d.ts +2 -0
  816. package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +3 -2
  817. package/dist/types/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.d.ts +4 -1
  818. package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +41 -7
  819. package/dist/types/components/scheduler-editor/nylas-event-description/nylas-event-description.d.ts +3 -0
  820. package/dist/types/components/scheduler-editor/nylas-event-duration/nylas-event-duration.d.ts +3 -0
  821. package/dist/types/components/scheduler-editor/nylas-event-title/nylas-event-title.d.ts +6 -1
  822. package/dist/types/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.d.ts +6 -6
  823. package/dist/types/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.d.ts +27 -0
  824. package/dist/types/components/scheduler-editor/nylas-location-component/nylas-location-component.d.ts +3 -0
  825. package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +4 -1
  826. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/LoginRequired.d.ts +4 -0
  827. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +9 -4
  828. package/dist/types/components.d.ts +229 -18
  829. package/dist/types/connector/nylas-connector/index.d.ts +1 -1
  830. package/dist/types/connector/nylas-scheduler-config-connector/index.d.ts +3 -3
  831. package/dist/types/connector/nylas-scheduler-connector/errors/index.d.ts +1 -0
  832. package/dist/types/connector/shared/api/scheduler-config.d.ts +45 -8
  833. package/dist/types/index.d.ts +1 -1
  834. package/dist/types/stores/scheduler-config-store.d.ts +8 -2
  835. package/dist/types/utils/utils.d.ts +4 -1
  836. package/package.json +4 -3
  837. package/dist/cjs/google-logo-icon_3.cjs.entry.js +0 -302
  838. package/dist/cjs/google-logo-icon_3.cjs.entry.js.map +0 -1
  839. package/dist/cjs/index.es-447c5aca.js.map +0 -1
  840. package/dist/cjs/index.es-68425511.js.map +0 -1
  841. package/dist/cjs/nylas-api-request-8ec3a89c.js +0 -39
  842. package/dist/cjs/nylas-api-request-8ec3a89c.js.map +0 -1
  843. package/dist/cjs/nylas-api-request-ab24150d.js +0 -37
  844. package/dist/cjs/nylas-api-request-ab24150d.js.map +0 -1
  845. package/dist/cjs/register-component-d729f3f7.js.map +0 -1
  846. package/dist/cjs/register-component-f1ebc65d.js.map +0 -1
  847. package/dist/cjs/scheduler-config-store-31b83ad3.js +0 -19
  848. package/dist/cjs/scheduler-config-store-31b83ad3.js.map +0 -1
  849. package/dist/cjs/scheduler-config-store-9c2cc421.js +0 -19
  850. package/dist/cjs/scheduler-config-store-9c2cc421.js.map +0 -1
  851. package/dist/cjs/scheduler-store-4cb46b3c.js.map +0 -1
  852. package/dist/cjs/scheduler-store-7320f5d0.js.map +0 -1
  853. package/dist/cjs/utils-53dd7574.js.map +0 -1
  854. package/dist/components/_commonjsHelpers.js +0 -36
  855. package/dist/components/_commonjsHelpers.js.map +0 -1
  856. package/dist/esm/google-logo-icon_3.entry.js +0 -296
  857. package/dist/esm/google-logo-icon_3.entry.js.map +0 -1
  858. package/dist/esm/index.es-2578c6a5.js.map +0 -1
  859. package/dist/esm/index.es-bd511719.js.map +0 -1
  860. package/dist/esm/nylas-api-request-55446aba.js +0 -37
  861. package/dist/esm/nylas-api-request-55446aba.js.map +0 -1
  862. package/dist/esm/nylas-api-request-c97a0153.js +0 -35
  863. package/dist/esm/nylas-api-request-c97a0153.js.map +0 -1
  864. package/dist/esm/register-component-0645dce0.js.map +0 -1
  865. package/dist/esm/register-component-dc659dc3.js.map +0 -1
  866. package/dist/esm/scheduler-config-store-51ee4f42.js +0 -17
  867. package/dist/esm/scheduler-config-store-51ee4f42.js.map +0 -1
  868. package/dist/esm/scheduler-config-store-bc59545b.js +0 -17
  869. package/dist/esm/scheduler-config-store-bc59545b.js.map +0 -1
  870. package/dist/esm/scheduler-store-4d0a4f8a.js.map +0 -1
  871. package/dist/esm/scheduler-store-72116723.js.map +0 -1
  872. package/dist/esm/utils-c00bdc3c.js.map +0 -1
  873. package/dist/nylas-web-elements/index.es-bd511719.js.map +0 -1
  874. package/dist/nylas-web-elements/nylas-api-request-55446aba.js +0 -37
  875. package/dist/nylas-web-elements/nylas-api-request-55446aba.js.map +0 -1
  876. package/dist/nylas-web-elements/p-01bf65c2.entry.js +0 -2
  877. package/dist/nylas-web-elements/p-1819b3d7.js.map +0 -1
  878. package/dist/nylas-web-elements/p-2c5d5953.entry.js +0 -2
  879. package/dist/nylas-web-elements/p-39b280e2.entry.js +0 -2
  880. package/dist/nylas-web-elements/p-39b280e2.entry.js.map +0 -1
  881. package/dist/nylas-web-elements/p-408dda49.js.map +0 -1
  882. package/dist/nylas-web-elements/p-41c1654e.entry.js +0 -2
  883. package/dist/nylas-web-elements/p-65062d50.entry.js.map +0 -1
  884. package/dist/nylas-web-elements/p-65fdfb60.js +0 -2
  885. package/dist/nylas-web-elements/p-65fdfb60.js.map +0 -1
  886. package/dist/nylas-web-elements/p-901f9612.js.map +0 -1
  887. package/dist/nylas-web-elements/p-a0c2ce03.entry.js +0 -2
  888. package/dist/nylas-web-elements/p-a3d5a1dd.entry.js +0 -2
  889. package/dist/nylas-web-elements/p-ba3d383f.entry.js +0 -2
  890. package/dist/nylas-web-elements/p-bfdc148c.entry.js +0 -2
  891. package/dist/nylas-web-elements/p-cadc9052.js +0 -2
  892. package/dist/nylas-web-elements/p-cadc9052.js.map +0 -1
  893. package/dist/nylas-web-elements/p-d67d1c72.js +0 -2
  894. package/dist/nylas-web-elements/p-d67d1c72.js.map +0 -1
  895. package/dist/nylas-web-elements/p-d85eecf4.entry.js +0 -2
  896. package/dist/nylas-web-elements/p-d92a0405.entry.js +0 -2
  897. package/dist/nylas-web-elements/p-de63bc35.entry.js +0 -2
  898. package/dist/nylas-web-elements/p-df5e9aaf.js +0 -2
  899. package/dist/nylas-web-elements/p-df5e9aaf.js.map +0 -1
  900. package/dist/nylas-web-elements/p-eb93a363.entry.js +0 -2
  901. package/dist/nylas-web-elements/p-eb93a363.entry.js.map +0 -1
  902. package/dist/nylas-web-elements/p-f48d0571.entry.js +0 -2
  903. package/dist/nylas-web-elements/p-fbbca7a6.entry.js +0 -2
  904. package/dist/nylas-web-elements/register-component-0645dce0.js.map +0 -1
  905. package/dist/nylas-web-elements/scheduler-config-store-bc59545b.js +0 -17
  906. package/dist/nylas-web-elements/scheduler-config-store-bc59545b.js.map +0 -1
  907. package/dist/nylas-web-elements/scheduler-store-4d0a4f8a.js.map +0 -1
  908. /package/dist/nylas-web-elements/{p-de63bc35.entry.js.map → p-00a9efc1.entry.js.map} +0 -0
  909. /package/dist/nylas-web-elements/{p-3631e6e5.entry.js.map → p-1d25ca06.entry.js.map} +0 -0
  910. /package/dist/nylas-web-elements/{p-bfdc148c.entry.js.map → p-1e445e86.entry.js.map} +0 -0
  911. /package/dist/nylas-web-elements/{p-395f49eb.entry.js.map → p-2081b475.entry.js.map} +0 -0
  912. /package/dist/nylas-web-elements/{p-4ee6f11e.entry.js.map → p-30784693.entry.js.map} +0 -0
  913. /package/dist/nylas-web-elements/{p-40ed7eab.entry.js.map → p-33b940fb.entry.js.map} +0 -0
  914. /package/dist/nylas-web-elements/{p-d92a0405.entry.js.map → p-343a02e1.entry.js.map} +0 -0
  915. /package/dist/nylas-web-elements/{p-4d9fceeb.entry.js.map → p-343b8684.entry.js.map} +0 -0
  916. /package/dist/nylas-web-elements/{p-409d4410.entry.js.map → p-3b281401.entry.js.map} +0 -0
  917. /package/dist/nylas-web-elements/{p-5a3809a7.entry.js.map → p-42791515.entry.js.map} +0 -0
  918. /package/dist/nylas-web-elements/{p-a0c2ce03.entry.js.map → p-44a9ce77.entry.js.map} +0 -0
  919. /package/dist/nylas-web-elements/{p-b2208193.entry.js.map → p-50b4a80f.entry.js.map} +0 -0
  920. /package/dist/nylas-web-elements/{p-42a4c2fd.entry.js.map → p-571472d4.entry.js.map} +0 -0
  921. /package/dist/nylas-web-elements/{p-2523c292.entry.js.map → p-607b547b.entry.js.map} +0 -0
  922. /package/dist/nylas-web-elements/{p-006ab406.entry.js.map → p-6110351b.entry.js.map} +0 -0
  923. /package/dist/nylas-web-elements/{p-deafc6bc.entry.js.map → p-694b511a.entry.js.map} +0 -0
  924. /package/dist/nylas-web-elements/{p-64364434.entry.js.map → p-73c062f8.entry.js.map} +0 -0
  925. /package/dist/nylas-web-elements/{p-3da66838.entry.js.map → p-80d6175c.entry.js.map} +0 -0
  926. /package/dist/nylas-web-elements/{p-01bf65c2.entry.js.map → p-939db546.entry.js.map} +0 -0
  927. /package/dist/nylas-web-elements/{p-a1e27dc5.entry.js.map → p-95a3094a.entry.js.map} +0 -0
  928. /package/dist/nylas-web-elements/{p-f48d0571.entry.js.map → p-ad64c2b8.entry.js.map} +0 -0
  929. /package/dist/nylas-web-elements/{p-baa620b4.entry.js.map → p-b25821e1.entry.js.map} +0 -0
  930. /package/dist/nylas-web-elements/{p-374527e6.entry.js.map → p-b53062f7.entry.js.map} +0 -0
  931. /package/dist/nylas-web-elements/{p-2c5d5953.entry.js.map → p-bbf9aff2.entry.js.map} +0 -0
  932. /package/dist/nylas-web-elements/{p-a3d5a1dd.entry.js.map → p-c20ab972.entry.js.map} +0 -0
  933. /package/dist/nylas-web-elements/{p-7b1bb792.entry.js.map → p-cc674b3b.entry.js.map} +0 -0
  934. /package/dist/nylas-web-elements/{p-fbbca7a6.entry.js.map → p-d8f09631.entry.js.map} +0 -0
  935. /package/dist/nylas-web-elements/{p-9dac153b.entry.js.map → p-df6d54c7.entry.js.map} +0 -0
  936. /package/dist/nylas-web-elements/{p-d224c7af.entry.js.map → p-e03b2592.entry.js.map} +0 -0
  937. /package/dist/nylas-web-elements/{p-9f168ff0.js.map → p-e22aa0b0.js.map} +0 -0
  938. /package/dist/nylas-web-elements/{p-ad9c3cab.entry.js.map → p-f154a362.entry.js.map} +0 -0
  939. /package/dist/nylas-web-elements/{p-ae01e1cb.entry.js.map → p-f1f8f745.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"nylas-min-cancellation-notice.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,SA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ACD;gBACR,6EACE,EAAE,EAAC,yBAAyB,EAC5B,WAAW,EAAC,0UAA0U,EACtV,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,EAC9C,qBAAqB,EAAE,IAAI,CAAC,cAAc,EAC1C,qBAAqB,EAAE,IAAI,CAAC,cAAc,GAC1C,CACE,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAxBC;IALC,iBAAiB,CAAgH;QAChI,IAAI,EAAE,+BAA+B;QACrC,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;wDAwBD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\n/**\n * The `nylas-min-cancellation-notice` component is a form input for the description of an event.\n * @part nmcn - The minimum cancellation notice container\n * @part nmcn__number-dropdown - The number dropdown container\n * @part nmcn__number-dropdown-button - The number dropdown button\n * @part nmcn__number-dropdown-content - The number dropdown content\n * @part nmcn__period-dropdown - The period dropdown container\n * @part nmcn__period-dropdown-button - The period dropdown button\n * @part nmcn__period-dropdown-content - The period dropdown content\n */\n@Component({\n tag: 'nylas-min-cancellation-notice',\n styleUrl: 'nylas-min-cancellation-notice.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasMinCancellationNotice {\n @Prop() minCancellationNotice?: number;\n @AttachInternals() internals!: ElementInternals;\n @Element() host!: HTMLElement;\n @Prop() name: string = 'min-cancellation-notice';\n\n @State() selectedNumber: number = 1;\n @State() selectedPeriod: string = 'day';\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-min-cancellation-notice', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('availableDaysInFuture')\n availableDaysInFutureChanged(newValue: number) {\n const { number, period } = this.calculateNumberAndPeriodFromMinutes(newValue);\n this.selectedNumber = number;\n this.selectedPeriod = period;\n }\n\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-min-cancellation-notice', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-min-cancellation-notice', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-min-cancellation-notice', 'componentDidLoad');\n this.availableDaysInFutureChanged(this.minCancellationNotice ?? 1);\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(this.minCancellationNotice?.toString() ?? '1', this.name);\n }\n\n disconnectedCallback() {\n debug('nylas-min-cancellation-notice', 'disconnectedCallback');\n }\n\n @Listen('timePeriodChanged')\n timePeriodChangedHandler(\n event: CustomEvent<{\n number: number;\n period: string;\n }>,\n ) {\n const { number, period } = event.detail;\n let totalMinutes;\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n\n if (period === 'minute') {\n totalMinutes = number;\n } else if (period === 'hour') {\n totalMinutes = number * minutesInHour;\n } else if (period === 'day') {\n totalMinutes = number * minutesInDay;\n } else if (period === 'week') {\n totalMinutes = number * minutesInWeek;\n } else if (period === 'month') {\n totalMinutes = number * minutesInMonth;\n } else {\n totalMinutes = 0;\n }\n this.valueChanged.emit({ value: totalMinutes, name: this.name });\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(totalMinutes.toString(), this.name);\n }\n\n private calculateNumberAndPeriodFromMinutes(minutes: number): { number: number; period: string } {\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n\n if (minutes >= minutesInMonth) {\n return { number: Math.floor(minutes / minutesInMonth), period: 'month' };\n } else if (minutes >= minutesInWeek) {\n return { number: Math.floor(minutes / minutesInWeek), period: 'week' };\n } else if (minutes >= minutesInDay) {\n return { number: Math.floor(minutes / minutesInDay), period: 'day' };\n } else if (minutes >= minutesInHour) {\n return { number: Math.floor(minutes / minutesInHour), period: 'hour' };\n } else {\n return { number: minutes, period: 'minute' };\n }\n }\n\n @RegisterComponent<NylasMinCancellationNotice, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-min-cancellation-notice',\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-min-cancellation-notice\" part=\"nmcn\">\n <label>\n Minimum cancellation notice\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">Set the minimum amount of time required to cancel an event.</span>\n </tooltip-component>\n </span>\n </label>\n <time-period-selector\n id=\"min-cancellation-notice\"\n exportparts=\"tps__number-dropdown: nmcn__number-dropdown, tps__number-dropdown-button: nmcn__number-dropdown-button, tps__number-dropdown-content: nmcn__number-dropdown-content, tps__period-dropdown: nmcn__period-dropdown, tps__period-dropdown-button: nmcn__period-dropdown-button, tps__period-dropdown-content: nmcn__period-dropdown-content\"\n timePeriods={['minute', 'hour', 'day', 'week']}\n defaultSelectedNumber={this.selectedNumber}\n defaultSelectedPeriod={this.selectedPeriod}\n />\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"nylas-min-cancellation-notice.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/n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,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;IAC/B,CAAC;IAQD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAC,+BAA+B,EAAC,IAAI,EAAC,MAAM;gBACpD;;oBAEE,6DAAM,KAAK,EAAC,YAAY;wBACtB;4BACE,kEAAW,IAAI,EAAC,cAAc,GAAG;4BACjC,6DAAM,IAAI,EAAC,iBAAiB,kEAAmE,CAC7E,CACf,CACD;gBACR,6EACE,EAAE,EAAC,yBAAyB,EAC5B,WAAW,EAAC,0UAA0U,EACtV,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,EAC9C,qBAAqB,EAAE,IAAI,CAAC,cAAc,EAC1C,qBAAqB,EAAE,IAAI,CAAC,cAAc,GAC1C,CACE,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAxBC;IANC,iBAAiB,CAAgH;QAChI,IAAI,EAAE,+BAA+B;QACrC,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;wDAwBD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\n\n/**\n * The `nylas-min-cancellation-notice` component is a form input for the description of an event.\n * @part nmcn - The minimum cancellation notice container\n * @part nmcn__number-dropdown - The number dropdown container\n * @part nmcn__number-dropdown-button - The number dropdown button\n * @part nmcn__number-dropdown-content - The number dropdown content\n * @part nmcn__period-dropdown - The period dropdown container\n * @part nmcn__period-dropdown-button - The period dropdown button\n * @part nmcn__period-dropdown-content - The period dropdown content\n */\n@Component({\n tag: 'nylas-min-cancellation-notice',\n styleUrl: 'nylas-min-cancellation-notice.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasMinCancellationNotice {\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n @Prop() minCancellationNotice?: number;\n @AttachInternals() internals!: ElementInternals;\n @Element() host!: HTMLElement;\n @Prop() name: string = 'min-cancellation-notice';\n\n @State() selectedNumber: number = 1;\n @State() selectedPeriod: string = 'day';\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-min-cancellation-notice', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newVal: Configuration) {\n const minCancellationNotice = newVal?.scheduler?.min_cancellation_notice;\n if (minCancellationNotice) {\n this.updateNumberAndPeriodFromMinutes(minCancellationNotice);\n }\n }\n\n @Watch('availableDaysInFuture')\n availableDaysInFutureChanged(newValue: number) {\n this.updateNumberAndPeriodFromMinutes(newValue);\n }\n\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-min-cancellation-notice', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-min-cancellation-notice', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-min-cancellation-notice', 'componentDidLoad');\n this.availableDaysInFutureChanged(this.minCancellationNotice ?? 1);\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(this.minCancellationNotice?.toString() ?? '1', this.name);\n }\n\n disconnectedCallback() {\n debug('nylas-min-cancellation-notice', 'disconnectedCallback');\n }\n\n @Listen('timePeriodChanged')\n timePeriodChangedHandler(\n event: CustomEvent<{\n number: number;\n period: string;\n }>,\n ) {\n const { number, period } = event.detail;\n let totalMinutes;\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n\n if (period === 'minute') {\n totalMinutes = number;\n } else if (period === 'hour') {\n totalMinutes = number * minutesInHour;\n } else if (period === 'day') {\n totalMinutes = number * minutesInDay;\n } else if (period === 'week') {\n totalMinutes = number * minutesInWeek;\n } else if (period === 'month') {\n totalMinutes = number * minutesInMonth;\n } else {\n totalMinutes = 0;\n }\n this.valueChanged.emit({ value: totalMinutes, name: 'minCancellationNotice' });\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(totalMinutes.toString(), this.name);\n }\n\n private updateNumberAndPeriodFromMinutes(minutes: number): void {\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n let number, period;\n if (minutes >= minutesInMonth) {\n number = Math.floor(minutes / minutesInMonth);\n period = 'month';\n } else if (minutes >= minutesInWeek) {\n number = Math.floor(minutes / minutesInWeek);\n period = 'week';\n } else if (minutes >= minutesInDay) {\n number = Math.floor(minutes / minutesInDay);\n period = 'day';\n } else if (minutes >= minutesInHour) {\n number = Math.floor(minutes / minutesInHour);\n period = 'hour';\n } else {\n number = minutes;\n period = 'minute';\n }\n this.selectedNumber = number;\n this.selectedPeriod = period;\n }\n\n @RegisterComponent<NylasMinCancellationNotice, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-min-cancellation-notice',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-min-cancellation-notice\" part=\"nmcn\">\n <label>\n Minimum cancellation notice\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">Set the minimum amount of time required to cancel an event.</span>\n </tooltip-component>\n </span>\n </label>\n <time-period-selector\n id=\"min-cancellation-notice\"\n exportparts=\"tps__number-dropdown: nmcn__number-dropdown, tps__number-dropdown-button: nmcn__number-dropdown-button, tps__number-dropdown-content: nmcn__number-dropdown-content, tps__period-dropdown: nmcn__period-dropdown, tps__period-dropdown-button: nmcn__period-dropdown-button, tps__period-dropdown-content: nmcn__period-dropdown-content\"\n timePeriods={['minute', 'hour', 'day', 'week']}\n defaultSelectedNumber={this.selectedNumber}\n defaultSelectedPeriod={this.selectedPeriod}\n />\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,30 @@
1
+ import { h } from "@stencil/core";
2
+ export const LoginRequired = ({ authenticationUrl }) => (h("div", { class: 'login-required' }, h("div", { class: 'card' }, h("p", null, "Log into your account to use the Scheduler Editor."), h("button", { class: "google-button", onClick: async (event) => {
3
+ event.preventDefault();
4
+ const authUrl = await authenticationUrl('google');
5
+ if (authUrl) {
6
+ window.location.href = authUrl;
7
+ }
8
+ else {
9
+ console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);
10
+ }
11
+ } }, h("span", { class: "icon" }, h("google-logo-icon", { width: "15", height: "15" })), "Continue with Google"), h("button", { class: "microsoft-button", onClick: async (event) => {
12
+ event.preventDefault();
13
+ const authUrl = await authenticationUrl('microsoft');
14
+ if (authUrl) {
15
+ window.location.href = authUrl;
16
+ }
17
+ else {
18
+ console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);
19
+ }
20
+ } }, h("span", { class: "icon" }, h("microsoft-logo-icon", { width: "15", height: "15" })), "Continue with Microsoft"), h("button", { class: "other-provider-button", onClick: async (event) => {
21
+ event.preventDefault();
22
+ const authUrl = await authenticationUrl();
23
+ if (authUrl) {
24
+ window.location.href = authUrl;
25
+ }
26
+ else {
27
+ console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);
28
+ }
29
+ } }, "View all providers ", h("chevron-icon", { width: "17", height: "17" })), h("small", { class: "disclaimer-text" }, "* You will be redirected to authenticate your account."))));
30
+ //# sourceMappingURL=LoginRequired.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoginRequired.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-scheduler-editor/LoginRequired.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAMlC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,iBAAiB,EAAsB,EAAE,EAAE,CAAC,CAC1E,WAAK,KAAK,EAAE,gBAAgB;IAC1B,WAAK,KAAK,EAAE,MAAM;QAChB,kEAAyD;QAEzD,cACE,KAAK,EAAC,eAAe,EACrB,OAAO,EAAE,KAAK,EAAC,KAAK,EAAC,EAAE;gBACrB,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,QAAQ,CAAC,CAAC;gBAClD,IAAI,OAAO,EAAE,CAAC;oBACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC;gBACjC,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;gBAC9E,CAAC;YACH,CAAC;YAED,YAAM,KAAK,EAAC,MAAM;gBAChB,wBAAkB,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CACtC;mCAEA;QAET,cACE,KAAK,EAAC,kBAAkB,EACxB,OAAO,EAAE,KAAK,EAAC,KAAK,EAAC,EAAE;gBACrB,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,WAAW,CAAC,CAAC;gBACrD,IAAI,OAAO,EAAE,CAAC;oBACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC;gBACjC,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;gBAC9E,CAAC;YACH,CAAC;YAED,YAAM,KAAK,EAAC,MAAM;gBAChB,2BAAqB,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CACzC;sCAEA;QAET,cACE,KAAK,EAAC,uBAAuB,EAC7B,OAAO,EAAE,KAAK,EAAC,KAAK,EAAC,EAAE;gBACrB,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,MAAM,OAAO,GAAG,MAAM,iBAAiB,EAAE,CAAC;gBAC1C,IAAI,OAAO,EAAE,CAAC;oBACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC;gBACjC,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;gBAC9E,CAAC;YACH,CAAC;;YAEkB,oBAAc,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CACnD;QAET,aAAO,KAAK,EAAC,iBAAiB,6DAA+D,CACzF,CACF,CACP,CAAC","sourcesContent":["import { h } from '@stencil/core';\n\nexport type LoginRequiredProps = {\n authenticationUrl: (provider?: string) => Promise<string>;\n};\n\nexport const LoginRequired = ({ authenticationUrl }: LoginRequiredProps) => (\n <div class={'login-required'}>\n <div class={'card'}>\n <p>Log into your account to use the Scheduler Editor.</p>\n\n <button\n class=\"google-button\"\n onClick={async event => {\n event.preventDefault();\n const authUrl = await authenticationUrl('google');\n if (authUrl) {\n window.location.href = authUrl;\n } else {\n console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);\n }\n }}\n >\n <span class=\"icon\">\n <google-logo-icon width=\"15\" height=\"15\" />\n </span>\n Continue with Google\n </button>\n\n <button\n class=\"microsoft-button\"\n onClick={async event => {\n event.preventDefault();\n const authUrl = await authenticationUrl('microsoft');\n if (authUrl) {\n window.location.href = authUrl;\n } else {\n console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);\n }\n }}\n >\n <span class=\"icon\">\n <microsoft-logo-icon width=\"15\" height=\"15\" />\n </span>\n Continue with Microsoft\n </button>\n\n <button\n class=\"other-provider-button\"\n onClick={async event => {\n event.preventDefault();\n const authUrl = await authenticationUrl();\n if (authUrl) {\n window.location.href = authUrl;\n } else {\n console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);\n }\n }}\n >\n View all providers <chevron-icon width=\"17\" height=\"17\" />\n </button>\n\n <small class=\"disclaimer-text\">* You will be redirected to authenticate your account.</small>\n </div>\n </div>\n);\n"]}
@@ -77,6 +77,12 @@ div.scheduler-editor-header button:disabled {
77
77
  nylas-editor-tabs {
78
78
  width: auto;
79
79
  }
80
+ nylas-editor-tabs nylas-event-info div[slot=inputs],
81
+ nylas-editor-tabs nylas-event-limits div[slot=inputs] {
82
+ display: flex;
83
+ flex-direction: column;
84
+ gap: 1rem;
85
+ }
80
86
 
81
87
  .card {
82
88
  display: flex;
@@ -101,11 +107,13 @@ nylas-editor-tabs {
101
107
  .login-required .microsoft-button,
102
108
  .login-required .google-button {
103
109
  height: 48px;
104
- border: none;
110
+ border: 1px solid var(--nylas-base-300);
105
111
  border-radius: var(--nylas-border-radius-2x);
106
112
  font-size: 1rem;
107
113
  line-height: 24px;
108
114
  padding: 0 1rem;
115
+ background-color: var(--nylas-base-0);
116
+ font-weight: 600;
109
117
  cursor: pointer;
110
118
  display: flex;
111
119
  margin-bottom: 1rem;
@@ -120,13 +128,19 @@ nylas-editor-tabs {
120
128
  .login-required .google-button:hover {
121
129
  background-color: var(--nylas-base-25);
122
130
  }
131
+ .login-required .microsoft-button:hover,
132
+ .login-required .google-button:hover {
133
+ background-color: var(--nylas-base-25);
134
+ }
123
135
  .login-required .other-provider-button {
124
136
  height: 48px;
125
- border: none;
137
+ border: 1px solid var(--nylas-base-300);
126
138
  border-radius: var(--nylas-border-radius-2x);
127
139
  font-size: 1rem;
128
140
  line-height: 24px;
129
141
  padding: 0 1rem;
142
+ background-color: var(--nylas-base-0);
143
+ font-weight: 600;
130
144
  cursor: pointer;
131
145
  display: flex;
132
146
  border: 0;
@@ -138,6 +152,9 @@ nylas-editor-tabs {
138
152
  gap: 0.25rem;
139
153
  align-items: center;
140
154
  }
155
+ .login-required .other-provider-button:hover {
156
+ background-color: var(--nylas-base-25);
157
+ }
141
158
  .login-required .other-provider-button svg {
142
159
  transform: rotate(180deg);
143
160
  }
@@ -148,4 +165,8 @@ nylas-editor-tabs {
148
165
  font-size: 0.75rem;
149
166
  color: var(--nylas-base-600);
150
167
  align-self: center;
168
+ }
169
+
170
+ .list-configurations {
171
+ padding: 2rem;
151
172
  }
@@ -1,19 +1,31 @@
1
1
  import { NylasBaseProvider } from "../../../common/abstract-provider";
2
+ import { NylasIdentityRequestWrapper } from "../../../common/nylas-api-request";
2
3
  import { NylasSchedulerConfigConnector } from "../../../connector/nylas-scheduler-config-connector/index";
3
4
  import { CreateNylasSchedulerConfigStore } from "../../../stores/scheduler-config-store";
4
5
  import { debug } from "../../../utils/utils";
5
- import { Host, h } from "@stencil/core";
6
- import { NylasIdentityRequestWrapper } from "../../../common/nylas-api-request";
7
6
  import { NylasSessions } from "@nylas/identity";
7
+ import { Host, h } from "@stencil/core";
8
+ import { LoginRequired } from "./LoginRequired";
8
9
  export class NylasSchedulerEditor {
9
10
  constructor() {
10
11
  this.handleSchedulerConfigCloseClicked = (_event) => {
11
12
  this.schedulerConfigCloseClicked.emit(this.host);
12
13
  };
14
+ this.authenticationUrl = async (provider) => {
15
+ if (!this.nylasApiRequest) {
16
+ console.error(`[nylas-scheduler-editor] Nylas API Request is not initialized.`);
17
+ return '';
18
+ }
19
+ const url = await this.nylasApiRequest.authenticationUrl({ provider });
20
+ return url || '';
21
+ };
22
+ this.defaultRequiresSessionAuth = true;
13
23
  this.configurationId = undefined;
14
24
  this.nylasApiRequest = undefined;
15
25
  this.nylasSessionsConfig = undefined;
26
+ this.defaultAuthArgs = undefined;
16
27
  this.eventOverrides = {};
28
+ this.schedulerPreviewLink = '';
17
29
  this.defaultSchedulerConfigStoreState = undefined;
18
30
  this.mode = 'app';
19
31
  this.automaticComponentRegistration = true;
@@ -28,6 +40,7 @@ export class NylasSchedulerEditor {
28
40
  ...this.defaultSchedulerConfigStoreState,
29
41
  }),
30
42
  };
43
+ this.stores?.schedulerConfig?.set('defaultRequiresSessionAuth', this.defaultRequiresSessionAuth);
31
44
  if (!this.nylasApiRequest && this.nylasSessionsConfig) {
32
45
  const nylasSession = new NylasSessions(this.nylasSessionsConfig);
33
46
  await nylasSession.isLoggedIn();
@@ -44,10 +57,8 @@ export class NylasSchedulerEditor {
44
57
  });
45
58
  this.nylasApiRequest = new NylasIdentityRequestWrapper(nylasSession);
46
59
  }
47
- if (!this.nylasApiRequest) {
48
- debug(`[nylas-scheduler-editor] No NylasApiRequest provided. Unable to continue.`);
49
- console.error(`[nylas-scheduler-editor] No NylasApiRequest provided. Unable to continue.`);
50
- return;
60
+ if (this.nylasApiRequest && this.defaultAuthArgs) {
61
+ this.nylasApiRequest.setDefaultAuthArgs(this.defaultAuthArgs);
51
62
  }
52
63
  this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);
53
64
  const nylasSchedulerConfigStore = this.baseProvider.getStore('schedulerConfig');
@@ -67,6 +78,11 @@ export class NylasSchedulerEditor {
67
78
  this.loggedOut.emit(this.host);
68
79
  }
69
80
  }
81
+ this.stores?.schedulerConfig?.onChange('selectedConfiguration', async (config) => {
82
+ if (config && config.id) {
83
+ this.configurationId = config.id;
84
+ }
85
+ });
70
86
  this.baseProvider?.componentWillLoad(this.nylasSchedulerConfigConnector);
71
87
  }
72
88
  async componentDidLoad() {
@@ -76,19 +92,17 @@ export class NylasSchedulerEditor {
76
92
  componentDisconnected() {
77
93
  this.baseProvider?.componentDisconnected();
78
94
  }
79
- async loggedInHandler(currentUser) {
80
- this.stores?.schedulerConfig?.set('currentUser', currentUser);
81
- if (this.configurationId) {
82
- await this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(this.configurationId);
83
- }
84
- await this.nylasSchedulerConfigConnector?.schedulerConfig?.getCalendars();
95
+ defaultRequiresSessionAuthChanged(newRequireSessionAuth) {
96
+ this.stores?.schedulerConfig?.set('defaultRequiresSessionAuth', newRequireSessionAuth);
85
97
  }
86
98
  async configurationIdChanged(newConfigurationId) {
87
99
  if (newConfigurationId) {
88
100
  await this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(newConfigurationId);
101
+ this.stores?.schedulerConfig?.set('action', 'edit');
89
102
  }
90
103
  else {
91
- this.stores?.schedulerConfig?.set('config', {});
104
+ this.stores?.schedulerConfig?.set('selectedConfiguration', {});
105
+ this.stores?.schedulerConfig?.set('action', null);
92
106
  }
93
107
  }
94
108
  async store() {
@@ -103,36 +117,18 @@ export class NylasSchedulerEditor {
103
117
  async unregisterComponentHandler(event) {
104
118
  this.baseProvider?.unregisterComponent(event.detail);
105
119
  }
106
- render() {
107
- const defaultEditor = this.mode === 'app';
108
- if (defaultEditor) {
109
- return (h(Host, null, h("div", { class: "scheduler-editor-header", part: "nse__header" }, h("h1", { class: "scheduler-editor-title", part: "nse__title" }, h("calendar-icon", { width: "18", height: "18" }), "Scheduler editor"), h("button", { class: "scheduler-editor-close", onClick: e => this.handleSchedulerConfigCloseClicked(e), part: "nse__close-button" }, h("close-icon", { width: "18", height: "18" }))), this.stores?.schedulerConfig?.state.currentUser && h("nylas-editor-tabs", null), !this.stores?.schedulerConfig?.state.currentUser && (h("slot", { name: "login-required" }, h("div", { class: 'login-required' }, h("div", { class: 'card' }, h("p", null, "Log into your account to use the Scheduler Editor."), h("button", { class: "google-button", onClick: async () => {
110
- const authUrl = await this.nylasApiRequest?.authenticationUrl({ provider: 'google' });
111
- if (authUrl) {
112
- window.location.href = authUrl;
113
- }
114
- else {
115
- console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);
116
- }
117
- } }, h("span", { class: "icon" }, h("google-logo-icon", { width: "15", height: "15" })), "Continue with Google"), h("button", { class: "microsoft-button", onClick: async () => {
118
- const authUrl = await this.nylasApiRequest?.authenticationUrl({ provider: 'microsoft' });
119
- if (authUrl) {
120
- window.location.href = authUrl;
121
- }
122
- else {
123
- console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);
124
- }
125
- } }, h("span", { class: "icon" }, h("microsoft-logo-icon", { width: "15", height: "15" })), "Continue with Microsoft"), h("button", { class: "other-provider-button", onClick: async () => {
126
- const authUrl = await this.nylasApiRequest?.authenticationUrl();
127
- if (authUrl) {
128
- window.location.href = authUrl;
129
- }
130
- else {
131
- console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);
132
- }
133
- } }, "View all providers ", h("chevron-icon", { width: "17", height: "17" })), h("small", { class: "disclaimer-text" }, "* You will be redirected to authenticate your account.")))))));
120
+ async loggedInHandler(currentUser) {
121
+ this.stores?.schedulerConfig?.set('currentUser', currentUser);
122
+ if (!this.nylasSchedulerConfigConnector) {
123
+ return;
124
+ }
125
+ if (this.configurationId) {
126
+ await this.nylasSchedulerConfigConnector.schedulerConfig?.getConfigurationById(this.configurationId);
134
127
  }
135
- return (h(Host, null, h("slot", null)));
128
+ await this.nylasSchedulerConfigConnector.schedulerConfig?.getCalendars();
129
+ }
130
+ render() {
131
+ return (h(Host, { key: '14880638bcb9c031f748d72fe0052b6eb0df463d' }, h("div", { key: 'f0ee0e9a97eddbd350dfc41469257475e6178e3d', class: "scheduler-editor-header", part: "nse__header" }, h("h1", { key: 'eb85113f9650853bb6f3f348e6517ba83112f28f', class: "scheduler-editor-title", part: "nse__title" }, h("calendar-icon", { key: '48e6edb5828fbdb111a3360a5c49ef762008c69a', width: "18", height: "18" }), "Scheduler editor"), h("button", { key: 'f3d02137c2a999e6305b20b6735efc77370a6a83', class: "scheduler-editor-close", onClick: e => this.handleSchedulerConfigCloseClicked(e), part: "nse__close-button" }, h("close-icon", { key: '05280d7af113731d30b659d9de308b23aa3ea014', width: "18", height: "18" }))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === null && (h("div", { class: "list-configurations" }, h("nylas-list-configurations", null))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'create' && (h("nylas-editor-tabs", { mode: "composable" }, h("nylas-event-info", null, h("div", { slot: "inputs" }, h("nylas-event-title", null), h("nylas-event-duration", null), h("nylas-location-component", null))), h("nylas-booking-calendar-picker", null))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'edit' && (h("nylas-editor-tabs", { mode: this.mode }, this.mode === 'composable' && h("slot", null))), !this.stores?.schedulerConfig?.state.currentUser && (h("slot", { name: "login-required" }, h(LoginRequired, { authenticationUrl: this.authenticationUrl })))));
136
132
  }
137
133
  static get is() { return "nylas-scheduler-editor"; }
138
134
  static get encapsulation() { return "shadow"; }
@@ -148,9 +144,27 @@ export class NylasSchedulerEditor {
148
144
  }
149
145
  static get properties() {
150
146
  return {
147
+ "defaultRequiresSessionAuth": {
148
+ "type": "boolean",
149
+ "mutable": true,
150
+ "complexType": {
151
+ "original": "boolean",
152
+ "resolved": "boolean",
153
+ "references": {}
154
+ },
155
+ "required": false,
156
+ "optional": false,
157
+ "docs": {
158
+ "tags": [],
159
+ "text": "The default require session auth flag to used to set the default value for the requireSessionAuth\nproperty when creating a configuration. If set to true, then a session token must be provided\nto the <nylas-scheduling/> component. If set to false, then a session token is not required\nand the configuration id can passed to the <nylas-scheduling/> component instead."
160
+ },
161
+ "attribute": "default-requires-session-auth",
162
+ "reflect": false,
163
+ "defaultValue": "true"
164
+ },
151
165
  "configurationId": {
152
166
  "type": "string",
153
- "mutable": false,
167
+ "mutable": true,
154
168
  "complexType": {
155
169
  "original": "string",
156
170
  "resolved": "string | undefined",
@@ -167,7 +181,7 @@ export class NylasSchedulerEditor {
167
181
  },
168
182
  "nylasApiRequest": {
169
183
  "type": "unknown",
170
- "mutable": false,
184
+ "mutable": true,
171
185
  "complexType": {
172
186
  "original": "NylasApiRequest",
173
187
  "resolved": "NylasApiRequest | undefined",
@@ -207,12 +221,33 @@ export class NylasSchedulerEditor {
207
221
  "text": "The Nylas Sessions configuration.\nUsed to configure the Nylas Sessions instance."
208
222
  }
209
223
  },
224
+ "defaultAuthArgs": {
225
+ "type": "unknown",
226
+ "mutable": false,
227
+ "complexType": {
228
+ "original": "AuthArgs",
229
+ "resolved": "undefined | { provider?: string | undefined; scope?: string[] | undefined; loginHint?: string | undefined; includeGrantScopes?: boolean | undefined; prompt?: string | undefined; metadata?: string | undefined; state?: string | undefined; }",
230
+ "references": {
231
+ "AuthArgs": {
232
+ "location": "import",
233
+ "path": "@/common/nylas-api-request",
234
+ "id": "src/common/nylas-api-request.ts::AuthArgs"
235
+ }
236
+ }
237
+ },
238
+ "required": false,
239
+ "optional": true,
240
+ "docs": {
241
+ "tags": [],
242
+ "text": "The default authentication arguments to use when authenticating a user."
243
+ }
244
+ },
210
245
  "eventOverrides": {
211
246
  "type": "unknown",
212
247
  "mutable": false,
213
248
  "complexType": {
214
249
  "original": "SchedulerEditorEventOverride",
215
- "resolved": "Partial<{ valueChanged: (event: CustomEvent<{ value: OpenHours[]; name: string; } | { value: string[]; name: string; valueChangedHandler?: ((event: CustomEvent<{ value: string[]; name: string; }>) => void) | undefined; } | { value: string; name: string; valueChanged?: ((event: CustomEvent<{ value: string; name: string; }>) => void) | undefined; } | { value: string; name: string; } | { value: string; name: string; } | { value: string; name: string; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; schedulerConfigChanged: (event: CustomEvent<SchedulerEventDetail>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; }> & EventOverride<NylasSchedulerConfigConnectorInterface>",
250
+ "resolved": "Partial<{ valueChanged: (event: CustomEvent<{ value: { openHours: OpenHours[]; timezone: string; }; name: string; } | { value: string[]; name: string; valueChangedHandler?: ((event: CustomEvent<{ value: string[]; name: string; }>) => void) | undefined; } | { value: string; name: string; valueChanged?: ((event: CustomEvent<{ value: string; name: string; }>) => void) | undefined; } | { value: string; name: string; } | { value: string; name: string; } | { value: string; name: string; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; schedulerConfigChanged: (event: CustomEvent<SchedulerEventDetail>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; cancelButtonClick: (event: CustomEvent<void>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; formSubmitted: (event: CustomEvent<void>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; previewButtonClicked: (event: CustomEvent<HTMLNylasEditorTabsElement>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; initListConfigurations: (event: CustomEvent<HTMLNylasListConfigurationsElement>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; createButtonClick: (event: CustomEvent<HTMLNylasListConfigurationsElement>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; editButtonClick: (event: CustomEvent<{ host: HTMLNylasListConfigurationsElement; configuration: Configuration; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; deleteButtonClick: (event: CustomEvent<{ host: HTMLNylasListConfigurationsElement; configuration: Configuration; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; }> & EventOverride<NylasSchedulerConfigConnectorInterface>",
216
251
  "references": {
217
252
  "SchedulerEditorEventOverride": {
218
253
  "location": "import",
@@ -229,13 +264,35 @@ export class NylasSchedulerEditor {
229
264
  },
230
265
  "defaultValue": "{}"
231
266
  },
267
+ "schedulerPreviewLink": {
268
+ "type": "string",
269
+ "mutable": false,
270
+ "complexType": {
271
+ "original": "string",
272
+ "resolved": "string",
273
+ "references": {}
274
+ },
275
+ "required": false,
276
+ "optional": false,
277
+ "docs": {
278
+ "tags": [],
279
+ "text": "The scheduler preview link to use when the user clicks on the preview button.\nYou can use a placeholder `{config.id}` to replace the configuration id anywhere in the link."
280
+ },
281
+ "attribute": "scheduler-preview-link",
282
+ "reflect": false,
283
+ "defaultValue": "''"
284
+ },
232
285
  "defaultSchedulerConfigStoreState": {
233
286
  "type": "unknown",
234
287
  "mutable": false,
235
288
  "complexType": {
236
- "original": "NylasSchedulerConfigStoreState",
237
- "resolved": "NylasSchedulerConfigStoreState | undefined",
289
+ "original": "Partial<NylasSchedulerConfigStoreState>",
290
+ "resolved": "undefined | { selectedConfiguration?: Partial<Configuration> | undefined; configurations?: Configuration[] | undefined; calendars?: Calendar[] | undefined; currentUser?: User | null | undefined; action?: \"create\" | \"edit\" | null | undefined; defaultRequiresSessionAuth?: boolean | undefined; }",
238
291
  "references": {
292
+ "Partial": {
293
+ "location": "global",
294
+ "id": "global::Partial"
295
+ },
239
296
  "NylasSchedulerConfigStoreState": {
240
297
  "location": "import",
241
298
  "path": "@/stores/scheduler-config-store",
@@ -369,18 +426,13 @@ export class NylasSchedulerEditor {
369
426
  "location": "global",
370
427
  "id": "global::Promise"
371
428
  },
372
- "NylasSchedulerConfigStoreState": {
373
- "location": "import",
374
- "path": "@/stores/scheduler-config-store",
375
- "id": "src/stores/scheduler-config-store.ts::NylasSchedulerConfigStoreState"
376
- },
377
429
  "NylasSchedulerConfigStoreType": {
378
430
  "location": "import",
379
431
  "path": "@/stores/scheduler-config-store",
380
432
  "id": "src/stores/scheduler-config-store.ts::NylasSchedulerConfigStoreType"
381
433
  }
382
434
  },
383
- "return": "Promise<ObservableMap<NylasSchedulerConfigStoreState> | undefined>"
435
+ "return": "Promise<CreateNylasSchedulerConfigStoreReturnType | undefined>"
384
436
  },
385
437
  "docs": {
386
438
  "text": "This method is used to get the NylasSchedulerConfigStore instance.\nYou can use this instance to update or get the state of the store.",
@@ -420,6 +472,9 @@ export class NylasSchedulerEditor {
420
472
  static get elementRef() { return "host"; }
421
473
  static get watchers() {
422
474
  return [{
475
+ "propName": "defaultRequiresSessionAuth",
476
+ "methodName": "defaultRequiresSessionAuthChanged"
477
+ }, {
423
478
  "propName": "configurationId",
424
479
  "methodName": "configurationIdChanged"
425
480
  }];
@@ -1 +1 @@
1
- {"version":3,"file":"nylas-scheduler-editor.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAiE,MAAM,iCAAiC,CAAC;AACjJ,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,2BAA2B,EAA8B,MAAM,4BAA4B,CAAC;AACrG,OAAO,EAAU,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAYxD,MAAM,OAAO,oBAAoB;;QAiPvB,sCAAiC,GAAG,CAAC,MAAa,EAAE,EAAE;YAC5D,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnD,CAAC,CAAC;;;;8BA/LqD,EAAE;;oBAaU,KAAK;8CAgCrB,IAAI;;IAEvD,iBAAiB;QACf,KAAK,CAAC,4CAA4C,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,KAAK,CAAC,4CAA4C,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,GAAG;YACZ,eAAe,EAAE,+BAA+B,CAAC;gBAC/C,GAAG,IAAI,CAAC,gCAAgC;aACzC,CAAC;SACH,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,eAAe,I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gCAED,YAAM,KAAK,EAAC,MAAM;oCAChB,2BAAqB,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CACzC;0DAEA;4BAET,cACE,KAAK,EAAC,uBAAuB,EAC7B,OAAO,EAAE,KAAK,IAAI,EAAE;oCAClB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC;oCAChE,IAAI,OAAO,EAAE,CAAC;wCACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,OAAO,CAAC;oCACjC,CAAC;yCAAM,CAAC;wCACN,OAAO,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;oCAC9E,CAAC;gCACH,CAAC;;gCAEkB,oBAAc,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CACnD;4BAET,aAAO,KAAK,EAAC,iBAAiB,6DAA+D,CACzF,CACF,CACD,CACR,CACI,CACR,CAAC;QACJ,CAAC;QAED,OAAO,CACL,EAAC,IAAI;YACH,eAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { NylasBaseProvider } from '@/common/abstract-provider';\nimport type { SchedulerEditorEventOverride } from '@/common/component-types';\nimport { RegisteredComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { CreateNylasSchedulerConfigStore, NylasSchedulerConfigStoreState, NylasSchedulerConfigStoreType } from '@/stores/scheduler-config-store';\nimport { debug } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasIdentityRequestWrapper, User, type NylasApiRequest } from '@/common/nylas-api-request';\nimport { Config, NylasSessions } from '@nylas/identity';\n\n/**\n * The `nylas-scheduler-editor` component is a form that allows users to configure the settings for the Nylas Scheduler.\n *\n * @slot login-required - This slot is used to display a message when the user is not logged in.\n */\n@Component({\n tag: 'nylas-scheduler-editor',\n styleUrl: 'nylas-scheduler-editor.scss',\n shadow: true,\n})\nexport class NylasSchedulerEditor {\n /**\n * Stores to be used by the provider.\n */\n private stores?: {\n schedulerConfig: NylasSchedulerConfigStoreType;\n };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Scheduler Config Connector instance.\n * The brains of the provider. It manages data fetching and state synchronization.\n */\n private nylasSchedulerConfigConnector?: NylasSchedulerConfigConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasSchedulerEditorElement;\n\n /***\n * The configuration id to use for the scheduler editor.\n * If provided, then the scheduler editor will try and fetch the configuration\n * with the provided id. If found, it will automatically load the editor\n * with the configuration settings for editing.\n */\n @Prop() configurationId?: string;\n\n /**\n * The Nylas Api Request instance.\n * Used to make requests to the Nylas API.\n */\n @Prop() nylasApiRequest?: NylasApiRequest;\n\n /**\n * The Nylas Sessions configuration.\n * Used to configure the Nylas Sessions instance.\n */\n @Prop() nylasSessionsConfig?: Config;\n\n /**\n * This provides a way to override the default event handlers.\n */\n @Prop() eventOverrides: SchedulerEditorEventOverride = {};\n\n /**\n * The default scheduler config store state.\n * Used to set the initial state of the scheduler config store.\n */\n @Prop({ attribute: 'default-scheduler-config-store-state' }) readonly defaultSchedulerConfigStoreState?: NylasSchedulerConfigStoreState;\n\n /**\n * The is used to set the mode for the scheduler config.\n * The mode can be 'app' or 'composable'.\n * The default mode is 'app'.\n */\n @Prop({ attribute: 'mode' }) readonly mode: 'app' | 'composable' = 'app';\n\n /**\n * This event is fired when the provider is initialized.\n * By default, this event handles determining if the user is logged in or not.\n * In addition, it fetches the provided configuration if a valid configuration id is provided.\n */\n @Event({ cancelable: true }) readonly init!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedIn!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedOut!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the close button on scheduler config is clicked.\n */\n @Event({ cancelable: true }) readonly schedulerConfigCloseClicked!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n @State() automaticComponentRegistration: boolean = true;\n\n connectedCallback() {\n debug(`[nylas-scheduler-editor] connectedCallback`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-scheduler-editor] componentWillLoad`);\n this.stores = {\n schedulerConfig: CreateNylasSchedulerConfigStore({\n ...this.defaultSchedulerConfigStoreState,\n }),\n };\n\n if (!this.nylasApiRequest && this.nylasSessionsConfig) {\n const nylasSession = new NylasSessions(this.nylasSessionsConfig);\n\n // We must check if the user is logged in before continuing\n // otherwise, a PCKE code will not be generated and the user\n // will not be able to log in.\n await nylasSession.isLoggedIn();\n\n // Watch for login events so that we can automatically update the state\n nylasSession.onLoginSuccess(async () => {\n const currentUser = await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();\n if (currentUser) {\n this.loggedIn.emit(this.host);\n this.loggedInHandler(currentUser);\n }\n });\n\n // Watch for logout events so that we can automatically update the state\n nylasSession.onLoginFail(async () => {\n this.stores?.schedulerConfig?.set('currentUser', null);\n this.loggedOut.emit(this.host);\n });\n\n this.nylasApiRequest = new NylasIdentityRequestWrapper(nylasSession);\n }\n\n if (!this.nylasApiRequest) {\n debug(`[nylas-scheduler-editor] No NylasApiRequest provided. Unable to continue.`);\n console.error(`[nylas-scheduler-editor] No NylasApiRequest provided. Unable to continue.`);\n return;\n }\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n const nylasSchedulerConfigStore = this.baseProvider.getStore('schedulerConfig');\n this.nylasSchedulerConfigConnector = new NylasSchedulerConfigConnector({\n nylasApiRequest: this.nylasApiRequest,\n nylasSchedulerConfigStore: nylasSchedulerConfigStore,\n });\n\n const initEvent = this.init.emit(this.host);\n if (!initEvent.defaultPrevented) {\n const currentUser = await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();\n if (currentUser) {\n this.loggedIn.emit(this.host);\n await this.loggedInHandler(currentUser);\n } else {\n this.stores?.schedulerConfig?.set('currentUser', null);\n this.loggedOut.emit(this.host);\n }\n }\n\n this.baseProvider?.componentWillLoad(this.nylasSchedulerConfigConnector);\n }\n\n async componentDidLoad() {\n debug(`[nylas-scheduler-editor] componentDidLoad`);\n this.baseProvider?.componentDidLoad();\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n private async loggedInHandler(currentUser: User) {\n this.stores?.schedulerConfig?.set('currentUser', currentUser);\n if (this.configurationId) {\n await this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(this.configurationId);\n }\n await this.nylasSchedulerConfigConnector?.schedulerConfig?.getCalendars();\n }\n\n /**\n * Watch for changes to the configuration id and automatically fetch the configuration\n * when the configuration id changes. If the configuration id is cleared, then the\n * configuration is cleared as well.\n * @param newConfigurationId A new configuration id to fetch\n */\n @Watch('configurationId')\n async configurationIdChanged(newConfigurationId: string) {\n if (newConfigurationId) {\n await this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(newConfigurationId);\n } else {\n // Clear the configuration\n this.stores?.schedulerConfig?.set('config', {});\n }\n }\n\n /**\n * This method is used to get the NylasSchedulerConfigStore instance.\n * You can use this instance to update or get the state of the store.\n * @returns Promise<NylasSchedulerConfigStoreType | undefined>\n */\n @Method()\n async store(): Promise<NylasSchedulerConfigStoreType | undefined> {\n return this.stores?.schedulerConfig;\n }\n\n /**\n * This method is used to get the NylasSchedulerConfigConnector instance.\n * You can use this instance to make requests to the Nylas API.\n * @returns Promise<NylasSchedulerConfigConnector | undefined>\n */\n @Method()\n async schedulerConnector(): Promise<NylasSchedulerConfigConnector | undefined> {\n return this.nylasSchedulerConfigConnector;\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n private handleSchedulerConfigCloseClicked = (_event: Event) => {\n this.schedulerConfigCloseClicked.emit(this.host);\n };\n\n render() {\n const defaultEditor = this.mode === 'app';\n\n if (defaultEditor) {\n return (\n <Host>\n <div class=\"scheduler-editor-header\" part=\"nse__header\">\n <h1 class=\"scheduler-editor-title\" part=\"nse__title\">\n <calendar-icon width=\"18\" height=\"18\" />\n Scheduler editor\n </h1>\n <button class=\"scheduler-editor-close\" onClick={e => this.handleSchedulerConfigCloseClicked(e)} part=\"nse__close-button\">\n <close-icon width=\"18\" height=\"18\" />\n </button>\n </div>\n {this.stores?.schedulerConfig?.state.currentUser && <nylas-editor-tabs></nylas-editor-tabs>}\n {!this.stores?.schedulerConfig?.state.currentUser && (\n <slot name=\"login-required\">\n <div class={'login-required'}>\n <div class={'card'}>\n <p>Log into your account to use the Scheduler Editor.</p>\n\n <button\n class=\"google-button\"\n onClick={async () => {\n const authUrl = await this.nylasApiRequest?.authenticationUrl({ provider: 'google' });\n if (authUrl) {\n window.location.href = authUrl;\n } else {\n console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);\n }\n }}\n >\n <span class=\"icon\">\n <google-logo-icon width=\"15\" height=\"15\" />\n </span>\n Continue with Google\n </button>\n\n <button\n class=\"microsoft-button\"\n onClick={async () => {\n const authUrl = await this.nylasApiRequest?.authenticationUrl({ provider: 'microsoft' });\n if (authUrl) {\n window.location.href = authUrl;\n } else {\n console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);\n }\n }}\n >\n <span class=\"icon\">\n <microsoft-logo-icon width=\"15\" height=\"15\" />\n </span>\n Continue with Microsoft\n </button>\n\n <button\n class=\"other-provider-button\"\n onClick={async () => {\n const authUrl = await this.nylasApiRequest?.authenticationUrl();\n if (authUrl) {\n window.location.href = authUrl;\n } else {\n console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`);\n }\n }}\n >\n View all providers <chevron-icon width=\"17\" height=\"17\" />\n </button>\n\n <small class=\"disclaimer-text\">* You will be redirected to authenticate your account.</small>\n </div>\n </div>\n </slot>\n )}\n </Host>\n );\n }\n\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"nylas-scheduler-editor.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAY,2BAA2B,EAA8B,MAAM,4BAA4B,CAAC;AAE/G,OAAO,EAA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;wBACxB,mCAA4B,CACxB,CACW;gBACnB,wCAAiC,CACf,CACrB;YACA,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,IAAI,CACzG,yBAAmB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAG,IAAI,CAAC,IAAI,KAAK,YAAY,IAAI,eAAQ,CAAqB,CACjG;YACA,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,WAAW,IAAI,CACnD,YAAM,IAAI,EAAC,gBAAgB;gBACzB,EAAC,aAAa,IAAC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,GAAI,CACvD,CACR,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { NylasBaseProvider } from '@/common/abstract-provider';\nimport type { SchedulerEditorEventOverride } from '@/common/component-types';\nimport { AuthArgs, NylasIdentityRequestWrapper, User, type NylasApiRequest } from '@/common/nylas-api-request';\nimport { RegisteredComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { CreateNylasSchedulerConfigStore, NylasSchedulerConfigStoreState, NylasSchedulerConfigStoreType } from '@/stores/scheduler-config-store';\nimport { debug } from '@/utils/utils';\nimport { Config, NylasSessions } from '@nylas/identity';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { LoginRequired } from './LoginRequired';\n\n/**\n * The `nylas-scheduler-editor` component is a form that allows users to configure the settings for the Nylas Scheduler.\n *\n * @slot login-required - This slot is used to display a message when the user is not logged in.\n */\n@Component({\n tag: 'nylas-scheduler-editor',\n styleUrl: 'nylas-scheduler-editor.scss',\n shadow: true,\n})\nexport class NylasSchedulerEditor {\n /**\n * Stores to be used by the provider.\n */\n private stores?: {\n schedulerConfig: NylasSchedulerConfigStoreType;\n };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Scheduler Config Connector instance.\n * The brains of the provider. It manages data fetching and state synchronization.\n */\n private nylasSchedulerConfigConnector?: NylasSchedulerConfigConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasSchedulerEditorElement;\n\n /**\n * The default require session auth flag to used to set the default value for the requireSessionAuth\n * property when creating a configuration. If set to true, then a session token must be provided\n * to the <nylas-scheduling/> component. If set to false, then a session token is not required\n * and the configuration id can passed to the <nylas-scheduling/> component instead.\n */\n @Prop({ mutable: true }) defaultRequiresSessionAuth: boolean = true;\n\n /***\n * The configuration id to use for the scheduler editor.\n * If provided, then the scheduler editor will try and fetch the configuration\n * with the provided id. If found, it will automatically load the editor\n * with the configuration settings for editing.\n */\n @Prop({ mutable: true }) configurationId?: string;\n\n /**\n * The Nylas Api Request instance.\n * Used to make requests to the Nylas API.\n */\n @Prop({ mutable: true }) nylasApiRequest?: NylasApiRequest;\n\n /**\n * The Nylas Sessions configuration.\n * Used to configure the Nylas Sessions instance.\n */\n @Prop() nylasSessionsConfig?: Config;\n\n /**\n * The default authentication arguments to use when authenticating a user.\n */\n @Prop() defaultAuthArgs?: AuthArgs;\n\n /**\n * This provides a way to override the default event handlers.\n */\n @Prop() eventOverrides: SchedulerEditorEventOverride = {};\n\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use a placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n\n /**\n * The default scheduler config store state.\n * Used to set the initial state of the scheduler config store.\n */\n @Prop({ attribute: 'default-scheduler-config-store-state' }) readonly defaultSchedulerConfigStoreState?: Partial<NylasSchedulerConfigStoreState>;\n\n /**\n * The is used to set the mode for the scheduler config.\n * The mode can be 'app' or 'composable'.\n * The default mode is 'app'.\n */\n @Prop({ attribute: 'mode' }) readonly mode: 'app' | 'composable' = 'app';\n\n /**\n * This event is fired when the provider is initialized.\n * By default, this event handles determining if the user is logged in or not.\n * In addition, it fetches the provided configuration if a valid configuration id is provided.\n */\n @Event({ cancelable: true }) readonly init!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedIn!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedOut!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * This event is fired when the close button on scheduler config is clicked.\n */\n @Event({ cancelable: true }) readonly schedulerConfigCloseClicked!: EventEmitter<HTMLNylasSchedulerEditorElement>;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n @State() automaticComponentRegistration: boolean = true;\n\n connectedCallback() {\n debug(`[nylas-scheduler-editor] connectedCallback`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-scheduler-editor] componentWillLoad`);\n this.stores = {\n schedulerConfig: CreateNylasSchedulerConfigStore({\n ...this.defaultSchedulerConfigStoreState,\n }),\n };\n\n // Update our store state\n this.stores?.schedulerConfig?.set('defaultRequiresSessionAuth', this.defaultRequiresSessionAuth);\n\n if (!this.nylasApiRequest && this.nylasSessionsConfig) {\n const nylasSession = new NylasSessions(this.nylasSessionsConfig);\n\n // We must check if the user is logged in before continuing\n // otherwise, a PCKE code will not be generated and the user\n // will not be able to log in.\n await nylasSession.isLoggedIn();\n\n // Watch for login events so that we can automatically update the state\n nylasSession.onLoginSuccess(async () => {\n const currentUser = await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();\n if (currentUser) {\n this.loggedIn.emit(this.host);\n this.loggedInHandler(currentUser);\n }\n });\n\n // Watch for logout events so that we can automatically update the state\n nylasSession.onLoginFail(async () => {\n this.stores?.schedulerConfig?.set('currentUser', null);\n this.loggedOut.emit(this.host);\n });\n\n this.nylasApiRequest = new NylasIdentityRequestWrapper(nylasSession);\n }\n\n if (this.nylasApiRequest && this.defaultAuthArgs) {\n this.nylasApiRequest.setDefaultAuthArgs(this.defaultAuthArgs);\n }\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n const nylasSchedulerConfigStore = this.baseProvider.getStore('schedulerConfig');\n this.nylasSchedulerConfigConnector = new NylasSchedulerConfigConnector({\n nylasApiRequest: this.nylasApiRequest,\n nylasSchedulerConfigStore: nylasSchedulerConfigStore,\n });\n\n const initEvent = this.init.emit(this.host);\n if (!initEvent.defaultPrevented) {\n const currentUser = await this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser();\n if (currentUser) {\n this.loggedIn.emit(this.host);\n await this.loggedInHandler(currentUser);\n } else {\n this.stores?.schedulerConfig?.set('currentUser', null);\n this.loggedOut.emit(this.host);\n }\n }\n\n // Watch for store changes\n this.stores?.schedulerConfig?.onChange('selectedConfiguration', async config => {\n if (config && config.id) {\n this.configurationId = config.id;\n }\n });\n\n this.baseProvider?.componentWillLoad(this.nylasSchedulerConfigConnector);\n }\n\n async componentDidLoad() {\n debug(`[nylas-scheduler-editor] componentDidLoad`);\n this.baseProvider?.componentDidLoad();\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n /**\n * Watch for changes to the defaultRequiresSessionAuth property and update the\n * defaultRequiresSessionAuth property in the scheduler config store.\n * @param newRequireSessionAuth The new value for the defaultRequiresSessionAuth property\n */\n @Watch('defaultRequiresSessionAuth')\n defaultRequiresSessionAuthChanged(newRequireSessionAuth: boolean) {\n this.stores?.schedulerConfig?.set('defaultRequiresSessionAuth', newRequireSessionAuth);\n }\n\n /**\n * Watch for changes to the configuration id and automatically fetch the configuration\n * when the configuration id changes. If the configuration id is cleared, then the\n * configuration is cleared as well.\n * @param newConfigurationId The new configuration id\n */\n @Watch('configurationId')\n async configurationIdChanged(newConfigurationId: string) {\n if (newConfigurationId) {\n await this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(newConfigurationId);\n this.stores?.schedulerConfig?.set('action', 'edit');\n } else {\n // Clear the configuration\n this.stores?.schedulerConfig?.set('selectedConfiguration', {});\n this.stores?.schedulerConfig?.set('action', null);\n }\n }\n\n /**\n * This method is used to get the NylasSchedulerConfigStore instance.\n * You can use this instance to update or get the state of the store.\n * @returns Promise<NylasSchedulerConfigStoreType | undefined>\n */\n @Method()\n async store(): Promise<NylasSchedulerConfigStoreType | undefined> {\n return this.stores?.schedulerConfig;\n }\n\n /**\n * This method is used to get the NylasSchedulerConfigConnector instance.\n * You can use this instance to make requests to the Nylas API.\n * @returns Promise<NylasSchedulerConfigConnector | undefined>\n */\n @Method()\n async schedulerConnector(): Promise<NylasSchedulerConfigConnector | undefined> {\n return this.nylasSchedulerConfigConnector;\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n /**\n * Upon login, set the current user and fetch the configuration and calendars.\n * @param currentUser The current user that is logged in\n */\n private async loggedInHandler(currentUser: User) {\n this.stores?.schedulerConfig?.set('currentUser', currentUser);\n\n if (!this.nylasSchedulerConfigConnector) {\n return;\n }\n\n if (this.configurationId) {\n await this.nylasSchedulerConfigConnector.schedulerConfig?.getConfigurationById(this.configurationId);\n }\n\n await this.nylasSchedulerConfigConnector.schedulerConfig?.getCalendars();\n }\n\n /**\n * This is a custom event handler that is used to update the state of the provider.\n */\n private handleSchedulerConfigCloseClicked = (_event: Event) => {\n this.schedulerConfigCloseClicked.emit(this.host);\n };\n\n /**\n * This method is used to get the authentication URL for a provider.\n * @param provider The provider to get the authentication URL for (e.g. google, microsoft, etc.)\n * @returns Promise<string> The authentication URL to redirect the user for the provider\n */\n private authenticationUrl = async (provider?: string) => {\n if (!this.nylasApiRequest) {\n console.error(`[nylas-scheduler-editor] Nylas API Request is not initialized.`);\n return '';\n }\n const url = await this.nylasApiRequest.authenticationUrl({ provider });\n\n return url || '';\n };\n\n render() {\n return (\n <Host>\n <div class=\"scheduler-editor-header\" part=\"nse__header\">\n <h1 class=\"scheduler-editor-title\" part=\"nse__title\">\n <calendar-icon width=\"18\" height=\"18\" />\n Scheduler editor\n </h1>\n <button class=\"scheduler-editor-close\" onClick={e => this.handleSchedulerConfigCloseClicked(e)} part=\"nse__close-button\">\n <close-icon width=\"18\" height=\"18\" />\n </button>\n </div>\n {this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === null && (\n <div class=\"list-configurations\">\n <nylas-list-configurations></nylas-list-configurations>\n </div>\n )}\n {this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'create' && (\n // If the mode is 'app', then render the editor tabs in a composable mode with children for creating a new configuration (Express flow).\n <nylas-editor-tabs mode=\"composable\">\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title />\n <nylas-event-duration />\n <nylas-location-component />\n </div>\n </nylas-event-info>\n <nylas-booking-calendar-picker />\n </nylas-editor-tabs>\n )}\n {this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'edit' && (\n <nylas-editor-tabs mode={this.mode}>{this.mode === 'composable' && <slot />}</nylas-editor-tabs>\n )}\n {!this.stores?.schedulerConfig?.state.currentUser && (\n <slot name=\"login-required\">\n <LoginRequired authenticationUrl={this.authenticationUrl} />\n </slot>\n )}\n </Host>\n );\n }\n}\n"]}
@@ -230,7 +230,7 @@ export class TimeInput {
230
230
  }
231
231
  }
232
232
  render() {
233
- return (h(Host, { key: 'ce9cc8b8d7672d0e8389051d271e2369598f3e0f' }, h("div", { key: 'c12333b0675d581b6f84b5d332d05deeceabab32', class: "time-picker", part: "time-picker" }, h("input", { key: '65e951f23fce142c529933e8f0311a124b32c948', type: "text", name: this.name, id: this.name, part: "time-input", class: {
233
+ return (h(Host, { key: 'fe86daaa8256c8fb59ffe2dfcbf50220f3a7b746' }, h("div", { key: '8cffe49df87c5bf2b73cef66236c806b47d623d4', class: "time-picker", part: "time-picker" }, h("input", { key: '6f735244c63287b0ec0668b688bbb18bb405346b', type: "text", name: this.name, id: this.name, part: "time-input", class: {
234
234
  'time-input': true,
235
235
  'error': !!this.err || this.hasError,
236
236
  }, ref: el => (this.timeInput = el), value: this.time, onClick: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/connector/nylas-scheduler-config-connector/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAOlF,MAAM,OAAO,6BAA6B;IAMxC,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAwC;QAC9F,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,yBAAyB,GAAG,yBAAyB,CAAC;IAC7D,CAAC;IAEM,IAAI;QACT,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAC9C,CAAC;IAED,IAAW,oBAAoB;QAC7B,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACxC,CAAC;IAED,IAAW,eAAe;QACxB,IAAI,IAAI,CAAC,yBAAyB,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC,yBAAyB,CAAC;QACxC,CAAC;QAED,IAAI,CAAC,yBAAyB,GAAG,IAAI,gCAAgC,CAAC;YACpE,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,yBAAyB,EAAE,IAAI,CAAC,yBAAyB;SAC1D,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACxC,CAAC;IAEM,WAAW;QAChB,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACnD,IAAI,CAAC,yBAAyB,CAAC,KAAK,EAAE,CAAC;IACzC,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC9C,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;CACF","sourcesContent":["import { NylasApiRequest } from '@/common/nylas-api-request';\nimport { NylasSchedulerConfigStoreType } from '@/stores/scheduler-config-store';\nimport { debug } from '@/utils/utils';\nimport { NylasSchedulerConfigAPIConnector } from '../shared/api/scheduler-config';\n\ntype NylasSchedulerConfigConnectorOptions = {\n nylasSchedulerConfigStore: NylasSchedulerConfigStoreType;\n nylasApiRequest: NylasApiRequest;\n};\n\nexport class NylasSchedulerConfigConnector {\n public nylasApiRequest: NylasApiRequest;\n public nylasSchedulerConfigStore: NylasSchedulerConfigStoreType;\n\n private _schedulerConfigConnector: NylasSchedulerConfigAPIConnector | undefined;\n\n constructor({ nylasApiRequest, nylasSchedulerConfigStore }: NylasSchedulerConfigConnectorOptions) {\n this.nylasApiRequest = nylasApiRequest;\n this.nylasSchedulerConfigStore = nylasSchedulerConfigStore;\n }\n\n public init() {\n debug('NylasSchedulerConfigConnector init');\n }\n\n public get schedulerConfigStore() {\n return this.nylasSchedulerConfigStore;\n }\n\n public get schedulerConfig() {\n if (this._schedulerConfigConnector) {\n return this._schedulerConfigConnector;\n }\n\n this._schedulerConfigConnector = new NylasSchedulerConfigAPIConnector({\n nylasApiRequest: this.nylasApiRequest,\n nylasSchedulerConfigStore: this.nylasSchedulerConfigStore,\n });\n return this._schedulerConfigConnector;\n }\n\n public resetStores() {\n debug('NylasSchedulerConfigConnector resetStores');\n this.nylasSchedulerConfigStore.reset();\n }\n\n public async logout() {\n debug('NylasSchedulerConfigConnector logout');\n this.resetStores();\n }\n}\n\nexport type PublicMethods<T> = {\n [K in keyof T]: T[K] extends Function ? (string extends K ? never : K) : never;\n}[keyof T];\n\nexport type NylasSchedulerConfigConnectorPublicMethods = PublicMethods<NylasSchedulerConfigConnector>;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/connector/nylas-scheduler-config-connector/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,gCAAgC,EAAE,MAAM,gCAAgC,CAAC;AAOlF,MAAM,OAAO,6BAA6B;IAMxC,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAAwC;QAC9F,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,yBAAyB,GAAG,yBAAyB,CAAC;IAC7D,CAAC;IAEM,IAAI;QACT,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAC9C,CAAC;IAED,IAAW,oBAAoB;QAC7B,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACxC,CAAC;IAED,IAAW,eAAe;QACxB,IAAI,IAAI,CAAC,yBAAyB,EAAE,CAAC;YACnC,OAAO,IAAI,CAAC,yBAAyB,CAAC;QACxC,CAAC;QAED,IAAI,CAAC,yBAAyB,GAAG,IAAI,gCAAgC,CAAC;YACpE,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,yBAAyB,EAAE,IAAI,CAAC,yBAAyB;SAC1D,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACxC,CAAC;IAEM,WAAW;QAChB,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACnD,IAAI,CAAC,yBAAyB,CAAC,KAAK,EAAE,CAAC;IACzC,CAAC;IAEM,KAAK,CAAC,MAAM;QACjB,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC9C,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;CACF","sourcesContent":["import { NylasApiRequest } from '@/common/nylas-api-request';\nimport { NylasSchedulerConfigStoreType } from '@/stores/scheduler-config-store';\nimport { debug } from '@/utils/utils';\nimport { NylasSchedulerConfigAPIConnector } from '../shared/api/scheduler-config';\n\ntype NylasSchedulerConfigConnectorOptions = {\n nylasSchedulerConfigStore: NylasSchedulerConfigStoreType;\n nylasApiRequest?: NylasApiRequest;\n};\n\nexport class NylasSchedulerConfigConnector {\n public nylasApiRequest?: NylasApiRequest;\n public nylasSchedulerConfigStore: NylasSchedulerConfigStoreType;\n\n private _schedulerConfigConnector: NylasSchedulerConfigAPIConnector | undefined;\n\n constructor({ nylasApiRequest, nylasSchedulerConfigStore }: NylasSchedulerConfigConnectorOptions) {\n this.nylasApiRequest = nylasApiRequest;\n this.nylasSchedulerConfigStore = nylasSchedulerConfigStore;\n }\n\n public init() {\n debug('NylasSchedulerConfigConnector init');\n }\n\n public get schedulerConfigStore() {\n return this.nylasSchedulerConfigStore;\n }\n\n public get schedulerConfig() {\n if (this._schedulerConfigConnector) {\n return this._schedulerConfigConnector;\n }\n\n this._schedulerConfigConnector = new NylasSchedulerConfigAPIConnector({\n nylasApiRequest: this.nylasApiRequest,\n nylasSchedulerConfigStore: this.nylasSchedulerConfigStore,\n });\n return this._schedulerConfigConnector;\n }\n\n public resetStores() {\n debug('NylasSchedulerConfigConnector resetStores');\n this.nylasSchedulerConfigStore.reset();\n }\n\n public async logout() {\n debug('NylasSchedulerConfigConnector logout');\n this.resetStores();\n }\n}\n\nexport type PublicMethods<T> = {\n [K in keyof T]: T[K] extends Function ? (string extends K ? never : K) : never;\n}[keyof T];\n\nexport type NylasSchedulerConfigConnectorPublicMethods = PublicMethods<NylasSchedulerConfigConnector>;\n"]}
@@ -9,6 +9,7 @@ export var ComponentErrorType;
9
9
  ComponentErrorType["endtime_not_in_future"] = "endtime_not_in_future";
10
10
  ComponentErrorType["no_booking_info"] = "no_booking_info";
11
11
  ComponentErrorType["no_timeslot_selected"] = "no_timeslot_selected";
12
+ ComponentErrorType["no_timezone_selected"] = "no_timezone_selected";
12
13
  ComponentErrorType["no_booking_id"] = "no_booking_id";
13
14
  ComponentErrorType["invalid_start_time"] = "invalid_start_time";
14
15
  ComponentErrorType["invalid_end_time"] = "invalid_end_time";
@@ -49,6 +50,13 @@ export class Errors {
49
50
  category,
50
51
  };
51
52
  },
53
+ no_timezone_selected: (message = 'No timezone selected') => {
54
+ return {
55
+ title,
56
+ message,
57
+ category,
58
+ };
59
+ },
52
60
  no_booking_id: (message = 'No booking id provided') => {
53
61
  return {
54
62
  title,