@nylas/web-elements 0.0.0-canary-20251202205510 → 0.0.0-canary-20251202215015

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 (315) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +1 -1
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +26 -13
  3. package/dist/cjs/{abstract-provider-Dmxxrbyn.js → abstract-provider-DoKrwElM.js} +3 -3
  4. package/dist/cjs/{abstract-provider-Dmxxrbyn.js.map → abstract-provider-DoKrwElM.js.map} +1 -1
  5. package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js +2 -2
  6. package/dist/cjs/checkbox-group_4.cjs.entry.js +3 -3
  7. package/dist/cjs/checkmark-icon_15.cjs.entry.js +2 -2
  8. package/dist/cjs/{customParseFormat-erQGD2DY.js → customParseFormat-B4kVLg4K.js} +3 -3
  9. package/dist/cjs/{customParseFormat-erQGD2DY.js.map → customParseFormat-B4kVLg4K.js.map} +1 -1
  10. package/dist/cjs/globe-icon_3.cjs.entry.js +2 -2
  11. package/dist/cjs/google-logo-icon_6.cjs.entry.js +3 -3
  12. package/dist/cjs/index.cjs.js +2 -2
  13. package/dist/cjs/input-component.cjs.entry.js +1 -1
  14. package/dist/cjs/input-dropdown_2.cjs.entry.js +1 -1
  15. package/dist/cjs/loader.cjs.js +1 -1
  16. package/dist/cjs/multi-select-dropdown.cjs.entry.js +1 -1
  17. package/dist/cjs/{nylas-api-request-DYg-aPS2.js → nylas-api-request-DAkJ3_Et.js} +3 -3
  18. package/dist/cjs/{nylas-api-request-DYg-aPS2.js.map → nylas-api-request-DAkJ3_Et.js.map} +1 -1
  19. package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js +34 -14
  20. package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js.map +1 -1
  21. package/dist/cjs/nylas-form-card.cjs.entry.js +2 -2
  22. package/dist/cjs/nylas-notification_2.cjs.entry.js +1 -1
  23. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +4 -4
  24. package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
  25. package/dist/cjs/nylas-web-elements.cjs.js +1 -1
  26. package/dist/cjs/{register-component-B0TuWHSQ.js → register-component-hLp40v0W.js} +3 -3
  27. package/dist/cjs/{register-component-B0TuWHSQ.js.map → register-component-hLp40v0W.js.map} +1 -1
  28. package/dist/cjs/textarea-component.cjs.entry.js +1 -1
  29. package/dist/cjs/{utils-CWOo-QbG.js → utils-DnRflvHV.js} +3 -3
  30. package/dist/cjs/utils-DnRflvHV.js.map +1 -0
  31. package/dist/cjs/{version-BPast14X.js → version-z-n90sIJ.js} +3 -3
  32. package/dist/cjs/{version-BPast14X.js.map → version-z-n90sIJ.js.map} +1 -1
  33. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +35 -11
  34. package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js.map +1 -1
  35. package/dist/collection/version.js +1 -1
  36. package/dist/collection/version.js.map +1 -1
  37. package/dist/components/index.js +1 -1
  38. package/dist/components/input-component.js +1 -1
  39. package/dist/components/input-image-url.js +1 -1
  40. package/dist/components/multi-select-dropdown.js +1 -1
  41. package/dist/components/nylas-additional-participants.js +1 -1
  42. package/dist/components/nylas-availability-picker.js +1 -1
  43. package/dist/components/nylas-booked-event-card.js +1 -1
  44. package/dist/components/nylas-booking-calendar-picker.js +1 -1
  45. package/dist/components/nylas-booking-confirmation-redirect.js +1 -1
  46. package/dist/components/nylas-booking-confirmation-type.js +1 -1
  47. package/dist/components/nylas-booking-form-config.js +1 -1
  48. package/dist/components/nylas-booking-form.js +1 -1
  49. package/dist/components/nylas-buffer-time.js +1 -1
  50. package/dist/components/nylas-calendar-picker.js +1 -1
  51. package/dist/components/nylas-cancel-booking-form.js +1 -1
  52. package/dist/components/nylas-cancellation-policy.js +1 -1
  53. package/dist/components/nylas-cancelled-event-card.js +1 -1
  54. package/dist/components/nylas-confirmation-email.js +1 -1
  55. package/dist/components/nylas-confirmed-event-card.js +1 -1
  56. package/dist/components/nylas-connected-calendars.js +1 -1
  57. package/dist/components/nylas-custom-booking-flow.js +1 -1
  58. package/dist/components/nylas-custom-event-slug.js +1 -1
  59. package/dist/components/nylas-customize-booking-settings.js +1 -1
  60. package/dist/components/nylas-date-component.js +1 -1
  61. package/dist/components/nylas-date-picker.js +1 -1
  62. package/dist/components/nylas-disable-emails.js +1 -1
  63. package/dist/components/nylas-editor-tabs-group.js +1 -1
  64. package/dist/components/nylas-editor-tabs.js +1 -1
  65. package/dist/components/nylas-event-calendar.js +1 -1
  66. package/dist/components/nylas-event-capacity.js +1 -1
  67. package/dist/components/nylas-event-description.js +1 -1
  68. package/dist/components/nylas-event-duration.js +1 -1
  69. package/dist/components/nylas-event-info.js +1 -1
  70. package/dist/components/nylas-event-limits.js +1 -1
  71. package/dist/components/nylas-event-location.js +1 -1
  72. package/dist/components/nylas-event-timeslot.js +1 -1
  73. package/dist/components/nylas-event-title.js +1 -1
  74. package/dist/components/nylas-feedback-form.js +1 -1
  75. package/dist/components/nylas-form-card.js +1 -1
  76. package/dist/components/nylas-limit-future-bookings.js +1 -1
  77. package/dist/components/nylas-list-configurations.js +1 -1
  78. package/dist/components/nylas-locale-switch.js +1 -1
  79. package/dist/components/nylas-min-booking-notice.js +1 -1
  80. package/dist/components/nylas-min-cancellation-notice.js +1 -1
  81. package/dist/components/nylas-notetaker-config.js +1 -1
  82. package/dist/components/nylas-notification.js +1 -1
  83. package/dist/components/nylas-only-specific-time-availability.js +1 -1
  84. package/dist/components/nylas-organizer-confirmation-card.js +1 -1
  85. package/dist/components/nylas-page-name.js +1 -1
  86. package/dist/components/nylas-page-styling.js +1 -1
  87. package/dist/components/nylas-participant-booking-calendars.js +1 -1
  88. package/dist/components/nylas-participants-custom-availability.js +1 -1
  89. package/dist/components/nylas-reminder-emails.js +1 -1
  90. package/dist/components/nylas-reminder-time.js +1 -1
  91. package/dist/components/nylas-scheduler-editor.js +56 -56
  92. package/dist/components/nylas-scheduling-method.js +1 -1
  93. package/dist/components/nylas-scheduling.js +19 -19
  94. package/dist/components/nylas-select-event-type.js +1 -1
  95. package/dist/components/nylas-selected-event-card.js +1 -1
  96. package/dist/components/nylas-specific-time-availability-picker.js +1 -1
  97. package/dist/components/nylas-time-window-picker.js +1 -1
  98. package/dist/components/nylas-timeslot-interval.js +1 -1
  99. package/dist/components/nylas-timeslot-picker.js +1 -1
  100. package/dist/components/{p-CHrFrkWg.js → p-6ChZ1Qbz.js} +4 -4
  101. package/dist/components/{p-CHrFrkWg.js.map → p-6ChZ1Qbz.js.map} +1 -1
  102. package/dist/components/{p-BWuqxd0-.js → p-71j5L-dt.js} +5 -5
  103. package/dist/components/{p-BWuqxd0-.js.map → p-71j5L-dt.js.map} +1 -1
  104. package/dist/components/{p-RdM6EOvn.js → p-7sBPfdYI.js} +17 -17
  105. package/dist/components/{p-RdM6EOvn.js.map → p-7sBPfdYI.js.map} +1 -1
  106. package/dist/components/{p-CwExJf3p.js → p-AW961heI.js} +7 -7
  107. package/dist/components/{p-CwExJf3p.js.map → p-AW961heI.js.map} +1 -1
  108. package/dist/components/{p-Xz9vYJkl.js → p-B0DrSwKH.js} +5 -5
  109. package/dist/components/{p-Xz9vYJkl.js.map → p-B0DrSwKH.js.map} +1 -1
  110. package/dist/components/{p-Dbirawci.js → p-B14eRCR5.js} +3 -3
  111. package/dist/components/{p-Dbirawci.js.map → p-B14eRCR5.js.map} +1 -1
  112. package/dist/components/{p-CWTSM6yO.js → p-BJ0gZqoJ.js} +3 -3
  113. package/dist/components/{p-CWTSM6yO.js.map → p-BJ0gZqoJ.js.map} +1 -1
  114. package/dist/components/{p-B66WkprG.js → p-BLaGY2c9.js} +3 -3
  115. package/dist/components/{p-B66WkprG.js.map → p-BLaGY2c9.js.map} +1 -1
  116. package/dist/components/{p-zVAQ5U3H.js → p-BMTQXDvy.js} +5 -5
  117. package/dist/components/{p-zVAQ5U3H.js.map → p-BMTQXDvy.js.map} +1 -1
  118. package/dist/components/{p-D6N64LfQ.js → p-BaTbUdcw.js} +3 -3
  119. package/dist/components/{p-D6N64LfQ.js.map → p-BaTbUdcw.js.map} +1 -1
  120. package/dist/components/{p-DWEP06hR.js → p-BffnA_f7.js} +3 -3
  121. package/dist/components/{p-DWEP06hR.js.map → p-BffnA_f7.js.map} +1 -1
  122. package/dist/components/{p-C62uZf7r.js → p-BfrrTJGs.js} +4 -4
  123. package/dist/components/{p-C62uZf7r.js.map → p-BfrrTJGs.js.map} +1 -1
  124. package/dist/components/{p-z65sQUHF.js → p-BgWpQ57E.js} +5 -5
  125. package/dist/components/{p-z65sQUHF.js.map → p-BgWpQ57E.js.map} +1 -1
  126. package/dist/components/{p-DuxmEkPv.js → p-BmzQm3Nh.js} +5 -5
  127. package/dist/components/{p-DuxmEkPv.js.map → p-BmzQm3Nh.js.map} +1 -1
  128. package/dist/components/{p-rBm-tOur.js → p-C6nI5iTF.js} +4 -4
  129. package/dist/components/{p-rBm-tOur.js.map → p-C6nI5iTF.js.map} +1 -1
  130. package/dist/components/{p-BCuiGyoU.js → p-C8_sw1Bl.js} +4 -4
  131. package/dist/components/{p-BCuiGyoU.js.map → p-C8_sw1Bl.js.map} +1 -1
  132. package/dist/components/{p-DMZiMhDK.js → p-CBLI3JpV.js} +50 -50
  133. package/dist/components/{p-DMZiMhDK.js.map → p-CBLI3JpV.js.map} +1 -1
  134. package/dist/components/{p-4Hw__e3D.js → p-CCwI4JJ6.js} +8 -8
  135. package/dist/components/{p-4Hw__e3D.js.map → p-CCwI4JJ6.js.map} +1 -1
  136. package/dist/components/{p-cP0q4lU_.js → p-CDDvCyLe.js} +4 -4
  137. package/dist/components/{p-cP0q4lU_.js.map → p-CDDvCyLe.js.map} +1 -1
  138. package/dist/components/{p-CeB6Cbwj.js → p-CDY2803i.js} +7 -7
  139. package/dist/components/{p-CeB6Cbwj.js.map → p-CDY2803i.js.map} +1 -1
  140. package/dist/components/{p-CdgRkJo5.js → p-CGRnWG3R.js} +5 -5
  141. package/dist/components/{p-CdgRkJo5.js.map → p-CGRnWG3R.js.map} +1 -1
  142. package/dist/components/{p-Bmgc4OoC.js → p-CTibK7DI.js} +6 -6
  143. package/dist/components/{p-Bmgc4OoC.js.map → p-CTibK7DI.js.map} +1 -1
  144. package/dist/components/{p-C8b_6Mwi.js → p-CZXVRFvj.js} +5 -5
  145. package/dist/components/{p-C8b_6Mwi.js.map → p-CZXVRFvj.js.map} +1 -1
  146. package/dist/components/{p-CUbBPFuC.js → p-C_wt4VG1.js} +6 -6
  147. package/dist/components/{p-CUbBPFuC.js.map → p-C_wt4VG1.js.map} +1 -1
  148. package/dist/components/{p-CPl2QujN.js → p-Ca7_waxI.js} +5 -5
  149. package/dist/components/{p-CPl2QujN.js.map → p-Ca7_waxI.js.map} +1 -1
  150. package/dist/components/{p-DxlNq7J-.js → p-CbzGOkVl.js} +5 -5
  151. package/dist/components/{p-DxlNq7J-.js.map → p-CbzGOkVl.js.map} +1 -1
  152. package/dist/components/{p-BJC7yMYa.js → p-CeBINn7w.js} +5 -5
  153. package/dist/components/{p-BJC7yMYa.js.map → p-CeBINn7w.js.map} +1 -1
  154. package/dist/components/{p-CBt5X1k9.js → p-Ch2fnEor.js} +4 -4
  155. package/dist/components/{p-CBt5X1k9.js.map → p-Ch2fnEor.js.map} +1 -1
  156. package/dist/components/{p-Cpntx1Mu.js → p-Cmi5--r4.js} +4 -4
  157. package/dist/components/{p-Cpntx1Mu.js.map → p-Cmi5--r4.js.map} +1 -1
  158. package/dist/components/{p-BMp7KcxH.js → p-CoSrYtWD.js} +4 -4
  159. package/dist/components/{p-BMp7KcxH.js.map → p-CoSrYtWD.js.map} +1 -1
  160. package/dist/components/{p-D_9rbrrd.js → p-Cp6o6dvp.js} +4 -4
  161. package/dist/components/{p-D_9rbrrd.js.map → p-Cp6o6dvp.js.map} +1 -1
  162. package/dist/components/{p-07Ul9BQq.js → p-Cw0C2FtI.js} +39 -17
  163. package/dist/components/p-Cw0C2FtI.js.map +1 -0
  164. package/dist/components/{p-Aurz8anf.js → p-CyE6dQa1.js} +3 -3
  165. package/dist/components/{p-Aurz8anf.js.map → p-CyE6dQa1.js.map} +1 -1
  166. package/dist/components/{p-BLz815Ny.js → p-CyEL9Dys.js} +5 -5
  167. package/dist/components/{p-BLz815Ny.js.map → p-CyEL9Dys.js.map} +1 -1
  168. package/dist/components/{p-Cw2wynla.js → p-CzUnDM0S.js} +5 -5
  169. package/dist/components/{p-Cw2wynla.js.map → p-CzUnDM0S.js.map} +1 -1
  170. package/dist/components/{p-DdzrgkUr.js → p-D1kUhVgX.js} +4 -4
  171. package/dist/components/{p-DdzrgkUr.js.map → p-D1kUhVgX.js.map} +1 -1
  172. package/dist/components/{p-sKlwNeg3.js → p-D2boni88.js} +4 -4
  173. package/dist/components/{p-sKlwNeg3.js.map → p-D2boni88.js.map} +1 -1
  174. package/dist/components/{p-CMnhMEB3.js → p-D5X8shfk.js} +3 -3
  175. package/dist/components/{p-CMnhMEB3.js.map → p-D5X8shfk.js.map} +1 -1
  176. package/dist/components/{p-CztSSKob.js → p-D72GASZY.js} +6 -6
  177. package/dist/components/{p-CztSSKob.js.map → p-D72GASZY.js.map} +1 -1
  178. package/dist/components/{p-DBeFl6it.js → p-DBYtkpo-.js} +5 -5
  179. package/dist/components/{p-DBeFl6it.js.map → p-DBYtkpo-.js.map} +1 -1
  180. package/dist/components/{p-DX_efMHV.js → p-DFAeC2_5.js} +40 -40
  181. package/dist/components/{p-DX_efMHV.js.map → p-DFAeC2_5.js.map} +1 -1
  182. package/dist/components/{p-CulTX7Fr.js → p-DO1rWSYE.js} +4 -4
  183. package/dist/components/{p-CulTX7Fr.js.map → p-DO1rWSYE.js.map} +1 -1
  184. package/dist/components/{p-CrPTHsWg.js → p-DSjJ_aq0.js} +4 -4
  185. package/dist/components/{p-CrPTHsWg.js.map → p-DSjJ_aq0.js.map} +1 -1
  186. package/dist/components/{p-BFjEYRDA.js → p-DWeyMY_K.js} +4 -4
  187. package/dist/components/{p-BFjEYRDA.js.map → p-DWeyMY_K.js.map} +1 -1
  188. package/dist/components/{p-CXHIOvuw.js → p-DbaulkBW.js} +5 -5
  189. package/dist/components/{p-CXHIOvuw.js.map → p-DbaulkBW.js.map} +1 -1
  190. package/dist/components/{p-BPK0dIhW.js → p-DiYyjvXU.js} +8 -8
  191. package/dist/components/{p-BPK0dIhW.js.map → p-DiYyjvXU.js.map} +1 -1
  192. package/dist/components/{p-wg959gAI.js → p-DkQwOhaw.js} +5 -5
  193. package/dist/components/{p-wg959gAI.js.map → p-DkQwOhaw.js.map} +1 -1
  194. package/dist/components/{p-fFf19yyL.js → p-DmaMKknu.js} +5 -5
  195. package/dist/components/{p-fFf19yyL.js.map → p-DmaMKknu.js.map} +1 -1
  196. package/dist/components/{p-BHUyDM4a.js → p-DmqqlFjj.js} +3 -3
  197. package/dist/components/{p-BHUyDM4a.js.map → p-DmqqlFjj.js.map} +1 -1
  198. package/dist/components/{p-BNdXWt95.js → p-Dnr8VCvL.js} +4 -4
  199. package/dist/components/{p-BNdXWt95.js.map → p-Dnr8VCvL.js.map} +1 -1
  200. package/dist/components/{p-B6vWzWVH.js → p-DqQXniRY.js} +5 -5
  201. package/dist/components/{p-B6vWzWVH.js.map → p-DqQXniRY.js.map} +1 -1
  202. package/dist/components/{p-D5A3zAnj.js → p-DuymSQwd.js} +3 -3
  203. package/dist/components/{p-D5A3zAnj.js.map → p-DuymSQwd.js.map} +1 -1
  204. package/dist/components/{p-Q6RJB1kT.js → p-Dyw-txou.js} +8 -8
  205. package/dist/components/{p-Q6RJB1kT.js.map → p-Dyw-txou.js.map} +1 -1
  206. package/dist/components/{p-DTIl-dL0.js → p-IsvARMhz.js} +4 -4
  207. package/dist/components/{p-DTIl-dL0.js.map → p-IsvARMhz.js.map} +1 -1
  208. package/dist/components/{p-DLjTrAZQ.js → p-NBMazUZO.js} +4 -4
  209. package/dist/components/{p-DLjTrAZQ.js.map → p-NBMazUZO.js.map} +1 -1
  210. package/dist/components/{p-DwD3KXGW.js → p-YGA4H-9G.js} +4 -4
  211. package/dist/components/{p-DwD3KXGW.js.map → p-YGA4H-9G.js.map} +1 -1
  212. package/dist/components/{p-BRJUcnBZ.js → p-cuNPlg0X.js} +5 -5
  213. package/dist/components/{p-BRJUcnBZ.js.map → p-cuNPlg0X.js.map} +1 -1
  214. package/dist/components/{p-BI2p9Jc6.js → p-dUL2dkUa.js} +4 -4
  215. package/dist/components/{p-BI2p9Jc6.js.map → p-dUL2dkUa.js.map} +1 -1
  216. package/dist/components/{p-B-j_noAT.js → p-keMejSk3.js} +3 -3
  217. package/dist/components/{p-B-j_noAT.js.map → p-keMejSk3.js.map} +1 -1
  218. package/dist/components/{p-B3b2oLwS.js → p-mGdgvW-1.js} +6 -6
  219. package/dist/components/{p-B3b2oLwS.js.map → p-mGdgvW-1.js.map} +1 -1
  220. package/dist/components/{p-7omIdes5.js → p-qv7yU2pb.js} +7 -7
  221. package/dist/components/{p-7omIdes5.js.map → p-qv7yU2pb.js.map} +1 -1
  222. package/dist/components/{p-Biycd4iI.js → p-sXbbNax8.js} +4 -4
  223. package/dist/components/{p-Biycd4iI.js.map → p-sXbbNax8.js.map} +1 -1
  224. package/dist/components/{p-ickjUaoC.js → p-ttOMOXED.js} +3 -3
  225. package/dist/components/{p-ickjUaoC.js.map → p-ttOMOXED.js.map} +1 -1
  226. package/dist/components/{p-DyLPwQVe.js → p-u7v_3NZe.js} +5 -5
  227. package/dist/components/{p-DyLPwQVe.js.map → p-u7v_3NZe.js.map} +1 -1
  228. package/dist/components/{p-6w1TXINP.js → p-uxYETK9F.js} +3 -3
  229. package/dist/components/{p-6w1TXINP.js.map → p-uxYETK9F.js.map} +1 -1
  230. package/dist/components/{p-pKaQ_oN3.js → p-wbuAwPIf.js} +4 -4
  231. package/dist/components/{p-pKaQ_oN3.js.map → p-wbuAwPIf.js.map} +1 -1
  232. package/dist/components/{p-BkqJeMJc.js → p-zGaD8wi_.js} +4 -4
  233. package/dist/components/{p-BkqJeMJc.js.map → p-zGaD8wi_.js.map} +1 -1
  234. package/dist/components/textarea-component.js +1 -1
  235. package/dist/components/time-period-selector.js +1 -1
  236. package/dist/esm/{abstract-provider-DMUHtPZk.js → abstract-provider-BaO0SAV5.js} +3 -3
  237. package/dist/esm/{abstract-provider-DMUHtPZk.js.map → abstract-provider-BaO0SAV5.js.map} +1 -1
  238. package/dist/esm/calendar-agenda-fill-icon_39.entry.js +2 -2
  239. package/dist/esm/checkbox-group_4.entry.js +3 -3
  240. package/dist/esm/checkmark-icon_15.entry.js +2 -2
  241. package/dist/esm/{customParseFormat-DfI_KT_e.js → customParseFormat-BXULiIqM.js} +3 -3
  242. package/dist/esm/{customParseFormat-DfI_KT_e.js.map → customParseFormat-BXULiIqM.js.map} +1 -1
  243. package/dist/esm/globe-icon_3.entry.js +2 -2
  244. package/dist/esm/google-logo-icon_6.entry.js +3 -3
  245. package/dist/esm/index.js +2 -2
  246. package/dist/esm/input-component.entry.js +1 -1
  247. package/dist/esm/input-dropdown_2.entry.js +1 -1
  248. package/dist/esm/loader.js +1 -1
  249. package/dist/esm/multi-select-dropdown.entry.js +1 -1
  250. package/dist/esm/{nylas-api-request-Bfo7R-Jq.js → nylas-api-request-C-uof_ko.js} +3 -3
  251. package/dist/esm/{nylas-api-request-Bfo7R-Jq.js.map → nylas-api-request-C-uof_ko.js.map} +1 -1
  252. package/dist/esm/nylas-booked-event-card_11.entry.js +34 -14
  253. package/dist/esm/nylas-booked-event-card_11.entry.js.map +1 -1
  254. package/dist/esm/nylas-form-card.entry.js +2 -2
  255. package/dist/esm/nylas-notification_2.entry.js +1 -1
  256. package/dist/esm/nylas-scheduler-editor.entry.js +4 -4
  257. package/dist/esm/nylas-scheduling.entry.js +3 -3
  258. package/dist/esm/nylas-web-elements.js +1 -1
  259. package/dist/esm/{register-component-Mc-aGXTY.js → register-component-BWkU2nzv.js} +3 -3
  260. package/dist/esm/{register-component-Mc-aGXTY.js.map → register-component-BWkU2nzv.js.map} +1 -1
  261. package/dist/esm/textarea-component.entry.js +1 -1
  262. package/dist/esm/{utils-Hhz0ojc7.js → utils-qPYSsMs1.js} +3 -3
  263. package/dist/esm/utils-qPYSsMs1.js.map +1 -0
  264. package/dist/esm/{version-C8X2q4zX.js → version-C0XfEIKF.js} +3 -3
  265. package/dist/esm/{version-C8X2q4zX.js.map → version-C0XfEIKF.js.map} +1 -1
  266. package/dist/nylas-web-elements/index.esm.js +1 -1
  267. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  268. package/dist/nylas-web-elements/{p-98bbf87f.entry.js → p-062d7fdf.entry.js} +2 -2
  269. package/dist/nylas-web-elements/{p-21d506a3.entry.js → p-308de920.entry.js} +2 -2
  270. package/dist/nylas-web-elements/{p-7b418732.entry.js → p-4a7b2e75.entry.js} +2 -2
  271. package/dist/nylas-web-elements/{p-34214390.entry.js → p-4d554975.entry.js} +3 -3
  272. package/dist/nylas-web-elements/{p-f0097382.entry.js → p-4efc4661.entry.js} +2 -2
  273. package/dist/nylas-web-elements/{p-c51215b6.entry.js → p-62c11ceb.entry.js} +2 -2
  274. package/dist/nylas-web-elements/p-62c11ceb.entry.js.map +1 -0
  275. package/dist/nylas-web-elements/{p-0a105d77.entry.js → p-694d464b.entry.js} +2 -2
  276. package/dist/nylas-web-elements/{p-887ed22a.entry.js → p-750e5cc6.entry.js} +2 -2
  277. package/dist/nylas-web-elements/{p-BCvV6idp.js → p-7nXSDTLA.js} +2 -2
  278. package/dist/nylas-web-elements/{p-BCvV6idp.js.map → p-7nXSDTLA.js.map} +1 -1
  279. package/dist/nylas-web-elements/{p-6c8e47a9.entry.js → p-854f1b66.entry.js} +2 -2
  280. package/dist/nylas-web-elements/{p-lLLUSoaT.js → p-BMmDQ3tf.js} +2 -2
  281. package/dist/nylas-web-elements/{p-lLLUSoaT.js.map → p-BMmDQ3tf.js.map} +1 -1
  282. package/dist/nylas-web-elements/{p-C8X2q4zX.js → p-C0XfEIKF.js} +2 -2
  283. package/dist/nylas-web-elements/{p-C8X2q4zX.js.map → p-C0XfEIKF.js.map} +1 -1
  284. package/dist/nylas-web-elements/{p-BzJOftan.js → p-CiuA-WAz.js} +2 -2
  285. package/dist/nylas-web-elements/{p-BzJOftan.js.map → p-CiuA-WAz.js.map} +1 -1
  286. package/dist/nylas-web-elements/{p-fd6a12bd.entry.js → p-c7117440.entry.js} +2 -2
  287. package/dist/nylas-web-elements/{p-sMJwFhkX.js → p-cIC9nmxa.js} +2 -2
  288. package/dist/nylas-web-elements/{p-sMJwFhkX.js.map → p-cIC9nmxa.js.map} +1 -1
  289. package/dist/nylas-web-elements/{p-7d369618.entry.js → p-d317b6ad.entry.js} +2 -2
  290. package/dist/nylas-web-elements/{p-4bf65d9a.entry.js → p-d35c9487.entry.js} +2 -2
  291. package/dist/nylas-web-elements/{p-ab87f218.entry.js → p-da93f29f.entry.js} +2 -2
  292. package/dist/nylas-web-elements/{p-506c2328.entry.js → p-e6a22e75.entry.js} +3 -3
  293. package/dist/nylas-web-elements/{p-Hhz0ojc7.js → p-qPYSsMs1.js} +1 -1
  294. package/dist/nylas-web-elements/p-qPYSsMs1.js.map +1 -0
  295. package/dist/types/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.d.ts +3 -0
  296. package/dist/types/version.d.ts +1 -1
  297. package/package.json +2 -2
  298. package/dist/cjs/utils-CWOo-QbG.js.map +0 -1
  299. package/dist/components/p-07Ul9BQq.js.map +0 -1
  300. package/dist/esm/utils-Hhz0ojc7.js.map +0 -1
  301. package/dist/nylas-web-elements/p-Hhz0ojc7.js.map +0 -1
  302. package/dist/nylas-web-elements/p-c51215b6.entry.js.map +0 -1
  303. /package/dist/nylas-web-elements/{p-98bbf87f.entry.js.map → p-062d7fdf.entry.js.map} +0 -0
  304. /package/dist/nylas-web-elements/{p-21d506a3.entry.js.map → p-308de920.entry.js.map} +0 -0
  305. /package/dist/nylas-web-elements/{p-7b418732.entry.js.map → p-4a7b2e75.entry.js.map} +0 -0
  306. /package/dist/nylas-web-elements/{p-34214390.entry.js.map → p-4d554975.entry.js.map} +0 -0
  307. /package/dist/nylas-web-elements/{p-f0097382.entry.js.map → p-4efc4661.entry.js.map} +0 -0
  308. /package/dist/nylas-web-elements/{p-0a105d77.entry.js.map → p-694d464b.entry.js.map} +0 -0
  309. /package/dist/nylas-web-elements/{p-887ed22a.entry.js.map → p-750e5cc6.entry.js.map} +0 -0
  310. /package/dist/nylas-web-elements/{p-6c8e47a9.entry.js.map → p-854f1b66.entry.js.map} +0 -0
  311. /package/dist/nylas-web-elements/{p-fd6a12bd.entry.js.map → p-c7117440.entry.js.map} +0 -0
  312. /package/dist/nylas-web-elements/{p-7d369618.entry.js.map → p-d317b6ad.entry.js.map} +0 -0
  313. /package/dist/nylas-web-elements/{p-4bf65d9a.entry.js.map → p-d35c9487.entry.js.map} +0 -0
  314. /package/dist/nylas-web-elements/{p-ab87f218.entry.js.map → p-da93f29f.entry.js.map} +0 -0
  315. /package/dist/nylas-web-elements/{p-506c2328.entry.js.map → p-e6a22e75.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{b as t,h as e,j as n,k as o}from"./p-Hhz0ojc7.js";class s{constructor(e,n,o=true,s){this.automaticComponentRegistration=true;this.registeredComponents={};this.propStateRegistrations=new Map;this.eventListenerRegistrations=new Map;this.host=e;this.stores=n;this.automaticComponentRegistration=o;this.eventOverrides=s;t(`[${this.hostTagName}] Initializing (abstract) provider.`,{eventOverrides:s});this.registerComponent=this.registerComponent.bind(this);this.getStore=this.getStore.bind(this);Object.keys(this.stores).forEach((t=>{this.propStateRegistrations.set(t,new Map)}))}async componentWillLoad(e){t(`[${this.hostTagName}] Will load`);this.setupStoreListeners();this.nylasConnector=e;const n=Array.from(this.host.querySelectorAll("*")).filter((t=>t.tagName.toLowerCase().startsWith("nylas-")));t(`[${this.hostTagName}] Found ${n.length} child component(s).`,{childComponents:n});const o=n.map((async e=>{const n=e;if(!n){t(`[~${this.hostTagName}] (componentWillLoad) Component ${n.tagName} does not have a name. Skipping.`);return}if(!n.registerNylasComponent){t(`[~${this.hostTagName}] (componentWillLoad) Component ${n.tagName} is not a component that can be registered. Skipping.`,{component:n});return}const o={element:n,name:n.tagName.toLowerCase(),getStoresToProp:n.getStoresToProp,storeToProps:n.storeToProps,stateToProps:n.stateToProps,authToProp:n.authToProp,eventToProps:n.eventToProps,connectorToProp:n.connectorToProp,localPropsToProp:n.localPropsToProp};await this.registerComponent(o)}));await Promise.all(o)}async componentDidLoad(){t(`[~${this.hostTagName}] (componentDidLoad) Did load`)}async componentDisconnected(){Object.values(this.stores).forEach((t=>{t.dispose()}))}async registerComponentHandler(e){e.stopPropagation();if(!this.automaticComponentRegistration){t(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${e.detail.name}.`);return}await this.registerComponent(e.detail)}async unregisterComponentHandler(e){e.stopPropagation();if(!this.automaticComponentRegistration){t(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${e.detail.name}.`);return}this.unregisterComponent(e.detail)}async registerComponent(s){t(`~[${this.hostTagName}] (registerComponent) Registering component ${s.name}.`);const i=s.element.dataset.nylasId;const r=i&&this.registeredComponents[i];if(r){t(`[${this.hostTagName}] (registerComponent) Component ${s.name} already registered. Updating registration.`);this.cleanupComponentRegistration(i,false)}else{const t=e()?this.computeDeterministicId(s.element):undefined;s.element.dataset.nylasId=i||t||n()}const p=s.element.dataset.nylasId;if(p){this.registeredComponents[p]=s}t(`[${this.hostTagName}] (registerComponent) Waiting for "${s.element.localName}" component to be defined`,{component:s});try{await customElements.whenDefined(s.element.tagName.toLowerCase());t(`[${this.hostTagName}] (registerComponent) Component "${s.element.localName}" is now defined`)}catch(e){t(`[${this.hostTagName}] (registerComponent) Error waiting for component "${s.element.localName}" to be defined:`,e)}const a=this.eventOverrides;const{stateToProps:c,getStoresToProp:h,eventToProps:$,storeToProps:g,connectorToProp:m,localPropsToProp:l,element:d}=s;$?.forEach(((e,n)=>{const i=this.nylasConnector;const r=async o=>{t(`[${this.hostTagName}] (registerComponent) Handling "${s.name}" prop "${String(n)}" event.`,{event:o});if(n in a){t(`[${this.hostTagName}] (registerComponent) Found event override for "${String(n)}" event. Calling override.`);await a[n](o,i)}if(!o.defaultPrevented){await e(o,i)}return};const p=s.element.dataset.nylasId;if(p&&!this.eventListenerRegistrations.has(p)){this.eventListenerRegistrations.set(p,[])}if(p){this.eventListenerRegistrations.get(p)?.push([d,n,r])}t(`[${this.hostTagName}] (registerComponent) Setting "${s.name}" event "${String(n)}" to automcially call NylasConnector method.`);const c=o(n.toString());t(`[${this.hostTagName}] (registerComponent) Adding event listener for "${c}" on "${d.tagName}"`);d.addEventListener(c,r)}));c?.forEach(((e,n)=>{const[o,i]=n.split(".");const r=this.getStore(o);const p=r.state[i];if(!d.dataset.nylasId){t(`[${this.hostTagName}] (registerComponent) Component "${s.name}" not registered. Skipping.`,{component:s});return}if(!this.propStateRegistrations.has(o)){this.propStateRegistrations.set(o,new Map)}if(!this.propStateRegistrations.get(o)?.has(i)){this.propStateRegistrations.get(o)?.set(i,[{elementId:d.dataset.nylasId,propKey:e}])}else{this.propStateRegistrations.get(o)?.get(i)?.push({elementId:d.dataset.nylasId,propKey:e})}d[e.toString()]=p;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to "${n}" value.`,{stateValue:p})}));l?.forEach(((e,n)=>{const o=this.host[n];d[e.toString()]=o;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to the value of "${n}" value.`,{value:n,mappedPropValue:o})}));if(h){d[h?.toString()]=this.getStore;t(`[${this.hostTagName}] Setting "${s.name}" prop "${h.toString()}" to "getStore" method.`)}g?.forEach(((e,n)=>{const o=this.getStore(n);d[e.toString()]=o;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to "${n}" store.`,{store:o})}));if(m){d[m?.toString()]=this.nylasConnector;t(`[${this.hostTagName}] Setting "${s.name}" prop "${m.toString()}" to "nylasConnector" value.`,{connectorToProp:m})}if(typeof d.registerCallback==="function"){t(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for "${s.name}".`);await d.registerCallback()}t(`[${this.hostTagName}] (registerComponent) Component ${s.name} registered.`)}computeDeterministicId(t){const e=t.getAttribute("id");if(e&&e.trim().length>0)return e.trim();const n=t.getAttribute("name");if(n&&n.trim().length>0)return n.trim();const o=t.tagName.toLowerCase();try{const e=Array.from(this.host?.querySelectorAll(o)||[]);const n=e.indexOf(t);const s=n>=0?n+1:e.length+1;return`${o}-${s}`}catch(t){return`${o}-1`}}cleanupComponentRegistration(e,n=true){const s=this.eventListenerRegistrations.get(e);if(s){s.forEach((([e,n,s])=>{const i=o(n.toString());t(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for "${i}" on "${e.tagName}"`);e.removeEventListener(i,s)}));this.eventListenerRegistrations.delete(e)}this.propStateRegistrations.forEach(((t,n)=>{t.forEach(((t,o)=>{const s=t.filter((t=>t.elementId!==e));if(s.length!==t.length){this.propStateRegistrations.get(n)?.set(o,s)}}))}));if(n){delete this.registeredComponents[e]}}unregisterComponent(e){t(`[${this.hostTagName}] Unregistering component ${e.name}.`);const n=e.element.dataset.nylasId;if(!n){t(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${e.name}.`);return}if(this.registeredComponents[n]){t(`[${this.hostTagName}] (unregisterComponent) Component ${e.name} not registered. Skipping.`);return}this.propStateRegistrations.forEach(((t,e)=>{t.forEach(((t,o)=>{const s=this.propStateRegistrations.get(e)?.get(o);const i=s?.filter((t=>t.elementId!==n));if(i){this.propStateRegistrations.get(e)?.set(o,i)}}))}));const s=this.eventListenerRegistrations.get(n);s?.forEach((([e,n,s])=>{const i=o(n.toString());t(`[${this.hostTagName}] (unregisterComponent) Removing event listener for "${i}" on "${e.tagName}"`);e.removeEventListener(i,s)}));delete this.registeredComponents[n]}getStore(t){const e=this.stores[t];if(!e){throw new Error(`[${this.hostTagName}] Store "${t.toString()}" not found.`)}return e}async setupStoreListeners(){const e=this;Object.entries(this.stores).forEach((([n,o])=>{t(`[${e.hostTagName}] (setupStoreListeners) Listening for changes in "${n}" store.`);o.use({set(o,s,i){t(`[${e.hostTagName}] (setupStoreListeners) Store "${n}" state "${o.toString()}" changed`,{newValue:s,oldValue:i});if(s===i){t(`[${e.hostTagName}] (setupStoreListeners) Store "${n}" state "${o.toString()}" unchanged. Skipping.`);return}const r=e.registeredComponents;if(!r){t(`[${e.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);return}const p=e.propStateRegistrations.get(n)?.get(o.toString())||[];t(`[${e.hostTagName}] (setupStoreListeners) Found ${p.length} prop(s) registered for "${o.toString()}" store.`,{props:p,propStateRegistrations:e.propStateRegistrations});p.forEach((({elementId:s,propKey:i})=>{const p=r[s];if(!p){t(`[${e.hostTagName}] (setupStoreListeners) Component "${s}" not found. Skipping.`,{component:p});return}const a=e.getStore(n);const c=a.state[o];p.element[i.toString()]=c;t(`[${e.hostTagName}] (setupStoreListeners) Setting "${p.name}" prop "${i.toString()}" to "${o.toString()}" value.`,{stateValue:c})}))}})}))}get hostTagName(){return this.host?.tagName?.toLowerCase()??"nylas-provider"}}class i extends s{}export{i as N};
2
- //# sourceMappingURL=p-BCvV6idp.js.map
1
+ import{b as t,h as e,j as n,k as o}from"./p-qPYSsMs1.js";class s{constructor(e,n,o=true,s){this.automaticComponentRegistration=true;this.registeredComponents={};this.propStateRegistrations=new Map;this.eventListenerRegistrations=new Map;this.host=e;this.stores=n;this.automaticComponentRegistration=o;this.eventOverrides=s;t(`[${this.hostTagName}] Initializing (abstract) provider.`,{eventOverrides:s});this.registerComponent=this.registerComponent.bind(this);this.getStore=this.getStore.bind(this);Object.keys(this.stores).forEach((t=>{this.propStateRegistrations.set(t,new Map)}))}async componentWillLoad(e){t(`[${this.hostTagName}] Will load`);this.setupStoreListeners();this.nylasConnector=e;const n=Array.from(this.host.querySelectorAll("*")).filter((t=>t.tagName.toLowerCase().startsWith("nylas-")));t(`[${this.hostTagName}] Found ${n.length} child component(s).`,{childComponents:n});const o=n.map((async e=>{const n=e;if(!n){t(`[~${this.hostTagName}] (componentWillLoad) Component ${n.tagName} does not have a name. Skipping.`);return}if(!n.registerNylasComponent){t(`[~${this.hostTagName}] (componentWillLoad) Component ${n.tagName} is not a component that can be registered. Skipping.`,{component:n});return}const o={element:n,name:n.tagName.toLowerCase(),getStoresToProp:n.getStoresToProp,storeToProps:n.storeToProps,stateToProps:n.stateToProps,authToProp:n.authToProp,eventToProps:n.eventToProps,connectorToProp:n.connectorToProp,localPropsToProp:n.localPropsToProp};await this.registerComponent(o)}));await Promise.all(o)}async componentDidLoad(){t(`[~${this.hostTagName}] (componentDidLoad) Did load`)}async componentDisconnected(){Object.values(this.stores).forEach((t=>{t.dispose()}))}async registerComponentHandler(e){e.stopPropagation();if(!this.automaticComponentRegistration){t(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${e.detail.name}.`);return}await this.registerComponent(e.detail)}async unregisterComponentHandler(e){e.stopPropagation();if(!this.automaticComponentRegistration){t(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${e.detail.name}.`);return}this.unregisterComponent(e.detail)}async registerComponent(s){t(`~[${this.hostTagName}] (registerComponent) Registering component ${s.name}.`);const i=s.element.dataset.nylasId;const r=i&&this.registeredComponents[i];if(r){t(`[${this.hostTagName}] (registerComponent) Component ${s.name} already registered. Updating registration.`);this.cleanupComponentRegistration(i,false)}else{const t=e()?this.computeDeterministicId(s.element):undefined;s.element.dataset.nylasId=i||t||n()}const p=s.element.dataset.nylasId;if(p){this.registeredComponents[p]=s}t(`[${this.hostTagName}] (registerComponent) Waiting for "${s.element.localName}" component to be defined`,{component:s});try{await customElements.whenDefined(s.element.tagName.toLowerCase());t(`[${this.hostTagName}] (registerComponent) Component "${s.element.localName}" is now defined`)}catch(e){t(`[${this.hostTagName}] (registerComponent) Error waiting for component "${s.element.localName}" to be defined:`,e)}const a=this.eventOverrides;const{stateToProps:c,getStoresToProp:h,eventToProps:$,storeToProps:g,connectorToProp:m,localPropsToProp:l,element:d}=s;$?.forEach(((e,n)=>{const i=this.nylasConnector;const r=async o=>{t(`[${this.hostTagName}] (registerComponent) Handling "${s.name}" prop "${String(n)}" event.`,{event:o});if(n in a){t(`[${this.hostTagName}] (registerComponent) Found event override for "${String(n)}" event. Calling override.`);await a[n](o,i)}if(!o.defaultPrevented){await e(o,i)}return};const p=s.element.dataset.nylasId;if(p&&!this.eventListenerRegistrations.has(p)){this.eventListenerRegistrations.set(p,[])}if(p){this.eventListenerRegistrations.get(p)?.push([d,n,r])}t(`[${this.hostTagName}] (registerComponent) Setting "${s.name}" event "${String(n)}" to automcially call NylasConnector method.`);const c=o(n.toString());t(`[${this.hostTagName}] (registerComponent) Adding event listener for "${c}" on "${d.tagName}"`);d.addEventListener(c,r)}));c?.forEach(((e,n)=>{const[o,i]=n.split(".");const r=this.getStore(o);const p=r.state[i];if(!d.dataset.nylasId){t(`[${this.hostTagName}] (registerComponent) Component "${s.name}" not registered. Skipping.`,{component:s});return}if(!this.propStateRegistrations.has(o)){this.propStateRegistrations.set(o,new Map)}if(!this.propStateRegistrations.get(o)?.has(i)){this.propStateRegistrations.get(o)?.set(i,[{elementId:d.dataset.nylasId,propKey:e}])}else{this.propStateRegistrations.get(o)?.get(i)?.push({elementId:d.dataset.nylasId,propKey:e})}d[e.toString()]=p;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to "${n}" value.`,{stateValue:p})}));l?.forEach(((e,n)=>{const o=this.host[n];d[e.toString()]=o;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to the value of "${n}" value.`,{value:n,mappedPropValue:o})}));if(h){d[h?.toString()]=this.getStore;t(`[${this.hostTagName}] Setting "${s.name}" prop "${h.toString()}" to "getStore" method.`)}g?.forEach(((e,n)=>{const o=this.getStore(n);d[e.toString()]=o;t(`[${this.hostTagName}] Setting "${s.name}" prop "${e.toString()}" to "${n}" store.`,{store:o})}));if(m){d[m?.toString()]=this.nylasConnector;t(`[${this.hostTagName}] Setting "${s.name}" prop "${m.toString()}" to "nylasConnector" value.`,{connectorToProp:m})}if(typeof d.registerCallback==="function"){t(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for "${s.name}".`);await d.registerCallback()}t(`[${this.hostTagName}] (registerComponent) Component ${s.name} registered.`)}computeDeterministicId(t){const e=t.getAttribute("id");if(e&&e.trim().length>0)return e.trim();const n=t.getAttribute("name");if(n&&n.trim().length>0)return n.trim();const o=t.tagName.toLowerCase();try{const e=Array.from(this.host?.querySelectorAll(o)||[]);const n=e.indexOf(t);const s=n>=0?n+1:e.length+1;return`${o}-${s}`}catch(t){return`${o}-1`}}cleanupComponentRegistration(e,n=true){const s=this.eventListenerRegistrations.get(e);if(s){s.forEach((([e,n,s])=>{const i=o(n.toString());t(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for "${i}" on "${e.tagName}"`);e.removeEventListener(i,s)}));this.eventListenerRegistrations.delete(e)}this.propStateRegistrations.forEach(((t,n)=>{t.forEach(((t,o)=>{const s=t.filter((t=>t.elementId!==e));if(s.length!==t.length){this.propStateRegistrations.get(n)?.set(o,s)}}))}));if(n){delete this.registeredComponents[e]}}unregisterComponent(e){t(`[${this.hostTagName}] Unregistering component ${e.name}.`);const n=e.element.dataset.nylasId;if(!n){t(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${e.name}.`);return}if(this.registeredComponents[n]){t(`[${this.hostTagName}] (unregisterComponent) Component ${e.name} not registered. Skipping.`);return}this.propStateRegistrations.forEach(((t,e)=>{t.forEach(((t,o)=>{const s=this.propStateRegistrations.get(e)?.get(o);const i=s?.filter((t=>t.elementId!==n));if(i){this.propStateRegistrations.get(e)?.set(o,i)}}))}));const s=this.eventListenerRegistrations.get(n);s?.forEach((([e,n,s])=>{const i=o(n.toString());t(`[${this.hostTagName}] (unregisterComponent) Removing event listener for "${i}" on "${e.tagName}"`);e.removeEventListener(i,s)}));delete this.registeredComponents[n]}getStore(t){const e=this.stores[t];if(!e){throw new Error(`[${this.hostTagName}] Store "${t.toString()}" not found.`)}return e}async setupStoreListeners(){const e=this;Object.entries(this.stores).forEach((([n,o])=>{t(`[${e.hostTagName}] (setupStoreListeners) Listening for changes in "${n}" store.`);o.use({set(o,s,i){t(`[${e.hostTagName}] (setupStoreListeners) Store "${n}" state "${o.toString()}" changed`,{newValue:s,oldValue:i});if(s===i){t(`[${e.hostTagName}] (setupStoreListeners) Store "${n}" state "${o.toString()}" unchanged. Skipping.`);return}const r=e.registeredComponents;if(!r){t(`[${e.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);return}const p=e.propStateRegistrations.get(n)?.get(o.toString())||[];t(`[${e.hostTagName}] (setupStoreListeners) Found ${p.length} prop(s) registered for "${o.toString()}" store.`,{props:p,propStateRegistrations:e.propStateRegistrations});p.forEach((({elementId:s,propKey:i})=>{const p=r[s];if(!p){t(`[${e.hostTagName}] (setupStoreListeners) Component "${s}" not found. Skipping.`,{component:p});return}const a=e.getStore(n);const c=a.state[o];p.element[i.toString()]=c;t(`[${e.hostTagName}] (setupStoreListeners) Setting "${p.name}" prop "${i.toString()}" to "${o.toString()}" value.`,{stateValue:c})}))}})}))}get hostTagName(){return this.host?.tagName?.toLowerCase()??"nylas-provider"}}class i extends s{}export{i as N};
2
+ //# sourceMappingURL=p-7nXSDTLA.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-BCvV6idp.js","sources":["src/common/abstract-provider.ts"],"sourcesContent":["import { RegisteredComponent } from '@/common/register-component';\nimport { BaseNylasConnectorInterface } from '@/connector/connector-interface';\nimport { debug, formatEventName, uniqueID, isTestEnvironment } from '@/utils/utils';\nimport { ObservableMap } from '@stencil/store';\nimport { EventOverride } from './component-types';\nimport { HTMLStencilElement } from '@stencil/core/internal';\n\nexport type PropKey = string | number | symbol;\nexport type StoreKey = string;\nexport type StoreName<T> = keyof T;\nexport type StateKey = string;\nexport type ElementID = string;\nexport type PropStateRegistration = { elementId: ElementID; propKey: PropKey };\nexport type EventListenerRegistration = [HTMLElement, PropKey, (event: CustomEvent<any>) => Promise<void>];\n\nexport interface NylasProviderInterface<Stores extends Record<string, ObservableMap<any>>> {\n nylasConnector?: BaseNylasConnectorInterface;\n stores: Stores;\n host?: HTMLElement;\n automaticComponentRegistration: boolean;\n registeredComponents: Record<ElementID, RegisteredComponent<any, any>>;\n propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>>;\n eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]>;\n componentWillLoad(nylasConnector: BaseNylasConnectorInterface): Promise<void>;\n componentDidLoad(): Promise<void>;\n componentDisconnected(): Promise<void>;\n getStore<K extends keyof ThisType<this['stores']>>(name: K): ThisType<this['stores']>[K];\n registerComponent(component: RegisteredComponent<any, any>): void;\n unregisterComponent(component: RegisteredComponent<any, any>): void;\n}\n\nexport abstract class NylasAbstractProvider<Stores extends Record<string, ObservableMap<any>>> implements NylasProviderInterface<Stores> {\n /**\n * The NylasConnector instance.\n * This is used to provide access to the NylasConnector instance to all components.\n */\n public nylasConnector?: BaseNylasConnectorInterface;\n\n /**\n * A list of stores that are used by the provider.\n * This is used to provide access to the stores to all components.\n */\n public stores: Stores;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n public host!: HTMLElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n public automaticComponentRegistration: boolean = true;\n\n /**\n * A list of registered components that are listening for store changes.\n * Each component is registered with a unique id so that we can easily track the component\n * for various other operations (see `propStateRegistrations` and `eventListenerRegistrations`).\n */\n public registeredComponents: Record<ElementID, RegisteredComponent<any, any>> = {};\n\n /**\n * A list of registered components that are listening for store changes.\n * To make lookups more efficient, we use a Map of our prop registrations that we need to map to differnet\n * state keys. When a component is unregistered, we can use this map to remove the prop registration.\n */\n public propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>> = new Map();\n\n /**\n * A list of registered event listeners.\n * To make lookups more efficient, we use a Map of our event listeners that we need to map to differnet\n * nylas connector methods. When a component is unregistered, we can use this map to remove the event listener.\n */\n public eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]> = new Map();\n\n /**\n * A list of event overrides that are used by the provider.\n * This is used to provide an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduler eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n public eventOverrides: EventOverride<Exclude<BaseNylasConnectorInterface, undefined>>;\n\n /**\n * The constructor for the AbstractNylasProvider.\n * @param host The host element (usually the HTMLElement of the provider)\n * @param stores A list of stores that are used by the provider\n * @param automaticComponentRegistration A boolean that determines if components should be automatically registered\n * @param eventOverrides A list of event overrides that are used by the provider\n */\n constructor(host: HTMLElement, stores: Stores, automaticComponentRegistration: boolean = true, eventOverrides: EventOverride<any>) {\n this.host = host;\n this.stores = stores;\n this.automaticComponentRegistration = automaticComponentRegistration;\n this.eventOverrides = eventOverrides;\n\n debug(`[${this.hostTagName}] Initializing (abstract) provider.`, { eventOverrides });\n\n this.registerComponent = this.registerComponent.bind(this);\n this.getStore = this.getStore.bind(this);\n\n // Init propStateRegistrations with store names\n Object.keys(this.stores).forEach(storeName => {\n this.propStateRegistrations.set(storeName, new Map());\n });\n }\n\n /**\n * This method is called before the component is loaded.\n * We're passing the NylasConnector instance to the provider so that we can\n * provide access to the NylasConnector instance to all components.\n *\n * However, because the NylasConnector is often constructed after the component's\n * constructor is called, set the NylasConnector instance here.\n * @param nylasConnector The NylasConnector instance\n */\n async componentWillLoad(nylasConnector: BaseNylasConnectorInterface) {\n debug(`[${this.hostTagName}] Will load`);\n\n // For each of our stores, configure the listeners for changes in the\n // store state.\n this.setupStoreListeners();\n\n // Set the NylasConnector instance\n this.nylasConnector = nylasConnector;\n\n /**\n * This is a very static way of registering components, but it happens fairly\n * early in the component lifecycle, so it can be beneficial to do it here.\n *\n * The big downside to this is that it will not pick up any components that\n * are dynamically added to the DOM after this method is called.\n *\n * So we should evaluate if this is the best way to register components.\n */\n const childComponents = Array.from(this.host.querySelectorAll('*')).filter(child => child.tagName.toLowerCase().startsWith('nylas-'));\n debug(`[${this.hostTagName}] Found ${childComponents.length} child component(s).`, { childComponents });\n\n const registrations = childComponents.map(async child => {\n const component = child as any; // It unfortunately makes life a whole lot easier to just cast this to any\n if (!component) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} does not have a name. Skipping.`);\n return;\n }\n\n // Skip components that don't have the `registerNylasComponent` prop\n if (!component.registerNylasComponent) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} is not a component that can be registered. Skipping.`, { component });\n return;\n }\n\n const registeredComponent: RegisteredComponent<any, any> = {\n element: component as HTMLStencilElement,\n name: component.tagName.toLowerCase(),\n getStoresToProp: component.getStoresToProp,\n storeToProps: component.storeToProps,\n stateToProps: component.stateToProps,\n authToProp: component.authToProp,\n eventToProps: component.eventToProps,\n connectorToProp: component.connectorToProp,\n localPropsToProp: component.localPropsToProp,\n };\n\n await this.registerComponent(registeredComponent);\n });\n\n await Promise.all(registrations);\n }\n\n /**\n * This method is called after the component is loaded.\n * We're using this method to add event listeners to the host element.\n */\n async componentDidLoad() {\n debug(`[~${this.hostTagName}] (componentDidLoad) Did load`);\n }\n\n /**\n * This method is called when the component is disconnected from the DOM.\n * We're using this method to dispose of the stores.\n */\n async componentDisconnected() {\n // Loop through each store and and dispose\n Object.values(this.stores).forEach(store => {\n store.dispose();\n });\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${event.detail.name}.`);\n return;\n }\n\n await this.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${event.detail.name}.`);\n return;\n }\n\n this.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to register a component with the provider\n * @param component component to register\n * @returns void\n */\n public async registerComponent(component: RegisteredComponent<any, any>): Promise<void> {\n debug(`~[${this.hostTagName}] (registerComponent) Registering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n const isReregistration = elementId && this.registeredComponents[elementId];\n\n // If this is a re-registration, clean up previous registrations first\n if (isReregistration) {\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} already registered. Updating registration.`);\n // Clean up event listeners but keep the component ID\n this.cleanupComponentRegistration(elementId, false);\n } else {\n // Set a deterministic data id in tests, otherwise a random id\n const deterministicId = isTestEnvironment() ? this.computeDeterministicId(component.element as HTMLElement) : undefined;\n component.element.dataset.nylasId = elementId || deterministicId || uniqueID();\n }\n\n // Register/update the component to ensure the component is tracked even while waiting for definition\n const nylasId = component.element.dataset.nylasId;\n if (nylasId) {\n this.registeredComponents[nylasId] = component;\n }\n\n // Wait for the component to be defined in the custom elements registry before we attempt to\n // complete the component registration. While this means that the component will not be loaded with\n // props immediately, it does ensure that when we do set the props, the component is ready to receive them.\n debug(`[${this.hostTagName}] (registerComponent) Waiting for \"${component.element.localName}\" component to be defined`, { component });\n try {\n await customElements.whenDefined(component.element.tagName.toLowerCase());\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.element.localName}\" is now defined`);\n } catch (error) {\n debug(`[${this.hostTagName}] (registerComponent) Error waiting for component \"${component.element.localName}\" to be defined:`, error);\n // Continue with registration anyway, as the component might be defined later\n }\n\n const eventOverrides = this.eventOverrides;\n const { stateToProps, getStoresToProp, eventToProps, storeToProps, connectorToProp, localPropsToProp, element } = component;\n\n /**\n * We allow components to map an event to a prop. These events can automatically\n * call a method on the nylasConnector instance.\n */\n eventToProps?.forEach((customEventHandler, propKey) => {\n const nylasConnector = this.nylasConnector;\n const handler = async (event: CustomEvent<any>) => {\n debug(`[${this.hostTagName}] (registerComponent) Handling \"${component.name}\" prop \"${String(propKey)}\" event.`, { event });\n if (propKey in eventOverrides) {\n debug(`[${this.hostTagName}] (registerComponent) Found event override for \"${String(propKey)}\" event. Calling override.`);\n await eventOverrides[propKey](event, nylasConnector);\n }\n\n if (!event.defaultPrevented) {\n await customEventHandler(event, nylasConnector);\n }\n\n return;\n };\n\n const elementId = component.element.dataset.nylasId;\n\n if (elementId && !this.eventListenerRegistrations.has(elementId)) {\n this.eventListenerRegistrations.set(elementId, []);\n }\n\n if (elementId) {\n this.eventListenerRegistrations.get(elementId)?.push([element, propKey, handler]);\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Setting \"${component.name}\" event \"${String(propKey)}\" to automcially call NylasConnector method.`);\n\n // We should immediately call the event handler to make sure the prop is set\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (registerComponent) Adding event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.addEventListener(eventName, handler as unknown as EventListener);\n });\n\n /**\n * This is a rather simple way for us to set the initial props for a component.\n * For each prop, we check if the prop is mapped to a store. If it is, we set\n * the prop to the store value.\n */\n stateToProps?.forEach((propKey, stateKey) => {\n const [storeName, stateName] = stateKey.split('.');\n const store = this.getStore(storeName as keyof typeof this.stores);\n const stateValue = store.state[stateName as keyof typeof store.state];\n\n // Make sure this component was registered and has a nylasId\n if (!element.dataset.nylasId) {\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.name}\" not registered. Skipping.`, { component });\n return;\n }\n\n // We need to keep track of the store and prop key so that we can update the\n // prop when the store changes\n if (!this.propStateRegistrations.has(storeName as keyof typeof this.stores)) {\n this.propStateRegistrations.set(storeName as keyof typeof this.stores, new Map());\n }\n\n if (!this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.has(stateName)) {\n this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.set(stateName, [\n {\n elementId: element.dataset.nylasId,\n propKey,\n },\n ]);\n } else {\n this.propStateRegistrations\n .get(storeName as keyof typeof this.stores)\n ?.get(stateName)\n ?.push({\n elementId: element.dataset.nylasId,\n propKey,\n });\n }\n\n // Set the prop value on the component\n (element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey}\" value.`, { stateValue });\n });\n\n /**\n * We allow components to also map props from the provider to the component.\n */\n localPropsToProp?.forEach((propKey, value) => {\n const mappedPropValue = this.host[value]; // TODO: Is this safe? We should find a way to only limit it to public properties and no methods.\n (element as { [key: string]: any })[propKey.toString()] = mappedPropValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to the value of \"${value}\" value.`, { value, mappedPropValue });\n });\n\n /**\n * We allow components to access the getStore method directly.\n */\n if (getStoresToProp) {\n (element as { [key: string]: any })[getStoresToProp?.toString()] = this.getStore;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${getStoresToProp.toString()}\" to \"getStore\" method.`);\n }\n\n /**\n * We allow components to map a store to a prop for direct access.\n */\n storeToProps?.forEach((propKey, storeKey) => {\n const store = this.getStore(storeKey);\n (element as { [key: string]: any })[propKey.toString()] = store;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${storeKey}\" store.`, { store });\n });\n\n /**\n * We allow components to map the NylasConnector instance to a prop for direct access.\n */\n if (connectorToProp) {\n (element as { [key: string]: any })[connectorToProp?.toString()] = this.nylasConnector;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${connectorToProp.toString()}\" to \"nylasConnector\" value.`, { connectorToProp });\n }\n\n /**\n * We allow components to fire an event when they are registered.\n */\n if (typeof element.registerCallback === 'function') {\n debug(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for \"${component.name}\".`);\n await element.registerCallback();\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} registered.`);\n }\n\n /**\n * Compute a deterministic nylas id for an element during tests.\n * Preference order:\n * - existing element id attribute\n * - existing element name attribute\n * - <tag>-<indexWithinHostOfSameTag>\n */\n private computeDeterministicId(element: HTMLElement): string {\n const idAttr = element.getAttribute('id');\n if (idAttr && idAttr.trim().length > 0) return idAttr.trim();\n\n const nameAttr = element.getAttribute('name');\n if (nameAttr && nameAttr.trim().length > 0) return nameAttr.trim();\n\n const tag = element.tagName.toLowerCase();\n try {\n const siblingsSameTag = Array.from(this.host?.querySelectorAll(tag) || []) as HTMLElement[];\n const idx = siblingsSameTag.indexOf(element);\n const indexOneBased = idx >= 0 ? idx + 1 : siblingsSameTag.length + 1;\n return `${tag}-${indexOneBased}`;\n } catch (_e) {\n return `${tag}-1`;\n }\n }\n\n /**\n * Cleans up registrations for a component without fully unregistering it\n * @param elementId The ID of the element to clean up\n * @param removeFromRegistry Whether to remove the component from the registry\n */\n private cleanupComponentRegistration(elementId: string, removeFromRegistry: boolean = true): void {\n // Remove event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n if (eventListenerRegistrations) {\n eventListenerRegistrations.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n this.eventListenerRegistrations.delete(elementId);\n }\n\n // Clean up prop state registrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((props, stateKey) => {\n const filteredProps = props.filter(prop => prop.elementId !== elementId);\n if (filteredProps.length !== props.length) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Remove from registry if requested\n if (removeFromRegistry) {\n delete this.registeredComponents[elementId];\n }\n }\n\n /**\n * This is a method that is used to unregister a component with the provider.\n * @param component HTMLElement to unregister\n * @returns void\n */\n public unregisterComponent(component: RegisteredComponent<any, any>): void {\n debug(`[${this.hostTagName}] Unregistering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n if (!elementId) {\n debug(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${component.name}.`);\n return;\n }\n\n // Make sure the component is not already registered\n if (this.registeredComponents[elementId]) {\n debug(`[${this.hostTagName}] (unregisterComponent) Component ${component.name} not registered. Skipping.`);\n return;\n }\n\n // Remove the component prop registration from propStateRegistrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((_, stateKey) => {\n const props = this.propStateRegistrations.get(storeName)?.get(stateKey);\n const filteredProps = props?.filter(prop => prop.elementId !== elementId);\n if (filteredProps) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Before we unregister the component, we need to remove any event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n eventListenerRegistrations?.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (unregisterComponent) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n\n // Unregister the component\n delete this.registeredComponents[elementId];\n }\n\n /**\n * This method is used to dynamically retrieve the appropriate store\n * @param name store name\n */\n public getStore<K extends keyof Stores>(name: K): Stores[K] {\n const store = this.stores[name];\n if (!store) {\n throw new Error(`[${this.hostTagName}] Store \"${name.toString()}\" not found.`);\n }\n return store;\n }\n\n /**\n * This method is called when the component is connected to the DOM.\n * We're using this method to listen for changes in the store and update\n * the registered components with the new values.\n */\n private async setupStoreListeners() {\n const self = this;\n\n /**\n * This is a rather simple way for us to listen for changes in the store\n * and make sure our registered components are updated with the new values.\n *\n * For each store change, we loop through each registered component and\n * check if the store change is mapped to a prop on the component. If it is,\n * we set the prop to the new value.\n *\n * We call this super early in the provider lifecycle so that we can make sure\n * that all components have the correct props before they are rendered.\n */\n Object.entries(this.stores).forEach(([storeName, store]) => {\n debug(`[${self.hostTagName}] (setupStoreListeners) Listening for changes in \"${storeName}\" store.`);\n store.use({\n set(stateKey, newValue, oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" changed`, { newValue, oldValue });\n if (newValue === oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" unchanged. Skipping.`);\n return;\n }\n\n const registeredComponents = self.registeredComponents;\n if (!registeredComponents) {\n debug(`[${self.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);\n return;\n }\n\n // Get our prop registrations for this store\n const props = self.propStateRegistrations.get(storeName as keyof typeof self.stores as string)?.get(stateKey.toString()) || [];\n debug(`[${self.hostTagName}] (setupStoreListeners) Found ${props.length} prop(s) registered for \"${stateKey.toString()}\" store.`, {\n props,\n propStateRegistrations: self.propStateRegistrations,\n });\n\n // Loop through each registered component and update the prop\n props.forEach(({ elementId, propKey }) => {\n const component = registeredComponents[elementId];\n if (!component) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Component \"${elementId}\" not found. Skipping.`, { component });\n return;\n }\n\n // Get the appropriate store\n const loadedStore = self.getStore(storeName as keyof typeof self.stores as string);\n const stateValue = loadedStore.state[stateKey as unknown as keyof typeof loadedStore.state];\n (component.element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${self.hostTagName}] (setupStoreListeners) Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey.toString()}\" value.`, { stateValue });\n });\n },\n });\n });\n }\n\n /**\n * Simple getter for the host element tag name.\n */\n private get hostTagName(): string {\n return this.host?.tagName?.toLowerCase() ?? 'nylas-provider';\n }\n}\n\nexport class NylasBaseProvider<T extends Record<string, ObservableMap<any>>> extends NylasAbstractProvider<T> {}\n"],"names":[],"mappings":";;MA+BsB,qBAAqB,CAAA;AAkEzC,IAAA,WAAA,CAAY,IAAiB,EAAE,MAAc,EAAE,8BAA0C,GAAA,IAAI,EAAE,cAAkC,EAAA;QAzC1H,IAA8B,CAAA,8BAAA,GAAY,IAAI;QAO9C,IAAoB,CAAA,oBAAA,GAAqD,EAAE;AAO3E,QAAA,IAAA,CAAA,sBAAsB,GAA2E,IAAI,GAAG,EAAE;AAO1G,QAAA,IAAA,CAAA,0BAA0B,GAAgD,IAAI,GAAG,EAAE;AAqBxF,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM;AACpB,QAAA,IAAI,CAAC,8BAA8B,GAAG,8BAA8B;AACpE,QAAA,IAAI,CAAC,cAAc,GAAG,cAAc;QAEpC,KAAK,CAAC,CAAI,CAAA,EAAA,IAAI,CAAC,WAAW,CAAqC,mCAAA,CAAA,EAAE,EAAE,cAAc,EAAE,CAAC;QAEpF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;QAC1D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;AAGxC,QAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAS,IAAG;YAC3C,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,GAAG,EAAE,CAAC;AACvD,SAAC,CAAC;;IAYJ,MAAM,iBAAiB,CAAC,cAA2C,EAAA;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ACF,aAAA,CAAC;AACJ,SAAC,CAAC;;AAMJ,IAAA,IAAY,WAAW,GAAA;QACrB,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,gBAAgB;;AAE/D;AAEK,MAAO,iBAAgE,SAAQ,qBAAwB,CAAA;AAAG;;;;"}
1
+ {"version":3,"file":"p-7nXSDTLA.js","sources":["src/common/abstract-provider.ts"],"sourcesContent":["import { RegisteredComponent } from '@/common/register-component';\nimport { BaseNylasConnectorInterface } from '@/connector/connector-interface';\nimport { debug, formatEventName, uniqueID, isTestEnvironment } from '@/utils/utils';\nimport { ObservableMap } from '@stencil/store';\nimport { EventOverride } from './component-types';\nimport { HTMLStencilElement } from '@stencil/core/internal';\n\nexport type PropKey = string | number | symbol;\nexport type StoreKey = string;\nexport type StoreName<T> = keyof T;\nexport type StateKey = string;\nexport type ElementID = string;\nexport type PropStateRegistration = { elementId: ElementID; propKey: PropKey };\nexport type EventListenerRegistration = [HTMLElement, PropKey, (event: CustomEvent<any>) => Promise<void>];\n\nexport interface NylasProviderInterface<Stores extends Record<string, ObservableMap<any>>> {\n nylasConnector?: BaseNylasConnectorInterface;\n stores: Stores;\n host?: HTMLElement;\n automaticComponentRegistration: boolean;\n registeredComponents: Record<ElementID, RegisteredComponent<any, any>>;\n propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>>;\n eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]>;\n componentWillLoad(nylasConnector: BaseNylasConnectorInterface): Promise<void>;\n componentDidLoad(): Promise<void>;\n componentDisconnected(): Promise<void>;\n getStore<K extends keyof ThisType<this['stores']>>(name: K): ThisType<this['stores']>[K];\n registerComponent(component: RegisteredComponent<any, any>): void;\n unregisterComponent(component: RegisteredComponent<any, any>): void;\n}\n\nexport abstract class NylasAbstractProvider<Stores extends Record<string, ObservableMap<any>>> implements NylasProviderInterface<Stores> {\n /**\n * The NylasConnector instance.\n * This is used to provide access to the NylasConnector instance to all components.\n */\n public nylasConnector?: BaseNylasConnectorInterface;\n\n /**\n * A list of stores that are used by the provider.\n * This is used to provide access to the stores to all components.\n */\n public stores: Stores;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n public host!: HTMLElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n * @default true\n */\n public automaticComponentRegistration: boolean = true;\n\n /**\n * A list of registered components that are listening for store changes.\n * Each component is registered with a unique id so that we can easily track the component\n * for various other operations (see `propStateRegistrations` and `eventListenerRegistrations`).\n */\n public registeredComponents: Record<ElementID, RegisteredComponent<any, any>> = {};\n\n /**\n * A list of registered components that are listening for store changes.\n * To make lookups more efficient, we use a Map of our prop registrations that we need to map to differnet\n * state keys. When a component is unregistered, we can use this map to remove the prop registration.\n */\n public propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>> = new Map();\n\n /**\n * A list of registered event listeners.\n * To make lookups more efficient, we use a Map of our event listeners that we need to map to differnet\n * nylas connector methods. When a component is unregistered, we can use this map to remove the event listener.\n */\n public eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]> = new Map();\n\n /**\n * A list of event overrides that are used by the provider.\n * This is used to provide an easy way to override the default function of the event emitter.\n * An example of this is the `timeslotConfirmed` event. By default, this event will set the scheduler store state for `showBookingForm` to `true` which will\n * show the booking form. However, if you want to override this behavior, you can pass in the prop `eventOverride` like:\n * ```html\n * <nylas-scheduler eventOverride={{\"timeslotConfirmed\": (event, nylasConnector) => { console.log(\"Timeslot confirmed event fired!\"); } }} />\n * ```\n */\n public eventOverrides: EventOverride<Exclude<BaseNylasConnectorInterface, undefined>>;\n\n /**\n * The constructor for the AbstractNylasProvider.\n * @param host The host element (usually the HTMLElement of the provider)\n * @param stores A list of stores that are used by the provider\n * @param automaticComponentRegistration A boolean that determines if components should be automatically registered\n * @param eventOverrides A list of event overrides that are used by the provider\n */\n constructor(host: HTMLElement, stores: Stores, automaticComponentRegistration: boolean = true, eventOverrides: EventOverride<any>) {\n this.host = host;\n this.stores = stores;\n this.automaticComponentRegistration = automaticComponentRegistration;\n this.eventOverrides = eventOverrides;\n\n debug(`[${this.hostTagName}] Initializing (abstract) provider.`, { eventOverrides });\n\n this.registerComponent = this.registerComponent.bind(this);\n this.getStore = this.getStore.bind(this);\n\n // Init propStateRegistrations with store names\n Object.keys(this.stores).forEach(storeName => {\n this.propStateRegistrations.set(storeName, new Map());\n });\n }\n\n /**\n * This method is called before the component is loaded.\n * We're passing the NylasConnector instance to the provider so that we can\n * provide access to the NylasConnector instance to all components.\n *\n * However, because the NylasConnector is often constructed after the component's\n * constructor is called, set the NylasConnector instance here.\n * @param nylasConnector The NylasConnector instance\n */\n async componentWillLoad(nylasConnector: BaseNylasConnectorInterface) {\n debug(`[${this.hostTagName}] Will load`);\n\n // For each of our stores, configure the listeners for changes in the\n // store state.\n this.setupStoreListeners();\n\n // Set the NylasConnector instance\n this.nylasConnector = nylasConnector;\n\n /**\n * This is a very static way of registering components, but it happens fairly\n * early in the component lifecycle, so it can be beneficial to do it here.\n *\n * The big downside to this is that it will not pick up any components that\n * are dynamically added to the DOM after this method is called.\n *\n * So we should evaluate if this is the best way to register components.\n */\n const childComponents = Array.from(this.host.querySelectorAll('*')).filter(child => child.tagName.toLowerCase().startsWith('nylas-'));\n debug(`[${this.hostTagName}] Found ${childComponents.length} child component(s).`, { childComponents });\n\n const registrations = childComponents.map(async child => {\n const component = child as any; // It unfortunately makes life a whole lot easier to just cast this to any\n if (!component) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} does not have a name. Skipping.`);\n return;\n }\n\n // Skip components that don't have the `registerNylasComponent` prop\n if (!component.registerNylasComponent) {\n debug(`[~${this.hostTagName}] (componentWillLoad) Component ${component.tagName} is not a component that can be registered. Skipping.`, { component });\n return;\n }\n\n const registeredComponent: RegisteredComponent<any, any> = {\n element: component as HTMLStencilElement,\n name: component.tagName.toLowerCase(),\n getStoresToProp: component.getStoresToProp,\n storeToProps: component.storeToProps,\n stateToProps: component.stateToProps,\n authToProp: component.authToProp,\n eventToProps: component.eventToProps,\n connectorToProp: component.connectorToProp,\n localPropsToProp: component.localPropsToProp,\n };\n\n await this.registerComponent(registeredComponent);\n });\n\n await Promise.all(registrations);\n }\n\n /**\n * This method is called after the component is loaded.\n * We're using this method to add event listeners to the host element.\n */\n async componentDidLoad() {\n debug(`[~${this.hostTagName}] (componentDidLoad) Did load`);\n }\n\n /**\n * This method is called when the component is disconnected from the DOM.\n * We're using this method to dispose of the stores.\n */\n async componentDisconnected() {\n // Loop through each store and and dispose\n Object.values(this.stores).forEach(store => {\n store.dispose();\n });\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (registerComponentHandler) Automatic component registration disabled. Skipping registration of ${event.detail.name}.`);\n return;\n }\n\n await this.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n event.stopPropagation();\n\n if (!this.automaticComponentRegistration) {\n debug(`~[${this.hostTagName}] (unregisterComponentHandler) Automatic component registration disabled. Skipping unregistration of ${event.detail.name}.`);\n return;\n }\n\n this.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to register a component with the provider\n * @param component component to register\n * @returns void\n */\n public async registerComponent(component: RegisteredComponent<any, any>): Promise<void> {\n debug(`~[${this.hostTagName}] (registerComponent) Registering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n const isReregistration = elementId && this.registeredComponents[elementId];\n\n // If this is a re-registration, clean up previous registrations first\n if (isReregistration) {\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} already registered. Updating registration.`);\n // Clean up event listeners but keep the component ID\n this.cleanupComponentRegistration(elementId, false);\n } else {\n // Set a deterministic data id in tests, otherwise a random id\n const deterministicId = isTestEnvironment() ? this.computeDeterministicId(component.element as HTMLElement) : undefined;\n component.element.dataset.nylasId = elementId || deterministicId || uniqueID();\n }\n\n // Register/update the component to ensure the component is tracked even while waiting for definition\n const nylasId = component.element.dataset.nylasId;\n if (nylasId) {\n this.registeredComponents[nylasId] = component;\n }\n\n // Wait for the component to be defined in the custom elements registry before we attempt to\n // complete the component registration. While this means that the component will not be loaded with\n // props immediately, it does ensure that when we do set the props, the component is ready to receive them.\n debug(`[${this.hostTagName}] (registerComponent) Waiting for \"${component.element.localName}\" component to be defined`, { component });\n try {\n await customElements.whenDefined(component.element.tagName.toLowerCase());\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.element.localName}\" is now defined`);\n } catch (error) {\n debug(`[${this.hostTagName}] (registerComponent) Error waiting for component \"${component.element.localName}\" to be defined:`, error);\n // Continue with registration anyway, as the component might be defined later\n }\n\n const eventOverrides = this.eventOverrides;\n const { stateToProps, getStoresToProp, eventToProps, storeToProps, connectorToProp, localPropsToProp, element } = component;\n\n /**\n * We allow components to map an event to a prop. These events can automatically\n * call a method on the nylasConnector instance.\n */\n eventToProps?.forEach((customEventHandler, propKey) => {\n const nylasConnector = this.nylasConnector;\n const handler = async (event: CustomEvent<any>) => {\n debug(`[${this.hostTagName}] (registerComponent) Handling \"${component.name}\" prop \"${String(propKey)}\" event.`, { event });\n if (propKey in eventOverrides) {\n debug(`[${this.hostTagName}] (registerComponent) Found event override for \"${String(propKey)}\" event. Calling override.`);\n await eventOverrides[propKey](event, nylasConnector);\n }\n\n if (!event.defaultPrevented) {\n await customEventHandler(event, nylasConnector);\n }\n\n return;\n };\n\n const elementId = component.element.dataset.nylasId;\n\n if (elementId && !this.eventListenerRegistrations.has(elementId)) {\n this.eventListenerRegistrations.set(elementId, []);\n }\n\n if (elementId) {\n this.eventListenerRegistrations.get(elementId)?.push([element, propKey, handler]);\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Setting \"${component.name}\" event \"${String(propKey)}\" to automcially call NylasConnector method.`);\n\n // We should immediately call the event handler to make sure the prop is set\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (registerComponent) Adding event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.addEventListener(eventName, handler as unknown as EventListener);\n });\n\n /**\n * This is a rather simple way for us to set the initial props for a component.\n * For each prop, we check if the prop is mapped to a store. If it is, we set\n * the prop to the store value.\n */\n stateToProps?.forEach((propKey, stateKey) => {\n const [storeName, stateName] = stateKey.split('.');\n const store = this.getStore(storeName as keyof typeof this.stores);\n const stateValue = store.state[stateName as keyof typeof store.state];\n\n // Make sure this component was registered and has a nylasId\n if (!element.dataset.nylasId) {\n debug(`[${this.hostTagName}] (registerComponent) Component \"${component.name}\" not registered. Skipping.`, { component });\n return;\n }\n\n // We need to keep track of the store and prop key so that we can update the\n // prop when the store changes\n if (!this.propStateRegistrations.has(storeName as keyof typeof this.stores)) {\n this.propStateRegistrations.set(storeName as keyof typeof this.stores, new Map());\n }\n\n if (!this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.has(stateName)) {\n this.propStateRegistrations.get(storeName as keyof typeof this.stores)?.set(stateName, [\n {\n elementId: element.dataset.nylasId,\n propKey,\n },\n ]);\n } else {\n this.propStateRegistrations\n .get(storeName as keyof typeof this.stores)\n ?.get(stateName)\n ?.push({\n elementId: element.dataset.nylasId,\n propKey,\n });\n }\n\n // Set the prop value on the component\n (element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey}\" value.`, { stateValue });\n });\n\n /**\n * We allow components to also map props from the provider to the component.\n */\n localPropsToProp?.forEach((propKey, value) => {\n const mappedPropValue = this.host[value]; // TODO: Is this safe? We should find a way to only limit it to public properties and no methods.\n (element as { [key: string]: any })[propKey.toString()] = mappedPropValue;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to the value of \"${value}\" value.`, { value, mappedPropValue });\n });\n\n /**\n * We allow components to access the getStore method directly.\n */\n if (getStoresToProp) {\n (element as { [key: string]: any })[getStoresToProp?.toString()] = this.getStore;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${getStoresToProp.toString()}\" to \"getStore\" method.`);\n }\n\n /**\n * We allow components to map a store to a prop for direct access.\n */\n storeToProps?.forEach((propKey, storeKey) => {\n const store = this.getStore(storeKey);\n (element as { [key: string]: any })[propKey.toString()] = store;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${storeKey}\" store.`, { store });\n });\n\n /**\n * We allow components to map the NylasConnector instance to a prop for direct access.\n */\n if (connectorToProp) {\n (element as { [key: string]: any })[connectorToProp?.toString()] = this.nylasConnector;\n debug(`[${this.hostTagName}] Setting \"${component.name}\" prop \"${connectorToProp.toString()}\" to \"nylasConnector\" value.`, { connectorToProp });\n }\n\n /**\n * We allow components to fire an event when they are registered.\n */\n if (typeof element.registerCallback === 'function') {\n debug(`[${this.hostTagName}] (registerComponent) Calling registerCallback method for \"${component.name}\".`);\n await element.registerCallback();\n }\n\n debug(`[${this.hostTagName}] (registerComponent) Component ${component.name} registered.`);\n }\n\n /**\n * Compute a deterministic nylas id for an element during tests.\n * Preference order:\n * - existing element id attribute\n * - existing element name attribute\n * - <tag>-<indexWithinHostOfSameTag>\n */\n private computeDeterministicId(element: HTMLElement): string {\n const idAttr = element.getAttribute('id');\n if (idAttr && idAttr.trim().length > 0) return idAttr.trim();\n\n const nameAttr = element.getAttribute('name');\n if (nameAttr && nameAttr.trim().length > 0) return nameAttr.trim();\n\n const tag = element.tagName.toLowerCase();\n try {\n const siblingsSameTag = Array.from(this.host?.querySelectorAll(tag) || []) as HTMLElement[];\n const idx = siblingsSameTag.indexOf(element);\n const indexOneBased = idx >= 0 ? idx + 1 : siblingsSameTag.length + 1;\n return `${tag}-${indexOneBased}`;\n } catch (_e) {\n return `${tag}-1`;\n }\n }\n\n /**\n * Cleans up registrations for a component without fully unregistering it\n * @param elementId The ID of the element to clean up\n * @param removeFromRegistry Whether to remove the component from the registry\n */\n private cleanupComponentRegistration(elementId: string, removeFromRegistry: boolean = true): void {\n // Remove event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n if (eventListenerRegistrations) {\n eventListenerRegistrations.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (cleanupComponentRegistration) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n this.eventListenerRegistrations.delete(elementId);\n }\n\n // Clean up prop state registrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((props, stateKey) => {\n const filteredProps = props.filter(prop => prop.elementId !== elementId);\n if (filteredProps.length !== props.length) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Remove from registry if requested\n if (removeFromRegistry) {\n delete this.registeredComponents[elementId];\n }\n }\n\n /**\n * This is a method that is used to unregister a component with the provider.\n * @param component HTMLElement to unregister\n * @returns void\n */\n public unregisterComponent(component: RegisteredComponent<any, any>): void {\n debug(`[${this.hostTagName}] Unregistering component ${component.name}.`);\n\n // Get component element id\n const elementId = component.element.dataset.nylasId;\n if (!elementId) {\n debug(`[${this.hostTagName}] (unregisterComponent) Unregistering component ${component.name}.`);\n return;\n }\n\n // Make sure the component is not already registered\n if (this.registeredComponents[elementId]) {\n debug(`[${this.hostTagName}] (unregisterComponent) Component ${component.name} not registered. Skipping.`);\n return;\n }\n\n // Remove the component prop registration from propStateRegistrations\n this.propStateRegistrations.forEach((stateToProps, storeName) => {\n stateToProps.forEach((_, stateKey) => {\n const props = this.propStateRegistrations.get(storeName)?.get(stateKey);\n const filteredProps = props?.filter(prop => prop.elementId !== elementId);\n if (filteredProps) {\n this.propStateRegistrations.get(storeName)?.set(stateKey, filteredProps);\n }\n });\n });\n\n // Before we unregister the component, we need to remove any event listeners\n const eventListenerRegistrations = this.eventListenerRegistrations.get(elementId);\n eventListenerRegistrations?.forEach(([element, propKey, handler]) => {\n const eventName = formatEventName(propKey.toString());\n debug(`[${this.hostTagName}] (unregisterComponent) Removing event listener for \"${eventName}\" on \"${element.tagName}\"`);\n element.removeEventListener(eventName, handler as unknown as EventListener);\n });\n\n // Unregister the component\n delete this.registeredComponents[elementId];\n }\n\n /**\n * This method is used to dynamically retrieve the appropriate store\n * @param name store name\n */\n public getStore<K extends keyof Stores>(name: K): Stores[K] {\n const store = this.stores[name];\n if (!store) {\n throw new Error(`[${this.hostTagName}] Store \"${name.toString()}\" not found.`);\n }\n return store;\n }\n\n /**\n * This method is called when the component is connected to the DOM.\n * We're using this method to listen for changes in the store and update\n * the registered components with the new values.\n */\n private async setupStoreListeners() {\n const self = this;\n\n /**\n * This is a rather simple way for us to listen for changes in the store\n * and make sure our registered components are updated with the new values.\n *\n * For each store change, we loop through each registered component and\n * check if the store change is mapped to a prop on the component. If it is,\n * we set the prop to the new value.\n *\n * We call this super early in the provider lifecycle so that we can make sure\n * that all components have the correct props before they are rendered.\n */\n Object.entries(this.stores).forEach(([storeName, store]) => {\n debug(`[${self.hostTagName}] (setupStoreListeners) Listening for changes in \"${storeName}\" store.`);\n store.use({\n set(stateKey, newValue, oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" changed`, { newValue, oldValue });\n if (newValue === oldValue) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Store \"${storeName}\" state \"${stateKey.toString()}\" unchanged. Skipping.`);\n return;\n }\n\n const registeredComponents = self.registeredComponents;\n if (!registeredComponents) {\n debug(`[${self.hostTagName}] (setupStoreListeners) No registered components found. Skipping.`);\n return;\n }\n\n // Get our prop registrations for this store\n const props = self.propStateRegistrations.get(storeName as keyof typeof self.stores as string)?.get(stateKey.toString()) || [];\n debug(`[${self.hostTagName}] (setupStoreListeners) Found ${props.length} prop(s) registered for \"${stateKey.toString()}\" store.`, {\n props,\n propStateRegistrations: self.propStateRegistrations,\n });\n\n // Loop through each registered component and update the prop\n props.forEach(({ elementId, propKey }) => {\n const component = registeredComponents[elementId];\n if (!component) {\n debug(`[${self.hostTagName}] (setupStoreListeners) Component \"${elementId}\" not found. Skipping.`, { component });\n return;\n }\n\n // Get the appropriate store\n const loadedStore = self.getStore(storeName as keyof typeof self.stores as string);\n const stateValue = loadedStore.state[stateKey as unknown as keyof typeof loadedStore.state];\n (component.element as { [key: string]: any })[propKey.toString()] = stateValue;\n debug(`[${self.hostTagName}] (setupStoreListeners) Setting \"${component.name}\" prop \"${propKey.toString()}\" to \"${stateKey.toString()}\" value.`, { stateValue });\n });\n },\n });\n });\n }\n\n /**\n * Simple getter for the host element tag name.\n */\n private get hostTagName(): string {\n return this.host?.tagName?.toLowerCase() ?? 'nylas-provider';\n }\n}\n\nexport class NylasBaseProvider<T extends Record<string, ObservableMap<any>>> extends NylasAbstractProvider<T> {}\n"],"names":[],"mappings":";;MA+BsB,qBAAqB,CAAA;AAkEzC,IAAA,WAAA,CAAY,IAAiB,EAAE,MAAc,EAAE,8BAA0C,GAAA,IAAI,EAAE,cAAkC,EAAA;QAzC1H,IAA8B,CAAA,8BAAA,GAAY,IAAI;QAO9C,IAAoB,CAAA,oBAAA,GAAqD,EAAE;AAO3E,QAAA,IAAA,CAAA,sBAAsB,GAA2E,IAAI,GAAG,EAAE;AAO1G,QAAA,IAAA,CAAA,0BAA0B,GAAgD,IAAI,GAAG,EAAE;AAqBxF,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,MAAM,GAAG,MAAM;AACpB,QAAA,IAAI,CAAC,8BAA8B,GAAG,8BAA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AAI,CAAC,WAAW,CAAA,mCAAA,EAAsC,SAAS,CAAA,sBAAA,CAAwB,EAAE,EAAE,SAAS,EAAE,CAAC;4BACjH;;wBAIF,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,SAA+C,CAAC;wBAClF,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,QAAqD,CAAC;wBAC1F,SAAS,CAAC,OAAkC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,GAAG,UAAU;wBAC9E,KAAK,CAAC,CAAI,CAAA,EAAA,IAAI,CAAC,WAAW,oCAAoC,SAAS,CAAC,IAAI,CAAA,QAAA,EAAW,OAAO,CAAC,QAAQ,EAAE,CAAA,MAAA,EAAS,QAAQ,CAAC,QAAQ,EAAE,CAAU,QAAA,CAAA,EAAE,EAAE,UAAU,EAAE,CAAC;AAClK,qBAAC,CAAC;iBACH;AACF,aAAA,CAAC;AACJ,SAAC,CAAC;;AAMJ,IAAA,IAAY,WAAW,GAAA;QACrB,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,gBAAgB;;AAE/D;AAEK,MAAO,iBAAgE,SAAQ,qBAAwB,CAAA;AAAG;;;;"}
@@ -1,2 +1,2 @@
1
- import{r as o,h as s,F as n,H as a,a as e}from"./p-0EQQA0nE.js";import{b as r}from"./p-Hhz0ojc7.js";const l=':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.notif{display:flex;padding:17px;align-items:flex-start;justify-content:space-between;gap:16px;border-radius:var(--nylas-border-radius-2x);border:1.5px solid var(--nylas-error);background:var(--nylas-base-0)}@media screen and (max-width: 768px){.notif{width:auto}}.notif .content{display:flex;flex-direction:row;gap:8px}.notif .content .message{font-size:14px;font-weight:400;color:var(--nylas-base-800)}.notif .content .message .title{font-size:16px;font-weight:600;color:var(--nylas-base-950);display:block}.notif .content .message .description{font-size:14px;font-weight:400;color:var(--nylas-base-800);display:block;word-break:break-word}.notif .content .icon.error{color:var(--nylas-error)}.notif.error{border-color:var(--nylas-error);background:rgb(255, 248, 248)}.notif.warning{border-color:var(--nylas-warning)}.notif.info{border-color:var(--nylas-info)}.notif.success{border-color:var(--nylas-success)}.notif .dismiss-btn{background:none;border:none;color:var(--nylas-base-950);cursor:pointer}';const i=class{constructor(s){o(this,s);this.ttl=5e3;this.allowedCategories=["component","api","validation","invalid_session"];this.notifications=[]}onError(o){r(`[nylas-notification] Error: ${o.detail.notification.title}`);this.handleNotification(o)}onWarning(o){r(`[nylas-notification] Warning: ${o.detail.notification.title}`);this.handleNotification(o)}onInfo(o){r(`[nylas-notification] Info: ${o.detail.notification.title}`);this.handleNotification(o)}onSuccess(o){r(`[nylas-notification] Success: ${o.detail.notification.title}`);this.handleNotification(o)}onDismissNotification(o){this.dismissNotification(o.detail.id)}isChildOf(o){let s=this.host.parentNode;while(s){if(s===o){return true}if(s instanceof ShadowRoot){s=s.host}else{s=s.parentNode}}return false}handleNotification(o){const s=o.detail.host;if(o.defaultPrevented){r(`[nylas-notification] Event default prevented`);return}if(s&&!this.isChildOf(s)){r(`[nylas-notification] Host not a parent`);return}if(this.ttl===0){r(`[nylas-notification] TTL is 0`);return}if(this.allowedCategories.length>0&&!this.allowedCategories.includes(o.detail.notification.category)){r(`[nylas-notification] Category not allowed`);return}if(this.notifications.find((s=>s.id===o.detail.notification.id))){r(`[nylas-notification] Notification already exists`);return}this.notifications=[...this.notifications,{...o.detail.notification}];if(o.detail.notification.ttl!=="none"){const s=o.detail.notification.ttl?o.detail.notification.ttl:this.ttl;window.setTimeout((()=>{this.notifications=this.notifications.filter((s=>s.id!==o.detail.notification.id))}),s)}}dismissNotification(o){this.notifications=this.notifications.filter((s=>s.id!==o))}render(){return s(a,{key:"3e0958b434688b1e4b117ef459e3e4a5060e39bb"},s(n,{key:"5f303c3bca0f97cf9c05bdbdb2130d91d9c87c14"},this.notifications.map((o=>s("div",{class:`notif ${o.type}`,key:o.id},s("div",{class:"content"},s("span",{class:`icon ${o.type}`},(o.type==="error"||o.type==="warning")&&s("warning-icon",null)),s("span",{class:"message"},s("span",{class:"title"},o.title),o.description&&s("span",{class:"description"},o.description))),s("button",{class:"dismiss-btn",onClick:()=>this.dismissNotification(o.id)},s("close-icon",null))))),s("slot",{key:"0db112d45b6f02e4f20bb27d63e1c6aa5f55a932"})))}get host(){return e(this)}};i.style=l;const c=".sc-warning-icon-h{display:flex}";const t=class{constructor(s){o(this,s);this.width="16";this.height="16"}render(){return s("svg",{key:"9444e61e421fd45bfbd71ebe9c5ca024e3f69567",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"7f5a8a167bf3d3cd234c5caa21da8e009da7b3b5",d:"M7.68551 1.35232L1.12678 13.2773C0.576954 14.277 1.3002 15.5002 2.4411 15.5002H15.5586C16.6995 15.5002 17.4227 14.277 16.8729 13.2773L10.3142 1.35232C9.74426 0.316153 8.2554 0.316157 7.68551 1.35232ZM8.99982 5.25016C9.41403 5.25016 9.74982 5.58595 9.74982 6.00016V10.0002C9.74982 10.4144 9.41403 10.7502 8.99982 10.7502C8.5856 10.7502 8.24982 10.4144 8.24982 10.0002V6.00016C8.24982 5.58595 8.5856 5.25016 8.99982 5.25016ZM9.74982 12.2502C9.74982 12.6644 9.41403 13.0002 8.99982 13.0002C8.5856 13.0002 8.24982 12.6644 8.24982 12.2502C8.24982 11.8359 8.5856 11.5002 8.99982 11.5002C9.41403 11.5002 9.74982 11.8359 9.74982 12.2502Z",fill:"currentColor"}))}};t.style=c;export{i as nylas_notification,t as warning_icon};
2
- //# sourceMappingURL=p-6c8e47a9.entry.js.map
1
+ import{r as o,h as s,F as n,H as a,a as e}from"./p-0EQQA0nE.js";import{b as r}from"./p-qPYSsMs1.js";const l=':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.notif{display:flex;padding:17px;align-items:flex-start;justify-content:space-between;gap:16px;border-radius:var(--nylas-border-radius-2x);border:1.5px solid var(--nylas-error);background:var(--nylas-base-0)}@media screen and (max-width: 768px){.notif{width:auto}}.notif .content{display:flex;flex-direction:row;gap:8px}.notif .content .message{font-size:14px;font-weight:400;color:var(--nylas-base-800)}.notif .content .message .title{font-size:16px;font-weight:600;color:var(--nylas-base-950);display:block}.notif .content .message .description{font-size:14px;font-weight:400;color:var(--nylas-base-800);display:block;word-break:break-word}.notif .content .icon.error{color:var(--nylas-error)}.notif.error{border-color:var(--nylas-error);background:rgb(255, 248, 248)}.notif.warning{border-color:var(--nylas-warning)}.notif.info{border-color:var(--nylas-info)}.notif.success{border-color:var(--nylas-success)}.notif .dismiss-btn{background:none;border:none;color:var(--nylas-base-950);cursor:pointer}';const i=class{constructor(s){o(this,s);this.ttl=5e3;this.allowedCategories=["component","api","validation","invalid_session"];this.notifications=[]}onError(o){r(`[nylas-notification] Error: ${o.detail.notification.title}`);this.handleNotification(o)}onWarning(o){r(`[nylas-notification] Warning: ${o.detail.notification.title}`);this.handleNotification(o)}onInfo(o){r(`[nylas-notification] Info: ${o.detail.notification.title}`);this.handleNotification(o)}onSuccess(o){r(`[nylas-notification] Success: ${o.detail.notification.title}`);this.handleNotification(o)}onDismissNotification(o){this.dismissNotification(o.detail.id)}isChildOf(o){let s=this.host.parentNode;while(s){if(s===o){return true}if(s instanceof ShadowRoot){s=s.host}else{s=s.parentNode}}return false}handleNotification(o){const s=o.detail.host;if(o.defaultPrevented){r(`[nylas-notification] Event default prevented`);return}if(s&&!this.isChildOf(s)){r(`[nylas-notification] Host not a parent`);return}if(this.ttl===0){r(`[nylas-notification] TTL is 0`);return}if(this.allowedCategories.length>0&&!this.allowedCategories.includes(o.detail.notification.category)){r(`[nylas-notification] Category not allowed`);return}if(this.notifications.find((s=>s.id===o.detail.notification.id))){r(`[nylas-notification] Notification already exists`);return}this.notifications=[...this.notifications,{...o.detail.notification}];if(o.detail.notification.ttl!=="none"){const s=o.detail.notification.ttl?o.detail.notification.ttl:this.ttl;window.setTimeout((()=>{this.notifications=this.notifications.filter((s=>s.id!==o.detail.notification.id))}),s)}}dismissNotification(o){this.notifications=this.notifications.filter((s=>s.id!==o))}render(){return s(a,{key:"3e0958b434688b1e4b117ef459e3e4a5060e39bb"},s(n,{key:"5f303c3bca0f97cf9c05bdbdb2130d91d9c87c14"},this.notifications.map((o=>s("div",{class:`notif ${o.type}`,key:o.id},s("div",{class:"content"},s("span",{class:`icon ${o.type}`},(o.type==="error"||o.type==="warning")&&s("warning-icon",null)),s("span",{class:"message"},s("span",{class:"title"},o.title),o.description&&s("span",{class:"description"},o.description))),s("button",{class:"dismiss-btn",onClick:()=>this.dismissNotification(o.id)},s("close-icon",null))))),s("slot",{key:"0db112d45b6f02e4f20bb27d63e1c6aa5f55a932"})))}get host(){return e(this)}};i.style=l;const c=".sc-warning-icon-h{display:flex}";const t=class{constructor(s){o(this,s);this.width="16";this.height="16"}render(){return s("svg",{key:"9444e61e421fd45bfbd71ebe9c5ca024e3f69567",width:this.width,height:this.height,fill:"none",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"7f5a8a167bf3d3cd234c5caa21da8e009da7b3b5",d:"M7.68551 1.35232L1.12678 13.2773C0.576954 14.277 1.3002 15.5002 2.4411 15.5002H15.5586C16.6995 15.5002 17.4227 14.277 16.8729 13.2773L10.3142 1.35232C9.74426 0.316153 8.2554 0.316157 7.68551 1.35232ZM8.99982 5.25016C9.41403 5.25016 9.74982 5.58595 9.74982 6.00016V10.0002C9.74982 10.4144 9.41403 10.7502 8.99982 10.7502C8.5856 10.7502 8.24982 10.4144 8.24982 10.0002V6.00016C8.24982 5.58595 8.5856 5.25016 8.99982 5.25016ZM9.74982 12.2502C9.74982 12.6644 9.41403 13.0002 8.99982 13.0002C8.5856 13.0002 8.24982 12.6644 8.24982 12.2502C8.24982 11.8359 8.5856 11.5002 8.99982 11.5002C9.41403 11.5002 9.74982 11.8359 9.74982 12.2502Z",fill:"currentColor"}))}};t.style=c;export{i as nylas_notification,t as warning_icon};
2
+ //# sourceMappingURL=p-854f1b66.entry.js.map
@@ -1,2 +1,2 @@
1
- import{H as t}from"./p-Hhz0ojc7.js";var r={exports:{}};var n=r.exports;var i;function e(){if(i)return r.exports;i=1;(function(t,r){!function(r,n){t.exports=n()}(n,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,i=/\d\d?/,e=/\d*[^-_:/,()\s\d]+/,s={},o=function(t){return(t=+t)+(t>68?1900:2e3)};var u=function(t){return function(r){this[t]=+r}},a=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var r=t.match(/([+-]|\d\d)/g),n=60*r[1]+(+r[2]||0);return 0===n?0:"+"===r[0]?-n:n}(t)}],f=function(t){var r=s[t];return r&&(r.indexOf?r:r.s.concat(r.f))},h=function(t,r){var n,i=s.meridiem;if(i){for(var e=1;e<=24;e+=1)if(t.indexOf(i(e,0,r))>-1){n=e>12;break}}else n=t===(r?"pm":"PM");return n},c={A:[e,function(t){this.afternoon=h(t,false)}],a:[e,function(t){this.afternoon=h(t,true)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[n,u("day")],Do:[e,function(t){var r=s.ordinal,n=t.match(/\d+/);if(this.day=n[0],r)for(var i=1;i<=31;i+=1)r(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],M:[i,u("month")],MM:[n,u("month")],MMM:[e,function(t){var r=f("months"),n=(f("monthsShort")||r.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[e,function(t){var r=f("months").indexOf(t)+1;if(r<1)throw new Error;this.month=r%12||r}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(t){this.year=o(t)}],YYYY:[/\d{4}/,u("year")],Z:a,ZZ:a};function M(n){var i,e;i=n,e=s&&s.formats;for(var o=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(r,n,i){var s=i&&i.toUpperCase();return n||e[i]||t[i]||e[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,r,n){return r||n.slice(1)}))}))).match(r),u=o.length,a=0;a<u;a+=1){var f=o[a],h=c[f],M=h&&h[0],v=h&&h[1];o[a]=v?{regex:M,parser:v}:f.replace(/^\[|\]$/g,"")}return function(t){for(var r={},n=0,i=0;n<u;n+=1){var e=o[n];if("string"==typeof e)i+=e.length;else{var s=e.regex,a=e.parser,f=t.slice(i),h=s.exec(f)[0];a.call(r,h),t=t.replace(h,"")}}return function(t){var r=t.afternoon;if(void 0!==r){var n=t.hours;r?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(r),r}}return function(t,r,n){n.p.customParseFormat=true,t&&t.parseTwoDigitYear&&(o=t.parseTwoDigitYear);var i=r.prototype,e=i.parse;i.parse=function(t){var r=t.date,i=t.utc,o=t.args;this.$u=i;var u=o[1];if("string"==typeof u){var a=true===o[2],f=true===o[3],h=a||f,c=o[2];f&&(c=o[2]),s=this.$locale(),!a&&c&&(s=n.Ls[c]),this.$d=function(t,r,n){try{if(["x","X"].indexOf(r)>-1)return new Date(("X"===r?1e3:1)*t);var i=M(r)(t),e=i.year,s=i.month,o=i.day,u=i.hours,a=i.minutes,f=i.seconds,h=i.milliseconds,c=i.zone,v=new Date,d=o||(e||s?1:v.getDate()),Y=e||v.getFullYear(),D=0;e&&!s||(D=s>0?s-1:v.getMonth());var m=u||0,L=a||0,w=f||0,S=h||0;return c?new Date(Date.UTC(Y,D,d,m,L,w,S+60*c.offset*1e3)):n?new Date(Date.UTC(Y,D,d,m,L,w,S)):new Date(Y,D,d,m,L,w,S)}catch(t){return new Date("")}}(r,u,i),this.init(),c&&true!==c&&(this.$L=this.locale(c).$L),h&&r!=this.format(u)&&(this.$d=new Date("")),s={}}else if(u instanceof Array)for(var v=u.length,d=1;d<=v;d+=1){o[1]=u[d-1];var Y=n.apply(this,o);if(Y.isValid()){this.$d=Y.$d,this.$L=Y.$L,this.init();break}d===v&&(this.$d=new Date(""))}else e.call(this,t)}}}))})(r);return r.exports}var s=e();var o=t(s);export{o as c};
2
- //# sourceMappingURL=p-lLLUSoaT.js.map
1
+ import{H as t}from"./p-qPYSsMs1.js";var r={exports:{}};var n=r.exports;var i;function e(){if(i)return r.exports;i=1;(function(t,r){!function(r,n){t.exports=n()}(n,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,i=/\d\d?/,e=/\d*[^-_:/,()\s\d]+/,s={},o=function(t){return(t=+t)+(t>68?1900:2e3)};var u=function(t){return function(r){this[t]=+r}},a=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var r=t.match(/([+-]|\d\d)/g),n=60*r[1]+(+r[2]||0);return 0===n?0:"+"===r[0]?-n:n}(t)}],f=function(t){var r=s[t];return r&&(r.indexOf?r:r.s.concat(r.f))},h=function(t,r){var n,i=s.meridiem;if(i){for(var e=1;e<=24;e+=1)if(t.indexOf(i(e,0,r))>-1){n=e>12;break}}else n=t===(r?"pm":"PM");return n},M={A:[e,function(t){this.afternoon=h(t,false)}],a:[e,function(t){this.afternoon=h(t,true)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[n,u("day")],Do:[e,function(t){var r=s.ordinal,n=t.match(/\d+/);if(this.day=n[0],r)for(var i=1;i<=31;i+=1)r(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],M:[i,u("month")],MM:[n,u("month")],MMM:[e,function(t){var r=f("months"),n=(f("monthsShort")||r.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[e,function(t){var r=f("months").indexOf(t)+1;if(r<1)throw new Error;this.month=r%12||r}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(t){this.year=o(t)}],YYYY:[/\d{4}/,u("year")],Z:a,ZZ:a};function c(n){var i,e;i=n,e=s&&s.formats;for(var o=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(r,n,i){var s=i&&i.toUpperCase();return n||e[i]||t[i]||e[s].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,r,n){return r||n.slice(1)}))}))).match(r),u=o.length,a=0;a<u;a+=1){var f=o[a],h=M[f],c=h&&h[0],v=h&&h[1];o[a]=v?{regex:c,parser:v}:f.replace(/^\[|\]$/g,"")}return function(t){for(var r={},n=0,i=0;n<u;n+=1){var e=o[n];if("string"==typeof e)i+=e.length;else{var s=e.regex,a=e.parser,f=t.slice(i),h=s.exec(f)[0];a.call(r,h),t=t.replace(h,"")}}return function(t){var r=t.afternoon;if(void 0!==r){var n=t.hours;r?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(r),r}}return function(t,r,n){n.p.customParseFormat=true,t&&t.parseTwoDigitYear&&(o=t.parseTwoDigitYear);var i=r.prototype,e=i.parse;i.parse=function(t){var r=t.date,i=t.utc,o=t.args;this.$u=i;var u=o[1];if("string"==typeof u){var a=true===o[2],f=true===o[3],h=a||f,M=o[2];f&&(M=o[2]),s=this.$locale(),!a&&M&&(s=n.Ls[M]),this.$d=function(t,r,n){try{if(["x","X"].indexOf(r)>-1)return new Date(("X"===r?1e3:1)*t);var i=c(r)(t),e=i.year,s=i.month,o=i.day,u=i.hours,a=i.minutes,f=i.seconds,h=i.milliseconds,M=i.zone,v=new Date,d=o||(e||s?1:v.getDate()),Y=e||v.getFullYear(),D=0;e&&!s||(D=s>0?s-1:v.getMonth());var m=u||0,L=a||0,w=f||0,S=h||0;return M?new Date(Date.UTC(Y,D,d,m,L,w,S+60*M.offset*1e3)):n?new Date(Date.UTC(Y,D,d,m,L,w,S)):new Date(Y,D,d,m,L,w,S)}catch(t){return new Date("")}}(r,u,i),this.init(),M&&true!==M&&(this.$L=this.locale(M).$L),h&&r!=this.format(u)&&(this.$d=new Date("")),s={}}else if(u instanceof Array)for(var v=u.length,d=1;d<=v;d+=1){o[1]=u[d-1];var Y=n.apply(this,o);if(Y.isValid()){this.$d=Y.$d,this.$L=Y.$L,this.init();break}d===v&&(this.$d=new Date(""))}else e.call(this,t)}}}))})(r);return r.exports}var s=e();var o=t(s);export{o as c};
2
+ //# sourceMappingURL=p-BMmDQ3tf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-lLLUSoaT.js","sources":["../../node_modules/.pnpm/dayjs@1.11.7/node_modules/dayjs/plugin/customParseFormat.js"],"sourcesContent":["!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={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\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d\\d/,r=/\\d\\d?/,i=/\\d*[^-_:/,()\\s\\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[r,a(\"seconds\")],ss:[r,a(\"seconds\")],m:[r,a(\"minutes\")],mm:[r,a(\"minutes\")],H:[r,a(\"hours\")],h:[r,a(\"hours\")],HH:[r,a(\"hours\")],hh:[r,a(\"hours\")],D:[r,a(\"day\")],DD:[n,a(\"day\")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],M:[r,a(\"month\")],MM:[n,a(\"month\")],MMM:[i,function(e){var t=h(\"months\"),n=(h(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,a(\"year\")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\\d{4}/,a(\"year\")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f<a;f+=1){var h=s[f],u=d[h],c=u&&u[0],l=u&&u[1];s[f]=l?{regex:c,parser:l}:h.replace(/^\\[|\\]$/g,\"\")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=s[n];if(\"string\"==typeof i)r+=i.length;else{var o=i.regex,f=i.parser,h=e.slice(r),u=o.exec(h)[0];f.call(t,u),e=e.replace(u,\"\")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,s=e.args;this.$u=r;var a=s[1];if(\"string\"==typeof a){var f=!0===s[2],h=!0===s[3],u=f||h,d=s[2];h&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(e,t,n){try{if([\"x\",\"X\"].indexOf(t)>-1)return new Date((\"X\"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date(\"\")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));"],"names":["this"],"mappings":";;;;;;;;;;;;EAAA,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAsD,MAAA,CAAA,OAAA,CAAe,CAAC,GAA2I,CAAC,CAACA,mBAAI,EAAE,UAAU,CAAc,IAAI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C,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,EAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAC,EAAC,CAAC,CAAC,EAAE,CAAA;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"p-BMmDQ3tf.js","sources":["../../node_modules/.pnpm/dayjs@1.11.7/node_modules/dayjs/plugin/customParseFormat.js"],"sourcesContent":["!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={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\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d\\d/,r=/\\d\\d?/,i=/\\d*[^-_:/,()\\s\\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[r,a(\"seconds\")],ss:[r,a(\"seconds\")],m:[r,a(\"minutes\")],mm:[r,a(\"minutes\")],H:[r,a(\"hours\")],h:[r,a(\"hours\")],HH:[r,a(\"hours\")],hh:[r,a(\"hours\")],D:[r,a(\"day\")],DD:[n,a(\"day\")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],M:[r,a(\"month\")],MM:[n,a(\"month\")],MMM:[i,function(e){var t=h(\"months\"),n=(h(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,a(\"year\")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\\d{4}/,a(\"year\")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f<a;f+=1){var h=s[f],u=d[h],c=u&&u[0],l=u&&u[1];s[f]=l?{regex:c,parser:l}:h.replace(/^\\[|\\]$/g,\"\")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=s[n];if(\"string\"==typeof i)r+=i.length;else{var o=i.regex,f=i.parser,h=e.slice(r),u=o.exec(h)[0];f.call(t,u),e=e.replace(u,\"\")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,s=e.args;this.$u=r;var a=s[1];if(\"string\"==typeof a){var f=!0===s[2],h=!0===s[3],u=f||h,d=s[2];h&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(e,t,n){try{if([\"x\",\"X\"].indexOf(t)>-1)return new Date((\"X\"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date(\"\")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.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AC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAE,CAAC,KAAK,GAAG,CAAC,YAAY,KAAK,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,EAAE,CAAC,EAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAC,EAAC,CAAC,CAAC,EAAE,CAAA;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- var r=(r=>(r.Error="error",r.Warning="warning",r.Info="info",r.Success="success",r))(r||{});const n=r=>r!==null&&typeof r=="object"&&"error"in r;const o="0.0.0-canary-20251202205510";export{n as o,r as u,o as v};
2
- //# sourceMappingURL=p-C8X2q4zX.js.map
1
+ var r=(r=>(r.Error="error",r.Warning="warning",r.Info="info",r.Success="success",r))(r||{});const n=r=>r!==null&&typeof r=="object"&&"error"in r;const o="0.0.0-canary-20251202215015";export{n as o,r as u,o as v};
2
+ //# sourceMappingURL=p-C0XfEIKF.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-C8X2q4zX.js","sources":["../nylas-js-core/dist/index.es.js","src/version.ts"],"sourcesContent":["var t = Object.defineProperty;\nvar c = (r, n, s) => n in r ? t(r, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[n] = s;\nvar a = (r, n, s) => (c(r, typeof n != \"symbol\" ? n + \"\" : n, s), s);\nvar u = /* @__PURE__ */ ((r) => (r.Error = \"error\", r.Warning = \"warning\", r.Info = \"info\", r.Success = \"success\", r))(u || {});\nconst e = (r) => r !== null && typeof r == \"object\" && \"data\" in r, o = (r) => r !== null && typeof r == \"object\" && \"error\" in r;\nclass E extends Error {\n constructor(s) {\n super(s == null ? void 0 : s.message);\n a(this, \"apiError\");\n this.name = \"NylasAPIError\", this.stack = new Error().stack, this.apiError = s;\n }\n}\nexport {\n u as NotificationType,\n E as NylasAPIError,\n o as isNylasErrorResponse,\n e as isNylasSuccessResponse\n};\n","export const version = '0.0.0-canary-20251202205510';\n"],"names":[],"mappings":"AAGG,IAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,GAAG,OAAO,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,CAAC,IAAI,GAAG,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE;AACzH,MAA+D,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,IAAI,QAAQ,IAAI,OAAO,IAAI;;ACJzH,MAAM,OAAO,GAAG;;;;"}
1
+ {"version":3,"file":"p-C0XfEIKF.js","sources":["../nylas-js-core/dist/index.es.js","src/version.ts"],"sourcesContent":["var t = Object.defineProperty;\nvar c = (r, n, s) => n in r ? t(r, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[n] = s;\nvar a = (r, n, s) => (c(r, typeof n != \"symbol\" ? n + \"\" : n, s), s);\nvar u = /* @__PURE__ */ ((r) => (r.Error = \"error\", r.Warning = \"warning\", r.Info = \"info\", r.Success = \"success\", r))(u || {});\nconst e = (r) => r !== null && typeof r == \"object\" && \"data\" in r, o = (r) => r !== null && typeof r == \"object\" && \"error\" in r;\nclass E extends Error {\n constructor(s) {\n super(s == null ? void 0 : s.message);\n a(this, \"apiError\");\n this.name = \"NylasAPIError\", this.stack = new Error().stack, this.apiError = s;\n }\n}\nexport {\n u as NotificationType,\n E as NylasAPIError,\n o as isNylasErrorResponse,\n e as isNylasSuccessResponse\n};\n","export const version = '0.0.0-canary-20251202215015';\n"],"names":[],"mappings":"AAGG,IAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,GAAG,OAAO,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,CAAC,IAAI,GAAG,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE;AACzH,MAA+D,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,IAAI,QAAQ,IAAI,OAAO,IAAI;;ACJzH,MAAM,OAAO,GAAG;;;;"}
@@ -1,2 +1,2 @@
1
- import{a as t}from"./p-Hhz0ojc7.js";class e{constructor(t){this.defaultAuthArgs=[];this.session=t}setActiveGrantId(t){this.activeGrantId=t}async request({method:e,path:s,body:n,headers:i}){try{const r=await this.session.fetch(`grants/me/${s}`,{method:e,headers:i?new Headers(i):undefined,body:n,...this.session.isMultiAccount()&&this.activeGrantId?{grant_id:this.activeGrantId}:{}});if(typeof r==="undefined"){throw new Error("Response is undefined")}return t(r)}catch(e){let s=String(e);if(String(e).includes("Access token not found")){s="Session expired, please log in again. Redirecting...";setTimeout((()=>{localStorage.removeItem("grant");localStorage.removeItem("user");window.location.reload()}),1e3)}return t(null,{message:s})}}async currentUser(){const t=this.session.isMultiAccount()?this.activeGrantId:undefined;const e=await this.session.getProfile(t);if(await this.session.isLoggedIn()){const t=await this.session.fetch(`grants/me`,{method:"GET",...this.session.isMultiAccount()&&this.activeGrantId?{grant_id:this.activeGrantId}:{}});const s=t.data;if(!e||!s){return null}const n=s.email;return{id:e.sub,email:n,name:e.name,provider:e.provider}}return null}async authenticationUrl(t){const e=t?.provider||"google";const s=this.defaultAuthArgs.find((t=>t.provider===e));let n=s||{};if(t){n={...n,...t}}return this.session.auth(n)}setDefaultAuthArgs(t){this.defaultAuthArgs=t}}export{e as N};
2
- //# sourceMappingURL=p-BzJOftan.js.map
1
+ import{a as t}from"./p-qPYSsMs1.js";class e{constructor(t){this.defaultAuthArgs=[];this.session=t}setActiveGrantId(t){this.activeGrantId=t}async request({method:e,path:s,body:n,headers:i}){try{const r=await this.session.fetch(`grants/me/${s}`,{method:e,headers:i?new Headers(i):undefined,body:n,...this.session.isMultiAccount()&&this.activeGrantId?{grant_id:this.activeGrantId}:{}});if(typeof r==="undefined"){throw new Error("Response is undefined")}return t(r)}catch(e){let s=String(e);if(String(e).includes("Access token not found")){s="Session expired, please log in again. Redirecting...";setTimeout((()=>{localStorage.removeItem("grant");localStorage.removeItem("user");window.location.reload()}),1e3)}return t(null,{message:s})}}async currentUser(){const t=this.session.isMultiAccount()?this.activeGrantId:undefined;const e=await this.session.getProfile(t);if(await this.session.isLoggedIn()){const t=await this.session.fetch(`grants/me`,{method:"GET",...this.session.isMultiAccount()&&this.activeGrantId?{grant_id:this.activeGrantId}:{}});const s=t.data;if(!e||!s){return null}const n=s.email;return{id:e.sub,email:n,name:e.name,provider:e.provider}}return null}async authenticationUrl(t){const e=t?.provider||"google";const s=this.defaultAuthArgs.find((t=>t.provider===e));let n=s||{};if(t){n={...n,...t}}return this.session.auth(n)}setDefaultAuthArgs(t){this.defaultAuthArgs=t}}export{e as N};
2
+ //# sourceMappingURL=p-CiuA-WAz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"p-BzJOftan.js","sources":["src/common/nylas-api-request.ts"],"sourcesContent":["import { dataResponse } from '@/utils/utils';\nimport type { NylasSessions } from '@nylas/identity';\nimport { DataResponseReturnType } from './types';\n\n/**\n * Arguments for making a request to the Nylas API.\n */\nexport type NylasRequestArgs = {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: any;\n headers?: Record<string, string>;\n};\n\n/**\n * A model representing a user in the Nylas Identity system.\n */\nexport type User = {\n id: string;\n email: string;\n name?: string;\n provider?: string;\n};\n\n/**\n * Arguments for authenticating a user with the Nylas Identity system.\n */\nexport type AuthArgs = {\n /**\n * The provider of the user's email address.\n */\n provider?: string;\n /**\n * A list of permission scopes for the provider.\n */\n scope?: Array<string>;\n /**\n * The login hint associated with the user.\n */\n loginHint?: string;\n /**\n * Whether to include grant scopes in the auth exchange.\n */\n includeGrantScopes?: boolean;\n prompt?: string;\n metadata?: string;\n state?: string;\n};\n\n/**\n * Interface for making requests to the Nylas API.\n *\n * This is an abstract class that is meant to be implemented by customers to provide their own\n * implementation of making requests to the Nylas API. This allows customers to use their own\n * authentication mechanism, or to use a different HTTP client library.\n */\nexport abstract class NylasApiRequest {\n /**\n * This method should make an authenticated request to the Nylas API.\n * Note: It should not throw an error if the request fails, but should return an object with the error\n * information as part of the tuple returned.\n * @param args NylasRequestArgs\n */\n abstract request<T = any>(args: NylasRequestArgs): Promise<DataResponseReturnType<T>>;\n\n /**\n * This method should return the current user's information.\n */\n\n abstract currentUser(): Promise<User | null>;\n\n /**\n * This method should set the default authentication arguments to use when authenticating the user.\n */\n abstract setDefaultAuthArgs(authArgs: AuthArgs[]): void;\n\n /**\n * This method should return the URL to redirect the user to for authentication.\n */\n abstract authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined>;\n}\n\n/**\n * A wrapper around the Nylas Identity session that implements the NylasApiRequest interface.\n * This class is used by the Nylas Web Elements to make requests to the Nylas API if no custom\n * implementation of NylasApiRequest is provided.\n */\nexport class NylasIdentityRequestWrapper implements NylasApiRequest {\n /**\n * The Nylas Identity session instance.\n */\n private session: NylasSessions;\n\n /**\n * The grant_id to use for requests, if there is multi-account support\n * enabled in the Nylas Identity settings.\n */\n private activeGrantId?: string;\n\n /**\n * The default authentication arguments to use when authenticating the user.\n */\n private defaultAuthArgs: AuthArgs[] = [];\n\n /**\n * Constructor for the NylasIdentityRequestWrapper class.\n * @param session The Nylas Identity session instance.\n */\n constructor(session: NylasSessions) {\n this.session = session;\n }\n\n /**\n * This method sets the grant_id to use for requests.\n * This is used when there is multi-account support enabled in the Nylas Identity settings.\n *\n * @param grantId\n */\n setActiveGrantId(grantId: string) {\n this.activeGrantId = grantId;\n }\n\n /**\n * This method makes a request to the Nylas API, using the Nylas Identity's fetch method.\n *\n * The `grants/me/` prefix is added because all requests made from the browser to the Nylas API\n * must be made on behalf of the currently logged in user with a valid access token.\n *\n * @param NylasRequestArgs\n * @returns Promise<[T | null, NylasErrorResponse['error'] | null]>\n */\n async request<T>({ method, path, body, headers }: NylasRequestArgs): Promise<DataResponseReturnType<T>> {\n try {\n const response = await this.session.fetch(`grants/me/${path}`, {\n method,\n headers: headers ? new Headers(headers) : undefined,\n body,\n ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),\n });\n\n // Sometimes the Nylas identity session fetch method returns undefined.\n // Possibly due to CORS issues. In this case, we throw an error.\n if (typeof response === 'undefined') {\n throw new Error('Response is undefined');\n }\n\n return dataResponse(response as T);\n } catch (error: any) {\n let errorMessage = String(error);\n if (String(error).includes('Access token not found')) {\n errorMessage = 'Session expired, please log in again. Redirecting...';\n setTimeout(() => {\n localStorage.removeItem('grant');\n localStorage.removeItem('user');\n window.location.reload();\n }, 1000);\n }\n return dataResponse(null as T, {\n message: errorMessage,\n });\n }\n }\n\n /**\n * This method returns the current (logged in) user's information.\n * If the user is not logged in, it returns null.\n * @returns Promise<User | null>\n */\n async currentUser(): Promise<User | null> {\n const grantId = this.session.isMultiAccount() ? this.activeGrantId : undefined;\n const idToken = await this.session.getProfile(grantId);\n // If the user is not logged in, we can't get the grant (no access token)\n if (await this.session.isLoggedIn()) {\n const grantResponse = await this.session.fetch(`grants/me`, {\n method: 'GET',\n ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),\n });\n const grant = grantResponse.data;\n\n if (!idToken || !grant) {\n return null;\n }\n\n const grantEmail = grant.email;\n return {\n id: idToken.sub,\n email: grantEmail,\n name: idToken.name,\n provider: idToken.provider,\n };\n }\n\n return null;\n }\n\n /**\n * This method returns the URL to redirect the user to for authentication.\n * @param authConfig authArgs\n * @returns Promise<string | undefined>\n */\n async authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined> {\n const provider = authArgs?.provider || 'google';\n const defaultArgs = this.defaultAuthArgs.find(args => args.provider === provider);\n let args = defaultArgs || {};\n\n if (authArgs) {\n args = { ...args, ...authArgs };\n }\n return this.session.auth(args);\n }\n\n /**\n * This method sets the default authentication arguments to use when authenticating the user.\n * @param authArgs authArgs\n */\n setDefaultAuthArgs(authArgs: AuthArgs[]) {\n this.defaultAuthArgs = authArgs;\n }\n}\n"],"names":[],"mappings":";;MAuFa,2BAA2B,CAAA;AAqBtC,IAAA,WAAA,CAAY,OAAsB,EAAA;QAN1B,IAAe,CAAA,eAAA,GAAe,EAAE;AAOtC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;;AASxB,IAAA,gBAAgB,CAAC,OAAe,EAAA;AAC9B,QAAA,IAAI,CAAC,aAAa,GAAG,OAAO;;IAY9B,MAAM,OAAO,CAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAoB,EAAA;AAChE,QAAA,IAAI;AACF,YAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA,UAAA,EAAa,IAAI,CAAA,CAAE,EAAE;gBAC7D,MAAM;AACN,gBAAA,OAAO,EAAE,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS;gBACnD,IAAI;gBACJ,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,IAAI,CAAC,aAAa,GAA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;AACjG,aAAA,CAAC;AACF,YAAA,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI;AAEhC,YAAA,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,EAAE;AACtB,gBAAA,OAAO,IAAI;;AAGb,YAAA,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK;YAC9B,OAAO;gBACL,EAAE,EAAE,OAAO,CAAC,GAAG;AACf,gBAAA,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;aAC3B;;AAGH,QAAA,OAAO,IAAI;;IAQb,MAAM,iBAAiB,CAAC,QAAmB,EAAA;AACzC,QAAA,MAAM,QAAQ,GAAG,QAAQ,EAAE,QAAQ,IAAI,QAAQ;AAC/C,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACjF,QAAA,IAAI,IAAI,GAAG,WAAW,IAAI,EAAE;QAE5B,IAAI,QAAQ,EAAE;YACZ,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,EAAE;;QAEjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;;AAOhC,IAAA,kBAAkB,CAAC,QAAoB,EAAA;AACrC,QAAA,IAAI,CAAC,eAAe,GAAG,QAAQ;;AAElC;;;;"}
1
+ {"version":3,"file":"p-CiuA-WAz.js","sources":["src/common/nylas-api-request.ts"],"sourcesContent":["import { dataResponse } from '@/utils/utils';\nimport type { NylasSessions } from '@nylas/identity';\nimport { DataResponseReturnType } from './types';\n\n/**\n * Arguments for making a request to the Nylas API.\n */\nexport type NylasRequestArgs = {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: any;\n headers?: Record<string, string>;\n};\n\n/**\n * A model representing a user in the Nylas Identity system.\n */\nexport type User = {\n id: string;\n email: string;\n name?: string;\n provider?: string;\n};\n\n/**\n * Arguments for authenticating a user with the Nylas Identity system.\n */\nexport type AuthArgs = {\n /**\n * The provider of the user's email address.\n */\n provider?: string;\n /**\n * A list of permission scopes for the provider.\n */\n scope?: Array<string>;\n /**\n * The login hint associated with the user.\n */\n loginHint?: string;\n /**\n * Whether to include grant scopes in the auth exchange.\n */\n includeGrantScopes?: boolean;\n prompt?: string;\n metadata?: string;\n state?: string;\n};\n\n/**\n * Interface for making requests to the Nylas API.\n *\n * This is an abstract class that is meant to be implemented by customers to provide their own\n * implementation of making requests to the Nylas API. This allows customers to use their own\n * authentication mechanism, or to use a different HTTP client library.\n */\nexport abstract class NylasApiRequest {\n /**\n * This method should make an authenticated request to the Nylas API.\n * Note: It should not throw an error if the request fails, but should return an object with the error\n * information as part of the tuple returned.\n * @param args NylasRequestArgs\n */\n abstract request<T = any>(args: NylasRequestArgs): Promise<DataResponseReturnType<T>>;\n\n /**\n * This method should return the current user's information.\n */\n\n abstract currentUser(): Promise<User | null>;\n\n /**\n * This method should set the default authentication arguments to use when authenticating the user.\n */\n abstract setDefaultAuthArgs(authArgs: AuthArgs[]): void;\n\n /**\n * This method should return the URL to redirect the user to for authentication.\n */\n abstract authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined>;\n}\n\n/**\n * A wrapper around the Nylas Identity session that implements the NylasApiRequest interface.\n * This class is used by the Nylas Web Elements to make requests to the Nylas API if no custom\n * implementation of NylasApiRequest is provided.\n */\nexport class NylasIdentityRequestWrapper implements NylasApiRequest {\n /**\n * The Nylas Identity session instance.\n */\n private session: NylasSessions;\n\n /**\n * The grant_id to use for requests, if there is multi-account support\n * enabled in the Nylas Identity settings.\n */\n private activeGrantId?: string;\n\n /**\n * The default authentication arguments to use when authenticating the user.\n */\n private defaultAuthArgs: AuthArgs[] = [];\n\n /**\n * Constructor for the NylasIdentityRequestWrapper class.\n * @param session The Nylas Identity session instance.\n */\n constructor(session: NylasSessions) {\n this.session = session;\n }\n\n /**\n * This method sets the grant_id to use for requests.\n * This is used when there is multi-account support enabled in the Nylas Identity settings.\n *\n * @param grantId\n */\n setActiveGrantId(grantId: string) {\n this.activeGrantId = grantId;\n }\n\n /**\n * This method makes a request to the Nylas API, using the Nylas Identity's fetch method.\n *\n * The `grants/me/` prefix is added because all requests made from the browser to the Nylas API\n * must be made on behalf of the currently logged in user with a valid access token.\n *\n * @param NylasRequestArgs\n * @returns Promise<[T | null, NylasErrorResponse['error'] | null]>\n */\n async request<T>({ method, path, body, headers }: NylasRequestArgs): Promise<DataResponseReturnType<T>> {\n try {\n const response = await this.session.fetch(`grants/me/${path}`, {\n method,\n headers: headers ? new Headers(headers) : undefined,\n body,\n ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),\n });\n\n // Sometimes the Nylas identity session fetch method returns undefined.\n // Possibly due to CORS issues. In this case, we throw an error.\n if (typeof response === 'undefined') {\n throw new Error('Response is undefined');\n }\n\n return dataResponse(response as T);\n } catch (error: any) {\n let errorMessage = String(error);\n if (String(error).includes('Access token not found')) {\n errorMessage = 'Session expired, please log in again. Redirecting...';\n setTimeout(() => {\n localStorage.removeItem('grant');\n localStorage.removeItem('user');\n window.location.reload();\n }, 1000);\n }\n return dataResponse(null as T, {\n message: errorMessage,\n });\n }\n }\n\n /**\n * This method returns the current (logged in) user's information.\n * If the user is not logged in, it returns null.\n * @returns Promise<User | null>\n */\n async currentUser(): Promise<User | null> {\n const grantId = this.session.isMultiAccount() ? this.activeGrantId : undefined;\n const idToken = await this.session.getProfile(grantId);\n // If the user is not logged in, we can't get the grant (no access token)\n if (await this.session.isLoggedIn()) {\n const grantResponse = await this.session.fetch(`grants/me`, {\n method: 'GET',\n ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),\n });\n const grant = grantResponse.data;\n\n if (!idToken || !grant) {\n return null;\n }\n\n const grantEmail = grant.email;\n return {\n id: idToken.sub,\n email: grantEmail,\n name: idToken.name,\n provider: idToken.provider,\n };\n }\n\n return null;\n }\n\n /**\n * This method returns the URL to redirect the user to for authentication.\n * @param authConfig authArgs\n * @returns Promise<string | undefined>\n */\n async authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined> {\n const provider = authArgs?.provider || 'google';\n const defaultArgs = this.defaultAuthArgs.find(args => args.provider === provider);\n let args = defaultArgs || {};\n\n if (authArgs) {\n args = { ...args, ...authArgs };\n }\n return this.session.auth(args);\n }\n\n /**\n * This method sets the default authentication arguments to use when authenticating the user.\n * @param authArgs authArgs\n */\n setDefaultAuthArgs(authArgs: AuthArgs[]) {\n this.defaultAuthArgs = authArgs;\n }\n}\n"],"names":[],"mappings":";;MAuFa,2BAA2B,CAAA;AAqBtC,IAAA,WAAA,CAAY,OAAsB,EAAA;QAN1B,IAAe,CAAA,eAAA,GAAe,EAAE;AAOtC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;;AASxB,IAAA,gBAAgB,CAAC,OAAe,EAAA;AAC9B,QAAA,IAAI,CAAC,aAAa,GAAG,OAAO;;IAY9B,MAAM,OAAO,CAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAoB,EAAA;AAChE,QAAA,IAAI;AACF,YAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA,UAAA,EAAa,IAAI,CAAA,CAAE,EAAE;gBAC7D,MAAM;AACN,gBAAA,OAAO,EAAE,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS;gBACnD,IAAI;gBACJ,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,IAAI,IAAI,CAAC,aAAa,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC;AACjG,aAAA,CAAC;AAIF,YAAA,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AACnC,gBAAA,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC;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,CAAC,KAAK;YAC9B,OAAO;gBACL,EAAE,EAAE,OAAO,CAAC,GAAG;AACf,gBAAA,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;aAC3B;;AAGH,QAAA,OAAO,IAAI;;IAQb,MAAM,iBAAiB,CAAC,QAAmB,EAAA;AACzC,QAAA,MAAM,QAAQ,GAAG,QAAQ,EAAE,QAAQ,IAAI,QAAQ;AAC/C,QAAA,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACjF,QAAA,IAAI,IAAI,GAAG,WAAW,IAAI,EAAE;QAE5B,IAAI,QAAQ,EAAE;YACZ,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,EAAE;;QAEjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;;AAOhC,IAAA,kBAAkB,CAAC,QAAoB,EAAA;AACrC,QAAA,IAAI,CAAC,eAAe,GAAG,QAAQ;;AAElC;;;;"}
@@ -1,2 +1,2 @@
1
- import{r as e,c as o,h as s,H as a,a as n}from"./p-0EQQA0nE.js";import{b as r}from"./p-Hhz0ojc7.js";const l=':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.dropdown{display:inline-block;width:100%;position:relative}.dropdown .dropdown-label{display:flex;align-items:center;gap:0.25rem;color:var(--nylas-base-800)}.dropdown .dropdown-label p{margin:0}.dropdown .dropdown-label span.required{color:var(--nylas-error);padding:0 0.25rem}.dropdown span.error{color:var(--nylas-error);font-size:14px}.dropbtn{width:inherit;height:48px;color:var(--nylas-base-900);padding:0.5rem;font-size:16px;cursor:pointer;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.dropbtn.focus{background:var(--nylas-base-0)}.dropbtn.error{border:1px solid var(--nylas-error)}.dropbtn:hover,.dropbtn:active{border:1px solid var(--nylas-primary)}.dropbtn:active{outline:2px solid var(--nylas-primary)}.dropbtn:disabled{cursor:not-allowed;background:var(--nylas-base-100)}.dropbtn span.open{transform:rotate(90deg)}.dropbtn span.closed{transform:rotate(270deg)}.dropdown-content{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:72px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.dropdown-content ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.dropdown-content ul li{padding:16px, 12px, 16px, 12px;color:var(--nylas-base-900);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:left;cursor:pointer}.dropdown-content ul li:hover,.dropdown-content ul li:focus{background-color:var(--nylas-base-100)}.dropdown-content ul li label{display:flex;align-items:center;gap:0.5rem}.dropdown-content ul li label input{margin:0}.dropdown-content ul li.disabled{cursor:not-allowed;opacity:0.5}.dropdown-content ul li.disabled label{cursor:not-allowed}.dropdown-content ul li.disabled label input{cursor:not-allowed}.selected-options{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0;margin-top:0.25rem}.selected-options .selected-option{display:flex;align-items:center;gap:0.5rem;padding:4px 8px;border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-100);color:var(--nylas-base-800);font-size:16px;font-weight:500;line-height:1.5rem;letter-spacing:0.5px}.selected-options .selected-option button{background:transparent;border:none;cursor:pointer;padding:0}.selected-options .selected-option button:hover{color:var(--nylas-primary)}.selected-options .selected-option button:disabled{cursor:not-allowed;background:var(--nylas-base-100)}';const t=class{constructor(s){e(this,s);this.selectedOptionsChanged=o(this,"selectedOptionsChanged",7);this.options=[];this.error="";this.required=false;this.readOnly=false;this.multipleOptionsSelectedLabel="Multiple options selected";this.selectAtLeastOneOptionLabel="Please select at least one option";this.errorMessage="Please select at least one option.";this.availableOptions=this.options;this.isOpen=false;this.ariaActivedescendant="";this.shouldFocusFirstOption=false}areOptionsEqual(e,o){if(e.length!==o.length)return false;const s=[...e].sort(((e,o)=>e.label.localeCompare(o.label)||e.value.localeCompare(o.value)));const a=[...o].sort(((e,o)=>e.label.localeCompare(o.label)||e.value.localeCompare(o.value)));return s.every(((e,o)=>{const s=a[o];return e.label===s.label&&e.value===s.value}))}optionsChangedHandler(e){if(!this.areOptionsEqual(e,this.availableOptions)){this.availableOptions=e}}themeConfigChangedHandler(e,o){this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[o,s]of Object.entries(e)){this.el.style.setProperty(`${o}`,s)}}}componentWillLoad(){r("multi-select-dropdown","componentWillLoad");this.applyThemeConfig(this.themeConfig)}componentDidLoad(){r("multi-select-dropdown","componentDidLoad");if(this.options){this.availableOptions=this.options}this.applyThemeConfig(this.themeConfig)}componentDidRender(){r("multi-select-dropdown","componentDidRender");if(this.isOpen&&this.shouldFocusFirstOption){this.ariaActivedescendant=this.availableOptions[0]?.value;this.focusOption(0);this.shouldFocusFirstOption=false}}handleOutsideClick(e){const o=e.composedPath();const s=o.includes(this.el);if(!s&&this.isOpen){this.isOpen=false}}handleBookingFormSubmitted(e){const o=this.availableOptions.filter((e=>e.selected)).map((e=>e.value));if(this.required&&(!o||o.length<=0)){this.error=this.errorMessage||this.selectAtLeastOneOptionLabel}if(this.error){e.preventDefault()}}selectOption(e){this.availableOptions=this.availableOptions.map((o=>{if(o.value===e.value){o.selected=e.selected?false:true;if(o.selected){this.error=""}}return o}));const o=this.availableOptions.filter((e=>e.selected)).map((e=>e.value));this.selectedOptionsChanged.emit({value:o,name:this.name})}toggleDropdown(){this.isOpen=!this.isOpen;if(this.isOpen){this.shouldFocusFirstOption=true}else{this.ariaActivedescendant=""}}async openDropdown(){this.isOpen=true;this.shouldFocusFirstOption=true}async closeDropdown(){this.isOpen=false;this.ariaActivedescendant=""}handleSelectButtonKeyDown(e){switch(e.key){case"ArrowDown":case"Enter":e.preventDefault();if(!this.isOpen){this.toggleDropdown()}break;case"Escape":this.isOpen=false;break}}handleListboxKeydown(e){const o=this.availableOptions;const s=o.findIndex((e=>e.value===this.ariaActivedescendant));switch(e.key){case"ArrowDown":case"Tab":{if(!e.shiftKey){e.preventDefault();const a=s+1<o.length?s+1:0;this.ariaActivedescendant=o[a].value;this.focusOption(a)}else{e.preventDefault();const a=s-1>=0?s-1:o.length-1;this.ariaActivedescendant=o[a].value;this.focusOption(a)}break}case"ArrowUp":{e.preventDefault();const a=s-1>=0?s-1:o.length-1;this.ariaActivedescendant=o[a].value;this.focusOption(a);break}case"Enter":{e.preventDefault();if(this.ariaActivedescendant){this.selectOption(o[s])}break}case"Escape":{this.isOpen=false;break}}}focusOption(e){const o=this.availableOptions[e];if(!o)return;const s=o.value;const a=this.el.shadowRoot?.getElementById(s);if(a){a.focus();a.scrollIntoView({behavior:"smooth",block:"nearest"})}}getSelectedOptions(){return this.availableOptions.filter((e=>e.selected))}renderOption(e){return s("li",{key:e.value,id:e.value,role:"option",tabindex:"0","aria-selected":e.selected?"true":"false",onClick:o=>{o.stopImmediatePropagation();if(!e?.disabled){this.selectOption(e)}},class:{selected:!!e.selected,disabled:!!e.disabled}},s("label",{htmlFor:e.value},s("input",{"aria-hidden":"true",id:e.value,type:"checkbox",checked:e.selected,disabled:!!e?.disabled}),s("span",null,e.label)))}render(){return s(a,{key:"26d919d6073162558a2312b5132c856b63d2f4e8"},s("div",{key:"9e83cda81caa4a4564573effc63dd5daf346c7fe",class:"dropdown",part:"msd_dropdown"},s("label",{key:"4de252b10909bab1bdbbc8194783d0d226c0210b",class:"dropdown-label",part:"msd_dropdown-label"},s("p",{key:"a197cae2db086e44d3649e8ecb4286e031aa3239"},s("span",{key:"28ddaa860aa6c7604cf86776d1867c2ffae6db02",class:"label"},this.label),this.required&&s("span",{key:"1a67227a29920541a9f8c0078249d8cbd69e278d",class:"required"},"*")),s("slot",{key:"10f2724a2dedad3f54d3312ed53b6c24b61e7189",name:"label-icon","aria-hidden":"true"})),s("button",{key:"cd89cf2cbcc3314993e4d25dad701a3e87a7d6c2",name:this.name,part:`msd_dropdown-button ${this.error?"msd_dropdown-button--error":""}`,class:{dropbtn:true,open:this.isOpen,error:!!this.error},onClick:()=>this.toggleDropdown(),disabled:this.readOnly,title:this.readOnly?"read-only field":undefined,"aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false","aria-label":this.name,onKeyDown:e=>this.handleSelectButtonKeyDown(e)},s("slot",{key:"a2ee982f0535ca5a0180b7976d8676796ebf44ec",name:"select-icon","aria-hidden":"true"}),s("span",{key:"a0cf28984f31857e5e421363d622ea55620fb33b",class:"selected-option",part:"msd_dropdown-button-selected-label"},this.getSelectedOptions().length>1?this.multipleOptionsSelectedLabel:this.availableOptions.filter((e=>e.selected))[0]?.label??this.selectAtLeastOneOptionLabel??this.availableOptions[0]?.label),s("span",{key:"2c069d4c1e714566f8937f606b50ca93c6567d0b",class:this.isOpen?"open":"closed","aria-hidden":"true"},s("chevron-icon",{key:"f3ee4517ffc8011829d14549547930228bcc365b",width:"16",height:"16"}))),this.error?s("span",{class:"error",part:"msd_dropdown_error"},this.error):null,s("div",{key:"721ca8477f1b2938943e833b12fb4aa285b272e4",class:"selected-options"},this.getSelectedOptions().map((e=>s("span",{class:"selected-option"},e.label,s("button",{disabled:this.readOnly||!!e?.disabled,key:e.label,onClick:()=>this.selectOption(e)},s("close-icon",null)))))),this.isOpen?s("div",{class:"dropdown-content",part:"msd_dropdown-content"},s("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-multiselectable":true,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.availableOptions.map((e=>this.renderOption(e))))):null))}get el(){return n(this)}static get watchers(){return{options:["optionsChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};t.style=l;export{t as multi_select_dropdown};
2
- //# sourceMappingURL=p-fd6a12bd.entry.js.map
1
+ import{r as e,c as o,h as s,H as a,a as n}from"./p-0EQQA0nE.js";import{b as r}from"./p-qPYSsMs1.js";const l=':host{display:block;width:inherit;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.dropdown{display:inline-block;width:100%;position:relative}.dropdown .dropdown-label{display:flex;align-items:center;gap:0.25rem;color:var(--nylas-base-800)}.dropdown .dropdown-label p{margin:0}.dropdown .dropdown-label span.required{color:var(--nylas-error);padding:0 0.25rem}.dropdown span.error{color:var(--nylas-error);font-size:14px}.dropbtn{width:inherit;height:48px;color:var(--nylas-base-900);padding:0.5rem;font-size:16px;cursor:pointer;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.dropbtn.focus{background:var(--nylas-base-0)}.dropbtn.error{border:1px solid var(--nylas-error)}.dropbtn:hover,.dropbtn:active{border:1px solid var(--nylas-primary)}.dropbtn:active{outline:2px solid var(--nylas-primary)}.dropbtn:disabled{cursor:not-allowed;background:var(--nylas-base-100)}.dropbtn span.open{transform:rotate(90deg)}.dropbtn span.closed{transform:rotate(270deg)}.dropdown-content{display:block;margin-top:0.5rem;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:72px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}.dropdown-content ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px}.dropdown-content ul li{padding:16px, 12px, 16px, 12px;color:var(--nylas-base-900);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:left;cursor:pointer}.dropdown-content ul li:hover,.dropdown-content ul li:focus{background-color:var(--nylas-base-100)}.dropdown-content ul li label{display:flex;align-items:center;gap:0.5rem}.dropdown-content ul li label input{margin:0}.dropdown-content ul li.disabled{cursor:not-allowed;opacity:0.5}.dropdown-content ul li.disabled label{cursor:not-allowed}.dropdown-content ul li.disabled label input{cursor:not-allowed}.selected-options{display:flex;flex-wrap:wrap;gap:0.5rem;padding:0.5rem 0;margin-top:0.25rem}.selected-options .selected-option{display:flex;align-items:center;gap:0.5rem;padding:4px 8px;border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-100);color:var(--nylas-base-800);font-size:16px;font-weight:500;line-height:1.5rem;letter-spacing:0.5px}.selected-options .selected-option button{background:transparent;border:none;cursor:pointer;padding:0}.selected-options .selected-option button:hover{color:var(--nylas-primary)}.selected-options .selected-option button:disabled{cursor:not-allowed;background:var(--nylas-base-100)}';const t=class{constructor(s){e(this,s);this.selectedOptionsChanged=o(this,"selectedOptionsChanged",7);this.options=[];this.error="";this.required=false;this.readOnly=false;this.multipleOptionsSelectedLabel="Multiple options selected";this.selectAtLeastOneOptionLabel="Please select at least one option";this.errorMessage="Please select at least one option.";this.availableOptions=this.options;this.isOpen=false;this.ariaActivedescendant="";this.shouldFocusFirstOption=false}areOptionsEqual(e,o){if(e.length!==o.length)return false;const s=[...e].sort(((e,o)=>e.label.localeCompare(o.label)||e.value.localeCompare(o.value)));const a=[...o].sort(((e,o)=>e.label.localeCompare(o.label)||e.value.localeCompare(o.value)));return s.every(((e,o)=>{const s=a[o];return e.label===s.label&&e.value===s.value}))}optionsChangedHandler(e){if(!this.areOptionsEqual(e,this.availableOptions)){this.availableOptions=e}}themeConfigChangedHandler(e,o){this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[o,s]of Object.entries(e)){this.el.style.setProperty(`${o}`,s)}}}componentWillLoad(){r("multi-select-dropdown","componentWillLoad");this.applyThemeConfig(this.themeConfig)}componentDidLoad(){r("multi-select-dropdown","componentDidLoad");if(this.options){this.availableOptions=this.options}this.applyThemeConfig(this.themeConfig)}componentDidRender(){r("multi-select-dropdown","componentDidRender");if(this.isOpen&&this.shouldFocusFirstOption){this.ariaActivedescendant=this.availableOptions[0]?.value;this.focusOption(0);this.shouldFocusFirstOption=false}}handleOutsideClick(e){const o=e.composedPath();const s=o.includes(this.el);if(!s&&this.isOpen){this.isOpen=false}}handleBookingFormSubmitted(e){const o=this.availableOptions.filter((e=>e.selected)).map((e=>e.value));if(this.required&&(!o||o.length<=0)){this.error=this.errorMessage||this.selectAtLeastOneOptionLabel}if(this.error){e.preventDefault()}}selectOption(e){this.availableOptions=this.availableOptions.map((o=>{if(o.value===e.value){o.selected=e.selected?false:true;if(o.selected){this.error=""}}return o}));const o=this.availableOptions.filter((e=>e.selected)).map((e=>e.value));this.selectedOptionsChanged.emit({value:o,name:this.name})}toggleDropdown(){this.isOpen=!this.isOpen;if(this.isOpen){this.shouldFocusFirstOption=true}else{this.ariaActivedescendant=""}}async openDropdown(){this.isOpen=true;this.shouldFocusFirstOption=true}async closeDropdown(){this.isOpen=false;this.ariaActivedescendant=""}handleSelectButtonKeyDown(e){switch(e.key){case"ArrowDown":case"Enter":e.preventDefault();if(!this.isOpen){this.toggleDropdown()}break;case"Escape":this.isOpen=false;break}}handleListboxKeydown(e){const o=this.availableOptions;const s=o.findIndex((e=>e.value===this.ariaActivedescendant));switch(e.key){case"ArrowDown":case"Tab":{if(!e.shiftKey){e.preventDefault();const a=s+1<o.length?s+1:0;this.ariaActivedescendant=o[a].value;this.focusOption(a)}else{e.preventDefault();const a=s-1>=0?s-1:o.length-1;this.ariaActivedescendant=o[a].value;this.focusOption(a)}break}case"ArrowUp":{e.preventDefault();const a=s-1>=0?s-1:o.length-1;this.ariaActivedescendant=o[a].value;this.focusOption(a);break}case"Enter":{e.preventDefault();if(this.ariaActivedescendant){this.selectOption(o[s])}break}case"Escape":{this.isOpen=false;break}}}focusOption(e){const o=this.availableOptions[e];if(!o)return;const s=o.value;const a=this.el.shadowRoot?.getElementById(s);if(a){a.focus();a.scrollIntoView({behavior:"smooth",block:"nearest"})}}getSelectedOptions(){return this.availableOptions.filter((e=>e.selected))}renderOption(e){return s("li",{key:e.value,id:e.value,role:"option",tabindex:"0","aria-selected":e.selected?"true":"false",onClick:o=>{o.stopImmediatePropagation();if(!e?.disabled){this.selectOption(e)}},class:{selected:!!e.selected,disabled:!!e.disabled}},s("label",{htmlFor:e.value},s("input",{"aria-hidden":"true",id:e.value,type:"checkbox",checked:e.selected,disabled:!!e?.disabled}),s("span",null,e.label)))}render(){return s(a,{key:"26d919d6073162558a2312b5132c856b63d2f4e8"},s("div",{key:"9e83cda81caa4a4564573effc63dd5daf346c7fe",class:"dropdown",part:"msd_dropdown"},s("label",{key:"4de252b10909bab1bdbbc8194783d0d226c0210b",class:"dropdown-label",part:"msd_dropdown-label"},s("p",{key:"a197cae2db086e44d3649e8ecb4286e031aa3239"},s("span",{key:"28ddaa860aa6c7604cf86776d1867c2ffae6db02",class:"label"},this.label),this.required&&s("span",{key:"1a67227a29920541a9f8c0078249d8cbd69e278d",class:"required"},"*")),s("slot",{key:"10f2724a2dedad3f54d3312ed53b6c24b61e7189",name:"label-icon","aria-hidden":"true"})),s("button",{key:"cd89cf2cbcc3314993e4d25dad701a3e87a7d6c2",name:this.name,part:`msd_dropdown-button ${this.error?"msd_dropdown-button--error":""}`,class:{dropbtn:true,open:this.isOpen,error:!!this.error},onClick:()=>this.toggleDropdown(),disabled:this.readOnly,title:this.readOnly?"read-only field":undefined,"aria-haspopup":"listbox","aria-expanded":this.isOpen?"true":"false","aria-label":this.name,onKeyDown:e=>this.handleSelectButtonKeyDown(e)},s("slot",{key:"a2ee982f0535ca5a0180b7976d8676796ebf44ec",name:"select-icon","aria-hidden":"true"}),s("span",{key:"a0cf28984f31857e5e421363d622ea55620fb33b",class:"selected-option",part:"msd_dropdown-button-selected-label"},this.getSelectedOptions().length>1?this.multipleOptionsSelectedLabel:this.availableOptions.filter((e=>e.selected))[0]?.label??this.selectAtLeastOneOptionLabel??this.availableOptions[0]?.label),s("span",{key:"2c069d4c1e714566f8937f606b50ca93c6567d0b",class:this.isOpen?"open":"closed","aria-hidden":"true"},s("chevron-icon",{key:"f3ee4517ffc8011829d14549547930228bcc365b",width:"16",height:"16"}))),this.error?s("span",{class:"error",part:"msd_dropdown_error"},this.error):null,s("div",{key:"721ca8477f1b2938943e833b12fb4aa285b272e4",class:"selected-options"},this.getSelectedOptions().map((e=>s("span",{class:"selected-option"},e.label,s("button",{disabled:this.readOnly||!!e?.disabled,key:e.label,onClick:()=>this.selectOption(e)},s("close-icon",null)))))),this.isOpen?s("div",{class:"dropdown-content",part:"msd_dropdown-content"},s("ul",{tabindex:"-1",role:"listbox","aria-label":this.name,"aria-multiselectable":true,"aria-activedescendant":this.ariaActivedescendant,onKeyDown:e=>this.handleListboxKeydown(e)},this.availableOptions.map((e=>this.renderOption(e))))):null))}get el(){return n(this)}static get watchers(){return{options:["optionsChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};t.style=l;export{t as multi_select_dropdown};
2
+ //# sourceMappingURL=p-c7117440.entry.js.map
@@ -1,2 +1,2 @@
1
- import{b as e,J as t}from"./p-Hhz0ojc7.js";import{a as n}from"./p-0EQQA0nE.js";function r(e,t,n="registerComponent"){return new CustomEvent(n,{bubbles:true,composed:true,detail:t})}function o(e,t,n="unregisterComponent"){return new CustomEvent(n,{bubbles:true,composed:true,detail:t})}function s(s){return(c,i)=>{const u=s.name;e(`[${u}] Registering component ${u} being called on ${i}`);const l=c.componentWillLoad;if(!l){t(`[${u}] componentWillLoad lifecycle method in ${u} missing. Required for RegisterComponent decorator.`);return}const a=c.connectedCallback;if(!a){t(`[${u}] connectedCallback lifecycle method in ${u} missing. Required for RegisterComponent decorator.`);return}const p=c.disconnectedCallback;if(!p){t(`[${u}] disconnectedCallback lifecycle method in ${u} missing. Required for RegisterComponent decorator.`);return}if(s.storeToProps&&s.stateToProps){const e=Array.from(s.storeToProps.values());const n=Array.from(s.stateToProps.values());const r=e.filter((e=>n.includes(e)));if(r.length>0){t(`[${u}] Overlapping prop keys detected in ${u} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${r.join(", ")}`);return}}const m=new Map;if(s.eventToProps){Object.keys(s.eventToProps).forEach((e=>{m.set(e,s.eventToProps?.[e])}))}c.connectedCallback=function(){e(`[~${u}] connectedCallback called`);const t=a?.call(this);const r=n(this);if(r.dataset.nylasId){return t}Object.defineProperty(r,"registerNylasComponent",{get(){return true},enumerable:true});Object.defineProperty(r,"stateToProps",{get(){return s.stateToProps},enumerable:true});Object.defineProperty(r,"getStoresToProp",{get(){return s.getStoresToProp},enumerable:true});Object.defineProperty(r,"storeToProps",{get(){return s.storeToProps},enumerable:true});Object.defineProperty(r,"eventToProps",{get(){return m},enumerable:true});Object.defineProperty(r,"authToProp",{get(){return s.authToProp},enumerable:true});Object.defineProperty(r,"connectorToProp",{get(){return s.connectorToProp},enumerable:true});Object.defineProperty(r,"localPropsToProp",{get(){return s.localPropsToProp},enumerable:true});return t};if(s.fireRegisterEvent){c.componentWillLoad=function(){const t=l?.call(this);const o=n(this);const i={element:o,...s,eventToProps:m};const a=r(c,i,s.registrationEventName);if(o.dispatchEvent(a)){e(`[${u}] Component ${u} successfully fired registration event`)}return t};c.disconnectedCallback=function(){const t=p?.call(this);const r=n(this);const i={element:r,...s,eventToProps:m};const l=o(c,i,s.unregistrationEventName);if(r.dispatchEvent(l)){e(`[${u}] Component ${u} successfully fired unregistration event`)}return t}}}}export{s as R};
2
- //# sourceMappingURL=p-sMJwFhkX.js.map
1
+ import{b as e,J as t}from"./p-qPYSsMs1.js";import{a as n}from"./p-0EQQA0nE.js";function r(e,t,n="registerComponent"){return new CustomEvent(n,{bubbles:true,composed:true,detail:t})}function o(e,t,n="unregisterComponent"){return new CustomEvent(n,{bubbles:true,composed:true,detail:t})}function s(s){return(c,i)=>{const u=s.name;e(`[${u}] Registering component ${u} being called on ${i}`);const l=c.componentWillLoad;if(!l){t(`[${u}] componentWillLoad lifecycle method in ${u} missing. Required for RegisterComponent decorator.`);return}const a=c.connectedCallback;if(!a){t(`[${u}] connectedCallback lifecycle method in ${u} missing. Required for RegisterComponent decorator.`);return}const p=c.disconnectedCallback;if(!p){t(`[${u}] disconnectedCallback lifecycle method in ${u} missing. Required for RegisterComponent decorator.`);return}if(s.storeToProps&&s.stateToProps){const e=Array.from(s.storeToProps.values());const n=Array.from(s.stateToProps.values());const r=e.filter((e=>n.includes(e)));if(r.length>0){t(`[${u}] Overlapping prop keys detected in ${u} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${r.join(", ")}`);return}}const m=new Map;if(s.eventToProps){Object.keys(s.eventToProps).forEach((e=>{m.set(e,s.eventToProps?.[e])}))}c.connectedCallback=function(){e(`[~${u}] connectedCallback called`);const t=a?.call(this);const r=n(this);if(r.dataset.nylasId){return t}Object.defineProperty(r,"registerNylasComponent",{get(){return true},enumerable:true});Object.defineProperty(r,"stateToProps",{get(){return s.stateToProps},enumerable:true});Object.defineProperty(r,"getStoresToProp",{get(){return s.getStoresToProp},enumerable:true});Object.defineProperty(r,"storeToProps",{get(){return s.storeToProps},enumerable:true});Object.defineProperty(r,"eventToProps",{get(){return m},enumerable:true});Object.defineProperty(r,"authToProp",{get(){return s.authToProp},enumerable:true});Object.defineProperty(r,"connectorToProp",{get(){return s.connectorToProp},enumerable:true});Object.defineProperty(r,"localPropsToProp",{get(){return s.localPropsToProp},enumerable:true});return t};if(s.fireRegisterEvent){c.componentWillLoad=function(){const t=l?.call(this);const o=n(this);const i={element:o,...s,eventToProps:m};const a=r(c,i,s.registrationEventName);if(o.dispatchEvent(a)){e(`[${u}] Component ${u} successfully fired registration event`)}return t};c.disconnectedCallback=function(){const t=p?.call(this);const r=n(this);const i={element:r,...s,eventToProps:m};const l=o(c,i,s.unregistrationEventName);if(r.dispatchEvent(l)){e(`[${u}] Component ${u} successfully fired unregistration event`)}return t}}}}export{s as R};
2
+ //# sourceMappingURL=p-cIC9nmxa.js.map