@nylas/react 1.1.7 → 1.3.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 (235) hide show
  1. package/dist/add-circle-icon.entry-0f0cd6d8.cjs +1 -0
  2. package/dist/add-circle-icon.entry-d2b7178c.js +15 -0
  3. package/dist/{archive-icon.entry-769e863b.js → archive-icon.entry-602d3c58.js} +1 -1
  4. package/dist/{archive-icon.entry-10ebbf9a.cjs → archive-icon.entry-ec25f93a.cjs} +1 -1
  5. package/dist/{arrow-icon.entry-024d613a.cjs → arrow-icon.entry-7bcb6442.cjs} +1 -1
  6. package/dist/{arrow-icon.entry-1ebd553a.js → arrow-icon.entry-d4dd38b3.js} +1 -1
  7. package/dist/{bold-icon.entry-17c78a12.js → bold-icon.entry-5fc41386.js} +1 -1
  8. package/dist/{bold-icon.entry-8bc27b72.cjs → bold-icon.entry-fc1d34a6.cjs} +1 -1
  9. package/dist/{button-component_2.entry-5cd0adf0.cjs → button-component_2.entry-d23be43d.cjs} +1 -1
  10. package/dist/{button-component_2.entry-1095ad9f.js → button-component_2.entry-d62ae520.js} +1 -1
  11. package/dist/{calendar-agenda-fill-icon_54.entry-6b2114d5.js → calendar-agenda-fill-icon_54.entry-1a42103a.js} +2158 -2492
  12. package/dist/calendar-agenda-fill-icon_54.entry-95ccb99e.cjs +9 -0
  13. package/dist/{calendar-cancel-icon.entry-d27593a5.js → calendar-cancel-icon.entry-1566c286.js} +1 -1
  14. package/dist/{calendar-cancel-icon.entry-4c58ea10.cjs → calendar-cancel-icon.entry-bf9fc719.cjs} +1 -1
  15. package/dist/{calendar-check-icon_2.entry-4a35f416.cjs → calendar-check-icon_2.entry-4c3e78a6.cjs} +1 -1
  16. package/dist/{calendar-check-icon_2.entry-38e1140b.js → calendar-check-icon_2.entry-82407a92.js} +1 -1
  17. package/dist/{calendar-icon.entry-002ee369.cjs → calendar-icon.entry-359c064c.cjs} +1 -1
  18. package/dist/{calendar-icon.entry-4543de86.js → calendar-icon.entry-c3c23413.js} +1 -1
  19. package/dist/{checkbox-component_2.entry-cf15106d.js → checkbox-component_2.entry-97e97789.js} +1 -1
  20. package/dist/{checkbox-component_2.entry-ad4ab088.cjs → checkbox-component_2.entry-f974e789.cjs} +1 -1
  21. package/dist/chevron-icon_3.entry-2453084c.cjs +1 -0
  22. package/dist/{chevron-icon_3.entry-5e60a853.js → chevron-icon_3.entry-a6189c37.js} +26 -22
  23. package/dist/{clock-icon_4.entry-8348282a.cjs → clock-icon_4.entry-5162dfec.cjs} +1 -1
  24. package/dist/{clock-icon_4.entry-d03310ae.js → clock-icon_4.entry-ad679142.js} +1 -1
  25. package/dist/close-icon.entry-2c6cdf35.js +15 -0
  26. package/dist/close-icon.entry-38dc2638.cjs +1 -0
  27. package/dist/{constants-c549b12b-7ea4c7f5.js → constants-35df11e7-b37e3406.js} +1 -1
  28. package/dist/{constants-c549b12b-c85413b1.cjs → constants-35df11e7-d87ad6d9.cjs} +1 -1
  29. package/dist/{copy-icon.entry-3ea78e28.js → copy-icon.entry-6630ce5a.js} +1 -1
  30. package/dist/{copy-icon.entry-5337f980.cjs → copy-icon.entry-79df1d0e.cjs} +1 -1
  31. package/dist/{delete-icon.entry-480ac215.js → delete-icon.entry-716f906c.js} +1 -1
  32. package/dist/{delete-icon.entry-87b2daaa.cjs → delete-icon.entry-f9a265b6.cjs} +1 -1
  33. package/dist/{document-refresh-icon.entry-6be2b468.cjs → document-refresh-icon.entry-bb91822a.cjs} +1 -1
  34. package/dist/{document-refresh-icon.entry-665a7947.js → document-refresh-icon.entry-fa775295.js} +1 -1
  35. package/dist/{feedbackSync-b56b29ed-36483932.js → feedbackSync-adc893c2-5965d5ba.js} +1 -1
  36. package/dist/{feedbackSync-b56b29ed-599103b9.cjs → feedbackSync-adc893c2-70d06afc.cjs} +1 -1
  37. package/dist/{folder-icon.entry-89f0974f.cjs → folder-icon.entry-82a02de7.cjs} +1 -1
  38. package/dist/{folder-icon.entry-9bf864d7.js → folder-icon.entry-9cf7590f.js} +1 -1
  39. package/dist/{forward-icon.entry-699c55d9.cjs → forward-icon.entry-034ec3be.cjs} +1 -1
  40. package/dist/{forward-icon.entry-2b0167a7.js → forward-icon.entry-ebd5e108.js} +1 -1
  41. package/dist/{globe-icon.entry-5d962e7a.js → globe-icon.entry-48837e22.js} +1 -1
  42. package/dist/{globe-icon.entry-3d08a9c4.cjs → globe-icon.entry-b67c68d5.cjs} +1 -1
  43. package/dist/{google-logo-icon_4.entry-ec724f2e.js → google-logo-icon_4.entry-819d7d0d.js} +354 -333
  44. package/dist/google-logo-icon_4.entry-b637470a.cjs +1 -0
  45. package/dist/{inbox-icon.entry-45414f66.cjs → inbox-icon.entry-7f91d971.cjs} +1 -1
  46. package/dist/{inbox-icon.entry-2020fa96.js → inbox-icon.entry-c611c154.js} +1 -1
  47. package/dist/{index-2b208d5d.js → index-72501df0.js} +2416 -2347
  48. package/dist/index-92ba1b80.cjs +81 -0
  49. package/dist/{index.es-c7ca1bad-67a99f41.cjs → index.es-28b1b2ec-595c0513.cjs} +1 -1
  50. package/dist/{index.es-c7ca1bad-70899f2a.js → index.es-28b1b2ec-5a87db22.js} +1 -1
  51. package/dist/{info-icon_2.entry-b98a2882.js → info-icon_2.entry-4ad69286.js} +1 -1
  52. package/dist/{info-icon_2.entry-237205a0.cjs → info-icon_2.entry-4c70ab61.cjs} +1 -1
  53. package/dist/{input-color-picker.entry-8fe3482d.cjs → input-color-picker.entry-46bf04e1.cjs} +1 -1
  54. package/dist/{input-color-picker.entry-684413c1.js → input-color-picker.entry-4e5760ce.js} +1 -1
  55. package/dist/{input-component.entry-bcd13373.cjs → input-component.entry-1019ce99.cjs} +1 -1
  56. package/dist/{input-component.entry-00b97287.js → input-component.entry-dca1013f.js} +1 -1
  57. package/dist/{input-dropdown.entry-b26475c4.cjs → input-dropdown.entry-e535fb5e.cjs} +1 -1
  58. package/dist/{input-dropdown.entry-3c39e23a.js → input-dropdown.entry-f14c59e7.js} +1 -1
  59. package/dist/{italic-icon.entry-2199bb17.js → italic-icon.entry-2ab53839.js} +1 -1
  60. package/dist/{italic-icon.entry-14081a02.cjs → italic-icon.entry-726cc194.cjs} +1 -1
  61. package/dist/{multi-select-dropdown.entry-7b66d2ae.cjs → multi-select-dropdown.entry-6820d249.cjs} +1 -1
  62. package/dist/{multi-select-dropdown.entry-2141b848.js → multi-select-dropdown.entry-a097d3cb.js} +1 -1
  63. package/dist/nylas-booked-event-card_12.entry-c684905b.cjs +1 -0
  64. package/dist/{nylas-booked-event-card_12.entry-2d88375a.js → nylas-booked-event-card_12.entry-ccd85ff4.js} +316 -247
  65. package/dist/{nylas-form-card.entry-1e9225b0.cjs → nylas-form-card.entry-8eb47f3d.cjs} +1 -1
  66. package/dist/{nylas-form-card.entry-a8a44a3b.js → nylas-form-card.entry-afdfee47.js} +2 -2
  67. package/dist/{nylas-if-state.entry-32b11afa.js → nylas-if-state.entry-7caad39f.js} +2 -2
  68. package/dist/{nylas-if-state.entry-473230a6.cjs → nylas-if-state.entry-be7978de.cjs} +1 -1
  69. package/dist/{nylas-login.entry-995b6f99.cjs → nylas-login.entry-bce4f689.cjs} +1 -1
  70. package/dist/{nylas-login.entry-d663205c.js → nylas-login.entry-dcf85f93.js} +2 -2
  71. package/dist/{nylas-provider.entry-c24474c3.js → nylas-provider.entry-97882e4b.js} +4 -4
  72. package/dist/{nylas-provider.entry-050f20bd.cjs → nylas-provider.entry-f02017da.cjs} +1 -1
  73. package/dist/{nylas-scheduler-editor.entry-3b834bb1.cjs → nylas-scheduler-editor.entry-cc6f4060.cjs} +2 -2
  74. package/dist/{nylas-scheduler-editor.entry-5c0a5fb4.js → nylas-scheduler-editor.entry-dcfdd6bf.js} +8 -9
  75. package/dist/{nylas-scheduling.entry-04c3951e.js → nylas-scheduling.entry-2b842e93.js} +40 -37
  76. package/dist/nylas-scheduling.entry-e0e9c8e8.cjs +1 -0
  77. package/dist/{nylas-time-window-picker.entry-678a7dbf.js → nylas-time-window-picker.entry-96f5fe9a.js} +1 -1
  78. package/dist/{nylas-time-window-picker.entry-337d03c1.cjs → nylas-time-window-picker.entry-a8780f2e.cjs} +1 -1
  79. package/dist/{person-icon.entry-3fee5bc4.cjs → person-icon.entry-2f8e00fd.cjs} +1 -1
  80. package/dist/{person-icon.entry-902b2c0d.js → person-icon.entry-3ec67feb.js} +1 -1
  81. package/dist/{play-icon.entry-a7f648f7.cjs → play-icon.entry-1abf79e9.cjs} +1 -1
  82. package/dist/{play-icon.entry-1078da37.js → play-icon.entry-a840bdca.js} +1 -1
  83. package/dist/react.cjs +1 -1
  84. package/dist/react.js +1 -1
  85. package/dist/{refresh-icon.entry-5399f64b.js → refresh-icon.entry-11fcb673.js} +1 -1
  86. package/dist/{refresh-icon.entry-06f9d181.cjs → refresh-icon.entry-af7f54b4.cjs} +1 -1
  87. package/dist/{register-component-3444af44-3d6e535a.js → register-component-75f530bc-0e4e3d7a.js} +1 -1
  88. package/dist/{register-component-3444af44-6d269634.cjs → register-component-75f530bc-61b6f2dd.cjs} +1 -1
  89. package/dist/{reply-all-icon.entry-a3a20f76.js → reply-all-icon.entry-5c8b3356.js} +1 -1
  90. package/dist/{reply-all-icon.entry-70ffe5be.cjs → reply-all-icon.entry-cc2ad940.cjs} +1 -1
  91. package/dist/{reply-icon.entry-a08c0e57.cjs → reply-icon.entry-840acade.cjs} +1 -1
  92. package/dist/{reply-icon.entry-302ed745.js → reply-icon.entry-d048736f.js} +1 -1
  93. package/dist/{scheduler-config-store-ed4a8dfd-34c4c119.cjs → scheduler-config-store-ed4a8dfd-161a3efd.cjs} +1 -1
  94. package/dist/{scheduler-config-store-ed4a8dfd-81687f55.js → scheduler-config-store-ed4a8dfd-f74e58ae.js} +1 -1
  95. package/dist/{scheduler-store-2e7db190-c648278f.js → scheduler-store-d84b82a0-11faba86.js} +2 -2
  96. package/dist/{scheduler-store-2e7db190-fb6a20a1.cjs → scheduler-store-d84b82a0-7a7fe186.cjs} +1 -1
  97. package/dist/{sent-icon.entry-6396b793.cjs → sent-icon.entry-987760ce.cjs} +1 -1
  98. package/dist/{sent-icon.entry-4d7b65ba.js → sent-icon.entry-fd3b9ad9.js} +1 -1
  99. package/dist/{spam-icon.entry-8648a315.cjs → spam-icon.entry-3ce4f9fc.cjs} +1 -1
  100. package/dist/{spam-icon.entry-45e7b83b.js → spam-icon.entry-4665415c.js} +1 -1
  101. package/dist/{star-icon.entry-61c36332.js → star-icon.entry-0f446ac7.js} +1 -1
  102. package/dist/{star-icon.entry-1c416cef.cjs → star-icon.entry-a3ba4703.cjs} +1 -1
  103. package/dist/{stop-icon.entry-089ac3ba.js → stop-icon.entry-72c964b2.js} +1 -1
  104. package/dist/{stop-icon.entry-d68aa652.cjs → stop-icon.entry-9c13e00a.cjs} +1 -1
  105. package/dist/{textarea-component.entry-8f5d835f.js → textarea-component.entry-d414e219.js} +1 -1
  106. package/dist/{textarea-component.entry-502c8659.cjs → textarea-component.entry-ff04b5fa.cjs} +1 -1
  107. package/dist/{time-period-selector.entry-001a1c59.cjs → time-period-selector.entry-2ce3347a.cjs} +1 -1
  108. package/dist/{time-period-selector.entry-7da7d316.js → time-period-selector.entry-53edc0ba.js} +1 -1
  109. package/dist/{translate-icon.entry-5166d376.js → translate-icon.entry-84a78b9a.js} +1 -1
  110. package/dist/{translate-icon.entry-4ee80d22.cjs → translate-icon.entry-9bab13ad.cjs} +1 -1
  111. package/dist/{trash-fill-icon.entry-49844a82.js → trash-fill-icon.entry-2881a44c.js} +1 -1
  112. package/dist/{trash-fill-icon.entry-2f814465.cjs → trash-fill-icon.entry-84f52290.cjs} +1 -1
  113. package/dist/{underline-icon.entry-181f1d7e.js → underline-icon.entry-23eca319.js} +1 -1
  114. package/dist/{underline-icon.entry-4ba93e7b.cjs → underline-icon.entry-5a8410ef.cjs} +1 -1
  115. package/dist/{warning-icon.entry-44ac5566.cjs → warning-icon.entry-1966042d.cjs} +1 -1
  116. package/dist/{warning-icon.entry-2406b765.js → warning-icon.entry-abf9e5dc.js} +1 -1
  117. package/package.json +2 -2
  118. package/dist/add-circle-icon_2.entry-5814b516.cjs +0 -1
  119. package/dist/add-circle-icon_2.entry-5db67b5b.js +0 -25
  120. package/dist/add-circle-icon_2.entry-95b23b9d.js +0 -25
  121. package/dist/add-circle-icon_2.entry-ae11c837.cjs +0 -1
  122. package/dist/archive-icon.entry-2ead8ef0.cjs +0 -1
  123. package/dist/archive-icon.entry-b28d195c.js +0 -15
  124. package/dist/arrow-icon.entry-8de38831.cjs +0 -1
  125. package/dist/arrow-icon.entry-e29d7a6c.js +0 -15
  126. package/dist/bold-icon.entry-316f5e61.js +0 -15
  127. package/dist/bold-icon.entry-caf96585.cjs +0 -1
  128. package/dist/button-component_2.entry-531a725d.js +0 -26
  129. package/dist/button-component_2.entry-64a41161.cjs +0 -1
  130. package/dist/calendar-agenda-fill-icon_54.entry-84e72636.js +0 -5656
  131. package/dist/calendar-agenda-fill-icon_54.entry-abb96e20.cjs +0 -10
  132. package/dist/calendar-agenda-fill-icon_54.entry-f5577fdb.cjs +0 -10
  133. package/dist/calendar-cancel-icon.entry-f11e5aaa.cjs +0 -1
  134. package/dist/calendar-cancel-icon.entry-f1a6f9bc.js +0 -15
  135. package/dist/calendar-check-icon_2.entry-52187599.cjs +0 -1
  136. package/dist/calendar-check-icon_2.entry-7f17a3a6.js +0 -25
  137. package/dist/calendar-icon.entry-3c5c97d4.cjs +0 -1
  138. package/dist/calendar-icon.entry-b76e26e6.js +0 -15
  139. package/dist/checkbox-component_2.entry-b24885e9.cjs +0 -1
  140. package/dist/checkbox-component_2.entry-e4a3dd2d.js +0 -79
  141. package/dist/chevron-icon_3.entry-582df6f7.cjs +0 -1
  142. package/dist/chevron-icon_3.entry-59d8b408.cjs +0 -1
  143. package/dist/chevron-icon_3.entry-cab72db3.js +0 -143
  144. package/dist/clock-icon_4.entry-f6b9f85d.js +0 -45
  145. package/dist/clock-icon_4.entry-fcbc39b0.cjs +0 -1
  146. package/dist/copy-icon.entry-430beab4.js +0 -15
  147. package/dist/copy-icon.entry-74a59fc5.cjs +0 -1
  148. package/dist/delete-icon.entry-9c1af040.js +0 -15
  149. package/dist/delete-icon.entry-e320cde1.cjs +0 -1
  150. package/dist/document-refresh-icon.entry-930ee2b7.js +0 -15
  151. package/dist/document-refresh-icon.entry-fcde4ff6.cjs +0 -1
  152. package/dist/feedbackSync-b56b29ed-7a7c650e.cjs +0 -448
  153. package/dist/feedbackSync-b56b29ed-9e38fdb6.js +0 -6035
  154. package/dist/folder-icon.entry-977e50eb.cjs +0 -1
  155. package/dist/folder-icon.entry-b80d8fd7.js +0 -15
  156. package/dist/forward-icon.entry-c4c20f31.cjs +0 -1
  157. package/dist/forward-icon.entry-eb64aa16.js +0 -15
  158. package/dist/globe-icon.entry-5ef1dc42.cjs +0 -1
  159. package/dist/globe-icon.entry-667987bd.js +0 -15
  160. package/dist/google-logo-icon_4.entry-12f1492f.cjs +0 -1
  161. package/dist/google-logo-icon_4.entry-bd4d2237.cjs +0 -1
  162. package/dist/google-logo-icon_4.entry-fc38681e.js +0 -729
  163. package/dist/inbox-icon.entry-49353988.js +0 -15
  164. package/dist/inbox-icon.entry-b556231f.cjs +0 -1
  165. package/dist/index-290b2932.cjs +0 -81
  166. package/dist/index-bf124f70.cjs +0 -81
  167. package/dist/index-fb096a02.js +0 -13011
  168. package/dist/index.es-c7ca1bad-b7a3e6bd.cjs +0 -7
  169. package/dist/index.es-c7ca1bad-cb3a99a7.js +0 -3129
  170. package/dist/info-icon_2.entry-caf64c28.cjs +0 -1
  171. package/dist/info-icon_2.entry-d935e5c2.js +0 -34
  172. package/dist/input-color-picker.entry-752534de.js +0 -48
  173. package/dist/input-color-picker.entry-f856fce3.cjs +0 -1
  174. package/dist/input-component.entry-4400f98e.js +0 -70
  175. package/dist/input-component.entry-d486907a.cjs +0 -1
  176. package/dist/input-dropdown.entry-bea3c690.js +0 -134
  177. package/dist/input-dropdown.entry-d3d4e50e.cjs +0 -1
  178. package/dist/italic-icon.entry-63726952.cjs +0 -1
  179. package/dist/italic-icon.entry-a3c87e5e.js +0 -15
  180. package/dist/multi-select-dropdown.entry-8a2c4b42.cjs +0 -1
  181. package/dist/multi-select-dropdown.entry-cdd97d65.js +0 -95
  182. package/dist/nylas-booked-event-card_12.entry-20c254bb.cjs +0 -1
  183. package/dist/nylas-booked-event-card_12.entry-90a0b6c7.cjs +0 -1
  184. package/dist/nylas-booked-event-card_12.entry-bbd7cfb0.js +0 -1237
  185. package/dist/nylas-form-card.entry-d6287d76.cjs +0 -1
  186. package/dist/nylas-form-card.entry-fadd7718.js +0 -57
  187. package/dist/nylas-if-state.entry-8be8107e.js +0 -94
  188. package/dist/nylas-if-state.entry-9c341f13.cjs +0 -1
  189. package/dist/nylas-login.entry-b9c2fb27.cjs +0 -1
  190. package/dist/nylas-login.entry-e3a9c5c1.js +0 -73
  191. package/dist/nylas-provider.entry-5b54f2cc.cjs +0 -1
  192. package/dist/nylas-provider.entry-ca3e06ce.js +0 -264
  193. package/dist/nylas-scheduler-editor.entry-b86f49a1.js +0 -1447
  194. package/dist/nylas-scheduler-editor.entry-d52db29e.cjs +0 -2
  195. package/dist/nylas-scheduling.entry-a5c4b050.js +0 -412
  196. package/dist/nylas-scheduling.entry-d549c5c3.cjs +0 -1
  197. package/dist/nylas-scheduling.entry-ed12a4f6.cjs +0 -1
  198. package/dist/nylas-time-window-picker.entry-4aefade8.cjs +0 -1
  199. package/dist/nylas-time-window-picker.entry-ecc3ee10.js +0 -316
  200. package/dist/person-icon.entry-9680bc2b.js +0 -15
  201. package/dist/person-icon.entry-dede7140.cjs +0 -1
  202. package/dist/play-icon.entry-c8f3a5d8.cjs +0 -1
  203. package/dist/play-icon.entry-dacc3aa6.js +0 -15
  204. package/dist/refresh-icon.entry-555a38ec.cjs +0 -1
  205. package/dist/refresh-icon.entry-d4dcfc3a.js +0 -15
  206. package/dist/register-component-3444af44-4a273c0a.js +0 -109
  207. package/dist/register-component-3444af44-d3e7252a.cjs +0 -1
  208. package/dist/reply-all-icon.entry-bb2a88ad.js +0 -15
  209. package/dist/reply-all-icon.entry-f8a32be1.cjs +0 -1
  210. package/dist/reply-icon.entry-423fb307.js +0 -15
  211. package/dist/reply-icon.entry-d2da8972.cjs +0 -1
  212. package/dist/scheduler-config-store-ed4a8dfd-474f6252.cjs +0 -1
  213. package/dist/scheduler-config-store-ed4a8dfd-fe2b9d18.js +0 -26
  214. package/dist/scheduler-store-5fbba021-09da63cf.cjs +0 -1
  215. package/dist/scheduler-store-5fbba021-6298edf3.js +0 -484
  216. package/dist/sent-icon.entry-6ed4170a.js +0 -15
  217. package/dist/sent-icon.entry-db89fd38.cjs +0 -1
  218. package/dist/spam-icon.entry-81073952.js +0 -15
  219. package/dist/spam-icon.entry-cf05a2a7.cjs +0 -1
  220. package/dist/star-icon.entry-8279e6a9.cjs +0 -1
  221. package/dist/star-icon.entry-bb26cc4e.js +0 -15
  222. package/dist/stop-icon.entry-f62d063b.js +0 -15
  223. package/dist/stop-icon.entry-f88a5a2a.cjs +0 -1
  224. package/dist/textarea-component.entry-d4a682fa.js +0 -37
  225. package/dist/textarea-component.entry-e06ee834.cjs +0 -1
  226. package/dist/time-period-selector.entry-837b9be3.js +0 -80
  227. package/dist/time-period-selector.entry-c5b6d0c9.cjs +0 -1
  228. package/dist/translate-icon.entry-c1a623d8.cjs +0 -1
  229. package/dist/translate-icon.entry-e5cfae44.js +0 -15
  230. package/dist/trash-fill-icon.entry-85e0e841.js +0 -15
  231. package/dist/trash-fill-icon.entry-def90241.cjs +0 -1
  232. package/dist/underline-icon.entry-72dadbdf.cjs +0 -1
  233. package/dist/underline-icon.entry-f7a75755.js +0 -15
  234. package/dist/warning-icon.entry-5b6aeb2b.cjs +0 -1
  235. 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-290b2932.cjs"),D=require("./index.es-c7ca1bad-67a99f41.cjs"),B=require("./scheduler-store-5fbba021-09da63cf.cjs"),N=require("./constants-c549b12b-c85413b1.cjs"),E=require("./feedbackSync-b56b29ed-599103b9.cjs");require("react");require("react-dom");class W{constructor({schedulerAPIURL:t,nylasSchedulerStore:i,sessionId:a,configId:o,slug:r,clientId:d}){if(!t)throw new Error("schedulerAPIURL is required");if(!i)throw new Error("nylasSchedulerStore is required");if(!a&&!o&&!(r||d))throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");t==="/"&&(t=new URL(window.location.href).origin),this.configId=o,this.sessionId=a,this.schedulerAPIURL=t,this.nylasSchedulerStore=i,this.slug=r,this.clientId=d}init(){e.debug("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new B.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId}),this._schedulerAPIConnector)}resetStores(){this.nylasSchedulerStore.reset()}}const I=(n,t)=>{const i=n.isLoading,a=n.showNotification,o=n.nylasBranding;return e.h(e.Fragment,null,a&&e.h("nylas-notification",null),i&&e.h("div",{class:"loading"},e.h("div",{class:"left"},e.h("div",{class:"skeleton"})),e.h("div",{class:"right"},e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}))),!i&&t,e.h("div",{class:"footer"},o&&e.h(e.Fragment,null,"Powered by ",e.h("nylas-logo",null))))},M=(n,t)=>e.h("div",{class:"message-banner"},t),$=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--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;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{padding:0.5rem 4px 0;height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer svg{fill:var(--nylas-base-500)}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}nylas-feedback-form{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}',G=$,j={title:e.instance.t("genericErrorTitle"),type:D.nr.Error,category:B.ErrorCategory.Component},H=class{constructor(n){e.registerInstance(this,n),this.init=e.createEvent(this,"init",7),this.schedulerWillLoad=e.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=e.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=e.createEvent(this,"nylasSchedulerError",7),this.configSettingsLoaded=e.createEvent(this,"configSettingsLoaded",7),this.bookingRefExtracted=e.createEvent(this,"bookingRefExtracted",7),this.bookedEventInfo=e.createEvent(this,"bookedEventInfo",7),this.mode="app",this.defaultSchedulerState=void 0,this.sessionId=void 0,this.schedulerApiUrl="https://api.us.nylas.com",this.bookingInfo=void 0,this.rescheduleBookingRef=void 0,this.cancelBookingRef=void 0,this.organizerConfirmationBookingRef=void 0,this.configurationId=void 0,this.slug=void 0,this.clientId=void 0,this.nylasBranding=!0,this.eventOverrides={},this.isLoading=void 0,this.themeConfig=void 0,this.localization=void 0,this.showNotification=!0,this.enableUserFeedback=!0,this.automaticComponentRegistration=!0,this.selectedDateLabel=new Date().toLocaleDateString(void 0,{dateStyle:"full"})||`${e.instance.t("noDateSelected")}`,this.refConfigId=void 0,this.language=navigator.language,this.showFeedbackModal=!1,this.bookingInfoConfirmed=null}connectedCallback(){e.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){var o,r;e.debug("[nylas-scheduler] Component will load"),this.enableUserFeedback&&!E.isInitialized()&&E.init({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:"1.1.6",integrations:d=>[...d.filter(s=>!1),E.feedbackSyncIntegration({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null});const n=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerWillLoad(n,this.nylasSchedulerConnector),n.defaultPrevented))return;this.stores={scheduler:B.CreateNylasSchedulerStore({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,...this.defaultSchedulerState})},this.baseProvider=new D.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.refConfigId=this.configurationId;let t;if(this.rescheduleBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.rescheduleBookingRef);this.refConfigId=d,this.stores.scheduler.set("rescheduleBookingId",s),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s})}else if(this.cancelBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.cancelBookingRef);this.refConfigId=d,this.stores.scheduler.set("cancelBookingId",s),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s})}else if(this.organizerConfirmationBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.organizerConfirmationBookingRef);this.refConfigId=d,this.stores.scheduler.set("organizerConfirmationBookingId",s),this.stores.scheduler.set("organizerConfirmationSalt",c),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s,salt:c})}if("bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(t,this.nylasSchedulerConnector),t.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;const i=(o=this.baseProvider)==null?void 0:o.getStore("scheduler");this.nylasSchedulerConnector=new W({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:i});const a=this.init.emit(this.host);"init"in this.eventOverrides&&(await this.eventOverrides.init(a,this.nylasSchedulerConnector),a.defaultPrevented)||((r=this.baseProvider)==null||r.componentWillLoad(this.nylasSchedulerConnector),this.applyThemeConfig(this.themeConfig))}async componentDidLoad(){var c,b,m,g,h,f,p,w;(c=this.baseProvider)==null||c.componentDidLoad();const n=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(n,this.nylasSchedulerConnector),n.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;this.localizationChanged(this.localization);const t=await((b=this.nylasSchedulerConnector)==null?void 0:b.scheduler.getUISettings());if(!t||"error"in t){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(t==null?void 0:t.error)},host:this.host});return}else{"data"in t&&((m=t.data)!=null&&m.appearance)&&console.info("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.");const u=this.configSettingsLoaded.emit({settings:t});if("configSettingsLoaded"in this.eventOverrides&&(await this.eventOverrides.configSettingsLoaded(u,this.nylasSchedulerConnector),u.defaultPrevented))return}const i=(g=this.baseProvider)==null?void 0:g.getStore("scheduler"),a=(f=(h=i==null?void 0:i.get("configSettings"))==null?void 0:h.scheduler)==null?void 0:f.available_days_in_future,o=i==null?void 0:i.get("selectedTimeslot");if(o&&(o!=null&&o.start_time)){if(!this.isTimeslotValid(o))return;if(i!=null&&i.get("showBookingForm")){i==null||i.set("selectedDate",o.start_time);return}}const r=i==null?void 0:i.get("selectedDate"),d=i==null?void 0:i.get("availability");let s;if(!(d&&d.length>0)){if(r){const{startTime:u,endTime:v,endTimeForAvailableDaysInFuture:y}=this.validateAvailableDaysInFuture(r,a||30);r.getTime()<y*1e3&&(s=await((w=this.nylasSchedulerConnector)==null?void 0:w.scheduler.getAvailability(u,v)))}else{const u=new Date,{startTime:v,endTime:y,endTimeForAvailableDaysInFuture:T}=this.validateAvailableDaysInFuture(u,a||30);u.getTime()<T*1e3&&(s=await((p=this.nylasSchedulerConnector)==null?void 0:p.scheduler.getAvailability(v,y)))}if((!s||"error"in s)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(s==null?void 0:s.error)},host:this.host}),!r){let u=new Date;const v=i==null?void 0:i.get("availability").find(y=>new Date(y.start_time)>new Date);v&&(u=v.start_time),i==null||i.set("selectedDate",u)}}}componentDisconnected(){var n;(n=this.baseProvider)==null||n.componentDisconnected()}bookingInfoChanged(n){var t;(t=this.stores)==null||t.scheduler.set("bookingInfo",n)}rescheduleBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("rescheduleBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}cancelBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("cancelBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}organizerConfirmationBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("organizerConfirmationBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}localizationChanged(n){n&&Object.keys(n).forEach(t=>{t in N.LANGUAGE_CODE&&(e.instance.addResourceBundle(t,"translation",n[t],!1,!0),this.language=this.language)})}themeConfigChanged(n){this.applyThemeConfig(n)}languageChanged(n){const t=n.detail;this.language=t,e.instance.changeLanguage(t)}async registerComponentHandler(n){var t;(t=this.baseProvider)==null||t.registerComponent(n.detail)}async unregisterComponentHandler(n){var t;(t=this.baseProvider)==null||t.unregisterComponent(n.detail)}async monthChangedHandler(n){var d,s,c,b,m,g,h;const t=n.detail,i=(b=(c=(s=(d=this.nylasSchedulerConnector)==null?void 0:d.schedulerStore)==null?void 0:s.get("configSettings"))==null?void 0:c.scheduler)==null?void 0:b.available_days_in_future,{startTime:a,endTime:o,endTimeForAvailableDaysInFuture:r}=this.validateAvailableDaysInFuture(t,i||30);if(a<r&&t.getTime()<r*1e3){const f=await((m=this.nylasSchedulerConnector)==null?void 0:m.scheduler.getAvailability(a,o));(!f||"error"in f)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(f==null?void 0:f.error)},host:this.host});const p=(g=this.stores)==null?void 0:g.scheduler.get("selectableDates");p&&p.length>0&&((h=this.stores)==null||h.scheduler.set("selectedDate",p[0]))}}mapToBookingData(n){var d,s,c;const t=(d=this.stores)==null?void 0:d.scheduler.get("selectedTimeslot"),i=(s=this.stores)==null?void 0:s.scheduler.get("selectedLanguage"),a=(c=this.stores)==null?void 0:c.scheduler.get("selectedTimezone"),o=t!=null&&t.start_time?new Date(t==null?void 0:t.start_time).getTime()/1e3:"",r=t!=null&&t.end_time?new Date(t==null?void 0:t.end_time).getTime()/1e3:"";return{additional_guests:n.guests,guest:{...n.primaryParticipant},additional_fields:{...n.additionalFields},start_time:o,end_time:r,email_language:i,timezone:a}}async bookButtonClickedHandler(n){var c,b,m,g;if(n.defaultPrevented)return;const t=n.detail,i=this.mapToBookingData(t);this.bookingInfoConfirmed=t;const o=(b=(c=this.nylasSchedulerConnector)==null?void 0:c.schedulerStore)==null?void 0:b.get("rescheduleBookingId");if(o){const h=await((m=this.nylasSchedulerConnector)==null?void 0:m.scheduler.rescheduleBooking(o,t));(!h||"error"in h)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(h==null?void 0:h.error)},host:this.host});const f=h==null?void 0:h.data,p=this.bookedEventInfo.emit({...h,data:{...f,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(p,this.nylasSchedulerConnector);return}const r=await((g=this.nylasSchedulerConnector)==null?void 0:g.scheduler.bookTimeslot(t));(!r||"error"in r)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(r==null?void 0:r.error)},host:this.host});const d=r==null?void 0:r.data,s=this.bookedEventInfo.emit({...r,data:{...d,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(s,this.nylasSchedulerConnector)}dateSelectedHandler(n){const t=n.detail;this.selectedDateLabel=t?t.toLocaleDateString(void 0,{dateStyle:"full"}):`${e.instance.t("noDateSelected")}`}cancelBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}confirmBookingErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}feedbackSubmittedHandler(n){const i={eventId:E.captureMessage("Scheduling Page User Feedback"),message:n.detail.feedback};E.captureFeedback(i,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-schduling","nylas-web-element-version":"1.1.6"},extra:{configId:this.configurationId,slug:this.slug}}}),this.showFeedbackModal=!1}async getNylasSchedulerStore(){var n;return(n=this.baseProvider)==null?void 0:n.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(n){return{title:(n==null?void 0:n.title)||j.title,category:(n==null?void 0:n.category)||j.category,type:D.nr.Error,description:(n==null?void 0:n.message)||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){let n="";return this.sessionId||(n+=e.instance.t("sessionIdRequiredErrorMessage")),!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)&&(n=e.instance.t("sessionIdRequiredErrorMessage")+" "+e.instance.t("publicConfigErrorMessage")),this.nylasSchedulerError.emit({notification:{title:e.instance.t("schedulingComponentErrorTitle"),category:B.ErrorCategory.Component,type:D.nr.Error,description:n,id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1}return!0}isTimeslotValid(n){return new Date(n.start_time)<new Date?(this.nylasSchedulerError.emit({notification:{title:e.instance.t("invalidTimeslotErrorTitle"),category:B.ErrorCategory.Component,type:D.nr.Error,description:e.instance.t("invalidTimeslotErrorMessage"),id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1):!0}validateAvailableDaysInFuture(n,t){const i=new Date,a=new Date(n.getFullYear(),n.getMonth(),1).getTime()/1e3,o=new Date(n.getFullYear(),n.getMonth()+1,1).getTime()/1e3,r=Math.floor(e.addDaysToCurrentDate(i,t).getTime()/1e3),d=Math.min(r,o);return{startTime:a<i.getTime()/1e3?Math.floor(i.getTime()/1e3):a,endTime:d,endTimeForAvailableDaysInFuture:r}}applyThemeConfig(n){if(n)for(const[t,i]of Object.entries(n))this.host.style.setProperty(`${t}`,i)}onFeedbackClick(n){n.preventDefault(),this.showFeedbackModal=!0}redirectToCustomUrl(n){window.location.assign(n)}render(){var p,w,u,v,y,T,S,z,O,R;const n=this.mode==="app",t=(p=this.baseProvider)==null?void 0:p.getStore("scheduler"),i=t==null?void 0:t.get("eventInfo"),a=t==null?void 0:t.get("showBookingForm"),o=t==null?void 0:t.get("cancelledEventInfo"),r=t==null?void 0:t.get("cancelBookingId"),d=t==null?void 0:t.get("selectedTimeslot"),s=t==null?void 0:t.get("rescheduleBookingId"),c=t==null?void 0:t.get("organizerConfirmationBookingId"),b=t==null?void 0:t.get("rejectBookingId"),m=t==null?void 0:t.get("confirmedEventInfo"),g=(t==null?void 0:t.get("nylasBranding"))||this.nylasBranding,h=t==null?void 0:t.get("selectedDate"),f=(u=(w=t==null?void 0:t.get("configSettings"))==null?void 0:w.scheduler)==null?void 0:u.confirmation_redirect_url;if(this.selectedDateLabel=h&&this.language?e.capitalizeFirstLetter(h.toLocaleDateString(N.LANGUAGE_CODE_MAP[this.language],{dateStyle:"full"})):`${e.instance.t("noDateSelected")}`,n&&(r||b)&&!o)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},e.h("nylas-cancel-booking-form",{selectedTimeslot:d,cancelBookingId:r,rejectBookingId:b,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&c)return e.h(e.Host,null,e.h(I,null,e.h("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},e.h("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:c,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&o)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},e.h("nylas-cancelled-event-card",{cancelledEventInfo:o,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&m)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"confirmed-event-page"},e.h("nylas-confirmed-event-card",{confirmedEventInfo:m,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&i&&f){const l=(v=this.bookingInfoConfirmed)==null?void 0:v.primaryParticipant,C=((y=this.bookingInfoConfirmed)==null?void 0:y.additionalFields)||{};if(this.bookingInfo&&typeof((T=this.bookingInfo)==null?void 0:T.additionalFields)<"u"){const x=this.bookingInfo.additionalFields;Object.keys(x).forEach(L=>{!C[L]&&(x!=null&&x[L])&&(C[L]=x[L].value)})}const _=(S=this.stores)==null?void 0:S.scheduler.get("selectedTimeslot"),P=(z=this.stores)==null?void 0:z.scheduler.get("selectedTimezone"),U=(O=this.stores)==null?void 0:O.scheduler.get("selectedLanguage"),F=(R=this.stores)==null?void 0:R.scheduler.get("configSettings"),A=this.configurationId?this.configurationId:F==null?void 0:F.configuration_id,q=window.location.search,k=new URLSearchParams(q);k.set("booking_id",i.booking_id),l!=null&&l.name&&k.set("name",l.name),l!=null&&l.email&&k.set("email",l.email),_!=null&&_.start_time&&k.set("start_time",(new Date(_.start_time).getTime()/1e3).toString()),_!=null&&_.end_time&&k.set("end_time",(new Date(_.end_time).getTime()/1e3).toString()),P&&k.set("tz",P),U&&k.set("language",U),C&&k.set("additional_values",JSON.stringify(C)),this.slug&&k.set("page_slug",this.slug),A&&k.set("config_id",A),this.redirectToCustomUrl(`${f}?${k.toString()}`);return}if(n&&i)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"booked-event-page",part:"booked-event-page"},e.h("nylas-booked-event-card",{selectedTimeslot:d,eventInfo:i,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&(!i||s)&&!a){const l=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},s&&e.h(M,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"select-date-page",part:"select-date-page"},e.h("div",{class:"left-panel"},e.h("nylas-date-picker",{exportparts:"ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month"}),e.h("nylas-locale-switch",{exportparts:"nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label"})),e.h("div",{class:`right-panel ${s?"reschedule":""}`},e.h("h2",null,e.h("calendar-icon",null),e.h("span",{id:"selectedDate"},this.selectedDateLabel)),e.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},l&&e.h("span",{slot:"timeslot-picker-cta-label"},e.h("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:C=>this.onFeedbackClick(C)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null))}return n&&!i&&a?e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},s&&e.h(M,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"additional-data-page",part:"additional-data-page"},e.h("div",{class:"left-panel"},e.h("div",{class:"wrapper"},e.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),e.h("div",{class:`right-panel ${s?"reschedule":""}`},e.h("nylas-booking-form",{exportparts:"nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content"})))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null)):e.h(e.Host,null,e.h("slot",null))}get host(){return e.getElement(this)}static get watchers(){return{bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],themeConfig:["themeConfigChanged"]}}};H.style=G;exports.nylas_scheduling=H;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-bf124f70.cjs"),D=require("./index.es-c7ca1bad-b7a3e6bd.cjs"),B=require("./scheduler-store-2e7db190-fb6a20a1.cjs"),N=require("./constants-c549b12b-c85413b1.cjs"),E=require("./feedbackSync-b56b29ed-7a7c650e.cjs");require("react");require("react-dom");class W{constructor({schedulerAPIURL:t,nylasSchedulerStore:i,sessionId:a,configId:o,slug:r,clientId:d}){if(!t)throw new Error("schedulerAPIURL is required");if(!i)throw new Error("nylasSchedulerStore is required");if(!a&&!o&&!(r||d))throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.");t==="/"&&(t=new URL(window.location.href).origin),this.configId=o,this.sessionId=a,this.schedulerAPIURL=t,this.nylasSchedulerStore=i,this.slug=r,this.clientId=d}init(){e.debug("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}get scheduler(){return this._schedulerAPIConnector?this._schedulerAPIConnector:(this._schedulerAPIConnector=new B.NylaSchedulerAPIConnector({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId}),this._schedulerAPIConnector)}resetStores(){this.nylasSchedulerStore.reset()}}const I=(n,t)=>{const i=n.isLoading,a=n.showNotification,o=n.nylasBranding;return e.h(e.Fragment,null,a&&e.h("nylas-notification",null),i&&e.h("div",{class:"loading"},e.h("div",{class:"left"},e.h("div",{class:"skeleton"})),e.h("div",{class:"right"},e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}),e.h("div",{class:"skeleton"}))),!i&&t,e.h("div",{class:"footer"},o&&e.h(e.Fragment,null,"Powered by ",e.h("nylas-logo",null))))},M=(n,t)=>e.h("div",{class:"message-banner"},t),$=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--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;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{padding:0.5rem 4px 0;height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer svg{fill:var(--nylas-base-500)}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}nylas-feedback-form{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}',G=$,j={title:e.instance.t("genericErrorTitle"),type:D.nr.Error,category:B.ErrorCategory.Component},H=class{constructor(n){e.registerInstance(this,n),this.init=e.createEvent(this,"init",7),this.schedulerWillLoad=e.createEvent(this,"schedulerWillLoad",7),this.schedulerDidLoad=e.createEvent(this,"schedulerDidLoad",7),this.nylasSchedulerError=e.createEvent(this,"nylasSchedulerError",7),this.configSettingsLoaded=e.createEvent(this,"configSettingsLoaded",7),this.bookingRefExtracted=e.createEvent(this,"bookingRefExtracted",7),this.bookedEventInfo=e.createEvent(this,"bookedEventInfo",7),this.mode="app",this.defaultSchedulerState=void 0,this.sessionId=void 0,this.schedulerApiUrl="https://api.us.nylas.com",this.bookingInfo=void 0,this.rescheduleBookingRef=void 0,this.cancelBookingRef=void 0,this.organizerConfirmationBookingRef=void 0,this.configurationId=void 0,this.slug=void 0,this.clientId=void 0,this.nylasBranding=!0,this.eventOverrides={},this.isLoading=void 0,this.themeConfig=void 0,this.localization=void 0,this.showNotification=!0,this.enableUserFeedback=!0,this.automaticComponentRegistration=!0,this.selectedDateLabel=new Date().toLocaleDateString(void 0,{dateStyle:"full"})||`${e.instance.t("noDateSelected")}`,this.refConfigId=void 0,this.language=navigator.language,this.showFeedbackModal=!1,this.bookingInfoConfirmed=null}connectedCallback(){e.debug("[nylas-scheduler] connectedCallback")}async componentWillLoad(){var o,r;e.debug("[nylas-scheduler] Component will load"),this.enableUserFeedback&&!E.isInitialized()&&E.init({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:"1.1.7",integrations:d=>[...d.filter(s=>!1),E.feedbackSyncIntegration({colorScheme:"system",autoInject:!1})],autoSessionTracking:!1,beforeSend:()=>null});const n=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerWillLoad(n,this.nylasSchedulerConnector),n.defaultPrevented))return;this.stores={scheduler:B.CreateNylasSchedulerStore({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,...this.defaultSchedulerState})},this.baseProvider=new D.NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides),this.refConfigId=this.configurationId;let t;if(this.rescheduleBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.rescheduleBookingRef);this.refConfigId=d,this.stores.scheduler.set("rescheduleBookingId",s),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s})}else if(this.cancelBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.cancelBookingRef);this.refConfigId=d,this.stores.scheduler.set("cancelBookingId",s),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s})}else if(this.organizerConfirmationBookingRef){const[d,s,c]=e.compactStringToUUIDs(this.organizerConfirmationBookingRef);this.refConfigId=d,this.stores.scheduler.set("organizerConfirmationBookingId",s),this.stores.scheduler.set("organizerConfirmationSalt",c),t=this.bookingRefExtracted.emit({configurationId:d,bookingId:s,salt:c})}if("bookingRefExtracted"in this.eventOverrides&&(await this.eventOverrides.bookingRefExtracted(t,this.nylasSchedulerConnector),t.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;const i=(o=this.baseProvider)==null?void 0:o.getStore("scheduler");this.nylasSchedulerConnector=new W({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:i});const a=this.init.emit(this.host);"init"in this.eventOverrides&&(await this.eventOverrides.init(a,this.nylasSchedulerConnector),a.defaultPrevented)||((r=this.baseProvider)==null||r.componentWillLoad(this.nylasSchedulerConnector),this.applyThemeConfig(this.themeConfig))}async componentDidLoad(){var c,b,m,g,h,f,p,w;(c=this.baseProvider)==null||c.componentDidLoad();const n=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides&&(await this.eventOverrides.schedulerDidLoad(n,this.nylasSchedulerConnector),n.defaultPrevented)||!this.checkIfSessionIdOrConfigIdExists())return;this.localizationChanged(this.localization);const t=await((b=this.nylasSchedulerConnector)==null?void 0:b.scheduler.getUISettings());if(!t||"error"in t){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(t==null?void 0:t.error)},host:this.host});return}else{"data"in t&&((m=t.data)!=null&&m.appearance)&&console.info("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.");const u=this.configSettingsLoaded.emit({settings:t});if("configSettingsLoaded"in this.eventOverrides&&(await this.eventOverrides.configSettingsLoaded(u,this.nylasSchedulerConnector),u.defaultPrevented))return}const i=(g=this.baseProvider)==null?void 0:g.getStore("scheduler"),a=(f=(h=i==null?void 0:i.get("configSettings"))==null?void 0:h.scheduler)==null?void 0:f.available_days_in_future,o=i==null?void 0:i.get("selectedTimeslot");if(o&&(o!=null&&o.start_time)){if(!this.isTimeslotValid(o))return;if(i!=null&&i.get("showBookingForm")){i==null||i.set("selectedDate",o.start_time);return}}const r=i==null?void 0:i.get("selectedDate"),d=i==null?void 0:i.get("availability");let s;if(!(d&&d.length>0)){if(r){const{startTime:u,endTime:v,endTimeForAvailableDaysInFuture:y}=this.validateAvailableDaysInFuture(r,a||30);r.getTime()<y*1e3&&(s=await((w=this.nylasSchedulerConnector)==null?void 0:w.scheduler.getAvailability(u,v)))}else{const u=new Date,{startTime:v,endTime:y,endTimeForAvailableDaysInFuture:T}=this.validateAvailableDaysInFuture(u,a||30);u.getTime()<T*1e3&&(s=await((p=this.nylasSchedulerConnector)==null?void 0:p.scheduler.getAvailability(v,y)))}if((!s||"error"in s)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(s==null?void 0:s.error)},host:this.host}),!r){let u=new Date;const v=i==null?void 0:i.get("availability").find(y=>new Date(y.start_time)>new Date);v&&(u=v.start_time),i==null||i.set("selectedDate",u)}}}componentDisconnected(){var n;(n=this.baseProvider)==null||n.componentDisconnected()}bookingInfoChanged(n){var t;(t=this.stores)==null||t.scheduler.set("bookingInfo",n)}rescheduleBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("rescheduleBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}cancelBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("cancelBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}organizerConfirmationBookingRefChanged(n){var t,i;if(n){const[a,o]=e.compactStringToUUIDs(n);(t=this.stores)==null||t.scheduler.set("organizerConfirmationBookingId",o),this.refConfigId=a,(i=this.nylasSchedulerConnector)==null||i.scheduler.setConfigId(a)}}localizationChanged(n){n&&Object.keys(n).forEach(t=>{t in N.LANGUAGE_CODE&&(e.instance.addResourceBundle(t,"translation",n[t],!1,!0),this.language=this.language)})}themeConfigChanged(n){this.applyThemeConfig(n)}languageChanged(n){const t=n.detail;this.language=t,e.instance.changeLanguage(t)}async registerComponentHandler(n){var t;(t=this.baseProvider)==null||t.registerComponent(n.detail)}async unregisterComponentHandler(n){var t;(t=this.baseProvider)==null||t.unregisterComponent(n.detail)}async monthChangedHandler(n){var d,s,c,b,m,g,h;const t=n.detail,i=(b=(c=(s=(d=this.nylasSchedulerConnector)==null?void 0:d.schedulerStore)==null?void 0:s.get("configSettings"))==null?void 0:c.scheduler)==null?void 0:b.available_days_in_future,{startTime:a,endTime:o,endTimeForAvailableDaysInFuture:r}=this.validateAvailableDaysInFuture(t,i||30);if(a<r&&t.getTime()<r*1e3){const f=await((m=this.nylasSchedulerConnector)==null?void 0:m.scheduler.getAvailability(a,o));(!f||"error"in f)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(f==null?void 0:f.error)},host:this.host});const p=(g=this.stores)==null?void 0:g.scheduler.get("selectableDates");p&&p.length>0&&((h=this.stores)==null||h.scheduler.set("selectedDate",p[0]))}}mapToBookingData(n){var d,s,c;const t=(d=this.stores)==null?void 0:d.scheduler.get("selectedTimeslot"),i=(s=this.stores)==null?void 0:s.scheduler.get("selectedLanguage"),a=(c=this.stores)==null?void 0:c.scheduler.get("selectedTimezone"),o=t!=null&&t.start_time?new Date(t==null?void 0:t.start_time).getTime()/1e3:"",r=t!=null&&t.end_time?new Date(t==null?void 0:t.end_time).getTime()/1e3:"";return{additional_guests:n.guests,guest:{...n.primaryParticipant},additional_fields:{...n.additionalFields},start_time:o,end_time:r,email_language:i,timezone:a}}async bookButtonClickedHandler(n){var c,b,m,g;if(n.defaultPrevented)return;const t=n.detail,i=this.mapToBookingData(t);this.bookingInfoConfirmed=t;const o=(b=(c=this.nylasSchedulerConnector)==null?void 0:c.schedulerStore)==null?void 0:b.get("rescheduleBookingId");if(o){const h=await((m=this.nylasSchedulerConnector)==null?void 0:m.scheduler.rescheduleBooking(o,t));(!h||"error"in h)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(h==null?void 0:h.error)},host:this.host});const f=h==null?void 0:h.data,p=this.bookedEventInfo.emit({...h,data:{...f,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(p,this.nylasSchedulerConnector);return}const r=await((g=this.nylasSchedulerConnector)==null?void 0:g.scheduler.bookTimeslot(t));(!r||"error"in r)&&this.nylasSchedulerError.emit({notification:{...this.getErrorObject(r==null?void 0:r.error)},host:this.host});const d=r==null?void 0:r.data,s=this.bookedEventInfo.emit({...r,data:{...d,...i}});"bookedEventInfo"in this.eventOverrides&&await this.eventOverrides.bookedEventInfo(s,this.nylasSchedulerConnector)}dateSelectedHandler(n){const t=n.detail;this.selectedDateLabel=t?t.toLocaleDateString(void 0,{dateStyle:"full"}):`${e.instance.t("noDateSelected")}`}cancelBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}confirmBookingErrorHandler(n){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(n.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=!1}feedbackSubmittedHandler(n){const i={eventId:E.captureMessage("Scheduling Page User Feedback"),message:n.detail.feedback};E.captureFeedback(i,{includeReplay:!0,captureContext:{tags:{"nylas-web-element":"nylas-schduling","nylas-web-element-version":"1.1.7"},extra:{configId:this.configurationId,slug:this.slug}}}),this.showFeedbackModal=!1}async getNylasSchedulerStore(){var n;return(n=this.baseProvider)==null?void 0:n.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(n){return{title:(n==null?void 0:n.title)||j.title,category:(n==null?void 0:n.category)||j.category,type:D.nr.Error,description:(n==null?void 0:n.message)||"",id:new Date().getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){let n="";return this.sessionId||(n+=e.instance.t("sessionIdRequiredErrorMessage")),!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)&&(n=e.instance.t("sessionIdRequiredErrorMessage")+" "+e.instance.t("publicConfigErrorMessage")),this.nylasSchedulerError.emit({notification:{title:e.instance.t("schedulingComponentErrorTitle"),category:B.ErrorCategory.Component,type:D.nr.Error,description:n,id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1}return!0}isTimeslotValid(n){return new Date(n.start_time)<new Date?(this.nylasSchedulerError.emit({notification:{title:e.instance.t("invalidTimeslotErrorTitle"),category:B.ErrorCategory.Component,type:D.nr.Error,description:e.instance.t("invalidTimeslotErrorMessage"),id:new Date().getTime().toString(),ttl:"none"},host:this.host}),!1):!0}validateAvailableDaysInFuture(n,t){const i=new Date,a=new Date(n.getFullYear(),n.getMonth(),1).getTime()/1e3,o=new Date(n.getFullYear(),n.getMonth()+1,1).getTime()/1e3,r=Math.floor(e.addDaysToCurrentDate(i,t).getTime()/1e3),d=Math.min(r,o);return{startTime:a<i.getTime()/1e3?Math.floor(i.getTime()/1e3):a,endTime:d,endTimeForAvailableDaysInFuture:r}}applyThemeConfig(n){if(n)for(const[t,i]of Object.entries(n))this.host.style.setProperty(`${t}`,i)}onFeedbackClick(n){n.preventDefault(),this.showFeedbackModal=!0}redirectToCustomUrl(n){window.location.assign(n)}render(){var p,w,u,v,y,T,S,z,O,R;const n=this.mode==="app",t=(p=this.baseProvider)==null?void 0:p.getStore("scheduler"),i=t==null?void 0:t.get("eventInfo"),a=t==null?void 0:t.get("showBookingForm"),o=t==null?void 0:t.get("cancelledEventInfo"),r=t==null?void 0:t.get("cancelBookingId"),d=t==null?void 0:t.get("selectedTimeslot"),s=t==null?void 0:t.get("rescheduleBookingId"),c=t==null?void 0:t.get("organizerConfirmationBookingId"),b=t==null?void 0:t.get("rejectBookingId"),m=t==null?void 0:t.get("confirmedEventInfo"),g=(t==null?void 0:t.get("nylasBranding"))||this.nylasBranding,h=t==null?void 0:t.get("selectedDate"),f=(u=(w=t==null?void 0:t.get("configSettings"))==null?void 0:w.scheduler)==null?void 0:u.confirmation_redirect_url;if(this.selectedDateLabel=h&&this.language?e.capitalizeFirstLetter(h.toLocaleDateString(N.LANGUAGE_CODE_MAP[this.language],{dateStyle:"full"})):`${e.instance.t("noDateSelected")}`,n&&(r||b)&&!o)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancel-flow-page",part:"cancel-flow-page"},e.h("nylas-cancel-booking-form",{selectedTimeslot:d,cancelBookingId:r,rejectBookingId:b,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&c)return e.h(e.Host,null,e.h(I,null,e.h("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},e.h("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:c,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&o)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"cancelled-event-page"},e.h("nylas-cancelled-event-card",{cancelledEventInfo:o,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&m)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"cancelled-event-page",part:"confirmed-event-page"},e.h("nylas-confirmed-event-card",{confirmedEventInfo:m,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&i&&f){const l=(v=this.bookingInfoConfirmed)==null?void 0:v.primaryParticipant,C=((y=this.bookingInfoConfirmed)==null?void 0:y.additionalFields)||{};if(this.bookingInfo&&typeof((T=this.bookingInfo)==null?void 0:T.additionalFields)<"u"){const x=this.bookingInfo.additionalFields;Object.keys(x).forEach(L=>{!C[L]&&(x!=null&&x[L])&&(C[L]=x[L].value)})}const _=(S=this.stores)==null?void 0:S.scheduler.get("selectedTimeslot"),P=(z=this.stores)==null?void 0:z.scheduler.get("selectedTimezone"),U=(O=this.stores)==null?void 0:O.scheduler.get("selectedLanguage"),F=(R=this.stores)==null?void 0:R.scheduler.get("configSettings"),A=this.configurationId?this.configurationId:F==null?void 0:F.configuration_id,q=window.location.search,k=new URLSearchParams(q);k.set("booking_id",i.booking_id),l!=null&&l.name&&k.set("name",l.name),l!=null&&l.email&&k.set("email",l.email),_!=null&&_.start_time&&k.set("start_time",(new Date(_.start_time).getTime()/1e3).toString()),_!=null&&_.end_time&&k.set("end_time",(new Date(_.end_time).getTime()/1e3).toString()),P&&k.set("tz",P),U&&k.set("language",U),C&&k.set("additional_values",JSON.stringify(C)),this.slug&&k.set("page_slug",this.slug),A&&k.set("config_id",A),this.redirectToCustomUrl(`${f}?${k.toString()}`);return}if(n&&i)return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},e.h("div",{class:"booked-event-page",part:"booked-event-page"},e.h("nylas-booked-event-card",{selectedTimeslot:d,eventInfo:i,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null));if(n&&(!i||s)&&!a){const l=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},s&&e.h(M,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"select-date-page",part:"select-date-page"},e.h("div",{class:"left-panel"},e.h("nylas-date-picker",{exportparts:"ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month"}),e.h("nylas-locale-switch",{exportparts:"nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label"})),e.h("div",{class:`right-panel ${s?"reschedule":""}`},e.h("h2",null,e.h("calendar-icon",null),e.h("span",{id:"selectedDate"},this.selectedDateLabel)),e.h("nylas-timeslot-picker",{exportparts:"ntp, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},l&&e.h("span",{slot:"timeslot-picker-cta-label"},e.h("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:C=>this.onFeedbackClick(C)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null))}return n&&!i&&a?e.h(e.Host,null,e.h(I,{nylasBranding:g,isLoading:this.isLoading,showNotification:this.showNotification},s&&e.h(M,null,`${e.instance.t("rescheduleTitle")}`),e.h("div",{class:"additional-data-page",part:"additional-data-page"},e.h("div",{class:"left-panel"},e.h("div",{class:"wrapper"},e.h("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),e.h("div",{class:`right-panel ${s?"reschedule":""}`},e.h("nylas-booking-form",{exportparts:"nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content"})))),this.enableUserFeedback&&e.h("button-component",{id:"report-issue",variant:"basic",onClick:l=>this.onFeedbackClick(l)},e.h("feedback-icon",null)),this.showFeedbackModal&&e.h("nylas-feedback-form",null)):e.h(e.Host,null,e.h("slot",null))}get host(){return e.getElement(this)}static get watchers(){return{bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],themeConfig:["themeConfigChanged"]}}};H.style=G;exports.nylas_scheduling=H;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-290b2932.cjs");require("react");require("react-dom");var _={exports:{}};(function(e,t){(function(n,i){e.exports=i()})(r.commonjsGlobal,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,h=/\d\d?/,x=/\d*[^-_:/,()\s\d]+/,b={},Z=function(s){return(s=+s)+(s>68?1900:2e3)},d=function(s){return function(o){this[s]=+o}},B=[/[+-]\d\d:?(\d\d)?|Z/,function(s){(this.zone||(this.zone={})).offset=function(o){if(!o||o==="Z")return 0;var m=o.match(/([+-]|\d\d)/g),l=60*m[1]+(+m[2]||0);return l===0?0:m[0]==="+"?-l:l}(s)}],F=function(s){var o=b[s];return o&&(o.indexOf?o:o.s.concat(o.f))},V=function(s,o){var m,l=b.meridiem;if(l){for(var p=1;p<=24;p+=1)if(s.indexOf(l(p,0,o))>-1){m=p>12;break}}else m=s===(o?"pm":"PM");return m},q={A:[x,function(s){this.afternoon=V(s,!1)}],a:[x,function(s){this.afternoon=V(s,!0)}],S:[/\d/,function(s){this.milliseconds=100*+s}],SS:[a,function(s){this.milliseconds=10*+s}],SSS:[/\d{3}/,function(s){this.milliseconds=+s}],s:[h,d("seconds")],ss:[h,d("seconds")],m:[h,d("minutes")],mm:[h,d("minutes")],H:[h,d("hours")],h:[h,d("hours")],HH:[h,d("hours")],hh:[h,d("hours")],D:[h,d("day")],DD:[a,d("day")],Do:[x,function(s){var o=b.ordinal,m=s.match(/\d+/);if(this.day=m[0],o)for(var l=1;l<=31;l+=1)o(l).replace(/\[|\]/g,"")===s&&(this.day=l)}],M:[h,d("month")],MM:[a,d("month")],MMM:[x,function(s){var o=F("months"),m=(F("monthsShort")||o.map(function(l){return l.slice(0,3)})).indexOf(s)+1;if(m<1)throw new Error;this.month=m%12||m}],MMMM:[x,function(s){var o=F("months").indexOf(s)+1;if(o<1)throw new Error;this.month=o%12||o}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(s){this.year=Z(s)}],YYYY:[/\d{4}/,d("year")],Z:B,ZZ:B};function N(s){var o,m;o=s,m=b&&b.formats;for(var l=(s=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S,T,f){var c=f&&f.toUpperCase();return T||m[f]||n[f]||m[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,k,M){return k||M.slice(1)})})).match(i),p=l.length,y=0;y<p;y+=1){var C=l[y],I=q[C],v=I&&I[0],g=I&&I[1];l[y]=g?{regex:v,parser:g}:C.replace(/^\[|\]$/g,"")}return function(S){for(var T={},f=0,c=0;f<p;f+=1){var w=l[f];if(typeof w=="string")c+=w.length;else{var k=w.regex,M=w.parser,L=S.slice(c),A=k.exec(L)[0];M.call(T,A),S=S.replace(A,"")}}return function(D){var u=D.afternoon;if(u!==void 0){var Y=D.hours;u?Y<12&&(D.hours+=12):Y===12&&(D.hours=0),delete D.afternoon}}(T),T}}return function(s,o,m){m.p.customParseFormat=!0,s&&s.parseTwoDigitYear&&(Z=s.parseTwoDigitYear);var l=o.prototype,p=l.parse;l.parse=function(y){var C=y.date,I=y.utc,v=y.args;this.$u=I;var g=v[1];if(typeof g=="string"){var S=v[2]===!0,T=v[3]===!0,f=S||T,c=v[2];T&&(c=v[2]),b=this.$locale(),!S&&c&&(b=m.Ls[c]),this.$d=function(L,A,D){try{if(["x","X"].indexOf(A)>-1)return new Date((A==="X"?1e3:1)*L);var u=N(A)(L),Y=u.year,E=u.month,X=u.day,G=u.hours,J=u.minutes,Q=u.seconds,ee=u.milliseconds,W=u.zone,$=new Date,P=X||(Y||E?1:$.getDate()),z=Y||$.getFullYear(),O=0;Y&&!E||(O=E>0?E-1:$.getMonth());var j=G||0,H=J||0,K=Q||0,R=ee||0;return W?new Date(Date.UTC(z,O,P,j,H,K,R+60*W.offset*1e3)):D?new Date(Date.UTC(z,O,P,j,H,K,R)):new Date(z,O,P,j,H,K,R)}catch{return new Date("")}}(C,g,I),this.init(),c&&c!==!0&&(this.$L=this.locale(c).$L),f&&C!=this.format(g)&&(this.$d=new Date("")),b={}}else if(g instanceof Array)for(var w=g.length,k=1;k<=w;k+=1){v[1]=g[k-1];var M=m.apply(this,v);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}k===w&&(this.$d=new Date(""))}else p.call(this,y)}}})})(_);const te=_.exports,ie=':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}',se=ie;r.dayjs.extend(te);const U=class{constructor(e){r.registerInstance(this,e),this.timeChange=r.createEvent(this,"timeChange",7),this.formError=r.createEvent(this,"formError",7),this.time=void 0,this.minimumStartTime=null,this.placeholder="hh:mmam/pm",this.name=void 0,this.hasError=!1,this.err="",this.showTimes=!1,this.ariaActivedescendant="",this.times=this.generateTimes(),this.shouldAutoScroll=!1}handleOutsideClick(e){!e.composedPath().includes(this.el)&&this.showTimes&&(this.showTimes=!1)}minimumStartTimeChangedHandler(){if(this.minimumStartTime){let e=r.dayjs().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4,-2)));this.minimumStartTime.slice(-2).toLowerCase()==="pm"&&parseInt(this.minimumStartTime)!==12?e=e.add(12,"hour"):this.minimumStartTime.slice(-2).toLowerCase()==="am"&&parseInt(this.minimumStartTime)===12&&(e=e.subtract(12,"hour")),this.times=this.generateTimes();const t=r.dayjs(this.times[0].value,"hh:mma");r.dayjs(this.time,"hh:mma").isBefore(t)&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"}))}}componentDidRender(){if(this.showTimes&&this.shouldAutoScroll){const e=r.autocompleteTimeFormat(this.time),t=this.times.findIndex(n=>n.value===e);t>-1&&(this.shouldAutoScroll=!1,this.scrollToViewWithinParent(t));return}}handleTimeChange(e,t){const n=t.split(":");n[0]==="00"&&n[1].slice(-2)=="pm"&&(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),r.validateTimeFormatInput(t)?(this.err="",this.formError.emit({key:this.el.id,message:""})):(this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"})),this.timeChange.emit({key:this.el.id,value:t})}handleTimeAutocomplete(e){var n;const t=(n=e.target)==null?void 0:n.value;if(!r.validateTimeFormatInput(t)){this.err="Invalid",this.formError.emit({key:this.el.id,message:"Invalid"});return}if(t===""){const i=r.roundToNearest15Minutes().format("hh:mma");this.timeChange.emit({key:this.el.id,value:i});return}if(!r.validateExactTimeFormat(t)){const i=r.autocompleteTimeFormat(t);this.timeChange.emit({key:this.el.id,value:i});return}this.timeChange.emit({key:this.el.id,value:t})}handleOnInput(e){var n;const t=(n=e.target)==null?void 0:n.value;if(r.validateTimeFormatInput(t)){if(t===""){const i=r.roundToNearest15Minutes().format("hh:mma"),a=this.times.findIndex(h=>h.value===i);a>-1&&this.scrollToViewWithinParent(a);return}if(!r.validateExactTimeFormat(t)){const i=r.autocompleteTimeFormat(t),a=this.times.findIndex(h=>h.value===i);a>-1&&this.scrollToViewWithinParent(a);return}}}generateTimes(){const e=[];let t=r.dayjs().set("hour",0).set("minute",0).set("second",0);this.minimumStartTime&&(t=r.dayjs(this.minimumStartTime,"hh:mma"));const n=t.endOf("day").diff(t,"minutes"),i=Math.round(n/15);for(let a=0;a<i+1;a++){const h=t.add(a*15,"minute");if(a==i&&h.format("hh:mma").includes("am"))break;e.push({id:a,value:h.format("hh:mma")})}return e}handleComboboxKeyDown(e){if(e.key==="ArrowDown"){if(e.preventDefault(),!this.showTimes){this.showTimes=!0,this.shouldAutoScroll=!0;return}if(this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[0].id.toString(),this.focusOption(0);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t+1<this.times.length?t+1:0;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}}else if(e.key==="ArrowUp")if(e.preventDefault(),this.ariaActivedescendant==="")this.ariaActivedescendant=this.times[this.times.length-1].id.toString(),this.focusOption(this.times.length-1);else{const t=this.times.findIndex(i=>i.id.toString()===this.ariaActivedescendant),n=t-1>=0?t-1:this.times.length-1;this.ariaActivedescendant=this.times[n].id.toString(),this.focusOption(n)}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}handleListboxKeydown(e){const t=this.times,n=t.findIndex(i=>i.id.toString()===this.ariaActivedescendant);if(e.key==="ArrowDown"||e.key==="Tab"&&!e.shiftKey){e.preventDefault();const i=n+1<t.length?n+1:0;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey){e.preventDefault();const i=n-1>=0?n-1:t.length-1;this.ariaActivedescendant=t[i].id.toString(),this.focusOption(i)}else if(e.key==="Enter"){if(e.preventDefault(),this.ariaActivedescendant){const i=t[n];this.handleTimeChange(e,i.value),this.showTimes=!1,this.ariaActivedescendant="",this.timeInput.focus()}}else e.key==="Escape"&&(this.showTimes=!1,this.timeInput.focus())}scrollToViewWithinParent(e){var x;const t=this.times[e],n=(x=this.el.shadowRoot)==null?void 0:x.getElementById(t.id.toString()),i=this.timeMenu;this.ariaActivedescendant=t.id.toString();const a=n.getBoundingClientRect(),h=i.getBoundingClientRect();a.top<h.top?i.scrollTop-=h.top-a.top:a.bottom>h.bottom&&(i.scrollTop+=a.bottom-h.bottom),a.left<h.left?i.scrollLeft-=h.left-a.left:a.right>h.right&&(i.scrollLeft+=a.right-h.right)}focusOption(e){var a;const t=this.times[e];if(!t)return;const n=t.id.toString(),i=(a=this.el.shadowRoot)==null?void 0:a.getElementById(n);i&&(i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}))}render(){return r.h(r.Host,{key:"e83949b2270706557e5d45aff5958d937c6489c9"},r.h("div",{key:"0cacfe5530a1186ce2ff50ccc3d9328a62d48e2f",class:"time-picker",part:"time-picker"},r.h("input",{key:"8daf647468746997e503883478debf8d335a780d",type:"text",name:this.name,id:this.name,part:"time-input",class:{"time-input":!0,error:!!this.err||this.hasError},ref:e=>this.timeInput=e,value:this.time,onClick:()=>{this.showTimes=!this.showTimes,this.shouldAutoScroll=!0},"aria-haspopup":"listbox","aria-label":this.name,"aria-expanded":this.showTimes?"true":"false",placeholder:this.placeholder,onKeyDown:e=>this.handleComboboxKeyDown(e),onInput:e=>this.handleOnInput(e),onBlur:e=>this.handleTimeAutocomplete(e)}),this.err&&r.h("div",{class:"invalid-time-icon"}),this.showTimes&&r.h("div",{class:"times",part:"times",ref:e=>this.timeMenu=e},r.h("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.times.map(e=>r.h("li",{tabindex:"0",key:e.id,id:e.id.toString(),class:{focused:this.ariaActivedescendant===e.id.toString()},onClick:t=>{this.handleTimeChange(t,e.value),this.showTimes=!1,this.timeInput.focus()},role:"option"},`${e.value}`)))),!this.showTimes&&this.err&&r.h("p",{class:"error",id:"email-error"},this.err)))}get el(){return r.getElement(this)}static get watchers(){return{minimumStartTime:["minimumStartTimeChangedHandler"]}}};U.style=se;exports.nylas_time_window_picker=U;
@@ -1,316 +0,0 @@
1
- import { b as ae, Q as C, r as oe, c as X, R as U, S as V, T as G, U as Q, h as k, H as he, g as me } from "./index-fb096a02.js";
2
- import "react";
3
- import "react-dom";
4
- var q = { exports: {} };
5
- (function(e, t) {
6
- (function(n, i) {
7
- e.exports = i();
8
- })(ae, function() {
9
- var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, i = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, r = /\d\d/, o = /\d\d?/, v = /\d*[^-_:/,()\s\d]+/, x = {}, W = function(s) {
10
- return (s = +s) + (s > 68 ? 1900 : 2e3);
11
- }, l = function(s) {
12
- return function(a) {
13
- this[s] = +a;
14
- };
15
- }, _ = [/[+-]\d\d:?(\d\d)?|Z/, function(s) {
16
- (this.zone || (this.zone = {})).offset = function(a) {
17
- if (!a || a === "Z")
18
- return 0;
19
- var h = a.match(/([+-]|\d\d)/g), m = 60 * h[1] + (+h[2] || 0);
20
- return m === 0 ? 0 : h[0] === "+" ? -m : m;
21
- }(s);
22
- }], P = function(s) {
23
- var a = x[s];
24
- return a && (a.indexOf ? a : a.s.concat(a.f));
25
- }, j = function(s, a) {
26
- var h, m = x.meridiem;
27
- if (m) {
28
- for (var f = 1; f <= 24; f += 1)
29
- if (s.indexOf(m(f, 0, a)) > -1) {
30
- h = f > 12;
31
- break;
32
- }
33
- } else
34
- h = s === (a ? "pm" : "PM");
35
- return h;
36
- }, J = { A: [v, function(s) {
37
- this.afternoon = j(s, !1);
38
- }], a: [v, function(s) {
39
- this.afternoon = j(s, !0);
40
- }], S: [/\d/, function(s) {
41
- this.milliseconds = 100 * +s;
42
- }], SS: [r, function(s) {
43
- this.milliseconds = 10 * +s;
44
- }], SSS: [/\d{3}/, function(s) {
45
- this.milliseconds = +s;
46
- }], s: [o, l("seconds")], ss: [o, l("seconds")], m: [o, l("minutes")], mm: [o, l("minutes")], H: [o, l("hours")], h: [o, l("hours")], HH: [o, l("hours")], hh: [o, l("hours")], D: [o, l("day")], DD: [r, l("day")], Do: [v, function(s) {
47
- var a = x.ordinal, h = s.match(/\d+/);
48
- if (this.day = h[0], a)
49
- for (var m = 1; m <= 31; m += 1)
50
- a(m).replace(/\[|\]/g, "") === s && (this.day = m);
51
- }], M: [o, l("month")], MM: [r, l("month")], MMM: [v, function(s) {
52
- var a = P("months"), h = (P("monthsShort") || a.map(function(m) {
53
- return m.slice(0, 3);
54
- })).indexOf(s) + 1;
55
- if (h < 1)
56
- throw new Error();
57
- this.month = h % 12 || h;
58
- }], MMMM: [v, function(s) {
59
- var a = P("months").indexOf(s) + 1;
60
- if (a < 1)
61
- throw new Error();
62
- this.month = a % 12 || a;
63
- }], Y: [/[+-]?\d+/, l("year")], YY: [r, function(s) {
64
- this.year = W(s);
65
- }], YYYY: [/\d{4}/, l("year")], Z: _, ZZ: _ };
66
- function ee(s) {
67
- var a, h;
68
- a = s, h = x && x.formats;
69
- for (var m = (s = a.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(S, b, u) {
70
- var d = u && u.toUpperCase();
71
- return b || h[u] || n[u] || h[d].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(w, T, D) {
72
- return T || D.slice(1);
73
- });
74
- })).match(i), f = m.length, p = 0; p < f; p += 1) {
75
- var L = m[p], I = J[L], y = I && I[0], g = I && I[1];
76
- m[p] = g ? { regex: y, parser: g } : L.replace(/^\[|\]$/g, "");
77
- }
78
- return function(S) {
79
- for (var b = {}, u = 0, d = 0; u < f; u += 1) {
80
- var w = m[u];
81
- if (typeof w == "string")
82
- d += w.length;
83
- else {
84
- var T = w.regex, D = w.parser, E = S.slice(d), A = T.exec(E)[0];
85
- D.call(b, A), S = S.replace(A, "");
86
- }
87
- }
88
- return function(M) {
89
- var c = M.afternoon;
90
- if (c !== void 0) {
91
- var Y = M.hours;
92
- c ? Y < 12 && (M.hours += 12) : Y === 12 && (M.hours = 0), delete M.afternoon;
93
- }
94
- }(b), b;
95
- };
96
- }
97
- return function(s, a, h) {
98
- h.p.customParseFormat = !0, s && s.parseTwoDigitYear && (W = s.parseTwoDigitYear);
99
- var m = a.prototype, f = m.parse;
100
- m.parse = function(p) {
101
- var L = p.date, I = p.utc, y = p.args;
102
- this.$u = I;
103
- var g = y[1];
104
- if (typeof g == "string") {
105
- var S = y[2] === !0, b = y[3] === !0, u = S || b, d = y[2];
106
- b && (d = y[2]), x = this.$locale(), !S && d && (x = h.Ls[d]), this.$d = function(E, A, M) {
107
- try {
108
- if (["x", "X"].indexOf(A) > -1)
109
- return new Date((A === "X" ? 1e3 : 1) * E);
110
- var c = ee(A)(E), Y = c.year, O = c.month, te = c.day, ie = c.hours, se = c.minutes, ne = c.seconds, re = c.milliseconds, N = c.zone, z = /* @__PURE__ */ new Date(), F = te || (Y || O ? 1 : z.getDate()), H = Y || z.getFullYear(), $ = 0;
111
- Y && !O || ($ = O > 0 ? O - 1 : z.getMonth());
112
- var K = ie || 0, R = se || 0, Z = ne || 0, B = re || 0;
113
- return N ? new Date(Date.UTC(H, $, F, K, R, Z, B + 60 * N.offset * 1e3)) : M ? new Date(Date.UTC(H, $, F, K, R, Z, B)) : new Date(H, $, F, K, R, Z, B);
114
- } catch {
115
- return /* @__PURE__ */ new Date("");
116
- }
117
- }(L, g, I), this.init(), d && d !== !0 && (this.$L = this.locale(d).$L), u && L != this.format(g) && (this.$d = /* @__PURE__ */ new Date("")), x = {};
118
- } else if (g instanceof Array)
119
- for (var w = g.length, T = 1; T <= w; T += 1) {
120
- y[1] = g[T - 1];
121
- var D = h.apply(this, y);
122
- if (D.isValid()) {
123
- this.$d = D.$d, this.$L = D.$L, this.init();
124
- break;
125
- }
126
- T === w && (this.$d = /* @__PURE__ */ new Date(""));
127
- }
128
- else
129
- f.call(this, p);
130
- };
131
- };
132
- });
133
- })(q);
134
- const le = q.exports, de = ':host{display:block;position:relative;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker{display:inline-block;width:150px;font-family:var(--nylas-font-family);position:relative}@media screen and (max-width: 768px){.time-picker{width:auto}}.time-picker input{width:150px;height:48px;text-align:center;font-size:16px;font-family:inherit;cursor:pointer;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.time-picker input{width:88px}}@media screen and (max-width: 504px){.time-picker input{width:68px;font-size:15px}}.time-picker input.focus{background:transparent}.time-picker input:hover,.time-picker input:active{border:1px solid var(--nylas-primary)}.time-picker input:active{outline:2px solid var(--nylas-primary)}.time-picker input span.open{transform:rotate(90deg)}.time-picker input span.closed{transform:rotate(270deg)}.time-picker input.error{border:1px solid var(--nylas-error)}.time-picker p.error{color:var(--nylas-error);font-size:0.875rem;margin:0}.times{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;border:1px solid #ddd;z-index:1;border-radius:4px;position:absolute;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.times ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.times ul li{padding:16px, 12px, 16px, 12px;color:black;padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:center;cursor:pointer}.times ul li.focused{background-color:var(--nylas-base-100)}.times ul li:hover,.times ul li:focus{background-color:var(--nylas-base-100)}.times ul li label{display:flex;align-items:center;gap:0.5rem}.times ul li label input{margin:0}', ce = de;
135
- C.extend(le);
136
- const ue = class {
137
- constructor(e) {
138
- oe(this, e), this.timeChange = X(this, "timeChange", 7), this.formError = X(this, "formError", 7), this.time = void 0, this.minimumStartTime = null, this.placeholder = "hh:mmam/pm", this.name = void 0, this.hasError = !1, this.err = "", this.showTimes = !1, this.ariaActivedescendant = "", this.times = this.generateTimes(), this.shouldAutoScroll = !1;
139
- }
140
- handleOutsideClick(e) {
141
- !e.composedPath().includes(this.el) && this.showTimes && (this.showTimes = !1);
142
- }
143
- minimumStartTimeChangedHandler() {
144
- if (this.minimumStartTime) {
145
- let e = C().hour(parseInt(this.minimumStartTime)).minute(parseInt(this.minimumStartTime.slice(-4, -2)));
146
- this.minimumStartTime.slice(-2).toLowerCase() === "pm" && parseInt(this.minimumStartTime) !== 12 ? e = e.add(12, "hour") : this.minimumStartTime.slice(-2).toLowerCase() === "am" && parseInt(this.minimumStartTime) === 12 && (e = e.subtract(12, "hour")), this.times = this.generateTimes();
147
- const t = C(this.times[0].value, "hh:mma");
148
- C(this.time, "hh:mma").isBefore(t) && (this.err = "Invalid", this.formError.emit({
149
- key: this.el.id,
150
- message: "Invalid"
151
- }));
152
- }
153
- }
154
- componentDidRender() {
155
- if (this.showTimes && this.shouldAutoScroll) {
156
- const e = U(this.time), t = this.times.findIndex((n) => n.value === e);
157
- t > -1 && (this.shouldAutoScroll = !1, this.scrollToViewWithinParent(t));
158
- return;
159
- }
160
- }
161
- handleTimeChange(e, t) {
162
- const n = t.split(":");
163
- n[0] === "00" && n[1].slice(-2) == "pm" && (this.err = "Invalid", this.formError.emit({
164
- key: this.el.id,
165
- message: "Invalid"
166
- })), V(t) ? (this.err = "", this.formError.emit({
167
- key: this.el.id,
168
- message: ""
169
- })) : (this.err = "Invalid", this.formError.emit({
170
- key: this.el.id,
171
- message: "Invalid"
172
- })), this.timeChange.emit({
173
- key: this.el.id,
174
- value: t
175
- });
176
- }
177
- handleTimeAutocomplete(e) {
178
- var n;
179
- const t = (n = e.target) == null ? void 0 : n.value;
180
- if (!V(t)) {
181
- this.err = "Invalid", this.formError.emit({
182
- key: this.el.id,
183
- message: "Invalid"
184
- });
185
- return;
186
- }
187
- if (t === "") {
188
- const i = G().format("hh:mma");
189
- this.timeChange.emit({
190
- key: this.el.id,
191
- value: i
192
- });
193
- return;
194
- }
195
- if (!Q(t)) {
196
- const i = U(t);
197
- this.timeChange.emit({
198
- key: this.el.id,
199
- value: i
200
- });
201
- return;
202
- }
203
- this.timeChange.emit({
204
- key: this.el.id,
205
- value: t
206
- });
207
- }
208
- handleOnInput(e) {
209
- var n;
210
- const t = (n = e.target) == null ? void 0 : n.value;
211
- if (V(t)) {
212
- if (t === "") {
213
- const i = G().format("hh:mma"), r = this.times.findIndex((o) => o.value === i);
214
- r > -1 && this.scrollToViewWithinParent(r);
215
- return;
216
- }
217
- if (!Q(t)) {
218
- const i = U(t), r = this.times.findIndex((o) => o.value === i);
219
- r > -1 && this.scrollToViewWithinParent(r);
220
- return;
221
- }
222
- }
223
- }
224
- generateTimes() {
225
- const e = [];
226
- let t = C().set("hour", 0).set("minute", 0).set("second", 0);
227
- this.minimumStartTime && (t = C(this.minimumStartTime, "hh:mma"));
228
- const n = t.endOf("day").diff(t, "minutes"), i = Math.round(n / 15);
229
- for (let r = 0; r < i + 1; r++) {
230
- const o = t.add(r * 15, "minute");
231
- if (r == i && o.format("hh:mma").includes("am"))
232
- break;
233
- e.push({ id: r, value: o.format("hh:mma") });
234
- }
235
- return e;
236
- }
237
- handleComboboxKeyDown(e) {
238
- if (e.key === "ArrowDown") {
239
- if (e.preventDefault(), !this.showTimes) {
240
- this.showTimes = !0, this.shouldAutoScroll = !0;
241
- return;
242
- }
243
- if (this.ariaActivedescendant === "")
244
- this.ariaActivedescendant = this.times[0].id.toString(), this.focusOption(0);
245
- else {
246
- const t = this.times.findIndex((i) => i.id.toString() === this.ariaActivedescendant), n = t + 1 < this.times.length ? t + 1 : 0;
247
- this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
248
- }
249
- } else if (e.key === "ArrowUp")
250
- if (e.preventDefault(), this.ariaActivedescendant === "")
251
- this.ariaActivedescendant = this.times[this.times.length - 1].id.toString(), this.focusOption(this.times.length - 1);
252
- else {
253
- const t = this.times.findIndex((i) => i.id.toString() === this.ariaActivedescendant), n = t - 1 >= 0 ? t - 1 : this.times.length - 1;
254
- this.ariaActivedescendant = this.times[n].id.toString(), this.focusOption(n);
255
- }
256
- else
257
- e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
258
- }
259
- handleListboxKeydown(e) {
260
- const t = this.times, n = t.findIndex((i) => i.id.toString() === this.ariaActivedescendant);
261
- if (e.key === "ArrowDown" || e.key === "Tab" && !e.shiftKey) {
262
- e.preventDefault();
263
- const i = n + 1 < t.length ? n + 1 : 0;
264
- this.ariaActivedescendant = t[i].id.toString(), this.focusOption(i);
265
- } else if (e.key === "ArrowUp" || e.key === "Tab" && e.shiftKey) {
266
- e.preventDefault();
267
- const i = n - 1 >= 0 ? n - 1 : t.length - 1;
268
- this.ariaActivedescendant = t[i].id.toString(), this.focusOption(i);
269
- } else if (e.key === "Enter") {
270
- if (e.preventDefault(), this.ariaActivedescendant) {
271
- const i = t[n];
272
- this.handleTimeChange(e, i.value), this.showTimes = !1, this.ariaActivedescendant = "", this.timeInput.focus();
273
- }
274
- } else
275
- e.key === "Escape" && (this.showTimes = !1, this.timeInput.focus());
276
- }
277
- scrollToViewWithinParent(e) {
278
- var v;
279
- const t = this.times[e], n = (v = this.el.shadowRoot) == null ? void 0 : v.getElementById(t.id.toString()), i = this.timeMenu;
280
- this.ariaActivedescendant = t.id.toString();
281
- const r = n.getBoundingClientRect(), o = i.getBoundingClientRect();
282
- r.top < o.top ? i.scrollTop -= o.top - r.top : r.bottom > o.bottom && (i.scrollTop += r.bottom - o.bottom), r.left < o.left ? i.scrollLeft -= o.left - r.left : r.right > o.right && (i.scrollLeft += r.right - o.right);
283
- }
284
- focusOption(e) {
285
- var r;
286
- const t = this.times[e];
287
- if (!t)
288
- return;
289
- const n = t.id.toString(), i = (r = this.el.shadowRoot) == null ? void 0 : r.getElementById(n);
290
- i && (i.focus(), i.scrollIntoView({ behavior: "smooth", block: "nearest" }));
291
- }
292
- render() {
293
- return k(he, { key: "e83949b2270706557e5d45aff5958d937c6489c9" }, k("div", { key: "0cacfe5530a1186ce2ff50ccc3d9328a62d48e2f", class: "time-picker", part: "time-picker" }, k("input", { key: "8daf647468746997e503883478debf8d335a780d", type: "text", name: this.name, id: this.name, part: "time-input", class: {
294
- "time-input": !0,
295
- error: !!this.err || this.hasError
296
- }, ref: (e) => this.timeInput = e, value: this.time, onClick: () => {
297
- this.showTimes = !this.showTimes, this.shouldAutoScroll = !0;
298
- }, "aria-haspopup": "listbox", "aria-label": this.name, "aria-expanded": this.showTimes ? "true" : "false", placeholder: this.placeholder, onKeyDown: (e) => this.handleComboboxKeyDown(e), onInput: (e) => this.handleOnInput(e), onBlur: (e) => this.handleTimeAutocomplete(e) }), this.err && k("div", { class: "invalid-time-icon" }), this.showTimes && k("div", { class: "times", part: "times", ref: (e) => this.timeMenu = e }, k("ul", { tabindex: "-1", role: "listbox", "aria-label": this.name, "aria-activedescendant": this.ariaActivedescendant, onKeyDown: (e) => this.handleListboxKeydown(e) }, this.times.map((e) => k("li", { tabindex: "0", key: e.id, id: e.id.toString(), class: {
299
- focused: this.ariaActivedescendant === e.id.toString()
300
- }, onClick: (t) => {
301
- this.handleTimeChange(t, e.value), this.showTimes = !1, this.timeInput.focus();
302
- }, role: "option" }, `${e.value}`)))), !this.showTimes && this.err && k("p", { class: "error", id: "email-error" }, this.err)));
303
- }
304
- get el() {
305
- return me(this);
306
- }
307
- static get watchers() {
308
- return {
309
- minimumStartTime: ["minimumStartTimeChangedHandler"]
310
- };
311
- }
312
- };
313
- ue.style = ce;
314
- export {
315
- ue as nylas_time_window_picker
316
- };
@@ -1,15 +0,0 @@
1
- import { r as e, h as t } from "./index-fb096a02.js";
2
- import "react";
3
- import "react-dom";
4
- const o = ".sc-person-icon-h{display:flex}", r = o, C = class {
5
- constructor(s) {
6
- e(this, s), this.width = "14", this.height = "16";
7
- }
8
- render() {
9
- return t("svg", { key: "bf77344f510a860cf3b05daea1254dbe06465bcf", width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "6704d143c071b2de1ce05a823bb98ba59fbffba7", d: "M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z", fill: "currentColor" }));
10
- }
11
- };
12
- C.style = r;
13
- export {
14
- C as person_icon
15
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-290b2932.cjs");require("react");require("react-dom");const r=".sc-person-icon-h{display:flex}",i=r,t=class{constructor(s){e.registerInstance(this,s),this.width="14",this.height="16"}render(){return e.h("svg",{key:"bf77344f510a860cf3b05daea1254dbe06465bcf",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"6704d143c071b2de1ce05a823bb98ba59fbffba7",d:"M7 0C4.79086 0 3 1.79086 3 4C3 6.20914 4.79086 8 7 8C9.20914 8 11 6.20914 11 4C11 1.79086 9.20914 0 7 0ZM4 4C4 2.34315 5.34315 1 7 1C8.65685 1 10 2.34315 10 4C10 5.65685 8.65685 7 7 7C5.34315 7 4 5.65685 4 4ZM2.00873 9C0.903151 9 0 9.88687 0 11C0 12.6912 0.83281 13.9663 2.13499 14.7966C3.41697 15.614 5.14526 16 7 16C8.85474 16 10.583 15.614 11.865 14.7966C13.1672 13.9663 14 12.6912 14 11C14 9.89557 13.1045 9.00001 12 9.00001L2.00873 9ZM1 11C1 10.4467 1.44786 10 2.00873 10L12 10C12.5522 10 13 10.4478 13 11C13 12.3088 12.3777 13.2837 11.3274 13.9534C10.2568 14.636 8.73511 15 7 15C5.26489 15 3.74318 14.636 2.67262 13.9534C1.62226 13.2837 1 12.3088 1 11Z",fill:"currentColor"}))}};t.style=i;exports.person_icon=t;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-290b2932.cjs");require("react");require("react-dom");const s=".sc-play-icon-h{display:flex}",o=s,t=class{constructor(i){e.registerInstance(this,i),this.width="15",this.height="15"}render(){return e.h("svg",{key:"09672d0e495dea5c057e0459bbaf09e05c5f6d92",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"f2d1b1e318670f9dac0c53f4e6bfe209fb6bb073",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};t.style=o;exports.play_icon=t;
@@ -1,15 +0,0 @@
1
- import { r as s, h as t } from "./index-2b208d5d.js";
2
- import "react";
3
- import "react-dom";
4
- const o = ".sc-play-icon-h{display:flex}", i = o, r = class {
5
- constructor(e) {
6
- s(this, e), this.width = "15", this.height = "15";
7
- }
8
- render() {
9
- return t("svg", { key: "09672d0e495dea5c057e0459bbaf09e05c5f6d92", width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, t("path", { key: "f2d1b1e318670f9dac0c53f4e6bfe209fb6bb073", d: "M21 12L3 21V3L21 12Z", stroke: "auto", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }));
10
- }
11
- };
12
- r.style = i;
13
- export {
14
- r as play_icon
15
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-290b2932.cjs");require("react");require("react-dom");const t=".sc-refresh-icon-h{display:flex}",i=t,c=class{constructor(s){e.registerInstance(this,s),this.width="15",this.height="15"}render(){return e.h("svg",{key:"2e53f7097cb59c8a341225fdde738395247fe681",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},e.h("path",{key:"6e99de42fd10abc8e6c9f705ea770431ac131d66",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}};c.style=i;exports.refresh_icon=c;
@@ -1,15 +0,0 @@
1
- import { r as s, h as c } from "./index-fb096a02.js";
2
- import "react";
3
- import "react-dom";
4
- const t = ".sc-refresh-icon-h{display:flex}", l = t, h = class {
5
- constructor(e) {
6
- s(this, e), this.width = "15", this.height = "15";
7
- }
8
- render() {
9
- return c("svg", { key: "2e53f7097cb59c8a341225fdde738395247fe681", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 32 32", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, c("path", { key: "6e99de42fd10abc8e6c9f705ea770431ac131d66", d: "M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z" }));
10
- }
11
- };
12
- h.style = l;
13
- export {
14
- h as refresh_icon
15
- };