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

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 (825) 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 +366 -366
  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 +55 -57
  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 +99 -95
  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 +6451 -6036
  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 +232 -232
  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 +1430 -1001
  125. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1081 -1056
  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 +10 -9
  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} +736 -326
  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 +35 -34
  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/collection-manifest.json +1 -1
  230. package/dist/collection/common/icons/add-circle.js +1 -1
  231. package/dist/collection/common/icons/archive.js +1 -1
  232. package/dist/collection/common/icons/arrow.js +1 -1
  233. package/dist/collection/common/icons/bold.js +1 -1
  234. package/dist/collection/common/icons/calendar-agenda-fill.js +1 -1
  235. package/dist/collection/common/icons/calendar-agenda.js +1 -1
  236. package/dist/collection/common/icons/calendar-cancel.js +1 -1
  237. package/dist/collection/common/icons/calendar-check.js +1 -1
  238. package/dist/collection/common/icons/calendar-info.js +1 -1
  239. package/dist/collection/common/icons/calendar-patterns.js +1 -1
  240. package/dist/collection/common/icons/calendar.js +1 -1
  241. package/dist/collection/common/icons/checkmark-circle.js +1 -1
  242. package/dist/collection/common/icons/checkmark.js +1 -1
  243. package/dist/collection/common/icons/chevron.js +1 -1
  244. package/dist/collection/common/icons/clock.js +1 -1
  245. package/dist/collection/common/icons/close.js +1 -1
  246. package/dist/collection/common/icons/copy.js +1 -1
  247. package/dist/collection/common/icons/delete.js +1 -1
  248. package/dist/collection/common/icons/document-refresh.js +1 -1
  249. package/dist/collection/common/icons/dragable.js +1 -1
  250. package/dist/collection/common/icons/edit.js +1 -1
  251. package/dist/collection/common/icons/envelope-fill.js +1 -1
  252. package/dist/collection/common/icons/envelope.js +1 -1
  253. package/dist/collection/common/icons/eye.js +1 -1
  254. package/dist/collection/common/icons/feedback-icon.js +1 -1
  255. package/dist/collection/common/icons/flow.js +1 -1
  256. package/dist/collection/common/icons/folder.js +1 -1
  257. package/dist/collection/common/icons/forward.js +1 -1
  258. package/dist/collection/common/icons/globe.js +1 -1
  259. package/dist/collection/common/icons/google-logo.js +1 -1
  260. package/dist/collection/common/icons/google-meet.js +1 -1
  261. package/dist/collection/common/icons/inbox.js +1 -1
  262. package/dist/collection/common/icons/info.js +1 -1
  263. package/dist/collection/common/icons/italic.js +1 -1
  264. package/dist/collection/common/icons/loading.js +1 -1
  265. package/dist/collection/common/icons/location-off.js +1 -1
  266. package/dist/collection/common/icons/location.js +1 -1
  267. package/dist/collection/common/icons/microsof-teams.js +1 -1
  268. package/dist/collection/common/icons/microsoft-logo.js +1 -1
  269. package/dist/collection/common/icons/nylas-logo.js +1 -1
  270. package/dist/collection/common/icons/paintbrush-fill.js +1 -1
  271. package/dist/collection/common/icons/paintbrush.js +1 -1
  272. package/dist/collection/common/icons/people.js +1 -1
  273. package/dist/collection/common/icons/person-clipboard.js +1 -1
  274. package/dist/collection/common/icons/person.js +1 -1
  275. package/dist/collection/common/icons/play.js +1 -1
  276. package/dist/collection/common/icons/plus.js +1 -1
  277. package/dist/collection/common/icons/refresh.js +1 -1
  278. package/dist/collection/common/icons/reply-all.js +1 -1
  279. package/dist/collection/common/icons/reply.js +1 -1
  280. package/dist/collection/common/icons/search.js +1 -1
  281. package/dist/collection/common/icons/sent.js +1 -1
  282. package/dist/collection/common/icons/spam.js +1 -1
  283. package/dist/collection/common/icons/star.js +1 -1
  284. package/dist/collection/common/icons/stop.js +1 -1
  285. package/dist/collection/common/icons/translate.js +1 -1
  286. package/dist/collection/common/icons/trash-fill.js +1 -1
  287. package/dist/collection/common/icons/trash.js +1 -1
  288. package/dist/collection/common/icons/underline.js +1 -1
  289. package/dist/collection/common/icons/warning.js +1 -1
  290. package/dist/collection/common/icons/zoom.js +1 -1
  291. package/dist/collection/common/types.js.map +1 -1
  292. package/dist/collection/components/design-system/button-component/button-component.js +1 -1
  293. package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +1 -1
  294. package/dist/collection/components/design-system/input-color-picker/input-color-picker.js +2 -2
  295. package/dist/collection/components/design-system/input-component/input-component.js +1 -1
  296. package/dist/collection/components/design-system/input-dropdown/input-dropdown.js +1 -1
  297. package/dist/collection/components/design-system/input-image-url/input-image-url.js +20 -2
  298. package/dist/collection/components/design-system/input-image-url/input-image-url.js.map +1 -1
  299. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +1 -1
  300. package/dist/collection/components/design-system/radio-button-group/radio-button-group.js +1 -1
  301. package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +1 -1
  302. package/dist/collection/components/design-system/textarea-component/textarea-component.js +1 -1
  303. package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
  304. package/dist/collection/components/design-system/toggle-switch/toggle-switch.js +1 -1
  305. package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
  306. package/dist/collection/components/nylas-if-state/nylas-if-state.js +1 -1
  307. package/dist/collection/components/nylas-login/nylas-login.js +1 -1
  308. package/dist/collection/components/nylas-provider/nylas-provider.js +1 -1
  309. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.css +23 -0
  310. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +66 -51
  311. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
  312. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.css +23 -0
  313. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +35 -24
  314. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
  315. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.css +23 -0
  316. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +38 -29
  317. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js.map +1 -1
  318. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.css +23 -0
  319. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +26 -23
  320. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js.map +1 -1
  321. package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js +26 -23
  322. package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js.map +1 -1
  323. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.css +23 -0
  324. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +26 -20
  325. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
  326. package/dist/collection/components/scheduler/nylas-feedback-form/nylas-feedback-form.js +2 -2
  327. package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.css +23 -0
  328. package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
  329. package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js +29 -23
  330. package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js.map +1 -1
  331. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +24 -10
  332. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
  333. package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js +143 -0
  334. package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js.map +1 -1
  335. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.css +23 -0
  336. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +3 -3
  337. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js.map +1 -1
  338. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +23 -0
  339. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +50 -44
  340. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
  341. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +66 -55
  342. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
  343. package/dist/collection/components/scheduler-editor/nylas-additional-participants/test/nylas-additional-participants.spec.js +106 -0
  344. package/dist/collection/components/scheduler-editor/nylas-additional-participants/test/nylas-additional-participants.spec.js.map +1 -0
  345. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +44 -28
  346. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
  347. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +25 -10
  348. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
  349. package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js +21 -9
  350. package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js.map +1 -1
  351. package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.js +19 -10
  352. package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.js.map +1 -1
  353. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +6 -3
  354. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js.map +1 -1
  355. package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js +10 -4
  356. package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js.map +1 -1
  357. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +45 -33
  358. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
  359. package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.css +2 -1
  360. package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js +16 -7
  361. package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js.map +1 -1
  362. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js +58 -30
  363. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js.map +1 -1
  364. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/test/nylas-confirmation-email.spec.js +33 -0
  365. package/dist/collection/components/scheduler-editor/nylas-confirmation-email/test/nylas-confirmation-email.spec.js.map +1 -0
  366. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js +26 -10
  367. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js.map +1 -1
  368. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +1 -1
  369. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js.map +1 -1
  370. package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js +1 -0
  371. package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js.map +1 -1
  372. package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js +17 -11
  373. package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js.map +1 -1
  374. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +62 -28
  375. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  376. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +1 -1
  377. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
  378. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/test/nylas-editor-tabs.spec.js +171 -1
  379. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/test/nylas-editor-tabs.spec.js.map +1 -1
  380. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +16 -7
  381. package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
  382. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +20 -9
  383. package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
  384. package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration.spec.js +55 -0
  385. package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration.spec.js.map +1 -0
  386. package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
  387. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
  388. package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +74 -29
  389. package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js.map +1 -1
  390. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +25 -11
  391. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
  392. package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
  393. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +16 -7
  394. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
  395. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +2 -2
  396. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
  397. package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js +32 -23
  398. package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js.map +1 -1
  399. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +32 -23
  400. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
  401. package/dist/collection/components/scheduler-editor/nylas-page-name/nylas-page-name.js +43 -28
  402. package/dist/collection/components/scheduler-editor/nylas-page-name/nylas-page-name.js.map +1 -1
  403. package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js +38 -26
  404. package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js.map +1 -1
  405. package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js +31 -12
  406. package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js.map +1 -1
  407. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +18 -8
  408. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
  409. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-participants-custom-availability.spec.js +47 -0
  410. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-participants-custom-availability.spec.js.map +1 -0
  411. package/dist/collection/components/scheduler-editor/nylas-reminder-emails/nylas-reminder-emails.js +3 -3
  412. package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js +1 -1
  413. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +1 -1
  414. package/dist/collection/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.js +34 -27
  415. package/dist/collection/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.js.map +1 -1
  416. package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
  417. package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +18 -53
  418. package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js.map +1 -1
  419. package/dist/collection/connector/shared/api/scheduler.js +12 -3
  420. package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
  421. package/dist/collection/types/index.js +7 -6
  422. package/dist/collection/types/index.js.map +1 -1
  423. package/dist/collection/utils/test-utils.js +9 -0
  424. package/dist/collection/utils/test-utils.js.map +1 -1
  425. package/dist/components/add-circle.js +1 -1
  426. package/dist/components/archive-icon.js +1 -1
  427. package/dist/components/arrow-icon.js +1 -1
  428. package/dist/components/bold-icon.js +1 -1
  429. package/dist/components/button-component2.js +1 -1
  430. package/dist/components/calendar-agenda-fill.js +1 -1
  431. package/dist/components/calendar-agenda.js +1 -1
  432. package/dist/components/calendar-cancel.js +1 -1
  433. package/dist/components/calendar-check.js +1 -1
  434. package/dist/components/calendar-info.js +1 -1
  435. package/dist/components/calendar-patterns.js +1 -1
  436. package/dist/components/calendar.js +1 -1
  437. package/dist/components/checkbox-component2.js +1 -1
  438. package/dist/components/checkmark-circle.js +1 -1
  439. package/dist/components/checkmark.js +1 -1
  440. package/dist/components/chevron.js +1 -1
  441. package/dist/components/clock.js +1 -1
  442. package/dist/components/close.js +1 -1
  443. package/dist/components/constants.js +1 -1
  444. package/dist/components/copy.js +1 -1
  445. package/dist/components/delete.js +1 -1
  446. package/dist/components/document-refresh-icon.js +1 -1
  447. package/dist/components/dragable.js +1 -1
  448. package/dist/components/edit.js +1 -1
  449. package/dist/components/envelope-fill.js +1 -1
  450. package/dist/components/envelope.js +1 -1
  451. package/dist/components/eye.js +1 -1
  452. package/dist/components/feedback-icon2.js +1 -1
  453. package/dist/components/flow.js +1 -1
  454. package/dist/components/folder-icon.js +1 -1
  455. package/dist/components/forward-icon.js +1 -1
  456. package/dist/components/globe.js +1 -1
  457. package/dist/components/google-logo.js +1 -1
  458. package/dist/components/google-meet.js +1 -1
  459. package/dist/components/inbox-icon.js +1 -1
  460. package/dist/components/info.js +1 -1
  461. package/dist/components/input-color-picker.js +2 -2
  462. package/dist/components/input-component2.js +1 -1
  463. package/dist/components/input-dropdown2.js +1 -1
  464. package/dist/components/input-image-url2.js +6 -2
  465. package/dist/components/input-image-url2.js.map +1 -1
  466. package/dist/components/italic-icon.js +1 -1
  467. package/dist/components/loading.js +1 -1
  468. package/dist/components/location-off.js +1 -1
  469. package/dist/components/location.js +1 -1
  470. package/dist/components/microsof-teams.js +1 -1
  471. package/dist/components/microsoft-logo.js +1 -1
  472. package/dist/components/multi-select-dropdown2.js +1 -1
  473. package/dist/components/nylas-additional-participants2.js +16 -20
  474. package/dist/components/nylas-additional-participants2.js.map +1 -1
  475. package/dist/components/nylas-availability-picker2.js +5 -4
  476. package/dist/components/nylas-availability-picker2.js.map +1 -1
  477. package/dist/components/nylas-booked-event-card2.js +8 -8
  478. package/dist/components/nylas-booked-event-card2.js.map +1 -1
  479. package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
  480. package/dist/components/nylas-booking-confirmation-redirect2.js +1 -1
  481. package/dist/components/nylas-booking-confirmation-redirect2.js.map +1 -1
  482. package/dist/components/nylas-booking-confirmation-type2.js +2 -2
  483. package/dist/components/nylas-booking-confirmation-type2.js.map +1 -1
  484. package/dist/components/nylas-booking-form-config2.js +1 -1
  485. package/dist/components/nylas-booking-form-config2.js.map +1 -1
  486. package/dist/components/nylas-booking-form2.js +6 -5
  487. package/dist/components/nylas-booking-form2.js.map +1 -1
  488. package/dist/components/nylas-buffer-time2.js.map +1 -1
  489. package/dist/components/nylas-calendar-picker2.js +4 -4
  490. package/dist/components/nylas-calendar-picker2.js.map +1 -1
  491. package/dist/components/nylas-cancel-booking-form2.js +4 -4
  492. package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
  493. package/dist/components/nylas-cancellation-policy2.js +1 -1
  494. package/dist/components/nylas-cancellation-policy2.js.map +1 -1
  495. package/dist/components/nylas-cancelled-event-card2.js +4 -4
  496. package/dist/components/nylas-cancelled-event-card2.js.map +1 -1
  497. package/dist/components/nylas-confirmation-email2.js +16 -6
  498. package/dist/components/nylas-confirmation-email2.js.map +1 -1
  499. package/dist/components/nylas-confirmed-event-card2.js +3 -3
  500. package/dist/components/nylas-confirmed-event-card2.js.map +1 -1
  501. package/dist/components/nylas-connected-calendars2.js +6 -2
  502. package/dist/components/nylas-connected-calendars2.js.map +1 -1
  503. package/dist/components/nylas-custom-booking-flow2.js +1 -1
  504. package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
  505. package/dist/components/nylas-custom-event-slug2.js +1 -0
  506. package/dist/components/nylas-custom-event-slug2.js.map +1 -1
  507. package/dist/components/nylas-customize-booking-settings2.js +4 -4
  508. package/dist/components/nylas-customize-booking-settings2.js.map +1 -1
  509. package/dist/components/nylas-date-picker2.js +4 -4
  510. package/dist/components/nylas-date-picker2.js.map +1 -1
  511. package/dist/components/nylas-editor-tabs2.js +196 -167
  512. package/dist/components/nylas-editor-tabs2.js.map +1 -1
  513. package/dist/components/nylas-event-description2.js +1 -1
  514. package/dist/components/nylas-event-description2.js.map +1 -1
  515. package/dist/components/nylas-event-duration2.js +5 -3
  516. package/dist/components/nylas-event-duration2.js.map +1 -1
  517. package/dist/components/nylas-event-info2.js +1 -1
  518. package/dist/components/nylas-event-limits2.js +1 -1
  519. package/dist/components/nylas-event-location2.js +39 -15
  520. package/dist/components/nylas-event-location2.js.map +1 -1
  521. package/dist/components/nylas-event-title2.js +10 -5
  522. package/dist/components/nylas-event-title2.js.map +1 -1
  523. package/dist/components/nylas-feedback-form2.js +2 -2
  524. package/dist/components/nylas-form-card2.js +1 -1
  525. package/dist/components/nylas-if-state.js +1 -1
  526. package/dist/components/nylas-limit-future-bookings2.js +1 -1
  527. package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
  528. package/dist/components/nylas-list-configurations2.js +2 -2
  529. package/dist/components/nylas-list-configurations2.js.map +1 -1
  530. package/dist/components/nylas-locale-switch2.js +2 -2
  531. package/dist/components/nylas-locale-switch2.js.map +1 -1
  532. package/dist/components/nylas-login.js +1 -1
  533. package/dist/components/nylas-logo2.js +1 -1
  534. package/dist/components/nylas-min-booking-notice2.js +3 -3
  535. package/dist/components/nylas-min-booking-notice2.js.map +1 -1
  536. package/dist/components/nylas-min-cancellation-notice2.js +3 -3
  537. package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
  538. package/dist/components/nylas-notification2.js +1 -1
  539. package/dist/components/nylas-organizer-confirmation-card2.js +3 -3
  540. package/dist/components/nylas-organizer-confirmation-card2.js.map +1 -1
  541. package/dist/components/nylas-page-name2.js +3 -3
  542. package/dist/components/nylas-page-name2.js.map +1 -1
  543. package/dist/components/nylas-page-styling2.js +3 -3
  544. package/dist/components/nylas-page-styling2.js.map +1 -1
  545. package/dist/components/nylas-participant-booking-calendars2.js +6 -2
  546. package/dist/components/nylas-participant-booking-calendars2.js.map +1 -1
  547. package/dist/components/nylas-participants-custom-availability2.js +3 -2
  548. package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
  549. package/dist/components/nylas-provider.js +1 -1
  550. package/dist/components/nylas-reminder-emails.js +1 -302
  551. package/dist/components/nylas-reminder-emails.js.map +1 -1
  552. package/dist/{esm/nylas-reminder-emails.entry.js → components/nylas-reminder-emails2.js} +123 -21
  553. package/dist/components/nylas-reminder-emails2.js.map +1 -0
  554. package/dist/components/nylas-reminder-time2.js +2 -2
  555. package/dist/components/nylas-scheduler-editor.js +179 -161
  556. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  557. package/dist/components/nylas-scheduling-method2.js +4 -6
  558. package/dist/components/nylas-scheduling-method2.js.map +1 -1
  559. package/dist/components/nylas-scheduling.js +22 -8
  560. package/dist/components/nylas-scheduling.js.map +1 -1
  561. package/dist/components/nylas-selected-event-card2.js +3 -3
  562. package/dist/components/nylas-selected-event-card2.js.map +1 -1
  563. package/dist/components/nylas-time-window-picker2.js +1 -1
  564. package/dist/components/nylas-timeslot-interval2.js +4 -8
  565. package/dist/components/nylas-timeslot-interval2.js.map +1 -1
  566. package/dist/components/nylas-timeslot-picker2.js +7 -7
  567. package/dist/components/nylas-timeslot-picker2.js.map +1 -1
  568. package/dist/components/paintbrush-fill.js +1 -1
  569. package/dist/components/paintbrush.js +1 -1
  570. package/dist/components/people.js +1 -1
  571. package/dist/components/person-clipboard.js +1 -1
  572. package/dist/components/person.js +1 -1
  573. package/dist/components/play-icon.js +1 -1
  574. package/dist/components/plus.js +1 -1
  575. package/dist/components/radio-button-group2.js +1 -1
  576. package/dist/components/refresh-icon.js +1 -1
  577. package/dist/components/reply-all-icon.js +1 -1
  578. package/dist/components/reply-icon.js +1 -1
  579. package/dist/components/scheduler-store.js +12 -3
  580. package/dist/components/scheduler-store.js.map +1 -1
  581. package/dist/components/search.js +1 -1
  582. package/dist/components/select-dropdown2.js +1 -1
  583. package/dist/components/sent-icon.js +1 -1
  584. package/dist/components/spam-icon.js +1 -1
  585. package/dist/components/star-icon.js +1 -1
  586. package/dist/components/stop-icon.js +1 -1
  587. package/dist/components/textarea-component2.js +1 -1
  588. package/dist/components/time-period-selector2.js +1 -1
  589. package/dist/components/toggle-switch2.js +1 -1
  590. package/dist/components/toolitp-component.js +1 -1
  591. package/dist/components/translate.js +1 -1
  592. package/dist/components/trash-fill-icon.js +1 -1
  593. package/dist/components/trash.js +1 -1
  594. package/dist/components/underline-icon.js +1 -1
  595. package/dist/components/warning.js +1 -1
  596. package/dist/components/zoom.js +1 -1
  597. package/dist/esm/add-circle-icon_2.entry.js +2 -2
  598. package/dist/esm/archive-icon.entry.js +1 -1
  599. package/dist/esm/arrow-icon.entry.js +1 -1
  600. package/dist/esm/bold-icon.entry.js +1 -1
  601. package/dist/esm/button-component_2.entry.js +2 -2
  602. package/dist/esm/{calendar-agenda-fill-icon_51.entry.js → calendar-agenda-fill-icon_54.entry.js} +735 -328
  603. package/dist/esm/calendar-agenda-fill-icon_54.entry.js.map +1 -0
  604. package/dist/esm/calendar-cancel-icon.entry.js +1 -1
  605. package/dist/esm/calendar-check-icon_2.entry.js +2 -2
  606. package/dist/esm/calendar-icon.entry.js +1 -1
  607. package/dist/esm/checkbox-component_2.entry.js +2 -2
  608. package/dist/esm/chevron-icon_3.entry.js +3 -3
  609. package/dist/esm/clock-icon_4.entry.js +4 -4
  610. package/dist/esm/{constants-94520f89.js → constants-c549b12b.js} +2 -2
  611. package/dist/esm/{constants-94520f89.js.map → constants-c549b12b.js.map} +1 -1
  612. package/dist/esm/copy-icon.entry.js +1 -1
  613. package/dist/esm/delete-icon.entry.js +1 -1
  614. package/dist/esm/document-refresh-icon.entry.js +1 -1
  615. package/dist/esm/folder-icon.entry.js +1 -1
  616. package/dist/esm/forward-icon.entry.js +1 -1
  617. package/dist/esm/globe-icon.entry.js +1 -1
  618. package/dist/esm/google-logo-icon_4.entry.js +35 -24
  619. package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
  620. package/dist/esm/inbox-icon.entry.js +1 -1
  621. package/dist/esm/index-7cb0dd3d.js +2 -10
  622. package/dist/esm/info-icon_2.entry.js +2 -2
  623. package/dist/esm/input-color-picker.entry.js +2 -2
  624. package/dist/esm/input-component.entry.js +1 -1
  625. package/dist/esm/input-dropdown.entry.js +1 -1
  626. package/dist/esm/italic-icon.entry.js +1 -1
  627. package/dist/esm/loader.js +1 -1
  628. package/dist/esm/multi-select-dropdown.entry.js +1 -1
  629. package/dist/esm/nylas-booked-event-card_12.entry.js +36 -35
  630. package/dist/esm/nylas-booked-event-card_12.entry.js.map +1 -1
  631. package/dist/esm/nylas-form-card.entry.js +1 -1
  632. package/dist/esm/nylas-if-state.entry.js +1 -1
  633. package/dist/esm/nylas-login.entry.js +1 -1
  634. package/dist/esm/nylas-provider.entry.js +2 -2
  635. package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
  636. package/dist/esm/nylas-scheduling.entry.js +23 -10
  637. package/dist/esm/nylas-scheduling.entry.js.map +1 -1
  638. package/dist/esm/nylas-time-window-picker.entry.js +1 -1
  639. package/dist/esm/nylas-web-elements.js +1 -1
  640. package/dist/esm/person-icon.entry.js +1 -1
  641. package/dist/esm/play-icon.entry.js +1 -1
  642. package/dist/esm/refresh-icon.entry.js +1 -1
  643. package/dist/esm/reply-all-icon.entry.js +1 -1
  644. package/dist/esm/reply-icon.entry.js +1 -1
  645. package/dist/esm/{scheduler-store-24e5fb65.js → scheduler-store-d4784b24.js} +13 -4
  646. package/dist/esm/scheduler-store-d4784b24.js.map +1 -0
  647. package/dist/esm/sent-icon.entry.js +1 -1
  648. package/dist/esm/spam-icon.entry.js +1 -1
  649. package/dist/esm/star-icon.entry.js +1 -1
  650. package/dist/esm/stop-icon.entry.js +1 -1
  651. package/dist/esm/textarea-component.entry.js +1 -1
  652. package/dist/esm/time-period-selector.entry.js +1 -1
  653. package/dist/esm/translate-icon.entry.js +1 -1
  654. package/dist/esm/trash-fill-icon.entry.js +1 -1
  655. package/dist/esm/underline-icon.entry.js +1 -1
  656. package/dist/esm/warning-icon.entry.js +1 -1
  657. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  658. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  659. package/dist/nylas-web-elements/{p-14493c1f.entry.js → p-04d397d3.entry.js} +2 -2
  660. package/dist/nylas-web-elements/{p-b6e4de5b.js → p-08a590fe.js} +2 -2
  661. package/dist/nylas-web-elements/{p-7943a9f3.entry.js → p-108bd821.entry.js} +2 -2
  662. package/dist/nylas-web-elements/p-12d690b8.js +2 -0
  663. package/dist/nylas-web-elements/p-12d690b8.js.map +1 -0
  664. package/dist/nylas-web-elements/{p-d902a356.entry.js → p-1546bd61.entry.js} +2 -2
  665. package/dist/nylas-web-elements/{p-651232a3.entry.js → p-1c25b695.entry.js} +2 -2
  666. package/dist/nylas-web-elements/{p-caad44c4.entry.js → p-2c1432a2.entry.js} +2 -2
  667. package/dist/nylas-web-elements/{p-21fb688e.entry.js → p-2f91359b.entry.js} +2 -2
  668. package/dist/nylas-web-elements/{p-27074ad6.entry.js → p-3268077f.entry.js} +2 -2
  669. package/dist/nylas-web-elements/p-32bc7f60.entry.js +2 -0
  670. package/dist/nylas-web-elements/p-33800554.entry.js +2 -0
  671. package/dist/nylas-web-elements/p-3971e86b.entry.js +2 -0
  672. package/dist/nylas-web-elements/p-483f2fb4.entry.js +2 -0
  673. package/dist/nylas-web-elements/{p-8a082b24.entry.js → p-4e57a9ee.entry.js} +2 -2
  674. package/dist/nylas-web-elements/p-4fb91c8b.entry.js +2 -0
  675. package/dist/nylas-web-elements/{p-effd77ed.entry.js → p-525bd709.entry.js} +2 -2
  676. package/dist/nylas-web-elements/{p-7d5b3918.entry.js → p-56834b7a.entry.js} +2 -2
  677. package/dist/nylas-web-elements/{p-faeec15a.entry.js → p-5ed596d7.entry.js} +2 -2
  678. package/dist/nylas-web-elements/{p-6fa4597b.entry.js → p-6089d6fa.entry.js} +2 -2
  679. package/dist/nylas-web-elements/{p-39af67b7.entry.js → p-61ea19c2.entry.js} +2 -2
  680. package/dist/nylas-web-elements/p-713505c9.entry.js +2 -0
  681. package/dist/nylas-web-elements/{p-bd85bf92.entry.js → p-7140bca8.entry.js} +2 -2
  682. package/dist/nylas-web-elements/{p-3f2f3b85.entry.js → p-762ae706.entry.js} +2 -2
  683. package/dist/nylas-web-elements/p-7919d41d.entry.js +2 -0
  684. package/dist/nylas-web-elements/p-7a1d51ab.entry.js +2 -0
  685. package/dist/nylas-web-elements/p-7a1d51ab.entry.js.map +1 -0
  686. package/dist/nylas-web-elements/p-7bed0959.entry.js +2 -0
  687. package/dist/nylas-web-elements/p-7bed0959.entry.js.map +1 -0
  688. package/dist/nylas-web-elements/{p-27b52475.entry.js → p-7c20444b.entry.js} +2 -2
  689. package/dist/nylas-web-elements/{p-d55f619c.entry.js → p-988eee6f.entry.js} +2 -2
  690. package/dist/nylas-web-elements/{p-0519e48e.entry.js → p-9d8ffc7b.entry.js} +2 -2
  691. package/dist/nylas-web-elements/{p-fbddb6fe.entry.js → p-9f009793.entry.js} +2 -2
  692. package/dist/nylas-web-elements/{p-1e2ffdc6.entry.js → p-aa4b24ce.entry.js} +2 -2
  693. package/dist/nylas-web-elements/{p-5973b208.entry.js → p-ac8386d1.entry.js} +2 -2
  694. package/dist/nylas-web-elements/{p-062f6da2.entry.js → p-acfe4f6e.entry.js} +2 -2
  695. package/dist/nylas-web-elements/p-af2ab331.entry.js +2 -0
  696. package/dist/nylas-web-elements/{p-100c9ff7.entry.js → p-b110d5c1.entry.js} +2 -2
  697. package/dist/nylas-web-elements/p-bbf86b8c.entry.js +2 -0
  698. package/dist/nylas-web-elements/{p-e012eac3.entry.js → p-be938025.entry.js} +2 -2
  699. package/dist/nylas-web-elements/{p-36792b8a.entry.js → p-cad17478.entry.js} +2 -2
  700. package/dist/nylas-web-elements/p-ce2c8e67.entry.js +2 -0
  701. package/dist/nylas-web-elements/{p-68320c97.entry.js → p-d1abdef7.entry.js} +2 -2
  702. package/dist/nylas-web-elements/{p-8013d0a2.entry.js → p-dcdb47dd.entry.js} +2 -2
  703. package/dist/nylas-web-elements/p-df131a08.entry.js +8 -0
  704. package/dist/nylas-web-elements/p-df131a08.entry.js.map +1 -0
  705. package/dist/nylas-web-elements/{p-cc8f94f7.entry.js → p-e1cd1887.entry.js} +2 -2
  706. package/dist/nylas-web-elements/{p-00d89615.entry.js → p-eb2d8167.entry.js} +2 -2
  707. package/dist/nylas-web-elements/{p-9b62edf6.entry.js → p-ec302526.entry.js} +2 -2
  708. package/dist/nylas-web-elements/{p-bbcf8659.entry.js → p-ec528a20.entry.js} +2 -2
  709. package/dist/nylas-web-elements/{p-0e0c00cc.entry.js → p-eee29c7e.entry.js} +2 -2
  710. package/dist/nylas-web-elements/{p-f62df769.entry.js → p-f2ae34c9.entry.js} +2 -2
  711. package/dist/nylas-web-elements/p-fc6ae4ec.entry.js +2 -0
  712. package/dist/nylas-web-elements/p-fc6ae4ec.entry.js.map +1 -0
  713. package/dist/nylas-web-elements/p-fe34d0ee.entry.js +2 -0
  714. package/dist/nylas-web-elements/p-febf4adf.entry.js +2 -0
  715. package/dist/types/common/types.d.ts +3 -0
  716. package/dist/types/components/design-system/input-image-url/input-image-url.d.ts +4 -0
  717. package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +2 -2
  718. package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +3 -4
  719. package/dist/types/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.d.ts +1 -1
  720. package/dist/types/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.d.ts +1 -1
  721. package/dist/types/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.d.ts +1 -1
  722. package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +1 -1
  723. package/dist/types/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.d.ts +1 -1
  724. package/dist/types/components/scheduler/nylas-scheduling/nylas-scheduling.d.ts +5 -3
  725. package/dist/types/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.d.ts +2 -2
  726. package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +3 -3
  727. package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +1 -1
  728. package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +2 -2
  729. package/dist/types/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.d.ts +5 -1
  730. package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +2 -1
  731. package/dist/types/components/scheduler-editor/nylas-event-location/nylas-event-location.d.ts +2 -0
  732. package/dist/types/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.d.ts +1 -1
  733. package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +1 -1
  734. package/dist/types/components/scheduler-editor/nylas-page-name/nylas-page-name.d.ts +1 -1
  735. package/dist/types/components/scheduler-editor/nylas-page-styling/nylas-page-styling.d.ts +1 -1
  736. package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +1 -0
  737. package/dist/types/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.d.ts +1 -1
  738. package/dist/types/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.d.ts +0 -2
  739. package/dist/types/components.d.ts +265 -290
  740. package/dist/types/connector/shared/api/scheduler.d.ts +4 -4
  741. package/dist/types/types/index.d.ts +164 -32
  742. package/package.json +7 -5
  743. package/dist/cjs/calendar-agenda-fill-icon_51.cjs.entry.js.map +0 -1
  744. package/dist/cjs/nylas-reminder-emails.cjs.entry.js +0 -208
  745. package/dist/cjs/nylas-reminder-emails.cjs.entry.js.map +0 -1
  746. package/dist/cjs/nylas-reminder-time_2.cjs.entry.js +0 -175
  747. package/dist/cjs/nylas-reminder-time_2.cjs.entry.js.map +0 -1
  748. package/dist/cjs/scheduler-store-4489a68b.js.map +0 -1
  749. package/dist/esm/calendar-agenda-fill-icon_51.entry.js.map +0 -1
  750. package/dist/esm/nylas-reminder-emails.entry.js.map +0 -1
  751. package/dist/esm/nylas-reminder-time_2.entry.js +0 -170
  752. package/dist/esm/nylas-reminder-time_2.entry.js.map +0 -1
  753. package/dist/esm/scheduler-store-24e5fb65.js.map +0 -1
  754. package/dist/nylas-web-elements/p-06e44cfc.entry.js +0 -2
  755. package/dist/nylas-web-elements/p-06e44cfc.entry.js.map +0 -1
  756. package/dist/nylas-web-elements/p-2653e311.entry.js +0 -2
  757. package/dist/nylas-web-elements/p-3ff76491.entry.js +0 -2
  758. package/dist/nylas-web-elements/p-3ff76491.entry.js.map +0 -1
  759. package/dist/nylas-web-elements/p-51a66bf5.entry.js +0 -2
  760. package/dist/nylas-web-elements/p-5b237299.entry.js +0 -2
  761. package/dist/nylas-web-elements/p-63341f71.entry.js +0 -2
  762. package/dist/nylas-web-elements/p-6c833d5e.entry.js +0 -2
  763. package/dist/nylas-web-elements/p-6c833d5e.entry.js.map +0 -1
  764. package/dist/nylas-web-elements/p-742d7c3c.entry.js +0 -2
  765. package/dist/nylas-web-elements/p-76fc639b.entry.js +0 -2
  766. package/dist/nylas-web-elements/p-781e954b.entry.js +0 -2
  767. package/dist/nylas-web-elements/p-7f56a139.entry.js +0 -2
  768. package/dist/nylas-web-elements/p-7f56a139.entry.js.map +0 -1
  769. package/dist/nylas-web-elements/p-86194780.entry.js +0 -2
  770. package/dist/nylas-web-elements/p-86194780.entry.js.map +0 -1
  771. package/dist/nylas-web-elements/p-96bcc255.entry.js +0 -2
  772. package/dist/nylas-web-elements/p-aeab587c.entry.js +0 -2
  773. package/dist/nylas-web-elements/p-c417fd2f.entry.js +0 -2
  774. package/dist/nylas-web-elements/p-ef3561ae.js +0 -2
  775. package/dist/nylas-web-elements/p-ef3561ae.js.map +0 -1
  776. package/dist/nylas-web-elements/p-fbe814b2.entry.js +0 -8
  777. package/dist/nylas-web-elements/p-fbe814b2.entry.js.map +0 -1
  778. package/dist/nylas-web-elements/p-fdc60ce2.entry.js +0 -2
  779. package/dist/nylas-web-elements/p-fecf68ef.entry.js +0 -2
  780. /package/dist/nylas-web-elements/{p-14493c1f.entry.js.map → p-04d397d3.entry.js.map} +0 -0
  781. /package/dist/nylas-web-elements/{p-b6e4de5b.js.map → p-08a590fe.js.map} +0 -0
  782. /package/dist/nylas-web-elements/{p-7943a9f3.entry.js.map → p-108bd821.entry.js.map} +0 -0
  783. /package/dist/nylas-web-elements/{p-d902a356.entry.js.map → p-1546bd61.entry.js.map} +0 -0
  784. /package/dist/nylas-web-elements/{p-651232a3.entry.js.map → p-1c25b695.entry.js.map} +0 -0
  785. /package/dist/nylas-web-elements/{p-caad44c4.entry.js.map → p-2c1432a2.entry.js.map} +0 -0
  786. /package/dist/nylas-web-elements/{p-21fb688e.entry.js.map → p-2f91359b.entry.js.map} +0 -0
  787. /package/dist/nylas-web-elements/{p-27074ad6.entry.js.map → p-3268077f.entry.js.map} +0 -0
  788. /package/dist/nylas-web-elements/{p-aeab587c.entry.js.map → p-32bc7f60.entry.js.map} +0 -0
  789. /package/dist/nylas-web-elements/{p-76fc639b.entry.js.map → p-33800554.entry.js.map} +0 -0
  790. /package/dist/nylas-web-elements/{p-781e954b.entry.js.map → p-3971e86b.entry.js.map} +0 -0
  791. /package/dist/nylas-web-elements/{p-63341f71.entry.js.map → p-483f2fb4.entry.js.map} +0 -0
  792. /package/dist/nylas-web-elements/{p-8a082b24.entry.js.map → p-4e57a9ee.entry.js.map} +0 -0
  793. /package/dist/nylas-web-elements/{p-5b237299.entry.js.map → p-4fb91c8b.entry.js.map} +0 -0
  794. /package/dist/nylas-web-elements/{p-effd77ed.entry.js.map → p-525bd709.entry.js.map} +0 -0
  795. /package/dist/nylas-web-elements/{p-7d5b3918.entry.js.map → p-56834b7a.entry.js.map} +0 -0
  796. /package/dist/nylas-web-elements/{p-faeec15a.entry.js.map → p-5ed596d7.entry.js.map} +0 -0
  797. /package/dist/nylas-web-elements/{p-6fa4597b.entry.js.map → p-6089d6fa.entry.js.map} +0 -0
  798. /package/dist/nylas-web-elements/{p-39af67b7.entry.js.map → p-61ea19c2.entry.js.map} +0 -0
  799. /package/dist/nylas-web-elements/{p-fdc60ce2.entry.js.map → p-713505c9.entry.js.map} +0 -0
  800. /package/dist/nylas-web-elements/{p-bd85bf92.entry.js.map → p-7140bca8.entry.js.map} +0 -0
  801. /package/dist/nylas-web-elements/{p-3f2f3b85.entry.js.map → p-762ae706.entry.js.map} +0 -0
  802. /package/dist/nylas-web-elements/{p-c417fd2f.entry.js.map → p-7919d41d.entry.js.map} +0 -0
  803. /package/dist/nylas-web-elements/{p-27b52475.entry.js.map → p-7c20444b.entry.js.map} +0 -0
  804. /package/dist/nylas-web-elements/{p-d55f619c.entry.js.map → p-988eee6f.entry.js.map} +0 -0
  805. /package/dist/nylas-web-elements/{p-0519e48e.entry.js.map → p-9d8ffc7b.entry.js.map} +0 -0
  806. /package/dist/nylas-web-elements/{p-fbddb6fe.entry.js.map → p-9f009793.entry.js.map} +0 -0
  807. /package/dist/nylas-web-elements/{p-1e2ffdc6.entry.js.map → p-aa4b24ce.entry.js.map} +0 -0
  808. /package/dist/nylas-web-elements/{p-5973b208.entry.js.map → p-ac8386d1.entry.js.map} +0 -0
  809. /package/dist/nylas-web-elements/{p-062f6da2.entry.js.map → p-acfe4f6e.entry.js.map} +0 -0
  810. /package/dist/nylas-web-elements/{p-742d7c3c.entry.js.map → p-af2ab331.entry.js.map} +0 -0
  811. /package/dist/nylas-web-elements/{p-100c9ff7.entry.js.map → p-b110d5c1.entry.js.map} +0 -0
  812. /package/dist/nylas-web-elements/{p-fecf68ef.entry.js.map → p-bbf86b8c.entry.js.map} +0 -0
  813. /package/dist/nylas-web-elements/{p-e012eac3.entry.js.map → p-be938025.entry.js.map} +0 -0
  814. /package/dist/nylas-web-elements/{p-36792b8a.entry.js.map → p-cad17478.entry.js.map} +0 -0
  815. /package/dist/nylas-web-elements/{p-2653e311.entry.js.map → p-ce2c8e67.entry.js.map} +0 -0
  816. /package/dist/nylas-web-elements/{p-68320c97.entry.js.map → p-d1abdef7.entry.js.map} +0 -0
  817. /package/dist/nylas-web-elements/{p-8013d0a2.entry.js.map → p-dcdb47dd.entry.js.map} +0 -0
  818. /package/dist/nylas-web-elements/{p-cc8f94f7.entry.js.map → p-e1cd1887.entry.js.map} +0 -0
  819. /package/dist/nylas-web-elements/{p-00d89615.entry.js.map → p-eb2d8167.entry.js.map} +0 -0
  820. /package/dist/nylas-web-elements/{p-9b62edf6.entry.js.map → p-ec302526.entry.js.map} +0 -0
  821. /package/dist/nylas-web-elements/{p-bbcf8659.entry.js.map → p-ec528a20.entry.js.map} +0 -0
  822. /package/dist/nylas-web-elements/{p-0e0c00cc.entry.js.map → p-eee29c7e.entry.js.map} +0 -0
  823. /package/dist/nylas-web-elements/{p-f62df769.entry.js.map → p-f2ae34c9.entry.js.map} +0 -0
  824. /package/dist/nylas-web-elements/{p-96bcc255.entry.js.map → p-fe34d0ee.entry.js.map} +0 -0
  825. /package/dist/nylas-web-elements/{p-51a66bf5.entry.js.map → p-febf4adf.entry.js.map} +0 -0
