@nylas/web-elements 1.1.0-canary.19.c → 1.1.0-canary.19.d

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 (876) hide show
  1. package/dist/cjs/add-circle-icon_2.cjs.entry.js +1 -1
  2. package/dist/cjs/archive-icon_7.cjs.entry.js +7 -7
  3. package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
  4. package/dist/cjs/bold-icon_3.cjs.entry.js +3 -3
  5. package/dist/cjs/button-component_4.cjs.entry.js +203 -0
  6. package/dist/cjs/button-component_4.cjs.entry.js.map +1 -0
  7. package/dist/cjs/calendar-agenda-fill-icon_35.cjs.entry.js +6943 -0
  8. package/dist/cjs/calendar-agenda-fill-icon_35.cjs.entry.js.map +1 -0
  9. package/dist/cjs/chevron-icon_3.cjs.entry.js +11 -3
  10. package/dist/cjs/chevron-icon_3.cjs.entry.js.map +1 -1
  11. package/dist/cjs/clock-icon_2.cjs.entry.js +1 -1
  12. package/dist/cjs/{constants-3e962931.js → constants-7cc75333.js} +106 -1
  13. package/dist/cjs/{constants-3e962931.js.map → constants-7cc75333.js.map} +1 -1
  14. package/dist/cjs/copy-icon_4.cjs.entry.js +72 -0
  15. package/dist/cjs/copy-icon_4.cjs.entry.js.map +1 -0
  16. package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
  17. package/dist/cjs/forward-icon_6.cjs.entry.js +7 -7
  18. package/dist/cjs/globe-icon.cjs.entry.js +1 -1
  19. package/dist/cjs/google-logo-icon_4.cjs.entry.js +192 -51
  20. package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
  21. package/dist/cjs/index-7af03e3f.js +20 -16
  22. package/dist/cjs/index.cjs.js +1 -1
  23. package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
  24. package/dist/cjs/input-dropdown_2.cjs.entry.js +2 -2
  25. package/dist/cjs/loader.cjs.js +1 -1
  26. package/dist/cjs/loading-icon.cjs.entry.js +1 -1
  27. package/dist/cjs/multi-select-dropdown.cjs.entry.js +144 -0
  28. package/dist/cjs/multi-select-dropdown.cjs.entry.js.map +1 -0
  29. package/dist/cjs/{nylas-api-request-a1751a40.js → nylas-api-request-393b08a0.js} +2 -1
  30. package/dist/cjs/nylas-api-request-393b08a0.js.map +1 -0
  31. package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +66 -35
  32. package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js.map +1 -1
  33. package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +1 -1
  34. package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
  35. package/dist/cjs/nylas-if-state.cjs.entry.js +1 -1
  36. package/dist/cjs/nylas-list-folders.cjs.entry.js +1 -1
  37. package/dist/cjs/nylas-list-threads.cjs.entry.js +1 -1
  38. package/dist/cjs/nylas-login.cjs.entry.js +1 -1
  39. package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +1 -1
  40. package/dist/cjs/nylas-mailbox.cjs.entry.js +1 -1
  41. package/dist/cjs/nylas-provider.cjs.entry.js +3 -3
  42. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +26 -9
  43. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
  44. package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
  45. package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
  46. package/dist/cjs/nylas-threads-refresh.cjs.entry.js +2 -2
  47. package/dist/cjs/nylas-threads-search.cjs.entry.js +1 -1
  48. package/dist/cjs/nylas-time-window-picker.cjs.entry.js +1 -1
  49. package/dist/cjs/nylas-view-thread.cjs.entry.js +1 -1
  50. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  51. package/dist/cjs/play-icon_2.cjs.entry.js +2 -2
  52. package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
  53. package/dist/cjs/{scheduler-config-store-9f19c7a9.js → scheduler-config-store-5bfc8cb8.js} +3 -1
  54. package/dist/cjs/scheduler-config-store-5bfc8cb8.js.map +1 -0
  55. package/dist/cjs/{scheduler-store-0f7328f1.js → scheduler-store-b5cf2e82.js} +43 -7
  56. package/dist/cjs/scheduler-store-b5cf2e82.js.map +1 -0
  57. package/dist/cjs/textarea-component.cjs.entry.js +3 -1
  58. package/dist/cjs/textarea-component.cjs.entry.js.map +1 -1
  59. package/dist/cjs/translate-icon.cjs.entry.js +1 -1
  60. package/dist/cjs/warning-icon.cjs.entry.js +1 -1
  61. package/dist/collection/collection-manifest.json +14 -0
  62. package/dist/collection/common/constants.js +102 -0
  63. package/dist/collection/common/constants.js.map +1 -1
  64. package/dist/collection/common/icons/add-circle.js +1 -1
  65. package/dist/collection/common/icons/archive.js +1 -1
  66. package/dist/collection/common/icons/arrow.js +1 -1
  67. package/dist/collection/common/icons/bold.js +1 -1
  68. package/dist/collection/common/icons/calendar-agenda-fill.js +63 -0
  69. package/dist/collection/common/icons/calendar-agenda-fill.js.map +1 -0
  70. package/dist/collection/common/icons/calendar-agenda.js +63 -0
  71. package/dist/collection/common/icons/calendar-agenda.js.map +1 -0
  72. package/dist/collection/common/icons/copy.js +63 -0
  73. package/dist/collection/common/icons/copy.js.map +1 -0
  74. package/dist/collection/common/icons/delete.js +63 -0
  75. package/dist/collection/common/icons/delete.js.map +1 -0
  76. package/dist/collection/common/icons/document-refresh.js +1 -1
  77. package/dist/collection/common/icons/dragable.js +63 -0
  78. package/dist/collection/common/icons/dragable.js.map +1 -0
  79. package/dist/collection/common/icons/edit.js +63 -0
  80. package/dist/collection/common/icons/edit.js.map +1 -0
  81. package/dist/collection/common/icons/eye.js +63 -0
  82. package/dist/collection/common/icons/eye.js.map +1 -0
  83. package/dist/collection/common/icons/flow.js +1 -1
  84. package/dist/collection/common/icons/folder.js +1 -1
  85. package/dist/collection/common/icons/forward.js +1 -1
  86. package/dist/collection/common/icons/globe.js +1 -1
  87. package/dist/collection/common/icons/google-logo.js +1 -1
  88. package/dist/collection/common/icons/google-meet.js +63 -0
  89. package/dist/collection/common/icons/google-meet.js.map +1 -0
  90. package/dist/collection/common/icons/inbox.js +1 -1
  91. package/dist/collection/common/icons/info.js +1 -1
  92. package/dist/collection/common/icons/italic.js +1 -1
  93. package/dist/collection/common/icons/loading.js +1 -1
  94. package/dist/collection/common/icons/location-off.js +1 -1
  95. package/dist/collection/common/icons/location.js +1 -1
  96. package/dist/collection/common/icons/microsof-teams.js +63 -0
  97. package/dist/collection/common/icons/microsof-teams.js.map +1 -0
  98. package/dist/collection/common/icons/microsoft-logo.js +1 -1
  99. package/dist/collection/common/icons/nylas-logo.js +1 -1
  100. package/dist/collection/common/icons/people.js +1 -1
  101. package/dist/collection/common/icons/person.js +1 -1
  102. package/dist/collection/common/icons/play.js +1 -1
  103. package/dist/collection/common/icons/plus.js +63 -0
  104. package/dist/collection/common/icons/plus.js.map +1 -0
  105. package/dist/collection/common/icons/refresh.js +1 -1
  106. package/dist/collection/common/icons/reply-all.js +1 -1
  107. package/dist/collection/common/icons/reply.js +1 -1
  108. package/dist/collection/common/icons/search.js +1 -1
  109. package/dist/collection/common/icons/sent.js +1 -1
  110. package/dist/collection/common/icons/spam.js +1 -1
  111. package/dist/collection/common/icons/star.js +1 -1
  112. package/dist/collection/common/icons/stop.js +1 -1
  113. package/dist/collection/common/icons/translate.js +1 -1
  114. package/dist/collection/common/icons/trash.js +1 -1
  115. package/dist/collection/common/icons/underline.js +1 -1
  116. package/dist/collection/common/icons/warning.js +1 -1
  117. package/dist/collection/common/icons/zoom.js +63 -0
  118. package/dist/collection/common/icons/zoom.js.map +1 -0
  119. package/dist/collection/common/nylas-api-request.js +1 -0
  120. package/dist/collection/common/nylas-api-request.js.map +1 -1
  121. package/dist/collection/common/types.js.map +1 -1
  122. package/dist/collection/components/design-system/button-component/button-component.css +4 -0
  123. package/dist/collection/components/design-system/button-component/button-component.js +1 -1
  124. package/dist/collection/components/design-system/checkbox-component/checkbox-component.css +15 -1
  125. package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +46 -6
  126. package/dist/collection/components/design-system/checkbox-component/checkbox-component.js.map +1 -1
  127. package/dist/collection/components/design-system/input-component/input-component.css +9 -1
  128. package/dist/collection/components/design-system/input-component/input-component.js +20 -8
  129. package/dist/collection/components/design-system/input-component/input-component.js.map +1 -1
  130. package/dist/collection/components/design-system/input-dropdown/input-dropdown.js +1 -1
  131. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.css +8 -1
  132. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +21 -2
  133. package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js.map +1 -1
  134. package/dist/collection/components/design-system/radio-button-group/radio-button-group.css +57 -1
  135. package/dist/collection/components/design-system/radio-button-group/radio-button-group.js +69 -10
  136. package/dist/collection/components/design-system/radio-button-group/radio-button-group.js.map +1 -1
  137. package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +45 -2
  138. package/dist/collection/components/design-system/select-dropdown/select-dropdown.js.map +1 -1
  139. package/dist/collection/components/design-system/textarea-component/textarea-component.js +23 -3
  140. package/dist/collection/components/design-system/textarea-component/textarea-component.js.map +1 -1
  141. package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
  142. package/dist/collection/components/design-system/toggle-switch/toggle-switch.css +1 -1
  143. package/dist/collection/components/design-system/toggle-switch/toggle-switch.js +5 -5
  144. package/dist/collection/components/design-system/toggle-switch/toggle-switch.js.map +1 -1
  145. package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
  146. package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +1 -1
  147. package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +1 -1
  148. package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +1 -1
  149. package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +1 -1
  150. package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +1 -1
  151. package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +2 -2
  152. package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +2 -2
  153. package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +1 -1
  154. package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +1 -1
  155. package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js +1 -1
  156. package/dist/collection/components/nylas-if-state/nylas-if-state.js +1 -1
  157. package/dist/collection/components/nylas-login/nylas-login.js +1 -1
  158. package/dist/collection/components/nylas-provider/nylas-provider.js +1 -1
  159. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +23 -4
  160. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
  161. package/dist/collection/components/scheduler/nylas-booked-event-card/test/nylas-booked-event-card.spec.js +1 -0
  162. package/dist/collection/components/scheduler/nylas-booked-event-card/test/nylas-booked-event-card.spec.js.map +1 -1
  163. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +37 -21
  164. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
  165. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +42 -3
  166. package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js.map +1 -1
  167. package/dist/collection/components/scheduler/nylas-cancel-booking-form/test/nylas-cancel-booking-form.spec.js +11 -0
  168. package/dist/collection/components/scheduler/nylas-cancel-booking-form/test/nylas-cancel-booking-form.spec.js.map +1 -1
  169. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +2 -2
  170. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +1 -1
  171. package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
  172. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.css +4 -1
  173. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +3 -3
  174. package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
  175. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +1 -1
  176. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +2 -2
  177. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +8 -7
  178. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
  179. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.css +16 -2
  180. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +31 -12
  181. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
  182. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.css +3 -0
  183. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +2 -2
  184. package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
  185. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.css +3 -0
  186. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +22 -6
  187. package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
  188. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.css +233 -0
  189. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +388 -0
  190. package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js.map +1 -0
  191. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.css +3 -20
  192. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +19 -9
  193. package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
  194. package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js +1 -1
  195. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.css +105 -0
  196. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js +298 -0
  197. package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js.map +1 -0
  198. package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +1 -1
  199. package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js +5 -5
  200. package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js.map +1 -1
  201. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.css +3 -0
  202. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +106 -20
  203. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  204. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +7 -7
  205. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
  206. package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
  207. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
  208. package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js.map +1 -1
  209. package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +161 -11
  210. package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js.map +1 -1
  211. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +1 -1
  212. package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
  213. package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
  214. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +1 -1
  215. package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
  216. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.css +79 -3
  217. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +125 -22
  218. package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
  219. package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js +1 -1
  220. package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js.map +1 -1
  221. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +1 -1
  222. package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
  223. package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.css +105 -0
  224. package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js +324 -0
  225. package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js.map +1 -0
  226. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +39 -5
  227. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
  228. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js +4 -3
  229. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js.map +1 -1
  230. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +59 -9
  231. package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js.map +1 -1
  232. package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
  233. package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +16 -16
  234. package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js.map +1 -1
  235. package/dist/collection/connector/shared/api/scheduler-config.js +4 -2
  236. package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
  237. package/dist/collection/connector/shared/api/scheduler.js +41 -6
  238. package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
  239. package/dist/collection/stores/scheduler-config-store.js +2 -0
  240. package/dist/collection/stores/scheduler-config-store.js.map +1 -1
  241. package/dist/collection/stores/scheduler-store.js +1 -0
  242. package/dist/collection/stores/scheduler-store.js.map +1 -1
  243. package/dist/collection/types/index.js.map +1 -1
  244. package/dist/components/add-circle.js +1 -1
  245. package/dist/components/archive.js +1 -1
  246. package/dist/components/arrow.js +1 -1
  247. package/dist/components/bold.js +1 -1
  248. package/dist/components/button-component2.js +2 -2
  249. package/dist/components/button-component2.js.map +1 -1
  250. package/dist/components/calendar-agenda-fill-icon.d.ts +11 -0
  251. package/dist/components/calendar-agenda-fill-icon.js +8 -0
  252. package/dist/components/calendar-agenda-fill-icon.js.map +1 -0
  253. package/dist/components/calendar-agenda-fill.js +37 -0
  254. package/dist/components/calendar-agenda-fill.js.map +1 -0
  255. package/dist/components/calendar-agenda-icon.d.ts +11 -0
  256. package/dist/components/calendar-agenda-icon.js +8 -0
  257. package/dist/components/calendar-agenda-icon.js.map +1 -0
  258. package/dist/components/calendar-agenda.js +37 -0
  259. package/dist/components/calendar-agenda.js.map +1 -0
  260. package/dist/components/checkbox-component2.js +18 -4
  261. package/dist/components/checkbox-component2.js.map +1 -1
  262. package/dist/components/constants.js +102 -1
  263. package/dist/components/constants.js.map +1 -1
  264. package/dist/components/copy-icon.d.ts +11 -0
  265. package/dist/components/copy-icon.js +8 -0
  266. package/dist/components/copy-icon.js.map +1 -0
  267. package/dist/components/copy.js +37 -0
  268. package/dist/components/copy.js.map +1 -0
  269. package/dist/components/delete-icon.d.ts +11 -0
  270. package/dist/components/delete-icon.js +8 -0
  271. package/dist/components/delete-icon.js.map +1 -0
  272. package/dist/components/delete.js +37 -0
  273. package/dist/components/delete.js.map +1 -0
  274. package/dist/components/document-refresh-icon.js +1 -1
  275. package/dist/components/dragable-icon.d.ts +11 -0
  276. package/dist/components/dragable-icon.js +8 -0
  277. package/dist/components/dragable-icon.js.map +1 -0
  278. package/dist/components/dragable.js +37 -0
  279. package/dist/components/dragable.js.map +1 -0
  280. package/dist/components/edit-icon.d.ts +11 -0
  281. package/dist/components/edit-icon.js +8 -0
  282. package/dist/components/edit-icon.js.map +1 -0
  283. package/dist/components/edit.js +37 -0
  284. package/dist/components/edit.js.map +1 -0
  285. package/dist/components/eye-icon.d.ts +11 -0
  286. package/dist/components/eye-icon.js +8 -0
  287. package/dist/components/eye-icon.js.map +1 -0
  288. package/dist/components/eye.js +37 -0
  289. package/dist/components/eye.js.map +1 -0
  290. package/dist/components/flow.js +1 -1
  291. package/dist/components/folder.js +1 -1
  292. package/dist/components/forward.js +1 -1
  293. package/dist/components/globe.js +1 -1
  294. package/dist/components/google-logo.js +1 -1
  295. package/dist/components/google-meet-icon.d.ts +11 -0
  296. package/dist/components/google-meet-icon.js +8 -0
  297. package/dist/components/google-meet-icon.js.map +1 -0
  298. package/dist/components/google-meet.js +37 -0
  299. package/dist/components/google-meet.js.map +1 -0
  300. package/dist/components/inbox.js +1 -1
  301. package/dist/components/info.js +1 -1
  302. package/dist/components/input-component2.js +17 -6
  303. package/dist/components/input-component2.js.map +1 -1
  304. package/dist/components/input-dropdown2.js +1 -1
  305. package/dist/components/italic.js +1 -1
  306. package/dist/components/loading.js +1 -1
  307. package/dist/components/location-off.js +1 -1
  308. package/dist/components/location.js +1 -1
  309. package/dist/components/microsof-teams.js +37 -0
  310. package/dist/components/microsof-teams.js.map +1 -0
  311. package/dist/components/microsoft-logo.js +1 -1
  312. package/dist/components/microsoft-teams-icon.d.ts +11 -0
  313. package/dist/components/microsoft-teams-icon.js +8 -0
  314. package/dist/components/microsoft-teams-icon.js.map +1 -0
  315. package/dist/components/multi-select-dropdown2.js +5 -3
  316. package/dist/components/multi-select-dropdown2.js.map +1 -1
  317. package/dist/components/nylas-additional-participants2.js +26 -8
  318. package/dist/components/nylas-additional-participants2.js.map +1 -1
  319. package/dist/components/nylas-api-request.js +1 -0
  320. package/dist/components/nylas-api-request.js.map +1 -1
  321. package/dist/components/nylas-availability-picker2.js +2 -2
  322. package/dist/components/nylas-availability-picker2.js.map +1 -1
  323. package/dist/components/nylas-booked-event-card2.js +7 -4
  324. package/dist/components/nylas-booked-event-card2.js.map +1 -1
  325. package/dist/components/nylas-booking-calendar-picker2.js +5 -6
  326. package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
  327. package/dist/components/nylas-booking-form-config.d.ts +11 -0
  328. package/dist/components/nylas-booking-form-config.js +8 -0
  329. package/dist/components/nylas-booking-form-config.js.map +1 -0
  330. package/dist/components/nylas-booking-form-config2.js +3691 -0
  331. package/dist/components/nylas-booking-form-config2.js.map +1 -0
  332. package/dist/components/nylas-booking-form2.js +78 -32
  333. package/dist/components/nylas-booking-form2.js.map +1 -1
  334. package/dist/components/nylas-calendar-picker2.js +27 -23
  335. package/dist/components/nylas-calendar-picker2.js.map +1 -1
  336. package/dist/components/nylas-cancel-booking-form2.js +21 -2
  337. package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
  338. package/dist/components/nylas-cancellation-policy2.js +1 -1
  339. package/dist/components/nylas-cancelled-event-card2.js +1 -1
  340. package/dist/components/nylas-composer2.js +1 -1
  341. package/dist/components/nylas-connected-calendars.d.ts +11 -0
  342. package/dist/components/nylas-connected-calendars.js +8 -0
  343. package/dist/components/nylas-connected-calendars.js.map +1 -0
  344. package/dist/components/nylas-connected-calendars2.js +232 -0
  345. package/dist/components/nylas-connected-calendars2.js.map +1 -0
  346. package/dist/components/nylas-custom-booking-flow.js +1 -1
  347. package/dist/components/nylas-customize-booking-settings2.js +4 -4
  348. package/dist/components/nylas-customize-booking-settings2.js.map +1 -1
  349. package/dist/components/nylas-editor-tabs2.js +251 -113
  350. package/dist/components/nylas-editor-tabs2.js.map +1 -1
  351. package/dist/components/nylas-event-info2.js +1 -1
  352. package/dist/components/nylas-event-limits2.js +1 -1
  353. package/dist/components/nylas-event-limits2.js.map +1 -1
  354. package/dist/components/nylas-event-location2.js +138 -25
  355. package/dist/components/nylas-event-location2.js.map +1 -1
  356. package/dist/components/nylas-event-title2.js +1 -1
  357. package/dist/components/nylas-event-title2.js.map +1 -1
  358. package/dist/components/nylas-form-card2.js +1 -1
  359. package/dist/components/nylas-if-state.js +1 -1
  360. package/dist/components/nylas-limit-future-bookings2.js +1 -1
  361. package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
  362. package/dist/components/nylas-list-configurations2.js +142 -25
  363. package/dist/components/nylas-list-configurations2.js.map +1 -1
  364. package/dist/components/nylas-list-folders.js +1 -1
  365. package/dist/components/nylas-list-threads.js +1 -1
  366. package/dist/components/nylas-login.js +1 -1
  367. package/dist/components/nylas-logo2.js +1 -1
  368. package/dist/components/nylas-mailbox-toolbar-button.js +1 -1
  369. package/dist/components/nylas-mailbox.js +1 -1
  370. package/dist/components/nylas-min-booking-notice2.js +1 -1
  371. package/dist/components/nylas-min-booking-notice2.js.map +1 -1
  372. package/dist/components/nylas-min-cancellation-notice2.js +1 -1
  373. package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
  374. package/dist/components/nylas-notification2.js +1 -1
  375. package/dist/components/nylas-participant-booking-calendars.d.ts +11 -0
  376. package/dist/components/nylas-participant-booking-calendars.js +8 -0
  377. package/dist/components/nylas-participant-booking-calendars.js.map +1 -0
  378. package/dist/components/nylas-participant-booking-calendars2.js +237 -0
  379. package/dist/components/nylas-participant-booking-calendars2.js.map +1 -0
  380. package/dist/components/nylas-participants-custom-availability2.js +18 -5
  381. package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
  382. package/dist/components/nylas-provider.js +1 -1
  383. package/dist/components/nylas-scheduler-editor.js +210 -101
  384. package/dist/components/nylas-scheduler-editor.js.map +1 -1
  385. package/dist/components/nylas-scheduling.js +70 -52
  386. package/dist/components/nylas-scheduling.js.map +1 -1
  387. package/dist/components/nylas-summarize-message-button2.js +2 -2
  388. package/dist/components/nylas-threads-refresh.js +2 -2
  389. package/dist/components/nylas-threads-search.js +1 -1
  390. package/dist/components/nylas-time-window-picker2.js +1 -1
  391. package/dist/components/nylas-timeslot-interval2.js +11 -11
  392. package/dist/components/nylas-timeslot-interval2.js.map +1 -1
  393. package/dist/components/nylas-timeslot-picker2.js +6 -5
  394. package/dist/components/nylas-timeslot-picker2.js.map +1 -1
  395. package/dist/components/nylas-view-email2.js +1 -1
  396. package/dist/components/nylas-view-thread.js +1 -1
  397. package/dist/components/people.js +1 -1
  398. package/dist/components/person.js +1 -1
  399. package/dist/components/play.js +1 -1
  400. package/dist/components/plus-icon.d.ts +11 -0
  401. package/dist/components/plus-icon.js +8 -0
  402. package/dist/components/plus-icon.js.map +1 -0
  403. package/dist/components/plus.js +37 -0
  404. package/dist/components/plus.js.map +1 -0
  405. package/dist/components/radio-button-group2.js +23 -6
  406. package/dist/components/radio-button-group2.js.map +1 -1
  407. package/dist/components/refresh.js +1 -1
  408. package/dist/components/reply-all.js +1 -1
  409. package/dist/components/reply.js +1 -1
  410. package/dist/components/scheduler-config-store.js +2 -0
  411. package/dist/components/scheduler-config-store.js.map +1 -1
  412. package/dist/components/scheduler-store.js +42 -6
  413. package/dist/components/scheduler-store.js.map +1 -1
  414. package/dist/components/search.js +1 -1
  415. package/dist/components/select-dropdown2.js +12 -2
  416. package/dist/components/select-dropdown2.js.map +1 -1
  417. package/dist/components/sent.js +1 -1
  418. package/dist/components/spam.js +1 -1
  419. package/dist/components/star.js +1 -1
  420. package/dist/components/stop.js +1 -1
  421. package/dist/components/textarea-component.js +1 -82
  422. package/dist/components/textarea-component.js.map +1 -1
  423. package/dist/components/textarea-component2.js +89 -0
  424. package/dist/components/textarea-component2.js.map +1 -0
  425. package/dist/components/time-period-selector2.js +1 -1
  426. package/dist/components/toggle-switch2.js +2 -2
  427. package/dist/components/toggle-switch2.js.map +1 -1
  428. package/dist/components/toolitp-component.js +1 -1
  429. package/dist/components/translate.js +1 -1
  430. package/dist/components/trash.js +1 -1
  431. package/dist/components/underline.js +1 -1
  432. package/dist/components/warning.js +1 -1
  433. package/dist/components/zoom-icon.d.ts +11 -0
  434. package/dist/components/zoom-icon.js +8 -0
  435. package/dist/components/zoom-icon.js.map +1 -0
  436. package/dist/components/zoom.js +37 -0
  437. package/dist/components/zoom.js.map +1 -0
  438. package/dist/esm/add-circle-icon_2.entry.js +1 -1
  439. package/dist/esm/archive-icon_7.entry.js +7 -7
  440. package/dist/esm/arrow-icon.entry.js +1 -1
  441. package/dist/esm/bold-icon_3.entry.js +3 -3
  442. package/dist/esm/button-component_4.entry.js +196 -0
  443. package/dist/esm/button-component_4.entry.js.map +1 -0
  444. package/dist/esm/calendar-agenda-fill-icon_35.entry.js +6905 -0
  445. package/dist/esm/calendar-agenda-fill-icon_35.entry.js.map +1 -0
  446. package/dist/esm/chevron-icon_3.entry.js +11 -3
  447. package/dist/esm/chevron-icon_3.entry.js.map +1 -1
  448. package/dist/esm/clock-icon_2.entry.js +1 -1
  449. package/dist/esm/{constants-f34b9c6e.js → constants-7ce66b44.js} +103 -2
  450. package/dist/esm/{constants-f34b9c6e.js.map → constants-7ce66b44.js.map} +1 -1
  451. package/dist/esm/copy-icon_4.entry.js +65 -0
  452. package/dist/esm/copy-icon_4.entry.js.map +1 -0
  453. package/dist/esm/document-refresh-icon.entry.js +1 -1
  454. package/dist/esm/forward-icon_6.entry.js +7 -7
  455. package/dist/esm/globe-icon.entry.js +1 -1
  456. package/dist/esm/google-logo-icon_4.entry.js +192 -51
  457. package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
  458. package/dist/esm/index-7cb0dd3d.js +20 -16
  459. package/dist/esm/index.js +1 -1
  460. package/dist/esm/info-icon_2.entry.js +2 -2
  461. package/dist/esm/input-dropdown_2.entry.js +2 -2
  462. package/dist/esm/loader.js +1 -1
  463. package/dist/esm/loading-icon.entry.js +1 -1
  464. package/dist/esm/multi-select-dropdown.entry.js +140 -0
  465. package/dist/esm/multi-select-dropdown.entry.js.map +1 -0
  466. package/dist/esm/{nylas-api-request-a67d2997.js → nylas-api-request-4f8edff2.js} +2 -1
  467. package/dist/esm/nylas-api-request-4f8edff2.js.map +1 -0
  468. package/dist/esm/nylas-booked-event-card_10.entry.js +66 -35
  469. package/dist/esm/nylas-booked-event-card_10.entry.js.map +1 -1
  470. package/dist/esm/nylas-custom-booking-flow.entry.js +1 -1
  471. package/dist/esm/nylas-form-card.entry.js +1 -1
  472. package/dist/esm/nylas-if-state.entry.js +1 -1
  473. package/dist/esm/nylas-list-folders.entry.js +1 -1
  474. package/dist/esm/nylas-list-threads.entry.js +1 -1
  475. package/dist/esm/nylas-login.entry.js +1 -1
  476. package/dist/esm/nylas-mailbox-toolbar-button.entry.js +1 -1
  477. package/dist/esm/nylas-mailbox.entry.js +1 -1
  478. package/dist/esm/nylas-provider.entry.js +3 -3
  479. package/dist/esm/nylas-scheduler-editor.entry.js +26 -9
  480. package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
  481. package/dist/esm/nylas-scheduling.entry.js +3 -3
  482. package/dist/esm/nylas-scheduling.entry.js.map +1 -1
  483. package/dist/esm/nylas-threads-refresh.entry.js +2 -2
  484. package/dist/esm/nylas-threads-search.entry.js +1 -1
  485. package/dist/esm/nylas-time-window-picker.entry.js +1 -1
  486. package/dist/esm/nylas-view-thread.entry.js +1 -1
  487. package/dist/esm/nylas-web-elements.js +1 -1
  488. package/dist/esm/play-icon_2.entry.js +2 -2
  489. package/dist/esm/refresh-icon.entry.js +1 -1
  490. package/dist/esm/{scheduler-config-store-4a50a03d.js → scheduler-config-store-9ccfba4d.js} +3 -1
  491. package/dist/esm/scheduler-config-store-9ccfba4d.js.map +1 -0
  492. package/dist/esm/{scheduler-store-f02ce045.js → scheduler-store-8a400448.js} +43 -7
  493. package/dist/esm/scheduler-store-8a400448.js.map +1 -0
  494. package/dist/esm/textarea-component.entry.js +3 -1
  495. package/dist/esm/textarea-component.entry.js.map +1 -1
  496. package/dist/esm/translate-icon.entry.js +1 -1
  497. package/dist/esm/warning-icon.entry.js +1 -1
  498. package/dist/nylas-web-elements/index.esm.js +1 -1
  499. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  500. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
  501. package/dist/nylas-web-elements/p-0161429f.entry.js +2 -0
  502. package/dist/nylas-web-elements/{p-33a6a75b.entry.js.map → p-0161429f.entry.js.map} +1 -1
  503. package/dist/nylas-web-elements/p-064c2ae5.entry.js +2 -0
  504. package/dist/nylas-web-elements/{p-de7b0878.entry.js → p-0aa1e433.entry.js} +2 -2
  505. package/dist/nylas-web-elements/{p-3f122804.entry.js → p-0bf6f818.entry.js} +2 -2
  506. package/dist/nylas-web-elements/p-1102df14.entry.js +2 -0
  507. package/dist/nylas-web-elements/{p-f1a54acf.entry.js → p-155e5ce8.entry.js} +2 -2
  508. package/dist/nylas-web-elements/{p-a85408e0.entry.js → p-18d100c8.entry.js} +2 -2
  509. package/dist/nylas-web-elements/{p-5231fc13.entry.js → p-1a7edf86.entry.js} +3 -3
  510. package/dist/nylas-web-elements/p-1d8c468f.entry.js +2 -0
  511. package/dist/nylas-web-elements/p-1d8c468f.entry.js.map +1 -0
  512. package/dist/nylas-web-elements/{p-be38a8eb.entry.js → p-1e1ae8d0.entry.js} +2 -2
  513. package/dist/nylas-web-elements/p-1f290858.entry.js +2 -0
  514. package/dist/nylas-web-elements/p-1f290858.entry.js.map +1 -0
  515. package/dist/nylas-web-elements/{p-eb7e8455.entry.js → p-1fbe50b1.entry.js} +2 -2
  516. package/dist/nylas-web-elements/p-20bbc663.js +2 -0
  517. package/dist/nylas-web-elements/p-20bbc663.js.map +1 -0
  518. package/dist/nylas-web-elements/{p-49f716ed.js → p-2270e6cf.js} +4 -4
  519. package/dist/nylas-web-elements/p-2270e6cf.js.map +1 -0
  520. package/dist/nylas-web-elements/{p-70e5cfb0.entry.js → p-22e05c7d.entry.js} +2 -2
  521. package/dist/nylas-web-elements/{p-554891cd.entry.js → p-26302ad0.entry.js} +2 -2
  522. package/dist/nylas-web-elements/p-27df8f01.entry.js +2 -0
  523. package/dist/nylas-web-elements/p-27df8f01.entry.js.map +1 -0
  524. package/dist/nylas-web-elements/p-2b1d53fa.entry.js +8 -0
  525. package/dist/nylas-web-elements/p-2b1d53fa.entry.js.map +1 -0
  526. package/dist/nylas-web-elements/{p-6ce66add.entry.js → p-2f47205d.entry.js} +2 -2
  527. package/dist/nylas-web-elements/{p-28512ab6.entry.js → p-3277023d.entry.js} +2 -2
  528. package/dist/nylas-web-elements/{p-1a27960b.entry.js → p-3423de64.entry.js} +2 -2
  529. package/dist/nylas-web-elements/p-3423de64.entry.js.map +1 -0
  530. package/dist/nylas-web-elements/{p-b0c8021f.entry.js → p-34c747f9.entry.js} +2 -2
  531. package/dist/nylas-web-elements/{p-d9a91bc9.entry.js → p-359af1e3.entry.js} +2 -2
  532. package/dist/nylas-web-elements/p-359af1e3.entry.js.map +1 -0
  533. package/dist/nylas-web-elements/{p-613c070f.js → p-371b20b2.js} +2 -2
  534. package/dist/nylas-web-elements/p-371b20b2.js.map +1 -0
  535. package/dist/nylas-web-elements/{p-e9ba368f.entry.js → p-3ae38e51.entry.js} +2 -2
  536. package/dist/nylas-web-elements/{p-6ef1024f.entry.js → p-3bc1289e.entry.js} +2 -2
  537. package/dist/nylas-web-elements/{p-7fcecf3f.entry.js → p-3d1e8e4d.entry.js} +2 -2
  538. package/dist/nylas-web-elements/{p-45c37986.entry.js → p-3dae0c71.entry.js} +2 -2
  539. package/dist/nylas-web-elements/{p-acadfabf.entry.js → p-3db7ab8d.entry.js} +3 -3
  540. package/dist/nylas-web-elements/{p-66493463.entry.js → p-3e09b0fb.entry.js} +2 -2
  541. package/dist/nylas-web-elements/{p-5c3c1888.entry.js → p-3eac9f45.entry.js} +2 -2
  542. package/dist/nylas-web-elements/{p-dcc27b67.entry.js → p-4000107d.entry.js} +2 -2
  543. package/dist/nylas-web-elements/p-40cad9a8.entry.js +11 -0
  544. package/dist/nylas-web-elements/p-40cad9a8.entry.js.map +1 -0
  545. package/dist/nylas-web-elements/p-445d8bb4.entry.js +11 -0
  546. package/dist/nylas-web-elements/p-445d8bb4.entry.js.map +1 -0
  547. package/dist/nylas-web-elements/{p-08d75d35.entry.js → p-47392968.entry.js} +2 -2
  548. package/dist/nylas-web-elements/{p-16a3bfb2.entry.js → p-4a594ebe.entry.js} +2 -2
  549. package/dist/nylas-web-elements/{p-d633e735.entry.js → p-4b6995fe.entry.js} +2 -2
  550. package/dist/nylas-web-elements/p-4cdd4107.entry.js +2 -0
  551. package/dist/nylas-web-elements/{p-39fd9c90.entry.js → p-4e8c8939.entry.js} +2 -2
  552. package/dist/nylas-web-elements/{p-9b68568e.entry.js → p-4e9ba325.entry.js} +2 -2
  553. package/dist/nylas-web-elements/p-4f55d0e5.entry.js +2 -0
  554. package/dist/nylas-web-elements/{p-12b83ea9.entry.js.map → p-4f55d0e5.entry.js.map} +1 -1
  555. package/dist/nylas-web-elements/{p-9794f735.entry.js → p-524a6acc.entry.js} +2 -2
  556. package/dist/nylas-web-elements/{p-6bd9c9c3.entry.js → p-533d39ce.entry.js} +2 -2
  557. package/dist/nylas-web-elements/{p-e928898a.entry.js → p-5a379fb5.entry.js} +2 -2
  558. package/dist/nylas-web-elements/{p-c90755ba.entry.js → p-5a68368a.entry.js} +2 -2
  559. package/dist/nylas-web-elements/{p-37f41a90.entry.js → p-5b965d0d.entry.js} +2 -2
  560. package/dist/nylas-web-elements/p-5e1cd3c1.entry.js +2 -0
  561. package/dist/nylas-web-elements/p-5e1cd3c1.entry.js.map +1 -0
  562. package/dist/nylas-web-elements/{p-34f0d1fe.entry.js → p-5ff4e63b.entry.js} +2 -2
  563. package/dist/nylas-web-elements/p-62aeac5f.entry.js +2 -0
  564. package/dist/nylas-web-elements/p-62aeac5f.entry.js.map +1 -0
  565. package/dist/nylas-web-elements/p-64d43339.entry.js +2 -0
  566. package/dist/nylas-web-elements/p-64d43339.entry.js.map +1 -0
  567. package/dist/nylas-web-elements/p-656cf33f.entry.js +2 -0
  568. package/dist/nylas-web-elements/{p-cf589eab.entry.js → p-65b7a2a7.entry.js} +2 -2
  569. package/dist/nylas-web-elements/p-68471dbd.entry.js +8 -0
  570. package/dist/nylas-web-elements/p-68471dbd.entry.js.map +1 -0
  571. package/dist/nylas-web-elements/p-692852d2.entry.js +2 -0
  572. package/dist/nylas-web-elements/p-692852d2.entry.js.map +1 -0
  573. package/dist/nylas-web-elements/{p-60b03f86.entry.js → p-6c8af4fb.entry.js} +2 -2
  574. package/dist/nylas-web-elements/p-6d410f0a.entry.js +2 -0
  575. package/dist/nylas-web-elements/{p-daac96cb.entry.js → p-6e50d2fd.entry.js} +3 -3
  576. package/dist/nylas-web-elements/p-6e8b7ce8.entry.js +2 -0
  577. package/dist/nylas-web-elements/p-7042eb03.entry.js +2 -0
  578. package/dist/nylas-web-elements/{p-958746a1.entry.js.map → p-7042eb03.entry.js.map} +1 -1
  579. package/dist/nylas-web-elements/{p-b9fa6848.entry.js → p-7355937b.entry.js} +2 -2
  580. package/dist/nylas-web-elements/p-749238c6.entry.js +2 -0
  581. package/dist/nylas-web-elements/p-749238c6.entry.js.map +1 -0
  582. package/dist/nylas-web-elements/p-76156a82.entry.js +2 -0
  583. package/dist/nylas-web-elements/p-79c1475e.entry.js +11 -0
  584. package/dist/nylas-web-elements/p-79c1475e.entry.js.map +1 -0
  585. package/dist/nylas-web-elements/p-79c33cf9.entry.js +2 -0
  586. package/dist/nylas-web-elements/p-79c33cf9.entry.js.map +1 -0
  587. package/dist/nylas-web-elements/{p-052bc3b1.entry.js → p-7e08f131.entry.js} +2 -2
  588. package/dist/nylas-web-elements/{p-a12f3223.entry.js → p-7e10aa6d.entry.js} +2 -2
  589. package/dist/nylas-web-elements/{p-a7b19349.entry.js → p-7e53588e.entry.js} +2 -2
  590. package/dist/nylas-web-elements/p-83de54ae.entry.js +2 -0
  591. package/dist/nylas-web-elements/{p-b2d95965.entry.js → p-884b66bd.entry.js} +2 -2
  592. package/dist/nylas-web-elements/p-8aac762b.entry.js +2 -0
  593. package/dist/nylas-web-elements/p-8aac762b.entry.js.map +1 -0
  594. package/dist/nylas-web-elements/p-8d74c874.js +2 -0
  595. package/dist/nylas-web-elements/p-8d74c874.js.map +1 -0
  596. package/dist/nylas-web-elements/{p-a800e7af.entry.js → p-8ddf6518.entry.js} +2 -2
  597. package/dist/nylas-web-elements/p-8ddf6518.entry.js.map +1 -0
  598. package/dist/nylas-web-elements/{p-7a95bc3f.entry.js → p-90294a76.entry.js} +2 -2
  599. package/dist/nylas-web-elements/p-90817d1f.entry.js +2 -0
  600. package/dist/nylas-web-elements/{p-f1b0120b.entry.js → p-90d32fc3.entry.js} +2 -2
  601. package/dist/nylas-web-elements/p-94a93ca9.entry.js +2 -0
  602. package/dist/nylas-web-elements/p-94a93ca9.entry.js.map +1 -0
  603. package/dist/nylas-web-elements/p-95a9d2f1.entry.js +2 -0
  604. package/dist/nylas-web-elements/p-96746b87.entry.js +2 -0
  605. package/dist/nylas-web-elements/p-97026709.entry.js +2 -0
  606. package/dist/nylas-web-elements/{p-65097f45.entry.js → p-987042a1.entry.js} +2 -2
  607. package/dist/nylas-web-elements/{p-7ce048c0.entry.js → p-9f903292.entry.js} +2 -2
  608. package/dist/nylas-web-elements/{p-bd34f97d.entry.js → p-9fdbeba5.entry.js} +2 -2
  609. package/dist/nylas-web-elements/{p-2a92691a.entry.js → p-a22908ba.entry.js} +2 -2
  610. package/dist/nylas-web-elements/{p-091a8f00.entry.js → p-a3c76c06.entry.js} +2 -2
  611. package/dist/nylas-web-elements/{p-520ffe94.entry.js → p-a63d6241.entry.js} +2 -2
  612. package/dist/nylas-web-elements/{p-cf0d5ab9.entry.js → p-aa4e6e5e.entry.js} +2 -2
  613. package/dist/nylas-web-elements/{p-ba5a625c.entry.js → p-ab050d5b.entry.js} +2 -2
  614. package/dist/nylas-web-elements/p-b2b2d351.entry.js +2 -0
  615. package/dist/nylas-web-elements/p-b2b2d351.entry.js.map +1 -0
  616. package/dist/nylas-web-elements/{p-161c9325.entry.js → p-b348aad4.entry.js} +2 -2
  617. package/dist/nylas-web-elements/{p-bfe8e06b.entry.js → p-b547209f.entry.js} +2 -2
  618. package/dist/nylas-web-elements/{p-e8cde784.entry.js → p-b5b051e0.entry.js} +2 -2
  619. package/dist/nylas-web-elements/{p-aae7febd.entry.js → p-b7a53268.entry.js} +2 -2
  620. package/dist/nylas-web-elements/p-b8a9e8f4.entry.js +2 -0
  621. package/dist/nylas-web-elements/p-b8a9e8f4.entry.js.map +1 -0
  622. package/dist/nylas-web-elements/{p-385070ba.entry.js → p-bc6c9256.entry.js} +2 -2
  623. package/dist/nylas-web-elements/{p-cb03e4d4.entry.js → p-be26ce19.entry.js} +2 -2
  624. package/dist/nylas-web-elements/{p-8a4ac2a4.entry.js → p-bed6d217.entry.js} +2 -2
  625. package/dist/nylas-web-elements/p-bf4e0d2a.entry.js +2 -0
  626. package/dist/nylas-web-elements/p-bf4e0d2a.entry.js.map +1 -0
  627. package/dist/nylas-web-elements/{p-8e63b66c.entry.js → p-cb9fd100.entry.js} +2 -2
  628. package/dist/nylas-web-elements/p-ce14a1d5.entry.js +2 -0
  629. package/dist/nylas-web-elements/{p-1fa7b832.entry.js.map → p-ce14a1d5.entry.js.map} +1 -1
  630. package/dist/nylas-web-elements/{p-44507695.entry.js → p-cee0929a.entry.js} +2 -2
  631. package/dist/nylas-web-elements/{p-b334d63b.entry.js → p-cffb3636.entry.js} +2 -2
  632. package/dist/nylas-web-elements/{p-b2aca6c4.entry.js → p-d1ab9d75.entry.js} +2 -2
  633. package/dist/nylas-web-elements/p-d6a19e25.entry.js +2 -0
  634. package/dist/nylas-web-elements/p-d6a19e25.entry.js.map +1 -0
  635. package/dist/nylas-web-elements/{p-f96b12de.entry.js → p-d830e428.entry.js} +2 -2
  636. package/dist/nylas-web-elements/{p-8075a758.entry.js → p-d9b08dd2.entry.js} +2 -2
  637. package/dist/nylas-web-elements/{p-8f843faf.entry.js → p-db73506b.entry.js} +2 -2
  638. package/dist/nylas-web-elements/p-dcf99ddf.entry.js +2 -0
  639. package/dist/nylas-web-elements/p-dcf99ddf.entry.js.map +1 -0
  640. package/dist/nylas-web-elements/{p-d513d2ee.entry.js → p-de2f4643.entry.js} +2 -2
  641. package/dist/nylas-web-elements/{p-f2d1b1a6.entry.js.map → p-de2f4643.entry.js.map} +1 -1
  642. package/dist/nylas-web-elements/{p-25c97a60.entry.js → p-de84d999.entry.js} +2 -2
  643. package/dist/nylas-web-elements/p-debf614f.entry.js +8 -0
  644. package/dist/nylas-web-elements/p-debf614f.entry.js.map +1 -0
  645. package/dist/nylas-web-elements/{p-158fe1e9.entry.js → p-dfe9b5d0.entry.js} +2 -2
  646. package/dist/nylas-web-elements/{p-085950eb.entry.js → p-e5452799.entry.js} +2 -2
  647. package/dist/nylas-web-elements/{p-f8653b9b.entry.js → p-e6e79d76.entry.js} +2 -2
  648. package/dist/nylas-web-elements/{p-b813eb5d.entry.js → p-e944aa75.entry.js} +2 -2
  649. package/dist/nylas-web-elements/p-ec844414.entry.js +2 -0
  650. package/dist/nylas-web-elements/{p-34f0d1fe.entry.js.map → p-ec844414.entry.js.map} +1 -1
  651. package/dist/nylas-web-elements/p-ed64716c.entry.js +2 -0
  652. package/dist/nylas-web-elements/p-ed64716c.entry.js.map +1 -0
  653. package/dist/nylas-web-elements/{p-ecaf3ae1.entry.js → p-eff175d3.entry.js} +2 -2
  654. package/dist/nylas-web-elements/{p-246983ed.entry.js → p-eff774e6.entry.js} +2 -2
  655. package/dist/nylas-web-elements/p-f03b9d40.entry.js +2 -0
  656. package/dist/nylas-web-elements/p-f03b9d40.entry.js.map +1 -0
  657. package/dist/nylas-web-elements/{p-2f148064.entry.js → p-f13b8bd3.entry.js} +2 -2
  658. package/dist/nylas-web-elements/{p-8f3b02cd.entry.js → p-f7465959.entry.js} +2 -2
  659. package/dist/nylas-web-elements/p-f8e8270d.entry.js +2 -0
  660. package/dist/nylas-web-elements/p-f8e8270d.entry.js.map +1 -0
  661. package/dist/types/common/constants.d.ts +17 -0
  662. package/dist/types/common/icons/calendar-agenda-fill.d.ts +5 -0
  663. package/dist/types/common/icons/calendar-agenda.d.ts +5 -0
  664. package/dist/types/common/icons/copy.d.ts +5 -0
  665. package/dist/types/common/icons/delete.d.ts +5 -0
  666. package/dist/types/common/icons/dragable.d.ts +5 -0
  667. package/dist/types/common/icons/edit.d.ts +5 -0
  668. package/dist/types/common/icons/eye.d.ts +5 -0
  669. package/dist/types/common/icons/google-meet.d.ts +5 -0
  670. package/dist/types/common/icons/microsof-teams.d.ts +5 -0
  671. package/dist/types/common/icons/plus.d.ts +5 -0
  672. package/dist/types/common/icons/zoom.d.ts +5 -0
  673. package/dist/types/common/nylas-api-request.d.ts +1 -0
  674. package/dist/types/common/types.d.ts +1 -0
  675. package/dist/types/components/design-system/checkbox-component/checkbox-component.d.ts +3 -0
  676. package/dist/types/components/design-system/input-component/input-component.d.ts +2 -1
  677. package/dist/types/components/design-system/multi-select-dropdown/multi-select-dropdown.d.ts +1 -0
  678. package/dist/types/components/design-system/radio-button-group/radio-button-group.d.ts +6 -1
  679. package/dist/types/components/design-system/select-dropdown/select-dropdown.d.ts +3 -0
  680. package/dist/types/components/design-system/textarea-component/textarea-component.d.ts +2 -0
  681. package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +1 -0
  682. package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +8 -6
  683. package/dist/types/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.d.ts +3 -2
  684. package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +7 -4
  685. package/dist/types/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.d.ts +1 -0
  686. package/dist/types/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.d.ts +51 -0
  687. package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +1 -0
  688. package/dist/types/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.d.ts +41 -0
  689. package/dist/types/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.d.ts +1 -1
  690. package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +27 -4
  691. package/dist/types/components/scheduler-editor/nylas-editor-tabs/tab-contents.d.ts +2 -1
  692. package/dist/types/components/scheduler-editor/nylas-event-location/nylas-event-location.d.ts +7 -1
  693. package/dist/types/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.d.ts +13 -2
  694. package/dist/types/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.d.ts +43 -0
  695. package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +4 -2
  696. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.d.ts +11 -2
  697. package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +4 -2
  698. package/dist/types/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.d.ts +2 -2
  699. package/dist/types/components.d.ts +723 -30
  700. package/dist/types/connector/shared/api/scheduler-config.d.ts +1 -1
  701. package/dist/types/stores/scheduler-config-store.d.ts +5 -2
  702. package/dist/types/stores/scheduler-store.d.ts +3 -1
  703. package/dist/types/types/index.d.ts +8 -0
  704. package/package.json +3 -2
  705. package/dist/cjs/button-component.cjs.entry.js +0 -31
  706. package/dist/cjs/button-component.cjs.entry.js.map +0 -1
  707. package/dist/cjs/calendar-info-icon_28.cjs.entry.js +0 -2935
  708. package/dist/cjs/calendar-info-icon_28.cjs.entry.js.map +0 -1
  709. package/dist/cjs/input-component.cjs.entry.js +0 -89
  710. package/dist/cjs/input-component.cjs.entry.js.map +0 -1
  711. package/dist/cjs/nylas-api-request-a1751a40.js.map +0 -1
  712. package/dist/cjs/scheduler-config-store-9f19c7a9.js.map +0 -1
  713. package/dist/cjs/scheduler-store-0f7328f1.js.map +0 -1
  714. package/dist/esm/button-component.entry.js +0 -27
  715. package/dist/esm/button-component.entry.js.map +0 -1
  716. package/dist/esm/calendar-info-icon_28.entry.js +0 -2904
  717. package/dist/esm/calendar-info-icon_28.entry.js.map +0 -1
  718. package/dist/esm/input-component.entry.js +0 -85
  719. package/dist/esm/input-component.entry.js.map +0 -1
  720. package/dist/esm/nylas-api-request-a67d2997.js.map +0 -1
  721. package/dist/esm/scheduler-config-store-4a50a03d.js.map +0 -1
  722. package/dist/esm/scheduler-store-f02ce045.js.map +0 -1
  723. package/dist/nylas-web-elements/p-019be093.entry.js +0 -11
  724. package/dist/nylas-web-elements/p-019be093.entry.js.map +0 -1
  725. package/dist/nylas-web-elements/p-05833164.entry.js +0 -2
  726. package/dist/nylas-web-elements/p-05833164.entry.js.map +0 -1
  727. package/dist/nylas-web-elements/p-061d0ae2.entry.js +0 -2
  728. package/dist/nylas-web-elements/p-061d0ae2.entry.js.map +0 -1
  729. package/dist/nylas-web-elements/p-0c31f7ca.entry.js +0 -2
  730. package/dist/nylas-web-elements/p-0d98c728.entry.js +0 -2
  731. package/dist/nylas-web-elements/p-0d98c728.entry.js.map +0 -1
  732. package/dist/nylas-web-elements/p-12b83ea9.entry.js +0 -2
  733. package/dist/nylas-web-elements/p-16fb6243.entry.js +0 -2
  734. package/dist/nylas-web-elements/p-1970b6ee.entry.js +0 -2
  735. package/dist/nylas-web-elements/p-1a27960b.entry.js.map +0 -1
  736. package/dist/nylas-web-elements/p-1fa7b832.entry.js +0 -2
  737. package/dist/nylas-web-elements/p-26976360.entry.js +0 -2
  738. package/dist/nylas-web-elements/p-26976360.entry.js.map +0 -1
  739. package/dist/nylas-web-elements/p-29938263.js +0 -2
  740. package/dist/nylas-web-elements/p-29938263.js.map +0 -1
  741. package/dist/nylas-web-elements/p-33a6a75b.entry.js +0 -2
  742. package/dist/nylas-web-elements/p-36f4b804.entry.js +0 -2
  743. package/dist/nylas-web-elements/p-36f4b804.entry.js.map +0 -1
  744. package/dist/nylas-web-elements/p-39160c0d.entry.js +0 -11
  745. package/dist/nylas-web-elements/p-39160c0d.entry.js.map +0 -1
  746. package/dist/nylas-web-elements/p-3b6bd448.entry.js +0 -2
  747. package/dist/nylas-web-elements/p-3eeab083.entry.js +0 -2
  748. package/dist/nylas-web-elements/p-49f716ed.js.map +0 -1
  749. package/dist/nylas-web-elements/p-53a1bb82.entry.js +0 -2
  750. package/dist/nylas-web-elements/p-53a1bb82.entry.js.map +0 -1
  751. package/dist/nylas-web-elements/p-5bed86c2.entry.js +0 -2
  752. package/dist/nylas-web-elements/p-5ddd0c37.entry.js +0 -2
  753. package/dist/nylas-web-elements/p-613c070f.js.map +0 -1
  754. package/dist/nylas-web-elements/p-644ff4ee.entry.js +0 -2
  755. package/dist/nylas-web-elements/p-644ff4ee.entry.js.map +0 -1
  756. package/dist/nylas-web-elements/p-64d73008.entry.js +0 -2
  757. package/dist/nylas-web-elements/p-6ddb4b95.entry.js +0 -2
  758. package/dist/nylas-web-elements/p-6ddb4b95.entry.js.map +0 -1
  759. package/dist/nylas-web-elements/p-823c8aa2.js +0 -2
  760. package/dist/nylas-web-elements/p-823c8aa2.js.map +0 -1
  761. package/dist/nylas-web-elements/p-83444c0a.entry.js +0 -2
  762. package/dist/nylas-web-elements/p-83444c0a.entry.js.map +0 -1
  763. package/dist/nylas-web-elements/p-8506a8d4.entry.js +0 -11
  764. package/dist/nylas-web-elements/p-8506a8d4.entry.js.map +0 -1
  765. package/dist/nylas-web-elements/p-926dd201.entry.js +0 -2
  766. package/dist/nylas-web-elements/p-9283504a.entry.js +0 -2
  767. package/dist/nylas-web-elements/p-9283504a.entry.js.map +0 -1
  768. package/dist/nylas-web-elements/p-958746a1.entry.js +0 -2
  769. package/dist/nylas-web-elements/p-9bb41364.entry.js +0 -2
  770. package/dist/nylas-web-elements/p-9bb41364.entry.js.map +0 -1
  771. package/dist/nylas-web-elements/p-a800e7af.entry.js.map +0 -1
  772. package/dist/nylas-web-elements/p-a8678862.entry.js +0 -2
  773. package/dist/nylas-web-elements/p-aac962c7.entry.js +0 -2
  774. package/dist/nylas-web-elements/p-aac962c7.entry.js.map +0 -1
  775. package/dist/nylas-web-elements/p-b4d09fcf.entry.js +0 -2
  776. package/dist/nylas-web-elements/p-b4d09fcf.entry.js.map +0 -1
  777. package/dist/nylas-web-elements/p-b9559f06.entry.js +0 -2
  778. package/dist/nylas-web-elements/p-b9559f06.entry.js.map +0 -1
  779. package/dist/nylas-web-elements/p-bab1d562.entry.js +0 -2
  780. package/dist/nylas-web-elements/p-bab1d562.entry.js.map +0 -1
  781. package/dist/nylas-web-elements/p-c18c15d0.entry.js +0 -2
  782. package/dist/nylas-web-elements/p-c1ff6499.entry.js +0 -2
  783. package/dist/nylas-web-elements/p-c1ff6499.entry.js.map +0 -1
  784. package/dist/nylas-web-elements/p-d5d67115.entry.js +0 -2
  785. package/dist/nylas-web-elements/p-d5d67115.entry.js.map +0 -1
  786. package/dist/nylas-web-elements/p-d9a91bc9.entry.js.map +0 -1
  787. package/dist/nylas-web-elements/p-ea12997b.entry.js +0 -2
  788. package/dist/nylas-web-elements/p-f2d1b1a6.entry.js +0 -2
  789. package/dist/nylas-web-elements/p-f6fafe86.entry.js +0 -2
  790. package/dist/nylas-web-elements/p-f6fafe86.entry.js.map +0 -1
  791. package/dist/nylas-web-elements/p-ffce3a49.entry.js +0 -2
  792. package/dist/nylas-web-elements/p-ffce3a49.entry.js.map +0 -1
  793. /package/dist/nylas-web-elements/{p-08d75d35.entry.js.map → p-064c2ae5.entry.js.map} +0 -0
  794. /package/dist/nylas-web-elements/{p-5bed86c2.entry.js.map → p-0aa1e433.entry.js.map} +0 -0
  795. /package/dist/nylas-web-elements/{p-3f122804.entry.js.map → p-0bf6f818.entry.js.map} +0 -0
  796. /package/dist/nylas-web-elements/{p-926dd201.entry.js.map → p-1102df14.entry.js.map} +0 -0
  797. /package/dist/nylas-web-elements/{p-a7b19349.entry.js.map → p-155e5ce8.entry.js.map} +0 -0
  798. /package/dist/nylas-web-elements/{p-a85408e0.entry.js.map → p-18d100c8.entry.js.map} +0 -0
  799. /package/dist/nylas-web-elements/{p-5231fc13.entry.js.map → p-1a7edf86.entry.js.map} +0 -0
  800. /package/dist/nylas-web-elements/{p-554891cd.entry.js.map → p-1e1ae8d0.entry.js.map} +0 -0
  801. /package/dist/nylas-web-elements/{p-65097f45.entry.js.map → p-1fbe50b1.entry.js.map} +0 -0
  802. /package/dist/nylas-web-elements/{p-70e5cfb0.entry.js.map → p-22e05c7d.entry.js.map} +0 -0
  803. /package/dist/nylas-web-elements/{p-be38a8eb.entry.js.map → p-26302ad0.entry.js.map} +0 -0
  804. /package/dist/nylas-web-elements/{p-2a92691a.entry.js.map → p-2f47205d.entry.js.map} +0 -0
  805. /package/dist/nylas-web-elements/{p-085950eb.entry.js.map → p-3277023d.entry.js.map} +0 -0
  806. /package/dist/nylas-web-elements/{p-64d73008.entry.js.map → p-34c747f9.entry.js.map} +0 -0
  807. /package/dist/nylas-web-elements/{p-45c37986.entry.js.map → p-3ae38e51.entry.js.map} +0 -0
  808. /package/dist/nylas-web-elements/{p-0c31f7ca.entry.js.map → p-3bc1289e.entry.js.map} +0 -0
  809. /package/dist/nylas-web-elements/{p-5ddd0c37.entry.js.map → p-3d1e8e4d.entry.js.map} +0 -0
  810. /package/dist/nylas-web-elements/{p-e9ba368f.entry.js.map → p-3dae0c71.entry.js.map} +0 -0
  811. /package/dist/nylas-web-elements/{p-acadfabf.entry.js.map → p-3db7ab8d.entry.js.map} +0 -0
  812. /package/dist/nylas-web-elements/{p-28512ab6.entry.js.map → p-3e09b0fb.entry.js.map} +0 -0
  813. /package/dist/nylas-web-elements/{p-158fe1e9.entry.js.map → p-3eac9f45.entry.js.map} +0 -0
  814. /package/dist/nylas-web-elements/{p-d513d2ee.entry.js.map → p-4000107d.entry.js.map} +0 -0
  815. /package/dist/nylas-web-elements/{p-3b6bd448.entry.js.map → p-47392968.entry.js.map} +0 -0
  816. /package/dist/nylas-web-elements/{p-16a3bfb2.entry.js.map → p-4a594ebe.entry.js.map} +0 -0
  817. /package/dist/nylas-web-elements/{p-c90755ba.entry.js.map → p-4b6995fe.entry.js.map} +0 -0
  818. /package/dist/nylas-web-elements/{p-b2d95965.entry.js.map → p-4cdd4107.entry.js.map} +0 -0
  819. /package/dist/nylas-web-elements/{p-25c97a60.entry.js.map → p-4e8c8939.entry.js.map} +0 -0
  820. /package/dist/nylas-web-elements/{p-6bd9c9c3.entry.js.map → p-4e9ba325.entry.js.map} +0 -0
  821. /package/dist/nylas-web-elements/{p-6ce66add.entry.js.map → p-524a6acc.entry.js.map} +0 -0
  822. /package/dist/nylas-web-elements/{p-9b68568e.entry.js.map → p-533d39ce.entry.js.map} +0 -0
  823. /package/dist/nylas-web-elements/{p-7a95bc3f.entry.js.map → p-5a379fb5.entry.js.map} +0 -0
  824. /package/dist/nylas-web-elements/{p-cb03e4d4.entry.js.map → p-5a68368a.entry.js.map} +0 -0
  825. /package/dist/nylas-web-elements/{p-1970b6ee.entry.js.map → p-5b965d0d.entry.js.map} +0 -0
  826. /package/dist/nylas-web-elements/{p-091a8f00.entry.js.map → p-5ff4e63b.entry.js.map} +0 -0
  827. /package/dist/nylas-web-elements/{p-37f41a90.entry.js.map → p-656cf33f.entry.js.map} +0 -0
  828. /package/dist/nylas-web-elements/{p-246983ed.entry.js.map → p-65b7a2a7.entry.js.map} +0 -0
  829. /package/dist/nylas-web-elements/{p-60b03f86.entry.js.map → p-6c8af4fb.entry.js.map} +0 -0
  830. /package/dist/nylas-web-elements/{p-8e63b66c.entry.js.map → p-6d410f0a.entry.js.map} +0 -0
  831. /package/dist/nylas-web-elements/{p-daac96cb.entry.js.map → p-6e50d2fd.entry.js.map} +0 -0
  832. /package/dist/nylas-web-elements/{p-c18c15d0.entry.js.map → p-6e8b7ce8.entry.js.map} +0 -0
  833. /package/dist/nylas-web-elements/{p-b9fa6848.entry.js.map → p-7355937b.entry.js.map} +0 -0
  834. /package/dist/nylas-web-elements/{p-a8678862.entry.js.map → p-76156a82.entry.js.map} +0 -0
  835. /package/dist/nylas-web-elements/{p-052bc3b1.entry.js.map → p-7e08f131.entry.js.map} +0 -0
  836. /package/dist/nylas-web-elements/{p-2f148064.entry.js.map → p-7e10aa6d.entry.js.map} +0 -0
  837. /package/dist/nylas-web-elements/{p-b2aca6c4.entry.js.map → p-7e53588e.entry.js.map} +0 -0
  838. /package/dist/nylas-web-elements/{p-aae7febd.entry.js.map → p-83de54ae.entry.js.map} +0 -0
  839. /package/dist/nylas-web-elements/{p-de7b0878.entry.js.map → p-884b66bd.entry.js.map} +0 -0
  840. /package/dist/nylas-web-elements/{p-e928898a.entry.js.map → p-90294a76.entry.js.map} +0 -0
  841. /package/dist/nylas-web-elements/{p-3eeab083.entry.js.map → p-90817d1f.entry.js.map} +0 -0
  842. /package/dist/nylas-web-elements/{p-f1b0120b.entry.js.map → p-90d32fc3.entry.js.map} +0 -0
  843. /package/dist/nylas-web-elements/{p-dcc27b67.entry.js.map → p-95a9d2f1.entry.js.map} +0 -0
  844. /package/dist/nylas-web-elements/{p-6ef1024f.entry.js.map → p-96746b87.entry.js.map} +0 -0
  845. /package/dist/nylas-web-elements/{p-7fcecf3f.entry.js.map → p-97026709.entry.js.map} +0 -0
  846. /package/dist/nylas-web-elements/{p-eb7e8455.entry.js.map → p-987042a1.entry.js.map} +0 -0
  847. /package/dist/nylas-web-elements/{p-44507695.entry.js.map → p-9f903292.entry.js.map} +0 -0
  848. /package/dist/nylas-web-elements/{p-7ce048c0.entry.js.map → p-9fdbeba5.entry.js.map} +0 -0
  849. /package/dist/nylas-web-elements/{p-9794f735.entry.js.map → p-a22908ba.entry.js.map} +0 -0
  850. /package/dist/nylas-web-elements/{p-16fb6243.entry.js.map → p-a3c76c06.entry.js.map} +0 -0
  851. /package/dist/nylas-web-elements/{p-520ffe94.entry.js.map → p-a63d6241.entry.js.map} +0 -0
  852. /package/dist/nylas-web-elements/{p-cf0d5ab9.entry.js.map → p-aa4e6e5e.entry.js.map} +0 -0
  853. /package/dist/nylas-web-elements/{p-ba5a625c.entry.js.map → p-ab050d5b.entry.js.map} +0 -0
  854. /package/dist/nylas-web-elements/{p-161c9325.entry.js.map → p-b348aad4.entry.js.map} +0 -0
  855. /package/dist/nylas-web-elements/{p-5c3c1888.entry.js.map → p-b547209f.entry.js.map} +0 -0
  856. /package/dist/nylas-web-elements/{p-e8cde784.entry.js.map → p-b5b051e0.entry.js.map} +0 -0
  857. /package/dist/nylas-web-elements/{p-b0c8021f.entry.js.map → p-b7a53268.entry.js.map} +0 -0
  858. /package/dist/nylas-web-elements/{p-385070ba.entry.js.map → p-bc6c9256.entry.js.map} +0 -0
  859. /package/dist/nylas-web-elements/{p-d633e735.entry.js.map → p-be26ce19.entry.js.map} +0 -0
  860. /package/dist/nylas-web-elements/{p-8a4ac2a4.entry.js.map → p-bed6d217.entry.js.map} +0 -0
  861. /package/dist/nylas-web-elements/{p-8f3b02cd.entry.js.map → p-cb9fd100.entry.js.map} +0 -0
  862. /package/dist/nylas-web-elements/{p-bd34f97d.entry.js.map → p-cee0929a.entry.js.map} +0 -0
  863. /package/dist/nylas-web-elements/{p-b334d63b.entry.js.map → p-cffb3636.entry.js.map} +0 -0
  864. /package/dist/nylas-web-elements/{p-f1a54acf.entry.js.map → p-d1ab9d75.entry.js.map} +0 -0
  865. /package/dist/nylas-web-elements/{p-f96b12de.entry.js.map → p-d830e428.entry.js.map} +0 -0
  866. /package/dist/nylas-web-elements/{p-8075a758.entry.js.map → p-d9b08dd2.entry.js.map} +0 -0
  867. /package/dist/nylas-web-elements/{p-39fd9c90.entry.js.map → p-db73506b.entry.js.map} +0 -0
  868. /package/dist/nylas-web-elements/{p-8f843faf.entry.js.map → p-de84d999.entry.js.map} +0 -0
  869. /package/dist/nylas-web-elements/{p-bfe8e06b.entry.js.map → p-dfe9b5d0.entry.js.map} +0 -0
  870. /package/dist/nylas-web-elements/{p-66493463.entry.js.map → p-e5452799.entry.js.map} +0 -0
  871. /package/dist/nylas-web-elements/{p-f8653b9b.entry.js.map → p-e6e79d76.entry.js.map} +0 -0
  872. /package/dist/nylas-web-elements/{p-b813eb5d.entry.js.map → p-e944aa75.entry.js.map} +0 -0
  873. /package/dist/nylas-web-elements/{p-a12f3223.entry.js.map → p-eff175d3.entry.js.map} +0 -0
  874. /package/dist/nylas-web-elements/{p-cf589eab.entry.js.map → p-eff774e6.entry.js.map} +0 -0
  875. /package/dist/nylas-web-elements/{p-ecaf3ae1.entry.js.map → p-f13b8bd3.entry.js.map} +0 -0
  876. /package/dist/nylas-web-elements/{p-ea12997b.entry.js.map → p-f7465959.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as t,h as o,a as e}from"./p-68c2fadf.js";const n=".sc-info-icon-h{display:flex}";const a=n;const s=class{constructor(o){t(this,o);this.width="14";this.height="14"}render(){return o("svg",{key:"3cefabf14b0d391362f88e20d216dd71f5092df4",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"11aa0f1f397096b6cc2617edb0f29c7a49f11425",fill:"currentColor",d:"M6.5 5.5C6.77614 5.5 7 5.72386 7 6V9C7 9.27614 6.77614 9.5 6.5 9.5C6.22386 9.5 6 9.27614 6 9V6C6 5.72386 6.22386 5.5 6.5 5.5ZM6.50001 4.74907C6.91369 4.74907 7.24905 4.41371 7.24905 4.00003C7.24905 3.58635 6.91369 3.251 6.50001 3.251C6.08633 3.251 5.75098 3.58635 5.75098 4.00003C5.75098 4.41371 6.08633 4.74907 6.50001 4.74907ZM0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5C9.81371 0.5 12.5 3.18629 12.5 6.5C12.5 9.81371 9.81371 12.5 6.5 12.5C3.18629 12.5 0.5 9.81371 0.5 6.5ZM6.5 1.5C3.73858 1.5 1.5 3.73858 1.5 6.5C1.5 9.26142 3.73858 11.5 6.5 11.5C9.26142 11.5 11.5 9.26142 11.5 6.5C11.5 3.73858 9.26142 1.5 6.5 1.5Z"}))}};s.style=a;const r='.tooltip-container{position:relative;display:flex;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.tooltip-content{visibility:hidden;background-color:var(--nylas-base-800);color:var(--nylas-base-0);text-align:left;border-radius:6px;padding:5px 0;position:absolute;z-index:1;opacity:0;transition:opacity 0.3s;padding:0.5rem 1rem;max-width:200px;width:max-content}.tooltip-content.top{bottom:0;left:0;margin-bottom:1.25rem;transform:translateX(-50%)}.tooltip-content.right{top:50%;left:0%;margin-left:1.25rem;transform:translateY(-50%)}.tooltip-content.bottom{top:0;left:0;margin-top:1.25rem;transform:translateX(-50%)}.tooltip-content.left{top:50%;right:0%;margin-right:1.25rem;transform:translateY(-50%)}.tooltip-container:hover .tooltip-content,.tooltip-container:focus-within .tooltip-content{visibility:visible;opacity:1}.tooltip-content::after{content:"";position:absolute;top:-0.75rem;left:50%;transform:rotate(180deg);border-width:6px;border-style:solid;border-color:black transparent transparent transparent}.tooltip-content.top::after{top:100%;left:50%;transform:rotate(0deg)}.tooltip-content.bottom::after{top:-0.75rem;left:50%;transform:rotate(180deg)}.tooltip-content.left::after{top:47.5%;left:100%;transform:rotate(270deg)}.tooltip-content.right::after{top:47.5%;left:-0.75rem;transform:rotate(90deg)}';const i=r;const l=class{constructor(o){t(this,o);this.position="bottom"}showTooltip(t){t.target.nextElementSibling.style.visibility="visible";t.target.nextElementSibling.style.opacity="1"}hideTooltip(t){t.target.nextElementSibling.style.visibility="hidden";t.target.nextElementSibling.style.opacity="0"}render(){return o("div",{key:"894254b7fed442fe73f310391f76f6165ecc4464",class:"tooltip-container",part:"tc__container"},o("span",{key:"498bab4408c88f5b50182fdf9e06b3cc79182962",class:"info-icon",tabindex:"0",onFocus:this.showTooltip.bind(this),onBlur:this.hideTooltip.bind(this)},o("slot",{key:"21685a19ac083097de368145d033f1608325bd3d",name:"tooltip-icon"},"i")),o("span",{key:"5592621136bef989c41ac5f2d380cd4351868b9a",class:`tooltip-content ${this.position}`,part:"tc__content"},o("slot",{key:"c32087e79175c78b0cef16b945d99da2eda30531",name:"tooltip-content"},"This is a help text.")))}get el(){return e(this)}};l.style=i;export{s as info_icon,l as tooltip_component};
