@nylas/web-elements 1.1.0-canary.5 → 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 (734) 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 +222 -92
  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 +7 -7
  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 +93 -49
  33. package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
  34. package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
  35. package/dist/cjs/index-7af03e3f.js +1 -158
  36. package/dist/cjs/index-c14ea8f5.js +1 -362
  37. package/dist/cjs/index.cjs.js +1 -1
  38. package/dist/cjs/info-icon.cjs.entry.js +1 -1
  39. package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
  40. package/dist/cjs/italic-icon.cjs.entry.js +1 -1
  41. package/dist/cjs/loader.cjs.js +1 -1
  42. package/dist/cjs/loading-icon.cjs.entry.js +1 -1
  43. package/dist/cjs/location-icon.cjs.entry.js +1 -1
  44. package/dist/cjs/location-off-icon.cjs.entry.js +1 -1
  45. package/dist/cjs/microsoft-logo-icon.cjs.entry.js +1 -1
  46. package/dist/cjs/multi-select-dropdown.cjs.entry.js +2 -2
  47. package/dist/cjs/nylas-additional-participants.cjs.entry.js +1 -1
  48. package/dist/cjs/{nylas-api-request-2a0e7022.js → nylas-api-request-27c25287.js} +13 -2
  49. package/dist/cjs/nylas-api-request-27c25287.js.map +1 -0
  50. package/dist/cjs/{nylas-api-request-55923233.js → nylas-api-request-abdb8dd8.js} +13 -2
  51. package/dist/cjs/nylas-api-request-abdb8dd8.js.map +1 -0
  52. package/dist/cjs/nylas-availability-picker.cjs.entry.js +31 -14
  53. package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
  54. package/dist/cjs/nylas-booked-event-card.cjs.entry.js +1 -1
  55. package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +5 -5
  56. package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js +10 -4
  57. package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js.map +1 -1
  58. package/dist/cjs/nylas-calendar-picker.cjs.entry.js +11 -6
  59. package/dist/cjs/nylas-calendar-picker.cjs.entry.js.map +1 -1
  60. package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +1 -1
  61. package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +1 -1
  62. package/dist/cjs/nylas-composer.cjs.entry.js +1 -1
  63. package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +19 -10
  64. package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js.map +1 -1
  65. package/dist/cjs/nylas-editor-tabs.cjs.entry.js +67 -38
  66. package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
  67. package/dist/cjs/nylas-event-description.cjs.entry.js +13 -4
  68. package/dist/cjs/nylas-event-description.cjs.entry.js.map +1 -1
  69. package/dist/cjs/nylas-event-duration.cjs.entry.js +13 -8
  70. package/dist/cjs/nylas-event-duration.cjs.entry.js.map +1 -1
  71. package/dist/cjs/nylas-event-info.cjs.entry.js +1 -1
  72. package/dist/cjs/nylas-event-limits.cjs.entry.js +1 -1
  73. package/dist/cjs/nylas-event-title.cjs.entry.js +50 -10
  74. package/dist/cjs/nylas-event-title.cjs.entry.js.map +1 -1
  75. package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
  76. package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +22 -9
  77. package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js.map +1 -1
  78. package/dist/cjs/nylas-list-configurations.cjs.entry.js +24 -9
  79. package/dist/cjs/nylas-list-configurations.cjs.entry.js.map +1 -1
  80. package/dist/cjs/nylas-list-folders.cjs.entry.js +1 -1
  81. package/dist/cjs/nylas-list-threads.cjs.entry.js +1 -1
  82. package/dist/cjs/nylas-locale-switch.cjs.entry.js +1 -1
  83. package/dist/cjs/nylas-location-component.cjs.entry.js +15 -4
  84. package/dist/cjs/nylas-location-component.cjs.entry.js.map +1 -1
  85. package/dist/cjs/nylas-login.cjs.entry.js +1 -1
  86. package/dist/cjs/nylas-logo.cjs.entry.js +1 -1
  87. package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +1 -1
  88. package/dist/cjs/nylas-mailbox.cjs.entry.js +1 -1
  89. package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js +26 -11
  90. package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js.map +1 -1
  91. package/dist/cjs/nylas-notification.cjs.entry.js +1 -1
  92. package/dist/cjs/nylas-provider.cjs.entry.js +3 -3
  93. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +16 -16
  94. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
  95. package/dist/cjs/nylas-scheduling.cjs.entry.js +1 -1
  96. package/dist/cjs/nylas-selected-event-card.cjs.entry.js +1 -1
  97. package/dist/cjs/nylas-summarize-message-button.cjs.entry.js +2 -2
  98. package/dist/cjs/nylas-threads-refresh.cjs.entry.js +2 -2
  99. package/dist/cjs/nylas-threads-search.cjs.entry.js +1 -1
  100. package/dist/cjs/nylas-time-window-picker.cjs.entry.js +1 -1
  101. package/dist/cjs/nylas-view-email.cjs.entry.js +1 -1
  102. package/dist/cjs/nylas-view-thread.cjs.entry.js +1 -1
  103. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  104. package/dist/cjs/people-icon.cjs.entry.js +1 -1
  105. package/dist/cjs/play-icon.cjs.entry.js +1 -1
  106. package/dist/cjs/play-icon_2.cjs.entry.js +2 -2
  107. package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
  108. package/dist/cjs/reply-all-icon.cjs.entry.js +1 -1
  109. package/dist/cjs/reply-icon.cjs.entry.js +1 -1
  110. package/dist/cjs/{scheduler-config-store-4d93a9b7.js → scheduler-config-store-37690bf0.js} +10 -4
  111. package/dist/cjs/scheduler-config-store-37690bf0.js.map +1 -0
  112. package/dist/cjs/{scheduler-config-store-a0e08cab.js → scheduler-config-store-529c8d7e.js} +10 -4
  113. package/dist/cjs/scheduler-config-store-529c8d7e.js.map +1 -0
  114. package/dist/cjs/{scheduler-store-a492526c.js → scheduler-store-0081970d.js} +15 -2
  115. package/dist/cjs/scheduler-store-0081970d.js.map +1 -0
  116. package/dist/cjs/{scheduler-store-e148a4cc.js → scheduler-store-67dc1986.js} +15 -2
  117. package/dist/cjs/scheduler-store-67dc1986.js.map +1 -0
  118. package/dist/cjs/search-icon.cjs.entry.js +1 -1
  119. package/dist/cjs/select-dropdown.cjs.entry.js +2 -2
  120. package/dist/cjs/sent-icon.cjs.entry.js +1 -1
  121. package/dist/cjs/spam-icon.cjs.entry.js +1 -1
  122. package/dist/cjs/star-icon.cjs.entry.js +1 -1
  123. package/dist/cjs/stop-icon.cjs.entry.js +1 -1
  124. package/dist/cjs/time-period-selector.cjs.entry.js +1 -1
  125. package/dist/cjs/tooltip-component.cjs.entry.js +1 -1
  126. package/dist/cjs/translate-icon.cjs.entry.js +1 -1
  127. package/dist/cjs/trash-icon.cjs.entry.js +1 -1
  128. package/dist/cjs/underline-icon.cjs.entry.js +1 -1
  129. package/dist/cjs/warning-icon.cjs.entry.js +1 -1
  130. package/dist/collection/common/constants.js +9 -0
  131. package/dist/collection/common/constants.js.map +1 -1
  132. package/dist/collection/common/icons/add-circle.js +1 -1
  133. package/dist/collection/common/icons/archive.js +1 -1
  134. package/dist/collection/common/icons/arrow.js +1 -1
  135. package/dist/collection/common/icons/bold.js +1 -1
  136. package/dist/collection/common/icons/calendar-cancel.js +1 -1
  137. package/dist/collection/common/icons/calendar-check.js +1 -1
  138. package/dist/collection/common/icons/calendar-info.js +1 -1
  139. package/dist/collection/common/icons/calendar-patterns.js +1 -1
  140. package/dist/collection/common/icons/calendar.js +1 -1
  141. package/dist/collection/common/icons/checkmark-circle.js +1 -1
  142. package/dist/collection/common/icons/chevron.js +1 -1
  143. package/dist/collection/common/icons/close.js +1 -1
  144. package/dist/collection/common/icons/document-refresh.js +1 -1
  145. package/dist/collection/common/icons/flow.js +1 -1
  146. package/dist/collection/common/icons/folder.js +1 -1
  147. package/dist/collection/common/icons/forward.js +1 -1
  148. package/dist/collection/common/icons/globe.js +1 -1
  149. package/dist/collection/common/icons/google-logo.js +1 -1
  150. package/dist/collection/common/icons/inbox.js +1 -1
  151. package/dist/collection/common/icons/info.js +1 -1
  152. package/dist/collection/common/icons/italic.js +1 -1
  153. package/dist/collection/common/icons/loading.js +1 -1
  154. package/dist/collection/common/icons/location-off.js +1 -1
  155. package/dist/collection/common/icons/location.js +1 -1
  156. package/dist/collection/common/icons/microsoft-logo.js +1 -1
  157. package/dist/collection/common/icons/nylas-logo.js +1 -1
  158. package/dist/collection/common/icons/people.js +1 -1
  159. package/dist/collection/common/icons/play.js +1 -1
  160. package/dist/collection/common/icons/refresh.js +1 -1
  161. package/dist/collection/common/icons/reply-all.js +1 -1
  162. package/dist/collection/common/icons/reply.js +1 -1
  163. package/dist/collection/common/icons/search.js +1 -1
  164. package/dist/collection/common/icons/sent.js +1 -1
  165. package/dist/collection/common/icons/spam.js +1 -1
  166. package/dist/collection/common/icons/star.js +1 -1
  167. package/dist/collection/common/icons/stop.js +1 -1
  168. package/dist/collection/common/icons/translate.js +1 -1
  169. package/dist/collection/common/icons/trash.js +1 -1
  170. package/dist/collection/common/icons/underline.js +1 -1
  171. package/dist/collection/common/icons/warning.js +1 -1
  172. package/dist/collection/common/nylas-api-request.js +12 -1
  173. package/dist/collection/common/nylas-api-request.js.map +1 -1
  174. package/dist/collection/components/design-system/button-component/button-component.css +5 -0
  175. package/dist/collection/components/design-system/button-component/button-component.js +1 -1
  176. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +2 -2
  177. package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +2 -2
  178. package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
  179. package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
  180. package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +1 -1
  181. package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +1 -1
  182. package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +1 -1
  183. package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +1 -1
  184. package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +1 -1
  185. package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +2 -2
  186. package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +2 -2
  187. package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +1 -1
  188. package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +1 -1
  189. package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js +1 -1
  190. package/dist/collection/components/nylas-login/nylas-login.js +1 -1
  191. package/dist/collection/components/nylas-provider/nylas-provider.js +2 -2
  192. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
  193. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +1 -1
  194. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +1 -1
  195. package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
  196. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +1 -1
  197. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +55 -15
  198. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
  199. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +32 -5
  200. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
  201. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +23 -14
  202. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
  203. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +41 -9
  204. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js.map +1 -1
  205. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.css +35 -3
  206. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +99 -36
  207. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  208. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +4 -4
  209. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
  210. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.css +1 -1
  211. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +34 -2
  212. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
  213. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.css +1 -1
  214. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +35 -7
  215. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
  216. package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
  217. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
  218. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.css +8 -1
  219. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +83 -9
  220. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
  221. package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
  222. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +45 -9
  223. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
  224. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.css +39 -2
  225. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +46 -9
  226. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
  227. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.css +2 -2
  228. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js +37 -3
  229. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js.map +1 -1
  230. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +49 -11
  231. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
  232. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +6 -0
  233. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +36 -16
  234. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
  235. package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
  236. package/dist/collection/connector/nylas-scheduler-connector/errors/index.js +8 -0
  237. package/dist/collection/connector/nylas-scheduler-connector/errors/index.js.map +1 -1
  238. package/dist/collection/connector/shared/api/scheduler-config.js +6 -6
  239. package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
  240. package/dist/collection/connector/shared/api/scheduler.js +6 -1
  241. package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
  242. package/dist/collection/index.js +0 -1
  243. package/dist/collection/index.js.map +1 -1
  244. package/dist/collection/stores/scheduler-config-store.js +9 -3
  245. package/dist/collection/stores/scheduler-config-store.js.map +1 -1
  246. package/dist/components/add-circle.js +1 -1
  247. package/dist/components/archive.js +1 -1
  248. package/dist/components/arrow.js +1 -1
  249. package/dist/components/bold.js +1 -1
  250. package/dist/components/button-component2.js +2 -2
  251. package/dist/components/button-component2.js.map +1 -1
  252. package/dist/components/calendar-cancel.js +1 -1
  253. package/dist/components/calendar-check.js +1 -1
  254. package/dist/components/calendar-info.js +1 -1
  255. package/dist/components/calendar-patterns.js +1 -1
  256. package/dist/components/calendar.js +1 -1
  257. package/dist/components/checkmark-circle.js +1 -1
  258. package/dist/components/chevron.js +1 -1
  259. package/dist/components/close.js +1 -1
  260. package/dist/components/constants.js +11 -2
  261. package/dist/components/constants.js.map +1 -1
  262. package/dist/components/document-refresh-icon.js +1 -1
  263. package/dist/components/flow.js +1 -1
  264. package/dist/components/focus-visible.js +1 -1
  265. package/dist/components/folder.js +1 -1
  266. package/dist/components/forward.js +1 -1
  267. package/dist/components/globe.js +1 -1
  268. package/dist/components/google-logo.js +1 -1
  269. package/dist/components/inbox.js +1 -1
  270. package/dist/components/index.d.ts +0 -179
  271. package/dist/components/index.es.js +2 -194
  272. package/dist/components/index.es.js.map +1 -1
  273. package/dist/components/index.js +2 -89
  274. package/dist/components/index.js.map +1 -1
  275. package/dist/components/index2.js +196 -0
  276. package/dist/components/index2.js.map +1 -0
  277. package/dist/components/info.js +1 -1
  278. package/dist/components/italic.js +1 -1
  279. package/dist/components/loading.js +1 -1
  280. package/dist/components/location-off.js +1 -1
  281. package/dist/components/location.js +1 -1
  282. package/dist/components/mailbox-store.js +3 -2
  283. package/dist/components/mailbox-store.js.map +1 -1
  284. package/dist/components/microsoft-logo.js +1 -1
  285. package/dist/components/multi-select-dropdown2.js +3 -3
  286. package/dist/components/nylas-additional-participants.js +2 -2
  287. package/dist/components/nylas-api-request.js +58 -0
  288. package/dist/components/nylas-api-request.js.map +1 -0
  289. package/dist/components/nylas-availability-picker2.js +33 -14
  290. package/dist/components/nylas-availability-picker2.js.map +1 -1
  291. package/dist/components/nylas-booked-event-card2.js +1 -1
  292. package/dist/components/nylas-booking-calendar-picker2.js +12 -5
  293. package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
  294. package/dist/components/nylas-booking-form2.js +1 -1
  295. package/dist/components/nylas-buffer-time2.js +1 -1
  296. package/dist/components/nylas-calendar-picker2.js +13 -8
  297. package/dist/components/nylas-calendar-picker2.js.map +1 -1
  298. package/dist/components/nylas-cancel-booking-form2.js +2 -2
  299. package/dist/components/nylas-cancelled-event-card2.js +2 -2
  300. package/dist/components/nylas-composer2.js +2 -2
  301. package/dist/components/nylas-custom-booking-flow2.js +23 -12
  302. package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
  303. package/dist/components/nylas-date-picker2.js +1 -1
  304. package/dist/components/nylas-editor-tabs2.js +74 -43
  305. package/dist/components/nylas-editor-tabs2.js.map +1 -1
  306. package/dist/components/nylas-event-description2.js +17 -6
  307. package/dist/components/nylas-event-description2.js.map +1 -1
  308. package/dist/components/nylas-event-duration2.js +16 -9
  309. package/dist/components/nylas-event-duration2.js.map +1 -1
  310. package/dist/components/nylas-event-info2.js +2 -2
  311. package/dist/components/nylas-event-limits2.js +2 -2
  312. package/dist/components/nylas-event-title2.js +56 -13
  313. package/dist/components/nylas-event-title2.js.map +1 -1
  314. package/dist/components/nylas-form-card2.js +2 -2
  315. package/dist/components/nylas-if-state.js +1 -1
  316. package/dist/components/nylas-limit-future-bookings2.js +25 -10
  317. package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
  318. package/dist/components/nylas-list-configurations2.js +28 -11
  319. package/dist/components/nylas-list-configurations2.js.map +1 -1
  320. package/dist/components/nylas-list-folders.js +2 -2
  321. package/dist/components/nylas-list-threads.js +2 -2
  322. package/dist/components/nylas-location-component2.js +18 -5
  323. package/dist/components/nylas-location-component2.js.map +1 -1
  324. package/dist/components/nylas-login.js +1 -1
  325. package/dist/components/nylas-logo2.js +1 -1
  326. package/dist/components/nylas-mailbox-pagination.js +1 -1
  327. package/dist/components/nylas-mailbox-toolbar-button.js +2 -2
  328. package/dist/components/nylas-mailbox.js +2 -2
  329. package/dist/components/nylas-min-cancellation-notice2.js +29 -12
  330. package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
  331. package/dist/components/nylas-notification2.js +2 -2
  332. package/dist/components/nylas-provider.js +2 -2
  333. package/dist/components/nylas-scheduler-editor.js +18 -58
  334. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  335. package/dist/components/nylas-scheduling.js +1 -1
  336. package/dist/components/nylas-selected-event-card2.js +1 -1
  337. package/dist/components/nylas-summarize-message-button2.js +3 -3
  338. package/dist/components/nylas-threads-refresh.js +3 -3
  339. package/dist/components/nylas-threads-search.js +2 -2
  340. package/dist/components/nylas-time-window-picker2.js +2 -2
  341. package/dist/components/nylas-timeslot-picker2.js +1 -1
  342. package/dist/components/nylas-view-email2.js +2 -2
  343. package/dist/components/nylas-view-thread.js +2 -2
  344. package/dist/components/people-icon.js +1 -1
  345. package/dist/components/play.js +1 -1
  346. package/dist/components/refresh.js +1 -1
  347. package/dist/components/register-component.js +1 -1
  348. package/dist/components/reply-all.js +1 -1
  349. package/dist/components/reply.js +1 -1
  350. package/dist/components/scheduler-config-store.js +10 -4
  351. package/dist/components/scheduler-config-store.js.map +1 -1
  352. package/dist/components/scheduler-store.js +16 -3
  353. package/dist/components/scheduler-store.js.map +1 -1
  354. package/dist/components/search.js +1 -1
  355. package/dist/components/select-dropdown2.js +2 -2
  356. package/dist/components/sent.js +1 -1
  357. package/dist/components/spam.js +1 -1
  358. package/dist/components/star.js +1 -1
  359. package/dist/components/stop.js +1 -1
  360. package/dist/components/time-period-selector2.js +2 -2
  361. package/dist/components/toolitp-component.js +1 -1
  362. package/dist/components/translate.js +1 -1
  363. package/dist/components/trash.js +1 -1
  364. package/dist/components/underline.js +1 -1
  365. package/dist/components/utils.js +1 -1
  366. package/dist/components/warning.js +1 -1
  367. package/dist/esm/add-circle-icon.entry.js +1 -1
  368. package/dist/esm/add-circle-icon_22.entry.js +222 -92
  369. package/dist/esm/add-circle-icon_22.entry.js.map +1 -1
  370. package/dist/esm/archive-icon.entry.js +1 -1
  371. package/dist/esm/archive-icon_7.entry.js +7 -7
  372. package/dist/esm/arrow-icon.entry.js +1 -1
  373. package/dist/esm/bold-icon.entry.js +1 -1
  374. package/dist/esm/bold-icon_3.entry.js +3 -3
  375. package/dist/esm/button-component.entry.js +2 -2
  376. package/dist/esm/button-component.entry.js.map +1 -1
  377. package/dist/esm/calendar-cancel-icon.entry.js +1 -1
  378. package/dist/esm/calendar-check-icon.entry.js +1 -1
  379. package/dist/esm/calendar-check-icon_2.entry.js +2 -2
  380. package/dist/esm/calendar-icon.entry.js +1 -1
  381. package/dist/esm/calendar-info-icon.entry.js +1 -1
  382. package/dist/esm/calendar-patterns-icon.entry.js +1 -1
  383. package/dist/esm/checkmark-circle-icon.entry.js +1 -1
  384. package/dist/esm/chevron-icon.entry.js +1 -1
  385. package/dist/esm/chevron-icon_3.entry.js +4 -4
  386. package/dist/esm/close-icon.entry.js +1 -1
  387. package/dist/esm/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
  388. package/dist/esm/{constants-335dffcf.js.map → constants-bf39e913.js.map} +1 -1
  389. package/dist/esm/{constants-6ee60d6d.js → constants-f34b9c6e.js} +11 -2
  390. package/dist/esm/{constants-6ee60d6d.js.map → constants-f34b9c6e.js.map} +1 -1
  391. package/dist/esm/document-refresh-icon.entry.js +1 -1
  392. package/dist/esm/flow-icon.entry.js +1 -1
  393. package/dist/esm/folder-icon.entry.js +1 -1
  394. package/dist/esm/forward-icon.entry.js +1 -1
  395. package/dist/esm/forward-icon_6.entry.js +7 -7
  396. package/dist/esm/globe-icon.entry.js +1 -1
  397. package/dist/esm/google-logo-icon.entry.js +1 -1
  398. package/dist/esm/google-logo-icon_4.entry.js +93 -49
  399. package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
  400. package/dist/esm/inbox-icon.entry.js +1 -1
  401. package/dist/esm/index-7cb0dd3d.js +1 -158
  402. package/dist/esm/index-8362ce5c.js +1 -362
  403. package/dist/esm/index.js +1 -1
  404. package/dist/esm/info-icon.entry.js +1 -1
  405. package/dist/esm/info-icon_2.entry.js +2 -2
  406. package/dist/esm/italic-icon.entry.js +1 -1
  407. package/dist/esm/loader.js +1 -1
  408. package/dist/esm/loading-icon.entry.js +1 -1
  409. package/dist/esm/location-icon.entry.js +1 -1
  410. package/dist/esm/location-off-icon.entry.js +1 -1
  411. package/dist/esm/microsoft-logo-icon.entry.js +1 -1
  412. package/dist/esm/multi-select-dropdown.entry.js +2 -2
  413. package/dist/esm/nylas-additional-participants.entry.js +1 -1
  414. package/dist/esm/{nylas-api-request-3120d9ac.js → nylas-api-request-8932547a.js} +13 -2
  415. package/dist/esm/nylas-api-request-8932547a.js.map +1 -0
  416. package/dist/{nylas-web-elements/nylas-api-request-4f3dbb72.js → esm/nylas-api-request-b085294d.js} +13 -2
  417. package/dist/esm/nylas-api-request-b085294d.js.map +1 -0
  418. package/dist/esm/nylas-availability-picker.entry.js +31 -14
  419. package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
  420. package/dist/esm/nylas-booked-event-card.entry.js +1 -1
  421. package/dist/esm/nylas-booked-event-card_10.entry.js +5 -5
  422. package/dist/esm/nylas-booking-calendar-picker.entry.js +10 -4
  423. package/dist/esm/nylas-booking-calendar-picker.entry.js.map +1 -1
  424. package/dist/esm/nylas-calendar-picker.entry.js +11 -6
  425. package/dist/esm/nylas-calendar-picker.entry.js.map +1 -1
  426. package/dist/esm/nylas-cancel-booking-form.entry.js +1 -1
  427. package/dist/esm/nylas-cancelled-event-card.entry.js +1 -1
  428. package/dist/esm/nylas-composer.entry.js +1 -1
  429. package/dist/esm/nylas-custom-booking-flow.entry.js +19 -10
  430. package/dist/esm/nylas-custom-booking-flow.entry.js.map +1 -1
  431. package/dist/esm/nylas-editor-tabs.entry.js +67 -38
  432. package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
  433. package/dist/esm/nylas-event-description.entry.js +13 -4
  434. package/dist/esm/nylas-event-description.entry.js.map +1 -1
  435. package/dist/esm/nylas-event-duration.entry.js +13 -8
  436. package/dist/esm/nylas-event-duration.entry.js.map +1 -1
  437. package/dist/esm/nylas-event-info.entry.js +1 -1
  438. package/dist/esm/nylas-event-limits.entry.js +1 -1
  439. package/dist/esm/nylas-event-title.entry.js +50 -10
  440. package/dist/esm/nylas-event-title.entry.js.map +1 -1
  441. package/dist/esm/nylas-form-card.entry.js +1 -1
  442. package/dist/esm/nylas-limit-future-bookings.entry.js +22 -9
  443. package/dist/esm/nylas-limit-future-bookings.entry.js.map +1 -1
  444. package/dist/esm/nylas-list-configurations.entry.js +24 -9
  445. package/dist/esm/nylas-list-configurations.entry.js.map +1 -1
  446. package/dist/esm/nylas-list-folders.entry.js +1 -1
  447. package/dist/esm/nylas-list-threads.entry.js +1 -1
  448. package/dist/esm/nylas-locale-switch.entry.js +1 -1
  449. package/dist/esm/nylas-location-component.entry.js +15 -4
  450. package/dist/esm/nylas-location-component.entry.js.map +1 -1
  451. package/dist/esm/nylas-login.entry.js +1 -1
  452. package/dist/esm/nylas-logo.entry.js +1 -1
  453. package/dist/esm/nylas-mailbox-toolbar-button.entry.js +1 -1
  454. package/dist/esm/nylas-mailbox.entry.js +1 -1
  455. package/dist/esm/nylas-min-cancellation-notice.entry.js +26 -11
  456. package/dist/esm/nylas-min-cancellation-notice.entry.js.map +1 -1
  457. package/dist/esm/nylas-notification.entry.js +1 -1
  458. package/dist/esm/nylas-provider.entry.js +3 -3
  459. package/dist/esm/nylas-scheduler-editor.entry.js +16 -16
  460. package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
  461. package/dist/esm/nylas-scheduling.entry.js +1 -1
  462. package/dist/esm/nylas-selected-event-card.entry.js +1 -1
  463. package/dist/esm/nylas-summarize-message-button.entry.js +2 -2
  464. package/dist/esm/nylas-threads-refresh.entry.js +2 -2
  465. package/dist/esm/nylas-threads-search.entry.js +1 -1
  466. package/dist/esm/nylas-time-window-picker.entry.js +1 -1
  467. package/dist/esm/nylas-view-email.entry.js +1 -1
  468. package/dist/esm/nylas-view-thread.entry.js +1 -1
  469. package/dist/esm/nylas-web-elements.js +1 -1
  470. package/dist/esm/people-icon.entry.js +1 -1
  471. package/dist/esm/play-icon.entry.js +1 -1
  472. package/dist/esm/play-icon_2.entry.js +2 -2
  473. package/dist/esm/refresh-icon.entry.js +1 -1
  474. package/dist/esm/reply-all-icon.entry.js +1 -1
  475. package/dist/esm/reply-icon.entry.js +1 -1
  476. package/dist/esm/{scheduler-config-store-6222c0ed.js → scheduler-config-store-07d98279.js} +10 -4
  477. package/dist/esm/scheduler-config-store-07d98279.js.map +1 -0
  478. package/dist/esm/{scheduler-config-store-0efc3519.js → scheduler-config-store-8f2e658e.js} +10 -4
  479. package/dist/esm/scheduler-config-store-8f2e658e.js.map +1 -0
  480. package/dist/{nylas-web-elements/scheduler-store-8ddcc496.js → esm/scheduler-store-66c2168c.js} +15 -2
  481. package/dist/esm/scheduler-store-66c2168c.js.map +1 -0
  482. package/dist/esm/{scheduler-store-39d37291.js → scheduler-store-a175fc3e.js} +15 -2
  483. package/dist/esm/scheduler-store-a175fc3e.js.map +1 -0
  484. package/dist/esm/search-icon.entry.js +1 -1
  485. package/dist/esm/select-dropdown.entry.js +2 -2
  486. package/dist/esm/sent-icon.entry.js +1 -1
  487. package/dist/esm/spam-icon.entry.js +1 -1
  488. package/dist/esm/star-icon.entry.js +1 -1
  489. package/dist/esm/stop-icon.entry.js +1 -1
  490. package/dist/esm/time-period-selector.entry.js +1 -1
  491. package/dist/esm/tooltip-component.entry.js +1 -1
  492. package/dist/esm/translate-icon.entry.js +1 -1
  493. package/dist/esm/trash-icon.entry.js +1 -1
  494. package/dist/esm/underline-icon.entry.js +1 -1
  495. package/dist/esm/warning-icon.entry.js +1 -1
  496. package/dist/nylas-web-elements/add-circle-icon.entry.js +1 -1
  497. package/dist/nylas-web-elements/archive-icon.entry.js +1 -1
  498. package/dist/nylas-web-elements/arrow-icon.entry.js +1 -1
  499. package/dist/nylas-web-elements/bold-icon.entry.js +1 -1
  500. package/dist/nylas-web-elements/button-component.entry.js +2 -2
  501. package/dist/nylas-web-elements/button-component.entry.js.map +1 -1
  502. package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +1 -1
  503. package/dist/nylas-web-elements/calendar-check-icon.entry.js +1 -1
  504. package/dist/nylas-web-elements/calendar-icon.entry.js +1 -1
  505. package/dist/nylas-web-elements/calendar-info-icon.entry.js +1 -1
  506. package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +1 -1
  507. package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +1 -1
  508. package/dist/nylas-web-elements/chevron-icon.entry.js +1 -1
  509. package/dist/nylas-web-elements/close-icon.entry.js +1 -1
  510. package/dist/nylas-web-elements/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
  511. package/dist/nylas-web-elements/{constants-335dffcf.js.map → constants-bf39e913.js.map} +1 -1
  512. package/dist/nylas-web-elements/document-refresh-icon.entry.js +1 -1
  513. package/dist/nylas-web-elements/flow-icon.entry.js +1 -1
  514. package/dist/nylas-web-elements/folder-icon.entry.js +1 -1
  515. package/dist/nylas-web-elements/forward-icon.entry.js +1 -1
  516. package/dist/nylas-web-elements/globe-icon.entry.js +1 -1
  517. package/dist/nylas-web-elements/google-logo-icon.entry.js +1 -1
  518. package/dist/nylas-web-elements/inbox-icon.entry.js +1 -1
  519. package/dist/nylas-web-elements/index.esm.js +1 -1
  520. package/dist/nylas-web-elements/info-icon.entry.js +1 -1
  521. package/dist/nylas-web-elements/italic-icon.entry.js +1 -1
  522. package/dist/nylas-web-elements/loading-icon.entry.js +1 -1
  523. package/dist/nylas-web-elements/location-icon.entry.js +1 -1
  524. package/dist/nylas-web-elements/location-off-icon.entry.js +1 -1
  525. package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +1 -1
  526. package/dist/nylas-web-elements/multi-select-dropdown.entry.js +2 -2
  527. package/dist/nylas-web-elements/nylas-additional-participants.entry.js +1 -1
  528. package/dist/{esm/nylas-api-request-4f3dbb72.js → nylas-web-elements/nylas-api-request-b085294d.js} +13 -2
  529. package/dist/nylas-web-elements/nylas-api-request-b085294d.js.map +1 -0
  530. package/dist/nylas-web-elements/nylas-availability-picker.entry.js +31 -14
  531. package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
  532. package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +1 -1
  533. package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +10 -4
  534. package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js.map +1 -1
  535. package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +11 -6
  536. package/dist/nylas-web-elements/nylas-calendar-picker.entry.js.map +1 -1
  537. package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +1 -1
  538. package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +1 -1
  539. package/dist/nylas-web-elements/nylas-composer.entry.js +1 -1
  540. package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +19 -10
  541. package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js.map +1 -1
  542. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +67 -38
  543. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
  544. package/dist/nylas-web-elements/nylas-event-description.entry.js +13 -4
  545. package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
  546. package/dist/nylas-web-elements/nylas-event-duration.entry.js +13 -8
  547. package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
  548. package/dist/nylas-web-elements/nylas-event-info.entry.js +1 -1
  549. package/dist/nylas-web-elements/nylas-event-limits.entry.js +1 -1
  550. package/dist/nylas-web-elements/nylas-event-title.entry.js +50 -10
  551. package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
  552. package/dist/nylas-web-elements/nylas-form-card.entry.js +1 -1
  553. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +22 -9
  554. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js.map +1 -1
  555. package/dist/nylas-web-elements/nylas-list-configurations.entry.js +24 -9
  556. package/dist/nylas-web-elements/nylas-list-configurations.entry.js.map +1 -1
  557. package/dist/nylas-web-elements/nylas-list-folders.entry.js +1 -1
  558. package/dist/nylas-web-elements/nylas-list-threads.entry.js +1 -1
  559. package/dist/nylas-web-elements/nylas-locale-switch.entry.js +1 -1
  560. package/dist/nylas-web-elements/nylas-location-component.entry.js +15 -4
  561. package/dist/nylas-web-elements/nylas-location-component.entry.js.map +1 -1
  562. package/dist/nylas-web-elements/nylas-login.entry.js +1 -1
  563. package/dist/nylas-web-elements/nylas-logo.entry.js +1 -1
  564. package/dist/nylas-web-elements/nylas-mailbox-toolbar-button.entry.js +1 -1
  565. package/dist/nylas-web-elements/nylas-mailbox.entry.js +1 -1
  566. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +26 -11
  567. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js.map +1 -1
  568. package/dist/nylas-web-elements/nylas-notification.entry.js +1 -1
  569. package/dist/nylas-web-elements/nylas-provider.entry.js +3 -3
  570. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +16 -16
  571. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
  572. package/dist/nylas-web-elements/nylas-scheduling.entry.js +1 -1
  573. package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +1 -1
  574. package/dist/nylas-web-elements/nylas-summarize-message-button.entry.js +2 -2
  575. package/dist/nylas-web-elements/nylas-threads-refresh.entry.js +2 -2
  576. package/dist/nylas-web-elements/nylas-threads-search.entry.js +1 -1
  577. package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +1 -1
  578. package/dist/nylas-web-elements/nylas-view-email.entry.js +1 -1
  579. package/dist/nylas-web-elements/nylas-view-thread.entry.js +1 -1
  580. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  581. package/dist/nylas-web-elements/p-00a9efc1.entry.js +2 -0
  582. package/dist/nylas-web-elements/p-1a91cce5.entry.js +2 -0
  583. package/dist/nylas-web-elements/p-1a91cce5.entry.js.map +1 -0
  584. package/dist/nylas-web-elements/{p-fe3b8e66.entry.js → p-1d25ca06.entry.js} +2 -2
  585. package/dist/nylas-web-elements/p-1e445e86.entry.js +2 -0
  586. package/dist/nylas-web-elements/{p-7692056f.entry.js → p-2081b475.entry.js} +2 -2
  587. package/dist/nylas-web-elements/p-22e5436c.js +2 -0
  588. package/dist/nylas-web-elements/p-22e5436c.js.map +1 -0
  589. package/dist/nylas-web-elements/p-2b636359.entry.js +2 -0
  590. package/dist/nylas-web-elements/p-2b636359.entry.js.map +1 -0
  591. package/dist/nylas-web-elements/{p-618b94cd.entry.js → p-30784693.entry.js} +2 -2
  592. package/dist/nylas-web-elements/{p-1260ac06.entry.js → p-33b940fb.entry.js} +2 -2
  593. package/dist/nylas-web-elements/p-343a02e1.entry.js +2 -0
  594. package/dist/nylas-web-elements/{p-674b6d5d.entry.js → p-343b8684.entry.js} +2 -2
  595. package/dist/nylas-web-elements/{p-1c94940d.entry.js → p-3909ec3f.entry.js} +2 -2
  596. package/dist/nylas-web-elements/{p-9c399019.entry.js → p-3b281401.entry.js} +2 -2
  597. package/dist/nylas-web-elements/{p-55368bc0.entry.js → p-42791515.entry.js} +2 -2
  598. package/dist/nylas-web-elements/p-44a9ce77.entry.js +2 -0
  599. package/dist/nylas-web-elements/{p-1819b3d7.js → p-49f716ed.js} +4 -4
  600. package/dist/nylas-web-elements/p-49f716ed.js.map +1 -0
  601. package/dist/nylas-web-elements/{p-1ab25f04.entry.js → p-50b4a80f.entry.js} +2 -2
  602. package/dist/nylas-web-elements/{p-266f9995.entry.js → p-571472d4.entry.js} +2 -2
  603. package/dist/nylas-web-elements/{p-57b753c6.entry.js → p-607b547b.entry.js} +2 -2
  604. package/dist/nylas-web-elements/{p-424f4d9a.entry.js → p-6110351b.entry.js} +2 -2
  605. package/dist/nylas-web-elements/{p-1655dec3.entry.js → p-665ef10b.entry.js} +4 -4
  606. package/dist/nylas-web-elements/p-665ef10b.entry.js.map +1 -0
  607. package/dist/nylas-web-elements/{p-945caf14.entry.js → p-694b511a.entry.js} +2 -2
  608. package/dist/nylas-web-elements/{p-18a936a3.entry.js → p-73c062f8.entry.js} +2 -2
  609. package/dist/nylas-web-elements/{p-c451c9e1.entry.js → p-75a8d077.entry.js} +2 -2
  610. package/dist/nylas-web-elements/{p-c199d203.entry.js → p-80d6175c.entry.js} +2 -2
  611. package/dist/nylas-web-elements/p-939db546.entry.js +2 -0
  612. package/dist/nylas-web-elements/{p-858f0aad.entry.js → p-95a3094a.entry.js} +2 -2
  613. package/dist/nylas-web-elements/p-a628eaeb.js +2 -0
  614. package/dist/nylas-web-elements/p-a628eaeb.js.map +1 -0
  615. package/dist/nylas-web-elements/{p-04e3a98e.entry.js → p-ad64c2b8.entry.js} +2 -2
  616. package/dist/nylas-web-elements/{p-8b1a6e27.entry.js → p-b25821e1.entry.js} +2 -2
  617. package/dist/nylas-web-elements/{p-572bf8c2.entry.js → p-b53062f7.entry.js} +2 -2
  618. package/dist/nylas-web-elements/{p-3f6155de.entry.js → p-bbf9aff2.entry.js} +2 -2
  619. package/dist/nylas-web-elements/p-c20ab972.entry.js +2 -0
  620. package/dist/nylas-web-elements/{p-ae893050.entry.js → p-cc674b3b.entry.js} +3 -3
  621. package/dist/nylas-web-elements/{p-9d4bffbb.entry.js → p-d8f09631.entry.js} +2 -2
  622. package/dist/nylas-web-elements/p-db15d382.js +2 -0
  623. package/dist/nylas-web-elements/p-db15d382.js.map +1 -0
  624. package/dist/nylas-web-elements/{p-81ea7310.entry.js → p-df6d54c7.entry.js} +2 -2
  625. package/dist/nylas-web-elements/{p-370cdcca.entry.js → p-f154a362.entry.js} +2 -2
  626. package/dist/nylas-web-elements/{p-9b195811.entry.js → p-f1f8f745.entry.js} +2 -2
  627. package/dist/nylas-web-elements/people-icon.entry.js +1 -1
  628. package/dist/nylas-web-elements/play-icon.entry.js +1 -1
  629. package/dist/nylas-web-elements/refresh-icon.entry.js +1 -1
  630. package/dist/nylas-web-elements/reply-all-icon.entry.js +1 -1
  631. package/dist/nylas-web-elements/reply-icon.entry.js +1 -1
  632. package/dist/nylas-web-elements/{scheduler-config-store-0efc3519.js → scheduler-config-store-8f2e658e.js} +10 -4
  633. package/dist/nylas-web-elements/scheduler-config-store-8f2e658e.js.map +1 -0
  634. package/dist/{esm/scheduler-store-8ddcc496.js → nylas-web-elements/scheduler-store-66c2168c.js} +15 -2
  635. package/dist/nylas-web-elements/scheduler-store-66c2168c.js.map +1 -0
  636. package/dist/nylas-web-elements/search-icon.entry.js +1 -1
  637. package/dist/nylas-web-elements/select-dropdown.entry.js +2 -2
  638. package/dist/nylas-web-elements/sent-icon.entry.js +1 -1
  639. package/dist/nylas-web-elements/spam-icon.entry.js +1 -1
  640. package/dist/nylas-web-elements/star-icon.entry.js +1 -1
  641. package/dist/nylas-web-elements/stop-icon.entry.js +1 -1
  642. package/dist/nylas-web-elements/time-period-selector.entry.js +1 -1
  643. package/dist/nylas-web-elements/tooltip-component.entry.js +1 -1
  644. package/dist/nylas-web-elements/translate-icon.entry.js +1 -1
  645. package/dist/nylas-web-elements/trash-icon.entry.js +1 -1
  646. package/dist/nylas-web-elements/underline-icon.entry.js +1 -1
  647. package/dist/nylas-web-elements/warning-icon.entry.js +1 -1
  648. package/dist/types/common/constants.d.ts +2 -0
  649. package/dist/types/common/nylas-api-request.d.ts +3 -0
  650. package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +10 -4
  651. package/dist/types/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.d.ts +2 -0
  652. package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +3 -2
  653. package/dist/types/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.d.ts +4 -1
  654. package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +35 -5
  655. package/dist/types/components/scheduler-editor/nylas-event-description/nylas-event-description.d.ts +3 -0
  656. package/dist/types/components/scheduler-editor/nylas-event-duration/nylas-event-duration.d.ts +3 -0
  657. package/dist/types/components/scheduler-editor/nylas-event-title/nylas-event-title.d.ts +6 -1
  658. package/dist/types/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.d.ts +6 -6
  659. package/dist/types/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.d.ts +2 -0
  660. package/dist/types/components/scheduler-editor/nylas-location-component/nylas-location-component.d.ts +3 -0
  661. package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +4 -1
  662. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +3 -2
  663. package/dist/types/components.d.ts +110 -22
  664. package/dist/types/connector/nylas-connector/index.d.ts +1 -1
  665. package/dist/types/connector/nylas-scheduler-config-connector/index.d.ts +1 -1
  666. package/dist/types/connector/nylas-scheduler-connector/errors/index.d.ts +1 -0
  667. package/dist/types/index.d.ts +1 -1
  668. package/dist/types/stores/scheduler-config-store.d.ts +6 -2
  669. package/package.json +4 -2
  670. package/dist/cjs/nylas-api-request-2a0e7022.js.map +0 -1
  671. package/dist/cjs/nylas-api-request-55923233.js.map +0 -1
  672. package/dist/cjs/scheduler-config-store-4d93a9b7.js.map +0 -1
  673. package/dist/cjs/scheduler-config-store-a0e08cab.js.map +0 -1
  674. package/dist/cjs/scheduler-store-a492526c.js.map +0 -1
  675. package/dist/cjs/scheduler-store-e148a4cc.js.map +0 -1
  676. package/dist/esm/nylas-api-request-3120d9ac.js.map +0 -1
  677. package/dist/esm/nylas-api-request-4f3dbb72.js.map +0 -1
  678. package/dist/esm/scheduler-config-store-0efc3519.js.map +0 -1
  679. package/dist/esm/scheduler-config-store-6222c0ed.js.map +0 -1
  680. package/dist/esm/scheduler-store-39d37291.js.map +0 -1
  681. package/dist/esm/scheduler-store-8ddcc496.js.map +0 -1
  682. package/dist/nylas-web-elements/nylas-api-request-4f3dbb72.js.map +0 -1
  683. package/dist/nylas-web-elements/p-0edb3b69.entry.js +0 -2
  684. package/dist/nylas-web-elements/p-1655dec3.entry.js.map +0 -1
  685. package/dist/nylas-web-elements/p-1819b3d7.js.map +0 -1
  686. package/dist/nylas-web-elements/p-1aa7b357.js +0 -2
  687. package/dist/nylas-web-elements/p-1aa7b357.js.map +0 -1
  688. package/dist/nylas-web-elements/p-1f843391.js +0 -2
  689. package/dist/nylas-web-elements/p-1f843391.js.map +0 -1
  690. package/dist/nylas-web-elements/p-3116f5cc.js +0 -2
  691. package/dist/nylas-web-elements/p-3116f5cc.js.map +0 -1
  692. package/dist/nylas-web-elements/p-47180df9.entry.js +0 -2
  693. package/dist/nylas-web-elements/p-605142a9.entry.js +0 -2
  694. package/dist/nylas-web-elements/p-6dcc9411.entry.js +0 -2
  695. package/dist/nylas-web-elements/p-6dcc9411.entry.js.map +0 -1
  696. package/dist/nylas-web-elements/p-9d0c0340.entry.js +0 -2
  697. package/dist/nylas-web-elements/p-9d75bcb2.entry.js +0 -2
  698. package/dist/nylas-web-elements/p-9d75bcb2.entry.js.map +0 -1
  699. package/dist/nylas-web-elements/p-be7124f0.entry.js +0 -2
  700. package/dist/nylas-web-elements/p-c45ac7c6.entry.js +0 -2
  701. package/dist/nylas-web-elements/scheduler-config-store-0efc3519.js.map +0 -1
  702. package/dist/nylas-web-elements/scheduler-store-8ddcc496.js.map +0 -1
  703. /package/dist/nylas-web-elements/{p-c45ac7c6.entry.js.map → p-00a9efc1.entry.js.map} +0 -0
  704. /package/dist/nylas-web-elements/{p-fe3b8e66.entry.js.map → p-1d25ca06.entry.js.map} +0 -0
  705. /package/dist/nylas-web-elements/{p-47180df9.entry.js.map → p-1e445e86.entry.js.map} +0 -0
  706. /package/dist/nylas-web-elements/{p-7692056f.entry.js.map → p-2081b475.entry.js.map} +0 -0
  707. /package/dist/nylas-web-elements/{p-618b94cd.entry.js.map → p-30784693.entry.js.map} +0 -0
  708. /package/dist/nylas-web-elements/{p-1260ac06.entry.js.map → p-33b940fb.entry.js.map} +0 -0
  709. /package/dist/nylas-web-elements/{p-be7124f0.entry.js.map → p-343a02e1.entry.js.map} +0 -0
  710. /package/dist/nylas-web-elements/{p-674b6d5d.entry.js.map → p-343b8684.entry.js.map} +0 -0
  711. /package/dist/nylas-web-elements/{p-1c94940d.entry.js.map → p-3909ec3f.entry.js.map} +0 -0
  712. /package/dist/nylas-web-elements/{p-9c399019.entry.js.map → p-3b281401.entry.js.map} +0 -0
  713. /package/dist/nylas-web-elements/{p-55368bc0.entry.js.map → p-42791515.entry.js.map} +0 -0
  714. /package/dist/nylas-web-elements/{p-605142a9.entry.js.map → p-44a9ce77.entry.js.map} +0 -0
  715. /package/dist/nylas-web-elements/{p-1ab25f04.entry.js.map → p-50b4a80f.entry.js.map} +0 -0
  716. /package/dist/nylas-web-elements/{p-266f9995.entry.js.map → p-571472d4.entry.js.map} +0 -0
  717. /package/dist/nylas-web-elements/{p-57b753c6.entry.js.map → p-607b547b.entry.js.map} +0 -0
  718. /package/dist/nylas-web-elements/{p-424f4d9a.entry.js.map → p-6110351b.entry.js.map} +0 -0
  719. /package/dist/nylas-web-elements/{p-945caf14.entry.js.map → p-694b511a.entry.js.map} +0 -0
  720. /package/dist/nylas-web-elements/{p-18a936a3.entry.js.map → p-73c062f8.entry.js.map} +0 -0
  721. /package/dist/nylas-web-elements/{p-c451c9e1.entry.js.map → p-75a8d077.entry.js.map} +0 -0
  722. /package/dist/nylas-web-elements/{p-c199d203.entry.js.map → p-80d6175c.entry.js.map} +0 -0
  723. /package/dist/nylas-web-elements/{p-9d0c0340.entry.js.map → p-939db546.entry.js.map} +0 -0
  724. /package/dist/nylas-web-elements/{p-858f0aad.entry.js.map → p-95a3094a.entry.js.map} +0 -0
  725. /package/dist/nylas-web-elements/{p-04e3a98e.entry.js.map → p-ad64c2b8.entry.js.map} +0 -0
  726. /package/dist/nylas-web-elements/{p-8b1a6e27.entry.js.map → p-b25821e1.entry.js.map} +0 -0
  727. /package/dist/nylas-web-elements/{p-572bf8c2.entry.js.map → p-b53062f7.entry.js.map} +0 -0
  728. /package/dist/nylas-web-elements/{p-3f6155de.entry.js.map → p-bbf9aff2.entry.js.map} +0 -0
  729. /package/dist/nylas-web-elements/{p-0edb3b69.entry.js.map → p-c20ab972.entry.js.map} +0 -0
  730. /package/dist/nylas-web-elements/{p-ae893050.entry.js.map → p-cc674b3b.entry.js.map} +0 -0
  731. /package/dist/nylas-web-elements/{p-9d4bffbb.entry.js.map → p-d8f09631.entry.js.map} +0 -0
  732. /package/dist/nylas-web-elements/{p-81ea7310.entry.js.map → p-df6d54c7.entry.js.map} +0 -0
  733. /package/dist/nylas-web-elements/{p-370cdcca.entry.js.map → p-f154a362.entry.js.map} +0 -0
  734. /package/dist/nylas-web-elements/{p-9b195811.entry.js.map → p-f1f8f745.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as e,h as t,c as n,H as a,a as s}from"./p-68c2fadf.js";import{R as i}from"./p-eaa9151b.js";import{a as o,m as r}from"./p-41dc0d93.js";import"./p-cb65c223.js";const c=".sc-google-logo-icon-h{display:flex}";const d=c;const l=class{constructor(t){e(this,t);this.width="24";this.height="24"}render(){return t("svg",{key:"e71880e55c9352a0e1ee2ad058727601f35e3ce4",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("g",{key:"7fec6b17669641c93baae51ca32571112071fef7","clip-path":"url(#clip0_959_12452)"},t("path",{key:"dc78e953321de09b2eb1a617d36757840fa3bc77",d:"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z",fill:"#4285F4"}),t("path",{key:"fd3fa31399c0daddb0666b5e5bfa22df37d707ed",d:"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z",fill:"#34A853"}),t("path",{key:"ba6682324108438a8d09fd8c2f485fd902ac7d1e",d:"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z",fill:"#FBBC05"}),t("path",{key:"8f343c03d1881b1db41b2f259c58b0ad37256909",d:"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z",fill:"#EA4335"})),t("defs",{key:"d139b2306583164474093240ab884fddbe240f16"},t("clipPath",{key:"d54b7ab509f646be7407b61c0e6b49765f5325d7",id:"clip0_959_12452"},t("rect",{key:"ac9a24a627127c049b291447ce1198424416f4ae",width:24,height:24,fill:"white"}))))}};l.style=d;const b=".sc-microsoft-logo-icon-h{display:flex}";const f=b;const y=class{constructor(t){e(this,t);this.width="22";this.height="22"}render(){return t("svg",{key:"48516ac28c70d446ba44e3b65252920c4e8d3b06",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"29c0f58e11eb99e946fd2dcb33ef603620305d9d",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),t("path",{key:"6b5303ad19e48b6c0ad9842ee748dc7db17e2a68",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),t("path",{key:"278ce5362ac072c57040ad1bf944557f71809b5f",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),t("path",{key:"9c2b9b9c87a902dd80cae38db0c46c94435903c2",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};y.style=f;function p({id:e,formState:n,activeTab:a,calendars:s}){switch(a){case"eventInfo":const a=n.title;const i=n.description;const o=parseInt(n.duration);const r=n.location;return t("div",{key:e},t("nylas-event-info",null,t("div",{slot:"inputs"},t("nylas-event-title",{name:"title",eventTitle:a,exportparts:"net, net__title, net__dropdown-content"}),t("nylas-event-duration",{name:"duration",eventDurationMinutes:o,exportparts:"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content"}),t("nylas-location-component",{name:"location",eventLocation:r,exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),t("nylas-event-description",{name:"description",eventDescription:i,exportparts:"nedesc, nedesc__textarea"}))));case"availability":const c=n.availability;const d=c?.[0]?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone;const l=n.participants?.find((e=>e.is_organizer));const b=l?.email??"primary";const f=n.calendarIds.length>0?n.calendarIds:[b];const y=n.bookingCalendar=="primary"?b:n.bookingCalendar;return t("div",{key:e},t("nylas-booking-calendar-picker",{name:"booking-calendar",calendars:s??[],defaultBookingCalendar:y,exportparts:"nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content"}),t("nylas-calendar-picker",{name:"calendars",calendars:s??[],defaultSelectedCalendars:f,organizerEmail:b,exportparts:"ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content"}),t("nylas-availability-picker",{name:"availability",openHours:c,defaultTimezone:d,exportparts:"nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times"}));case"bookingOptions":return t("div",{key:e},e=="new"&&t("p",null,"Config"),t("nylas-buffer-time",{name:"buffer-time",buffer:n.buffer,exportparts:"nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview"}),t("nylas-custom-booking-flow",{name:"booking-type",bookingType:n.bookingType,exportparts:"ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content"}),t("nylas-event-limits",null,t("div",{slot:"inputs"},t("nylas-limit-future-bookings",{name:"limit-future-bookings",availableDaysInFuture:n.availableDaysInFuture,exportparts:"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content"}),t("nylas-min-cancellation-notice",{name:"min-cancellation-notice",minCancellationNotice:n.minCancellationNotice,exportparts:"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content"}))))}}const u='.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs .unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs .saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}';const h=u;var g=undefined&&undefined.__decorate||function(e,t,n,a){var s=arguments.length,i=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,n):a,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(e,t,n,a);else for(var r=e.length-1;r>=0;r--)if(o=e[r])i=(s<3?o(i):s>3?o(t,n,i):o(t,n))||i;return s>3&&i&&Object.defineProperty(t,n,i),i};var m=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const _=class{constructor(t){e(this,t);this.schedulerConfigChanged=n(this,"schedulerConfigChanged",7);this.cancelButtonClick=n(this,"cancelButtonClick",7);this.previewButtonClicked=n(this,"previewButtonClicked",7);this.formSubmissionHandler=async e=>{e.preventDefault();this.isLoading=true;this.hasUnsavedChanges=false;this.updateFormState();const{title:t,description:n,duration:a,availability:s,calendarIds:i,bookingCalendar:o,location:r,bookingType:c,buffer:d,availableDaysInFuture:l,minCancellationNotice:b}=this.formState;const f=this.config?.participants?.find((e=>e.is_organizer));const y={...this.config?.id&&{id:this.config.id},version:this.config?.version??"1.0.0",availability:{duration_minutes:a?parseInt(a):0,availability_rules:{availability_method:this.config?.availability?.availability_rules?.availability_method??"collective",buffer:d||{before:0,after:0},default_open_hours:this.config?.availability?.availability_rules?.default_open_hours??[],round_robin_group_id:this.config?.availability?.availability_rules?.round_robin_group_id??""}},participants:[{name:f?.name??f?.email??this.currentUser?.name??this.currentUser?.email??"",email:f?.email??this.currentUser?.email??"",is_organizer:true,availability:{calendar_ids:i?.length?i:["primary"],open_hours:s??[]},booking:{calendar_id:o&&o!==""?o:"primary"}}],event_booking:{title:t?.toString()??"",description:n?.toString()??"",location:r?.toString()??"",booking_type:c?.toString()??"booking"},scheduler:{available_days_in_future:l??30,min_cancellation_notice:b??0}};const p=e=>{this.isLoading=false;this.changesSaved=true;setTimeout((()=>{this.changesSaved=false}),5e3)};this.schedulerConfigChanged.emit({config:y,resetLoadingState:p,action:this.action})};this.calendars=undefined;this.config=undefined;this.currentUser=undefined;this.schedulerPreviewLink="";this.action="create";this.activeTab="eventInfo";this.isLoading=false;this.hasUnsavedChanges=false;this.changesSaved=false;this.formState={}}configChangedHandler(e){o("[nylas-editor-tabs]","configChangedHandler",e,this.config);this.formState={...this.getFormStateFromConfig(e)};if(e.id){this.action="edit"}else{this.action="create"}}connectedCallback(){o("[nylas-editor-tabs]","connectedCallback")}componentWillLoad(){o("[nylas-editor-tabs]","componentWillLoad");this.formState=this.getFormStateFromConfig(this.config)}componentDidLoad(){o("[nylas-editor-tabs]","componentDidLoad")}disconnectedCallback(){o("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(e){o("[nylas-editor-tabs]","handleValueChanged",e);this.formState={...this.formState,[e.detail.name]:e.detail.value};this.hasUnsavedChanges=true}getFormStateFromConfig(e){const t=e?.participants?.find((e=>e.is_organizer));return{title:e?.event_booking?.title??"",description:e?.event_booking?.description??"",duration:e?.availability?.duration_minutes?.toString()??"10",availability:t?.availability?.open_hours??undefined,calendarIds:t?.availability?.calendar_ids??[],participants:e?.participants??[],bookingCalendar:t?.booking?.calendar_id??t?.email??"",location:this.config?.event_booking?.location??"",bookingType:this.config?.event_booking?.booking_type??"booking",buffer:this.config?.availability?.availability_rules?.buffer??{before:0,after:0},availableDaysInFuture:this.config?.scheduler?.available_days_in_future??30,minCancellationNotice:this.config?.scheduler?.min_cancellation_notice??0}}updateFormState(){const e=new FormData(this.formRef);e.forEach(((e,t)=>{switch(t){case"title":this.formState.title=e.toString();break;case"description":this.formState.description=e.toString();break;case"duration":this.formState.duration=e.toString();break;case"availability":this.formState.availability=JSON.parse(e.toString());break;case"participants":this.formState.participants=JSON.parse(e.toString());break;case"calendars":this.formState.calendarIds=e.toString().split(",");break;case"booking-calendar":this.formState.bookingCalendar=e.toString();break;case"location":this.formState.location=e.toString();break;case"booking-type":this.formState.bookingType=e.toString();break;case"buffer-time":this.formState.buffer=JSON.parse(e.toString());break;case"limit-future-bookings":this.formState.availableDaysInFuture=parseInt(e.toString());break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(e.toString());break}}));this.formState={...this.formState}}setActiveTab(e,t){e.preventDefault();this.updateFormState();this.activeTab=t}render(){o("[nylas-editor-tabs]","render",this.formState);return t(a,{key:"5a1e8ee246d47626dce5515c3ec4df3e6ae893a4"},t("form",{key:"f49d1fa60f2724c5cae8c1328dfee945ae24f1e2",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:e=>this.formRef=e},t("div",{key:"f0b678836e12c3878128e4b810e5541f00ddee29",class:"form-contents"},t("div",{key:"910dc155a6b7b01e300084fe405da0d0b0801847",class:"tabs"},t("button",{key:"80ca54ac98ae0d3b2298ae62253ffcb9d3ae539d",class:{tab:true,active:this.activeTab=="eventInfo"},onClick:e=>this.setActiveTab(e,"eventInfo")},t("calendar-info-icon",{key:"842e45f308921afa7948f8408b84f95d7b802850",width:"16",height:"16"}),"Event Info"),t("button",{key:"7b79207240cbae5dcd554d448f68dc544f2e6c80",class:{tab:true,active:this.activeTab=="availability"},onClick:e=>this.setActiveTab(e,"availability")},t("calendar-patterns-icon",{key:"47b3d8cf7ee50eac7d377ab3faf35c27f1215e96",width:"16",height:"16"}),"Availability"),t("button",{key:"ffb175caa6ccc4ba377ee4947759d0561ebb089b",class:{tab:true,active:this.activeTab=="bookingOptions"},onClick:e=>this.setActiveTab(e,"bookingOptions")},t("flow-icon",{key:"fc3bec08bd5080e7b2ec7816bb3c021876c20d7c",width:"16",height:"16"}),"Booking Options")),t("div",{key:"80802e1388eb767bcea718907e75d5b4a2de3701",class:"tab-content"},t(p,{key:"5c5618341227447d2a41061f415e54d83efc354a",formState:this.formState,activeTab:this.activeTab,calendars:this.calendars,id:this.config?.id??"new"}))),t("div",{key:"d315bad7ea2efe6699557a5e07b55053926a7517",class:"footer"},t("div",{key:"4c92a480ee6d2f04d9fa36f3e870d414835406e1",class:"preview"},this.schedulerPreviewLink!==""&&this.action==="edit"&&t("button-component",{type:"button",disabled:this.isLoading,clickHandler:e=>{e.preventDefault();const t=this.previewButtonClicked.emit(this.host);if(!t.defaultPrevented){window.open(r(this.schedulerPreviewLink,this.config),"_blank")}},variant:"basic"},"Preview")),t("div",{key:"22fdd2183dcc2c299d2fdacf0db8922a95a5692e",class:"buttons"},t("p",{key:"63ea7b4d8362f409caec467a7bce22142ccc1b20",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved}},this.hasUnsavedChanges&&!this.changesSaved?"Unsaved changes":this.changesSaved?"Changes saved!":""),t("button-component",{key:"6ceded872ee5510234ff79bff3f0173a72314714",type:"button",disabled:this.isLoading,clickHandler:e=>{e.preventDefault();this.cancelButtonClick.emit()},variant:"basic"},"Cancel"),t("button-component",{key:"4f33ad6071f503837395d900b67fafc8605d8043",type:"submit",disabled:this.isLoading},this.isLoading?t("span",null,"Saving",t("loading-icon",null)," "):this.action=="create"?"Create":"Save changes")))))}get host(){return s(this)}static get watchers(){return{config:["configChangedHandler"]}}};g([i({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.config","config"],["schedulerConfig.currentUser","currentUser"]]),eventToProps:{schedulerConfigChanged:async(e,t)=>{const{resetLoadingState:n,action:a,config:s}=e.detail;if(n){n(e)}if(a==="edit"){await t.schedulerConfig.updateConfiguration(s)}else{await t.schedulerConfig.createConfiguration(s)}},cancelButtonClick:async(e,t)=>{t.schedulerConfigStore.state.action=null}},localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),fireRegisterEvent:true}),m("design:type",Function),m("design:paramtypes",[]),m("design:returntype",void 0)],_.prototype,"render",null);_.style=h;const v=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900)}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.configurations table{width:100%;border-spacing:0;border-collapse:collapse}.configurations table tr{border-bottom:1px solid var(--nylas-base-200)}.configurations table tr:last-of-type{border-bottom:0}.configurations table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations table th,.configurations table td{text-align:left;padding:1rem}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}.configurations table .title{display:flex;flex-direction:column}.configurations table .title .config-event-title{font-weight:600}.configurations table .title .config-event-description{font-size:0.75rem}';const k=v;var w=undefined&&undefined.__decorate||function(e,t,n,a){var s=arguments.length,i=s<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,n):a,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(e,t,n,a);else for(var r=e.length-1;r>=0;r--)if(o=e[r])i=(s<3?o(i):s>3?o(t,n,i):o(t,n))||i;return s>3&&i&&Object.defineProperty(t,n,i),i};var x=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const C=class{constructor(t){e(this,t);this.initListConfigurations=n(this,"initListConfigurations",7);this.createButtonClick=n(this,"createButtonClick",7);this.editButtonClick=n(this,"editButtonClick",7);this.deleteButtonClick=n(this,"deleteButtonClick",7);this.configurations=[];this.schedulerPreviewLink="";this.state="loading"}connectedCallback(){o("[nylas-list-configurations]","connectedCallback")}componentWillLoad(){o("[nylas-list-configurations]","componentWillLoad");if(this.configurations&&this.configurations.length>0){this.state="loaded"}}componentDidLoad(){o("[nylas-list-configurations]","componentDidLoad");this.initListConfigurations.emit(this.host)}disconnectedCallback(){o("[nylas-list-configurations]","disconnectedCallback")}async getState(){return this.state}async setState(e){this.state=e}render(){return t(a,{key:"c6579bd33e43be81caa460d87e99ed53f8123c6a"},t("div",{key:"d3ff4fc25e34a2dab3820b774f52a845c37bb282",class:"nylas-list-configurations"},t("div",{key:"fc6ff138be7cf63196217b7ef7524ae8f0a82c5c",class:"header"},t("div",{key:"a518d44c645bfc5d5e8449119ebc4be7c475a5f3",class:"description"},t("h2",{key:"a9d999a93c26ee3d9040dcae09306ecb7da43fb5"},"All scheduling configurations"),t("p",{key:"6361799617ce1ccf7469cce6a0064d94d97701b0"},"Create, edit and manage all your scheduling configurations.")),this.configurations&&this.configurations.length>0&&t("div",{class:"actions"},t("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new"))),t("div",{key:"3f26491b35427c4364bcc1c5e1cbffdfabd52d37",class:"configurations"},t("table",{key:"ca8bf13b620b92cd4892b8dbf218988915ce4fc0"},t("tr",{key:"09526ab48bbc988b0595f8060a184c340f1d43cc"},t("th",{key:"7367e03d461f854eaf84e166d65471d356f44ee5"},"Configuration event title"),t("th",{key:"f983dcae11fdd33e21f0f202eb9b43a7d409b714"},"Duration"),t("th",{key:"828c60e134498a1db8bd31ce0311bb8a771cb435",class:"actions"},"Actions")),this.state==="loading"&&t("tr",{class:"no-configurations"},t("td",{colSpan:3},t("div",null,t("h3",null,"Loading..."),t("p",null,"Please wait while we fetch your configurations")))),this.state!=="loading"&&(!this.configurations||this.configurations.length===0)&&t("tr",{class:"no-configurations"},t("td",{colSpan:3},t("div",null,t("calendar-icon",{width:"48",height:"48"}),t("h3",null,"No configurations found"),t("p",null,"Get started with creating your first scheduling page"),t("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new")))),this.state!=="loading"&&this.configurations.map((e=>t("tr",{key:e.id},t("td",null,t("div",{class:"title"},t("span",{class:"config-event-title"},e.event_booking.title),t("span",{class:"config-event-description"},e.event_booking.description))),t("td",null,t("div",null,e.availability.duration_minutes," mins")),t("td",null,t("div",{class:"actions"},t("button-component",{variant:"basic",clickHandler:t=>{t.preventDefault();window.open(r(this.schedulerPreviewLink,e),"_blank")}},"Preview"),t("button-component",{variant:"basic",clickHandler:t=>{t.preventDefault();this.editButtonClick.emit({host:this.host,configuration:e})}},"Edit"),t("button-component",{variant:"basic",clickHandler:t=>{t.preventDefault();this.deleteButtonClick.emit({host:this.host,configuration:e})}},"Delete"))))))))))}get host(){return s(this)}};w([i({name:"nylas-list-configurations",stateToProps:new Map([["schedulerConfig.configurations","configurations"]]),localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),eventToProps:{initListConfigurations:async(e,t)=>{const n=e.detail;await n.setState("loading");await t.schedulerConfig.getConfigurations();await n.setState("loaded")},createButtonClick:async(e,t)=>{t.schedulerConfigStore.state.config={};t.schedulerConfigStore.state.action="create"},deleteButtonClick:async(e,t)=>{const{configuration:n}=e.detail;await t.schedulerConfig.deleteConfiguration(n.id)},editButtonClick:async(e,t)=>{const{configuration:n}=e.detail;t.schedulerConfigStore.state.config=n;t.schedulerConfigStore.state.action="edit"}},fireRegisterEvent:true}),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",void 0)],C.prototype,"render",null);C.style=k;export{l as google_logo_icon,y as microsoft_logo_icon,_ as nylas_editor_tabs,C as nylas_list_configurations};
