@nylas/web-elements 2.5.4 → 2.5.6
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.
- package/dist/cdn/input-color-picker/input-color-picker.es.js +3516 -3480
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +6334 -6297
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +7610 -7554
- package/dist/cjs/{abstract-provider-CH5yXWmY.js → abstract-provider-f3JKAnoC.js} +4 -4
- package/dist/cjs/abstract-provider-f3JKAnoC.js.map +1 -0
- package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js +2 -2
- package/dist/cjs/checkbox-group_4.cjs.entry.js +3 -3
- package/dist/cjs/checkmark-icon_14.cjs.entry.js +2 -2
- package/dist/cjs/{customParseFormat-OQPjPVhj.js → customParseFormat-5f0XwO0N.js} +3 -3
- package/dist/cjs/{customParseFormat-OQPjPVhj.js.map → customParseFormat-5f0XwO0N.js.map} +1 -1
- package/dist/cjs/globe-icon_3.cjs.entry.js +2 -2
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +3 -3
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/input-component.cjs.entry.js +1 -1
- package/dist/cjs/input-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/input-image-url_2.cjs.entry.js +2 -2
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/{nylas-api-request-Cva9mkSo.js → nylas-api-request-Cbo-19Nf.js} +3 -3
- package/dist/cjs/{nylas-api-request-Cva9mkSo.js.map → nylas-api-request-Cbo-19Nf.js.map} +1 -1
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js +18 -13
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +2 -2
- package/dist/cjs/nylas-notification_2.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +4 -4
- package/dist/cjs/nylas-scheduling.cjs.entry.js +29 -15
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.entry.cjs.js.map +1 -1
- package/dist/cjs/{register-component-Cu3tKKKD.js → register-component-3z1jbXx-.js} +3 -3
- package/dist/cjs/{register-component-Cu3tKKKD.js.map → register-component-3z1jbXx-.js.map} +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js +1 -1
- package/dist/cjs/{utils-DMqnHqF8.js → utils-C5qGWVDr.js} +68 -8
- package/dist/cjs/{utils-DMqnHqF8.js.map → utils-C5qGWVDr.js.map} +1 -1
- package/dist/cjs/{version-COw2dh2E.js → version-CJ5046pS.js} +3 -3
- package/dist/cjs/{version-COw2dh2E.js.map → version-CJ5046pS.js.map} +1 -1
- package/dist/collection/common/abstract-provider.js +1 -1
- package/dist/collection/common/abstract-provider.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +6 -2
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.js +11 -10
- package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +29 -11
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +4 -3
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +5 -3
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/stores/scheduler-store.js +3 -2
- package/dist/collection/stores/scheduler-store.js.map +1 -1
- package/dist/collection/utils/utils.js +11 -6
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/collection/version.js +1 -1
- package/dist/collection/version.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/input-color-picker.js +1 -1
- package/dist/components/input-component.js +1 -1
- package/dist/components/input-image-url.js +1 -1
- package/dist/components/multi-select-dropdown.js +1 -1
- package/dist/components/nylas-additional-participants.js +1 -1
- package/dist/components/nylas-availability-picker.js +1 -1
- package/dist/components/nylas-booked-event-card.js +1 -1
- package/dist/components/nylas-booking-calendar-picker.js +1 -1
- package/dist/components/nylas-booking-confirmation-redirect.js +1 -1
- package/dist/components/nylas-booking-confirmation-type.js +1 -1
- package/dist/components/nylas-booking-form-config.js +1 -1
- package/dist/components/nylas-booking-form.js +1 -1
- package/dist/components/nylas-buffer-time.js +1 -1
- package/dist/components/nylas-calendar-picker.js +1 -1
- package/dist/components/nylas-cancel-booking-form.js +1 -1
- package/dist/components/nylas-cancellation-policy.js +1 -1
- package/dist/components/nylas-cancelled-event-card.js +1 -1
- package/dist/components/nylas-confirmation-email.js +1 -1
- package/dist/components/nylas-confirmed-event-card.js +1 -1
- package/dist/components/nylas-connected-calendars.js +1 -1
- package/dist/components/nylas-custom-booking-flow.js +1 -1
- package/dist/components/nylas-custom-event-slug.js +1 -1
- package/dist/components/nylas-customize-booking-settings.js +1 -1
- package/dist/components/nylas-date-component.js +1 -1
- package/dist/components/nylas-date-picker.js +1 -1
- package/dist/components/nylas-disable-emails.js +1 -1
- package/dist/components/nylas-editor-tabs-group.js +1 -1
- package/dist/components/nylas-editor-tabs.js +1 -1
- package/dist/components/nylas-event-calendar.js +1 -1
- package/dist/components/nylas-event-capacity.js +1 -1
- package/dist/components/nylas-event-description.js +1 -1
- package/dist/components/nylas-event-duration.js +1 -1
- package/dist/components/nylas-event-info.js +1 -1
- package/dist/components/nylas-event-limits.js +1 -1
- package/dist/components/nylas-event-location.js +1 -1
- package/dist/components/nylas-event-timeslot.js +1 -1
- package/dist/components/nylas-event-title.js +1 -1
- package/dist/components/nylas-feedback-form.js +1 -1
- package/dist/components/nylas-form-card.js +1 -1
- package/dist/components/nylas-limit-future-bookings.js +1 -1
- package/dist/components/nylas-list-configurations.js +1 -1
- package/dist/components/nylas-locale-switch.js +1 -1
- package/dist/components/nylas-min-booking-notice.js +1 -1
- package/dist/components/nylas-min-cancellation-notice.js +1 -1
- package/dist/components/nylas-notetaker-config.js +1 -1
- package/dist/components/nylas-notification.js +1 -1
- package/dist/components/nylas-only-specific-time-availability.js +1 -1
- package/dist/components/nylas-organizer-confirmation-card.js +1 -1
- package/dist/components/nylas-page-name.js +1 -1
- package/dist/components/nylas-page-styling.js +1 -1
- package/dist/components/nylas-participant-booking-calendars.js +1 -1
- package/dist/components/nylas-participants-custom-availability.js +1 -1
- package/dist/components/nylas-reminder-emails.js +1 -1
- package/dist/components/nylas-reminder-time.js +1 -1
- package/dist/components/nylas-scheduler-editor.js +58 -58
- package/dist/components/nylas-scheduling-method.js +1 -1
- package/dist/components/nylas-scheduling.js +46 -32
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-select-event-type.js +1 -1
- package/dist/components/nylas-selected-event-card.js +1 -1
- package/dist/components/nylas-specific-time-availability-picker.js +1 -1
- package/dist/components/nylas-time-window-picker.js +1 -1
- package/dist/components/nylas-timeslot-interval.js +1 -1
- package/dist/components/nylas-timeslot-picker.js +1 -1
- package/dist/components/{p-DyFJlXYY.js → p-5ZYkWuBH.js} +5 -5
- package/dist/components/{p-DyFJlXYY.js.map → p-5ZYkWuBH.js.map} +1 -1
- package/dist/components/{p-D2Tc9Auy.js → p-6buYtCek.js} +5 -5
- package/dist/components/{p-D2Tc9Auy.js.map → p-6buYtCek.js.map} +1 -1
- package/dist/components/{p-aA5xBZ4y.js → p-8jVEXvkn.js} +6 -6
- package/dist/components/{p-aA5xBZ4y.js.map → p-8jVEXvkn.js.map} +1 -1
- package/dist/components/{p-Czz4qXvH.js → p-B0eXe4fu.js} +9 -9
- package/dist/components/{p-Czz4qXvH.js.map → p-B0eXe4fu.js.map} +1 -1
- package/dist/components/{p-BOo4c1sq.js → p-B54mNgSc.js} +6 -6
- package/dist/components/{p-BOo4c1sq.js.map → p-B54mNgSc.js.map} +1 -1
- package/dist/components/{p-0CHYtuce.js → p-BCdaMIEZ.js} +6 -6
- package/dist/components/{p-0CHYtuce.js.map → p-BCdaMIEZ.js.map} +1 -1
- package/dist/components/{p-DHDBkOA6.js → p-BIbAx1y2.js} +3 -3
- package/dist/components/{p-DHDBkOA6.js.map → p-BIbAx1y2.js.map} +1 -1
- package/dist/components/{p-D2Zt-T9i.js → p-BNfHz7A2.js} +6 -6
- package/dist/components/{p-D2Zt-T9i.js.map → p-BNfHz7A2.js.map} +1 -1
- package/dist/components/{p-CA-CDvvH.js → p-B_HtmTBC.js} +6 -6
- package/dist/components/{p-CA-CDvvH.js.map → p-B_HtmTBC.js.map} +1 -1
- package/dist/components/{p-CaPXccMa.js → p-Begx19Z9.js} +3 -3
- package/dist/components/{p-CaPXccMa.js.map → p-Begx19Z9.js.map} +1 -1
- package/dist/components/{p-DIYyA3tv.js → p-BhY18Huj.js} +5 -5
- package/dist/components/{p-DIYyA3tv.js.map → p-BhY18Huj.js.map} +1 -1
- package/dist/components/{p-CFk78OEk.js → p-BjxQTsOy.js} +56 -2
- package/dist/components/{p-CFk78OEk.js.map → p-BjxQTsOy.js.map} +1 -1
- package/dist/components/{p-DfJPUV12.js → p-BpDfyvY4.js} +3 -3
- package/dist/components/{p-DfJPUV12.js.map → p-BpDfyvY4.js.map} +1 -1
- package/dist/components/{p-B2qD9GvB.js → p-BqcSDTPa.js} +6 -6
- package/dist/components/{p-B2qD9GvB.js.map → p-BqcSDTPa.js.map} +1 -1
- package/dist/components/{p-DWH9lxNw.js → p-ByIpuB6X.js} +6 -6
- package/dist/components/{p-DWH9lxNw.js.map → p-ByIpuB6X.js.map} +1 -1
- package/dist/components/{p-DDnT7nCe.js → p-Bye3Di82.js} +3 -3
- package/dist/components/{p-DDnT7nCe.js.map → p-Bye3Di82.js.map} +1 -1
- package/dist/components/{p-CugpjY9p.js → p-Bzhy3cc5.js} +3 -3
- package/dist/components/{p-CugpjY9p.js.map → p-Bzhy3cc5.js.map} +1 -1
- package/dist/components/{p-S6AbMZpH.js → p-C1IR0LII.js} +8 -8
- package/dist/components/{p-S6AbMZpH.js.map → p-C1IR0LII.js.map} +1 -1
- package/dist/components/{p-Bd0cKEr-.js → p-C8K-8dJ0.js} +52 -52
- package/dist/components/{p-Bd0cKEr-.js.map → p-C8K-8dJ0.js.map} +1 -1
- package/dist/components/{p-sjyMT8di.js → p-CABFxRgm.js} +5 -5
- package/dist/components/{p-sjyMT8di.js.map → p-CABFxRgm.js.map} +1 -1
- package/dist/components/{p-BkEoeb5s.js → p-CHMf20sF.js} +5 -5
- package/dist/components/{p-BkEoeb5s.js.map → p-CHMf20sF.js.map} +1 -1
- package/dist/components/{p--MwFi8VI.js → p-CIiKlhjq.js} +5 -5
- package/dist/components/{p--MwFi8VI.js.map → p-CIiKlhjq.js.map} +1 -1
- package/dist/components/{p-B-fT9puv.js → p-CKPYi9FX.js} +4 -4
- package/dist/components/{p-B-fT9puv.js.map → p-CKPYi9FX.js.map} +1 -1
- package/dist/components/{p-D0h0sso6.js → p-CLMQXVmv.js} +5 -5
- package/dist/components/{p-D0h0sso6.js.map → p-CLMQXVmv.js.map} +1 -1
- package/dist/components/{p-BB1ko_uE.js → p-CMF0O-Fp.js} +7 -7
- package/dist/components/{p-BB1ko_uE.js.map → p-CMF0O-Fp.js.map} +1 -1
- package/dist/components/{p-CCA4ZVjd.js → p-CSqqWusO.js} +10 -7
- package/dist/components/p-CSqqWusO.js.map +1 -0
- package/dist/components/{p-OCI2J8gy.js → p-CTDkYArQ.js} +9 -9
- package/dist/components/{p-OCI2J8gy.js.map → p-CTDkYArQ.js.map} +1 -1
- package/dist/components/{p-Btoob5w4.js → p-CUL-OCAu.js} +6 -6
- package/dist/components/{p-Btoob5w4.js.map → p-CUL-OCAu.js.map} +1 -1
- package/dist/components/{p-CNep2hQ8.js → p-CXqwQnQF.js} +5 -5
- package/dist/components/{p-CNep2hQ8.js.map → p-CXqwQnQF.js.map} +1 -1
- package/dist/components/{p-BJFo54WS.js → p-CXxRydPc.js} +5 -5
- package/dist/components/{p-BJFo54WS.js.map → p-CXxRydPc.js.map} +1 -1
- package/dist/components/{p-D_ge-nYu.js → p-CYy1pa_3.js} +5 -5
- package/dist/components/{p-D_ge-nYu.js.map → p-CYy1pa_3.js.map} +1 -1
- package/dist/components/{p-2Mq6VEeK.js → p-ClGGIEMi.js} +6 -6
- package/dist/components/{p-2Mq6VEeK.js.map → p-ClGGIEMi.js.map} +1 -1
- package/dist/components/{p-DAnwHL85.js → p-CpMfG8zc.js} +18 -18
- package/dist/components/{p-DAnwHL85.js.map → p-CpMfG8zc.js.map} +1 -1
- package/dist/components/{p-y6oP8jW5.js → p-CrXOqjIw.js} +8 -7
- package/dist/components/p-CrXOqjIw.js.map +1 -0
- package/dist/components/{p-ejCgVZ9o.js → p-CsyEOZaq.js} +3 -3
- package/dist/components/{p-ejCgVZ9o.js.map → p-CsyEOZaq.js.map} +1 -1
- package/dist/components/{p-DjXPd1-l.js → p-D-3RU2oS.js} +5 -5
- package/dist/components/{p-DjXPd1-l.js.map → p-D-3RU2oS.js.map} +1 -1
- package/dist/components/{p-DxIVEThE.js → p-D19TzH-m.js} +6 -6
- package/dist/components/{p-DxIVEThE.js.map → p-D19TzH-m.js.map} +1 -1
- package/dist/components/{p-Cpuo7KDZ.js → p-D1laIpmv.js} +8 -8
- package/dist/components/{p-Cpuo7KDZ.js.map → p-D1laIpmv.js.map} +1 -1
- package/dist/components/{p-B1YSZBvC.js → p-D4C1TKzq.js} +5 -5
- package/dist/components/{p-B1YSZBvC.js.map → p-D4C1TKzq.js.map} +1 -1
- package/dist/components/{p-gDuYV0jU.js → p-D8Gq0LJd.js} +5 -5
- package/dist/components/{p-gDuYV0jU.js.map → p-D8Gq0LJd.js.map} +1 -1
- package/dist/components/{p-D8Qul6Vu.js → p-DBEvFYf0.js} +6 -6
- package/dist/components/{p-D8Qul6Vu.js.map → p-DBEvFYf0.js.map} +1 -1
- package/dist/components/{p-Dz6ZS9T7.js → p-DBwy7Snv.js} +4 -4
- package/dist/components/{p-Dz6ZS9T7.js.map → p-DBwy7Snv.js.map} +1 -1
- package/dist/components/{p-JjXUnTze.js → p-DDjhKQi2.js} +5 -5
- package/dist/components/{p-JjXUnTze.js.map → p-DDjhKQi2.js.map} +1 -1
- package/dist/components/{p-C6AxpIio.js → p-DFSt8wfH.js} +6 -6
- package/dist/components/{p-C6AxpIio.js.map → p-DFSt8wfH.js.map} +1 -1
- package/dist/components/{p-DEtEu7ce.js → p-DPBfMry4.js} +7 -7
- package/dist/components/{p-DEtEu7ce.js.map → p-DPBfMry4.js.map} +1 -1
- package/dist/components/{p-BJPokpdk.js → p-DR_UXNMx.js} +13 -12
- package/dist/components/p-DR_UXNMx.js.map +1 -0
- package/dist/components/{p-Dwqu7m_I.js → p-DRgnghCP.js} +5 -5
- package/dist/components/{p-Dwqu7m_I.js.map → p-DRgnghCP.js.map} +1 -1
- package/dist/components/{p-C7QOS5b4.js → p-D_ZAV9If.js} +7 -7
- package/dist/components/{p-C7QOS5b4.js.map → p-D_ZAV9If.js.map} +1 -1
- package/dist/components/{p-BUEZ6uxG.js → p-Dj4JDZ9W.js} +5 -5
- package/dist/components/{p-BUEZ6uxG.js.map → p-Dj4JDZ9W.js.map} +1 -1
- package/dist/components/{p-C_cuGb0d.js → p-DtHKroeT.js} +5 -5
- package/dist/components/{p-C_cuGb0d.js.map → p-DtHKroeT.js.map} +1 -1
- package/dist/components/{p-BmyZZVvG.js → p-DxYfbkxH.js} +4 -4
- package/dist/components/{p-BmyZZVvG.js.map → p-DxYfbkxH.js.map} +1 -1
- package/dist/components/{p-CoLVT2ul.js → p-Dxtgg1gN.js} +3 -3
- package/dist/components/{p-CoLVT2ul.js.map → p-Dxtgg1gN.js.map} +1 -1
- package/dist/components/{p-a6EsfrCF.js → p-DzkCpPXX.js} +9 -9
- package/dist/components/{p-a6EsfrCF.js.map → p-DzkCpPXX.js.map} +1 -1
- package/dist/components/{p-XoA6r1Sp.js → p-FYD-tPqw.js} +8 -8
- package/dist/components/{p-XoA6r1Sp.js.map → p-FYD-tPqw.js.map} +1 -1
- package/dist/components/{p-C0pHjJtj.js → p-NkqnymW3.js} +9 -9
- package/dist/components/{p-C0pHjJtj.js.map → p-NkqnymW3.js.map} +1 -1
- package/dist/components/{p-Du5g5VR_.js → p-SbxgHNeG.js} +6 -6
- package/dist/components/{p-Du5g5VR_.js.map → p-SbxgHNeG.js.map} +1 -1
- package/dist/components/{p-C7ZVu1Nd.js → p-SjPGcPOD.js} +6 -6
- package/dist/components/{p-C7ZVu1Nd.js.map → p-SjPGcPOD.js.map} +1 -1
- package/dist/components/{p-BvQ13Bty.js → p-U-EdxzfX.js} +4 -4
- package/dist/components/p-U-EdxzfX.js.map +1 -0
- package/dist/components/{p-DTmxwCTa.js → p-Uj5eg-r1.js} +42 -42
- package/dist/components/{p-DTmxwCTa.js.map → p-Uj5eg-r1.js.map} +1 -1
- package/dist/components/{p-elpxqGIV.js → p-cIIaCJPC.js} +3 -3
- package/dist/components/{p-elpxqGIV.js.map → p-cIIaCJPC.js.map} +1 -1
- package/dist/components/{p-BiyP1P0p.js → p-fOr8r1Zc.js} +6 -6
- package/dist/components/{p-BiyP1P0p.js.map → p-fOr8r1Zc.js.map} +1 -1
- package/dist/components/{p-DBECHub0.js → p-irdXl5Fp.js} +6 -6
- package/dist/components/{p-DBECHub0.js.map → p-irdXl5Fp.js.map} +1 -1
- package/dist/components/{p-CdMky78w.js → p-jHq8WTky.js} +3 -3
- package/dist/components/{p-CdMky78w.js.map → p-jHq8WTky.js.map} +1 -1
- package/dist/components/{p-CDVJMEhz.js → p-mElO3u2v.js} +5 -5
- package/dist/components/{p-CDVJMEhz.js.map → p-mElO3u2v.js.map} +1 -1
- package/dist/components/{p-Co55qdnC.js → p-nozjdB6e.js} +5 -5
- package/dist/components/{p-Co55qdnC.js.map → p-nozjdB6e.js.map} +1 -1
- package/dist/components/{p-MiuL2YAY.js → p-sKaBe5Hr.js} +6 -6
- package/dist/components/{p-MiuL2YAY.js.map → p-sKaBe5Hr.js.map} +1 -1
- package/dist/components/{p-BJXl7RY2.js → p-wJcvwuFy.js} +6 -6
- package/dist/components/{p-BJXl7RY2.js.map → p-wJcvwuFy.js.map} +1 -1
- package/dist/components/{p-DBE6FcDx.js → p-xxFdByBn.js} +15 -10
- package/dist/components/p-xxFdByBn.js.map +1 -0
- package/dist/components/{p-BPZfpfqz.js → p-zzOzXpMC.js} +7 -7
- package/dist/components/{p-BPZfpfqz.js.map → p-zzOzXpMC.js.map} +1 -1
- package/dist/components/textarea-component.js +1 -1
- package/dist/components/time-period-selector.js +1 -1
- package/dist/esm/{abstract-provider-KowNUOZM.js → abstract-provider-Dbnlk0Q8.js} +4 -4
- package/dist/esm/abstract-provider-Dbnlk0Q8.js.map +1 -0
- package/dist/esm/calendar-agenda-fill-icon_39.entry.js +2 -2
- package/dist/esm/checkbox-group_4.entry.js +3 -3
- package/dist/esm/checkmark-icon_14.entry.js +2 -2
- package/dist/esm/{customParseFormat-AHaK_YU_.js → customParseFormat-xZjyidlk.js} +3 -3
- package/dist/esm/{customParseFormat-AHaK_YU_.js.map → customParseFormat-xZjyidlk.js.map} +1 -1
- package/dist/esm/globe-icon_3.entry.js +2 -2
- package/dist/esm/google-logo-icon_6.entry.js +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/input-component.entry.js +1 -1
- package/dist/esm/input-dropdown_2.entry.js +1 -1
- package/dist/esm/input-image-url_2.entry.js +2 -2
- package/dist/esm/multi-select-dropdown.entry.js +1 -1
- package/dist/esm/{nylas-api-request-BUmT2J5X.js → nylas-api-request-tYrM5hQX.js} +3 -3
- package/dist/esm/{nylas-api-request-BUmT2J5X.js.map → nylas-api-request-tYrM5hQX.js.map} +1 -1
- package/dist/esm/nylas-booked-event-card_11.entry.js +18 -13
- package/dist/esm/nylas-booked-event-card_11.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +2 -2
- package/dist/esm/nylas-notification_2.entry.js +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js +4 -4
- package/dist/esm/nylas-scheduling.entry.js +29 -15
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/{register-component-DVA2Alyc.js → register-component-3SZ7gAeK.js} +3 -3
- package/dist/esm/{register-component-DVA2Alyc.js.map → register-component-3SZ7gAeK.js.map} +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/{utils-BW6igRcf.js → utils-DDKV6-nQ.js} +68 -9
- package/dist/esm/{utils-BW6igRcf.js.map → utils-DDKV6-nQ.js.map} +1 -1
- package/dist/esm/{version-DDixcvI0.js → version-Xc-4F4Ta.js} +3 -3
- package/dist/esm/{version-DDixcvI0.js.map → version-Xc-4F4Ta.js.map} +1 -1
- package/dist/nylas-web-elements/index.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/{p-04000a4f.entry.js → p-2e34476b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-61828a18.entry.js → p-42432de0.entry.js} +2 -2
- package/dist/nylas-web-elements/p-469c232b.entry.js +2 -0
- package/dist/nylas-web-elements/p-469c232b.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-da0d3be5.entry.js → p-473a9f48.entry.js} +2 -2
- package/dist/nylas-web-elements/p-49510dd2.entry.js +2 -0
- package/dist/nylas-web-elements/p-49510dd2.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-e63c997e.entry.js → p-4c51d165.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a5cc8de4.entry.js → p-6245bad4.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-937127a0.entry.js → p-7186d262.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-34fde935.entry.js → p-90569d2b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-54521b2b.entry.js → p-926c0f10.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-dlIPw-hO.js → p-CONX24aJ.js} +2 -2
- package/dist/nylas-web-elements/{p-dlIPw-hO.js.map → p-CONX24aJ.js.map} +1 -1
- package/dist/nylas-web-elements/{p-CRHgCWIn.js → p-CZUjPf2B.js} +2 -2
- package/dist/nylas-web-elements/{p-CRHgCWIn.js.map → p-CZUjPf2B.js.map} +1 -1
- package/dist/nylas-web-elements/p-CpfLRTv0.js +2 -0
- package/dist/nylas-web-elements/p-CpfLRTv0.js.map +1 -0
- package/dist/nylas-web-elements/{p-or8kjH6q.js → p-Cz68LNCB.js} +2 -2
- package/dist/nylas-web-elements/{p-or8kjH6q.js.map → p-Cz68LNCB.js.map} +1 -1
- package/dist/nylas-web-elements/p-DDKV6-nQ.js +8 -0
- package/dist/nylas-web-elements/{p-BW6igRcf.js.map → p-DDKV6-nQ.js.map} +1 -1
- package/dist/nylas-web-elements/{p-DDixcvI0.js → p-Xc-4F4Ta.js} +2 -2
- package/dist/nylas-web-elements/{p-DDixcvI0.js.map → p-Xc-4F4Ta.js.map} +1 -1
- package/dist/nylas-web-elements/p-b877c010.entry.js +2 -0
- package/dist/nylas-web-elements/{p-7fb5c45e.entry.js.map → p-b877c010.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-5d8287eb.entry.js → p-b9a991fe.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-38051452.entry.js → p-bb4b9655.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a6d5e357.entry.js → p-c71c04d0.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-400d16e6.entry.js → p-f74f3a8d.entry.js} +2 -2
- package/dist/types/components/scheduler/nylas-scheduling/nylas-scheduling.d.ts +3 -0
- package/dist/types/components.d.ts +2 -2
- package/dist/types/utils/utils.d.ts +2 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/abstract-provider-CH5yXWmY.js.map +0 -1
- package/dist/components/p-BJPokpdk.js.map +0 -1
- package/dist/components/p-BvQ13Bty.js.map +0 -1
- package/dist/components/p-CCA4ZVjd.js.map +0 -1
- package/dist/components/p-DBE6FcDx.js.map +0 -1
- package/dist/components/p-y6oP8jW5.js.map +0 -1
- package/dist/esm/abstract-provider-KowNUOZM.js.map +0 -1
- package/dist/nylas-web-elements/p--bAq8KLi.js +0 -2
- package/dist/nylas-web-elements/p--bAq8KLi.js.map +0 -1
- package/dist/nylas-web-elements/p-7fb5c45e.entry.js +0 -2
- package/dist/nylas-web-elements/p-BW6igRcf.js +0 -8
- package/dist/nylas-web-elements/p-a6579faa.entry.js +0 -2
- package/dist/nylas-web-elements/p-a6579faa.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-f5cf4c30.entry.js +0 -2
- package/dist/nylas-web-elements/p-f5cf4c30.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-04000a4f.entry.js.map → p-2e34476b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-61828a18.entry.js.map → p-42432de0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-da0d3be5.entry.js.map → p-473a9f48.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e63c997e.entry.js.map → p-4c51d165.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a5cc8de4.entry.js.map → p-6245bad4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-937127a0.entry.js.map → p-7186d262.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-34fde935.entry.js.map → p-90569d2b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-54521b2b.entry.js.map → p-926c0f10.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5d8287eb.entry.js.map → p-b9a991fe.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-38051452.entry.js.map → p-bb4b9655.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a6d5e357.entry.js.map → p-c71c04d0.entry.js.map} +0 -0
- /package/dist/nylas-web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A,CAAE,EAC1B,SAAS,EAAE,oBAAoB,EAC/B,wBAAwB,EAAE,IAAI,CAAC,mCAAmC,CAAC,GAAG,CAAC,EAAA,CACvE,CACH,CACG;AAEV,SAAC,CAAC,CACG,CACH,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlDX,UAAA,CAAA;AAZC,IAAA,iBAAiB,CAA6G;AAC7H,QAAA,IAAI,EAAE,2BAA2B;QACjC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,2BAA2B,EAAE,WAAW,CAAC;YAC1C,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAqDD,EAAA,uBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.scss?tag=nylas-connected-calendars&encapsulation=shadow","src/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-connected-calendars {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n\n .header {\n padding: 1rem;\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n }\n\n .content {\n .participant-container {\n padding-top: 12px;\n border-top: 1px solid var(--nylas-base-200);\n color: var(--nylas-base-900);\n background-color: var(--nylas-base-25);\n\n .participant-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 16px 16px;\n\n p {\n margin: 0;\n }\n\n .participant-toggle {\n display: flex;\n gap: 24px;\n align-items: center;\n\n .chevron {\n display: flex;\n align-self: center;\n cursor: pointer;\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n\n &.open {\n transform: rotate(90deg);\n }\n\n &.closed {\n transform: rotate(270deg);\n }\n\n &.disabled {\n cursor: not-allowed;\n color: var(--nylas-base-300);\n\n &:hover {\n color: var(--nylas-base-300);\n }\n }\n }\n }\n }\n }\n }\n}\n\nnylas-calendar-picker::part(ncp) {\n margin: 0;\n border: none;\n border-top: 1px solid var(--nylas-base-200);\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { AdditionalParticipant, Calendar, Configuration, Participant, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-connected-calendars` component is a form input for selecting calendars to check availability for participants.\n * @part nccals - The connected calendars host.\n * @part nccals__header - The header.\n * @part nccals__content - The content.\n * @part nccals__container - The container.\n * @part nccals__title - The title.\n * @part nccals__toggle-container - The toggle container.\n */\n@Component({\n tag: 'nylas-connected-calendars',\n styleUrl: 'nylas-connected-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasConnectedCalendars {\n @Element() host!: HTMLNylasConnectedCalendarsElement;\n private connectedCalendarsFormRef!: HTMLFormElement;\n\n /**\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'connected-calendars';\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * @standalone\n * The calendars to choose from for the organizer / logged in user.\n */\n @Prop() calendars?: Calendar[];\n\n /**\n * @standalone\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedCalendars: {\n [key: string]: {\n isOpen: boolean;\n name: string;\n calendars?: Calendar[];\n };\n } = this.setParticipants(this.participants);\n\n /**\n * Participants calendar options.\n */\n @State() participantCalendars: {\n [key: string]: Calendar[];\n } = {};\n\n /**\n * The state to store the default selected calendars for each participant\n */\n @State() participantDefaultSelectedCalendars: {\n [key: string]: string[];\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-connected-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-connected-calendars', 'calendarsChangedHandler', newValue);\n const participants = this.participants?.length > 0 ? this.participants : this.selectedConfiguration?.participants || [];\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-connected-calendars', 'participantsChangedHandler', newValue);\n const participants = newValue?.length > 0 ? newValue : this.selectedConfiguration?.participants || [];\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n\n @Watch('participantOptions')\n participantOptionsChangedHandler(newValue: AdditionalParticipant[]) {\n debug('nylas-calendar-picker', 'participantOptionsChangedHandler', newValue);\n const participants = this.participants?.length > 0 ? this.participants : this.selectedConfiguration?.participants || [];\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-calendar-picker', 'selectedConfigurationChangedHandler', newValue);\n const participants = newValue?.participants || this.participants;\n if (participants && participants.length > 0) {\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n getParticipantCalendarOptions(addedParticipants: Participant[], availableParticipantOptions: AdditionalParticipant[] | undefined) {\n // Get the participants from the availableParticipantOptions prop that are in the addedParticipants prop\n const organizer = addedParticipants?.find(participant => participant.is_organizer);\n const isRoundRobinConfig = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n const participantCalendars = {};\n if (availableParticipantOptions) {\n const participants = addedParticipants?.filter(participant => availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email));\n const remainingParticipants = addedParticipants?.filter(\n participant => !availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email),\n );\n\n // Get the calendar options for each participant with email as the key\n participants?.forEach(participant => {\n const participantOption = availableParticipantOptions?.find(participantOption => participantOption.email === participant.email);\n if (!participantOption) return;\n this.participantDefaultSelectedCalendars[participant.email] = participant.availability?.calendar_ids || [];\n const calendars = participantOption.calendars ?? [];\n participant.availability?.calendar_ids?.forEach(calendarId => {\n if (!calendars?.some(calendar => calendar.id === calendarId) && calendarId !== 'primary') {\n calendars.push({ id: calendarId, name: calendarId });\n }\n });\n participantCalendars[participant.email] = calendars;\n });\n if (isRoundRobinConfig) {\n // If it is round robin config, add the remaining participant calendars to the participantCalendars\n // (Round-robin does not have an organizer, and we filtered out the participants not passed in the participantOptions prop,\n // so we need to add the remaining participants calendars to the participantCalendars)\n // NOTE: Only use participant's own calendar_ids as placeholders — never fall back to this.calendars\n // (the organizer's calendars) as that would be confusing / incorrect.\n remainingParticipants?.forEach(participant => {\n if (participant?.availability?.calendar_ids && participant?.availability?.calendar_ids?.length > 0 && !participant.is_organizer) {\n participantCalendars[participant.email] = participant.availability.calendar_ids.map(id => ({ id, name: id }));\n this.participantDefaultSelectedCalendars[participant.email] = participant.availability?.calendar_ids || [];\n }\n });\n }\n }\n\n // Add the organizer's calendars to the participantCalendars\n if (organizer) {\n participantCalendars[organizer.email] = this.calendars ?? [{ id: 'primary', name: organizer.email }];\n this.participantDefaultSelectedCalendars[organizer.email] = organizer.availability?.calendar_ids || [];\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-connected-calendars', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {\n debug('nylas-connected-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-connected-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-connected-calendars', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedCalendars = this.setParticipants(this.selectedConfiguration?.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.selectedConfiguration?.participants, this.participantOptions);\n } else {\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n }\n\n componentWillRender() {\n // Safety net: if participantCalendars is empty but we have the necessary data, recompute.\n // This handles race conditions where store props arrive in an order that leaves state empty.\n const hasParticipantData = (this.selectedConfiguration?.participants?.length ?? 0) > 0 || (this.participants?.length ?? 0) > 0;\n if (Object.keys(this.participantCalendars).length === 0 && hasParticipantData) {\n const participants = this.participants?.length > 0 ? this.participants : this.selectedConfiguration?.participants || [];\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-')) {\n return;\n }\n // Validate the form\n if (!this.connectedCalendarsFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, i18next.t('nylasConnectedCalendars.selectAtLeastOneCalendar'));\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const key = name.split('participant-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendars'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key].calendars;\n });\n this.internals.setFormValue(JSON.stringify(participantsCalendars), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantsCalendars), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n if (participant?.availability?.calendar_ids && participant?.availability?.calendar_ids?.length > 0) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n name: participant.name || participant.email,\n calendars: participant.availability?.calendar_ids,\n };\n }\n });\n return selectedParticipants;\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n @RegisterComponent<NylasConnectedCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-connected-calendars',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-connected-calendars\" part=\"nccals\">\n <div class=\"header\" part=\"nccals__header\">\n <h3>{i18next.t('nylasConnectedCalendars.headerTitle')}</h3>\n <p>\n {i18next.t('nylasConnectedCalendars.headerSubTitle')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasConnectedCalendars.tooltip.desc')}</span>\n </tooltip-component>\n </p>\n </div>\n <div class=\"content\" part=\"nccals__content\">\n <form ref={el => (this.connectedCalendarsFormRef = el as HTMLFormElement)}>\n {Object.keys(this.participantCalendars).map((key, index) => {\n const participant = this.selectedCalendars[key];\n const participantCalendars = this.participantCalendars[key];\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"nccals__container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"nccals__title\">\n <p>{i18next.t('nylasConnectedCalendars.participantCalendarTitle', { participantName: participant.name })}</p>\n <div class=\"participant-toggle\" part=\"nccals__toggle-container\">\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.selectedCalendars[key].isOpen = !participant.isOpen;\n this.selectedCalendars = { ...this.selectedCalendars };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-calendar-picker\n key={key}\n name={`participant-${key}`}\n calendars={participantCalendars}\n defaultSelectedCalendars={this.participantDefaultSelectedCalendars[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-DPBfMry4.js","mappings":";;;;;;;;;;;AAAA,MAAM,0BAA0B,GAAG,85IAA85I;;;;;;;;;;;;;;;;MCwBp7I,uBAAuB,GAAAA,kBAAA,CAAA,MAAA,uBAAA,SAAAC,CAAA,CAAA;AANpC,IAAA,WAAA,GAAA;;;;;;AAaU,QAAA,IAAI,CAAA,IAAA,GAAW,qBAAqB;QAYpC,IAAY,CAAA,YAAA,GAAkB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;QA0C3E,IAAiB,CAAA,iBAAA,GAMtB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;AAKlC,QAAA,IAAoB,CAAA,oBAAA,GAEzB,EAAE;AAKG,QAAA,IAAmC,CAAA,mCAAA,GAExC,EAAE;AAqQP;AAjQC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,2BAA2B,EAAE,2BAA2B,EAAE,QAAQ,CAAC;QACzE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAI1C,IAAA,uBAAuB,CAAC,QAAoB,EAAA;AAC1C,QAAA,KAAK,CAAC,2BAA2B,EAAE,yBAAyB,EAAE,QAAQ,CAAC;QACvE,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,YAAY,GAAG,I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AG,IAAI,CAAC,iBAAiB,EAAE;iBACvD,EAAA,EAED,CAAc,CAAA,cAAA,EAAA,EAAA,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAA,CAAG,CAClC,CACH,CACF,EACL,WAAW,CAAC,MAAM,KACjB,CACE,CAAA,uBAAA,EAAA,EAAA,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,CAAA,YAAA,EAAe,GAAG,CAAA,CAAE,EAC1B,SAAS,EAAE,oBAAoB,EAC/B,wBAAwB,EAAE,IAAI,CAAC,mCAAmC,CAAC,GAAG,CAAC,EAAA,CACvE,CACH,CACG;AAEV,SAAC,CAAC,CACG,CACH,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlDX,UAAA,CAAA;AAZC,IAAA,iBAAiB,CAA6G;AAC7H,QAAA,IAAI,EAAE,2BAA2B;QACjC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,2BAA2B,EAAE,WAAW,CAAC;YAC1C,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAqDD,EAAA,uBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.scss?tag=nylas-connected-calendars&encapsulation=shadow","src/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-connected-calendars {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n\n .header {\n padding: 1rem;\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n }\n\n .content {\n .participant-container {\n padding-top: 12px;\n border-top: 1px solid var(--nylas-base-200);\n color: var(--nylas-base-900);\n background-color: var(--nylas-base-25);\n\n .participant-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 16px 16px;\n\n p {\n margin: 0;\n }\n\n .participant-toggle {\n display: flex;\n gap: 24px;\n align-items: center;\n\n .chevron {\n display: flex;\n align-self: center;\n cursor: pointer;\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n\n &.open {\n transform: rotate(90deg);\n }\n\n &.closed {\n transform: rotate(270deg);\n }\n\n &.disabled {\n cursor: not-allowed;\n color: var(--nylas-base-300);\n\n &:hover {\n color: var(--nylas-base-300);\n }\n }\n }\n }\n }\n }\n }\n}\n\nnylas-calendar-picker::part(ncp) {\n margin: 0;\n border: none;\n border-top: 1px solid var(--nylas-base-200);\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { AdditionalParticipant, Calendar, Configuration, Participant, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-connected-calendars` component is a form input for selecting calendars to check availability for participants.\n * @part nccals - The connected calendars host.\n * @part nccals__header - The header.\n * @part nccals__content - The content.\n * @part nccals__container - The container.\n * @part nccals__title - The title.\n * @part nccals__toggle-container - The toggle container.\n */\n@Component({\n tag: 'nylas-connected-calendars',\n styleUrl: 'nylas-connected-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasConnectedCalendars {\n @Element() host!: HTMLNylasConnectedCalendarsElement;\n private connectedCalendarsFormRef!: HTMLFormElement;\n\n /**\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'connected-calendars';\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * @standalone\n * The calendars to choose from for the organizer / logged in user.\n */\n @Prop() calendars?: Calendar[];\n\n /**\n * @standalone\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedCalendars: {\n [key: string]: {\n isOpen: boolean;\n name: string;\n calendars?: Calendar[];\n };\n } = this.setParticipants(this.participants);\n\n /**\n * Participants calendar options.\n */\n @State() participantCalendars: {\n [key: string]: Calendar[];\n } = {};\n\n /**\n * The state to store the default selected calendars for each participant\n */\n @State() participantDefaultSelectedCalendars: {\n [key: string]: string[];\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-connected-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-connected-calendars', 'calendarsChangedHandler', newValue);\n const participants = this.participants?.length > 0 ? this.participants : this.selectedConfiguration?.participants || [];\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-connected-calendars', 'participantsChangedHandler', newValue);\n const participants = newValue?.length > 0 ? newValue : this.selectedConfiguration?.participants || [];\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n\n @Watch('participantOptions')\n participantOptionsChangedHandler(newValue: AdditionalParticipant[]) {\n debug('nylas-calendar-picker', 'participantOptionsChangedHandler', newValue);\n const participants = this.participants?.length > 0 ? this.participants : this.selectedConfiguration?.participants || [];\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-calendar-picker', 'selectedConfigurationChangedHandler', newValue);\n const participants = newValue?.participants || this.participants;\n if (participants && participants.length > 0) {\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n getParticipantCalendarOptions(addedParticipants: Participant[], availableParticipantOptions: AdditionalParticipant[] | undefined) {\n // Get the participants from the availableParticipantOptions prop that are in the addedParticipants prop\n const organizer = addedParticipants?.find(participant => participant.is_organizer);\n const isRoundRobinConfig = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n const participantCalendars = {};\n if (availableParticipantOptions) {\n const participants = addedParticipants?.filter(participant => availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email));\n const remainingParticipants = addedParticipants?.filter(\n participant => !availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email),\n );\n\n // Get the calendar options for each participant with email as the key\n participants?.forEach(participant => {\n const participantOption = availableParticipantOptions?.find(participantOption => participantOption.email === participant.email);\n if (!participantOption) return;\n this.participantDefaultSelectedCalendars[participant.email] = participant.availability?.calendar_ids || [];\n const calendars = participantOption.calendars ?? [];\n participant.availability?.calendar_ids?.forEach(calendarId => {\n if (!calendars?.some(calendar => calendar.id === calendarId) && calendarId !== 'primary') {\n calendars.push({ id: calendarId, name: calendarId });\n }\n });\n participantCalendars[participant.email] = calendars;\n });\n if (isRoundRobinConfig) {\n // If it is round robin config, add the remaining participant calendars to the participantCalendars\n // (Round-robin does not have an organizer, and we filtered out the participants not passed in the participantOptions prop,\n // so we need to add the remaining participants calendars to the participantCalendars)\n // NOTE: Only use participant's own calendar_ids as placeholders — never fall back to this.calendars\n // (the organizer's calendars) as that would be confusing / incorrect.\n remainingParticipants?.forEach(participant => {\n if (participant?.availability?.calendar_ids && participant?.availability?.calendar_ids?.length > 0 && !participant.is_organizer) {\n participantCalendars[participant.email] = participant.availability.calendar_ids.map(id => ({ id, name: id }));\n this.participantDefaultSelectedCalendars[participant.email] = participant.availability?.calendar_ids || [];\n }\n });\n }\n }\n\n // Add the organizer's calendars to the participantCalendars\n if (organizer) {\n participantCalendars[organizer.email] = this.calendars ?? [{ id: 'primary', name: organizer.email }];\n this.participantDefaultSelectedCalendars[organizer.email] = organizer.availability?.calendar_ids || [];\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-connected-calendars', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {\n debug('nylas-connected-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-connected-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-connected-calendars', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedCalendars = this.setParticipants(this.selectedConfiguration?.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.selectedConfiguration?.participants, this.participantOptions);\n } else {\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n }\n\n componentWillRender() {\n // Safety net: if participantCalendars is empty but we have the necessary data, recompute.\n // This handles race conditions where store props arrive in an order that leaves state empty.\n const hasParticipantData = (this.selectedConfiguration?.participants?.length ?? 0) > 0 || (this.participants?.length ?? 0) > 0;\n if (Object.keys(this.participantCalendars).length === 0 && hasParticipantData) {\n const participants = this.participants?.length > 0 ? this.participants : this.selectedConfiguration?.participants || [];\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-')) {\n return;\n }\n // Validate the form\n if (!this.connectedCalendarsFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, i18next.t('nylasConnectedCalendars.selectAtLeastOneCalendar'));\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const key = name.split('participant-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendars'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key].calendars;\n });\n this.internals.setFormValue(JSON.stringify(participantsCalendars), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantsCalendars), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n if (participant?.availability?.calendar_ids && participant?.availability?.calendar_ids?.length > 0) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n name: participant.name || participant.email,\n calendars: participant.availability?.calendar_ids,\n };\n }\n });\n return selectedParticipants;\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n @RegisterComponent<NylasConnectedCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-connected-calendars',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-connected-calendars\" part=\"nccals\">\n <div class=\"header\" part=\"nccals__header\">\n <h3>{i18next.t('nylasConnectedCalendars.headerTitle')}</h3>\n <p>\n {i18next.t('nylasConnectedCalendars.headerSubTitle')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasConnectedCalendars.tooltip.desc')}</span>\n </tooltip-component>\n </p>\n </div>\n <div class=\"content\" part=\"nccals__content\">\n <form ref={el => (this.connectedCalendarsFormRef = el as HTMLFormElement)}>\n {Object.keys(this.participantCalendars).map((key, index) => {\n const participant = this.selectedCalendars[key];\n const participantCalendars = this.participantCalendars[key];\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"nccals__container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"nccals__title\">\n <p>{i18next.t('nylasConnectedCalendars.participantCalendarTitle', { participantName: participant.name })}</p>\n <div class=\"participant-toggle\" part=\"nccals__toggle-container\">\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.selectedCalendars[key].isOpen = !participant.isOpen;\n this.selectedCalendars = { ...this.selectedCalendars };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-calendar-picker\n key={key}\n name={`participant-${key}`}\n calendars={participantCalendars}\n defaultSelectedCalendars={this.participantDefaultSelectedCalendars[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, e as createEvent, h, i as Host } from './p-Bht9ktsW.js';
|
|
2
|
-
import { a as debug, Y as getTimezoneOffset, T as TIMEZONE_MAP, I as LANGUAGE_MAP } from './p-
|
|
3
|
-
import { R as RegisterComponent } from './p-
|
|
4
|
-
import { i as instance } from './p-
|
|
2
|
+
import { _ as normalizeSupportedLanguageCode, $ as detectBrowserLanguageCode, L as LANGUAGE_CODE, a as debug, Y as getTimezoneOffset, T as TIMEZONE_MAP, I as LANGUAGE_MAP } from './p-xxFdByBn.js';
|
|
3
|
+
import { R as RegisterComponent } from './p-jHq8WTky.js';
|
|
4
|
+
import { i as instance } from './p-BjxQTsOy.js';
|
|
5
5
|
import { d as defineCustomElement$5 } from './p-ao6VxuAL.js';
|
|
6
6
|
import { d as defineCustomElement$4 } from './p-DS6Ijr4M.js';
|
|
7
7
|
import { d as defineCustomElement$3 } from './p-DBHtQK2b.js';
|
|
@@ -32,7 +32,7 @@ const NylasLocaleSwitch = proxyCustomElement(class NylasLocaleSwitch extends H {
|
|
|
32
32
|
this.timezoneChanged = createEvent(this, "timezoneChanged", 7);
|
|
33
33
|
this.languageChanged = createEvent(this, "languageChanged", 7);
|
|
34
34
|
this.selectedTimezone = this.bookingInfo?.timezone || Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
35
|
-
this.selectedLanguage = this.bookingInfo?.language ||
|
|
35
|
+
this.selectedLanguage = normalizeSupportedLanguageCode(this.bookingInfo?.language) || detectBrowserLanguageCode() || LANGUAGE_CODE.en;
|
|
36
36
|
this.searchPlaceholder = instance.t('search');
|
|
37
37
|
}
|
|
38
38
|
themeConfigChanged(newThemeConfig) {
|
|
@@ -79,10 +79,11 @@ const NylasLocaleSwitch = proxyCustomElement(class NylasLocaleSwitch extends H {
|
|
|
79
79
|
this.timezoneChanged.emit(timezone);
|
|
80
80
|
}
|
|
81
81
|
changeLanguage(language) {
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
const selectedLanguage = normalizeSupportedLanguageCode(language) || LANGUAGE_CODE.en;
|
|
83
|
+
this.selectedLanguage = selectedLanguage;
|
|
84
|
+
instance.changeLanguage(selectedLanguage);
|
|
84
85
|
this.searchPlaceholder = instance.t('search');
|
|
85
|
-
this.languageChanged.emit(
|
|
86
|
+
this.languageChanged.emit(selectedLanguage);
|
|
86
87
|
}
|
|
87
88
|
nylasFormDropdownChangedHandler(event) {
|
|
88
89
|
const { name, value } = event.detail;
|
|
@@ -116,13 +117,13 @@ const NylasLocaleSwitch = proxyCustomElement(class NylasLocaleSwitch extends H {
|
|
|
116
117
|
label: LANGUAGE_MAP[key],
|
|
117
118
|
value: key,
|
|
118
119
|
}));
|
|
119
|
-
return (h(Host, { key: '
|
|
120
|
+
return (h(Host, { key: '878ad0576a298f76e1d76383c7ea395690abc500' }, h("div", { key: 'f717bdec7d6f0252ad9fbc373e56b4d6cbf6843a', class: "nylas-locale-switch", part: "nls" }, h("div", { key: 'e218d237a8848e76ce1559a814da4380ebca23a0', class: {
|
|
120
121
|
'select-wrapper': true,
|
|
121
122
|
'timezone': true,
|
|
122
|
-
}, part: "nls__timezone" }, h("select-dropdown", { key: '
|
|
123
|
+
}, part: "nls__timezone" }, h("select-dropdown", { key: 'da0a9f568ec3da3d4616b902fdf877d6fe123147', name: "timezone", searchPlaceholder: this.searchPlaceholder, options: timezoneOptions, ref: el => (this.timezoneRef = el), defaultSelectedOption: timezoneOptions.find(op => op.value == this.selectedTimezone), exportparts: "sd_dropdown: nls__timezone-dropdown, sd_dropdown-button: nls__timezone-drop-button, sd_dropdown-button-selected-label: nls__timezone-drop-button-selected-label, sd_dropdown-content: nls__timezone-drop-content, sd_dropdown_label: nls__timezone-drop-label" }, h("span", { key: 'baf1c6a3adcf57178c909a41ac7deabf357ffa70', slot: "select-icon" }, h("globe-icon", { key: 'f80555b8810c8eb60c51e6f8dfdc53ecfd811912', width: "20", height: "20" })))), h("div", { key: '039488afeac90a9cb83b6846e3102502a8c90e80', class: {
|
|
123
124
|
'select-wrapper': true,
|
|
124
125
|
'language': true,
|
|
125
|
-
}, part: "nls__language" }, h("select-dropdown", { key: '
|
|
126
|
+
}, part: "nls__language" }, h("select-dropdown", { key: '5b98342ac7181b117d96fcad0ad6da094759bc3d', name: "language", searchPlaceholder: this.searchPlaceholder, options: languageOptions, ref: el => (this.languageRef = el), defaultSelectedOption: languageOptions.find(lang => lang.value == this.selectedLanguage), exportparts: "sd_dropdown: nls__language-dropdown, sd_dropdown-button: nls__language-drop-button, sd_dropdown-content: nls__language-drop-content, sd_dropdown_label: nls__language-drop-label" }, h("span", { key: '5f8c1c24b529e9d3d106bd29bbd81aad4512380a', slot: "select-icon" }, h("translate-icon", { key: '34ecfe3bfa98d2465a8734b8d09e211532a8591e', width: "20", height: "20" })))))));
|
|
126
127
|
}
|
|
127
128
|
get host() { return this; }
|
|
128
129
|
static get watchers() { return {
|
|
@@ -205,6 +206,6 @@ function defineCustomElement() {
|
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
export { NylasLocaleSwitch as N, defineCustomElement as d };
|
|
208
|
-
//# sourceMappingURL=p-
|
|
209
|
+
//# sourceMappingURL=p-DR_UXNMx.js.map
|
|
209
210
|
|
|
210
|
-
//# sourceMappingURL=p-
|
|
211
|
+
//# sourceMappingURL=p-DR_UXNMx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-DR_UXNMx.js","mappings":";;;;;;;;;;AAAA,MAAM,oBAAoB,GAAG,grGAAgrG;;;;;;;;;;;;;;;;MC8BhsG,iBAAiB,GAAAA,kBAAA,CAAA,MAAA,iBAAA,SAAAC,CAAA,CAAA;AAL9B,IAAA,WAAA,GAAA;;;;;;AA2B2B,QAAA,IAAA,CAAA,gBAAgB,GAAW,IAAI,CAAC,WAAW,EAAE,QAAQ,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ;AAKzG,QAAA,IAAA,CAAA,gBAAgB,GAAW,8BAA8B,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,IAAI,yBAAyB,EAAE,IAAI,aAAa,CAAC,EAAE;QAExJ,IAAA,CAAA,iBAAiB,GAAWC,QAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;AA2MzD;AA9LC,IAAA,kBAAkB,CAAC,cAA2B,EAAA;AAC5C,QAAA,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC;;AAIvC,IAAA,yBAAyB,CAAC,QAA+C,EAAA;AACvE,QAAA,IAAI,QAAQ,IAAI,QAAQ,EAAE,QAAQ,EAAE;AAClC,YAAA,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC;;AAExC,QAAA,IAAI,QAAQ,IAAI,QAAQ,EAAE,QAAQ,EAAE;AAClC,YAAA,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC;;;IAI1C,iBAAiB,GAAA;QAGf,cAAc,CAAC,MAAK;AAClB,YAA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,YAAA,eAAe,EAAE,OAAO,KAA0B,EAAE,uBAAgD,KAAI;gBACtG,KAAK,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC;gBAC7D,uBAAuB,CAAC,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC;aAC/D;AACD,YAAA,eAAe,EAAE,OAAO,KAA0B,EAAE,uBAAgD,KAAI;gBACtG,KAAK,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC;gBAC7D,uBAAuB,CAAC,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC;aAC/D;AACF,SAAA;AACD,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA0DD,EAAA,iBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler/nylas-locale-switch/nylas-locale-switch.scss?tag=nylas-locale-switch&encapsulation=shadow","src/components/scheduler/nylas-locale-switch/nylas-locale-switch.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-locale-switch {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n border-left: none;\n border-right: none;\n color: var(--nylas-base-50);\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n font-family: inherit;\n\n @media #{$mobile} {\n font-size: 16px;\n }\n}\n\n.select-wrapper {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\nselect {\n border: none;\n background: transparent;\n cursor: pointer;\n outline: none;\n background-color: transparent;\n margin: 0 0 1px;\n padding: 4px;\n vertical-align: middle;\n\n &#timezone {\n width: 140px;\n }\n\n &#language {\n width: 80px;\n }\n}\n\nspan.timezone-label {\n display: flex;\n width: -webkit-fill-available;\n justify-content: space-between;\n}\n\nselect-dropdown {\n width: auto;\n}\n\nselect-dropdown::part(sd_dropdown-button) {\n border: none;\n padding: 10px;\n}\n\nselect-dropdown::part(sd_dropdown-content) {\n max-width: 306px;\n}\n\n@media #{$mobile} {\n select-dropdown::part(sd_dropdown-button-selected-label) {\n max-width: 80px; // To make sure the selected label doesn't overflow on mobile\n }\n\n select-dropdown::part(sd_dropdown-content) {\n width: 100%;\n max-width: none;\n }\n}","import { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { LANGUAGE_CODE, LANGUAGE_MAP, TIMEZONE_MAP } from '@/common/constants';\nimport { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConnector } from '../../../components';\nimport type { NylasSchedulerBookingData } from '@/common/types';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug, detectBrowserLanguageCode, getTimezoneOffset, normalizeSupportedLanguageCode } from '@/utils/utils';\nimport { ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\n/**\n * The `nylas-locale-switch` component is a UI component that allows users to select a timezone and language.\n * @part nls - The locale switch container\n * @part nls__timezone - The timezone select container\n * @part nls__timezone-dropdown - The timezone dropdown\n * @part nls__timezone-drop-button - The timezone dropdown button\n * @part nls__timezone-drop-button-selected-label - The timezone dropdown button selected label\n * @part nls__timezone-drop-content - The timezone dropdown content\n * @part nls__timezone-drop-label - The timezone dropdown label\n * @part nls__language - The language select container\n * @part nls__language-dropdown - The language dropdown\n * @part nls__language-drop-button - The language dropdown button\n * @part nls__language-drop-content - The language dropdown content\n * @part nls__language-drop-label - The language dropdown label\n *\n */\n@Component({\n tag: 'nylas-locale-switch',\n styleUrl: 'nylas-locale-switch.scss',\n shadow: true,\n})\nexport class NylasLocaleSwitch {\n private timezoneRef?: HTMLSelectDropdownElement;\n private languageRef?: HTMLSelectDropdownElement;\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasLocaleSwitchElement;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: any;\n /**\n * @standalone\n * The booking info.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * The selected timezone.\n */\n @Prop({ mutable: true }) selectedTimezone: string = this.bookingInfo?.timezone || Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n /**\n * The selected language.\n */\n @Prop({ mutable: true }) selectedLanguage: string = normalizeSupportedLanguageCode(this.bookingInfo?.language) || detectBrowserLanguageCode() || LANGUAGE_CODE.en;\n\n @State() searchPlaceholder: string = i18next.t('search');\n\n /**\n * This event is fired when the timezone is changed.\n */\n @Event() timezoneChanged!: EventEmitter<string>;\n\n /**\n * This event is fired when the language is changed.\n */\n @Event() languageChanged!: EventEmitter<string>;\n\n @Watch('themeConfig')\n themeConfigChanged(newThemeConfig: ThemeConfig) {\n this.applyThemeConfig(newThemeConfig);\n }\n\n @Watch('bookingInfo')\n bookingInfoChangedHandler(newValue: NylasSchedulerBookingData | undefined) {\n if (newValue && newValue?.timezone) {\n this.changeTimezone(newValue.timezone);\n }\n if (newValue && newValue?.language) {\n this.changeLanguage(newValue.language);\n }\n }\n\n connectedCallback() {\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {}\n\n componentWillLoad() {}\n\n componentDidLoad() {\n debug(`[nylas-locale-switch] Component did load`);\n if (this.bookingInfo && this.bookingInfo?.timezone) {\n this.changeTimezone(this.bookingInfo.timezone);\n }\n if (this.bookingInfo && this.bookingInfo?.language) {\n this.changeLanguage(this.bookingInfo.language);\n }\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n this.timezoneRef?.style.setProperty(`${key}`, value);\n this.languageRef?.style.setProperty(`${key}`, value);\n }\n }\n }\n\n /**\n * Change the timezone.\n * @param timezone The timezone to select.\n */\n private changeTimezone(timezone: string) {\n this.selectedTimezone = timezone;\n this.timezoneChanged.emit(timezone);\n }\n\n /**\n * Change the language.\n * @param language The language to select.\n */\n private changeLanguage(language: string) {\n const selectedLanguage = normalizeSupportedLanguageCode(language) || LANGUAGE_CODE.en;\n this.selectedLanguage = selectedLanguage;\n i18next.changeLanguage(selectedLanguage);\n this.searchPlaceholder = i18next.t('search');\n this.languageChanged.emit(selectedLanguage);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(\n event: CustomEvent<{\n value: string;\n name: string;\n }>,\n ) {\n const { name, value } = event.detail;\n if (name === 'timezone') {\n this.changeTimezone(value);\n } else if (name === 'language') {\n this.changeLanguage(value);\n }\n }\n\n getTimezoneLabelHTML(timezone: string) {\n const offset = getTimezoneOffset(timezone);\n return (\n <span\n class=\"timezone-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '-webkit-fill-available',\n }}\n >\n {TIMEZONE_MAP[timezone]}{' '}\n <span\n class=\"timezone-offset\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n color: 'var(--nylas-base-500)',\n }}\n >\n {offset}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasLocaleSwitch, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-locale-switch',\n stateToProps: new Map([\n ['scheduler.selectedLanguage', 'selectedLanguage'],\n ['scheduler.selectedTimezone', 'selectedTimezone'],\n ['scheduler.bookingInfo', 'bookingInfo'],\n ['scheduler.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {\n timezoneChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-locale-switch', 'timezoneChanged', event.detail);\n nylasSchedulerConnector.scheduler.selectTimezone(event.detail);\n },\n languageChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-locale-switch', 'languageChanged', event.detail);\n nylasSchedulerConnector.scheduler.selectLanguage(event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const timezoneOptions = Object.keys(TIMEZONE_MAP).map(key => ({\n labelHTML: this.getTimezoneLabelHTML(key),\n label: TIMEZONE_MAP[key],\n value: key,\n }));\n const languageOptions = Object.keys(LANGUAGE_MAP).map(key => ({\n label: LANGUAGE_MAP[key],\n value: key,\n }));\n\n return (\n <Host>\n <div class=\"nylas-locale-switch\" part=\"nls\">\n <div\n class={{\n 'select-wrapper': true,\n 'timezone': true,\n }}\n part=\"nls__timezone\"\n >\n <select-dropdown\n name=\"timezone\"\n searchPlaceholder={this.searchPlaceholder}\n options={timezoneOptions}\n ref={el => (this.timezoneRef = el)}\n defaultSelectedOption={timezoneOptions.find(op => op.value == this.selectedTimezone)}\n exportparts=\"sd_dropdown: nls__timezone-dropdown, sd_dropdown-button: nls__timezone-drop-button, sd_dropdown-button-selected-label: nls__timezone-drop-button-selected-label, sd_dropdown-content: nls__timezone-drop-content, sd_dropdown_label: nls__timezone-drop-label\"\n >\n <span slot=\"select-icon\">\n <globe-icon width=\"20\" height=\"20\" />\n </span>\n </select-dropdown>\n </div>\n <div\n class={{\n 'select-wrapper': true,\n 'language': true,\n }}\n part=\"nls__language\"\n >\n <select-dropdown\n name=\"language\"\n searchPlaceholder={this.searchPlaceholder}\n options={languageOptions}\n ref={el => (this.languageRef = el)}\n defaultSelectedOption={languageOptions.find(lang => lang.value == this.selectedLanguage)}\n exportparts=\"sd_dropdown: nls__language-dropdown, sd_dropdown-button: nls__language-drop-button, sd_dropdown-content: nls__language-drop-content, sd_dropdown_label: nls__language-drop-label\"\n >\n <span slot=\"select-icon\">\n <translate-icon width=\"20\" height=\"20\" />\n </span>\n </select-dropdown>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, e as createEvent, h, i as Host } from './p-Bht9ktsW.js';
|
|
2
|
-
import { R as RegisterComponent } from './p-
|
|
3
|
-
import { O as EVENT_TITLE_TOKENS, a as debug, s as sanitize, P as isNonPrintableKey, Q as getBrowser } from './p-
|
|
4
|
-
import { i as instance } from './p-
|
|
2
|
+
import { R as RegisterComponent } from './p-jHq8WTky.js';
|
|
3
|
+
import { O as EVENT_TITLE_TOKENS, a as debug, s as sanitize, P as isNonPrintableKey, Q as getBrowser } from './p-xxFdByBn.js';
|
|
4
|
+
import { i as instance } from './p-BjxQTsOy.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './p-d3kelm3z.js';
|
|
6
6
|
import { d as defineCustomElement$1 } from './p-DxDoo-4C.js';
|
|
7
7
|
|
|
@@ -489,6 +489,6 @@ function defineCustomElement() {
|
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
export { NylasEventTitle as N, defineCustomElement as d };
|
|
492
|
-
//# sourceMappingURL=p-
|
|
492
|
+
//# sourceMappingURL=p-DRgnghCP.js.map
|
|
493
493
|
|
|
494
|
-
//# sourceMappingURL=p-
|
|
494
|
+
//# sourceMappingURL=p-DRgnghCP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-Dwqu7m_I.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,yuMAAyuM;;;;;;;;;;;;;;;;MCiCvvM,eAAe,GAAAA,kBAAA,CAAA,MAAA,eAAA,SAAAC,CAAA,CAAA;AAN5B,IAAA,WAAA,GAAA;;;;;;QAoBU,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,KAAK;AAKtE,QAAA,IAAI,CAAA,IAAA,GAAW,OAAO;AAStB,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;AAU3B,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;QAI3B,IAAe,CA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A,CAAA,mBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACE,CAAW,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,cAAc,EAAG,CAAA,EACjC,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,iBAAiB,EAAA,EACzBA,QAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC,OAAE,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAO,YAAY,CAAQ,CAClE,CACW,CACf,CACF,CACR,EACA,IAAI,CAAC,eAAe,IAAI,EAAE,IAAI,6DAAM,KAAK,EAAC,eAAe,EAAA,EAAEA,QAAO,CAAC,CAAC,CAAC,CAAmB,gBAAA,EAAA,IAAI,CAAC,eAAe,CAAA,CAAE,CAAC,CAAQ,CACpH,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAvDX,UAAA,CAAA;AAVC,IAAA,iBAAiB,CAAqG;AACrH,QAAA,IAAI,EAAE,mBAAmB;QACzB,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA0DD,EAAA,eAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","eventTitleTokens","i18next"],"sources":["src/components/scheduler-editor/nylas-event-title/nylas-event-title.scss?tag=nylas-event-title&encapsulation=shadow","src/components/scheduler-editor/nylas-event-title/nylas-event-title.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n@use '../../../common/mixins/inputs' as *;\n\n:host {\n display: block;\n height: auto;\n @include default-css-variables;\n width: 100%;\n}\n\n.nylas-event-title {\n display: flex;\n flex-direction: column;\n gap: 4px;\n position: relative;\n text-align: left;\n color: var(--nylas-base-900);\n\n div.title {\n // Apply textfield styles but override display and alignment for contentEditable\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-300);\n background: var(--nylas-base-0);\n width: -webkit-fill-available;\n height: 48px;\n padding: 12px 16px;\n overflow: auto;\n white-space: nowrap;\n scrollbar-width: thin;\n color: var(--nylas-base-900);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n -webkit-text-fill-color: var(--nylas-base-900);\n display: block;\n\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &:focus {\n color: var(--nylas-base-900);\n -webkit-text-fill-color: var(--nylas-base-900);\n outline: 2px solid var(--nylas-primary);\n outline-offset: 2px;\n }\n\n &:focus-visible {\n color: var(--nylas-base-900);\n -webkit-text-fill-color: var(--nylas-base-900);\n outline: 2px solid var(--nylas-primary);\n outline-offset: 2px;\n }\n\n &.error {\n border-color: var(--nylas-error);\n border-width: 2px;\n }\n }\n\n input {\n padding: 12px 16px;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n }\n\n span.help-text {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-500);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 21px;\n position: relative;\n\n span.label-icon {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n tooltip-component {\n display: flex;\n &::part(tc__container) {\n position: unset;\n }\n\n &::part(tc__content) {\n position: absolute;\n top: 4px;\n left: 50%;\n transform: translateX(-50%);\n }\n }\n }\n }\n\n span.error-message {\n color: var(--nylas-error);\n }\n\n label {\n @include input-label;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n align-items: flex-start;\n\n p {\n margin: 0;\n display: flex;\n align-items: center;\n }\n\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n\n.highlighted-tag {\n background-color: var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 5px;\n margin-left: 4px;\n}\n\n.token-options {\n display: block;\n background-color: var(--nylas-base-0);\n width: 100%;\n max-height: 336px;\n overflow: auto;\n z-index: 1;\n border-radius: 4px;\n position: absolute;\n top: calc(48px + 24px + 8px); // 48px is the height of the input, 24px is the height of the label, 8px is the gap between the label and the input\n\n box-shadow: 0px 4px 6px -2px #0000000d;\n box-shadow: 0px 10px 15px -3px #0000001a;\n\n @media #{$mobile} {\n right: 0;\n width: 325px;\n max-width: unset;\n }\n\n ul {\n padding: 0;\n list-style-type: none;\n color: var(--nylas-base-900);\n max-height: 336px;\n margin: 0;\n\n li {\n padding: 16px, 12px, 16px, 12px;\n color: var(--nylas-base-900);\n padding: 12px 16px;\n text-decoration: none;\n display: block;\n font-family: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: left;\n cursor: pointer;\n\n .token-label {\n display: flex;\n flex-direction: column;\n font-weight: 400;\n\n .token {\n color: var(--nylas-abse-900);\n font-size: 16px;\n line-height: 24px;\n }\n\n .description {\n color: var(--nylas-base-600);\n font-size: 14px;\n line-height: 21px;\n }\n }\n\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: var(--nylas-base-100);\n\n .token-label {\n .token {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n\n .selected {\n background-color: var(--nylas-base-100);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser, isNonPrintableKey, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { EVENT_TITLE_TOKENS as eventTitleTokens } from '@/common/constants';\nimport { Configuration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-title` component is a form input for the title of an event.\n * @part net - The event title container\n * @part net__title - The event title input\n * @part net__dropdown-content - The token options container\n */\n@Component({\n tag: 'nylas-event-title',\n styleUrl: 'nylas-event-title.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventTitle {\n @Element() host!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n // Properties\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The title of the event from the cofiguration.\n */\n @Prop() eventTitle?: string = this.selectedConfiguration?.event_booking?.title;\n /**\n * @standalone\n * The name attribute of this component.\n */\n @Prop() name: string = 'title';\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * Whether to show the tokens dropdown.\n */\n @Prop() noTemplates: boolean = false;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n // State variables\n /**\n * Whether to show the tokens dropdown.\n */\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventTitleTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event title with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n @State() configEventTitle: string = '';\n\n @State() additionalFieldTokens: Token[] = [];\n // Reference to the title div element\n private titleRef!: HTMLDivElement;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('[nylas-event-title]', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('ariaActivedescendant')\n ariaActivedescendantChangedHandler(newValue: string) {\n debug('[nylas-event-title]', 'ariaActivedescendantChangedHandler', newValue);\n if (newValue !== '') {\n const activeOption = this.host.shadowRoot?.getElementById(newValue);\n activeOption?.classList.add('active');\n } else {\n const options = this.host.shadowRoot?.querySelectorAll('.token-options li.active');\n options?.forEach(option => option.classList.remove('active'));\n }\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newVal: Configuration) {\n const title = newVal?.event_booking?.title;\n const additionalFields = newVal?.scheduler?.additional_fields || {};\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventTitleTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n if (title) {\n this.configEventTitle = title;\n this.updateEventTitleFromProp(title);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const titleTokens = {\n $invitee: 'invitee',\n $invitee_email: 'inviteeEmail',\n $duration: 'duration',\n };\n this.availableTokens = this.availableTokens.map(token => {\n if (titleTokens[token.label]) {\n token.labelHTML.description = i18next.t(`nylasEventTitle.eventTitleTokenDescription.${titleTokens[token.label]}`);\n }\n return token;\n });\n this.filteredTokens = [...this.availableTokens];\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n // Events\n /**\n * This event is fired when the value of the event title changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('[nylas-event-title]', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n componentWillLoad() {\n debug('[nylas-event-title]', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n // Theme already applied in connectedCallback via queueMicrotask\n }\n\n componentDidLoad() {\n debug('[nylas-event-title]', 'componentDidLoad');\n let title = this.eventTitle || this.configEventTitle;\n if (this.selectedConfiguration?.event_booking?.title) {\n title = this.selectedConfiguration?.event_booking?.title;\n }\n if (title) {\n this.updateEventTitleFromProp(title);\n this.updateEventTitle(title, true);\n }\n }\n\n disconnectedCallback() {\n debug('[nylas-event-title]', 'disconnectedCallback');\n }\n\n @Listen('formSubmitted', { target: 'window' })\n formSubmittedHandler(event: CustomEvent) {\n debug('[nylas-event-title]', 'formSubmittedHandler', event);\n if (!this.internals?.validity?.valid) {\n this.validationError = 'eventTitleRequired';\n } else {\n this.validationError = '';\n }\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'additional-fields') {\n const additionalFields = JSON.parse(value.toString());\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventTitleTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n }\n }\n\n updateEventTitleFromProp(newValue: string) {\n debug('[nylas-event-title]', 'eventTitleChangedHandler', newValue);\n const title = newValue || this.configEventTitle;\n if (this.titleRef) {\n this.titleRef.innerHTML = this.highlightTokens(title);\n if (typeof this.internals.setValidity === 'function') {\n if (!title || title === '') {\n this.titleRef.focus();\n this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n } else {\n this.internals?.setValidity({ customError: false });\n this.isInternalsAvailable && this.internals?.setFormValue(title, this.name);\n }\n }\n }\n }\n\n highlightTokens(title: string) {\n let outputHtml = title;\n [...eventTitleTokens, ...this.additionalFieldTokens].forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml?.replace(regex, '<span class=\"highlighted-tag\">$1</span>') || '';\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node, allSelected) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n allSelected,\n };\n };\n\n // Check if the selection has selected all the text in the node, we need this to handle the case where the user selects all the text and then types or deletes\n const isAllSelected = (selection: Selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome': {\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);\n }\n case 'Firefox': {\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n const allSelectedFirefox = selection && isAllSelected(selection);\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);\n }\n case 'Safari': {\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n const allSelectedSafari = windowSelection && isAllSelected(windowSelection);\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);\n }\n default: {\n debug('Browser not supported');\n return null;\n }\n }\n }\n\n handleChange(event: Event) {\n let textContent = (event.target as HTMLDivElement).textContent || '';\n textContent = sanitize(textContent);\n\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event title with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventTitle(textContent);\n }\n\n handleInputKeyDown(event) {\n const selection = this.getCurrentSelectionForBrowser();\n\n // If no text is remaining in the title, reset the title to an empty string\n if (selection?.allSelected && !isNonPrintableKey(event)) {\n this.titleRef.innerHTML = '';\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n }\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const parentNode = selection?.node?.parentNode;\n if (selection?.currentText.startsWith('${') && parentNode && parentNode.nodeName === 'SPAN') {\n event.preventDefault();\n parentNode.removeChild(selection.node);\n parentNode.remove();\n this.resetDropdown();\n this.updateEventTitle(this.titleRef?.textContent || '');\n }\n if (this.titleRef.textContent === '' || selection?.allSelected) {\n this.titleRef.innerHTML = '';\n this.updateEventTitle('');\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.titleRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 1);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 1);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.titleRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event title with the selected token\n this.updateEventTitle(this.titleRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n get isInternalsAvailable() {\n return typeof this.internals !== 'undefined' && typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function';\n }\n\n updateEventTitle(text: string, noValue: boolean = false) {\n const value = text.replace(/ +/g, ' ');\n if (value === '' || /^[\\s]*$/.test(value)) {\n this.validationError = 'eventTitleRequired';\n this.isInternalsAvailable && this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n } else {\n this.validationError = '';\n this.isInternalsAvailable && this.internals?.setValidity({ customError: false });\n }\n\n this.isInternalsAvailable && this.internals?.setFormValue(value, this.name);\n if (!noValue) {\n this.valueChanged.emit({ value: value, name: this.name });\n }\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n @RegisterComponent<NylasEventTitle, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-title',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-title\" part=\"net\">\n <label htmlFor=\"title\">\n <p>\n {i18next.t('nylasEventTitle.headerTitle')}\n <span class=\"required\">*</span>\n </p>\n </label>\n <div\n class={{\n title: true,\n error: this.validationError !== '',\n }}\n part=\"net__title\"\n ref={el => (this.titleRef = el as HTMLDivElement)}\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ></div>\n {!this.noTemplates && this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"net__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n {!this.noTemplates && (\n <span class=\"help-text\">\n {i18next.t('nylasEventTitle.helpText', { context: 'start', field: i18next.t('nylasEventTitle.title') })} <code>$</code>{' '}\n {i18next.t('nylasEventTitle.helpText', { context: 'end' })}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventTitle.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n {this.validationError != '' && <span class=\"error-message\">{i18next.t(`nylasEventTitle.${this.validationError}`)}</span>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-DRgnghCP.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,yuMAAyuM;;;;;;;;;;;;;;;;MCiCvvM,eAAe,GAAAA,kBAAA,CAAA,MAAA,eAAA,SAAAC,CAAA,CAAA;AAN5B,IAAA,WAAA,GAAA;;;;;;QAoBU,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,KAAK;AAKtE,QAAA,IAAI,CAAA,IAAA,GAAW,OAAO;AAStB,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;AAU3B,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;QAI3B,IAAe,CAAA,eAAA,GAAyDC,kBAAgB,CAAC,GAAG,CAAC,KAAK,KAAK;YAC9G,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;AAClB,YAAA,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,EACjC,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,iBAAiB,EAAA,EACzBA,QAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC,OAAE,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAO,YAAY,CAAQ,CAClE,CACW,CACf,CACF,CACR,EACA,IAAI,CAAC,eAAe,IAAI,EAAE,IAAI,6DAAM,KAAK,EAAC,eAAe,EAAA,EAAEA,QAAO,CAAC,CAAC,CAAC,CAAmB,gBAAA,EAAA,IAAI,CAAC,eAAe,CAAA,CAAE,CAAC,CAAQ,CACpH,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAvDX,UAAA,CAAA;AAVC,IAAA,iBAAiB,CAAqG;AACrH,QAAA,IAAI,EAAE,mBAAmB;QACzB,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA0DD,EAAA,eAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","eventTitleTokens","i18next"],"sources":["src/components/scheduler-editor/nylas-event-title/nylas-event-title.scss?tag=nylas-event-title&encapsulation=shadow","src/components/scheduler-editor/nylas-event-title/nylas-event-title.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n@use '../../../common/mixins/inputs' as *;\n\n:host {\n display: block;\n height: auto;\n @include default-css-variables;\n width: 100%;\n}\n\n.nylas-event-title {\n display: flex;\n flex-direction: column;\n gap: 4px;\n position: relative;\n text-align: left;\n color: var(--nylas-base-900);\n\n div.title {\n // Apply textfield styles but override display and alignment for contentEditable\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-300);\n background: var(--nylas-base-0);\n width: -webkit-fill-available;\n height: 48px;\n padding: 12px 16px;\n overflow: auto;\n white-space: nowrap;\n scrollbar-width: thin;\n color: var(--nylas-base-900);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n -webkit-text-fill-color: var(--nylas-base-900);\n display: block;\n\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &:focus {\n color: var(--nylas-base-900);\n -webkit-text-fill-color: var(--nylas-base-900);\n outline: 2px solid var(--nylas-primary);\n outline-offset: 2px;\n }\n\n &:focus-visible {\n color: var(--nylas-base-900);\n -webkit-text-fill-color: var(--nylas-base-900);\n outline: 2px solid var(--nylas-primary);\n outline-offset: 2px;\n }\n\n &.error {\n border-color: var(--nylas-error);\n border-width: 2px;\n }\n }\n\n input {\n padding: 12px 16px;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n }\n\n span.help-text {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-500);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 21px;\n position: relative;\n\n span.label-icon {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n tooltip-component {\n display: flex;\n &::part(tc__container) {\n position: unset;\n }\n\n &::part(tc__content) {\n position: absolute;\n top: 4px;\n left: 50%;\n transform: translateX(-50%);\n }\n }\n }\n }\n\n span.error-message {\n color: var(--nylas-error);\n }\n\n label {\n @include input-label;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n align-items: flex-start;\n\n p {\n margin: 0;\n display: flex;\n align-items: center;\n }\n\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n\n.highlighted-tag {\n background-color: var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 5px;\n margin-left: 4px;\n}\n\n.token-options {\n display: block;\n background-color: var(--nylas-base-0);\n width: 100%;\n max-height: 336px;\n overflow: auto;\n z-index: 1;\n border-radius: 4px;\n position: absolute;\n top: calc(48px + 24px + 8px); // 48px is the height of the input, 24px is the height of the label, 8px is the gap between the label and the input\n\n box-shadow: 0px 4px 6px -2px #0000000d;\n box-shadow: 0px 10px 15px -3px #0000001a;\n\n @media #{$mobile} {\n right: 0;\n width: 325px;\n max-width: unset;\n }\n\n ul {\n padding: 0;\n list-style-type: none;\n color: var(--nylas-base-900);\n max-height: 336px;\n margin: 0;\n\n li {\n padding: 16px, 12px, 16px, 12px;\n color: var(--nylas-base-900);\n padding: 12px 16px;\n text-decoration: none;\n display: block;\n font-family: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: left;\n cursor: pointer;\n\n .token-label {\n display: flex;\n flex-direction: column;\n font-weight: 400;\n\n .token {\n color: var(--nylas-abse-900);\n font-size: 16px;\n line-height: 24px;\n }\n\n .description {\n color: var(--nylas-base-600);\n font-size: 14px;\n line-height: 21px;\n }\n }\n\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: var(--nylas-base-100);\n\n .token-label {\n .token {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n\n .selected {\n background-color: var(--nylas-base-100);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser, isNonPrintableKey, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { EVENT_TITLE_TOKENS as eventTitleTokens } from '@/common/constants';\nimport { Configuration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-title` component is a form input for the title of an event.\n * @part net - The event title container\n * @part net__title - The event title input\n * @part net__dropdown-content - The token options container\n */\n@Component({\n tag: 'nylas-event-title',\n styleUrl: 'nylas-event-title.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventTitle {\n @Element() host!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n // Properties\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The title of the event from the cofiguration.\n */\n @Prop() eventTitle?: string = this.selectedConfiguration?.event_booking?.title;\n /**\n * @standalone\n * The name attribute of this component.\n */\n @Prop() name: string = 'title';\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * Whether to show the tokens dropdown.\n */\n @Prop() noTemplates: boolean = false;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n // State variables\n /**\n * Whether to show the tokens dropdown.\n */\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventTitleTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event title with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n @State() configEventTitle: string = '';\n\n @State() additionalFieldTokens: Token[] = [];\n // Reference to the title div element\n private titleRef!: HTMLDivElement;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('[nylas-event-title]', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('ariaActivedescendant')\n ariaActivedescendantChangedHandler(newValue: string) {\n debug('[nylas-event-title]', 'ariaActivedescendantChangedHandler', newValue);\n if (newValue !== '') {\n const activeOption = this.host.shadowRoot?.getElementById(newValue);\n activeOption?.classList.add('active');\n } else {\n const options = this.host.shadowRoot?.querySelectorAll('.token-options li.active');\n options?.forEach(option => option.classList.remove('active'));\n }\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newVal: Configuration) {\n const title = newVal?.event_booking?.title;\n const additionalFields = newVal?.scheduler?.additional_fields || {};\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventTitleTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n if (title) {\n this.configEventTitle = title;\n this.updateEventTitleFromProp(title);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const titleTokens = {\n $invitee: 'invitee',\n $invitee_email: 'inviteeEmail',\n $duration: 'duration',\n };\n this.availableTokens = this.availableTokens.map(token => {\n if (titleTokens[token.label]) {\n token.labelHTML.description = i18next.t(`nylasEventTitle.eventTitleTokenDescription.${titleTokens[token.label]}`);\n }\n return token;\n });\n this.filteredTokens = [...this.availableTokens];\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n // Events\n /**\n * This event is fired when the value of the event title changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('[nylas-event-title]', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n componentWillLoad() {\n debug('[nylas-event-title]', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n // Theme already applied in connectedCallback via queueMicrotask\n }\n\n componentDidLoad() {\n debug('[nylas-event-title]', 'componentDidLoad');\n let title = this.eventTitle || this.configEventTitle;\n if (this.selectedConfiguration?.event_booking?.title) {\n title = this.selectedConfiguration?.event_booking?.title;\n }\n if (title) {\n this.updateEventTitleFromProp(title);\n this.updateEventTitle(title, true);\n }\n }\n\n disconnectedCallback() {\n debug('[nylas-event-title]', 'disconnectedCallback');\n }\n\n @Listen('formSubmitted', { target: 'window' })\n formSubmittedHandler(event: CustomEvent) {\n debug('[nylas-event-title]', 'formSubmittedHandler', event);\n if (!this.internals?.validity?.valid) {\n this.validationError = 'eventTitleRequired';\n } else {\n this.validationError = '';\n }\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'additional-fields') {\n const additionalFields = JSON.parse(value.toString());\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventTitleTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n }\n }\n\n updateEventTitleFromProp(newValue: string) {\n debug('[nylas-event-title]', 'eventTitleChangedHandler', newValue);\n const title = newValue || this.configEventTitle;\n if (this.titleRef) {\n this.titleRef.innerHTML = this.highlightTokens(title);\n if (typeof this.internals.setValidity === 'function') {\n if (!title || title === '') {\n this.titleRef.focus();\n this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n } else {\n this.internals?.setValidity({ customError: false });\n this.isInternalsAvailable && this.internals?.setFormValue(title, this.name);\n }\n }\n }\n }\n\n highlightTokens(title: string) {\n let outputHtml = title;\n [...eventTitleTokens, ...this.additionalFieldTokens].forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml?.replace(regex, '<span class=\"highlighted-tag\">$1</span>') || '';\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node, allSelected) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n allSelected,\n };\n };\n\n // Check if the selection has selected all the text in the node, we need this to handle the case where the user selects all the text and then types or deletes\n const isAllSelected = (selection: Selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome': {\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);\n }\n case 'Firefox': {\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n const allSelectedFirefox = selection && isAllSelected(selection);\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);\n }\n case 'Safari': {\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n const allSelectedSafari = windowSelection && isAllSelected(windowSelection);\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);\n }\n default: {\n debug('Browser not supported');\n return null;\n }\n }\n }\n\n handleChange(event: Event) {\n let textContent = (event.target as HTMLDivElement).textContent || '';\n textContent = sanitize(textContent);\n\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event title with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventTitle(textContent);\n }\n\n handleInputKeyDown(event) {\n const selection = this.getCurrentSelectionForBrowser();\n\n // If no text is remaining in the title, reset the title to an empty string\n if (selection?.allSelected && !isNonPrintableKey(event)) {\n this.titleRef.innerHTML = '';\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n }\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const parentNode = selection?.node?.parentNode;\n if (selection?.currentText.startsWith('${') && parentNode && parentNode.nodeName === 'SPAN') {\n event.preventDefault();\n parentNode.removeChild(selection.node);\n parentNode.remove();\n this.resetDropdown();\n this.updateEventTitle(this.titleRef?.textContent || '');\n }\n if (this.titleRef.textContent === '' || selection?.allSelected) {\n this.titleRef.innerHTML = '';\n this.updateEventTitle('');\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.titleRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 1);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 1);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.titleRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event title with the selected token\n this.updateEventTitle(this.titleRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n get isInternalsAvailable() {\n return typeof this.internals !== 'undefined' && typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function';\n }\n\n updateEventTitle(text: string, noValue: boolean = false) {\n const value = text.replace(/ +/g, ' ');\n if (value === '' || /^[\\s]*$/.test(value)) {\n this.validationError = 'eventTitleRequired';\n this.isInternalsAvailable && this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n } else {\n this.validationError = '';\n this.isInternalsAvailable && this.internals?.setValidity({ customError: false });\n }\n\n this.isInternalsAvailable && this.internals?.setFormValue(value, this.name);\n if (!noValue) {\n this.valueChanged.emit({ value: value, name: this.name });\n }\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n @RegisterComponent<NylasEventTitle, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-title',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-event-title\" part=\"net\">\n <label htmlFor=\"title\">\n <p>\n {i18next.t('nylasEventTitle.headerTitle')}\n <span class=\"required\">*</span>\n </p>\n </label>\n <div\n class={{\n title: true,\n error: this.validationError !== '',\n }}\n part=\"net__title\"\n ref={el => (this.titleRef = el as HTMLDivElement)}\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ></div>\n {!this.noTemplates && this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"net__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n {!this.noTemplates && (\n <span class=\"help-text\">\n {i18next.t('nylasEventTitle.helpText', { context: 'start', field: i18next.t('nylasEventTitle.title') })} <code>$</code>{' '}\n {i18next.t('nylasEventTitle.helpText', { context: 'end' })}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventTitle.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n {this.validationError != '' && <span class=\"error-message\">{i18next.t(`nylasEventTitle.${this.validationError}`)}</span>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, e as createEvent, h, i as Host } from './p-Bht9ktsW.js';
|
|
2
|
-
import { R as RegisterComponent } from './p-
|
|
3
|
-
import { a as debug } from './p-
|
|
4
|
-
import { i as instance } from './p-
|
|
2
|
+
import { R as RegisterComponent } from './p-jHq8WTky.js';
|
|
3
|
+
import { a as debug } from './p-xxFdByBn.js';
|
|
4
|
+
import { i as instance } from './p-BjxQTsOy.js';
|
|
5
5
|
import { d as defineCustomElement$7 } from './p-Dl0Yur5r.js';
|
|
6
6
|
import { d as defineCustomElement$6 } from './p-CzVZs3uZ.js';
|
|
7
7
|
import { d as defineCustomElement$5 } from './p-d3kelm3z.js';
|
|
8
|
-
import { d as defineCustomElement$4 } from './p-
|
|
8
|
+
import { d as defineCustomElement$4 } from './p-cIIaCJPC.js';
|
|
9
9
|
import { d as defineCustomElement$3 } from './p-BF0muZ9G.js';
|
|
10
|
-
import { d as defineCustomElement$2 } from './p-
|
|
10
|
+
import { d as defineCustomElement$2 } from './p-DBwy7Snv.js';
|
|
11
11
|
import { d as defineCustomElement$1 } from './p-DxDoo-4C.js';
|
|
12
12
|
|
|
13
13
|
const nylasAdditionalParticipantsCss = ":host{display:block;margin:1rem;--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}.nylas-additional-participants__title{color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:600;line-height:20px;margin:0;text-align:left}.nylas-additional-participants__subtitle{color:var(--nylas-base-600);font-size:14px;font-style:normal;font-weight:400;line-height:20px;margin:0.25rem 0px 0px;text-align:left}.nylas-additional-participants__content{padding:1rem;display:flex;flex-direction:column;gap:1rem;background-color:var(--nylas-base-25)}.nylas-additional-participants__input_group{padding-top:8px;display:flex;flex-direction:column;gap:4px}.nylas-additional-participants__input_group label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:14px;font-style:normal;font-weight:400;line-height:150%}.nylas-additional-participants__input_group label span.org-as-participant{width:max-content}.nylas-additional-participants__error{color:var(--nylas-error);font-size:14px;font-family:var(--nylas-font-family);font-weight:400;line-height:16px;margin:0;text-align:left}.nylas-additional-participants__input_wrapper{display:flex;align-items:center;min-height:48px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-300)}.nylas-additional-participants__input_wrapper.error{border-color:var(--nylas-error)}.nylas-additional-participants__input_wrapper button{flex-shrink:0;padding:12px;border:none;border-left:1px solid var(--nylas-base-300);background:none;cursor:pointer;color:var(--nylas-base-800)}.nylas-additional-participants__input_wrapper button:hover,.nylas-additional-participants__input_wrapper button:active{color:var(--nylas-primary)}.nylas-additional-participants__input_wrapper_organizer{border:none}.nylas-additional-participants__input{flex:1;display:flex;align-items:center;justify-content:space-between;min-height:48px}.nylas-additional-participants__input input{border:none;outline:none;background:none;width:100%}.nylas-additional-participants__input .nylas-additional-participants__input-with-loading{position:relative;width:100%}.nylas-additional-participants__input .nylas-additional-participants__loading{position:absolute;right:48px;top:50%;transform:translateY(-50%);font-size:12px;color:var(--nylas-base-500)}.nylas-additional-participants__input input-dropdown{width:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown){width:100%;height:100%}.nylas-additional-participants__input input-dropdown::part(id_dropdown-input){min-height:48px;box-sizing:border-box;border-radius:var(--nylas-border-radius-2x);border:none;outline:none;border-top-right-radius:initial;border-bottom-right-radius:initial;padding-left:16px}.nylas-additional-participants__input input-dropdown::part(id_dropdown-content){width:100%;max-width:none;box-sizing:border-box}.nylas-additional-participants__input input-component::part(ic__input){background:var(--nylas-base-50)}.nylas-additional-participants__input input-component::part(ic__label){font-size:14px}.nylas-additional-participants__input input-component div.required-input{display:flex;gap:4px}.nylas-additional-participants__input input-component div.required-input label{display:flex;gap:4px;align-items:center}.nylas-additional-participants__input input-component div.required-input label tooltip-component#organizer_participant_tooltip::part(tc__content){left:-84px}.nylas-additional-participants__add{padding:12px;display:flex;align-items:center;border:none;background:none;cursor:pointer;color:var(--nylas-base-800)}.nylas-additional-participants__add span{padding:0 8px;font-size:16px;font-style:normal;font-weight:500}.nylas-additional-participants__add:hover,.nylas-additional-participants__add:active{color:var(--nylas-primary)}";
|
|
@@ -428,6 +428,6 @@ function defineCustomElement() {
|
|
|
428
428
|
}
|
|
429
429
|
|
|
430
430
|
export { NylasAdditionalParticipants as N, defineCustomElement as d };
|
|
431
|
-
//# sourceMappingURL=p-
|
|
431
|
+
//# sourceMappingURL=p-D_ZAV9If.js.map
|
|
432
432
|
|
|
433
|
-
//# sourceMappingURL=p-
|
|
433
|
+
//# sourceMappingURL=p-D_ZAV9If.js.map
|