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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (939) hide show
  1. package/dist/cjs/add-circle-icon.cjs.entry.js +1 -1
  2. package/dist/cjs/add-circle-icon_22.cjs.entry.js +224 -94
  3. package/dist/cjs/add-circle-icon_22.cjs.entry.js.map +1 -1
  4. package/dist/cjs/archive-icon.cjs.entry.js +1 -1
  5. package/dist/cjs/archive-icon_7.cjs.entry.js +7 -7
  6. package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
  7. package/dist/cjs/bold-icon.cjs.entry.js +1 -1
  8. package/dist/cjs/bold-icon_3.cjs.entry.js +3 -3
  9. package/dist/cjs/button-component.cjs.entry.js +2 -2
  10. package/dist/cjs/button-component.cjs.entry.js.map +1 -1
  11. package/dist/cjs/calendar-cancel-icon.cjs.entry.js +1 -1
  12. package/dist/cjs/calendar-check-icon.cjs.entry.js +1 -1
  13. package/dist/cjs/calendar-check-icon_2.cjs.entry.js +2 -2
  14. package/dist/cjs/calendar-icon.cjs.entry.js +1 -1
  15. package/dist/cjs/calendar-info-icon.cjs.entry.js +1 -1
  16. package/dist/cjs/calendar-patterns-icon.cjs.entry.js +1 -1
  17. package/dist/cjs/checkmark-circle-icon.cjs.entry.js +1 -1
  18. package/dist/cjs/chevron-icon.cjs.entry.js +1 -1
  19. package/dist/cjs/chevron-icon_3.cjs.entry.js +4 -4
  20. package/dist/cjs/close-icon.cjs.entry.js +1 -1
  21. package/dist/cjs/{constants-6baf1f1d.js → constants-3e962931.js} +11 -1
  22. package/dist/cjs/{constants-6baf1f1d.js.map → constants-3e962931.js.map} +1 -1
  23. package/dist/cjs/{constants-0fba94a4.js → constants-d590922e.js} +11 -1
  24. package/dist/cjs/{constants-0fba94a4.js.map → constants-d590922e.js.map} +1 -1
  25. package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
  26. package/dist/cjs/flow-icon.cjs.entry.js +1 -1
  27. package/dist/cjs/folder-icon.cjs.entry.js +1 -1
  28. package/dist/cjs/forward-icon.cjs.entry.js +1 -1
  29. package/dist/cjs/forward-icon_6.cjs.entry.js +9 -9
  30. package/dist/cjs/globe-icon.cjs.entry.js +1 -1
  31. package/dist/cjs/google-logo-icon.cjs.entry.js +1 -1
  32. package/dist/cjs/google-logo-icon_4.cjs.entry.js +467 -0
  33. package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -0
  34. package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
  35. package/dist/cjs/index-7af03e3f.js +1 -158
  36. package/dist/cjs/index-c14ea8f5.js +1 -358
  37. package/dist/cjs/index.cjs.js +3 -1
  38. package/dist/cjs/index.cjs.js.map +1 -1
  39. package/dist/cjs/{index.es-68425511.js → index.es-0a0f2d87.js} +9 -4
  40. package/dist/cjs/index.es-0a0f2d87.js.map +1 -0
  41. package/dist/cjs/{index.es-447c5aca.js → index.es-b12b7df1.js} +9 -4
  42. package/dist/cjs/index.es-b12b7df1.js.map +1 -0
  43. package/dist/cjs/info-icon.cjs.entry.js +1 -1
  44. package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
  45. package/dist/cjs/italic-icon.cjs.entry.js +1 -1
  46. package/dist/cjs/loader.cjs.js +1 -1
  47. package/dist/cjs/loading-icon.cjs.entry.js +1 -1
  48. package/dist/cjs/location-icon.cjs.entry.js +1 -1
  49. package/dist/cjs/location-off-icon.cjs.entry.js +1 -1
  50. package/dist/cjs/{mailbox-store-556bc7b6.js → mailbox-store-05fa3bec.js} +3 -3
  51. package/dist/cjs/{mailbox-store-556bc7b6.js.map → mailbox-store-05fa3bec.js.map} +1 -1
  52. package/dist/cjs/{mailbox-store-aacd75ff.js → mailbox-store-14531fd4.js} +3 -3
  53. package/dist/cjs/{mailbox-store-aacd75ff.js.map → mailbox-store-14531fd4.js.map} +1 -1
  54. package/dist/cjs/microsoft-logo-icon.cjs.entry.js +1 -1
  55. package/dist/cjs/multi-select-dropdown.cjs.entry.js +3 -3
  56. package/dist/cjs/nylas-additional-participants.cjs.entry.js +3 -3
  57. package/dist/cjs/nylas-api-request-27c25287.js +60 -0
  58. package/dist/cjs/nylas-api-request-27c25287.js.map +1 -0
  59. package/dist/cjs/nylas-api-request-abdb8dd8.js +58 -0
  60. package/dist/cjs/nylas-api-request-abdb8dd8.js.map +1 -0
  61. package/dist/cjs/nylas-availability-picker.cjs.entry.js +33 -16
  62. package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
  63. package/dist/cjs/nylas-booked-event-card.cjs.entry.js +3 -3
  64. package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +7 -7
  65. package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js +12 -6
  66. package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js.map +1 -1
  67. package/dist/cjs/nylas-booking-form.cjs.entry.js +2 -2
  68. package/dist/cjs/nylas-buffer-time.cjs.entry.js +2 -2
  69. package/dist/cjs/nylas-calendar-picker.cjs.entry.js +13 -8
  70. package/dist/cjs/nylas-calendar-picker.cjs.entry.js.map +1 -1
  71. package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +3 -3
  72. package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +3 -3
  73. package/dist/cjs/nylas-composer.cjs.entry.js +2 -2
  74. package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +21 -12
  75. package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js.map +1 -1
  76. package/dist/cjs/nylas-date-picker.cjs.entry.js +2 -2
  77. package/dist/cjs/nylas-editor-tabs.cjs.entry.js +85 -39
  78. package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
  79. package/dist/cjs/nylas-event-description.cjs.entry.js +15 -6
  80. package/dist/cjs/nylas-event-description.cjs.entry.js.map +1 -1
  81. package/dist/cjs/nylas-event-duration.cjs.entry.js +15 -10
  82. package/dist/cjs/nylas-event-duration.cjs.entry.js.map +1 -1
  83. package/dist/cjs/nylas-event-info.cjs.entry.js +3 -3
  84. package/dist/cjs/nylas-event-limits.cjs.entry.js +3 -3
  85. package/dist/cjs/nylas-event-title.cjs.entry.js +52 -12
  86. package/dist/cjs/nylas-event-title.cjs.entry.js.map +1 -1
  87. package/dist/cjs/nylas-form-card.cjs.entry.js +3 -3
  88. package/dist/cjs/nylas-if-state.cjs.entry.js +2 -2
  89. package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +24 -11
  90. package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js.map +1 -1
  91. package/dist/cjs/nylas-list-configurations.cjs.entry.js +129 -0
  92. package/dist/cjs/nylas-list-configurations.cjs.entry.js.map +1 -0
  93. package/dist/cjs/nylas-list-folders.cjs.entry.js +3 -3
  94. package/dist/cjs/nylas-list-threads.cjs.entry.js +3 -3
  95. package/dist/cjs/nylas-locale-switch.cjs.entry.js +3 -3
  96. package/dist/cjs/nylas-location-component.cjs.entry.js +17 -6
  97. package/dist/cjs/nylas-location-component.cjs.entry.js.map +1 -1
  98. package/dist/cjs/nylas-login.cjs.entry.js +3 -3
  99. package/dist/cjs/nylas-logo.cjs.entry.js +1 -1
  100. package/dist/cjs/nylas-mailbox-pagination.cjs.entry.js +2 -2
  101. package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +3 -3
  102. package/dist/cjs/nylas-mailbox.cjs.entry.js +4 -4
  103. package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js +28 -13
  104. package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js.map +1 -1
  105. package/dist/cjs/nylas-notification.cjs.entry.js +2 -2
  106. package/dist/cjs/nylas-provider.cjs.entry.js +6 -6
  107. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +201 -75
  108. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
  109. package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
  110. package/dist/cjs/nylas-selected-event-card.cjs.entry.js +3 -3
  111. package/dist/cjs/nylas-summarize-message-button.cjs.entry.js +4 -4
  112. package/dist/cjs/nylas-threads-refresh.cjs.entry.js +4 -4
  113. package/dist/cjs/nylas-threads-search.cjs.entry.js +3 -3
  114. package/dist/cjs/nylas-time-window-picker.cjs.entry.js +2 -2
  115. package/dist/cjs/nylas-timeslot-picker.cjs.entry.js +2 -2
  116. package/dist/cjs/nylas-view-email.cjs.entry.js +2 -2
  117. package/dist/cjs/nylas-view-thread.cjs.entry.js +3 -3
  118. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  119. package/dist/cjs/people-icon.cjs.entry.js +1 -1
  120. package/dist/cjs/play-icon.cjs.entry.js +1 -1
  121. package/dist/cjs/play-icon_2.cjs.entry.js +2 -2
  122. package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
  123. package/dist/cjs/{register-component-d729f3f7.js → register-component-09ebdf31.js} +8 -2
  124. package/dist/cjs/register-component-09ebdf31.js.map +1 -0
  125. package/dist/cjs/{register-component-f1ebc65d.js → register-component-c8b6e907.js} +8 -2
  126. package/dist/cjs/register-component-c8b6e907.js.map +1 -0
  127. package/dist/cjs/reply-all-icon.cjs.entry.js +1 -1
  128. package/dist/cjs/reply-icon.cjs.entry.js +1 -1
  129. package/dist/cjs/scheduler-config-store-37690bf0.js +32 -0
  130. package/dist/cjs/scheduler-config-store-37690bf0.js.map +1 -0
  131. package/dist/cjs/scheduler-config-store-529c8d7e.js +32 -0
  132. package/dist/cjs/scheduler-config-store-529c8d7e.js.map +1 -0
  133. package/dist/cjs/{scheduler-store-7320f5d0.js → scheduler-store-0081970d.js} +16 -3
  134. package/dist/cjs/scheduler-store-0081970d.js.map +1 -0
  135. package/dist/cjs/{scheduler-store-4cb46b3c.js → scheduler-store-67dc1986.js} +16 -3
  136. package/dist/cjs/scheduler-store-67dc1986.js.map +1 -0
  137. package/dist/cjs/search-icon.cjs.entry.js +1 -1
  138. package/dist/cjs/select-dropdown.cjs.entry.js +2 -2
  139. package/dist/cjs/sent-icon.cjs.entry.js +1 -1
  140. package/dist/cjs/spam-icon.cjs.entry.js +1 -1
  141. package/dist/cjs/star-icon.cjs.entry.js +1 -1
  142. package/dist/cjs/stop-icon.cjs.entry.js +1 -1
  143. package/dist/cjs/time-period-selector.cjs.entry.js +2 -2
  144. package/dist/cjs/tooltip-component.cjs.entry.js +1 -1
  145. package/dist/cjs/translate-icon.cjs.entry.js +1 -1
  146. package/dist/cjs/trash-icon.cjs.entry.js +1 -1
  147. package/dist/cjs/underline-icon.cjs.entry.js +1 -1
  148. package/dist/cjs/{utils-53dd7574.js → utils-20663d54.js} +19 -1
  149. package/dist/cjs/utils-20663d54.js.map +1 -0
  150. package/dist/cjs/{utils-53298b01.js → utils-2c7f0895.js} +19 -1
  151. package/dist/cjs/{utils-53298b01.js.map → utils-2c7f0895.js.map} +1 -1
  152. package/dist/cjs/warning-icon.cjs.entry.js +1 -1
  153. package/dist/collection/collection-manifest.json +1 -0
  154. package/dist/collection/common/abstract-provider.js +7 -2
  155. package/dist/collection/common/abstract-provider.js.map +1 -1
  156. package/dist/collection/common/component-types.js.map +1 -1
  157. package/dist/collection/common/constants.js +9 -0
  158. package/dist/collection/common/constants.js.map +1 -1
  159. package/dist/collection/common/icons/add-circle.js +1 -1
  160. package/dist/collection/common/icons/archive.js +1 -1
  161. package/dist/collection/common/icons/arrow.js +1 -1
  162. package/dist/collection/common/icons/bold.js +1 -1
  163. package/dist/collection/common/icons/calendar-cancel.js +1 -1
  164. package/dist/collection/common/icons/calendar-check.js +1 -1
  165. package/dist/collection/common/icons/calendar-info.js +1 -1
  166. package/dist/collection/common/icons/calendar-patterns.js +1 -1
  167. package/dist/collection/common/icons/calendar.js +1 -1
  168. package/dist/collection/common/icons/checkmark-circle.js +1 -1
  169. package/dist/collection/common/icons/chevron.js +1 -1
  170. package/dist/collection/common/icons/close.js +1 -1
  171. package/dist/collection/common/icons/document-refresh.js +1 -1
  172. package/dist/collection/common/icons/flow.js +1 -1
  173. package/dist/collection/common/icons/folder.js +1 -1
  174. package/dist/collection/common/icons/forward.js +1 -1
  175. package/dist/collection/common/icons/globe.js +1 -1
  176. package/dist/collection/common/icons/google-logo.js +1 -1
  177. package/dist/collection/common/icons/inbox.js +1 -1
  178. package/dist/collection/common/icons/info.js +1 -1
  179. package/dist/collection/common/icons/italic.js +1 -1
  180. package/dist/collection/common/icons/loading.js +1 -1
  181. package/dist/collection/common/icons/location-off.js +1 -1
  182. package/dist/collection/common/icons/location.js +1 -1
  183. package/dist/collection/common/icons/microsoft-logo.js +1 -1
  184. package/dist/collection/common/icons/nylas-logo.js +1 -1
  185. package/dist/collection/common/icons/people.js +1 -1
  186. package/dist/collection/common/icons/play.js +1 -1
  187. package/dist/collection/common/icons/refresh.js +1 -1
  188. package/dist/collection/common/icons/reply-all.js +1 -1
  189. package/dist/collection/common/icons/reply.js +1 -1
  190. package/dist/collection/common/icons/search.js +1 -1
  191. package/dist/collection/common/icons/sent.js +1 -1
  192. package/dist/collection/common/icons/spam.js +1 -1
  193. package/dist/collection/common/icons/star.js +1 -1
  194. package/dist/collection/common/icons/stop.js +1 -1
  195. package/dist/collection/common/icons/translate.js +1 -1
  196. package/dist/collection/common/icons/trash.js +1 -1
  197. package/dist/collection/common/icons/underline.js +1 -1
  198. package/dist/collection/common/icons/warning.js +1 -1
  199. package/dist/collection/common/nylas-api-request.js +27 -7
  200. package/dist/collection/common/nylas-api-request.js.map +1 -1
  201. package/dist/collection/common/register-component.js +6 -0
  202. package/dist/collection/common/register-component.js.map +1 -1
  203. package/dist/collection/common/types.js.map +1 -1
  204. package/dist/collection/components/design-system/button-component/button-component.css +5 -0
  205. package/dist/collection/components/design-system/button-component/button-component.js +1 -1
  206. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +2 -2
  207. package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +2 -2
  208. package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
  209. package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
  210. package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +1 -1
  211. package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +1 -1
  212. package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +1 -1
  213. package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +1 -1
  214. package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +1 -1
  215. package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +2 -2
  216. package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +2 -2
  217. package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +1 -1
  218. package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +1 -1
  219. package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js +1 -1
  220. package/dist/collection/components/nylas-login/nylas-login.js +1 -1
  221. package/dist/collection/components/nylas-provider/nylas-provider.js +2 -2
  222. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
  223. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +1 -1
  224. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +1 -1
  225. package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
  226. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +1 -1
  227. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +55 -15
  228. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
  229. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +32 -5
  230. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
  231. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +23 -14
  232. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
  233. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +41 -9
  234. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js.map +1 -1
  235. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.css +48 -9
  236. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +167 -36
  237. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  238. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +4 -4
  239. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
  240. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.css +1 -1
  241. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +34 -2
  242. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
  243. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.css +1 -1
  244. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +35 -7
  245. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
  246. package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
  247. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
  248. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.css +8 -1
  249. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +83 -9
  250. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
  251. package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
  252. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +45 -9
  253. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
  254. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.css +142 -0
  255. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +330 -0
  256. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -0
  257. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.css +2 -2
  258. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js +37 -3
  259. package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js.map +1 -1
  260. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +49 -11
  261. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
  262. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/LoginRequired.js +30 -0
  263. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/LoginRequired.js.map +1 -0
  264. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +23 -2
  265. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +108 -53
  266. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
  267. package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
  268. package/dist/collection/connector/nylas-scheduler-config-connector/index.js.map +1 -1
  269. package/dist/collection/connector/nylas-scheduler-connector/errors/index.js +8 -0
  270. package/dist/collection/connector/nylas-scheduler-connector/errors/index.js.map +1 -1
  271. package/dist/collection/connector/shared/api/scheduler-config.js +118 -30
  272. package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
  273. package/dist/collection/connector/shared/api/scheduler.js +6 -1
  274. package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
  275. package/dist/collection/index.js +0 -1
  276. package/dist/collection/index.js.map +1 -1
  277. package/dist/collection/stores/scheduler-config-store.js +15 -2
  278. package/dist/collection/stores/scheduler-config-store.js.map +1 -1
  279. package/dist/collection/utils/utils.js +16 -0
  280. package/dist/collection/utils/utils.js.map +1 -1
  281. package/dist/collection/utils/utils.spec.js +8 -1
  282. package/dist/collection/utils/utils.spec.js.map +1 -1
  283. package/dist/components/add-circle.js +1 -2
  284. package/dist/components/add-circle.js.map +1 -1
  285. package/dist/components/archive.js +1 -2
  286. package/dist/components/archive.js.map +1 -1
  287. package/dist/components/arrow.js +1 -2
  288. package/dist/components/arrow.js.map +1 -1
  289. package/dist/components/bold.js +1 -2
  290. package/dist/components/bold.js.map +1 -1
  291. package/dist/components/button-component2.js +2 -3
  292. package/dist/components/button-component2.js.map +1 -1
  293. package/dist/components/calendar-cancel.js +1 -2
  294. package/dist/components/calendar-cancel.js.map +1 -1
  295. package/dist/components/calendar-check.js +1 -2
  296. package/dist/components/calendar-check.js.map +1 -1
  297. package/dist/components/calendar-info.js +1 -2
  298. package/dist/components/calendar-info.js.map +1 -1
  299. package/dist/components/calendar-patterns.js +1 -2
  300. package/dist/components/calendar-patterns.js.map +1 -1
  301. package/dist/components/calendar.js +1 -2
  302. package/dist/components/calendar.js.map +1 -1
  303. package/dist/components/checkmark-circle.js +1 -2
  304. package/dist/components/checkmark-circle.js.map +1 -1
  305. package/dist/components/chevron.js +1 -2
  306. package/dist/components/chevron.js.map +1 -1
  307. package/dist/components/close.js +1 -2
  308. package/dist/components/close.js.map +1 -1
  309. package/dist/components/constants.js +11 -2
  310. package/dist/components/constants.js.map +1 -1
  311. package/dist/components/document-refresh-icon.js +1 -2
  312. package/dist/components/document-refresh-icon.js.map +1 -1
  313. package/dist/components/flow.js +1 -2
  314. package/dist/components/flow.js.map +1 -1
  315. package/dist/components/focus-visible.js +1 -1
  316. package/dist/components/folder.js +1 -2
  317. package/dist/components/folder.js.map +1 -1
  318. package/dist/components/forward.js +1 -2
  319. package/dist/components/forward.js.map +1 -1
  320. package/dist/components/globe.js +1 -2
  321. package/dist/components/globe.js.map +1 -1
  322. package/dist/components/google-logo.js +1 -2
  323. package/dist/components/google-logo.js.map +1 -1
  324. package/dist/components/inbox.js +1 -2
  325. package/dist/components/inbox.js.map +1 -1
  326. package/dist/components/index.es.js +8 -3
  327. package/dist/components/index.es.js.map +1 -1
  328. package/dist/components/info.js +1 -2
  329. package/dist/components/info.js.map +1 -1
  330. package/dist/components/italic.js +1 -2
  331. package/dist/components/italic.js.map +1 -1
  332. package/dist/components/loading.js +1 -2
  333. package/dist/components/loading.js.map +1 -1
  334. package/dist/components/location-off.js +1 -2
  335. package/dist/components/location-off.js.map +1 -1
  336. package/dist/components/location.js +1 -2
  337. package/dist/components/location.js.map +1 -1
  338. package/dist/components/mailbox-store.js +1 -1
  339. package/dist/components/microsoft-logo.js +1 -2
  340. package/dist/components/microsoft-logo.js.map +1 -1
  341. package/dist/components/multi-select-dropdown2.js +3 -4
  342. package/dist/components/multi-select-dropdown2.js.map +1 -1
  343. package/dist/components/nylas-additional-participants.js +2 -3
  344. package/dist/components/nylas-additional-participants.js.map +1 -1
  345. package/dist/components/nylas-api-request.js +28 -7
  346. package/dist/components/nylas-api-request.js.map +1 -1
  347. package/dist/components/nylas-availability-picker2.js +33 -15
  348. package/dist/components/nylas-availability-picker2.js.map +1 -1
  349. package/dist/components/nylas-booked-event-card2.js +1 -2
  350. package/dist/components/nylas-booked-event-card2.js.map +1 -1
  351. package/dist/components/nylas-booking-calendar-picker2.js +12 -6
  352. package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
  353. package/dist/components/nylas-booking-form2.js +1 -2
  354. package/dist/components/nylas-booking-form2.js.map +1 -1
  355. package/dist/components/nylas-buffer-time2.js +1 -2
  356. package/dist/components/nylas-buffer-time2.js.map +1 -1
  357. package/dist/components/nylas-calendar-picker2.js +13 -9
  358. package/dist/components/nylas-calendar-picker2.js.map +1 -1
  359. package/dist/components/nylas-cancel-booking-form2.js +2 -3
  360. package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
  361. package/dist/components/nylas-cancelled-event-card2.js +2 -3
  362. package/dist/components/nylas-cancelled-event-card2.js.map +1 -1
  363. package/dist/components/nylas-composer2.js +2 -3
  364. package/dist/components/nylas-composer2.js.map +1 -1
  365. package/dist/components/nylas-custom-booking-flow2.js +23 -13
  366. package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
  367. package/dist/components/nylas-date-picker2.js +1 -2
  368. package/dist/components/nylas-date-picker2.js.map +1 -1
  369. package/dist/components/nylas-editor-tabs2.js +91 -43
  370. package/dist/components/nylas-editor-tabs2.js.map +1 -1
  371. package/dist/components/nylas-event-description2.js +17 -7
  372. package/dist/components/nylas-event-description2.js.map +1 -1
  373. package/dist/components/nylas-event-duration2.js +16 -10
  374. package/dist/components/nylas-event-duration2.js.map +1 -1
  375. package/dist/components/nylas-event-info2.js +2 -3
  376. package/dist/components/nylas-event-info2.js.map +1 -1
  377. package/dist/components/nylas-event-limits2.js +2 -3
  378. package/dist/components/nylas-event-limits2.js.map +1 -1
  379. package/dist/components/nylas-event-title2.js +56 -14
  380. package/dist/components/nylas-event-title2.js.map +1 -1
  381. package/dist/components/nylas-form-card2.js +2 -3
  382. package/dist/components/nylas-form-card2.js.map +1 -1
  383. package/dist/components/nylas-if-state.js +1 -2
  384. package/dist/components/nylas-if-state.js.map +1 -1
  385. package/dist/components/nylas-limit-future-bookings2.js +25 -11
  386. package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
  387. package/dist/components/nylas-list-configurations.d.ts +11 -0
  388. package/dist/components/nylas-list-configurations.js +8 -0
  389. package/dist/components/nylas-list-configurations.js.map +1 -0
  390. package/dist/components/nylas-list-configurations2.js +159 -0
  391. package/dist/components/nylas-list-configurations2.js.map +1 -0
  392. package/dist/components/nylas-list-folders.js +2 -3
  393. package/dist/components/nylas-list-folders.js.map +1 -1
  394. package/dist/components/nylas-list-threads.js +2 -3
  395. package/dist/components/nylas-list-threads.js.map +1 -1
  396. package/dist/components/nylas-locale-switch2.js +0 -1
  397. package/dist/components/nylas-locale-switch2.js.map +1 -1
  398. package/dist/components/nylas-location-component2.js +18 -6
  399. package/dist/components/nylas-location-component2.js.map +1 -1
  400. package/dist/components/nylas-login.js +1 -2
  401. package/dist/components/nylas-login.js.map +1 -1
  402. package/dist/components/nylas-logo2.js +1 -2
  403. package/dist/components/nylas-logo2.js.map +1 -1
  404. package/dist/components/nylas-mailbox-pagination.js +1 -2
  405. package/dist/components/nylas-mailbox-pagination.js.map +1 -1
  406. package/dist/components/nylas-mailbox-toolbar-button.js +2 -3
  407. package/dist/components/nylas-mailbox-toolbar-button.js.map +1 -1
  408. package/dist/components/nylas-mailbox.js +2 -3
  409. package/dist/components/nylas-mailbox.js.map +1 -1
  410. package/dist/components/nylas-min-cancellation-notice2.js +29 -13
  411. package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
  412. package/dist/components/nylas-notification2.js +2 -3
  413. package/dist/components/nylas-notification2.js.map +1 -1
  414. package/dist/components/nylas-provider.js +2 -3
  415. package/dist/components/nylas-provider.js.map +1 -1
  416. package/dist/components/nylas-scheduler-editor.js +270 -136
  417. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  418. package/dist/components/nylas-scheduling.js +1 -2
  419. package/dist/components/nylas-scheduling.js.map +1 -1
  420. package/dist/components/nylas-selected-event-card2.js +1 -2
  421. package/dist/components/nylas-selected-event-card2.js.map +1 -1
  422. package/dist/components/nylas-summarize-message-button2.js +3 -4
  423. package/dist/components/nylas-summarize-message-button2.js.map +1 -1
  424. package/dist/components/nylas-threads-refresh.js +3 -4
  425. package/dist/components/nylas-threads-refresh.js.map +1 -1
  426. package/dist/components/nylas-threads-search.js +2 -3
  427. package/dist/components/nylas-threads-search.js.map +1 -1
  428. package/dist/components/nylas-time-window-picker2.js +2 -4
  429. package/dist/components/nylas-time-window-picker2.js.map +1 -1
  430. package/dist/components/nylas-timeslot-picker2.js +1 -2
  431. package/dist/components/nylas-timeslot-picker2.js.map +1 -1
  432. package/dist/components/nylas-view-email2.js +2 -4
  433. package/dist/components/nylas-view-email2.js.map +1 -1
  434. package/dist/components/nylas-view-thread.js +2 -3
  435. package/dist/components/nylas-view-thread.js.map +1 -1
  436. package/dist/components/people-icon.js +1 -2
  437. package/dist/components/people-icon.js.map +1 -1
  438. package/dist/components/play.js +1 -2
  439. package/dist/components/play.js.map +1 -1
  440. package/dist/components/refresh.js +1 -2
  441. package/dist/components/refresh.js.map +1 -1
  442. package/dist/components/register-component.js +7 -1
  443. package/dist/components/register-component.js.map +1 -1
  444. package/dist/components/reply-all.js +1 -2
  445. package/dist/components/reply-all.js.map +1 -1
  446. package/dist/components/reply.js +1 -2
  447. package/dist/components/reply.js.map +1 -1
  448. package/dist/components/scheduler-config-store.js +15 -2
  449. package/dist/components/scheduler-config-store.js.map +1 -1
  450. package/dist/components/scheduler-store.js +15 -2
  451. package/dist/components/scheduler-store.js.map +1 -1
  452. package/dist/components/search.js +1 -2
  453. package/dist/components/search.js.map +1 -1
  454. package/dist/components/select-dropdown2.js +2 -3
  455. package/dist/components/select-dropdown2.js.map +1 -1
  456. package/dist/components/sent.js +1 -2
  457. package/dist/components/sent.js.map +1 -1
  458. package/dist/components/spam.js +1 -2
  459. package/dist/components/spam.js.map +1 -1
  460. package/dist/components/star.js +1 -2
  461. package/dist/components/star.js.map +1 -1
  462. package/dist/components/stop.js +1 -2
  463. package/dist/components/stop.js.map +1 -1
  464. package/dist/components/time-period-selector2.js +2 -3
  465. package/dist/components/time-period-selector2.js.map +1 -1
  466. package/dist/components/toolitp-component.js +1 -2
  467. package/dist/components/toolitp-component.js.map +1 -1
  468. package/dist/components/translate.js +1 -2
  469. package/dist/components/translate.js.map +1 -1
  470. package/dist/components/trash.js +1 -2
  471. package/dist/components/trash.js.map +1 -1
  472. package/dist/components/underline.js +1 -2
  473. package/dist/components/underline.js.map +1 -1
  474. package/dist/components/utils.js +49 -2
  475. package/dist/components/utils.js.map +1 -1
  476. package/dist/components/warning.js +1 -2
  477. package/dist/components/warning.js.map +1 -1
  478. package/dist/esm/add-circle-icon.entry.js +1 -1
  479. package/dist/esm/add-circle-icon_22.entry.js +224 -94
  480. package/dist/esm/add-circle-icon_22.entry.js.map +1 -1
  481. package/dist/esm/archive-icon.entry.js +1 -1
  482. package/dist/esm/archive-icon_7.entry.js +7 -7
  483. package/dist/esm/arrow-icon.entry.js +1 -1
  484. package/dist/esm/bold-icon.entry.js +1 -1
  485. package/dist/esm/bold-icon_3.entry.js +3 -3
  486. package/dist/esm/button-component.entry.js +2 -2
  487. package/dist/esm/button-component.entry.js.map +1 -1
  488. package/dist/esm/calendar-cancel-icon.entry.js +1 -1
  489. package/dist/esm/calendar-check-icon.entry.js +1 -1
  490. package/dist/esm/calendar-check-icon_2.entry.js +2 -2
  491. package/dist/esm/calendar-icon.entry.js +1 -1
  492. package/dist/esm/calendar-info-icon.entry.js +1 -1
  493. package/dist/esm/calendar-patterns-icon.entry.js +1 -1
  494. package/dist/esm/checkmark-circle-icon.entry.js +1 -1
  495. package/dist/esm/chevron-icon.entry.js +1 -1
  496. package/dist/esm/chevron-icon_3.entry.js +4 -4
  497. package/dist/esm/close-icon.entry.js +1 -1
  498. package/dist/esm/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
  499. package/dist/esm/{constants-335dffcf.js.map → constants-bf39e913.js.map} +1 -1
  500. package/dist/esm/{constants-6ee60d6d.js → constants-f34b9c6e.js} +11 -2
  501. package/dist/esm/{constants-6ee60d6d.js.map → constants-f34b9c6e.js.map} +1 -1
  502. package/dist/esm/document-refresh-icon.entry.js +1 -1
  503. package/dist/esm/flow-icon.entry.js +1 -1
  504. package/dist/esm/folder-icon.entry.js +1 -1
  505. package/dist/esm/forward-icon.entry.js +1 -1
  506. package/dist/esm/forward-icon_6.entry.js +9 -9
  507. package/dist/esm/globe-icon.entry.js +1 -1
  508. package/dist/esm/google-logo-icon.entry.js +1 -1
  509. package/dist/esm/google-logo-icon_4.entry.js +460 -0
  510. package/dist/esm/google-logo-icon_4.entry.js.map +1 -0
  511. package/dist/esm/inbox-icon.entry.js +1 -1
  512. package/dist/esm/index-7cb0dd3d.js +1 -158
  513. package/dist/esm/index-8362ce5c.js +1 -358
  514. package/dist/{nylas-web-elements/index.es-bd511719.js → esm/index.es-2842f8c8.js} +9 -4
  515. package/dist/esm/index.es-2842f8c8.js.map +1 -0
  516. package/dist/esm/{index.es-2578c6a5.js → index.es-f57e612a.js} +9 -4
  517. package/dist/esm/index.es-f57e612a.js.map +1 -0
  518. package/dist/esm/index.js +3 -1
  519. package/dist/esm/index.js.map +1 -1
  520. package/dist/esm/info-icon.entry.js +1 -1
  521. package/dist/esm/info-icon_2.entry.js +2 -2
  522. package/dist/esm/italic-icon.entry.js +1 -1
  523. package/dist/esm/loader.js +1 -1
  524. package/dist/esm/loading-icon.entry.js +1 -1
  525. package/dist/esm/location-icon.entry.js +1 -1
  526. package/dist/esm/location-off-icon.entry.js +1 -1
  527. package/dist/esm/{mailbox-store-bb21512c.js → mailbox-store-47fc8a1a.js} +3 -3
  528. package/dist/esm/{mailbox-store-150cc456.js.map → mailbox-store-47fc8a1a.js.map} +1 -1
  529. package/dist/esm/{mailbox-store-150cc456.js → mailbox-store-d48269de.js} +3 -3
  530. package/dist/{nylas-web-elements/mailbox-store-150cc456.js.map → esm/mailbox-store-d48269de.js.map} +1 -1
  531. package/dist/esm/microsoft-logo-icon.entry.js +1 -1
  532. package/dist/esm/multi-select-dropdown.entry.js +3 -3
  533. package/dist/esm/nylas-additional-participants.entry.js +3 -3
  534. package/dist/esm/nylas-api-request-8932547a.js +56 -0
  535. package/dist/esm/nylas-api-request-8932547a.js.map +1 -0
  536. package/dist/esm/nylas-api-request-b085294d.js +58 -0
  537. package/dist/esm/nylas-api-request-b085294d.js.map +1 -0
  538. package/dist/esm/nylas-availability-picker.entry.js +33 -16
  539. package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
  540. package/dist/esm/nylas-booked-event-card.entry.js +3 -3
  541. package/dist/esm/nylas-booked-event-card_10.entry.js +7 -7
  542. package/dist/esm/nylas-booking-calendar-picker.entry.js +12 -6
  543. package/dist/esm/nylas-booking-calendar-picker.entry.js.map +1 -1
  544. package/dist/esm/nylas-booking-form.entry.js +2 -2
  545. package/dist/esm/nylas-buffer-time.entry.js +2 -2
  546. package/dist/esm/nylas-calendar-picker.entry.js +13 -8
  547. package/dist/esm/nylas-calendar-picker.entry.js.map +1 -1
  548. package/dist/esm/nylas-cancel-booking-form.entry.js +3 -3
  549. package/dist/esm/nylas-cancelled-event-card.entry.js +3 -3
  550. package/dist/esm/nylas-composer.entry.js +2 -2
  551. package/dist/esm/nylas-custom-booking-flow.entry.js +21 -12
  552. package/dist/esm/nylas-custom-booking-flow.entry.js.map +1 -1
  553. package/dist/esm/nylas-date-picker.entry.js +2 -2
  554. package/dist/esm/nylas-editor-tabs.entry.js +86 -40
  555. package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
  556. package/dist/esm/nylas-event-description.entry.js +15 -6
  557. package/dist/esm/nylas-event-description.entry.js.map +1 -1
  558. package/dist/esm/nylas-event-duration.entry.js +15 -10
  559. package/dist/esm/nylas-event-duration.entry.js.map +1 -1
  560. package/dist/esm/nylas-event-info.entry.js +3 -3
  561. package/dist/esm/nylas-event-limits.entry.js +3 -3
  562. package/dist/esm/nylas-event-title.entry.js +52 -12
  563. package/dist/esm/nylas-event-title.entry.js.map +1 -1
  564. package/dist/esm/nylas-form-card.entry.js +3 -3
  565. package/dist/esm/nylas-if-state.entry.js +2 -2
  566. package/dist/esm/nylas-limit-future-bookings.entry.js +24 -11
  567. package/dist/esm/nylas-limit-future-bookings.entry.js.map +1 -1
  568. package/dist/esm/nylas-list-configurations.entry.js +125 -0
  569. package/dist/esm/nylas-list-configurations.entry.js.map +1 -0
  570. package/dist/esm/nylas-list-folders.entry.js +3 -3
  571. package/dist/esm/nylas-list-threads.entry.js +3 -3
  572. package/dist/esm/nylas-locale-switch.entry.js +3 -3
  573. package/dist/esm/nylas-location-component.entry.js +17 -6
  574. package/dist/esm/nylas-location-component.entry.js.map +1 -1
  575. package/dist/esm/nylas-login.entry.js +3 -3
  576. package/dist/esm/nylas-logo.entry.js +1 -1
  577. package/dist/esm/nylas-mailbox-pagination.entry.js +2 -2
  578. package/dist/esm/nylas-mailbox-toolbar-button.entry.js +3 -3
  579. package/dist/esm/nylas-mailbox.entry.js +4 -4
  580. package/dist/esm/nylas-min-cancellation-notice.entry.js +28 -13
  581. package/dist/esm/nylas-min-cancellation-notice.entry.js.map +1 -1
  582. package/dist/esm/nylas-notification.entry.js +2 -2
  583. package/dist/esm/nylas-provider.entry.js +6 -6
  584. package/dist/esm/nylas-scheduler-editor.entry.js +202 -76
  585. package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
  586. package/dist/esm/nylas-scheduling.entry.js +3 -3
  587. package/dist/esm/nylas-selected-event-card.entry.js +3 -3
  588. package/dist/esm/nylas-summarize-message-button.entry.js +4 -4
  589. package/dist/esm/nylas-threads-refresh.entry.js +4 -4
  590. package/dist/esm/nylas-threads-search.entry.js +3 -3
  591. package/dist/esm/nylas-time-window-picker.entry.js +2 -2
  592. package/dist/esm/nylas-timeslot-picker.entry.js +2 -2
  593. package/dist/esm/nylas-view-email.entry.js +2 -2
  594. package/dist/esm/nylas-view-thread.entry.js +3 -3
  595. package/dist/esm/nylas-web-elements.js +1 -1
  596. package/dist/esm/people-icon.entry.js +1 -1
  597. package/dist/esm/play-icon.entry.js +1 -1
  598. package/dist/esm/play-icon_2.entry.js +2 -2
  599. package/dist/esm/refresh-icon.entry.js +1 -1
  600. package/dist/esm/{register-component-dc659dc3.js → register-component-cf5c8420.js} +8 -2
  601. package/dist/esm/register-component-cf5c8420.js.map +1 -0
  602. package/dist/{nylas-web-elements/register-component-0645dce0.js → esm/register-component-e5afe237.js} +8 -2
  603. package/dist/esm/register-component-e5afe237.js.map +1 -0
  604. package/dist/esm/reply-all-icon.entry.js +1 -1
  605. package/dist/esm/reply-icon.entry.js +1 -1
  606. package/dist/esm/scheduler-config-store-07d98279.js +30 -0
  607. package/dist/esm/scheduler-config-store-07d98279.js.map +1 -0
  608. package/dist/esm/scheduler-config-store-8f2e658e.js +30 -0
  609. package/dist/esm/scheduler-config-store-8f2e658e.js.map +1 -0
  610. package/dist/{nylas-web-elements/scheduler-store-4d0a4f8a.js → esm/scheduler-store-66c2168c.js} +16 -3
  611. package/dist/esm/scheduler-store-66c2168c.js.map +1 -0
  612. package/dist/esm/{scheduler-store-72116723.js → scheduler-store-a175fc3e.js} +16 -3
  613. package/dist/esm/scheduler-store-a175fc3e.js.map +1 -0
  614. package/dist/esm/search-icon.entry.js +1 -1
  615. package/dist/esm/select-dropdown.entry.js +2 -2
  616. package/dist/esm/sent-icon.entry.js +1 -1
  617. package/dist/esm/spam-icon.entry.js +1 -1
  618. package/dist/esm/star-icon.entry.js +1 -1
  619. package/dist/esm/stop-icon.entry.js +1 -1
  620. package/dist/esm/time-period-selector.entry.js +2 -2
  621. package/dist/esm/tooltip-component.entry.js +1 -1
  622. package/dist/esm/translate-icon.entry.js +1 -1
  623. package/dist/esm/trash-icon.entry.js +1 -1
  624. package/dist/esm/underline-icon.entry.js +1 -1
  625. package/dist/esm/{utils-3a8d433a.js → utils-73d8a928.js} +18 -2
  626. package/dist/{nylas-web-elements/utils-3a8d433a.js.map → esm/utils-73d8a928.js.map} +1 -1
  627. package/dist/esm/{utils-c00bdc3c.js → utils-d6204242.js} +18 -2
  628. package/dist/esm/utils-d6204242.js.map +1 -0
  629. package/dist/esm/warning-icon.entry.js +1 -1
  630. package/dist/nylas-web-elements/add-circle-icon.entry.js +1 -1
  631. package/dist/nylas-web-elements/archive-icon.entry.js +1 -1
  632. package/dist/nylas-web-elements/arrow-icon.entry.js +1 -1
  633. package/dist/nylas-web-elements/bold-icon.entry.js +1 -1
  634. package/dist/nylas-web-elements/button-component.entry.js +2 -2
  635. package/dist/nylas-web-elements/button-component.entry.js.map +1 -1
  636. package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +1 -1
  637. package/dist/nylas-web-elements/calendar-check-icon.entry.js +1 -1
  638. package/dist/nylas-web-elements/calendar-icon.entry.js +1 -1
  639. package/dist/nylas-web-elements/calendar-info-icon.entry.js +1 -1
  640. package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +1 -1
  641. package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +1 -1
  642. package/dist/nylas-web-elements/chevron-icon.entry.js +1 -1
  643. package/dist/nylas-web-elements/close-icon.entry.js +1 -1
  644. package/dist/nylas-web-elements/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
  645. package/dist/nylas-web-elements/{constants-335dffcf.js.map → constants-bf39e913.js.map} +1 -1
  646. package/dist/nylas-web-elements/document-refresh-icon.entry.js +1 -1
  647. package/dist/nylas-web-elements/flow-icon.entry.js +1 -1
  648. package/dist/nylas-web-elements/folder-icon.entry.js +1 -1
  649. package/dist/nylas-web-elements/forward-icon.entry.js +1 -1
  650. package/dist/nylas-web-elements/globe-icon.entry.js +1 -1
  651. package/dist/nylas-web-elements/google-logo-icon.entry.js +1 -1
  652. package/dist/nylas-web-elements/inbox-icon.entry.js +1 -1
  653. package/dist/{esm/index.es-bd511719.js → nylas-web-elements/index.es-2842f8c8.js} +9 -4
  654. package/dist/nylas-web-elements/index.es-2842f8c8.js.map +1 -0
  655. package/dist/nylas-web-elements/index.esm.js +3 -1
  656. package/dist/nylas-web-elements/index.esm.js.map +1 -1
  657. package/dist/nylas-web-elements/info-icon.entry.js +1 -1
  658. package/dist/nylas-web-elements/italic-icon.entry.js +1 -1
  659. package/dist/nylas-web-elements/loading-icon.entry.js +1 -1
  660. package/dist/nylas-web-elements/location-icon.entry.js +1 -1
  661. package/dist/nylas-web-elements/location-off-icon.entry.js +1 -1
  662. package/dist/nylas-web-elements/{mailbox-store-150cc456.js → mailbox-store-d48269de.js} +3 -3
  663. package/dist/{esm/mailbox-store-bb21512c.js.map → nylas-web-elements/mailbox-store-d48269de.js.map} +1 -1
  664. package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +1 -1
  665. package/dist/nylas-web-elements/multi-select-dropdown.entry.js +3 -3
  666. package/dist/nylas-web-elements/nylas-additional-participants.entry.js +3 -3
  667. package/dist/nylas-web-elements/nylas-api-request-b085294d.js +58 -0
  668. package/dist/nylas-web-elements/nylas-api-request-b085294d.js.map +1 -0
  669. package/dist/nylas-web-elements/nylas-availability-picker.entry.js +33 -16
  670. package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
  671. package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +3 -3
  672. package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +12 -6
  673. package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js.map +1 -1
  674. package/dist/nylas-web-elements/nylas-booking-form.entry.js +2 -2
  675. package/dist/nylas-web-elements/nylas-buffer-time.entry.js +2 -2
  676. package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +13 -8
  677. package/dist/nylas-web-elements/nylas-calendar-picker.entry.js.map +1 -1
  678. package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +3 -3
  679. package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +3 -3
  680. package/dist/nylas-web-elements/nylas-composer.entry.js +2 -2
  681. package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +21 -12
  682. package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js.map +1 -1
  683. package/dist/nylas-web-elements/nylas-date-picker.entry.js +2 -2
  684. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +86 -40
  685. package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
  686. package/dist/nylas-web-elements/nylas-event-description.entry.js +15 -6
  687. package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
  688. package/dist/nylas-web-elements/nylas-event-duration.entry.js +15 -10
  689. package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
  690. package/dist/nylas-web-elements/nylas-event-info.entry.js +3 -3
  691. package/dist/nylas-web-elements/nylas-event-limits.entry.js +3 -3
  692. package/dist/nylas-web-elements/nylas-event-title.entry.js +52 -12
  693. package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
  694. package/dist/nylas-web-elements/nylas-form-card.entry.js +3 -3
  695. package/dist/nylas-web-elements/nylas-if-state.entry.js +2 -2
  696. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +24 -11
  697. package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js.map +1 -1
  698. package/dist/nylas-web-elements/nylas-list-configurations.entry.js +125 -0
  699. package/dist/nylas-web-elements/nylas-list-configurations.entry.js.map +1 -0
  700. package/dist/nylas-web-elements/nylas-list-folders.entry.js +3 -3
  701. package/dist/nylas-web-elements/nylas-list-threads.entry.js +3 -3
  702. package/dist/nylas-web-elements/nylas-locale-switch.entry.js +3 -3
  703. package/dist/nylas-web-elements/nylas-location-component.entry.js +17 -6
  704. package/dist/nylas-web-elements/nylas-location-component.entry.js.map +1 -1
  705. package/dist/nylas-web-elements/nylas-login.entry.js +3 -3
  706. package/dist/nylas-web-elements/nylas-logo.entry.js +1 -1
  707. package/dist/nylas-web-elements/nylas-mailbox-pagination.entry.js +2 -2
  708. package/dist/nylas-web-elements/nylas-mailbox-toolbar-button.entry.js +3 -3
  709. package/dist/nylas-web-elements/nylas-mailbox.entry.js +4 -4
  710. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +28 -13
  711. package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js.map +1 -1
  712. package/dist/nylas-web-elements/nylas-notification.entry.js +2 -2
  713. package/dist/nylas-web-elements/nylas-provider.entry.js +6 -6
  714. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +202 -76
  715. package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
  716. package/dist/nylas-web-elements/nylas-scheduling.entry.js +3 -3
  717. package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +3 -3
  718. package/dist/nylas-web-elements/nylas-summarize-message-button.entry.js +4 -4
  719. package/dist/nylas-web-elements/nylas-threads-refresh.entry.js +4 -4
  720. package/dist/nylas-web-elements/nylas-threads-search.entry.js +3 -3
  721. package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +2 -2
  722. package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +2 -2
  723. package/dist/nylas-web-elements/nylas-view-email.entry.js +2 -2
  724. package/dist/nylas-web-elements/nylas-view-thread.entry.js +3 -3
  725. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  726. package/dist/nylas-web-elements/p-00a9efc1.entry.js +2 -0
  727. package/dist/nylas-web-elements/p-1a91cce5.entry.js +2 -0
  728. package/dist/nylas-web-elements/p-1a91cce5.entry.js.map +1 -0
  729. package/dist/nylas-web-elements/{p-3631e6e5.entry.js → p-1d25ca06.entry.js} +2 -2
  730. package/dist/nylas-web-elements/p-1e445e86.entry.js +2 -0
  731. package/dist/nylas-web-elements/{p-395f49eb.entry.js → p-2081b475.entry.js} +2 -2
  732. package/dist/nylas-web-elements/p-22e5436c.js +2 -0
  733. package/dist/nylas-web-elements/p-22e5436c.js.map +1 -0
  734. package/dist/nylas-web-elements/p-2b636359.entry.js +2 -0
  735. package/dist/nylas-web-elements/p-2b636359.entry.js.map +1 -0
  736. package/dist/nylas-web-elements/{p-4ee6f11e.entry.js → p-30784693.entry.js} +2 -2
  737. package/dist/nylas-web-elements/{p-40ed7eab.entry.js → p-33b940fb.entry.js} +2 -2
  738. package/dist/nylas-web-elements/p-343a02e1.entry.js +2 -0
  739. package/dist/nylas-web-elements/{p-4d9fceeb.entry.js → p-343b8684.entry.js} +2 -2
  740. package/dist/nylas-web-elements/p-3909ec3f.entry.js +2 -0
  741. package/dist/nylas-web-elements/{p-d85eecf4.entry.js.map → p-3909ec3f.entry.js.map} +1 -1
  742. package/dist/nylas-web-elements/{p-409d4410.entry.js → p-3b281401.entry.js} +2 -2
  743. package/dist/nylas-web-elements/{p-901f9612.js → p-41dc0d93.js} +2 -2
  744. package/dist/nylas-web-elements/p-41dc0d93.js.map +1 -0
  745. package/dist/nylas-web-elements/{p-5a3809a7.entry.js → p-42791515.entry.js} +2 -2
  746. package/dist/nylas-web-elements/p-44a9ce77.entry.js +2 -0
  747. package/dist/nylas-web-elements/{p-1819b3d7.js → p-49f716ed.js} +4 -4
  748. package/dist/nylas-web-elements/p-49f716ed.js.map +1 -0
  749. package/dist/nylas-web-elements/{p-b2208193.entry.js → p-50b4a80f.entry.js} +2 -2
  750. package/dist/nylas-web-elements/{p-42a4c2fd.entry.js → p-571472d4.entry.js} +2 -2
  751. package/dist/nylas-web-elements/{p-2523c292.entry.js → p-607b547b.entry.js} +2 -2
  752. package/dist/nylas-web-elements/{p-006ab406.entry.js → p-6110351b.entry.js} +2 -2
  753. package/dist/nylas-web-elements/{p-65062d50.entry.js → p-665ef10b.entry.js} +4 -4
  754. package/dist/nylas-web-elements/p-665ef10b.entry.js.map +1 -0
  755. package/dist/nylas-web-elements/{p-deafc6bc.entry.js → p-694b511a.entry.js} +2 -2
  756. package/dist/nylas-web-elements/{p-64364434.entry.js → p-73c062f8.entry.js} +2 -2
  757. package/dist/nylas-web-elements/p-75a8d077.entry.js +2 -0
  758. package/dist/nylas-web-elements/{p-41c1654e.entry.js.map → p-75a8d077.entry.js.map} +1 -1
  759. package/dist/nylas-web-elements/p-7c55dfa0.entry.js +2 -0
  760. package/dist/nylas-web-elements/{p-ba3d383f.entry.js.map → p-7c55dfa0.entry.js.map} +1 -1
  761. package/dist/nylas-web-elements/{p-3da66838.entry.js → p-80d6175c.entry.js} +2 -2
  762. package/dist/nylas-web-elements/p-939db546.entry.js +2 -0
  763. package/dist/nylas-web-elements/{p-a1e27dc5.entry.js → p-95a3094a.entry.js} +2 -2
  764. package/dist/nylas-web-elements/p-9ea458c3.js +2 -0
  765. package/dist/nylas-web-elements/p-9ea458c3.js.map +1 -0
  766. package/dist/nylas-web-elements/p-a628eaeb.js +2 -0
  767. package/dist/nylas-web-elements/p-a628eaeb.js.map +1 -0
  768. package/dist/nylas-web-elements/p-ad64c2b8.entry.js +2 -0
  769. package/dist/nylas-web-elements/{p-baa620b4.entry.js → p-b25821e1.entry.js} +2 -2
  770. package/dist/nylas-web-elements/{p-374527e6.entry.js → p-b53062f7.entry.js} +2 -2
  771. package/dist/nylas-web-elements/p-bbf9aff2.entry.js +2 -0
  772. package/dist/nylas-web-elements/p-c20ab972.entry.js +2 -0
  773. package/dist/nylas-web-elements/{p-7b1bb792.entry.js → p-cc674b3b.entry.js} +3 -3
  774. package/dist/nylas-web-elements/p-d8f09631.entry.js +2 -0
  775. package/dist/nylas-web-elements/p-db15d382.js +2 -0
  776. package/dist/nylas-web-elements/p-db15d382.js.map +1 -0
  777. package/dist/nylas-web-elements/{p-9dac153b.entry.js → p-df6d54c7.entry.js} +2 -2
  778. package/dist/nylas-web-elements/{p-d224c7af.entry.js → p-e03b2592.entry.js} +2 -2
  779. package/dist/nylas-web-elements/{p-9f168ff0.js → p-e22aa0b0.js} +2 -2
  780. package/dist/nylas-web-elements/{p-408dda49.js → p-eaa9151b.js} +2 -2
  781. package/dist/nylas-web-elements/p-eaa9151b.js.map +1 -0
  782. package/dist/nylas-web-elements/{p-ad9c3cab.entry.js → p-f154a362.entry.js} +2 -2
  783. package/dist/nylas-web-elements/{p-ae01e1cb.entry.js → p-f1f8f745.entry.js} +2 -2
  784. package/dist/nylas-web-elements/people-icon.entry.js +1 -1
  785. package/dist/nylas-web-elements/play-icon.entry.js +1 -1
  786. package/dist/nylas-web-elements/refresh-icon.entry.js +1 -1
  787. package/dist/{esm/register-component-0645dce0.js → nylas-web-elements/register-component-e5afe237.js} +8 -2
  788. package/dist/nylas-web-elements/register-component-e5afe237.js.map +1 -0
  789. package/dist/nylas-web-elements/reply-all-icon.entry.js +1 -1
  790. package/dist/nylas-web-elements/reply-icon.entry.js +1 -1
  791. package/dist/nylas-web-elements/scheduler-config-store-8f2e658e.js +30 -0
  792. package/dist/nylas-web-elements/scheduler-config-store-8f2e658e.js.map +1 -0
  793. package/dist/{esm/scheduler-store-4d0a4f8a.js → nylas-web-elements/scheduler-store-66c2168c.js} +16 -3
  794. package/dist/nylas-web-elements/scheduler-store-66c2168c.js.map +1 -0
  795. package/dist/nylas-web-elements/search-icon.entry.js +1 -1
  796. package/dist/nylas-web-elements/select-dropdown.entry.js +2 -2
  797. package/dist/nylas-web-elements/sent-icon.entry.js +1 -1
  798. package/dist/nylas-web-elements/spam-icon.entry.js +1 -1
  799. package/dist/nylas-web-elements/star-icon.entry.js +1 -1
  800. package/dist/nylas-web-elements/stop-icon.entry.js +1 -1
  801. package/dist/nylas-web-elements/time-period-selector.entry.js +2 -2
  802. package/dist/nylas-web-elements/tooltip-component.entry.js +1 -1
  803. package/dist/nylas-web-elements/translate-icon.entry.js +1 -1
  804. package/dist/nylas-web-elements/trash-icon.entry.js +1 -1
  805. package/dist/nylas-web-elements/underline-icon.entry.js +1 -1
  806. package/dist/nylas-web-elements/{utils-3a8d433a.js → utils-73d8a928.js} +18 -2
  807. package/dist/{esm/utils-3a8d433a.js.map → nylas-web-elements/utils-73d8a928.js.map} +1 -1
  808. package/dist/nylas-web-elements/warning-icon.entry.js +1 -1
  809. package/dist/types/common/component-types.d.ts +3 -1
  810. package/dist/types/common/constants.d.ts +2 -0
  811. package/dist/types/common/nylas-api-request.d.ts +6 -2
  812. package/dist/types/common/register-component.d.ts +1 -0
  813. package/dist/types/common/types.d.ts +3 -1
  814. package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +10 -4
  815. package/dist/types/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.d.ts +2 -0
  816. package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +3 -2
  817. package/dist/types/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.d.ts +4 -1
  818. package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +41 -7
  819. package/dist/types/components/scheduler-editor/nylas-event-description/nylas-event-description.d.ts +3 -0
  820. package/dist/types/components/scheduler-editor/nylas-event-duration/nylas-event-duration.d.ts +3 -0
  821. package/dist/types/components/scheduler-editor/nylas-event-title/nylas-event-title.d.ts +6 -1
  822. package/dist/types/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.d.ts +6 -6
  823. package/dist/types/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.d.ts +27 -0
  824. package/dist/types/components/scheduler-editor/nylas-location-component/nylas-location-component.d.ts +3 -0
  825. package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +4 -1
  826. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/LoginRequired.d.ts +4 -0
  827. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +9 -4
  828. package/dist/types/components.d.ts +229 -18
  829. package/dist/types/connector/nylas-connector/index.d.ts +1 -1
  830. package/dist/types/connector/nylas-scheduler-config-connector/index.d.ts +3 -3
  831. package/dist/types/connector/nylas-scheduler-connector/errors/index.d.ts +1 -0
  832. package/dist/types/connector/shared/api/scheduler-config.d.ts +45 -8
  833. package/dist/types/index.d.ts +1 -1
  834. package/dist/types/stores/scheduler-config-store.d.ts +8 -2
  835. package/dist/types/utils/utils.d.ts +4 -1
  836. package/package.json +4 -3
  837. package/dist/cjs/google-logo-icon_3.cjs.entry.js +0 -302
  838. package/dist/cjs/google-logo-icon_3.cjs.entry.js.map +0 -1
  839. package/dist/cjs/index.es-447c5aca.js.map +0 -1
  840. package/dist/cjs/index.es-68425511.js.map +0 -1
  841. package/dist/cjs/nylas-api-request-8ec3a89c.js +0 -39
  842. package/dist/cjs/nylas-api-request-8ec3a89c.js.map +0 -1
  843. package/dist/cjs/nylas-api-request-ab24150d.js +0 -37
  844. package/dist/cjs/nylas-api-request-ab24150d.js.map +0 -1
  845. package/dist/cjs/register-component-d729f3f7.js.map +0 -1
  846. package/dist/cjs/register-component-f1ebc65d.js.map +0 -1
  847. package/dist/cjs/scheduler-config-store-31b83ad3.js +0 -19
  848. package/dist/cjs/scheduler-config-store-31b83ad3.js.map +0 -1
  849. package/dist/cjs/scheduler-config-store-9c2cc421.js +0 -19
  850. package/dist/cjs/scheduler-config-store-9c2cc421.js.map +0 -1
  851. package/dist/cjs/scheduler-store-4cb46b3c.js.map +0 -1
  852. package/dist/cjs/scheduler-store-7320f5d0.js.map +0 -1
  853. package/dist/cjs/utils-53dd7574.js.map +0 -1
  854. package/dist/components/_commonjsHelpers.js +0 -36
  855. package/dist/components/_commonjsHelpers.js.map +0 -1
  856. package/dist/esm/google-logo-icon_3.entry.js +0 -296
  857. package/dist/esm/google-logo-icon_3.entry.js.map +0 -1
  858. package/dist/esm/index.es-2578c6a5.js.map +0 -1
  859. package/dist/esm/index.es-bd511719.js.map +0 -1
  860. package/dist/esm/nylas-api-request-55446aba.js +0 -37
  861. package/dist/esm/nylas-api-request-55446aba.js.map +0 -1
  862. package/dist/esm/nylas-api-request-c97a0153.js +0 -35
  863. package/dist/esm/nylas-api-request-c97a0153.js.map +0 -1
  864. package/dist/esm/register-component-0645dce0.js.map +0 -1
  865. package/dist/esm/register-component-dc659dc3.js.map +0 -1
  866. package/dist/esm/scheduler-config-store-51ee4f42.js +0 -17
  867. package/dist/esm/scheduler-config-store-51ee4f42.js.map +0 -1
  868. package/dist/esm/scheduler-config-store-bc59545b.js +0 -17
  869. package/dist/esm/scheduler-config-store-bc59545b.js.map +0 -1
  870. package/dist/esm/scheduler-store-4d0a4f8a.js.map +0 -1
  871. package/dist/esm/scheduler-store-72116723.js.map +0 -1
  872. package/dist/esm/utils-c00bdc3c.js.map +0 -1
  873. package/dist/nylas-web-elements/index.es-bd511719.js.map +0 -1
  874. package/dist/nylas-web-elements/nylas-api-request-55446aba.js +0 -37
  875. package/dist/nylas-web-elements/nylas-api-request-55446aba.js.map +0 -1
  876. package/dist/nylas-web-elements/p-01bf65c2.entry.js +0 -2
  877. package/dist/nylas-web-elements/p-1819b3d7.js.map +0 -1
  878. package/dist/nylas-web-elements/p-2c5d5953.entry.js +0 -2
  879. package/dist/nylas-web-elements/p-39b280e2.entry.js +0 -2
  880. package/dist/nylas-web-elements/p-39b280e2.entry.js.map +0 -1
  881. package/dist/nylas-web-elements/p-408dda49.js.map +0 -1
  882. package/dist/nylas-web-elements/p-41c1654e.entry.js +0 -2
  883. package/dist/nylas-web-elements/p-65062d50.entry.js.map +0 -1
  884. package/dist/nylas-web-elements/p-65fdfb60.js +0 -2
  885. package/dist/nylas-web-elements/p-65fdfb60.js.map +0 -1
  886. package/dist/nylas-web-elements/p-901f9612.js.map +0 -1
  887. package/dist/nylas-web-elements/p-a0c2ce03.entry.js +0 -2
  888. package/dist/nylas-web-elements/p-a3d5a1dd.entry.js +0 -2
  889. package/dist/nylas-web-elements/p-ba3d383f.entry.js +0 -2
  890. package/dist/nylas-web-elements/p-bfdc148c.entry.js +0 -2
  891. package/dist/nylas-web-elements/p-cadc9052.js +0 -2
  892. package/dist/nylas-web-elements/p-cadc9052.js.map +0 -1
  893. package/dist/nylas-web-elements/p-d67d1c72.js +0 -2
  894. package/dist/nylas-web-elements/p-d67d1c72.js.map +0 -1
  895. package/dist/nylas-web-elements/p-d85eecf4.entry.js +0 -2
  896. package/dist/nylas-web-elements/p-d92a0405.entry.js +0 -2
  897. package/dist/nylas-web-elements/p-de63bc35.entry.js +0 -2
  898. package/dist/nylas-web-elements/p-df5e9aaf.js +0 -2
  899. package/dist/nylas-web-elements/p-df5e9aaf.js.map +0 -1
  900. package/dist/nylas-web-elements/p-eb93a363.entry.js +0 -2
  901. package/dist/nylas-web-elements/p-eb93a363.entry.js.map +0 -1
  902. package/dist/nylas-web-elements/p-f48d0571.entry.js +0 -2
  903. package/dist/nylas-web-elements/p-fbbca7a6.entry.js +0 -2
  904. package/dist/nylas-web-elements/register-component-0645dce0.js.map +0 -1
  905. package/dist/nylas-web-elements/scheduler-config-store-bc59545b.js +0 -17
  906. package/dist/nylas-web-elements/scheduler-config-store-bc59545b.js.map +0 -1
  907. package/dist/nylas-web-elements/scheduler-store-4d0a4f8a.js.map +0 -1
  908. /package/dist/nylas-web-elements/{p-de63bc35.entry.js.map → p-00a9efc1.entry.js.map} +0 -0
  909. /package/dist/nylas-web-elements/{p-3631e6e5.entry.js.map → p-1d25ca06.entry.js.map} +0 -0
  910. /package/dist/nylas-web-elements/{p-bfdc148c.entry.js.map → p-1e445e86.entry.js.map} +0 -0
  911. /package/dist/nylas-web-elements/{p-395f49eb.entry.js.map → p-2081b475.entry.js.map} +0 -0
  912. /package/dist/nylas-web-elements/{p-4ee6f11e.entry.js.map → p-30784693.entry.js.map} +0 -0
  913. /package/dist/nylas-web-elements/{p-40ed7eab.entry.js.map → p-33b940fb.entry.js.map} +0 -0
  914. /package/dist/nylas-web-elements/{p-d92a0405.entry.js.map → p-343a02e1.entry.js.map} +0 -0
  915. /package/dist/nylas-web-elements/{p-4d9fceeb.entry.js.map → p-343b8684.entry.js.map} +0 -0
  916. /package/dist/nylas-web-elements/{p-409d4410.entry.js.map → p-3b281401.entry.js.map} +0 -0
  917. /package/dist/nylas-web-elements/{p-5a3809a7.entry.js.map → p-42791515.entry.js.map} +0 -0
  918. /package/dist/nylas-web-elements/{p-a0c2ce03.entry.js.map → p-44a9ce77.entry.js.map} +0 -0
  919. /package/dist/nylas-web-elements/{p-b2208193.entry.js.map → p-50b4a80f.entry.js.map} +0 -0
  920. /package/dist/nylas-web-elements/{p-42a4c2fd.entry.js.map → p-571472d4.entry.js.map} +0 -0
  921. /package/dist/nylas-web-elements/{p-2523c292.entry.js.map → p-607b547b.entry.js.map} +0 -0
  922. /package/dist/nylas-web-elements/{p-006ab406.entry.js.map → p-6110351b.entry.js.map} +0 -0
  923. /package/dist/nylas-web-elements/{p-deafc6bc.entry.js.map → p-694b511a.entry.js.map} +0 -0
  924. /package/dist/nylas-web-elements/{p-64364434.entry.js.map → p-73c062f8.entry.js.map} +0 -0
  925. /package/dist/nylas-web-elements/{p-3da66838.entry.js.map → p-80d6175c.entry.js.map} +0 -0
  926. /package/dist/nylas-web-elements/{p-01bf65c2.entry.js.map → p-939db546.entry.js.map} +0 -0
  927. /package/dist/nylas-web-elements/{p-a1e27dc5.entry.js.map → p-95a3094a.entry.js.map} +0 -0
  928. /package/dist/nylas-web-elements/{p-f48d0571.entry.js.map → p-ad64c2b8.entry.js.map} +0 -0
  929. /package/dist/nylas-web-elements/{p-baa620b4.entry.js.map → p-b25821e1.entry.js.map} +0 -0
  930. /package/dist/nylas-web-elements/{p-374527e6.entry.js.map → p-b53062f7.entry.js.map} +0 -0
  931. /package/dist/nylas-web-elements/{p-2c5d5953.entry.js.map → p-bbf9aff2.entry.js.map} +0 -0
  932. /package/dist/nylas-web-elements/{p-a3d5a1dd.entry.js.map → p-c20ab972.entry.js.map} +0 -0
  933. /package/dist/nylas-web-elements/{p-7b1bb792.entry.js.map → p-cc674b3b.entry.js.map} +0 -0
  934. /package/dist/nylas-web-elements/{p-fbbca7a6.entry.js.map → p-d8f09631.entry.js.map} +0 -0
  935. /package/dist/nylas-web-elements/{p-9dac153b.entry.js.map → p-df6d54c7.entry.js.map} +0 -0
  936. /package/dist/nylas-web-elements/{p-d224c7af.entry.js.map → p-e03b2592.entry.js.map} +0 -0
  937. /package/dist/nylas-web-elements/{p-9f168ff0.js.map → p-e22aa0b0.js.map} +0 -0
  938. /package/dist/nylas-web-elements/{p-ad9c3cab.entry.js.map → p-f154a362.entry.js.map} +0 -0
  939. /package/dist/nylas-web-elements/{p-ae01e1cb.entry.js.map → p-f1f8f745.entry.js.map} +0 -0