@@ -41,7 +41,7 @@ const NylasEventInfo = proxyCustomElement(class NylasEventInfo extends HTMLEleme
41
41
  debug('nylas-event-info', 'disconnectedCallback');
42
42
  }
43
43
  render() {
44
- return (h(Host, { key: 'dc82e6a261c9515aa2dedd61467e0623f9f419fb' }, h("nylas-form-card", { key: 'b3f4473a4a4dfb29df9b31a1d606805c277cd283', exportparts: "nfc__header: nei__header" }, h("h1", { key: '4bc5e24bf0ee20b7e080cc7fd819bcc0acf05003', slot: "header-title", class: "nylas-event-info__title", part: "nei__title" }, "Event information"), h("div", { key: 'be7927569d4e5d0abf462f5a7461ac5270956b99', slot: "content", class: "nylas-event-info__content" }, h("slot", { key: 'f02a64031f7a344928d81743628c07448fe7561f', name: "inputs" })))));
44
+ return (h(Host, { key: 'be80a4e687ce223a8e52bbabc2e8acadcb194b11' }, h("nylas-form-card", { key: 'c96b77795ec2516889acf0f78c5eb723b26dd89c', exportparts: "nfc__header: nei__header" }, h("h1", { key: '890113187adcd6be1ab1d1beb489fe3a80124617', slot: "header-title", class: "nylas-event-info__title", part: "nei__title" }, "Event information"), h("div", { key: '44eaaae3833654530706dc93077b43a7597acc2c', slot: "content", class: "nylas-event-info__content" }, h("slot", { key: '7af737a67cb007c0ede7db5aa075828311d98da3', name: "inputs" })))));
45
45
  }
