@nylas/web-elements 0.0.0-canary-20241008193213 → 0.0.0-canary-20241015194719

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 (813) hide show
  1. package/dist/cdn/add-circle/add-circle.es.js +1 -1
  2. package/dist/cdn/add-circle-icon/add-circle-icon.es.js +1 -1
  3. package/dist/cdn/archive-icon/archive-icon.es.js +127 -127
  4. package/dist/cdn/arrow-icon/arrow-icon.es.js +248 -248
  5. package/dist/cdn/bold-icon/bold-icon.es.js +1 -1
  6. package/dist/cdn/button-component/button-component.es.js +2 -2
  7. package/dist/cdn/calendar/calendar.es.js +77 -77
  8. package/dist/cdn/calendar-agenda/calendar-agenda.es.js +1 -1
  9. package/dist/cdn/calendar-agenda-fill/calendar-agenda-fill.es.js +1 -1
  10. package/dist/cdn/calendar-agenda-fill-icon/calendar-agenda-fill-icon.es.js +1 -1
  11. package/dist/cdn/calendar-agenda-icon/calendar-agenda-icon.es.js +1 -1
  12. package/dist/cdn/calendar-cancel/calendar-cancel.es.js +1 -1
  13. package/dist/cdn/calendar-cancel-icon/calendar-cancel-icon.es.js +1 -1
  14. package/dist/cdn/calendar-check/calendar-check.es.js +139 -139
  15. package/dist/cdn/calendar-check-icon/calendar-check-icon.es.js +14 -14
  16. package/dist/cdn/calendar-icon/calendar-icon.es.js +24 -24
  17. package/dist/cdn/calendar-info/calendar-info.es.js +1 -1
  18. package/dist/cdn/calendar-info-icon/calendar-info-icon.es.js +1 -1
  19. package/dist/cdn/calendar-patterns/calendar-patterns.es.js +1 -1
  20. package/dist/cdn/calendar-patterns-icon/calendar-patterns-icon.es.js +1 -1
  21. package/dist/cdn/checkbox-component/checkbox-component.es.js +1 -1
  22. package/dist/cdn/checkmark/checkmark.es.js +86 -86
  23. package/dist/cdn/checkmark-circle/checkmark-circle.es.js +99 -99
  24. package/dist/cdn/checkmark-circle-icon/checkmark-circle-icon.es.js +14 -14
  25. package/dist/cdn/checkmark-icon/checkmark-icon.es.js +1 -1
  26. package/dist/cdn/chevron/chevron.es.js +16 -16
  27. package/dist/cdn/chevron-icon/chevron-icon.es.js +14 -14
  28. package/dist/cdn/clock/clock.es.js +16 -16
  29. package/dist/cdn/clock-icon/clock-icon.es.js +14 -14
  30. package/dist/cdn/close/close.es.js +1 -1
  31. package/dist/cdn/close-icon/close-icon.es.js +54 -54
  32. package/dist/cdn/constants/constants.es.js +3 -3
  33. package/dist/cdn/copy/copy.es.js +239 -239
  34. package/dist/cdn/copy-icon/copy-icon.es.js +271 -271
  35. package/dist/cdn/delete/delete.es.js +1 -1
  36. package/dist/cdn/delete-icon/delete-icon.es.js +1 -1
  37. package/dist/cdn/document-refresh-icon/document-refresh-icon.es.js +1 -1
  38. package/dist/cdn/dragable/dragable.es.js +54 -54
  39. package/dist/cdn/dragable-icon/dragable-icon.es.js +1 -1
  40. package/dist/cdn/edit/edit.es.js +1 -1
  41. package/dist/cdn/edit-icon/edit-icon.es.js +1 -1
  42. package/dist/cdn/envelope/envelope.es.js +25 -25
  43. package/dist/cdn/envelope-fill/envelope-fill.es.js +16 -16
  44. package/dist/cdn/envelope-fill-icon/envelope-fill-icon.es.js +97 -97
  45. package/dist/cdn/envelope-icon/envelope-icon.es.js +24 -24
  46. package/dist/cdn/eye/eye.es.js +1 -1
  47. package/dist/cdn/eye-icon/eye-icon.es.js +1 -1
  48. package/dist/cdn/feedback-icon/feedback-icon.es.js +86 -86
  49. package/dist/cdn/flow/flow.es.js +1 -1
  50. package/dist/cdn/flow-icon/flow-icon.es.js +1 -1
  51. package/dist/cdn/folder-icon/folder-icon.es.js +14 -14
  52. package/dist/cdn/forward-icon/forward-icon.es.js +240 -240
  53. package/dist/cdn/globe/globe.es.js +1 -1
  54. package/dist/cdn/globe-icon/globe-icon.es.js +1 -1
  55. package/dist/cdn/google-logo/google-logo.es.js +1 -1
  56. package/dist/cdn/google-logo-icon/google-logo-icon.es.js +1 -1
  57. package/dist/cdn/google-meet/google-meet.es.js +15 -15
  58. package/dist/cdn/google-meet-icon/google-meet-icon.es.js +1 -1
  59. package/dist/cdn/inbox-icon/inbox-icon.es.js +1 -1
  60. package/dist/cdn/info/info.es.js +239 -239
  61. package/dist/cdn/info-icon/info-icon.es.js +240 -240
  62. package/dist/cdn/input-color-picker/input-color-picker.es.js +3 -3
  63. package/dist/cdn/input-component/input-component.es.js +1 -1
  64. package/dist/cdn/input-dropdown/input-dropdown.es.js +1 -1
  65. package/dist/cdn/input-image-url/input-image-url.es.js +2 -2
  66. package/dist/cdn/italic-icon/italic-icon.es.js +86 -86
  67. package/dist/cdn/loading/loading.es.js +270 -270
  68. package/dist/cdn/loading-icon/loading-icon.es.js +271 -271
  69. package/dist/cdn/location/location.es.js +100 -100
  70. package/dist/cdn/location-icon/location-icon.es.js +19 -19
  71. package/dist/cdn/location-off/location-off.es.js +86 -86
  72. package/dist/cdn/location-off-icon/location-off-icon.es.js +1 -1
  73. package/dist/cdn/microsof-teams/microsof-teams.es.js +96 -96
  74. package/dist/cdn/microsoft-logo/microsoft-logo.es.js +1 -1
  75. package/dist/cdn/microsoft-logo-icon/microsoft-logo-icon.es.js +1 -1
  76. package/dist/cdn/microsoft-teams-icon/microsoft-teams-icon.es.js +97 -97
  77. package/dist/cdn/multi-select-dropdown/multi-select-dropdown.es.js +3 -3
  78. package/dist/cdn/nylas-additional-participants/nylas-additional-participants.es.js +12 -12
  79. package/dist/cdn/nylas-availability-picker/nylas-availability-picker.es.js +15 -15
  80. package/dist/cdn/nylas-booked-event-card/nylas-booked-event-card.es.js +10 -10
  81. package/dist/cdn/nylas-booking-calendar-picker/nylas-booking-calendar-picker.es.js +5 -5
  82. package/dist/cdn/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.es.js +7 -7
  83. package/dist/cdn/nylas-booking-confirmation-type/nylas-booking-confirmation-type.es.js +733 -734
  84. package/dist/cdn/nylas-booking-form/nylas-booking-form.es.js +154 -151
  85. package/dist/cdn/nylas-booking-form-config/nylas-booking-form-config.es.js +9 -9
  86. package/dist/cdn/nylas-buffer-time/nylas-buffer-time.es.js +5 -5
  87. package/dist/cdn/nylas-calendar-picker/nylas-calendar-picker.es.js +7 -7
  88. package/dist/cdn/nylas-cancel-booking-form/nylas-cancel-booking-form.es.js +10 -10
  89. package/dist/cdn/nylas-cancellation-policy/nylas-cancellation-policy.es.js +3 -3
  90. package/dist/cdn/nylas-cancelled-event-card/nylas-cancelled-event-card.es.js +7 -7
  91. package/dist/cdn/nylas-confirmation-email/nylas-confirmation-email.es.js +15 -15
  92. package/dist/cdn/nylas-confirmed-event-card/nylas-confirmed-event-card.es.js +723 -723
  93. package/dist/cdn/nylas-connected-calendars/nylas-connected-calendars.es.js +179 -179
  94. package/dist/cdn/nylas-custom-booking-flow/nylas-custom-booking-flow.es.js +2 -2
  95. package/dist/cdn/nylas-custom-event-slug/nylas-custom-event-slug.es.js +7 -7
  96. package/dist/cdn/nylas-customize-booking-settings/nylas-customize-booking-settings.es.js +147 -147
  97. package/dist/cdn/nylas-date-picker/nylas-date-picker.es.js +7 -7
  98. package/dist/cdn/nylas-editor-tabs/nylas-editor-tabs.es.js +6323 -5910
  99. package/dist/cdn/nylas-event-description/nylas-event-description.es.js +3 -3
  100. package/dist/cdn/nylas-event-duration/nylas-event-duration.es.js +5 -5
  101. package/dist/cdn/nylas-event-info/nylas-event-info.es.js +2 -2
  102. package/dist/cdn/nylas-event-limits/nylas-event-limits.es.js +2 -2
  103. package/dist/cdn/nylas-event-location/nylas-event-location.es.js +2558 -2533
  104. package/dist/cdn/nylas-event-title/nylas-event-title.es.js +10 -5
  105. package/dist/cdn/nylas-feedback-form/nylas-feedback-form.es.js +8 -8
  106. package/dist/cdn/nylas-form-card/nylas-form-card.es.js +1 -1
  107. package/dist/cdn/nylas-if-state/nylas-if-state.es.js +1 -1
  108. package/dist/cdn/nylas-limit-future-bookings/nylas-limit-future-bookings.es.js +8 -8
  109. package/dist/cdn/nylas-list-configurations/nylas-list-configurations.es.js +21 -17
  110. package/dist/cdn/nylas-locale-switch/nylas-locale-switch.es.js +1168 -1168
  111. package/dist/cdn/nylas-login/nylas-login.es.js +1 -1
  112. package/dist/cdn/nylas-logo/nylas-logo.es.js +125 -125
  113. package/dist/cdn/nylas-min-booking-notice/nylas-min-booking-notice.es.js +10 -10
  114. package/dist/cdn/nylas-min-cancellation-notice/nylas-min-cancellation-notice.es.js +10 -10
  115. package/dist/cdn/nylas-notification/nylas-notification.es.js +3 -3
  116. package/dist/cdn/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.es.js +6 -6
  117. package/dist/cdn/nylas-page-name/nylas-page-name.es.js +7 -7
  118. package/dist/cdn/nylas-page-styling/nylas-page-styling.es.js +4 -4
  119. package/dist/cdn/nylas-participant-booking-calendars/nylas-participant-booking-calendars.es.js +8 -8
  120. package/dist/cdn/nylas-participants-custom-availability/nylas-participants-custom-availability.es.js +176 -176
  121. package/dist/cdn/nylas-provider/nylas-provider.es.js +652 -644
  122. package/dist/cdn/nylas-reminder-emails/nylas-reminder-emails.es.js +17 -17
  123. package/dist/cdn/nylas-reminder-time/nylas-reminder-time.es.js +5 -5
  124. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +1364 -937
  125. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1077 -1053
  126. package/dist/cdn/nylas-scheduling-method/nylas-scheduling-method.es.js +10 -12
  127. package/dist/cdn/nylas-selected-event-card/nylas-selected-event-card.es.js +4 -4
  128. package/dist/cdn/nylas-time-window-picker/nylas-time-window-picker.es.js +1 -1
  129. package/dist/cdn/nylas-timeslot-interval/nylas-timeslot-interval.es.js +147 -149
  130. package/dist/cdn/nylas-timeslot-picker/nylas-timeslot-picker.es.js +6 -6
  131. package/dist/cdn/paintbrush/paintbrush.es.js +239 -239
  132. package/dist/cdn/paintbrush-fill/paintbrush-fill.es.js +1 -1
  133. package/dist/cdn/paintbrush-fill-icon/paintbrush-fill-icon.es.js +1 -1
  134. package/dist/cdn/paintbrush-icon/paintbrush-icon.es.js +240 -240
  135. package/dist/cdn/people/people.es.js +1 -1
  136. package/dist/cdn/people-icon/people-icon.es.js +1 -1
  137. package/dist/cdn/person/person.es.js +1 -1
  138. package/dist/cdn/person-clipboard/person-clipboard.es.js +1 -1
  139. package/dist/cdn/person-clipboard-icon/person-clipboard-icon.es.js +1 -1
  140. package/dist/cdn/person-icon/person-icon.es.js +1 -1
  141. package/dist/cdn/play-icon/play-icon.es.js +248 -248
  142. package/dist/cdn/plus/plus.es.js +16 -16
  143. package/dist/cdn/plus-icon/plus-icon.es.js +14 -14
  144. package/dist/cdn/radio-button-group/radio-button-group.es.js +1 -1
  145. package/dist/cdn/refresh-icon/refresh-icon.es.js +14 -14
  146. package/dist/cdn/reply-all-icon/reply-all-icon.es.js +14 -14
  147. package/dist/cdn/reply-icon/reply-icon.es.js +14 -14
  148. package/dist/cdn/scheduler-store/scheduler-store.es.js +654 -646
  149. package/dist/cdn/search/search.es.js +1 -1
  150. package/dist/cdn/search-icon/search-icon.es.js +86 -86
  151. package/dist/cdn/select-dropdown/select-dropdown.es.js +3 -3
  152. package/dist/cdn/sent-icon/sent-icon.es.js +1 -1
  153. package/dist/cdn/spam-icon/spam-icon.es.js +86 -86
  154. package/dist/cdn/star-icon/star-icon.es.js +1 -1
  155. package/dist/cdn/stop-icon/stop-icon.es.js +1 -1
  156. package/dist/cdn/textarea-component/textarea-component.es.js +3 -3
  157. package/dist/cdn/time-period-selector/time-period-selector.es.js +230 -230
  158. package/dist/cdn/toggle-switch/toggle-switch.es.js +1 -1
  159. package/dist/cdn/toolitp-component/toolitp-component.es.js +23 -23
  160. package/dist/cdn/tooltip-component/tooltip-component.es.js +26 -26
  161. package/dist/cdn/translate/translate.es.js +246 -246
  162. package/dist/cdn/translate-icon/translate-icon.es.js +247 -247
  163. package/dist/cdn/trash/trash.es.js +1 -1
  164. package/dist/cdn/trash-fill-icon/trash-fill-icon.es.js +14 -14
  165. package/dist/cdn/trash-icon/trash-icon.es.js +1 -1
  166. package/dist/cdn/underline-icon/underline-icon.es.js +1 -1
  167. package/dist/cdn/warning/warning.es.js +247 -247
  168. package/dist/cdn/warning-icon/warning-icon.es.js +248 -248
  169. package/dist/cdn/zoom/zoom.es.js +1 -1
  170. package/dist/cdn/zoom-icon/zoom-icon.es.js +1 -1
  171. package/dist/cjs/add-circle-icon_2.cjs.entry.js +2 -2
  172. package/dist/cjs/archive-icon.cjs.entry.js +1 -1
  173. package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
  174. package/dist/cjs/bold-icon.cjs.entry.js +1 -1
  175. package/dist/cjs/button-component_2.cjs.entry.js +2 -2
  176. package/dist/cjs/{calendar-agenda-fill-icon_51.cjs.entry.js → calendar-agenda-fill-icon_54.cjs.entry.js} +703 -304
  177. package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js.map +1 -0
  178. package/dist/cjs/calendar-cancel-icon.cjs.entry.js +1 -1
  179. package/dist/cjs/calendar-check-icon_2.cjs.entry.js +2 -2
  180. package/dist/cjs/calendar-icon.cjs.entry.js +1 -1
  181. package/dist/cjs/checkbox-component_2.cjs.entry.js +2 -2
  182. package/dist/cjs/chevron-icon_3.cjs.entry.js +3 -3
  183. package/dist/cjs/clock-icon_4.cjs.entry.js +4 -4
  184. package/dist/cjs/copy-icon.cjs.entry.js +1 -1
  185. package/dist/cjs/delete-icon.cjs.entry.js +1 -1
  186. package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
  187. package/dist/cjs/folder-icon.cjs.entry.js +1 -1
  188. package/dist/cjs/forward-icon.cjs.entry.js +1 -1
  189. package/dist/cjs/globe-icon.cjs.entry.js +1 -1
  190. package/dist/cjs/google-logo-icon_4.cjs.entry.js +34 -23
  191. package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
  192. package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
  193. package/dist/cjs/index-7af03e3f.js +2 -10
  194. package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
  195. package/dist/cjs/input-color-picker.cjs.entry.js +2 -2
  196. package/dist/cjs/input-component.cjs.entry.js +1 -1
  197. package/dist/cjs/input-dropdown.cjs.entry.js +1 -1
  198. package/dist/cjs/italic-icon.cjs.entry.js +1 -1
  199. package/dist/cjs/loader.cjs.js +1 -1
  200. package/dist/cjs/multi-select-dropdown.cjs.entry.js +1 -1
  201. package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +33 -32
  202. package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js.map +1 -1
  203. package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
  204. package/dist/cjs/nylas-if-state.cjs.entry.js +1 -1
  205. package/dist/cjs/nylas-login.cjs.entry.js +1 -1
  206. package/dist/cjs/nylas-provider.cjs.entry.js +2 -2
  207. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
  208. package/dist/cjs/nylas-scheduling.cjs.entry.js +22 -9
  209. package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
  210. package/dist/cjs/nylas-time-window-picker.cjs.entry.js +1 -1
  211. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  212. package/dist/cjs/person-icon.cjs.entry.js +1 -1
  213. package/dist/cjs/play-icon.cjs.entry.js +1 -1
  214. package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
  215. package/dist/cjs/reply-all-icon.cjs.entry.js +1 -1
  216. package/dist/cjs/reply-icon.cjs.entry.js +1 -1
  217. package/dist/cjs/{scheduler-store-4489a68b.js → scheduler-store-e3ddffc1.js} +13 -4
  218. package/dist/cjs/scheduler-store-e3ddffc1.js.map +1 -0
  219. package/dist/cjs/sent-icon.cjs.entry.js +1 -1
  220. package/dist/cjs/spam-icon.cjs.entry.js +1 -1
  221. package/dist/cjs/star-icon.cjs.entry.js +1 -1
  222. package/dist/cjs/stop-icon.cjs.entry.js +1 -1
  223. package/dist/cjs/textarea-component.cjs.entry.js +1 -1
  224. package/dist/cjs/time-period-selector.cjs.entry.js +1 -1
  225. package/dist/cjs/translate-icon.cjs.entry.js +1 -1
  226. package/dist/cjs/trash-fill-icon.cjs.entry.js +1 -1
  227. package/dist/cjs/underline-icon.cjs.entry.js +1 -1
  228. package/dist/cjs/warning-icon.cjs.entry.js +1 -1
  229. package/dist/collection/common/icons/add-circle.js +1 -1
  230. package/dist/collection/common/icons/archive.js +1 -1
  231. package/dist/collection/common/icons/arrow.js +1 -1
  232. package/dist/collection/common/icons/bold.js +1 -1
  233. package/dist/collection/common/icons/calendar-agenda-fill.js +1 -1
  234. package/dist/collection/common/icons/calendar-agenda.js +1 -1
  235. package/dist/collection/common/icons/calendar-cancel.js +1 -1
  236. package/dist/collection/common/icons/calendar-check.js +1 -1
  237. package/dist/collection/common/icons/calendar-info.js +1 -1
  238. package/dist/collection/common/icons/calendar-patterns.js +1 -1
  239. package/dist/collection/common/icons/calendar.js +1 -1
  240. package/dist/collection/common/icons/checkmark-circle.js +1 -1
  241. package/dist/collection/common/icons/checkmark.js +1 -1
  242. package/dist/collection/common/icons/chevron.js +1 -1
  243. package/dist/collection/common/icons/clock.js +1 -1
  244. package/dist/collection/common/icons/close.js +1 -1
  245. package/dist/collection/common/icons/copy.js +1 -1
  246. package/dist/collection/common/icons/delete.js +1 -1
  247. package/dist/collection/common/icons/document-refresh.js +1 -1
  248. package/dist/collection/common/icons/dragable.js +1 -1
  249. package/dist/collection/common/icons/edit.js +1 -1
  250. package/dist/collection/common/icons/envelope-fill.js +1 -1
  251. package/dist/collection/common/icons/envelope.js +1 -1
  252. package/dist/collection/common/icons/eye.js +1 -1
  253. package/dist/collection/common/icons/feedback-icon.js +1 -1
  254. package/dist/collection/common/icons/flow.js +1 -1
  255. package/dist/collection/common/icons/folder.js +1 -1
  256. package/dist/collection/common/icons/forward.js +1 -1
  257. package/dist/collection/common/icons/globe.js +1 -1
  258. package/dist/collection/common/icons/google-logo.js +1 -1
  259. package/dist/collection/common/icons/google-meet.js +1 -1
  260. package/dist/collection/common/icons/inbox.js +1 -1
  261. package/dist/collection/common/icons/info.js +1 -1
  262. package/dist/collection/common/icons/italic.js +1 -1
  263. package/dist/collection/common/icons/loading.js +1 -1
  264. package/dist/collection/common/icons/location-off.js +1 -1
  265. package/dist/collection/common/icons/location.js +1 -1
  266. package/dist/collection/common/icons/microsof-teams.js +1 -1
  267. package/dist/collection/common/icons/microsoft-logo.js +1 -1
  268. package/dist/collection/common/icons/nylas-logo.js +1 -1
  269. package/dist/collection/common/icons/paintbrush-fill.js +1 -1
  270. package/dist/collection/common/icons/paintbrush.js +1 -1
  271. package/dist/collection/common/icons/people.js +1 -1
  272. package/dist/collection/common/icons/person-clipboard.js +1 -1
  273. package/dist/collection/common/icons/person.js +1 -1
  274. package/dist/collection/common/icons/play.js +1 -1
  275. package/dist/collection/common/icons/plus.js +1 -1
  276. package/dist/collection/common/icons/refresh.js +1 -1
  277. package/dist/collection/common/icons/reply-all.js +1 -1
  278. package/dist/collection/common/icons/reply.js +1 -1
  279. package/dist/collection/common/icons/search.js +1 -1
  280. package/dist/collection/common/icons/sent.js +1 -1
  281. package/dist/collection/common/icons/spam.js +1 -1
  282. package/dist/collection/common/icons/star.js +1 -1
  283. package/dist/collection/common/icons/stop.js +1 -1
  284. package/dist/collection/common/icons/translate.js +1 -1
  285. package/dist/collection/common/icons/trash-fill.js +1 -1
  286. package/dist/collection/common/icons/trash.js +1 -1
  287. package/dist/collection/common/icons/underline.js +1 -1
  288. package/dist/collection/common/icons/warning.js +1 -1
  289. package/dist/collection/common/icons/zoom.js +1 -1
  290. package/dist/collection/common/types.js.map +1 -1
  291. package/dist/collection/components/design-system/button-component/button-component.js +1 -1
  292. package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +1 -1
  293. package/dist/collection/components/design-system/input-color-picker/input-color-picker.js +2 -2
  294. package/dist/collection/components/design-system/input-component/input-component.js +1 -1
  295. package/dist/collection/components/design-system/input-dropdown/input-dropdown.js +1 -1
  296. package/dist/collection/components/design-system/input-image-url/input-image-url.js +1 -1
  297. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +1 -1
  298. package/dist/collection/components/design-system/radio-button-group/radio-button-group.js +1 -1
  299. package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +1 -1
  300. package/dist/collection/components/design-system/textarea-component/textarea-component.js +1 -1
  301. package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
  302. package/dist/collection/components/design-system/toggle-switch/toggle-switch.js +1 -1
  303. package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
  304. package/dist/collection/components/nylas-if-state/nylas-if-state.js +1 -1
  305. package/dist/collection/components/nylas-login/nylas-login.js +1 -1
  306. package/dist/collection/components/nylas-provider/nylas-provider.js +1 -1
  307. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.css +23 -0
  308. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +66 -51
  309. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
  310. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.css +23 -0
  311. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +35 -24
  312. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
  313. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.css +23 -0
  314. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +38 -29
  315. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js.map +1 -1
  316. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.css +23 -0
  317. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +26 -23
  318. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js.map +1 -1
  319. package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js +26 -23
  320. package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js.map +1 -1
  321. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.css +23 -0
  322. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +26 -20
  323. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
  324. package/dist/collection/components/scheduler/nylas-feedback-form/nylas-feedback-form.js +2 -2
  325. package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.css +23 -0
  326. package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
  327. package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js +29 -23
  328. package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js.map +1 -1
  329. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +24 -10
  330. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
  331. package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js +143 -0
  332. package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js.map +1 -1
  333. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.css +23 -0
  334. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +3 -3
  335. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js.map +1 -1
  336. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +23 -0
  337. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +48 -42
  338. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
  339. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +56 -41
  340. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
  341. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +44 -28
  342. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
  343. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +25 -10
  344. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
  345. package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js +21 -9
  346. package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js.map +1 -1
  347. package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.js +19 -10
  348. package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.js.map +1 -1
  349. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +6 -3
  350. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js.map +1 -1
  351. package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js +10 -4
  352. package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js.map +1 -1
  353. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +45 -33
  354. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
  355. package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.css +2 -1
  356. package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js +16 -7
  357. package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js.map +1 -1
  358. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js +8 -4
  359. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js.map +1 -1
  360. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js +26 -10
  361. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js.map +1 -1
  362. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +1 -1
  363. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js.map +1 -1
  364. package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js +1 -0
  365. package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js.map +1 -1
  366. package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js +17 -11
  367. package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js.map +1 -1
  368. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +62 -28
  369. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  370. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +1 -1
  371. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
  372. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/test/nylas-editor-tabs.spec.js +171 -1
  373. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/test/nylas-editor-tabs.spec.js.map +1 -1
  374. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +16 -7
  375. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
  376. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +16 -7
  377. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
  378. package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
  379. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
  380. package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +74 -29
  381. package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js.map +1 -1
  382. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +25 -11
  383. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
  384. package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
  385. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +16 -7
  386. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
  387. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +2 -2
  388. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
  389. package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js +32 -23
  390. package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js.map +1 -1
  391. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +32 -23
  392. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
  393. package/dist/collection/components/scheduler-editor/nylas-page-name/nylas-page-name.js +43 -28
  394. package/dist/collection/components/scheduler-editor/nylas-page-name/nylas-page-name.js.map +1 -1
  395. package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js +38 -26
  396. package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js.map +1 -1
  397. package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js +31 -12
  398. package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js.map +1 -1
  399. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +18 -8
  400. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
  401. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-participants-custom-availability.spec.js +47 -0
  402. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-participants-custom-availability.spec.js.map +1 -0
  403. package/dist/collection/components/scheduler-editor/nylas-reminder-emails/nylas-reminder-emails.js +3 -3
  404. package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js +1 -1
  405. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +1 -1
  406. package/dist/collection/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.js +34 -27
  407. package/dist/collection/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.js.map +1 -1
  408. package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
  409. package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +18 -53
  410. package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js.map +1 -1
  411. package/dist/collection/connector/shared/api/scheduler.js +12 -3
  412. package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
  413. package/dist/collection/types/index.js +7 -6
  414. package/dist/collection/types/index.js.map +1 -1
  415. package/dist/collection/utils/test-utils.js +9 -0
  416. package/dist/collection/utils/test-utils.js.map +1 -1
  417. package/dist/components/add-circle.js +1 -1
  418. package/dist/components/archive-icon.js +1 -1
  419. package/dist/components/arrow-icon.js +1 -1
  420. package/dist/components/bold-icon.js +1 -1
  421. package/dist/components/button-component2.js +1 -1
  422. package/dist/components/calendar-agenda-fill.js +1 -1
  423. package/dist/components/calendar-agenda.js +1 -1
  424. package/dist/components/calendar-cancel.js +1 -1
  425. package/dist/components/calendar-check.js +1 -1
  426. package/dist/components/calendar-info.js +1 -1
  427. package/dist/components/calendar-patterns.js +1 -1
  428. package/dist/components/calendar.js +1 -1
  429. package/dist/components/checkbox-component2.js +1 -1
  430. package/dist/components/checkmark-circle.js +1 -1
  431. package/dist/components/checkmark.js +1 -1
  432. package/dist/components/chevron.js +1 -1
  433. package/dist/components/clock.js +1 -1
  434. package/dist/components/close.js +1 -1
  435. package/dist/components/constants.js +1 -1
  436. package/dist/components/copy.js +1 -1
  437. package/dist/components/delete.js +1 -1
  438. package/dist/components/document-refresh-icon.js +1 -1
  439. package/dist/components/dragable.js +1 -1
  440. package/dist/components/edit.js +1 -1
  441. package/dist/components/envelope-fill.js +1 -1
  442. package/dist/components/envelope.js +1 -1
  443. package/dist/components/eye.js +1 -1
  444. package/dist/components/feedback-icon2.js +1 -1
  445. package/dist/components/flow.js +1 -1
  446. package/dist/components/folder-icon.js +1 -1
  447. package/dist/components/forward-icon.js +1 -1
  448. package/dist/components/globe.js +1 -1
  449. package/dist/components/google-logo.js +1 -1
  450. package/dist/components/google-meet.js +1 -1
  451. package/dist/components/inbox-icon.js +1 -1
  452. package/dist/components/info.js +1 -1
  453. package/dist/components/input-color-picker.js +2 -2
  454. package/dist/components/input-component2.js +1 -1
  455. package/dist/components/input-dropdown2.js +1 -1
  456. package/dist/components/input-image-url2.js +1 -1
  457. package/dist/components/italic-icon.js +1 -1
  458. package/dist/components/loading.js +1 -1
  459. package/dist/components/location-off.js +1 -1
  460. package/dist/components/location.js +1 -1
  461. package/dist/components/microsof-teams.js +1 -1
  462. package/dist/components/microsoft-logo.js +1 -1
  463. package/dist/components/multi-select-dropdown2.js +1 -1
  464. package/dist/components/nylas-additional-participants2.js +6 -6
  465. package/dist/components/nylas-additional-participants2.js.map +1 -1
  466. package/dist/components/nylas-availability-picker2.js +5 -4
  467. package/dist/components/nylas-availability-picker2.js.map +1 -1
  468. package/dist/components/nylas-booked-event-card2.js +8 -8
  469. package/dist/components/nylas-booked-event-card2.js.map +1 -1
  470. package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
  471. package/dist/components/nylas-booking-confirmation-redirect2.js +1 -1
  472. package/dist/components/nylas-booking-confirmation-redirect2.js.map +1 -1
  473. package/dist/components/nylas-booking-confirmation-type2.js +2 -2
  474. package/dist/components/nylas-booking-confirmation-type2.js.map +1 -1
  475. package/dist/components/nylas-booking-form-config2.js +1 -1
  476. package/dist/components/nylas-booking-form-config2.js.map +1 -1
  477. package/dist/components/nylas-booking-form2.js +6 -5
  478. package/dist/components/nylas-booking-form2.js.map +1 -1
  479. package/dist/components/nylas-buffer-time2.js.map +1 -1
  480. package/dist/components/nylas-calendar-picker2.js +4 -4
  481. package/dist/components/nylas-calendar-picker2.js.map +1 -1
  482. package/dist/components/nylas-cancel-booking-form2.js +4 -4
  483. package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
  484. package/dist/components/nylas-cancellation-policy2.js +1 -1
  485. package/dist/components/nylas-cancellation-policy2.js.map +1 -1
  486. package/dist/components/nylas-cancelled-event-card2.js +4 -4
  487. package/dist/components/nylas-cancelled-event-card2.js.map +1 -1
  488. package/dist/components/nylas-confirmation-email2.js +3 -2
  489. package/dist/components/nylas-confirmation-email2.js.map +1 -1
  490. package/dist/components/nylas-confirmed-event-card2.js +3 -3
  491. package/dist/components/nylas-confirmed-event-card2.js.map +1 -1
  492. package/dist/components/nylas-connected-calendars2.js +6 -2
  493. package/dist/components/nylas-connected-calendars2.js.map +1 -1
  494. package/dist/components/nylas-custom-booking-flow2.js +1 -1
  495. package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
  496. package/dist/components/nylas-custom-event-slug2.js +1 -0
  497. package/dist/components/nylas-custom-event-slug2.js.map +1 -1
  498. package/dist/components/nylas-customize-booking-settings2.js +4 -4
  499. package/dist/components/nylas-customize-booking-settings2.js.map +1 -1
  500. package/dist/components/nylas-date-picker2.js +4 -4
  501. package/dist/components/nylas-date-picker2.js.map +1 -1
  502. package/dist/components/nylas-editor-tabs2.js +196 -167
  503. package/dist/components/nylas-editor-tabs2.js.map +1 -1
  504. package/dist/components/nylas-event-description2.js +1 -1
  505. package/dist/components/nylas-event-description2.js.map +1 -1
  506. package/dist/components/nylas-event-duration2.js +1 -1
  507. package/dist/components/nylas-event-duration2.js.map +1 -1
  508. package/dist/components/nylas-event-info2.js +1 -1
  509. package/dist/components/nylas-event-limits2.js +1 -1
  510. package/dist/components/nylas-event-location2.js +39 -15
  511. package/dist/components/nylas-event-location2.js.map +1 -1
  512. package/dist/components/nylas-event-title2.js +10 -5
  513. package/dist/components/nylas-event-title2.js.map +1 -1
  514. package/dist/components/nylas-feedback-form2.js +2 -2
  515. package/dist/components/nylas-form-card2.js +1 -1
  516. package/dist/components/nylas-if-state.js +1 -1
  517. package/dist/components/nylas-limit-future-bookings2.js +1 -1
  518. package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
  519. package/dist/components/nylas-list-configurations2.js +2 -2
  520. package/dist/components/nylas-list-configurations2.js.map +1 -1
  521. package/dist/components/nylas-locale-switch2.js +2 -2
  522. package/dist/components/nylas-locale-switch2.js.map +1 -1
  523. package/dist/components/nylas-login.js +1 -1
  524. package/dist/components/nylas-logo2.js +1 -1
  525. package/dist/components/nylas-min-booking-notice2.js +3 -3
  526. package/dist/components/nylas-min-booking-notice2.js.map +1 -1
  527. package/dist/components/nylas-min-cancellation-notice2.js +3 -3
  528. package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
  529. package/dist/components/nylas-notification2.js +1 -1
  530. package/dist/components/nylas-organizer-confirmation-card2.js +3 -3
  531. package/dist/components/nylas-organizer-confirmation-card2.js.map +1 -1
  532. package/dist/components/nylas-page-name2.js +3 -3
  533. package/dist/components/nylas-page-name2.js.map +1 -1
  534. package/dist/components/nylas-page-styling2.js +3 -3
  535. package/dist/components/nylas-page-styling2.js.map +1 -1
  536. package/dist/components/nylas-participant-booking-calendars2.js +6 -2
  537. package/dist/components/nylas-participant-booking-calendars2.js.map +1 -1
  538. package/dist/components/nylas-participants-custom-availability2.js +3 -2
  539. package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
  540. package/dist/components/nylas-provider.js +1 -1
  541. package/dist/components/nylas-reminder-emails.js +1 -302
  542. package/dist/components/nylas-reminder-emails.js.map +1 -1
  543. package/dist/{esm/nylas-reminder-emails.entry.js → components/nylas-reminder-emails2.js} +123 -21
  544. package/dist/components/nylas-reminder-emails2.js.map +1 -0
  545. package/dist/components/nylas-reminder-time2.js +2 -2
  546. package/dist/components/nylas-scheduler-editor.js +179 -161
  547. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  548. package/dist/components/nylas-scheduling-method2.js +4 -6
  549. package/dist/components/nylas-scheduling-method2.js.map +1 -1
  550. package/dist/components/nylas-scheduling.js +22 -8
  551. package/dist/components/nylas-scheduling.js.map +1 -1
  552. package/dist/components/nylas-selected-event-card2.js +3 -3
  553. package/dist/components/nylas-selected-event-card2.js.map +1 -1
  554. package/dist/components/nylas-time-window-picker2.js +1 -1
  555. package/dist/components/nylas-timeslot-interval2.js +4 -8
  556. package/dist/components/nylas-timeslot-interval2.js.map +1 -1
  557. package/dist/components/nylas-timeslot-picker2.js +5 -5
  558. package/dist/components/nylas-timeslot-picker2.js.map +1 -1
  559. package/dist/components/paintbrush-fill.js +1 -1
  560. package/dist/components/paintbrush.js +1 -1
  561. package/dist/components/people.js +1 -1
  562. package/dist/components/person-clipboard.js +1 -1
  563. package/dist/components/person.js +1 -1
  564. package/dist/components/play-icon.js +1 -1
  565. package/dist/components/plus.js +1 -1
  566. package/dist/components/radio-button-group2.js +1 -1
  567. package/dist/components/refresh-icon.js +1 -1
  568. package/dist/components/reply-all-icon.js +1 -1
  569. package/dist/components/reply-icon.js +1 -1
  570. package/dist/components/scheduler-store.js +12 -3
  571. package/dist/components/scheduler-store.js.map +1 -1
  572. package/dist/components/search.js +1 -1
  573. package/dist/components/select-dropdown2.js +1 -1
  574. package/dist/components/sent-icon.js +1 -1
  575. package/dist/components/spam-icon.js +1 -1
  576. package/dist/components/star-icon.js +1 -1
  577. package/dist/components/stop-icon.js +1 -1
  578. package/dist/components/textarea-component2.js +1 -1
  579. package/dist/components/time-period-selector2.js +1 -1
  580. package/dist/components/toggle-switch2.js +1 -1
  581. package/dist/components/toolitp-component.js +1 -1
  582. package/dist/components/translate.js +1 -1
  583. package/dist/components/trash-fill-icon.js +1 -1
  584. package/dist/components/trash.js +1 -1
  585. package/dist/components/underline-icon.js +1 -1
  586. package/dist/components/warning.js +1 -1
  587. package/dist/components/zoom.js +1 -1
  588. package/dist/esm/add-circle-icon_2.entry.js +2 -2
  589. package/dist/esm/archive-icon.entry.js +1 -1
  590. package/dist/esm/arrow-icon.entry.js +1 -1
  591. package/dist/esm/bold-icon.entry.js +1 -1
  592. package/dist/esm/button-component_2.entry.js +2 -2
  593. package/dist/esm/{calendar-agenda-fill-icon_51.entry.js → calendar-agenda-fill-icon_54.entry.js} +702 -306
  594. package/dist/esm/calendar-agenda-fill-icon_54.entry.js.map +1 -0
  595. package/dist/esm/calendar-cancel-icon.entry.js +1 -1
  596. package/dist/esm/calendar-check-icon_2.entry.js +2 -2
  597. package/dist/esm/calendar-icon.entry.js +1 -1
  598. package/dist/esm/checkbox-component_2.entry.js +2 -2
  599. package/dist/esm/chevron-icon_3.entry.js +3 -3
  600. package/dist/esm/clock-icon_4.entry.js +4 -4
  601. package/dist/esm/{constants-94520f89.js → constants-c549b12b.js} +2 -2
  602. package/dist/esm/{constants-94520f89.js.map → constants-c549b12b.js.map} +1 -1
  603. package/dist/esm/copy-icon.entry.js +1 -1
  604. package/dist/esm/delete-icon.entry.js +1 -1
  605. package/dist/esm/document-refresh-icon.entry.js +1 -1
  606. package/dist/esm/folder-icon.entry.js +1 -1
  607. package/dist/esm/forward-icon.entry.js +1 -1
  608. package/dist/esm/globe-icon.entry.js +1 -1
  609. package/dist/esm/google-logo-icon_4.entry.js +35 -24
  610. package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
  611. package/dist/esm/inbox-icon.entry.js +1 -1
  612. package/dist/esm/index-7cb0dd3d.js +2 -10
  613. package/dist/esm/info-icon_2.entry.js +2 -2
  614. package/dist/esm/input-color-picker.entry.js +2 -2
  615. package/dist/esm/input-component.entry.js +1 -1
  616. package/dist/esm/input-dropdown.entry.js +1 -1
  617. package/dist/esm/italic-icon.entry.js +1 -1
  618. package/dist/esm/loader.js +1 -1
  619. package/dist/esm/multi-select-dropdown.entry.js +1 -1
  620. package/dist/esm/nylas-booked-event-card_12.entry.js +34 -33
  621. package/dist/esm/nylas-booked-event-card_12.entry.js.map +1 -1
  622. package/dist/esm/nylas-form-card.entry.js +1 -1
  623. package/dist/esm/nylas-if-state.entry.js +1 -1
  624. package/dist/esm/nylas-login.entry.js +1 -1
  625. package/dist/esm/nylas-provider.entry.js +2 -2
  626. package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
  627. package/dist/esm/nylas-scheduling.entry.js +23 -10
  628. package/dist/esm/nylas-scheduling.entry.js.map +1 -1
  629. package/dist/esm/nylas-time-window-picker.entry.js +1 -1
  630. package/dist/esm/nylas-web-elements.js +1 -1
  631. package/dist/esm/person-icon.entry.js +1 -1
  632. package/dist/esm/play-icon.entry.js +1 -1
  633. package/dist/esm/refresh-icon.entry.js +1 -1
  634. package/dist/esm/reply-all-icon.entry.js +1 -1
  635. package/dist/esm/reply-icon.entry.js +1 -1
  636. package/dist/esm/{scheduler-store-24e5fb65.js → scheduler-store-d4784b24.js} +13 -4
  637. package/dist/esm/scheduler-store-d4784b24.js.map +1 -0
  638. package/dist/esm/sent-icon.entry.js +1 -1
  639. package/dist/esm/spam-icon.entry.js +1 -1
  640. package/dist/esm/star-icon.entry.js +1 -1
  641. package/dist/esm/stop-icon.entry.js +1 -1
  642. package/dist/esm/textarea-component.entry.js +1 -1
  643. package/dist/esm/time-period-selector.entry.js +1 -1
  644. package/dist/esm/translate-icon.entry.js +1 -1
  645. package/dist/esm/trash-fill-icon.entry.js +1 -1
  646. package/dist/esm/underline-icon.entry.js +1 -1
  647. package/dist/esm/warning-icon.entry.js +1 -1
  648. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  649. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  650. package/dist/nylas-web-elements/{p-14493c1f.entry.js → p-04d397d3.entry.js} +2 -2
  651. package/dist/nylas-web-elements/{p-b6e4de5b.js → p-08a590fe.js} +2 -2
  652. package/dist/nylas-web-elements/{p-7943a9f3.entry.js → p-108bd821.entry.js} +2 -2
  653. package/dist/nylas-web-elements/p-12d690b8.js +2 -0
  654. package/dist/nylas-web-elements/p-12d690b8.js.map +1 -0
  655. package/dist/nylas-web-elements/{p-d902a356.entry.js → p-1546bd61.entry.js} +2 -2
  656. package/dist/nylas-web-elements/{p-651232a3.entry.js → p-1c25b695.entry.js} +2 -2
  657. package/dist/nylas-web-elements/{p-caad44c4.entry.js → p-2c1432a2.entry.js} +2 -2
  658. package/dist/nylas-web-elements/{p-21fb688e.entry.js → p-2f91359b.entry.js} +2 -2
  659. package/dist/nylas-web-elements/{p-27074ad6.entry.js → p-3268077f.entry.js} +2 -2
  660. package/dist/nylas-web-elements/p-32bc7f60.entry.js +2 -0
  661. package/dist/nylas-web-elements/p-33800554.entry.js +2 -0
  662. package/dist/nylas-web-elements/p-3971e86b.entry.js +2 -0
  663. package/dist/nylas-web-elements/p-483f2fb4.entry.js +2 -0
  664. package/dist/nylas-web-elements/{p-8a082b24.entry.js → p-4e57a9ee.entry.js} +2 -2
  665. package/dist/nylas-web-elements/p-4fb91c8b.entry.js +2 -0
  666. package/dist/nylas-web-elements/{p-effd77ed.entry.js → p-525bd709.entry.js} +2 -2
  667. package/dist/nylas-web-elements/{p-7d5b3918.entry.js → p-56834b7a.entry.js} +2 -2
  668. package/dist/nylas-web-elements/{p-faeec15a.entry.js → p-5ed596d7.entry.js} +2 -2
  669. package/dist/nylas-web-elements/{p-6fa4597b.entry.js → p-6089d6fa.entry.js} +2 -2
  670. package/dist/nylas-web-elements/{p-39af67b7.entry.js → p-61ea19c2.entry.js} +2 -2
  671. package/dist/nylas-web-elements/p-698d229c.entry.js +2 -0
  672. package/dist/nylas-web-elements/p-698d229c.entry.js.map +1 -0
  673. package/dist/nylas-web-elements/p-713505c9.entry.js +2 -0
  674. package/dist/nylas-web-elements/{p-bd85bf92.entry.js → p-7140bca8.entry.js} +2 -2
  675. package/dist/nylas-web-elements/{p-3f2f3b85.entry.js → p-762ae706.entry.js} +2 -2
  676. package/dist/nylas-web-elements/p-7919d41d.entry.js +2 -0
  677. package/dist/nylas-web-elements/p-7bed0959.entry.js +2 -0
  678. package/dist/nylas-web-elements/p-7bed0959.entry.js.map +1 -0
  679. package/dist/nylas-web-elements/{p-27b52475.entry.js → p-7c20444b.entry.js} +2 -2
  680. package/dist/nylas-web-elements/{p-d55f619c.entry.js → p-988eee6f.entry.js} +2 -2
  681. package/dist/nylas-web-elements/{p-0519e48e.entry.js → p-9d8ffc7b.entry.js} +2 -2
  682. package/dist/nylas-web-elements/{p-fbddb6fe.entry.js → p-9f009793.entry.js} +2 -2
  683. package/dist/nylas-web-elements/{p-1e2ffdc6.entry.js → p-aa4b24ce.entry.js} +2 -2
  684. package/dist/nylas-web-elements/{p-5973b208.entry.js → p-ac8386d1.entry.js} +2 -2
  685. package/dist/nylas-web-elements/{p-062f6da2.entry.js → p-acfe4f6e.entry.js} +2 -2
  686. package/dist/nylas-web-elements/p-af2ab331.entry.js +2 -0
  687. package/dist/nylas-web-elements/{p-100c9ff7.entry.js → p-b110d5c1.entry.js} +2 -2
  688. package/dist/nylas-web-elements/p-b9a8d404.entry.js +8 -0
  689. package/dist/nylas-web-elements/p-b9a8d404.entry.js.map +1 -0
  690. package/dist/nylas-web-elements/{p-e012eac3.entry.js → p-be938025.entry.js} +2 -2
  691. package/dist/nylas-web-elements/{p-36792b8a.entry.js → p-cad17478.entry.js} +2 -2
  692. package/dist/nylas-web-elements/p-ce2c8e67.entry.js +2 -0
  693. package/dist/nylas-web-elements/{p-68320c97.entry.js → p-d1abdef7.entry.js} +2 -2
  694. package/dist/nylas-web-elements/{p-8013d0a2.entry.js → p-dcdb47dd.entry.js} +2 -2
  695. package/dist/nylas-web-elements/{p-cc8f94f7.entry.js → p-e1cd1887.entry.js} +2 -2
  696. package/dist/nylas-web-elements/{p-00d89615.entry.js → p-eb2d8167.entry.js} +2 -2
  697. package/dist/nylas-web-elements/{p-9b62edf6.entry.js → p-ec302526.entry.js} +2 -2
  698. package/dist/nylas-web-elements/{p-bbcf8659.entry.js → p-ec528a20.entry.js} +2 -2
  699. package/dist/nylas-web-elements/{p-0e0c00cc.entry.js → p-eee29c7e.entry.js} +2 -2
  700. package/dist/nylas-web-elements/{p-f62df769.entry.js → p-f2ae34c9.entry.js} +2 -2
  701. package/dist/nylas-web-elements/{p-fecf68ef.entry.js → p-f4334e3a.entry.js} +2 -2
  702. package/dist/nylas-web-elements/p-fc6ae4ec.entry.js +2 -0
  703. package/dist/nylas-web-elements/p-fc6ae4ec.entry.js.map +1 -0
  704. package/dist/nylas-web-elements/p-fe34d0ee.entry.js +2 -0
  705. package/dist/nylas-web-elements/p-febf4adf.entry.js +2 -0
  706. package/dist/types/common/types.d.ts +3 -0
  707. package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +2 -2
  708. package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +3 -4
  709. package/dist/types/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.d.ts +1 -1
  710. package/dist/types/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.d.ts +1 -1
  711. package/dist/types/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.d.ts +1 -1
  712. package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +1 -1
  713. package/dist/types/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.d.ts +1 -1
  714. package/dist/types/components/scheduler/nylas-scheduling/nylas-scheduling.d.ts +5 -3
  715. package/dist/types/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.d.ts +2 -2
  716. package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +2 -2
  717. package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +1 -1
  718. package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +2 -2
  719. package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +2 -1
  720. package/dist/types/components/scheduler-editor/nylas-event-location/nylas-event-location.d.ts +2 -0
  721. package/dist/types/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.d.ts +1 -1
  722. package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +1 -1
  723. package/dist/types/components/scheduler-editor/nylas-page-name/nylas-page-name.d.ts +1 -1
  724. package/dist/types/components/scheduler-editor/nylas-page-styling/nylas-page-styling.d.ts +1 -1
  725. package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +1 -0
  726. package/dist/types/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.d.ts +1 -1
  727. package/dist/types/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.d.ts +0 -2
  728. package/dist/types/components.d.ts +252 -289
  729. package/dist/types/connector/shared/api/scheduler.d.ts +4 -4
  730. package/dist/types/types/index.d.ts +164 -32
  731. package/package.json +7 -5
  732. package/dist/cjs/calendar-agenda-fill-icon_51.cjs.entry.js.map +0 -1
  733. package/dist/cjs/nylas-reminder-emails.cjs.entry.js +0 -208
  734. package/dist/cjs/nylas-reminder-emails.cjs.entry.js.map +0 -1
  735. package/dist/cjs/nylas-reminder-time_2.cjs.entry.js +0 -175
  736. package/dist/cjs/nylas-reminder-time_2.cjs.entry.js.map +0 -1
  737. package/dist/cjs/scheduler-store-4489a68b.js.map +0 -1
  738. package/dist/esm/calendar-agenda-fill-icon_51.entry.js.map +0 -1
  739. package/dist/esm/nylas-reminder-emails.entry.js.map +0 -1
  740. package/dist/esm/nylas-reminder-time_2.entry.js +0 -170
  741. package/dist/esm/nylas-reminder-time_2.entry.js.map +0 -1
  742. package/dist/esm/scheduler-store-24e5fb65.js.map +0 -1
  743. package/dist/nylas-web-elements/p-06e44cfc.entry.js +0 -2
  744. package/dist/nylas-web-elements/p-06e44cfc.entry.js.map +0 -1
  745. package/dist/nylas-web-elements/p-2653e311.entry.js +0 -2
  746. package/dist/nylas-web-elements/p-3ff76491.entry.js +0 -2
  747. package/dist/nylas-web-elements/p-3ff76491.entry.js.map +0 -1
  748. package/dist/nylas-web-elements/p-51a66bf5.entry.js +0 -2
  749. package/dist/nylas-web-elements/p-5b237299.entry.js +0 -2
  750. package/dist/nylas-web-elements/p-63341f71.entry.js +0 -2
  751. package/dist/nylas-web-elements/p-6c833d5e.entry.js +0 -2
  752. package/dist/nylas-web-elements/p-6c833d5e.entry.js.map +0 -1
  753. package/dist/nylas-web-elements/p-742d7c3c.entry.js +0 -2
  754. package/dist/nylas-web-elements/p-76fc639b.entry.js +0 -2
  755. package/dist/nylas-web-elements/p-781e954b.entry.js +0 -2
  756. package/dist/nylas-web-elements/p-7f56a139.entry.js +0 -2
  757. package/dist/nylas-web-elements/p-7f56a139.entry.js.map +0 -1
  758. package/dist/nylas-web-elements/p-86194780.entry.js +0 -2
  759. package/dist/nylas-web-elements/p-86194780.entry.js.map +0 -1
  760. package/dist/nylas-web-elements/p-96bcc255.entry.js +0 -2
  761. package/dist/nylas-web-elements/p-aeab587c.entry.js +0 -2
  762. package/dist/nylas-web-elements/p-c417fd2f.entry.js +0 -2
  763. package/dist/nylas-web-elements/p-ef3561ae.js +0 -2
  764. package/dist/nylas-web-elements/p-ef3561ae.js.map +0 -1
  765. package/dist/nylas-web-elements/p-fbe814b2.entry.js +0 -8
  766. package/dist/nylas-web-elements/p-fbe814b2.entry.js.map +0 -1
  767. package/dist/nylas-web-elements/p-fdc60ce2.entry.js +0 -2
  768. /package/dist/nylas-web-elements/{p-14493c1f.entry.js.map → p-04d397d3.entry.js.map} +0 -0
  769. /package/dist/nylas-web-elements/{p-b6e4de5b.js.map → p-08a590fe.js.map} +0 -0
  770. /package/dist/nylas-web-elements/{p-7943a9f3.entry.js.map → p-108bd821.entry.js.map} +0 -0
  771. /package/dist/nylas-web-elements/{p-d902a356.entry.js.map → p-1546bd61.entry.js.map} +0 -0
  772. /package/dist/nylas-web-elements/{p-651232a3.entry.js.map → p-1c25b695.entry.js.map} +0 -0
  773. /package/dist/nylas-web-elements/{p-caad44c4.entry.js.map → p-2c1432a2.entry.js.map} +0 -0
  774. /package/dist/nylas-web-elements/{p-21fb688e.entry.js.map → p-2f91359b.entry.js.map} +0 -0
  775. /package/dist/nylas-web-elements/{p-27074ad6.entry.js.map → p-3268077f.entry.js.map} +0 -0
  776. /package/dist/nylas-web-elements/{p-aeab587c.entry.js.map → p-32bc7f60.entry.js.map} +0 -0
  777. /package/dist/nylas-web-elements/{p-76fc639b.entry.js.map → p-33800554.entry.js.map} +0 -0
  778. /package/dist/nylas-web-elements/{p-781e954b.entry.js.map → p-3971e86b.entry.js.map} +0 -0
  779. /package/dist/nylas-web-elements/{p-63341f71.entry.js.map → p-483f2fb4.entry.js.map} +0 -0
  780. /package/dist/nylas-web-elements/{p-8a082b24.entry.js.map → p-4e57a9ee.entry.js.map} +0 -0
  781. /package/dist/nylas-web-elements/{p-5b237299.entry.js.map → p-4fb91c8b.entry.js.map} +0 -0
  782. /package/dist/nylas-web-elements/{p-effd77ed.entry.js.map → p-525bd709.entry.js.map} +0 -0
  783. /package/dist/nylas-web-elements/{p-7d5b3918.entry.js.map → p-56834b7a.entry.js.map} +0 -0
  784. /package/dist/nylas-web-elements/{p-faeec15a.entry.js.map → p-5ed596d7.entry.js.map} +0 -0
  785. /package/dist/nylas-web-elements/{p-6fa4597b.entry.js.map → p-6089d6fa.entry.js.map} +0 -0
  786. /package/dist/nylas-web-elements/{p-39af67b7.entry.js.map → p-61ea19c2.entry.js.map} +0 -0
  787. /package/dist/nylas-web-elements/{p-fdc60ce2.entry.js.map → p-713505c9.entry.js.map} +0 -0
  788. /package/dist/nylas-web-elements/{p-bd85bf92.entry.js.map → p-7140bca8.entry.js.map} +0 -0
  789. /package/dist/nylas-web-elements/{p-3f2f3b85.entry.js.map → p-762ae706.entry.js.map} +0 -0
  790. /package/dist/nylas-web-elements/{p-c417fd2f.entry.js.map → p-7919d41d.entry.js.map} +0 -0
  791. /package/dist/nylas-web-elements/{p-27b52475.entry.js.map → p-7c20444b.entry.js.map} +0 -0
  792. /package/dist/nylas-web-elements/{p-d55f619c.entry.js.map → p-988eee6f.entry.js.map} +0 -0
  793. /package/dist/nylas-web-elements/{p-0519e48e.entry.js.map → p-9d8ffc7b.entry.js.map} +0 -0
  794. /package/dist/nylas-web-elements/{p-fbddb6fe.entry.js.map → p-9f009793.entry.js.map} +0 -0
  795. /package/dist/nylas-web-elements/{p-1e2ffdc6.entry.js.map → p-aa4b24ce.entry.js.map} +0 -0
  796. /package/dist/nylas-web-elements/{p-5973b208.entry.js.map → p-ac8386d1.entry.js.map} +0 -0
  797. /package/dist/nylas-web-elements/{p-062f6da2.entry.js.map → p-acfe4f6e.entry.js.map} +0 -0
  798. /package/dist/nylas-web-elements/{p-742d7c3c.entry.js.map → p-af2ab331.entry.js.map} +0 -0
  799. /package/dist/nylas-web-elements/{p-100c9ff7.entry.js.map → p-b110d5c1.entry.js.map} +0 -0
  800. /package/dist/nylas-web-elements/{p-e012eac3.entry.js.map → p-be938025.entry.js.map} +0 -0
  801. /package/dist/nylas-web-elements/{p-36792b8a.entry.js.map → p-cad17478.entry.js.map} +0 -0
  802. /package/dist/nylas-web-elements/{p-2653e311.entry.js.map → p-ce2c8e67.entry.js.map} +0 -0
  803. /package/dist/nylas-web-elements/{p-68320c97.entry.js.map → p-d1abdef7.entry.js.map} +0 -0
  804. /package/dist/nylas-web-elements/{p-8013d0a2.entry.js.map → p-dcdb47dd.entry.js.map} +0 -0
  805. /package/dist/nylas-web-elements/{p-cc8f94f7.entry.js.map → p-e1cd1887.entry.js.map} +0 -0
  806. /package/dist/nylas-web-elements/{p-00d89615.entry.js.map → p-eb2d8167.entry.js.map} +0 -0
  807. /package/dist/nylas-web-elements/{p-9b62edf6.entry.js.map → p-ec302526.entry.js.map} +0 -0
  808. /package/dist/nylas-web-elements/{p-bbcf8659.entry.js.map → p-ec528a20.entry.js.map} +0 -0
  809. /package/dist/nylas-web-elements/{p-0e0c00cc.entry.js.map → p-eee29c7e.entry.js.map} +0 -0
  810. /package/dist/nylas-web-elements/{p-f62df769.entry.js.map → p-f2ae34c9.entry.js.map} +0 -0
  811. /package/dist/nylas-web-elements/{p-fecf68ef.entry.js.map → p-f4334e3a.entry.js.map} +0 -0
  812. /package/dist/nylas-web-elements/{p-96bcc255.entry.js.map → p-fe34d0ee.entry.js.map} +0 -0
  813. /package/dist/nylas-web-elements/{p-51a66bf5.entry.js.map → p-febf4adf.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"nylas-participant-booking-calendars.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAa9H,MAAM,OAAO,gCAAgC;;;oBAUpB,+BAA+B;4BAKhB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;;;iCAmChF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;oCAOvC,EAAE;kDAOF,EAAE;;IAIN,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,qCAAqC,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACpF,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAGD,uBAAuB,CAAC,QAAoB;QAC1C,KAAK,CAAC,qCAAqC,EAAE,yBAAyB,EAAE,QAAQ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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAjDC;IAVC,iBAAiB,CAAsH;QACtI,IAAI,EAAE,qCAAqC;QAC3C,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,2BAA2B,EAAE,WAAW,CAAC;YAC1C,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;SACnE,CAAC;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;8DAiDD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { AdditionalParticipant, Calendar, Configuration, Participant } from '@nylas/core';\n\n/**\n * The `nylas-participant-booking-calendars` component is a form input for selecting calendars to check availability for participants.\n */\n@Component({\n tag: 'nylas-participant-booking-calendars',\n styleUrl: 'nylas-participant-booking-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantBookingCalendars {\n @Element() host!: HTMLNylasParticipantBookingCalendarsElement;\n private bookingCalendarsFormRef!: HTMLFormElement;\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-booking-calendars';\n\n /**\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * The calendars to choose from for the organizer / logged in user.\n */\n @Prop() calendars?: Calendar[];\n\n /**\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedCalendars: {\n [key: string]: {\n isOpen: boolean;\n name: string;\n calendar?: Calendar;\n };\n } = this.setParticipants(this.participants);\n\n /**\n * Participants calendar options.\n */\n @State() participantCalendars: {\n [key: string]: Calendar[];\n } = {};\n\n /**\n * The state to store the default selected calendars for each participant\n */\n @State() participantDefaultSelectedCalendar: {\n [key: string]: string;\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participant-booking-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-participant-booking-calendars', 'calendarsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-participant-booking-calendars', 'participantsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(newValue, this.participantOptions);\n }\n\n @Watch('participantOptions')\n participantOptionsChangedHandler(newValue: AdditionalParticipant[]) {\n debug('nylas-calendar-picker', 'participantOptionsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-participant-booking-calendars', 'selectedConfigurationChangedHandler', newValue);\n const participants = newValue?.participants || this.participants;\n if (participants && participants.length > 0) {\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n }\n\n getParticipantCalendarOptions(addedParticipants: Participant[], availableParticipantOptions: AdditionalParticipant[] | undefined) {\n // Get the participants from the availableParticipantOptions prop that are in the addedParticipants prop\n const organizer = addedParticipants?.find(participant => participant.is_organizer);\n const participantCalendars = {};\n const showAdditionalParticipantBookingCalendars = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n if (availableParticipantOptions && showAdditionalParticipantBookingCalendars) {\n const participants = addedParticipants?.filter(participant => availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email));\n const remainingParticipants = addedParticipants?.filter(\n participant => !availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email),\n );\n\n // Get the calendar options for each participant with email as the key\n participants?.forEach(participant => {\n const participantOption = availableParticipantOptions?.find(participantOption => participantOption.email === participant.email);\n if (!participantOption) return;\n this.participantDefaultSelectedCalendar[participant.email] = participant.booking?.calendar_id ?? 'primary';\n const calendars = participantOption.calendars ?? [];\n participantCalendars[participant.email] = calendars;\n });\n // If it is round robin config, add the remaining participant calendars to the participantCalendars\n // (Round-robin does not have an organizer, and we filtered out the participants not passed in the participantOptions prop,\n // so we need to add the remaining participants calendars to the participantCalendars)\n remainingParticipants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n participantCalendars[participant.email] = this.calendars ?? [{ id: 'primary', name: participant.email }];\n this.participantDefaultSelectedCalendar[participant.email] = participant?.booking?.calendar_id ?? 'primary';\n }\n });\n }\n // Add the organizer's calendars to the participantCalendars\n if (organizer) {\n participantCalendars[organizer.email] = this.calendars ?? [{ id: 'primary', name: organizer.email }];\n this.participantDefaultSelectedCalendar[organizer.email] = organizer?.booking?.calendar_id ?? 'primary';\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participant-booking-calendars', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participant-booking-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participant-booking-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participant-booking-calendars', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedCalendars = this.setParticipants(this.selectedConfiguration?.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.selectedConfiguration?.participants, this.participantOptions);\n }\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-booking-')) {\n return;\n }\n // Validate the form\n if (!this.bookingCalendarsFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please select at least one calendar for each participant.');\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const key = name.split('participant-booking-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendar'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key]?.calendar;\n });\n this.internals.setFormValue(JSON.stringify(participantsCalendars), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantsCalendars), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n calendar: participant.booking?.calendar_id || 'primary',\n name: participant.name || participant.email,\n };\n }\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantBookingCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participant-booking-calendars',\n stateToProps: new Map([\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participant-booking-calendars\" part=\"npbc\">\n <div class=\"header\" part=\"npbc__header\">\n <h3>Book to this calendar</h3>\n <p>Select the calendar where you want to add event bookings.</p>\n </div>\n <div class=\"content\" part=\"npbc__content\">\n <form ref={el => (this.bookingCalendarsFormRef = el as HTMLFormElement)}>\n {this.participantCalendars &&\n Object.keys(this.participantCalendars).map((key, index) => {\n const participant = this.selectedCalendars[key];\n const participantCalendars = this.participantCalendars[key];\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"npbc__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npbc__participant-title\">\n <p>{participant.name}'s booking calendar</p>\n <div class=\"participant-toggle\" part=\"npbc__participant-toggle--container\">\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.selectedCalendars[key].isOpen = !participant.isOpen;\n this.selectedCalendars = { ...this.selectedCalendars };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-booking-calendar-picker\n key={key}\n name={`participant-booking-${key}`}\n calendars={participantCalendars}\n hideHeader={true}\n defaultBookingCalendar={this.participantDefaultSelectedCalendar[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"nylas-participant-booking-calendars.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAoB9H,MAAM,OAAO,gCAAgC;;;oBAYpB,+BAA+B;4BAMhB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;;;iCAqChF,IAAI,CAAC,eAAe,CAAC,IAAI,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CAAC,iBAAiB,EAAE,CAAC;4CACzD,CAAC;4CAED,oBAAc,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CAClC,CACH,CACF;gCACL,WAAW,CAAC,MAAM,IAAI,CACrB,qCACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,uBAAuB,GAAG,EAAE,EAClC,SAAS,EAAE,oBAAoB,EAC/B,UAAU,EAAE,IAAI,EAChB,sBAAsB,EAAE,IAAI,CAAC,kCAAkC,CAAC,GAAG,CAAC,GACpE,CACH,CACG,CACP,CAAC;wBACJ,CAAC,CAAC,CACC,CACH,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAlDC;IAVC,iBAAiB,CAAsH;QACtI,IAAI,EAAE,qCAAqC;QAC3C,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,2BAA2B,EAAE,WAAW,CAAC;YAC1C,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;SACnE,CAAC;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;8DAkDD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { AdditionalParticipant, Calendar, Configuration, Participant } from '@nylas/core';\n\n/**\n * The `nylas-participant-booking-calendars` component is a form input for selecting calendars to check availability for participants.\n *\n * @part npbc - The participant booking calendars host.\n * @part npbc__header - The header.\n * @part npbc__content - The content.\n * @part npbc__participant-container - The participant container.\n * @part npbc__participant-title - The participant title.\n * @part npbc__participant-toggle-container - The participant toggle container.\n */\n@Component({\n tag: 'nylas-participant-booking-calendars',\n styleUrl: 'nylas-participant-booking-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantBookingCalendars {\n @Element() host!: HTMLNylasParticipantBookingCalendarsElement;\n private bookingCalendarsFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-booking-calendars';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * @standalone\n * The calendars to choose from for the organizer / logged in user.\n */\n @Prop() calendars?: Calendar[];\n\n /**\n * @standalone\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedCalendars: {\n [key: string]: {\n isOpen: boolean;\n name: string;\n calendar?: Calendar;\n };\n } = this.setParticipants(this.participants);\n\n /**\n * Participants calendar options.\n */\n @State() participantCalendars: {\n [key: string]: Calendar[];\n } = {};\n\n /**\n * The state to store the default selected calendars for each participant\n */\n @State() participantDefaultSelectedCalendar: {\n [key: string]: string;\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participant-booking-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-participant-booking-calendars', 'calendarsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-participant-booking-calendars', 'participantsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(newValue, this.participantOptions);\n }\n\n @Watch('participantOptions')\n participantOptionsChangedHandler(newValue: AdditionalParticipant[]) {\n debug('nylas-calendar-picker', 'participantOptionsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-participant-booking-calendars', 'selectedConfigurationChangedHandler', newValue);\n const participants = newValue?.participants || this.participants;\n if (participants && participants.length > 0) {\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n }\n\n getParticipantCalendarOptions(addedParticipants: Participant[], availableParticipantOptions: AdditionalParticipant[] | undefined) {\n // Get the participants from the availableParticipantOptions prop that are in the addedParticipants prop\n const organizer = addedParticipants?.find(participant => participant.is_organizer);\n const participantCalendars = {};\n const showAdditionalParticipantBookingCalendars = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n if (availableParticipantOptions && showAdditionalParticipantBookingCalendars) {\n const participants = addedParticipants?.filter(participant => availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email));\n const remainingParticipants = addedParticipants?.filter(\n participant => !availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email),\n );\n\n // Get the calendar options for each participant with email as the key\n participants?.forEach(participant => {\n const participantOption = availableParticipantOptions?.find(participantOption => participantOption.email === participant.email);\n if (!participantOption) return;\n this.participantDefaultSelectedCalendar[participant.email] = participant.booking?.calendar_id ?? 'primary';\n const calendars = participantOption.calendars ?? [];\n participantCalendars[participant.email] = calendars;\n });\n // If it is round robin config, add the remaining participant calendars to the participantCalendars\n // (Round-robin does not have an organizer, and we filtered out the participants not passed in the participantOptions prop,\n // so we need to add the remaining participants calendars to the participantCalendars)\n remainingParticipants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n participantCalendars[participant.email] = this.calendars ?? [{ id: 'primary', name: participant.email }];\n this.participantDefaultSelectedCalendar[participant.email] = participant?.booking?.calendar_id ?? 'primary';\n }\n });\n }\n // Add the organizer's calendars to the participantCalendars\n if (organizer) {\n participantCalendars[organizer.email] = this.calendars ?? [{ id: 'primary', name: organizer.email }];\n this.participantDefaultSelectedCalendar[organizer.email] = organizer?.booking?.calendar_id ?? 'primary';\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participant-booking-calendars', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participant-booking-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participant-booking-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participant-booking-calendars', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedCalendars = this.setParticipants(this.selectedConfiguration?.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.selectedConfiguration?.participants, this.participantOptions);\n } else {\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-booking-')) {\n return;\n }\n // Validate the form\n if (!this.bookingCalendarsFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please select at least one calendar for each participant.');\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const key = name.split('participant-booking-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendar'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key]?.calendar;\n });\n this.internals.setFormValue(JSON.stringify(participantsCalendars), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantsCalendars), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n calendar: participant.booking?.calendar_id || 'primary',\n name: participant.name || participant.email,\n };\n }\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantBookingCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participant-booking-calendars',\n stateToProps: new Map([\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participant-booking-calendars\" part=\"npbc\">\n <div class=\"header\" part=\"npbc__header\">\n <h3>Book to this calendar</h3>\n <p>Select the calendar where you want to add event bookings.</p>\n </div>\n <div class=\"content\" part=\"npbc__content\">\n <form ref={el => (this.bookingCalendarsFormRef = el as HTMLFormElement)}>\n {this.participantCalendars &&\n Object.keys(this.participantCalendars).map((key, index) => {\n const participant = this.selectedCalendars[key];\n const participantCalendars = this.participantCalendars[key];\n\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"npbc__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npbc__participant-title\">\n <p>{participant.name}'s booking calendar</p>\n <div class=\"participant-toggle\" part=\"npbc__participant-toggle-container\">\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.selectedCalendars[key].isOpen = !participant.isOpen;\n this.selectedCalendars = { ...this.selectedCalendars };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-booking-calendar-picker\n key={key}\n name={`participant-booking-${key}`}\n calendars={participantCalendars}\n hideHeader={true}\n defaultBookingCalendar={this.participantDefaultSelectedCalendar[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -103,12 +103,13 @@ export class NylasParticipantsCustomAvailability {
103
103
  openHours: participant.availability?.open_hours || [],
104
104
  name: participant.name || participant.email,
105
105
  availability: participant.availability,
106
+ timezone: participant.timezone,
106
107
  };
107
108
  });
108
109
  return selectedParticipants;
109
110
  }
110
111
  render() {
111
- return (h(Host, { key: '0fcb52a9bf85515bdc30024260451dc16a303cd0' }, h("div", { key: '51d1389d4d2102729df48d415424328e12d9b14c', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: '15ac6b389076142d270ef9b2fd9cad3258850f46', class: "header", part: "npca__header" }, h("h3", { key: 'd23c27337b6603b42e686ecd90a362dced00e56a' }, "Participant open hours"), h("p", { key: '19371926bd6e02e8e6bc64a0946b67fb3179c247' }, "If not set, Nylas uses the default open hours for this participant.")), h("div", { key: '644998a32e12bed450fbab9c45fe00ff62ddf7f0', class: "content", part: "npca__content" }, h("form", { key: '7c66c87d7842be37b6fc6f57ff3127a81421cc47', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
112
+ return (h(Host, { key: '6f9b3c61650e7dd61b6e548fe008be57494b5e89' }, h("div", { key: '256e2e41f0849180ffdb5c67c66dffd9c1ce031a', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: 'c3e1aefbb7872b233938aefeb22a13169f194864', class: "header", part: "npca__header" }, h("h3", { key: '8f7af6fa1435b2530fb5d179db1357e765270865' }, "Participant open hours"), h("p", { key: 'ff146ecd72673369a01773b2f00e81264654acf5' }, "If not set, Nylas uses the default open hours for this participant.")), h("div", { key: '52476fb7c7dc19935d92883ebd16f6af6746f8b5', class: "content", part: "npca__content" }, h("form", { key: '2b2fb94eb40a92b0e3326c9681051f61bbe4986e', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
112
113
  const participant = this.selectedParticipants[key];
113
114
  if (!participant || !participant.name || !participant.availability)
114
115
  return;
@@ -117,7 +118,7 @@ export class NylasParticipantsCustomAvailability {
117
118
  return;
118
119
  this.selectedParticipants[key].isOpen = !participant.isOpen;
119
120
  this.selectedParticipants = { ...this.selectedParticipants };
120
- } }, h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (h("nylas-availability-picker", { key: index, name: `participant-${index}-${key}`, openHours: participant.openHours, defaultTimezone: participant.openHours?.[0]?.timezone, hideHeader: true }))));
121
+ } }, h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (h("nylas-availability-picker", { key: index, name: `participant-${index}-${key}`, openHours: participant.openHours, defaultTimezone: participant.timezone, hideHeader: true }))));
121
122
  }))))));