@@ -1,6 +1,7 @@
1
- import { h, r as registerInstance, i as createEvent, a as Host } from './index-8362ce5c.js';
2
- import { R as RegisterComponent } from './register-component-0645dce0.js';
3
- import { d as debug } from './utils-3a8d433a.js';
1
+ import { h, r as registerInstance, i as createEvent, a as Host, e as getElement } from './index-8362ce5c.js';
2
+ import { R as RegisterComponent } from './register-component-e5afe237.js';
3
+ import { a as debug, p as parsePreviewLink } from './utils-73d8a928.js';
4
+ import { D as DEFAULT_OPEN_HOURS } from './constants-bf39e913.js';
4
5
  import './_commonjsHelpers-7c16df4a.js';
5
6
 
6
7
  function TabContents({ id, formState, activeTab, calendars }) {
@@ -18,19 +19,18 @@ function TabContents({ id, formState, activeTab, calendars }) {
18
19
  h("nylas-location-component", { name: "location", eventLocation: location, exportparts: "nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content" }),
19
20
  h("nylas-event-description", { name: "description", eventDescription: eventDescription, exportparts: "nedesc, nedesc__textarea" })))));
20
21
  case 'availability':
21
- const openHours = formState.availability;
22
- const timezone = openHours?.[0]?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
22
+ const openHours = formState.availability.openHours;
23
+ const timezone = formState.availability.timezone ? formState.availability.timezone : Intl.DateTimeFormat().resolvedOptions().timeZone;
23
24
  const organizer = formState.participants?.find(p => p.is_organizer);
