@nylas/react 1.1.7 → 1.2.0

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 (230) hide show
  1. package/dist/{add-circle-icon_2.entry-5814b516.cjs → add-circle-icon_2.entry-52cc3933.cjs} +1 -1
  2. package/dist/{add-circle-icon_2.entry-5db67b5b.js → add-circle-icon_2.entry-5ea903bf.js} +1 -1
  3. package/dist/{archive-icon.entry-769e863b.js → archive-icon.entry-50c4b134.js} +1 -1
  4. package/dist/{archive-icon.entry-10ebbf9a.cjs → archive-icon.entry-718a1225.cjs} +1 -1
  5. package/dist/{arrow-icon.entry-1ebd553a.js → arrow-icon.entry-53337688.js} +1 -1
  6. package/dist/{arrow-icon.entry-024d613a.cjs → arrow-icon.entry-ca9625d3.cjs} +1 -1
  7. package/dist/{bold-icon.entry-8bc27b72.cjs → bold-icon.entry-36e679f1.cjs} +1 -1
  8. package/dist/{bold-icon.entry-17c78a12.js → bold-icon.entry-c6109b88.js} +1 -1
  9. package/dist/{button-component_2.entry-1095ad9f.js → button-component_2.entry-0a06b0c4.js} +1 -1
  10. package/dist/{button-component_2.entry-5cd0adf0.cjs → button-component_2.entry-a1b8cd03.cjs} +1 -1
  11. package/dist/calendar-agenda-fill-icon_54.entry-5b185e75.cjs +9 -0
  12. package/dist/{calendar-agenda-fill-icon_54.entry-6b2114d5.js → calendar-agenda-fill-icon_54.entry-e4d8ab10.js} +2146 -2478
  13. package/dist/{calendar-cancel-icon.entry-4c58ea10.cjs → calendar-cancel-icon.entry-22862d8c.cjs} +1 -1
  14. package/dist/{calendar-cancel-icon.entry-d27593a5.js → calendar-cancel-icon.entry-813a8330.js} +1 -1
  15. package/dist/{calendar-check-icon_2.entry-4a35f416.cjs → calendar-check-icon_2.entry-2ca25094.cjs} +1 -1
  16. package/dist/{calendar-check-icon_2.entry-38e1140b.js → calendar-check-icon_2.entry-79d381ce.js} +1 -1
  17. package/dist/{calendar-icon.entry-002ee369.cjs → calendar-icon.entry-78bb4f9b.cjs} +1 -1
  18. package/dist/{calendar-icon.entry-4543de86.js → calendar-icon.entry-d52951b0.js} +1 -1
  19. package/dist/{checkbox-component_2.entry-cf15106d.js → checkbox-component_2.entry-1219f0cf.js} +1 -1
  20. package/dist/{checkbox-component_2.entry-ad4ab088.cjs → checkbox-component_2.entry-a6114846.cjs} +1 -1
  21. package/dist/{chevron-icon_3.entry-5e60a853.js → chevron-icon_3.entry-82878ccf.js} +26 -22
  22. package/dist/chevron-icon_3.entry-d8f195dc.cjs +1 -0
  23. package/dist/{clock-icon_4.entry-d03310ae.js → clock-icon_4.entry-9ab4bc41.js} +1 -1
  24. package/dist/{clock-icon_4.entry-8348282a.cjs → clock-icon_4.entry-e081ccca.cjs} +1 -1
  25. package/dist/{constants-c549b12b-7ea4c7f5.js → constants-35df11e7-b37e3406.js} +1 -1
  26. package/dist/{constants-c549b12b-c85413b1.cjs → constants-35df11e7-d87ad6d9.cjs} +1 -1
  27. package/dist/{copy-icon.entry-5337f980.cjs → copy-icon.entry-9c6f38c2.cjs} +1 -1
  28. package/dist/{copy-icon.entry-3ea78e28.js → copy-icon.entry-9d6e0f48.js} +1 -1
  29. package/dist/{delete-icon.entry-87b2daaa.cjs → delete-icon.entry-6ec9c80d.cjs} +1 -1
  30. package/dist/{delete-icon.entry-480ac215.js → delete-icon.entry-fd8dc119.js} +1 -1
  31. package/dist/{document-refresh-icon.entry-665a7947.js → document-refresh-icon.entry-2b531e97.js} +1 -1
  32. package/dist/{document-refresh-icon.entry-6be2b468.cjs → document-refresh-icon.entry-bea78baf.cjs} +1 -1
  33. package/dist/{feedbackSync-b56b29ed-36483932.js → feedbackSync-b56b29ed-a7e9f258.js} +1 -1
  34. package/dist/{feedbackSync-b56b29ed-599103b9.cjs → feedbackSync-b56b29ed-cdcec5be.cjs} +1 -1
  35. package/dist/{folder-icon.entry-89f0974f.cjs → folder-icon.entry-485465be.cjs} +1 -1
  36. package/dist/{folder-icon.entry-9bf864d7.js → folder-icon.entry-6a43630e.js} +1 -1
  37. package/dist/{forward-icon.entry-2b0167a7.js → forward-icon.entry-514ea4a8.js} +1 -1
  38. package/dist/{forward-icon.entry-699c55d9.cjs → forward-icon.entry-a1af9122.cjs} +1 -1
  39. package/dist/{globe-icon.entry-3d08a9c4.cjs → globe-icon.entry-970082a4.cjs} +1 -1
  40. package/dist/{globe-icon.entry-5d962e7a.js → globe-icon.entry-adcff451.js} +1 -1
  41. package/dist/google-logo-icon_4.entry-21cb4b95.cjs +1 -0
  42. package/dist/{google-logo-icon_4.entry-ec724f2e.js → google-logo-icon_4.entry-2b68fe81.js} +309 -302
  43. package/dist/{inbox-icon.entry-45414f66.cjs → inbox-icon.entry-94507d27.cjs} +1 -1
  44. package/dist/{inbox-icon.entry-2020fa96.js → inbox-icon.entry-d3e42f82.js} +1 -1
  45. package/dist/{index-2b208d5d.js → index-9dc1bd32.js} +511 -511
  46. package/dist/{index-bf124f70.cjs → index-bec58f1d.cjs} +16 -16
  47. package/dist/{index.es-c7ca1bad-70899f2a.js → index.es-c7ca1bad-38475209.js} +1 -1
  48. package/dist/{index.es-c7ca1bad-67a99f41.cjs → index.es-c7ca1bad-5652d50c.cjs} +1 -1
  49. package/dist/{info-icon_2.entry-b98a2882.js → info-icon_2.entry-3b5a2c7f.js} +1 -1
  50. package/dist/{info-icon_2.entry-237205a0.cjs → info-icon_2.entry-e23f3ffd.cjs} +1 -1
  51. package/dist/{input-color-picker.entry-684413c1.js → input-color-picker.entry-9bc48bd3.js} +1 -1
  52. package/dist/{input-color-picker.entry-8fe3482d.cjs → input-color-picker.entry-b4ea90c5.cjs} +1 -1
  53. package/dist/{input-component.entry-bcd13373.cjs → input-component.entry-e567ec08.cjs} +1 -1
  54. package/dist/{input-component.entry-00b97287.js → input-component.entry-ebae3a8a.js} +1 -1
  55. package/dist/{input-dropdown.entry-3c39e23a.js → input-dropdown.entry-1f704009.js} +1 -1
  56. package/dist/{input-dropdown.entry-b26475c4.cjs → input-dropdown.entry-597cd5a8.cjs} +1 -1
  57. package/dist/{italic-icon.entry-2199bb17.js → italic-icon.entry-08593dd0.js} +1 -1
  58. package/dist/{italic-icon.entry-14081a02.cjs → italic-icon.entry-8f614353.cjs} +1 -1
  59. package/dist/{multi-select-dropdown.entry-2141b848.js → multi-select-dropdown.entry-5f1c73f3.js} +1 -1
  60. package/dist/{multi-select-dropdown.entry-7b66d2ae.cjs → multi-select-dropdown.entry-eb978e22.cjs} +1 -1
  61. package/dist/nylas-booked-event-card_12.entry-73785c5c.cjs +1 -0
  62. package/dist/{nylas-booked-event-card_12.entry-2d88375a.js → nylas-booked-event-card_12.entry-c4043d8f.js} +322 -253
  63. package/dist/{nylas-form-card.entry-1e9225b0.cjs → nylas-form-card.entry-1540207c.cjs} +1 -1
  64. package/dist/{nylas-form-card.entry-a8a44a3b.js → nylas-form-card.entry-80688e35.js} +2 -2
  65. package/dist/{nylas-if-state.entry-32b11afa.js → nylas-if-state.entry-037d0454.js} +2 -2
  66. package/dist/{nylas-if-state.entry-473230a6.cjs → nylas-if-state.entry-e5155b5b.cjs} +1 -1
  67. package/dist/{nylas-login.entry-995b6f99.cjs → nylas-login.entry-b3d73ab9.cjs} +1 -1
  68. package/dist/{nylas-login.entry-d663205c.js → nylas-login.entry-d157a6ed.js} +2 -2
  69. package/dist/{nylas-provider.entry-050f20bd.cjs → nylas-provider.entry-884ba204.cjs} +1 -1
  70. package/dist/{nylas-provider.entry-c24474c3.js → nylas-provider.entry-cf4b8b57.js} +4 -4
  71. package/dist/{nylas-scheduler-editor.entry-3b834bb1.cjs → nylas-scheduler-editor.entry-6f76d0d5.cjs} +2 -2
  72. package/dist/{nylas-scheduler-editor.entry-5c0a5fb4.js → nylas-scheduler-editor.entry-e731ca4a.js} +8 -9
  73. package/dist/{nylas-scheduling.entry-04c3951e.js → nylas-scheduling.entry-86b18d85.js} +18 -16
  74. package/dist/nylas-scheduling.entry-c8ee9a2a.cjs +1 -0
  75. package/dist/{nylas-time-window-picker.entry-678a7dbf.js → nylas-time-window-picker.entry-393e855b.js} +1 -1
  76. package/dist/{nylas-time-window-picker.entry-337d03c1.cjs → nylas-time-window-picker.entry-f9687046.cjs} +1 -1
  77. package/dist/{person-icon.entry-3fee5bc4.cjs → person-icon.entry-1b5dcd2e.cjs} +1 -1
  78. package/dist/{person-icon.entry-902b2c0d.js → person-icon.entry-b5ccb1f4.js} +1 -1
  79. package/dist/{play-icon.entry-a7f648f7.cjs → play-icon.entry-3f2e7e31.cjs} +1 -1
  80. package/dist/{play-icon.entry-1078da37.js → play-icon.entry-5e51d961.js} +1 -1
  81. package/dist/react.cjs +1 -1
  82. package/dist/react.js +1 -1
  83. package/dist/{refresh-icon.entry-06f9d181.cjs → refresh-icon.entry-3d241ffd.cjs} +1 -1
  84. package/dist/{refresh-icon.entry-5399f64b.js → refresh-icon.entry-9beaa8e1.js} +1 -1
  85. package/dist/{register-component-3444af44-6d269634.cjs → register-component-3444af44-890ac950.cjs} +1 -1
  86. package/dist/{register-component-3444af44-3d6e535a.js → register-component-3444af44-94783766.js} +1 -1
  87. package/dist/{reply-all-icon.entry-a3a20f76.js → reply-all-icon.entry-6b55d3b3.js} +1 -1
  88. package/dist/{reply-all-icon.entry-70ffe5be.cjs → reply-all-icon.entry-a0fcbf30.cjs} +1 -1
  89. package/dist/{reply-icon.entry-302ed745.js → reply-icon.entry-c709b46f.js} +1 -1
  90. package/dist/{reply-icon.entry-a08c0e57.cjs → reply-icon.entry-c7d0d967.cjs} +1 -1
  91. package/dist/{scheduler-config-store-ed4a8dfd-81687f55.js → scheduler-config-store-ed4a8dfd-13c1c187.js} +1 -1
  92. package/dist/{scheduler-config-store-ed4a8dfd-34c4c119.cjs → scheduler-config-store-ed4a8dfd-ba68cc09.cjs} +1 -1
  93. package/dist/{scheduler-store-2e7db190-fb6a20a1.cjs → scheduler-store-ecd15be2-8f7d171f.cjs} +1 -1
  94. package/dist/{scheduler-store-2e7db190-c648278f.js → scheduler-store-ecd15be2-d2ef4ac2.js} +2 -2
  95. package/dist/{sent-icon.entry-6396b793.cjs → sent-icon.entry-9083bca9.cjs} +1 -1
  96. package/dist/{sent-icon.entry-4d7b65ba.js → sent-icon.entry-b65083f4.js} +1 -1
  97. package/dist/{spam-icon.entry-45e7b83b.js → spam-icon.entry-120eca46.js} +1 -1
  98. package/dist/{spam-icon.entry-8648a315.cjs → spam-icon.entry-e6c1a82a.cjs} +1 -1
  99. package/dist/{star-icon.entry-61c36332.js → star-icon.entry-e3563c0b.js} +1 -1
  100. package/dist/{star-icon.entry-1c416cef.cjs → star-icon.entry-efbc2679.cjs} +1 -1
  101. package/dist/{stop-icon.entry-d68aa652.cjs → stop-icon.entry-8d07d719.cjs} +1 -1
  102. package/dist/{stop-icon.entry-089ac3ba.js → stop-icon.entry-ab5cf663.js} +1 -1
  103. package/dist/{textarea-component.entry-502c8659.cjs → textarea-component.entry-93be4a65.cjs} +1 -1
  104. package/dist/{textarea-component.entry-8f5d835f.js → textarea-component.entry-a0ef9f03.js} +1 -1
  105. package/dist/{time-period-selector.entry-001a1c59.cjs → time-period-selector.entry-16f96af9.cjs} +1 -1
  106. package/dist/{time-period-selector.entry-7da7d316.js → time-period-selector.entry-2a86f48f.js} +1 -1
  107. package/dist/{translate-icon.entry-4ee80d22.cjs → translate-icon.entry-868948d3.cjs} +1 -1
  108. package/dist/{translate-icon.entry-5166d376.js → translate-icon.entry-d632b37b.js} +1 -1
  109. package/dist/{trash-fill-icon.entry-2f814465.cjs → trash-fill-icon.entry-88dfffbc.cjs} +1 -1
  110. package/dist/{trash-fill-icon.entry-49844a82.js → trash-fill-icon.entry-eeab235e.js} +1 -1
  111. package/dist/{underline-icon.entry-4ba93e7b.cjs → underline-icon.entry-35430c19.cjs} +1 -1
  112. package/dist/{underline-icon.entry-181f1d7e.js → underline-icon.entry-65e42dcf.js} +1 -1
  113. package/dist/{warning-icon.entry-2406b765.js → warning-icon.entry-bab6d190.js} +1 -1
  114. package/dist/{warning-icon.entry-44ac5566.cjs → warning-icon.entry-e7714a43.cjs} +1 -1
  115. package/package.json +3 -3
  116. package/dist/add-circle-icon_2.entry-95b23b9d.js +0 -25
  117. package/dist/add-circle-icon_2.entry-ae11c837.cjs +0 -1
  118. package/dist/archive-icon.entry-2ead8ef0.cjs +0 -1
  119. package/dist/archive-icon.entry-b28d195c.js +0 -15
  120. package/dist/arrow-icon.entry-8de38831.cjs +0 -1
  121. package/dist/arrow-icon.entry-e29d7a6c.js +0 -15
  122. package/dist/bold-icon.entry-316f5e61.js +0 -15
  123. package/dist/bold-icon.entry-caf96585.cjs +0 -1
  124. package/dist/button-component_2.entry-531a725d.js +0 -26
  125. package/dist/button-component_2.entry-64a41161.cjs +0 -1
  126. package/dist/calendar-agenda-fill-icon_54.entry-84e72636.js +0 -5656
  127. package/dist/calendar-agenda-fill-icon_54.entry-abb96e20.cjs +0 -10
  128. package/dist/calendar-agenda-fill-icon_54.entry-f5577fdb.cjs +0 -10
  129. package/dist/calendar-cancel-icon.entry-f11e5aaa.cjs +0 -1
  130. package/dist/calendar-cancel-icon.entry-f1a6f9bc.js +0 -15
  131. package/dist/calendar-check-icon_2.entry-52187599.cjs +0 -1
  132. package/dist/calendar-check-icon_2.entry-7f17a3a6.js +0 -25
  133. package/dist/calendar-icon.entry-3c5c97d4.cjs +0 -1
  134. package/dist/calendar-icon.entry-b76e26e6.js +0 -15
  135. package/dist/checkbox-component_2.entry-b24885e9.cjs +0 -1
  136. package/dist/checkbox-component_2.entry-e4a3dd2d.js +0 -79
  137. package/dist/chevron-icon_3.entry-582df6f7.cjs +0 -1
  138. package/dist/chevron-icon_3.entry-59d8b408.cjs +0 -1
  139. package/dist/chevron-icon_3.entry-cab72db3.js +0 -143
  140. package/dist/clock-icon_4.entry-f6b9f85d.js +0 -45
  141. package/dist/clock-icon_4.entry-fcbc39b0.cjs +0 -1
  142. package/dist/copy-icon.entry-430beab4.js +0 -15
  143. package/dist/copy-icon.entry-74a59fc5.cjs +0 -1
  144. package/dist/delete-icon.entry-9c1af040.js +0 -15
  145. package/dist/delete-icon.entry-e320cde1.cjs +0 -1
  146. package/dist/document-refresh-icon.entry-930ee2b7.js +0 -15
  147. package/dist/document-refresh-icon.entry-fcde4ff6.cjs +0 -1
  148. package/dist/feedbackSync-b56b29ed-7a7c650e.cjs +0 -448
  149. package/dist/feedbackSync-b56b29ed-9e38fdb6.js +0 -6035
  150. package/dist/folder-icon.entry-977e50eb.cjs +0 -1
  151. package/dist/folder-icon.entry-b80d8fd7.js +0 -15
  152. package/dist/forward-icon.entry-c4c20f31.cjs +0 -1
  153. package/dist/forward-icon.entry-eb64aa16.js +0 -15
  154. package/dist/globe-icon.entry-5ef1dc42.cjs +0 -1
  155. package/dist/globe-icon.entry-667987bd.js +0 -15
  156. package/dist/google-logo-icon_4.entry-12f1492f.cjs +0 -1
  157. package/dist/google-logo-icon_4.entry-bd4d2237.cjs +0 -1
  158. package/dist/google-logo-icon_4.entry-fc38681e.js +0 -729
  159. package/dist/inbox-icon.entry-49353988.js +0 -15
  160. package/dist/inbox-icon.entry-b556231f.cjs +0 -1
  161. package/dist/index-290b2932.cjs +0 -81
  162. package/dist/index-fb096a02.js +0 -13011
  163. package/dist/index.es-c7ca1bad-b7a3e6bd.cjs +0 -7
  164. package/dist/index.es-c7ca1bad-cb3a99a7.js +0 -3129
  165. package/dist/info-icon_2.entry-caf64c28.cjs +0 -1
  166. package/dist/info-icon_2.entry-d935e5c2.js +0 -34
  167. package/dist/input-color-picker.entry-752534de.js +0 -48
  168. package/dist/input-color-picker.entry-f856fce3.cjs +0 -1
  169. package/dist/input-component.entry-4400f98e.js +0 -70
  170. package/dist/input-component.entry-d486907a.cjs +0 -1
  171. package/dist/input-dropdown.entry-bea3c690.js +0 -134
  172. package/dist/input-dropdown.entry-d3d4e50e.cjs +0 -1
  173. package/dist/italic-icon.entry-63726952.cjs +0 -1
  174. package/dist/italic-icon.entry-a3c87e5e.js +0 -15
  175. package/dist/multi-select-dropdown.entry-8a2c4b42.cjs +0 -1
  176. package/dist/multi-select-dropdown.entry-cdd97d65.js +0 -95
  177. package/dist/nylas-booked-event-card_12.entry-20c254bb.cjs +0 -1
  178. package/dist/nylas-booked-event-card_12.entry-90a0b6c7.cjs +0 -1
  179. package/dist/nylas-booked-event-card_12.entry-bbd7cfb0.js +0 -1237
  180. package/dist/nylas-form-card.entry-d6287d76.cjs +0 -1
  181. package/dist/nylas-form-card.entry-fadd7718.js +0 -57
  182. package/dist/nylas-if-state.entry-8be8107e.js +0 -94
  183. package/dist/nylas-if-state.entry-9c341f13.cjs +0 -1
  184. package/dist/nylas-login.entry-b9c2fb27.cjs +0 -1
  185. package/dist/nylas-login.entry-e3a9c5c1.js +0 -73
  186. package/dist/nylas-provider.entry-5b54f2cc.cjs +0 -1
  187. package/dist/nylas-provider.entry-ca3e06ce.js +0 -264
  188. package/dist/nylas-scheduler-editor.entry-b86f49a1.js +0 -1447
  189. package/dist/nylas-scheduler-editor.entry-d52db29e.cjs +0 -2
  190. package/dist/nylas-scheduling.entry-a5c4b050.js +0 -412
  191. package/dist/nylas-scheduling.entry-d549c5c3.cjs +0 -1
  192. package/dist/nylas-scheduling.entry-ed12a4f6.cjs +0 -1
  193. package/dist/nylas-time-window-picker.entry-4aefade8.cjs +0 -1
  194. package/dist/nylas-time-window-picker.entry-ecc3ee10.js +0 -316
  195. package/dist/person-icon.entry-9680bc2b.js +0 -15
  196. package/dist/person-icon.entry-dede7140.cjs +0 -1
  197. package/dist/play-icon.entry-c8f3a5d8.cjs +0 -1
  198. package/dist/play-icon.entry-dacc3aa6.js +0 -15
  199. package/dist/refresh-icon.entry-555a38ec.cjs +0 -1
  200. package/dist/refresh-icon.entry-d4dcfc3a.js +0 -15
  201. package/dist/register-component-3444af44-4a273c0a.js +0 -109
  202. package/dist/register-component-3444af44-d3e7252a.cjs +0 -1
  203. package/dist/reply-all-icon.entry-bb2a88ad.js +0 -15
  204. package/dist/reply-all-icon.entry-f8a32be1.cjs +0 -1
  205. package/dist/reply-icon.entry-423fb307.js +0 -15
  206. package/dist/reply-icon.entry-d2da8972.cjs +0 -1
  207. package/dist/scheduler-config-store-ed4a8dfd-474f6252.cjs +0 -1
  208. package/dist/scheduler-config-store-ed4a8dfd-fe2b9d18.js +0 -26
  209. package/dist/scheduler-store-5fbba021-09da63cf.cjs +0 -1
  210. package/dist/scheduler-store-5fbba021-6298edf3.js +0 -484
  211. package/dist/sent-icon.entry-6ed4170a.js +0 -15
  212. package/dist/sent-icon.entry-db89fd38.cjs +0 -1
  213. package/dist/spam-icon.entry-81073952.js +0 -15
  214. package/dist/spam-icon.entry-cf05a2a7.cjs +0 -1
  215. package/dist/star-icon.entry-8279e6a9.cjs +0 -1
  216. package/dist/star-icon.entry-bb26cc4e.js +0 -15
  217. package/dist/stop-icon.entry-f62d063b.js +0 -15
  218. package/dist/stop-icon.entry-f88a5a2a.cjs +0 -1
  219. package/dist/textarea-component.entry-d4a682fa.js +0 -37
  220. package/dist/textarea-component.entry-e06ee834.cjs +0 -1
  221. package/dist/time-period-selector.entry-837b9be3.js +0 -80
  222. package/dist/time-period-selector.entry-c5b6d0c9.cjs +0 -1
  223. package/dist/translate-icon.entry-c1a623d8.cjs +0 -1
  224. package/dist/translate-icon.entry-e5cfae44.js +0 -15
  225. package/dist/trash-fill-icon.entry-85e0e841.js +0 -15
  226. package/dist/trash-fill-icon.entry-def90241.cjs +0 -1
  227. package/dist/underline-icon.entry-72dadbdf.cjs +0 -1
  228. package/dist/underline-icon.entry-f7a75755.js +0 -15
  229. package/dist/warning-icon.entry-5b6aeb2b.cjs +0 -1
  230. package/dist/warning-icon.entry-ef601856.js +0 -15
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bf124f70.cjs"),i=require("./register-component-3444af44-d3e7252a.cjs");require("react");require("react-dom");const b=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-form-card{width:100%;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-form-card__header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}',y=b;var m=function(a,n,t,r){var d=arguments.length,s=d<3?n:r===null?r=Object.getOwnPropertyDescriptor(n,t):r,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(a,n,t,r);else for(var l=a.length-1;l>=0;l--)(c=a[l])&&(s=(d<3?c(s):d>3?c(n,t,s):c(n,t))||s);return d>3&&s&&Object.defineProperty(n,t,s),s},o=function(a,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(a,n)};const f=class{constructor(a){e.registerInstance(this,a),a.$hostElement$["s-ei"]?this.internals=a.$hostElement$["s-ei"]:(this.internals=a.$hostElement$.attachInternals(),a.$hostElement$["s-ei"]=this.internals)}connectedCallback(){e.debug("nylas-event-card","connectedCallback")}componentWillLoad(){e.debug("nylas-event-card","componentWillLoad")}componentDidLoad(){e.debug("nylas-event-card","componentDidLoad")}disconnectedCallback(){e.debug("nylas-event-card","disconnectedCallback");const a=["header-title","header-subtitle","content"];e.checkForMissingSlots(a,this.host)}render(){return e.h(e.Host,{key:"5ccd047d1a8bb515dea8aa7b9d7d39265afc31c9"},e.h("div",{key:"c40f52eaa4d099d92d65b0df662cd2de1b5f35c7",class:"nylas-form-card",part:"nfc"},e.h("div",{key:"545dabd81dce9b4f6f5f1d129071e1136f62e609",class:"nylas-form-card__header",part:"nfc__header"},e.h("slot",{key:"2be9b24f91316235be7132a6466cd16b9dfe813c",name:"header-title"}),e.h("slot",{key:"3414a084465efc50a3856291dff61d8ef3b3c617",name:"header-subtitle"})),e.h("div",{key:"cc07650a55afd7fc5d2429ff3611168977775bc8",class:"nylas-form-card__content"},e.h("slot",{key:"d50dd8dfbfea1ad84876495e72dd03102e2bc0dc",name:"content"}))))}static get formAssociated(){return!0}get host(){return e.getElement(this)}};m([i.RegisterComponent({name:"nylas-form-card",eventToProps:{},fireRegisterEvent:!0}),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],f.prototype,"render",null);f.style=y;exports.nylas_form_card=f;
@@ -1,57 +0,0 @@
1
- import { r as b, d as c, K as y, h as n, H as m, g as p } from "./index-2b208d5d.js";
2
- import { R as u } from "./register-component-3444af44-3d6e535a.js";
3
- import "react";
4
- import "react-dom";
5
- const h = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-form-card{width:100%;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-form-card__header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}', v = h;
6
- var _ = function(e, a, t, r) {
7
- var d = arguments.length, s = d < 3 ? a : r === null ? r = Object.getOwnPropertyDescriptor(a, t) : r, l;
8
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
9
- s = Reflect.decorate(e, a, t, r);
10
- else
11
- for (var o = e.length - 1; o >= 0; o--)
12
- (l = e[o]) && (s = (d < 3 ? l(s) : d > 3 ? l(a, t, s) : l(a, t)) || s);
13
- return d > 3 && s && Object.defineProperty(a, t, s), s;
14
- }, f = function(e, a) {
15
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
16
- return Reflect.metadata(e, a);
17
- };
18
- const i = class {
19
- constructor(e) {
20
- b(this, e), e.$hostElement$["s-ei"] ? this.internals = e.$hostElement$["s-ei"] : (this.internals = e.$hostElement$.attachInternals(), e.$hostElement$["s-ei"] = this.internals);
21
- }
22
- connectedCallback() {
23
- c("nylas-event-card", "connectedCallback");
24
- }
25
- componentWillLoad() {
26
- c("nylas-event-card", "componentWillLoad");
27
- }
28
- componentDidLoad() {
29
- c("nylas-event-card", "componentDidLoad");
30
- }
31
- disconnectedCallback() {
32
- c("nylas-event-card", "disconnectedCallback"), y(["header-title", "header-subtitle", "content"], this.host);
33
- }
34
- render() {
35
- return n(m, { key: "5ccd047d1a8bb515dea8aa7b9d7d39265afc31c9" }, n("div", { key: "c40f52eaa4d099d92d65b0df662cd2de1b5f35c7", class: "nylas-form-card", part: "nfc" }, n("div", { key: "545dabd81dce9b4f6f5f1d129071e1136f62e609", class: "nylas-form-card__header", part: "nfc__header" }, n("slot", { key: "2be9b24f91316235be7132a6466cd16b9dfe813c", name: "header-title" }), n("slot", { key: "3414a084465efc50a3856291dff61d8ef3b3c617", name: "header-subtitle" })), n("div", { key: "cc07650a55afd7fc5d2429ff3611168977775bc8", class: "nylas-form-card__content" }, n("slot", { key: "d50dd8dfbfea1ad84876495e72dd03102e2bc0dc", name: "content" }))));
36
- }
37
- static get formAssociated() {
38
- return !0;
39
- }
40
- get host() {
41
- return p(this);
42
- }
43
- };
44
- _([
45
- u({
46
- name: "nylas-form-card",
47
- eventToProps: {},
48
- fireRegisterEvent: !0
49
- }),
50
- f("design:type", Function),
51
- f("design:paramtypes", []),
52
- f("design:returntype", void 0)
53
- ], i.prototype, "render", null);
54
- i.style = v;
55
- export {
56
- i as nylas_form_card
57
- };
@@ -1,94 +0,0 @@
1
- import { r as h, d as o, h as l, H as u } from "./index-fb096a02.js";
2
- import { R as m } from "./register-component-3444af44-4a273c0a.js";
3
- import "react";
4
- import "react-dom";
5
- const p = ":host{display:block}div{height:inherit}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fade-in{animation:fadeIn 1.5s}.fade-out{animation:fadeOut 1.5s}@keyframes slideIn{0%{transform:translateY(100%)}100%{transform:translateY(0)}}@keyframes slideOut{0%{transform:translateY(0)}100%{transform:translateY(100%)}}.slide-in{animation:slideIn 1.5s}.slide-out{animation:slideOut 1.5s}@keyframes swipeIn{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes swipeOut{0%{transform:translateX(0)}100%{transform:translateX(100%)}}.swipe-in{animation:swipeIn 1.5s}.swipe-out{animation:swipeOut 1.5s}", y = p;
6
- var S = function(e, s, n, a) {
7
- var t = arguments.length, i = t < 3 ? s : a === null ? a = Object.getOwnPropertyDescriptor(s, n) : a, r;
8
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
9
- i = Reflect.decorate(e, s, n, a);
10
- else
11
- for (var f = e.length - 1; f >= 0; f--)
12
- (r = e[f]) && (i = (t < 3 ? r(i) : t > 3 ? r(s, n, i) : r(s, n)) || i);
13
- return t > 3 && i && Object.defineProperty(s, n, i), i;
14
- }, d = function(e, s) {
15
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
16
- return Reflect.metadata(e, s);
17
- };
18
- const c = class {
19
- constructor(e) {
20
- h(this, e), this.state = void 0, this.isStateSet = void 0, this.isBoolean = void 0, this.getStore = void 0, this.transition = "none", this.show = !1, this.classes = {}, this.initTransition = this.initTransition.bind(this);
21
- }
22
- connectedCallback() {
23
- }
24
- disconnectedCallback() {
25
- }
26
- async componentWillLoad() {
27
- o("[nylas-if-state] Component will load"), this.watchStore(!0);
28
- }
29
- async componentDidLoad() {
30
- o("[nylas-if-state] Component did load");
31
- }
32
- shouldRender() {
33
- const [e, s] = this.state ? this.state.split(".") : ["", ""], n = this.getStore;
34
- if (typeof n > "u")
35
- return o(`[nylas-if-state] Store name: ${e} | State name: ${s}`, { getStore: n }), !1;
36
- const a = n(e);
37
- if (typeof a > "u")
38
- return o(`[nylas-if-state] Store name: ${e} | State name: ${s}`, { store: a }), !1;
39
- const t = a.state[s];
40
- return typeof this.isStateSet == "boolean" ? this.isStateSet === !1 && (typeof t > "u" || t === null || t.length === 0) || this.isStateSet === !0 && typeof t < "u" && t !== null : typeof this.isBoolean == "boolean" ? this.isBoolean === !0 && typeof t < "u" && t === !0 || this.isBoolean === !1 && typeof t < "u" && t === !1 : !1;
41
- }
42
- onGetStoreChange() {
43
- this.watchStore(!0);
44
- }
45
- watchStore(e = !1) {
46
- const [s, n] = this.state ? this.state.split(".") : ["", ""], a = this.getStore;
47
- if (typeof a > "u")
48
- return o(`[nylas-if-state] Store name: ${s} | State name: ${n}`, { getStore: a }), null;
49
- const t = a(s);
50
- if (typeof t > "u")
51
- return o(`[nylas-if-state] Store name: ${s} | State name: ${n}`, { store: t }), null;
52
- e === !0 && this.initTransition(), t.onChange(n, this.initTransition);
53
- }
54
- initTransition() {
55
- const e = this.shouldRender();
56
- switch (this.transition) {
57
- case "fade":
58
- case "slide":
59
- case "swipe":
60
- this.classes = {
61
- [`${this.transition}-in`]: e,
62
- [`${this.transition}-out`]: !e
63
- }, setTimeout(() => {
64
- this.show = e;
65
- }, 150);
66
- break;
67
- default:
68
- this.show = this.shouldRender();
69
- break;
70
- }
71
- }
72
- render() {
73
- return l(u, { key: "4ab162229644e4d5d9d571af164b417c3e503e2c" }, l("div", { key: "f5b4dd56ac193ba63be4a7040bdb61d7a2e1da04", class: this.classes }, this.show && l("slot", null)));
74
- }
75
- static get watchers() {
76
- return {
77
- getStore: ["onGetStoreChange"]
78
- };
79
- }
80
- };
81
- S([
82
- m({
83
- name: "nylas-if-state",
84
- getStoresToProp: "getStore",
85
- fireRegisterEvent: !0
86
- }),
87
- d("design:type", Function),
88
- d("design:paramtypes", []),
89
- d("design:returntype", void 0)
90
- ], c.prototype, "render", null);
91
- c.style = y;
92
- export {
93
- c as nylas_if_state
94
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-290b2932.cjs"),u=require("./register-component-3444af44-6d269634.cjs");require("react");require("react-dom");const c=":host{display:block}div{height:inherit}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fade-in{animation:fadeIn 1.5s}.fade-out{animation:fadeOut 1.5s}@keyframes slideIn{0%{transform:translateY(100%)}100%{transform:translateY(0)}}@keyframes slideOut{0%{transform:translateY(0)}100%{transform:translateY(100%)}}.slide-in{animation:slideIn 1.5s}.slide-out{animation:slideOut 1.5s}@keyframes swipeIn{0%{transform:translateX(100%)}100%{transform:translateX(0)}}@keyframes swipeOut{0%{transform:translateX(0)}100%{transform:translateX(100%)}}.swipe-in{animation:swipeIn 1.5s}.swipe-out{animation:swipeOut 1.5s}",h=c;var m=function(e,n,s,a){var t=arguments.length,o=t<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,s):a,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,n,s,a);else for(var f=e.length-1;f>=0;f--)(r=e[f])&&(o=(t<3?r(o):t>3?r(n,s,o):r(n,s))||o);return t>3&&o&&Object.defineProperty(n,s,o),o},l=function(e,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,n)};const d=class{constructor(e){i.registerInstance(this,e),this.state=void 0,this.isStateSet=void 0,this.isBoolean=void 0,this.getStore=void 0,this.transition="none",this.show=!1,this.classes={},this.initTransition=this.initTransition.bind(this)}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){i.debug("[nylas-if-state] Component will load"),this.watchStore(!0)}async componentDidLoad(){i.debug("[nylas-if-state] Component did load")}shouldRender(){const[e,n]=this.state?this.state.split("."):["",""],s=this.getStore;if(typeof s>"u")return i.debug(`[nylas-if-state] Store name: ${e} | State name: ${n}`,{getStore:s}),!1;const a=s(e);if(typeof a>"u")return i.debug(`[nylas-if-state] Store name: ${e} | State name: ${n}`,{store:a}),!1;const t=a.state[n];return typeof this.isStateSet=="boolean"?this.isStateSet===!1&&(typeof t>"u"||t===null||t.length===0)||this.isStateSet===!0&&typeof t<"u"&&t!==null:typeof this.isBoolean=="boolean"?this.isBoolean===!0&&typeof t<"u"&&t===!0||this.isBoolean===!1&&typeof t<"u"&&t===!1:!1}onGetStoreChange(){this.watchStore(!0)}watchStore(e=!1){const[n,s]=this.state?this.state.split("."):["",""],a=this.getStore;if(typeof a>"u")return i.debug(`[nylas-if-state] Store name: ${n} | State name: ${s}`,{getStore:a}),null;const t=a(n);if(typeof t>"u")return i.debug(`[nylas-if-state] Store name: ${n} | State name: ${s}`,{store:t}),null;e===!0&&this.initTransition(),t.onChange(s,this.initTransition)}initTransition(){const e=this.shouldRender();switch(this.transition){case"fade":case"slide":case"swipe":this.classes={[`${this.transition}-in`]:e,[`${this.transition}-out`]:!e},setTimeout(()=>{this.show=e},150);break;default:this.show=this.shouldRender();break}}render(){return i.h(i.Host,{key:"4ab162229644e4d5d9d571af164b417c3e503e2c"},i.h("div",{key:"f5b4dd56ac193ba63be4a7040bdb61d7a2e1da04",class:this.classes},this.show&&i.h("slot",null)))}static get watchers(){return{getStore:["onGetStoreChange"]}}};m([u.RegisterComponent({name:"nylas-if-state",getStoresToProp:"getStore",fireRegisterEvent:!0}),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],d.prototype,"render",null);d.style=h;exports.nylas_if_state=d;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-bf124f70.cjs"),h=require("./register-component-3444af44-d3e7252a.cjs");require("react");require("react-dom");const u=":host{font-family:'Arial', sans-serif;background:var(--nylas-color-primary-50);color:var(--nylas-color-primary-800);margin:0;display:contents}input{box-sizing:border-box}.login-container{display:flex;justify-content:center;align-items:center;height:100%}.login-box{width:300px;padding:20px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-color-primary-50);text-align:center}.login-box h1{margin-top:0;margin-bottom:0.5em}.login-box p{margin-bottom:1em}.login-methods button{display:block;width:100%;padding:10px 10px 10px 50px;margin-bottom:10px;border:none;border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-color-primary-300);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-600);cursor:pointer;transition:background 0.3s ease;position:relative;text-align:left}.login-methods button svg{position:absolute;left:16px;top:50%;transform:translateY(-50%)}.login-methods button:hover{background:var(--nylas-color-primary-200);}.login-form label{display:block;margin-bottom:5px;text-align:left}.login-form input{width:100%;padding:10px;margin-bottom:10px;border:1px solid var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-800);}.login-form button{width:100%;padding:10px;border:none;border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-500);color:var(--nylas-color-primary-50);cursor:pointer;transition:background 0.3s ease}.login-form button:hover{background:var(--nylas-color-primary-600);}",p=u;var g=function(n,o,i,e){var a=arguments.length,r=a<3?o:e===null?e=Object.getOwnPropertyDescriptor(o,i):e,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(n,o,i,e);else for(var l=n.length-1;l>=0;l--)(s=n[l])&&(r=(a<3?s(r):a>3?s(o,i,r):s(o,i))||r);return a>3&&r&&Object.defineProperty(o,i,r),r},c=function(n,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,o)};const d=class{constructor(n){t.registerInstance(this,n),this.buttonClick=t.createEvent(this,"buttonClick",7),this._handleLoginRedirect=async()=>{var e;const o=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes));this.buttonClick.emit({url:o}).defaultPrevented||o&&(window.location.href=o)},this._onGoogleButtonClick=async o=>{var e;o.preventDefault();const i=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes,void 0,"google"));i&&(window.location.href=i)},this._onMicrosoftButtonClick=async o=>{var e;o.preventDefault();const i=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes,void 0,"microsoft"));i&&(window.location.href=i)},this._onFormSubmit=async o=>{var e;o.preventDefault();const i=await((e=this.nylasConnector)==null?void 0:e.auth.getHostedAuthRedirectURL(this.scopes,this.email));i&&(window.location.href=i)},this.isAuthenticated=!1,this.nylasConnector=void 0,this.scopes=void 0,this.loginMethod="redirect",this.companyName="Nylas",this.logoUrl="https://www.nylas.com/wp-content/uploads/main-logo.svg",this.logoWidth="min-content",this.providers="google,microsoft",this.buttonText="Login",this.email=""}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){}async componentDidLoad(){var o;await((o=this.nylasConnector)==null?void 0:o.auth.manageHostedAuthCodeExchange(window.location.href))&&window.history.replaceState({},document.title,window.location.pathname)}render(){var o;const n=((o=this.providers)==null?void 0:o.split(","))||[];return t.h(t.Host,{key:"0e8ae3287facdc3e67109cd57cb80a761897de76"},this.loginMethod==="redirect"&&t.h("div",{class:"redirect-container"},!this.isAuthenticated&&t.h("button",{part:"button",onClick:this._handleLoginRedirect},this.buttonText)),this.loginMethod==="emebded"&&t.h("main",{class:"login-container"},t.h("section",{class:"login-box"},t.h("header",null,t.h("img",{src:this.logoUrl,alt:`${this.companyName} logo`,width:"100%",style:{minWidth:this.logoWidth}}),t.h("h1",null,"Welcome")),t.h("p",null,"Log in to your account to continue to ",this.companyName),t.h("div",{class:"login-methods"},n.includes("google")&&t.h("button",{class:"login-google",onClick:this._onGoogleButtonClick},t.h("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"18",height:"18",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 256 262"},t.h("path",{fill:"#4285F4",d:"M255.6 131.6c0-8.2-.8-16.2-2.2-23.9H130v45.3h70.3c-3 16.1-12.4 29.7-26.3 38.9v32.4h42.6c25-23 39.4-56.7 39.4-97.7z"}),t.h("path",{fill:"#34A853",d:"M130 262c35.3 0 64.9-11.7 86.5-31.7l-42.6-32.4c-11.7 7.9-26.7 12.6-43.9 12.6-33.7 0-62.3-22.7-72.5-53.4H14.5v33.3A130.3 130.3 0 00130 262z"}),t.h("path",{fill:"#FBBC05",d:"M57.5 158.1a72.7 72.7 0 010-54.2V70.6H14.5a130.4 130.4 0 000 120.8l43-33.3z"}),t.h("path",{fill:"#EA4335",d:"M130 51.6c19 0 36 6.5 49.4 19.2l37-36C195 13.1 165.2 0 130 0A130.3 130.3 0 0014.5 70.6l43 33.3c10.2-30.7 38.8-53.3 72.5-53.3z"})),"Continue with Google"),n.includes("microsoft")&&t.h("button",{class:"login-microsoft",onClick:this._onMicrosoftButtonClick},t.h("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",role:"img",width:"18",height:"18",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 448 512"},t.h("path",{fill:"#F3F3F3",d:"M0 32v192h192V32H0zm256 0v192h192V32H256zm192 256v192h-192V288h192zM0 224v192h192V224H0z"})),"Continue with Microsoft")),t.h("form",{class:"login-form",method:"POST",onSubmit:this._onFormSubmit},t.h("label",{htmlFor:"email"},"Email"),t.h("input",{type:"email",id:"email",name:"email",required:!0,value:this.email}),t.h("button",{type:"submit"},"Next")))))}};g([h.RegisterComponent({name:"nylas-login",connectorToProp:"nylasConnector",stateToProps:new Map([["auth.isAuthenticated","isAuthenticated"]]),fireRegisterEvent:!0}),c("design:type",Function),c("design:paramtypes",[]),c("design:returntype",void 0)],d.prototype,"render",null);d.style=p;exports.nylas_login=d;
@@ -1,73 +0,0 @@
1
- import { r as h, c as p, h as o, H as u } from "./index-2b208d5d.js";
2
- import { R as m } from "./register-component-3444af44-3d6e535a.js";
3
- import "react";
4
- import "react-dom";
5
- const g = ":host{font-family:'Arial', sans-serif;background:var(--nylas-color-primary-50);color:var(--nylas-color-primary-800);margin:0;display:contents}input{box-sizing:border-box}.login-container{display:flex;justify-content:center;align-items:center;height:100%}.login-box{width:300px;padding:20px;box-shadow:0 4px 8px rgba(0, 0, 0, 0.1);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-color-primary-50);text-align:center}.login-box h1{margin-top:0;margin-bottom:0.5em}.login-box p{margin-bottom:1em}.login-methods button{display:block;width:100%;padding:10px 10px 10px 50px;margin-bottom:10px;border:none;border-radius:var(--nylas-border-radius);border:1px solid var(--nylas-color-primary-300);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-600);cursor:pointer;transition:background 0.3s ease;position:relative;text-align:left}.login-methods button svg{position:absolute;left:16px;top:50%;transform:translateY(-50%)}.login-methods button:hover{background:var(--nylas-color-primary-200);}.login-form label{display:block;margin-bottom:5px;text-align:left}.login-form input{width:100%;padding:10px;margin-bottom:10px;border:1px solid var(--nylas-color-primary-200);border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-100);color:var(--nylas-color-primary-800);}.login-form button{width:100%;padding:10px;border:none;border-radius:var(--nylas-border-radius);background:var(--nylas-color-primary-500);color:var(--nylas-color-primary-50);cursor:pointer;transition:background 0.3s ease}.login-form button:hover{background:var(--nylas-color-primary-600);}", y = g;
6
- var f = function(n, t, i, e) {
7
- var a = arguments.length, r = a < 3 ? t : e === null ? e = Object.getOwnPropertyDescriptor(t, i) : e, s;
8
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
9
- r = Reflect.decorate(n, t, i, e);
10
- else
11
- for (var l = n.length - 1; l >= 0; l--)
12
- (s = n[l]) && (r = (a < 3 ? s(r) : a > 3 ? s(t, i, r) : s(t, i)) || r);
13
- return a > 3 && r && Object.defineProperty(t, i, r), r;
14
- }, c = function(n, t) {
15
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
16
- return Reflect.metadata(n, t);
17
- };
18
- const d = class {
19
- constructor(n) {
20
- h(this, n), this.buttonClick = p(this, "buttonClick", 7), this._handleLoginRedirect = async () => {
21
- var e;
22
- const t = await ((e = this.nylasConnector) == null ? void 0 : e.auth.getHostedAuthRedirectURL(this.scopes));
23
- this.buttonClick.emit({ url: t }).defaultPrevented || t && (window.location.href = t);
24
- }, this._onGoogleButtonClick = async (t) => {
25
- var e;
26
- t.preventDefault();
27
- const i = await ((e = this.nylasConnector) == null ? void 0 : e.auth.getHostedAuthRedirectURL(this.scopes, void 0, "google"));
28
- i && (window.location.href = i);
29
- }, this._onMicrosoftButtonClick = async (t) => {
30
- var e;
31
- t.preventDefault();
32
- const i = await ((e = this.nylasConnector) == null ? void 0 : e.auth.getHostedAuthRedirectURL(this.scopes, void 0, "microsoft"));
33
- i && (window.location.href = i);
34
- }, this._onFormSubmit = async (t) => {
35
- var e;
36
- t.preventDefault();
37
- const i = await ((e = this.nylasConnector) == null ? void 0 : e.auth.getHostedAuthRedirectURL(this.scopes, this.email));
38
- i && (window.location.href = i);
39
- }, this.isAuthenticated = !1, this.nylasConnector = void 0, this.scopes = void 0, this.loginMethod = "redirect", this.companyName = "Nylas", this.logoUrl = "https://www.nylas.com/wp-content/uploads/main-logo.svg", this.logoWidth = "min-content", this.providers = "google,microsoft", this.buttonText = "Login", this.email = "";
40
- }
41
- connectedCallback() {
42
- }
43
- disconnectedCallback() {
44
- }
45
- componentWillLoad() {
46
- }
47
- async componentDidLoad() {
48
- var t;
49
- await ((t = this.nylasConnector) == null ? void 0 : t.auth.manageHostedAuthCodeExchange(window.location.href)) && window.history.replaceState({}, document.title, window.location.pathname);
50
- }
51
- render() {
52
- var t;
53
- const n = ((t = this.providers) == null ? void 0 : t.split(",")) || [];
54
- return o(u, { key: "0e8ae3287facdc3e67109cd57cb80a761897de76" }, this.loginMethod === "redirect" && o("div", { class: "redirect-container" }, !this.isAuthenticated && o("button", { part: "button", onClick: this._handleLoginRedirect }, this.buttonText)), this.loginMethod === "emebded" && o("main", { class: "login-container" }, o("section", { class: "login-box" }, o("header", null, o("img", { src: this.logoUrl, alt: `${this.companyName} logo`, width: "100%", style: {
55
- minWidth: this.logoWidth
56
- } }), o("h1", null, "Welcome")), o("p", null, "Log in to your account to continue to ", this.companyName), o("div", { class: "login-methods" }, n.includes("google") && o("button", { class: "login-google", onClick: this._onGoogleButtonClick }, o("svg", { xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "img", width: "18", height: "18", preserveAspectRatio: "xMidYMid meet", viewBox: "0 0 256 262" }, o("path", { fill: "#4285F4", d: "M255.6 131.6c0-8.2-.8-16.2-2.2-23.9H130v45.3h70.3c-3 16.1-12.4 29.7-26.3 38.9v32.4h42.6c25-23 39.4-56.7 39.4-97.7z" }), o("path", { fill: "#34A853", d: "M130 262c35.3 0 64.9-11.7 86.5-31.7l-42.6-32.4c-11.7 7.9-26.7 12.6-43.9 12.6-33.7 0-62.3-22.7-72.5-53.4H14.5v33.3A130.3 130.3 0 00130 262z" }), o("path", { fill: "#FBBC05", d: "M57.5 158.1a72.7 72.7 0 010-54.2V70.6H14.5a130.4 130.4 0 000 120.8l43-33.3z" }), o("path", { fill: "#EA4335", d: "M130 51.6c19 0 36 6.5 49.4 19.2l37-36C195 13.1 165.2 0 130 0A130.3 130.3 0 0014.5 70.6l43 33.3c10.2-30.7 38.8-53.3 72.5-53.3z" })), "Continue with Google"), n.includes("microsoft") && o("button", { class: "login-microsoft", onClick: this._onMicrosoftButtonClick }, o("svg", { xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "img", width: "18", height: "18", preserveAspectRatio: "xMidYMid meet", viewBox: "0 0 448 512" }, o("path", { fill: "#F3F3F3", d: "M0 32v192h192V32H0zm256 0v192h192V32H256zm192 256v192h-192V288h192zM0 224v192h192V224H0z" })), "Continue with Microsoft")), o("form", { class: "login-form", method: "POST", onSubmit: this._onFormSubmit }, o("label", { htmlFor: "email" }, "Email"), o("input", { type: "email", id: "email", name: "email", required: !0, value: this.email }), o("button", { type: "submit" }, "Next")))));
57
- }
58
- };
59
- f([
60
- m({
61
- name: "nylas-login",
62
- connectorToProp: "nylasConnector",
63
- stateToProps: /* @__PURE__ */ new Map([["auth.isAuthenticated", "isAuthenticated"]]),
64
- fireRegisterEvent: !0
65
- }),
66
- c("design:type", Function),
67
- c("design:paramtypes", []),
68
- c("design:returntype", void 0)
69
- ], d.prototype, "render", null);
70
- d.style = y;
71
- export {
72
- d as nylas_login
73
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-bf124f70.cjs"),l=require("./index.es-c7ca1bad-b7a3e6bd.cjs"),d=require("./scheduler-store-2e7db190-fb6a20a1.cjs"),y=require("./scheduler-config-store-ed4a8dfd-34c4c119.cjs");require("react");require("react-dom");class f{constructor(e,t){this.nylasAuth=e,this.nylasAuthStore=t}async validateSession(){const e=await this.isAccessTokenValid();if(!e)this.logout();else{let t=await this.nylasAuth.getTokenInfo();if(t){const r=Math.floor(Date.now()/1e3);if(t.expires_in&&t.expires_in-r<3e5&&(o.debug("[NylasAuthConnectorMixin] Refreshing access token"),t=await this.nylasAuth.refreshAccessToken(),!t)){o.debug("[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out."),this.logout();return}this.nylasAuthStore.state.tokenInfo=t}}this.nylasAuthStore.state.isAuthenticated=e}async isAuthenticated(){return this.nylasAuth.isAuthenticated()}async getTokenInfo(){return this.nylasAuth.getTokenInfo()}async isAccessTokenValid(){return this.nylasAuth.isAccessTokenValid()}async logout(){await this.nylasAuth.logout()}async getHostedAuthRedirectURL(e,t,n){return this.nylasAuth.getHostedAuthRedirectURL(e,t,n)}async manageHostedAuthCodeExchange(e){const n=new URL(e).searchParams.get("code");if(n){const r=await this.nylasAuth.exchangeAuthCodeForTokenInfo(n);if(r)return this.nylasAuthStore.state.tokenInfo=r,this.nylasAuthStore.state.isAuthenticated=!0,r}return null}}class C{constructor(e,t,n,r,i,a="https://api.us.nylas.com"){this.router=e,this.schedulerAPIURL=a,this.nylasAuth=t,this.nylasAuthStore=n,this.nylasSchedulerStore=r,this.nylasSchedulerConfigStore=i}init(){o.debug("NylasConnector init")}get authStore(){return this.nylasAuthStore}get schedulerStore(){return this.nylasSchedulerStore}get schedulerConfigStore(){return this.nylasSchedulerConfigStore}get auth(){return this._authConnector?this._authConnector:(this._authConnector=new f(this.nylasAuth,this.nylasAuthStore),this._authConnector)}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new d.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore}),this._schedulerAPIConnector)}getAuth(){return this.nylasAuth}resetStores(){this.nylasAuthStore.reset()}async logout(){await this.nylasAuth.logout(),this.resetStores()}}class A extends Event{constructor(e,t){super(e,t),this.oldURL=t.oldURL,this.newURL=t.newURL}}class R{constructor(){this.routeChangeListeners=[],o.debug("HashRouter constructor")}destroy(){o.debug("HashRouter destroy"),window.removeEventListener("hashchange",this.onRouteChange.bind(this))}init(){if(o.debug("HashRouter init"),window.addEventListener("hashchange",this.onRouteChange.bind(this)),typeof HashChangeEvent<"u"){const e=new HashChangeEvent("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(e)}else{const e=new A("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(e)}}addRouteChangeListener(e,t){o.debug("HashRouter addRouteChangeListener"),this.routeChangeListeners.push([e,t])}navigate(e,t){if(o.debug("HashRouter navigate"),t)return window.history.pushState(null,"",`#${e}`);window.location.hash=e}setRoute(e){o.debug("HashRouter setRoute"),window.location.hash=e}matchRoute(e,t){const n=e.split("/"),r=t.split("/");if(o.debug(`HashRouter matchRoute route=${e} path=${t}`,{routeParts:n,pathParts:r}),n[1]===""&&r[0]==="")return!0;if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const a=n[i],h=r[i];if(!a.startsWith(":")&&a!==h)return!1}return!0}getRouteParams(e){o.debug("HashRouter getRouteParams");const t={},n=e.split("/"),r=window.location.hash.split("/");return n.forEach((i,a)=>{if(i.startsWith(":")){const h=i.substring(1);t[h]=r[a]}}),t}getRouteWithParams(e,t){o.debug("HashRouter getRouteWithParams");let n=e;return Object.keys(t).forEach(r=>{n=n.replace(`:${r}`,t[r])}),n}getRoute(){return o.debug("HashRouter getRoute"),window.location.hash}onRouteChange(e){this.routeChangeListeners.forEach(async([t,n])=>{const r=e.newURL.indexOf("#")===-1?"":e.newURL.substring(e.newURL.indexOf("#")+1);if(o.debug(`HashRouter onRouteChange route=${t} path=${r}`,{event:e}),!this.matchRoute(t,r)){o.debug(`HashRouter onRouteChange route=${t} path=${r} does not match`);return}const i=this.getRouteParams(t);await n(t,r,i)})}getBasePath(){return o.debug("HashRouter getBasePath"),""}}function S(s={}){const e={isAuthenticated:!1,tokenInfo:null,state:"ready",...s},t=o.createStore(e);return t.reset=()=>{for(const n in e){const r=e[n];t.set(n,r)}},t}const b=":host{display:contents}",w=b,g=class{constructor(s){o.registerInstance(this,s),this.init=o.createEvent(this,"init",7),this.loggedIn=o.createEvent(this,"loggedIn",7),this.loggedOut=o.createEvent(this,"loggedOut",7),this.handleAuthChange=async e=>{e?this.loggedIn.emit(this.host):this.loggedOut.emit(this.host)},this.authConfig=void 0,this.eventOverrides={},this.automaticComponentRegistration=!0}connectedCallback(){o.debug("[nylas-provider] connectedCallback")}async componentWillLoad(){var i,a,h,u,c;o.debug("[nylas-provider] componentWillLoad"),this.stores={auth:S(),scheduler:d.CreateNylasSchedulerStore(),schedulerConfig:y.CreateNylasSchedulerConfigStore()},this.baseProvider=new l.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const s=new R;this.nylasAuth=l.es({apiUri:"https://api.us.nylas.com",elementsApiUri:"https://elements.us.nylas.com",storageType:"indexeddb",clientId:"YOUR_CLIENT_ID",defaultScopes:[],redirectURI:"/",...this.authConfig});const e=(i=this.baseProvider)==null?void 0:i.getStore("auth");if(!e)throw new Error("The auth store is not set");const t=(a=this.baseProvider)==null?void 0:a.getStore("scheduler");if(!t)throw new Error("The scheduler store is not set");const n=(h=this.baseProvider)==null?void 0:h.getStore("schedulerConfig");if(!n)throw new Error("The scheduler config store is not set");this.nylasConnector=new C(s,this.nylasAuth,e,t,n),this.init.emit(this.host).defaultPrevented||await((u=this.nylasConnector)==null?void 0:u.auth.validateSession()),this.handleAuthChange(e.state.isAuthenticated),(c=this.baseProvider)==null||c.componentWillLoad(this.nylasConnector)}componentDidLoad(){var e,t;const s=(e=this.baseProvider)==null?void 0:e.getStore("auth");s==null||s.onChange("isAuthenticated",this.handleAuthChange),(t=this.baseProvider)==null||t.componentDidLoad()}componentDisconnected(){var s;(s=this.baseProvider)==null||s.componentDisconnected()}async registerComponentHandler(s){var e;(e=this.baseProvider)==null||e.registerComponent(s.detail)}async unregisterComponentHandler(s){var e;(e=this.baseProvider)==null||e.unregisterComponent(s.detail)}async getNylasAuth(){return this.nylasAuth}async getNylasConnector(){return this.nylasConnector}async getAuthStore(){var s;return(s=this.baseProvider)==null?void 0:s.getStore("auth")}async getNylasSchedulerStore(){var s;return(s=this.baseProvider)==null?void 0:s.getStore("scheduler")}async getNylasSchedulerConfigStore(){var s;return(s=this.baseProvider)==null?void 0:s.getStore("schedulerConfig")}render(){return o.h(o.Host,{key:"a07ace4fe61c7f7ee20b723d1858f7ebac56ff95"},o.h("slot",{key:"7c10f2b5cf18450c28617b3f35215b720f1d8bd2"}))}get host(){return o.getElement(this)}};g.style=w;exports.nylas_provider=g;
@@ -1,264 +0,0 @@
1
- import { r as g, c as u, d as r, h as d, H as y, g as f, a as C } from "./index-fb096a02.js";
2
- import { N as A, e as R } from "./index.es-c7ca1bad-70899f2a.js";
3
- import { C as S, N as p } from "./scheduler-store-2e7db190-c648278f.js";
4
- import { C as m } from "./scheduler-config-store-ed4a8dfd-81687f55.js";
5
- import "react";
6
- import "react-dom";
7
- class w {
8
- constructor(t, e) {
9
- this.nylasAuth = t, this.nylasAuthStore = e;
10
- }
11
- async validateSession() {
12
- const t = await this.isAccessTokenValid();
13
- if (!t)
14
- this.logout();
15
- else {
16
- let e = await this.nylasAuth.getTokenInfo();
17
- if (e) {
18
- const o = Math.floor(Date.now() / 1e3);
19
- if (e.expires_in && e.expires_in - o < 3e5 && (r("[NylasAuthConnectorMixin] Refreshing access token"), e = await this.nylasAuth.refreshAccessToken(), !e)) {
20
- r("[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out."), this.logout();
21
- return;
22
- }
23
- this.nylasAuthStore.state.tokenInfo = e;
24
- }
25
- }
26
- this.nylasAuthStore.state.isAuthenticated = t;
27
- }
28
- async isAuthenticated() {
29
- return this.nylasAuth.isAuthenticated();
30
- }
31
- async getTokenInfo() {
32
- return this.nylasAuth.getTokenInfo();
33
- }
34
- async isAccessTokenValid() {
35
- return this.nylasAuth.isAccessTokenValid();
36
- }
37
- async logout() {
38
- await this.nylasAuth.logout();
39
- }
40
- async getHostedAuthRedirectURL(t, e, n) {
41
- return this.nylasAuth.getHostedAuthRedirectURL(t, e, n);
42
- }
43
- async manageHostedAuthCodeExchange(t) {
44
- const n = new URL(t).searchParams.get("code");
45
- if (n) {
46
- const o = await this.nylasAuth.exchangeAuthCodeForTokenInfo(n);
47
- if (o)
48
- return this.nylasAuthStore.state.tokenInfo = o, this.nylasAuthStore.state.isAuthenticated = !0, o;
49
- }
50
- return null;
51
- }
52
- }
53
- class P {
54
- constructor(t, e, n, o, a, i = "https://api.us.nylas.com") {
55
- this.router = t, this.schedulerAPIURL = i, this.nylasAuth = e, this.nylasAuthStore = n, this.nylasSchedulerStore = o, this.nylasSchedulerConfigStore = a;
56
- }
57
- init() {
58
- r("NylasConnector init");
59
- }
60
- get authStore() {
61
- return this.nylasAuthStore;
62
- }
63
- get schedulerStore() {
64
- return this.nylasSchedulerStore;
65
- }
66
- get schedulerConfigStore() {
67
- return this.nylasSchedulerConfigStore;
68
- }
69
- get auth() {
70
- return this._authConnector ? this._authConnector : (this._authConnector = new w(this.nylasAuth, this.nylasAuthStore), this._authConnector);
71
- }
72
- get scheduler() {
73
- return this._schedulerAPIConnector ? this._schedulerAPIConnector : (this._schedulerAPIConnector = new p({
74
- schedulerAPIURL: this.schedulerAPIURL,
75
- schedulerStore: this.schedulerStore
76
- }), this._schedulerAPIConnector);
77
- }
78
- getAuth() {
79
- return this.nylasAuth;
80
- }
81
- resetStores() {
82
- this.nylasAuthStore.reset();
83
- }
84
- async logout() {
85
- await this.nylasAuth.logout(), this.resetStores();
86
- }
87
- }
88
- class v extends Event {
89
- constructor(t, e) {
90
- super(t, e), this.oldURL = e.oldURL, this.newURL = e.newURL;
91
- }
92
- }
93
- class L {
94
- constructor() {
95
- this.routeChangeListeners = [], r("HashRouter constructor");
96
- }
97
- destroy() {
98
- r("HashRouter destroy"), window.removeEventListener("hashchange", this.onRouteChange.bind(this));
99
- }
100
- init() {
101
- if (r("HashRouter init"), window.addEventListener("hashchange", this.onRouteChange.bind(this)), typeof HashChangeEvent < "u") {
102
- const t = new HashChangeEvent("hashchange", { oldURL: "", newURL: window.location.href });
103
- this.onRouteChange(t);
104
- } else {
105
- const t = new v("hashchange", { oldURL: "", newURL: window.location.href });
106
- this.onRouteChange(t);
107
- }
108
- }
109
- addRouteChangeListener(t, e) {
110
- r("HashRouter addRouteChangeListener"), this.routeChangeListeners.push([t, e]);
111
- }
112
- navigate(t, e) {
113
- if (r("HashRouter navigate"), e)
114
- return window.history.pushState(null, "", `#${t}`);
115
- window.location.hash = t;
116
- }
117
- setRoute(t) {
118
- r("HashRouter setRoute"), window.location.hash = t;
119
- }
120
- matchRoute(t, e) {
121
- const n = t.split("/"), o = e.split("/");
122
- if (r(`HashRouter matchRoute route=${t} path=${e}`, { routeParts: n, pathParts: o }), n[1] === "" && o[0] === "")
123
- return !0;
124
- if (n.length !== o.length)
125
- return !1;
126
- for (let a = 0; a < n.length; a++) {
127
- const i = n[a], h = o[a];
128
- if (!i.startsWith(":") && i !== h)
129
- return !1;
130
- }
131
- return !0;
132
- }
133
- getRouteParams(t) {
134
- r("HashRouter getRouteParams");
135
- const e = {}, n = t.split("/"), o = window.location.hash.split("/");
136
- return n.forEach((a, i) => {
137
- if (a.startsWith(":")) {
138
- const h = a.substring(1);
139
- e[h] = o[i];
140
- }
141
- }), e;
142
- }
143
- getRouteWithParams(t, e) {
144
- r("HashRouter getRouteWithParams");
145
- let n = t;
146
- return Object.keys(e).forEach((o) => {
147
- n = n.replace(`:${o}`, e[o]);
148
- }), n;
149
- }
150
- getRoute() {
151
- return r("HashRouter getRoute"), window.location.hash;
152
- }
153
- onRouteChange(t) {
154
- this.routeChangeListeners.forEach(async ([e, n]) => {
155
- const o = t.newURL.indexOf("#") === -1 ? "" : t.newURL.substring(t.newURL.indexOf("#") + 1);
156
- if (r(`HashRouter onRouteChange route=${e} path=${o}`, { event: t }), !this.matchRoute(e, o)) {
157
- r(`HashRouter onRouteChange route=${e} path=${o} does not match`);
158
- return;
159
- }
160
- const a = this.getRouteParams(e);
161
- await n(e, o, a);
162
- });
163
- }
164
- getBasePath() {
165
- return r("HashRouter getBasePath"), "";
166
- }
167
- }
168
- function b(s = {}) {
169
- const t = {
170
- isAuthenticated: !1,
171
- tokenInfo: null,
172
- state: "ready",
173
- ...s
174
- }, e = C(t);
175
- return e.reset = () => {
176
- for (const n in t) {
177
- const o = t[n];
178
- e.set(n, o);
179
- }
180
- }, e;
181
- }
182
- const H = ":host{display:contents}", I = H, k = class {
183
- constructor(s) {
184
- g(this, s), this.init = u(this, "init", 7), this.loggedIn = u(this, "loggedIn", 7), this.loggedOut = u(this, "loggedOut", 7), this.handleAuthChange = async (t) => {
185
- t ? this.loggedIn.emit(this.host) : this.loggedOut.emit(this.host);
186
- }, this.authConfig = void 0, this.eventOverrides = {}, this.automaticComponentRegistration = !0;
187
- }
188
- connectedCallback() {
189
- r("[nylas-provider] connectedCallback");
190
- }
191
- async componentWillLoad() {
192
- var a, i, h, c, l;
193
- r("[nylas-provider] componentWillLoad"), this.stores = {
194
- auth: b(),
195
- scheduler: S(),
196
- schedulerConfig: m()
197
- }, this.baseProvider = new A(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);
198
- const s = new L();
199
- this.nylasAuth = R({
200
- apiUri: "https://api.us.nylas.com",
201
- elementsApiUri: "https://elements.us.nylas.com",
202
- storageType: "indexeddb",
203
- clientId: "YOUR_CLIENT_ID",
204
- defaultScopes: [],
205
- redirectURI: "/",
206
- ...this.authConfig
207
- });
208
- const t = (a = this.baseProvider) == null ? void 0 : a.getStore("auth");
209
- if (!t)
210
- throw new Error("The auth store is not set");
211
- const e = (i = this.baseProvider) == null ? void 0 : i.getStore("scheduler");
212
- if (!e)
213
- throw new Error("The scheduler store is not set");
214
- const n = (h = this.baseProvider) == null ? void 0 : h.getStore("schedulerConfig");
215
- if (!n)
216
- throw new Error("The scheduler config store is not set");
217
- this.nylasConnector = new P(s, this.nylasAuth, t, e, n), this.init.emit(this.host).defaultPrevented || await ((c = this.nylasConnector) == null ? void 0 : c.auth.validateSession()), this.handleAuthChange(t.state.isAuthenticated), (l = this.baseProvider) == null || l.componentWillLoad(this.nylasConnector);
218
- }
219
- componentDidLoad() {
220
- var t, e;
221
- const s = (t = this.baseProvider) == null ? void 0 : t.getStore("auth");
222
- s == null || s.onChange("isAuthenticated", this.handleAuthChange), (e = this.baseProvider) == null || e.componentDidLoad();
223
- }
224
- componentDisconnected() {
225
- var s;
226
- (s = this.baseProvider) == null || s.componentDisconnected();
227
- }
228
- async registerComponentHandler(s) {
229
- var t;
230
- (t = this.baseProvider) == null || t.registerComponent(s.detail);
231
- }
232
- async unregisterComponentHandler(s) {
233
- var t;
234
- (t = this.baseProvider) == null || t.unregisterComponent(s.detail);
235
- }
236
- async getNylasAuth() {
237
- return this.nylasAuth;
238
- }
239
- async getNylasConnector() {
240
- return this.nylasConnector;
241
- }
242
- async getAuthStore() {
243
- var s;
244
- return (s = this.baseProvider) == null ? void 0 : s.getStore("auth");
245
- }
246
- async getNylasSchedulerStore() {
247
- var s;
248
- return (s = this.baseProvider) == null ? void 0 : s.getStore("scheduler");
249
- }
250
- async getNylasSchedulerConfigStore() {
251
- var s;
252
- return (s = this.baseProvider) == null ? void 0 : s.getStore("schedulerConfig");
253
- }
254
- render() {
255
- return d(y, { key: "a07ace4fe61c7f7ee20b723d1858f7ebac56ff95" }, d("slot", { key: "7c10f2b5cf18450c28617b3f35215b720f1d8bd2" }));
256
- }
257
- get host() {
258
- return f(this);
259
- }
260
- };
261
- k.style = I;
262
- export {
263
- k as nylas_provider
264
- };