122
123
  }
123
124
  static get is() { return "nylas-participants-custom-availability"; }
@@ -152,8 +153,11 @@ export class NylasParticipantsCustomAvailability {
152
153
  "required": false,
153
154
  "optional": true,
154
155
  "docs": {
155
- "tags": [],
156
- "text": "The selected config"
156
+ "tags": [{
157
+ "name": "standalone",
158
+ "text": "The selected config"
159
+ }],
160
+ "text": ""
157
161
  }
158
162
  },
159
163
  "name": {
@@ -167,8 +171,11 @@ export class NylasParticipantsCustomAvailability {
167
171
  "required": false,
168
172
  "optional": false,
169
173
  "docs": {
170
- "tags": [],
171
- "text": "The name of the participants custom availability."
174
+ "tags": [{
175
+ "name": "standalone",
176
+ "text": "The name of the participants custom availability."
177
+ }],
178
+ "text": ""
172
179
  },
173
180
  "attribute": "name",
174
181
  "reflect": false,
@@ -191,8 +198,11 @@ export class NylasParticipantsCustomAvailability {
191
198
  "required": false,
192
199
  "optional": false,
193
200
  "docs": {
194
- "tags": [],
195
- "text": "The participants selected in the add participants section."
201
+ "tags": [{
202
+ "name": "standalone",
203
+ "text": "The participants selected in the add participants section."
204
+ }],
205
+ "text": ""
196
206
  },
197
207
  "defaultValue": "this.selectedConfiguration?.participants || []"
198
208
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nylas-participants-custom-availability.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAG9H,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAqBxD,MAAM,OAAO,mCAAmC;;;oBAWvB,iCAAiC;4BAKlB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;oCA0BhF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;;IAI3C,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,wCAAwC,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACvF,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAGD,0BAA0B,CAAC,QAAuB,EAAE,QAAuB;QACzE,KAAK,CAAC,wCAAwC,EAAE,4BAA4B,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAClG,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC7D,CAAC;IAGD,mCAAmC,CAAC,QAAuB,EAAE,QAAuB;QAClF,KAAK,CAAC,wCAAwC,EAAE,qCAAqC,EAAE,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Connector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Availability, Configuration, OpenHours, Participant } from '@nylas/core';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\n\n/**\n * The `nylas-participants-custom-availability` component is a form input for setting custom availability for participants.\n *\n * @part npca - The participants custom availability container\n * @part npca__header - The header of the participants custom availability\n * @part npca__content - The content of the participants custom availability\n * @part npca__participant-container - The participant container\n * @part npca__participant-title - The title of the participant\n * @part npca__participant-toggle--container - The toggle container for the participant\n * @part npca__toggle-label - The label of the toggle\n * @part npca_toggle-input - The input of the toggle\n * @part npca_toggle-slider - The slider of the toggle\n */\n@Component({\n tag: 'nylas-participants-custom-availability',\n styleUrl: 'nylas-participants-custom-availability.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantsCustomAvailability {\n @Element() host!: HTMLNylasParticipantsCustomAvailabilityElement;\n private participantFormRef!: HTMLFormElement;\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-custom-availability';\n\n /**\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedParticipants: {\n [key: string]: {\n setCustom: boolean;\n isOpen: boolean;\n openHours: OpenHours[];\n name: string;\n availability?: Availability;\n };\n } = this.setParticipants(this.participants);\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[], oldValue: Participant[]) {\n debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue, oldValue);\n this.selectedParticipants = this.setParticipants(newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration, oldValue: Configuration) {\n debug('nylas-participants-custom-availability', 'selectedConfigurationChangedHandler', newValue, oldValue);\n if (newValue?.participants) {\n this.selectedParticipants = this.setParticipants(newValue?.participants);\n }\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participants-custom-availability', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participants-custom-availability', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participants-custom-availability', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participants-custom-availability', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedParticipants = this.setParticipants(this.selectedConfiguration?.participants);\n } else {\n this.selectedParticipants = this.setParticipants(this.participants);\n }\n }\n\n // Event Handlers\n @Listen('nylasFormSwitchToggled')\n nylasFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);\n const openHours = this.selectedConfiguration?.participants.find(participant => participant.email === event.detail.name)?.availability?.open_hours || [];\n this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['openHours'] = event.detail.checked ? (openHours?.length > 0 ? openHours : DEFAULT_OPEN_HOURS) : [];\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-')) {\n return;\n }\n // Validate the form\n if (!this.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const jsonValue = JSON.parse(value);\n\n const key = name.split('-')[2];\n if (!this.selectedParticipants[key]) return;\n this.selectedParticipants[key]['openHours'] = jsonValue.openHours;\n this.selectedParticipants = { ...this.selectedParticipants };\n\n this.updateFormValue();\n }\n\n updateFormValue() {\n const participantOpenHours = {};\n const participants = this.selectedConfiguration?.participants || this.participants;\n participants.forEach(participant => {\n participantOpenHours[participant.email] = this.selectedParticipants[participant.email].openHours;\n });\n this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n selectedParticipants[participant.email] = {\n isOpen: false,\n setCustom: !!participant.availability?.open_hours ? true : false,\n openHours: participant.availability?.open_hours || [],\n name: participant.name || participant.email,\n availability: participant.availability,\n };\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantsCustomAvailability, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participants-custom-availability',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participants-custom-availability\" part=\"npca\">\n <div class=\"header\" part=\"npca__header\">\n <h3>Participant open hours</h3>\n <p>If not set, Nylas uses the default open hours for this participant.</p>\n </div>\n <div class=\"content\" part=\"npca__content\">\n <form ref={el => (this.participantFormRef = el as HTMLFormElement)}>\n {Object.keys(this.selectedParticipants).map((key, index) => {\n const participant = this.selectedParticipants[key];\n if (!participant || !participant.name || !participant.availability) return;\n return (\n <div class=\"participant-container\" part=\"npca__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npca__participant-title\">\n <p>{participant.name}'s open hours</p>\n <div class=\"participant-toggle\" part=\"npca__participant-toggle--container\">\n <toggle-switch\n exportparts=\"ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider\"\n name={key}\n checked={!!participant?.openHours && participant?.openHours.length > 0}\n />\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`}\n onClick={() => {\n if (!participant.setCustom) return;\n this.selectedParticipants[key].isOpen = !participant.isOpen;\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-availability-picker\n key={index}\n name={`participant-${index}-${key}`}\n openHours={participant.openHours}\n defaultTimezone={participant.openHours?.[0]?.timezone}\n hideHeader={true}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"nylas-participants-custom-availability.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAG9H,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAqBxD,MAAM,OAAO,mCAAmC;;;oBAavB,iCAAiC;4BAMlB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;oCA2BhF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;;IAI3C,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,wCAAwC,EAAE,2BAA2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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AArDC;IANC,iBAAiB,CAAyH;QACzI,IAAI,EAAE,wCAAwC;QAC9C,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;iEAqDD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Availability, Configuration, OpenHours, Participant } from '@nylas/core';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\n\n/**\n * The `nylas-participants-custom-availability` component is a form input for setting custom availability for participants.\n *\n * @part npca - The participants custom availability container\n * @part npca__header - The header of the participants custom availability\n * @part npca__content - The content of the participants custom availability\n * @part npca__participant-container - The participant container\n * @part npca__participant-title - The title of the participant\n * @part npca__participant-toggle--container - The toggle container for the participant\n * @part npca__toggle-label - The label of the toggle\n * @part npca_toggle-input - The input of the toggle\n * @part npca_toggle-slider - The slider of the toggle\n */\n@Component({\n tag: 'nylas-participants-custom-availability',\n styleUrl: 'nylas-participants-custom-availability.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantsCustomAvailability {\n @Element() host!: HTMLNylasParticipantsCustomAvailabilityElement;\n private participantFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-custom-availability';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedParticipants: {\n [key: string]: {\n setCustom: boolean;\n isOpen: boolean;\n openHours: OpenHours[];\n name: string;\n availability?: Availability;\n timezone?: string;\n };\n } = this.setParticipants(this.participants);\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[], oldValue: Participant[]) {\n debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue, oldValue);\n this.selectedParticipants = this.setParticipants(newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration, oldValue: Configuration) {\n debug('nylas-participants-custom-availability', 'selectedConfigurationChangedHandler', newValue, oldValue);\n if (newValue?.participants) {\n this.selectedParticipants = this.setParticipants(newValue?.participants);\n }\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participants-custom-availability', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participants-custom-availability', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participants-custom-availability', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participants-custom-availability', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedParticipants = this.setParticipants(this.selectedConfiguration?.participants);\n } else {\n this.selectedParticipants = this.setParticipants(this.participants);\n }\n }\n\n // Event Handlers\n @Listen('nylasFormSwitchToggled')\n nylasFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);\n const openHours = this.selectedConfiguration?.participants.find(participant => participant.email === event.detail.name)?.availability?.open_hours || [];\n this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['openHours'] = event.detail.checked ? (openHours?.length > 0 ? openHours : DEFAULT_OPEN_HOURS) : [];\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-')) {\n return;\n }\n // Validate the form\n if (!this.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const jsonValue = JSON.parse(value);\n\n const key = name.split('-')[2];\n if (!this.selectedParticipants[key]) return;\n this.selectedParticipants[key]['openHours'] = jsonValue.openHours;\n this.selectedParticipants = { ...this.selectedParticipants };\n\n this.updateFormValue();\n }\n\n updateFormValue() {\n const participantOpenHours = {};\n const participants = this.selectedConfiguration?.participants || this.participants;\n participants.forEach(participant => {\n participantOpenHours[participant.email] = this.selectedParticipants[participant.email].openHours;\n });\n this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n selectedParticipants[participant.email] = {\n isOpen: false,\n setCustom: !!participant.availability?.open_hours ? true : false,\n openHours: participant.availability?.open_hours || [],\n name: participant.name || participant.email,\n availability: participant.availability,\n timezone: participant.timezone,\n };\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantsCustomAvailability, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participants-custom-availability',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participants-custom-availability\" part=\"npca\">\n <div class=\"header\" part=\"npca__header\">\n <h3>Participant open hours</h3>\n <p>If not set, Nylas uses the default open hours for this participant.</p>\n </div>\n <div class=\"content\" part=\"npca__content\">\n <form ref={el => (this.participantFormRef = el as HTMLFormElement)}>\n {Object.keys(this.selectedParticipants).map((key, index) => {\n const participant = this.selectedParticipants[key];\n if (!participant || !participant.name || !participant.availability) return;\n return (\n <div class=\"participant-container\" part=\"npca__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npca__participant-title\">\n <p>{participant.name}'s open hours</p>\n <div class=\"participant-toggle\" part=\"npca__participant-toggle--container\">\n <toggle-switch\n exportparts=\"ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider\"\n name={key}\n checked={!!participant?.openHours && participant?.openHours.length > 0}\n />\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`}\n onClick={() => {\n if (!participant.setCustom) return;\n this.selectedParticipants[key].isOpen = !participant.isOpen;\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-availability-picker\n key={index}\n name={`participant-${index}-${key}`}\n openHours={participant.openHours}\n defaultTimezone={participant.timezone}\n hideHeader={true}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,47 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { NylasParticipantsCustomAvailability } from "../nylas-participants-custom-availability";
3
+ import { NylasAvailabilityPicker } from "../../nylas-availability-picker/nylas-availability-picker";
4
+ import { h } from "@stencil/core";
5
+ import { SelectDropdown } from "../../../design-system/select-dropdown/select-dropdown";
6
+ import { selectedConfiguration } from "../../../../utils/test-utils";
7
+ describe('nylas-participants-custom-availability', () => {
8
+ beforeEach(() => {
9
+ const originalIntl = Intl;
10
+ global.Intl = {
11
+ ...originalIntl,
12
+ DateTimeFormat: jest.fn().mockImplementation(() => ({
13
+ resolvedOptions: () => ({
14
+ timeZone: 'America/New_York',
15
+ }),
16
+ supportedLocalesOf: jest.fn(),
17
+ })),
18
+ };
19
+ });
20
+ afterEach(() => {
21
+ jest.restoreAllMocks();
22
+ });
23
+ it('selects default timezone passed as prop', async () => {
24
+ const config = JSON.parse(JSON.stringify(selectedConfiguration));
25
+ config.participants[0].timezone = 'Africa/Accra';
26
+ const page = await newSpecPage({
27
+ components: [NylasParticipantsCustomAvailability, NylasAvailabilityPicker, SelectDropdown],
28
+ template: () => {
29
+ return (h("form", { id: "availability-picker" }, h("nylas-participants-custom-availability", { name: "participant-xyx", selectedConfiguration: config })));
30
+ },
31
+ });
32
+ await page.waitForChanges();
33
+ expect(page.root).toMatchSnapshot();
34
+ const form = page.root?.shadowRoot?.querySelector('.nylas-participants-custom-availability .content form');
35
+ const participant1 = form?.querySelector('.participant-container');
36
+ const chevron = participant1?.querySelector('.participant-title .chevron');
37
+ chevron?.dispatchEvent(new Event('click'));
38
+ await page.waitForChanges();
39
+ const availabilityPicker = page.root?.shadowRoot?.querySelector('nylas-availability-picker');
40
+ expect(availabilityPicker).not.toBeNull();
41
+ const timezoneDropdown = availabilityPicker?.shadowRoot?.querySelector('.select-timezone select-dropdown')?.shadowRoot;
42
+ const timezoneButton = timezoneDropdown?.querySelector('button');
43
+ expect(timezoneButton).not.toBeNull();
44
+ expect(timezoneButton?.textContent).toEqual('Africa / Accra');
45
+ });
46
+ });
47
+ //# sourceMappingURL=nylas-participants-custom-availability.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nylas-participants-custom-availability.spec.js","sourceRoot":"","sources":["../../../../../src/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-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,OAAO,CACL,YAAM,EAAE,EAAC,qBAAqB;oBAC5B,8CAAwC,IAAI,EAAC,iBAAiB,EAAC,qBAAqB,EAAE,MAAM,GAA2C,CAClI,CACR,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;QAEH,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;QACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,uDAAuD,CAAC,CAAC;QAC3G,MAAM,YAAY,GAAG,IAAI,EAAE,aAAa,CAAC,wBAAwB,CAAC,CAAC;QACnE,MAAM,OAAO,GAAG,YAAY,EAAE,aAAa,CAAC,6BAA6B,CAAC,CAAC;QAC3E,OAAO,EAAE,aAAa,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3C,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;QAC7F,MAAM,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC1C,MAAM,gBAAgB,GAAG,kBAAkB,EAAE,UAAU,EAAE,aAAa,CAAC,kCAAkC,CAAC,EAAE,UAAU,CAAC;QACvH,MAAM,cAAc,GAAG,gBAAgB,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;QACjE,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QACtC,MAAM,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { NylasParticipantsCustomAvailability } from '../nylas-participants-custom-availability';\nimport { NylasAvailabilityPicker } from '../../nylas-availability-picker/nylas-availability-picker';\nimport { h } from '@stencil/core';\nimport { SelectDropdown } from '../../../design-system/select-dropdown/select-dropdown';\nimport { selectedConfiguration } from '@/utils/test-utils';\n\ndescribe('nylas-participants-custom-availability', () => {\n beforeEach(() => {\n const originalIntl = Intl;\n\n global.Intl = {\n ...originalIntl,\n DateTimeFormat: jest.fn().mockImplementation(() => ({\n resolvedOptions: () => ({\n timeZone: 'America/New_York',\n }),\n supportedLocalesOf: jest.fn(),\n })) as any,\n };\n });\n\n afterEach(() => {\n jest.restoreAllMocks();\n });\n\n it('selects default timezone passed as prop', async () => {\n const config = JSON.parse(JSON.stringify(selectedConfiguration));\n config.participants[0].timezone = 'Africa/Accra';\n const page = await newSpecPage({\n components: [NylasParticipantsCustomAvailability, NylasAvailabilityPicker, SelectDropdown],\n template: () => {\n return (\n <form id=\"availability-picker\">\n <nylas-participants-custom-availability name=\"participant-xyx\" selectedConfiguration={config}></nylas-participants-custom-availability>\n </form>\n );\n },\n });\n\n await page.waitForChanges();\n expect(page.root).toMatchSnapshot();\n const form = page.root?.shadowRoot?.querySelector('.nylas-participants-custom-availability .content form');\n const participant1 = form?.querySelector('.participant-container');\n const chevron = participant1?.querySelector('.participant-title .chevron');\n chevron?.dispatchEvent(new Event('click'));\n await page.waitForChanges();\n const availabilityPicker = page.root?.shadowRoot?.querySelector('nylas-availability-picker');\n expect(availabilityPicker).not.toBeNull();\n const timezoneDropdown = availabilityPicker?.shadowRoot?.querySelector('.select-timezone select-dropdown')?.shadowRoot;\n const timezoneButton = timezoneDropdown?.querySelector('button');\n expect(timezoneButton).not.toBeNull();\n expect(timezoneButton?.textContent).toEqual('Africa / Accra');\n });\n});\n"]}
@@ -142,7 +142,7 @@ export class NylasReminderEmails {
142
142
  value: 'host',
143
143
  },
144
144
  ];
145
- return (h(Host, { key: 'f1982a2fe4c71ae1345b184767d015ba34336f1f' }, h("div", { key: '02f612577517fcc9ca50e5278c8e4cf2492aa29e', class: "cards-container" }, this.reminders.map((reminder, index) => {
145
+ return (h(Host, { key: 'a71a8247248eec4834963b8887b713769b7210cf' }, h("div", { key: '8ab8b9fc62502a7ddf5a111727ab5ef53fc050a9', class: "cards-container" }, this.reminders.map((reminder, index) => {
146
146
  return (h("div", { class: "nylas-reminder-email", part: "nre" }, h("div", { class: "header", part: "nre__header" }, h("div", null, h("h3", null, "Upcoming meeting", organizerName ? ` with ${organizerName} ` : ''), h("p", null, "Reminder before event")), !reminder.editing ? (h("button-component", { variant: 'basic', key: `edit-${index} `, clickHandler: event => {
147
147
  event.preventDefault();
148
148
  reminder.editing = true;
@@ -154,10 +154,10 @@ export class NylasReminderEmails {
154
154
  reminder.editing = !reminder.editing;
155
155
  this.reminders = [...this.reminders];
156
156
  } }, h("chevron-icon", { width: "24", height: "24" }))))), reminder.editing ? (h("div", { class: "nylas-reminder-email__body", part: "nre__body" }, h("div", { class: "nylas-reminder-email__section" }, h("div", { class: "nylas-reminder-email__row" }, h("label", null, "Email recipients"), h("select-dropdown", { name: `recipient-${index}`, options: recipientOptions, defaultSelectedOption: recipientOptions.find(i => i.value === reminder.recipient) ?? recipientOptions[0], withSearch: false })), h("div", { class: "nylas-reminder-email__row" }, h("label", null, "Send confirmation email when", h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, "The recipients will receive a reminder email at the specified time before the event.")))), h("nylas-reminder-time", { name: `reminder-time-${index}`, eventReminderTimeMinutes: reminder.minutes_before_event, exportparts: "nrt, nrt__input_dropdown: nre__reminder-input_dropdown,\n nrt__input_dropdown-input: nre__reminder-input_dropdown-input,\n nrt__input_dropdown-content: nre__reminder-input_dropdown-content,\n " }))))) : (h("div", { class: "nylas-reminder-email__summary", part: "nre__summary" }, h("p", null, h("span", { class: "summary-icon" }, h("person-clipboard-icon", null)), recipientOptions.find(i => i.value === reminder.recipient)?.label), h("p", null, h("span", { class: "summary-icon" }, h("clock-icon", null)), this.formatReminderTime(reminder.minutes_before_event), " before the event")))));
157
- })), h("button-component", { key: '5f0c78b6e6caca06bb8b3c8346480f3cde3ee8f9', class: "create-reminder", variant: 'basic', clickHandler: event => {
157
+ })), h("button-component", { key: '67f3f31bf95a05c858a97da188b88788551d1171', class: "create-reminder", variant: 'basic', clickHandler: event => {
158
158
  event.preventDefault();
159
159
  this.addReminder();
160
- } }, h("plus-icon", { key: 'b72802d4c496bcdad8f26986b43a8d70828fae68', width: "16", height: "16" }), "New reminder")));
160
+ } }, h("plus-icon", { key: 'ad8a8e742fdd8334e56af084356ea6fc7189405e', width: "16", height: "16" }), "New reminder")));
161
161
  }