46
46
  static get formAssociated() { return true; }
47
47
  get el() { return this; }
@@ -41,7 +41,7 @@ const NylasEventLimits = proxyCustomElement(class NylasEventLimits extends HTMLE
41
41
  debug('nylas-event-limits', 'disconnectedCallback');
42
42
  }
43
43
  render() {
44
- return (h(Host, { key: '519286fc0ed67cc0de7e780957e285c34849d89a' }, h("nylas-form-card", { key: '71b2bf98ab68f54e45de482c6f6e01bed7b8d5a6', exportparts: "nfc__header: nel__header" }, h("h1", { key: '5e44cbcf5f9ea2a3e7d6c66321717e8d00e5f83b', slot: "header-title", class: "nylas-event-limits__title" }, "Event limits"), h("div", { key: '246e33890f149cd6530ac6b944a0ca70a731b696', slot: "content", class: "nylas-event-limits__content" }, h("slot", { key: 'c614cec4d14660c1167336bdd686b2f31bd74119', name: "inputs" })))));
44
+ return (h(Host, { key: '6a28113e3b403869e77cc3a2c9c3a1bea217dc52' }, h("nylas-form-card", { key: 'cf9004d044222d796ae59df58737ad9719a20576', exportparts: "nfc__header: nel__header" }, h("h1", { key: 'ffeeb7a5741c9f07fb4f9bd84016b1707e2b55b7', slot: "header-title", class: "nylas-event-limits__title" }, "Event limits"), h("div", { key: '7b51592d95736f860ec805950275a18e9d914c32', slot: "content", class: "nylas-event-limits__content" }, h("slot", { key: '53e9098d736eedf5b22e1b8ae712ec22c8ca865e', name: "inputs" })))));
45
45
  }