24
25
  const organizerEmail = organizer?.email ?? 'primary';
25
26
  const selectedCalendars = formState.calendarIds.length > 0 ? formState.calendarIds : [organizerEmail];
26
27
  const bookingCalendar = formState.bookingCalendar == 'primary' ? organizerEmail : formState.bookingCalendar;
27
28
  return (h("div", { key: id },
28
29
  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' }),
29
- h("nylas-calendar-picker", { name: "calendars", calendars: calendars ?? [], defaultSelectedCalendars: selectedCalendars, organizerEmail: organizerEmail, exportparts: 'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content' }),
30
+ h("nylas-calendar-picker", { name: "calendars", calendars: calendars ?? [], defaultSelectedCalendars: selectedCalendars, exportparts: 'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content' }),
30
31
  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' })));
31
32
  case 'bookingOptions':
32
33
  return (h("div", { key: id },
33
- id == 'new' && h("p", null, "Config"),
34
34
  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' }),
35
35
  h("nylas-custom-booking-flow", { name: "booking-type", bookingType: formState.bookingType, exportparts: 'ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content' }),
36
36
  h("nylas-event-limits", null,
@@ -40,7 +40,7 @@ function TabContents({ id, formState, activeTab, calendars }) {
40
40
  }
41
41
  }
42
42
 
43
- 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:flex-end;align-items:center;gap:1rem;height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}.footer.sc-nylas-editor-tabs .unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.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 button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.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}";
43
+ 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}";
44
44
 
45
45
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
46
46
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -60,23 +60,34 @@ const NylasEditorTabs = class {
60
60
  constructor(hostRef) {
61
61
  registerInstance(this, hostRef);
62
62
  this.schedulerConfigChanged = createEvent(this, "schedulerConfigChanged", 7);
63
+ this.cancelButtonClick = createEvent(this, "cancelButtonClick", 7);
64
+ this.formSubmitted = createEvent(this, "formSubmitted", 7);
65
+ this.previewButtonClicked = createEvent(this, "previewButtonClicked", 7);
66
+ this.setError = (error) => {
67
+ this.error = error.message;
68
+ };
63
69
  this.formSubmissionHandler = async (event) => {
64
70
  event.preventDefault();
71
+ this.formSubmitted.emit();
72
+ const valid = this.formRef.checkValidity();
73
+ if (!valid) {
74
+ return;
75
+ }
65
76
  this.isLoading = true;
66
77
  this.hasUnsavedChanges = false;
67
- this.updateFormState();
68
- const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } = this.formState;
69
- const organizer = this.config?.participants?.find(p => p.is_organizer);
78
+ const formState = this.updateFormState();
79
+ const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } = formState;
80
+ const organizer = this.selectedConfiguration?.participants?.find(p => p.is_organizer);
70
81
  const configObject = {
71
- ...(this.config?.id && { id: this.config.id }),
72
- version: this.config?.version ?? '1.0.0',
82
+ ...this.selectedConfiguration,
83
+ version: this.selectedConfiguration?.version ?? '1.0.0',
73
84
  availability: {
74
85
  duration_minutes: duration ? parseInt(duration) : 0,
75
86
  availability_rules: {
76
- availability_method: this.config?.availability?.availability_rules?.availability_method ?? 'collective',
87
+ availability_method: this.selectedConfiguration?.availability?.availability_rules?.availability_method ?? 'collective',
77
88
  buffer: buffer || { before: 0, after: 0 },
78
- default_open_hours: this.config?.availability?.availability_rules?.default_open_hours ?? [],
79
- round_robin_group_id: this.config?.availability?.availability_rules?.round_robin_group_id ?? '',
89
+ default_open_hours: this.selectedConfiguration?.availability?.availability_rules?.default_open_hours ?? DEFAULT_OPEN_HOURS,
90
+ round_robin_group_id: this.selectedConfiguration?.availability?.availability_rules?.round_robin_group_id ?? '',
80
91
  },
81
92
  },
82
93
  participants: [
@@ -86,7 +97,7 @@ const NylasEditorTabs = class {
86
97
  is_organizer: true,
87
98
  availability: {
88
99
  calendar_ids: calendarIds?.length ? calendarIds : ['primary'],
89
- open_hours: availability ?? [],
100
+ open_hours: availability?.openHours ?? [],
90
101
  },
91
102
  booking: {
92
103
  calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',
@@ -98,6 +109,7 @@ const NylasEditorTabs = class {
98
109
  description: description?.toString() ?? '',
99
110
  location: location?.toString() ?? '',
100
111
  booking_type: bookingType?.toString() ?? 'booking',
112
+ timezone: availability?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
101
113
  },
102
114
  scheduler: {
103
115
  available_days_in_future: availableDaysInFuture ?? 30,
@@ -111,25 +123,28 @@ const NylasEditorTabs = class {
111
123
  this.changesSaved = false;
112
124
  }, 5000);
113
125
  };
114
- this.schedulerConfigChanged.emit({ config: configObject, resetLoadingState, action: this.action });
126
+ this.schedulerConfigChanged.emit({ config: configObject, resetLoadingState, setError: this.setError, action: this.action });
115
127
  };
116
128
  this.calendars = undefined;
117
- this.config = undefined;
129
+ this.selectedConfiguration = undefined;
118
130
  this.currentUser = undefined;
131
+ this.schedulerPreviewLink = '';
119
132
  this.action = 'create';
133
+ this.mode = 'app';
120
134
  this.activeTab = 'eventInfo';
121
135
  this.isLoading = false;
122
136
  this.hasUnsavedChanges = false;
123
137
  this.changesSaved = false;
124
138
  this.formState = {};
139
+ this.error = '';
125
140
  }
126
141
  configChangedHandler(newConfig) {
127
- debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.config);
142
+ debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.selectedConfiguration);
128
143
  this.formState = {
129
144
  ...this.getFormStateFromConfig(newConfig),
130
145
  };
131
146
  if (newConfig.id) {
132
- this.action = 'update';
147
+ this.action = 'edit';
133
148
  }
134
149
  else {
135
150
  this.action = 'create';
@@ -140,7 +155,7 @@ const NylasEditorTabs = class {
140
155
  }
141
156
  componentWillLoad() {
142
157
  debug('[nylas-editor-tabs]', 'componentWillLoad');
143
- this.formState = this.getFormStateFromConfig(this.config);
158
+ this.formState = this.getFormStateFromConfig(this.selectedConfiguration);
144
159
  }
145
160
  componentDidLoad() {
146
161
  debug('[nylas-editor-tabs]', 'componentDidLoad');
@@ -150,8 +165,10 @@ const NylasEditorTabs = class {
150
165
  }
151
166
  handleValueChanged(event) {
152
167
  debug('[nylas-editor-tabs]', 'handleValueChanged', event);
153
- this.formState = { ...this.formState, [event.detail.name]: event.detail.value };
168
+ const { name, value } = event.detail;
169
+ this.formState = { ...this.formState, [name]: value };
154
170
  this.hasUnsavedChanges = true;
171
+ this.error = '';
155
172
  }
156
173
  getFormStateFromConfig(config) {
157
174
  const organizerParticipant = config?.participants?.find(p => p.is_organizer);
@@ -159,15 +176,18 @@ const NylasEditorTabs = class {
159
176
  title: config?.event_booking?.title ?? '',
160
177
  description: config?.event_booking?.description ?? '',
161
178
  duration: config?.availability?.duration_minutes?.toString() ?? '10',
162
- availability: organizerParticipant?.availability?.open_hours ?? undefined,
179
+ availability: {
180
+ timezone: config?.event_booking?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,
181
+ open_hours: organizerParticipant?.availability?.open_hours ?? undefined,
182
+ },
163
183
  calendarIds: organizerParticipant?.availability?.calendar_ids ?? [],
164
184
  participants: config?.participants ?? [],
165
185
  bookingCalendar: organizerParticipant?.booking?.calendar_id ?? organizerParticipant?.email ?? '',
166
- location: this.config?.event_booking?.location ?? '',
167
- bookingType: this.config?.event_booking?.booking_type ?? 'booking',
168
- buffer: this.config?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },
169
- availableDaysInFuture: this.config?.scheduler?.available_days_in_future ?? 30,
170
- minCancellationNotice: this.config?.scheduler?.min_cancellation_notice ?? 0,
186
+ location: this.selectedConfiguration?.event_booking?.location ?? '',
187
+ bookingType: this.selectedConfiguration?.event_booking?.booking_type ?? 'booking',
188
+ buffer: this.selectedConfiguration?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },
189
+ availableDaysInFuture: this.selectedConfiguration?.scheduler?.available_days_in_future ?? 30,
190
+ minCancellationNotice: this.selectedConfiguration?.scheduler?.min_cancellation_notice ?? 0,
171
191
  };
172
192
  }
173
193
  updateFormState() {
@@ -213,6 +233,7 @@ const NylasEditorTabs = class {
213
233
  }
214
234
  });
215
235
  this.formState = { ...this.formState };
236
+ return this.formState;
216
237
  }
