@nylas/web-elements 1.0.0-prealpha1

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 (879) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/_commonjsHelpers-0a7b82d9.js +23 -0
  3. package/dist/cjs/_commonjsHelpers-0a7b82d9.js.map +1 -0
  4. package/dist/cjs/app-globals-d58ac016.js +11 -0
  5. package/dist/cjs/app-globals-d58ac016.js.map +1 -0
  6. package/dist/cjs/archive-icon_7.cjs.entry.js +120 -0
  7. package/dist/cjs/archive-icon_7.cjs.entry.js.map +1 -0
  8. package/dist/cjs/arrow-icon.cjs.entry.js +24 -0
  9. package/dist/cjs/arrow-icon.cjs.entry.js.map +1 -0
  10. package/dist/cjs/bold-icon_3.cjs.entry.js +56 -0
  11. package/dist/cjs/bold-icon_3.cjs.entry.js.map +1 -0
  12. package/dist/cjs/calendar-cancel-icon.cjs.entry.js +24 -0
  13. package/dist/cjs/calendar-cancel-icon.cjs.entry.js.map +1 -0
  14. package/dist/cjs/calendar-check-icon_3.cjs.entry.js +56 -0
  15. package/dist/cjs/calendar-check-icon_3.cjs.entry.js.map +1 -0
  16. package/dist/cjs/calendar-icon.cjs.entry.js +24 -0
  17. package/dist/cjs/calendar-icon.cjs.entry.js.map +1 -0
  18. package/dist/cjs/chevron-icon.cjs.entry.js +24 -0
  19. package/dist/cjs/chevron-icon.cjs.entry.js.map +1 -0
  20. package/dist/cjs/close-icon_2.cjs.entry.js +40 -0
  21. package/dist/cjs/close-icon_2.cjs.entry.js.map +1 -0
  22. package/dist/cjs/document-refresh-icon.cjs.entry.js +24 -0
  23. package/dist/cjs/document-refresh-icon.cjs.entry.js.map +1 -0
  24. package/dist/cjs/duration-18b22d1b.js +84 -0
  25. package/dist/cjs/duration-18b22d1b.js.map +1 -0
  26. package/dist/cjs/elements-b06c817b.js +21585 -0
  27. package/dist/cjs/elements-b06c817b.js.map +1 -0
  28. package/dist/cjs/flow-d922fbd4.js +891 -0
  29. package/dist/cjs/flow-d922fbd4.js.map +1 -0
  30. package/dist/cjs/focus-visible-857fc8f9.js +327 -0
  31. package/dist/cjs/focus-visible-857fc8f9.js.map +1 -0
  32. package/dist/cjs/forward-icon_6.cjs.entry.js +2216 -0
  33. package/dist/cjs/forward-icon_6.cjs.entry.js.map +1 -0
  34. package/dist/cjs/globe-icon.cjs.entry.js +24 -0
  35. package/dist/cjs/globe-icon.cjs.entry.js.map +1 -0
  36. package/dist/cjs/index-34e64e2d.js +2173 -0
  37. package/dist/cjs/index-34e64e2d.js.map +1 -0
  38. package/dist/cjs/index-e869130c.js +198 -0
  39. package/dist/cjs/index-e869130c.js.map +1 -0
  40. package/dist/cjs/index.cjs.js +12 -0
  41. package/dist/cjs/index.cjs.js.map +1 -0
  42. package/dist/cjs/index.es-e78884f5.js +3217 -0
  43. package/dist/cjs/index.es-e78884f5.js.map +1 -0
  44. package/dist/cjs/loader.cjs.js +17 -0
  45. package/dist/cjs/loader.cjs.js.map +1 -0
  46. package/dist/cjs/loading-icon.cjs.entry.js +24 -0
  47. package/dist/cjs/loading-icon.cjs.entry.js.map +1 -0
  48. package/dist/cjs/mailbox-store-0b1636fa.js +529 -0
  49. package/dist/cjs/mailbox-store-0b1636fa.js.map +1 -0
  50. package/dist/cjs/nylas-booked-event-card_9.cjs.entry.js +8127 -0
  51. package/dist/cjs/nylas-booked-event-card_9.cjs.entry.js.map +1 -0
  52. package/dist/cjs/nylas-if-state_3.cjs.entry.js +409 -0
  53. package/dist/cjs/nylas-if-state_3.cjs.entry.js.map +1 -0
  54. package/dist/cjs/nylas-list-folders.cjs.entry.js +120 -0
  55. package/dist/cjs/nylas-list-folders.cjs.entry.js.map +1 -0
  56. package/dist/cjs/nylas-list-threads.cjs.entry.js +89 -0
  57. package/dist/cjs/nylas-list-threads.cjs.entry.js.map +1 -0
  58. package/dist/cjs/nylas-mailbox-pagination.cjs.entry.js +140 -0
  59. package/dist/cjs/nylas-mailbox-pagination.cjs.entry.js.map +1 -0
  60. package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +100 -0
  61. package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js.map +1 -0
  62. package/dist/cjs/nylas-open-hours-picker.cjs.entry.js +333 -0
  63. package/dist/cjs/nylas-open-hours-picker.cjs.entry.js.map +1 -0
  64. package/dist/cjs/nylas-provider.cjs.entry.js +184 -0
  65. package/dist/cjs/nylas-provider.cjs.entry.js.map +1 -0
  66. package/dist/cjs/nylas-scheduler.cjs.entry.js +242 -0
  67. package/dist/cjs/nylas-scheduler.cjs.entry.js.map +1 -0
  68. package/dist/cjs/nylas-threads-refresh.cjs.entry.js +118 -0
  69. package/dist/cjs/nylas-threads-refresh.cjs.entry.js.map +1 -0
  70. package/dist/cjs/nylas-threads-search.cjs.entry.js +84 -0
  71. package/dist/cjs/nylas-threads-search.cjs.entry.js.map +1 -0
  72. package/dist/cjs/nylas-view-thread.cjs.entry.js +234 -0
  73. package/dist/cjs/nylas-view-thread.cjs.entry.js.map +1 -0
  74. package/dist/cjs/nylas-web-elements.cjs.js +27 -0
  75. package/dist/cjs/nylas-web-elements.cjs.js.map +1 -0
  76. package/dist/cjs/play-icon_2.cjs.entry.js +40 -0
  77. package/dist/cjs/play-icon_2.cjs.entry.js.map +1 -0
  78. package/dist/cjs/property-d934a711.js +47 -0
  79. package/dist/cjs/property-d934a711.js.map +1 -0
  80. package/dist/cjs/refresh-icon.cjs.entry.js +24 -0
  81. package/dist/cjs/refresh-icon.cjs.entry.js.map +1 -0
  82. package/dist/cjs/register-component-f76b61a6.js +140 -0
  83. package/dist/cjs/register-component-f76b61a6.js.map +1 -0
  84. package/dist/cjs/scheduler-store-e9822441.js +254 -0
  85. package/dist/cjs/scheduler-store-e9822441.js.map +1 -0
  86. package/dist/cjs/translate-icon.cjs.entry.js +24 -0
  87. package/dist/cjs/translate-icon.cjs.entry.js.map +1 -0
  88. package/dist/cjs/utils-f91d4c73.js +161 -0
  89. package/dist/cjs/utils-f91d4c73.js.map +1 -0
  90. package/dist/collection/assets/icons/chevron.svg +3 -0
  91. package/dist/collection/collection-manifest.json +66 -0
  92. package/dist/collection/common/abstract-provider.js +231 -0
  93. package/dist/collection/common/abstract-provider.js.map +1 -0
  94. package/dist/collection/common/component-types.js +2 -0
  95. package/dist/collection/common/component-types.js.map +1 -0
  96. package/dist/collection/common/constants.js +12 -0
  97. package/dist/collection/common/constants.js.map +1 -0
  98. package/dist/collection/common/global.js +4 -0
  99. package/dist/collection/common/global.js.map +1 -0
  100. package/dist/collection/common/icons/archive.js +63 -0
  101. package/dist/collection/common/icons/archive.js.map +1 -0
  102. package/dist/collection/common/icons/arrow.js +63 -0
  103. package/dist/collection/common/icons/arrow.js.map +1 -0
  104. package/dist/collection/common/icons/bold.js +63 -0
  105. package/dist/collection/common/icons/bold.js.map +1 -0
  106. package/dist/collection/common/icons/calendar-cancel.js +63 -0
  107. package/dist/collection/common/icons/calendar-cancel.js.map +1 -0
  108. package/dist/collection/common/icons/calendar-check.js +63 -0
  109. package/dist/collection/common/icons/calendar-check.js.map +1 -0
  110. package/dist/collection/common/icons/calendar.js +63 -0
  111. package/dist/collection/common/icons/calendar.js.map +1 -0
  112. package/dist/collection/common/icons/checkmark-circle.js +63 -0
  113. package/dist/collection/common/icons/checkmark-circle.js.map +1 -0
  114. package/dist/collection/common/icons/chevron.js +63 -0
  115. package/dist/collection/common/icons/chevron.js.map +1 -0
  116. package/dist/collection/common/icons/close.js +63 -0
  117. package/dist/collection/common/icons/close.js.map +1 -0
  118. package/dist/collection/common/icons/document-refresh.js +63 -0
  119. package/dist/collection/common/icons/document-refresh.js.map +1 -0
  120. package/dist/collection/common/icons/folder.js +63 -0
  121. package/dist/collection/common/icons/folder.js.map +1 -0
  122. package/dist/collection/common/icons/forward.js +63 -0
  123. package/dist/collection/common/icons/forward.js.map +1 -0
  124. package/dist/collection/common/icons/globe.js +63 -0
  125. package/dist/collection/common/icons/globe.js.map +1 -0
  126. package/dist/collection/common/icons/icon.css +3 -0
  127. package/dist/collection/common/icons/inbox.js +63 -0
  128. package/dist/collection/common/icons/inbox.js.map +1 -0
  129. package/dist/collection/common/icons/italic.js +63 -0
  130. package/dist/collection/common/icons/italic.js.map +1 -0
  131. package/dist/collection/common/icons/loading.css +33 -0
  132. package/dist/collection/common/icons/loading.js +63 -0
  133. package/dist/collection/common/icons/loading.js.map +1 -0
  134. package/dist/collection/common/icons/nylas-logo.js +63 -0
  135. package/dist/collection/common/icons/nylas-logo.js.map +1 -0
  136. package/dist/collection/common/icons/people.js +63 -0
  137. package/dist/collection/common/icons/people.js.map +1 -0
  138. package/dist/collection/common/icons/play.js +63 -0
  139. package/dist/collection/common/icons/play.js.map +1 -0
  140. package/dist/collection/common/icons/refresh.js +63 -0
  141. package/dist/collection/common/icons/refresh.js.map +1 -0
  142. package/dist/collection/common/icons/reply-all.js +63 -0
  143. package/dist/collection/common/icons/reply-all.js.map +1 -0
  144. package/dist/collection/common/icons/reply.js +63 -0
  145. package/dist/collection/common/icons/reply.js.map +1 -0
  146. package/dist/collection/common/icons/sent.js +63 -0
  147. package/dist/collection/common/icons/sent.js.map +1 -0
  148. package/dist/collection/common/icons/spam.js +63 -0
  149. package/dist/collection/common/icons/spam.js.map +1 -0
  150. package/dist/collection/common/icons/star.js +63 -0
  151. package/dist/collection/common/icons/star.js.map +1 -0
  152. package/dist/collection/common/icons/stop.js +63 -0
  153. package/dist/collection/common/icons/stop.js.map +1 -0
  154. package/dist/collection/common/icons/translate.js +63 -0
  155. package/dist/collection/common/icons/translate.js.map +1 -0
  156. package/dist/collection/common/icons/trash.js +63 -0
  157. package/dist/collection/common/icons/trash.js.map +1 -0
  158. package/dist/collection/common/icons/underline.js +63 -0
  159. package/dist/collection/common/icons/underline.js.map +1 -0
  160. package/dist/collection/common/icons/warning.js +63 -0
  161. package/dist/collection/common/icons/warning.js.map +1 -0
  162. package/dist/collection/common/mocks/threads.js +57 -0
  163. package/dist/collection/common/mocks/threads.js.map +1 -0
  164. package/dist/collection/common/nylas-theme/index.js +4 -0
  165. package/dist/collection/common/nylas-theme/index.js.map +1 -0
  166. package/dist/collection/common/register-component.js +134 -0
  167. package/dist/collection/common/register-component.js.map +1 -0
  168. package/dist/collection/common/types.js +2 -0
  169. package/dist/collection/common/types.js.map +1 -0
  170. package/dist/collection/components/mailbox/nylas-composer/nylas-composer.css +89 -0
  171. package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +241 -0
  172. package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js.map +1 -0
  173. package/dist/collection/components/mailbox/nylas-composer/test/nylas-composer.e2e.js +10 -0
  174. package/dist/collection/components/mailbox/nylas-composer/test/nylas-composer.e2e.js.map +1 -0
  175. package/dist/collection/components/mailbox/nylas-composer/test/nylas-composer.spec-disabled.js +12 -0
  176. package/dist/collection/components/mailbox/nylas-composer/test/nylas-composer.spec-disabled.js.map +1 -0
  177. package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.css +37 -0
  178. package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +193 -0
  179. package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js.map +1 -0
  180. package/dist/collection/components/mailbox/nylas-list-folders/test/nylas-list-folders.e2e.js +10 -0
  181. package/dist/collection/components/mailbox/nylas-list-folders/test/nylas-list-folders.e2e.js.map +1 -0
  182. package/dist/collection/components/mailbox/nylas-list-folders/test/nylas-list-folders.spec.js +12 -0
  183. package/dist/collection/components/mailbox/nylas-list-folders/test/nylas-list-folders.spec.js.map +1 -0
  184. package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.css +156 -0
  185. package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +218 -0
  186. package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js.map +1 -0
  187. package/dist/collection/components/mailbox/nylas-list-threads/test/nylas-list-threads.e2e.js +22 -0
  188. package/dist/collection/components/mailbox/nylas-list-threads/test/nylas-list-threads.e2e.js.map +1 -0
  189. package/dist/collection/components/mailbox/nylas-list-threads/test/nylas-list-threads.spec.js +25 -0
  190. package/dist/collection/components/mailbox/nylas-list-threads/test/nylas-list-threads.spec.js.map +1 -0
  191. package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.css +3 -0
  192. package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +474 -0
  193. package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js.map +1 -0
  194. package/dist/collection/components/mailbox/nylas-mailbox/test/nylas-mailbox.e2e.js +16 -0
  195. package/dist/collection/components/mailbox/nylas-mailbox/test/nylas-mailbox.e2e.js.map +1 -0
  196. package/dist/collection/components/mailbox/nylas-mailbox/test/nylas-mailbox.spec.js +32 -0
  197. package/dist/collection/components/mailbox/nylas-mailbox/test/nylas-mailbox.spec.js.map +1 -0
  198. package/dist/collection/components/mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.css +55 -0
  199. package/dist/collection/components/mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.js +371 -0
  200. package/dist/collection/components/mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.js.map +1 -0
  201. package/dist/collection/components/mailbox/nylas-mailbox-pagination/test/nylas-mailbox-pagination.e2e.js +10 -0
  202. package/dist/collection/components/mailbox/nylas-mailbox-pagination/test/nylas-mailbox-pagination.e2e.js.map +1 -0
  203. package/dist/collection/components/mailbox/nylas-mailbox-pagination/test/nylas-mailbox-pagination.spec.js +12 -0
  204. package/dist/collection/components/mailbox/nylas-mailbox-pagination/test/nylas-mailbox-pagination.spec.js.map +1 -0
  205. package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.css +18 -0
  206. package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +182 -0
  207. package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js.map +1 -0
  208. package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.css +61 -0
  209. package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +329 -0
  210. package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js.map +1 -0
  211. package/dist/collection/components/mailbox/nylas-summarize-message-button/test/nylas-summarize-message-button.e2e.js +10 -0
  212. package/dist/collection/components/mailbox/nylas-summarize-message-button/test/nylas-summarize-message-button.e2e.js.map +1 -0
  213. package/dist/collection/components/mailbox/nylas-summarize-message-button/test/nylas-summarize-message-button.spec.js +12 -0
  214. package/dist/collection/components/mailbox/nylas-summarize-message-button/test/nylas-summarize-message-button.spec.js.map +1 -0
  215. package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.css +53 -0
  216. package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +172 -0
  217. package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js.map +1 -0
  218. package/dist/collection/components/mailbox/nylas-threads-refresh/test/nylas-threads-refresh.e2e.js +10 -0
  219. package/dist/collection/components/mailbox/nylas-threads-refresh/test/nylas-threads-refresh.e2e.js.map +1 -0
  220. package/dist/collection/components/mailbox/nylas-threads-refresh/test/nylas-threads-refresh.spec.js +12 -0
  221. package/dist/collection/components/mailbox/nylas-threads-refresh/test/nylas-threads-refresh.spec.js.map +1 -0
  222. package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.css +8 -0
  223. package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +130 -0
  224. package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js.map +1 -0
  225. package/dist/collection/components/mailbox/nylas-threads-search/test/nylas-threads-search.e2e.js +10 -0
  226. package/dist/collection/components/mailbox/nylas-threads-search/test/nylas-threads-search.e2e.js.map +1 -0
  227. package/dist/collection/components/mailbox/nylas-threads-search/test/nylas-threads-search.spec.js +12 -0
  228. package/dist/collection/components/mailbox/nylas-threads-search/test/nylas-threads-search.spec.js.map +1 -0
  229. package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.css +43 -0
  230. package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +282 -0
  231. package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js.map +1 -0
  232. package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.css +243 -0
  233. package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js +342 -0
  234. package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js.map +1 -0
  235. package/dist/collection/components/mailbox/nylas-view-thread/view-thread-message.js +25 -0
  236. package/dist/collection/components/mailbox/nylas-view-thread/view-thread-message.js.map +1 -0
  237. package/dist/collection/components/nylas-if-state/nylas-if-state.css +84 -0
  238. package/dist/collection/components/nylas-if-state/nylas-if-state.js +241 -0
  239. package/dist/collection/components/nylas-if-state/nylas-if-state.js.map +1 -0
  240. package/dist/collection/components/nylas-if-state/test/nylas-if-state.e2e.js +10 -0
  241. package/dist/collection/components/nylas-if-state/test/nylas-if-state.e2e.js.map +1 -0
  242. package/dist/collection/components/nylas-if-state/test/nylas-if-state.spec.js +12 -0
  243. package/dist/collection/components/nylas-if-state/test/nylas-if-state.spec.js.map +1 -0
  244. package/dist/collection/components/nylas-login/nylas-login.css +94 -0
  245. package/dist/collection/components/nylas-login/nylas-login.js +289 -0
  246. package/dist/collection/components/nylas-login/nylas-login.js.map +1 -0
  247. package/dist/collection/components/nylas-login/test/nylas-login.e2e.js +10 -0
  248. package/dist/collection/components/nylas-login/test/nylas-login.e2e.js.map +1 -0
  249. package/dist/collection/components/nylas-login/test/nylas-login.spec.js +12 -0
  250. package/dist/collection/components/nylas-login/test/nylas-login.spec.js.map +1 -0
  251. package/dist/collection/components/nylas-provider/nylas-provider.css +3 -0
  252. package/dist/collection/components/nylas-provider/nylas-provider.js +423 -0
  253. package/dist/collection/components/nylas-provider/nylas-provider.js.map +1 -0
  254. package/dist/collection/components/nylas-provider/test/nylas-provider.e2e.js +10 -0
  255. package/dist/collection/components/nylas-provider/test/nylas-provider.e2e.js.map +1 -0
  256. package/dist/collection/components/nylas-provider/test/nylas-provider.spec.js +32 -0
  257. package/dist/collection/components/nylas-provider/test/nylas-provider.spec.js.map +1 -0
  258. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.css +155 -0
  259. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +178 -0
  260. package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -0
  261. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.css +129 -0
  262. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +323 -0
  263. package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -0
  264. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.css +78 -0
  265. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +107 -0
  266. package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js.map +1 -0
  267. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.css +150 -0
  268. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +213 -0
  269. package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -0
  270. package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.css +72 -0
  271. package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.js +147 -0
  272. package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.js.map +1 -0
  273. package/dist/collection/components/scheduler/nylas-notification/nylas-notification.css +63 -0
  274. package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +132 -0
  275. package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js.map +1 -0
  276. package/dist/collection/components/scheduler/nylas-open-hours-picker/nylas-open-hours-picker.css +105 -0
  277. package/dist/collection/components/scheduler/nylas-open-hours-picker/nylas-open-hours-picker.js +460 -0
  278. package/dist/collection/components/scheduler/nylas-open-hours-picker/nylas-open-hours-picker.js.map +1 -0
  279. package/dist/collection/components/scheduler/nylas-open-hours-picker/test/nylas-open-hours-picker.e2e.js +10 -0
  280. package/dist/collection/components/scheduler/nylas-open-hours-picker/test/nylas-open-hours-picker.e2e.js.map +1 -0
  281. package/dist/collection/components/scheduler/nylas-open-hours-picker/test/nylas-open-hours-picker.spec.js +12 -0
  282. package/dist/collection/components/scheduler/nylas-open-hours-picker/test/nylas-open-hours-picker.spec.js.map +1 -0
  283. package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduler.css +182 -0
  284. package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduler.js +533 -0
  285. package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduler.js.map +1 -0
  286. package/dist/collection/components/scheduler/nylas-scheduler/scheduler-view.js +6 -0
  287. package/dist/collection/components/scheduler/nylas-scheduler/scheduler-view.js.map +1 -0
  288. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.css +63 -0
  289. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +150 -0
  290. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js.map +1 -0
  291. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +115 -0
  292. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +311 -0
  293. package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -0
  294. package/dist/collection/connector/connector-interface.js +2 -0
  295. package/dist/collection/connector/connector-interface.js.map +1 -0
  296. package/dist/collection/connector/nylas-connector/index.js +78 -0
  297. package/dist/collection/connector/nylas-connector/index.js.map +1 -0
  298. package/dist/collection/connector/nylas-mailbox-connector/index.js +62 -0
  299. package/dist/collection/connector/nylas-mailbox-connector/index.js.map +1 -0
  300. package/dist/collection/connector/nylas-scheduler-connector/index.js +43 -0
  301. package/dist/collection/connector/nylas-scheduler-connector/index.js.map +1 -0
  302. package/dist/collection/connector/shared/api/auth.js +60 -0
  303. package/dist/collection/connector/shared/api/auth.js.map +1 -0
  304. package/dist/collection/connector/shared/api/folders.js +33 -0
  305. package/dist/collection/connector/shared/api/folders.js.map +1 -0
  306. package/dist/collection/connector/shared/api/messages.js +95 -0
  307. package/dist/collection/connector/shared/api/messages.js.map +1 -0
  308. package/dist/collection/connector/shared/api/scheduler.js +203 -0
  309. package/dist/collection/connector/shared/api/scheduler.js.map +1 -0
  310. package/dist/collection/connector/shared/api/threads.js +165 -0
  311. package/dist/collection/connector/shared/api/threads.js.map +1 -0
  312. package/dist/collection/index.js +4 -0
  313. package/dist/collection/index.js.map +1 -0
  314. package/dist/collection/routers/hash-router.js +109 -0
  315. package/dist/collection/routers/hash-router.js.map +1 -0
  316. package/dist/collection/routers/router-interface.js +2 -0
  317. package/dist/collection/routers/router-interface.js.map +1 -0
  318. package/dist/collection/stores/auth-store.js +18 -0
  319. package/dist/collection/stores/auth-store.js.map +1 -0
  320. package/dist/collection/stores/mailbox-store.js +42 -0
  321. package/dist/collection/stores/mailbox-store.js.map +1 -0
  322. package/dist/collection/stores/scheduler-store.js +44 -0
  323. package/dist/collection/stores/scheduler-store.js.map +1 -0
  324. package/dist/collection/utils/color-utils.js +161 -0
  325. package/dist/collection/utils/color-utils.js.map +1 -0
  326. package/dist/collection/utils/utils.js +157 -0
  327. package/dist/collection/utils/utils.js.map +1 -0
  328. package/dist/collection/utils/utils.spec.js +16 -0
  329. package/dist/collection/utils/utils.spec.js.map +1 -0
  330. package/dist/components/_commonjsHelpers.js +20 -0
  331. package/dist/components/_commonjsHelpers.js.map +1 -0
  332. package/dist/components/archive-icon.d.ts +11 -0
  333. package/dist/components/archive-icon.js +8 -0
  334. package/dist/components/archive-icon.js.map +1 -0
  335. package/dist/components/archive.js +37 -0
  336. package/dist/components/archive.js.map +1 -0
  337. package/dist/components/arrow-icon.d.ts +11 -0
  338. package/dist/components/arrow-icon.js +8 -0
  339. package/dist/components/arrow-icon.js.map +1 -0
  340. package/dist/components/arrow.js +37 -0
  341. package/dist/components/arrow.js.map +1 -0
  342. package/dist/components/assets/chevron.svg +3 -0
  343. package/dist/components/bold-icon.d.ts +11 -0
  344. package/dist/components/bold-icon.js +8 -0
  345. package/dist/components/bold-icon.js.map +1 -0
  346. package/dist/components/bold.js +37 -0
  347. package/dist/components/bold.js.map +1 -0
  348. package/dist/components/calendar-cancel-icon.d.ts +11 -0
  349. package/dist/components/calendar-cancel-icon.js +8 -0
  350. package/dist/components/calendar-cancel-icon.js.map +1 -0
  351. package/dist/components/calendar-cancel.js +37 -0
  352. package/dist/components/calendar-cancel.js.map +1 -0
  353. package/dist/components/calendar-check-icon.d.ts +11 -0
  354. package/dist/components/calendar-check-icon.js +8 -0
  355. package/dist/components/calendar-check-icon.js.map +1 -0
  356. package/dist/components/calendar-check.js +37 -0
  357. package/dist/components/calendar-check.js.map +1 -0
  358. package/dist/components/calendar-icon.d.ts +11 -0
  359. package/dist/components/calendar-icon.js +8 -0
  360. package/dist/components/calendar-icon.js.map +1 -0
  361. package/dist/components/calendar.js +37 -0
  362. package/dist/components/calendar.js.map +1 -0
  363. package/dist/components/checkmark-circle-icon.d.ts +11 -0
  364. package/dist/components/checkmark-circle-icon.js +8 -0
  365. package/dist/components/checkmark-circle-icon.js.map +1 -0
  366. package/dist/components/checkmark-circle.js +37 -0
  367. package/dist/components/checkmark-circle.js.map +1 -0
  368. package/dist/components/chevron-icon.d.ts +11 -0
  369. package/dist/components/chevron-icon.js +8 -0
  370. package/dist/components/chevron-icon.js.map +1 -0
  371. package/dist/components/chevron.js +37 -0
  372. package/dist/components/chevron.js.map +1 -0
  373. package/dist/components/close-icon.d.ts +11 -0
  374. package/dist/components/close-icon.js +8 -0
  375. package/dist/components/close-icon.js.map +1 -0
  376. package/dist/components/close.js +37 -0
  377. package/dist/components/close.js.map +1 -0
  378. package/dist/components/constants.js +7296 -0
  379. package/dist/components/constants.js.map +1 -0
  380. package/dist/components/define-element.js +40 -0
  381. package/dist/components/define-element.js.map +1 -0
  382. package/dist/components/document-refresh-icon.d.ts +11 -0
  383. package/dist/components/document-refresh-icon.js +40 -0
  384. package/dist/components/document-refresh-icon.js.map +1 -0
  385. package/dist/components/duration.js +78 -0
  386. package/dist/components/duration.js.map +1 -0
  387. package/dist/components/elements.js +21583 -0
  388. package/dist/components/elements.js.map +1 -0
  389. package/dist/components/flow.js +888 -0
  390. package/dist/components/flow.js.map +1 -0
  391. package/dist/components/focus-visible.js +325 -0
  392. package/dist/components/focus-visible.js.map +1 -0
  393. package/dist/components/folder-icon.d.ts +11 -0
  394. package/dist/components/folder-icon.js +8 -0
  395. package/dist/components/folder-icon.js.map +1 -0
  396. package/dist/components/folder.js +37 -0
  397. package/dist/components/folder.js.map +1 -0
  398. package/dist/components/forward-icon.d.ts +11 -0
  399. package/dist/components/forward-icon.js +8 -0
  400. package/dist/components/forward-icon.js.map +1 -0
  401. package/dist/components/forward.js +37 -0
  402. package/dist/components/forward.js.map +1 -0
  403. package/dist/components/globe-icon.d.ts +11 -0
  404. package/dist/components/globe-icon.js +8 -0
  405. package/dist/components/globe-icon.js.map +1 -0
  406. package/dist/components/globe.js +37 -0
  407. package/dist/components/globe.js.map +1 -0
  408. package/dist/components/inbox-icon.d.ts +11 -0
  409. package/dist/components/inbox-icon.js +8 -0
  410. package/dist/components/inbox-icon.js.map +1 -0
  411. package/dist/components/inbox.js +37 -0
  412. package/dist/components/inbox.js.map +1 -0
  413. package/dist/components/index.d.ts +33 -0
  414. package/dist/components/index.es.js +3211 -0
  415. package/dist/components/index.es.js.map +1 -0
  416. package/dist/components/index.js +16 -0
  417. package/dist/components/index.js.map +1 -0
  418. package/dist/components/index2.js +196 -0
  419. package/dist/components/index2.js.map +1 -0
  420. package/dist/components/italic-icon.d.ts +11 -0
  421. package/dist/components/italic-icon.js +8 -0
  422. package/dist/components/italic-icon.js.map +1 -0
  423. package/dist/components/italic.js +37 -0
  424. package/dist/components/italic.js.map +1 -0
  425. package/dist/components/loading-icon.d.ts +11 -0
  426. package/dist/components/loading-icon.js +8 -0
  427. package/dist/components/loading-icon.js.map +1 -0
  428. package/dist/components/loading.js +38 -0
  429. package/dist/components/loading.js.map +1 -0
  430. package/dist/components/mailbox-store.js +521 -0
  431. package/dist/components/mailbox-store.js.map +1 -0
  432. package/dist/components/nylas-booked-event-card.d.ts +11 -0
  433. package/dist/components/nylas-booked-event-card.js +8 -0
  434. package/dist/components/nylas-booked-event-card.js.map +1 -0
  435. package/dist/components/nylas-booked-event-card2.js +121 -0
  436. package/dist/components/nylas-booked-event-card2.js.map +1 -0
  437. package/dist/components/nylas-booking-form.d.ts +11 -0
  438. package/dist/components/nylas-booking-form.js +8 -0
  439. package/dist/components/nylas-booking-form.js.map +1 -0
  440. package/dist/components/nylas-booking-form2.js +224 -0
  441. package/dist/components/nylas-booking-form2.js.map +1 -0
  442. package/dist/components/nylas-cancelled-event-card.d.ts +11 -0
  443. package/dist/components/nylas-cancelled-event-card.js +8 -0
  444. package/dist/components/nylas-cancelled-event-card.js.map +1 -0
  445. package/dist/components/nylas-cancelled-event-card2.js +85 -0
  446. package/dist/components/nylas-cancelled-event-card2.js.map +1 -0
  447. package/dist/components/nylas-composer.d.ts +11 -0
  448. package/dist/components/nylas-composer.js +8 -0
  449. package/dist/components/nylas-composer.js.map +1 -0
  450. package/dist/components/nylas-composer2.js +186 -0
  451. package/dist/components/nylas-composer2.js.map +1 -0
  452. package/dist/components/nylas-date-picker.d.ts +11 -0
  453. package/dist/components/nylas-date-picker.js +8 -0
  454. package/dist/components/nylas-date-picker.js.map +1 -0
  455. package/dist/components/nylas-date-picker2.js +150 -0
  456. package/dist/components/nylas-date-picker2.js.map +1 -0
  457. package/dist/components/nylas-if-state.d.ts +11 -0
  458. package/dist/components/nylas-if-state.js +153 -0
  459. package/dist/components/nylas-if-state.js.map +1 -0
  460. package/dist/components/nylas-list-folders.d.ts +11 -0
  461. package/dist/components/nylas-list-folders.js +183 -0
  462. package/dist/components/nylas-list-folders.js.map +1 -0
  463. package/dist/components/nylas-list-threads.d.ts +11 -0
  464. package/dist/components/nylas-list-threads.js +109 -0
  465. package/dist/components/nylas-list-threads.js.map +1 -0
  466. package/dist/components/nylas-locale-switch.d.ts +11 -0
  467. package/dist/components/nylas-locale-switch.js +8 -0
  468. package/dist/components/nylas-locale-switch.js.map +1 -0
  469. package/dist/components/nylas-locale-switch2.js +103 -0
  470. package/dist/components/nylas-locale-switch2.js.map +1 -0
  471. package/dist/components/nylas-login.d.ts +11 -0
  472. package/dist/components/nylas-login.js +127 -0
  473. package/dist/components/nylas-login.js.map +1 -0
  474. package/dist/components/nylas-logo.d.ts +11 -0
  475. package/dist/components/nylas-logo.js +8 -0
  476. package/dist/components/nylas-logo.js.map +1 -0
  477. package/dist/components/nylas-logo2.js +37 -0
  478. package/dist/components/nylas-logo2.js.map +1 -0
  479. package/dist/components/nylas-mailbox-pagination.d.ts +11 -0
  480. package/dist/components/nylas-mailbox-pagination.js +175 -0
  481. package/dist/components/nylas-mailbox-pagination.js.map +1 -0
  482. package/dist/components/nylas-mailbox-toolbar-button.d.ts +11 -0
  483. package/dist/components/nylas-mailbox-toolbar-button.js +119 -0
  484. package/dist/components/nylas-mailbox-toolbar-button.js.map +1 -0
  485. package/dist/components/nylas-mailbox.d.ts +11 -0
  486. package/dist/components/nylas-mailbox.js +219 -0
  487. package/dist/components/nylas-mailbox.js.map +1 -0
  488. package/dist/components/nylas-notification.d.ts +11 -0
  489. package/dist/components/nylas-notification.js +8 -0
  490. package/dist/components/nylas-notification.js.map +1 -0
  491. package/dist/components/nylas-notification2.js +90 -0
  492. package/dist/components/nylas-notification2.js.map +1 -0
  493. package/dist/components/nylas-open-hours-picker.d.ts +11 -0
  494. package/dist/components/nylas-open-hours-picker.js +365 -0
  495. package/dist/components/nylas-open-hours-picker.js.map +1 -0
  496. package/dist/components/nylas-provider.d.ts +11 -0
  497. package/dist/components/nylas-provider.js +206 -0
  498. package/dist/components/nylas-provider.js.map +1 -0
  499. package/dist/components/nylas-scheduler.d.ts +11 -0
  500. package/dist/components/nylas-scheduler.js +392 -0
  501. package/dist/components/nylas-scheduler.js.map +1 -0
  502. package/dist/components/nylas-selected-event-card.d.ts +11 -0
  503. package/dist/components/nylas-selected-event-card.js +8 -0
  504. package/dist/components/nylas-selected-event-card.js.map +1 -0
  505. package/dist/components/nylas-selected-event-card2.js +110 -0
  506. package/dist/components/nylas-selected-event-card2.js.map +1 -0
  507. package/dist/components/nylas-summarize-message-button.d.ts +11 -0
  508. package/dist/components/nylas-summarize-message-button.js +8 -0
  509. package/dist/components/nylas-summarize-message-button.js.map +1 -0
  510. package/dist/components/nylas-summarize-message-button2.js +233 -0
  511. package/dist/components/nylas-summarize-message-button2.js.map +1 -0
  512. package/dist/components/nylas-threads-refresh.d.ts +11 -0
  513. package/dist/components/nylas-threads-refresh.js +149 -0
  514. package/dist/components/nylas-threads-refresh.js.map +1 -0
  515. package/dist/components/nylas-threads-search.d.ts +11 -0
  516. package/dist/components/nylas-threads-search.js +103 -0
  517. package/dist/components/nylas-threads-search.js.map +1 -0
  518. package/dist/components/nylas-timeslot-picker.d.ts +11 -0
  519. package/dist/components/nylas-timeslot-picker.js +8 -0
  520. package/dist/components/nylas-timeslot-picker.js.map +1 -0
  521. package/dist/components/nylas-timeslot-picker2.js +174 -0
  522. package/dist/components/nylas-timeslot-picker2.js.map +1 -0
  523. package/dist/components/nylas-view-email.d.ts +11 -0
  524. package/dist/components/nylas-view-email.js +8 -0
  525. package/dist/components/nylas-view-email.js.map +1 -0
  526. package/dist/components/nylas-view-email2.js +1859 -0
  527. package/dist/components/nylas-view-email2.js.map +1 -0
  528. package/dist/components/nylas-view-thread.d.ts +11 -0
  529. package/dist/components/nylas-view-thread.js +338 -0
  530. package/dist/components/nylas-view-thread.js.map +1 -0
  531. package/dist/components/people-icon.d.ts +11 -0
  532. package/dist/components/people-icon.js +8 -0
  533. package/dist/components/people-icon.js.map +1 -0
  534. package/dist/components/people.js +37 -0
  535. package/dist/components/people.js.map +1 -0
  536. package/dist/components/play-icon.d.ts +11 -0
  537. package/dist/components/play-icon.js +8 -0
  538. package/dist/components/play-icon.js.map +1 -0
  539. package/dist/components/play.js +37 -0
  540. package/dist/components/play.js.map +1 -0
  541. package/dist/components/property.js +36 -0
  542. package/dist/components/property.js.map +1 -0
  543. package/dist/components/refresh-icon.d.ts +11 -0
  544. package/dist/components/refresh-icon.js +8 -0
  545. package/dist/components/refresh-icon.js.map +1 -0
  546. package/dist/components/refresh.js +37 -0
  547. package/dist/components/refresh.js.map +1 -0
  548. package/dist/components/register-component.js +138 -0
  549. package/dist/components/register-component.js.map +1 -0
  550. package/dist/components/reply-all-icon.d.ts +11 -0
  551. package/dist/components/reply-all-icon.js +8 -0
  552. package/dist/components/reply-all-icon.js.map +1 -0
  553. package/dist/components/reply-all.js +37 -0
  554. package/dist/components/reply-all.js.map +1 -0
  555. package/dist/components/reply-icon.d.ts +11 -0
  556. package/dist/components/reply-icon.js +8 -0
  557. package/dist/components/reply-icon.js.map +1 -0
  558. package/dist/components/reply.js +37 -0
  559. package/dist/components/reply.js.map +1 -0
  560. package/dist/components/scheduler-store.js +251 -0
  561. package/dist/components/scheduler-store.js.map +1 -0
  562. package/dist/components/sent-icon.d.ts +11 -0
  563. package/dist/components/sent-icon.js +8 -0
  564. package/dist/components/sent-icon.js.map +1 -0
  565. package/dist/components/sent.js +37 -0
  566. package/dist/components/sent.js.map +1 -0
  567. package/dist/components/sp-icon-chevron-left.js +23 -0
  568. package/dist/components/sp-icon-chevron-left.js.map +1 -0
  569. package/dist/components/spam-icon.d.ts +11 -0
  570. package/dist/components/spam-icon.js +8 -0
  571. package/dist/components/spam-icon.js.map +1 -0
  572. package/dist/components/spam.js +37 -0
  573. package/dist/components/spam.js.map +1 -0
  574. package/dist/components/star-icon.d.ts +11 -0
  575. package/dist/components/star-icon.js +8 -0
  576. package/dist/components/star-icon.js.map +1 -0
  577. package/dist/components/star.js +37 -0
  578. package/dist/components/star.js.map +1 -0
  579. package/dist/components/stop-icon.d.ts +11 -0
  580. package/dist/components/stop-icon.js +8 -0
  581. package/dist/components/stop-icon.js.map +1 -0
  582. package/dist/components/stop.js +37 -0
  583. package/dist/components/stop.js.map +1 -0
  584. package/dist/components/translate-icon.d.ts +11 -0
  585. package/dist/components/translate-icon.js +8 -0
  586. package/dist/components/translate-icon.js.map +1 -0
  587. package/dist/components/translate.js +37 -0
  588. package/dist/components/translate.js.map +1 -0
  589. package/dist/components/trash-icon.d.ts +11 -0
  590. package/dist/components/trash-icon.js +8 -0
  591. package/dist/components/trash-icon.js.map +1 -0
  592. package/dist/components/trash.js +37 -0
  593. package/dist/components/trash.js.map +1 -0
  594. package/dist/components/underline-icon.d.ts +11 -0
  595. package/dist/components/underline-icon.js +8 -0
  596. package/dist/components/underline-icon.js.map +1 -0
  597. package/dist/components/underline.js +37 -0
  598. package/dist/components/underline.js.map +1 -0
  599. package/dist/components/utils.js +140 -0
  600. package/dist/components/utils.js.map +1 -0
  601. package/dist/components/warning-icon.d.ts +11 -0
  602. package/dist/components/warning-icon.js +8 -0
  603. package/dist/components/warning-icon.js.map +1 -0
  604. package/dist/components/warning.js +37 -0
  605. package/dist/components/warning.js.map +1 -0
  606. package/dist/esm/_commonjsHelpers-57e89916.js +20 -0
  607. package/dist/esm/_commonjsHelpers-57e89916.js.map +1 -0
  608. package/dist/esm/app-globals-47969cee.js +9 -0
  609. package/dist/esm/app-globals-47969cee.js.map +1 -0
  610. package/dist/esm/archive-icon_7.entry.js +110 -0
  611. package/dist/esm/archive-icon_7.entry.js.map +1 -0
  612. package/dist/esm/arrow-icon.entry.js +20 -0
  613. package/dist/esm/arrow-icon.entry.js.map +1 -0
  614. package/dist/esm/bold-icon_3.entry.js +50 -0
  615. package/dist/esm/bold-icon_3.entry.js.map +1 -0
  616. package/dist/esm/calendar-cancel-icon.entry.js +20 -0
  617. package/dist/esm/calendar-cancel-icon.entry.js.map +1 -0
  618. package/dist/esm/calendar-check-icon_3.entry.js +50 -0
  619. package/dist/esm/calendar-check-icon_3.entry.js.map +1 -0
  620. package/dist/esm/calendar-icon.entry.js +20 -0
  621. package/dist/esm/calendar-icon.entry.js.map +1 -0
  622. package/dist/esm/chevron-icon.entry.js +20 -0
  623. package/dist/esm/chevron-icon.entry.js.map +1 -0
  624. package/dist/esm/close-icon_2.entry.js +35 -0
  625. package/dist/esm/close-icon_2.entry.js.map +1 -0
  626. package/dist/esm/document-refresh-icon.entry.js +20 -0
  627. package/dist/esm/document-refresh-icon.entry.js.map +1 -0
  628. package/dist/esm/duration-bddc4a13.js +78 -0
  629. package/dist/esm/duration-bddc4a13.js.map +1 -0
  630. package/dist/esm/elements-60ebdb01.js +21583 -0
  631. package/dist/esm/elements-60ebdb01.js.map +1 -0
  632. package/dist/esm/flow-40ff9cea.js +888 -0
  633. package/dist/esm/flow-40ff9cea.js.map +1 -0
  634. package/dist/esm/focus-visible-e8093c16.js +325 -0
  635. package/dist/esm/focus-visible-e8093c16.js.map +1 -0
  636. package/dist/esm/forward-icon_6.entry.js +2207 -0
  637. package/dist/esm/forward-icon_6.entry.js.map +1 -0
  638. package/dist/esm/globe-icon.entry.js +20 -0
  639. package/dist/esm/globe-icon.entry.js.map +1 -0
  640. package/dist/esm/index-2b85580a.js +196 -0
  641. package/dist/esm/index-2b85580a.js.map +1 -0
  642. package/dist/esm/index-b2270b4a.js +2141 -0
  643. package/dist/esm/index-b2270b4a.js.map +1 -0
  644. package/dist/esm/index.es-6f3582a1.js +3211 -0
  645. package/dist/esm/index.es-6f3582a1.js.map +1 -0
  646. package/dist/esm/index.js +8 -0
  647. package/dist/esm/index.js.map +1 -0
  648. package/dist/esm/loader.js +13 -0
  649. package/dist/esm/loader.js.map +1 -0
  650. package/dist/esm/loading-icon.entry.js +20 -0
  651. package/dist/esm/loading-icon.entry.js.map +1 -0
  652. package/dist/esm/mailbox-store-0019772c.js +521 -0
  653. package/dist/esm/mailbox-store-0019772c.js.map +1 -0
  654. package/dist/esm/nylas-booked-event-card_9.entry.js +8115 -0
  655. package/dist/esm/nylas-booked-event-card_9.entry.js.map +1 -0
  656. package/dist/esm/nylas-if-state_3.entry.js +403 -0
  657. package/dist/esm/nylas-if-state_3.entry.js.map +1 -0
  658. package/dist/esm/nylas-list-folders.entry.js +116 -0
  659. package/dist/esm/nylas-list-folders.entry.js.map +1 -0
  660. package/dist/esm/nylas-list-threads.entry.js +85 -0
  661. package/dist/esm/nylas-list-threads.entry.js.map +1 -0
  662. package/dist/esm/nylas-mailbox-pagination.entry.js +136 -0
  663. package/dist/esm/nylas-mailbox-pagination.entry.js.map +1 -0
  664. package/dist/esm/nylas-mailbox-toolbar-button.entry.js +96 -0
  665. package/dist/esm/nylas-mailbox-toolbar-button.entry.js.map +1 -0
  666. package/dist/esm/nylas-open-hours-picker.entry.js +329 -0
  667. package/dist/esm/nylas-open-hours-picker.entry.js.map +1 -0
  668. package/dist/esm/nylas-provider.entry.js +180 -0
  669. package/dist/esm/nylas-provider.entry.js.map +1 -0
  670. package/dist/esm/nylas-scheduler.entry.js +238 -0
  671. package/dist/esm/nylas-scheduler.entry.js.map +1 -0
  672. package/dist/esm/nylas-threads-refresh.entry.js +114 -0
  673. package/dist/esm/nylas-threads-refresh.entry.js.map +1 -0
  674. package/dist/esm/nylas-threads-search.entry.js +80 -0
  675. package/dist/esm/nylas-threads-search.entry.js.map +1 -0
  676. package/dist/esm/nylas-view-thread.entry.js +230 -0
  677. package/dist/esm/nylas-view-thread.entry.js.map +1 -0
  678. package/dist/esm/nylas-web-elements.js +22 -0
  679. package/dist/esm/nylas-web-elements.js.map +1 -0
  680. package/dist/esm/play-icon_2.entry.js +35 -0
  681. package/dist/esm/play-icon_2.entry.js.map +1 -0
  682. package/dist/esm/polyfills/core-js.js +11 -0
  683. package/dist/esm/polyfills/dom.js +79 -0
  684. package/dist/esm/polyfills/es5-html-element.js +1 -0
  685. package/dist/esm/polyfills/index.js +34 -0
  686. package/dist/esm/polyfills/system.js +6 -0
  687. package/dist/esm/property-0065dde7.js +36 -0
  688. package/dist/esm/property-0065dde7.js.map +1 -0
  689. package/dist/esm/refresh-icon.entry.js +20 -0
  690. package/dist/esm/refresh-icon.entry.js.map +1 -0
  691. package/dist/esm/register-component-55376f31.js +138 -0
  692. package/dist/esm/register-component-55376f31.js.map +1 -0
  693. package/dist/esm/scheduler-store-5a39585a.js +251 -0
  694. package/dist/esm/scheduler-store-5a39585a.js.map +1 -0
  695. package/dist/esm/translate-icon.entry.js +20 -0
  696. package/dist/esm/translate-icon.entry.js.map +1 -0
  697. package/dist/esm/utils-5074a070.js +140 -0
  698. package/dist/esm/utils-5074a070.js.map +1 -0
  699. package/dist/index.cjs.js +1 -0
  700. package/dist/index.js +1 -0
  701. package/dist/nylas-web-elements/index.esm.js +2 -0
  702. package/dist/nylas-web-elements/index.esm.js.map +1 -0
  703. package/dist/nylas-web-elements/nylas-web-elements.css +239 -0
  704. package/dist/nylas-web-elements/nylas-web-elements.esm.js +2 -0
  705. package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -0
  706. package/dist/nylas-web-elements/p-06974d68.js +2 -0
  707. package/dist/nylas-web-elements/p-06974d68.js.map +1 -0
  708. package/dist/nylas-web-elements/p-113fe52e.entry.js +2 -0
  709. package/dist/nylas-web-elements/p-113fe52e.entry.js.map +1 -0
  710. package/dist/nylas-web-elements/p-16fb3c85.entry.js +2 -0
  711. package/dist/nylas-web-elements/p-16fb3c85.entry.js.map +1 -0
  712. package/dist/nylas-web-elements/p-24c42c37.entry.js +2 -0
  713. package/dist/nylas-web-elements/p-24c42c37.entry.js.map +1 -0
  714. package/dist/nylas-web-elements/p-2881b62f.js +16519 -0
  715. package/dist/nylas-web-elements/p-2881b62f.js.map +1 -0
  716. package/dist/nylas-web-elements/p-33da6cf1.entry.js +2 -0
  717. package/dist/nylas-web-elements/p-33da6cf1.entry.js.map +1 -0
  718. package/dist/nylas-web-elements/p-37f99b96.entry.js +2 -0
  719. package/dist/nylas-web-elements/p-37f99b96.entry.js.map +1 -0
  720. package/dist/nylas-web-elements/p-3bc3426e.entry.js +2 -0
  721. package/dist/nylas-web-elements/p-3bc3426e.entry.js.map +1 -0
  722. package/dist/nylas-web-elements/p-3c8822f1.entry.js +2 -0
  723. package/dist/nylas-web-elements/p-3c8822f1.entry.js.map +1 -0
  724. package/dist/nylas-web-elements/p-5770704d.js +2 -0
  725. package/dist/nylas-web-elements/p-5770704d.js.map +1 -0
  726. package/dist/nylas-web-elements/p-5862975b.js +2 -0
  727. package/dist/nylas-web-elements/p-5862975b.js.map +1 -0
  728. package/dist/nylas-web-elements/p-647cf7be.entry.js +2 -0
  729. package/dist/nylas-web-elements/p-647cf7be.entry.js.map +1 -0
  730. package/dist/nylas-web-elements/p-663edeb8.entry.js +2 -0
  731. package/dist/nylas-web-elements/p-663edeb8.entry.js.map +1 -0
  732. package/dist/nylas-web-elements/p-67c9158e.entry.js +2 -0
  733. package/dist/nylas-web-elements/p-67c9158e.entry.js.map +1 -0
  734. package/dist/nylas-web-elements/p-6ba7a037.js +2 -0
  735. package/dist/nylas-web-elements/p-6ba7a037.js.map +1 -0
  736. package/dist/nylas-web-elements/p-6da0b8f0.entry.js +2 -0
  737. package/dist/nylas-web-elements/p-6da0b8f0.entry.js.map +1 -0
  738. package/dist/nylas-web-elements/p-6df00ba0.js +27 -0
  739. package/dist/nylas-web-elements/p-6df00ba0.js.map +1 -0
  740. package/dist/nylas-web-elements/p-74141ef6.entry.js +2 -0
  741. package/dist/nylas-web-elements/p-74141ef6.entry.js.map +1 -0
  742. package/dist/nylas-web-elements/p-85d41197.entry.js +2 -0
  743. package/dist/nylas-web-elements/p-85d41197.entry.js.map +1 -0
  744. package/dist/nylas-web-elements/p-97518578.entry.js +2 -0
  745. package/dist/nylas-web-elements/p-97518578.entry.js.map +1 -0
  746. package/dist/nylas-web-elements/p-98ec4a7a.js +2 -0
  747. package/dist/nylas-web-elements/p-98ec4a7a.js.map +1 -0
  748. package/dist/nylas-web-elements/p-998d25d5.entry.js +2 -0
  749. package/dist/nylas-web-elements/p-998d25d5.entry.js.map +1 -0
  750. package/dist/nylas-web-elements/p-a7bfd3af.entry.js +77 -0
  751. package/dist/nylas-web-elements/p-a7bfd3af.entry.js.map +1 -0
  752. package/dist/nylas-web-elements/p-a95208c7.js +2 -0
  753. package/dist/nylas-web-elements/p-a95208c7.js.map +1 -0
  754. package/dist/nylas-web-elements/p-adacdaeb.entry.js +2 -0
  755. package/dist/nylas-web-elements/p-adacdaeb.entry.js.map +1 -0
  756. package/dist/nylas-web-elements/p-b7d4b7b5.entry.js +2 -0
  757. package/dist/nylas-web-elements/p-b7d4b7b5.entry.js.map +1 -0
  758. package/dist/nylas-web-elements/p-b85dfeac.entry.js +2 -0
  759. package/dist/nylas-web-elements/p-b85dfeac.entry.js.map +1 -0
  760. package/dist/nylas-web-elements/p-b96b37f1.entry.js +2 -0
  761. package/dist/nylas-web-elements/p-b96b37f1.entry.js.map +1 -0
  762. package/dist/nylas-web-elements/p-c2e69618.entry.js +2 -0
  763. package/dist/nylas-web-elements/p-c2e69618.entry.js.map +1 -0
  764. package/dist/nylas-web-elements/p-c440f148.entry.js +2 -0
  765. package/dist/nylas-web-elements/p-c440f148.entry.js.map +1 -0
  766. package/dist/nylas-web-elements/p-c66e27d0.js +3 -0
  767. package/dist/nylas-web-elements/p-c66e27d0.js.map +1 -0
  768. package/dist/nylas-web-elements/p-c685e944.entry.js +3 -0
  769. package/dist/nylas-web-elements/p-c685e944.entry.js.map +1 -0
  770. package/dist/nylas-web-elements/p-cb65c223.js +2 -0
  771. package/dist/nylas-web-elements/p-cb65c223.js.map +1 -0
  772. package/dist/nylas-web-elements/p-cc21d351.js +17 -0
  773. package/dist/nylas-web-elements/p-cc21d351.js.map +1 -0
  774. package/dist/nylas-web-elements/p-d4b1e3e4.entry.js +2 -0
  775. package/dist/nylas-web-elements/p-d4b1e3e4.entry.js.map +1 -0
  776. package/dist/nylas-web-elements/p-db24cc70.entry.js +2 -0
  777. package/dist/nylas-web-elements/p-db24cc70.entry.js.map +1 -0
  778. package/dist/nylas-web-elements/p-de1bcc4a.js +2 -0
  779. package/dist/nylas-web-elements/p-de1bcc4a.js.map +1 -0
  780. package/dist/nylas-web-elements/p-df9f71ea.js +2 -0
  781. package/dist/nylas-web-elements/p-df9f71ea.js.map +1 -0
  782. package/dist/nylas-web-elements/p-eeb0a591.js +2 -0
  783. package/dist/nylas-web-elements/p-eeb0a591.js.map +1 -0
  784. package/dist/nylas-web-elements/p-f029c1b7.entry.js +2 -0
  785. package/dist/nylas-web-elements/p-f029c1b7.entry.js.map +1 -0
  786. package/dist/nylas-web-elements/p-f9a4758a.entry.js +2 -0
  787. package/dist/nylas-web-elements/p-f9a4758a.entry.js.map +1 -0
  788. package/dist/types/common/abstract-provider.d.ts +52 -0
  789. package/dist/types/common/component-types.d.ts +22 -0
  790. package/dist/types/common/constants.d.ts +6 -0
  791. package/dist/types/common/global.d.ts +1 -0
  792. package/dist/types/common/icons/archive.d.ts +5 -0
  793. package/dist/types/common/icons/arrow.d.ts +5 -0
  794. package/dist/types/common/icons/bold.d.ts +5 -0
  795. package/dist/types/common/icons/calendar-cancel.d.ts +5 -0
  796. package/dist/types/common/icons/calendar-check.d.ts +5 -0
  797. package/dist/types/common/icons/calendar.d.ts +5 -0
  798. package/dist/types/common/icons/checkmark-circle.d.ts +5 -0
  799. package/dist/types/common/icons/chevron.d.ts +5 -0
  800. package/dist/types/common/icons/close.d.ts +5 -0
  801. package/dist/types/common/icons/document-refresh.d.ts +5 -0
  802. package/dist/types/common/icons/folder.d.ts +5 -0
  803. package/dist/types/common/icons/forward.d.ts +5 -0
  804. package/dist/types/common/icons/globe.d.ts +5 -0
  805. package/dist/types/common/icons/inbox.d.ts +5 -0
  806. package/dist/types/common/icons/italic.d.ts +5 -0
  807. package/dist/types/common/icons/loading.d.ts +5 -0
  808. package/dist/types/common/icons/nylas-logo.d.ts +5 -0
  809. package/dist/types/common/icons/people.d.ts +5 -0
  810. package/dist/types/common/icons/play.d.ts +5 -0
  811. package/dist/types/common/icons/refresh.d.ts +5 -0
  812. package/dist/types/common/icons/reply-all.d.ts +5 -0
  813. package/dist/types/common/icons/reply.d.ts +5 -0
  814. package/dist/types/common/icons/sent.d.ts +5 -0
  815. package/dist/types/common/icons/spam.d.ts +5 -0
  816. package/dist/types/common/icons/star.d.ts +5 -0
  817. package/dist/types/common/icons/stop.d.ts +5 -0
  818. package/dist/types/common/icons/translate.d.ts +5 -0
  819. package/dist/types/common/icons/trash.d.ts +5 -0
  820. package/dist/types/common/icons/underline.d.ts +5 -0
  821. package/dist/types/common/icons/warning.d.ts +5 -0
  822. package/dist/types/common/mocks/threads.d.ts +3 -0
  823. package/dist/types/common/nylas-theme/index.d.ts +27 -0
  824. package/dist/types/common/register-component.d.ts +29 -0
  825. package/dist/types/common/types.d.ts +108 -0
  826. package/dist/types/components/mailbox/nylas-composer/nylas-composer.d.ts +22 -0
  827. package/dist/types/components/mailbox/nylas-composer/test/nylas-composer.spec-disabled.d.ts +1 -0
  828. package/dist/types/components/mailbox/nylas-list-folders/nylas-list-folders.d.ts +19 -0
  829. package/dist/types/components/mailbox/nylas-list-threads/nylas-list-threads.d.ts +19 -0
  830. package/dist/types/components/mailbox/nylas-mailbox/nylas-mailbox.d.ts +35 -0
  831. package/dist/types/components/mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.d.ts +30 -0
  832. package/dist/types/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.d.ts +26 -0
  833. package/dist/types/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.d.ts +25 -0
  834. package/dist/types/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.d.ts +23 -0
  835. package/dist/types/components/mailbox/nylas-threads-search/nylas-threads-search.d.ts +13 -0
  836. package/dist/types/components/mailbox/nylas-view-email/nylas-view-email.d.ts +25 -0
  837. package/dist/types/components/mailbox/nylas-view-thread/nylas-view-thread.d.ts +30 -0
  838. package/dist/types/components/mailbox/nylas-view-thread/view-thread-message.d.ts +12 -0
  839. package/dist/types/components/nylas-if-state/nylas-if-state.d.ts +22 -0
  840. package/dist/types/components/nylas-login/nylas-login.d.ts +26 -0
  841. package/dist/types/components/nylas-provider/nylas-provider.d.ts +35 -0
  842. package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +22 -0
  843. package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +33 -0
  844. package/dist/types/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.d.ts +13 -0
  845. package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +19 -0
  846. package/dist/types/components/scheduler/nylas-locale-switch/nylas-locale-switch.d.ts +13 -0
  847. package/dist/types/components/scheduler/nylas-notification/nylas-notification.d.ts +13 -0
  848. package/dist/types/components/scheduler/nylas-open-hours-picker/nylas-open-hours-picker.d.ts +40 -0
  849. package/dist/types/components/scheduler/nylas-scheduler/nylas-scheduler.d.ts +41 -0
  850. package/dist/types/components/scheduler/nylas-scheduler/scheduler-view.d.ts +6 -0
  851. package/dist/types/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.d.ts +15 -0
  852. package/dist/types/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.d.ts +28 -0
  853. package/dist/types/components.d.ts +2123 -0
  854. package/dist/types/connector/connector-interface.d.ts +35 -0
  855. package/dist/types/connector/nylas-connector/index.d.ts +59 -0
  856. package/dist/types/connector/nylas-mailbox-connector/index.d.ts +52 -0
  857. package/dist/types/connector/nylas-scheduler-connector/index.d.ts +24 -0
  858. package/dist/types/connector/shared/api/auth.d.ts +13 -0
  859. package/dist/types/connector/shared/api/folders.d.ts +10 -0
  860. package/dist/types/connector/shared/api/messages.d.ts +13 -0
  861. package/dist/types/connector/shared/api/scheduler.d.ts +29 -0
  862. package/dist/types/connector/shared/api/threads.d.ts +20 -0
  863. package/dist/types/index.d.ts +4 -0
  864. package/dist/types/routers/hash-router.d.ts +21 -0
  865. package/dist/types/routers/router-interface.d.ts +16 -0
  866. package/dist/types/stencil-public-runtime.d.ts +1681 -0
  867. package/dist/types/stores/auth-store.d.ts +9 -0
  868. package/dist/types/stores/mailbox-store.d.ts +19 -0
  869. package/dist/types/stores/scheduler-store.d.ts +32 -0
  870. package/dist/types/utils/color-utils.d.ts +9 -0
  871. package/dist/types/utils/utils.d.ts +28 -0
  872. package/loader/cdn.js +3 -0
  873. package/loader/index.cjs.js +3 -0
  874. package/loader/index.d.ts +21 -0
  875. package/loader/index.es2017.js +3 -0
  876. package/loader/index.js +4 -0
  877. package/loader/package.json +11 -0
  878. package/package.json +69 -0
  879. package/readme.md +42 -0