46
46
  static get formAssociated() { return true; }
47
47
  get el() { return this; }
@@ -30,6 +30,13 @@ var __metadata = (undefined && undefined.__metadata) || function (k, v) {
30
30
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
31
31
  return Reflect.metadata(k, v);
32
32
  };
33
+ const labels = {
34
+ none: 'None',
35
+ custom: 'Custom location',
36
+ google: 'Google Meet',
37
+ microsoft: 'Microsoft Teams',
38
+ zoom: 'Zoom Meeting',
39
+ };
33
40
  const NylasEventLocation = proxyCustomElement(class NylasEventLocation extends HTMLElement {
34
41
  constructor() {
35
42
  super();
@@ -46,7 +53,7 @@ const NylasEventLocation = proxyCustomElement(class NylasEventLocation extends H
46
53
  this.eventLocation = undefined;
47
54
  this.location = this.eventLocation ?? '';
48
55
  this.grantId = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : '';
49
- this.selectedLocationOption = this.eventConferencing ? this.setDefaultLocationOption(this.eventConferencing, this.location) : '';
56
+ this.selectedLocationOption = this.eventConferencing ? this.setDefaultLocationOption(this.eventConferencing, this.location) : 'none';
50
57
  this.userProviderState = this.userProvider ?? '';
51
58
  }
52
59
  elementNameChangedHandler(newValue) {
@@ -173,33 +180,50 @@ const NylasEventLocation = proxyCustomElement(class NylasEventLocation extends H
173
180
  this.setFormValue(value, this.name);
174
181
  this.valueChanged.emit({ value: value, name: this.name });
175
182
  }
183
+ getIcon(location) {
184
+ switch (location) {
185
+ case 'none':
186
+ return h("location-off-icon", null);
187
+ case 'custom':
188
+ return h("location-icon", null);
189
+ case 'google':
190
+ return h("google-meet-icon", null);
191
+ case 'microsoft':
192
+ return h("microsoft-teams-icon", null);
193
+ case 'zoom':
194
+ return h("zoom-icon", null);
195
+ }
196
+ }
197
+ getLabelHTML(location) {
198
+ return (h("span", { class: "location-label", style: {
199
+ display: 'flex',
200
+ alignItems: 'center',
201
+ gap: '16px',
202
+ width: '-webkit-fill-available',
203
+ } }, this.getIcon(location), h("span", { class: "location-text", style: {
204
+ fontSize: '14px',
205
+ fontWeight: '400',
206
+ } }, labels[location])));
207
+ }
176
208
  render() {
177
209
  const locationOptions = [
178
- { value: 'none', label: 'None' },
179
- { value: 'custom', label: 'Custom location' },
210
+ { value: 'none', label: labels['none'], labelHTML: this.getLabelHTML('none') },
211
+ { value: 'custom', label: labels['custom'], labelHTML: this.getLabelHTML('custom') },
180
212
  ];
181
213
  switch (this.userProviderState) {
182
214
  case 'google':
183
- locationOptions.push({ value: 'google', label: 'Google Meet' });
215
+ locationOptions.push({ value: 'google', label: labels['google'], labelHTML: this.getLabelHTML('google') });
184
216
  break;
185
217
  case 'microsoft':
186
- locationOptions.push({ value: 'microsoft', label: 'Microsoft Teams' });
218
+ locationOptions.push({ value: 'microsoft', label: labels['microsoft'], labelHTML: this.getLabelHTML('microsoft') });
187
219
  break;
188
220
  }
189
221
  if (this.conferenceProviders?.['zoom']) {
190
- locationOptions.push({ value: 'zoom', label: 'Zoom Meeting' });
222
+ locationOptions.push({ value: 'zoom', label: labels['zoom'], labelHTML: this.getLabelHTML('zoom') });
191
223
  }
192
224
  const newLocationOptions = [...locationOptions];
193
225
  const defaultOption = locationOptions.find(i => i.value == this.selectedLocationOption);
194
- const icons = {
195
- none: h("location-off-icon", { key: '2482c1d7540ae00fddbff24ddf0b4189685e3db4' }),
196
- custom: h("location-icon", { key: 'aeb4445371396bad7b3062e0a0ce62f4227f97c4' }),
197
- google: h("google-meet-icon", { key: '6e790972192ecca0900dea5904d3f318d19341cc' }),
198
- microsoft: h("microsoft-teams-icon", { key: '1b372c0129879cf9c16b015ba4fdb6d1cee40597' }),
199
- zoom: h("zoom-icon", { key: '1b46c44aa6db92e2e136bbab6fa98f17376da160' }),
200
- };
201
- const locationIcon = icons[this.selectedLocationOption];
202
- return (h(Host, { key: 'f2870194d69bf49afadd49f87c42fb085f60b085' }, h("div", { key: '247dd130e13d9e8287da1f5d83656f40a2ad313d', class: "nylas-event-location", part: "nel" }, h("label", { key: 'b7d548b8522830155db8fd2fc7eca8793e8bb8e1', htmlFor: "location" }, "Event meeting or location", h("span", { key: '587c6c27f6f89ed5a263372123bd509b5984025f', class: "label-icon" }, h("tooltip-component", { key: '0dad9cbc3627fe4c549fbdba418119b205b1e812' }, h("info-icon", { key: '6a3938dc0cee21a1c8379b33720ada33c96edacd', slot: "tooltip-icon" }), h("span", { key: 'dbff5af98e90895815712d4e55bf57c3fdd2f5c4', slot: "tooltip-content" }, "Select a conferencing option or add a custom location.")))), h("div", { key: '0fe09f3fc8c30a8203a1207357f8e20a81a4bf28', class: "location-input" }, defaultOption?.label && (h("select-dropdown", { withSearch: false, name: "location", options: newLocationOptions, defaultSelectedOption: defaultOption, exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, h("span", { slot: "select-icon" }, locationIcon))), this.selectedLocationOption === 'custom' && (h("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: e => this.handleChange(e) }))))));
226
+ return (h(Host, { key: '9ace3d0c618879dede4f6ea52aed41a0e193352f' }, h("div", { key: '06f62cedba0696aabc59058f9d1cce12819f350b', class: "nylas-event-location", part: "nel" }, h("label", { key: '584acc644bdeddcb319395b531a7dad90a165452', htmlFor: "location" }, "Event meeting or location", h("span", { key: 'a4e2414ab1cf5c83c5f487a21d22d5c66f5b945d', class: "label-icon" }, h("tooltip-component", { key: '41a0429b5987bd6359c2fd42e8ab4abf67a3f83e' }, h("info-icon", { key: '8723ecf7cd91edee84b3ca28ffba0c4b3d3967f0', slot: "tooltip-icon" }), h("span", { key: 'e0201540705e2aa0a94357fd2dd1af95887abe71', slot: "tooltip-content" }, "Select a conferencing option or add a custom location.")))), h("div", { key: 'e983eb85462b31b665edad087c4aea7259c85407', class: "location-input" }, defaultOption?.label && (h("select-dropdown", { withSearch: false, name: "location", options: newLocationOptions, defaultSelectedOption: defaultOption, exportparts: "sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content" }, h("span", { slot: "select-icon" }, this.getIcon(this.selectedLocationOption)))), this.selectedLocationOption === 'custom' && (h("input", { type: "text", part: "nel__location", id: "location", name: "location", maxlength: "1024", value: this.location, onInput: e => this.handleChange(e) }))))));
203
227
  }
204
228
  static get formAssociated() { return true; }
205
229
  get host() { return this; }
@@ -1 +1 @@
1
- {"file":"nylas-event-location2.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,gyEAAgyE,CAAC;AAC/zE,iCAAe,qBAAqB;;;;;;;;;;;;;;;;MCuBvB,kBAAkB;;;;;;;oBAQN,UAAU;;;;;;;wBAgCL,IAAI,CAAC,aAAa,IAAI,EAAE;uBAIzB,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE;sCAI7D,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;iCAIvG,IAAI,CAAC,YAAY,IAAI,EAAE;;IAY5D,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,sBAAsB,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACrE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KAC1C;IAGD,mCAAmC,CAAC,QAAuB;QACzD,KAAK,CAAC,2BAA2B,EAAE,qCAAqC,EAAE,QAAQ,CAAC,CAAC;QACpF,MAAM,cAAc,GAAG,QAAQ,EAAE,aAAa,EAAE,QAAQ,CAAC;QACzD,MAAM,kBAAkB,GAAG,QAA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E,KAAK,KACnB,uBACE,UAAU,EAAE,KAAK,EACjB,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,kBAAkB,EAC3B,qBAAqB,EAAE,aAAa,EACpC,WAAW,EAAC,kHAAkH,IAE9H,YAAM,IAAI,EAAC,aAAa,IAAE,YAAY,CAAQ,CAC9B,CACnB,EACA,IAAI,CAAC,sBAAsB,KAAK,QAAQ,KACvC,aAAO,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,eAAe,EAAC,EAAE,EAAC,UAAU,EAAC,IAAI,EAAC,UAAU,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,GAAI,CACpJ,CACG,CACF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;AA3DD;IAVC,iBAAiB,CAAwG;QACxH,IAAI,EAAE,sBAAsB;QAC5B,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,qCAAqC,EAAE,qBAAqB,CAAC;YAC9D,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;gDA4DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-event-location/nylas-event-location.scss?tag=nylas-event-location&encapsulation=shadow","src/components/scheduler-editor/nylas-event-location/nylas-event-location.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n\n span[slot='select-icon'] {\n border-right: 1px solid var(--nylas-base-200);\n padding: 16px 0.75rem 16px 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n height: 20px;\n }\n div.location-input {\n display: grid;\n grid-template-columns: auto 1fr;\n width: 100%;\n gap: 0.5rem;\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n input {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 12px 16px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n }\n select-dropdown {\n width: 208px;\n @media #{$mobile} {\n width: 100%;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-content) {\n left: calc(35px + 0.5rem);\n }\n select-dropdown::part(sd_dropdown-button) {\n display: flex;\n justify-content: space-between;\n width: 100%;\n border: 1px solid var(--nylas-base-200);\n padding: 0 0.5rem;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n display: inline-flex;\n align-self: center;\n padding: 14px 0;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Conference, Configuration } from '@nylas/core';\nimport { CONFERENCE_PROVIDER_MAP, PROVIDER_CONFERENCE_MAP } from '@/common/constants';\nimport { User } from '@/common/nylas-api-request';\n\n/**\n * The `nylas-event-location` component is a form input for the location of an event.\n *\n * @part nel - The event location container\n * @part nel__location - The event location input\n * @part nel__dropdown - The dropdown container\n * @part nel__dropdown-button - The dropdown button\n * @part nel__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-event-location',\n styleUrl: 'nylas-event-location.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLocation {\n /*\n * The host element <nylas-event-location>\n */\n @Element() host!: HTMLElement;\n /**\n * The name of the event location input.\n */\n @Prop() name: string = 'location';\n\n /**\n * The current user\n */\n @Prop() currentUser?: User;\n /**\n * The users provider\n */\n @Prop() userProvider?: string;\n /**\n * The event conferencing stored in the configuration\n */\n @Prop() eventConferencing?: Conference;\n /**\n * The conference providers where the key is the provider name ('zoom') and the value is the grant id.\n * We currently support same provider ('google', 'microsoft') for all participants and 'zoom' for cross-provider conferencing.\n */\n @Prop() conferenceProviders?: Record<string, string>;\n\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * The event location stored in the configuration\n */\n @Prop() eventLocation?: string;\n /**\n * The selected event location state. This defaults to the event location from the configuration or an empty string.\n */\n @State() location: string = this.eventLocation ?? '';\n /**\n * The grant id for the conferencing of non-default conferencing options.\n */\n @State() grantId: string = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : '';\n /**\n * The selected location option. This defaults to 'none'.\n */\n @State() selectedLocationOption: string = this.eventConferencing ? this.setDefaultLocationOption(this.eventConferencing, this.location) : '';\n /**\n * The current user provider state.\n */\n @State() userProviderState: string = this.userProvider ?? '';\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-location', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const configLocation = newValue?.event_booking?.location;\n const configConferencing = newValue?.event_booking?.conferencing;\n if (configConferencing?.provider) {\n this.selectedLocationOption = this.setDefaultLocationOption(configConferencing, configLocation ?? '');\n this.grantId = this.setDefaultGrantID(configConferencing);\n this.location = configLocation ? configLocation : '';\n } else if (configLocation) {\n this.selectedLocationOption = configLocation ? 'custom' : 'none';\n this.location = configLocation;\n } else {\n this.selectedLocationOption = 'none';\n this.location = '';\n }\n }\n\n /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-location', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-location', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-location', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n }\n if (this.currentUser?.provider) {\n this.userProviderState = this.currentUser.provider;\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-location', 'disconnectedCallback');\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string }>) {\n this.selectedLocationOption = event.detail.value;\n let payload;\n switch (this.selectedLocationOption) {\n case 'none':\n this.location = '';\n this.setFormValue('', this.name);\n this.valueChanged.emit({ value: '', name: this.name });\n this.valueChanged.emit({ value: JSON.stringify({}), name: 'conference' });\n break;\n case 'custom':\n this.valueChanged.emit({ value: JSON.stringify({}), name: 'conference' });\n break;\n case 'google':\n this.location = '';\n this.setFormValue('', this.name);\n const googleConfGrantId = this.conferenceProviders?.['google'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.google,\n autocreate: googleConfGrantId\n ? {\n conf_grant_id: googleConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n case 'microsoft':\n this.location = '';\n this.setFormValue('', this.name);\n const microsoftConfGrantId = this.conferenceProviders?.['microsoft'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.microsoft,\n autocreate: microsoftConfGrantId\n ? {\n conf_grant_id: microsoftConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n case 'zoom':\n this.location = '';\n this.setFormValue('', this.name);\n const zoomConfGrantId = this.conferenceProviders?.['zoom'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.zoom,\n autocreate: zoomConfGrantId\n ? {\n conf_grant_id: zoomConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n }\n\n setDefaultLocationOption(eventConferencing: Conference, eventLocation: string) {\n if (eventConferencing != null && eventConferencing?.provider != null && eventConferencing?.autocreate != null) {\n return CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];\n }\n return eventLocation ? 'custom' : 'none';\n }\n setDefaultGrantID(eventConferencing: Conference) {\n if (eventConferencing != null && eventConferencing?.autocreate != null) {\n return eventConferencing?.autocreate?.conf_grant_id;\n }\n return '';\n }\n\n setFormValue(value: string, name: string) {\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(value, name);\n }\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.location = value;\n this.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n @RegisterComponent<NylasEventLocation, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-location',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.conferenceProviders', 'conferenceProviders'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const locationOptions = [\n { value: 'none', label: 'None' },\n { value: 'custom', label: 'Custom location' },\n ];\n switch (this.userProviderState) {\n case 'google':\n locationOptions.push({ value: 'google', label: 'Google Meet' });\n break;\n case 'microsoft':\n locationOptions.push({ value: 'microsoft', label: 'Microsoft Teams' });\n break;\n }\n\n if (this.conferenceProviders?.['zoom']) {\n locationOptions.push({ value: 'zoom', label: 'Zoom Meeting' });\n }\n const newLocationOptions = [...locationOptions];\n const defaultOption = locationOptions.find(i => i.value == this.selectedLocationOption);\n\n const icons = {\n none: <location-off-icon />,\n custom: <location-icon />,\n google: <google-meet-icon />,\n microsoft: <microsoft-teams-icon />,\n zoom: <zoom-icon />,\n };\n const locationIcon = icons[this.selectedLocationOption];\n return (\n <Host>\n <div class=\"nylas-event-location\" part=\"nel\">\n <label htmlFor=\"location\">\n Event meeting or location\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">Select a conferencing option or add a custom location.</span>\n </tooltip-component>\n </span>\n </label>\n <div class=\"location-input\">\n {defaultOption?.label && (\n <select-dropdown\n withSearch={false}\n name=\"location\"\n options={newLocationOptions}\n defaultSelectedOption={defaultOption}\n exportparts=\"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content\"\n >\n <span slot=\"select-icon\">{locationIcon}</span>\n </select-dropdown>\n )}\n {this.selectedLocationOption === 'custom' && (\n <input type=\"text\" part=\"nel__location\" id=\"location\" name=\"location\" maxlength=\"1024\" value={this.location} onInput={e => this.handleChange(e)} />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-event-location2.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,gyEAAgyE,CAAC;AAC/zE,iCAAe,qBAAqB;;;;;;;;;;;;;;;;ACQpC,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,a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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-event-location/nylas-event-location.scss?tag=nylas-event-location&encapsulation=shadow","src/components/scheduler-editor/nylas-event-location/nylas-event-location.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n\n span[slot='select-icon'] {\n border-right: 1px solid var(--nylas-base-200);\n padding: 16px 0.75rem 16px 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n height: 20px;\n }\n div.location-input {\n display: grid;\n grid-template-columns: auto 1fr;\n width: 100%;\n gap: 0.5rem;\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n input {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 12px 16px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n }\n select-dropdown {\n width: 208px;\n @media #{$mobile} {\n width: 100%;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-content) {\n left: calc(35px + 0.5rem);\n }\n select-dropdown::part(sd_dropdown-button) {\n display: flex;\n justify-content: space-between;\n width: 100%;\n border: 1px solid var(--nylas-base-200);\n padding: 0 0.5rem;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n display: inline-flex;\n align-self: center;\n padding: 14px 0;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Conference, Configuration } from '@nylas/core';\nimport { CONFERENCE_PROVIDER_MAP, PROVIDER_CONFERENCE_MAP } from '@/common/constants';\nimport { User } from '@/common/nylas-api-request';\n\nconst labels = {\n none: 'None',\n custom: 'Custom location',\n google: 'Google Meet',\n microsoft: 'Microsoft Teams',\n zoom: 'Zoom Meeting',\n};\n\n/**\n * The `nylas-event-location` component is a form input for the location of an event.\n *\n * @part nel - The event location container\n * @part nel__location - The event location input\n * @part nel__dropdown - The dropdown container\n * @part nel__dropdown-button - The dropdown button\n * @part nel__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-event-location',\n styleUrl: 'nylas-event-location.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLocation {\n /*\n * The host element <nylas-event-location>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The name of the event location input.\n */\n @Prop() name: string = 'location';\n\n /**\n * @standalone\n * The current user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The users provider\n */\n @Prop() userProvider?: string;\n /**\n * @standalone\n * The event conferencing stored in the configuration\n */\n @Prop() eventConferencing?: Conference;\n /**\n * @standalone\n * The conference providers where the key is the provider name ('zoom') and the value is the grant id.\n * We currently support same provider ('google', 'microsoft') for all participants and 'zoom' for cross-provider conferencing.\n */\n @Prop() conferenceProviders?: Record<string, string>;\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event location stored in the configuration\n */\n @Prop() eventLocation?: string;\n /**\n * The selected event location state. This defaults to the event location from the configuration or an empty string.\n */\n @State() location: string = this.eventLocation ?? '';\n /**\n * The grant id for the conferencing of non-default conferencing options.\n */\n @State() grantId: string = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : '';\n /**\n * The selected location option. This defaults to 'none'.\n */\n @State() selectedLocationOption: string = this.eventConferencing ? this.setDefaultLocationOption(this.eventConferencing, this.location) : 'none';\n /**\n * The current user provider state.\n */\n @State() userProviderState: string = this.userProvider ?? '';\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-location', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n const configLocation = newValue?.event_booking?.location;\n const configConferencing = newValue?.event_booking?.conferencing;\n if (configConferencing?.provider) {\n this.selectedLocationOption = this.setDefaultLocationOption(configConferencing, configLocation ?? '');\n this.grantId = this.setDefaultGrantID(configConferencing);\n this.location = configLocation ? configLocation : '';\n } else if (configLocation) {\n this.selectedLocationOption = configLocation ? 'custom' : 'none';\n this.location = configLocation;\n } else {\n this.selectedLocationOption = 'none';\n this.location = '';\n }\n }\n\n /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-location', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-location', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-location', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n }\n if (this.currentUser?.provider) {\n this.userProviderState = this.currentUser.provider;\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-location', 'disconnectedCallback');\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string }>) {\n this.selectedLocationOption = event.detail.value;\n let payload;\n switch (this.selectedLocationOption) {\n case 'none':\n this.location = '';\n this.setFormValue('', this.name);\n this.valueChanged.emit({ value: '', name: this.name });\n this.valueChanged.emit({ value: JSON.stringify({}), name: 'conference' });\n break;\n case 'custom':\n this.valueChanged.emit({ value: JSON.stringify({}), name: 'conference' });\n break;\n case 'google':\n this.location = '';\n this.setFormValue('', this.name);\n const googleConfGrantId = this.conferenceProviders?.['google'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.google,\n autocreate: googleConfGrantId\n ? {\n conf_grant_id: googleConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n case 'microsoft':\n this.location = '';\n this.setFormValue('', this.name);\n const microsoftConfGrantId = this.conferenceProviders?.['microsoft'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.microsoft,\n autocreate: microsoftConfGrantId\n ? {\n conf_grant_id: microsoftConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n case 'zoom':\n this.location = '';\n this.setFormValue('', this.name);\n const zoomConfGrantId = this.conferenceProviders?.['zoom'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.zoom,\n autocreate: zoomConfGrantId\n ? {\n conf_grant_id: zoomConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n }\n\n setDefaultLocationOption(eventConferencing: Conference, eventLocation: string) {\n if (eventConferencing != null && eventConferencing?.provider != null && eventConferencing?.autocreate != null) {\n return CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];\n }\n return eventLocation ? 'custom' : 'none';\n }\n setDefaultGrantID(eventConferencing: Conference) {\n if (eventConferencing != null && eventConferencing?.autocreate != null) {\n return eventConferencing?.autocreate?.conf_grant_id;\n }\n return '';\n }\n\n setFormValue(value: string, name: string) {\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(value, name);\n }\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.location = value;\n this.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n getIcon(location: string) {\n switch (location) {\n case 'none':\n return <location-off-icon />;\n case 'custom':\n return <location-icon />;\n case 'google':\n return <google-meet-icon />;\n case 'microsoft':\n return <microsoft-teams-icon />;\n case 'zoom':\n return <zoom-icon />;\n }\n }\n\n getLabelHTML(location: string) {\n return (\n <span\n class=\"location-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '16px',\n width: '-webkit-fill-available',\n }}\n >\n {this.getIcon(location)}\n <span\n class=\"location-text\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n }}\n >\n {labels[location]}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasEventLocation, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-location',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.conferenceProviders', 'conferenceProviders'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const locationOptions = [\n { value: 'none', label: labels['none'], labelHTML: this.getLabelHTML('none') },\n { value: 'custom', label: labels['custom'], labelHTML: this.getLabelHTML('custom') },\n ];\n switch (this.userProviderState) {\n case 'google':\n locationOptions.push({ value: 'google', label: labels['google'], labelHTML: this.getLabelHTML('google') });\n break;\n case 'microsoft':\n locationOptions.push({ value: 'microsoft', label: labels['microsoft'], labelHTML: this.getLabelHTML('microsoft') });\n break;\n }\n\n if (this.conferenceProviders?.['zoom']) {\n locationOptions.push({ value: 'zoom', label: labels['zoom'], labelHTML: this.getLabelHTML('zoom') });\n }\n const newLocationOptions = [...locationOptions];\n const defaultOption = locationOptions.find(i => i.value == this.selectedLocationOption);\n\n return (\n <Host>\n <div class=\"nylas-event-location\" part=\"nel\">\n <label htmlFor=\"location\">\n Event meeting or location\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">Select a conferencing option or add a custom location.</span>\n </tooltip-component>\n </span>\n </label>\n <div class=\"location-input\">\n {defaultOption?.label && (\n <select-dropdown\n withSearch={false}\n name=\"location\"\n options={newLocationOptions}\n defaultSelectedOption={defaultOption}\n exportparts=\"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content\"\n >\n <span slot=\"select-icon\">{this.getIcon(this.selectedLocationOption)}</span>\n </select-dropdown>\n )}\n {this.selectedLocationOption === 'custom' && (\n <input type=\"text\" part=\"nel__location\" id=\"location\" name=\"location\" maxlength=\"1024\" value={this.location} onInput={e => this.handleChange(e)} />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -236,11 +236,16 @@ const NylasEventTitle = proxyCustomElement(class NylasEventTitle extends HTMLEle
236
236
  this.resetDropdown();
237
237
  }
238
238
  else if (event.key === 'Backspace' || event.key === 'Delete') {
239
- if (selection?.currentText.startsWith('${')) {
240
- selection?.node?.parentNode && selection.node.parentNode.removeChild(selection.node);
239
+ const parentNode = selection?.node?.parentNode;
240
+ if (selection?.currentText.startsWith('${') && parentNode) {
241
+ event.preventDefault();
242
+ parentNode.removeChild(selection.node);
243
+ parentNode.remove();
244
+ this.resetDropdown();
241
245
  }
242
- if (this.titleRef.textContent === '' || selection?.currentText === '' || selection?.allSelected) {
246
+ if (this.titleRef.textContent === '' || selection?.allSelected) {
243
247
  this.titleRef.innerHTML = '';
248
+ this.updateEventTitle('');
244
249
  }
245
250
  }
246
251
  }
@@ -320,10 +325,10 @@ const NylasEventTitle = proxyCustomElement(class NylasEventTitle extends HTMLEle
320
325
  return (h("div", { class: "token-label" }, h("span", { class: "token" }, token.token), h("span", { class: "description" }, token.description)));
321
326
  }
322
327
  render() {
323
- return (h(Host, { key: 'ddbaad83ef3b89e8886159d54d111656d22bb569' }, h("div", { key: '14e58026518fbc1b39428ecb349227d08e39649f', class: "nylas-event-title", part: "net" }, h("label", { key: '6be82638ef054e754e0a62c899e49457c2683cdb', htmlFor: "title" }, "Event title", h("span", { key: '99b30dd44c7e9d699415fd2a19e916e37b84f61f', class: "required" }, "*")), h("div", { key: 'bb6f400465244cc57f7b013a26ca1238fa0f3b7b', class: {
328
+ return (h(Host, { key: '3a6858cea6ad427bb8f7046e4d409c44d9d57467' }, h("div", { key: '26574b9f7c76628771e584d1c3943b2ce9b77ce0', class: "nylas-event-title", part: "net" }, h("label", { key: 'b6bab982d9b8a091ee1c9a66b5d24b3050e08817', htmlFor: "title" }, "Event title", h("span", { key: '34b1ba7719d37f6af0d3c84e3fe1c251625848b1', class: "required" }, "*")), h("div", { key: '0fcbdee8625b13720b31df47ddb76bdba6f384c6', class: {
324
329
  title: true,
325
330
  error: this.validationError !== '',
326
- }, part: "net__title", ref: el => (this.titleRef = el), contentEditable: "true", onInput: e => this.handleChange(e), onKeyDown: event => this.handleInputKeyDown(event) }), this.showTokens && this.filteredTokens?.length > 0 && (h("div", { class: "token-options", part: "net__dropdown-content" }, h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map(option => (h("li", { tabindex: "0", key: option.label, id: option.label, class: { active: this.ariaActivedescendant === option.label }, onClick: e => this.selectOption(e, option), role: "option" }, this.getLabelHTML(option.labelHTML))))))), h("span", { key: '3d3769b779354dbd20677ba2a469a283f03ebb51', class: "help-text" }, "Create a dynamic templated event title by typing ", h("code", { key: '22a80e53a91ba2acc833b1a18b2c375385b76c88' }, "$"), " and selecting a template item.", h("span", { key: '315a5202f520ffb55497870b929042504d4e061b', class: "label-icon" }, h("tooltip-component", { key: 'b0d6824ae5774208b9ee452cf81baa93450be186' }, h("info-icon", { key: '4d30bdf0f2dcc3e1822684aabf7807729da84efa', slot: "tooltip-icon" }), h("span", { key: '06de17977e06f7f4829f617b35cd870553085ad6', slot: "tooltip-content" }, "For example, Interview with ", h("code", { key: '602df431370083924e6d90a9562556ffc6e3f9cd' }, '${invitee}'))))), this.validationError != '' && h("span", { class: "error-message" }, this.validationError))));
331
+ }, part: "net__title", ref: el => (this.titleRef = el), contentEditable: "true", onInput: e => this.handleChange(e), onKeyDown: event => this.handleInputKeyDown(event) }), this.showTokens && this.filteredTokens?.length > 0 && (h("div", { class: "token-options", part: "net__dropdown-content" }, h("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant }, this.filteredTokens.map(option => (h("li", { tabindex: "0", key: option.label, id: option.label, class: { active: this.ariaActivedescendant === option.label }, onClick: e => this.selectOption(e, option), role: "option" }, this.getLabelHTML(option.labelHTML))))))), h("span", { key: '8c267fb019bc2f4a7ec9bd771c7ebdbd4e36860e', class: "help-text" }, "Create a dynamic templated event title by typing ", h("code", { key: '73fff78bf0ef47b1a4880b88630285c5565348e7' }, "$"), " and selecting a template item.", h("span", { key: '64c431fb78eef320cdca1e426e4290f1663fe756', class: "label-icon" }, h("tooltip-component", { key: 'b8f4ce46c4f53f66d50b6121dbc76360972638f9' }, h("info-icon", { key: '038824ecf2006ce2851de30c1538c30d96707ca9', slot: "tooltip-icon" }), h("span", { key: '0fefb16b80e9c43a7f46e1d5f72d12ca39cdc348', slot: "tooltip-content" }, "For example, Interview with ", h("code", { key: 'df208a8bb8907416908a6cdbc0edba219e924513' }, '${invitee}'))))), this.validationError != '' && h("span", { class: "error-message" }, this.validationError))));
327
332
  }
328
333
  static get formAssociated() { return true; }
329
334
  get host() { return this; }
@@ -1 +1 @@
1
- {"file":"nylas-event-title2.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,6vGAA6vG,CAAC;AACzxG,8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C,YAAY,IACtB,4EACE,kEAAW,IAAI,EAAC,cAAc,GAAG,EACjC,6DAAM,IAAI,EAAC,iBAAiB,oCACE,+DAAO,YAAY,CAAQ,CAClD,CACW,CACf,CACF,EACN,IAAI,CAAC,eAAe,IAAI,EAAE,IAAI,YAAM,KAAK,EAAC,eAAe,IAAE,IAAI,CAAC,eAAe,CAAQ,CACpF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;AAnDD;IANC,iBAAiB,CAAqG;QACrH,IAAI,EAAE,mBAAmB;QACzB,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;6CAoDD;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["eventTitleTokens"],"sources":["src/components/scheduler-editor/nylas-event-title/nylas-event-title.scss?tag=nylas-event-title&encapsulation=shadow","src/components/scheduler-editor/nylas-event-title/nylas-event-title.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-event-title {\n display: flex;\n flex-direction: column;\n gap: 4px;\n position: relative;\n text-align: left;\n\n div.title {\n padding: 12px 16px;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n overflow: scroll;\n white-space: nowrap;\n scrollbar-width: thin;\n\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &.error {\n border-color: var(--nylas-error);\n border-width: 2px;\n outline: none;\n }\n }\n\n input {\n padding: 12px 16px;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n }\n\n span.help-text {\n display: flex;\n gap: 4px;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 21px;\n }\n\n span.error-message {\n color: var(--nylas-error);\n }\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n\n /* 21px */\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n\n.highlighted-tag {\n background-color: var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 5px;\n margin-left: 4px;\n}\n\n.token-options {\n display: block;\n background-color: var(--nylas-base-0);\n width: 100%;\n max-height: 336px;\n overflow: auto;\n z-index: 1;\n border-radius: 4px;\n position: absolute;\n top: calc(48px + 24px + 8px); // 48px is the height of the input, 24px is the height of the label, 8px is the gap between the label and the input\n\n @media #{$mobile} {\n right: 0;\n width: 325px;\n max-width: unset;\n }\n\n box-shadow: 0px 4px 6px -2px #0000000d;\n box-shadow: 0px 10px 15px -3px #0000001a;\n\n ul {\n padding: 0;\n list-style-type: none;\n color: var(--nylas-base-900);\n max-height: 336px;\n margin: 0;\n\n li {\n padding: 16px, 12px, 16px, 12px;\n color: black;\n padding: 12px 16px;\n text-decoration: none;\n display: block;\n font-family: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: left;\n cursor: pointer;\n\n .token-label {\n display: flex;\n flex-direction: column;\n font-weight: 400;\n\n .token {\n color: var(--nylas-abse-900);\n font-size: 16px;\n line-height: 24px;\n }\n\n .description {\n color: var(--nylas-base-600);\n font-size: 14px;\n line-height: 21px;\n }\n }\n\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: var(--nylas-base-100);\n\n .token-label {\n .token {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n\n .selected {\n background-color: var(--nylas-base-100);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser, isNonPrintableKey, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { EVENT_TITLE_TOKENS as eventTitleTokens } from '@/common/constants';\nimport { Configuration } from '@nylas/core';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-title` component is a form input for the title of an event.\n * @part net - The event title container\n * @part net__title - The event title input\n * @part net__dropdown-content - The token options container\n */\n@Component({\n tag: 'nylas-event-title',\n styleUrl: 'nylas-event-title.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventTitle {\n @Element() host!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n // Properties\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * The title of the event from the cofiguration.\n */\n @Prop() eventTitle?: string = this.selectedConfiguration?.event_booking?.title;\n /**\n * The name attribute of this component.\n */\n @Prop() name: string = 'title';\n\n // State variables\n /**\n * Whether to show the tokens dropdown.\n */\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventTitleTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event title with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n @State() configEventTitle: string = '';\n\n // Reference to the title div element\n private titleRef!: HTMLDivElement;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-title', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('ariaActivedescendant')\n ariaActivedescendantChangedHandler(newValue: string) {\n debug('nylas-event-title', 'ariaActivedescendantChangedHandler', newValue);\n if (newValue !== '') {\n const activeOption = this.host.shadowRoot?.getElementById(newValue);\n activeOption?.classList.add('active');\n } else {\n const options = this.host.shadowRoot?.querySelectorAll('.token-options li.active');\n options?.forEach(option => option.classList.remove('active'));\n }\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newVal) {\n const title = newVal?.event_booking?.title;\n this.configEventTitle = title;\n if (title) {\n this.updateEventTitleFromProp(title);\n }\n }\n\n // Events\n /**\n * This event is fired when the value of the event title changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-event-title', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-title', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-title', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.eventTitle = this.selectedConfiguration?.event_booking?.title;\n }\n this.updateEventTitleFromProp(this.eventTitle || '');\n }\n\n disconnectedCallback() {\n debug('nylas-event-title', 'disconnectedCallback');\n }\n\n @Listen('formSubmitted', { target: 'window' })\n formSubmittedHandler(event: CustomEvent) {\n debug('nylas-event-title', 'formSubmittedHandler', event);\n if (!this.internals?.validity?.valid) {\n this.validationError = 'Event title is required';\n } else {\n this.validationError = '';\n }\n }\n\n updateEventTitleFromProp(newValue: string) {\n debug('nylas-event-title', 'eventTitleChangedHandler', newValue);\n const title = newValue || this.configEventTitle;\n if (this.titleRef) {\n this.titleRef.innerHTML = this.highlightTokens(title);\n this.titleRef.focus();\n if (typeof this.internals.setValidity === 'function') {\n if (!title || title === '') {\n this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n } else {\n this.internals?.setValidity({ customError: false });\n }\n }\n }\n }\n\n highlightTokens(title: string) {\n let outputHtml = title;\n\n eventTitleTokens.forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml?.replace(regex, '<span class=\"highlighted-tag\">$1</span>') || '';\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node, allSelected) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n allSelected,\n };\n };\n\n // Check if the selection has selected all the text in the node, we need this to handle the case where the user selects all the text and then types or deletes\n const isAllSelected = (selection: Selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome':\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);\n case 'Firefox':\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n const allSelectedFirefox = selection && isAllSelected(selection);\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);\n case 'Safari':\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n const allSelectedSafari = windowSelection && isAllSelected(windowSelection);\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);\n default:\n console.warn('Browser not supported');\n return null;\n }\n }\n\n handleChange(event: Event) {\n let textContent = (event.target as HTMLDivElement).textContent || '';\n textContent = sanitize(textContent);\n\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event title with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventTitle(textContent);\n }\n\n handleInputKeyDown(event) {\n const selection = this.getCurrentSelectionForBrowser();\n\n // If no text is remaining in the title, reset the title to an empty string\n if (selection?.allSelected && !isNonPrintableKey(event)) {\n this.titleRef.innerHTML = '';\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n }\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n if (selection?.currentText.startsWith('${')) {\n selection?.node?.parentNode && selection.node.parentNode.removeChild(selection.node);\n }\n if (this.titleRef.textContent === '' || selection?.currentText === '' || selection?.allSelected) {\n this.titleRef.innerHTML = '';\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.titleRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 1);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 1);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.titleRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event title with the selected token\n this.updateEventTitle(this.titleRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n updateEventTitle(text: string) {\n const value = text.replace(/ +/g, ' ');\n if (value === '') {\n this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n this.validationError = 'Event title is required';\n } else {\n this.internals?.setValidity({ customError: false });\n this.validationError = '';\n }\n this.internals?.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n @RegisterComponent<NylasEventTitle, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-title',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-title\" part=\"net\">\n <label htmlFor=\"title\">\n Event title<span class=\"required\">*</span>\n </label>\n <div\n class={{\n title: true,\n error: this.validationError !== '',\n }}\n part=\"net__title\"\n ref={el => (this.titleRef = el as HTMLDivElement)}\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ></div>\n {this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"net__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n <span class=\"help-text\">\n Create a dynamic templated event title by typing <code>$</code> and selecting a template item.\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n For example, Interview with <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n {this.validationError != '' && <span class=\"error-message\">{this.validationError}</span>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-event-title2.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,6vGAA6vG,CAAC;AACzxG,8BAAe,kBAAkB;;;;;;;;;;;;;;;;MC6BpB,eAAe;;;;;;;;0BAcI,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,KAAK;oBAKvD,OAAO;0BAMC,KAAK;+BAI6CA,kBAAgB,CAAC,GAAG,CAAC,KAAK,KAAK;YAC9G,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,SAAS,EAAE,KAAK;SACjB,CAAC,CAAC;8BAI6E,IAAI,CAAC,eAAe;oCAK5D,EAAE;2BAWtC,EAAE,MAAM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Ae,CAAQ,CACpF,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;AAnDD;IANC,iBAAiB,CAAqG;QACrH,IAAI,EAAE,mBAAmB;QACzB,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;6CAoDD;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["eventTitleTokens"],"sources":["src/components/scheduler-editor/nylas-event-title/nylas-event-title.scss?tag=nylas-event-title&encapsulation=shadow","src/components/scheduler-editor/nylas-event-title/nylas-event-title.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-event-title {\n display: flex;\n flex-direction: column;\n gap: 4px;\n position: relative;\n text-align: left;\n\n div.title {\n padding: 12px 16px;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n overflow: scroll;\n white-space: nowrap;\n scrollbar-width: thin;\n\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &.error {\n border-color: var(--nylas-error);\n border-width: 2px;\n outline: none;\n }\n }\n\n input {\n padding: 12px 16px;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n }\n\n span.help-text {\n display: flex;\n gap: 4px;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 21px;\n }\n\n span.error-message {\n color: var(--nylas-error);\n }\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n\n /* 21px */\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n\n.highlighted-tag {\n background-color: var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 5px;\n margin-left: 4px;\n}\n\n.token-options {\n display: block;\n background-color: var(--nylas-base-0);\n width: 100%;\n max-height: 336px;\n overflow: auto;\n z-index: 1;\n border-radius: 4px;\n position: absolute;\n top: calc(48px + 24px + 8px); // 48px is the height of the input, 24px is the height of the label, 8px is the gap between the label and the input\n\n @media #{$mobile} {\n right: 0;\n width: 325px;\n max-width: unset;\n }\n\n box-shadow: 0px 4px 6px -2px #0000000d;\n box-shadow: 0px 10px 15px -3px #0000001a;\n\n ul {\n padding: 0;\n list-style-type: none;\n color: var(--nylas-base-900);\n max-height: 336px;\n margin: 0;\n\n li {\n padding: 16px, 12px, 16px, 12px;\n color: black;\n padding: 12px 16px;\n text-decoration: none;\n display: block;\n font-family: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: left;\n cursor: pointer;\n\n .token-label {\n display: flex;\n flex-direction: column;\n font-weight: 400;\n\n .token {\n color: var(--nylas-abse-900);\n font-size: 16px;\n line-height: 24px;\n }\n\n .description {\n color: var(--nylas-base-600);\n font-size: 14px;\n line-height: 21px;\n }\n }\n\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: var(--nylas-base-100);\n\n .token-label {\n .token {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n\n .selected {\n background-color: var(--nylas-base-100);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser, isNonPrintableKey, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { EVENT_TITLE_TOKENS as eventTitleTokens } from '@/common/constants';\nimport { Configuration } from '@nylas/core';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-title` component is a form input for the title of an event.\n * @part net - The event title container\n * @part net__title - The event title input\n * @part net__dropdown-content - The token options container\n */\n@Component({\n tag: 'nylas-event-title',\n styleUrl: 'nylas-event-title.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventTitle {\n @Element() host!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n // Properties\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The title of the event from the cofiguration.\n */\n @Prop() eventTitle?: string = this.selectedConfiguration?.event_booking?.title;\n /**\n * @standalone\n * The name attribute of this component.\n */\n @Prop() name: string = 'title';\n\n // State variables\n /**\n * Whether to show the tokens dropdown.\n */\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventTitleTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event title with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n @State() configEventTitle: string = '';\n\n // Reference to the title div element\n private titleRef!: HTMLDivElement;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-event-title', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('ariaActivedescendant')\n ariaActivedescendantChangedHandler(newValue: string) {\n debug('nylas-event-title', 'ariaActivedescendantChangedHandler', newValue);\n if (newValue !== '') {\n const activeOption = this.host.shadowRoot?.getElementById(newValue);\n activeOption?.classList.add('active');\n } else {\n const options = this.host.shadowRoot?.querySelectorAll('.token-options li.active');\n options?.forEach(option => option.classList.remove('active'));\n }\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newVal) {\n const title = newVal?.event_booking?.title;\n this.configEventTitle = title;\n if (title) {\n this.updateEventTitleFromProp(title);\n }\n }\n\n // Events\n /**\n * This event is fired when the value of the event title changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-event-title', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-title', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-title', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.eventTitle = this.selectedConfiguration?.event_booking?.title;\n }\n this.updateEventTitleFromProp(this.eventTitle || '');\n }\n\n disconnectedCallback() {\n debug('nylas-event-title', 'disconnectedCallback');\n }\n\n @Listen('formSubmitted', { target: 'window' })\n formSubmittedHandler(event: CustomEvent) {\n debug('nylas-event-title', 'formSubmittedHandler', event);\n if (!this.internals?.validity?.valid) {\n this.validationError = 'Event title is required';\n } else {\n this.validationError = '';\n }\n }\n\n updateEventTitleFromProp(newValue: string) {\n debug('nylas-event-title', 'eventTitleChangedHandler', newValue);\n const title = newValue || this.configEventTitle;\n if (this.titleRef) {\n this.titleRef.innerHTML = this.highlightTokens(title);\n this.titleRef.focus();\n if (typeof this.internals.setValidity === 'function') {\n if (!title || title === '') {\n this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n } else {\n this.internals?.setValidity({ customError: false });\n }\n }\n }\n }\n\n highlightTokens(title: string) {\n let outputHtml = title;\n\n eventTitleTokens.forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml?.replace(regex, '<span class=\"highlighted-tag\">$1</span>') || '';\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node, allSelected) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n allSelected,\n };\n };\n\n // Check if the selection has selected all the text in the node, we need this to handle the case where the user selects all the text and then types or deletes\n const isAllSelected = (selection: Selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome':\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);\n case 'Firefox':\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n const allSelectedFirefox = selection && isAllSelected(selection);\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);\n case 'Safari':\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n const allSelectedSafari = windowSelection && isAllSelected(windowSelection);\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);\n default:\n console.warn('Browser not supported');\n return null;\n }\n }\n\n handleChange(event: Event) {\n let textContent = (event.target as HTMLDivElement).textContent || '';\n textContent = sanitize(textContent);\n\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event title with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventTitle(textContent);\n }\n\n handleInputKeyDown(event) {\n const selection = this.getCurrentSelectionForBrowser();\n\n // If no text is remaining in the title, reset the title to an empty string\n if (selection?.allSelected && !isNonPrintableKey(event)) {\n this.titleRef.innerHTML = '';\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n }\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const parentNode = selection?.node?.parentNode;\n if (selection?.currentText.startsWith('${') && parentNode) {\n event.preventDefault();\n parentNode.removeChild(selection.node);\n parentNode.remove();\n this.resetDropdown();\n }\n if (this.titleRef.textContent === '' || selection?.allSelected) {\n this.titleRef.innerHTML = '';\n this.updateEventTitle('');\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.titleRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 1);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 1);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.titleRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event title with the selected token\n this.updateEventTitle(this.titleRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n updateEventTitle(text: string) {\n const value = text.replace(/ +/g, ' ');\n if (value === '') {\n this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n this.validationError = 'Event title is required';\n } else {\n this.internals?.setValidity({ customError: false });\n this.validationError = '';\n }\n this.internals?.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n @RegisterComponent<NylasEventTitle, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-title',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-title\" part=\"net\">\n <label htmlFor=\"title\">\n Event title<span class=\"required\">*</span>\n </label>\n <div\n class={{\n title: true,\n error: this.validationError !== '',\n }}\n part=\"net__title\"\n ref={el => (this.titleRef = el as HTMLDivElement)}\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ></div>\n {this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"net__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n <span class=\"help-text\">\n Create a dynamic templated event title by typing <code>$</code> and selecting a template item.\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n For example, Interview with <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n {this.validationError != '' && <span class=\"error-message\">{this.validationError}</span>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -66,9 +66,9 @@ const NylasFeedbackForm = proxyCustomElement(class NylasFeedbackForm extends HTM
66
66
  this.feedbackModalClosed.emit();
67
67
  }
68
68
  render() {
69
- return (h(Host, { key: '3a49a9dbf3e0cc9b3f87a2700b9b15bc072e6eda', part: "nfbf" }, h("div", { key: '2067b40da6d1c922a40408e2bfeb237be8aa9978', class: "card-wrapper", part: "nfbfc__card" }, h("div", { key: '96df66416dc02ff70000e251ae246f3505c7e931', class: "close-button" }, h("button-component", { key: '910b2cb6dc4bac4544155004c871d2d4e777a83c', tooltip: "Close", id: "close", variant: 'invisible', onClick: e => this.closeModal(e), part: "nfbf__close-button" }, h("close-icon", { key: 'd7c517fcbf55b8192e21c6478383a73a1e8cb23d' }))), h("div", { key: '9f5bb5ef21432fed35f21296276852c194c8a2d4', class: "header" }, h("h2", { key: '999b25ddca766608b95ab1a15042572941845ea9', slot: "card-title", part: "nfbf__title" }, instance.t('feedbackFormTitle'))), h("div", { key: '0f4400b23db8458b878bf6b2aaf2e91fcf77de29', class: "description title-desc" }, h("p", { key: 'c17b98e3d1049fb5bdd3dc78f1ac430da347fa78' }, instance.t('feedbackFormDescription'))), h("textarea-component", { key: '8f7456a4c656073e227e162a241e8b05d6af44d0', label: instance.t('feedbackMessageLabel'), required: true, maxLength: 500, part: "nfbf__description", name: "feedback", placeholder: instance.t('feedbackMessagePlaceholder') }), h("div", { key: 'd6ce3852116a3414c974ea6d75911dbe6918d14d', class: 'description footer-desc' }, h("p", { key: 'f44a322d4019deb4c8e8ac24c5095b0c8f75eaf7' }, "By sending this report, you agree to Nylas\u2019 access to the data necessary to respond to this issue, subject to Nylas\u2019", ' ', h("a", { key: '1425cfa93c0e603877ceffddb62f3f6c5d75b505', href: "https://www.nylas.com/privacy-policy/", target: "_blank", rel: "nofollow noreferrer noopener" }, "Privacy Policy"), ".")), h("div", { key: 'efd8316203dc5050d634a3876543a0eef6d0974d', class: {
69
+ return (h(Host, { key: '00514f43a6b2052ce2a4144917ccc5adc965a94a', part: "nfbf" }, h("div", { key: '4271697a749f74d3d62f611df6841dc4d7e4ef4d', class: "card-wrapper", part: "nfbfc__card" }, h("div", { key: '59271c12c04a4f78fac68534ec66b24ac9803784', class: "close-button" }, h("button-component", { key: 'de7ced90803da24ff46d2dc30f7e925b6fb760a8', tooltip: "Close", id: "close", variant: 'invisible', onClick: e => this.closeModal(e), part: "nfbf__close-button" }, h("close-icon", { key: '3f64b2db3958bf082829310126566ef58ae54f46' }))), h("div", { key: '526d959d10a00d49d66d66fe3a56bce3a03893f4', class: "header" }, h("h2", { key: '699f00cca09366e19081e0972a76a2f67d471ecc', slot: "card-title", part: "nfbf__title" }, instance.t('feedbackFormTitle'))), h("div", { key: '95062b4d3557eef49fac7246526f0d413acdd7ff', class: "description title-desc" }, h("p", { key: '6806a1ae323b2f67c5fcacbb0238df86a4f32bce' }, instance.t('feedbackFormDescription'))), h("textarea-component", { key: '1135f11f19f5cca1f814812c606b39c3a828bf9b', label: instance.t('feedbackMessageLabel'), required: true, maxLength: 500, part: "nfbf__description", name: "feedback", placeholder: instance.t('feedbackMessagePlaceholder') }), h("div", { key: '388f7897c0eb2a9d87d25b98b49d3f60363e0108', class: 'description footer-desc' }, h("p", { key: 'ab9ba37f8e5533b8480c223ad668ffb91b95ab7e' }, "By sending this report, you agree to Nylas\u2019 access to the data necessary to respond to this issue, subject to Nylas\u2019", ' ', h("a", { key: 'c1a380ed74cb1c6081ca7c557e761eab7ae5ab9d', href: "https://www.nylas.com/privacy-policy/", target: "_blank", rel: "nofollow noreferrer noopener" }, "Privacy Policy"), ".")), h("div", { key: 'd8da33e015c718e6c8cf59b407eb7df7efaa26f9', class: {
70
70
  footer: true,
71
- } }, h("button-component", { key: 'dd0fd83ea7d430815d8fdceda14225e38357bb64', variant: 'invisible', onClick: e => this.closeModal(e), part: "nfbf__button-outline nfbf__cancel-cta" }, `${instance.t('feedbackModalCloseButton')}`), h("button-component", { key: '75616d6c4b4d5bbc19287e22b08a490a47a6cac0', variant: 'primary', onClick: this.handleConfirmBookingButtonClicked, part: "nfbf__button-outline nfbf__reschedule-cta" }, `${instance.t('feedbackModalSubmitButton')}`)))));
71
+ } }, h("button-component", { key: '52f9c1a0a54907f9b83167387247fc3c979ad498', variant: 'invisible', onClick: e => this.closeModal(e), part: "nfbf__button-outline nfbf__cancel-cta" }, `${instance.t('feedbackModalCloseButton')}`), h("button-component", { key: '819fc5952960c841c3a6b46af127699cd5f69c88', variant: 'primary', onClick: this.handleConfirmBookingButtonClicked, part: "nfbf__button-outline nfbf__reschedule-cta" }, `${instance.t('feedbackModalSubmitButton')}`)))));
72
72
  }
73
73
  get host() { return this; }
74
74
  static get style() { return NylasFeedbackFormStyle0; }
@@ -41,7 +41,7 @@ const NylasFormCard = proxyCustomElement(class NylasFormCard extends HTMLElement
41
41
  checkForMissingSlots(slots, this.host);
42
42
  }
43
43
  render() {
44
- return (h(Host, { key: '9c490244ceaa1c08fae75cad5f796e2b45ea2538' }, h("div", { key: '696b86c8697f4062afcd8a5862c97bf3bf5492e0', class: "nylas-form-card", part: "nfc" }, h("div", { key: 'af1f2eb827a74586fe44b476f1d59f9f8785e980', class: "nylas-form-card__header", part: "nfc__header" }, h("slot", { key: '968b720f04d9e64df5708fd1c4d94a9998aa72fc', name: "header-title" }), h("slot", { key: '4df6bddacc17d303f3be42584be48e50bf7fb0f0', name: "header-subtitle" })), h("div", { key: '890fbc0f1628e40a2b92201bb3e4ebc116ed2f9e', class: "nylas-form-card__content" }, h("slot", { key: '861b981bb7a420151fc375cc68dcdcd58ffbb8c2', name: "content" })))));
44
+ return (h(Host, { key: '5ccd047d1a8bb515dea8aa7b9d7d39265afc31c9' }, h("div", { key: 'c40f52eaa4d099d92d65b0df662cd2de1b5f35c7', class: "nylas-form-card", part: "nfc" }, h("div", { key: '545dabd81dce9b4f6f5f1d129071e1136f62e609', class: "nylas-form-card__header", part: "nfc__header" }, h("slot", { key: '2be9b24f91316235be7132a6466cd16b9dfe813c', name: "header-title" }), h("slot", { key: '3414a084465efc50a3856291dff61d8ef3b3c617', name: "header-subtitle" })), h("div", { key: 'cc07650a55afd7fc5d2429ff3611168977775bc8', class: "nylas-form-card__content" }, h("slot", { key: 'd50dd8dfbfea1ad84876495e72dd03102e2bc0dc', name: "content" })))));
45
45
  }
46
46
  static get formAssociated() { return true; }
47
47
  get host() { return this; }
@@ -104,7 +104,7 @@ const NylasIfState$1 = proxyCustomElement(class NylasIfState extends HTMLElement
104
104
  }
105
105
  }
106
106
  render() {
107
- return (h(Host, { key: '8c7133e9d01ecb6d14db3a6f30321ecbb7047dcb' }, h("div", { key: '81ba387d18d24761a8f89da678161aaf5755c3f2', class: this.classes }, this.show && h("slot", null))));
107
+ return (h(Host, { key: '4ab162229644e4d5d9d571af164b417c3e503e2c' }, h("div", { key: 'f5b4dd56ac193ba63be4a7040bdb61d7a2e1da04', class: this.classes }, this.show && h("slot", null))));
108
108
  }
109
109
  static get watchers() { return {
110
110
  "getStore": ["onGetStoreChange"]
@@ -109,7 +109,7 @@ const NylasLimitFutureBookings = proxyCustomElement(class NylasLimitFutureBookin
109
109
  }
110
110
  render() {
111
111
  const showTImePeriodSelector = typeof this.selectedNumber == 'number' && typeof this.selectedPeriod == 'string';
112
- return (h(Host, { key: 'cfdcf00204e70323e9d85fa2fac4ff6e969fe4d2' }, h("div", { key: '47f30c99bb64a716afb4815a3a94c60bf0e00013', class: "nylas-limit-future-bookings", part: "nlfb" }, h("label", { key: '3163cb22a01a10b19d290b156fcbe643aa1e5988' }, "Limit future bookings", h("span", { key: '1107193982975970afd5462570973719bb3f6993', class: "label-icon" }, h("tooltip-component", { key: '00cfba9876189179aac11d30110e063711d6ff15' }, h("info-icon", { key: '07ee779935ae241fdd3b8b4733e8686cbea66ba7', slot: "tooltip-icon" }), h("span", { key: '09883971191c905c9c67de0634653dc6d28497b6', slot: "tooltip-content" }, "The limit on how far in the future bookings can be made.")))), showTImePeriodSelector && (h("time-period-selector", { id: "limit-future-bookings", timePeriods: ['day', 'week', 'month'], exportparts: "tps__number-dropdown: nlfb__number-dropdown, tps__number-dropdown-button: nlfb__number-dropdown-button, tps__number-dropdown-content: nlfb__number-dropdown-content, tps__period-dropdown: nlfb__period-dropdown, tps__period-dropdown-button: nlfb__period-dropdown-button, tps__period-dropdown-content: nlfb__period-dropdown-content", defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })))));
112
+ return (h(Host, { key: '215b20a927344e8b41d6c1b2b01764551729e485' }, h("div", { key: 'ca577da089b5d396662cb421c6b136441cdada76', class: "nylas-limit-future-bookings", part: "nlfb" }, h("label", { key: '395b402858fb09c0fa8eb9821007878bffb991b6' }, "Limit future bookings", h("span", { key: '2b70f7c6df5e291cabb0578e490911c001d617c8', class: "label-icon" }, h("tooltip-component", { key: 'c8f9f7ca001ffc53f4302776f98787f8ff83c743' }, h("info-icon", { key: 'ab50f1feb38dcf026a1e2d56db99106dfad1f665', slot: "tooltip-icon" }), h("span", { key: '2196f08c84f1da46a5832e4f7a7fea0de46c37d3', slot: "tooltip-content" }, "The limit on how far in the future bookings can be made.")))), showTImePeriodSelector && (h("time-period-selector", { id: "limit-future-bookings", timePeriods: ['day', 'week', 'month'], exportparts: "tps__number-dropdown: nlfb__number-dropdown, tps__number-dropdown-button: nlfb__number-dropdown-button, tps__number-dropdown-content: nlfb__number-dropdown-content, tps__period-dropdown: nlfb__period-dropdown, tps__period-dropdown-button: nlfb__period-dropdown-button, tps__period-dropdown-content: nlfb__period-dropdown-content", defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod })))));
113
113
  }
114
114
  static get formAssociated() { return true; }
115
115
  get host() { return this; }
@@ -1 +1 @@
1
- {"file":"nylas-limit-future-bookings2.js","mappings":";;;;;;;;;;;AAAA,MAAM,2BAA2B,GAAG,iqCAAiqC,CAAC;AACtsC,uCAAe,2BAA2B;;;;;;;;;;;;;;;;MCuB7B,wBAAwB;;;;;;;;;oBAgBZ,uBAAuB;;;;IAsB9C,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,6BAA6B,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KAC1C;IAGD,mCAAmC,CAAC,MAAqB;QACvD,MAAM,YAAY,GAAG,MAAM,EAAE,SAAS,EAAE,wBAAwB,IAAI,IAAI,CAAC,qBAAqB,IAAI,CAAC,CAAC;QACpG,IAAI,YAAY,EAAE;YAChB,IAAI,CAAC,6BAA6B,CAAC,YAAY,CAAC,CAAC;SAClD;QACD,IAAI,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,KAAK,UAAU,EAAE;YACrD,OAAO;SACR;QACD,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;KAClE;IAUD,iBAAiB;QACf,KAAK,CAAC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,CAAC;QAC3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;sDA2BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.scss?tag=nylas-limit-future-bookings&encapsulation=shadow","src/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-limit-future-bookings {\n display: flex;\n justify-content: space-between;\n font-family: var(--nylas-font-family);\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n }\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n\nselect-dropdown::part(sd_dropdown-button) {\n border: none;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\n\n/**\n * The `nylas-limit-future-bookings` component is a form input for the number of days in the future a guest is allowed to book an event.\n *\n * @part nlfb - The limit future bookings container\n * @part nlfb__number-dropdown - The number dropdown container\n * @part nlfb__number-dropdown-button - The number dropdown button\n * @part nlfb__number-dropdown-content - The number dropdown content\n * @part nlfb__period-dropdown - The period dropdown container\n * @part nlfb__period-dropdown-button - The period dropdown button\n * @part nlfb__period-dropdown-content - The period dropdown content\n */\n@Component({\n tag: 'nylas-limit-future-bookings',\n styleUrl: 'nylas-limit-future-bookings.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasLimitFutureBookings {\n /**\n * The host element <nylas-limit-future-bookings>\n */\n @Element() host!: HTMLElement;\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * The number of days into the future that invitees will see availability, as set in the configuration.\n */\n @Prop() availableDaysInFuture?: number;\n /**\n * The name of the limit future bookings input.\n */\n @Prop() name: string = 'limit-future-bookings';\n\n /**\n * The selected number for the available days in the future.\n */\n @State() selectedNumber;\n /**\n * The selected period for the available days in the future.\n */\n @State() selectedPeriod;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\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-limit-future-bookings', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newVal: Configuration) {\n const daysInFuture = newVal?.scheduler?.available_days_in_future || this.availableDaysInFuture || 1;\n if (daysInFuture) {\n this.updateNumberAndPeriodFromDays(daysInFuture);\n }\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(daysInFuture?.toString(), this.name);\n }\n\n /**\n * Event emitted when the future booking limit changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-limit-future-bookings', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-limit-future-bookings', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-limit-future-bookings', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.updateNumberAndPeriodFromDays(this.availableDaysInFuture || 1);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-limit-future-bookings', 'disconnectedCallback');\n }\n\n @Listen('timePeriodChanged')\n timePeriodChangedHandler(\n event: CustomEvent<{\n number: number;\n period: string;\n }>,\n ) {\n const { number, period } = event.detail;\n let availableDaysInFuture;\n if (period === 'day') {\n availableDaysInFuture = number;\n } else if (period === 'week') {\n availableDaysInFuture = number * 7;\n } else {\n availableDaysInFuture = number * 30;\n }\n this.valueChanged.emit({ value: availableDaysInFuture, name: 'availableDaysInFuture' });\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(availableDaysInFuture.toString(), this.name);\n }\n\n updateNumberAndPeriodFromDays(days: number): void {\n let number, period;\n if (days >= 30 && days % 30 === 0) {\n number = days / 30;\n period = 'month';\n } else if (days >= 7 && days % 7 === 0) {\n number = days / 7;\n period = 'week';\n } else {\n number = days;\n period = 'day';\n }\n this.selectedNumber = number;\n this.selectedPeriod = period;\n }\n\n @RegisterComponent<NylasLimitFutureBookings, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-limit-future-bookings',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const showTImePeriodSelector = typeof this.selectedNumber == 'number' && typeof this.selectedPeriod == 'string';\n return (\n <Host>\n <div class=\"nylas-limit-future-bookings\" part=\"nlfb\">\n <label>\n Limit future bookings\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">The limit on how far in the future bookings can be made.</span>\n </tooltip-component>\n </span>\n </label>\n {showTImePeriodSelector && (\n <time-period-selector\n id=\"limit-future-bookings\"\n timePeriods={['day', 'week', 'month']}\n exportparts=\"tps__number-dropdown: nlfb__number-dropdown, tps__number-dropdown-button: nlfb__number-dropdown-button, tps__number-dropdown-content: nlfb__number-dropdown-content, tps__period-dropdown: nlfb__period-dropdown, tps__period-dropdown-button: nlfb__period-dropdown-button, tps__period-dropdown-content: nlfb__period-dropdown-content\"\n defaultSelectedNumber={this.selectedNumber}\n defaultSelectedPeriod={this.selectedPeriod}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nylas-limit-future-bookings2.js","mappings":";;;;;;;;;;;AAAA,MAAM,2BAA2B,GAAG,iqCAAiqC,CAAC;AACtsC,uCAAe,2BAA2B;;;;;;;;;;;;;;;;MCuB7B,wBAAwB;;;;;;;;;oBAmBZ,uBAAuB;;;;IAsB9C,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,6BAA6B,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QAC5E,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KAC1C;IAGD,mCAAmC,CAAC,MAAqB;QACvD,MAAM,YAAY,GAAG,MAAM,EAAE,SAAS,EAAE,wBAAwB,IAAI,IAAI,CAAC,qBAAqB,IAAI,CAAC,CAAC;QACpG,IAAI,YAAY,EAAE;YAChB,IAAI,CAAC,6BAA6B,CAAC,YAAY,CAAC,CAAC;SAClD;QACD,IAAI,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,KAAK,UAAU,EAAE;YACrD,OAAO;SACR;QACD,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,YAAY,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;KAClE;IAUD,iBAAiB;QACf,KAAK,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;KAC3D;IAED,iBAAiB;QACf,KAAK,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC;QAC1D,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;KAC3C;IAED,gBAAgB;QACd,KAAK,CAAC,6BAA6B,EAAE,kBAAkB,CAAC,CAAC;QACzD,IAAI,IAAI,CAAC,qBAAqB,EAAE;YAC9B,IAAI,CAAC,mC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AM;YACL,MAAM,GAAG,IAAI,CAAC;YACd,MAAM,GAAG,KAAK,CAAC;SAChB;QACD,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;KAC9B;IAQD,MAAM;QACJ,MAAM,sBAAsB,GAAG,OAAO,IAAI,CAAC,cAAc,IAAI,QAAQ,IAAI,OAAO,IAAI,CAAC,cAAc,IAAI,QAAQ,CAAC;QAChH,QACE,EAAC,IAAI,uDACH,4DAAK,KAAK,EAAC,6BAA6B,EAAC,IAAI,EAAC,MAAM,IAClD,yFAEE,6DAAM,KAAK,EAAC,YAAY,IACtB,4EACE,kEAAW,IAAI,EAAC,cAAc,GAAG,EACjC,6DAAM,IAAI,EAAC,iBAAiB,+DAAgE,CAC1E,CACf,CACD,EACP,sBAAsB,KACrB,4BACE,EAAE,EAAC,uBAAuB,EAC1B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EACrC,WAAW,EAAC,0UAA0U,EACtV,qBAAqB,EAAE,IAAI,CAAC,cAAc,EAC1C,qBAAqB,EAAE,IAAI,CAAC,cAAc,GAC1C,CACH,CACG,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;AA1BD;IANC,iBAAiB,CAA8G;QAC9H,IAAI,EAAE,6BAA6B;QACnC,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;sDA2BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.scss?tag=nylas-limit-future-bookings&encapsulation=shadow","src/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-limit-future-bookings {\n display: flex;\n justify-content: space-between;\n font-family: var(--nylas-font-family);\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n }\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n\nselect-dropdown::part(sd_dropdown-button) {\n border: none;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\n\n/**\n * The `nylas-limit-future-bookings` component is a form input for the number of days in the future a guest is allowed to book an event.\n *\n * @part nlfb - The limit future bookings container\n * @part nlfb__number-dropdown - The number dropdown container\n * @part nlfb__number-dropdown-button - The number dropdown button\n * @part nlfb__number-dropdown-content - The number dropdown content\n * @part nlfb__period-dropdown - The period dropdown container\n * @part nlfb__period-dropdown-button - The period dropdown button\n * @part nlfb__period-dropdown-content - The period dropdown content\n */\n@Component({\n tag: 'nylas-limit-future-bookings',\n styleUrl: 'nylas-limit-future-bookings.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasLimitFutureBookings {\n /**\n * The host element <nylas-limit-future-bookings>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The number of days into the future that invitees will see availability, as set in the configuration.\n */\n @Prop() availableDaysInFuture?: number;\n /**\n * @standalone\n * The name of the limit future bookings input.\n */\n @Prop() name: string = 'limit-future-bookings';\n\n /**\n * The selected number for the available days in the future.\n */\n @State() selectedNumber;\n /**\n * The selected period for the available days in the future.\n */\n @State() selectedPeriod;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\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-limit-future-bookings', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newVal: Configuration) {\n const daysInFuture = newVal?.scheduler?.available_days_in_future || this.availableDaysInFuture || 1;\n if (daysInFuture) {\n this.updateNumberAndPeriodFromDays(daysInFuture);\n }\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(daysInFuture?.toString(), this.name);\n }\n\n /**\n * Event emitted when the future booking limit changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-limit-future-bookings', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-limit-future-bookings', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-limit-future-bookings', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.updateNumberAndPeriodFromDays(this.availableDaysInFuture || 1);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-limit-future-bookings', 'disconnectedCallback');\n }\n\n @Listen('timePeriodChanged')\n timePeriodChangedHandler(\n event: CustomEvent<{\n number: number;\n period: string;\n }>,\n ) {\n const { number, period } = event.detail;\n let availableDaysInFuture;\n if (period === 'day') {\n availableDaysInFuture = number;\n } else if (period === 'week') {\n availableDaysInFuture = number * 7;\n } else {\n availableDaysInFuture = number * 30;\n }\n this.valueChanged.emit({ value: availableDaysInFuture, name: 'availableDaysInFuture' });\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(availableDaysInFuture.toString(), this.name);\n }\n\n updateNumberAndPeriodFromDays(days: number): void {\n let number, period;\n if (days >= 30 && days % 30 === 0) {\n number = days / 30;\n period = 'month';\n } else if (days >= 7 && days % 7 === 0) {\n number = days / 7;\n period = 'week';\n } else {\n number = days;\n period = 'day';\n }\n this.selectedNumber = number;\n this.selectedPeriod = period;\n }\n\n @RegisterComponent<NylasLimitFutureBookings, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-limit-future-bookings',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const showTImePeriodSelector = typeof this.selectedNumber == 'number' && typeof this.selectedPeriod == 'string';\n return (\n <Host>\n <div class=\"nylas-limit-future-bookings\" part=\"nlfb\">\n <label>\n Limit future bookings\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">The limit on how far in the future bookings can be made.</span>\n </tooltip-component>\n </span>\n </label>\n {showTImePeriodSelector && (\n <time-period-selector\n id=\"limit-future-bookings\"\n timePeriods={['day', 'week', 'month']}\n exportparts=\"tps__number-dropdown: nlfb__number-dropdown, tps__number-dropdown-button: nlfb__number-dropdown-button, tps__number-dropdown-content: nlfb__number-dropdown-content, tps__period-dropdown: nlfb__period-dropdown, tps__period-dropdown-button: nlfb__period-dropdown-button, tps__period-dropdown-content: nlfb__period-dropdown-content\"\n defaultSelectedNumber={this.selectedNumber}\n defaultSelectedPeriod={this.selectedPeriod}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -155,8 +155,8 @@ const NylasListConfigurations = proxyCustomElement(class NylasListConfigurations
155
155
  } }, h("th", null, "Page title"), h("th", null, "Duration"), h("th", null)), this.state === 'loading' && (h("tr", { class: "no-configurations" }, h("td", { colSpan: 3 }, h("div", null, h("h3", null, "Loading..."), h("p", null, "Please wait while we fetch the scheduling pages"))))), this.state !== 'loading' && (!this.configurations || this.configurations.length === 0) && (h("tr", { class: "no-configurations" }, h("td", { colSpan: 3 }, h("div", null, h("calendar-icon", { width: "48", height: "48" }), h("h3", null, "No scheduling pages found"), h("p", null, "Get started with creating your first scheduling page"), h("button-component", { part: "nlc__create-new-cta", clickHandler: () => {
156
156
  this.createButtonClick.emit(this.host);
157
157
  } }, "Create new"))))), this.state !== 'loading' &&
158
- this.configurations.map((config, i) => {
159
- return (h("tr", { key: config.id }, h("td", null, h("div", { class: "title" }, h("div", { class: "config-event-title", title: config.event_booking.title }, config.event_booking.title), h("div", { class: 'config-event-description' }, config.event_booking.description))), h("td", null, h("div", { class: "duration" }, this.getDurationString(config.availability.duration_minutes))), h("td", null, h("div", { class: "actions" }, h("button-component", { variant: 'basic', key: `edit-${i}`, clickHandler: event => {
158
+ this.configurations?.map((config, i) => {
159
+ return (h("tr", { key: config?.id }, h("td", null, h("div", { class: "title" }, h("div", { class: "config-event-title", title: config?.event_booking?.title }, config?.event_booking?.title), h("div", { class: 'config-event-description' }, config?.event_booking?.description))), h("td", null, h("div", { class: "duration" }, this.getDurationString(config?.availability?.duration_minutes))), h("td", null, h("div", { class: "actions" }, h("button-component", { variant: 'basic', key: `edit-${i}`, clickHandler: event => {
160
160
  event.preventDefault();
161
161
  this.editButtonClick.emit({ host: this.host, configuration: config });
162
162
  } }, h("edit-icon", { width: "16", height: "16" }), "Edit"), h("select-dropdown", { name: "actions", options: [