217
238
  setActiveTab(e, tabName) {
218
239
  e.preventDefault();
@@ -221,13 +242,26 @@ const NylasEditorTabs = class {
221
242
  }
222
243
  render() {
223
244
  debug('[nylas-editor-tabs]', 'render', this.formState);
224
- return (h(Host, { key: '920332a1206e84229cd4875b598b388d196edc77' }, h("form", { key: 'cc33124020c4ec87dff2eb395d8a4151dd2a63a8', onSubmit: this.formSubmissionHandler, class: "scheduler-editor", ref: el => (this.formRef = el) }, h("div", { key: 'e9a0e2d35d59ab3c95e0b17db057aa97de1c48d3', class: "form-contents" }, h("div", { key: 'c2b30e822e4b5a0d938b9d7fb5849e90503d5fee', class: "tabs" }, h("button", { key: '1958ff2af28cf21a3c8b6a1029dfd0fdfd58bbf7', class: { tab: true, active: this.activeTab == 'eventInfo' }, onClick: e => this.setActiveTab(e, 'eventInfo') }, h("calendar-info-icon", { key: 'c62f9b3cad22d4c67791c78dcac202d47617eda0', width: "16", height: "16" }), "Event Info"), h("button", { key: '7858b3fe59f02eefba9cebc561e5e89b220a6018', class: { tab: true, active: this.activeTab == 'availability' }, onClick: e => this.setActiveTab(e, 'availability') }, h("calendar-patterns-icon", { key: 'b8d6ed526a37bd31ce150c4202e41a9599c553af', width: "16", height: "16" }), "Availability"), h("button", { key: '224c119608059affb6245f72b6337fe66aafe9fb', class: { tab: true, active: this.activeTab == 'bookingOptions' }, onClick: e => this.setActiveTab(e, 'bookingOptions') }, h("flow-icon", { key: '149824372964f592dd1d754a7db6eef9367ffafc', width: "16", height: "16" }), "Booking Options")), h("div", { key: '0feb5d9500b8028542438e9d091b66bc87bc9673', class: "tab-content" }, h(TabContents, { key: '86de2a2ab92dd6c1081c7a4db4f3ceb62ee579fe', formState: this.formState, activeTab: this.activeTab, calendars: this.calendars, id: this.config?.id ?? 'new' }))), h("div", { key: '8a63b2e9761aea3dea1e967784db8e2de5b65eda', class: "footer" }, h("p", { key: 'da0e2f2f19bc7a8b2910706f57ea437b291fc2b1', class: {
245
+ 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 => {
246
+ event.preventDefault();
247
+ const previewEvent = this.previewButtonClicked.emit(this.host);
248
+ if (!previewEvent.defaultPrevented) {
249
+ window.open(parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');
250
+ }
251
+ }, variant: 'basic' }, "Preview"))), h("div", { key: '62470cdbc7c4670e6ff03e9979ca803f81482b15', class: "buttons" }, h("p", { key: '5ecdfa1082650aab2f8fef8ed7beeb11fedb381c', class: {
225
252
  'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,
226
253
  'saved-changes': this.changesSaved,
227
- } }, this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.changesSaved ? 'Changes saved!' : ''), h("button-component", { key: '6d41a5158d8ff68528056fcc65c1b668e3fcd6e6', type: "submit", disabled: this.isLoading }, this.isLoading ? (h("span", null, "Saving", h("loading-icon", null), ' ')) : this.action == 'create' ? ('Create') : ('Save changes'))))));
254
+ 'error': this.error !== '',
255
+ 'error-full-width': this.error !== '' && this.action === 'create',
256
+ } }, 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 => {
257
+ event.preventDefault();
258
+ this.cancelButtonClick.emit();
259
+ this.error = '';
260
+ }, 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')))))));
228
261
  }