2
- //# sourceMappingURL=p-9d75bcb2.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["iconCss","GoogleLogoIconStyle0","GoogleLogoIcon","render","h","key","width","this","height","viewBox","fill","xmlns","d","id","MicrosoftLogoIconStyle0","MicrosoftLogoIcon","TabContents","formState","activeTab","calendars","eventTitle","title","eventDescription","description","eventDuration","parseInt","duration","location","slot","name","exportparts","eventDurationMinutes","eventLocation","openHours","availability","timezone","Intl","DateTimeFormat","resolvedOptions","timeZone","organizer","participants","find","p","is_organizer","organizerEmail","email","selectedCalendars","calendarIds","length","bookingCalendar","defaultBookingCalendar","defaultSelectedCalendars","defaultTimezone","buffer","bookingType","availableDaysInFuture","minCancellationNotice","nylasEditorTabsCss","NylasEditorTabsStyle0","NylasEditorTabs","formSubmissionHandler","async","event","preventDefault","isLoading","hasUnsavedChanges","updateFormState","config","configObject","version","duration_minutes","availability_rules","availability_method","before","after","default_open_hours","round_robin_group_id","currentUser","calendar_ids","open_hours","booking","calendar_id","event_booking","toString","booking_type","scheduler","available_days_in_future","min_cancellation_notice","resetLoadingState","_e","changesSaved","setTimeout","schedulerConfigChanged","emit","action","configChangedHandler","newConfig","debug","getFormStateFromConfig","connectedCallback","componentWillLoad","componentDidLoad","disconnectedCallback","handleValueChanged","detail","value","organizerParticipant","undefined","formData","FormData","formRef","forEach","JSON","parse","split","setActiveTab","e","tabName","Host","onSubmit","class","ref","el","tab","active","onClick","schedulerPreviewLink","type","disabled","clickHandler","previewEvent","previewButtonClicked","host","defaultPrevented","window","open","parsePreviewLink","variant","cancelButtonClick","__decorate","RegisterComponent","stateToProps","Map","eventToProps","nylasSchedulerConfigConnector","schedulerConfig","updateConfiguration","createConfiguration","_","schedulerConfigStore","state","localPropsToProp","fireRegisterEvent","nylasListConfigurationsCss","NylasListConfigurationsStyle0","NylasListConfigurations","configurations","initListConfigurations","getState","setState","createButtonClick","colSpan","map","editButtonClick","configuration","deleteButtonClick","connector","getConfigurations","deleteConfiguration"],"sources":["src/common/icons/icon.css?tag=google-logo-icon&encapsulation=scoped","src/common/icons/google-logo.tsx","src/common/icons/icon.css?tag=microsoft-logo-icon&encapsulation=scoped","src/common/icons/microsoft-logo.tsx","src/components/scheduler-editor/nylas-editor-tabs/tab-contents.tsx","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.scss?tag=nylas-editor-tabs&encapsulation=scoped","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.tsx","src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.scss?tag=nylas-list-configurations&encapsulation=shadow","src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.tsx"],"sourcesContent":[":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'google-logo-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class GoogleLogoIcon {\n @Prop() width: string = '24';\n @Prop() height: string = '24';\n\n render() {\n // Spam icon svg\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_959_12452)\">\n <path\n d=\"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z\"\n fill=\"#4285F4\"\n />\n <path\n d=\"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z\"\n fill=\"#34A853\"\n />\n <path\n d=\"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z\"\n fill=\"#FBBC05\"\n />\n <path\n d=\"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z\"\n fill=\"#EA4335\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_959_12452\">\n <rect width={24} height={24} fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n );\n }\n}\n",":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'microsoft-logo-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class MicrosoftLogoIcon {\n @Prop() width: string = '22';\n @Prop() height: string = '22';\n\n render() {\n // Spam icon svg\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 22 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z\" fill=\"#F35325\" />\n <path d=\"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z\" fill=\"#81BC06\" />\n <path d=\"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z\" fill=\"#05A6F0\" />\n <path d=\"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z\" fill=\"#FFBA08\" />\n </svg>\n );\n }\n}\n","import { h } from '@stencil/core';\n\nexport type TabContentsProps = {\n id: string;\n formState: any;\n activeTab: string;\n calendars?: any[];\n};\n\nexport default function TabContents({ id, formState, activeTab, calendars }: TabContentsProps) {\n switch (activeTab) {\n case 'eventInfo':\n const eventTitle = formState.title;\n const eventDescription = formState.description;\n const eventDuration = parseInt(formState.duration);\n const location = formState.location;\n // const eventParticipants = formState.participants;\n\n return (\n <div key={id}>\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title name=\"title\" eventTitle={eventTitle} exportparts=\"net, net__title, net__dropdown-content\" />\n <nylas-event-duration\n name=\"duration\"\n eventDurationMinutes={eventDuration}\n exportparts=\"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content\"\n />\n <nylas-location-component name=\"location\" eventLocation={location} exportparts=\"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content\" />\n <nylas-event-description name=\"description\" eventDescription={eventDescription} exportparts=\"nedesc, nedesc__textarea\" />\n </div>\n </nylas-event-info>\n {/* <nylas-additional-participants\n name=\"participants\"\n eventParticipants={eventParticipants}\n exportparts={'nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant, nap__add-participant'}\n /> */}\n </div>\n );\n case 'availability':\n const openHours = formState.availability;\n const timezone = openHours?.[0]?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;\n const organizer = formState.participants?.find(p => p.is_organizer);\n const organizerEmail = organizer?.email ?? 'primary';\n const selectedCalendars = formState.calendarIds.length > 0 ? formState.calendarIds : [organizerEmail];\n const bookingCalendar = formState.bookingCalendar == 'primary' ? organizerEmail : formState.bookingCalendar;\n return (\n <div key={id}>\n <nylas-booking-calendar-picker\n name=\"booking-calendar\"\n calendars={calendars ?? []}\n defaultBookingCalendar={bookingCalendar}\n exportparts={'nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content'}\n />\n <nylas-calendar-picker\n name=\"calendars\"\n calendars={calendars ?? []}\n defaultSelectedCalendars={selectedCalendars}\n organizerEmail={organizerEmail}\n exportparts={'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content'}\n />\n <nylas-availability-picker\n name=\"availability\"\n openHours={openHours}\n defaultTimezone={timezone}\n exportparts={\n 'nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times'\n }\n />\n </div>\n );\n case 'bookingOptions':\n return (\n <div key={id}>\n {id == 'new' && <p>Config</p>}\n <nylas-buffer-time\n name=\"buffer-time\"\n buffer={formState.buffer}\n exportparts={\n 'nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview'\n }\n />\n <nylas-custom-booking-flow\n name=\"booking-type\"\n bookingType={formState.bookingType}\n exportparts={'ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content'}\n />\n <nylas-event-limits>\n <div slot=\"inputs\">\n <nylas-limit-future-bookings\n name=\"limit-future-bookings\"\n availableDaysInFuture={formState.availableDaysInFuture}\n exportparts=\"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content\"\n />\n <nylas-min-cancellation-notice\n name=\"min-cancellation-notice\"\n minCancellationNotice={formState.minCancellationNotice}\n exportparts=\"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content\"\n />\n </div>\n </nylas-event-limits>\n </div>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.scheduler-editor {\n display: flex;\n flex-direction: column;\n .form-contents {\n display: grid;\n grid-template-columns: minmax(224px, 25%) 1fr;\n @media #{$mobile} {\n display: table-column-group;\n }\n .tabs {\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-25);\n .tab {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--nylas-base-900);\n background: var(--nylas-base-0);\n border: none;\n height: 56px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n &:not(:first-of-type) {\n margin-top: 0.25rem;\n }\n &.active {\n font-weight: 600;\n background: var(--nylas-base-0);\n color: var(--nylas-primary);\n border-left: 4px solid var(--nylas-primary);\n box-shadow: 0px 1px 2px 0px #0000000f;\n box-shadow: 0px 1px 3px 0px #0000001a;\n }\n }\n }\n .tab-content {\n max-width: 692px;\n nylas-event-info,\n nylas-event-limits {\n div[slot='inputs'] {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n }\n }\n }\n}\n\n.footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n height: 80px;\n padding: 0 1rem;\n border-top: 1px solid var(--nylas-base-200);\n .buttons {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n justify-self: flex-end;\n gap: 1rem;\n .unsaved-changes {\n color: var(--nylas-base-600);\n }\n .saved-changes {\n color: var(--nylas-success);\n }\n button {\n @include primary-button;\n width: 148px;\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, parsePreviewLink } from '@/utils/utils';\nimport { BookingType, Calendar, Configuration } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport TabContents from './tab-contents';\nimport { User } from '@/common/nylas-api-request';\n\ntype SchedulerEventDetail = {\n config: Partial<Configuration>;\n action: 'create' | 'edit';\n resetLoadingState?: (e: CustomEvent) => void;\n};\n\n/**\n * The `nylas-editor-tabs` component is a UI component that displays the editor tabs for the scheduler editor.\n * @part nap__title - [nylas-additional-participants] The title of the component.\n * @part nap__subtitle - [nylas-additional-participants] The subtitle of the component.\n * @part nap__content - [nylas-additional-participants] The content of the component.\n * @part nap__input - [nylas-additional-participants] The input of the component.\n * @part nap__remove-participant - [nylas-additional-participants] The remove participant button of the component.\n * @part nap__add-participant - [nylas-additional-participants] The add participant button of the component.\n * @part nap__header - [nylas-availability-picker] The header of the availability picker\n * @part nap__select-timezone - [nylas-availability-picker] The timezone selection container\n * @part nap__select-timezone-button -[nylas-availability-picker] The timezone selection button\n * @part nap__select-timezone-dropdown-content -[nylas-availability-picker] The timezone selection dropdown content\n * @part nap__availability - [nylas-availability-picker] The availability container\n * @part nap__day - [nylas-availability-picker] The day container\n * @part nap__time-ranges - [nylas-availability-picker] The time ranges container\n * @part nap__time-range - [nylas-availability-picker] The time range container\n * @part nap__add-time-range - [nylas-availability-picker] The add time range button\n * @part nap__time-picker-container -[nylas-availability-picker] The time picker container\n * @part nap__time-picker-input - [nylas-availability-picker] The time picker input\n * @part nap__time-picker-times - [nylas-availability-picker] The time picker times\n * @part nbcp - [nylas-booking-calendar-picker] The booking calendar picker container\n * @part nbcp__header - [nylas-booking-calendar-picker] The header of the booking calendar picker\n * @part nbcp__input-label - [nylas-booking-calendar-picker] The input label of the booking calendar picker\n * @part nbcp__dropdown - [nylas-booking-calendar-picker] The dropdown container\n * @part nbcp__dropdown-button - [nylas-booking-calendar-picker] The dropdown button\n * @part nbcp__dropdown-content - [nylas-booking-calendar-picker] The dropdown content\n * @part nbt - [nylas-buffer-time] The buffer time container\n * @part nbt__header - [nylas-buffer-time] The header of the buffer time\n * @part nbt__body - [nylas-buffer-time] The body of the buffer time\n * @part nbt__dropdown-before - [nylas-buffer-time] The before buffer dropdown container\n * @part nbt__dropdown-button-before - [nylas-buffer-time] The before buffer dropdown button\n * @part nbt__dropdown-content-before - [nylas-buffer-time] The before buffer dropdown content\n * @part nbt__dropdown-after - [nylas-buffer-time] The after buffer dropdown container\n * @part nbt__dropdown-button-after - [nylas-buffer-time] The after buffer dropdown button\n * @part nbt__dropdown-content-after - [nylas-buffer-time] The after buffer dropdown content\n * @part nbt__preview - [nylas-buffer-time] The buffer time preview\n * @part ncp - [nylas-calendar-picker] The calendar picker container\n * @part ncp__header - [nylas-calendar-picker] The header of the calendar picker\n * @part ncp__dropdown - [nylas-calendar-picker] The dropdown container\n * @part ncp__dropdown-button - [nylas-calendar-picker] The dropdown button\n * @part ncp__dropdown-content - [nylas-calendar-picker] The dropdown content\n * @part ncbf - [nylas-custom-booking-flow] The custom booking flow container\n * @part ncbf__header - [nylas-custom-booking-flow] The header of the custom booking flow\n * @part ncbf__dropdown - [nylas-custom-booking-flow] The dropdown container\n * @part ncbf__dropdown-button - [nylas-custom-booking-flow] The dropdown button\n * @part ncbf__dropdown-content - [nylas-custom-booking-flow] The dropdown content\n * @part nedesc - [nylas-event-description] The event description container\n * @part nedesc__textarea - [nylas-event-description] The event description textarea\n * @part ned - [nylas-event-duration] The event duration container\n * @part ned__input - [nylas-event-duration] The event duration input\n * @part ned__dropdown - [nylas-event-duration] The event duration dropdown\n * @part ned__dropdown-button - [nylas-event-duration] The event duration dropdown button\n * @part ned__dropdown-content - [nylas-event-duration] The event duration dropdown content\n * @part net - [nylas-event-title] The event title container\n * @part net__title - [nylas-event-title] The event title input\n * @part net__dropdown-content - [nylas-event-title] The token options container\n * @part nlfb - [nylas-limit-future-bookings] The limit future bookings container\n * @part nlfb__number-dropdown - [nylas-limit-future-bookings] The number dropdown container\n * @part nlfb__number-dropdown-button - [nylas-limit-future-bookings] The number dropdown button\n * @part nlfb__number-dropdown-content - [nylas-limit-future-bookings] The number dropdown content\n * @part nlfb__period-dropdown - [nylas-limit-future-bookings] The period dropdown container\n * @part nlfb__period-dropdown-button - [nylas-limit-future-bookings] The period dropdown button\n * @part nlfb__period-dropdown-content - [nylas-limit-future-bookings] The period dropdown content\n * @part nel - [nylas-location-component] The event location container\n * @part nel__location - [nylas-location-component] The event location input\n * @part nel__dropdown - [nylas-location-component] The dropdown container\n * @part nel__dropdown-button - [nylas-location-component] The dropdown button\n * @part nel__dropdown-content - [nylas-location-component] The dropdown content\n * @part nmcn - [nylas-min-cancellation-notice] The minimum cancellation notice container\n * @part nmcn__number-dropdown - [nylas-min-cancellation-notice] The number dropdown container\n * @part nmcn__number-dropdown-button - [nylas-min-cancellation-notice] The number dropdown button\n * @part nmcn__number-dropdown-content - [nylas-min-cancellation-notice] The number dropdown content\n * @part nmcn__period-dropdown - [nylas-min-cancellation-notice] The period dropdown container\n * @part nmcn__period-dropdown-button - [nylas-min-cancellation-notice] The period dropdown button\n * @part nmcn__period-dropdown-content - [nylas-min-cancellation-notice] The period dropdown content\n */\n@Component({\n tag: 'nylas-editor-tabs',\n styleUrl: 'nylas-editor-tabs.scss',\n scoped: true,\n})\nexport class NylasEditorTabs {\n private formRef!: HTMLFormElement;\n @Element() host!: HTMLNylasEditorTabsElement;\n @Prop() calendars?: Calendar[];\n @Prop() config?: Configuration;\n @Prop() currentUser?: User;\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 @State() action: 'create' | 'edit' = 'create';\n @State() activeTab: string = 'eventInfo';\n @State() isLoading: boolean = false;\n @State() hasUnsavedChanges: boolean = false;\n @State() changesSaved: boolean = false;\n @State() formState: Partial<{\n title: string;\n description: string;\n duration: string;\n availability?: any;\n calendarIds: string[];\n participants?: any[];\n bookingCalendar?: string;\n location?: string;\n bookingType?: string;\n buffer?: { before: number; after: number };\n availableDaysInFuture?: number;\n minCancellationNotice?: number;\n }> = {};\n\n @Event() schedulerConfigChanged!: EventEmitter<SchedulerEventDetail>;\n\n /**\n * Event emitted when the user clicks the cancel button.\n */\n @Event() cancelButtonClick!: EventEmitter<void>;\n\n /**\n * Event emitted when the user clicks the cancel button.\n */\n @Event() previewButtonClicked!: EventEmitter<HTMLNylasEditorTabsElement>;\n\n @Watch('config')\n configChangedHandler(newConfig: Configuration) {\n debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.config);\n this.formState = {\n ...this.getFormStateFromConfig(newConfig),\n };\n\n if (newConfig.id) {\n this.action = 'edit';\n } else {\n this.action = 'create';\n }\n }\n\n connectedCallback() {\n debug('[nylas-editor-tabs]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-editor-tabs]', 'componentWillLoad');\n this.formState = this.getFormStateFromConfig(this.config);\n }\n\n componentDidLoad() {\n debug('[nylas-editor-tabs]', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('[nylas-editor-tabs]', 'disconnectedCallback');\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n this.formState = { ...this.formState, [event.detail.name]: event.detail.value };\n this.hasUnsavedChanges = true;\n }\n\n getFormStateFromConfig(config?: Configuration) {\n const organizerParticipant = config?.participants?.find(p => p.is_organizer);\n return {\n title: config?.event_booking?.title ?? '',\n description: config?.event_booking?.description ?? '',\n duration: config?.availability?.duration_minutes?.toString() ?? '10',\n availability: organizerParticipant?.availability?.open_hours ?? undefined,\n calendarIds: organizerParticipant?.availability?.calendar_ids ?? [],\n participants: config?.participants ?? [],\n bookingCalendar: organizerParticipant?.booking?.calendar_id ?? organizerParticipant?.email ?? '',\n location: this.config?.event_booking?.location ?? '',\n bookingType: this.config?.event_booking?.booking_type ?? 'booking',\n buffer: this.config?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },\n availableDaysInFuture: this.config?.scheduler?.available_days_in_future ?? 30,\n minCancellationNotice: this.config?.scheduler?.min_cancellation_notice ?? 0,\n };\n }\n\n updateFormState() {\n const formData = new FormData(this.formRef);\n formData.forEach((value, key) => {\n switch (key) {\n case 'title':\n this.formState.title = value.toString();\n break;\n case 'description':\n this.formState.description = value.toString();\n break;\n case 'duration':\n this.formState.duration = value.toString();\n break;\n case 'availability':\n this.formState.availability = JSON.parse(value.toString());\n break;\n case 'participants':\n this.formState.participants = JSON.parse(value.toString());\n break;\n case 'calendars':\n this.formState.calendarIds = value.toString().split(',');\n break;\n case 'booking-calendar':\n this.formState.bookingCalendar = value.toString();\n break;\n case 'location':\n this.formState.location = value.toString();\n break;\n case 'booking-type':\n this.formState.bookingType = value.toString();\n break;\n case 'buffer-time':\n this.formState.buffer = JSON.parse(value.toString());\n break;\n case 'limit-future-bookings':\n this.formState.availableDaysInFuture = parseInt(value.toString());\n break;\n case 'min-cancellation-notice':\n this.formState.minCancellationNotice = parseInt(value.toString());\n break;\n }\n });\n this.formState = { ...this.formState };\n }\n\n setActiveTab(e: Event, tabName: string) {\n e.preventDefault();\n this.updateFormState();\n this.activeTab = tabName;\n }\n\n formSubmissionHandler = async (event: Event) => {\n event.preventDefault();\n this.isLoading = true;\n this.hasUnsavedChanges = false;\n this.updateFormState();\n const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } =\n this.formState;\n\n const organizer = this.config?.participants?.find(p => p.is_organizer);\n\n const configObject: Partial<Configuration> = {\n ...(this.config?.id && { id: this.config.id }),\n version: this.config?.version ?? '1.0.0',\n availability: {\n duration_minutes: duration ? parseInt(duration) : 0,\n availability_rules: {\n availability_method: this.config?.availability?.availability_rules?.availability_method ?? 'collective',\n buffer: buffer || { before: 0, after: 0 },\n default_open_hours: this.config?.availability?.availability_rules?.default_open_hours ?? [],\n round_robin_group_id: this.config?.availability?.availability_rules?.round_robin_group_id ?? '',\n },\n },\n participants: [\n {\n name: organizer?.name ?? organizer?.email ?? this.currentUser?.name ?? this.currentUser?.email ?? '',\n email: organizer?.email ?? this.currentUser?.email ?? '',\n is_organizer: true,\n availability: {\n calendar_ids: calendarIds?.length ? calendarIds : ['primary'],\n open_hours: availability ?? [],\n },\n booking: {\n calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',\n },\n },\n ],\n event_booking: {\n title: title?.toString() ?? '',\n description: description?.toString() ?? '',\n location: location?.toString() ?? '',\n booking_type: (bookingType?.toString() as BookingType) ?? 'booking',\n },\n scheduler: {\n available_days_in_future: availableDaysInFuture ?? 30,\n min_cancellation_notice: minCancellationNotice ?? 0,\n },\n };\n const resetLoadingState = (_e: CustomEvent) => {\n this.isLoading = false;\n this.changesSaved = true;\n setTimeout(() => {\n this.changesSaved = false;\n }, 5000);\n };\n this.schedulerConfigChanged.emit({ config: configObject, resetLoadingState, action: this.action });\n };\n\n @RegisterComponent<NylasEditorTabs, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-editor-tabs',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.config', 'config'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ]),\n eventToProps: {\n schedulerConfigChanged: async (event: CustomEvent<SchedulerEventDetail>, nylasSchedulerConfigConnector: NylasSchedulerConfigConnector) => {\n const { resetLoadingState, action, config } = event.detail;\n if (resetLoadingState) {\n resetLoadingState(event);\n }\n\n // If we have an ID, we are updating an existing configuration\n if (action === 'edit') {\n await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);\n } else {\n await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);\n }\n },\n cancelButtonClick: async (_, nylasSchedulerConfigConnector) => {\n nylasSchedulerConfigConnector.schedulerConfigStore.state.action = null;\n },\n },\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n fireRegisterEvent: true,\n })\n render() {\n debug('[nylas-editor-tabs]', 'render', this.formState);\n return (\n <Host>\n <form onSubmit={this.formSubmissionHandler} class=\"scheduler-editor\" ref={el => (this.formRef = el as HTMLFormElement)}>\n <div class=\"form-contents\">\n <div class=\"tabs\">\n <button class={{ tab: true, active: this.activeTab == 'eventInfo' }} onClick={e => this.setActiveTab(e, 'eventInfo')}>\n <calendar-info-icon width=\"16\" height=\"16\" />\n Event Info\n </button>\n <button class={{ tab: true, active: this.activeTab == 'availability' }} onClick={e => this.setActiveTab(e, 'availability')}>\n <calendar-patterns-icon width=\"16\" height=\"16\" />\n Availability\n </button>\n <button class={{ tab: true, active: this.activeTab == 'bookingOptions' }} onClick={e => this.setActiveTab(e, 'bookingOptions')}>\n <flow-icon width=\"16\" height=\"16\" />\n Booking Options\n </button>\n </div>\n <div class=\"tab-content\">\n <TabContents formState={this.formState} activeTab={this.activeTab} calendars={this.calendars} id={this.config?.id ?? 'new'} />\n </div>\n </div>\n <div class=\"footer\">\n <div class=\"preview\">\n {this.schedulerPreviewLink !== '' && this.action === 'edit' && (\n <button-component\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n const previewEvent = this.previewButtonClicked.emit(this.host);\n if (!previewEvent.defaultPrevented) {\n window.open(parsePreviewLink(this.schedulerPreviewLink, this.config), '_blank');\n }\n }}\n variant={'basic'}\n >\n Preview\n </button-component>\n )}\n </div>\n <div class=\"buttons\">\n <p\n class={{\n 'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,\n 'saved-changes': this.changesSaved,\n }}\n >\n {this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.changesSaved ? 'Changes saved!' : ''}\n </p>\n <button-component\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n this.cancelButtonClick.emit();\n }}\n variant={'basic'}\n >\n Cancel\n </button-component>\n <button-component type=\"submit\" disabled={this.isLoading}>\n {this.isLoading ? (\n <span>\n Saving\n <loading-icon />{' '}\n </span>\n ) : this.action == 'create' ? (\n 'Create'\n ) : (\n 'Save changes'\n )}\n </button-component>\n </div>\n </div>\n </form>\n </Host>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem;\n\n h2 {\n margin: 0;\n font-size: 1.25rem;\n color: var(--nylas-base-900);\n }\n\n p {\n margin: 0;\n font-size: 1rem;\n color: var(--nylas-base-700);\n }\n\n .actions {\n justify-self: end;\n }\n}\n\n.configurations {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n\n table {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n\n tr {\n border-bottom: 1px solid var(--nylas-base-200);\n &:last-of-type {\n border-bottom: 0;\n }\n }\n\n tr.no-configurations {\n td {\n > div {\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n\n padding: var(--nylas-border-radius-3x);\n\n h3 {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-700);\n }\n\n p {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-600);\n }\n\n calendar-icon {\n margin-bottom: 1rem;\n color: var(--nylas-base-200);\n }\n }\n }\n }\n\n th,\n td {\n text-align: left;\n padding: 1rem;\n }\n\n .actions {\n text-align: right;\n }\n\n .actions {\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n }\n\n .title {\n display: flex;\n flex-direction: column;\n\n .config-event-title {\n font-weight: 600;\n }\n\n .config-event-description {\n font-size: 0.75rem;\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, parsePreviewLink } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, State, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\n\n/**\n * The `nylas-list-configurations` component displays a list of scheduling configurations.\n */\n@Component({\n tag: 'nylas-list-configurations',\n styleUrl: 'nylas-list-configurations.scss',\n shadow: true,\n})\nexport class NylasListConfigurations {\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasListConfigurationsElement;\n\n /**\n * The list of configurations to display.\n */\n @Prop() configurations: Configuration[] = [];\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 * Event emitted when the component is initialized.\n */\n @Event() initListConfigurations!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the create event button.\n */\n @Event() createButtonClick!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the edit event button.\n */\n @Event() editButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration;\n }>;\n\n /**\n * Event emitted when the user clicks the delete event button.\n */\n @Event() deleteButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration;\n }>;\n\n /**\n * The current state of the component.\n */\n @State() private state: 'loading' | 'loaded' | 'error' = 'loading';\n\n connectedCallback() {\n debug('[nylas-list-configurations]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-list-configurations]', 'componentWillLoad');\n\n // If we have configurations, we will set the state to loaded.\n if (this.configurations && this.configurations.length > 0) {\n this.state = 'loaded';\n }\n }\n\n componentDidLoad() {\n debug('[nylas-list-configurations]', 'componentDidLoad');\n\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit(this.host);\n }\n\n disconnectedCallback() {\n debug('[nylas-list-configurations]', 'disconnectedCallback');\n }\n\n @Method()\n async getState() {\n return this.state;\n }\n\n @Method()\n async setState(state: 'loading' | 'loaded' | 'error') {\n this.state = state;\n }\n\n @RegisterComponent<NylasListConfigurations, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-list-configurations',\n stateToProps: new Map([['schedulerConfig.configurations', 'configurations']]),\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n eventToProps: {\n initListConfigurations: async (event, connector) => {\n const host = event.detail;\n await host.setState('loading');\n await connector.schedulerConfig.getConfigurations();\n await host.setState('loaded');\n },\n createButtonClick: async (_, connector) => {\n connector.schedulerConfigStore.state.config = {};\n connector.schedulerConfigStore.state.action = 'create';\n },\n deleteButtonClick: async (event, connector) => {\n const { configuration } = event.detail;\n await connector.schedulerConfig.deleteConfiguration(configuration.id);\n },\n editButtonClick: async (event, connector) => {\n const { configuration } = event.detail;\n connector.schedulerConfigStore.state.config = configuration;\n connector.schedulerConfigStore.state.action = 'edit';\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-list-configurations\">\n <div class=\"header\">\n <div class=\"description\">\n <h2>All scheduling configurations</h2>\n <p>Create, edit and manage all your scheduling configurations.</p>\n </div>\n {this.configurations && this.configurations.length > 0 && (\n <div class=\"actions\">\n <button-component\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n Create new\n </button-component>\n </div>\n )}\n </div>\n <div class=\"configurations\">\n <table>\n <tr>\n <th>Configuration event title</th>\n <th>Duration</th>\n <th class=\"actions\">Actions</th>\n </tr>\n {this.state === 'loading' && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <h3>Loading...</h3>\n <p>Please wait while we fetch your configurations</p>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' && (!this.configurations || this.configurations.length === 0) && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <calendar-icon width=\"48\" height=\"48\"></calendar-icon>\n <h3>No configurations found</h3>\n <p>Get started with creating your first scheduling page</p>\n <button-component\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n Create new\n </button-component>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' &&\n this.configurations.map(config => (\n <tr key={config.id}>\n <td>\n <div class=\"title\">\n <span class={'config-event-title'}>{config.event_booking.title}</span>\n <span class={'config-event-description'}>{config.event_booking.description}</span>\n </div>\n </td>\n <td>\n <div>{config.availability.duration_minutes} mins</div>\n </td>\n <td>\n <div class=\"actions\">\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n window.open(parsePreviewLink(this.schedulerPreviewLink, config), '_blank');\n }}\n >\n Preview\n </button-component>\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n this.editButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n Edit\n </button-component>\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n this.deleteButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n Delete\n </button-component>\n </div>\n </td>\n </tr>\n ))}\n </table>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"uKAAA,MAAMA,EAAU,uCAChB,MAAAC,EAAeD,E,MCMFE,EAAc,M,oCACD,K,YACC,I,CAEzB,MAAAC,GAEE,OACEC,EAAA,OAAAC,IAAA,2CAAKC,MAAOC,KAAKD,MAAOE,OAAQD,KAAKC,OAAQC,QAAQ,YAAYC,KAAK,OAAOC,MAAM,8BACjFP,EAAA,KAAAC,IAAA,uDAAa,yBACXD,EAAA,QAAAC,IAAA,2CACEO,EAAE,iKACFF,KAAK,YAEPN,EAAA,QAAAC,IAAA,2C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hH,KAAM,4BACNiH,aAAc,IAAIC,IAAI,CAAC,CAAC,iCAAkC,oBAC1DS,iBAAkB,IAAIT,IAAI,CAAC,CAAC,uBAAwB,0BACpDC,aAAc,CACZc,uBAAwBhG,MAAOC,EAAOwG,KACpC,MAAMlC,EAAOtE,EAAM0C,aACb4B,EAAK2B,SAAS,iBACdO,EAAUrB,gBAAgBsB,0BAC1BnC,EAAK2B,SAAS,SAAS,EAE/BC,kBAAmBnG,MAAOuF,EAAGkB,KAC3BA,EAAUjB,qBAAqBC,MAAMnF,OAAS,GAC9CmG,EAAUjB,qBAAqBC,MAAMxD,OAAS,QAAQ,EAExDuE,kBAAmBxG,MAAOC,EAAOwG,KAC/B,MAAMF,cAAEA,GAAkBtG,EAAM0C,aAC1B8D,EAAUrB,gBAAgBuB,oBAAoBJ,EAAcxJ,GAAG,EAEvEuJ,gBAAiBtG,MAAOC,EAAOwG,KAC7B,MAAMF,cAAEA,GAAkBtG,EAAM0C,OAChC8D,EAAUjB,qBAAqBC,MAAMnF,OAASiG,EAC9CE,EAAUjB,qBAAqBC,MAAMxD,OAAS,MAAM,GAGxD0D,kBAAmB,O"}
@@ -1,2 +0,0 @@
1
- import{r as o,h as r}from"./p-68c2fadf.js";const t=".sc-arrow-icon-h{display:flex}";const s=t;const e=class{constructor(r){o(this,r);this.width="15";this.height="15"}render(){return r("svg",{key:"965b6c266cf4a21eb5b9853e64b4687ff44171e6",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("path",{key:"adc092890503e2bbb72fb20d46a91b76f87dde5f",d:"M5 12H19M12 5L19 12L12 19",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};e.style=s;export{e as arrow_icon};
2
- //# sourceMappingURL=p-be7124f0.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as t,h as s}from"./p-68c2fadf.js";const o=".sc-play-icon-h{display:flex}";const e=o;const i=class{constructor(s){t(this,s);this.width="15";this.height="15"}render(){return s("svg",{key:"158d7ff5602edfbc5504f726ba391828ed3fcc0a",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"2a4e305d65f7f71dc7bb8227a97fd990ebfd3095",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=e;const r=".sc-stop-icon-h{display:flex}";const c=r;const n=class{constructor(s){t(this,s);this.width="15";this.height="15"}render(){return s("svg",{key:"29ab924a173c55e12e79b0e616c0564d18116302",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"7b83a1444fef0003787c7f556d5805c9a8f3924d",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};n.style=c;export{i as play_icon,n as stop_icon};
2
- //# sourceMappingURL=p-c45ac7c6.entry.js.map
@@ -1 +0,0 @@
1
- {"file":"scheduler-config-store-0efc3519.js","mappings":";;SAegB,+BAA+B,CAAC,eAAwD,EAAE;IACxG,MAAM,qCAAqC,GAAmC;QAC5E,MAAM,EAAE,EAAE;QACV,cAAc,EAAE,EAAE;QAClB,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,MAAM,EAAE,IAAI;QACZ,0BAA0B,EAAE,IAAI;QAChC,GAAG,YAAY;KAChB,CAAC;IACF,MAAM,KAAK,GAAG,WAAW,CAAiC,qCAAqC,CAAC,CAAC;IAEjG,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAM,MAAM;QACnC,IAAI,CAAC,MAAM,EAAE;YACX,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;SACzB;KACF,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC;AACf;;;;","names":[],"sources":["src/stores/scheduler-config-store.ts"],"sourcesContent":["import { Calendar, Configuration } from '@nylas/core';\nimport { createStore } from '@stencil/store';\nimport { User } from '@/common/nylas-api-request';\n\nexport interface NylasSchedulerConfigStoreState {\n config: Partial<Configuration>;\n configurations: Configuration[];\n calendars: Calendar[];\n currentUser: User | null;\n action: 'create' | 'edit' | null;\n defaultRequiresSessionAuth: boolean;\n}\n\nexport type NylasSchedulerConfigStoreType = ReturnType<typeof CreateNylasSchedulerConfigStore>;\n\nexport function CreateNylasSchedulerConfigStore(defaultState: Partial<NylasSchedulerConfigStoreState> = {}) {\n const defaultNylasSchedulerConfigStoreState: NylasSchedulerConfigStoreState = {\n config: {},\n configurations: [],\n calendars: [],\n currentUser: null,\n action: null,\n defaultRequiresSessionAuth: true,\n ...defaultState,\n };\n const store = createStore<NylasSchedulerConfigStoreState>(defaultNylasSchedulerConfigStoreState);\n\n store.onChange('action', async action => {\n if (!action) {\n store.set('config', {});\n }\n });\n\n return store;\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"scheduler-store-8ddcc496.js","mappings":";;;IAAY;AAAZ,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,4BAAW,CAAA;IACX,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAQD,IAAY,kBAQX;AARD,WAAY,kBAAkB;IAC5B,qEAA+C,CAAA;IAC/C,yDAAmC,CAAA;IACnC,mEAA6C,CAAA;IAC7C,qDAA+B,CAAA;IAC/B,+DAAyC,CAAA;IACzC,2DAAqC,CAAA;IACrC,2DAAqC,CAAA;AACvC,CAAC,EARW,kBAAkB,KAAlB,kBAAkB,QAQ7B;AAED,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mDAAmC,CAAA;IACnC,+CAA+B,CAAA;IAC/B,iDAAiC,CAAA;IACjC,+DAA+C,CAAA;IAC/C,iEAAiD,CAAA;AACnD,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB;MAEY,MAAM;IAAnB;QACE,cAAS,GAAG,CAAC,MAAc;YACzB,MAAM,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C,CAAC;IAC5D,MAAM,KAAK,GAAG,WAAW,CAA2B,sBAAsB,CAAC,CAAC;IAE5E,KAAK,CAAC,QAAQ,CAAC,cAAc,EAAE,YAAY;QACzC,KAAK,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;QACxC,MAAM,eAAe,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC1E,KAAK,CAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;KAC/C,CAAC,CAAC;IAOH,KAAK,CAAC,KAAK,GAAG;QACZ,KAAK,MAAM,GAAG,IAAI,sBAAsB,EAAE;YACxC,MAAM,KAAK,GAAG,sBAAsB,CAAC,GAA0C,CAAC,CAAC;YACjF,KAAK,CAAC,GAAG,CAAC,GAAU,EAAE,KAAK,CAAC,CAAC;SAC9B;KACF,CAAC;IAEF,OAAO,KAAK,CAAC;AACf;;;;","names":[],"sources":["src/connector/nylas-scheduler-connector/errors/index.ts","src/connector/shared/api/scheduler.ts","src/stores/scheduler-store.ts"],"sourcesContent":["export enum ErrorCategory {\n Component = 'component',\n Api = 'api',\n Auth = 'auth',\n}\n\nexport interface ErrorDetails {\n title: string;\n message: string;\n category: ErrorCategory;\n}\n\nexport enum ComponentErrorType {\n endtime_not_in_future = 'endtime_not_in_future',\n no_booking_info = 'no_booking_info',\n no_timeslot_selected = 'no_timeslot_selected',\n no_booking_id = 'no_booking_id',\n invalid_start_time = 'invalid_start_time',\n invalid_end_time = 'invalid_end_time',\n invalid_timezone = 'invalid_timezone',\n}\n\nexport enum APIErrorType {\n invalid_session = 'invalid_session',\n general_error = 'general_error',\n internal_error = 'internal_error',\n invalid_request_error = 'invalid_request_error',\n timeslot_not_available = 'timeslot_not_available',\n}\n\nexport class Errors {\n component = (_title: string): Record<ComponentErrorType, (message?: string) => ErrorDetails> => {\n const category = ErrorCategory.Component;\n const title = `${_title} error`;\n return {\n endtime_not_in_future: (message: string = '\"endtime\" can not be in the future') => {\n return {\n title,\n message,\n category,\n };\n },\n no_booking_info: (message: string = 'No booking info provided') => {\n return {\n title,\n message,\n category,\n };\n },\n no_timeslot_selected: (message: string = 'No timeslot selected') => {\n return {\n title,\n message,\n category,\n };\n },\n no_booking_id: (message: string = 'No booking id provided') => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_start_time: (message: string = 'Invalid start time') => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_end_time: (message: string = 'Invalid end time') => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_timezone: (message: string = 'Invalid timezone') => {\n return {\n title,\n message,\n category,\n };\n },\n };\n };\n\n api = (_title: string): Record<APIErrorType, (message: string) => ErrorDetails> => {\n const category = ErrorCategory.Api;\n const title = `${_title} error`;\n\n return {\n invalid_session: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n general_error: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n internal_error: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_request_error: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n timeslot_not_available: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n };\n };\n}\n","import { AvailabilityResponse, NylasEvent } from '@/common/types';\nimport { NylasSchedulerStoreType } from '../../../components';\nimport type { NylasErrorResponse, NylasResponse, NylasSchedulerBookingData, NylasSchedulerResponse, Timeslot } from '@nylas/core';\nimport { APIErrorType, Errors } from '@/connector/nylas-scheduler-connector/errors';\n\ntype NylasSchedulerAPIConnectorOptions = {\n schedulerAPIURL: string;\n schedulerStore: NylasSchedulerStoreType;\n sessionId?: string;\n configId?: string;\n};\n\n/**\n * NylaSchedulerConnector\n * This class is used to make API requests to the scheduler.\n */\nexport class NylaSchedulerAPIConnector {\n private schedulerStore: NylasSchedulerStoreType;\n private schedulerAPIURL: string;\n private sessionId: string | undefined;\n private configId: string | undefined;\n private errors = new Errors();\n\n constructor({ schedulerAPIURL, schedulerStore, sessionId, configId }: NylasSchedulerAPIConnectorOptions) {\n this.schedulerStore = schedulerStore;\n this.schedulerAPIURL = schedulerAPIURL;\n this.sessionId = sessionId;\n this.configId = configId;\n }\n\n private getHeaders() {\n return !this.configId\n ? {\n Authorization: `Bearer ${this.sessionId}`,\n }\n : {};\n }\n\n /**\n * Makes an API request to the scheduler.\n * @param path The path to the API endpoint.\n * @param method The HTTP method.\n * @param body The request body (if any).\n * @returns {Promise<T>}\n */\n public async makeAPIRequest<T>(path: string, method: string, body: string | undefined, headers = {}): Promise<NylasResponse<T>> {\n try {\n const schedulerURL = new URL(this.schedulerAPIURL);\n schedulerURL.pathname = path;\n const response = await fetch(decodeURIComponent(schedulerURL.toString()), {\n method,\n headers: {\n 'Content-Type': 'application/json',\n ...headers,\n },\n body,\n });\n // The server returns a json object for errors: eg.\n // {\n // \"request_id\": \"<request_id>\",\n // \"error\": {\n // \"type\": \"not_found_error\",\n // \"message\": \"Session not found\"\n // }\n // }\n const data = await response.json();\n return data as NylasResponse<T>;\n } catch (error: any) {\n // NOTE: current server implementation doesn't return a JSON object for errors on some endpoints\n // handle this case by returning the error response as a string to be handled downstream\n return {\n error: {\n message: error.message,\n title: 'API request failed',\n type: 'api',\n },\n } as NylasErrorResponse;\n }\n }\n\n /**\n * Selects a date in the scheduler.\n */\n public selectDate(date: Date) {\n this.schedulerStore.set('selectedDate', date);\n this.schedulerStore.set('selectedTimeslot', null);\n }\n\n /**\n * Selects a time in the scheduler.\n */\n public selectTime(time: Timeslot) {\n this.schedulerStore.set('selectedTimeslot', time);\n }\n\n /**\n * Sets the timezone in the scheduler.\n */\n public selectTimezone(timezone: string) {\n this.schedulerStore.set('selectedTimezone', timezone);\n }\n\n /**\n * Toggles showBookingForm\n * @param value boolean\n */\n public toggleAdditionalData(value: boolean) {\n this.schedulerStore.set('showBookingForm', value);\n }\n\n /**\n * Set/update the name of the participant booking the event.\n */\n public setParticipantName(name: string) {\n const { bookingInfo } = this.schedulerStore.state;\n this.schedulerStore.set('bookingInfo', {\n ...bookingInfo,\n primaryParticipant: {\n ...(bookingInfo?.primaryParticipant as NylasSchedulerBookingData['primaryParticipant']),\n name,\n },\n });\n }\n\n /**\n * Set/update the email of the participant booking the event.\n */\n public setParticipantEmail(email: string) {\n const { bookingInfo } = this.schedulerStore.state;\n this.schedulerStore.set('bookingInfo', {\n ...bookingInfo,\n primaryParticipant: {\n ...(bookingInfo?.primaryParticipant as NylasSchedulerBookingData['primaryParticipant']),\n email,\n },\n });\n }\n\n /**\n * Set reschedule booking id\n */\n public async setReschedule(bookingID: string) {\n const today = new Date();\n // Set reschedule booking id\n this.schedulerStore.set('rescheduleBookingId', bookingID);\n // Reset store state\n this.schedulerStore.set('selectedTimeslot', null);\n this.schedulerStore.set('eventInfo', null);\n this.schedulerStore.set('showBookingForm', false);\n // Refetch availability\n const startTime = new Date(today.getFullYear(), today.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(today.getFullYear(), today.getMonth() + 1, 1).getTime() / 1000;\n const result = await this.getAvailability(startTime, endTime);\n // Set selected date to first available date\n const firstAvailableDate = this.schedulerStore.get('availability').find((timeslot: any) => new Date(timeslot.start_time) > new Date());\n let _selectedDate = today;\n if (firstAvailableDate) {\n _selectedDate = firstAvailableDate.start_time;\n }\n this.schedulerStore.set('selectedDate', _selectedDate);\n return result;\n }\n\n /**\n * Set cancel booking id\n */\n public async setCancel(bookingID: string) {\n this.schedulerStore.set('cancelBookingId', bookingID);\n }\n\n /**\n * Book the selected timeslot.\n * @param data The booking info.\n * @returns {Promise<NylasResponse<NylasEvent>>}\n */\n public async bookTimeslot(data?: NylasSchedulerBookingData & { timeslot?: Timeslot }): Promise<NylasSchedulerResponse<NylasEvent>> {\n this.schedulerStore.set('isLoading', true);\n const { selectedTimeslot, bookingInfo } = this.schedulerStore.state;\n if (!data && !bookingInfo) {\n return { error: this.errors.component('Booking').no_booking_info() };\n }\n\n const timeslot = data?.timeslot || selectedTimeslot;\n if (!timeslot) {\n return { error: this.errors.component('Create Booking').no_timeslot_selected() };\n }\n\n const primaryParticipant = data ? data?.primaryParticipant : bookingInfo?.primaryParticipant;\n const guests = data ? data?.guests || [] : bookingInfo?.guests || [];\n const additional_fields = data ? { ...data?.additionalFields, guests } : { ...bookingInfo?.additionalFields, guests };\n\n const headers = this.getHeaders();\n const configIdParam = this.configId ? `?configuration_id=${this.configId}` : '';\n const url = `/v3/scheduling/bookings${configIdParam}`;\n\n const response = await this.makeAPIRequest<NylasEvent>(\n decodeURIComponent(url),\n 'POST',\n JSON.stringify({\n additional_fields,\n guest: { ...primaryParticipant },\n start_time: timeslot.start_time.getTime() / 1000,\n end_time: timeslot.end_time.getTime() / 1000,\n }),\n headers,\n );\n\n if ('error' in response) {\n this.schedulerStore.set('isLoading', false);\n const errorType = response.error?.type;\n let error = response.error;\n if (errorType && errorType in this.errors.api('Create Booking')) {\n error = this.errors.api('Create Booking')[errorType as APIErrorType](error?.message || error?.title || 'Something went wrong');\n }\n return { error };\n }\n\n if ('data' in response) {\n this.schedulerStore.set('eventInfo', response?.data);\n }\n\n this.schedulerStore.set('isLoading', false);\n return response;\n }\n\n /**\n * Gets the availability for a page.\n * @param startTime The start time.\n * @param endTime The end time.\n * @returns {Promise<AvailabilityResponse>}\n */\n public async getAvailability(startTime: number = 0, endTime: number = 0): Promise<NylasSchedulerResponse<AvailabilityResponse>> {\n this.schedulerStore.set('isLoading', true);\n const params = new URLSearchParams();\n const now = new Date();\n const nowTime = now.getTime();\n\n if (endTime && endTime < nowTime / 1000) {\n this.schedulerStore.set('isLoading', false);\n const error = this.errors.component('Get Availability').endtime_not_in_future();\n return { error };\n }\n\n // Calculate the start of the current month if startTime is not provided\n if (!startTime) {\n const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);\n startTime = Math.floor(startOfMonth.getTime() / 1000); // Convert to UNIX timestamp in seconds\n }\n\n // Calculate the end of the current month if endTime is not provided\n if (!endTime) {\n const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0); // Setting day to 0 gets the last day of the previous month, so in this case, the last day of the current month\n endTime = Math.floor(endOfMonth.getTime() / 1000); // Convert to UNIX timestamp in seconds\n }\n\n params.append('start_time', encodeURIComponent(startTime.toString()));\n params.append('end_time', encodeURIComponent(endTime.toString()));\n if (this.configId) {\n params.append('configuration_id', encodeURIComponent(this.configId));\n }\n const queryString = params.toString();\n const url = `/v3/scheduling/availability${queryString ? `?${queryString}` : ''}`;\n const headers = this.getHeaders();\n const response = await this.makeAPIRequest<AvailabilityResponse>(decodeURIComponent(url), 'GET', undefined, headers);\n\n if ('error' in response) {\n this.schedulerStore.set('availability', []);\n this.schedulerStore.set('isLoading', false);\n const errorType = response.error?.type;\n let error = response.error;\n if (errorType && errorType in this.errors.api('Get Availability')) {\n error = this.errors.api('Get Availability')[errorType as APIErrorType](error?.message || error?.title || 'Something went wrong');\n }\n return { error };\n }\n\n if ('data' in response) {\n const availability =\n response.data?.time_slots?.map(timeslot => {\n return {\n ...timeslot,\n start_time: new Date(timeslot.start_time * 1000),\n end_time: new Date(timeslot.end_time * 1000),\n };\n }) || [];\n\n // Filter out timeslots that are in the past\n const availabilityTimeslotsFiltered = availability.filter(timeslot => timeslot.start_time.getTime() > nowTime);\n this.schedulerStore.set('availability', availabilityTimeslotsFiltered);\n }\n\n this.schedulerStore.set('isLoading', false);\n return response;\n }\n\n /**\n * Cancels a booking.\n * @param bookingId The booking ID.\n */\n public async cancelBooking(bookingId: string): Promise<NylasSchedulerResponse<Partial<NylasEvent>>> {\n this.schedulerStore.set('isLoading', true);\n if (!bookingId) {\n return { error: this.errors.component('Cancel Booking').no_booking_id() };\n }\n const configIdParam = this.configId ? `?configuration_id=${this.configId}` : '';\n const url = `/v3/scheduling/bookings/${bookingId}${configIdParam}`;\n const headers = this.getHeaders();\n const response = await this.makeAPIRequest<Partial<NylasEvent>>(\n decodeURIComponent(url),\n 'DELETE',\n JSON.stringify({\n action: 'cancel',\n }),\n headers,\n );\n\n if ('error' in response) {\n this.schedulerStore.set('isLoading', false);\n const errorType = response.error?.type;\n let error = response.error;\n if (errorType && errorType in this.errors.api('Cancel Booking')) {\n error = this.errors.api('Cancel Booking')[errorType as APIErrorType](error?.message || error?.title || 'Something went wrong');\n }\n return { error };\n }\n\n this.schedulerStore.set('cancelledEventInfo', {\n booking_id: bookingId,\n });\n\n this.schedulerStore.set('isLoading', false);\n return response;\n }\n\n /**\n * Reschedules a booking.\n * @param bookingId The booking ID.\n * @param data The booking info.\n * @returns {Promise<NylasResponse<NylasEvent>>}\n */\n public async rescheduleBooking(bookingId: string, data: NylasSchedulerBookingData): Promise<NylasSchedulerResponse<NylasEvent>> {\n this.schedulerStore.set('isLoading', true);\n if (!bookingId) {\n return { error: this.errors.component('Reschedule Booking').no_booking_id() };\n }\n const apiErrors = this.errors.api('Reschedule Booking');\n const componentErrors = this.errors.component('Reschedule Booking');\n const { bookingInfo, selectedTimeslot, selectedTimezone } = this.schedulerStore.state;\n // Validate data\n const { startTime, endTime, timezone } = data;\n const start_time = startTime || selectedTimeslot?.start_time;\n\n if (!start_time) {\n return { error: componentErrors.invalid_start_time('Please pass \"startTime\" in data or set \"selectedTimeslot\" in the defaultSchedulerState.') };\n }\n const end_time = endTime || selectedTimeslot?.end_time;\n if (!end_time) {\n return { error: componentErrors.invalid_end_time('Please pass \"endTime\" in data or set \"selectedTimeslot\" in the defaultSchedulerState.') };\n }\n const time_zone = timezone || selectedTimezone;\n if (!time_zone) {\n return { error: componentErrors.invalid_timezone('Please pass \"timezone\" in data or set \"selectedTimezone\" in the defaultSchedulerState.') };\n }\n\n const primaryParticipant = data ? data?.primaryParticipant : bookingInfo?.primaryParticipant;\n const guests = data ? data?.guests || [] : bookingInfo?.guests || [];\n const additional_fields = data ? { ...data?.additionalFields, guests } : { ...bookingInfo?.additionalFields, guests };\n\n const configIdParam = this.configId ? `?configuration_id=${this.configId}` : '';\n const url = `/v3/scheduling/bookings/${bookingId}${configIdParam}`;\n const headers = this.getHeaders();\n const response = await this.makeAPIRequest<NylasEvent>(\n decodeURIComponent(url),\n 'PATCH',\n JSON.stringify({\n start_time: start_time.getTime() / 1000,\n end_time: end_time.getTime() / 1000,\n time_zone,\n additional_fields,\n guest: { ...primaryParticipant },\n }),\n headers,\n );\n\n if ('error' in response) {\n this.schedulerStore.set('isLoading', false);\n const errorType = response.error?.type;\n let error = response.error;\n if (errorType && errorType in apiErrors) {\n error = apiErrors[errorType as APIErrorType](error?.message || error?.title || 'Something went wrong');\n }\n }\n\n if ('data' in response) this.schedulerStore.set('eventInfo', response?.data);\n\n this.schedulerStore.set('isLoading', false);\n return response;\n }\n}\n","import { DataState, NylasEvent } from '@/common/types';\nimport { debug } from '@/utils/utils';\nimport { NylasSchedulerBookingData, Timeslot } from '@nylas/core';\nimport { createStore } from '@stencil/store';\n\nexport type AvailabilityTimeslot = {\n emails: string[];\n start_time: Date;\n end_time: Date;\n};\n\nexport type LoadingState = {\n api: 'availability' | 'createBooking' | 'cancelBooking' | 'rescheduleBooking';\n};\n\nexport interface NylasSchedulerStoreState {\n selectedDate: Date | null;\n selectedLanguage: string;\n selectedTimezone: string;\n selectedTimeslot: Timeslot | null;\n showBookingForm: boolean;\n selectableDates: Date[] | null;\n availability: AvailabilityTimeslot[];\n state: DataState;\n eventInfo: NylasEvent | null;\n cancelledEventInfo: Partial<NylasEvent> | null;\n bookingInfo?: NylasSchedulerBookingData;\n rescheduleBookingId?: string;\n cancelBookingId?: string;\n isLoading: boolean;\n nylasBranding?: boolean;\n}\n\nexport type NylasSchedulerStoreType = ReturnType<typeof CreateNylasSchedulerStore>;\n\nexport function CreateNylasSchedulerStore(defaultState: Partial<NylasSchedulerStoreState> = {}) {\n const defaultNylasStoreState: NylasSchedulerStoreState = {\n selectedDate: null,\n selectedLanguage: navigator.language,\n selectedTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n selectedTimeslot: null,\n showBookingForm: false,\n selectableDates: null,\n availability: [],\n state: 'ready',\n eventInfo: null,\n cancelledEventInfo: null,\n isLoading: false,\n nylasBranding: true,\n ...defaultState,\n };\n debug(`[defaultNylasStoreState]: `, defaultNylasStoreState);\n const store = createStore<NylasSchedulerStoreState>(defaultNylasStoreState);\n\n store.onChange('availability', availability => {\n debug(`[availability]: `, availability);\n const selectableDates = availability.map(timeslot => timeslot.start_time);\n debug(`[selectableDates]: `, selectableDates);\n store.set('selectableDates', selectableDates);\n });\n\n /**\n * Reset the Nylas store to its default state.\n * There is something wrong with the stencil/store reset method,\n * so we have to do it via this hack.\n */\n store.reset = () => {\n for (const key in defaultNylasStoreState) {\n const value = defaultNylasStoreState[key as keyof typeof defaultNylasStoreState];\n store.set(key as any, value);\n }\n };\n\n return store;\n}\n"],"version":3}