@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,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { R as RegisterComponent } from './register-component.js';
3
- import { d as debug } from './utils.js';
3
+ import { a as debug } from './utils.js';
4
4
  import { d as defineCustomElement$5 } from './chevron.js';
5
5
  import { d as defineCustomElement$4 } from './info.js';
6
6
  import { d as defineCustomElement$3 } from './search.js';
@@ -30,10 +30,25 @@ const NylasCustomBookingFlow = proxyCustomElement(class NylasCustomBookingFlow e
30
30
  this.__attachShadow();
31
31
  this.valueChanged = createEvent(this, "valueChanged", 7);
32
32
  this.internals = this.attachInternals();
33
+ this.selectedConfiguration = undefined;
33
34
  this.name = 'booking-type';
34
35
  this.bookingType = '';
35
36
  this.selectedBookingType = '';
36
37
  }
38
+ elementNameChangedHandler(newValue) {
39
+ debug('nylas-custom-booking-flow', 'elementNameChangedHandler', newValue);
40
+ this.host.setAttribute('name', newValue);
41
+ }
42
+ selectedConfigurationChangedHandler(newValue, oldValue) {
43
+ debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue, oldValue);
44
+ if (newValue?.event_booking?.booking_type) {
45
+ this.bookingType = newValue?.event_booking?.booking_type;
46
+ }
47
+ if (typeof this.internals.setFormValue === 'function') {
48
+ this.internals.setFormValue(this.bookingType.toString(), 'booking-calendar');
49
+ }
50
+ this.selectedBookingType = this.bookingType;
51
+ }
37
52
  connectedCallback() {
38
53
  debug('nylas-custom-booking-flow', 'connectedCallback');
39
54
  }
@@ -46,10 +61,6 @@ const NylasCustomBookingFlow = proxyCustomElement(class NylasCustomBookingFlow e
46
61
  }
47
62
  componentDidLoad() {
48
63
  debug('nylas-custom-booking-flow', 'componentDidLoad');
49
- if (typeof this.internals.setFormValue === 'function') {
50
- this.internals.setFormValue(this.bookingType.toString(), 'booking-calendar');
51
- }
52
- this.selectedBookingType = this.bookingType;
53
64
  }
54
65
  componentWillUpdate() {
55
66
  debug('nylas-custom-booking-flow', 'componentWillUpdate');
@@ -63,10 +74,6 @@ const NylasCustomBookingFlow = proxyCustomElement(class NylasCustomBookingFlow e
63
74
  componentDidRender() {
64
75
  debug('nylas-custom-booking-flow', 'componentDidRender');
65
76
  }
66
- elementNameChangedHandler(newValue) {
67
- debug('nylas-custom-booking-flow', 'elementNameChangedHandler', newValue);
68
- this.host.setAttribute('name', newValue);
69
- }
70
77
  selectedOptionChangedHandler(event) {
71
78
  debug('nylas-custom-booking-flow', 'selectedOptionChangedHandler', event.detail);
72
79
  const valueChanged = (event) => {
@@ -87,24 +94,28 @@ const NylasCustomBookingFlow = proxyCustomElement(class NylasCustomBookingFlow e
87
94
  value: 'pre-booking',
88
95
  },
89
96
  ];
90
- return (h(Host, { key: 'a4f8162f7964925b34c256d88fa8cd3f0e684e7e' }, h("div", { key: '3b5c6077ad57d232f9c25c17b117b4ad31cf3cfa', class: "nylas-custom-booking-flow", part: "ncbf" }, h("div", { key: '4ecafa38be03812b2b6188d4858018d5cd94be8e', class: "header", part: "ncbf__header" }, h("h3", { key: 'd0eccafc6133ff24de9fbab11737e08862aad835' }, "Customize booking flow"), h("p", { key: '0e75183824a878b6df83f92467aba58072d2ac6f' }, "Customize how new bookings are handled when a booking is completed.")), bookingOptions.length > 0 ? (h("div", { class: "nylas-custom-booking-flow__dropdown" }, h("span", { class: "label" }, "After a booking is confirmed", h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, "Choose how you\u2019d like to handle new bookings. If you choose to manually confirm/decline bookings, you will be able to review and accept or decline each booking request."))), h("select-dropdown", { name: "booking-type", options: bookingOptions, withSearch: false, exportparts: "sd_dropdown: ncbf__dropdown, sd_dropdown-button: ncbf__dropdown-button, sd_dropdown-content: ncbf__dropdown-content", defaultSelectedOption: bookingOptions.find(cal => cal.value == this.bookingType) ?? bookingOptions[0] }))) : (h("div", { class: "nylas-custom-booking-flow__loading" }, h("span", { class: "label" }, "Select a calendar to book meetings on ", h("info-icon", null)), h("div", { class: "loading-button" }, h("span", null, "Loading...")))))));
97
+ return (h(Host, { key: '7f019073e242dce64522e27262298e480b0fb346' }, h("div", { key: '47bd77bcd4c4a1a9a845581bb6ad77b6dd7d65e7', class: "nylas-custom-booking-flow", part: "ncbf" }, h("div", { key: '17386ac59d7680789dda85e832c84061225b6b04', class: "header", part: "ncbf__header" }, h("h3", { key: '5368e8f321140f2bfaf60f6ca3f732f584824301' }, "Customize booking flow"), h("p", { key: '65a0d4d41804f41f7c01a682e4b8b97ebc2c4ef2' }, "Customize how new bookings are handled when a booking is completed.")), bookingOptions.length > 0 ? (h("div", { class: "nylas-custom-booking-flow__dropdown" }, h("span", { class: "label" }, "After a booking is confirmed", h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, "Choose how you\u2019d like to handle new bookings. If you choose to manually confirm/decline bookings, you will be able to review and accept or decline each booking request."))), h("select-dropdown", { name: "booking-type", options: bookingOptions, withSearch: false, exportparts: "sd_dropdown: ncbf__dropdown, sd_dropdown-button: ncbf__dropdown-button, sd_dropdown-content: ncbf__dropdown-content", defaultSelectedOption: bookingOptions.find(cal => cal.value == this.bookingType) ?? bookingOptions[0] }))) : (h("div", { class: "nylas-custom-booking-flow__loading" }, h("span", { class: "label" }, "Select a calendar to book meetings on ", h("info-icon", null)), h("div", { class: "loading-button" }, h("span", null, "Loading...")))))));
91
98
  }