162
162
  static get is() { return "nylas-reminder-emails"; }
163
163
  static get encapsulation() { return "shadow"; }
@@ -115,7 +115,7 @@ export class NylasReminderTime {
115
115
  { value: 60, label: 'hour' },
116
116
  { value: 60 * 24, label: 'day' },
117
117
  ];
118
- return (h(Host, { key: 'd08ccb2f53caf574942db1bc7f805927ad5a2b9a' }, h("div", { key: '7a2969e3256bfc79d28686c3ade4c981b7425300', class: "nylas-reminder-time", part: "nrt" }, h("div", { key: '625bb82d848d490b65463cc2102ddb5f1cdaaad8', class: "nylas-reminder-time__wrapper" }, h("input-dropdown", { key: '5cf299dee023154ae01545f55c5c3a126ff08cc0', name: 'reminder-time', options: this.reminderTimeMinutesOptions, inputValue: this.reminderTime.toString(), exportparts: "id_dropdown: nrt__input_dropdown, id_dropdown-input: nrt__input_dropdown-input, id_dropdown-content: nrt__input_dropdown-content", defaultInputOption: this.reminderTimeMinutesOptions.find(i => i.value == this.reminderTime) ?? reminderTimeOptions[0] }), h("select-dropdown", { key: '95ef5eae4f8fc8b73ed8efc4601cac5e0303c858', name: 'reminder-time-unit', options: reminderTimeOptions, pluralizedLabel: this.reminderTime > 1 ? 's' : '', exportparts: "sd_dropdown: nrt__dropdown, sd_dropdown-button: nrt__dropdown-button, sd_dropdown-content: nrt__dropdown-content", defaultSelectedOption: reminderTimeOptions.find(i => i.value == this.reminderTimeincrement) ?? reminderTimeOptions[0], withSearch: false })))));
118
+ return (h(Host, { key: 'd5f118391bdd7e4779f6eca15335285047fdb350' }, h("div", { key: '2dd8d3ba52d4f95480c9cf1fdaf5d0f1f7c1e523', class: "nylas-reminder-time", part: "nrt" }, h("div", { key: '3799c4b266f4078e22ad78b86225ef9abdc5fa49', class: "nylas-reminder-time__wrapper" }, h("input-dropdown", { key: '004b6336c041660e1424ac44f16e82c8a5a2ca53', name: 'reminder-time', options: this.reminderTimeMinutesOptions, inputValue: this.reminderTime.toString(), exportparts: "id_dropdown: nrt__input_dropdown, id_dropdown-input: nrt__input_dropdown-input, id_dropdown-content: nrt__input_dropdown-content", defaultInputOption: this.reminderTimeMinutesOptions.find(i => i.value == this.reminderTime) ?? reminderTimeOptions[0] }), h("select-dropdown", { key: '6a42c7f4633d89dd9a94d3c2f119e151613667ec', name: 'reminder-time-unit', options: reminderTimeOptions, pluralizedLabel: this.reminderTime > 1 ? 's' : '', exportparts: "sd_dropdown: nrt__dropdown, sd_dropdown-button: nrt__dropdown-button, sd_dropdown-content: nrt__dropdown-content", defaultSelectedOption: reminderTimeOptions.find(i => i.value == this.reminderTimeincrement) ?? reminderTimeOptions[0], withSearch: false })))));
119
119
  }