262
+ get host() { return getElement(this); }
229
263
  static get watchers() { return {
230
- "config": ["configChangedHandler"]
264
+ "selectedConfiguration": ["configChangedHandler"]
231
265
  }; }
232
266
  };
233
267
  __decorate([
@@ -235,23 +269,35 @@ __decorate([
235
269
  name: 'nylas-editor-tabs',
236
270
  stateToProps: new Map([
237
271
  ['schedulerConfig.calendars', 'calendars'],
238
- ['schedulerConfig.config', 'config'],
272
+ ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],
239
273
  ['schedulerConfig.currentUser', 'currentUser'],
240
274
  ]),
241
275
  eventToProps: {
242
276
  schedulerConfigChanged: async (event, nylasSchedulerConfigConnector) => {
243
- const { resetLoadingState, action, config } = event.detail;
244
- if (resetLoadingState) {
245
- resetLoadingState(event);
246
- }
247
- if (action === 'update') {
248
- await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);
277
+ const { resetLoadingState, setError, action, config } = event.detail;
278
+ const checkForErrors = (response) => {
279
+ const [data, error] = response;
280
+ if (!data && error && setError) {
281
+ setError(error);
282
+ }
283
+ if (resetLoadingState) {
284
+ resetLoadingState(event);
285
+ }
286
+ };
287
+ if (action === 'edit') {
288
+ const response = await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);
289
+ checkForErrors(response);
249
290
  }
250
291
  else {
251
- await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);
292
+ const response = await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);
293
+ checkForErrors(response);
252
294
  }
253
295
  },
296
+ cancelButtonClick: async (_, nylasSchedulerConfigConnector) => {
297
+ nylasSchedulerConfigConnector.schedulerConfigStore.state.action = null;
298
+ },
254
299
  },
300
+ localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),
255
301
  fireRegisterEvent: true,
256
302
  }),
257
303
  __metadata("design:type", Function),