92
99
  static get formAssociated() { return true; }
93
100
  get host() { return this; }
94
101
  static get watchers() { return {
95
- "name": ["elementNameChangedHandler"]
102
+ "name": ["elementNameChangedHandler"],
103
+ "selectedConfiguration": ["selectedConfigurationChangedHandler"]
96
104
  }; }
97
105
  static get style() { return nylasCustomBookingFlowCss; }
98
106
  }, [65, "nylas-custom-booking-flow", {
107
+ "selectedConfiguration": [16],
99
108
  "name": [1],
100
109
  "bookingType": [1, "booking-type"],
101
110
  "selectedBookingType": [32]
102
111
  }, [[0, "selectedOptionChanged", "selectedOptionChangedHandler"]], {
103
- "name": ["elementNameChangedHandler"]
112
+ "name": ["elementNameChangedHandler"],
113
+ "selectedConfiguration": ["selectedConfigurationChangedHandler"]
104
114
  }]);
105
115
  __decorate([
106
116
  RegisterComponent({
107
117
  name: 'nylas-custom-booking-flow',
118
+ stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
108
119
  eventToProps: {
109
120
  valueChanged: async (event, _nylasSchedulerConfigConnector) => {
110
121
  const { valueChanged } = event.detail;
@@ -1 +1 @@
1
- {"file":"nylas-custom-booking-flow2.js","mappings":"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","names":[],"sources":["src/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.scss?tag=nylas-custom-booking-flow&encapsulation=shadow","src/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-custom-booking-flow {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n .header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n h3 {\n margin: 0;\n font-size: 1rem;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n }\n }\n .nylas-custom-booking-flow__loading {\n padding-bottom: 1rem;\n .label {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin: 1rem 1rem 0;\n color: var(--nylas-base-800);\n }\n .loading-button {\n margin: 0 1rem;\n padding: 0;\n width: inherit;\n height: 48px;\n color: black;\n font-size: 1rem;\n cursor: not-allowed;\n display: flex;\n gap: 0.5rem;\n justify-content: space-between;\n align-items: center;\n background: transparent;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n span {\n padding: 0 1rem;\n }\n }\n }\n .nylas-custom-booking-flow__dropdown {\n padding: 1rem;\n span.label {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-800);\n tooltip-component {\n display: flex;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-button) {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1rem;\n }\n select-dropdown::part(sd_dropdown-content) {\n width: 100%;\n max-width: unset;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n max-width: calc(100% - 2rem);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\n/**\n * The `nylas-custom-booking-flow` component is a UI component that displays the booking calendar picker.\n * @part ncbf - The custom booking flow container\n * @part ncbf__header - The header of the custom booking flow\n * @part ncbf__dropdown - The dropdown container\n * @part ncbf__dropdown-button - The dropdown button\n * @part ncbf__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-custom-booking-flow',\n styleUrl: 'nylas-custom-booking-flow.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasCustomBookingFlow {\n @Element() host!: HTMLNylasCustomBookingFlowElement;\n /**\n * The name of the calendar picker.\n */\n @Prop() name: string = 'booking-type';\n /**\n * The booking type.\n */\n @Prop() bookingType: string = '';\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The selected bookingType.\n */\n @State() selectedBookingType: string = '';\n\n /**\n * This event is fired when the selected bookingType changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-custom-booking-flow', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-custom-booking-flow', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-custom-booking-flow', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-custom-booking-flow', 'componentDidLoad');\n // TODO: Remove this when the internals in tests are fixed.\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(this.bookingType.toString(), 'booking-calendar');\n }\n this.selectedBookingType = this.bookingType;\n }\n\n componentWillUpdate() {\n debug('nylas-custom-booking-flow', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-custom-booking-flow', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-custom-booking-flow', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-custom-booking-flow', 'componentDidRender');\n }\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-custom-booking-flow', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Listen('selectedOptionChanged')\n selectedOptionChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-custom-booking-flow', 'selectedOptionChangedHandler', event.detail);\n // Pass as handler so that if event.defaultPrevented by parent app, this will be skipped.\n const valueChanged = (event: CustomEvent<{ value: string; name: string }>) => {\n const { value } = event.detail;\n this.selectedBookingType = value;\n this.internals.setFormValue(value.toString(), 'booking-calendar');\n };\n this.valueChanged.emit({ ...event.detail, valueChanged });\n }\n\n @RegisterComponent<NylasCustomBookingFlow, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-custom-booking-flow',\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const bookingOptions = [\n {\n label: 'Automatically accept bookings',\n value: 'booking',\n },\n {\n label: 'Manually confirm/decline bookings',\n value: 'pre-booking',\n },\n ];\n\n return (\n <Host>\n <div class=\"nylas-custom-booking-flow\" part=\"ncbf\">\n <div class=\"header\" part=\"ncbf__header\">\n <h3>Customize booking flow</h3>\n <p>Customize how new bookings are handled when a booking is completed.</p>\n </div>\n\n {bookingOptions.length > 0 ? (\n <div class=\"nylas-custom-booking-flow__dropdown\">\n <span class=\"label\">\n After a booking is confirmed\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n Choose how you’d like to handle new bookings. If you choose to manually confirm/decline bookings, you will be able to review and accept or decline each booking\n request.\n </span>\n </tooltip-component>\n </span>\n <select-dropdown\n name=\"booking-type\"\n options={bookingOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: ncbf__dropdown, sd_dropdown-button: ncbf__dropdown-button, sd_dropdown-content: ncbf__dropdown-content\"\n defaultSelectedOption={bookingOptions.find(cal => cal.value == this.bookingType) ?? bookingOptions[0]}\n />\n </div>\n ) : (\n <div class=\"nylas-custom-booking-flow__loading\">\n <span class=\"label\">\n Select a calendar to book meetings on <info-icon />\n </span>\n <div class=\"loading-button\">\n <span>Loading...</span>\n </div>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-custom-booking-flow2.js","mappings":"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","names":[],"sources":["src/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.scss?tag=nylas-custom-booking-flow&encapsulation=shadow","src/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-custom-booking-flow {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n .header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n h3 {\n margin: 0;\n font-size: 1rem;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n }\n }\n .nylas-custom-booking-flow__loading {\n padding-bottom: 1rem;\n .label {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin: 1rem 1rem 0;\n color: var(--nylas-base-800);\n }\n .loading-button {\n margin: 0 1rem;\n padding: 0;\n width: inherit;\n height: 48px;\n color: black;\n font-size: 1rem;\n cursor: not-allowed;\n display: flex;\n gap: 0.5rem;\n justify-content: space-between;\n align-items: center;\n background: transparent;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n span {\n padding: 0 1rem;\n }\n }\n }\n .nylas-custom-booking-flow__dropdown {\n padding: 1rem;\n span.label {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-800);\n tooltip-component {\n display: flex;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-button) {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1rem;\n }\n select-dropdown::part(sd_dropdown-content) {\n width: 100%;\n max-width: unset;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n max-width: calc(100% - 2rem);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\n\n/**\n * The `nylas-custom-booking-flow` component is a UI component that displays the booking calendar picker.\n * @part ncbf - The custom booking flow container\n * @part ncbf__header - The header of the custom booking flow\n * @part ncbf__dropdown - The dropdown container\n * @part ncbf__dropdown-button - The dropdown button\n * @part ncbf__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-custom-booking-flow',\n styleUrl: 'nylas-custom-booking-flow.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasCustomBookingFlow {\n @Element() host!: HTMLNylasCustomBookingFlowElement;\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * The name of the calendar picker.\n */\n @Prop() name: string = 'booking-type';\n /**\n * The booking type.\n */\n @Prop() bookingType: string = '';\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The selected bookingType.\n */\n @State() selectedBookingType: string = '';\n\n /**\n * This event is fired when the selected bookingType changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-custom-booking-flow', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration, oldValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue, oldValue);\n if (newValue?.event_booking?.booking_type) {\n this.bookingType = newValue?.event_booking?.booking_type;\n }\n // TODO: Remove this when the internals in tests are fixed.\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(this.bookingType.toString(), 'booking-calendar');\n }\n this.selectedBookingType = this.bookingType;\n }\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-custom-booking-flow', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-custom-booking-flow', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-custom-booking-flow', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-custom-booking-flow', 'componentDidLoad');\n }\n\n componentWillUpdate() {\n debug('nylas-custom-booking-flow', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-custom-booking-flow', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-custom-booking-flow', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-custom-booking-flow', 'componentDidRender');\n }\n\n @Listen('selectedOptionChanged')\n selectedOptionChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-custom-booking-flow', 'selectedOptionChangedHandler', event.detail);\n // Pass as handler so that if event.defaultPrevented by parent app, this will be skipped.\n const valueChanged = (event: CustomEvent<{ value: string; name: string }>) => {\n const { value } = event.detail;\n this.selectedBookingType = value;\n this.internals.setFormValue(value.toString(), 'booking-calendar');\n };\n this.valueChanged.emit({ ...event.detail, valueChanged });\n }\n\n @RegisterComponent<NylasCustomBookingFlow, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-custom-booking-flow',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const bookingOptions = [\n {\n label: 'Automatically accept bookings',\n value: 'booking',\n },\n {\n label: 'Manually confirm/decline bookings',\n value: 'pre-booking',\n },\n ];\n\n return (\n <Host>\n <div class=\"nylas-custom-booking-flow\" part=\"ncbf\">\n <div class=\"header\" part=\"ncbf__header\">\n <h3>Customize booking flow</h3>\n <p>Customize how new bookings are handled when a booking is completed.</p>\n </div>\n\n {bookingOptions.length > 0 ? (\n <div class=\"nylas-custom-booking-flow__dropdown\">\n <span class=\"label\">\n After a booking is confirmed\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n Choose how you’d like to handle new bookings. If you choose to manually confirm/decline bookings, you will be able to review and accept or decline each booking\n request.\n </span>\n </tooltip-component>\n </span>\n <select-dropdown\n name=\"booking-type\"\n options={bookingOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: ncbf__dropdown, sd_dropdown-button: ncbf__dropdown-button, sd_dropdown-content: ncbf__dropdown-content\"\n defaultSelectedOption={bookingOptions.find(cal => cal.value == this.bookingType) ?? bookingOptions[0]}\n />\n </div>\n ) : (\n <div class=\"nylas-custom-booking-flow__loading\">\n <span class=\"label\">\n Select a calendar to book meetings on <info-icon />\n </span>\n <div class=\"loading-button\">\n <span>Loading...</span>\n </div>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { R as RegisterComponent } from './register-component.js';
3
- import { l as getLastDayOfMonth, n as getFirstDayOfMonth, o as isSameDay, p as isSameMonth } from './utils.js';
3
+ import { k as getLastDayOfMonth, l as getFirstDayOfMonth, n as isSameDay, o as isSameMonth } from './utils.js';
4
4
  import { d as defineCustomElement$1 } from './chevron.js';
5
5
 
6
6
  const t0 = new Date, t1 = new Date;
@@ -1,6 +1,7 @@
1
1
  import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
2
2
  import { R as RegisterComponent } from './register-component.js';
3
- import { d as debug, q as parsePreviewLink } from './utils.js';
3
+ import { a as debug, p as parsePreviewLink } from './utils.js';
4
+ import { D as DEFAULT_OPEN_HOURS } from './constants.js';
4
5
  import { d as defineCustomElement$w } from './add-circle.js';
5
6
  import { d as defineCustomElement$v } from './button-component2.js';
6
7
  import { d as defineCustomElement$u } from './calendar-info.js';
@@ -49,19 +50,18 @@ function TabContents({ id, formState, activeTab, calendars }) {
49
50
  h("nylas-location-component", { name: "location", eventLocation: location, exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
50
51
  h("nylas-event-description", { name: "description", eventDescription: eventDescription, exportparts: "nedesc, nedesc__textarea" })))));
51
52
  case 'availability':
52
- const openHours = formState.availability;
53
- const timezone = openHours?.[0]?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
53
+ const openHours = formState.availability.openHours;
54
+ const timezone = formState.availability.timezone ? formState.availability.timezone : Intl.DateTimeFormat().resolvedOptions().timeZone;
54
55
  const organizer = formState.participants?.find(p => p.is_organizer);
55
56
  const organizerEmail = organizer?.email ?? 'primary';
56
57
  const selectedCalendars = formState.calendarIds.length > 0 ? formState.calendarIds : [organizerEmail];
57
58
  const bookingCalendar = formState.bookingCalendar == 'primary' ? organizerEmail : formState.bookingCalendar;
58
59
  return (h("div", { key: id },
59
60
  h("nylas-booking-calendar-picker", { name: "booking-calendar", calendars: calendars ?? [], defaultBookingCalendar: bookingCalendar, exportparts: 'nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content' }),
60
- h("nylas-calendar-picker", { name: "calendars", calendars: calendars ?? [], defaultSelectedCalendars: selectedCalendars, organizerEmail: organizerEmail, exportparts: 'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content' }),
61
+ h("nylas-calendar-picker", { name: "calendars", calendars: calendars ?? [], defaultSelectedCalendars: selectedCalendars, exportparts: 'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content' }),
61
62
  h("nylas-availability-picker", { name: "availability", openHours: openHours, defaultTimezone: timezone, 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' })));
62
63
  case 'bookingOptions':
63
64
  return (h("div", { key: id },
64
- id == 'new' && h("p", null, "Config"),
65
65
  h("nylas-buffer-time", { name: "buffer-time", buffer: formState.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' }),
66
66
  h("nylas-custom-booking-flow", { name: "booking-type", bookingType: formState.bookingType, exportparts: 'ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content' }),
67
67
  h("nylas-event-limits", null,
@@ -71,7 +71,7 @@ function TabContents({ id, formState, activeTab, calendars }) {
71
71
  }
72
72
  }
73
73
 
74
- const nylasEditorTabsCss = ".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}";
74
+ const nylasEditorTabsCss = ".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;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.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}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.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}";
75
75
 
76
76
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
77
77
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -93,24 +93,33 @@ const NylasEditorTabs = proxyCustomElement(class NylasEditorTabs extends HTMLEle
93
93
  this.__registerHost();
94
94
  this.schedulerConfigChanged = createEvent(this, "schedulerConfigChanged", 7);
95
95
  this.cancelButtonClick = createEvent(this, "cancelButtonClick", 7);
96
+ this.formSubmitted = createEvent(this, "formSubmitted", 7);
96
97
  this.previewButtonClicked = createEvent(this, "previewButtonClicked", 7);
98
+ this.setError = (error) => {
99
+ this.error = error.message;
100
+ };
97
101
  this.formSubmissionHandler = async (event) => {
98
102
  event.preventDefault();
103
+ this.formSubmitted.emit();
104
+ const valid = this.formRef.checkValidity();
105
+ if (!valid) {
106
+ return;
107
+ }
99
108
  this.isLoading = true;
100
109
  this.hasUnsavedChanges = false;
101
- this.updateFormState();
102
- const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } = this.formState;
103
- const organizer = this.config?.participants?.find(p => p.is_organizer);
110
+ const formState = this.updateFormState();
111
+ const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } = formState;
112
+ const organizer = this.selectedConfiguration?.participants?.find(p => p.is_organizer);
104
113
  const configObject = {
105
- ...(this.config?.id && { id: this.config.id }),
106
- version: this.config?.version ?? '1.0.0',
114
+ ...this.selectedConfiguration,
115
+ version: this.selectedConfiguration?.version ?? '1.0.0',
107
116
  availability: {
108
117
  duration_minutes: duration ? parseInt(duration) : 0,
109
118
  availability_rules: {
110
- availability_method: this.config?.availability?.availability_rules?.availability_method ?? 'collective',
119
+ availability_method: this.selectedConfiguration?.availability?.availability_rules?.availability_method ?? 'collective',
111
120
  buffer: buffer || { before: 0, after: 0 },
112
- default_open_hours: this.config?.availability?.availability_rules?.default_open_hours ?? [],
113
- round_robin_group_id: this.config?.availability?.availability_rules?.round_robin_group_id ?? '',
121
+ default_open_hours: this.selectedConfiguration?.availability?.availability_rules?.default_open_hours ?? DEFAULT_OPEN_HOURS,
122
+ round_robin_group_id: this.selectedConfiguration?.availability?.availability_rules?.round_robin_group_id ?? '',
114
123
  },
115
124
  },
116
125
  participants: [
@@ -120,7 +129,7 @@ const NylasEditorTabs = proxyCustomElement(class NylasEditorTabs extends HTMLEle
120
129
  is_organizer: true,
121
130
  availability: {
122
131
  calendar_ids: calendarIds?.length ? calendarIds : ['primary'],
123
- open_hours: availability ?? [],
132
+ open_hours: availability?.openHours ?? [],
124
133
  },
125
134
  booking: {
126
135
  calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',
@@ -132,6 +141,7 @@ const NylasEditorTabs = proxyCustomElement(class NylasEditorTabs extends HTMLEle
132
141
  description: description?.toString() ?? '',
133
142
  location: location?.toString() ?? '',
134
143
  booking_type: bookingType?.toString() ?? 'booking',
144
+ timezone: availability?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
135
145
  },
136
146
  scheduler: {
137
147
  available_days_in_future: availableDaysInFuture ?? 30,
@@ -145,21 +155,23 @@ const NylasEditorTabs = proxyCustomElement(class NylasEditorTabs extends HTMLEle
145
155
  this.changesSaved = false;
146
156
  }, 5000);
147
157
  };
148
- this.schedulerConfigChanged.emit({ config: configObject, resetLoadingState, action: this.action });
158
+ this.schedulerConfigChanged.emit({ config: configObject, resetLoadingState, setError: this.setError, action: this.action });
149
159
  };
150
160
  this.calendars = undefined;
151
- this.config = undefined;
161
+ this.selectedConfiguration = undefined;
152
162
  this.currentUser = undefined;
153
163
  this.schedulerPreviewLink = '';
154
164
  this.action = 'create';
165
+ this.mode = 'app';
155
166
  this.activeTab = 'eventInfo';
156
167
  this.isLoading = false;
157
168
  this.hasUnsavedChanges = false;
158
169
  this.changesSaved = false;
159
170
  this.formState = {};
171
+ this.error = '';
160
172
  }
161
173
  configChangedHandler(newConfig) {
162
- debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.config);
174
+ debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.selectedConfiguration);
163
175
  this.formState = {
164
176
  ...this.getFormStateFromConfig(newConfig),
165
177
  };
@@ -175,7 +187,7 @@ const NylasEditorTabs = proxyCustomElement(class NylasEditorTabs extends HTMLEle
175
187
  }
176
188
  componentWillLoad() {
177
189
  debug('[nylas-editor-tabs]', 'componentWillLoad');
178
- this.formState = this.getFormStateFromConfig(this.config);
190
+ this.formState = this.getFormStateFromConfig(this.selectedConfiguration);
179
191
  }
180
192
  componentDidLoad() {
181
193
  debug('[nylas-editor-tabs]', 'componentDidLoad');
@@ -185,8 +197,10 @@ const NylasEditorTabs = proxyCustomElement(class NylasEditorTabs extends HTMLEle
185
197
  }
186
198
  handleValueChanged(event) {
187
199
  debug('[nylas-editor-tabs]', 'handleValueChanged', event);
188
- this.formState = { ...this.formState, [event.detail.name]: event.detail.value };
200
+ const { name, value } = event.detail;
201
+ this.formState = { ...this.formState, [name]: value };
189
202
  this.hasUnsavedChanges = true;
203
+ this.error = '';
190
204
  }
191
205
  getFormStateFromConfig(config) {
192
206
  const organizerParticipant = config?.participants?.find(p => p.is_organizer);
@@ -194,15 +208,18 @@ const NylasEditorTabs = proxyCustomElement(class NylasEditorTabs extends HTMLEle
194
208
  title: config?.event_booking?.title ?? '',
195
209
  description: config?.event_booking?.description ?? '',
196
210
  duration: config?.availability?.duration_minutes?.toString() ?? '10',
197
- availability: organizerParticipant?.availability?.open_hours ?? undefined,
211
+ availability: {
212
+ timezone: config?.event_booking?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
213
+ open_hours: organizerParticipant?.availability?.open_hours ?? undefined,
214
+ },
198
215
  calendarIds: organizerParticipant?.availability?.calendar_ids ?? [],
199
216
  participants: config?.participants ?? [],
200
217
  bookingCalendar: organizerParticipant?.booking?.calendar_id ?? organizerParticipant?.email ?? '',
201
- location: this.config?.event_booking?.location ?? '',
202
- bookingType: this.config?.event_booking?.booking_type ?? 'booking',
203
- buffer: this.config?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },
204
- availableDaysInFuture: this.config?.scheduler?.available_days_in_future ?? 30,
205
- minCancellationNotice: this.config?.scheduler?.min_cancellation_notice ?? 0,
218
+ location: this.selectedConfiguration?.event_booking?.location ?? '',
219
+ bookingType: this.selectedConfiguration?.event_booking?.booking_type ?? 'booking',
220
+ buffer: this.selectedConfiguration?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },
221
+ availableDaysInFuture: this.selectedConfiguration?.scheduler?.available_days_in_future ?? 30,
222
+ minCancellationNotice: this.selectedConfiguration?.scheduler?.min_cancellation_notice ?? 0,
206
223
  };
207
224
  }
208
225
  updateFormState() {
@@ -248,6 +265,7 @@ const NylasEditorTabs = proxyCustomElement(class NylasEditorTabs extends HTMLEle
248
265
  }
249
266
  });
250
267
  this.formState = { ...this.formState };
268
+ return this.formState;
251
269
  }
252
270
  setActiveTab(e, tabName) {
253
271
  e.preventDefault();
@@ -256,58 +274,71 @@ const NylasEditorTabs = proxyCustomElement(class NylasEditorTabs extends HTMLEle
256
274
  }
257
275
  render() {
258
276
  debug('[nylas-editor-tabs]', 'render', this.formState);
259
- return (h(Host, { key: '5a1e8ee246d47626dce5515c3ec4df3e6ae893a4' }, h("form", { key: 'f49d1fa60f2724c5cae8c1328dfee945ae24f1e2', onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: el => (this.formRef = el) }, h("div", { key: 'f0b678836e12c3878128e4b810e5541f00ddee29', class: "form-contents" }, h("div", { key: '910dc155a6b7b01e300084fe405da0d0b0801847', class: "tabs" }, h("button", { key: '80ca54ac98ae0d3b2298ae62253ffcb9d3ae539d', class: { tab: true, active: this.activeTab == 'eventInfo' }, onClick: e => this.setActiveTab(e, 'eventInfo') }, h("calendar-info-icon", { key: '842e45f308921afa7948f8408b84f95d7b802850', width: "16", height: "16" }), "Event Info"), h("button", { key: '7b79207240cbae5dcd554d448f68dc544f2e6c80', class: { tab: true, active: this.activeTab == 'availability' }, onClick: e => this.setActiveTab(e, 'availability') }, h("calendar-patterns-icon", { key: '47b3d8cf7ee50eac7d377ab3faf35c27f1215e96', width: "16", height: "16" }), "Availability"), h("button", { key: 'ffb175caa6ccc4ba377ee4947759d0561ebb089b', class: { tab: true, active: this.activeTab == 'bookingOptions' }, onClick: e => this.setActiveTab(e, 'bookingOptions') }, h("flow-icon", { key: 'fc3bec08bd5080e7b2ec7816bb3c021876c20d7c', width: "16", height: "16" }), "Booking Options")), h("div", { key: '80802e1388eb767bcea718907e75d5b4a2de3701', class: "tab-content" }, h(TabContents, { key: '5c5618341227447d2a41061f415e54d83efc354a', formState: this.formState, activeTab: this.activeTab, calendars: this.calendars, id: this.config?.id ?? 'new' }))), h("div", { key: 'd315bad7ea2efe6699557a5e07b55053926a7517', class: "footer" }, h("div", { key: '4c92a480ee6d2f04d9fa36f3e870d414835406e1', class: "preview" }, this.schedulerPreviewLink !== '' && this.action === 'edit' && (h("button-component", { type: "button", disabled: this.isLoading, clickHandler: event => {
277
+ return (h(Host, { key: 'c1e6e9d2cfe242e407a909281063767a0985245e' }, h("form", { key: '4baaac0129e8a357b78980636bd32b3818ec0820', onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: el => (this.formRef = el), noValidate: true }, this.mode === 'app' ? (h("div", { class: "form-contents" }, h("div", { class: "tabs" }, h("button", { class: { tab: true, active: this.activeTab == 'eventInfo' }, onClick: e => this.setActiveTab(e, 'eventInfo') }, h("calendar-info-icon", { width: "16", height: "16" }), "Event Info"), h("button", { class: { tab: true, active: this.activeTab == 'availability' }, onClick: e => this.setActiveTab(e, 'availability') }, h("calendar-patterns-icon", { width: "16", height: "16" }), "Availability"), h("button", { class: { tab: true, active: this.activeTab == 'bookingOptions' }, onClick: e => this.setActiveTab(e, 'bookingOptions') }, h("flow-icon", { width: "16", height: "16" }), "Booking Options")), h("div", { class: "tab-content" }, h(TabContents, { formState: this.formState, activeTab: this.activeTab, calendars: this.calendars, id: this.selectedConfiguration?.id ?? 'new' })))) : (h("slot", null)), h("div", { key: '38bdcdd7283d98ea54c7594a52cc16b85b3b776a', class: "footer" }, h("div", { key: '5543e3f7eb2fa9f2f3bbe6053fde7d0ea13c3bc0', class: "preview" }, this.schedulerPreviewLink !== '' && this.action === 'edit' && (h("button-component", { type: "button", disabled: this.isLoading, clickHandler: event => {
260
278
  event.preventDefault();
261
279
  const previewEvent = this.previewButtonClicked.emit(this.host);
262
280
  if (!previewEvent.defaultPrevented) {
263
- window.open(parsePreviewLink(this.schedulerPreviewLink, this.config), '_blank');
281
+ window.open(parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');
264
282
  }
265
- }, variant: 'basic' }, "Preview"))), h("div", { key: '22fdd2183dcc2c299d2fdacf0db8922a95a5692e', class: "buttons" }, h("p", { key: '63ea7b4d8362f409caec467a7bce22142ccc1b20', class: {
283
+ }, variant: 'basic' }, "Preview"))), h("div", { key: '62470cdbc7c4670e6ff03e9979ca803f81482b15', class: "buttons" }, h("p", { key: '5ecdfa1082650aab2f8fef8ed7beeb11fedb381c', class: {
266
284
  'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,
267
285
  'saved-changes': this.changesSaved,
268
- } }, this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.changesSaved ? 'Changes saved!' : ''), h("button-component", { key: '6ceded872ee5510234ff79bff3f0173a72314714', type: "button", disabled: this.isLoading, clickHandler: event => {
286
+ 'error': this.error !== '',
287
+ 'error-full-width': this.error !== '' && this.action === 'create',
288
+ } }, this.error !== '' ? this.error : '', this.error == '' && this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.error == '' && this.changesSaved ? 'Changes saved!' : ''), h("button-component", { key: '1bb3af5cc04c49e311267fb43ac326267acdaa1d', type: "button", disabled: this.isLoading, clickHandler: event => {
269
289
  event.preventDefault();
270
290
  this.cancelButtonClick.emit();
271
- }, variant: 'basic' }, "Cancel"), h("button-component", { key: '4f33ad6071f503837395d900b67fafc8605d8043', type: "submit", disabled: this.isLoading }, this.isLoading ? (h("span", null, "Saving", h("loading-icon", null), ' ')) : this.action == 'create' ? ('Create') : ('Save changes')))))));
291
+ this.error = '';
292
+ }, variant: 'basic' }, "Cancel"), h("button-component", { key: '28c9725c69104d1849b2ab3068b61a269370f016', type: "submit", disabled: this.isLoading }, this.isLoading ? (h("span", null, "Saving", h("loading-icon", null), ' ')) : this.action == 'create' ? ('Create') : ('Save changes')))))));
272
293
  }
273
294
  get host() { return this; }
274
295
  static get watchers() { return {
275
- "config": ["configChangedHandler"]
296
+ "selectedConfiguration": ["configChangedHandler"]
276
297
  }; }
277
298
  static get style() { return nylasEditorTabsCss; }
278
- }, [2, "nylas-editor-tabs", {
299
+ }, [6, "nylas-editor-tabs", {
279
300
  "calendars": [16],
280
- "config": [16],
301
+ "selectedConfiguration": [16],
281
302
  "currentUser": [16],
282
303
  "schedulerPreviewLink": [1, "scheduler-preview-link"],
304
+ "mode": [1],
283
305
  "action": [32],
284
306
  "activeTab": [32],
285
307
  "isLoading": [32],
286
308
  "hasUnsavedChanges": [32],
287
309
  "changesSaved": [32],
288
- "formState": [32]
310
+ "formState": [32],
311
+ "error": [32]
289
312
  }, [[0, "valueChanged", "handleValueChanged"]], {
290
- "config": ["configChangedHandler"]
313
+ "selectedConfiguration": ["configChangedHandler"]
291
314
  }]);
292
315
  __decorate([
293
316
  RegisterComponent({
294
317
  name: 'nylas-editor-tabs',
295
318
  stateToProps: new Map([
296
319
  ['schedulerConfig.calendars', 'calendars'],
297
- ['schedulerConfig.config', 'config'],
320
+ ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],
298
321
  ['schedulerConfig.currentUser', 'currentUser'],
299
322
  ]),
300
323
  eventToProps: {
301
324
  schedulerConfigChanged: async (event, nylasSchedulerConfigConnector) => {
302
- const { resetLoadingState, action, config } = event.detail;
303
- if (resetLoadingState) {
304
- resetLoadingState(event);
305
- }
325
+ const { resetLoadingState, setError, action, config } = event.detail;
326
+ const checkForErrors = (response) => {
327
+ const [data, error] = response;
328
+ if (!data && error && setError) {
329
+ setError(error);
330
+ }
331
+ if (resetLoadingState) {
332
+ resetLoadingState(event);
333
+ }
334
+ };
306
335
  if (action === 'edit') {
307
- await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);
336
+ const response = await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);
337
+ checkForErrors(response);
308
338
  }
309
339
  else {
310
- await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);
340
+ const response = await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);
341
+ checkForErrors(response);
311
342
  }
312
343
  },
313
344
  cancelButtonClick: async (_, nylasSchedulerConfigConnector) => {