120
120
  static get is() { return "nylas-reminder-time"; }
121
121
  static get encapsulation() { return "shadow"; }
@@ -180,7 +180,7 @@ export class NylasSchedulerEditor {
180
180
  render() {
181
181
  const hasSlot = this.host.querySelector('[slot="custom-page-style-inputs"]');
182
182
  const selectedConfigId = this.stores?.schedulerConfig?.state.selectedConfiguration?.id;
183
- return (h(Host, { key: '4f81f67d0f40d00a72d97347f6bf2a58bad4001b' }, h("div", { key: '45531d5bd73fd0e413cdd3eacbd49e1a9e968c5a', class: "scheduler-editor-header", part: "nse__header" }, h("h1", { key: '37ea6d7172926bdebe03349852b6afb5576ddcf5', class: "scheduler-editor-title", part: "nse__title" }, h("calendar-icon", { key: '1ce122cb39e521914ef057a4074425412718a531', width: "18", height: "18" }), "Scheduler Editor"), h("button", { key: 'ac2dd9469c0fcc5be8b0d728e19271ee53c36d6c', class: "scheduler-editor-close", title: "logout", onClick: e => this.handleSchedulerConfigCloseClicked(e), part: "nse__close-button" }, h("close-icon", { key: 'b42b8607026201d0849d7b600a1586940fd560f7', width: "18", height: "18" }))), h("div", { key: '9e40a5b67e04e60e5bcd7f6f317ee02a9140bf94', class: "scheduler-editor-content", part: "nse__content" }, this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === null && (h("div", { class: "list-configurations" }, h("nylas-list-configurations", { exportparts: "nlc__create-new-cta" }))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'create' && (h("nylas-editor-tabs", { mode: "composable" }, h(ExpressFlow, { currentUser: this.stores?.schedulerConfig?.state.currentUser, calendars: this.stores?.schedulerConfig?.state?.calendars, selectedConfiguration: this.stores?.schedulerConfig?.state?.selectedConfiguration }))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'edit' && (h("nylas-editor-tabs", { key: selectedConfigId, mode: this.mode }, this.mode === 'composable' && h("slot", null), this.mode === 'app' && hasSlot && (h("div", { style: { display: 'none' }, slot: "custom-page-style-inputs", key: selectedConfigId }, h("slot", { name: "custom-page-style-inputs" }))))), !this.stores?.schedulerConfig?.state.currentUser && (h("slot", { name: "login-required" }, h(LoginRequired, { authenticationUrl: this.authenticationUrl }))))));
183
+ return (h(Host, { key: '35b140eeb034c18708cd362f6129e2a7cde71a7b' }, h("div", { key: '15eecb29f74a8401c6c80793d38678bee330f31e', class: "scheduler-editor-header", part: "nse__header" }, h("h1", { key: 'dabea2da65cc14b20698653f9662a8c456254b34', class: "scheduler-editor-title", part: "nse__title" }, h("calendar-icon", { key: 'eb26707b8c8d880655900353e50113504ba531cd', width: "18", height: "18" }), "Scheduler Editor"), h("button", { key: 'c841ccb7aa945f292c69d342426ecd0e3a5a1413', class: "scheduler-editor-close", title: "logout", onClick: e => this.handleSchedulerConfigCloseClicked(e), part: "nse__close-button" }, h("close-icon", { key: '79b157544d31b2cd401c0c1e8ed019e36c09f9dd', width: "18", height: "18" }))), h("div", { key: '02c2e2992587342832f6d8999c09b637bece7dc8', class: "scheduler-editor-content", part: "nse__content" }, this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === null && (h("div", { class: "list-configurations" }, h("nylas-list-configurations", { exportparts: "nlc__create-new-cta" }))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'create' && (h("nylas-editor-tabs", { mode: "composable" }, h(ExpressFlow, { currentUser: this.stores?.schedulerConfig?.state.currentUser, calendars: this.stores?.schedulerConfig?.state?.calendars, selectedConfiguration: this.stores?.schedulerConfig?.state?.selectedConfiguration }))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'edit' && (h("nylas-editor-tabs", { key: selectedConfigId, mode: this.mode }, this.mode === 'composable' && h("slot", null), this.mode === 'app' && hasSlot && (h("div", { style: { display: 'none' }, slot: "custom-page-style-inputs", key: selectedConfigId }, h("slot", { name: "custom-page-style-inputs" }))))), !this.stores?.schedulerConfig?.state.currentUser && (h("slot", { name: "login-required" }, h(LoginRequired, { authenticationUrl: this.authenticationUrl }))))));
184
184
  }
185
185
  static get is() { return "nylas-scheduler-editor"; }
186
186
  static get encapsulation() { return "shadow"; }
@@ -17,8 +17,8 @@ import { debug } from "../../../utils/utils";
17
17
  import { Host, h } from "@stencil/core";
18
18
  export class NylasSchedulingMethod {
19
19
  constructor() {
20
- this.name = 'availability-method';
21
20
  this.selectedConfiguration = undefined;
21
+ this.name = 'availability-method';
22
22
  this.participantOptions = undefined;
23
23
  this.readOnly = false;
24
24
  this.selectedBookingType = '';
@@ -102,24 +102,6 @@ export class NylasSchedulingMethod {
102
102
  }
103
103
  static get properties() {
104
104
  return {
105
- "name": {
106
- "type": "string",
107
- "mutable": false,
108
- "complexType": {
109
- "original": "string",
110
- "resolved": "string",
111
- "references": {}
112
- },
113
- "required": false,
114
- "optional": false,
115
- "docs": {
116
- "tags": [],
117
- "text": "The name of the booking type picker."
118
- },
119
- "attribute": "name",
120
- "reflect": false,
121
- "defaultValue": "'availability-method'"
122
- },
123
105
  "selectedConfiguration": {
124
106
  "type": "unknown",
125
107
  "mutable": false,
@@ -137,10 +119,34 @@ export class NylasSchedulingMethod {
137
119
  "required": false,
138
120
  "optional": true,
139
121
  "docs": {
140
- "tags": [],
141
- "text": "The selected config"
122
+ "tags": [{
123
+ "name": "standalone",
124
+ "text": "The selected config"
125
+ }],
126
+ "text": ""
142
127
  }
143
128
  },
129
+ "name": {
130
+ "type": "string",
131
+ "mutable": false,
132
+ "complexType": {
133
+ "original": "string",
134
+ "resolved": "string",
135
+ "references": {}
136
+ },
137
+ "required": false,
138
+ "optional": false,
139
+ "docs": {
140
+ "tags": [{
141
+ "name": "standalone",
142
+ "text": "The name of the booking type picker."
143
+ }],
144
+ "text": ""
145
+ },
146
+ "attribute": "name",
147
+ "reflect": false,
148
+ "defaultValue": "'availability-method'"
149
+ },
144
150
  "participantOptions": {
145
151
  "type": "unknown",
146
152
  "mutable": false,
@@ -158,8 +164,11 @@ export class NylasSchedulingMethod {
158
164
  "required": false,
159
165
  "optional": true,
160
166
  "docs": {
161
- "tags": [],
162
- "text": "The participant options passed in the additionalParticipants prop\nfrom the nylas-scheduler-editor component."
167
+ "tags": [{
168
+ "name": "standalone",
169
+ "text": "The participant options passed in the additionalParticipants prop\nfrom the nylas-scheduler-editor component."
170
+ }],
171
+ "text": ""
163
172
  }
164
173
  },
165
174
  "readOnly": {
@@ -231,10 +240,8 @@ export class NylasSchedulingMethod {
231
240
  __decorate([
232
241
  RegisterComponent({
233
242
  name: 'nylas-scheduling-method',
234
- stateToProps: new Map([
235
- ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],
236
- ['schedulerConfig.additionalParticipants', 'participantOptions'],
237
- ]),
243
+ stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
244
+ localPropsToProp: new Map([['additionalParticipants', 'participantOptions']]),
238
245
  eventToProps: {
239
246
  valueChanged: async (event, _nylasSchedulerConfigConnector) => {
240
247
  const { valueChanged } = event.detail;
@@ -1 +1 @@
1
- {"version":3,"file":"nylas-scheduling-method.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAkB9H,MAAM,OAAO,qBAAqB;;oBAMT,qBAAqB;;;wBAahB,KAAK;mCAUM,EAAE;;IAYzC,iBAAiB;QACf,KAAK,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;IACxD,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,yBAAyB,EAAE,sBAAsB,CAAC,CAAC;IAC3D,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;QAEtD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,yBAAyB,EAAE,kBAAkB,CAAC,CAAC;QACrD,MAAM,YAAY,GAAG,IAAI,CAAC,qBAAqB,EAAE,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAC;QAGnH,IAAI,YAAY,IAAI,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,KAAK,UAAU,EAAE,CAAC;YACtE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,YAAY,EAAE,kBAAkB,C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BAA6D,EAC7D,EAAE;gBACF,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBAEtC,IAAI,YAAY,EAAE,CAAC;oBACjB,YAAY,CAAC,KAAK,CAAC,CAAC;gBACtB,CAAC;YACH,CAAC;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;mDAyED","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AdditionalParticipant, Configuration } from '@nylas/core';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\n/**\n * The `nylas-scheduling-method` component is a UI component that displays the booking calendar picker.\n * @part nsm - The booking calendar picker container\n * @part nsm__header - The header of the booking calendar picker\n * @part nsm__input-label - The input label of the booking calendar picker\n * @part nsm__dropdown - The dropdown container\n * @part nsm__dropdown-button - The dropdown button\n * @part nsm__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-scheduling-method',\n styleUrl: 'nylas-scheduling-method.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasSchedulingMethod {\n @Element() host!: HTMLNylasSchedulingMethodElement;\n\n /**\n * The name of the booking type picker.\n */\n @Prop() name: string = 'availability-method';\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n /**\n * This prop is used to display the component in a disabled state / read-only mode.\n */\n @Prop() readOnly: boolean = false;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The selected booking type.\n */\n @State() selectedBookingType: string = '';\n\n /**\n * This event is fired when the selected booking calendar changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-scheduling-method', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-scheduling-method', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-scheduling-method', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-scheduling-method', 'componentDidLoad');\n const bookingtType = this.selectedConfiguration?.availability?.availability_rules?.availability_method?.toString();\n\n // TODO: Remove this when the internals in tests are fixed.\n if (bookingtType && typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(bookingtType, 'booking-calendar');\n }\n this.selectedBookingType = bookingtType || 'collective';\n this.valueChanged.emit({ value: this.selectedBookingType, name: this.name });\n }\n\n componentWillUpdate() {\n debug('nylas-scheduling-method', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-scheduling-method', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-scheduling-method', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-scheduling-method', 'componentDidRender');\n }\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-scheduling-method', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-scheduling-method', 'nylasFormDropdownChangedHandler', event.detail);\n // Pass as handler so that if event.defaultPrevented by parent app, this will be skipped.\n const valueChanged = (event: CustomEvent<{ value: string; name: string }>) => {\n const { value } = event.detail;\n if (value) {\n this.selectedBookingType = value;\n this.internals.setFormValue(value, this.name);\n }\n };\n this.valueChanged.emit({ value: event.detail.value, name: this.name, valueChanged });\n }\n\n @RegisterComponent<NylasSchedulingMethod, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-scheduling-method',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const bookingTypeOptions = [\n { label: 'Standard booking', value: 'collective' },\n { label: 'Round-robin max fairness', value: 'max-fairness' },\n { label: 'Round-robin max availability', value: 'max-availability' },\n ];\n const defaultBookingType = this.selectedConfiguration?.availability?.availability_rules?.availability_method?.toString();\n const hasAdditionalParticipants =\n this.participantOptions &&\n this.participantOptions?.length > 0 &&\n !!this.participantOptions[0].email &&\n !!this.participantOptions[0].name &&\n !!this.participantOptions[0].calendars &&\n this.participantOptions[0].calendars.length > 0;\n\n // If a default availability method is set in the configuration (developer settings), do not show the booking type picker.\n // Or, if a default availability method is not set and there are no additional participants, do not show the booking type picker.\n if ((defaultBookingType || !hasAdditionalParticipants) && !this.readOnly) {\n return null;\n }\n\n return (\n <Host>\n <div class=\"nylas-scheduling-method\" part=\"nsm\">\n <div class=\"header\" part=\"nsm__header\">\n <h3>Scheduling method</h3>\n </div>\n <div class=\"nylas-scheduling-method__dropdown\">\n <span class=\"nylas-scheduling-method__dropdown-label\">\n Select a scheduling method for the event.\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n <strong>Standard Booking</strong>\n <br />\n - Allows 1:1 bookings, or n:1 bookings with additional participants.\n <br />\n <br />\n <strong>Round-Robin Maximize Fairness</strong>\n <br />\n - Rotates through the list of participants you select, displaying the participant with the fewest recent bookings.\n <br />\n <br />\n <strong>Round-Robin Maximize Availability</strong>\n <br />\n - Rotates through the list of participants you select, prioritizing participants with the fewest recent bookings, but making as many time-slots available as\n possible.\n <br />\n </span>\n </tooltip-component>\n </span>\n {this.readOnly ? (\n <input-component\n name=\"availability-method-read-only\"\n type=\"text\"\n exportparts=\"ic__label: nsm__input-label, ic__input: nsm__input, ic__input_wrapper: nsm__input_wrapper\"\n readOnly\n defaultValue={bookingTypeOptions.find(cal => cal.value == defaultBookingType)?.label ?? bookingTypeOptions[0].label}\n />\n ) : (\n <select-dropdown\n name={this.name}\n options={bookingTypeOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: nsm__dropdown, sd_dropdown-button: nsm__dropdown-button, sd_dropdown-content: nsm__dropdown-content\"\n defaultSelectedOption={bookingTypeOptions.find(cal => cal.value == defaultBookingType) ?? bookingTypeOptions[0]}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"nylas-scheduling-method.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAkB9H,MAAM,OAAO,qBAAqB;;;oBAYT,qBAAqB;;wBAUhB,KAAK;mCAUM,EAAE;;IAYzC,iBAAiB;QACf,KAAK,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;IACxD,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,yBAAyB,EAAE,sBAAsB,CAAC,CA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AI,kBAAkB,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAC/G,CACH,CACG,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAzEC;IAlBC,iBAAiB,CAA2G;QAC3H,IAAI,EAAE,yBAAyB;QAC/B,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC,CAAC;QAC7E,YAAY,EAAE;YACZ,YAAY,EAAE,KAAK,EACjB,KAAiI,EACjI,8BAA6D,EAC7D,EAAE;gBACF,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBAEtC,IAAI,YAAY,EAAE,CAAC;oBACjB,YAAY,CAAC,KAAK,CAAC,CAAC;gBACtB,CAAC;YACH,CAAC;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;mDAyED","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AdditionalParticipant, Configuration } from '@nylas/core';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\n/**\n * The `nylas-scheduling-method` component is a UI component that displays the booking calendar picker.\n * @part nsm - The booking calendar picker container\n * @part nsm__header - The header of the booking calendar picker\n * @part nsm__input-label - The input label of the booking calendar picker\n * @part nsm__dropdown - The dropdown container\n * @part nsm__dropdown-button - The dropdown button\n * @part nsm__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-scheduling-method',\n styleUrl: 'nylas-scheduling-method.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasSchedulingMethod {\n @Element() host!: HTMLNylasSchedulingMethodElement;\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the booking type picker.\n */\n @Prop() name: string = 'availability-method';\n /**\n * @standalone\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n /**\n * This prop is used to display the component in a disabled state / read-only mode.\n */\n @Prop() readOnly: boolean = false;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The selected booking type.\n */\n @State() selectedBookingType: string = '';\n\n /**\n * This event is fired when the selected booking calendar changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-scheduling-method', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-scheduling-method', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-scheduling-method', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-scheduling-method', 'componentDidLoad');\n const bookingtType = this.selectedConfiguration?.availability?.availability_rules?.availability_method?.toString();\n\n // TODO: Remove this when the internals in tests are fixed.\n if (bookingtType && typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(bookingtType, 'booking-calendar');\n }\n this.selectedBookingType = bookingtType || 'collective';\n this.valueChanged.emit({ value: this.selectedBookingType, name: this.name });\n }\n\n componentWillUpdate() {\n debug('nylas-scheduling-method', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-scheduling-method', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-scheduling-method', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-scheduling-method', 'componentDidRender');\n }\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-scheduling-method', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-scheduling-method', 'nylasFormDropdownChangedHandler', event.detail);\n // Pass as handler so that if event.defaultPrevented by parent app, this will be skipped.\n const valueChanged = (event: CustomEvent<{ value: string; name: string }>) => {\n const { value } = event.detail;\n if (value) {\n this.selectedBookingType = value;\n this.internals.setFormValue(value, this.name);\n }\n };\n this.valueChanged.emit({ value: event.detail.value, name: this.name, valueChanged });\n }\n\n @RegisterComponent<NylasSchedulingMethod, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-scheduling-method',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n localPropsToProp: new Map([['additionalParticipants', 'participantOptions']]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const bookingTypeOptions = [\n { label: 'Standard booking', value: 'collective' },\n { label: 'Round-robin max fairness', value: 'max-fairness' },\n { label: 'Round-robin max availability', value: 'max-availability' },\n ];\n const defaultBookingType = this.selectedConfiguration?.availability?.availability_rules?.availability_method?.toString();\n const hasAdditionalParticipants =\n this.participantOptions &&\n this.participantOptions?.length > 0 &&\n !!this.participantOptions[0].email &&\n !!this.participantOptions[0].name &&\n !!this.participantOptions[0].calendars &&\n this.participantOptions[0].calendars.length > 0;\n\n // If a default availability method is set in the configuration (developer settings), do not show the booking type picker.\n // Or, if a default availability method is not set and there are no additional participants, do not show the booking type picker.\n if ((defaultBookingType || !hasAdditionalParticipants) && !this.readOnly) {\n return null;\n }\n\n return (\n <Host>\n <div class=\"nylas-scheduling-method\" part=\"nsm\">\n <div class=\"header\" part=\"nsm__header\">\n <h3>Scheduling method</h3>\n </div>\n <div class=\"nylas-scheduling-method__dropdown\">\n <span class=\"nylas-scheduling-method__dropdown-label\">\n Select a scheduling method for the event.\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n <strong>Standard Booking</strong>\n <br />\n - Allows 1:1 bookings, or n:1 bookings with additional participants.\n <br />\n <br />\n <strong>Round-Robin Maximize Fairness</strong>\n <br />\n - Rotates through the list of participants you select, displaying the participant with the fewest recent bookings.\n <br />\n <br />\n <strong>Round-Robin Maximize Availability</strong>\n <br />\n - Rotates through the list of participants you select, prioritizing participants with the fewest recent bookings, but making as many time-slots available as\n possible.\n <br />\n </span>\n </tooltip-component>\n </span>\n {this.readOnly ? (\n <input-component\n name=\"availability-method-read-only\"\n type=\"text\"\n exportparts=\"ic__label: nsm__input-label, ic__input: nsm__input, ic__input_wrapper: nsm__input_wrapper\"\n readOnly\n defaultValue={bookingTypeOptions.find(cal => cal.value == defaultBookingType)?.label ?? bookingTypeOptions[0].label}\n />\n ) : (\n <select-dropdown\n name={this.name}\n options={bookingTypeOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: nsm__dropdown, sd_dropdown-button: nsm__dropdown-button, sd_dropdown-content: nsm__dropdown-content\"\n defaultSelectedOption={bookingTypeOptions.find(cal => cal.value == defaultBookingType) ?? bookingTypeOptions[0]}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -254,7 +254,7 @@ export class TimeInput {
254
254
  }
255
255
  }
256
256
  render() {
257
- return (h(Host, { key: 'da122e12f7a101e73a49fc19189722f8aa2a5802' }, h("div", { key: 'f922740d77d8bda81491d28215dc0a9f2fa0fc18', class: "time-picker", part: "time-picker" }, h("input", { key: 'eaae1354a88421a510036693c72b9dffbc68cd06', type: "text", name: this.name, id: this.name, part: "time-input", class: {
257
+ return (h(Host, { key: 'e83949b2270706557e5d45aff5958d937c6489c9' }, h("div", { key: '0cacfe5530a1186ce2ff50ccc3d9328a62d48e2f', class: "time-picker", part: "time-picker" }, h("input", { key: '8daf647468746997e503883478debf8d335a780d', type: "text", name: this.name, id: this.name, part: "time-input", class: {
258
258
  'time-input': true,
259
259
  'error': !!this.err || this.hasError,
260
260
  }, ref: el => (this.timeInput = el), value: this.time, onClick: () => {