@@ -1 +1 @@
1
- {"file":"nylas-editor-tabs.entry.esm.js","mappings":";;;;;SASwB,WAAW,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAoB;IAC3F,QAAQ,SAAS;QACf,KAAK,WAAW;YACd,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC;YACnC,MAAM,gBAAgB,GAAG,SAAS,CAAC,W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BAGD,IAAI,MAAM,KAAK,QAAQ,EAAE;oBACvB,MAAM,6BAA6B,CAAC,eAAe,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;iBACjF;qBAAM;oBACL,MAAM,6BAA6B,CAAC,eAAe,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;iBACjF;aACF;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;6CAkDD;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-editor-tabs/tab-contents.tsx","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.scss?tag=nylas-editor-tabs&encapsulation=scoped","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.tsx"],"sourcesContent":["import { h } from '@stencil/core';\n\nexport type TabContentsProps = {\n id: string;\n formState: any;\n activeTab: string;\n calendars?: any[];\n};\n\nexport default function TabContents({ id, formState, activeTab, calendars }: TabContentsProps) {\n switch (activeTab) {\n case 'eventInfo':\n const eventTitle = formState.title;\n const eventDescription = formState.description;\n const eventDuration = parseInt(formState.duration);\n const location = formState.location;\n // const eventParticipants = formState.participants;\n\n return (\n <div key={id}>\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title name=\"title\" eventTitle={eventTitle} exportparts=\"net, net__title, net__dropdown-content\" />\n <nylas-event-duration\n name=\"duration\"\n eventDurationMinutes={eventDuration}\n exportparts=\"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content\"\n />\n <nylas-location-component name=\"location\" eventLocation={location} exportparts=\"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content\" />\n <nylas-event-description name=\"description\" eventDescription={eventDescription} exportparts=\"nedesc, nedesc__textarea\" />\n </div>\n </nylas-event-info>\n {/* <nylas-additional-participants\n name=\"participants\"\n eventParticipants={eventParticipants}\n exportparts={'nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant, nap__add-participant'}\n /> */}\n </div>\n );\n case 'availability':\n const openHours = formState.availability;\n const timezone = openHours?.[0]?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;\n const organizer = formState.participants?.find(p => p.is_organizer);\n const organizerEmail = organizer?.email ?? 'primary';\n const selectedCalendars = formState.calendarIds.length > 0 ? formState.calendarIds : [organizerEmail];\n const bookingCalendar = formState.bookingCalendar == 'primary' ? organizerEmail : formState.bookingCalendar;\n return (\n <div key={id}>\n <nylas-booking-calendar-picker\n name=\"booking-calendar\"\n calendars={calendars ?? []}\n defaultBookingCalendar={bookingCalendar}\n exportparts={'nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content'}\n />\n <nylas-calendar-picker\n name=\"calendars\"\n calendars={calendars ?? []}\n defaultSelectedCalendars={selectedCalendars}\n organizerEmail={organizerEmail}\n exportparts={'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content'}\n />\n <nylas-availability-picker\n name=\"availability\"\n openHours={openHours}\n defaultTimezone={timezone}\n exportparts={\n 'nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times'\n }\n />\n </div>\n );\n case 'bookingOptions':\n return (\n <div key={id}>\n {id == 'new' && <p>Config</p>}\n <nylas-buffer-time\n name=\"buffer-time\"\n buffer={formState.buffer}\n exportparts={\n 'nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview'\n }\n />\n <nylas-custom-booking-flow\n name=\"booking-type\"\n bookingType={formState.bookingType}\n exportparts={'ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content'}\n />\n <nylas-event-limits>\n <div slot=\"inputs\">\n <nylas-limit-future-bookings\n name=\"limit-future-bookings\"\n availableDaysInFuture={formState.availableDaysInFuture}\n exportparts=\"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content\"\n />\n <nylas-min-cancellation-notice\n name=\"min-cancellation-notice\"\n minCancellationNotice={formState.minCancellationNotice}\n exportparts=\"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content\"\n />\n </div>\n </nylas-event-limits>\n </div>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.scheduler-editor {\n display: flex;\n flex-direction: column;\n .form-contents {\n display: grid;\n grid-template-columns: minmax(224px, 25%) 1fr;\n @media #{$mobile} {\n display: table-column-group;\n }\n .tabs {\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-25);\n .tab {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--nylas-base-900);\n background: var(--nylas-base-0);\n border: none;\n height: 56px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n &:not(:first-of-type) {\n margin-top: 0.25rem;\n }\n &.active {\n font-weight: 600;\n background: var(--nylas-base-0);\n color: var(--nylas-primary);\n border-left: 4px solid var(--nylas-primary);\n box-shadow: 0px 1px 2px 0px #0000000f;\n box-shadow: 0px 1px 3px 0px #0000001a;\n }\n }\n }\n .tab-content {\n max-width: 692px;\n nylas-event-info,\n nylas-event-limits {\n div[slot='inputs'] {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n }\n }\n }\n}\n\n.footer {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 1rem;\n height: 80px;\n padding: 0 1rem;\n border-top: 1px solid var(--nylas-base-200);\n .unsaved-changes {\n color: var(--nylas-base-600);\n }\n .saved-changes {\n color: var(--nylas-success);\n }\n button {\n @include primary-button;\n width: 148px;\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { BookingType, Calendar, Configuration } from '@nylas/core';\nimport { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport TabContents from './tab-contents';\nimport { User } from '@/common/nylas-api-request';\n\ntype SchedulerEventDetail = {\n config: Partial<Configuration>;\n action: 'create' | 'update';\n resetLoadingState?: (e: CustomEvent) => void;\n};\n\n/**\n * The `nylas-editor-tabs` component is a UI component that displays the editor tabs for the scheduler editor.\n * @part nap__title - [nylas-additional-participants] The title of the component.\n * @part nap__subtitle - [nylas-additional-participants] The subtitle of the component.\n * @part nap__content - [nylas-additional-participants] The content of the component.\n * @part nap__input - [nylas-additional-participants] The input of the component.\n * @part nap__remove-participant - [nylas-additional-participants] The remove participant button of the component.\n * @part nap__add-participant - [nylas-additional-participants] The add participant button of the component.\n * @part nap__header - [nylas-availability-picker] The header of the availability picker\n * @part nap__select-timezone - [nylas-availability-picker] The timezone selection container\n * @part nap__select-timezone-button -[nylas-availability-picker] The timezone selection button\n * @part nap__select-timezone-dropdown-content -[nylas-availability-picker] The timezone selection dropdown content\n * @part nap__availability - [nylas-availability-picker] The availability container\n * @part nap__day - [nylas-availability-picker] The day container\n * @part nap__time-ranges - [nylas-availability-picker] The time ranges container\n * @part nap__time-range - [nylas-availability-picker] The time range container\n * @part nap__add-time-range - [nylas-availability-picker] The add time range button\n * @part nap__time-picker-container -[nylas-availability-picker] The time picker container\n * @part nap__time-picker-input - [nylas-availability-picker] The time picker input\n * @part nap__time-picker-times - [nylas-availability-picker] The time picker times\n * @part nbcp - [nylas-booking-calendar-picker] The booking calendar picker container\n * @part nbcp__header - [nylas-booking-calendar-picker] The header of the booking calendar picker\n * @part nbcp__input-label - [nylas-booking-calendar-picker] The input label of the booking calendar picker\n * @part nbcp__dropdown - [nylas-booking-calendar-picker] The dropdown container\n * @part nbcp__dropdown-button - [nylas-booking-calendar-picker] The dropdown button\n * @part nbcp__dropdown-content - [nylas-booking-calendar-picker] The dropdown content\n * @part nbt - [nylas-buffer-time] The buffer time container\n * @part nbt__header - [nylas-buffer-time] The header of the buffer time\n * @part nbt__body - [nylas-buffer-time] The body of the buffer time\n * @part nbt__dropdown-before - [nylas-buffer-time] The before buffer dropdown container\n * @part nbt__dropdown-button-before - [nylas-buffer-time] The before buffer dropdown button\n * @part nbt__dropdown-content-before - [nylas-buffer-time] The before buffer dropdown content\n * @part nbt__dropdown-after - [nylas-buffer-time] The after buffer dropdown container\n * @part nbt__dropdown-button-after - [nylas-buffer-time] The after buffer dropdown button\n * @part nbt__dropdown-content-after - [nylas-buffer-time] The after buffer dropdown content\n * @part nbt__preview - [nylas-buffer-time] The buffer time preview\n * @part ncp - [nylas-calendar-picker] The calendar picker container\n * @part ncp__header - [nylas-calendar-picker] The header of the calendar picker\n * @part ncp__dropdown - [nylas-calendar-picker] The dropdown container\n * @part ncp__dropdown-button - [nylas-calendar-picker] The dropdown button\n * @part ncp__dropdown-content - [nylas-calendar-picker] The dropdown content\n * @part ncbf - [nylas-custom-booking-flow] The custom booking flow container\n * @part ncbf__header - [nylas-custom-booking-flow] The header of the custom booking flow\n * @part ncbf__dropdown - [nylas-custom-booking-flow] The dropdown container\n * @part ncbf__dropdown-button - [nylas-custom-booking-flow] The dropdown button\n * @part ncbf__dropdown-content - [nylas-custom-booking-flow] The dropdown content\n * @part nedesc - [nylas-event-description] The event description container\n * @part nedesc__textarea - [nylas-event-description] The event description textarea\n * @part ned - [nylas-event-duration] The event duration container\n * @part ned__input - [nylas-event-duration] The event duration input\n * @part ned__dropdown - [nylas-event-duration] The event duration dropdown\n * @part ned__dropdown-button - [nylas-event-duration] The event duration dropdown button\n * @part ned__dropdown-content - [nylas-event-duration] The event duration dropdown content\n * @part net - [nylas-event-title] The event title container\n * @part net__title - [nylas-event-title] The event title input\n * @part net__dropdown-content - [nylas-event-title] The token options container\n * @part nlfb - [nylas-limit-future-bookings] The limit future bookings container\n * @part nlfb__number-dropdown - [nylas-limit-future-bookings] The number dropdown container\n * @part nlfb__number-dropdown-button - [nylas-limit-future-bookings] The number dropdown button\n * @part nlfb__number-dropdown-content - [nylas-limit-future-bookings] The number dropdown content\n * @part nlfb__period-dropdown - [nylas-limit-future-bookings] The period dropdown container\n * @part nlfb__period-dropdown-button - [nylas-limit-future-bookings] The period dropdown button\n * @part nlfb__period-dropdown-content - [nylas-limit-future-bookings] The period dropdown content\n * @part nel - [nylas-location-component] The event location container\n * @part nel__location - [nylas-location-component] The event location input\n * @part nel__dropdown - [nylas-location-component] The dropdown container\n * @part nel__dropdown-button - [nylas-location-component] The dropdown button\n * @part nel__dropdown-content - [nylas-location-component] The dropdown content\n * @part nmcn - [nylas-min-cancellation-notice] The minimum cancellation notice container\n * @part nmcn__number-dropdown - [nylas-min-cancellation-notice] The number dropdown container\n * @part nmcn__number-dropdown-button - [nylas-min-cancellation-notice] The number dropdown button\n * @part nmcn__number-dropdown-content - [nylas-min-cancellation-notice] The number dropdown content\n * @part nmcn__period-dropdown - [nylas-min-cancellation-notice] The period dropdown container\n * @part nmcn__period-dropdown-button - [nylas-min-cancellation-notice] The period dropdown button\n * @part nmcn__period-dropdown-content - [nylas-min-cancellation-notice] The period dropdown content\n */\n@Component({\n tag: 'nylas-editor-tabs',\n styleUrl: 'nylas-editor-tabs.scss',\n scoped: true,\n})\nexport class NylasEditorTabs {\n private formRef!: HTMLFormElement;\n @Prop() calendars?: Calendar[];\n @Prop() config?: Configuration;\n @Prop() currentUser?: User;\n @State() action: 'create' | 'update' = 'create';\n @State() activeTab: string = 'eventInfo';\n @State() isLoading: boolean = false;\n @State() hasUnsavedChanges: boolean = false;\n @State() changesSaved: boolean = false;\n @State() formState: Partial<{\n title: string;\n description: string;\n duration: string;\n availability?: any;\n calendarIds: string[];\n participants?: any[];\n bookingCalendar?: string;\n location?: string;\n bookingType?: string;\n buffer?: { before: number; after: number };\n availableDaysInFuture?: number;\n minCancellationNotice?: number;\n }> = {};\n\n @Event() schedulerConfigChanged!: EventEmitter<SchedulerEventDetail>;\n\n @Watch('config')\n configChangedHandler(newConfig: Configuration) {\n debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.config);\n this.formState = {\n ...this.getFormStateFromConfig(newConfig),\n };\n\n if (newConfig.id) {\n this.action = 'update';\n } else {\n this.action = 'create';\n }\n }\n\n connectedCallback() {\n debug('[nylas-editor-tabs]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-editor-tabs]', 'componentWillLoad');\n this.formState = this.getFormStateFromConfig(this.config);\n }\n\n componentDidLoad() {\n debug('[nylas-editor-tabs]', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('[nylas-editor-tabs]', 'disconnectedCallback');\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n this.formState = { ...this.formState, [event.detail.name]: event.detail.value };\n this.hasUnsavedChanges = true;\n }\n\n getFormStateFromConfig(config?: Configuration) {\n const organizerParticipant = config?.participants?.find(p => p.is_organizer);\n return {\n title: config?.event_booking?.title ?? '',\n description: config?.event_booking?.description ?? '',\n duration: config?.availability?.duration_minutes?.toString() ?? '10',\n availability: organizerParticipant?.availability?.open_hours ?? undefined,\n calendarIds: organizerParticipant?.availability?.calendar_ids ?? [],\n participants: config?.participants ?? [],\n bookingCalendar: organizerParticipant?.booking?.calendar_id ?? organizerParticipant?.email ?? '',\n location: this.config?.event_booking?.location ?? '',\n bookingType: this.config?.event_booking?.booking_type ?? 'booking',\n buffer: this.config?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },\n availableDaysInFuture: this.config?.scheduler?.available_days_in_future ?? 30,\n minCancellationNotice: this.config?.scheduler?.min_cancellation_notice ?? 0,\n };\n }\n\n updateFormState() {\n const formData = new FormData(this.formRef);\n formData.forEach((value, key) => {\n switch (key) {\n case 'title':\n this.formState.title = value.toString();\n break;\n case 'description':\n this.formState.description = value.toString();\n break;\n case 'duration':\n this.formState.duration = value.toString();\n break;\n case 'availability':\n this.formState.availability = JSON.parse(value.toString());\n break;\n case 'participants':\n this.formState.participants = JSON.parse(value.toString());\n break;\n case 'calendars':\n this.formState.calendarIds = value.toString().split(',');\n break;\n case 'booking-calendar':\n this.formState.bookingCalendar = value.toString();\n break;\n case 'location':\n this.formState.location = value.toString();\n break;\n case 'booking-type':\n this.formState.bookingType = value.toString();\n break;\n case 'buffer-time':\n this.formState.buffer = JSON.parse(value.toString());\n break;\n case 'limit-future-bookings':\n this.formState.availableDaysInFuture = parseInt(value.toString());\n break;\n case 'min-cancellation-notice':\n this.formState.minCancellationNotice = parseInt(value.toString());\n break;\n }\n });\n this.formState = { ...this.formState };\n }\n\n setActiveTab(e: Event, tabName: string) {\n e.preventDefault();\n this.updateFormState();\n this.activeTab = tabName;\n }\n\n formSubmissionHandler = async (event: Event) => {\n event.preventDefault();\n this.isLoading = true;\n this.hasUnsavedChanges = false;\n this.updateFormState();\n const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } =\n this.formState;\n\n const organizer = this.config?.participants?.find(p => p.is_organizer);\n\n const configObject: Partial<Configuration> = {\n ...(this.config?.id && { id: this.config.id }),\n version: this.config?.version ?? '1.0.0',\n availability: {\n duration_minutes: duration ? parseInt(duration) : 0,\n availability_rules: {\n availability_method: this.config?.availability?.availability_rules?.availability_method ?? 'collective',\n buffer: buffer || { before: 0, after: 0 },\n default_open_hours: this.config?.availability?.availability_rules?.default_open_hours ?? [],\n round_robin_group_id: this.config?.availability?.availability_rules?.round_robin_group_id ?? '',\n },\n },\n participants: [\n {\n name: organizer?.name ?? organizer?.email ?? this.currentUser?.name ?? this.currentUser?.email ?? '',\n email: organizer?.email ?? this.currentUser?.email ?? '',\n is_organizer: true,\n availability: {\n calendar_ids: calendarIds?.length ? calendarIds : ['primary'],\n open_hours: availability ?? [],\n },\n booking: {\n calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',\n },\n },\n ],\n event_booking: {\n title: title?.toString() ?? '',\n description: description?.toString() ?? '',\n location: location?.toString() ?? '',\n booking_type: (bookingType?.toString() as BookingType) ?? 'booking',\n },\n scheduler: {\n available_days_in_future: availableDaysInFuture ?? 30,\n min_cancellation_notice: minCancellationNotice ?? 0,\n },\n };\n const resetLoadingState = (_e: CustomEvent) => {\n this.isLoading = false;\n this.changesSaved = true;\n setTimeout(() => {\n this.changesSaved = false;\n }, 5000);\n };\n this.schedulerConfigChanged.emit({ config: configObject, resetLoadingState, action: this.action });\n };\n\n @RegisterComponent<NylasEditorTabs, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-editor-tabs',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.config', 'config'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ]),\n eventToProps: {\n schedulerConfigChanged: async (event: CustomEvent<SchedulerEventDetail>, nylasSchedulerConfigConnector: NylasSchedulerConfigConnector) => {\n const { resetLoadingState, action, config } = event.detail;\n if (resetLoadingState) {\n resetLoadingState(event);\n }\n\n // If we have an ID, we are updating an existing configuration\n if (action === 'update') {\n await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);\n } else {\n await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n debug('[nylas-editor-tabs]', 'render', this.formState);\n return (\n <Host>\n <form onSubmit={this.formSubmissionHandler} class=\"scheduler-editor\" ref={el => (this.formRef = el as HTMLFormElement)}>\n <div class=\"form-contents\">\n <div class=\"tabs\">\n <button class={{ tab: true, active: this.activeTab == 'eventInfo' }} onClick={e => this.setActiveTab(e, 'eventInfo')}>\n <calendar-info-icon width=\"16\" height=\"16\" />\n Event Info\n </button>\n <button class={{ tab: true, active: this.activeTab == 'availability' }} onClick={e => this.setActiveTab(e, 'availability')}>\n <calendar-patterns-icon width=\"16\" height=\"16\" />\n Availability\n </button>\n <button class={{ tab: true, active: this.activeTab == 'bookingOptions' }} onClick={e => this.setActiveTab(e, 'bookingOptions')}>\n <flow-icon width=\"16\" height=\"16\" />\n Booking Options\n </button>\n </div>\n <div class=\"tab-content\">\n <TabContents formState={this.formState} activeTab={this.activeTab} calendars={this.calendars} id={this.config?.id ?? 'new'} />\n </div>\n </div>\n <div class=\"footer\">\n <p\n class={{\n 'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,\n 'saved-changes': this.changesSaved,\n }}\n >\n {this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.changesSaved ? 'Changes saved!' : ''}\n </p>\n <button-component type=\"submit\" disabled={this.isLoading}>\n {this.isLoading ? (\n <span>\n Saving\n <loading-icon />{' '}\n </span>\n ) : this.action == 'create' ? (\n 'Create'\n ) : (\n 'Save changes'\n )}\n </button-component>\n </div>\n </form>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-editor-tabs.entry.esm.js","mappings":";;;;;;SASwB,WAAW,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAoB;IAC3F,QAAQ,SAAS;QACf,KAAK,WAAW;YACd,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC;YACnC,MAAM,gBAAgB,GAAG,SAAS,CAAC,WAAW,CAAC;YAC/C,MAAM,aAAa,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YACnD,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;YAGpC,QACE,WAAK,GAAG,EAAE,EAAE;gBACV;oBACE,WAAK,IAAI,EAAC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[],"sources":["src/components/scheduler-editor/nylas-editor-tabs/tab-contents.tsx","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.scss?tag=nylas-editor-tabs&encapsulation=scoped","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.tsx"],"sourcesContent":["import { h } from '@stencil/core';\n\nexport type TabContentsProps = {\n id: string;\n formState: any;\n activeTab: string;\n calendars?: any[];\n};\n\nexport default function TabContents({ id, formState, activeTab, calendars }: TabContentsProps) {\n switch (activeTab) {\n case 'eventInfo':\n const eventTitle = formState.title;\n const eventDescription = formState.description;\n const eventDuration = parseInt(formState.duration);\n const location = formState.location;\n // const eventParticipants = formState.participants;\n\n return (\n <div key={id}>\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title name=\"title\" eventTitle={eventTitle} exportparts=\"net, net__title, net__dropdown-content\" />\n <nylas-event-duration\n name=\"duration\"\n eventDurationMinutes={eventDuration}\n exportparts=\"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content\"\n />\n <nylas-location-component name=\"location\" eventLocation={location} exportparts=\"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content\" />\n <nylas-event-description name=\"description\" eventDescription={eventDescription} exportparts=\"nedesc, nedesc__textarea\" />\n </div>\n </nylas-event-info>\n {/* <nylas-additional-participants\n name=\"participants\"\n eventParticipants={eventParticipants}\n exportparts={'nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant, nap__add-participant'}\n /> */}\n </div>\n );\n case 'availability':\n const openHours = formState.availability.openHours;\n const timezone = formState.availability.timezone ? formState.availability.timezone : Intl.DateTimeFormat().resolvedOptions().timeZone;\n const organizer = formState.participants?.find(p => p.is_organizer);\n const organizerEmail = organizer?.email ?? 'primary';\n const selectedCalendars = formState.calendarIds.length > 0 ? formState.calendarIds : [organizerEmail];\n const bookingCalendar = formState.bookingCalendar == 'primary' ? organizerEmail : formState.bookingCalendar;\n return (\n <div key={id}>\n <nylas-booking-calendar-picker\n name=\"booking-calendar\"\n calendars={calendars ?? []}\n defaultBookingCalendar={bookingCalendar}\n exportparts={'nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content'}\n />\n <nylas-calendar-picker\n name=\"calendars\"\n calendars={calendars ?? []}\n defaultSelectedCalendars={selectedCalendars}\n exportparts={'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content'}\n />\n <nylas-availability-picker\n name=\"availability\"\n openHours={openHours}\n defaultTimezone={timezone}\n exportparts={\n 'nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times'\n }\n />\n </div>\n );\n case 'bookingOptions':\n return (\n <div key={id}>\n <nylas-buffer-time\n name=\"buffer-time\"\n buffer={formState.buffer}\n exportparts={\n 'nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview'\n }\n />\n <nylas-custom-booking-flow\n name=\"booking-type\"\n bookingType={formState.bookingType}\n exportparts={'ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content'}\n />\n <nylas-event-limits>\n <div slot=\"inputs\">\n <nylas-limit-future-bookings\n name=\"limit-future-bookings\"\n availableDaysInFuture={formState.availableDaysInFuture}\n exportparts=\"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content\"\n />\n <nylas-min-cancellation-notice\n name=\"min-cancellation-notice\"\n minCancellationNotice={formState.minCancellationNotice}\n exportparts=\"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content\"\n />\n </div>\n </nylas-event-limits>\n </div>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.scheduler-editor {\n display: flex;\n flex-direction: column;\n .form-contents {\n display: grid;\n grid-template-columns: minmax(224px, 25%) 1fr;\n @media #{$mobile} {\n display: table-column-group;\n }\n .tabs {\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-25);\n .tab {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--nylas-base-900);\n background: var(--nylas-base-0);\n border: none;\n height: 56px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n &:not(:first-of-type) {\n margin-top: 0.25rem;\n }\n &.active {\n font-weight: 600;\n background: var(--nylas-base-0);\n color: var(--nylas-primary);\n border-left: 4px solid var(--nylas-primary);\n box-shadow: 0px 1px 2px 0px #0000000f;\n box-shadow: 0px 1px 3px 0px #0000001a;\n }\n }\n }\n .tab-content {\n max-width: 692px;\n nylas-event-info,\n nylas-event-limits {\n div[slot='inputs'] {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n }\n }\n }\n}\n\n.footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n min-height: 80px;\n padding: 0 1rem;\n border-top: 1px solid var(--nylas-base-200);\n @media #{$mobile} {\n flex-direction: column;\n height: auto;\n }\n .preview {\n @media #{$mobile} {\n margin-top: 1rem;\n width: 100%;\n }\n }\n .buttons {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n justify-self: flex-end;\n gap: 1rem;\n @media #{$mobile} {\n flex-direction: column-reverse;\n width: 100%;\n }\n p {\n max-width: 524px;\n &.unsaved-changes {\n color: var(--nylas-base-600);\n }\n &.saved-changes {\n color: var(--nylas-success);\n }\n &.error {\n color: var(--nylas-error);\n }\n &.error-full-width {\n max-width: 660px;\n }\n }\n\n button-component {\n @media #{$mobile} {\n width: 100%;\n }\n }\n button {\n @include primary-button;\n width: 148px;\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, parsePreviewLink } from '@/utils/utils';\nimport { BookingType, Calendar, Configuration, OpenHours } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport TabContents from './tab-contents';\nimport { User } from '@/common/nylas-api-request';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\nimport { DataResponseReturnType } from '@/common/types';\n\ntype SchedulerEventDetail = {\n config: Partial<Configuration>;\n action: 'create' | 'edit';\n resetLoadingState?: (e: CustomEvent) => void;\n setError?: (error: Error) => void;\n};\n\n/**\n * The `nylas-editor-tabs` component is a UI component that displays the editor tabs for the scheduler editor.\n * @part nap__title - [nylas-additional-participants] The title of the component.\n * @part nap__subtitle - [nylas-additional-participants] The subtitle of the component.\n * @part nap__content - [nylas-additional-participants] The content of the component.\n * @part nap__input - [nylas-additional-participants] The input of the component.\n * @part nap__remove-participant - [nylas-additional-participants] The remove participant button of the component.\n * @part nap__add-participant - [nylas-additional-participants] The add participant button of the component.\n * @part nap__header - [nylas-availability-picker] The header of the availability picker\n * @part nap__select-timezone - [nylas-availability-picker] The timezone selection container\n * @part nap__select-timezone-button -[nylas-availability-picker] The timezone selection button\n * @part nap__select-timezone-dropdown-content -[nylas-availability-picker] The timezone selection dropdown content\n * @part nap__availability - [nylas-availability-picker] The availability container\n * @part nap__day - [nylas-availability-picker] The day container\n * @part nap__time-ranges - [nylas-availability-picker] The time ranges container\n * @part nap__time-range - [nylas-availability-picker] The time range container\n * @part nap__add-time-range - [nylas-availability-picker] The add time range button\n * @part nap__time-picker-container -[nylas-availability-picker] The time picker container\n * @part nap__time-picker-input - [nylas-availability-picker] The time picker input\n * @part nap__time-picker-times - [nylas-availability-picker] The time picker times\n * @part nbcp - [nylas-booking-calendar-picker] The booking calendar picker container\n * @part nbcp__header - [nylas-booking-calendar-picker] The header of the booking calendar picker\n * @part nbcp__input-label - [nylas-booking-calendar-picker] The input label of the booking calendar picker\n * @part nbcp__dropdown - [nylas-booking-calendar-picker] The dropdown container\n * @part nbcp__dropdown-button - [nylas-booking-calendar-picker] The dropdown button\n * @part nbcp__dropdown-content - [nylas-booking-calendar-picker] The dropdown content\n * @part nbt - [nylas-buffer-time] The buffer time container\n * @part nbt__header - [nylas-buffer-time] The header of the buffer time\n * @part nbt__body - [nylas-buffer-time] The body of the buffer time\n * @part nbt__dropdown-before - [nylas-buffer-time] The before buffer dropdown container\n * @part nbt__dropdown-button-before - [nylas-buffer-time] The before buffer dropdown button\n * @part nbt__dropdown-content-before - [nylas-buffer-time] The before buffer dropdown content\n * @part nbt__dropdown-after - [nylas-buffer-time] The after buffer dropdown container\n * @part nbt__dropdown-button-after - [nylas-buffer-time] The after buffer dropdown button\n * @part nbt__dropdown-content-after - [nylas-buffer-time] The after buffer dropdown content\n * @part nbt__preview - [nylas-buffer-time] The buffer time preview\n * @part ncp - [nylas-calendar-picker] The calendar picker container\n * @part ncp__header - [nylas-calendar-picker] The header of the calendar picker\n * @part ncp__dropdown - [nylas-calendar-picker] The dropdown container\n * @part ncp__dropdown-button - [nylas-calendar-picker] The dropdown button\n * @part ncp__dropdown-content - [nylas-calendar-picker] The dropdown content\n * @part ncbf - [nylas-custom-booking-flow] The custom booking flow container\n * @part ncbf__header - [nylas-custom-booking-flow] The header of the custom booking flow\n * @part ncbf__dropdown - [nylas-custom-booking-flow] The dropdown container\n * @part ncbf__dropdown-button - [nylas-custom-booking-flow] The dropdown button\n * @part ncbf__dropdown-content - [nylas-custom-booking-flow] The dropdown content\n * @part nedesc - [nylas-event-description] The event description container\n * @part nedesc__textarea - [nylas-event-description] The event description textarea\n * @part ned - [nylas-event-duration] The event duration container\n * @part ned__input - [nylas-event-duration] The event duration input\n * @part ned__dropdown - [nylas-event-duration] The event duration dropdown\n * @part ned__dropdown-button - [nylas-event-duration] The event duration dropdown button\n * @part ned__dropdown-content - [nylas-event-duration] The event duration dropdown content\n * @part net - [nylas-event-title] The event title container\n * @part net__title - [nylas-event-title] The event title input\n * @part net__dropdown-content - [nylas-event-title] The token options container\n * @part nlfb - [nylas-limit-future-bookings] The limit future bookings container\n * @part nlfb__number-dropdown - [nylas-limit-future-bookings] The number dropdown container\n * @part nlfb__number-dropdown-button - [nylas-limit-future-bookings] The number dropdown button\n * @part nlfb__number-dropdown-content - [nylas-limit-future-bookings] The number dropdown content\n * @part nlfb__period-dropdown - [nylas-limit-future-bookings] The period dropdown container\n * @part nlfb__period-dropdown-button - [nylas-limit-future-bookings] The period dropdown button\n * @part nlfb__period-dropdown-content - [nylas-limit-future-bookings] The period dropdown content\n * @part nel - [nylas-location-component] The event location container\n * @part nel__location - [nylas-location-component] The event location input\n * @part nel__dropdown - [nylas-location-component] The dropdown container\n * @part nel__dropdown-button - [nylas-location-component] The dropdown button\n * @part nel__dropdown-content - [nylas-location-component] The dropdown content\n * @part nmcn - [nylas-min-cancellation-notice] The minimum cancellation notice container\n * @part nmcn__number-dropdown - [nylas-min-cancellation-notice] The number dropdown container\n * @part nmcn__number-dropdown-button - [nylas-min-cancellation-notice] The number dropdown button\n * @part nmcn__number-dropdown-content - [nylas-min-cancellation-notice] The number dropdown content\n * @part nmcn__period-dropdown - [nylas-min-cancellation-notice] The period dropdown container\n * @part nmcn__period-dropdown-button - [nylas-min-cancellation-notice] The period dropdown button\n * @part nmcn__period-dropdown-content - [nylas-min-cancellation-notice] The period dropdown content\n */\n@Component({\n tag: 'nylas-editor-tabs',\n styleUrl: 'nylas-editor-tabs.scss',\n scoped: true,\n})\nexport class NylasEditorTabs {\n private formRef!: HTMLFormElement;\n @Element() host!: HTMLNylasEditorTabsElement;\n @Prop() calendars?: Calendar[];\n @Prop() selectedConfiguration?: Configuration;\n @Prop() currentUser?: User;\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use a placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n @State() action: 'create' | 'edit' = 'create';\n @Prop() mode?: 'app' | 'composable' = 'app';\n @State() activeTab: string = 'eventInfo';\n @State() isLoading: boolean = false;\n @State() hasUnsavedChanges: boolean = false;\n @State() changesSaved: boolean = false;\n @State() formState: Partial<{\n title: string;\n description: string;\n duration: string;\n availability?: {\n timezone: string;\n openHours?: OpenHours[];\n };\n calendarIds: string[];\n participants?: any[];\n bookingCalendar?: string;\n location?: string;\n bookingType?: string;\n buffer?: { before: number; after: number };\n availableDaysInFuture?: number;\n minCancellationNotice?: number;\n }> = {};\n @State() error?: string = '';\n\n @Event() schedulerConfigChanged!: EventEmitter<SchedulerEventDetail>;\n\n /**\n * Event emitted when the user clicks the cancel button.\n */\n @Event() cancelButtonClick!: EventEmitter<void>;\n\n /**\n * Event emitted on form submission.\n */\n @Event() formSubmitted!: EventEmitter<void>;\n\n /**\n * Event emitted when the user clicks the cancel button.\n */\n @Event() previewButtonClicked!: EventEmitter<HTMLNylasEditorTabsElement>;\n\n @Watch('selectedConfiguration')\n configChangedHandler(newConfig: Configuration) {\n debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.selectedConfiguration);\n this.formState = {\n ...this.getFormStateFromConfig(newConfig),\n };\n\n if (newConfig.id) {\n this.action = 'edit';\n } else {\n this.action = 'create';\n }\n }\n\n connectedCallback() {\n debug('[nylas-editor-tabs]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-editor-tabs]', 'componentWillLoad');\n this.formState = this.getFormStateFromConfig(this.selectedConfiguration);\n }\n\n componentDidLoad() {\n debug('[nylas-editor-tabs]', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('[nylas-editor-tabs]', 'disconnectedCallback');\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n this.formState = { ...this.formState, [name]: value };\n this.hasUnsavedChanges = true;\n this.error = '';\n }\n\n getFormStateFromConfig(config?: Configuration) {\n const organizerParticipant = config?.participants?.find(p => p.is_organizer);\n return {\n title: config?.event_booking?.title ?? '',\n description: config?.event_booking?.description ?? '',\n duration: config?.availability?.duration_minutes?.toString() ?? '10',\n availability: {\n timezone: config?.event_booking?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,\n open_hours: organizerParticipant?.availability?.open_hours ?? undefined,\n },\n calendarIds: organizerParticipant?.availability?.calendar_ids ?? [],\n participants: config?.participants ?? [],\n bookingCalendar: organizerParticipant?.booking?.calendar_id ?? organizerParticipant?.email ?? '',\n location: this.selectedConfiguration?.event_booking?.location ?? '',\n bookingType: this.selectedConfiguration?.event_booking?.booking_type ?? 'booking',\n buffer: this.selectedConfiguration?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },\n availableDaysInFuture: this.selectedConfiguration?.scheduler?.available_days_in_future ?? 30,\n minCancellationNotice: this.selectedConfiguration?.scheduler?.min_cancellation_notice ?? 0,\n };\n }\n\n updateFormState() {\n const formData = new FormData(this.formRef);\n formData.forEach((value, key) => {\n switch (key) {\n case 'title':\n this.formState.title = value.toString();\n break;\n case 'description':\n this.formState.description = value.toString();\n break;\n case 'duration':\n this.formState.duration = value.toString();\n break;\n case 'availability':\n this.formState.availability = JSON.parse(value.toString());\n break;\n case 'participants':\n this.formState.participants = JSON.parse(value.toString());\n break;\n case 'calendars':\n this.formState.calendarIds = value.toString().split(',');\n break;\n case 'booking-calendar':\n this.formState.bookingCalendar = value.toString();\n break;\n case 'location':\n this.formState.location = value.toString();\n break;\n case 'booking-type':\n this.formState.bookingType = value.toString();\n break;\n case 'buffer-time':\n this.formState.buffer = JSON.parse(value.toString());\n break;\n case 'limit-future-bookings':\n this.formState.availableDaysInFuture = parseInt(value.toString());\n break;\n case 'min-cancellation-notice':\n this.formState.minCancellationNotice = parseInt(value.toString());\n break;\n }\n });\n\n this.formState = { ...this.formState };\n return this.formState;\n }\n\n setActiveTab(e: Event, tabName: string) {\n e.preventDefault();\n this.updateFormState();\n this.activeTab = tabName;\n }\n\n setError = (error: Error) => {\n this.error = error.message;\n };\n\n formSubmissionHandler = async (event: Event) => {\n event.preventDefault();\n this.formSubmitted.emit();\n const valid = this.formRef.checkValidity();\n if (!valid) {\n return;\n }\n this.isLoading = true;\n this.hasUnsavedChanges = false;\n const formState = this.updateFormState();\n const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } = formState;\n const organizer = this.selectedConfiguration?.participants?.find(p => p.is_organizer);\n const configObject: Partial<Configuration> = {\n ...this.selectedConfiguration,\n version: this.selectedConfiguration?.version ?? '1.0.0',\n availability: {\n duration_minutes: duration ? parseInt(duration) : 0,\n availability_rules: {\n availability_method: this.selectedConfiguration?.availability?.availability_rules?.availability_method ?? 'collective',\n buffer: buffer || { before: 0, after: 0 },\n default_open_hours: this.selectedConfiguration?.availability?.availability_rules?.default_open_hours ?? DEFAULT_OPEN_HOURS,\n round_robin_group_id: this.selectedConfiguration?.availability?.availability_rules?.round_robin_group_id ?? '',\n },\n },\n participants: [\n {\n name: organizer?.name ?? organizer?.email ?? this.currentUser?.name ?? this.currentUser?.email ?? '',\n email: organizer?.email ?? this.currentUser?.email ?? '',\n is_organizer: true,\n availability: {\n calendar_ids: calendarIds?.length ? calendarIds : ['primary'],\n open_hours: availability?.openHours ?? [],\n },\n booking: {\n calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',\n },\n },\n ],\n event_booking: {\n title: title?.toString() ?? '',\n description: description?.toString() ?? '',\n location: location?.toString() ?? '',\n booking_type: (bookingType?.toString() as BookingType) ?? 'booking',\n timezone: availability?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,\n },\n scheduler: {\n available_days_in_future: availableDaysInFuture ?? 30,\n min_cancellation_notice: minCancellationNotice ?? 0,\n },\n };\n const resetLoadingState = (_e: CustomEvent) => {\n this.isLoading = false;\n this.changesSaved = true;\n setTimeout(() => {\n this.changesSaved = false;\n }, 5000);\n };\n this.schedulerConfigChanged.emit({ config: configObject, resetLoadingState, setError: this.setError, action: this.action });\n };\n\n @RegisterComponent<NylasEditorTabs, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-editor-tabs',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ]),\n eventToProps: {\n schedulerConfigChanged: async (event: CustomEvent<SchedulerEventDetail>, nylasSchedulerConfigConnector: NylasSchedulerConfigConnector) => {\n const { resetLoadingState, setError, action, config } = event.detail;\n const checkForErrors = (response: DataResponseReturnType) => {\n const [data, error] = response;\n if (!data && error && setError) {\n setError(error as Error);\n }\n if (resetLoadingState) {\n resetLoadingState(event);\n }\n };\n\n // If we have an ID, we are updating an existing configuration\n if (action === 'edit') {\n const response = await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);\n checkForErrors(response);\n } else {\n const response = await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);\n checkForErrors(response);\n }\n },\n cancelButtonClick: async (_, nylasSchedulerConfigConnector) => {\n nylasSchedulerConfigConnector.schedulerConfigStore.state.action = null;\n },\n },\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n fireRegisterEvent: true,\n })\n render() {\n debug('[nylas-editor-tabs]', 'render', this.formState);\n return (\n <Host>\n <form onSubmit={this.formSubmissionHandler} class=\"scheduler-editor\" ref={el => (this.formRef = el as HTMLFormElement)} noValidate>\n {this.mode === 'app' ? (\n <div class=\"form-contents\">\n <div class=\"tabs\">\n <button class={{ tab: true, active: this.activeTab == 'eventInfo' }} onClick={e => this.setActiveTab(e, 'eventInfo')}>\n <calendar-info-icon width=\"16\" height=\"16\" />\n Event Info\n </button>\n <button class={{ tab: true, active: this.activeTab == 'availability' }} onClick={e => this.setActiveTab(e, 'availability')}>\n <calendar-patterns-icon width=\"16\" height=\"16\" />\n Availability\n </button>\n <button class={{ tab: true, active: this.activeTab == 'bookingOptions' }} onClick={e => this.setActiveTab(e, 'bookingOptions')}>\n <flow-icon width=\"16\" height=\"16\" />\n Booking Options\n </button>\n </div>\n <div class=\"tab-content\">\n <TabContents formState={this.formState} activeTab={this.activeTab} calendars={this.calendars} id={this.selectedConfiguration?.id ?? 'new'} />\n </div>\n </div>\n ) : (\n <slot></slot>\n )}\n\n <div class=\"footer\">\n <div class=\"preview\">\n {this.schedulerPreviewLink !== '' && this.action === 'edit' && (\n <button-component\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n const previewEvent = this.previewButtonClicked.emit(this.host);\n if (!previewEvent.defaultPrevented) {\n window.open(parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');\n }\n }}\n variant={'basic'}\n >\n Preview\n </button-component>\n )}\n </div>\n <div class=\"buttons\">\n <p\n class={{\n 'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,\n 'saved-changes': this.changesSaved,\n 'error': this.error !== '',\n 'error-full-width': this.error !== '' && this.action === 'create',\n }}\n >\n {this.error !== '' ? this.error : ''}\n {this.error == '' && this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.error == '' && this.changesSaved ? 'Changes saved!' : ''}\n </p>\n <button-component\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n this.cancelButtonClick.emit();\n this.error = '';\n }}\n variant={'basic'}\n >\n Cancel\n </button-component>\n <button-component type=\"submit\" disabled={this.isLoading}>\n {this.isLoading ? (\n <span>\n Saving\n <loading-icon />{' '}\n </span>\n ) : this.action == 'create' ? (\n 'Create'\n ) : (\n 'Save changes'\n )}\n </button-component>\n </div>\n </div>\n </form>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,9 +1,9 @@
1
1
  import { r as registerInstance, i as createEvent, h, a as Host, e as getElement } from './index-8362ce5c.js';
2
- import { R as RegisterComponent } from './register-component-0645dce0.js';
3
- import { d as debug } from './utils-3a8d433a.js';
2
+ import { R as RegisterComponent } from './register-component-e5afe237.js';
3
+ import { a as debug } from './utils-73d8a928.js';
4
4
  import './_commonjsHelpers-7c16df4a.js';
5
5
 
6
- const nylasEventDescriptionCss = ":host{--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}.nylas-event-description{display:flex;flex-direction:column;gap:4px}.nylas-event-description label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-description label span.label-icon{margin-left:4px}.nylas-event-description label span.label-icon tooltip-component{display:flex}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-event-description textarea::-webkit-resizer{display:none}";
6
+ const nylasEventDescriptionCss = ":host{--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}.nylas-event-description{display:flex;flex-direction:column;gap:4px}.nylas-event-description label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-description label span.label-icon{margin-left:4px}.nylas-event-description label span.label-icon tooltip-component{display:flex}.nylas-event-description textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-event-description textarea::-webkit-resizer{display:none}";
7
7
 
8
8
  var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
9
9
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -30,14 +30,21 @@ const NylasEventDescription = class {
30
30
  this.internals = hostRef.$hostElement$.attachInternals();
31
31
  hostRef.$hostElement$["s-ei"] = this.internals;
32
32
  }
33
+ this.selectedConfiguration = undefined;
33
34
  this.eventDescription = undefined;
34
- this.description = this.eventDescription ?? '';
35
+ this.description = this.eventDescription || this.selectedConfiguration?.event_booking?.description || '';
35
36
  this.name = 'description';
36
37
  }
37
38
  elementNameChangedHandler(newValue) {
38
39
  debug('nylas-event-description', 'elementNameChangedHandler', newValue);
39
40
  this.host.setAttribute('name', newValue);
40
41
  }
42
+ selectedConfigurationChangedHandler(newValue, oldValue) {
43
+ debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue, oldValue);
44
+ if (newValue?.event_booking?.description) {
45
+ this.description = newValue?.event_booking?.description;
46
+ }
47
+ }
41
48
  connectedCallback() {
42
49
  debug('nylas-event-description', 'connectedCallback');
43
50
  }
@@ -57,17 +64,19 @@ const NylasEventDescription = class {
57
64
  this.valueChanged.emit({ value: event.target.value, name: this.name });
58
65
  }
59
66
  render() {
60
- return (h(Host, { key: '5519bbdfdc7e253bf5b83c18decd714e54f58714' }, h("div", { key: '36541738e7d447cb6f9b3bf0f931c851efb0d8fe', class: "nylas-event-description", part: "nedesc" }, h("label", { key: 'c0eb70c7e36360844559e0fd0a451243fb6f5860', htmlFor: "description" }, "Event description", h("span", { key: '98c176eaa09ccdac28fbba62f67ceeb8a6fed751', class: "label-icon" }, h("tooltip-component", { key: '553ca988451d6053a8863a52cbcdcb12dd041362' }, h("info-icon", { key: '015507616ffc54352cbecc9766e59d0db4a25367', slot: "tooltip-icon" }), h("span", { key: '86efa5b15ae112f6f974ba32e8c138e2c906184f', slot: "tooltip-content" }, "Provide any additional details for your event.")))), h("textarea", { key: '619f982afa3f2af2794d93cc0df930db618a3e5e', id: "description", part: "nedesc__textarea", name: "description", value: this.description, maxlength: "8192", onInput: e => this.handleChange(e) }))));
67
+ return (h(Host, { key: '08b8a3b8865cc09c467b5b8abc36d2d0f7039fcd' }, h("div", { key: 'b906947588ca23a2edec4f31f04935cdc82bad96', class: "nylas-event-description", part: "nedesc" }, h("label", { key: '144ddfc7a8eb64434981122cc3df24dc89a00c63', htmlFor: "description" }, "Event description", h("span", { key: '6effc462e60a48b4eb55e325baf24f51f7c25854', class: "label-icon" }, h("tooltip-component", { key: 'ee1d7faad42bdae393e4a20b9ec499c217aa21fc' }, h("info-icon", { key: 'aecfd40dca5604d491e085be8fedb92e75276547', slot: "tooltip-icon" }), h("span", { key: 'ce7cfceffe163a4c231813ed85ff7ebc80c8515d', slot: "tooltip-content" }, "Provide any additional details for your event.")))), h("textarea", { key: '0445a874c8d219548447a56780e435b986e159bc', id: "description", part: "nedesc__textarea", name: "description", value: this.description, maxlength: "8192", onInput: e => this.handleChange(e) }))));
61
68
  }
62
69
  static get formAssociated() { return true; }
63
70
  get host() { return getElement(this); }
64
71
  static get watchers() { return {
65
- "name": ["elementNameChangedHandler"]
72
+ "name": ["elementNameChangedHandler"],
73
+ "selectedConfiguration": ["selectedConfigurationChangedHandler"]
66
74
  }; }
67
75
  };
