@nylas/web-elements 2.2.3 → 2.2.4
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/nylas-scheduler-editor/nylas-scheduler-editor.es.js +6 -6
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +8 -4
- package/dist/cjs/{abstract-provider-DgXx6GdP.js → abstract-provider-zsdLocfY.js} +3 -3
- package/dist/cjs/{abstract-provider-DgXx6GdP.js.map → abstract-provider-zsdLocfY.js.map} +1 -1
- package/dist/cjs/calendar-agenda-fill-icon_37.cjs.entry.js +2 -2
- package/dist/cjs/checkbox-group_4.cjs.entry.js +3 -3
- package/dist/cjs/checkmark-icon_15.cjs.entry.js +2 -2
- package/dist/cjs/{customParseFormat-Bdpj2-4E.js → customParseFormat-C-iBDSmX.js} +3 -3
- package/dist/cjs/{customParseFormat-Bdpj2-4E.js.map → customParseFormat-C-iBDSmX.js.map} +1 -1
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +6 -6
- 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/multi-select-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/{nylas-api-request-DJrUeZUS.js → nylas-api-request-NWvuBdgU.js} +3 -3
- package/dist/cjs/{nylas-api-request-DJrUeZUS.js.map → nylas-api-request-NWvuBdgU.js.map} +1 -1
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js +2 -2
- package/dist/cjs/nylas-date-component_2.cjs.entry.js +2 -2
- 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 +5 -5
- package/dist/cjs/nylas-scheduling.cjs.entry.js +5 -5
- package/dist/cjs/{register-component-BUZgs2ll.js → register-component-CdldTaNr.js} +3 -3
- package/dist/cjs/{register-component-BUZgs2ll.js.map → register-component-CdldTaNr.js.map} +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js +1 -1
- package/dist/cjs/{utils-CwHkARFg.js → utils-BaL-chu7.js} +10 -3
- package/dist/{esm/utils-DnxlJ1jl.js.map → cjs/utils-BaL-chu7.js.map} +1 -1
- package/dist/collection/utils/utils.js +8 -1
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index.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-notification.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 +55 -55
- package/dist/components/nylas-scheduling-method.js +1 -1
- package/dist/components/nylas-scheduling.js +21 -21
- 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-CURQD4Ll.js → p--1ZpL3Z_.js} +8 -8
- package/dist/components/{p-CURQD4Ll.js.map → p--1ZpL3Z_.js.map} +1 -1
- package/dist/components/{p-DmZgeeQD.js → p--EFSc8kQ.js} +4 -4
- package/dist/components/{p-DmZgeeQD.js.map → p--EFSc8kQ.js.map} +1 -1
- package/dist/components/{p-dosNJKV2.js → p-B1vZbLyd.js} +4 -4
- package/dist/components/{p-dosNJKV2.js.map → p-B1vZbLyd.js.map} +1 -1
- package/dist/components/{p-DM4H8E4y.js → p-B3Mdq6rL.js} +4 -4
- package/dist/components/{p-DM4H8E4y.js.map → p-B3Mdq6rL.js.map} +1 -1
- package/dist/components/{p-DGxaBD9x.js → p-B7v1iPw1.js} +3 -3
- package/dist/components/{p-DGxaBD9x.js.map → p-B7v1iPw1.js.map} +1 -1
- package/dist/components/{p-DEy4gcRj.js → p-B86z20mN.js} +41 -41
- package/dist/components/{p-DEy4gcRj.js.map → p-B86z20mN.js.map} +1 -1
- package/dist/components/{p-CB2_BMlD.js → p-B9BW5SHF.js} +6 -6
- package/dist/components/{p-CB2_BMlD.js.map → p-B9BW5SHF.js.map} +1 -1
- package/dist/components/{p-BuZyzxqv.js → p-B9uipWU2.js} +4 -4
- package/dist/components/{p-BuZyzxqv.js.map → p-B9uipWU2.js.map} +1 -1
- package/dist/components/{p-DSO080eR.js → p-BDayBBhB.js} +5 -5
- package/dist/components/{p-DSO080eR.js.map → p-BDayBBhB.js.map} +1 -1
- package/dist/components/{p-BEAD1juA.js → p-BFNg3bKj.js} +5 -5
- package/dist/components/{p-BEAD1juA.js.map → p-BFNg3bKj.js.map} +1 -1
- package/dist/components/{p-CzJz0rnK.js → p-BI0Stv78.js} +17 -17
- package/dist/components/{p-CzJz0rnK.js.map → p-BI0Stv78.js.map} +1 -1
- package/dist/components/{p-D-2UWdRa.js → p-BKk2JkBe.js} +5 -5
- package/dist/components/{p-D-2UWdRa.js.map → p-BKk2JkBe.js.map} +1 -1
- package/dist/components/{p-C1-hLcxk.js → p-BQ1_MrWH.js} +3 -3
- package/dist/components/{p-C1-hLcxk.js.map → p-BQ1_MrWH.js.map} +1 -1
- package/dist/components/{p-D_R3qufs.js → p-BQIvfRRF.js} +3 -3
- package/dist/components/{p-D_R3qufs.js.map → p-BQIvfRRF.js.map} +1 -1
- package/dist/components/{p-mN6J_IWv.js → p-BV55-Kie.js} +5 -5
- package/dist/components/{p-mN6J_IWv.js.map → p-BV55-Kie.js.map} +1 -1
- package/dist/components/{p-CKuq2LL7.js → p-B_imcHCC.js} +5 -5
- package/dist/components/{p-CKuq2LL7.js.map → p-B_imcHCC.js.map} +1 -1
- package/dist/components/{p-CuHnb1-_.js → p-Bb0z-pD8.js} +5 -5
- package/dist/components/{p-CuHnb1-_.js.map → p-Bb0z-pD8.js.map} +1 -1
- package/dist/components/{p-5XVfomzJ.js → p-BdOvTsvK.js} +4 -4
- package/dist/components/{p-5XVfomzJ.js.map → p-BdOvTsvK.js.map} +1 -1
- package/dist/components/{p-DlaQufsy.js → p-Bm9KAv3a.js} +5 -5
- package/dist/components/{p-DlaQufsy.js.map → p-Bm9KAv3a.js.map} +1 -1
- package/dist/components/{p-DSSPyNIm.js → p-Br9o8ik9.js} +5 -5
- package/dist/components/{p-DSSPyNIm.js.map → p-Br9o8ik9.js.map} +1 -1
- package/dist/components/{p-Byz3JKQu.js → p-C5CEB4Wv.js} +4 -4
- package/dist/components/{p-Byz3JKQu.js.map → p-C5CEB4Wv.js.map} +1 -1
- package/dist/components/{p-C2yVHIMC.js → p-C8R_xU8K.js} +4 -4
- package/dist/components/{p-C2yVHIMC.js.map → p-C8R_xU8K.js.map} +1 -1
- package/dist/components/{p-BeD_Q4wQ.js → p-CEO6ZorI.js} +4 -4
- package/dist/components/{p-BeD_Q4wQ.js.map → p-CEO6ZorI.js.map} +1 -1
- package/dist/components/{p-BWZppI8r.js → p-CHDVqP3u.js} +5 -5
- package/dist/components/{p-BWZppI8r.js.map → p-CHDVqP3u.js.map} +1 -1
- package/dist/components/{p-2BdSZySU.js → p-CULO8bTo.js} +10 -3
- package/dist/components/{p-2BdSZySU.js.map → p-CULO8bTo.js.map} +1 -1
- package/dist/components/{p-Ci-3P4oO.js → p-Ce1kG2WA.js} +3 -3
- package/dist/components/{p-Ci-3P4oO.js.map → p-Ce1kG2WA.js.map} +1 -1
- package/dist/components/{p-DMDjzHug.js → p-ClSuoTwF.js} +7 -7
- package/dist/components/{p-DMDjzHug.js.map → p-ClSuoTwF.js.map} +1 -1
- package/dist/components/{p-B02Z2Glh.js → p-ClgCA2l0.js} +3 -3
- package/dist/components/{p-B02Z2Glh.js.map → p-ClgCA2l0.js.map} +1 -1
- package/dist/components/{p-CBysed0C.js → p-CrQflZZw.js} +8 -8
- package/dist/components/{p-CBysed0C.js.map → p-CrQflZZw.js.map} +1 -1
- package/dist/components/{p-Vc2ZLSUH.js → p-Cs-xmxxD.js} +4 -4
- package/dist/components/{p-Vc2ZLSUH.js.map → p-Cs-xmxxD.js.map} +1 -1
- package/dist/components/{p-CKsgq31s.js → p-Cs0aVgFp.js} +6 -6
- package/dist/components/{p-CKsgq31s.js.map → p-Cs0aVgFp.js.map} +1 -1
- package/dist/components/{p-DZGwcMTu.js → p-CtNJhj7s.js} +3 -3
- package/dist/components/{p-DZGwcMTu.js.map → p-CtNJhj7s.js.map} +1 -1
- package/dist/components/{p-DjlPLeVk.js → p-Cvb13C1p.js} +4 -4
- package/dist/components/{p-DjlPLeVk.js.map → p-Cvb13C1p.js.map} +1 -1
- package/dist/components/{p-C16rvsMT.js → p-Cw7ajY2U.js} +4 -4
- package/dist/components/{p-C16rvsMT.js.map → p-Cw7ajY2U.js.map} +1 -1
- package/dist/components/{p-Cu74bJsj.js → p-D-TAjvsg.js} +6 -6
- package/dist/components/{p-Cu74bJsj.js.map → p-D-TAjvsg.js.map} +1 -1
- package/dist/components/{p-CHs824QK.js → p-D4-3Jhnx.js} +5 -5
- package/dist/components/{p-CHs824QK.js.map → p-D4-3Jhnx.js.map} +1 -1
- package/dist/components/{p-NvfvY9LE.js → p-D50fisuR.js} +5 -5
- package/dist/components/{p-NvfvY9LE.js.map → p-D50fisuR.js.map} +1 -1
- package/dist/components/{p-CKg1LT6_.js → p-D5apK1Vq.js} +4 -4
- package/dist/components/{p-CKg1LT6_.js.map → p-D5apK1Vq.js.map} +1 -1
- package/dist/components/{p-Dfd5wo37.js → p-D6dFiHrw.js} +4 -4
- package/dist/components/{p-Dfd5wo37.js.map → p-D6dFiHrw.js.map} +1 -1
- package/dist/components/{p-C6SF5Gq_.js → p-DAJXx2tg.js} +7 -7
- package/dist/components/{p-C6SF5Gq_.js.map → p-DAJXx2tg.js.map} +1 -1
- package/dist/components/{p-MX2k8GbG.js → p-DBRBbTgP.js} +3 -3
- package/dist/components/{p-MX2k8GbG.js.map → p-DBRBbTgP.js.map} +1 -1
- package/dist/components/{p-jbmfeNc8.js → p-DCM7ntGT.js} +5 -5
- package/dist/components/{p-jbmfeNc8.js.map → p-DCM7ntGT.js.map} +1 -1
- package/dist/components/{p-CmY1th_s.js → p-DNkQVYN2.js} +8 -8
- package/dist/components/{p-CmY1th_s.js.map → p-DNkQVYN2.js.map} +1 -1
- package/dist/components/{p-CLQqLmc2.js → p-DOSWGUBW.js} +4 -4
- package/dist/components/{p-CLQqLmc2.js.map → p-DOSWGUBW.js.map} +1 -1
- package/dist/components/{p-C9ADvO-t.js → p-DTpqylfB.js} +5 -5
- package/dist/components/{p-C9ADvO-t.js.map → p-DTpqylfB.js.map} +1 -1
- package/dist/components/{p-DMpwL-p1.js → p-DUV1Jj8E.js} +4 -4
- package/dist/components/{p-DMpwL-p1.js.map → p-DUV1Jj8E.js.map} +1 -1
- package/dist/components/{p-Dq6X5eqK.js → p-DWA-qoxj.js} +5 -5
- package/dist/components/{p-Dq6X5eqK.js.map → p-DWA-qoxj.js.map} +1 -1
- package/dist/components/{p-CPMSwD22.js → p-Dh07gHmd.js} +4 -4
- package/dist/components/{p-CPMSwD22.js.map → p-Dh07gHmd.js.map} +1 -1
- package/dist/components/{p-CFOX1cL3.js → p-DjX1ll1V.js} +4 -4
- package/dist/components/{p-CFOX1cL3.js.map → p-DjX1ll1V.js.map} +1 -1
- package/dist/components/{p-BEmFBKxz.js → p-DnoDC0Rk.js} +4 -4
- package/dist/components/{p-BEmFBKxz.js.map → p-DnoDC0Rk.js.map} +1 -1
- package/dist/components/{p-x0Q884CI.js → p-Dnw0IV6v.js} +3 -3
- package/dist/components/{p-x0Q884CI.js.map → p-Dnw0IV6v.js.map} +1 -1
- package/dist/components/{p-vvfFiGWj.js → p-DpEIiPGz.js} +5 -5
- package/dist/components/{p-vvfFiGWj.js.map → p-DpEIiPGz.js.map} +1 -1
- package/dist/components/{p-BnY2Hut1.js → p-DpkYFbEV.js} +5 -5
- package/dist/components/{p-BnY2Hut1.js.map → p-DpkYFbEV.js.map} +1 -1
- package/dist/components/{p--4oNPYSm.js → p-DtDGPXZR.js} +3 -3
- package/dist/components/{p--4oNPYSm.js.map → p-DtDGPXZR.js.map} +1 -1
- package/dist/components/{p-xh3aXihe.js → p-FoOzqqac.js} +4 -4
- package/dist/components/{p-xh3aXihe.js.map → p-FoOzqqac.js.map} +1 -1
- package/dist/components/{p-Dv7dtg64.js → p-JCwXrScM.js} +4 -4
- package/dist/components/{p-Dv7dtg64.js.map → p-JCwXrScM.js.map} +1 -1
- package/dist/components/{p-1rV-8ZUh.js → p-SPJ9n09E.js} +4 -4
- package/dist/components/{p-1rV-8ZUh.js.map → p-SPJ9n09E.js.map} +1 -1
- package/dist/components/{p-BtGEJFmy.js → p-Y0BOy8RT.js} +5 -5
- package/dist/components/{p-BtGEJFmy.js.map → p-Y0BOy8RT.js.map} +1 -1
- package/dist/components/{p-Dtd_Ib72.js → p-ZAV15ivS.js} +4 -4
- package/dist/components/{p-Dtd_Ib72.js.map → p-ZAV15ivS.js.map} +1 -1
- package/dist/components/{p-Br3ELPNn.js → p-b2NfdiFD.js} +7 -7
- package/dist/components/{p-Br3ELPNn.js.map → p-b2NfdiFD.js.map} +1 -1
- package/dist/components/{p-DcoRpHVy.js → p-cT1Q8Q-G.js} +3 -3
- package/dist/components/{p-DcoRpHVy.js.map → p-cT1Q8Q-G.js.map} +1 -1
- package/dist/components/{p-BWEpzVzc.js → p-do98tB-v.js} +49 -49
- package/dist/components/{p-BWEpzVzc.js.map → p-do98tB-v.js.map} +1 -1
- package/dist/components/{p-BnOrZCZZ.js → p-eeUTE5dj.js} +5 -5
- package/dist/components/{p-BnOrZCZZ.js.map → p-eeUTE5dj.js.map} +1 -1
- package/dist/components/{p-D3Env71G.js → p-y65kyIKd.js} +5 -5
- package/dist/components/{p-D3Env71G.js.map → p-y65kyIKd.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-Q7IKOl7h.js → abstract-provider-BB9roR3Q.js} +3 -3
- package/dist/esm/{abstract-provider-Q7IKOl7h.js.map → abstract-provider-BB9roR3Q.js.map} +1 -1
- package/dist/esm/calendar-agenda-fill-icon_37.entry.js +2 -2
- package/dist/esm/checkbox-group_4.entry.js +3 -3
- package/dist/esm/checkmark-icon_15.entry.js +2 -2
- package/dist/esm/{customParseFormat-gHKplwOp.js → customParseFormat-CjpPVRFa.js} +3 -3
- package/dist/esm/{customParseFormat-gHKplwOp.js.map → customParseFormat-CjpPVRFa.js.map} +1 -1
- package/dist/esm/google-logo-icon_6.entry.js +6 -6
- 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/multi-select-dropdown.entry.js +1 -1
- package/dist/esm/{nylas-api-request-Coaaqm1X.js → nylas-api-request-CbAsnDfU.js} +3 -3
- package/dist/esm/{nylas-api-request-Coaaqm1X.js.map → nylas-api-request-CbAsnDfU.js.map} +1 -1
- package/dist/esm/nylas-booked-event-card_11.entry.js +2 -2
- package/dist/esm/nylas-date-component_2.entry.js +2 -2
- 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 +5 -5
- package/dist/esm/nylas-scheduling.entry.js +5 -5
- package/dist/esm/{register-component-Bxz7u8ui.js → register-component-ocgdvMkV.js} +3 -3
- package/dist/esm/{register-component-Bxz7u8ui.js.map → register-component-ocgdvMkV.js.map} +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/{utils-DnxlJ1jl.js → utils-C_2w_vhw.js} +10 -3
- package/dist/{cjs/utils-CwHkARFg.js.map → esm/utils-C_2w_vhw.js.map} +1 -1
- package/dist/nylas-web-elements/index.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/{p-83fab90d.entry.js → p-188523a9.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-dc3e8535.entry.js → p-219e3cc9.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-3b6e4413.entry.js → p-2262d385.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-2b2206aa.entry.js → p-2a10c747.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-aa2b9589.entry.js → p-4d43c9b1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9efadc84.entry.js → p-4ee0ae59.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-74a6fce6.entry.js → p-5cb4f7d7.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-2173b61a.entry.js → p-639a80ee.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-84c9a2b6.entry.js → p-74891f9e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-B905HoVp.js → p-C5h3pVnq.js} +2 -2
- package/dist/nylas-web-elements/{p-B905HoVp.js.map → p-C5h3pVnq.js.map} +1 -1
- package/dist/nylas-web-elements/{p-DnxlJ1jl.js → p-C_2w_vhw.js} +2 -2
- package/dist/nylas-web-elements/{p-DnxlJ1jl.js.map → p-C_2w_vhw.js.map} +1 -1
- package/dist/nylas-web-elements/{p-Bq0zsHur.js → p-D6lQUyrh.js} +2 -2
- package/dist/nylas-web-elements/{p-Bq0zsHur.js.map → p-D6lQUyrh.js.map} +1 -1
- package/dist/nylas-web-elements/{p-hL_mOqrh.js → p-Dygm6M6b.js} +2 -2
- package/dist/nylas-web-elements/{p-hL_mOqrh.js.map → p-Dygm6M6b.js.map} +1 -1
- package/dist/nylas-web-elements/{p-e2ad4b2e.entry.js → p-ad78b292.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-768e56a0.entry.js → p-d37b7367.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-4eb6d084.entry.js → p-e3bdf91a.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-f7fcae84.entry.js → p-e40b0d20.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-1b2c854d.entry.js → p-f31106cf.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-Cpf48kAH.js → p-mqq2iF4Q.js} +2 -2
- package/dist/nylas-web-elements/{p-Cpf48kAH.js.map → p-mqq2iF4Q.js.map} +1 -1
- package/package.json +1 -1
- /package/dist/nylas-web-elements/{p-83fab90d.entry.js.map → p-188523a9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-dc3e8535.entry.js.map → p-219e3cc9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3b6e4413.entry.js.map → p-2262d385.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2b2206aa.entry.js.map → p-2a10c747.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-aa2b9589.entry.js.map → p-4d43c9b1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9efadc84.entry.js.map → p-4ee0ae59.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-74a6fce6.entry.js.map → p-5cb4f7d7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2173b61a.entry.js.map → p-639a80ee.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-84c9a2b6.entry.js.map → p-74891f9e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e2ad4b2e.entry.js.map → p-ad78b292.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-768e56a0.entry.js.map → p-d37b7367.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4eb6d084.entry.js.map → p-e3bdf91a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f7fcae84.entry.js.map → p-e40b0d20.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1b2c854d.entry.js.map → p-f31106cf.entry.js.map} +0 -0
|
@@ -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, b as instance, f as convertTo12HourFormat, t as timeToMinutes, g as convertTo24HourFormat } from './p-
|
|
2
|
+
import { R as RegisterComponent } from './p-DtDGPXZR.js';
|
|
3
|
+
import { a as debug, b as instance, f as convertTo12HourFormat, t as timeToMinutes, g as convertTo24HourFormat } from './p-CULO8bTo.js';
|
|
4
4
|
import { d as defineCustomElement$7 } from './p-CGmeyeVS.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './p-Captxtpo.js';
|
|
6
6
|
import { d as defineCustomElement$5 } from './p-DGBKPOZx.js';
|
|
7
7
|
import { d as defineCustomElement$4 } from './p-_0P0Tp97.js';
|
|
8
8
|
import { d as defineCustomElement$3 } from './p-S2TOEjUD.js';
|
|
9
|
-
import { d as defineCustomElement$2 } from './p-
|
|
10
|
-
import { d as defineCustomElement$1 } from './p-
|
|
9
|
+
import { d as defineCustomElement$2 } from './p-BQ1_MrWH.js';
|
|
10
|
+
import { d as defineCustomElement$1 } from './p-ClgCA2l0.js';
|
|
11
11
|
|
|
12
12
|
const nylasSpecificTimeAvailabilityPickerCss = ":host{display:block;width:100%}.nylas-specific-time-availability-picker{display:flex;flex-direction:column;gap:1rem;border-top:1px solid var(--nylas-base-200)}.nylas-specific-time-availability-picker .content{display:flex;flex-direction:column;gap:1.5rem;padding:16px}.nylas-specific-time-availability-picker .header{display:flex;flex-direction:column;gap:0.5rem}.nylas-specific-time-availability-picker .header .header-description{margin:0;font-size:0.875rem;color:var(--nylas-base-600);line-height:1.5}.nylas-specific-time-availability-picker .specific-times{display:flex;flex-direction:column;gap:1rem}.nylas-specific-time-availability-picker .empty-state{display:flex;flex-direction:column;align-items:center;padding:2rem 1rem;text-align:center}.nylas-specific-time-availability-picker .empty-state .empty-icon{margin-bottom:1.5rem;opacity:0.4;color:var(--nylas-base-400)}.nylas-specific-time-availability-picker .empty-state .empty-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--nylas-base-700);line-height:1.5}.nylas-specific-time-availability-picker .empty-state .empty-subtitle{margin:0;font-size:0.875rem;color:var(--nylas-base-500);line-height:1.5;max-width:300px}.nylas-specific-time-availability-picker .specific-time-entry{display:flex;flex-direction:column;gap:0;padding:12px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius);background:var(--nylas-base-0)}.nylas-specific-time-availability-picker .specific-time-entry .entry-content{display:grid;grid-template-columns:160px auto 30px 30px;gap:12px}@media (max-width: 768px){.nylas-specific-time-availability-picker .specific-time-entry .entry-content{grid-template-areas:\"date calendar_toggle remove\" \"time_or_unavailable time_or_unavailable time_or_unavailable\";grid-template-columns:1fr auto auto;grid-template-rows:1fr 1fr}}.nylas-specific-time-availability-picker .specific-time-entry .date-input-container{flex:0 0 auto;width:160px}@media (max-width: 768px){.nylas-specific-time-availability-picker .specific-time-entry .date-input-container{grid-area:date}}.nylas-specific-time-availability-picker .specific-time-entry .date-input-container .date-input{width:100%}.nylas-specific-time-availability-picker .specific-time-entry .date-input-container nylas-date-component::part(ic__date){border:1px solid var(--nylas-base-200);height:50px;display:flex;align-items:center}.nylas-specific-time-availability-picker .specific-time-entry .time-pickers{display:grid;grid-template-columns:auto 10px 1fr;width:342px;gap:14px;flex:1;min-width:0}@media (max-width: 768px){.nylas-specific-time-availability-picker .specific-time-entry .time-pickers{flex:1;width:auto;grid-area:time_or_unavailable}}.nylas-specific-time-availability-picker .specific-time-entry .time-pickers .time-separator{font-size:0.875rem;color:var(--nylas-base-600);font-weight:500;flex-shrink:0;line-height:1;padding:0 0px 0px 6px;margin-top:18px}.nylas-specific-time-availability-picker .specific-time-entry .unavailable-text{flex:1;display:flex;align-items:center;padding:0 15px;border-radius:var(--nylas-border-radius);background:var(--nylas-base-50);min-height:50px}@media (max-width: 768px){.nylas-specific-time-availability-picker .specific-time-entry .unavailable-text{grid-area:time_or_unavailable}}.nylas-specific-time-availability-picker .specific-time-entry .unavailable-text .unavailable-label{font-size:0.875rem;color:var(--nylas-base-500);font-style:italic}.nylas-specific-time-availability-picker .specific-time-entry .toggle-button{display:flex;align-items:center;justify-content:center;width:40px;height:48px;padding-left:8px;border:none;border-radius:4px;background:transparent;color:var(--nylas-base-400);cursor:pointer;transition:all 0.2s ease;flex-shrink:0}@media (max-width: 768px){.nylas-specific-time-availability-picker .specific-time-entry .toggle-button{grid-area:calendar_toggle}}.nylas-specific-time-availability-picker .specific-time-entry .toggle-button:hover{color:var(--nylas-primary)}.nylas-specific-time-availability-picker .specific-time-entry .toggle-button:focus{outline:none}.nylas-specific-time-availability-picker .specific-time-entry .toggle-button.unavailable{color:var(--nylas-error)}.nylas-specific-time-availability-picker .specific-time-entry .toggle-button.unavailable:hover{color:var(--nylas-error)}.nylas-specific-time-availability-picker .specific-time-entry .remove-button{display:flex;align-items:center;justify-content:center;width:40px;height:48px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--nylas-base-400);cursor:pointer;transition:all 0.2s ease;flex-shrink:0}@media (max-width: 768px){.nylas-specific-time-availability-picker .specific-time-entry .remove-button{grid-area:remove}}.nylas-specific-time-availability-picker .specific-time-entry .remove-button:hover{color:var(--nylas-error)}.nylas-specific-time-availability-picker .specific-time-entry .remove-button:focus{outline:none;background:var(--nylas-base-100);box-shadow:0 0 0 2px var(--nylas-primary)}.nylas-specific-time-availability-picker .specific-time-entry .remove-button:active{background:var(--nylas-base-200)}.nylas-specific-time-availability-picker .specific-time-entry .error-message{width:-webkit-fill-available;padding:4px 8px;background:var(--nylas-error-50);color:var(--nylas-error);font-size:12px;border-radius:4px;border:1px solid var(--nylas-error-200);margin-top:8px}.nylas-specific-time-availability-picker .add-button-container{display:flex;justify-content:flex-start}.nylas-specific-time-availability-picker .add-button-container button-component{width:100%}::part(nstap__add-button){border:1px dashed var(--nylas-base-200);background:var(--nylas-base-0);color:var(--nylas-base-700)}::part(nstap__add-button):hover{border-color:var(--nylas-primary);background:var(--nylas-base-50);color:var(--nylas-primary)}::part(nstap__time-picker-container){flex:1;min-width:0}::part(nstap__time-picker-input){width:100%;font-size:0.875rem;min-height:50px;display:flex;align-items:center}::part(nstap__date-input){width:100%}::part(nstap__date-field){width:100%;font-size:0.875rem;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius);padding:0.5rem 0.75rem}::part(nstap__date-field):focus{border-color:var(--nylas-primary);box-shadow:0 0 0 3px rgba(59, 130, 246, 0.1)}::part(nstap__date-wrapper){margin:0}::part(nstap__date-label){margin:0;padding:0}::part(nstap__date-label) p{display:none}";
|
|
13
13
|
|
|
@@ -359,6 +359,6 @@ function defineCustomElement() {
|
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
export { NylasSpecificTimeAvailabilityPicker as N, defineCustomElement as d };
|
|
362
|
-
//# sourceMappingURL=p-
|
|
362
|
+
//# sourceMappingURL=p-Cs0aVgFp.js.map
|
|
363
363
|
|
|
364
|
-
//# sourceMappingURL=p-
|
|
364
|
+
//# sourceMappingURL=p-Cs0aVgFp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-CKsgq31s.js","mappings":";;;;;;;;;;;AAAA,MAAM,sCAAsC,GAAG,i0MAAi0M;;;;;;;;;;;;;;;;MCen2M,mCAAmC,GAAAA,kBAAA,CAAA,MAAA,mCAAA,SAAAC,CAAA,CAAA;AANhD,IAAA,WAAA,GAAA;;;;;;AAgBU,QAAA,IAAI,CAAA,IAAA,GAAW,4BAA4B;AA2C1C,QAAA,IAAmB,CAAA,mBAAA,GAMvB,EAAE;AAKE,QAAA,IAAgB,CAAA,gBAAA,GAA8B,EAAE;AAyb1D;IAvbC,iBAAiB,GAAA;AACf,QAAA,KAAK,CAAC,yCAAyC,EAAE,mBAAmB,CAAC;;IAGvE,oBAAoB,GAAA;AAClB,QAAA,KAAK,CAAC,yCAAyC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6B,EAAA,EAClE,CAAkB,CAAA,kBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAE,EAAC,6BAA6B,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAC,mBAAmB,EAAC,OAAO,EAAC,OAAO,EAAA,EAC5I,CAAA,CAAA,iBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAiB,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAG,CAAA,EACzCA,QAAO,CAAC,CAAC,CAAC,iEAAiE,CAAC,CAC5D,CACf,CACF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;AA5GX,UAAA,CAAA;AATC,IAAA,iBAAiB,CAAyH;AACzI,QAAA,IAAI,EAAE,yCAAyC;QAC/C,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,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA+GD,EAAA,mCAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.scss?tag=nylas-specific-time-availability-picker&encapsulation=shadow","src/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n}\n\n.nylas-specific-time-availability-picker {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n border-top: 1px solid var(--nylas-base-200);\n\n .content {\n display: flex;\n flex-direction: column;\n gap: 1.5rem;\n padding: 16px;\n }\n\n .header {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n\n .header-description {\n margin: 0;\n font-size: 0.875rem;\n color: var(--nylas-base-600);\n line-height: 1.5;\n }\n }\n\n .specific-times {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n\n .empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 2rem 1rem;\n text-align: center;\n\n .empty-icon {\n margin-bottom: 1.5rem;\n opacity: 0.4;\n color: var(--nylas-base-400);\n }\n\n .empty-title {\n margin: 0 0 0.5rem 0;\n font-size: 1.125rem;\n font-weight: 600;\n color: var(--nylas-base-700);\n line-height: 1.5;\n }\n\n .empty-subtitle {\n margin: 0;\n font-size: 0.875rem;\n color: var(--nylas-base-500);\n line-height: 1.5;\n max-width: 300px;\n }\n }\n\n .specific-time-entry {\n display: flex;\n flex-direction: column;\n gap: 0;\n padding: 12px;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n background: var(--nylas-base-0);\n\n .entry-content {\n display: grid;\n grid-template-columns: 160px auto 30px 30px;\n gap: 12px;\n\n @media (max-width: 768px) {\n grid-template-areas:\n 'date calendar_toggle remove'\n 'time_or_unavailable time_or_unavailable time_or_unavailable';\n grid-template-columns: 1fr auto auto;\n grid-template-rows: 1fr 1fr;\n }\n }\n\n .date-input-container {\n flex: 0 0 auto;\n width: 160px;\n @media (max-width: 768px) {\n grid-area: date;\n }\n .date-input {\n width: 100%;\n }\n nylas-date-component::part(ic__date) {\n border: 1px solid var(--nylas-base-200);\n height: 50px;\n display: flex;\n align-items: center;\n }\n }\n\n .time-pickers {\n display: grid;\n grid-template-columns: auto 10px 1fr;\n width: 342px;\n gap: 14px;\n flex: 1;\n min-width: 0;\n\n @media (max-width: 768px) {\n flex: 1;\n width: auto;\n grid-area: time_or_unavailable;\n }\n\n .time-separator {\n font-size: 0.875rem;\n color: var(--nylas-base-600);\n font-weight: 500;\n flex-shrink: 0;\n line-height: 1;\n padding: 0 0px 0px 6px;\n margin-top: 18px;\n }\n }\n\n .unavailable-text {\n flex: 1;\n display: flex;\n align-items: center;\n padding: 0 15px;\n border-radius: var(--nylas-border-radius);\n background: var(--nylas-base-50);\n min-height: 50px;\n @media (max-width: 768px) {\n grid-area: time_or_unavailable;\n }\n .unavailable-label {\n font-size: 0.875rem;\n color: var(--nylas-base-500);\n font-style: italic;\n }\n }\n\n .toggle-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 48px;\n padding-left: 8px;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: var(--nylas-base-400);\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n @media (max-width: 768px) {\n grid-area: calendar_toggle;\n }\n &:hover {\n color: var(--nylas-primary);\n }\n\n &:focus {\n outline: none;\n }\n\n &.unavailable {\n color: var(--nylas-error);\n\n &:hover {\n color: var(--nylas-error);\n }\n }\n }\n\n .remove-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 48px;\n padding: 0;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: var(--nylas-base-400);\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n @media (max-width: 768px) {\n grid-area: remove;\n }\n &:hover {\n color: var(--nylas-error);\n }\n\n &:focus {\n outline: none;\n background: var(--nylas-base-100);\n box-shadow: 0 0 0 2px var(--nylas-primary);\n }\n\n &:active {\n background: var(--nylas-base-200);\n }\n }\n\n .error-message {\n width: -webkit-fill-available;\n padding: 4px 8px;\n background: var(--nylas-error-50);\n color: var(--nylas-error);\n font-size: 12px;\n border-radius: 4px;\n border: 1px solid var(--nylas-error-200);\n margin-top: 8px;\n }\n }\n\n .add-button-container {\n display: flex;\n justify-content: flex-start;\n button-component {\n width: 100%;\n }\n }\n}\n\n// Override button-component styles for the add button\n::part(nstap__add-button) {\n border: 1px dashed var(--nylas-base-200);\n background: var(--nylas-base-0);\n color: var(--nylas-base-700);\n\n &:hover {\n border-color: var(--nylas-primary);\n background: var(--nylas-base-50);\n color: var(--nylas-primary);\n }\n}\n\n// Custom styling for time picker components\n::part(nstap__time-picker-container) {\n flex: 1;\n min-width: 0;\n}\n\n::part(nstap__time-picker-input) {\n width: 100%;\n font-size: 0.875rem;\n min-height: 50px;\n display: flex;\n align-items: center;\n}\n\n// Custom styling for date input component\n::part(nstap__date-input) {\n width: 100%;\n}\n\n::part(nstap__date-field) {\n width: 100%;\n font-size: 0.875rem;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 0.5rem 0.75rem;\n\n &:focus {\n border-color: var(--nylas-primary);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n }\n}\n\n::part(nstap__date-wrapper) {\n margin: 0;\n}\n\n::part(nstap__date-label) {\n margin: 0;\n padding: 0;\n\n p {\n display: none; // Hide label since we don't need it\n }\n}\n","import { AttachInternals, Component, Element, Event, EventEmitter, h, Host, Prop, Watch, State, Listen } from '@stencil/core';\nimport { RegisterComponent } from '@/common/register-component';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { Configuration, SpecificTimeAvailability, ThemeConfig } from '@nylas/core';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { debug, convertTo12HourFormat, convertTo24HourFormat, timeToMinutes } from '@/utils/utils';\nimport i18next from '@/utils/i18n';\n\n@Component({\n tag: 'nylas-specific-time-availability-picker',\n styleUrl: 'nylas-specific-time-availability-picker.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasSpecificTimeAvailabilityPicker {\n /**\n * The element <nylas-specific-time-availability-picker> itself.\n */\n @Element() host!: HTMLNylasSpecificTimeAvailabilityPickerElement;\n\n /**\n * @standalone\n * The name of the specific date availability picker.\n */\n @Prop() name: string = 'specific-time-availability';\n\n /**\n * @standalone\n * The selected configuration.\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * @standalone\n * The specific date open hours.\n */\n @Prop() specificTimesAvailability?: SpecificTimeAvailability[];\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * @standalone\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The event is fired when the specific date open hours change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * Internal state for managing specific date entries\n */\n @State() specificDateEntries: Array<{\n id: string;\n date: string;\n startTime: string;\n endTime: string;\n isUnavailable: boolean;\n }> = [];\n\n /**\n * State for tracking validation errors\n */\n @State() validationErrors: { [key: string]: string } = {};\n\n connectedCallback() {\n debug('nylas-specific-time-availability-picker', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-specific-time-availability-picker', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-specific-time-availability-picker', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-specific-time-availability-picker', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.configChangedHandler(this.selectedConfiguration);\n } else if (this.specificTimesAvailability && this.specificTimesAvailability.length > 0) {\n this.loadSpecificTimeAvailability();\n }\n this.applyThemeConfig(this.themeConfig);\n }\n\n get isInternalsAvailable() {\n return typeof this.internals.setFormValue === 'function';\n }\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-specific-time-availability-picker', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newConfig: Configuration) {\n debug('nylas-specific-time-availability-picker', 'configChangedHandler', newConfig);\n // Load specific date open hours from the configuration participants\n this.loadSpecificTimeAvailability();\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 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 loadSpecificTimeAvailability() {\n if (!this.specificTimesAvailability || this.specificTimesAvailability.length === 0) {\n return;\n }\n\n const entries = this.specificTimesAvailability.map((item, index) => {\n // Check if both start and end are \"00:00\" - this indicates an unavailable day\n const isUnavailable = item.start === '00:00' && item.end === '00:00';\n\n return {\n id: `specific-time-${index}`,\n date: item.date,\n startTime: isUnavailable ? '09:00am' : convertTo12HourFormat(item.start),\n endTime: isUnavailable ? '05:00pm' : convertTo12HourFormat(item.end),\n isUnavailable,\n };\n });\n\n this.specificDateEntries = entries;\n this.emitValueChanged();\n }\n\n addSpecificTimeAvailability() {\n // Initialize with incremental dates based on existing entries\n // First entry: today, second entry: tomorrow, third entry: day after, etc.\n const today = new Date();\n const targetDate = new Date(today);\n targetDate.setDate(today.getDate() + this.specificDateEntries.length);\n const formattedDate = targetDate.toISOString().split('T')[0];\n\n const newEntry = {\n id: `specific-time-${Date.now()}`,\n date: formattedDate,\n startTime: '09:00am',\n endTime: '05:00pm',\n isUnavailable: false,\n };\n\n this.specificDateEntries = [...this.specificDateEntries, newEntry];\n\n // Clear any global validation errors since we're adding a new valid entry\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n\n this.emitValueChanged();\n }\n\n removeSpecificTimeAvailability(id: string) {\n this.specificDateEntries = this.specificDateEntries.filter(entry => entry.id !== id);\n\n // Clear validation error for the removed entry\n if (this.validationErrors[id]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[id];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n\n toggleAvailability(id: string) {\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === id) {\n return { ...entry, isUnavailable: !entry.isUnavailable };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry since availability state changed\n if (this.validationErrors[id]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[id];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n\n /**\n * Validates a single date entry\n */\n validateEntry(entry: (typeof this.specificDateEntries)[0]): string | null {\n // Check if date is empty or invalid\n if (!entry.date) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.dateRequired');\n }\n\n const dateObj = new Date(entry.date);\n if (isNaN(dateObj.getTime())) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.invalidDateFormat');\n }\n\n // If unavailable, no need to validate times\n if (entry.isUnavailable) {\n return null;\n }\n\n // Validate start and end times are present\n if (!entry.startTime || !entry.endTime) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.timesRequired');\n }\n\n // Validate start time is before end time\n const startMinutes = timeToMinutes(entry.startTime);\n const endMinutes = timeToMinutes(entry.endTime);\n\n if (startMinutes >= endMinutes) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.startTimeBeforeEndTime');\n }\n\n return null;\n }\n\n /**\n * Validates all entries and updates validation state\n */\n validateAllEntries() {\n const errors: { [key: string]: string } = {};\n let hasErrors = false;\n\n this.specificDateEntries.forEach(entry => {\n const error = this.validateEntry(entry);\n if (error) {\n errors[entry.id] = error;\n hasErrors = true;\n }\n });\n\n this.validationErrors = errors;\n\n // Update form validity\n if (hasErrors) {\n const firstErrorElement = this.host.shadowRoot?.querySelector(`[data-entry-id=\"${Object.keys(errors)[0]}\"]`) as HTMLElement;\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: true }, 'Please fix validation errors', firstErrorElement);\n }\n } else {\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n }\n\n return !hasErrors;\n }\n\n @Listen('timeChange')\n handleTimeChange(event: CustomEvent<{ key: string; value: string }>) {\n const { key, value } = event.detail;\n const [entryId, timeType] = key.split('_');\n\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === entryId) {\n return {\n ...entry,\n [timeType === 'start' ? 'startTime' : 'endTime']: value,\n };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry\n if (this.validationErrors[entryId]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n }\n\n // Clear form validity errors related to time\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n\n this.emitValueChanged();\n }\n\n @Listen('timeWindowFormError')\n setFormError(event: CustomEvent<{ key: string; message: string }>) {\n const { key, message } = event.detail;\n const [entryId] = key.split('_');\n\n if (message) {\n // Set validation error for this entry\n this.validationErrors = {\n ...this.validationErrors,\n [entryId]: message,\n };\n\n const element = this.host.shadowRoot?.getElementById(key);\n if (element && this.isInternalsAvailable) {\n this.internals.setValidity({ customError: true }, message, element as HTMLInputElement);\n }\n } else {\n // Clear validation error for this entry\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n }\n }\n\n @Listen('nylasFormInputChanged')\n handleFormInputChange(event: CustomEvent<{ value: string; name: string; label: string; type: string; error: string }>) {\n const { name, value } = event.detail;\n\n // Check if this is a date input for our component\n if (name.startsWith('date-') && name.includes('specific-time-')) {\n const entryId = name.replace('date-', '');\n\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === entryId) {\n return { ...entry, date: value };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry\n if (this.validationErrors[entryId]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n }\n\n emitValueChanged() {\n // Validate all entries before emitting\n const isValid = this.validateAllEntries();\n\n const specificTimesAvailability = this.specificDateEntries\n .filter(entry => entry.date && (entry.isUnavailable || (entry.startTime && entry.endTime)))\n .map(entry => ({\n date: entry.date,\n start: entry.isUnavailable ? '00:00' : convertTo24HourFormat(entry.startTime),\n end: entry.isUnavailable ? '00:00' : convertTo24HourFormat(entry.endTime),\n }));\n\n const value = JSON.stringify(specificTimesAvailability);\n\n if (this.isInternalsAvailable && isValid) {\n this.internals.setFormValue(value, this.name);\n }\n\n this.valueChanged.emit({\n value,\n name: this.name,\n });\n }\n\n @RegisterComponent<NylasSpecificTimeAvailabilityPicker, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-specific-time-availability-picker',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-specific-time-availability-picker\" part=\"nstap\">\n <div class=\"content\" part=\"nstap__content\">\n <div class=\"header\" part=\"nstap__header\">\n <p class=\"header-description\" part=\"nstap__header-description\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.headerDescription')}\n </p>\n </div>\n <div class=\"specific-times\" part=\"nstap__specific-times\">\n {this.specificDateEntries.length === 0 ? (\n <div class=\"empty-state\" part=\"nstap__empty-state\">\n <div class=\"empty-icon\" part=\"nstap__empty-icon\">\n <calendar-icon width=\"32\" height=\"32\" />\n </div>\n <h3 class=\"empty-title\" part=\"nstap__empty-title\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.title')}\n </h3>\n <p class=\"empty-subtitle\" part=\"nstap__empty-subtitle\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.subtitle')}\n </p>\n </div>\n ) : (\n this.specificDateEntries.map(entry => (\n <div class=\"specific-time-entry\" part=\"nstap__specific-time-entry\" key={entry.id} data-entry-id={entry.id}>\n <div class=\"entry-content\" part=\"nstap__entry-content\">\n <div class=\"date-input-container\" part=\"nstap__date-input-container\">\n <nylas-date-component\n name={`date-${entry.id}`}\n defaultValue={entry.date}\n placeholder=\"yyyy-mm-dd\"\n part=\"nstap__date-input\"\n class=\"date-input\"\n themeConfig={this.themeConfig}\n exportparts=\"ic__date: nstap__date-field, ic__input_wrapper: nstap__date-wrapper, ic__label: nstap__date-label\"\n />\n </div>\n {entry.isUnavailable ? (\n <div class=\"unavailable-text\" part=\"nstap__unavailable-text\">\n <span class=\"unavailable-label\">{i18next.t('nylasSpecificTimeAvailabilityPicker.entireDayUnavailable')}</span>\n </div>\n ) : (\n <div class=\"time-pickers\" part=\"nstap__time-pickers\">\n <nylas-time-window-picker\n id={`${entry.id}_start`}\n time={entry.startTime}\n name={`${entry.id}_start`}\n key={`${entry.id}_start`}\n language={this.selectedLanguage}\n hasError={!!this.validationErrors[entry.id]}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times\"\n />\n <span class=\"time-separator\">-</span>\n <nylas-time-window-picker\n id={`${entry.id}_end`}\n time={entry.endTime}\n name={`${entry.id}_end`}\n key={`${entry.id}_end`}\n minimumStartTime={entry.startTime}\n language={this.selectedLanguage}\n hasError={!!this.validationErrors[entry.id]}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times\"\n />\n </div>\n )}\n <button\n type=\"button\"\n class={{ 'toggle-button': true, 'unavailable': entry.isUnavailable }}\n part=\"nstap__toggle-button\"\n onClick={() => this.toggleAvailability(entry.id)}\n title={\n entry.isUnavailable\n ? i18next.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')\n : i18next.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable')\n }\n >\n <calendar-icon width=\"20\" height=\"20\" />\n </button>\n <button\n type=\"button\"\n class=\"remove-button\"\n part=\"nstap__remove-button\"\n onClick={() => this.removeSpecificTimeAvailability(entry.id)}\n aria-label=\"Remove specific date\"\n >\n <close-icon width=\"16\" height=\"16\" />\n </button>\n </div>\n {this.validationErrors[entry.id] && (\n <div class=\"error-message\" part=\"nstap__error-message\">\n {this.validationErrors[entry.id]}\n </div>\n )}\n </div>\n ))\n )}\n </div>\n <div class=\"add-button-container\" part=\"nstap__add-button-container\">\n <button-component id=\"add-specific-time-open-hour\" onClick={() => this.addSpecificTimeAvailability()} part=\"nstap__add-button\" variant=\"basic\">\n <add-circle-icon width=\"24\" height=\"24\" />\n {i18next.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability')}\n </button-component>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-Cs0aVgFp.js","mappings":";;;;;;;;;;;AAAA,MAAM,sCAAsC,GAAG,i0MAAi0M;;;;;;;;;;;;;;;;MCen2M,mCAAmC,GAAAA,kBAAA,CAAA,MAAA,mCAAA,SAAAC,CAAA,CAAA;AANhD,IAAA,WAAA,GAAA;;;;;;AAgBU,QAAA,IAAI,CAAA,IAAA,GAAW,4BAA4B;AA2C1C,QAAA,IAAmB,CAAA,mBAAA,GAMvB,EAAE;AAKE,QAAA,IAAgB,CAAA,gBAAA,GAA8B,EAAE;AAyb1D;IAvbC,iBAAiB,GAAA;AACf,QAAA,KAAK,CAAC,yCAAyC,EAAE,mBAAmB,CAAC;;IAGvE,oBAAoB,GAAA;AAClB,QAAA,KAAK,CAAC,yCAAyC,EAAE,sBAAsB,CAAC;;IAG1E,iBAAiB,GAAA;AACf,QAAA,KAAK,CAAC,yCAAyC,EAAE,mBAAmB,CAAC;QACrE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;;IAG3C,gBAAgB,GAAA;AACd,QAAA,KAAK,CAAC,yCAAyC,EAAE,kBAAkB,CAAC;AAC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0CAAA,EAAiB,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAG,CAAA,EACzCA,QAAO,CAAC,CAAC,CAAC,iEAAiE,CAAC,CAC5D,CACf,CACF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;AA5GX,UAAA,CAAA;AATC,IAAA,iBAAiB,CAAyH;AACzI,QAAA,IAAI,EAAE,yCAAyC;QAC/C,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,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA+GD,EAAA,mCAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.scss?tag=nylas-specific-time-availability-picker&encapsulation=shadow","src/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n}\n\n.nylas-specific-time-availability-picker {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n border-top: 1px solid var(--nylas-base-200);\n\n .content {\n display: flex;\n flex-direction: column;\n gap: 1.5rem;\n padding: 16px;\n }\n\n .header {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n\n .header-description {\n margin: 0;\n font-size: 0.875rem;\n color: var(--nylas-base-600);\n line-height: 1.5;\n }\n }\n\n .specific-times {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n\n .empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 2rem 1rem;\n text-align: center;\n\n .empty-icon {\n margin-bottom: 1.5rem;\n opacity: 0.4;\n color: var(--nylas-base-400);\n }\n\n .empty-title {\n margin: 0 0 0.5rem 0;\n font-size: 1.125rem;\n font-weight: 600;\n color: var(--nylas-base-700);\n line-height: 1.5;\n }\n\n .empty-subtitle {\n margin: 0;\n font-size: 0.875rem;\n color: var(--nylas-base-500);\n line-height: 1.5;\n max-width: 300px;\n }\n }\n\n .specific-time-entry {\n display: flex;\n flex-direction: column;\n gap: 0;\n padding: 12px;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n background: var(--nylas-base-0);\n\n .entry-content {\n display: grid;\n grid-template-columns: 160px auto 30px 30px;\n gap: 12px;\n\n @media (max-width: 768px) {\n grid-template-areas:\n 'date calendar_toggle remove'\n 'time_or_unavailable time_or_unavailable time_or_unavailable';\n grid-template-columns: 1fr auto auto;\n grid-template-rows: 1fr 1fr;\n }\n }\n\n .date-input-container {\n flex: 0 0 auto;\n width: 160px;\n @media (max-width: 768px) {\n grid-area: date;\n }\n .date-input {\n width: 100%;\n }\n nylas-date-component::part(ic__date) {\n border: 1px solid var(--nylas-base-200);\n height: 50px;\n display: flex;\n align-items: center;\n }\n }\n\n .time-pickers {\n display: grid;\n grid-template-columns: auto 10px 1fr;\n width: 342px;\n gap: 14px;\n flex: 1;\n min-width: 0;\n\n @media (max-width: 768px) {\n flex: 1;\n width: auto;\n grid-area: time_or_unavailable;\n }\n\n .time-separator {\n font-size: 0.875rem;\n color: var(--nylas-base-600);\n font-weight: 500;\n flex-shrink: 0;\n line-height: 1;\n padding: 0 0px 0px 6px;\n margin-top: 18px;\n }\n }\n\n .unavailable-text {\n flex: 1;\n display: flex;\n align-items: center;\n padding: 0 15px;\n border-radius: var(--nylas-border-radius);\n background: var(--nylas-base-50);\n min-height: 50px;\n @media (max-width: 768px) {\n grid-area: time_or_unavailable;\n }\n .unavailable-label {\n font-size: 0.875rem;\n color: var(--nylas-base-500);\n font-style: italic;\n }\n }\n\n .toggle-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 48px;\n padding-left: 8px;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: var(--nylas-base-400);\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n @media (max-width: 768px) {\n grid-area: calendar_toggle;\n }\n &:hover {\n color: var(--nylas-primary);\n }\n\n &:focus {\n outline: none;\n }\n\n &.unavailable {\n color: var(--nylas-error);\n\n &:hover {\n color: var(--nylas-error);\n }\n }\n }\n\n .remove-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 48px;\n padding: 0;\n border: none;\n border-radius: 4px;\n background: transparent;\n color: var(--nylas-base-400);\n cursor: pointer;\n transition: all 0.2s ease;\n flex-shrink: 0;\n @media (max-width: 768px) {\n grid-area: remove;\n }\n &:hover {\n color: var(--nylas-error);\n }\n\n &:focus {\n outline: none;\n background: var(--nylas-base-100);\n box-shadow: 0 0 0 2px var(--nylas-primary);\n }\n\n &:active {\n background: var(--nylas-base-200);\n }\n }\n\n .error-message {\n width: -webkit-fill-available;\n padding: 4px 8px;\n background: var(--nylas-error-50);\n color: var(--nylas-error);\n font-size: 12px;\n border-radius: 4px;\n border: 1px solid var(--nylas-error-200);\n margin-top: 8px;\n }\n }\n\n .add-button-container {\n display: flex;\n justify-content: flex-start;\n button-component {\n width: 100%;\n }\n }\n}\n\n// Override button-component styles for the add button\n::part(nstap__add-button) {\n border: 1px dashed var(--nylas-base-200);\n background: var(--nylas-base-0);\n color: var(--nylas-base-700);\n\n &:hover {\n border-color: var(--nylas-primary);\n background: var(--nylas-base-50);\n color: var(--nylas-primary);\n }\n}\n\n// Custom styling for time picker components\n::part(nstap__time-picker-container) {\n flex: 1;\n min-width: 0;\n}\n\n::part(nstap__time-picker-input) {\n width: 100%;\n font-size: 0.875rem;\n min-height: 50px;\n display: flex;\n align-items: center;\n}\n\n// Custom styling for date input component\n::part(nstap__date-input) {\n width: 100%;\n}\n\n::part(nstap__date-field) {\n width: 100%;\n font-size: 0.875rem;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 0.5rem 0.75rem;\n\n &:focus {\n border-color: var(--nylas-primary);\n box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);\n }\n}\n\n::part(nstap__date-wrapper) {\n margin: 0;\n}\n\n::part(nstap__date-label) {\n margin: 0;\n padding: 0;\n\n p {\n display: none; // Hide label since we don't need it\n }\n}\n","import { AttachInternals, Component, Element, Event, EventEmitter, h, Host, Prop, Watch, State, Listen } from '@stencil/core';\nimport { RegisterComponent } from '@/common/register-component';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { Configuration, SpecificTimeAvailability, ThemeConfig } from '@nylas/core';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { debug, convertTo12HourFormat, convertTo24HourFormat, timeToMinutes } from '@/utils/utils';\nimport i18next from '@/utils/i18n';\n\n@Component({\n tag: 'nylas-specific-time-availability-picker',\n styleUrl: 'nylas-specific-time-availability-picker.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasSpecificTimeAvailabilityPicker {\n /**\n * The element <nylas-specific-time-availability-picker> itself.\n */\n @Element() host!: HTMLNylasSpecificTimeAvailabilityPickerElement;\n\n /**\n * @standalone\n * The name of the specific date availability picker.\n */\n @Prop() name: string = 'specific-time-availability';\n\n /**\n * @standalone\n * The selected configuration.\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * @standalone\n * The specific date open hours.\n */\n @Prop() specificTimesAvailability?: SpecificTimeAvailability[];\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * @standalone\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The event is fired when the specific date open hours change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * Internal state for managing specific date entries\n */\n @State() specificDateEntries: Array<{\n id: string;\n date: string;\n startTime: string;\n endTime: string;\n isUnavailable: boolean;\n }> = [];\n\n /**\n * State for tracking validation errors\n */\n @State() validationErrors: { [key: string]: string } = {};\n\n connectedCallback() {\n debug('nylas-specific-time-availability-picker', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-specific-time-availability-picker', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-specific-time-availability-picker', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-specific-time-availability-picker', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.configChangedHandler(this.selectedConfiguration);\n } else if (this.specificTimesAvailability && this.specificTimesAvailability.length > 0) {\n this.loadSpecificTimeAvailability();\n }\n this.applyThemeConfig(this.themeConfig);\n }\n\n get isInternalsAvailable() {\n return typeof this.internals.setFormValue === 'function';\n }\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-specific-time-availability-picker', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newConfig: Configuration) {\n debug('nylas-specific-time-availability-picker', 'configChangedHandler', newConfig);\n // Load specific date open hours from the configuration participants\n this.loadSpecificTimeAvailability();\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 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 loadSpecificTimeAvailability() {\n if (!this.specificTimesAvailability || this.specificTimesAvailability.length === 0) {\n return;\n }\n\n const entries = this.specificTimesAvailability.map((item, index) => {\n // Check if both start and end are \"00:00\" - this indicates an unavailable day\n const isUnavailable = item.start === '00:00' && item.end === '00:00';\n\n return {\n id: `specific-time-${index}`,\n date: item.date,\n startTime: isUnavailable ? '09:00am' : convertTo12HourFormat(item.start),\n endTime: isUnavailable ? '05:00pm' : convertTo12HourFormat(item.end),\n isUnavailable,\n };\n });\n\n this.specificDateEntries = entries;\n this.emitValueChanged();\n }\n\n addSpecificTimeAvailability() {\n // Initialize with incremental dates based on existing entries\n // First entry: today, second entry: tomorrow, third entry: day after, etc.\n const today = new Date();\n const targetDate = new Date(today);\n targetDate.setDate(today.getDate() + this.specificDateEntries.length);\n const formattedDate = targetDate.toISOString().split('T')[0];\n\n const newEntry = {\n id: `specific-time-${Date.now()}`,\n date: formattedDate,\n startTime: '09:00am',\n endTime: '05:00pm',\n isUnavailable: false,\n };\n\n this.specificDateEntries = [...this.specificDateEntries, newEntry];\n\n // Clear any global validation errors since we're adding a new valid entry\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n\n this.emitValueChanged();\n }\n\n removeSpecificTimeAvailability(id: string) {\n this.specificDateEntries = this.specificDateEntries.filter(entry => entry.id !== id);\n\n // Clear validation error for the removed entry\n if (this.validationErrors[id]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[id];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n\n toggleAvailability(id: string) {\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === id) {\n return { ...entry, isUnavailable: !entry.isUnavailable };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry since availability state changed\n if (this.validationErrors[id]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[id];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n\n /**\n * Validates a single date entry\n */\n validateEntry(entry: (typeof this.specificDateEntries)[0]): string | null {\n // Check if date is empty or invalid\n if (!entry.date) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.dateRequired');\n }\n\n const dateObj = new Date(entry.date);\n if (isNaN(dateObj.getTime())) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.invalidDateFormat');\n }\n\n // If unavailable, no need to validate times\n if (entry.isUnavailable) {\n return null;\n }\n\n // Validate start and end times are present\n if (!entry.startTime || !entry.endTime) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.timesRequired');\n }\n\n // Validate start time is before end time\n const startMinutes = timeToMinutes(entry.startTime);\n const endMinutes = timeToMinutes(entry.endTime);\n\n if (startMinutes >= endMinutes) {\n return i18next.t('nylasSpecificTimeAvailabilityPicker.errors.startTimeBeforeEndTime');\n }\n\n return null;\n }\n\n /**\n * Validates all entries and updates validation state\n */\n validateAllEntries() {\n const errors: { [key: string]: string } = {};\n let hasErrors = false;\n\n this.specificDateEntries.forEach(entry => {\n const error = this.validateEntry(entry);\n if (error) {\n errors[entry.id] = error;\n hasErrors = true;\n }\n });\n\n this.validationErrors = errors;\n\n // Update form validity\n if (hasErrors) {\n const firstErrorElement = this.host.shadowRoot?.querySelector(`[data-entry-id=\"${Object.keys(errors)[0]}\"]`) as HTMLElement;\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: true }, 'Please fix validation errors', firstErrorElement);\n }\n } else {\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n }\n\n return !hasErrors;\n }\n\n @Listen('timeChange')\n handleTimeChange(event: CustomEvent<{ key: string; value: string }>) {\n const { key, value } = event.detail;\n const [entryId, timeType] = key.split('_');\n\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === entryId) {\n return {\n ...entry,\n [timeType === 'start' ? 'startTime' : 'endTime']: value,\n };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry\n if (this.validationErrors[entryId]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n }\n\n // Clear form validity errors related to time\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n\n this.emitValueChanged();\n }\n\n @Listen('timeWindowFormError')\n setFormError(event: CustomEvent<{ key: string; message: string }>) {\n const { key, message } = event.detail;\n const [entryId] = key.split('_');\n\n if (message) {\n // Set validation error for this entry\n this.validationErrors = {\n ...this.validationErrors,\n [entryId]: message,\n };\n\n const element = this.host.shadowRoot?.getElementById(key);\n if (element && this.isInternalsAvailable) {\n this.internals.setValidity({ customError: true }, message, element as HTMLInputElement);\n }\n } else {\n // Clear validation error for this entry\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: false });\n }\n }\n }\n\n @Listen('nylasFormInputChanged')\n handleFormInputChange(event: CustomEvent<{ value: string; name: string; label: string; type: string; error: string }>) {\n const { name, value } = event.detail;\n\n // Check if this is a date input for our component\n if (name.startsWith('date-') && name.includes('specific-time-')) {\n const entryId = name.replace('date-', '');\n\n this.specificDateEntries = this.specificDateEntries.map(entry => {\n if (entry.id === entryId) {\n return { ...entry, date: value };\n }\n return entry;\n });\n\n // Clear any existing validation error for this entry\n if (this.validationErrors[entryId]) {\n const newErrors = { ...this.validationErrors };\n delete newErrors[entryId];\n this.validationErrors = newErrors;\n }\n\n this.emitValueChanged();\n }\n }\n\n emitValueChanged() {\n // Validate all entries before emitting\n const isValid = this.validateAllEntries();\n\n const specificTimesAvailability = this.specificDateEntries\n .filter(entry => entry.date && (entry.isUnavailable || (entry.startTime && entry.endTime)))\n .map(entry => ({\n date: entry.date,\n start: entry.isUnavailable ? '00:00' : convertTo24HourFormat(entry.startTime),\n end: entry.isUnavailable ? '00:00' : convertTo24HourFormat(entry.endTime),\n }));\n\n const value = JSON.stringify(specificTimesAvailability);\n\n if (this.isInternalsAvailable && isValid) {\n this.internals.setFormValue(value, this.name);\n }\n\n this.valueChanged.emit({\n value,\n name: this.name,\n });\n }\n\n @RegisterComponent<NylasSpecificTimeAvailabilityPicker, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-specific-time-availability-picker',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-specific-time-availability-picker\" part=\"nstap\">\n <div class=\"content\" part=\"nstap__content\">\n <div class=\"header\" part=\"nstap__header\">\n <p class=\"header-description\" part=\"nstap__header-description\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.headerDescription')}\n </p>\n </div>\n <div class=\"specific-times\" part=\"nstap__specific-times\">\n {this.specificDateEntries.length === 0 ? (\n <div class=\"empty-state\" part=\"nstap__empty-state\">\n <div class=\"empty-icon\" part=\"nstap__empty-icon\">\n <calendar-icon width=\"32\" height=\"32\" />\n </div>\n <h3 class=\"empty-title\" part=\"nstap__empty-title\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.title')}\n </h3>\n <p class=\"empty-subtitle\" part=\"nstap__empty-subtitle\">\n {i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.subtitle')}\n </p>\n </div>\n ) : (\n this.specificDateEntries.map(entry => (\n <div class=\"specific-time-entry\" part=\"nstap__specific-time-entry\" key={entry.id} data-entry-id={entry.id}>\n <div class=\"entry-content\" part=\"nstap__entry-content\">\n <div class=\"date-input-container\" part=\"nstap__date-input-container\">\n <nylas-date-component\n name={`date-${entry.id}`}\n defaultValue={entry.date}\n placeholder=\"yyyy-mm-dd\"\n part=\"nstap__date-input\"\n class=\"date-input\"\n themeConfig={this.themeConfig}\n exportparts=\"ic__date: nstap__date-field, ic__input_wrapper: nstap__date-wrapper, ic__label: nstap__date-label\"\n />\n </div>\n {entry.isUnavailable ? (\n <div class=\"unavailable-text\" part=\"nstap__unavailable-text\">\n <span class=\"unavailable-label\">{i18next.t('nylasSpecificTimeAvailabilityPicker.entireDayUnavailable')}</span>\n </div>\n ) : (\n <div class=\"time-pickers\" part=\"nstap__time-pickers\">\n <nylas-time-window-picker\n id={`${entry.id}_start`}\n time={entry.startTime}\n name={`${entry.id}_start`}\n key={`${entry.id}_start`}\n language={this.selectedLanguage}\n hasError={!!this.validationErrors[entry.id]}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times\"\n />\n <span class=\"time-separator\">-</span>\n <nylas-time-window-picker\n id={`${entry.id}_end`}\n time={entry.endTime}\n name={`${entry.id}_end`}\n key={`${entry.id}_end`}\n minimumStartTime={entry.startTime}\n language={this.selectedLanguage}\n hasError={!!this.validationErrors[entry.id]}\n themeConfig={this.themeConfig}\n exportparts=\"time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times\"\n />\n </div>\n )}\n <button\n type=\"button\"\n class={{ 'toggle-button': true, 'unavailable': entry.isUnavailable }}\n part=\"nstap__toggle-button\"\n onClick={() => this.toggleAvailability(entry.id)}\n title={\n entry.isUnavailable\n ? i18next.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')\n : i18next.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable')\n }\n >\n <calendar-icon width=\"20\" height=\"20\" />\n </button>\n <button\n type=\"button\"\n class=\"remove-button\"\n part=\"nstap__remove-button\"\n onClick={() => this.removeSpecificTimeAvailability(entry.id)}\n aria-label=\"Remove specific date\"\n >\n <close-icon width=\"16\" height=\"16\" />\n </button>\n </div>\n {this.validationErrors[entry.id] && (\n <div class=\"error-message\" part=\"nstap__error-message\">\n {this.validationErrors[entry.id]}\n </div>\n )}\n </div>\n ))\n )}\n </div>\n <div class=\"add-button-container\" part=\"nstap__add-button-container\">\n <button-component id=\"add-specific-time-open-hour\" onClick={() => this.addSpecificTimeAvailability()} part=\"nstap__add-button\" variant=\"basic\">\n <add-circle-icon width=\"24\" height=\"24\" />\n {i18next.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability')}\n </button-component>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, F as Fragment, i as Host } from './p-Bht9ktsW.js';
|
|
2
|
-
import { a as debug } from './p-
|
|
2
|
+
import { a as debug } from './p-CULO8bTo.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './p-_0P0Tp97.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './p-Ce7p0KXO.js';
|
|
5
5
|
|
|
@@ -116,6 +116,6 @@ function defineCustomElement() {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
export { NylasNotification as N, defineCustomElement as d };
|
|
119
|
-
//# sourceMappingURL=p-
|
|
119
|
+
//# sourceMappingURL=p-CtNJhj7s.js.map
|
|
120
120
|
|
|
121
|
-
//# sourceMappingURL=p-
|
|
121
|
+
//# sourceMappingURL=p-CtNJhj7s.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-DZGwcMTu.js","mappings":";;;;;AAAA,MAAM,oBAAoB,GAAG,qsGAAqsG;;MCartG,iBAAiB,GAAAA,kBAAA,CAAA,MAAA,iBAAA,SAAAC,CAAA,CAAA;AAL9B,IAAA,WAAA,GAAA;;;;AAWU,QAAA,IAAG,CAAA,GAAA,GAAoB,IAAI;AAC3B,QAAA,IAAiB,CAAA,iBAAA,GAAa,CAAC,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,iBAAiB,CAAC;AAClF,QAAA,IAAa,CAAA,aAAA,GAAmB,EAAE;AA2G5C;AAxGC,IAAA,OAAO,CAAC,KAAqE,EAAA;QAC3E,KAAK,CAAC,CAA+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AI,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,EAAA,EAC3E,CAAc,CAAA,YAAA,EAAA,IAAA,CAAA,CACP,CACL,CACP,CAAC,EACF,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACC,CACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/scheduler/nylas-notification/nylas-notification.scss?tag=nylas-notification&encapsulation=shadow","src/components/scheduler/nylas-notification/nylas-notification.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n margin-bottom: -12px; // offset for the rounded border\n width: 100%;\n z-index: 1;\n @include default-css-variables;\n}\n.notif {\n display: flex;\n padding: 17px;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n border-radius: var(--nylas-border-radius-2x);\n border: 1.5px solid var(--nylas-error);\n background: var(--nylas-base-0);\n\n @media #{$mobile} {\n width: auto;\n }\n .content {\n display: flex;\n flex-direction: row;\n gap: 8px;\n .message {\n font-size: 14px;\n font-weight: 400;\n color: var(--nylas-base-800);\n .title {\n font-size: 16px;\n font-weight: 600;\n color: var(--nylas-base-950);\n display: block;\n }\n .description {\n font-size: 14px;\n font-weight: 400;\n color: var(--nylas-base-800);\n display: block;\n word-break: break-word;\n }\n }\n .icon {\n &.error {\n color: var(--nylas-error);\n }\n }\n }\n\n &.error {\n border-color: var(--nylas-error);\n background: rgba(255, 248, 248, 1);\n }\n &.warning {\n border-color: var(--nylas-warning);\n }\n &.info {\n border-color: var(--nylas-info);\n }\n &.success {\n border-color: var(--nylas-success);\n }\n\n .dismiss-btn {\n background: none;\n border: none;\n color: var(--nylas-base-950);\n cursor: pointer;\n }\n}\n","import { Notification } from '@nylas/core';\nimport { Component, Fragment, Host, Listen, Prop, State, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\nimport { Element } from '@stencil/core';\n\n/**\n * The `nylas-notification` component is a UI component that displays notifications.\n */\n@Component({\n tag: 'nylas-notification',\n styleUrl: 'nylas-notification.scss',\n shadow: true,\n})\nexport class NylasNotification {\n @Element() host!: HTMLElement;\n\n /**\n * The time-to-live for notifications in milliseconds. Set to 'none' to disable auto-dismissal.\n */\n @Prop() ttl: number | 'none' = 5000;\n @Prop() allowedCategories: string[] = ['component', 'api', 'validation', 'invalid_session'];\n @State() notifications: Notification[] = [];\n\n @Listen('nylasSchedulerError', { target: 'body' })\n onError(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Error: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerWarning', { target: 'body' })\n onWarning(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Warning: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerInfo', { target: 'body' })\n onInfo(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Info: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerSuccess', { target: 'body' })\n onSuccess(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Success: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n @Listen('dismissNotification', { target: 'body' })\n onDismissNotification(event: CustomEvent<{ id: string }>) {\n this.dismissNotification(event.detail.id);\n }\n\n isChildOf(parentHost: HTMLElement): boolean {\n let parent = this.host.parentNode;\n\n while (parent) {\n if (parent === parentHost) {\n return true;\n }\n if (parent instanceof ShadowRoot) {\n parent = parent.host;\n } else {\n parent = parent.parentNode;\n }\n }\n\n return false;\n }\n\n private handleNotification(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n const parentHost = event.detail.host;\n if (event.defaultPrevented) {\n debug(`[nylas-notification] Event default prevented`);\n return;\n }\n if (parentHost && !this.isChildOf(parentHost)) {\n debug(`[nylas-notification] Host not a parent`);\n return;\n }\n if (this.ttl === 0) {\n debug(`[nylas-notification] TTL is 0`);\n return;\n }\n if (this.allowedCategories.length > 0 && !this.allowedCategories.includes(event.detail.notification.category)) {\n debug(`[nylas-notification] Category not allowed`);\n return;\n }\n if (this.notifications.find(notif => notif.id === event.detail.notification.id)) {\n debug(`[nylas-notification] Notification already exists`);\n return;\n }\n\n this.notifications = [...this.notifications, { ...event.detail.notification }];\n if (event.detail.notification.ttl !== 'none') {\n const ttl = event.detail.notification.ttl ? event.detail.notification.ttl : (this.ttl as number);\n window.setTimeout(() => {\n this.notifications = this.notifications.filter(notif => notif.id !== event.detail.notification.id);\n }, ttl);\n }\n }\n\n private dismissNotification(id: string) {\n this.notifications = this.notifications.filter(notif => notif.id !== id);\n }\n\n render() {\n return (\n <Host>\n <Fragment>\n {this.notifications.map(notif => (\n <div class={`notif ${notif.type}`} key={notif.id}>\n <div class=\"content\">\n <span class={`icon ${notif.type}`}>{(notif.type === 'error' || notif.type === 'warning') && <warning-icon />}</span>\n <span class=\"message\">\n <span class=\"title\">{notif.title}</span>\n {notif.description && <span class=\"description\">{notif.description}</span>}\n </span>\n </div>\n <button class=\"dismiss-btn\" onClick={() => this.dismissNotification(notif.id)}>\n <close-icon />\n </button>\n </div>\n ))}\n <slot />\n </Fragment>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-CtNJhj7s.js","mappings":";;;;;AAAA,MAAM,oBAAoB,GAAG,qsGAAqsG;;MCartG,iBAAiB,GAAAA,kBAAA,CAAA,MAAA,iBAAA,SAAAC,CAAA,CAAA;AAL9B,IAAA,WAAA,GAAA;;;;AAWU,QAAA,IAAG,CAAA,GAAA,GAAoB,IAAI;AAC3B,QAAA,IAAiB,CAAA,iBAAA,GAAa,CAAC,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,iBAAiB,CAAC;AAClF,QAAA,IAAa,CAAA,aAAA,GAAmB,EAAE;AA2G5C;AAxGC,IAAA,OAAO,CAAC,KAAqE,E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a,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,EAAA,EAC3E,CAAc,CAAA,YAAA,EAAA,IAAA,CAAA,CACP,CACL,CACP,CAAC,EACF,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACC,CACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/scheduler/nylas-notification/nylas-notification.scss?tag=nylas-notification&encapsulation=shadow","src/components/scheduler/nylas-notification/nylas-notification.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n margin-bottom: -12px; // offset for the rounded border\n width: 100%;\n z-index: 1;\n @include default-css-variables;\n}\n.notif {\n display: flex;\n padding: 17px;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n border-radius: var(--nylas-border-radius-2x);\n border: 1.5px solid var(--nylas-error);\n background: var(--nylas-base-0);\n\n @media #{$mobile} {\n width: auto;\n }\n .content {\n display: flex;\n flex-direction: row;\n gap: 8px;\n .message {\n font-size: 14px;\n font-weight: 400;\n color: var(--nylas-base-800);\n .title {\n font-size: 16px;\n font-weight: 600;\n color: var(--nylas-base-950);\n display: block;\n }\n .description {\n font-size: 14px;\n font-weight: 400;\n color: var(--nylas-base-800);\n display: block;\n word-break: break-word;\n }\n }\n .icon {\n &.error {\n color: var(--nylas-error);\n }\n }\n }\n\n &.error {\n border-color: var(--nylas-error);\n background: rgba(255, 248, 248, 1);\n }\n &.warning {\n border-color: var(--nylas-warning);\n }\n &.info {\n border-color: var(--nylas-info);\n }\n &.success {\n border-color: var(--nylas-success);\n }\n\n .dismiss-btn {\n background: none;\n border: none;\n color: var(--nylas-base-950);\n cursor: pointer;\n }\n}\n","import { Notification } from '@nylas/core';\nimport { Component, Fragment, Host, Listen, Prop, State, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\nimport { Element } from '@stencil/core';\n\n/**\n * The `nylas-notification` component is a UI component that displays notifications.\n */\n@Component({\n tag: 'nylas-notification',\n styleUrl: 'nylas-notification.scss',\n shadow: true,\n})\nexport class NylasNotification {\n @Element() host!: HTMLElement;\n\n /**\n * The time-to-live for notifications in milliseconds. Set to 'none' to disable auto-dismissal.\n */\n @Prop() ttl: number | 'none' = 5000;\n @Prop() allowedCategories: string[] = ['component', 'api', 'validation', 'invalid_session'];\n @State() notifications: Notification[] = [];\n\n @Listen('nylasSchedulerError', { target: 'body' })\n onError(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Error: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerWarning', { target: 'body' })\n onWarning(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Warning: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerInfo', { target: 'body' })\n onInfo(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Info: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerSuccess', { target: 'body' })\n onSuccess(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n debug(`[nylas-notification] Success: ${event.detail.notification.title}`);\n this.handleNotification(event);\n }\n\n @Listen('dismissNotification', { target: 'body' })\n onDismissNotification(event: CustomEvent<{ id: string }>) {\n this.dismissNotification(event.detail.id);\n }\n\n isChildOf(parentHost: HTMLElement): boolean {\n let parent = this.host.parentNode;\n\n while (parent) {\n if (parent === parentHost) {\n return true;\n }\n if (parent instanceof ShadowRoot) {\n parent = parent.host;\n } else {\n parent = parent.parentNode;\n }\n }\n\n return false;\n }\n\n private handleNotification(event: CustomEvent<{ notification: Notification; host: HTMLElement }>) {\n const parentHost = event.detail.host;\n if (event.defaultPrevented) {\n debug(`[nylas-notification] Event default prevented`);\n return;\n }\n if (parentHost && !this.isChildOf(parentHost)) {\n debug(`[nylas-notification] Host not a parent`);\n return;\n }\n if (this.ttl === 0) {\n debug(`[nylas-notification] TTL is 0`);\n return;\n }\n if (this.allowedCategories.length > 0 && !this.allowedCategories.includes(event.detail.notification.category)) {\n debug(`[nylas-notification] Category not allowed`);\n return;\n }\n if (this.notifications.find(notif => notif.id === event.detail.notification.id)) {\n debug(`[nylas-notification] Notification already exists`);\n return;\n }\n\n this.notifications = [...this.notifications, { ...event.detail.notification }];\n if (event.detail.notification.ttl !== 'none') {\n const ttl = event.detail.notification.ttl ? event.detail.notification.ttl : (this.ttl as number);\n window.setTimeout(() => {\n this.notifications = this.notifications.filter(notif => notif.id !== event.detail.notification.id);\n }, ttl);\n }\n }\n\n private dismissNotification(id: string) {\n this.notifications = this.notifications.filter(notif => notif.id !== id);\n }\n\n render() {\n return (\n <Host>\n <Fragment>\n {this.notifications.map(notif => (\n <div class={`notif ${notif.type}`} key={notif.id}>\n <div class=\"content\">\n <span class={`icon ${notif.type}`}>{(notif.type === 'error' || notif.type === 'warning') && <warning-icon />}</span>\n <span class=\"message\">\n <span class=\"title\">{notif.title}</span>\n {notif.description && <span class=\"description\">{notif.description}</span>}\n </span>\n </div>\n <button class=\"dismiss-btn\" onClick={() => this.dismissNotification(notif.id)}>\n <close-icon />\n </button>\n </div>\n ))}\n <slot />\n </Fragment>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
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, b as instance, s as sanitize } from './p-
|
|
2
|
+
import { R as RegisterComponent } from './p-DtDGPXZR.js';
|
|
3
|
+
import { a as debug, b as instance, s as sanitize } from './p-CULO8bTo.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './p-7S1M5IE9.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './p-C6fgjGAL.js';
|
|
6
6
|
|
|
@@ -144,6 +144,6 @@ function defineCustomElement() {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
export { NylasCancellationPolicy as N, defineCustomElement as d };
|
|
147
|
-
//# sourceMappingURL=p-
|
|
147
|
+
//# sourceMappingURL=p-Cvb13C1p.js.map
|
|
148
148
|
|
|
149
|
-
//# sourceMappingURL=p-
|
|
149
|
+
//# sourceMappingURL=p-Cvb13C1p.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-Cvb13C1p.js","mappings":";;;;;;AAAA,MAAM,0BAA0B,GAAG,i3FAAi3F;;;;;;;;;;;;;;;;MCoBv4F,uBAAuB,GAAAA,kBAAA,CAAA,MAAA,uBAAA,SAAAC,CAAA,CAAA;AANpC,IAAA,WAAA,GAAA;;;;;;AA2BU,QAAA,IAAI,CAAA,IAAA,GAAW,qBAAqB;AA4H7C;AAhGC,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,mCAAmC,CAAC,QAAuB,EAAA;AACzD,QAAA,KAAK,CAAC,2BAA2B,EAAE,qCAAqC,EAAE,QAAQ,CAAC;AACnF,QAAA,IAAI,CAAC,OAAO,GAAG,QAAQ,EAAE,SAAS,EAAE,mBAAmB,IAAI,IAAI,CAAC,kBAAkB,IAAI,EAAE;;IAI1F,8BAA8B,CAAC,MAAqB,EAAE,MAAqB,EAAA;QACzE,IAAI,MAAM,KAAK,MAAM;YAAE;AACvB,QAAAC,QAAO,CAAC,cAAc,CAAC,MAAM,CAAC;;IAIhC,yBAAyB,CAAC,MAAmB,EAAE,MAAmB,EAAA;QAChE,IAAI,MAAM,KAAK,MAAM;YAAE;AACvB,QAAA,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;;IAW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B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAkBD,EAAA,uBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.scss?tag=nylas-cancellation-policy&encapsulation=shadow","src/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-cancellation-policy {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n\n /* 21px */\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n\n textarea {\n padding: 12px 16px;\n border-width: 1;\n resize: vertical;\n border-radius: 8px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n border: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n\n &::-webkit-resizer {\n display: none;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-cancellation-policy` component is a form input for the cancellation policy message of an event.\n * @part ncpolicy - The cancellation policy container\n * @part ncpolicy__textarea - The cancellation policy textarea\n */\n@Component({\n tag: 'nylas-cancellation-policy',\n styleUrl: 'nylas-cancellation-policy.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasCancellationPolicy {\n /**\n * The host element <nylas-cancellation-policy>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The cancellation policy stored in the configuration\n */\n @Prop() cancellationPolicy?: string;\n\n /**\n * @standalone\n * The name of the cancellation policy input.\n */\n @Prop() name: string = 'cancellation-policy';\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 * The selected cancellation policy state. This defaults to the cancellation policy from the configuration or an empty string.\n */\n @State() message!: string;\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\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-cancellation-policy', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n this.message = newValue?.scheduler?.cancellation_policy || this.cancellationPolicy || '';\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 /**\n * Event emitted when the cancellation policy message changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-cancellation-policy', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-cancellation-policy', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-cancellation-policy', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.message = this.cancellationPolicy || '';\n }\n }\n\n disconnectedCallback() {\n debug('nylas-cancellation-policy', 'disconnectedCallback');\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.message = value;\n this.internals.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\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<NylasCancellationPolicy, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-cancellation-policy',\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-cancellation-policy\" part=\"ncpolicy\">\n <label htmlFor={this.name}>\n {i18next.t('nylasCancellationPolicy.cancellationPolicyLabel')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasCancellationPolicy.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <textarea id={this.name} part=\"ncpolicy__textarea\" name={this.name} value={this.message} maxlength=\"250\" onInput={e => this.handleChange(e)}></textarea>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
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, b as instance, s as sanitize } from './p-
|
|
2
|
+
import { R as RegisterComponent } from './p-DtDGPXZR.js';
|
|
3
|
+
import { a as debug, b as instance, s as sanitize } from './p-CULO8bTo.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './p-PeEnpB8P.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './p-BHbBCKUj.js';
|
|
6
6
|
|
|
@@ -334,6 +334,6 @@ function defineCustomElement() {
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
export { NylasPageStyling as N, defineCustomElement as d };
|
|
337
|
-
//# sourceMappingURL=p-
|
|
337
|
+
//# sourceMappingURL=p-Cw7ajY2U.js.map
|
|
338
338
|
|
|
339
|
-
//# sourceMappingURL=p-
|
|
339
|
+
//# sourceMappingURL=p-Cw7ajY2U.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-C16rvsMT.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,woNAAwoN;;;;;;;;;;;;;;;;MC6CvpN,gBAAgB,GAAAA,kBAAA,CAAA,MAAA,gBAAA,SAAAC,CAAA,CAAA;AAN7B,IAAA,WAAA,GAAA;;;;;;;AAiBU,QAAA,IAAI,CAAA,IAAA,GAAW,cAAc;AAU7B,QAAA,IAAM,CAAA,MAAA,GAAY,IAAI;AAqBrB,QAAA,IAAgB,CAAA,gBAAA,GAAmB,IAAI;AAsWjD;IArVC,iBAAiB,GAAA;AACf,QAAA,KAAK,CAAC,oBAAoB,EAAE,mBAAmB,CAAC;;IAGlD,oBAAoB,GAAA;AAClB,QAAA,KAAK,CAAC,oBAAoB,EAAE,sBAAsB,CAAC;;IAGrD,iBAAiB,GAAA;AACf,QAAA,KAAK,CAAC,oBAAoB,EAAE,mBAAmB,CAAC;QAEhD,IAAI,CAAC,IAAI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,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-page-styling/nylas-page-styling.scss?tag=nylas-page-styling&encapsulation=shadow","src/components/scheduler-editor/nylas-page-styling/nylas-page-styling.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-page-styling {\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 text-align: left;\n\n .hidden {\n display: none;\n }\n\n &.no-border {\n border: none;\n }\n\n .header {\n padding: 1rem;\n display: grid;\n grid-template-columns: 1fr auto;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n border-radius: var(--nylas-border-radius-2x);\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 }\n\n .drawer-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 .nylas-page-styling__body {\n display: grid;\n grid-template-columns: 1fr auto;\n background-color: var(--nylas-base-25);\n border-radius: 0 0 var(--nylas-border-radius-2x);\n\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n\n .nylas-page-styling__section {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n color: var(--nylas-base-800);\n\n &.no-padding {\n padding: 0;\n }\n\n @media #{$mobile} {\n border: none;\n }\n\n .nylas-page-styling__row {\n display: grid;\n grid-template-columns: 1fr;\n align-items: center;\n\n label {\n display: flex;\n align-items: center;\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 p {\n margin: 0.25rem 0 0 0;\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--nylas-base-900);\n }\n\n .subsection {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n\n &.hide {\n display: none;\n }\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 .input-container,\n >* {\n display: flex;\n flex-direction: column;\n column-gap: 2rem;\n row-gap: 0.25rem;\n width: 100%;\n flex: 1;\n\n textarea {\n padding: 12px 16px;\n border-width: 1;\n resize: vertical;\n border-radius: 8px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n border: 1px solid var(--nylas-base-200);\n }\n }\n }\n }\n }\n\n span.error-message {\n color: var(--nylas-error);\n }\n\n span.help-text {\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 }\n }\n}","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } 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 { Appearance, Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-page-styling` component is a UI component that allows users to customize the styling of the scheduling page.\n * To use this component, pass a slot `custom-page-style-inputs` to the `nylas-scheduler-editor` component with the input\n * fields you want to display. The component will automatically update the appearance object when the input fields are changed.\n * Ensure that the input fields have the `name` attribute set to the key in the appearance object.\n *\n * If you want to style the Nylas hosted scheduler page, you can use this component to customize the appearance of the page.\n * The fields that can be customized in the Nylas hosted scheduler page are:\n * - Primary color: (name: color)\n * - Company logo: (name: company_logo_url)\n * - Submit button label: (name: submit_button_label)\n * - Thank you message: (name: thank_you_message)\n *\n * This component cannot be used as an independent component. It must be used within the `nylas-scheduler-editor` component.\n *\n * @slot custom-page-style-inputs - This slot is used to pass a custom page style form to the Nylas Scheduler Editor component.\n * @part nps - The nylas-page-styling container\n * @part nps__header - The header of the page styling section\n * @part nps__drawer-toggle--container - The page styling drawer toggle container\n * @part nps__body - The body of the page styling section\n * @part nps__title-input-textfield - The page styling page title input textfield\n * @part nps__company-name-input-textfield - The page styling company name input textfield\n * @part nps__input-image-url - The page styling company logo input textfield\n * @part nps__color-picker - The page styling color picker\n * @part nps__color-picker-button - The page styling color picker button\n * @part nps__color-picker-button-label - The page styling color input field label *\n * @part nps__color-picker-button-selected-label - The page styling color picker label denoting which color is selected\n * @part nps__submit-button-label-input-textfield - The page styling submut button label input textfield\n * @part nps__message-textarea - The page styling thank you message textarea\n */\n@Component({\n tag: 'nylas-page-styling',\n styleUrl: 'nylas-page-styling.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasPageStyling {\n @Element() host!: HTMLNylasPageStylingElement;\n /**\n * @internal\n * The selected configuration.\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @internal\n * The name of the component\n */\n @Prop() name: string = 'page-styling';\n /**\n * @internal\n * The appearance data to display\n */\n @Prop() appearance?: Appearance;\n /**\n * @internal\n * Is the page styling card open\n */\n @Prop() isOpen: boolean = true;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The confirmation email template state.\n */\n @State() currentAppearance!: Appearance;\n /**\n * The confirmation email template state.\n */\n @State() customInputsSlot: Element | null = null;\n\n /**\n * This event is fired when the email reminders change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n /**\n * This event is fired when the form is submitted in the parent component.\n */\n @Event() bookingFormSubmitted!: EventEmitter<void>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-page-styling', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-page-styling', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-page-styling', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-page-styling', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n }\n }\n\n componentWillUpdate() {\n debug('nylas-page-styling', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-page-styling', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-page-styling', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-page-styling', 'componentDidRender');\n }\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-page-styling', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\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 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 customInputsSlotChangedHandler(newValue: Element | null) {\n debug('nylas-page-styling', 'customInputsSlotChangedHandler', newValue);\n\n const appearance = this.currentAppearance;\n\n function updateInputDefaultValues(element: HTMLElement) {\n // Process elements with a 'name' attribute\n if (element.hasAttribute && element.hasAttribute('name')) {\n const key = element.getAttribute('name');\n if (appearance && key && key in appearance && appearance[key] !== undefined) {\n // Update attributes based on component type\n const componentType = element.getAttribute('component-type');\n\n element.setAttribute('data-page-styling', 'true');\n\n if (componentType === 'checkbox') {\n element.setAttribute('checked', appearance[key]);\n } else if (componentType === 'radio-group') {\n element.setAttribute('default-selected-value', appearance[key]);\n } else if (componentType === 'color-picker') {\n element.setAttribute('default-selected-color', appearance[key]);\n } else if (componentType === 'select-dropdown') {\n const options = element.getAttribute('options');\n const selectedOption = options ? JSON.parse(options).find((option: { value: string }) => option.value === appearance[key]) : null;\n element.setAttribute('default-selected-option', JSON.stringify(selectedOption));\n } else if (componentType === 'image-url') {\n element.setAttribute('image-url', appearance[key]);\n } else {\n // Default case: set the default value\n element.setAttribute('default-value', appearance[key]);\n }\n }\n }\n\n // Recursively process child elements (skip text nodes)\n element.childNodes.forEach(child => {\n if (child.nodeType === Node.ELEMENT_NODE) {\n updateInputDefaultValues(child as HTMLElement); // Cast child to HTMLElement\n }\n });\n }\n\n // Start the recursive process with the cloned element (newValue)\n if (newValue) {\n updateInputDefaultValues(newValue as HTMLElement);\n }\n }\n\n cloneAndCopyProps(element: HTMLElement): HTMLElement {\n // Clone the current element\n const clonedElement = element.cloneNode(false) as HTMLElement; // Do a shallow clone first\n const componentType = element.getAttribute('component-type');\n const key = element.getAttribute('name');\n\n // Copy properties like 'options' and 'value' for custom elements\n if ((element as any).options) {\n const options = (element as any).getAttribute('options');\n console.log('page-styling options', element, options);\n if (typeof options === 'string') {\n try {\n const parsedOptions = JSON.parse(options);\n (clonedElement as any).options = parsedOptions; // Parse the 'options' string\n if (componentType === 'select-dropdown' && key && key in this.currentAppearance) {\n const selectedOption = parsedOptions.find((option: { value: string }) => option.value === this.currentAppearance[key]);\n (clonedElement as any).setAttribute('default-selected-option', JSON.stringify(selectedOption));\n }\n } catch (e) {\n console.error('Error parsing options', e);\n }\n } else {\n (clonedElement as any).options = (element as any).options; // Copy 'options' property\n }\n }\n\n if ((element as any).value) {\n (clonedElement as any).value = (element as any).value; // Copy 'value' property\n }\n\n // Recursively process child elements\n element.childNodes.forEach(child => {\n if (child.nodeType === Node.ELEMENT_NODE) {\n // If the child is an element, recursively clone and process it\n const clonedChild = this.cloneAndCopyProps(child as HTMLElement);\n clonedElement.appendChild(clonedChild); // Append the cloned child to the parent clone\n } else if (child.nodeType === Node.TEXT_NODE) {\n // For text nodes, just clone and append the text content\n clonedElement.appendChild(child.cloneNode(true));\n }\n });\n\n return clonedElement; // Return the cloned element with its children\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-page-styling', 'selectedConfigurationChangedHandler', newValue);\n this.currentAppearance = newValue?.appearance || {};\n // Get the slot element\n const editor = document.querySelector('nylas-scheduler-editor');\n const slotElement = editor?.shadowRoot?.querySelector('slot[name=\"custom-page-style-inputs\"]') as HTMLSlotElement;\n if (!slotElement) {\n return;\n }\n\n const divElement = document.createElement('div');\n\n // Get the slotted content (the nodes passed into the slot)\n const slottedElements = slotElement?.assignedElements({ flatten: true });\n // Clone each of the slotted nodes and append them to the cloned slot\n slottedElements?.forEach(element => {\n const clonedElement = this.cloneAndCopyProps(element as HTMLElement); // Clone recursively and copy properties\n\n // Clone the slotted element (deep clone)\n this.customInputsSlotChangedHandler(clonedElement);\n // Append the cloned element to the document fragment\n divElement.appendChild(clonedElement);\n });\n\n // Replace the original content with the new cloned and updated content\n const bodyElement = this.host.shadowRoot?.querySelector('.nylas-page-styling');\n const slotContainer = bodyElement?.querySelector('.nylas-page-styling__body .subsection');\n\n if (slotContainer) {\n // Remove existing children (if necessary) and append the new content\n slotContainer.innerHTML = ''; // Clear existing content\n divElement.childNodes.forEach(child => {\n slotContainer.appendChild(child); // Append each child of divElement\n });\n this.customInputsSlot = divElement;\n }\n }\n\n checkIfElementIsInSlot(name: string): boolean {\n const findElement = document?.querySelector(`[slot=\"custom-page-style-inputs\"] [name=\"${name}\"]`);\n return findElement ? true : false;\n }\n\n @Listen('nylasFormInputChanged', { target: 'document' })\n async nylasFormInputChangeHandler(event: CustomEvent<{ value: string; name: string; type?: string }>) {\n const { name, value } = event.detail;\n const type = event.detail?.type;\n\n if (!this.checkIfElementIsInSlot(name)) {\n return;\n }\n switch (name) {\n case 'submit_button_label':\n this.currentAppearance = { ...this.currentAppearance, submit_button_label: value };\n break;\n case 'thank_you_message':\n if (type === 'multi_line_text') {\n const value = sanitize(event.detail.value);\n this.currentAppearance = { ...this.currentAppearance, thank_you_message: value };\n }\n break;\n default:\n this.currentAppearance = { ...this.currentAppearance, [name]: value };\n break;\n }\n this.updateConfirmationFormValue();\n }\n\n @Listen('nylasFormDropdownChanged', { target: 'document' })\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-page-styling', 'nylasFormDropdownChangedHandler', event.detail);\n const { value, name } = event.detail;\n\n if (!this.checkIfElementIsInSlot(name)) {\n return;\n }\n if (name === 'color') {\n this.currentAppearance = { ...this.currentAppearance, color: value };\n } else {\n this.currentAppearance = { ...this.currentAppearance, [name]: value };\n }\n this.updateConfirmationFormValue();\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-page-styling', 'valueChangedHandler', event.detail);\n const { value, name } = event.detail;\n\n if (!this.checkIfElementIsInSlot(name)) {\n return;\n }\n this.currentAppearance = { ...this.currentAppearance, [name]: value };\n this.updateConfirmationFormValue(false);\n }\n\n @Listen('nylasFormCheckboxToggled', { target: 'document' })\n checkboxToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: string }>) {\n const { checked, name } = event.detail;\n if (!this.checkIfElementIsInSlot(name)) {\n return;\n }\n this.currentAppearance = { ...this.currentAppearance, [name]: checked };\n this.updateConfirmationFormValue();\n }\n\n @Listen('nylasFormRadioChanged', { target: 'document' })\n radioChangedHandler(event: CustomEvent<{ value: string; name: string; label: string; type: string }>) {\n const { value, name } = event.detail;\n if (!this.checkIfElementIsInSlot(name)) {\n return;\n }\n this.currentAppearance = { ...this.currentAppearance, [name]: value };\n this.updateConfirmationFormValue();\n }\n\n updateConfirmationFormValue(valueChanged: boolean = true) {\n debug('nylas-page-styling', 'updateConfirmationFormValue');\n this.internals.setFormValue(JSON.stringify(this.currentAppearance), this.name);\n if (valueChanged) {\n this.valueChanged.emit({ value: JSON.stringify(this.currentAppearance), name: this.name });\n }\n }\n\n toggleConfirmationEmail() {\n this.isOpen = !this.isOpen;\n }\n\n @RegisterComponent<NylasPageStyling, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-page-styling',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div part=\"nps\" class={{ 'nylas-page-styling': true, 'no-border': !this.customInputsSlot }}>\n {this.customInputsSlot ? (\n <div class=\"header\" part=\"nps__header\">\n <div>\n <h3>{i18next.t('nylasPageStyling.headerTitle')}</h3>\n </div>\n <div class=\"drawer-toggle\" part=\"nps__drawer-toggle--container\">\n <span class={`chevron ${this.isOpen ? 'open' : 'closed'} `} onClick={() => this.toggleConfirmationEmail()}>\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n ) : null}\n <div class=\"hidden\">\n <input-color-picker name=\"color-picker\" />\n </div>\n <div id=\"nylas-page-styling__body\" class=\"nylas-page-styling__body\" part=\"nps__body\">\n <div class={{ 'nylas-page-styling__section': true, 'no-padding': !this.customInputsSlot }}>\n <div class=\"nylas-page-styling__row\">\n <div class={{ subsection: true, hide: !this.isOpen }}></div>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-Cw7ajY2U.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,woNAAwoN;;;;;;;;;;;;;;;;MC6CvpN,gBAAgB,GAAAA,kBAAA,CAAA,MAAA,gBAAA,SAAAC,CAAA,CAAA;AAN7B,IAAA,WAAA,GAAA;;;;;;;AAiBU,QAAA,IAAI,CAAA,IAAA,GAAW,cAAc;AAU7B,QAAA,IAAM,CAAA,MAAA,GAAY,IAAI;AAqBrB,QAAA,IAAgB,CAAA,gBAAA,GAAmB,IAAI;AAsWjD;IArVC,iBAAiB,GAAA;AACf,QAAA,KAAK,CAAC,oBAAoB,EAAE,mBAAmB,CAAC;;IAGlD,oBAAoB,GAAA;AAClB,QAAA,KAAK,CAAC,oBAAoB,EAAE,sBAAsB,CAAC;;IAGrD,iBAAiB,GAAA;AACf,QAAA,KAAK,CAAC,oBAAoB,EAAE,mBAAmB,CAAC;QAEhD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;;IAG3C,gBAAgB,GAAA;AACd,QAAA,KAAK,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;AAC/C,QAAA,IAAI,IAAI,CAAC,qBAAqB,EAAE;AAC9B,YAAA,IAAI,CAAC,mCAAmC,CAAC,I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AAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,EAAE,6BAA6B,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAA,EACvF,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,yBAAyB,EAAA,EAClC,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,EAAQ,CAAA,CACxD,CACF,CACF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;AA3BX,UAAA,CAAA;AArBC,IAAA,iBAAiB,CAAsG;AACtH,QAAA,IAAI,EAAE,oBAAoB;QAC1B,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;AACZ,YAAA,YAAY,EAAE,OACZ,KAAiI,EACjI,8BAA6D,KAC3D;AACF,gBAAA,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,MAAM;gBAErC,IAAI,YAAY,EAAE;oBAChB,YAAY,CAAC,KAAK,CAAC;;aAEtB;AACF,SAAA;AACD,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA8BD,EAAA,gBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-page-styling/nylas-page-styling.scss?tag=nylas-page-styling&encapsulation=shadow","src/components/scheduler-editor/nylas-page-styling/nylas-page-styling.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-page-styling {\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 text-align: left;\n\n .hidden {\n display: none;\n }\n\n &.no-border {\n border: none;\n }\n\n .header {\n padding: 1rem;\n display: grid;\n grid-template-columns: 1fr auto;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n border-radius: var(--nylas-border-radius-2x);\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 }\n\n .drawer-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 .nylas-page-styling__body {\n display: grid;\n grid-template-columns: 1fr auto;\n background-color: var(--nylas-base-25);\n border-radius: 0 0 var(--nylas-border-radius-2x);\n\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n\n .nylas-page-styling__section {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n color: var(--nylas-base-800);\n\n &.no-padding {\n padding: 0;\n }\n\n @media #{$mobile} {\n border: none;\n }\n\n .nylas-page-styling__row {\n display: grid;\n grid-template-columns: 1fr;\n align-items: center;\n\n label {\n display: flex;\n align-items: center;\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 p {\n margin: 0.25rem 0 0 0;\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--nylas-base-900);\n }\n\n .subsection {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n\n &.hide {\n display: none;\n }\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 .input-container,\n >* {\n display: flex;\n flex-direction: column;\n column-gap: 2rem;\n row-gap: 0.25rem;\n width: 100%;\n flex: 1;\n\n textarea {\n padding: 12px 16px;\n border-width: 1;\n resize: vertical;\n border-radius: 8px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n border: 1px solid var(--nylas-base-200);\n }\n }\n }\n }\n }\n\n span.error-message {\n color: var(--nylas-error);\n }\n\n span.help-text {\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 }\n }\n}","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } 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 { Appearance, Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-page-styling` component is a UI component that allows users to customize the styling of the scheduling page.\n * To use this component, pass a slot `custom-page-style-inputs` to the `nylas-scheduler-editor` component with the input\n * fields you want to display. The component will automatically update the appearance object when the input fields are changed.\n * Ensure that the input fields have the `name` attribute set to the key in the appearance object.\n *\n * If you want to style the Nylas hosted scheduler page, you can use this component to customize the appearance of the page.\n * The fields that can be customized in the Nylas hosted scheduler page are:\n * - Primary color: (name: color)\n * - Company logo: (name: company_logo_url)\n * - Submit button label: (name: submit_button_label)\n * - Thank you message: (name: thank_you_message)\n *\n * This component cannot be used as an independent component. It must be used within the `nylas-scheduler-editor` component.\n *\n * @slot custom-page-style-inputs - This slot is used to pass a custom page style form to the Nylas Scheduler Editor component.\n * @part nps - The nylas-page-styling container\n * @part nps__header - The header of the page styling section\n * @part nps__drawer-toggle--container - The page styling drawer toggle container\n * @part nps__body - The body of the page styling section\n * @part nps__title-input-textfield - The page styling page title input textfield\n * @part nps__company-name-input-textfield - The page styling company name input textfield\n * @part nps__input-image-url - The page styling company logo input textfield\n * @part nps__color-picker - The page styling color picker\n * @part nps__color-picker-button - The page styling color picker button\n * @part nps__color-picker-button-label - The page styling color input field label *\n * @part nps__color-picker-button-selected-label - The page styling color picker label denoting which color is selected\n * @part nps__submit-button-label-input-textfield - The page styling submut button label input textfield\n * @part nps__message-textarea - The page styling thank you message textarea\n */\n@Component({\n tag: 'nylas-page-styling',\n styleUrl: 'nylas-page-styling.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasPageStyling {\n @Element() host!: HTMLNylasPageStylingElement;\n /**\n * @internal\n * The selected configuration.\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @internal\n * The name of the component\n */\n @Prop() name: string = 'page-styling';\n /**\n * @internal\n * The appearance data to display\n */\n @Prop() appearance?: Appearance;\n /**\n * @internal\n * Is the page styling card open\n */\n @Prop() isOpen: boolean = true;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The confirmation email template state.\n */\n @State() currentAppearance!: Appearance;\n /**\n * The confirmation email template state.\n */\n @State() customInputsSlot: Element | null = null;\n\n /**\n * This event is fired when the email reminders change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n /**\n * This event is fired when the form is submitted in the parent component.\n */\n @Event() bookingFormSubmitted!: EventEmitter<void>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-page-styling', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-page-styling', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-page-styling', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-page-styling', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n }\n }\n\n componentWillUpdate() {\n debug('nylas-page-styling', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-page-styling', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-page-styling', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-page-styling', 'componentDidRender');\n }\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-page-styling', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\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 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 customInputsSlotChangedHandler(newValue: Element | null) {\n debug('nylas-page-styling', 'customInputsSlotChangedHandler', newValue);\n\n const appearance = this.currentAppearance;\n\n function updateInputDefaultValues(element: HTMLElement) {\n // Process elements with a 'name' attribute\n if (element.hasAttribute && element.hasAttribute('name')) {\n const key = element.getAttribute('name');\n if (appearance && key && key in appearance && appearance[key] !== undefined) {\n // Update attributes based on component type\n const componentType = element.getAttribute('component-type');\n\n element.setAttribute('data-page-styling', 'true');\n\n if (componentType === 'checkbox') {\n element.setAttribute('checked', appearance[key]);\n } else if (componentType === 'radio-group') {\n element.setAttribute('default-selected-value', appearance[key]);\n } else if (componentType === 'color-picker') {\n element.setAttribute('default-selected-color', appearance[key]);\n } else if (componentType === 'select-dropdown') {\n const options = element.getAttribute('options');\n const selectedOption = options ? JSON.parse(options).find((option: { value: string }) => option.value === appearance[key]) : null;\n element.setAttribute('default-selected-option', JSON.stringify(selectedOption));\n } else if (componentType === 'image-url') {\n element.setAttribute('image-url', appearance[key]);\n } else {\n // Default case: set the default value\n element.setAttribute('default-value', appearance[key]);\n }\n }\n }\n\n // Recursively process child elements (skip text nodes)\n element.childNodes.forEach(child => {\n if (child.nodeType === Node.ELEMENT_NODE) {\n updateInputDefaultValues(child as HTMLElement); // Cast child to HTMLElement\n }\n });\n }\n\n // Start the recursive process with the cloned element (newValue)\n if (newValue) {\n updateInputDefaultValues(newValue as HTMLElement);\n }\n }\n\n cloneAndCopyProps(element: HTMLElement): HTMLElement {\n // Clone the current element\n const clonedElement = element.cloneNode(false) as HTMLElement; // Do a shallow clone first\n const componentType = element.getAttribute('component-type');\n const key = element.getAttribute('name');\n\n // Copy properties like 'options' and 'value' for custom elements\n if ((element as any).options) {\n const options = (element as any).getAttribute('options');\n console.log('page-styling options', element, options);\n if (typeof options === 'string') {\n try {\n const parsedOptions = JSON.parse(options);\n (clonedElement as any).options = parsedOptions; // Parse the 'options' string\n if (componentType === 'select-dropdown' && key && key in this.currentAppearance) {\n const selectedOption = parsedOptions.find((option: { value: string }) => option.value === this.currentAppearance[key]);\n (clonedElement as any).setAttribute('default-selected-option', JSON.stringify(selectedOption));\n }\n } catch (e) {\n console.error('Error parsing options', e);\n }\n } else {\n (clonedElement as any).options = (element as any).options; // Copy 'options' property\n }\n }\n\n if ((element as any).value) {\n (clonedElement as any).value = (element as any).value; // Copy 'value' property\n }\n\n // Recursively process child elements\n element.childNodes.forEach(child => {\n if (child.nodeType === Node.ELEMENT_NODE) {\n // If the child is an element, recursively clone and process it\n const clonedChild = this.cloneAndCopyProps(child as HTMLElement);\n clonedElement.appendChild(clonedChild); // Append the cloned child to the parent clone\n } else if (child.nodeType === Node.TEXT_NODE) {\n // For text nodes, just clone and append the text content\n clonedElement.appendChild(child.cloneNode(true));\n }\n });\n\n return clonedElement; // Return the cloned element with its children\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-page-styling', 'selectedConfigurationChangedHandler', newValue);\n this.currentAppearance = newValue?.appearance || {};\n // Get the slot element\n const editor = document.querySelector('nylas-scheduler-editor');\n const slotElement = editor?.shadowRoot?.querySelector('slot[name=\"custom-page-style-inputs\"]') as HTMLSlotElement;\n if (!slotElement) {\n return;\n }\n\n const divElement = document.createElement('div');\n\n // Get the slotted content (the nodes passed into the slot)\n const slottedElements = slotElement?.assignedElements({ flatten: true });\n // Clone each of the slotted nodes and append them to the cloned slot\n slottedElements?.forEach(element => {\n const clonedElement = this.cloneAndCopyProps(element as HTMLElement); // Clone recursively and copy properties\n\n // Clone the slotted element (deep clone)\n this.customInputsSlotChangedHandler(clonedElement);\n // Append the cloned element to the document fragment\n divElement.appendChild(clonedElement);\n });\n\n // Replace the original content with the new cloned and updated content\n const bodyElement = this.host.shadowRoot?.querySelector('.nylas-page-styling');\n const slotContainer = bodyElement?.querySelector('.nylas-page-styling__body .subsection');\n\n if (slotContainer) {\n // Remove existing children (if necessary) and append the new content\n slotContainer.innerHTML = ''; // Clear existing content\n divElement.childNodes.forEach(child => {\n slotContainer.appendChild(child); // Append each child of divElement\n });\n this.customInputsSlot = divElement;\n }\n }\n\n checkIfElementIsInSlot(name: string): boolean {\n const findElement = document?.querySelector(`[slot=\"custom-page-style-inputs\"] [name=\"${name}\"]`);\n return findElement ? true : false;\n }\n\n @Listen('nylasFormInputChanged', { target: 'document' })\n async nylasFormInputChangeHandler(event: CustomEvent<{ value: string; name: string; type?: string }>) {\n const { name, value } = event.detail;\n const type = event.detail?.type;\n\n if (!this.checkIfElementIsInSlot(name)) {\n return;\n }\n switch (name) {\n case 'submit_button_label':\n this.currentAppearance = { ...this.currentAppearance, submit_button_label: value };\n break;\n case 'thank_you_message':\n if (type === 'multi_line_text') {\n const value = sanitize(event.detail.value);\n this.currentAppearance = { ...this.currentAppearance, thank_you_message: value };\n }\n break;\n default:\n this.currentAppearance = { ...this.currentAppearance, [name]: value };\n break;\n }\n this.updateConfirmationFormValue();\n }\n\n @Listen('nylasFormDropdownChanged', { target: 'document' })\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-page-styling', 'nylasFormDropdownChangedHandler', event.detail);\n const { value, name } = event.detail;\n\n if (!this.checkIfElementIsInSlot(name)) {\n return;\n }\n if (name === 'color') {\n this.currentAppearance = { ...this.currentAppearance, color: value };\n } else {\n this.currentAppearance = { ...this.currentAppearance, [name]: value };\n }\n this.updateConfirmationFormValue();\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-page-styling', 'valueChangedHandler', event.detail);\n const { value, name } = event.detail;\n\n if (!this.checkIfElementIsInSlot(name)) {\n return;\n }\n this.currentAppearance = { ...this.currentAppearance, [name]: value };\n this.updateConfirmationFormValue(false);\n }\n\n @Listen('nylasFormCheckboxToggled', { target: 'document' })\n checkboxToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: string }>) {\n const { checked, name } = event.detail;\n if (!this.checkIfElementIsInSlot(name)) {\n return;\n }\n this.currentAppearance = { ...this.currentAppearance, [name]: checked };\n this.updateConfirmationFormValue();\n }\n\n @Listen('nylasFormRadioChanged', { target: 'document' })\n radioChangedHandler(event: CustomEvent<{ value: string; name: string; label: string; type: string }>) {\n const { value, name } = event.detail;\n if (!this.checkIfElementIsInSlot(name)) {\n return;\n }\n this.currentAppearance = { ...this.currentAppearance, [name]: value };\n this.updateConfirmationFormValue();\n }\n\n updateConfirmationFormValue(valueChanged: boolean = true) {\n debug('nylas-page-styling', 'updateConfirmationFormValue');\n this.internals.setFormValue(JSON.stringify(this.currentAppearance), this.name);\n if (valueChanged) {\n this.valueChanged.emit({ value: JSON.stringify(this.currentAppearance), name: this.name });\n }\n }\n\n toggleConfirmationEmail() {\n this.isOpen = !this.isOpen;\n }\n\n @RegisterComponent<NylasPageStyling, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-page-styling',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div part=\"nps\" class={{ 'nylas-page-styling': true, 'no-border': !this.customInputsSlot }}>\n {this.customInputsSlot ? (\n <div class=\"header\" part=\"nps__header\">\n <div>\n <h3>{i18next.t('nylasPageStyling.headerTitle')}</h3>\n </div>\n <div class=\"drawer-toggle\" part=\"nps__drawer-toggle--container\">\n <span class={`chevron ${this.isOpen ? 'open' : 'closed'} `} onClick={() => this.toggleConfirmationEmail()}>\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n ) : null}\n <div class=\"hidden\">\n <input-color-picker name=\"color-picker\" />\n </div>\n <div id=\"nylas-page-styling__body\" class=\"nylas-page-styling__body\" part=\"nps__body\">\n <div class={{ 'nylas-page-styling__section': true, 'no-padding': !this.customInputsSlot }}>\n <div class=\"nylas-page-styling__row\">\n <div class={{ subsection: true, hide: !this.isOpen }}></div>\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,12 +1,12 @@
|
|
|
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, b as instance } from './p-
|
|
2
|
+
import { R as RegisterComponent } from './p-DtDGPXZR.js';
|
|
3
|
+
import { a as debug, b as instance } from './p-CULO8bTo.js';
|
|
4
4
|
import { d as defineCustomElement$7 } from './p-CGmeyeVS.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './p-_0P0Tp97.js';
|
|
6
6
|
import { d as defineCustomElement$5 } from './p-7S1M5IE9.js';
|
|
7
|
-
import { d as defineCustomElement$4 } from './p-
|
|
7
|
+
import { d as defineCustomElement$4 } from './p-cT1Q8Q-G.js';
|
|
8
8
|
import { d as defineCustomElement$3 } from './p-CEoh34h7.js';
|
|
9
|
-
import { d as defineCustomElement$2 } from './p-
|
|
9
|
+
import { d as defineCustomElement$2 } from './p-DjX1ll1V.js';
|
|
10
10
|
import { d as defineCustomElement$1 } from './p-C6fgjGAL.js';
|
|
11
11
|
|
|
12
12
|
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;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{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;justify-content:space-between}.nylas-additional-participants__input input{border:none;outline:none;background:none;width:100%}.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){height:100%;border-radius:var(--nylas-border-radius-2x);border:none;border-top-right-radius:initial;border-bottom-right-radius:initial;padding-left:16px}.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)}";
|
|
@@ -316,6 +316,6 @@ function defineCustomElement() {
|
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
export { NylasAdditionalParticipants as N, defineCustomElement as d };
|
|
319
|
-
//# sourceMappingURL=p-
|
|
319
|
+
//# sourceMappingURL=p-D-TAjvsg.js.map
|
|
320
320
|
|
|
321
|
-
//# sourceMappingURL=p-
|
|
321
|
+
//# sourceMappingURL=p-D-TAjvsg.js.map
|