2
- //# sourceMappingURL=p-39fd9c90.entry.js.map
1
+ import{r as t,h as o,a as e}from"./p-68c2fadf.js";const a=".sc-info-icon-h{display:flex}";const n=a;const s=class{constructor(o){t(this,o);this.width="14";this.height="14"}render(){return o("svg",{key:"0be8557031fa958fcf0a35f4cac1de2a0dca306f",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"d8a6acf6ec75ce1088009d09c708358f725c80aa",fill:"currentColor",d:"M6.5 5.5C6.77614 5.5 7 5.72386 7 6V9C7 9.27614 6.77614 9.5 6.5 9.5C6.22386 9.5 6 9.27614 6 9V6C6 5.72386 6.22386 5.5 6.5 5.5ZM6.50001 4.74907C6.91369 4.74907 7.24905 4.41371 7.24905 4.00003C7.24905 3.58635 6.91369 3.251 6.50001 3.251C6.08633 3.251 5.75098 3.58635 5.75098 4.00003C5.75098 4.41371 6.08633 4.74907 6.50001 4.74907ZM0.5 6.5C0.5 3.18629 3.18629 0.5 6.5 0.5C9.81371 0.5 12.5 3.18629 12.5 6.5C12.5 9.81371 9.81371 12.5 6.5 12.5C3.18629 12.5 0.5 9.81371 0.5 6.5ZM6.5 1.5C3.73858 1.5 1.5 3.73858 1.5 6.5C1.5 9.26142 3.73858 11.5 6.5 11.5C9.26142 11.5 11.5 9.26142 11.5 6.5C11.5 3.73858 9.26142 1.5 6.5 1.5Z"}))}};s.style=n;const r='.tooltip-container{position:relative;display:flex;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.tooltip-content{visibility:hidden;background-color:var(--nylas-base-800);color:var(--nylas-base-0);text-align:left;border-radius:6px;padding:5px 0;position:absolute;z-index:1;opacity:0;transition:opacity 0.3s;padding:0.5rem 1rem;max-width:200px;width:max-content}.tooltip-content.top{bottom:0;left:0;margin-bottom:1.25rem;transform:translateX(-50%)}.tooltip-content.right{top:50%;left:0%;margin-left:1.25rem;transform:translateY(-50%)}.tooltip-content.bottom{top:0;left:0;margin-top:1.25rem;transform:translateX(-50%)}.tooltip-content.left{top:50%;right:0%;margin-right:1.25rem;transform:translateY(-50%)}.tooltip-container:hover .tooltip-content,.tooltip-container:focus-within .tooltip-content{visibility:visible;opacity:1}.tooltip-content::after{content:"";position:absolute;top:-0.75rem;left:50%;transform:rotate(180deg);border-width:6px;border-style:solid;border-color:black transparent transparent transparent}.tooltip-content.top::after{top:100%;left:50%;transform:rotate(0deg)}.tooltip-content.bottom::after{top:-0.75rem;left:50%;transform:rotate(180deg)}.tooltip-content.left::after{top:47.5%;left:100%;transform:rotate(270deg)}.tooltip-content.right::after{top:47.5%;left:-0.75rem;transform:rotate(90deg)}';const i=r;const c=class{constructor(o){t(this,o);this.position="bottom"}showTooltip(t){t.target.nextElementSibling.style.visibility="visible";t.target.nextElementSibling.style.opacity="1"}hideTooltip(t){t.target.nextElementSibling.style.visibility="hidden";t.target.nextElementSibling.style.opacity="0"}render(){return o("div",{key:"c484a3dd63af9c6933225947b8bbcd8d83caff30",class:"tooltip-container",part:"tc__container"},o("span",{key:"2f5368f4461b4afc5bba40654ceec90a998a9d22",class:"info-icon",tabindex:"0",onFocus:this.showTooltip.bind(this),onBlur:this.hideTooltip.bind(this)},o("slot",{key:"3fa541edec1960231d893074bd017d5eb8cfc6fc",name:"tooltip-icon"},"i")),o("span",{key:"cf4333f0a58002ac0bf4acc1434cdcec76d2779d",class:`tooltip-content ${this.position}`,part:"tc__content"},o("slot",{key:"3eb431efc14ac4e8d749764167f315bda4bceaa0",name:"tooltip-content"},"This is a help text.")))}get el(){return e(this)}};c.style=i;export{s as info_icon,c as tooltip_component};
2
+ //# sourceMappingURL=p-4e8c8939.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as s,H as e,a as n}from"./p-68c2fadf.js";import{F as r,G as a,H as h,I as o,J as l}from"./p-6c11737d.js";import{c}from"./p-cb65c223.js";import"./p-02aa5f03.js";var d={exports:{}};(function(t,i){!function(i,s){t.exports=s()}(c,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d\d/,e=/\d\d?/,n=/\d*[^-_:/,()\s\d]+/,r={},a=function(t){return(t=+t)+(t>68?1900:2e3)};var h=function(t){return function(i){this[t]=+i}},o=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var i=t.match(/([+-]|\d\d)/g),s=60*i[1]+(+i[2]||0);return 0===s?0:"+"===i[0]?-s:s}(t)}],l=function(t){var i=r[t];return i&&(i.indexOf?i:i.s.concat(i.f))},c=function(t,i){var s,e=r.meridiem;if(e){for(var n=1;n<=24;n+=1)if(t.indexOf(e(n,0,i))>-1){s=n>12;break}}else s=t===(i?"pm":"PM");return s},d={A:[n,function(t){this.afternoon=c(t,!1)}],a:[n,function(t){this.afternoon=c(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[s,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[e,h("seconds")],ss:[e,h("seconds")],m:[e,h("minutes")],mm:[e,h("minutes")],H:[e,h("hours")],h:[e,h("hours")],HH:[e,h("hours")],hh:[e,h("hours")],D:[e,h("day")],DD:[s,h("day")],Do:[n,function(t){var i=r.ordinal,s=t.match(/\d+/);if(this.day=s[0],i)for(var e=1;e<=31;e+=1)i(e).replace(/\[|\]/g,"")===t&&(this.day=e)}],M:[e,h("month")],MM:[s,h("month")],MMM:[n,function(t){var i=l("months"),s=(l("monthsShort")||i.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(s<1)throw new Error;this.month=s%12||s}],MMMM:[n,function(t){var i=l("months").indexOf(t)+1;if(i<1)throw new Error;this.month=i%12||i}],Y:[/[+-]?\d+/,h("year")],YY:[s,function(t){this.year=a(t)}],YYYY:[/\d{4}/,h("year")],Z:o,ZZ:o};function f(s){var e,n;e=s,n=r&&r.formats;for(var a=(s=e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(i,s,e){var r=e&&e.toUpperCase();return s||n[e]||t[e]||n[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,i,s){return i||s.slice(1)}))}))).match(i),h=a.length,o=0;o<h;o+=1){var l=a[o],c=d[l],f=c&&c[0],m=c&&c[1];a[o]=m?{regex:f,parser:m}:l.replace(/^\[|\]$/g,"")}return function(t){for(var i={},s=0,e=0;s<h;s+=1){var n=a[s];if("string"==typeof n)e+=n.length;else{var r=n.regex,o=n.parser,l=t.slice(e),c=r.exec(l)[0];o.call(i,c),t=t.replace(c,"")}}return function(t){var i=t.afternoon;if(void 0!==i){var s=t.hours;i?s<12&&(t.hours+=12):12===s&&(t.hours=0),delete t.afternoon}}(i),i}}return function(t,i,s){s.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(a=t.parseTwoDigitYear);var e=i.prototype,n=e.parse;e.parse=function(t){var i=t.date,e=t.utc,a=t.args;this.$u=e;var h=a[1];if("string"==typeof h){var o=!0===a[2],l=!0===a[3],c=o||l,d=a[2];l&&(d=a[2]),r=this.$locale(),!o&&d&&(r=s.Ls[d]),this.$d=function(t,i,s){try{if(["x","X"].indexOf(i)>-1)return new Date(("X"===i?1e3:1)*t);var e=f(i)(t),n=e.year,r=e.month,a=e.day,h=e.hours,o=e.minutes,l=e.seconds,c=e.milliseconds,d=e.zone,m=new Date,u=a||(n||r?1:m.getDate()),p=n||m.getFullYear(),b=0;n&&!r||(b=r>0?r-1:m.getMonth());var y=h||0,v=o||0,x=l||0,g=c||0;return d?new Date(Date.UTC(p,b,u,y,v,x,g+60*d.offset*1e3)):s?new Date(Date.UTC(p,b,u,y,v,x,g)):new Date(p,b,u,y,v,x,g)}catch(t){return new Date("")}}(i,h,e),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),c&&i!=this.format(h)&&(this.$d=new Date("")),r={}}else if(h instanceof Array)for(var m=h.length,u=1;u<=m;u+=1){a[1]=h[u-1];var p=s.apply(this,a);if(p.isValid()){this.$d=p.$d,this.$L=p.$L,this.init();break}u===m&&(this.$d=new Date(""))}else n.call(this,t)}}}))})(d);const f=d.exports;const m=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}';const u=m;r.extend(f);const p=class{constructor(s){t(this,s);this.timeChange=i(this,"timeChange",7);this.formError=i(this,"formError",7);this.time=undefined;this.minimumStartTime=null;this.placeholder="hh:mmam/pm";this.name=undefined;this.hasError=false;this.err="";this.showTimes=false;this.ariaActivedescendant="";this.times=this.generateTimes();this.shouldAutoScroll=false}handleOutsideClick(t){const i=t.composedPath();const s=i.includes(this.el);if(!s&&this.showTimes){this.showTimes=false}}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let t=r().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));if(this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12){t=t.add(12,"hour")}else if(this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12){t=t.subtract(12,"hour")}this.times=this.generateTimes();const i=r(this.times[0].value,"hh:mma");let s=r(this.time,"hh:mma");if(s.isBefore(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const t=a(this.time);const i=this.times.findIndex((i=>i.value===t));if(i>-1){this.shouldAutoScroll=false;this.scrollToViewWithinParent(i)}return}}handleTimeChange(t,i){const s=i.split(":");if(s[0]==="00"&&s[1].slice(-2)=="pm"){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}if(!h(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}else{this.err="";this.formError.emit({key:this.el.id,message:""})}this.timeChange.emit({key:this.el.id,value:i})}handleTimeAutocomplete(t){const i=t.target?.value;if(!h(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"});return}if(i===""){const t=o().format("hh:mma");this.timeChange.emit({key:this.el.id,value:t});return}if(!l(i)){const t=a(i);this.timeChange.emit({key:this.el.id,value:t});return}this.timeChange.emit({key:this.el.id,value:i})}handleOnInput(t){const i=t.target?.value;if(!h(i)){return}if(i===""){const t=o().format("hh:mma");const i=this.times.findIndex((i=>i.value===t));if(i>-1){this.scrollToViewWithinParent(i)}return}if(!l(i)){const t=a(i);const s=this.times.findIndex((i=>i.value===t));if(s>-1){this.scrollToViewWithinParent(s)}return}}generateTimes(){const t=[];let i=r().set("hour",0).set("minute",0).set("second",0);if(this.minimumStartTime){i=r(this.minimumStartTime,"hh:mma")}const s=i.endOf("day").diff(i,"minutes");const e=Math.round(s/15);for(let s=0;s<e+1;s++){const n=i.add(s*15,"minute");if(s==e&&n.format("hh:mma").includes("am")){break}t.push({id:s,value:n.format("hh:mma")})}return t}handleComboboxKeyDown(t){if(t.key==="ArrowDown"){t.preventDefault();if(!this.showTimes){this.showTimes=true;this.shouldAutoScroll=true;return}if(this.ariaActivedescendant===""){this.ariaActivedescendant=this.times[0].id.toString();this.focusOption(0)}else{const t=this.times.findIndex((t=>t.id.toString()===this.ariaActivedescendant));const i=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[i].id.toString();this.focusOption(i)}}else if(t.key==="ArrowUp"){t.preventDefault();if(this.ariaActivedescendant===""){this.ariaActivedescendant=this.times[this.times.length-1].id.toString();this.focusOption(this.times.length-1)}else{const t=this.times.findIndex((t=>t.id.toString()===this.ariaActivedescendant));const i=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[i].id.toString();this.focusOption(i)}}else if(t.key==="Escape"){this.showTimes=false;this.timeInput.focus()}}handleListboxKeydown(t){const i=this.times;const s=i.findIndex((t=>t.id.toString()===this.ariaActivedescendant));if(t.key==="ArrowDown"||t.key==="Tab"&&!t.shiftKey){t.preventDefault();const e=s+1<i.length?s+1:0;this.ariaActivedescendant=i[e].id.toString();this.focusOption(e)}else if(t.key==="ArrowUp"||t.key==="Tab"&&t.shiftKey){t.preventDefault();const e=s-1>=0?s-1:i.length-1;this.ariaActivedescendant=i[e].id.toString();this.focusOption(e)}else if(t.key==="Enter"){t.preventDefault();if(this.ariaActivedescendant){const e=i[s];this.handleTimeChange(t,e.value);this.showTimes=false;this.ariaActivedescendant="";this.timeInput.focus()}}else if(t.key==="Escape"){this.showTimes=false;this.timeInput.focus()}}scrollToViewWithinParent(t){const i=this.times[t];const s=this.el.shadowRoot?.getElementById(i.id.toString());const e=this.timeMenu;this.ariaActivedescendant=i.id.toString();const n=s.getBoundingClientRect();const r=e.getBoundingClientRect();if(n.top<r.top){e.scrollTop-=r.top-n.top}else if(n.bottom>r.bottom){e.scrollTop+=n.bottom-r.bottom}if(n.left<r.left){e.scrollLeft-=r.left-n.left}else if(n.right>r.right){e.scrollLeft+=n.right-r.right}}focusOption(t){const i=this.times[t];if(!i)return;const s=i.id.toString();const e=this.el.shadowRoot?.getElementById(s);if(e){e.focus();e.scrollIntoView({behavior:"smooth",block:"nearest"})}}render(){return s(e,{key:"5245464de828165ad544a395839d46e089ce5a80"},s("div",{key:"53c3875e8b13dffc3a31c448f24daa497964d221",class:"time-picker",part:"time-picker"},s("input",{key:"de44b809f81842dcbbe3536360d33b4fdb6d72d8",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":true,error:!!this.err||this.hasError},ref:t=>this.timeInput=t,value:this.time,onClick:()=>{this.showTimes=!this.showTimes;this.shouldAutoScroll=true},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:t=>this.handleComboboxKeyDown(t),onInput:t=>this.handleOnInput(t),onBlur:t=>this.handleTimeAutocomplete(t)}),this.err&&s("div",{class:"invalid-time-icon"}),this.showTimes&&s("div",{class:"times",part:"times",ref:t=>this.timeMenu=t},s("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:t=>this.handleListboxKeydown(t)},this.times.map((t=>s("li",{tabindex:"0",key:t.id,id:t.id.toString(),class:{focused:this.ariaActivedescendant===t.id.toString()},onClick:i=>{this.handleTimeChange(i,t.value);this.showTimes=false;this.timeInput.focus()},role:"option"},`${t.value}`))))),!this.showTimes&&this.err&&s("p",{class:"error",id:"email-error"},this.err)))}get el(){return n(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};p.style=u;export{p as nylas_time_window_picker};
2
- //# sourceMappingURL=p-9b68568e.entry.js.map
1
+ import{r as t,c as i,h as s,H as e,a as n}from"./p-68c2fadf.js";import{F as r,G as a,H as h,I as o,J as l}from"./p-6c11737d.js";import{c}from"./p-cb65c223.js";import"./p-02aa5f03.js";var d={exports:{}};(function(t,i){!function(i,s){t.exports=s()}(c,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d\d/,e=/\d\d?/,n=/\d*[^-_:/,()\s\d]+/,r={},a=function(t){return(t=+t)+(t>68?1900:2e3)};var h=function(t){return function(i){this[t]=+i}},o=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var i=t.match(/([+-]|\d\d)/g),s=60*i[1]+(+i[2]||0);return 0===s?0:"+"===i[0]?-s:s}(t)}],l=function(t){var i=r[t];return i&&(i.indexOf?i:i.s.concat(i.f))},c=function(t,i){var s,e=r.meridiem;if(e){for(var n=1;n<=24;n+=1)if(t.indexOf(e(n,0,i))>-1){s=n>12;break}}else s=t===(i?"pm":"PM");return s},d={A:[n,function(t){this.afternoon=c(t,!1)}],a:[n,function(t){this.afternoon=c(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[s,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[e,h("seconds")],ss:[e,h("seconds")],m:[e,h("minutes")],mm:[e,h("minutes")],H:[e,h("hours")],h:[e,h("hours")],HH:[e,h("hours")],hh:[e,h("hours")],D:[e,h("day")],DD:[s,h("day")],Do:[n,function(t){var i=r.ordinal,s=t.match(/\d+/);if(this.day=s[0],i)for(var e=1;e<=31;e+=1)i(e).replace(/\[|\]/g,"")===t&&(this.day=e)}],M:[e,h("month")],MM:[s,h("month")],MMM:[n,function(t){var i=l("months"),s=(l("monthsShort")||i.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(s<1)throw new Error;this.month=s%12||s}],MMMM:[n,function(t){var i=l("months").indexOf(t)+1;if(i<1)throw new Error;this.month=i%12||i}],Y:[/[+-]?\d+/,h("year")],YY:[s,function(t){this.year=a(t)}],YYYY:[/\d{4}/,h("year")],Z:o,ZZ:o};function f(s){var e,n;e=s,n=r&&r.formats;for(var a=(s=e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(i,s,e){var r=e&&e.toUpperCase();return s||n[e]||t[e]||n[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,i,s){return i||s.slice(1)}))}))).match(i),h=a.length,o=0;o<h;o+=1){var l=a[o],c=d[l],f=c&&c[0],m=c&&c[1];a[o]=m?{regex:f,parser:m}:l.replace(/^\[|\]$/g,"")}return function(t){for(var i={},s=0,e=0;s<h;s+=1){var n=a[s];if("string"==typeof n)e+=n.length;else{var r=n.regex,o=n.parser,l=t.slice(e),c=r.exec(l)[0];o.call(i,c),t=t.replace(c,"")}}return function(t){var i=t.afternoon;if(void 0!==i){var s=t.hours;i?s<12&&(t.hours+=12):12===s&&(t.hours=0),delete t.afternoon}}(i),i}}return function(t,i,s){s.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(a=t.parseTwoDigitYear);var e=i.prototype,n=e.parse;e.parse=function(t){var i=t.date,e=t.utc,a=t.args;this.$u=e;var h=a[1];if("string"==typeof h){var o=!0===a[2],l=!0===a[3],c=o||l,d=a[2];l&&(d=a[2]),r=this.$locale(),!o&&d&&(r=s.Ls[d]),this.$d=function(t,i,s){try{if(["x","X"].indexOf(i)>-1)return new Date(("X"===i?1e3:1)*t);var e=f(i)(t),n=e.year,r=e.month,a=e.day,h=e.hours,o=e.minutes,l=e.seconds,c=e.milliseconds,d=e.zone,m=new Date,u=a||(n||r?1:m.getDate()),p=n||m.getFullYear(),b=0;n&&!r||(b=r>0?r-1:m.getMonth());var y=h||0,v=o||0,x=l||0,g=c||0;return d?new Date(Date.UTC(p,b,u,y,v,x,g+60*d.offset*1e3)):s?new Date(Date.UTC(p,b,u,y,v,x,g)):new Date(p,b,u,y,v,x,g)}catch(t){return new Date("")}}(i,h,e),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),c&&i!=this.format(h)&&(this.$d=new Date("")),r={}}else if(h instanceof Array)for(var m=h.length,u=1;u<=m;u+=1){a[1]=h[u-1];var p=s.apply(this,a);if(p.isValid()){this.$d=p.$d,this.$L=p.$L,this.init();break}u===m&&(this.$d=new Date(""))}else n.call(this,t)}}}))})(d);const f=d.exports;const m=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}';const u=m;r.extend(f);const p=class{constructor(s){t(this,s);this.timeChange=i(this,"timeChange",7);this.formError=i(this,"formError",7);this.time=undefined;this.minimumStartTime=null;this.placeholder="hh:mmam/pm";this.name=undefined;this.hasError=false;this.err="";this.showTimes=false;this.ariaActivedescendant="";this.times=this.generateTimes();this.shouldAutoScroll=false}handleOutsideClick(t){const i=t.composedPath();const s=i.includes(this.el);if(!s&&this.showTimes){this.showTimes=false}}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let t=r().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));if(this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12){t=t.add(12,"hour")}else if(this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12){t=t.subtract(12,"hour")}this.times=this.generateTimes();const i=r(this.times[0].value,"hh:mma");let s=r(this.time,"hh:mma");if(s.isBefore(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const t=a(this.time);const i=this.times.findIndex((i=>i.value===t));if(i>-1){this.shouldAutoScroll=false;this.scrollToViewWithinParent(i)}return}}handleTimeChange(t,i){const s=i.split(":");if(s[0]==="00"&&s[1].slice(-2)=="pm"){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}if(!h(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}else{this.err="";this.formError.emit({key:this.el.id,message:""})}this.timeChange.emit({key:this.el.id,value:i})}handleTimeAutocomplete(t){const i=t.target?.value;if(!h(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"});return}if(i===""){const t=o().format("hh:mma");this.timeChange.emit({key:this.el.id,value:t});return}if(!l(i)){const t=a(i);this.timeChange.emit({key:this.el.id,value:t});return}this.timeChange.emit({key:this.el.id,value:i})}handleOnInput(t){const i=t.target?.value;if(!h(i)){return}if(i===""){const t=o().format("hh:mma");const i=this.times.findIndex((i=>i.value===t));if(i>-1){this.scrollToViewWithinParent(i)}return}if(!l(i)){const t=a(i);const s=this.times.findIndex((i=>i.value===t));if(s>-1){this.scrollToViewWithinParent(s)}return}}generateTimes(){const t=[];let i=r().set("hour",0).set("minute",0).set("second",0);if(this.minimumStartTime){i=r(this.minimumStartTime,"hh:mma")}const s=i.endOf("day").diff(i,"minutes");const e=Math.round(s/15);for(let s=0;s<e+1;s++){const n=i.add(s*15,"minute");if(s==e&&n.format("hh:mma").includes("am")){break}t.push({id:s,value:n.format("hh:mma")})}return t}handleComboboxKeyDown(t){if(t.key==="ArrowDown"){t.preventDefault();if(!this.showTimes){this.showTimes=true;this.shouldAutoScroll=true;return}if(this.ariaActivedescendant===""){this.ariaActivedescendant=this.times[0].id.toString();this.focusOption(0)}else{const t=this.times.findIndex((t=>t.id.toString()===this.ariaActivedescendant));const i=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[i].id.toString();this.focusOption(i)}}else if(t.key==="ArrowUp"){t.preventDefault();if(this.ariaActivedescendant===""){this.ariaActivedescendant=this.times[this.times.length-1].id.toString();this.focusOption(this.times.length-1)}else{const t=this.times.findIndex((t=>t.id.toString()===this.ariaActivedescendant));const i=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[i].id.toString();this.focusOption(i)}}else if(t.key==="Escape"){this.showTimes=false;this.timeInput.focus()}}handleListboxKeydown(t){const i=this.times;const s=i.findIndex((t=>t.id.toString()===this.ariaActivedescendant));if(t.key==="ArrowDown"||t.key==="Tab"&&!t.shiftKey){t.preventDefault();const e=s+1<i.length?s+1:0;this.ariaActivedescendant=i[e].id.toString();this.focusOption(e)}else if(t.key==="ArrowUp"||t.key==="Tab"&&t.shiftKey){t.preventDefault();const e=s-1>=0?s-1:i.length-1;this.ariaActivedescendant=i[e].id.toString();this.focusOption(e)}else if(t.key==="Enter"){t.preventDefault();if(this.ariaActivedescendant){const e=i[s];this.handleTimeChange(t,e.value);this.showTimes=false;this.ariaActivedescendant="";this.timeInput.focus()}}else if(t.key==="Escape"){this.showTimes=false;this.timeInput.focus()}}scrollToViewWithinParent(t){const i=this.times[t];const s=this.el.shadowRoot?.getElementById(i.id.toString());const e=this.timeMenu;this.ariaActivedescendant=i.id.toString();const n=s.getBoundingClientRect();const r=e.getBoundingClientRect();if(n.top<r.top){e.scrollTop-=r.top-n.top}else if(n.bottom>r.bottom){e.scrollTop+=n.bottom-r.bottom}if(n.left<r.left){e.scrollLeft-=r.left-n.left}else if(n.right>r.right){e.scrollLeft+=n.right-r.right}}focusOption(t){const i=this.times[t];if(!i)return;const s=i.id.toString();const e=this.el.shadowRoot?.getElementById(s);if(e){e.focus();e.scrollIntoView({behavior:"smooth",block:"nearest"})}}render(){return s(e,{key:"67fd6974fe49b7c93309996aea86cacadd2d653f"},s("div",{key:"fa4d846d0f79d8d8eb1bea3dfeab415774b75dcd",class:"time-picker",part:"time-picker"},s("input",{key:"142938b86f4408bfaf1e6bdbd3745d55c9da3fdc",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":true,error:!!this.err||this.hasError},ref:t=>this.timeInput=t,value:this.time,onClick:()=>{this.showTimes=!this.showTimes;this.shouldAutoScroll=true},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:t=>this.handleComboboxKeyDown(t),onInput:t=>this.handleOnInput(t),onBlur:t=>this.handleTimeAutocomplete(t)}),this.err&&s("div",{class:"invalid-time-icon"}),this.showTimes&&s("div",{class:"times",part:"times",ref:t=>this.timeMenu=t},s("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:t=>this.handleListboxKeydown(t)},this.times.map((t=>s("li",{tabindex:"0",key:t.id,id:t.id.toString(),class:{focused:this.ariaActivedescendant===t.id.toString()},onClick:i=>{this.handleTimeChange(i,t.value);this.showTimes=false;this.timeInput.focus()},role:"option"},`${t.value}`))))),!this.showTimes&&this.err&&s("p",{class:"error",id:"email-error"},this.err)))}get el(){return n(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};p.style=u;export{p as nylas_time_window_picker};
2
+ //# sourceMappingURL=p-4e9ba325.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as t,c as s,h as i,H as e,a as h}from"./p-68c2fadf.js";import{N as n,e as a}from"./p-36e3bf97.js";import{a as r}from"./p-6c11737d.js";import{N as o,a as c,b as d,c as u,C as l,d as f,H as p}from"./p-a35d2938.js";import"./p-02aa5f03.js";import"./p-cb65c223.js";import"./p-cabb2e68.js";class m{constructor(t,s,i,e){this.router=t;this.nylasAuth=s;this.nylasAuthStore=i;this.nylasMailboxStore=e}init(){r("NylasMailboxConnector init")}get mailboxStore(){return this.nylasMailboxStore}get authStore(){return this.nylasAuthStore}get auth(){if(this._authConnector){return this._authConnector}this._authConnector=new o(this.nylasAuth,this.nylasAuthStore);return this._authConnector}get threads(){if(this._threadConnector){return this._threadConnector}this._threadConnector=new c(this.nylasAuth,this.nylasAuthStore,this.nylasMailboxStore,this.router);return this._threadConnector}get messages(){if(this._messageConnector){return this._messageConnector}this._messageConnector=new d(this.nylasAuth,this.nylasAuthStore,this.nylasMailboxStore);return this._messageConnector}get folders(){if(this._foldersConnector){return this._foldersConnector}this._foldersConnector=new u(this.nylasAuth,this.nylasAuthStore,this.nylasMailboxStore);return this._foldersConnector}getAuth(){return this.nylasAuth}resetStores(){this.nylasMailboxStore.reset();this.nylasAuthStore.reset()}async logout(){await this.nylasAuth.logout();this.resetStores()}}const y=":host{display:contents}";const b=y;const g=class{constructor(i){t(this,i);this.init=s(this,"init",7);this.loggedIn=s(this,"loggedIn",7);this.loggedOut=s(this,"loggedOut",7);this.handleAuthChange=async t=>{if(t){this.loggedIn.emit(this.host)}else{const t=this.loggedOut.emit(this.host);if(!t.defaultPrevented){await(this.nylasMailboxConnector?.logout())}}};this.automaticComponentRegistration=true;this.eventOverrides={};this.authConfig=undefined;this.defaultAuthStoreState=undefined;this.defaultMailboxStoreState=undefined}connectedCallback(){r("[nylas-mailbox] connectedCallback")}async componentWillLoad(){this.stores={auth:l(this.defaultAuthStoreState),mailbox:f(this.defaultMailboxStoreState)};this.baseProvider=new n(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);this.router=new p;this.nylasAuth=a({apiUri:"https://api.us.nylas.com",elementsApiUri:"https://elements.us.nylas.com",storageType:"indexeddb",clientId:"YOUR_CLIENT_ID",defaultScopes:[],redirectURI:"/",...this.authConfig});const t=this.baseProvider?.getStore("auth");if(!t){throw new Error("Auth store is not defined")}const s=this.baseProvider?.getStore("mailbox");if(!s){throw new Error("Mailbox store is not defined")}this.nylasMailboxConnector=new m(this.router,this.nylasAuth,t,s);const i=this.init.emit(this.host);if(!i.defaultPrevented){await(this.nylasMailboxConnector?.auth.validateSession())}this.router?.addRouteChangeListener(`/thread/:threadId`,(async(t,s,i)=>{const e=i.threadId;const h=await(this.nylasMailboxConnector?.threads.getThread(e));if(h){this.nylasMailboxConnector?.mailboxStore.set("selectedThread",h)}}));this.router?.addRouteChangeListener(`/`,(async(s,i,e)=>{if(!t.state.isAuthenticated){return}this.nylasMailboxConnector?.threads.unSelectThread();this.nylasMailboxConnector?.folders.getFolders();const h=window.location.hash.split("?")[1];if(h){const t=new URLSearchParams(h);const s=t.get("query");if(s){await(this.nylasMailboxConnector?.threads.getThreads({search_query_native:s,page_token:undefined}))}}else{this.nylasMailboxConnector?.threads.getThreads()}}));this.router?.init();this.handleAuthChange(t.state.isAuthenticated);this.baseProvider?.componentWillLoad(this.nylasMailboxConnector)}async componentDidLoad(){const t=this.baseProvider?.getStore("auth");if(!t){throw new Error("Auth store is not defined")}t.onChange("isAuthenticated",this.handleAuthChange);this.baseProvider?.componentDidLoad()}componentDisconnected(){this.baseProvider?.componentDisconnected()}async registerComponentHandler(t){this.baseProvider?.registerComponent(t.detail)}async unregisterComponentHandler(t){this.baseProvider?.unregisterComponent(t.detail)}async getMailboxStore(){return this.baseProvider?.getStore("mailbox")}async getAuthStore(){return this.baseProvider?.getStore("auth")}async getNylasAuth(){return this.nylasAuth}async getNylasMailboxConnector(){return this.nylasMailboxConnector}render(){return i(e,{key:"94e312cb1068801958ad1ecbd9afafd05e9b892b"},i("slot",{key:"f0373962f58b64497eec19ecfa7a456925281bd4"}))}get host(){return h(this)}};g.style=b;export{g as nylas_mailbox};
2
+ //# sourceMappingURL=p-4f55d0e5.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["NylasMailboxConnector","constructor","router","nylasAuth","nylasAuthStore","nylasStore","this","nylasMailboxStore","init","debug","mailboxStore","authStore","auth","_authConnector","NylasAuthConnector","threads","_threadConnector","NylasThreadsConnector","messages","_messageConnector","NylasMessagesConnector","folders","_foldersConnector","NylasFoldersConnector","getAuth","resetStores","reset","logout","nylasMailboxCss","NylasMailboxStyle0","NylasMailbox","handleAuthChange","async","isAuthenticated","loggedIn","emit","host","loggedOutEvent","loggedOut","defaultPrevented","nylasMailboxConnector","connectedCallback","componentWillLoad","stores","CreateNylasAuthStore","defaultAuthStoreState","mailbox","CreateNylasMailboxStore","defaultMailboxStoreState","baseProvider","NylasBaseProvider","automaticComponentRegistration","eventOverrides","HashRouter","NylasAuth","apiUri","elementsApiUri","storageType","clientId","defaultScopes","redirectURI","authConfig","getStore","Error","initEvent","validateSession","addRouteChangeListener","_route","_path","routeParams","threadId","thread","getThread","set","_routeParams","state","unSelectThread","getFolders","queryParams","window","location","hash","split","params","URLSearchParams","searchQuery","get","getThreads","search_query_native","page_token","undefined","componentDidLoad","onChange","componentDisconnected","registerComponentHandler","event","registerComponent","detail","unregisterComponentHandler","unregisterComponent","getMailboxStore","getAuthStore","getNylasAuth","getNylasMailboxConnector","render","h","Host","key"],"sources":["src/connector/nylas-mailbox-connector/index.ts","src/components/mailbox/nylas-mailbox/nylas-mailbox.css?tag=nylas-mailbox&encapsulation=shadow","src/components/mailbox/nylas-mailbox/nylas-mailbox.tsx"],"sourcesContent":["import { RouterInterface } from '@/routers/router-interface';\nimport { NylasAuthStoreType } from '@/stores/auth-store';\nimport { NylasMailboxStoreType } from '@/stores/mailbox-store';\nimport { debug } from '@/utils/utils';\nimport type { NylasAuthType } from '@nylas/core';\nimport { NylasMailboxConnectorInterface } from '../connector-interface';\nimport { NylasAuthConnector } from '../shared/api/auth';\nimport { NylasMessagesConnector } from '../shared/api/messages';\nimport { NylasThreadsConnector } from '../shared/api/threads';\nimport { NylasFoldersConnector } from '../shared/api/folders';\n\n/**\n * Base class for the Nylas connector.\n */\nexport class NylasMailboxConnector implements NylasMailboxConnectorInterface {\n public nylasAuth: NylasAuthType;\n public nylasMailboxStore: NylasMailboxStoreType;\n public nylasAuthStore: NylasAuthStoreType;\n public router: RouterInterface;\n\n private _authConnector: NylasAuthConnector | undefined;\n private _threadConnector: NylasThreadsConnector | undefined;\n private _messageConnector: NylasMessagesConnector | undefined;\n private _foldersConnector: NylasFoldersConnector | undefined;\n\n constructor(router: RouterInterface, nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType, nylasStore: NylasMailboxStoreType) {\n this.router = router;\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n this.nylasMailboxStore = nylasStore;\n }\n\n public init() {\n debug('NylasMailboxConnector init');\n }\n\n public get mailboxStore() {\n return this.nylasMailboxStore;\n }\n\n public get authStore() {\n return this.nylasAuthStore;\n }\n\n public get auth() {\n if (this._authConnector) {\n return this._authConnector;\n }\n this._authConnector = new NylasAuthConnector(this.nylasAuth, this.nylasAuthStore);\n return this._authConnector;\n }\n\n public get threads() {\n if (this._threadConnector) {\n return this._threadConnector;\n }\n this._threadConnector = new NylasThreadsConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore, this.router);\n return this._threadConnector;\n }\n\n public get messages() {\n if (this._messageConnector) {\n return this._messageConnector;\n }\n this._messageConnector = new NylasMessagesConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore);\n return this._messageConnector;\n }\n\n public get folders() {\n if (this._foldersConnector) {\n return this._foldersConnector;\n }\n this._foldersConnector = new NylasFoldersConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore);\n return this._foldersConnector;\n }\n\n public getAuth() {\n return this.nylasAuth;\n }\n\n public resetStores() {\n this.nylasMailboxStore.reset();\n this.nylasAuthStore.reset();\n }\n\n public async logout() {\n await this.nylasAuth.logout();\n this.resetStores();\n }\n}\n\nexport type PublicMethods<T> = {\n [K in keyof T]: T[K] extends Function ? (string extends K ? never : K) : never;\n}[keyof T];\n\nexport type NylasMailboxConnectorPublicMethods = PublicMethods<NylasMailboxConnector>;\n",":host {\n display: contents;\n}\n","import { NylasBaseProvider } from '@/common/abstract-provider';\nimport { RegisteredComponent } from '@/common/register-component';\nimport type { EventOverride } from '@/common/component-types';\nimport { NylasMailboxConnector } from '@/connector/nylas-mailbox-connector';\nimport { HashRouter } from '@/routers/hash-router';\nimport { RouterInterface } from '@/routers/router-interface';\nimport { CreateNylasAuthStore, NylasAuthStoreState, NylasAuthStoreType } from '@/stores/auth-store';\nimport { CreateNylasMailboxStore, NylasMailboxStoreState, NylasMailboxStoreType } from '@/stores/mailbox-store';\nimport { AuthConfig, NylasAuth, NylasAuthType } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\n\n/**\n * The Nylas Mailbox component.\n * This component is used as a provider for all other Nylas Mailbox components.\n * It is responsible for managing the NylasAuth and NylasMailboxConnector instances.\n * It also manages the state of the NylasAuth and NylasMailboxStore instances.\n * @example\n * <nylas-mailbox\n * auth-config={{\n * clientId: 'YOUR_CLIENT_ID',\n * }}\n * default-auth-store-state={{\n * threadQueryParams: {\n * limit: 10,\n * }}\n * >\n * <nylas-mailbox-thread-list></nylas-mailbox-thread-list>\n * </nylas-mailbox>\n */\n@Component({\n tag: 'nylas-mailbox',\n styleUrl: 'nylas-mailbox.css',\n shadow: true,\n})\nexport class NylasMailbox {\n /**\n * Stores to be used by the provider.\n */\n private stores?: {\n auth: NylasAuthStoreType;\n mailbox: NylasMailboxStoreType;\n };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Auth instance.\n * Used to manage all things authentication with Nylas.\n */\n private nylasAuth?: NylasAuthType;\n\n /**\n * A router instance.\n */\n private router?: RouterInterface;\n\n /**\n * The Nylas Mailbox Connector instance.\n * The branins of the provider. It manages data fetching and state synchronization.\n */\n private nylasMailboxConnector?: NylasMailboxConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasMailboxElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n */\n @Prop() readonly automaticComponentRegistration: boolean = true;\n\n /**\n * This provides a way to override the default event handlers.\n */\n @Prop() eventOverrides: EventOverride<Exclude<typeof this.nylasMailboxConnector, undefined>> = {};\n\n /**\n * The Nylas Auth configuration.\n * Used to manage all things authentication with Nylas.\n */\n @Prop({ attribute: 'auth-config' }) readonly authConfig?: AuthConfig;\n\n /**\n * The default auth store state.\n * Used to set the initial state of the auth store.\n */\n @Prop({ attribute: 'default-auth-store-state' }) readonly defaultAuthStoreState?: NylasAuthStoreState;\n\n /**\n * The default mailbox store state.\n * Used to set the initial state of the mailbox store.\n */\n @Prop({ attribute: 'default-mailbox-store-state' }) readonly defaultMailboxStoreState?: NylasMailboxStoreState;\n\n /**\n * This event is fired when the provider is initialized.\n * It can be used to set the initial state of the provider,\n * or to prevent the provider from firing some default behavior.\n */\n @Event({ cancelable: true }) readonly init!: EventEmitter<HTMLNylasMailboxElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedIn!: EventEmitter<HTMLNylasMailboxElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedOut!: EventEmitter<HTMLNylasMailboxElement>;\n\n connectedCallback() {\n debug('[nylas-mailbox] connectedCallback');\n }\n\n async componentWillLoad() {\n this.stores = {\n auth: CreateNylasAuthStore(this.defaultAuthStoreState),\n mailbox: CreateNylasMailboxStore(this.defaultMailboxStoreState),\n };\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n /**\n * Create the router instance.\n * This will be used to manage the routing of the provider.\n */\n this.router = new HashRouter();\n\n /**\n * Create the NylasAuth instance.\n * This will be used to manage all things authentication with Nylas.\n */\n this.nylasAuth = NylasAuth({\n apiUri: 'https://api.us.nylas.com',\n elementsApiUri: 'https://elements.us.nylas.com',\n storageType: 'indexeddb',\n clientId: 'YOUR_CLIENT_ID',\n defaultScopes: [],\n redirectURI: '/',\n ...this.authConfig,\n });\n\n const authStore = this.baseProvider?.getStore('auth');\n if (!authStore) {\n throw new Error('Auth store is not defined');\n }\n\n const mailboxStore = this.baseProvider?.getStore('mailbox');\n if (!mailboxStore) {\n throw new Error('Mailbox store is not defined');\n }\n\n this.nylasMailboxConnector = new NylasMailboxConnector(this.router, this.nylasAuth, authStore, mailboxStore);\n\n const initEvent = this.init.emit(this.host);\n if (!initEvent.defaultPrevented) {\n /**\n * By default, on init, we will validate the session.\n * This will check if the user is logged in and if the session is still valid.\n * If the session is not valid, the user will be logged out.\n */\n await this.nylasMailboxConnector?.auth.validateSession();\n }\n\n // Handle our router\n this.router?.addRouteChangeListener(`/thread/:threadId`, async (_route, _path, routeParams) => {\n const threadId = routeParams.threadId;\n const thread = await this.nylasMailboxConnector?.threads.getThread(threadId);\n if (thread) {\n this.nylasMailboxConnector?.mailboxStore.set('selectedThread', thread);\n }\n });\n this.router?.addRouteChangeListener(`/`, async (_route, _path, _routeParams) => {\n if (!authStore.state.isAuthenticated) {\n return;\n }\n // Reset the selected thread\n this.nylasMailboxConnector?.threads.unSelectThread();\n this.nylasMailboxConnector?.folders.getFolders();\n\n // If we have a query param, search for threads\n const queryParams = window.location.hash.split('?')[1];\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n const searchQuery = params.get('query');\n if (searchQuery) {\n await this.nylasMailboxConnector?.threads.getThreads({\n search_query_native: searchQuery,\n page_token: undefined,\n });\n }\n } else {\n this.nylasMailboxConnector?.threads.getThreads();\n }\n });\n\n /**\n * Initialize the router.\n * This will be used to manage the routing of the provider.\n */\n this.router?.init();\n\n /**\n * Listen for changes in the NylasAuth isAuthenticated state.\n * This is used to fire the loggedIn and loggedOut events.\n */\n this.handleAuthChange(authStore.state.isAuthenticated);\n this.baseProvider?.componentWillLoad(this.nylasMailboxConnector);\n }\n\n async componentDidLoad() {\n const authStore = this.baseProvider?.getStore('auth');\n if (!authStore) {\n throw new Error('Auth store is not defined');\n }\n\n authStore.onChange('isAuthenticated', this.handleAuthChange);\n this.baseProvider?.componentDidLoad();\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to retrieve the mailboxStore instance\n * @returns The mailboxStore instance\n */\n @Method()\n async getMailboxStore(): Promise<NylasMailboxStoreType | undefined> {\n return this.baseProvider?.getStore('mailbox');\n }\n\n /**\n * This method is used to retrieve the authStore instance\n * @returns The authStore instance\n */\n @Method()\n async getAuthStore(): Promise<NylasAuthStoreType | undefined> {\n return this.baseProvider?.getStore('auth');\n }\n\n /**\n * This method is used to retrieve the NylasAuth instance\n * @returns The NylasAuth instance\n */\n @Method()\n async getNylasAuth(): Promise<NylasAuthType | undefined> {\n return this.nylasAuth;\n }\n\n /**\n * This method is used to retrieve the NylasMailboxConnector instance\n * @returns The NylasMailboxConnector instance\n */\n @Method()\n async getNylasMailboxConnector() {\n return this.nylasMailboxConnector;\n }\n\n /**\n * This method is used to handle changes in the NylasAuth isAuthenticated state\n * @param isAuthenticated isAuthenticated state\n * @returns void\n */\n private handleAuthChange = async (isAuthenticated: boolean) => {\n if (isAuthenticated) {\n this.loggedIn.emit(this.host);\n } else {\n const loggedOutEvent = this.loggedOut.emit(this.host);\n if (!loggedOutEvent.defaultPrevented) {\n await this.nylasMailboxConnector?.logout();\n }\n }\n };\n\n render() {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"mappings":"sSAcaA,EAWX,WAAAC,CAAYC,EAAyBC,EAA0BC,EAAoCC,GACjGC,KAAKJ,OAASA,EACdI,KAAKH,UAAYA,EACjBG,KAAKF,eAAiBA,EACtBE,KAAKC,kBAAoBF,C,CAGpB,IAAAG,GACLC,EAAM,6B,CAGR,gBAAWC,GACT,OAAOJ,KAAKC,iB,CAGd,aAAWI,GACT,OAAOL,KAAKF,c,CAGd,QAAWQ,GACT,GAAIN,KAAKO,eAAgB,CACvB,OAAOP,KAAKO,c,CAEdP,KAAKO,eAAiB,IAAIC,EAAmBR,KAAKH,UAAWG,KAAKF,gBAClE,OAAOE,KAAKO,c,CAGd,WAAWE,GACT,GAAIT,KAAKU,iBAAkB,CACzB,OAAOV,KAAKU,gB,CAEdV,KAAKU,iBAAmB,IAAIC,EAAsBX,KAAKH,UAAWG,KAAKF,eAAgBE,KAAKC,kBAAmBD,KAAKJ,QACpH,OAAOI,KAAKU,gB,CAGd,YAAWE,GACT,GAAIZ,KAAKa,kBAAmB,CAC1B,OAAOb,KAAKa,iB,CAEdb,KAAKa,kBAAoB,IAAIC,EAAuBd,KAAKH,UAAWG,KAAKF,eAAgBE,KAAKC,mBAC9F,OAAOD,KAAKa,iB,CAGd,WAAWE,GACT,GAAIf,KAAKgB,kBAAmB,CAC1B,OAAOhB,KAAKgB,iB,CAEdhB,KAAKgB,kBAAoB,IAAIC,EAAsBjB,KAAKH,UAAWG,KAAKF,eAAgBE,KAAKC,mBAC7F,OAAOD,KAAKgB,iB,CAGP,OAAAE,GACL,OAAOlB,KAAKH,S,CAGP,WAAAsB,GACLnB,KAAKC,kBAAkBmB,QACvBpB,KAAKF,eAAesB,O,CAGf,YAAMC,SACLrB,KAAKH,UAAUwB,SACrBrB,KAAKmB,a,ECvFT,MAAMG,EAAkB,0BACxB,MAAAC,EAAeD,E,MCkCFE,EAAY,M,4HA2QfxB,KAAAyB,iBAAmBC,MAAOC,IAChC,GAAIA,EAAiB,CACnB3B,KAAK4B,SAASC,KAAK7B,KAAK8B,K,KACnB,CACL,MAAMC,EAAiB/B,KAAKgC,UAAUH,KAAK7B,KAAK8B,MAChD,IAAKC,EAAeE,iBAAkB,OAC9BjC,KAAKkC,uBAAuBb,S,wCAnOmB,K,oBAKoC,G,uGAuC/F,iBAAAc,GACEhC,EAAM,oC,CAGR,uBAAMiC,GACJpC,KAAKqC,OAAS,CACZ/B,KAAMgC,EAAqBtC,KAAKuC,uBAChCC,QAASC,EAAwBzC,KAAK0C,2BAGxC1C,KAAK2C,aAAe,IAAIC,EAAkB5C,KAAK8B,KAAM9B,KAAKqC,OAAQrC,KAAK6C,+BAAgC7C,KAAK8C,gBAM5G9C,KAAKJ,OAAS,IAAImD,EAMlB/C,KAAKH,UAAYmD,EAAU,CACzBC,OAAQ,2BACRC,eAAgB,gCAChBC,YAAa,YACbC,SAAU,iBACVC,cAAe,GACfC,YAAa,OACVtD,KAAKuD,aAGV,MAAMlD,EAAYL,KAAK2C,cAAca,SAAS,QAC9C,IAAKnD,EAAW,CACd,MAAM,IAAIoD,MAAM,4B,CAGlB,MAAMrD,EAAeJ,KAAK2C,cAAca,SAAS,WACjD,IAAKpD,EAAc,CACjB,MAAM,IAAIqD,MAAM,+B,CAGlBzD,KAAKkC,sBAAwB,IAAIxC,EAAsBM,KAAKJ,OAAQI,KAAKH,UAAWQ,EAAWD,GAE/F,MAAMsD,EAAY1D,KAAKE,KAAK2B,KAAK7B,KAAK8B,MACtC,IAAK4B,EAAUzB,iBAAkB,OAMzBjC,KAAKkC,uBAAuB5B,KAAKqD,kB,CAIzC3D,KAAKJ,QAAQgE,uBAAuB,qBAAqBlC,MAAOmC,EAAQC,EAAOC,KAC7E,MAAMC,EAAWD,EAAYC,SAC7B,MAAMC,QAAejE,KAAKkC,uBAAuBzB,QAAQyD,UAAUF,IACnE,GAAIC,EAAQ,CACVjE,KAAKkC,uBAAuB9B,aAAa+D,IAAI,iBAAkBF,E,KAGnEjE,KAAKJ,QAAQgE,uBAAuB,KAAKlC,MAAOmC,EAAQC,EAAOM,KAC7D,IAAK/D,EAAUgE,MAAM1C,gBAAiB,CACpC,M,CAGF3B,KAAKkC,uBAAuBzB,QAAQ6D,iBACpCtE,KAAKkC,uBAAuBnB,QAAQwD,aAGpC,MAAMC,EAAcC,OAAOC,SAASC,KAAKC,MAAM,KAAK,GACpD,GAAIJ,EAAa,CACf,MAAMK,EAAS,IAAIC,gBAAgBN,GACnC,MAAMO,EAAcF,EAAOG,IAAI,SAC/B,GAAID,EAAa,OACT/E,KAAKkC,uBAAuBzB,QAAQwE,WAAW,CACnDC,oBAAqBH,EACrBI,WAAYC,Y,MAGX,CACLpF,KAAKkC,uBAAuBzB,QAAQwE,Y,KAQxCjF,KAAKJ,QAAQM,OAMbF,KAAKyB,iBAAiBpB,EAAUgE,MAAM1C,iBACtC3B,KAAK2C,cAAcP,kBAAkBpC,KAAKkC,sB,CAG5C,sBAAMmD,GACJ,MAAMhF,EAAYL,KAAK2C,cAAca,SAAS,QAC9C,IAAKnD,EAAW,CACd,MAAM,IAAIoD,MAAM,4B,CAGlBpD,EAAUiF,SAAS,kBAAmBtF,KAAKyB,kBAC3CzB,KAAK2C,cAAc0C,kB,CAGrB,qBAAAE,GACEvF,KAAK2C,cAAc4C,uB,CAUrB,8BAAMC,CAAyBC,GAC7BzF,KAAK2C,cAAc+C,kBAAkBD,EAAME,O,CAU7C,gCAAMC,CAA2BH,GAC/BzF,KAAK2C,cAAckD,oBAAoBJ,EAAME,O,CAQ/C,qBAAMG,GACJ,OAAO9F,KAAK2C,cAAca,SAAS,U,CAQrC,kBAAMuC,GACJ,OAAO/F,KAAK2C,cAAca,SAAS,O,CAQrC,kBAAMwC,GACJ,OAAOhG,KAAKH,S,CAQd,8BAAMoG,GACJ,OAAOjG,KAAKkC,qB,CAmBd,MAAAgE,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,QAAAE,IAAA,6C"}
1
+ {"version":3,"names":["NylasMailboxConnector","constructor","router","nylasAuth","nylasAuthStore","nylasStore","this","nylasMailboxStore","init","debug","mailboxStore","authStore","auth","_authConnector","NylasAuthConnector","threads","_threadConnector","NylasThreadsConnector","messages","_messageConnector","NylasMessagesConnector","folders","_foldersConnector","NylasFoldersConnector","getAuth","resetStores","reset","logout","nylasMailboxCss","NylasMailboxStyle0","NylasMailbox","handleAuthChange","async","isAuthenticated","loggedIn","emit","host","loggedOutEvent","loggedOut","defaultPrevented","nylasMailboxConnector","connectedCallback","componentWillLoad","stores","CreateNylasAuthStore","defaultAuthStoreState","mailbox","CreateNylasMailboxStore","defaultMailboxStoreState","baseProvider","NylasBaseProvider","automaticComponentRegistration","eventOverrides","HashRouter","NylasAuth","apiUri","elementsApiUri","storageType","clientId","defaultScopes","redirectURI","authConfig","getStore","Error","initEvent","validateSession","addRouteChangeListener","_route","_path","routeParams","threadId","thread","getThread","set","_routeParams","state","unSelectThread","getFolders","queryParams","window","location","hash","split","params","URLSearchParams","searchQuery","get","getThreads","search_query_native","page_token","undefined","componentDidLoad","onChange","componentDisconnected","registerComponentHandler","event","registerComponent","detail","unregisterComponentHandler","unregisterComponent","getMailboxStore","getAuthStore","getNylasAuth","getNylasMailboxConnector","render","h","Host","key"],"sources":["src/connector/nylas-mailbox-connector/index.ts","src/components/mailbox/nylas-mailbox/nylas-mailbox.css?tag=nylas-mailbox&encapsulation=shadow","src/components/mailbox/nylas-mailbox/nylas-mailbox.tsx"],"sourcesContent":["import { RouterInterface } from '@/routers/router-interface';\nimport { NylasAuthStoreType } from '@/stores/auth-store';\nimport { NylasMailboxStoreType } from '@/stores/mailbox-store';\nimport { debug } from '@/utils/utils';\nimport type { NylasAuthType } from '@nylas/core';\nimport { NylasMailboxConnectorInterface } from '../connector-interface';\nimport { NylasAuthConnector } from '../shared/api/auth';\nimport { NylasMessagesConnector } from '../shared/api/messages';\nimport { NylasThreadsConnector } from '../shared/api/threads';\nimport { NylasFoldersConnector } from '../shared/api/folders';\n\n/**\n * Base class for the Nylas connector.\n */\nexport class NylasMailboxConnector implements NylasMailboxConnectorInterface {\n public nylasAuth: NylasAuthType;\n public nylasMailboxStore: NylasMailboxStoreType;\n public nylasAuthStore: NylasAuthStoreType;\n public router: RouterInterface;\n\n private _authConnector: NylasAuthConnector | undefined;\n private _threadConnector: NylasThreadsConnector | undefined;\n private _messageConnector: NylasMessagesConnector | undefined;\n private _foldersConnector: NylasFoldersConnector | undefined;\n\n constructor(router: RouterInterface, nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType, nylasStore: NylasMailboxStoreType) {\n this.router = router;\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n this.nylasMailboxStore = nylasStore;\n }\n\n public init() {\n debug('NylasMailboxConnector init');\n }\n\n public get mailboxStore() {\n return this.nylasMailboxStore;\n }\n\n public get authStore() {\n return this.nylasAuthStore;\n }\n\n public get auth() {\n if (this._authConnector) {\n return this._authConnector;\n }\n this._authConnector = new NylasAuthConnector(this.nylasAuth, this.nylasAuthStore);\n return this._authConnector;\n }\n\n public get threads() {\n if (this._threadConnector) {\n return this._threadConnector;\n }\n this._threadConnector = new NylasThreadsConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore, this.router);\n return this._threadConnector;\n }\n\n public get messages() {\n if (this._messageConnector) {\n return this._messageConnector;\n }\n this._messageConnector = new NylasMessagesConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore);\n return this._messageConnector;\n }\n\n public get folders() {\n if (this._foldersConnector) {\n return this._foldersConnector;\n }\n this._foldersConnector = new NylasFoldersConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore);\n return this._foldersConnector;\n }\n\n public getAuth() {\n return this.nylasAuth;\n }\n\n public resetStores() {\n this.nylasMailboxStore.reset();\n this.nylasAuthStore.reset();\n }\n\n public async logout() {\n await this.nylasAuth.logout();\n this.resetStores();\n }\n}\n\nexport type PublicMethods<T> = {\n [K in keyof T]: T[K] extends Function ? (string extends K ? never : K) : never;\n}[keyof T];\n\nexport type NylasMailboxConnectorPublicMethods = PublicMethods<NylasMailboxConnector>;\n",":host {\n display: contents;\n}\n","import { NylasBaseProvider } from '@/common/abstract-provider';\nimport { RegisteredComponent } from '@/common/register-component';\nimport type { EventOverride } from '@/common/component-types';\nimport { NylasMailboxConnector } from '@/connector/nylas-mailbox-connector';\nimport { HashRouter } from '@/routers/hash-router';\nimport { RouterInterface } from '@/routers/router-interface';\nimport { CreateNylasAuthStore, NylasAuthStoreState, NylasAuthStoreType } from '@/stores/auth-store';\nimport { CreateNylasMailboxStore, NylasMailboxStoreState, NylasMailboxStoreType } from '@/stores/mailbox-store';\nimport { AuthConfig, NylasAuth, NylasAuthType } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\n\n/**\n * The Nylas Mailbox component.\n * This component is used as a provider for all other Nylas Mailbox components.\n * It is responsible for managing the NylasAuth and NylasMailboxConnector instances.\n * It also manages the state of the NylasAuth and NylasMailboxStore instances.\n * @example\n * <nylas-mailbox\n * auth-config={{\n * clientId: 'YOUR_CLIENT_ID',\n * }}\n * default-auth-store-state={{\n * threadQueryParams: {\n * limit: 10,\n * }}\n * >\n * <nylas-mailbox-thread-list></nylas-mailbox-thread-list>\n * </nylas-mailbox>\n */\n@Component({\n tag: 'nylas-mailbox',\n styleUrl: 'nylas-mailbox.css',\n shadow: true,\n})\nexport class NylasMailbox {\n /**\n * Stores to be used by the provider.\n */\n private stores?: {\n auth: NylasAuthStoreType;\n mailbox: NylasMailboxStoreType;\n };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Auth instance.\n * Used to manage all things authentication with Nylas.\n */\n private nylasAuth?: NylasAuthType;\n\n /**\n * A router instance.\n */\n private router?: RouterInterface;\n\n /**\n * The Nylas Mailbox Connector instance.\n * The branins of the provider. It manages data fetching and state synchronization.\n */\n private nylasMailboxConnector?: NylasMailboxConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasMailboxElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n */\n @Prop() readonly automaticComponentRegistration: boolean = true;\n\n /**\n * This provides a way to override the default event handlers.\n */\n @Prop() eventOverrides: EventOverride<Exclude<typeof this.nylasMailboxConnector, undefined>> = {};\n\n /**\n * The Nylas Auth configuration.\n * Used to manage all things authentication with Nylas.\n */\n @Prop({ attribute: 'auth-config' }) readonly authConfig?: AuthConfig;\n\n /**\n * The default auth store state.\n * Used to set the initial state of the auth store.\n */\n @Prop({ attribute: 'default-auth-store-state' }) readonly defaultAuthStoreState?: NylasAuthStoreState;\n\n /**\n * The default mailbox store state.\n * Used to set the initial state of the mailbox store.\n */\n @Prop({ attribute: 'default-mailbox-store-state' }) readonly defaultMailboxStoreState?: NylasMailboxStoreState;\n\n /**\n * This event is fired when the provider is initialized.\n * It can be used to set the initial state of the provider,\n * or to prevent the provider from firing some default behavior.\n */\n @Event({ cancelable: true }) readonly init!: EventEmitter<HTMLNylasMailboxElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedIn!: EventEmitter<HTMLNylasMailboxElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedOut!: EventEmitter<HTMLNylasMailboxElement>;\n\n connectedCallback() {\n debug('[nylas-mailbox] connectedCallback');\n }\n\n async componentWillLoad() {\n this.stores = {\n auth: CreateNylasAuthStore(this.defaultAuthStoreState),\n mailbox: CreateNylasMailboxStore(this.defaultMailboxStoreState),\n };\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n /**\n * Create the router instance.\n * This will be used to manage the routing of the provider.\n */\n this.router = new HashRouter();\n\n /**\n * Create the NylasAuth instance.\n * This will be used to manage all things authentication with Nylas.\n */\n this.nylasAuth = NylasAuth({\n apiUri: 'https://api.us.nylas.com',\n elementsApiUri: 'https://elements.us.nylas.com',\n storageType: 'indexeddb',\n clientId: 'YOUR_CLIENT_ID',\n defaultScopes: [],\n redirectURI: '/',\n ...this.authConfig,\n });\n\n const authStore = this.baseProvider?.getStore('auth');\n if (!authStore) {\n throw new Error('Auth store is not defined');\n }\n\n const mailboxStore = this.baseProvider?.getStore('mailbox');\n if (!mailboxStore) {\n throw new Error('Mailbox store is not defined');\n }\n\n this.nylasMailboxConnector = new NylasMailboxConnector(this.router, this.nylasAuth, authStore, mailboxStore);\n\n const initEvent = this.init.emit(this.host);\n if (!initEvent.defaultPrevented) {\n /**\n * By default, on init, we will validate the session.\n * This will check if the user is logged in and if the session is still valid.\n * If the session is not valid, the user will be logged out.\n */\n await this.nylasMailboxConnector?.auth.validateSession();\n }\n\n // Handle our router\n this.router?.addRouteChangeListener(`/thread/:threadId`, async (_route, _path, routeParams) => {\n const threadId = routeParams.threadId;\n const thread = await this.nylasMailboxConnector?.threads.getThread(threadId);\n if (thread) {\n this.nylasMailboxConnector?.mailboxStore.set('selectedThread', thread);\n }\n });\n this.router?.addRouteChangeListener(`/`, async (_route, _path, _routeParams) => {\n if (!authStore.state.isAuthenticated) {\n return;\n }\n // Reset the selected thread\n this.nylasMailboxConnector?.threads.unSelectThread();\n this.nylasMailboxConnector?.folders.getFolders();\n\n // If we have a query param, search for threads\n const queryParams = window.location.hash.split('?')[1];\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n const searchQuery = params.get('query');\n if (searchQuery) {\n await this.nylasMailboxConnector?.threads.getThreads({\n search_query_native: searchQuery,\n page_token: undefined,\n });\n }\n } else {\n this.nylasMailboxConnector?.threads.getThreads();\n }\n });\n\n /**\n * Initialize the router.\n * This will be used to manage the routing of the provider.\n */\n this.router?.init();\n\n /**\n * Listen for changes in the NylasAuth isAuthenticated state.\n * This is used to fire the loggedIn and loggedOut events.\n */\n this.handleAuthChange(authStore.state.isAuthenticated);\n this.baseProvider?.componentWillLoad(this.nylasMailboxConnector);\n }\n\n async componentDidLoad() {\n const authStore = this.baseProvider?.getStore('auth');\n if (!authStore) {\n throw new Error('Auth store is not defined');\n }\n\n authStore.onChange('isAuthenticated', this.handleAuthChange);\n this.baseProvider?.componentDidLoad();\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to retrieve the mailboxStore instance\n * @returns The mailboxStore instance\n */\n @Method()\n async getMailboxStore(): Promise<NylasMailboxStoreType | undefined> {\n return this.baseProvider?.getStore('mailbox');\n }\n\n /**\n * This method is used to retrieve the authStore instance\n * @returns The authStore instance\n */\n @Method()\n async getAuthStore(): Promise<NylasAuthStoreType | undefined> {\n return this.baseProvider?.getStore('auth');\n }\n\n /**\n * This method is used to retrieve the NylasAuth instance\n * @returns The NylasAuth instance\n */\n @Method()\n async getNylasAuth(): Promise<NylasAuthType | undefined> {\n return this.nylasAuth;\n }\n\n /**\n * This method is used to retrieve the NylasMailboxConnector instance\n * @returns The NylasMailboxConnector instance\n */\n @Method()\n async getNylasMailboxConnector() {\n return this.nylasMailboxConnector;\n }\n\n /**\n * This method is used to handle changes in the NylasAuth isAuthenticated state\n * @param isAuthenticated isAuthenticated state\n * @returns void\n */\n private handleAuthChange = async (isAuthenticated: boolean) => {\n if (isAuthenticated) {\n this.loggedIn.emit(this.host);\n } else {\n const loggedOutEvent = this.loggedOut.emit(this.host);\n if (!loggedOutEvent.defaultPrevented) {\n await this.nylasMailboxConnector?.logout();\n }\n }\n };\n\n render() {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"mappings":"2SAcaA,EAWX,WAAAC,CAAYC,EAAyBC,EAA0BC,EAAoCC,GACjGC,KAAKJ,OAASA,EACdI,KAAKH,UAAYA,EACjBG,KAAKF,eAAiBA,EACtBE,KAAKC,kBAAoBF,C,CAGpB,IAAAG,GACLC,EAAM,6B,CAGR,gBAAWC,GACT,OAAOJ,KAAKC,iB,CAGd,aAAWI,GACT,OAAOL,KAAKF,c,CAGd,QAAWQ,GACT,GAAIN,KAAKO,eAAgB,CACvB,OAAOP,KAAKO,c,CAEdP,KAAKO,eAAiB,IAAIC,EAAmBR,KAAKH,UAAWG,KAAKF,gBAClE,OAAOE,KAAKO,c,CAGd,WAAWE,GACT,GAAIT,KAAKU,iBAAkB,CACzB,OAAOV,KAAKU,gB,CAEdV,KAAKU,iBAAmB,IAAIC,EAAsBX,KAAKH,UAAWG,KAAKF,eAAgBE,KAAKC,kBAAmBD,KAAKJ,QACpH,OAAOI,KAAKU,gB,CAGd,YAAWE,GACT,GAAIZ,KAAKa,kBAAmB,CAC1B,OAAOb,KAAKa,iB,CAEdb,KAAKa,kBAAoB,IAAIC,EAAuBd,KAAKH,UAAWG,KAAKF,eAAgBE,KAAKC,mBAC9F,OAAOD,KAAKa,iB,CAGd,WAAWE,GACT,GAAIf,KAAKgB,kBAAmB,CAC1B,OAAOhB,KAAKgB,iB,CAEdhB,KAAKgB,kBAAoB,IAAIC,EAAsBjB,KAAKH,UAAWG,KAAKF,eAAgBE,KAAKC,mBAC7F,OAAOD,KAAKgB,iB,CAGP,OAAAE,GACL,OAAOlB,KAAKH,S,CAGP,WAAAsB,GACLnB,KAAKC,kBAAkBmB,QACvBpB,KAAKF,eAAesB,O,CAGf,YAAMC,SACLrB,KAAKH,UAAUwB,SACrBrB,KAAKmB,a,ECvFT,MAAMG,EAAkB,0BACxB,MAAAC,EAAeD,E,MCkCFE,EAAY,M,4HA2QfxB,KAAAyB,iBAAmBC,MAAOC,IAChC,GAAIA,EAAiB,CACnB3B,KAAK4B,SAASC,KAAK7B,KAAK8B,K,KACnB,CACL,MAAMC,EAAiB/B,KAAKgC,UAAUH,KAAK7B,KAAK8B,MAChD,IAAKC,EAAeE,iBAAkB,OAC9BjC,KAAKkC,uBAAuBb,S,wCAnOmB,K,oBAKoC,G,uGAuC/F,iBAAAc,GACEhC,EAAM,oC,CAGR,uBAAMiC,GACJpC,KAAKqC,OAAS,CACZ/B,KAAMgC,EAAqBtC,KAAKuC,uBAChCC,QAASC,EAAwBzC,KAAK0C,2BAGxC1C,KAAK2C,aAAe,IAAIC,EAAkB5C,KAAK8B,KAAM9B,KAAKqC,OAAQrC,KAAK6C,+BAAgC7C,KAAK8C,gBAM5G9C,KAAKJ,OAAS,IAAImD,EAMlB/C,KAAKH,UAAYmD,EAAU,CACzBC,OAAQ,2BACRC,eAAgB,gCAChBC,YAAa,YACbC,SAAU,iBACVC,cAAe,GACfC,YAAa,OACVtD,KAAKuD,aAGV,MAAMlD,EAAYL,KAAK2C,cAAca,SAAS,QAC9C,IAAKnD,EAAW,CACd,MAAM,IAAIoD,MAAM,4B,CAGlB,MAAMrD,EAAeJ,KAAK2C,cAAca,SAAS,WACjD,IAAKpD,EAAc,CACjB,MAAM,IAAIqD,MAAM,+B,CAGlBzD,KAAKkC,sBAAwB,IAAIxC,EAAsBM,KAAKJ,OAAQI,KAAKH,UAAWQ,EAAWD,GAE/F,MAAMsD,EAAY1D,KAAKE,KAAK2B,KAAK7B,KAAK8B,MACtC,IAAK4B,EAAUzB,iBAAkB,OAMzBjC,KAAKkC,uBAAuB5B,KAAKqD,kB,CAIzC3D,KAAKJ,QAAQgE,uBAAuB,qBAAqBlC,MAAOmC,EAAQC,EAAOC,KAC7E,MAAMC,EAAWD,EAAYC,SAC7B,MAAMC,QAAejE,KAAKkC,uBAAuBzB,QAAQyD,UAAUF,IACnE,GAAIC,EAAQ,CACVjE,KAAKkC,uBAAuB9B,aAAa+D,IAAI,iBAAkBF,E,KAGnEjE,KAAKJ,QAAQgE,uBAAuB,KAAKlC,MAAOmC,EAAQC,EAAOM,KAC7D,IAAK/D,EAAUgE,MAAM1C,gBAAiB,CACpC,M,CAGF3B,KAAKkC,uBAAuBzB,QAAQ6D,iBACpCtE,KAAKkC,uBAAuBnB,QAAQwD,aAGpC,MAAMC,EAAcC,OAAOC,SAASC,KAAKC,MAAM,KAAK,GACpD,GAAIJ,EAAa,CACf,MAAMK,EAAS,IAAIC,gBAAgBN,GACnC,MAAMO,EAAcF,EAAOG,IAAI,SAC/B,GAAID,EAAa,OACT/E,KAAKkC,uBAAuBzB,QAAQwE,WAAW,CACnDC,oBAAqBH,EACrBI,WAAYC,Y,MAGX,CACLpF,KAAKkC,uBAAuBzB,QAAQwE,Y,KAQxCjF,KAAKJ,QAAQM,OAMbF,KAAKyB,iBAAiBpB,EAAUgE,MAAM1C,iBACtC3B,KAAK2C,cAAcP,kBAAkBpC,KAAKkC,sB,CAG5C,sBAAMmD,GACJ,MAAMhF,EAAYL,KAAK2C,cAAca,SAAS,QAC9C,IAAKnD,EAAW,CACd,MAAM,IAAIoD,MAAM,4B,CAGlBpD,EAAUiF,SAAS,kBAAmBtF,KAAKyB,kBAC3CzB,KAAK2C,cAAc0C,kB,CAGrB,qBAAAE,GACEvF,KAAK2C,cAAc4C,uB,CAUrB,8BAAMC,CAAyBC,GAC7BzF,KAAK2C,cAAc+C,kBAAkBD,EAAME,O,CAU7C,gCAAMC,CAA2BH,GAC/BzF,KAAK2C,cAAckD,oBAAoBJ,EAAME,O,CAQ/C,qBAAMG,GACJ,OAAO9F,KAAK2C,cAAca,SAAS,U,CAQrC,kBAAMuC,GACJ,OAAO/F,KAAK2C,cAAca,SAAS,O,CAQrC,kBAAMwC,GACJ,OAAOhG,KAAKH,S,CAQd,8BAAMoG,GACJ,OAAOjG,KAAKkC,qB,CAmBd,MAAAgE,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,QAAAE,IAAA,6C"}
@@ -1,2 +1,2 @@
1
- import{r as o,c as t,h as i,H as n}from"./p-68c2fadf.js";import{R as r}from"./p-795b324a.js";import"./p-6c11737d.js";import"./p-02aa5f03.js";import"./p-cb65c223.js";const e=":host{font-family:'Arial', sans-serif;background:var(--nylas-color-primary-50);color:var(--nylas-color-primary-800);margin:0;display:contents}input{box-sizing:border-box}.login-container{display:flex;justify-content:center;align-items:center;height:100%}.login-box{width:300px;padding:20px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-color-primary-50);text-align:center}.login-box h1{margin-top:0;margin-bottom:0.5em}.login-box p{margin-bottom:1em}.login-methods button{display:block;width:100%;padding:10px 10px 10px 50px;margin-bottom:10px;border:none;border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-color-primary-300);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-600);cursor:pointer;transition:background 0.3s ease;position:relative;text-align:left}.login-methods button svg{position:absolute;left:16px;top:50%;transform:translateY(-50%)}.login-methods button:hover{background:var(--nylas-color-primary-200);}.login-form label{display:block;margin-bottom:5px;text-align:left}.login-form input{width:100%;padding:10px;margin-bottom:10px;border:1px solid var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-800);}.login-form button{width:100%;padding:10px;border:none;border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-500);color:var(--nylas-color-primary-50);cursor:pointer;transition:background 0.3s ease}.login-form button:hover{background:var(--nylas-color-primary-600);}";const a=e;var s=undefined&&undefined.__decorate||function(o,t,i,n){var r=arguments.length,e=r<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")e=Reflect.decorate(o,t,i,n);else for(var s=o.length-1;s>=0;s--)if(a=o[s])e=(r<3?a(e):r>3?a(t,i,e):a(t,i))||e;return r>3&&e&&Object.defineProperty(t,i,e),e};var l=undefined&&undefined.__metadata||function(o,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(o,t)};const c=class{constructor(i){o(this,i);this.buttonClick=t(this,"buttonClick",7);this._handleLoginRedirect=async()=>{const o=await(this.nylasConnector?.auth.getHostedAuthRedirectURL(this.scopes));const t=this.buttonClick.emit({url:o});if(t.defaultPrevented){return}if(o){window.location.href=o}};this._onGoogleButtonClick=async o=>{o.preventDefault();const t=await(this.nylasConnector?.auth.getHostedAuthRedirectURL(this.scopes,undefined,"google"));if(t){window.location.href=t}};this._onMicrosoftButtonClick=async o=>{o.preventDefault();const t=await(this.nylasConnector?.auth.getHostedAuthRedirectURL(this.scopes,undefined,"microsoft"));if(t){window.location.href=t}};this._onFormSubmit=async o=>{o.preventDefault();const t=await(this.nylasConnector?.auth.getHostedAuthRedirectURL(this.scopes,this.email));if(t){window.location.href=t}};this.isAuthenticated=false;this.nylasConnector=undefined;this.scopes=undefined;this.loginMethod="redirect";this.companyName="Nylas";this.logoUrl="https://www.nylas.com/wp-content/uploads/main-logo.svg";this.logoWidth="min-content";this.providers="google,microsoft";this.buttonText="Login";this.email=""}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){}async componentDidLoad(){const o=await(this.nylasConnector?.auth.manageHostedAuthCodeExchange(window.location.href));if(o){window.history.replaceState({},document.title,window.location.pathname)}}render(){const o=this.providers?.split(",")||[];return i(n,{key:"0fa4607ba09d6092b6976dda39b8ac7b82183e73"},this.loginMethod==="redirect"&&i("div",{class:"redirect-container"},!this.isAuthenticated&&i("sp-button",{part:"button",onClick:this._handleLoginRedirect},this.buttonText)),this.loginMethod==="emebded"&&i("main",{class:"login-container"},i("section",{class:"login-box"},i("header",null,i("img",{src:this.logoUrl,alt:`${this.companyName} logo`,width:"100%",style:{minWidth:this.logoWidth}}),i("h1",null,"Welcome")),i("p",null,"Log in to your account to continue to ",this.companyName),i("div",{class:"login-methods"},o.includes("google")&&i("button",{class:"login-google",onClick:this._onGoogleButtonClick},i("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"18",height:"18",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 256 262"},i("path",{fill:"#4285F4",d:"M255.6 131.6c0-8.2-.8-16.2-2.2-23.9H130v45.3h70.3c-3 16.1-12.4 29.7-26.3 38.9v32.4h42.6c25-23 39.4-56.7 39.4-97.7z"}),i("path",{fill:"#34A853",d:"M130 262c35.3 0 64.9-11.7 86.5-31.7l-42.6-32.4c-11.7 7.9-26.7 12.6-43.9 12.6-33.7 0-62.3-22.7-72.5-53.4H14.5v33.3A130.3 130.3 0 00130 262z"}),i("path",{fill:"#FBBC05",d:"M57.5 158.1a72.7 72.7 0 010-54.2V70.6H14.5a130.4 130.4 0 000 120.8l43-33.3z"}),i("path",{fill:"#EA4335",d:"M130 51.6c19 0 36 6.5 49.4 19.2l37-36C195 13.1 165.2 0 130 0A130.3 130.3 0 0014.5 70.6l43 33.3c10.2-30.7 38.8-53.3 72.5-53.3z"})),"Continue with Google"),o.includes("microsoft")&&i("button",{class:"login-microsoft",onClick:this._onMicrosoftButtonClick},i("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"18",height:"18",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 448 512"},i("path",{fill:"#F3F3F3",d:"M0 32v192h192V32H0zm256 0v192h192V32H256zm192 256v192h-192V288h192zM0 224v192h192V224H0z"})),"Continue with Microsoft")),i("form",{class:"login-form",method:"POST",onSubmit:this._onFormSubmit},i("label",{htmlFor:"email"},"Email"),i("input",{type:"email",id:"email",name:"email",required:true,value:this.email}),i("button",{type:"submit"},"Next")))))}};s([r({name:"nylas-login",connectorToProp:"nylasConnector",stateToProps:new Map([["auth.isAuthenticated","isAuthenticated"]]),fireRegisterEvent:true}),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],c.prototype,"render",null);c.style=a;export{c as nylas_login};
2
- //# sourceMappingURL=p-9794f735.entry.js.map
1
+ import{r as o,c as t,h as i,H as n}from"./p-68c2fadf.js";import{R as r}from"./p-795b324a.js";import"./p-6c11737d.js";import"./p-02aa5f03.js";import"./p-cb65c223.js";const e=":host{font-family:'Arial', sans-serif;background:var(--nylas-color-primary-50);color:var(--nylas-color-primary-800);margin:0;display:contents}input{box-sizing:border-box}.login-container{display:flex;justify-content:center;align-items:center;height:100%}.login-box{width:300px;padding:20px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-color-primary-50);text-align:center}.login-box h1{margin-top:0;margin-bottom:0.5em}.login-box p{margin-bottom:1em}.login-methods button{display:block;width:100%;padding:10px 10px 10px 50px;margin-bottom:10px;border:none;border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-color-primary-300);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-600);cursor:pointer;transition:background 0.3s ease;position:relative;text-align:left}.login-methods button svg{position:absolute;left:16px;top:50%;transform:translateY(-50%)}.login-methods button:hover{background:var(--nylas-color-primary-200);}.login-form label{display:block;margin-bottom:5px;text-align:left}.login-form input{width:100%;padding:10px;margin-bottom:10px;border:1px solid var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-800);}.login-form button{width:100%;padding:10px;border:none;border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-500);color:var(--nylas-color-primary-50);cursor:pointer;transition:background 0.3s ease}.login-form button:hover{background:var(--nylas-color-primary-600);}";const a=e;var s=undefined&&undefined.__decorate||function(o,t,i,n){var r=arguments.length,e=r<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")e=Reflect.decorate(o,t,i,n);else for(var s=o.length-1;s>=0;s--)if(a=o[s])e=(r<3?a(e):r>3?a(t,i,e):a(t,i))||e;return r>3&&e&&Object.defineProperty(t,i,e),e};var l=undefined&&undefined.__metadata||function(o,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(o,t)};const c=class{constructor(i){o(this,i);this.buttonClick=t(this,"buttonClick",7);this._handleLoginRedirect=async()=>{const o=await(this.nylasConnector?.auth.getHostedAuthRedirectURL(this.scopes));const t=this.buttonClick.emit({url:o});if(t.defaultPrevented){return}if(o){window.location.href=o}};this._onGoogleButtonClick=async o=>{o.preventDefault();const t=await(this.nylasConnector?.auth.getHostedAuthRedirectURL(this.scopes,undefined,"google"));if(t){window.location.href=t}};this._onMicrosoftButtonClick=async o=>{o.preventDefault();const t=await(this.nylasConnector?.auth.getHostedAuthRedirectURL(this.scopes,undefined,"microsoft"));if(t){window.location.href=t}};this._onFormSubmit=async o=>{o.preventDefault();const t=await(this.nylasConnector?.auth.getHostedAuthRedirectURL(this.scopes,this.email));if(t){window.location.href=t}};this.isAuthenticated=false;this.nylasConnector=undefined;this.scopes=undefined;this.loginMethod="redirect";this.companyName="Nylas";this.logoUrl="https://www.nylas.com/wp-content/uploads/main-logo.svg";this.logoWidth="min-content";this.providers="google,microsoft";this.buttonText="Login";this.email=""}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){}async componentDidLoad(){const o=await(this.nylasConnector?.auth.manageHostedAuthCodeExchange(window.location.href));if(o){window.history.replaceState({},document.title,window.location.pathname)}}render(){const o=this.providers?.split(",")||[];return i(n,{key:"e3bd94415e84b96be032ba5ca9ca7f29f9f81efa"},this.loginMethod==="redirect"&&i("div",{class:"redirect-container"},!this.isAuthenticated&&i("sp-button",{part:"button",onClick:this._handleLoginRedirect},this.buttonText)),this.loginMethod==="emebded"&&i("main",{class:"login-container"},i("section",{class:"login-box"},i("header",null,i("img",{src:this.logoUrl,alt:`${this.companyName} logo`,width:"100%",style:{minWidth:this.logoWidth}}),i("h1",null,"Welcome")),i("p",null,"Log in to your account to continue to ",this.companyName),i("div",{class:"login-methods"},o.includes("google")&&i("button",{class:"login-google",onClick:this._onGoogleButtonClick},i("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"18",height:"18",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 256 262"},i("path",{fill:"#4285F4",d:"M255.6 131.6c0-8.2-.8-16.2-2.2-23.9H130v45.3h70.3c-3 16.1-12.4 29.7-26.3 38.9v32.4h42.6c25-23 39.4-56.7 39.4-97.7z"}),i("path",{fill:"#34A853",d:"M130 262c35.3 0 64.9-11.7 86.5-31.7l-42.6-32.4c-11.7 7.9-26.7 12.6-43.9 12.6-33.7 0-62.3-22.7-72.5-53.4H14.5v33.3A130.3 130.3 0 00130 262z"}),i("path",{fill:"#FBBC05",d:"M57.5 158.1a72.7 72.7 0 010-54.2V70.6H14.5a130.4 130.4 0 000 120.8l43-33.3z"}),i("path",{fill:"#EA4335",d:"M130 51.6c19 0 36 6.5 49.4 19.2l37-36C195 13.1 165.2 0 130 0A130.3 130.3 0 0014.5 70.6l43 33.3c10.2-30.7 38.8-53.3 72.5-53.3z"})),"Continue with Google"),o.includes("microsoft")&&i("button",{class:"login-microsoft",onClick:this._onMicrosoftButtonClick},i("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"18",height:"18",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 448 512"},i("path",{fill:"#F3F3F3",d:"M0 32v192h192V32H0zm256 0v192h192V32H256zm192 256v192h-192V288h192zM0 224v192h192V224H0z"})),"Continue with Microsoft")),i("form",{class:"login-form",method:"POST",onSubmit:this._onFormSubmit},i("label",{htmlFor:"email"},"Email"),i("input",{type:"email",id:"email",name:"email",required:true,value:this.email}),i("button",{type:"submit"},"Next")))))}};s([r({name:"nylas-login",connectorToProp:"nylasConnector",stateToProps:new Map([["auth.isAuthenticated","isAuthenticated"]]),fireRegisterEvent:true}),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],c.prototype,"render",null);c.style=a;export{c as nylas_login};
2
+ //# sourceMappingURL=p-524a6acc.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as s,H as e,a as n}from"./p-68c2fadf.js";import{F as r,G as a,H as h,I as o,J as l}from"./p-6c11737d.js";import{c}from"./p-cb65c223.js";import"./p-02aa5f03.js";var f={exports:{}};(function(t,i){!function(i,s){t.exports=s()}(c,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d\d/,e=/\d\d?/,n=/\d*[^-_:/,()\s\d]+/,r={},a=function(t){return(t=+t)+(t>68?1900:2e3)};var h=function(t){return function(i){this[t]=+i}},o=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var i=t.match(/([+-]|\d\d)/g),s=60*i[1]+(+i[2]||0);return 0===s?0:"+"===i[0]?-s:s}(t)}],l=function(t){var i=r[t];return i&&(i.indexOf?i:i.s.concat(i.f))},c=function(t,i){var s,e=r.meridiem;if(e){for(var n=1;n<=24;n+=1)if(t.indexOf(e(n,0,i))>-1){s=n>12;break}}else s=t===(i?"pm":"PM");return s},f={A:[n,function(t){this.afternoon=c(t,!1)}],a:[n,function(t){this.afternoon=c(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[s,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[e,h("seconds")],ss:[e,h("seconds")],m:[e,h("minutes")],mm:[e,h("minutes")],H:[e,h("hours")],h:[e,h("hours")],HH:[e,h("hours")],hh:[e,h("hours")],D:[e,h("day")],DD:[s,h("day")],Do:[n,function(t){var i=r.ordinal,s=t.match(/\d+/);if(this.day=s[0],i)for(var e=1;e<=31;e+=1)i(e).replace(/\[|\]/g,"")===t&&(this.day=e)}],M:[e,h("month")],MM:[s,h("month")],MMM:[n,function(t){var i=l("months"),s=(l("monthsShort")||i.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(s<1)throw new Error;this.month=s%12||s}],MMMM:[n,function(t){var i=l("months").indexOf(t)+1;if(i<1)throw new Error;this.month=i%12||i}],Y:[/[+-]?\d+/,h("year")],YY:[s,function(t){this.year=a(t)}],YYYY:[/\d{4}/,h("year")],Z:o,ZZ:o};function d(s){var e,n;e=s,n=r&&r.formats;for(var a=(s=e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(i,s,e){var r=e&&e.toUpperCase();return s||n[e]||t[e]||n[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,i,s){return i||s.slice(1)}))}))).match(i),h=a.length,o=0;o<h;o+=1){var l=a[o],c=f[l],d=c&&c[0],m=c&&c[1];a[o]=m?{regex:d,parser:m}:l.replace(/^\[|\]$/g,"")}return function(t){for(var i={},s=0,e=0;s<h;s+=1){var n=a[s];if("string"==typeof n)e+=n.length;else{var r=n.regex,o=n.parser,l=t.slice(e),c=r.exec(l)[0];o.call(i,c),t=t.replace(c,"")}}return function(t){var i=t.afternoon;if(void 0!==i){var s=t.hours;i?s<12&&(t.hours+=12):12===s&&(t.hours=0),delete t.afternoon}}(i),i}}return function(t,i,s){s.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(a=t.parseTwoDigitYear);var e=i.prototype,n=e.parse;e.parse=function(t){var i=t.date,e=t.utc,a=t.args;this.$u=e;var h=a[1];if("string"==typeof h){var o=!0===a[2],l=!0===a[3],c=o||l,f=a[2];l&&(f=a[2]),r=this.$locale(),!o&&f&&(r=s.Ls[f]),this.$d=function(t,i,s){try{if(["x","X"].indexOf(i)>-1)return new Date(("X"===i?1e3:1)*t);var e=d(i)(t),n=e.year,r=e.month,a=e.day,h=e.hours,o=e.minutes,l=e.seconds,c=e.milliseconds,f=e.zone,m=new Date,u=a||(n||r?1:m.getDate()),p=n||m.getFullYear(),b=0;n&&!r||(b=r>0?r-1:m.getMonth());var y=h||0,v=o||0,x=l||0,g=c||0;return f?new Date(Date.UTC(p,b,u,y,v,x,g+60*f.offset*1e3)):s?new Date(Date.UTC(p,b,u,y,v,x,g)):new Date(p,b,u,y,v,x,g)}catch(t){return new Date("")}}(i,h,e),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),c&&i!=this.format(h)&&(this.$d=new Date("")),r={}}else if(h instanceof Array)for(var m=h.length,u=1;u<=m;u+=1){a[1]=h[u-1];var p=s.apply(this,a);if(p.isValid()){this.$d=p.$d,this.$L=p.$L,this.init();break}u===m&&(this.$d=new Date(""))}else n.call(this,t)}}}))})(f);const d=f.exports;const m=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}';const u=m;r.extend(d);const p=class{constructor(s){t(this,s);this.timeChange=i(this,"timeChange",7);this.formError=i(this,"formError",7);this.time=undefined;this.minimumStartTime=null;this.placeholder="hh:mmam/pm";this.name=undefined;this.hasError=false;this.err="";this.showTimes=false;this.ariaActivedescendant="";this.times=this.generateTimes();this.shouldAutoScroll=false}handleOutsideClick(t){const i=t.composedPath();const s=i.includes(this.el);if(!s&&this.showTimes){this.showTimes=false}}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let t=r().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));if(this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12){t=t.add(12,"hour")}else if(this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12){t=t.subtract(12,"hour")}this.times=this.generateTimes();const i=r(this.times[0].value,"hh:mma");let s=r(this.time,"hh:mma");if(s.isBefore(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const t=a(this.time);const i=this.times.findIndex((i=>i.value===t));if(i>-1){this.shouldAutoScroll=false;this.scrollToViewWithinParent(i)}return}}handleTimeChange(t,i){const s=i.split(":");if(s[0]==="00"&&s[1].slice(-2)=="pm"){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}if(!h(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}else{this.err="";this.formError.emit({key:this.el.id,message:""})}this.timeChange.emit({key:this.el.id,value:i})}handleTimeAutocomplete(t){const i=t.target?.value;if(!h(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"});return}if(i===""){const t=o().format("hh:mma");this.timeChange.emit({key:this.el.id,value:t});return}if(!l(i)){const t=a(i);this.timeChange.emit({key:this.el.id,value:t});return}this.timeChange.emit({key:this.el.id,value:i})}handleOnInput(t){const i=t.target?.value;if(!h(i)){return}if(i===""){const t=o().format("hh:mma");const i=this.times.findIndex((i=>i.value===t));if(i>-1){this.scrollToViewWithinParent(i)}return}if(!l(i)){const t=a(i);const s=this.times.findIndex((i=>i.value===t));if(s>-1){this.scrollToViewWithinParent(s)}return}}generateTimes(){const t=[];let i=r().set("hour",0).set("minute",0).set("second",0);if(this.minimumStartTime){i=r(this.minimumStartTime,"hh:mma")}const s=i.endOf("day").diff(i,"minutes");const e=Math.round(s/15);for(let s=0;s<e+1;s++){const n=i.add(s*15,"minute");if(s==e&&n.format("hh:mma").includes("am")){break}t.push({id:s,value:n.format("hh:mma")})}return t}handleComboboxKeyDown(t){if(t.key==="ArrowDown"){t.preventDefault();if(!this.showTimes){this.showTimes=true;this.shouldAutoScroll=true;return}if(this.ariaActivedescendant===""){this.ariaActivedescendant=this.times[0].id.toString();this.focusOption(0)}else{const t=this.times.findIndex((t=>t.id.toString()===this.ariaActivedescendant));const i=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[i].id.toString();this.focusOption(i)}}else if(t.key==="ArrowUp"){t.preventDefault();if(this.ariaActivedescendant===""){this.ariaActivedescendant=this.times[this.times.length-1].id.toString();this.focusOption(this.times.length-1)}else{const t=this.times.findIndex((t=>t.id.toString()===this.ariaActivedescendant));const i=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[i].id.toString();this.focusOption(i)}}else if(t.key==="Escape"){this.showTimes=false;this.timeInput.focus()}}handleListboxKeydown(t){const i=this.times;const s=i.findIndex((t=>t.id.toString()===this.ariaActivedescendant));if(t.key==="ArrowDown"||t.key==="Tab"&&!t.shiftKey){t.preventDefault();const e=s+1<i.length?s+1:0;this.ariaActivedescendant=i[e].id.toString();this.focusOption(e)}else if(t.key==="ArrowUp"||t.key==="Tab"&&t.shiftKey){t.preventDefault();const e=s-1>=0?s-1:i.length-1;this.ariaActivedescendant=i[e].id.toString();this.focusOption(e)}else if(t.key==="Enter"){t.preventDefault();if(this.ariaActivedescendant){const e=i[s];this.handleTimeChange(t,e.value);this.showTimes=false;this.ariaActivedescendant="";this.timeInput.focus()}}else if(t.key==="Escape"){this.showTimes=false;this.timeInput.focus()}}scrollToViewWithinParent(t){const i=this.times[t];const s=this.el.shadowRoot?.getElementById(i.id.toString());const e=this.timeMenu;this.ariaActivedescendant=i.id.toString();const n=s.getBoundingClientRect();const r=e.getBoundingClientRect();if(n.top<r.top){e.scrollTop-=r.top-n.top}else if(n.bottom>r.bottom){e.scrollTop+=n.bottom-r.bottom}if(n.left<r.left){e.scrollLeft-=r.left-n.left}else if(n.right>r.right){e.scrollLeft+=n.right-r.right}}focusOption(t){const i=this.times[t];if(!i)return;const s=i.id.toString();const e=this.el.shadowRoot?.getElementById(s);if(e){e.focus();e.scrollIntoView({behavior:"smooth",block:"nearest"})}}render(){return s(e,{key:"3894f07d3cde36266ef0eb3a2320bdc34a97815f"},s("div",{key:"f20379a246f82223e28428fc0010f63f06c3a9bb",class:"time-picker",part:"time-picker"},s("input",{key:"bc6432d7bc56f9005f8835bc738e33978ef5b74c",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":true,error:!!this.err||this.hasError},ref:t=>this.timeInput=t,value:this.time,onClick:()=>{this.showTimes=!this.showTimes;this.shouldAutoScroll=true},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:t=>this.handleComboboxKeyDown(t),onInput:t=>this.handleOnInput(t),onBlur:t=>this.handleTimeAutocomplete(t)}),this.err&&s("div",{class:"invalid-time-icon"}),this.showTimes&&s("div",{class:"times",part:"times",ref:t=>this.timeMenu=t},s("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:t=>this.handleListboxKeydown(t)},this.times.map((t=>s("li",{tabindex:"0",key:t.id,id:t.id.toString(),class:{focused:this.ariaActivedescendant===t.id.toString()},onClick:i=>{this.handleTimeChange(i,t.value);this.showTimes=false;this.timeInput.focus()},role:"option"},`${t.value}`))))),!this.showTimes&&this.err&&s("p",{class:"error",id:"email-error"},this.err)))}get el(){return n(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};p.style=u;export{p as nylas_time_window_picker};
2
- //# sourceMappingURL=p-6bd9c9c3.entry.js.map
1
+ import{r as t,c as i,h as s,H as e,a as n}from"./p-68c2fadf.js";import{F as r,G as a,H as h,I as o,J as l}from"./p-6c11737d.js";import{c}from"./p-cb65c223.js";import"./p-02aa5f03.js";var f={exports:{}};(function(t,i){!function(i,s){t.exports=s()}(c,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d\d/,e=/\d\d?/,n=/\d*[^-_:/,()\s\d]+/,r={},a=function(t){return(t=+t)+(t>68?1900:2e3)};var h=function(t){return function(i){this[t]=+i}},o=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var i=t.match(/([+-]|\d\d)/g),s=60*i[1]+(+i[2]||0);return 0===s?0:"+"===i[0]?-s:s}(t)}],l=function(t){var i=r[t];return i&&(i.indexOf?i:i.s.concat(i.f))},c=function(t,i){var s,e=r.meridiem;if(e){for(var n=1;n<=24;n+=1)if(t.indexOf(e(n,0,i))>-1){s=n>12;break}}else s=t===(i?"pm":"PM");return s},f={A:[n,function(t){this.afternoon=c(t,!1)}],a:[n,function(t){this.afternoon=c(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[s,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[e,h("seconds")],ss:[e,h("seconds")],m:[e,h("minutes")],mm:[e,h("minutes")],H:[e,h("hours")],h:[e,h("hours")],HH:[e,h("hours")],hh:[e,h("hours")],D:[e,h("day")],DD:[s,h("day")],Do:[n,function(t){var i=r.ordinal,s=t.match(/\d+/);if(this.day=s[0],i)for(var e=1;e<=31;e+=1)i(e).replace(/\[|\]/g,"")===t&&(this.day=e)}],M:[e,h("month")],MM:[s,h("month")],MMM:[n,function(t){var i=l("months"),s=(l("monthsShort")||i.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(s<1)throw new Error;this.month=s%12||s}],MMMM:[n,function(t){var i=l("months").indexOf(t)+1;if(i<1)throw new Error;this.month=i%12||i}],Y:[/[+-]?\d+/,h("year")],YY:[s,function(t){this.year=a(t)}],YYYY:[/\d{4}/,h("year")],Z:o,ZZ:o};function d(s){var e,n;e=s,n=r&&r.formats;for(var a=(s=e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(i,s,e){var r=e&&e.toUpperCase();return s||n[e]||t[e]||n[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,i,s){return i||s.slice(1)}))}))).match(i),h=a.length,o=0;o<h;o+=1){var l=a[o],c=f[l],d=c&&c[0],m=c&&c[1];a[o]=m?{regex:d,parser:m}:l.replace(/^\[|\]$/g,"")}return function(t){for(var i={},s=0,e=0;s<h;s+=1){var n=a[s];if("string"==typeof n)e+=n.length;else{var r=n.regex,o=n.parser,l=t.slice(e),c=r.exec(l)[0];o.call(i,c),t=t.replace(c,"")}}return function(t){var i=t.afternoon;if(void 0!==i){var s=t.hours;i?s<12&&(t.hours+=12):12===s&&(t.hours=0),delete t.afternoon}}(i),i}}return function(t,i,s){s.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(a=t.parseTwoDigitYear);var e=i.prototype,n=e.parse;e.parse=function(t){var i=t.date,e=t.utc,a=t.args;this.$u=e;var h=a[1];if("string"==typeof h){var o=!0===a[2],l=!0===a[3],c=o||l,f=a[2];l&&(f=a[2]),r=this.$locale(),!o&&f&&(r=s.Ls[f]),this.$d=function(t,i,s){try{if(["x","X"].indexOf(i)>-1)return new Date(("X"===i?1e3:1)*t);var e=d(i)(t),n=e.year,r=e.month,a=e.day,h=e.hours,o=e.minutes,l=e.seconds,c=e.milliseconds,f=e.zone,m=new Date,u=a||(n||r?1:m.getDate()),p=n||m.getFullYear(),b=0;n&&!r||(b=r>0?r-1:m.getMonth());var y=h||0,v=o||0,x=l||0,g=c||0;return f?new Date(Date.UTC(p,b,u,y,v,x,g+60*f.offset*1e3)):s?new Date(Date.UTC(p,b,u,y,v,x,g)):new Date(p,b,u,y,v,x,g)}catch(t){return new Date("")}}(i,h,e),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),c&&i!=this.format(h)&&(this.$d=new Date("")),r={}}else if(h instanceof Array)for(var m=h.length,u=1;u<=m;u+=1){a[1]=h[u-1];var p=s.apply(this,a);if(p.isValid()){this.$d=p.$d,this.$L=p.$L,this.init();break}u===m&&(this.$d=new Date(""))}else n.call(this,t)}}}))})(f);const d=f.exports;const m=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}';const u=m;r.extend(d);const p=class{constructor(s){t(this,s);this.timeChange=i(this,"timeChange",7);this.formError=i(this,"formError",7);this.time=undefined;this.minimumStartTime=null;this.placeholder="hh:mmam/pm";this.name=undefined;this.hasError=false;this.err="";this.showTimes=false;this.ariaActivedescendant="";this.times=this.generateTimes();this.shouldAutoScroll=false}handleOutsideClick(t){const i=t.composedPath();const s=i.includes(this.el);if(!s&&this.showTimes){this.showTimes=false}}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let t=r().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));if(this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12){t=t.add(12,"hour")}else if(this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12){t=t.subtract(12,"hour")}this.times=this.generateTimes();const i=r(this.times[0].value,"hh:mma");let s=r(this.time,"hh:mma");if(s.isBefore(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const t=a(this.time);const i=this.times.findIndex((i=>i.value===t));if(i>-1){this.shouldAutoScroll=false;this.scrollToViewWithinParent(i)}return}}handleTimeChange(t,i){const s=i.split(":");if(s[0]==="00"&&s[1].slice(-2)=="pm"){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}if(!h(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"})}else{this.err="";this.formError.emit({key:this.el.id,message:""})}this.timeChange.emit({key:this.el.id,value:i})}handleTimeAutocomplete(t){const i=t.target?.value;if(!h(i)){this.err="Invalid";this.formError.emit({key:this.el.id,message:"Invalid"});return}if(i===""){const t=o().format("hh:mma");this.timeChange.emit({key:this.el.id,value:t});return}if(!l(i)){const t=a(i);this.timeChange.emit({key:this.el.id,value:t});return}this.timeChange.emit({key:this.el.id,value:i})}handleOnInput(t){const i=t.target?.value;if(!h(i)){return}if(i===""){const t=o().format("hh:mma");const i=this.times.findIndex((i=>i.value===t));if(i>-1){this.scrollToViewWithinParent(i)}return}if(!l(i)){const t=a(i);const s=this.times.findIndex((i=>i.value===t));if(s>-1){this.scrollToViewWithinParent(s)}return}}generateTimes(){const t=[];let i=r().set("hour",0).set("minute",0).set("second",0);if(this.minimumStartTime){i=r(this.minimumStartTime,"hh:mma")}const s=i.endOf("day").diff(i,"minutes");const e=Math.round(s/15);for(let s=0;s<e+1;s++){const n=i.add(s*15,"minute");if(s==e&&n.format("hh:mma").includes("am")){break}t.push({id:s,value:n.format("hh:mma")})}return t}handleComboboxKeyDown(t){if(t.key==="ArrowDown"){t.preventDefault();if(!this.showTimes){this.showTimes=true;this.shouldAutoScroll=true;return}if(this.ariaActivedescendant===""){this.ariaActivedescendant=this.times[0].id.toString();this.focusOption(0)}else{const t=this.times.findIndex((t=>t.id.toString()===this.ariaActivedescendant));const i=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[i].id.toString();this.focusOption(i)}}else if(t.key==="ArrowUp"){t.preventDefault();if(this.ariaActivedescendant===""){this.ariaActivedescendant=this.times[this.times.length-1].id.toString();this.focusOption(this.times.length-1)}else{const t=this.times.findIndex((t=>t.id.toString()===this.ariaActivedescendant));const i=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[i].id.toString();this.focusOption(i)}}else if(t.key==="Escape"){this.showTimes=false;this.timeInput.focus()}}handleListboxKeydown(t){const i=this.times;const s=i.findIndex((t=>t.id.toString()===this.ariaActivedescendant));if(t.key==="ArrowDown"||t.key==="Tab"&&!t.shiftKey){t.preventDefault();const e=s+1<i.length?s+1:0;this.ariaActivedescendant=i[e].id.toString();this.focusOption(e)}else if(t.key==="ArrowUp"||t.key==="Tab"&&t.shiftKey){t.preventDefault();const e=s-1>=0?s-1:i.length-1;this.ariaActivedescendant=i[e].id.toString();this.focusOption(e)}else if(t.key==="Enter"){t.preventDefault();if(this.ariaActivedescendant){const e=i[s];this.handleTimeChange(t,e.value);this.showTimes=false;this.ariaActivedescendant="";this.timeInput.focus()}}else if(t.key==="Escape"){this.showTimes=false;this.timeInput.focus()}}scrollToViewWithinParent(t){const i=this.times[t];const s=this.el.shadowRoot?.getElementById(i.id.toString());const e=this.timeMenu;this.ariaActivedescendant=i.id.toString();const n=s.getBoundingClientRect();const r=e.getBoundingClientRect();if(n.top<r.top){e.scrollTop-=r.top-n.top}else if(n.bottom>r.bottom){e.scrollTop+=n.bottom-r.bottom}if(n.left<r.left){e.scrollLeft-=r.left-n.left}else if(n.right>r.right){e.scrollLeft+=n.right-r.right}}focusOption(t){const i=this.times[t];if(!i)return;const s=i.id.toString();const e=this.el.shadowRoot?.getElementById(s);if(e){e.focus();e.scrollIntoView({behavior:"smooth",block:"nearest"})}}render(){return s(e,{key:"0ffd2bd4930bcb5fd19e0e9f4aa930206cd445ef"},s("div",{key:"94a265377b520768cfe2d755193bd88b6fd76b27",class:"time-picker",part:"time-picker"},s("input",{key:"957b8e3736cede01bdac8fc4c6050a058b45a717",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":true,error:!!this.err||this.hasError},ref:t=>this.timeInput=t,value:this.time,onClick:()=>{this.showTimes=!this.showTimes;this.shouldAutoScroll=true},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:t=>this.handleComboboxKeyDown(t),onInput:t=>this.handleOnInput(t),onBlur:t=>this.handleTimeAutocomplete(t)}),this.err&&s("div",{class:"invalid-time-icon"}),this.showTimes&&s("div",{class:"times",part:"times",ref:t=>this.timeMenu=t},s("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:t=>this.handleListboxKeydown(t)},this.times.map((t=>s("li",{tabindex:"0",key:t.id,id:t.id.toString(),class:{focused:this.ariaActivedescendant===t.id.toString()},onClick:i=>{this.handleTimeChange(i,t.value);this.showTimes=false;this.timeInput.focus()},role:"option"},`${t.value}`))))),!this.showTimes&&this.err&&s("p",{class:"error",id:"email-error"},this.err)))}get el(){return n(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};p.style=u;export{p as nylas_time_window_picker};
2
+ //# sourceMappingURL=p-533d39ce.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as a,h as e}from"./p-68c2fadf.js";const c=".sc-document-refresh-icon-h{display:flex}";const t=c;const f=class{constructor(e){a(this,e);this.width="18";this.height="18"}render(){return e("svg",{key:"ad1d47af6ee81852b020d80ce95bc22c95bfd1fa",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:this.width,height:this.height},e("rect",{key:"b50790888394805fa2cbc80eaea086abf44461bb",id:"Canvas",fill:"#ff13dc",opacity:"0"}),e("path",{key:"c2977e935b93588d4c9f65cbf0a37fa2d176b223",d:"M9.19763,12.26283A4.44131,4.44131,0,0,1,16.948,10.71741l.62524-.62524a.24433.24433,0,0,1,.1748-.07373.25035.25035,0,0,1,.252.24875v2.50143a.25.25,0,0,1-.25.25l-2.4995-.00016A.25088.25088,0,0,1,15,12.76721v-.00054a.24436.24436,0,0,1,.07373-.175l.86988-.86987a3.02827,3.02827,0,0,0-5.29847.71808.48835.48835,0,0,1-.46081.30981H9.55908a.37949.37949,0,0,1-.36145-.48686Z"}),e("path",{key:"3d2a2492472a400ea7271eaadb4afcee0328cddb",d:"M17.80237,14.77441A4.4413,4.4413,0,0,1,10.052,16.31982l-.62524.62524a.24429.24429,0,0,1-.1748.07373A.25036.25036,0,0,1,9,16.77V14.26863a.25.25,0,0,1,.25-.25l2.4995.00016A.25087.25087,0,0,1,12,14.27v.00052a.24434.24434,0,0,1-.07373.175l-.86988.86988a3.02828,3.02828,0,0,0,5.29847-.71808.48836.48836,0,0,1,.46081-.30982h.62525a.3795.3795,0,0,1,.36145.48687Z"}),e("path",{key:"2e2702c559cbb5fcf33462ed15374c765035c381",d:"M7,13.5A6.5,6.5,0,0,1,13.5,7c.16883,0,.33447.01264.5.02527V5H9.5A.5.5,0,0,1,9,4.5V0H2.5A.5.5,0,0,0,2,.5v15a.5.5,0,0,0,.5.5H7.49981A6.4779,6.4779,0,0,1,7,13.5Z"}),e("path",{key:"a3f96af1e653a1baeceacee507725cf2f57e91b3",d:"M10,0h.043a.5.5,0,0,1,.353.146L13.854,3.6A.5.5,0,0,1,14,3.957V4H10Z"}))}};f.style=t;export{f as document_refresh_icon};
2
- //# sourceMappingURL=p-e928898a.entry.js.map
1
+ import{r as a,h as e}from"./p-68c2fadf.js";const c=".sc-document-refresh-icon-h{display:flex}";const d=c;const f=class{constructor(e){a(this,e);this.width="18";this.height="18"}render(){return e("svg",{key:"72cc323a9f50fc88a4c8af82ea5bab6fd3e8c6bf",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",width:this.width,height:this.height},e("rect",{key:"afc6b9ebef3d0a44ed49b52d6d69a38c8219352d",id:"Canvas",fill:"#ff13dc",opacity:"0"}),e("path",{key:"ae11e4423a2539f13cff9a6b73b41e78305d56ea",d:"M9.19763,12.26283A4.44131,4.44131,0,0,1,16.948,10.71741l.62524-.62524a.24433.24433,0,0,1,.1748-.07373.25035.25035,0,0,1,.252.24875v2.50143a.25.25,0,0,1-.25.25l-2.4995-.00016A.25088.25088,0,0,1,15,12.76721v-.00054a.24436.24436,0,0,1,.07373-.175l.86988-.86987a3.02827,3.02827,0,0,0-5.29847.71808.48835.48835,0,0,1-.46081.30981H9.55908a.37949.37949,0,0,1-.36145-.48686Z"}),e("path",{key:"ac7727dbedb3f235889fdf2a98c4e834a7f28ce6",d:"M17.80237,14.77441A4.4413,4.4413,0,0,1,10.052,16.31982l-.62524.62524a.24429.24429,0,0,1-.1748.07373A.25036.25036,0,0,1,9,16.77V14.26863a.25.25,0,0,1,.25-.25l2.4995.00016A.25087.25087,0,0,1,12,14.27v.00052a.24434.24434,0,0,1-.07373.175l-.86988.86988a3.02828,3.02828,0,0,0,5.29847-.71808.48836.48836,0,0,1,.46081-.30982h.62525a.3795.3795,0,0,1,.36145.48687Z"}),e("path",{key:"eed2a947fabe4f6876be129b5a57cb1c999d847c",d:"M7,13.5A6.5,6.5,0,0,1,13.5,7c.16883,0,.33447.01264.5.02527V5H9.5A.5.5,0,0,1,9,4.5V0H2.5A.5.5,0,0,0,2,.5v15a.5.5,0,0,0,.5.5H7.49981A6.4779,6.4779,0,0,1,7,13.5Z"}),e("path",{key:"ef7199de60da548a7f8a975dd7a519b4a726c718",d:"M10,0h.043a.5.5,0,0,1,.353.146L13.854,3.6A.5.5,0,0,1,14,3.957V4H10Z"}))}};f.style=d;export{f as document_refresh_icon};
2
+ //# sourceMappingURL=p-5a379fb5.entry.js.map
@@ -1,2 +1,2 @@
1
- import{h as e,F as s,r as a,c as t,H as r,a as o}from"./p-68c2fadf.js";import{R as i}from"./p-795b324a.js";import{j as n,b as l,k as d,a as c,t as h}from"./p-6c11737d.js";import"./p-02aa5f03.js";import"./p-cb65c223.js";function m(e,s,a,t,r){if(!t){return}if(!a){return}if(a.children.length>0){return}c(`[nylas-view-thread] Rendering email`,{message:e,attachments:s,viewEmailElement:t});const o=t.cloneNode(true);o.message=e.data;o.parent=r;a.appendChild(o)}const p=({viewEmailElement:a,message:t,attachments:r,onMessageClick:o,onShowContactDataClick:i,parent:c})=>e(s,null,e("div",{key:t.id,class:"message"},e("div",{class:"sub-header","data-id":t.data.id,onClick:o},e("div",{class:"avatar"},t.data.from&&t.data.from[0]?.name&&t.data.from[0]?.name[0]?.toUpperCase()),e("div",{class:"from"},e("span",{class:"name"},t.data.from&&t.data.from[0]?.name)," ",e("span",{class:"email"},t.data.from&&t.data.from[0]?.email)),e("div",{class:"date"},new Date(t.data.date*1e3).toLocaleTimeString(undefined,{timeStyle:"short"})," ","(",n(new Date(t.data.date*1e3)),")"),e("sp-button-group",{class:"buttons"},e("nylas-summarize-message-button",{message:t.data})),t.collapse&&e("div",{class:"snippet"},t.data.snippet),!t.collapse&&t.data.to&&e("div",{class:"to"},e("span",null,"to")," ",l(t.data.to)," ",e("button",{type:"button",value:t.data.id,onClick:i,class:{expand:true,"expand--showContactData":t.showContactData}},e("chevron-icon",null)))),t.showContactData&&e("div",{class:"address-info"},e("div",{class:"label"},"From"),e("div",{class:"value"},d(t.data?.from?t?.data?.from[0]:{name:"",email:""})),t.data.to&&e(s,null,e("div",{class:"label"},"To"),e("div",{class:"value"},t.data.to.map((s=>e("div",null,d(s)))))),typeof t.data.cc!=="undefined"&&t.data.cc.length>0&&e(s,null,e("div",{class:"label"},"CC"),e("div",{class:"value"},t.data.cc.map((s=>e("div",null,d(s))))))),!t.collapse&&a&&e("div",{key:t.id,ref:e=>m(t,r,e,a,c)}),!t.collapse&&!a&&e("nylas-view-email",{key:t.id,message:t.data,parent:c})),e("hr",null));const u=':host{display:block;font-size:inherit}.avatar{z-index:1;border-radius:100%;background-color:var(--nylas-color-primary-200);height:40px;width:40px;align-items:center;display:flex;justify-content:center;border:1px solid var(--nylas-color-primary-200)}.view-thread{display:grid;grid-auto-flow:row;width:100%}.view-thread .header{display:grid;grid-gap:1rem;align-items:center;margin-bottom:1rem}.view-thread .header .subject{font-size:1.25rem;font-weight:600;line-height:1.5rem}.view-thread .header .folders{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;overflow-x:auto;gap:1rem}.view-thread .header .folders .folder{padding:0 0.5rem;font-size:0.9rem;color:var(--nylas-color-primary-900);background-color:var(--nylas-color-primary-300)}.view-thread .messages{display:grid;gap:1rem}.view-thread .messages hr{margin:0;width:100%;border:1px solid var(--nylas-color-primary-200)}.view-thread .messages hr:last-of-type{display:none}.view-thread .messages .message{display:grid;grid-auto-flow:row;gap:1rem}.view-thread .messages .message:last-of-type .sub-header{cursor:default}.view-thread .messages .message .sub-header{display:grid;grid-template:"avatar from date buttons" "avatar to to buttons";grid-column-gap:1rem;grid-template-columns:auto 1fr auto auto;cursor:pointer}.view-thread .messages .message .sub-header>*{pointer-events:none}.view-thread .messages .message .sub-header .avatar{grid-area:avatar}.view-thread .messages .message .sub-header .from{grid-area:from}.view-thread .messages .message .sub-header .from span.email{display:none;color:var(--nylas-color-primary-400);font-weight:600}.view-thread .messages .message .sub-header .buttons{grid-area:buttons;align-self:center}.view-thread .messages .message .sub-header .buttons *{pointer-events:all}.view-thread .messages .message .sub-header .date{grid-area:date;align-self:center;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .snippet{width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--nylas-color-primary-600)}.view-thread .messages .message .sub-header .to{grid-area:to;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to>span{color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to button{border:0;background-color:transparent;cursor:pointer;pointer-events:all;padding:0;margin:0}.view-thread .messages .message .sub-header .to button>*{pointer-events:none}.view-thread .messages .message .sub-header .to button chevron-icon{display:inline-table;fill:var(--nylas-color-primary-400);width:15px;height:15px;vertical-align:middle}.view-thread .messages .message .sub-header .to button chevron-icon svg{width:15px;height:15px;transform:rotate(90deg)}.view-thread .messages .message .sub-header .to button.expand--showContactData chevron-icon svg{transform:rotate(270deg)}.view-thread .messages .message .address-info{display:grid;column-gap:1rem;row-gap:0.5rem;grid-template-columns:auto 1fr;grid-template-rows:1fr;padding:1rem 2rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-color-primary-200);align-items:flex-start;color:var(--nylas-color-primary-600)}.view-thread .messages .message .address-info .label{color:var(--nylas-color-primary-400);font-weight:600}.show-more{position:relative;display:flex;width:100%}.show-more .sr-only{display:none}.show-more button{position:relative;display:inline-flex;width:100%;padding:0;border:0;background-color:transparent;cursor:pointer;text-align:left;overflow:hidden}.show-more button span{border:1px solid var(--nylas-color-primary-400)}.show-more button:hover span{background-color:var(--nylas-color-primary-700)}.show-more button::after{border-top:1px solid rgba(100, 121, 143, 0.122);border-bottom:1px solid rgba(100, 121, 143, 0.122);content:"";height:4px;width:100%;position:absolute;top:50%}.loading{position:absolute;width:100%;height:100%;background-color:var(--loading__background-color);top:0;bottom:0;left:0;z-index:1;display:grid;justify-content:center;align-items:center;font-weight:600;overflow:hidden}.reply-buttons{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;gap:1rem;margin-top:1rem}.reply-buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.reply-buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.reply-buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.reply-buttons sp-button chevron-icon{display:inline-block}@media only screen and (min-width: 768px){.view-thread .messages .message .sub-header .from span.email{display:inline}}';const g=u;var v=undefined&&undefined.__decorate||function(e,s,a,t){var r=arguments.length,o=r<3?s:t===null?t=Object.getOwnPropertyDescriptor(s,a):t,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,s,a,t);else for(var n=e.length-1;n>=0;n--)if(i=e[n])o=(r<3?i(o):r>3?i(s,a,o):i(s,a))||o;return r>3&&o&&Object.defineProperty(s,a,o),o};var y=undefined&&undefined.__metadata||function(e,s){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,s)};const f=class{constructor(e){a(this,e);this.threadSelected=t(this,"threadSelected",7);this.showContactDataClicked=t(this,"showContactDataClicked",7);this.messageClicked=t(this,"messageClicked",7);this.nylasViewEmailElement=null;this.nylasComposerElement=null;this.onShowContactDataClick=e=>{e.stopPropagation();const s=e.target;const a=s.value;const t=this.internalMessages.find((e=>e.data.id===a));if(!t){c(`[nylas-view-thread] Could not find message ${a}`);return}const r=this.showContactDataClicked.emit(t.data);if(!r.defaultPrevented){t.showContactData=!t.showContactData;this.internalMessages=[...this.internalMessages]}c(`[nylas-view-thread] show contact data clicked ${a} ${t.showContactData?"collapsed":"expanded"}`)};this.onMessageClick=e=>{const s=e.target;const a=s.dataset.id;const t=this.internalMessages.find((e=>e.data.id===a));if(!t){c(`[nylas-view-thread] Could not find message ${a}`);return}const r=this.messageClicked.emit(t.data);if(!r.defaultPrevented){if(t.id!==this.internalMessages[this.internalMessages.length-1]?.id){t.collapse=!t.collapse;if(t.collapse){t.showContactData=false}}this.internalMessages=[...this.internalMessages]}c(`[nylas-view-thread] message clicked ${a} ${t.collapse?"collapsed":"expanded"}`)};this.onShowAllEmailsClick=()=>{this.showAllEmails=!this.showAllEmails};this.showComposerClick=()=>{this.showComposer=!this.showComposer};this.draft=undefined;this.thread=undefined;this.messages=[];this.attachments=[];this.state="loading";this.internalMessages=[];this.showAllEmails=false;this.showComposer=false}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){c(`[nylas-view-thread] Component will load`);this.updateInternalMessages(this.messages);const e=this.host.querySelector("template.nylas-view-email");if(!e){c(`[nylas-view-thread] Could not find template`);return}const s=document.importNode(e.content,true);this.nylasViewEmailElement=s.querySelector("nylas-view-email");const a=this.host.querySelector("template.nylas-composer");if(!a){c(`[nylas-view-thread] Could not find composer template`);return}const t=document.importNode(a.content,true);this.nylasComposerElement=t.querySelector("nylas-composer")}async componentDidLoad(){c(`[nylas-view-thread] Component did load`)}async threadChanged(e){c(`[nylas-view-thread] Thread changed`,{thread:e});this.internalMessages=[];const s=this.threadSelected.emit(e);if(!s.defaultPrevented){c(`[nylas-view-thread] Default event not prevented, initializing`)}}updateInternalMessages(e){c(`[nylas-view-thread] Updating internal messages`,{messages:e});const s=e.sort(((e,s)=>e.date>s.date?1:-1)).map(((s,a)=>({id:s.id,data:s,collapse:a===e.length-1?false:true,showContactData:false})));this.internalMessages=s}render(){const a=this.internalMessages.length>2?this.internalMessages[0]:null;const t=this.internalMessages.slice(this.internalMessages.length-2,this.internalMessages.length);const o=this.internalMessages.slice(1,this.internalMessages.length-2);const i=this.internalMessages[this.internalMessages.length-1];return e(r,{key:"8028320256fb534ad3879eb2978b7aefd6d15b87"},e("sp-theme",{key:"52bd23373620180fcd0252fafdfc3d684fef66e9",scale:"medium",color:"dark"},e("div",{key:"44b02a2da08cf04051efdeaddc7676fdfb04b49b",class:"view-thread"},e("div",{key:"c4cfd835daeffb463011e6cfcf980a28ab325a04",class:"header"},e("div",{key:"a6c98d79c03d5c2f075c6ed824c5421fa868d9ac",class:"subject"},this.thread?.subject),e("div",{key:"2550eddd665661651c3916087d5c24c052bf3e81",class:"folders"},this.thread?.folders?.map((s=>e("sp-tag",{size:"s"},h(s.replace("CATEGORY_","").replace("_"," "))))))),e("div",{key:"d6b9d5634c426b61fe5575df6c2ae297428e0e83",class:"messages"},a&&e(p,{message:a,attachments:this.attachments.filter((e=>e.messageId===a.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}),o.length>0&&this.messages.length>1&&!this.showAllEmails&&t.length>0&&e(s,null,e("div",{class:"show-more"},e("button",{type:"button",onClick:this.onShowAllEmailsClick},e("span",{class:"avatar"},o.length)," ",e("span",{class:"sr-only"},"Show ",o.length," more emails"))),e("hr",null)),o.length>0&&this.showAllEmails&&this.messages.length>2&&o.map((s=>e(p,{message:s,attachments:this.attachments.filter((e=>e.messageId===a?.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}))),t.length>0&&t.map((s=>e(p,{message:s,attachments:this.attachments.filter((e=>e.messageId===a?.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement})))),!(this.showComposer&&i)&&e("div",{class:"reply-buttons"},e("sp-button",{variant:"cta",type:"button",onClick:this.showComposerClick},e("span",{slot:"icon"},e("reply-icon",null)),e("span",null,"Reply")),e("sp-button",{variant:"cta",type:"button"},e("span",{slot:"icon"},e("reply-all-icon",null)),e("span",null,"Reply All")),e("sp-button",{variant:"cta",type:"button"},e("span",{slot:"icon"},e("forward-icon",null)),e("span",null,"Forward"))),this.showComposer&&i&&e("div",{class:"composer"},e("nylas-composer",{message:i.data,onClose:this.showComposerClick,onSend:e=>{c(`[nylas-view-thread] Send event`,{message:e.detail.message,replyBody:e.detail.replyBody})}})))))}get host(){return o(this)}static get watchers(){return{thread:["threadChanged"],messages:["updateInternalMessages"]}}};v([i({name:"nylas-view-thread",stateToProps:new Map([["mailbox.selectedThread","thread"],["mailbox.messages","messages"],["mailbox.state","state"]]),eventToProps:{threadSelected:async(e,s)=>{c(`[nylas-view-thread] Nylas init event. Fetching thread messages.`,{event:e});const a=e.detail;if(a&&a.id){await s.messages.getThreadMessages(a.id)}}},fireRegisterEvent:true}),y("design:type",Function),y("design:paramtypes",[]),y("design:returntype",void 0)],f.prototype,"render",null);f.style=g;export{f as nylas_view_thread};
2
- //# sourceMappingURL=p-c90755ba.entry.js.map
1
+ import{h as e,F as s,r as a,c as t,H as r,a as o}from"./p-68c2fadf.js";import{R as i}from"./p-795b324a.js";import{j as n,b as l,k as d,a as c,t as h}from"./p-6c11737d.js";import"./p-02aa5f03.js";import"./p-cb65c223.js";function m(e,s,a,t,r){if(!t){return}if(!a){return}if(a.children.length>0){return}c(`[nylas-view-thread] Rendering email`,{message:e,attachments:s,viewEmailElement:t});const o=t.cloneNode(true);o.message=e.data;o.parent=r;a.appendChild(o)}const p=({viewEmailElement:a,message:t,attachments:r,onMessageClick:o,onShowContactDataClick:i,parent:c})=>e(s,null,e("div",{key:t.id,class:"message"},e("div",{class:"sub-header","data-id":t.data.id,onClick:o},e("div",{class:"avatar"},t.data.from&&t.data.from[0]?.name&&t.data.from[0]?.name[0]?.toUpperCase()),e("div",{class:"from"},e("span",{class:"name"},t.data.from&&t.data.from[0]?.name)," ",e("span",{class:"email"},t.data.from&&t.data.from[0]?.email)),e("div",{class:"date"},new Date(t.data.date*1e3).toLocaleTimeString(undefined,{timeStyle:"short"})," ","(",n(new Date(t.data.date*1e3)),")"),e("sp-button-group",{class:"buttons"},e("nylas-summarize-message-button",{message:t.data})),t.collapse&&e("div",{class:"snippet"},t.data.snippet),!t.collapse&&t.data.to&&e("div",{class:"to"},e("span",null,"to")," ",l(t.data.to)," ",e("button",{type:"button",value:t.data.id,onClick:i,class:{expand:true,"expand--showContactData":t.showContactData}},e("chevron-icon",null)))),t.showContactData&&e("div",{class:"address-info"},e("div",{class:"label"},"From"),e("div",{class:"value"},d(t.data?.from?t?.data?.from[0]:{name:"",email:""})),t.data.to&&e(s,null,e("div",{class:"label"},"To"),e("div",{class:"value"},t.data.to.map((s=>e("div",null,d(s)))))),typeof t.data.cc!=="undefined"&&t.data.cc.length>0&&e(s,null,e("div",{class:"label"},"CC"),e("div",{class:"value"},t.data.cc.map((s=>e("div",null,d(s))))))),!t.collapse&&a&&e("div",{key:t.id,ref:e=>m(t,r,e,a,c)}),!t.collapse&&!a&&e("nylas-view-email",{key:t.id,message:t.data,parent:c})),e("hr",null));const u=':host{display:block;font-size:inherit}.avatar{z-index:1;border-radius:100%;background-color:var(--nylas-color-primary-200);height:40px;width:40px;align-items:center;display:flex;justify-content:center;border:1px solid var(--nylas-color-primary-200)}.view-thread{display:grid;grid-auto-flow:row;width:100%}.view-thread .header{display:grid;grid-gap:1rem;align-items:center;margin-bottom:1rem}.view-thread .header .subject{font-size:1.25rem;font-weight:600;line-height:1.5rem}.view-thread .header .folders{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;overflow-x:auto;gap:1rem}.view-thread .header .folders .folder{padding:0 0.5rem;font-size:0.9rem;color:var(--nylas-color-primary-900);background-color:var(--nylas-color-primary-300)}.view-thread .messages{display:grid;gap:1rem}.view-thread .messages hr{margin:0;width:100%;border:1px solid var(--nylas-color-primary-200)}.view-thread .messages hr:last-of-type{display:none}.view-thread .messages .message{display:grid;grid-auto-flow:row;gap:1rem}.view-thread .messages .message:last-of-type .sub-header{cursor:default}.view-thread .messages .message .sub-header{display:grid;grid-template:"avatar from date buttons" "avatar to to buttons";grid-column-gap:1rem;grid-template-columns:auto 1fr auto auto;cursor:pointer}.view-thread .messages .message .sub-header>*{pointer-events:none}.view-thread .messages .message .sub-header .avatar{grid-area:avatar}.view-thread .messages .message .sub-header .from{grid-area:from}.view-thread .messages .message .sub-header .from span.email{display:none;color:var(--nylas-color-primary-400);font-weight:600}.view-thread .messages .message .sub-header .buttons{grid-area:buttons;align-self:center}.view-thread .messages .message .sub-header .buttons *{pointer-events:all}.view-thread .messages .message .sub-header .date{grid-area:date;align-self:center;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .snippet{width:90%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--nylas-color-primary-600)}.view-thread .messages .message .sub-header .to{grid-area:to;color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to>span{color:var(--nylas-color-primary-400)}.view-thread .messages .message .sub-header .to button{border:0;background-color:transparent;cursor:pointer;pointer-events:all;padding:0;margin:0}.view-thread .messages .message .sub-header .to button>*{pointer-events:none}.view-thread .messages .message .sub-header .to button chevron-icon{display:inline-table;fill:var(--nylas-color-primary-400);width:15px;height:15px;vertical-align:middle}.view-thread .messages .message .sub-header .to button chevron-icon svg{width:15px;height:15px;transform:rotate(90deg)}.view-thread .messages .message .sub-header .to button.expand--showContactData chevron-icon svg{transform:rotate(270deg)}.view-thread .messages .message .address-info{display:grid;column-gap:1rem;row-gap:0.5rem;grid-template-columns:auto 1fr;grid-template-rows:1fr;padding:1rem 2rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-color-primary-200);align-items:flex-start;color:var(--nylas-color-primary-600)}.view-thread .messages .message .address-info .label{color:var(--nylas-color-primary-400);font-weight:600}.show-more{position:relative;display:flex;width:100%}.show-more .sr-only{display:none}.show-more button{position:relative;display:inline-flex;width:100%;padding:0;border:0;background-color:transparent;cursor:pointer;text-align:left;overflow:hidden}.show-more button span{border:1px solid var(--nylas-color-primary-400)}.show-more button:hover span{background-color:var(--nylas-color-primary-700)}.show-more button::after{border-top:1px solid rgba(100, 121, 143, 0.122);border-bottom:1px solid rgba(100, 121, 143, 0.122);content:"";height:4px;width:100%;position:absolute;top:50%}.loading{position:absolute;width:100%;height:100%;background-color:var(--loading__background-color);top:0;bottom:0;left:0;z-index:1;display:grid;justify-content:center;align-items:center;font-weight:600;overflow:hidden}.reply-buttons{display:grid;grid-auto-flow:column;grid-auto-columns:min-content;gap:1rem;margin-top:1rem}.reply-buttons sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}.reply-buttons sp-button:hover{background-color:var(--nylas-color-primary-500)}.reply-buttons sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}.reply-buttons sp-button chevron-icon{display:inline-block}@media only screen and (min-width: 768px){.view-thread .messages .message .sub-header .from span.email{display:inline}}';const g=u;var v=undefined&&undefined.__decorate||function(e,s,a,t){var r=arguments.length,o=r<3?s:t===null?t=Object.getOwnPropertyDescriptor(s,a):t,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,s,a,t);else for(var n=e.length-1;n>=0;n--)if(i=e[n])o=(r<3?i(o):r>3?i(s,a,o):i(s,a))||o;return r>3&&o&&Object.defineProperty(s,a,o),o};var y=undefined&&undefined.__metadata||function(e,s){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,s)};const f=class{constructor(e){a(this,e);this.threadSelected=t(this,"threadSelected",7);this.showContactDataClicked=t(this,"showContactDataClicked",7);this.messageClicked=t(this,"messageClicked",7);this.nylasViewEmailElement=null;this.nylasComposerElement=null;this.onShowContactDataClick=e=>{e.stopPropagation();const s=e.target;const a=s.value;const t=this.internalMessages.find((e=>e.data.id===a));if(!t){c(`[nylas-view-thread] Could not find message ${a}`);return}const r=this.showContactDataClicked.emit(t.data);if(!r.defaultPrevented){t.showContactData=!t.showContactData;this.internalMessages=[...this.internalMessages]}c(`[nylas-view-thread] show contact data clicked ${a} ${t.showContactData?"collapsed":"expanded"}`)};this.onMessageClick=e=>{const s=e.target;const a=s.dataset.id;const t=this.internalMessages.find((e=>e.data.id===a));if(!t){c(`[nylas-view-thread] Could not find message ${a}`);return}const r=this.messageClicked.emit(t.data);if(!r.defaultPrevented){if(t.id!==this.internalMessages[this.internalMessages.length-1]?.id){t.collapse=!t.collapse;if(t.collapse){t.showContactData=false}}this.internalMessages=[...this.internalMessages]}c(`[nylas-view-thread] message clicked ${a} ${t.collapse?"collapsed":"expanded"}`)};this.onShowAllEmailsClick=()=>{this.showAllEmails=!this.showAllEmails};this.showComposerClick=()=>{this.showComposer=!this.showComposer};this.draft=undefined;this.thread=undefined;this.messages=[];this.attachments=[];this.state="loading";this.internalMessages=[];this.showAllEmails=false;this.showComposer=false}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){c(`[nylas-view-thread] Component will load`);this.updateInternalMessages(this.messages);const e=this.host.querySelector("template.nylas-view-email");if(!e){c(`[nylas-view-thread] Could not find template`);return}const s=document.importNode(e.content,true);this.nylasViewEmailElement=s.querySelector("nylas-view-email");const a=this.host.querySelector("template.nylas-composer");if(!a){c(`[nylas-view-thread] Could not find composer template`);return}const t=document.importNode(a.content,true);this.nylasComposerElement=t.querySelector("nylas-composer")}async componentDidLoad(){c(`[nylas-view-thread] Component did load`)}async threadChanged(e){c(`[nylas-view-thread] Thread changed`,{thread:e});this.internalMessages=[];const s=this.threadSelected.emit(e);if(!s.defaultPrevented){c(`[nylas-view-thread] Default event not prevented, initializing`)}}updateInternalMessages(e){c(`[nylas-view-thread] Updating internal messages`,{messages:e});const s=e.sort(((e,s)=>e.date>s.date?1:-1)).map(((s,a)=>({id:s.id,data:s,collapse:a===e.length-1?false:true,showContactData:false})));this.internalMessages=s}render(){const a=this.internalMessages.length>2?this.internalMessages[0]:null;const t=this.internalMessages.slice(this.internalMessages.length-2,this.internalMessages.length);const o=this.internalMessages.slice(1,this.internalMessages.length-2);const i=this.internalMessages[this.internalMessages.length-1];return e(r,{key:"37fce5c88e4dd51bf25483afc79bf5db2f347d87"},e("sp-theme",{key:"c24dbf21e87da13a17830535bd8a3d606ffb5332",scale:"medium",color:"dark"},e("div",{key:"0f7f164dd536df8590f3777ddc9cf7304dedb4b6",class:"view-thread"},e("div",{key:"77ee0a83a6920089d9fce0ab026591aa73d3dcae",class:"header"},e("div",{key:"3564d009cc960dc5edd6c7987b36a83d2d9f21b1",class:"subject"},this.thread?.subject),e("div",{key:"4d20704ef845f6cb76ae72db3c31cfe8807eeb59",class:"folders"},this.thread?.folders?.map((s=>e("sp-tag",{size:"s"},h(s.replace("CATEGORY_","").replace("_"," "))))))),e("div",{key:"ea5d194402d32917c235d224e7355413488b5fca",class:"messages"},a&&e(p,{message:a,attachments:this.attachments.filter((e=>e.messageId===a.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}),o.length>0&&this.messages.length>1&&!this.showAllEmails&&t.length>0&&e(s,null,e("div",{class:"show-more"},e("button",{type:"button",onClick:this.onShowAllEmailsClick},e("span",{class:"avatar"},o.length)," ",e("span",{class:"sr-only"},"Show ",o.length," more emails"))),e("hr",null)),o.length>0&&this.showAllEmails&&this.messages.length>2&&o.map((s=>e(p,{message:s,attachments:this.attachments.filter((e=>e.messageId===a?.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement}))),t.length>0&&t.map((s=>e(p,{message:s,attachments:this.attachments.filter((e=>e.messageId===a?.id)),onMessageClick:this.onMessageClick,onShowContactDataClick:this.onShowContactDataClick,parent:this.host,viewEmailElement:this.nylasViewEmailElement,composerElement:this.nylasComposerElement})))),!(this.showComposer&&i)&&e("div",{class:"reply-buttons"},e("sp-button",{variant:"cta",type:"button",onClick:this.showComposerClick},e("span",{slot:"icon"},e("reply-icon",null)),e("span",null,"Reply")),e("sp-button",{variant:"cta",type:"button"},e("span",{slot:"icon"},e("reply-all-icon",null)),e("span",null,"Reply All")),e("sp-button",{variant:"cta",type:"button"},e("span",{slot:"icon"},e("forward-icon",null)),e("span",null,"Forward"))),this.showComposer&&i&&e("div",{class:"composer"},e("nylas-composer",{message:i.data,onClose:this.showComposerClick,onSend:e=>{c(`[nylas-view-thread] Send event`,{message:e.detail.message,replyBody:e.detail.replyBody})}})))))}get host(){return o(this)}static get watchers(){return{thread:["threadChanged"],messages:["updateInternalMessages"]}}};v([i({name:"nylas-view-thread",stateToProps:new Map([["mailbox.selectedThread","thread"],["mailbox.messages","messages"],["mailbox.state","state"]]),eventToProps:{threadSelected:async(e,s)=>{c(`[nylas-view-thread] Nylas init event. Fetching thread messages.`,{event:e});const a=e.detail;if(a&&a.id){await s.messages.getThreadMessages(a.id)}}},fireRegisterEvent:true}),y("design:type",Function),y("design:paramtypes",[]),y("design:returntype",void 0)],f.prototype,"render",null);f.style=g;export{f as nylas_view_thread};
2
+ //# sourceMappingURL=p-5a68368a.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,h as e}from"./p-68c2fadf.js";const s=".sc-bold-icon-h{display:flex}";const o=s;const i=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"b939b233b3fd5b1117e775ac1591015538c370b3",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"7c21770a23aef69e831b7943c0a994a2dc6425c3",d:"M6 4V20M9.5 4H15.5C17.7091 4 19.5 5.79086 19.5 8C19.5 10.2091 17.7091 12 15.5 12H9.5H16.5C18.7091 12 20.5 13.7909 20.5 16C20.5 18.2091 18.7091 20 16.5 20H9.5M9.5 4V20M9.5 4H4M9.5 20H4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=o;const n=".sc-italic-icon-h{display:flex}";const r=n;const c=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"3444bbe19b339e1fa6439bac12bde05840a0bd2d",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"9613cb241e32a1ce6e67857d075db5cfb5a47ba3",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m10 20 4-16m2 0h-4m0 16H8"}))}};c.style=r;const d=".sc-underline-icon-h{display:flex}";const a=d;const h=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"bdd6da9f684060c6a0eef43cad8b24a98f35767c",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"a62d3c3d35196598d3b735ae957333d33da820c6",d:"M19 4V10C19 13.866 15.866 17 12 17C8.13401 17 5 13.866 5 10V4M8.5 4V10C8.5 13.2218 10.6766 15.9352 13.6395 16.7501M4 21H20M3 4L10.5 4M17 4L21 4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};h.style=a;export{i as bold_icon,c as italic_icon,h as underline_icon};
2
- //# sourceMappingURL=p-37f41a90.entry.js.map
1
+ import{r as t,h as e}from"./p-68c2fadf.js";const s=".sc-bold-icon-h{display:flex}";const o=s;const i=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"4debfd77e3b5cc57e084c11396616bf69bd2f167",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"4a0a632271742d95aaf9846a5ee3d99473d15baf",d:"M6 4V20M9.5 4H15.5C17.7091 4 19.5 5.79086 19.5 8C19.5 10.2091 17.7091 12 15.5 12H9.5H16.5C18.7091 12 20.5 13.7909 20.5 16C20.5 18.2091 18.7091 20 16.5 20H9.5M9.5 4V20M9.5 4H4M9.5 20H4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=o;const n=".sc-italic-icon-h{display:flex}";const r=n;const c=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"d29c872f5f7eec6ae31754b9a2a4247c752b9332",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"f1faac562a4ac25da6905a46ce8b988b8d8f38cd",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m10 20 4-16m2 0h-4m0 16H8"}))}};c.style=r;const d=".sc-underline-icon-h{display:flex}";const a=d;const h=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"ba483bc9e22837734d77821b6f42825d4ae4fad0",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"104eb1c8ff94f17d8176bd8ddaabd3742f19d634",d:"M19 4V10C19 13.866 15.866 17 12 17C8.13401 17 5 13.866 5 10V4M8.5 4V10C8.5 13.2218 10.6766 15.9352 13.6395 16.7501M4 21H20M3 4L10.5 4M17 4L21 4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};h.style=a;export{i as bold_icon,c as italic_icon,h as underline_icon};
2
+ //# sourceMappingURL=p-5b965d0d.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,h as a,c as s}from"./p-68c2fadf.js";import{s as r}from"./p-cb9f8627.js";import"./p-cb65c223.js";import"./p-1ffbe196.js";import"./p-02aa5f03.js";const t="button.sc-button-component{display:flex;align-items:center;justify-content:center;gap:0.75rem;height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;font-family:var(--nylas-font-family);font-weight:600}@media screen and (max-width: 768px){button.sc-button-component{width:100%}}button.button-primary.sc-button-component{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer}button.button-primary.sc-button-component:hover{background:var(--nylas-base-600)}button.button-primary.sc-button-component:active{background:var(--nylas-base-800)}button.button-primary.sc-button-component:disabled{background:var(--nylas-base-300);cursor:not-allowed}button.button-basic.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-base-700);background:transparent}button.button-basic.sc-button-component:hover{background:transparent;border-color:var(--nylas-primary)}button.button-basic.sc-button-component:active{background:transparent;border-color:var(--nylas-base-600);border-width:2px}button.button-basic.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}button.button-destructive.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-error);background:transparent}button.button-destructive.sc-button-component:hover{background:transparent;border-color:var(--nylas-error)}button.button-destructive.sc-button-component:active{background:transparent;border-color:var(--nylas-error-pressed);border-width:2px;color:var(--nylas-error-pressed)}button.button-destructive.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}button.button-invisible.sc-button-component{background:transparent;color:var(--nylas-base-800);border:none}button.button-invisible.sc-button-component:hover{background:var(--nylas-base-50);color:var(--nylas-primary)}button.button-invisible.sc-button-component:active{background:var(--nylas-base-50);color:var(--nylas-base-850)}button.button-invisible.sc-button-component:disabled{background:transparent;color:var(--nylas-base-300);cursor:not-allowed}";const n=t;const o=class{constructor(a){e(this,a);this.variant="primary";this.disabled=false;this.type="button";this.clickHandler=undefined;this.mouseOverHandler=undefined;this.mouseOutHandler=undefined;this.focusHandler=undefined;this.blurHandler=undefined}render(){const e=`button-${this.variant}`+(this.disabled?" disabled":"");return a("button",{key:"2fdc560677e5c41b815600fde6f0712b0cd97601",class:e,disabled:this.disabled,type:"type",onClick:this.clickHandler,onMouseOver:this.mouseOverHandler,onMouseOut:this.mouseOutHandler,onFocus:this.focusHandler,onBlur:this.blurHandler},a("slot",{key:"d402c107cc33bd1574da0d1f9c2f2997b67ae4f7"}))}};o.style=n;const i='.checkbox-container{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:flex;flex-direction:column;gap:0.5rem}.checkbox-container p.error{color:var(--nylas-error);font-size:14px;font-weight:400;line-height:20px;font-family:var(--nylas-font-family);margin:0}label{display:flex;align-items:center;font-family:var(--nylas-font-family);cursor:pointer;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label input[type=checkbox]{position:absolute;opacity:0;cursor:pointer}label input[type=checkbox]:focus~.checkmark,label input[type=checkbox]:hover~.checkmark{border-color:var(--nylas-primary)}label input[type=checkbox]:checked~.checkmark{color:var(--nylas-base-0);background:var(--nylas-primary) url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+) 50% 40% no-repeat;border:2px solid var(--nylas-primary)}label .checkmark{border-radius:var(--nylas-border-radius);border:2px solid var(--nylas-base-800);position:absolute;left:0;top:2px;width:18px;height:18px;cursor:pointer;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}label .label{margin-left:32px;font-size:16px;font-weight:400;color:var(--nylas-base-800);line-height:24px}';const l=i;const c=class{constructor(a){e(this,a);this.nylasFormCheckboxToggled=s(this,"nylasFormCheckboxToggled",7);this.name="checkbox";this.checked=false;this.label="";this.required=false;this.isChecked=this.checked;this.error=""}componentWillLoad(){this.isChecked=this.checked}handleBookingFormSubmitted(e){if(this.required&&!this.isChecked){this.error=`${this.label} is required.`;return}if(this.error){e.preventDefault()}}toggleCheck(){this.error="";this.isChecked=!this.isChecked;this.nylasFormCheckboxToggled.emit({checked:this.isChecked,name:this.name,label:this.label})}render(){return a("div",{key:"5dfe9a6d11d0a6885c656d67dbd31e48c8b510a5",class:"checkbox-container"},a("label",{key:"89da435198f18a22bfff46edcec4cfd4f85e2d72"},a("input",{key:"0885f32b1fab0d4c5fb9d0186d405bedc4e778f1",type:"checkbox",name:this.name,checked:this.isChecked,onChange:()=>this.toggleCheck()}),a("span",{key:"9edf1f7060af4f7d7e918a362ecc02ee02279a4c",class:"checkmark"}),a("slot",{key:"8ad1600ebe09366a17c8d32a0a0f68faa3aa34c0",name:"label"},a("span",{key:"93b5b7158e153e58ec0f17c7fa6ddb9ee314a4b4",class:"label"},this.label))),this.error&&a("p",{class:"error"},this.error))}};c.style=l;const b=':host{display:block;height:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0}label .error{color:var(--nylas-error)}.input_wrapper{display:flex;align-items:center;gap:1rem}input[type=text],input[type=email]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;width:-moz-available;width:-webkit-fill-available}input[type=text]:focus,input[type=email]:focus{outline-color:var(--nylas-primary)}input[type=text].error,input[type=email].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=email].error::placeholder{font-weight:400}input[type=text]::placeholder,input[type=email]::placeholder{color:var(--nylas-base-300)}';const d=b;const p={email:/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/,phone_number:/^[0-9]{10}$/};const h={email:"name@example.com",phone_number:"1234567890"};const u=class{constructor(a){e(this,a);this.nylasFormInputChanged=s(this,"nylasFormInputChanged",7);this.name="input";this.defaultValue="";this.label="";this.type="text";this.placeholder=h[this.type];this.required=false;this.readOnly=false;this.autoFocus=false;this.pattern=undefined;this.maxLength=255;this.patternError="";this.value="";this.error=""}handleDefaultValueChange(e){this.value=r(e);if(this.value){this.validatePattern(this.value)}}componentWillLoad(){this.value=r(this.defaultValue);if(this.type!=="text"&&!this.pattern){this.pattern=p[this.type]}if(this.value){this.validatePattern(this.value)}}handleBookingFormSubmitted(e){this.validatePattern(this.value);if(this.error){e.preventDefault()}}handleInput(e){this.error="";this.value=r(e.target.value);this.nylasFormInputChanged.emit({value:this.value,name:this.name,label:this.label,error:this.error,type:this.type})}validatePattern(e){this.error="";if(this.required&&!e){this.error=`${this.label} is required.`;return}if(!this.pattern||!e&&!this.required)return;if(this.pattern.test(e)){this.error=""}else{this.error=`Invalid ${this.label.toLowerCase()} format.`}}render(){return a("label",{key:"df93eb3a02519ac6dac16cecf926d0a3146dd8b8",part:"ic__label",class:{error:!!this.error}},a("p",{key:"dd00b904bccf468b4e39fa484e7af702a996bf67"},a("span",{key:"5ac9a7f7e666ef825dc231465ab11733b0ebf396",class:"label"},this.label),this.required&&a("span",{class:"required"},"*")),a("div",{key:"5f423f2412b64b38d68f60b5cf64d3d0f7d2dcc9",part:"ic__input_wrapper",class:"input_wrapper"},a("input",{key:"1825a3b3067dc0d804a57debec7ed0b740f1ea63",type:"text",name:this.name,part:"ic__input",readOnly:this.readOnly,autoFocus:this.autoFocus,value:this.value,maxLength:this.maxLength,placeholder:this.placeholder,class:{error:!!this.error},onInput:e=>this.handleInput(e)}),a("slot",{key:"8ddb2870be6e915e23a6ae2faf5866cc7db5fa77",name:"additional-input"})),this.error&&a("span",{class:"error help-text"},this.error," ",this.value&&this.patternError!==""?` ${this.patternError}`:""))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};u.style=d;const y='.radio-group{display:flex;flex-direction:column;gap:0.5rem;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.radio-group slot[name=label]{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;font-size:16px}.radio-group slot[name=label].error{color:var(--nylas-error)}.radio-group slot[name=label] span.required{color:var(--nylas-error);padding:0 0.25rem}.radio-group slot[name=label] p{margin:0}.radio-group slot[name=label] p.error{color:var(--nylas-error)}.radio-group slot[name=label] .error{color:var(--nylas-error)}.radio-group span.error{color:var(--nylas-error);font-size:14px;font-weight:400;line-height:20px;font-family:var(--nylas-font-family)}.radio-group label{display:flex;font-family:var(--nylas-font-family);cursor:pointer}.radio-group label .radio-option{display:flex;align-items:flex-start;gap:0.5rem}.radio-group label .radio-option input[type=radio]{cursor:pointer}.radio-group label .radio-option input[type=radio i]{width:20px;height:20px;color:var(--nylas-primary)}.radio-group label .radio-option p{display:flex;flex-direction:column;gap:0.5rem;margin:0}.radio-group label .radio-option p .title{font-size:16px;font-weight:500;line-height:20px;color:var(--nylas-base-800)}.radio-group label .radio-option p .description{font-size:14px;font-weight:400;line-height:20px;color:var(--nylas-base-600)}';const f=y;const m=class{constructor(a){e(this,a);this.nylasFormRadioChanged=s(this,"nylasFormRadioChanged",7);this.name="radio-group";this.options=[];this.defaultSelectedValue="";this.label=undefined;this.required=false;this.selectedValue=this.defaultSelectedValue;this.error=""}handleBookingFormSubmitted(e){if(this.required&&!this.selectedValue){this.error=`${this.label} is required.`;return}if(this.error){e.preventDefault()}}handleChange(e){this.error="";this.selectedValue=e;this.nylasFormRadioChanged.emit({value:e,name:this.name,label:this.label})}render(){return a("div",{key:"7e3e74aaa010b2fa1954e684d0fad46bce869521",class:"radio-group"},a("slot",{key:"561aea2e183915fa27362a3e76afc1a7f8028bd6",name:"label"},this.label&&a("p",{class:{error:!!this.error}},a("span",{class:"label"},this.label),this.required&&a("span",{class:"required"},"*"))),this.options.map((e=>a("label",null,a("div",{class:"radio-option"},a("input",{type:"radio",name:this.name,value:e.value,checked:this.selectedValue===e.value,onChange:()=>this.handleChange(e.value)}),a("p",null,a("span",{class:"title"},e.label),a("span",{class:"description"},e.description)))))),this.error&&a("span",{class:"error help-text"},this.error))}};m.style=f;export{o as button_component,c as checkbox_component,u as input_component,m as radio_button_group};
2
+ //# sourceMappingURL=p-5e1cd3c1.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["buttonComponentCss","ButtonComponentStyle0","ButtonComponent","render","className","this","variant","disabled","h","key","class","type","onClick","clickHandler","onMouseOver","mouseOverHandler","onMouseOut","mouseOutHandler","onFocus","focusHandler","onBlur","blurHandler","checkboxComponentCss","CheckboxComponentStyle0","CheckboxComponent","checked","componentWillLoad","isChecked","handleBookingFormSubmitted","event","required","error","label","preventDefault","toggleCheck","nylasFormCheckboxToggled","emit","name","onChange","inputComponentCss","InputComponentStyle0","DefaultPattern","email","phone_number","DefaultPlaceholder","InputComponent","handleDefaultValueChange","newValue","value","sanitizeHtml","validatePattern","defaultValue","pattern","handleInput","e","target","nylasFormInputChanged","test","toLowerCase","part","readOnly","autoFocus","maxLength","placeholder","onInput","patternError","radioButtonGroupCss","RadioButtonGroupStyle0","RadioButtonGroup","defaultSelectedValue","selectedValue","handleChange","nylasFormRadioChanged","options","map","option","description"],"sources":["src/components/design-system/button-component/button-component.scss?tag=button-component&encapsulation=scoped","src/components/design-system/button-component/button-component.tsx","src/components/design-system/checkbox-component/checkbox-component.scss?tag=checkbox-component&encapsulation=shadow","src/components/design-system/checkbox-component/checkbox-component.tsx","src/components/design-system/input-component/input-component.scss?tag=input-component&encapsulation=shadow","src/components/design-system/input-component/input-component.tsx","src/components/design-system/radio-button-group/radio-button-group.scss?tag=radio-button-group&encapsulation=shadow","src/components/design-system/radio-button-group/radio-button-group.tsx"],"sourcesContent":["@import '../../../common/mixins/buttons.scss';\n@import '../../../common/styles/variables.scss';\n\nbutton {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.75rem;\n height: 48px;\n border: none;\n border-radius: var(--nylas-border-radius-2x);\n font-size: 1rem;\n line-height: 24px;\n padding: 0 1rem;\n cursor: pointer;\n font-family: var(--nylas-font-family);\n font-weight: 600;\n\n @media #{$mobile} {\n width: 100%;\n }\n\n &.button-primary {\n @include primary-button;\n }\n\n &.button-basic {\n border: 1px solid var(--nylas-base-300);\n color: var(--nylas-base-700);\n background: transparent;\n\n &:hover {\n background: transparent;\n border-color: var(--nylas-primary);\n }\n\n &:active {\n background: transparent;\n border-color: var(--nylas-base-600);\n border-width: 2px;\n }\n\n &:disabled {\n background: transparent;\n border-color: var(--nylas-base-300);\n color: var(--nylas-base-300);\n cursor: not-allowed;\n }\n }\n\n &.button-destructive {\n border: 1px solid var(--nylas-base-300);\n color: var(--nylas-error);\n background: transparent;\n\n &:hover {\n background: transparent;\n border-color: var(--nylas-error);\n }\n\n &:active {\n background: transparent;\n border-color: var(--nylas-error-pressed);\n border-width: 2px;\n color: var(--nylas-error-pressed);\n }\n\n &:disabled {\n background: transparent;\n border-color: var(--nylas-base-300);\n color: var(--nylas-base-300);\n cursor: not-allowed;\n }\n }\n\n &.button-invisible {\n background: transparent;\n color: var(--nylas-base-800);\n border: none;\n\n &:hover {\n background: var(--nylas-base-50);\n color: var(--nylas-primary);\n }\n\n &:active {\n background: var(--nylas-base-50);\n color: var(--nylas-base-850);\n }\n\n &:disabled {\n background: transparent;\n color: var(--nylas-base-300);\n cursor: not-allowed;\n }\n }\n}\n","import { Component, Prop, h } from '@stencil/core';\ntype ButtonType = 'primary' | 'basic' | 'destructive' | 'invisible';\n\n@Component({\n tag: 'button-component',\n styleUrl: 'button-component.scss',\n scoped: true,\n})\nexport class ButtonComponent {\n // Define a prop to accept the button type\n @Prop() variant: ButtonType = 'primary';\n\n // Define a prop for disabled state\n @Prop() disabled: boolean = false;\n\n @Prop() type: string = 'button';\n @Prop() clickHandler?: (event: MouseEvent) => void;\n @Prop() mouseOverHandler?: (event: MouseEvent) => void;\n @Prop() mouseOutHandler?: (event: MouseEvent) => void;\n @Prop() focusHandler?: (event: FocusEvent) => void;\n @Prop() blurHandler?: (event: FocusEvent) => void;\n\n render() {\n const className = `button-${this.variant}` + (this.disabled ? ' disabled' : '');\n\n return (\n <button\n class={className}\n disabled={this.disabled}\n type=\"type\"\n onClick={this.clickHandler}\n onMouseOver={this.mouseOverHandler}\n onMouseOut={this.mouseOutHandler}\n onFocus={this.focusHandler}\n onBlur={this.blurHandler}\n >\n <slot></slot>\n </button>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n\n.checkbox-container {\n @include default-css-variables;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n\n p.error {\n color: var(--nylas-error);\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n font-family: var(--nylas-font-family);\n margin: 0;\n }\n}\n\nlabel {\n display: flex;\n align-items: center;\n font-family: var(--nylas-font-family);\n cursor: pointer;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n input[type='checkbox'] {\n position: absolute;\n opacity: 0;\n cursor: pointer;\n\n &:focus ~ .checkmark,\n &:hover ~ .checkmark {\n border-color: var(--nylas-primary);\n }\n\n &:checked ~ .checkmark {\n color: var(--nylas-base-0);\n background: var(--nylas-primary)\n url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8c3ZnIHdpZHRoPSIxMiIgaGVpZ2h0PSI5IiB2aWV3Qm94PSIwIDAgMTIgOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgPHBhdGggZD0iTTQuNTc1IDguOTc3cy0uNDA0LS4wMDctLjUzNi0uMTY1TC4wNTcgNS42NGwuODI5LTEuMjI3TDQuNDcgNy4yNjggMTAuOTIxLjA4NmwuOTIzIDEuMTAzLTYuODYzIDcuNjRjLS4xMzQtLjAwMy0uNDA2LjE0OC0uNDA2LjE0OHoiIGZpbGw9IiNGRkYiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPg0KPC9zdmc+)\n 50% 40% no-repeat;\n border: 2px solid var(--nylas-primary);\n }\n }\n\n .checkmark {\n border-radius: var(--nylas-border-radius);\n border: 2px solid var(--nylas-base-800);\n position: absolute;\n left: 0;\n top: 2px;\n width: 18px;\n height: 18px;\n cursor: pointer;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .label {\n margin-left: 32px;\n font-size: 16px;\n font-weight: 400;\n color: var(--nylas-base-800);\n line-height: 24px;\n }\n}\n","import { Component, h, Prop, State, Event, EventEmitter, Listen } from '@stencil/core';\n\n/**\n * The `checkbox-component` component is a UI component that allows users to select a checkbox.\n * This component is used in the scheduling form to input checkbox type inputs.\n */\n@Component({\n tag: 'checkbox-component',\n styleUrl: 'checkbox-component.scss',\n shadow: true,\n})\nexport class CheckboxComponent {\n /**\n * The name of the checkbox. This is used to identify the checkbox when submitting a form.\n */\n @Prop() name: string = 'checkbox';\n /**\n * The default value of the checkbox. This is the value that is displayed when the checkbox is rendered.\n */\n @Prop() checked: boolean = false;\n /**\n * The label of the checkbox. This is displayed next to the checkbox.\n */\n @Prop() label: string = '';\n /**\n * Whether the checkbox is required. If true, the checkbox must be checked when submitting a form.\n * Default is false. If the checkbox is required and not checked, an error message is displayed.\n */\n @Prop() required: boolean = false;\n /**\n * The checked state of the checkbox.\n */\n @State() isChecked: boolean = this.checked;\n /**\n * The error message state.\n */\n @State() error: string = '';\n\n /**\n * This event is fired when the checkbox is toggled.\n */\n @Event() nylasFormCheckboxToggled!: EventEmitter<{\n checked: boolean;\n name: string;\n label: string;\n }>;\n\n // Lifecycle events\n componentWillLoad() {\n this.isChecked = this.checked;\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n if (this.required && !this.isChecked) {\n this.error = `${this.label} is required.`;\n return;\n }\n if (this.error) {\n event.preventDefault();\n }\n }\n\n // Methods\n toggleCheck() {\n this.error = '';\n this.isChecked = !this.isChecked;\n this.nylasFormCheckboxToggled.emit({\n checked: this.isChecked,\n name: this.name,\n label: this.label,\n });\n }\n\n render() {\n return (\n <div class=\"checkbox-container\">\n <label>\n <input type=\"checkbox\" name={this.name} checked={this.isChecked} onChange={() => this.toggleCheck()} />\n <span class=\"checkmark\"></span>\n <slot name=\"label\">\n <span class=\"label\">{this.label}</span>\n </slot>\n </label>\n {this.error && <p class=\"error\">{this.error}</p>}\n </div>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/inputs.scss';\n\n:host {\n display: block;\n height: auto;\n @include default-css-variables;\n width: 100%;\n}\n\nlabel {\n @include input-label;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n color: var(--nylas-base-800);\n\n p {\n margin: 0;\n }\n\n .error {\n color: var(--nylas-error);\n }\n}\n\n.input_wrapper {\n display: flex;\n align-items: center;\n gap: 1rem;\n}\n\ninput[type='text'],\ninput[type='email'] {\n @include textfield;\n width: -moz-available;\n width: -webkit-fill-available;\n}\n","import { Component, h, Prop, State, Event, EventEmitter, Listen, Watch } from '@stencil/core';\nimport sanitizeHtml from 'sanitize-html';\n\nconst DefaultPattern = {\n email: /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}$/,\n phone_number: /^[0-9]{10}$/,\n};\n\nconst DefaultPlaceholder = {\n email: 'name@example.com',\n phone_number: '1234567890',\n};\n\n/**\n * The `input-component` component is a UI component that allows users to input text, email, or phone number values.\n * This component is used in the scheduling form to input text, email and phone number type inputs.\n */\n\n@Component({\n tag: 'input-component',\n styleUrl: 'input-component.scss',\n shadow: true,\n})\nexport class InputComponent {\n /**\n * The name of the input. This is used to identify the input when submitting a form.\n */\n @Prop() name: string = 'input';\n /**\n * The default value of the input. This is the value that is displayed when the input is rendered.\n */\n @Prop() defaultValue: string = '';\n /**\n * The label of the input. This is displayed above the input.\n */\n @Prop() label: string = '';\n /**\n * The type of the input. This is used to determine the input's behavior.\n * Supported types are 'text', 'email', and 'phone_number'.\n */\n @Prop() type: 'text' | 'email' | 'phone_number' = 'text';\n /**\n * The placeholder of the input. This is displayed when the input is empty.\n */\n @Prop() placeholder: string = DefaultPlaceholder[this.type];\n /**\n * Whether the input is required. If true, the input must have a value when submitting a form.\n * Default is false. If the input is required and the value is empty, an error message is displayed.\n */\n @Prop() required: boolean = false;\n /**\n * Whether the input is read-only. If true, the input cannot be edited.\n * Default is false.\n */\n @Prop() readOnly: boolean = false;\n /**\n * Whether the input should be focused when rendered.\n * Default is false. If true, the input is focused when rendered.\n * Use this to set the focus on the first input in a form.\n */\n @Prop() autoFocus: boolean = false;\n /**\n * The pattern to validate the input value. If the value does not match the pattern, an error message is displayed.\n * Default is null. If the pattern is not set, the pattern is determined by the input type for 'email' and 'phone_number'.\n */\n @Prop() pattern?: RegExp;\n /**\n * The maximum length of the input value. If the value is longer than the maximum length, an error message is displayed.\n * Default is 255.\n */\n @Prop() maxLength: number = 255;\n /**\n * The error message to display when the value does not match the pattern.\n * Default is an empty string. If the value does not match the pattern, the error message is appended to the default error message.\n * For ex: patternError: \"Format: 123-456-7890\" , Default error message: \"Invalid phone number.\"\n * - Error message displayed: \"Invalid phone number. Format: 123-456-7890\"\n */\n @Prop() patternError: string = '';\n\n /**\n * The input value state.\n */\n @State() value: string = '';\n /**\n * The error message state.\n */\n @State() error: string = '';\n\n /**\n * This event is fired when the input value is changed.\n * The scheduling form listens for this event to validate the input value and submit the form.\n * If using outside of the scheduling form, listen for this event to validate the input value\n * and handle the input value change.\n */\n @Event() nylasFormInputChanged!: EventEmitter<{\n value: string;\n name: string;\n label: string;\n type: string;\n error: string;\n }>;\n\n // Lifecycle methods\n @Watch('defaultValue')\n handleDefaultValueChange(newValue: string) {\n this.value = sanitizeHtml(newValue);\n if (this.value) {\n this.validatePattern(this.value);\n }\n }\n\n componentWillLoad() {\n this.value = sanitizeHtml(this.defaultValue);\n if (this.type !== 'text' && !this.pattern) {\n this.pattern = DefaultPattern[this.type];\n }\n\n if (this.value) {\n this.validatePattern(this.value);\n }\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n this.validatePattern(this.value);\n if (this.error) {\n event.preventDefault();\n }\n }\n\n // Methods\n handleInput(e: Event) {\n this.error = '';\n this.value = sanitizeHtml((e.target as HTMLInputElement).value);\n this.nylasFormInputChanged.emit({\n value: this.value,\n name: this.name,\n label: this.label,\n error: this.error,\n type: this.type,\n });\n }\n\n validatePattern(value: string) {\n // Reset error\n this.error = '';\n // Check if the field is required and value is empty\n if (this.required && !value) {\n this.error = `${this.label} is required.`;\n return;\n }\n // Check if value matches pattern\n if (!this.pattern || (!value && !this.required)) return;\n\n if (this.pattern.test(value)) {\n this.error = '';\n } else {\n this.error = `Invalid ${this.label.toLowerCase()} format.`;\n }\n }\n\n render() {\n return (\n <label part=\"ic__label\" class={{ error: !!this.error }}>\n <p>\n <span class=\"label\">{this.label}</span>\n {this.required && <span class=\"required\">*</span>}\n </p>\n <div part=\"ic__input_wrapper\" class=\"input_wrapper\">\n <input\n type=\"text\"\n name={this.name}\n part=\"ic__input\"\n readOnly={this.readOnly}\n autoFocus={this.autoFocus}\n value={this.value}\n maxLength={this.maxLength}\n placeholder={this.placeholder}\n class={{ error: !!this.error }}\n onInput={e => this.handleInput(e)}\n />\n <slot name=\"additional-input\"></slot>\n </div>\n {this.error && (\n <span class=\"error help-text\">\n {this.error} {this.value && this.patternError !== '' ? ` ${this.patternError}` : ''}\n </span>\n )}\n </label>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/inputs.scss';\n\n.radio-group {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n @include default-css-variables;\n\n slot[name='label'] {\n @include input-label;\n font-size: 16px;\n\n p {\n margin: 0;\n\n &.error {\n color: var(--nylas-error);\n }\n }\n\n .error {\n color: var(--nylas-error);\n }\n }\n\n span.error {\n color: var(--nylas-error);\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n font-family: var(--nylas-font-family);\n }\n\n label {\n display: flex;\n\n font-family: var(--nylas-font-family);\n cursor: pointer;\n\n .radio-option {\n display: flex;\n align-items: flex-start;\n gap: 0.5rem;\n\n input[type='radio'] {\n cursor: pointer;\n }\n\n input[type='radio' i] {\n width: 20px;\n height: 20px;\n color: var(--nylas-primary);\n }\n\n p {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n margin: 0;\n\n .title {\n font-size: 16px;\n font-weight: 500;\n line-height: 20px;\n color: var(--nylas-base-800);\n }\n\n .description {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n }\n }\n }\n }\n}\n","// src/components/radio-group/radio-group.tsx\nimport { Component, h, Prop, State, Event, EventEmitter, Listen } from '@stencil/core';\n\n/**\n * The `radio-button-group` component is a UI component that allows users to select a single option from a list of options.\n * This component is used in the scheduling form to input radio button type inputs.\n */\n@Component({\n tag: 'radio-button-group',\n styleUrl: 'radio-button-group.scss',\n shadow: true,\n})\nexport class RadioButtonGroup {\n /**\n * The name of the radio group. This is used to identify the radio group when submitting a form.\n */\n @Prop() name: string = 'radio-group';\n /**\n * The list of options in the radio group.\n * Each option has a label and a value and an optional description.\n */\n @Prop() options: { label: string; value: string; description?: string }[] = [];\n /**\n * The default selected value of the radio group.\n */\n @Prop() defaultSelectedValue: string = '';\n /**\n * The label of the radio group. This is displayed above the radio group.\n * Label is optional. You can also use the slot 'label' to add a label.\n */\n @Prop() label?: string;\n /**\n * Whether the radio group is required. If true, the radio group must have a value when submitting a form.\n * Default is false. If the radio group is required and the value is empty, an error message is displayed.\n */\n @Prop() required: boolean = false;\n /**\n * The selected value of the radio group.\n */\n @State() selectedValue: string = this.defaultSelectedValue;\n /**\n * The error message state.\n */\n @State() error: string = '';\n /**\n * This event is fired when the selected value changes.\n */\n @Event() nylasFormRadioChanged!: EventEmitter<{\n value: string;\n name: string;\n label?: string;\n }>;\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n if (this.required && !this.selectedValue) {\n this.error = `${this.label} is required.`;\n return;\n }\n if (this.error) {\n event.preventDefault();\n }\n }\n\n handleChange(value: string) {\n this.error = '';\n this.selectedValue = value;\n this.nylasFormRadioChanged.emit({\n value,\n name: this.name,\n label: this.label,\n });\n }\n\n render() {\n return (\n <div class=\"radio-group\">\n <slot name=\"label\">\n {this.label && (\n <p class={{ error: !!this.error }}>\n <span class=\"label\">{this.label}</span>\n {this.required && <span class=\"required\">*</span>}\n </p>\n )}\n </slot>\n {this.options.map(option => (\n <label>\n <div class=\"radio-option\">\n <input type=\"radio\" name={this.name} value={option.value} checked={this.selectedValue === option.value} onChange={() => this.handleChange(option.value)} />\n <p>\n <span class=\"title\">{option.label}</span>\n <span class=\"description\">{option.description}</span>\n </p>\n </div>\n </label>\n ))}\n {this.error && <span class=\"error help-text\">{this.error}</span>}\n </div>\n );\n }\n}\n"],"mappings":"8JAAA,MAAMA,EAAqB,y0EAC3B,MAAAC,EAAeD,E,MCOFE,EAAe,M,sCAEI,U,cAGF,M,UAEL,S,kJAOvB,MAAAC,GACE,MAAMC,EAAY,UAAUC,KAAKC,WAAaD,KAAKE,SAAW,YAAc,IAE5E,OACEC,EAAA,UAAAC,IAAA,2CACEC,MAAON,EACPG,SAAUF,KAAKE,SACfI,KAAK,OACLC,QAASP,KAAKQ,aACdC,YAAaT,KAAKU,iBAClBC,WAAYX,KAAKY,gBACjBC,QAASb,KAAKc,aACdC,OAAQf,KAAKgB,aAEbb,EAAA,QAAAC,IAAA,6C,aCpCR,MAAMa,EAAuB,ypEAC7B,MAAAC,EAAeD,E,MCUFE,EAAiB,M,sGAIL,W,aAII,M,WAIH,G,cAKI,M,eAIEnB,KAAKoB,Q,WAIV,E,CAYzB,iBAAAC,GACErB,KAAKsB,UAAYtB,KAAKoB,O,CAQxB,0BAAAG,CAA2BC,GACzB,GAAIxB,KAAKyB,WAAazB,KAAKsB,UAAW,CACpCtB,KAAK0B,MAAQ,GAAG1B,KAAK2B,qBACrB,M,CAEF,GAAI3B,KAAK0B,MAAO,CACdF,EAAMI,gB,EAKV,WAAAC,GACE7B,KAAK0B,MAAQ,GACb1B,KAAKsB,WAAatB,KAAKsB,UACvBtB,KAAK8B,yBAAyBC,KAAK,CACjCX,QAASpB,KAAKsB,UACdU,KAAMhC,KAAKgC,KACXL,MAAO3B,KAAK2B,O,CAIhB,MAAA7B,GACE,OACEK,EAAA,OAAAC,IAAA,2CAAKC,MAAM,sBACTF,EAAA,SAAAC,IAAA,4CACED,EAAA,SAAAC,IAAA,2CAAOE,KAAK,WAAW0B,KAAMhC,KAAKgC,KAAMZ,QAASpB,KAAKsB,UAAWW,SAAU,IAAMjC,KAAK6B,gBACtF1B,EAAA,QAAAC,IAAA,2CAAMC,MAAM,cACZF,EAAA,QAAAC,IAAA,2CAAM4B,KAAK,SACT7B,EAAA,QAAAC,IAAA,2CAAMC,MAAM,SAASL,KAAK2B,SAG7B3B,KAAK0B,OAASvB,EAAA,KAAGE,MAAM,SAASL,KAAK0B,O,aCxF9C,MAAMQ,EAAoB,63DAC1B,MAAAC,EAAeD,ECEf,MAAME,EAAiB,CACrBC,MAAO,kDACPC,aAAc,eAGhB,MAAMC,EAAqB,CACzBF,MAAO,mBACPC,aAAc,c,MAaHE,EAAc,M,gGAIF,Q,kBAIQ,G,WAIP,G,UAK0B,O,iBAIpBD,EAAmBvC,KAAKM,M,cAK1B,M,cAKA,M,eAMC,M,sCAUD,I,kBAOG,G,WAKN,G,WAIA,E,CAkBzB,wBAAAmC,CAAyBC,GACvB1C,KAAK2C,MAAQC,EAAaF,GAC1B,GAAI1C,KAAK2C,MAAO,CACd3C,KAAK6C,gBAAgB7C,KAAK2C,M,EAI9B,iBAAAtB,GACErB,KAAK2C,MAAQC,EAAa5C,KAAK8C,cAC/B,GAAI9C,KAAKM,OAAS,SAAWN,KAAK+C,QAAS,CACzC/C,KAAK+C,QAAUX,EAAepC,KAAKM,K,CAGrC,GAAIN,KAAK2C,MAAO,CACd3C,KAAK6C,gBAAgB7C,KAAK2C,M,EAS9B,0BAAApB,CAA2BC,GACzBxB,KAAK6C,gBAAgB7C,KAAK2C,OAC1B,GAAI3C,KAAK0B,MAAO,CACdF,EAAMI,gB,EAKV,WAAAoB,CAAYC,GACVjD,KAAK0B,MAAQ,GACb1B,KAAK2C,MAAQC,EAAcK,EAAEC,OAA4BP,OACzD3C,KAAKmD,sBAAsBpB,KAAK,CAC9BY,MAAO3C,KAAK2C,MACZX,KAAMhC,KAAKgC,KACXL,MAAO3B,KAAK2B,MACZD,MAAO1B,KAAK0B,MACZpB,KAAMN,KAAKM,M,CAIf,eAAAuC,CAAgBF,GAEd3C,KAAK0B,MAAQ,GAEb,GAAI1B,KAAKyB,WAAakB,EAAO,CAC3B3C,KAAK0B,MAAQ,GAAG1B,KAAK2B,qBACrB,M,CAGF,IAAK3B,KAAK+C,UAAaJ,IAAU3C,KAAKyB,SAAW,OAEjD,GAAIzB,KAAK+C,QAAQK,KAAKT,GAAQ,CAC5B3C,KAAK0B,MAAQ,E,KACR,CACL1B,KAAK0B,MAAQ,WAAW1B,KAAK2B,MAAM0B,uB,EAIvC,MAAAvD,GACE,OACEK,EAAA,SAAAC,IAAA,2CAAOkD,KAAK,YAAYjD,MAAO,CAAEqB,QAAS1B,KAAK0B,QAC7CvB,EAAA,KAAAC,IAAA,4CACED,EAAA,QAAAC,IAAA,2CAAMC,MAAM,SAASL,KAAK2B,OACzB3B,KAAKyB,UAAYtB,EAAA,QAAME,MAAM,YAAU,MAE1CF,EAAA,OAAAC,IAAA,2CAAKkD,KAAK,oBAAoBjD,MAAM,iBAClCF,EAAA,SAAAC,IAAA,2CACEE,KAAK,OACL0B,KAAMhC,KAAKgC,KACXsB,KAAK,YACLC,SAAUvD,KAAKuD,SACfC,UAAWxD,KAAKwD,UAChBb,MAAO3C,KAAK2C,MACZc,UAAWzD,KAAKyD,UAChBC,YAAa1D,KAAK0D,YAClBrD,MAAO,CAAEqB,QAAS1B,KAAK0B,OACvBiC,QAASV,GAAKjD,KAAKgD,YAAYC,KAEjC9C,EAAA,QAAAC,IAAA,2CAAM4B,KAAK,sBAEZhC,KAAK0B,OACJvB,EAAA,QAAME,MAAM,mBACTL,KAAK0B,MAAK,IAAG1B,KAAK2C,OAAS3C,KAAK4D,eAAiB,GAAK,IAAI5D,KAAK4D,eAAiB,I,qFC7L7F,MAAMC,EAAsB,i5DAC5B,MAAAC,EAAeD,E,MCWFE,EAAgB,M,gGAIJ,c,aAKqD,G,0BAIrC,G,mCAUX,M,mBAIK/D,KAAKgE,qB,WAIb,E,CAezB,0BAAAzC,CAA2BC,GACzB,GAAIxB,KAAKyB,WAAazB,KAAKiE,cAAe,CACxCjE,KAAK0B,MAAQ,GAAG1B,KAAK2B,qBACrB,M,CAEF,GAAI3B,KAAK0B,MAAO,CACdF,EAAMI,gB,EAIV,YAAAsC,CAAavB,GACX3C,KAAK0B,MAAQ,GACb1B,KAAKiE,cAAgBtB,EACrB3C,KAAKmE,sBAAsBpC,KAAK,CAC9BY,QACAX,KAAMhC,KAAKgC,KACXL,MAAO3B,KAAK2B,O,CAIhB,MAAA7B,GACE,OACEK,EAAA,OAAAC,IAAA,2CAAKC,MAAM,eACTF,EAAA,QAAAC,IAAA,2CAAM4B,KAAK,SACRhC,KAAK2B,OACJxB,EAAA,KAAGE,MAAO,CAAEqB,QAAS1B,KAAK0B,QACxBvB,EAAA,QAAME,MAAM,SAASL,KAAK2B,OACzB3B,KAAKyB,UAAYtB,EAAA,QAAME,MAAM,YAAU,OAI7CL,KAAKoE,QAAQC,KAAIC,GAChBnE,EAAA,aACEA,EAAA,OAAKE,MAAM,gBACTF,EAAA,SAAOG,KAAK,QAAQ0B,KAAMhC,KAAKgC,KAAMW,MAAO2B,EAAO3B,MAAOvB,QAASpB,KAAKiE,gBAAkBK,EAAO3B,MAAOV,SAAU,IAAMjC,KAAKkE,aAAaI,EAAO3B,SACjJxC,EAAA,SACEA,EAAA,QAAME,MAAM,SAASiE,EAAO3C,OAC5BxB,EAAA,QAAME,MAAM,eAAeiE,EAAOC,kBAKzCvE,KAAK0B,OAASvB,EAAA,QAAME,MAAM,mBAAmBL,KAAK0B,O"}
@@ -1,2 +1,2 @@
1
- import{r as o,h as t,H as n,a as e}from"./p-68c2fadf.js";import{R as a}from"./p-795b324a.js";import{a as r}from"./p-6c11737d.js";import"./p-02aa5f03.js";import"./p-cb65c223.js";const s=":host{display:block}sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}sp-button:hover{background-color:var(--nylas-color-primary-500)}sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}";const i=s;var l=undefined&&undefined.__decorate||function(o,t,n,e){var a=arguments.length,r=a<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,n):e,s;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(o,t,n,e);else for(var i=o.length-1;i>=0;i--)if(s=o[i])r=(a<3?s(r):a>3?s(t,n,r):s(t,n))||r;return a>3&&r&&Object.defineProperty(t,n,r),r};var c=undefined&&undefined.__metadata||function(o,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(o,t)};const d=class{constructor(t){o(this,t);this.onClick=async()=>{const o=this.method;r(`[nylas-mailbox-toolbar-button] onClick`,{method:o,mailboxConnector:this.mailboxConnector});if(this.mailboxConnector&&o){const t=this.callMethod(this.mailboxConnector,o);if(t){await t()}}};this.method=undefined;this.dataState=undefined;this.iconOnly=false;this.mailboxConnector=undefined}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){r(`[nylas-if-state] Component will load`)}async componentDidLoad(){r(`[nylas-if-state] Component did load`)}callMethod(o,t){const n=t.split(".");let e=o;for(const o of n.slice(0,-1)){e=e[o];if(!e){return undefined}}const a=n[n.length-1];const r=e[a];if(typeof r==="function"){return r.bind(e)}return undefined}renderByState(o){return o?t("slot",{name:"loading"},"Loading..."):t("slot",null,"Click")}hasSlot(o){return!!this.host.querySelector(`[slot="${o}"]`)}render(){let o=false;const e=this.mailboxConnector?.nylasMailboxStore;if(typeof e!=="undefined"){const t=String(this.dataState);o=this.dataState?e.get(t)==="loading":false}const a=o?`state-loading`:"state-ready";return t(n,{key:"71a79133adce76f2fa4727c790ad69ad24891eb5"},t("sp-theme",{key:"7880178def0f50d9622967459ed83e62f06e936d",scale:"medium",color:"dark"},t("sp-button",{onClick:this.onClick,disabled:o,key:a,"icon-only":this.iconOnly,label:this.renderByState(o)},this.hasSlot("icon")&&t("div",{slot:"icon",class:"slot"},t("slot",{name:"icon"})),!this.iconOnly&&this.renderByState(o))))}get host(){return e(this)}};l([a({name:"nylas-mailbox-toolbar-button",connectorToProp:"mailboxConnector",fireRegisterEvent:true}),c("design:type",Function),c("design:paramtypes",[]),c("design:returntype",void 0)],d.prototype,"render",null);d.style=i;export{d as nylas_mailbox_toolbar_button};
2
- //# sourceMappingURL=p-34f0d1fe.entry.js.map
1
+ import{r as o,h as t,H as n,a as e}from"./p-68c2fadf.js";import{R as a}from"./p-795b324a.js";import{a as r}from"./p-6c11737d.js";import"./p-02aa5f03.js";import"./p-cb65c223.js";const s=":host{display:block}sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}sp-button:hover{background-color:var(--nylas-color-primary-500)}sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}";const i=s;var l=undefined&&undefined.__decorate||function(o,t,n,e){var a=arguments.length,r=a<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,n):e,s;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(o,t,n,e);else for(var i=o.length-1;i>=0;i--)if(s=o[i])r=(a<3?s(r):a>3?s(t,n,r):s(t,n))||r;return a>3&&r&&Object.defineProperty(t,n,r),r};var c=undefined&&undefined.__metadata||function(o,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(o,t)};const d=class{constructor(t){o(this,t);this.onClick=async()=>{const o=this.method;r(`[nylas-mailbox-toolbar-button] onClick`,{method:o,mailboxConnector:this.mailboxConnector});if(this.mailboxConnector&&o){const t=this.callMethod(this.mailboxConnector,o);if(t){await t()}}};this.method=undefined;this.dataState=undefined;this.iconOnly=false;this.mailboxConnector=undefined}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){r(`[nylas-if-state] Component will load`)}async componentDidLoad(){r(`[nylas-if-state] Component did load`)}callMethod(o,t){const n=t.split(".");let e=o;for(const o of n.slice(0,-1)){e=e[o];if(!e){return undefined}}const a=n[n.length-1];const r=e[a];if(typeof r==="function"){return r.bind(e)}return undefined}renderByState(o){return o?t("slot",{name:"loading"},"Loading..."):t("slot",null,"Click")}hasSlot(o){return!!this.host.querySelector(`[slot="${o}"]`)}render(){let o=false;const e=this.mailboxConnector?.nylasMailboxStore;if(typeof e!=="undefined"){const t=String(this.dataState);o=this.dataState?e.get(t)==="loading":false}const a=o?`state-loading`:"state-ready";return t(n,{key:"ee1f2a55b534efd935a5a9786ac8685b4b38e887"},t("sp-theme",{key:"1f92a2d968e0d4380889344d343a2e7beeb69290",scale:"medium",color:"dark"},t("sp-button",{onClick:this.onClick,disabled:o,key:a,"icon-only":this.iconOnly,label:this.renderByState(o)},this.hasSlot("icon")&&t("div",{slot:"icon",class:"slot"},t("slot",{name:"icon"})),!this.iconOnly&&this.renderByState(o))))}get host(){return e(this)}};l([a({name:"nylas-mailbox-toolbar-button",connectorToProp:"mailboxConnector",fireRegisterEvent:true}),c("design:type",Function),c("design:paramtypes",[]),c("design:returntype",void 0)],d.prototype,"render",null);d.style=i;export{d as nylas_mailbox_toolbar_button};
2
+ //# sourceMappingURL=p-5ff4e63b.entry.js.map