68
76
  __decorate([
69
77
  RegisterComponent({
70
78
  name: 'nylas-event-description',
79
+ stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
71
80
  eventToProps: {},
72
81
  fireRegisterEvent: true,
73
82
  }),
@@ -1 +1 @@
1
- {"file":"nylas-event-description.entry.esm.js","mappings":";;;;;AAAA,MAAM,wBAAwB,GAAG,muCAAmuC;;;;;;;;;;;;;;;;MCiBvvC,qBAAqB;;;;;;;;;;;;2BAED,IAAI,CAAC,gBAAgB,IAAI,EAAE;oBAGnC,aAAa;;IAQpC,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,yBAAyB,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACxE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KAC1C;IAOD,iBAAiB;QACf,KAAK,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;KACvD;IAED,iBAAiB;QACf,KAAK,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;QACtD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;KAC3C;IAED,gBAAgB;QACd,KAAK,CAAC,yBAAyB,EAAE,kBAAkB,CAAC,CAAC;KACtD;IAED,oBAAoB;QAClB,KAAK,CAAC,yBAAyB,EAAE,sBAAsB,CAAC,CAAC;KAC1D;IAED,YAAY,CAAC,KAAK;QAChB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QACtC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;QAC/D,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;KACxE;IAOD,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,4DAAK,KAAK,EAAC,yBAAyB,EAAC,IAAI,EAAC,QAAQ,IAChD,8DAAO,OAAO,EAAC,aAAa,yBAE1B,6DAAM,KAAK,EAAC,YAAY,IACtB,4EACE,kEAAW,IAAI,EAAC,cAAc,GAAG,EACjC,6DAAM,IAAI,EAAC,iBAAiB,qDAAsD,CAChE,CACf,CACD,EACR,iEAAU,EAAE,EAAC,aAAa,EAAC,IAAI,EAAC,kBAAkB,EAAC,IAAI,EAAC,aAAa,EAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,EAAC,MAAM,EAAC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAa,CAC3J,CACD,EACP;KACH;;;;;;;AAjBD;IALC,iBAAiB,CAA2G;QAC3H,IAAI,EAAE,yBAAyB;QAC/B,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;mDAkBD;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-event-description/nylas-event-description.scss?tag=nylas-event-description&encapsulation=shadow","src/components/scheduler-editor/nylas-event-description/nylas-event-description.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-description {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n textarea {\n padding: 12px 16px;\n border-width: 1;\n resize: vertical;\n border-radius: 8px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n border: 1px solid var(--nylas-base-200);\n &::-webkit-resizer {\n display: none;\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, Host, State, h, Element, Prop, Watch, Event, EventEmitter } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\n/**\n * The `nylas-event-description` component is a form input for the description of an event.\n * @part nedesc - The event description container\n * @part nedesc__textarea - The event description textarea\n */\n@Component({\n tag: 'nylas-event-description',\n styleUrl: 'nylas-event-description.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventDescription {\n @Prop() eventDescription?: string;\n @State() description: string = this.eventDescription ?? '';\n @AttachInternals() internals!: ElementInternals;\n @Element() host!: HTMLElement;\n @Prop() name: string = 'description';\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-event-description', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-description', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-description', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-description', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('nylas-event-description', 'disconnectedCallback');\n }\n\n handleChange(event) {\n this.description = event.target.value;\n this.internals.setFormValue(event.target.value, 'description');\n this.valueChanged.emit({ value: event.target.value, name: this.name });\n }\n\n @RegisterComponent<NylasEventDescription, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-description',\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-description\" part=\"nedesc\">\n <label htmlFor=\"description\">\n Event description\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">Provide any additional details for your event.</span>\n </tooltip-component>\n </span>\n </label>\n <textarea id=\"description\" part=\"nedesc__textarea\" name=\"description\" value={this.description} maxlength=\"8192\" onInput={e => this.handleChange(e)}></textarea>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-event-description.entry.esm.js","mappings":";;;;;AAAA,MAAM,wBAAwB,GAAG,muCAAmuC;;;;;;;;;;;;;;;;MCkBvvC,qBAAqB;;;;;;;;;;;;;2BAOD,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,WAAW,IAAI,EAAE;oBAG7F,aAAa;;IAQpC,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,yBAAyB,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACxE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KAC1C;IAGD,mCAAmC,CAAC,QAAuB,EAAE,QAAuB;QAClF,KAAK,CAAC,2BAA2B,EAAE,qCAAqC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC9F,IAAI,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE;YACxC,IAAI,CAAC,WAAW,GAAG,QAAQ,EAAE,aAAa,EAAE,WAAW,CAAC;SACzD;KACF;IAMD,iBAAiB;QACf,KAAK,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;KACvD;IAED,iBAAiB;QACf,KAAK,CAAC,yBAAyB,EAAE,mBAAmB,CAA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C3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;mDAkBD;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-event-description/nylas-event-description.scss?tag=nylas-event-description&encapsulation=shadow","src/components/scheduler-editor/nylas-event-description/nylas-event-description.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-description {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n textarea {\n padding: 12px 16px;\n border-width: 1;\n resize: vertical;\n border-radius: 8px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n border: 1px solid var(--nylas-base-200);\n &::-webkit-resizer {\n display: none;\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, Host, State, h, Element, Prop, Watch, Event, EventEmitter } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\n\n/**\n * The `nylas-event-description` component is a form input for the description of an event.\n * @part nedesc - The event description container\n * @part nedesc__textarea - The event description textarea\n */\n@Component({\n tag: 'nylas-event-description',\n styleUrl: 'nylas-event-description.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventDescription {\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n @Prop() eventDescription?: string;\n @State() description: string = this.eventDescription || this.selectedConfiguration?.event_booking?.description || '';\n @AttachInternals() internals!: ElementInternals;\n @Element() host!: HTMLElement;\n @Prop() name: string = 'description';\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-event-description', '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?.description) {\n this.description = newValue?.event_booking?.description;\n }\n }\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-description', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-description', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-description', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('nylas-event-description', 'disconnectedCallback');\n }\n\n handleChange(event) {\n this.description = event.target.value;\n this.internals.setFormValue(event.target.value, 'description');\n this.valueChanged.emit({ value: event.target.value, name: this.name });\n }\n\n @RegisterComponent<NylasEventDescription, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-description',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-description\" part=\"nedesc\">\n <label htmlFor=\"description\">\n Event description\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">Provide any additional details for your event.</span>\n </tooltip-component>\n </span>\n </label>\n <textarea id=\"description\" part=\"nedesc__textarea\" name=\"description\" value={this.description} maxlength=\"8192\" onInput={e => this.handleChange(e)}></textarea>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}