@@ -0,0 +1,533 @@
1
+ import { NylasBaseProvider } from "../../../common/abstract-provider";
2
+ import { NylasSchedulerConnector } from "../../../connector/nylas-scheduler-connector/index";
3
+ import { CreateNylasSchedulerStore } from "../../../stores/scheduler-store";
4
+ import { NotificationType } from "@nylas/core";
5
+ import { Host, h } from "@stencil/core";
6
+ import { debug } from "../../../utils/utils";
7
+ import { SchedulerView } from "./scheduler-view";
8
+ const genericError = { title: 'Something went wrong...', type: NotificationType.Error, category: 'internal' };
9
+ export class NylasScheduler {
10
+ constructor() {
11
+ this.mode = 'app';
12
+ this.defaultSchedulerStoreState = undefined;
13
+ this.sessionId = undefined;
14
+ this.schedulerApiUrl = 'https://elements-staging.us.nylas.com';
15
+ this.bookingInfo = undefined;
16
+ this.rescheduleId = undefined;
17
+ this.eventOverrides = {};
18
+ this.loadingState = undefined;
19
+ this.themeConfig = undefined;
20
+ this.automaticComponentRegistration = true;
21
+ this.selectedDateLabel = new Date().toLocaleDateString(undefined, { dateStyle: 'full' }) || 'No date selected';
22
+ }
23
+ connectedCallback() {
24
+ debug(`[nylas-scheduler] connectedCallback`);
25
+ }
26
+ async componentWillLoad() {
27
+ debug(`[nylas-scheduler] Component will load`, { eventOverrides: this.eventOverrides });
28
+ if (!this.sessionId) {
29
+ throw new Error('The page slug or session Id is required');
30
+ }
31
+ this.stores = {
32
+ scheduler: CreateNylasSchedulerStore({
33
+ bookingInfo: this.bookingInfo,
34
+ ...this.defaultSchedulerStoreState,
35
+ }),
36
+ };
37
+ this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);
38
+ const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');
39
+ this.nylasSchedulerConnector = new NylasSchedulerConnector({
40
+ schedulerAPIURL: this.schedulerApiUrl,
41
+ sessionId: this.sessionId,
42
+ nylasSchedulerStore,
43
+ });
44
+ this.init.emit(this.host);
45
+ this.baseProvider?.componentWillLoad(this.nylasSchedulerConnector);
46
+ if (this.themeConfig) {
47
+ for (const [key, value] of Object.entries(this.themeConfig)) {
48
+ this.host.style.setProperty(`${key}`, value);
49
+ }
50
+ }
51
+ }
52
+ async componentDidLoad() {
53
+ this.baseProvider?.componentDidLoad();
54
+ let result;
55
+ const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');
56
+ const selectedDate = nylasSchedulerStore?.get('selectedDate');
57
+ if (!selectedDate) {
58
+ result = await this.nylasSchedulerConnector?.scheduler.getAvailability();
59
+ }
60
+ else {
61
+ const startTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1).getTime() / 1000;
62
+ const endTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth() + 1, 1).getTime() / 1000;
63
+ result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);
64
+ }
65
+ if (!result || 'error' in result) {
66
+ this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });
67
+ }
68
+ const firstAvailableDate = nylasSchedulerStore?.get('availability').find((timeslot) => new Date(timeslot.start_time) > new Date());
69
+ let _selectedDate = new Date();
70
+ if (firstAvailableDate)
71
+ _selectedDate = firstAvailableDate.start_time;
72
+ nylasSchedulerStore?.set('selectedDate', _selectedDate);
73
+ this.selectedDateLabel = _selectedDate.toLocaleDateString(undefined, { dateStyle: 'full' }) || 'No date selected';
74
+ }
75
+ componentDisconnected() {
76
+ this.baseProvider?.componentDisconnected();
77
+ }
78
+ bookingInfoChanged(newVal) {
79
+ this.stores?.scheduler.set('bookingInfo', newVal);
80
+ }
81
+ async registerComponentHandler(event) {
82
+ this.baseProvider?.registerComponent(event.detail);
83
+ }
84
+ async unregisterComponentHandler(event) {
85
+ this.baseProvider?.unregisterComponent(event.detail);
86
+ }
87
+ async monthChangedHandler(event) {
88
+ const date = event.detail;
89
+ const startTime = new Date(date.getFullYear(), date.getMonth(), 1).getTime() / 1000;
90
+ const endTime = new Date(date.getFullYear(), date.getMonth() + 1, 1).getTime() / 1000;
91
+ const result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);
92
+ if (!result || 'error' in result) {
93
+ this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });
94
+ }
95
+ }
96
+ async bookButtonClickedHandler(event) {
97
+ if (this.rescheduleId) {
98
+ const result = await this.nylasSchedulerConnector?.scheduler.rescheduleBooking(this.rescheduleId, event.detail);
99
+ if (!result || 'error' in result) {
100
+ this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });
101
+ }
102
+ else {
103
+ this.baseProvider?.getStore('scheduler').set('showThankYouMessage', true);
104
+ }
105
+ return;
106
+ }
107
+ const result = await this.nylasSchedulerConnector?.scheduler.bookTimeslot(event.detail);
108
+ if (!result || 'error' in result) {
109
+ this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });
110
+ }
111
+ else {
112
+ this.baseProvider?.getStore('scheduler').set('showThankYouMessage', true);
113
+ }
114
+ }
115
+ async cancelButtonClickedHandler() {
116
+ this.baseProvider?.getStore('scheduler').set('bookedEventLoading', false);
117
+ this.baseProvider?.getStore('scheduler').set('bookedEventError', null);
118
+ }
119
+ selectedDateChanged(event) {
120
+ const date = event.detail;
121
+ this.selectedDateLabel = date ? date.toLocaleDateString(undefined, { dateStyle: 'full' }) : 'No date selected';
122
+ }
123
+ async getNylasSchedulerStore() {
124
+ return this.baseProvider?.getStore('scheduler');
125
+ }
126
+ async getNylasSchedulerConnector() {
127
+ return this.nylasSchedulerConnector;
128
+ }
129
+ async getRef() {
130
+ return this.host;
131
+ }
132
+ getErrorObject(error) {
133
+ return {
134
+ title: error?.title || genericError.title,
135
+ category: error?.type || genericError.category,
136
+ type: NotificationType.Error,
137
+ description: error?.message || '',
138
+ id: new Date().getTime().toString(),
139
+ };
140
+ }
141
+ render() {
142
+ const showDefaultScheduler = this.mode === 'app';
143
+ const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');
144
+ const eventInfo = nylasSchedulerStore?.get('eventInfo');
145
+ const showThankYouMessage = nylasSchedulerStore?.get('showThankYouMessage');
146
+ const showBookingForm = nylasSchedulerStore?.get('showBookingForm');
147
+ const cancelledEvent = nylasSchedulerStore?.get('cancelledEvent');
148
+ if (showDefaultScheduler && cancelledEvent) {
149
+ return (h(Host, null, h(SchedulerView, { loadingState: this.loadingState }, h("div", { class: "cancelled-event-page", part: "cancelled-event-page" }, h("nylas-cancelled-event-card", { cancelledEvent: cancelledEvent, exportparts: "ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card" })))));
150
+ }
151
+ if (showDefaultScheduler && showThankYouMessage && eventInfo) {
152
+ return (h(Host, null, h(SchedulerView, { loadingState: this.loadingState }, h("div", { class: "booked-event-page", part: "booked-event-page" }, h("nylas-booked-event-card", { eventInfo: eventInfo, exportparts: "nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta" })))));
153
+ }
154
+ if (showDefaultScheduler && !showThankYouMessage && !showBookingForm) {
155
+ const timeslotPickerCTALabel = this.host.querySelector('[slot="timeslot-picker-cta-label"]');
156
+ return (h(Host, null, h(SchedulerView, { loadingState: this.loadingState }, h("div", { class: "select-date-page", part: "select-date-page" }, h("div", { class: "left-panel" }, h("nylas-date-picker", { exportparts: "ndp, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--selected, ndp__date--current-day, ndp__date--current-month" }), h("div", { class: "border" }), h("nylas-locale-switch", null)), h("div", { class: "right-panel" }, h("div", { class: "wrapper" }, h("h2", null, h("calendar-icon", null), h("span", { id: "selectedDate" }, this.selectedDateLabel)), h("nylas-timeslot-picker", { exportparts: "ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary" }, timeslotPickerCTALabel && (h("span", { slot: "timeslot-picker-cta-label" }, h("slot", { name: "timeslot-picker-cta-label" }))))))))));
157
+ }
158
+ if (showDefaultScheduler && !showThankYouMessage && showBookingForm) {
159
+ const customTemplateSlot = this.host.querySelector('[slot="custom-booking-form"]');
160
+ return (h(Host, null, h(SchedulerView, { loadingState: this.loadingState }, h("div", { class: "additional-data-page", part: "additional-data-page" }, h("div", { class: "left-panel" }, h("div", { class: "wrapper" }, h("nylas-selected-event-card", { exportparts: "nsec, nsec__card, nsec__icon, nsec__date, nsec__time" }))), h("div", { class: "right-panel" }, h("div", { class: "wrapper" }, h("nylas-booking-form", { exportparts: "nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline" }, customTemplateSlot && (h("div", { slot: "custom-booking-form" }, h("slot", { name: "custom-booking-form" }))))))))));
161
+ }
162
+ return (h(Host, null, h("slot", null)));
163
+ }
164
+ static get is() { return "nylas-scheduler"; }
165
+ static get encapsulation() { return "shadow"; }
166
+ static get originalStyleUrls() {
167
+ return {
168
+ "$": ["nylas-scheduler.scss"]
169
+ };
170
+ }
171
+ static get styleUrls() {
172
+ return {
173
+ "$": ["nylas-scheduler.css"]
174
+ };
175
+ }
176
+ static get properties() {
177
+ return {
178
+ "mode": {
179
+ "type": "string",
180
+ "mutable": false,
181
+ "complexType": {
182
+ "original": "'app' | 'composable'",
183
+ "resolved": "\"app\" | \"composable\"",
184
+ "references": {}
185
+ },
186
+ "required": false,
187
+ "optional": false,
188
+ "docs": {
189
+ "tags": [],
190
+ "text": "This is used to set the mode for the Nylas Scheduler.\nThe mode can be either `app` or `composable`. The default mode is `app`.\n- `app`: This mode is used to show the default Nylas Scheduler UI.\n- `composable`: This mode is used to show the composable Nylas Scheduler UI\n by passing the individual scheduler components as children."
191
+ },
192
+ "attribute": "mode",
193
+ "reflect": false,
194
+ "defaultValue": "'app'"
195
+ },
196
+ "defaultSchedulerStoreState": {
197
+ "type": "unknown",
198
+ "mutable": false,
199
+ "complexType": {
200
+ "original": "NylasSchedulerStoreState",
201
+ "resolved": "NylasSchedulerStoreState | undefined",
202
+ "references": {
203
+ "NylasSchedulerStoreState": {
204
+ "location": "import",
205
+ "path": "@/stores/scheduler-store",
206
+ "id": "src/stores/scheduler-store.ts::NylasSchedulerStoreState"
207
+ }
208
+ }
209
+ },
210
+ "required": false,
211
+ "optional": true,
212
+ "docs": {
213
+ "tags": [],
214
+ "text": "The default scheduler store state.\nUsed to set the initial state of the scheduler store."
215
+ }
216
+ },
217
+ "sessionId": {
218
+ "type": "string",
219
+ "mutable": false,
220
+ "complexType": {
221
+ "original": "string",
222
+ "resolved": "string | undefined",
223
+ "references": {}
224
+ },
225
+ "required": false,
226
+ "optional": true,
227
+ "docs": {
228
+ "tags": [],
229
+ "text": "The session ID for the Nylas Scheduler.\nThis is used to authenticate the user."
230
+ },
231
+ "attribute": "session-id",
232
+ "reflect": false
233
+ },
234
+ "schedulerApiUrl": {
235
+ "type": "string",
236
+ "mutable": false,
237
+ "complexType": {
238
+ "original": "string",
239
+ "resolved": "string",
240
+ "references": {}
241
+ },
242
+ "required": false,
243
+ "optional": false,
244
+ "docs": {
245
+ "tags": [],
246
+ "text": "The URL for the Nylas Scheduler API. (staging or production URL)"
247
+ },
248
+ "attribute": "scheduler-api-url",
249
+ "reflect": false,
250
+ "defaultValue": "'https://elements-staging.us.nylas.com'"
251
+ },
252
+ "bookingInfo": {
253
+ "type": "unknown",
254
+ "mutable": false,
255
+ "complexType": {
256
+ "original": "NylasSchedulerBookingData",
257
+ "resolved": "undefined | { primaryParticipant: NylasSchedulerBookingParticipant; startTime?: Date | undefined; endTime?: Date | undefined; timezone?: string | undefined; guests?: NylasSchedulerBookingParticipant[] | undefined; additionalFields?: { [key: string]: any; } | undefined; }",
258
+ "references": {
259
+ "NylasSchedulerBookingData": {
260
+ "location": "import",
261
+ "path": "@nylas/core",
262
+ "id": "../nylas-js-core/dist/index.d.ts::NylasSchedulerBookingData"
263
+ }
264
+ }
265
+ },
266
+ "required": false,
267
+ "optional": true,
268
+ "docs": {
269
+ "tags": [],
270
+ "text": "This enables passing the bookingInfo object to the Scheduler UI for direct booking event creation.\nWhen used with timeslotConfirmedHandler, it bypasses the additional data page and immediately\ninvokes the handler after booking."
271
+ }
272
+ },
273
+ "rescheduleId": {
274
+ "type": "string",
275
+ "mutable": false,
276
+ "complexType": {
277
+ "original": "string",
278
+ "resolved": "string | undefined",
279
+ "references": {}
280
+ },
281
+ "required": false,
282
+ "optional": true,
283
+ "docs": {
284
+ "tags": [],
285
+ "text": "Booking Id required for rescheduling flow."
286
+ },
287
+ "attribute": "reschedule-id",
288
+ "reflect": false
289
+ },
290
+ "eventOverrides": {
291
+ "type": "unknown",
292
+ "mutable": false,
293
+ "complexType": {
294
+ "original": "SchedulerEventOverride",
295
+ "resolved": "Partial<{ timeslotSelected: (event: CustomEvent<Timeslot>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; timeslotConfirmed: (event: CustomEvent<Timeslot>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; loadingState: (event: CustomEvent<unknown>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; dateSelected: (event: CustomEvent<Date>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; monthChanged: (event: CustomEvent<Date>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; timezoneChanged: (event: CustomEvent<string>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; languageChanged: (event: CustomEvent<string>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; openHoursChanged: (event: CustomEvent<OpenHour[]>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; bookedEventError: (event: CustomEvent<unknown>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; bookingInfo: (event: CustomEvent<unknown>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; nameChanged: (event: CustomEvent<string>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; emailChanged: (event: CustomEvent<string>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; backButtonClicked: (event: CustomEvent<boolean>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; detailsConfirmed: (event: CustomEvent<NylasSchedulerBookingData>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; cancelBookingButtonClicked: (event: CustomEvent<{ bookingId: string; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; rescheduleButtonClicked: (event: CustomEvent<{ bookingId: string; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; }> & EventOverride<NylasSchedulerConnectorInterface>",
296
+ "references": {
297
+ "SchedulerEventOverride": {
298
+ "location": "import",
299
+ "path": "@/common/component-types",
300
+ "id": "src/common/component-types.ts::SchedulerEventOverride"
301
+ }
302
+ }
303
+ },
304
+ "required": false,
305
+ "optional": false,
306
+ "docs": {
307
+ "tags": [],
308
+ "text": "This provides an easy way to override the default function of the event emitter.\nAn example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\nshow the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n```html\n<nylas-scheduler eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n```"
309
+ },
310
+ "defaultValue": "{}"
311
+ },
312
+ "loadingState": {
313
+ "type": "unknown",
314
+ "mutable": false,
315
+ "complexType": {
316
+ "original": "LoadingState",
317
+ "resolved": "undefined | { api: \"availability\" | \"createBooking\" | \"cancelBooking\" | \"rescheduleBooking\"; }",
318
+ "references": {
319
+ "LoadingState": {
320
+ "location": "import",
321
+ "path": "@/stores/scheduler-store",
322
+ "id": "src/stores/scheduler-store.ts::LoadingState"
323
+ }
324
+ }
325
+ },
326
+ "required": false,
327
+ "optional": true,
328
+ "docs": {
329
+ "tags": [],
330
+ "text": "The loading state. This is used to set the loading state for the Nylas Scheduler when fetching data.\nFor example, when fetching availability, the loading state can be set to:\n```js\n loadingState={ api: 'availability' }\n```"
331
+ }
332
+ },
333
+ "themeConfig": {
334
+ "type": "unknown",
335
+ "mutable": false,
336
+ "complexType": {
337
+ "original": "ThemeConfig",
338
+ "resolved": "undefined | { '--nylas-primary'?: string | undefined; '--nylas-info'?: string | undefined; '--nylas-success'?: string | undefined; '--nylas-warning'?: string | undefined; '--nylas-error'?: string | undefined; '--nylas-error-pressed'?: string | undefined; '--nylas-base-0'?: string | undefined; '--nylas-base-25'?: string | undefined; '--nylas-base-50'?: string | undefined; '--nylas-base-100'?: string | undefined; '--nylas-base-200'?: string | undefined; '--nylas-base-300'?: string | undefined; '--nylas-base-400'?: string | undefined; '--nylas-base-500'?: string | undefined; '--nylas-base-600'?: string | undefined; '--nylas-base-700'?: string | undefined; '--nylas-base-800'?: string | undefined; '--nylas-base-900'?: string | undefined; '--nylas-base-950'?: string | undefined; '--nylas-font-family'?: string | undefined; '--nylas-font-size'?: string | undefined; '--nylas-border-radius'?: string | undefined; '--nylas-border-radius-2x'?: string | undefined; '--nylas-border-radius-3x'?: string | undefined; }",
339
+ "references": {
340
+ "ThemeConfig": {
341
+ "location": "import",
342
+ "path": "@nylas/core",
343
+ "id": "../nylas-js-core/dist/index.d.ts::ThemeConfig"
344
+ }
345
+ }
346
+ },
347
+ "required": false,
348
+ "optional": true,
349
+ "docs": {
350
+ "tags": [],
351
+ "text": "Theme config, used to automatically generate a theme with color palette and\nCSS variables to customize the look and feel of the Nylas Scheduler."
352
+ }
353
+ }
354
+ };
355
+ }
356
+ static get states() {
357
+ return {
358
+ "automaticComponentRegistration": {},
359
+ "selectedDateLabel": {}
360
+ };
361
+ }
362
+ static get events() {
363
+ return [{
364
+ "method": "init",
365
+ "name": "init",
366
+ "bubbles": true,
367
+ "cancelable": true,
368
+ "composed": true,
369
+ "docs": {
370
+ "tags": [],
371
+ "text": "This event is fired when the provider is initialized.\nIt can be used to set the initial state of the provider,\nor to prevent the provider from firing some default behavior."
372
+ },
373
+ "complexType": {
374
+ "original": "HTMLNylasSchedulerElement",
375
+ "resolved": "HTMLNylasSchedulerElement",
376
+ "references": {
377
+ "HTMLNylasSchedulerElement": {
378
+ "location": "global",
379
+ "id": "global::HTMLNylasSchedulerElement"
380
+ }
381
+ }
382
+ }
383
+ }, {
384
+ "method": "nylasSchedulerError",
385
+ "name": "nylasSchedulerError",
386
+ "bubbles": true,
387
+ "cancelable": true,
388
+ "composed": true,
389
+ "docs": {
390
+ "tags": [],
391
+ "text": ""
392
+ },
393
+ "complexType": {
394
+ "original": "Notification",
395
+ "resolved": "{ id: string; type: NotificationType; title: string; code?: number | undefined; category: string; description?: string | undefined; }",
396
+ "references": {
397
+ "Notification": {
398
+ "location": "import",
399
+ "path": "@nylas/core",
400
+ "id": "../nylas-js-core/dist/index.d.ts::Notification"
401
+ }
402
+ }
403
+ }
404
+ }];
405
+ }
406
+ static get methods() {
407
+ return {
408
+ "getNylasSchedulerStore": {
409
+ "complexType": {
410
+ "signature": "() => Promise<NylasSchedulerStoreType | undefined>",
411
+ "parameters": [],
412
+ "references": {
413
+ "Promise": {
414
+ "location": "global",
415
+ "id": "global::Promise"
416
+ },
417
+ "NylasSchedulerStoreState": {
418
+ "location": "import",
419
+ "path": "@/stores/scheduler-store",
420
+ "id": "src/stores/scheduler-store.ts::NylasSchedulerStoreState"
421
+ },
422
+ "NylasSchedulerStoreType": {
423
+ "location": "import",
424
+ "path": "@/stores/scheduler-store",
425
+ "id": "src/stores/scheduler-store.ts::NylasSchedulerStoreType"
426
+ }
427
+ },
428
+ "return": "Promise<ObservableMap<NylasSchedulerStoreState> | undefined>"
429
+ },
430
+ "docs": {
431
+ "text": "This method is used to retrieve the NylasScheduler instance",
432
+ "tags": [{
433
+ "name": "returns",
434
+ "text": "The NylasScheduler instance"
435
+ }]
436
+ }
437
+ },
438
+ "getNylasSchedulerConnector": {
439
+ "complexType": {
440
+ "signature": "() => Promise<NylasSchedulerConnector | undefined>",
441
+ "parameters": [],
442
+ "references": {
443
+ "Promise": {
444
+ "location": "global",
445
+ "id": "global::Promise"
446
+ },
447
+ "NylasSchedulerConnector": {
448
+ "location": "import",
449
+ "path": "@/connector/nylas-scheduler-connector",
450
+ "id": "src/connector/nylas-scheduler-connector/index.ts::NylasSchedulerConnector"
451
+ }
452
+ },
453
+ "return": "Promise<NylasSchedulerConnector | undefined>"
454
+ },
455
+ "docs": {
456
+ "text": "This method is used to retrieve the NylasConnector instance",
457
+ "tags": [{
458
+ "name": "returns",
459
+ "text": "The NylasConnector instance"
460
+ }]
461
+ }
462
+ },
463
+ "getRef": {
464
+ "complexType": {
465
+ "signature": "() => Promise<HTMLNylasSchedulerElement>",
466
+ "parameters": [],
467
+ "references": {
468
+ "Promise": {
469
+ "location": "global",
470
+ "id": "global::Promise"
471
+ },
472
+ "HTMLNylasSchedulerElement": {
473
+ "location": "global",
474
+ "id": "global::HTMLNylasSchedulerElement"
475
+ }
476
+ },
477
+ "return": "Promise<HTMLNylasSchedulerElement>"
478
+ },
479
+ "docs": {
480
+ "text": "",
481
+ "tags": []
482
+ }
483
+ }
484
+ };
485
+ }
486
+ static get elementRef() { return "host"; }
487
+ static get watchers() {
488
+ return [{
489
+ "propName": "bookingInfo",
490
+ "methodName": "bookingInfoChanged"
491
+ }];
492
+ }
493
+ static get listeners() {
494
+ return [{
495
+ "name": "registerComponent",
496
+ "method": "registerComponentHandler",
497
+ "target": undefined,
498
+ "capture": false,
499
+ "passive": false
500
+ }, {
501
+ "name": "unregisterComponent",
502
+ "method": "unregisterComponentHandler",
503
+ "target": undefined,
504
+ "capture": false,
505
+ "passive": false
506
+ }, {
507
+ "name": "monthChanged",
508
+ "method": "monthChangedHandler",
509
+ "target": undefined,
510
+ "capture": false,
511
+ "passive": false
512
+ }, {
513
+ "name": "detailsConfirmed",
514
+ "method": "bookButtonClickedHandler",
515
+ "target": undefined,
516
+ "capture": false,
517
+ "passive": false
518
+ }, {
519
+ "name": "cancelButtonClicked",
520
+ "method": "cancelButtonClickedHandler",
521
+ "target": undefined,
522
+ "capture": false,
523
+ "passive": false
524
+ }, {
525
+ "name": "dateSelected",
526
+ "method": "selectedDateChanged",
527
+ "target": undefined,
528
+ "capture": false,
529
+ "passive": false
530
+ }];
531
+ }
532
+ }
533
+ //# sourceMappingURL=nylas-scheduler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nylas-scheduler.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-scheduler/nylas-scheduler.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAmE,MAAM,0BAA0B,CAAC;AACtI,OAAO,EAAwD,gBAAgB,EAAsB,MAAM,aAAa,CAAC;AACzH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAkD9G,MAAM,OAAO,cAAc;;oBAkCqB,KAAK;;;+BAiBR,uCAAuC;;;8BAsBQ,EAAE;;;8CAuBzC,IAAI;iCAMlB,IAAI,IAAI,EAAE,CAAC,kBA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Q,CACpC,CACP,CACkB,CACjB,CACF,CACF,CACQ,CACX,CACR,CAAC;QACJ,CAAC;QAED,OAAO,CACL,EAAC,IAAI;YACH,eAAQ,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { NylasBaseProvider } from '@/common/abstract-provider';\nimport { RegisteredComponent } from '@/common/register-component';\nimport type { SchedulerEventOverride } from '@/common/component-types';\nimport { NylasSchedulerConnector } from '@/connector/nylas-scheduler-connector';\nimport { CreateNylasSchedulerStore, LoadingState, NylasSchedulerStoreState, NylasSchedulerStoreType } from '@/stores/scheduler-store';\nimport { NylasSchedulerBookingData, ThemeConfig, Notification, NotificationType, NylasErrorResponse } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\nimport { SchedulerView } from './scheduler-view';\n\nconst genericError = { title: 'Something went wrong...', type: NotificationType.Error, category: 'internal' };\n\n/**\n * The Nylas Scheduler component is used to show the Nylas Scheduler UI.\n *\n * @slot custom-booking-form - This slot is used to pass a custom booking form to the Nylas Scheduler.\n * @slot timeslot-picker-cta-label - This slot is used to pass a custom label to the timeslot picker CTA. The default label is \"Next\".\n *\n * @part ndp - [nylas-date-picker] The date picker host.\n * @part ndp__month-header - [nylas-date-picker] The month header.\n * @part ndp__month-button - [nylas-date-picker] The month button.\n * @part ndp__day - [nylas-date-picker] The day.\n * @part ndp__date - [nylas-date-picker] The date.\n * @part ndp__date--selected - [nylas-date-picker] The selected date.\n * @part ndp__date--current-day - [nylas-date-picker] The current day.\n * @part ndp__date--current-month - [nylas-date-picker] The dates in the current month.\n * @part ntp - [nylas-timeslot-picker] The timeslot picker component.\n * @part ntp__timeslot - [nylas-timeslot-picker] The timeslot button.\n * @part ntp__timeslot--selected - [nylas-timeslot-picker] The selected timeslot button.\n * @part ntp__button-primary - [nylas-timeslot-picker] The timeslot picker CTA.\n * @part nsec - [nylas-selected-event-card] The selected event card component.\n * @part nsec__card - [nylas-selected-event-card] The card component.\n * @part nsec__icon - [nylas-selected-event-card] The calendar icon.\n * @part nsec__date - [nylas-selected-event-card] The date selected.\n * @part nsec__time - [nylas-selected-event-card] The timeslot selected.\n * @part nbf - [nylas-booking-form] The booking form host.\n * @part nbf__input-label - [nylas-booking-form] The input label.\n * @part nbf__input-textfield - [nylas-booking-form] The input textfield.\n * @part nbf__button-ghost - [nylas-booking-form] The ghost button for adding guests.\n * @part nbf__button-primary - [nylas-booking-form] The primary button for booking.\n * @part nbf__button-outline - [nylas-booking-form] The outline button for canceling.\n * @part ncec - [nylas-cancelled-event-card] The cancelled event card host.\n * @part ncec__icon - [nylas-cancelled-event-card] The calendar icon.\n * @part ncec__title - [nylas-cancelled-event-card] The title of the cancelled event card.\n * @part ncec__description - [nylas-cancelled-event-card] The description of the cancelled event card.\n * @part ncec__button-outline - [nylas-cancelled-event-card] The close button CTA.\n * @part ncec__card - [nylas-cancelled-event-card] The cancelled event card.\n * @part nbec - [nylas-booked-event-card] The booked event card host.\n * @part nbec__card - [nylas-booked-event-card] The booked event card.\n * @part nbec__title - [nylas-booked-event-card] The title of the booked event card.\n * @part nbec__description - [nylas-booked-event-card] The description of the booked event card.\n * @part nbec__button-outline - [nylas-booked-event-card] The cancel & reschedule button CTA.\n * @part nbec__cancel-cta - [nylas-booked-event-card] The cancel button CTA.\n * @part nbec__reschedule-cta - [nylas-booked-event-card] The reschedule button CTA.\n */\n@Component({\n tag: 'nylas-scheduler',\n styleUrl: 'nylas-scheduler.scss',\n shadow: true,\n})\nexport class NylasScheduler {\n /**\n * Stores to be used by the provider.\n */\n private stores?: { scheduler: NylasSchedulerStoreType };\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 Scheduler Connector instance.\n * The branins of the provider. It manages data fetching and state synchronization.\n */\n private nylasSchedulerConnector?: NylasSchedulerConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasSchedulerElement;\n\n /**\n * This is used to set the mode for the Nylas Scheduler.\n * The mode can be either `app` or `composable`. The default mode is `app`.\n * - `app`: This mode is used to show the default Nylas Scheduler UI.\n * - `composable`: This mode is used to show the composable Nylas Scheduler UI\n * by passing the individual scheduler components as children.\n */\n @Prop() readonly mode: 'app' | 'composable' = 'app';\n\n /**\n * The default scheduler store state.\n * Used to set the initial state of the scheduler store.\n */\n @Prop({ attribute: 'default-scheduler-store-state' }) readonly defaultSchedulerStoreState?: NylasSchedulerStoreState;\n\n /**\n * The session ID for the Nylas Scheduler.\n * This is used to authenticate the user.\n */\n @Prop() readonly sessionId?: string;\n\n /**\n * The URL for the Nylas Scheduler API. (staging or production URL)\n */\n @Prop() readonly schedulerApiUrl: string = 'https://elements-staging.us.nylas.com';\n\n /**\n * This enables passing the bookingInfo object to the Scheduler UI for direct booking event creation.\n * When used with timeslotConfirmedHandler, it bypasses the additional data page and immediately\n * invokes the handler after booking.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * Booking Id required for rescheduling flow.\n */\n @Prop() readonly rescheduleId?: string;\n\n /**\n * This provides an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduler eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n @Prop({ attribute: 'event-overrides' }) readonly eventOverrides: SchedulerEventOverride = {};\n\n /**\n * The loading state. This is used to set the loading state for the Nylas Scheduler when fetching data.\n * For example, when fetching availability, the loading state can be set to:\n * ```js\n * loadingState={ api: 'availability' }\n * ```\n */\n @Prop() readonly loadingState?: LoadingState;\n\n /**\n * Theme config, used to automatically generate a theme with color palette and\n * CSS variables to customize the look and feel of the Nylas Scheduler.\n */\n @Prop() readonly themeConfig?: ThemeConfig;\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 * @default true\n */\n @State() automaticComponentRegistration: boolean = true;\n\n /**\n * The selected date label for the Nylas Scheduler.\n * This is used to set the initial date label for the Nylas Scheduler.\n */\n @State() selectedDateLabel: string = new Date().toLocaleDateString(undefined, { dateStyle: 'full' }) || 'No date selected';\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 }) init!: EventEmitter<HTMLNylasSchedulerElement>;\n\n @Event({\n eventName: 'nylasSchedulerError',\n })\n nylasSchedulerError!: EventEmitter<Notification>;\n\n /**\n * This function is called when the component is connected to the DOM.\n * At this point in the component lifecycle, the base provider has not yet\n * been initialized. So avoid using the base provider in this method or stores\n * in this method.\n */\n connectedCallback() {\n debug(`[nylas-scheduler] connectedCallback`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-scheduler] Component will load`, { eventOverrides: this.eventOverrides });\n\n // Throw an error if the page slug is not set\n // TODO: We should not throw errors like this, the end user cannot handle them if we do that.\n if (!this.sessionId) {\n throw new Error('The page slug or session Id is required');\n }\n\n this.stores = {\n scheduler: CreateNylasSchedulerStore({\n bookingInfo: this.bookingInfo,\n ...this.defaultSchedulerStoreState,\n }),\n };\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n this.nylasSchedulerConnector = new NylasSchedulerConnector({\n schedulerAPIURL: this.schedulerApiUrl,\n sessionId: this.sessionId,\n nylasSchedulerStore,\n });\n this.init.emit(this.host);\n\n this.baseProvider?.componentWillLoad(this.nylasSchedulerConnector);\n // Override theme\n if (this.themeConfig) {\n for (const [key, value] of Object.entries(this.themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n async componentDidLoad() {\n this.baseProvider?.componentDidLoad();\n\n let result;\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n const selectedDate = nylasSchedulerStore?.get('selectedDate');\n\n if (!selectedDate) {\n result = await this.nylasSchedulerConnector?.scheduler.getAvailability();\n } else {\n const startTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(selectedDate.getFullYear(), selectedDate.getMonth() + 1, 1).getTime() / 1000;\n result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);\n }\n\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n\n const firstAvailableDate = nylasSchedulerStore?.get('availability').find((timeslot: any) => new Date(timeslot.start_time) > new Date());\n\n let _selectedDate = new Date();\n if (firstAvailableDate) _selectedDate = firstAvailableDate.start_time;\n\n nylasSchedulerStore?.set('selectedDate', _selectedDate);\n this.selectedDateLabel = _selectedDate.toLocaleDateString(undefined, { dateStyle: 'full' }) || 'No date selected';\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n @Watch('bookingInfo')\n bookingInfoChanged(newVal?: NylasSchedulerBookingData) {\n this.stores?.scheduler.set('bookingInfo', newVal);\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 is a custom event handler that is used to refetch the availability when the month is changed.\n */\n @Listen('monthChanged')\n async monthChangedHandler(event: CustomEvent<Date>) {\n const date = event.detail;\n const startTime = new Date(date.getFullYear(), date.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(date.getFullYear(), date.getMonth() + 1, 1).getTime() / 1000;\n\n const result = await this.nylasSchedulerConnector?.scheduler.getAvailability(startTime, endTime);\n\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n }\n }\n\n /**\n * This is a custom event handler to book an event.\n */\n @Listen('detailsConfirmed')\n async bookButtonClickedHandler(event: CustomEvent<NylasSchedulerBookingData>) {\n if (this.rescheduleId) {\n const result = await this.nylasSchedulerConnector?.scheduler.rescheduleBooking(this.rescheduleId, event.detail);\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n } else {\n this.baseProvider?.getStore('scheduler').set('showThankYouMessage', true);\n }\n return;\n }\n const result = await this.nylasSchedulerConnector?.scheduler.bookTimeslot(event.detail);\n if (!result || 'error' in result) {\n this.nylasSchedulerError.emit({ ...this.getErrorObject(result?.error) });\n } else {\n this.baseProvider?.getStore('scheduler').set('showThankYouMessage', true);\n }\n }\n\n /**\n * This is a custom event handler to cancel booking an event.\n */\n @Listen('cancelButtonClicked')\n async cancelButtonClickedHandler() {\n this.baseProvider?.getStore('scheduler').set('bookedEventLoading', false);\n this.baseProvider?.getStore('scheduler').set('bookedEventError', null);\n }\n\n /**\n * This is a custom event handler to update the selected date label.\n */\n @Listen('dateSelected')\n selectedDateChanged(event: CustomEvent<Date>) {\n const date = event.detail;\n this.selectedDateLabel = date ? date.toLocaleDateString(undefined, { dateStyle: 'full' }) : 'No date selected';\n }\n\n /**\n * This method is used to retrieve the NylasScheduler instance\n * @returns The NylasScheduler instance\n */\n @Method()\n async getNylasSchedulerStore(): Promise<NylasSchedulerStoreType | undefined> {\n return this.baseProvider?.getStore('scheduler');\n }\n\n /**\n * This method is used to retrieve the NylasConnector instance\n * @returns The NylasConnector instance\n */\n @Method()\n async getNylasSchedulerConnector() {\n return this.nylasSchedulerConnector;\n }\n\n @Method()\n async getRef() {\n return this.host;\n }\n\n private getErrorObject(error: NylasErrorResponse['error']): Notification {\n return {\n title: error?.title || genericError.title,\n category: error?.type || genericError.category,\n type: NotificationType.Error,\n description: error?.message || '',\n id: new Date().getTime().toString(),\n };\n }\n\n render() {\n const showDefaultScheduler = this.mode === 'app';\n const nylasSchedulerStore = this.baseProvider?.getStore('scheduler');\n const eventInfo = nylasSchedulerStore?.get('eventInfo');\n const showThankYouMessage = nylasSchedulerStore?.get('showThankYouMessage');\n const showBookingForm = nylasSchedulerStore?.get('showBookingForm');\n const cancelledEvent = nylasSchedulerStore?.get('cancelledEvent');\n\n // Cancelled event card is shown when the event is cancelled\n if (showDefaultScheduler && cancelledEvent) {\n return (\n <Host>\n <SchedulerView loadingState={this.loadingState}>\n <div class=\"cancelled-event-page\" part=\"cancelled-event-page\">\n <nylas-cancelled-event-card cancelledEvent={cancelledEvent} exportparts=\"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card\" />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Booked event card is shown when the event is booked\n if (showDefaultScheduler && showThankYouMessage && eventInfo) {\n return (\n <Host>\n <SchedulerView loadingState={this.loadingState}>\n <div class=\"booked-event-page\" part=\"booked-event-page\">\n <nylas-booked-event-card\n eventInfo={eventInfo}\n exportparts=\"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta\"\n />\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Date and time picker is shown when the event is not booked and no additional data is shown\n if (showDefaultScheduler && !showThankYouMessage && !showBookingForm) {\n const timeslotPickerCTALabel = this.host.querySelector('[slot=\"timeslot-picker-cta-label\"]');\n return (\n <Host>\n <SchedulerView loadingState={this.loadingState}>\n <div class=\"select-date-page\" part=\"select-date-page\">\n <div class=\"left-panel\">\n <nylas-date-picker exportparts=\"ndp, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--selected, ndp__date--current-day, ndp__date--current-month\"></nylas-date-picker>\n <div class=\"border\"></div>\n <nylas-locale-switch></nylas-locale-switch>\n </div>\n <div class=\"right-panel\">\n <div class=\"wrapper\">\n <h2>\n <calendar-icon></calendar-icon>\n <span id=\"selectedDate\">{this.selectedDateLabel}</span>\n </h2>\n <nylas-timeslot-picker exportparts=\"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary\">\n {timeslotPickerCTALabel && (\n <span slot=\"timeslot-picker-cta-label\">\n <slot name=\"timeslot-picker-cta-label\"></slot>\n </span>\n )}\n </nylas-timeslot-picker>\n </div>\n </div>\n </div>\n </SchedulerView>\n </Host>\n );\n }\n // Additional data is shown when the time is selected, event is not booked and additional data is shown\n if (showDefaultScheduler && !showThankYouMessage && showBookingForm) {\n // Check if a \"custom-booking-form\" slot is provided\n const customTemplateSlot = this.host.querySelector('[slot=\"custom-booking-form\"]');\n\n return (\n <Host>\n <SchedulerView loadingState={this.loadingState}>\n <div class=\"additional-data-page\" part=\"additional-data-page\">\n <div class=\"left-panel\">\n <div class=\"wrapper\">\n <nylas-selected-event-card exportparts=\"nsec, nsec__card, nsec__icon, nsec__date, nsec__time\"></nylas-selected-event-card>\n </div>\n </div>\n <div class=\"right-panel\">\n <div class=\"wrapper\">\n <nylas-booking-form exportparts=\"nbf, nbf__input-label, nbf__input-textfield, nbf__button-ghost, nbf__button-primary, nbf__button-outline\">\n {customTemplateSlot && (\n <div slot=\"custom-booking-form\">\n <slot name=\"custom-booking-form\"></slot>\n </div>\n )}\n </nylas-booking-form>\n </div>\n </div>\n </div>\n </SchedulerView>\n </Host>\n );\n }\n\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import { Fragment, h } from "@stencil/core";
2
+ export const SchedulerView = (props, children) => {
3
+ const isLoading = props.loadingState && !!props.loadingState.api;
4
+ return (h(Fragment, null, isLoading && (h("div", { class: 'loading' }, h("div", { class: 'left' }, h("div", { class: 'skeleton' })), h("div", { class: 'right' }, h("div", { class: 'skeleton' }), h("div", { class: 'skeleton' }), h("div", { class: 'skeleton' }), h("div", { class: 'skeleton' }), h("div", { class: 'skeleton' })))), !isLoading && children, h("nylas-notification", null), h("div", { class: 'footer' }, "Powered by\u00A0 ", h("nylas-logo", null))));
5
+ };
6
+ //# sourceMappingURL=scheduler-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduler-view.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-scheduler/scheduler-view.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuB,CAAC,EAAE,MAAM,eAAe,CAAC;AAUjE,MAAM,CAAC,MAAM,aAAa,GAA4C,CAAC,KAAyB,EAAE,QAAQ,EAAE,EAAE;IAC5G,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,IAAI,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;IACjE,OAAO,CACL,EAAC,QAAQ;QACN,SAAS,IAAI,CACZ,WAAK,KAAK,EAAE,SAAS;YACnB,WAAK,KAAK,EAAE,MAAM;gBAChB,WAAK,KAAK,EAAE,UAAU,GAAI,CACtB;YACN,WAAK,KAAK,EAAE,OAAO;gBACjB,WAAK,KAAK,EAAE,UAAU,GAAI;gBAC1B,WAAK,KAAK,EAAE,UAAU,GAAI;gBAC1B,WAAK,KAAK,EAAE,UAAU,GAAI;gBAC1B,WAAK,KAAK,EAAE,UAAU,GAAI;gBAC1B,WAAK,KAAK,EAAE,UAAU,GAAI,CACtB,CACF,CACP;QACA,CAAC,SAAS,IAAI,QAAQ;QACvB,6BAAyC;QACzC,WAAK,KAAK,EAAE,QAAQ;;YACD,qBAAc,CAC3B,CACG,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Fragment, FunctionalComponent, h } from '@stencil/core';\nimport { LoadingState } from '../../../components';\n\nexport type SchedulerViewProps = {\n loadingState?: LoadingState;\n};\n\n/**\n * The Scheduler view component.\n */\nexport const SchedulerView: FunctionalComponent<SchedulerViewProps> = (props: SchedulerViewProps, children) => {\n const isLoading = props.loadingState && !!props.loadingState.api;\n return (\n <Fragment>\n {isLoading && (\n <div class={'loading'}>\n <div class={'left'}>\n <div class={'skeleton'} />\n </div>\n <div class={'right'}>\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n <div class={'skeleton'} />\n </div>\n </div>\n )}\n {!isLoading && children}\n <nylas-notification></nylas-notification>\n <div class={'footer'}>\n Powered by&nbsp; <nylas-logo />\n </div>\n </Fragment>\n );\n};\n"]}