@nylas/web-elements 2.3.2 → 2.3.3-canary-20260206145315
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/input-color-picker/input-color-picker.es.js +1 -1
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +11 -11
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +8 -8
- package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js +1 -1
- package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js.map +1 -1
- package/dist/cjs/checkbox-component.cjs.entry.js +1 -1
- package/dist/cjs/checkbox-component.cjs.entry.js.map +1 -1
- package/dist/cjs/checkbox-component.entry.cjs.js.map +1 -1
- package/dist/cjs/checkmark-icon_15.cjs.entry.js +3 -3
- package/dist/cjs/checkmark-icon_15.cjs.entry.js.map +1 -1
- package/dist/cjs/chevron-icon.search-icon.select-dropdown.entry.cjs.js.map +1 -1
- package/dist/cjs/chevron-icon_3.cjs.entry.js +1 -1
- package/dist/cjs/chevron-icon_3.cjs.entry.js.map +1 -1
- package/dist/cjs/globe-icon.nylas-date-component.nylas-time-window-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/globe-icon_3.cjs.entry.js +1 -1
- package/dist/cjs/globe-icon_3.cjs.entry.js.map +1 -1
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +1 -1
- package/dist/cjs/input-component.cjs.entry.js +1 -1
- package/dist/cjs/input-component.cjs.entry.js.map +1 -1
- package/dist/cjs/input-component.entry.cjs.js.map +1 -1
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js +1 -1
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +1 -1
- package/dist/cjs/radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/radio-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/radio-button-group.entry.cjs.js.map +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js.map +1 -1
- package/dist/cjs/textarea-component.entry.cjs.js.map +1 -1
- package/dist/cjs/{version-DUyFnawM.js → version-CwWnMgnL.js} +3 -3
- package/dist/cjs/{version-DUyFnawM.js.map → version-CwWnMgnL.js.map} +1 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.css +2 -0
- package/dist/collection/components/design-system/input-color-picker/input-color-picker.css +2 -0
- package/dist/collection/components/design-system/input-component/input-component.css +2 -0
- package/dist/collection/components/design-system/nylas-date-component/nylas-date-component.css +2 -0
- package/dist/collection/components/design-system/radio-button-group/radio-button-group.css +4 -0
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.css +2 -0
- package/dist/collection/components/design-system/textarea-component/textarea-component.css +2 -0
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.css +2 -0
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.css +2 -0
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.css +2 -0
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.css +2 -0
- package/dist/collection/version.js +1 -1
- package/dist/collection/version.js.map +1 -1
- package/dist/components/checkbox-component.js +1 -1
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/input-color-picker.js +1 -1
- package/dist/components/input-component.js +1 -1
- package/dist/components/input-image-url.js +1 -1
- package/dist/components/nylas-additional-participants.js +1 -1
- package/dist/components/nylas-availability-picker.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-cancel-booking-form.js +1 -1
- package/dist/components/nylas-confirmation-email.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-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-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-limit-future-bookings.js +1 -1
- package/dist/components/nylas-list-configurations.js +1 -1
- package/dist/components/nylas-locale-switch.js +1 -1
- package/dist/components/nylas-min-booking-notice.js +1 -1
- package/dist/components/nylas-min-cancellation-notice.js +1 -1
- package/dist/components/nylas-notetaker-config.js +1 -1
- package/dist/components/nylas-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 +46 -46
- package/dist/components/nylas-scheduling-method.js +1 -1
- package/dist/components/nylas-scheduling.js +11 -11
- package/dist/components/nylas-specific-time-availability-picker.js +1 -1
- package/dist/components/nylas-timeslot-interval.js +1 -1
- package/dist/components/{p-CdjkLYNh.js → p-1FY06fQD.js} +34 -34
- package/dist/components/{p-CdjkLYNh.js.map → p-1FY06fQD.js.map} +1 -1
- package/dist/components/{p-C1X9fzID.js → p-9PlaXlCB.js} +3 -3
- package/dist/components/{p-C1X9fzID.js.map → p-9PlaXlCB.js.map} +1 -1
- package/dist/components/{p-p2By8R7Z.js → p-B-xvNL5X.js} +3 -3
- package/dist/components/{p-p2By8R7Z.js.map → p-B-xvNL5X.js.map} +1 -1
- package/dist/components/{p-DZJAqRR0.js → p-B4C1SvsK.js} +3 -3
- package/dist/components/{p-DZJAqRR0.js.map → p-B4C1SvsK.js.map} +1 -1
- package/dist/components/{p-FyWR7wsG.js → p-B4WU6Ddk.js} +3 -3
- package/dist/components/{p-FyWR7wsG.js.map → p-B4WU6Ddk.js.map} +1 -1
- package/dist/components/{p-a4aWyy2J.js → p-BCNq-vH8.js} +4 -4
- package/dist/components/{p-a4aWyy2J.js.map → p-BCNq-vH8.js.map} +1 -1
- package/dist/components/{p-ClRazYdc.js → p-BGel3qwa.js} +4 -4
- package/dist/components/{p-ClRazYdc.js.map → p-BGel3qwa.js.map} +1 -1
- package/dist/components/{p-BMS02R_Z.js → p-BJ6nYqW1.js} +3 -3
- package/dist/components/{p-BMS02R_Z.js.map → p-BJ6nYqW1.js.map} +1 -1
- package/dist/components/{p-BA8j6G8I.js → p-BJHGQK2p.js} +3 -3
- package/dist/components/{p-BA8j6G8I.js.map → p-BJHGQK2p.js.map} +1 -1
- package/dist/components/{p-Di7xtAN8.js → p-BWgGjFXi.js} +3 -3
- package/dist/components/{p-Di7xtAN8.js.map → p-BWgGjFXi.js.map} +1 -1
- package/dist/components/{p-B4ta0tDN.js → p-BZ_muELE.js} +3 -3
- package/dist/components/{p-B4ta0tDN.js.map → p-BZ_muELE.js.map} +1 -1
- package/dist/components/{p-DDBe0PRD.js → p-B_ZbZ5lK.js} +3 -3
- package/dist/components/{p-DDBe0PRD.js.map → p-B_ZbZ5lK.js.map} +1 -1
- package/dist/components/{p-BBkyE1MS.js → p-BdQ9iWW4.js} +6 -6
- package/dist/components/{p-BBkyE1MS.js.map → p-BdQ9iWW4.js.map} +1 -1
- package/dist/components/{p-DDM3ZlW1.js → p-BdQA_uHk.js} +3 -3
- package/dist/components/{p-DDM3ZlW1.js.map → p-BdQA_uHk.js.map} +1 -1
- package/dist/components/{p-44_g1hcc.js → p-BeGM4wbq.js} +3 -3
- package/dist/components/{p-44_g1hcc.js.map → p-BeGM4wbq.js.map} +1 -1
- package/dist/components/{p-DM_4oTsI.js → p-BjynTcY9.js} +4 -4
- package/dist/components/{p-DM_4oTsI.js.map → p-BjynTcY9.js.map} +1 -1
- package/dist/components/{p-Bz1eTXD6.js → p-BsMclINV.js} +4 -4
- package/dist/components/{p-Bz1eTXD6.js.map → p-BsMclINV.js.map} +1 -1
- package/dist/components/{p-BdG2pZat.js → p-BvCTseDu.js} +5 -5
- package/dist/components/{p-BdG2pZat.js.map → p-BvCTseDu.js.map} +1 -1
- package/dist/components/{p-lLGrGYYy.js → p-C4s3qYGu.js} +3 -3
- package/dist/components/{p-lLGrGYYy.js.map → p-C4s3qYGu.js.map} +1 -1
- package/dist/components/{p-Dkp7GkzI.js → p-CEvUNENN.js} +3 -3
- package/dist/components/{p-Dkp7GkzI.js.map → p-CEvUNENN.js.map} +1 -1
- package/dist/components/{p-BJACsIxp.js → p-CHQ9sLls.js} +6 -6
- package/dist/components/{p-BJACsIxp.js.map → p-CHQ9sLls.js.map} +1 -1
- package/dist/components/{p-CXvH8gEB.js → p-CIm8sd7h.js} +4 -4
- package/dist/components/{p-CXvH8gEB.js.map → p-CIm8sd7h.js.map} +1 -1
- package/dist/components/{p-eMdkzfgI.js → p-CVnhRnUq.js} +6 -6
- package/dist/components/{p-eMdkzfgI.js.map → p-CVnhRnUq.js.map} +1 -1
- package/dist/components/{p-DzNdcHoB.js → p-CZllU8ii.js} +3 -3
- package/dist/components/{p-DzNdcHoB.js.map → p-CZllU8ii.js.map} +1 -1
- package/dist/components/{p-FGJR3D9_.js → p-Ci9dxGLY.js} +5 -5
- package/dist/components/{p-FGJR3D9_.js.map → p-Ci9dxGLY.js.map} +1 -1
- package/dist/components/{p-CfqEi00L.js → p-D13lTN27.js} +4 -4
- package/dist/components/{p-CfqEi00L.js.map → p-D13lTN27.js.map} +1 -1
- package/dist/components/{p-DsJUpcxE.js → p-DAr02cfd.js} +3 -3
- package/dist/components/{p-DsJUpcxE.js.map → p-DAr02cfd.js.map} +1 -1
- package/dist/components/{p-D0JQ_-Qx.js → p-DDceIF1-.js} +3 -3
- package/dist/components/{p-D0JQ_-Qx.js.map → p-DDceIF1-.js.map} +1 -1
- package/dist/components/{p-CowteGon.js → p-DICXD6Cy.js} +3 -3
- package/dist/components/{p-CowteGon.js.map → p-DICXD6Cy.js.map} +1 -1
- package/dist/components/{p-Dy7hoKyo.js → p-DMltEU-a.js} +4 -4
- package/dist/components/{p-Dy7hoKyo.js.map → p-DMltEU-a.js.map} +1 -1
- package/dist/components/{p-OADv0FUZ.js → p-DNm8Z4AY.js} +3 -3
- package/dist/components/{p-OADv0FUZ.js.map → p-DNm8Z4AY.js.map} +1 -1
- package/dist/components/{p-Dd9ZfJbD.js → p-DTF0fIhr.js} +3 -3
- package/dist/components/p-DTF0fIhr.js.map +1 -0
- package/dist/components/{p-6i8K_2Bl.js → p-DVTv2Hp1.js} +3 -3
- package/dist/components/{p-6i8K_2Bl.js.map → p-DVTv2Hp1.js.map} +1 -1
- package/dist/components/{p-DdroMDi7.js → p-DWCPI1lK.js} +3 -3
- package/dist/components/{p-DdroMDi7.js.map → p-DWCPI1lK.js.map} +1 -1
- package/dist/components/{p-P01mLKOx.js → p-Dary9zXr.js} +3 -3
- package/dist/components/{p-P01mLKOx.js.map → p-Dary9zXr.js.map} +1 -1
- package/dist/components/{p-BmXUSpFE.js → p-DgfDGATC.js} +3 -3
- package/dist/components/{p-BmXUSpFE.js.map → p-DgfDGATC.js.map} +1 -1
- package/dist/components/{p-pgYRW1Gn.js → p-Ey-jPikW.js} +3 -3
- package/dist/components/{p-pgYRW1Gn.js.map → p-Ey-jPikW.js.map} +1 -1
- package/dist/components/{p-BYAaHapV.js → p-FFI2InLT.js} +3 -3
- package/dist/components/{p-BYAaHapV.js.map → p-FFI2InLT.js.map} +1 -1
- package/dist/components/{p-C9c9Tc-Q.js → p-FrLX9pVa.js} +6 -6
- package/dist/components/{p-C9c9Tc-Q.js.map → p-FrLX9pVa.js.map} +1 -1
- package/dist/components/{p-EBvHC_aS.js → p-Gyins0o7.js} +9 -9
- package/dist/components/{p-EBvHC_aS.js.map → p-Gyins0o7.js.map} +1 -1
- package/dist/components/{p-Et75ok2y.js → p-MMkYQKuh.js} +3 -3
- package/dist/components/{p-Et75ok2y.js.map → p-MMkYQKuh.js.map} +1 -1
- package/dist/components/{p-ybLp3dGv.js → p-QKc1T_NS.js} +3 -3
- package/dist/components/{p-ybLp3dGv.js.map → p-QKc1T_NS.js.map} +1 -1
- package/dist/components/{p-D2DM2um3.js → p-UahFYa1w.js} +3 -3
- package/dist/components/{p-D2DM2um3.js.map → p-UahFYa1w.js.map} +1 -1
- package/dist/components/{p-Cqcd_0tY.js → p-cylqcpvp.js} +41 -41
- package/dist/components/{p-Cqcd_0tY.js.map → p-cylqcpvp.js.map} +1 -1
- package/dist/components/{p-kRlkh0g-.js → p-idvnK5Rl.js} +3 -3
- package/dist/components/{p-kRlkh0g-.js.map → p-idvnK5Rl.js.map} +1 -1
- package/dist/components/{p-Bho2Hb_A.js → p-keUQQIah.js} +4 -4
- package/dist/components/{p-Bho2Hb_A.js.map → p-keUQQIah.js.map} +1 -1
- package/dist/components/{p-DAAGx7-h.js → p-pLqfEMSB.js} +3 -3
- package/dist/components/{p-DAAGx7-h.js.map → p-pLqfEMSB.js.map} +1 -1
- package/dist/components/{p-BAZ-jMiz.js → p-pRwtuoW0.js} +4 -4
- package/dist/components/{p-BAZ-jMiz.js.map → p-pRwtuoW0.js.map} +1 -1
- package/dist/components/{p-CJ3feL4K.js → p-whoa2mmo.js} +14 -14
- package/dist/components/{p-CJ3feL4K.js.map → p-whoa2mmo.js.map} +1 -1
- package/dist/components/radio-button-group.js +1 -1
- package/dist/components/select-dropdown.js +1 -1
- package/dist/components/textarea-component.js +1 -1
- package/dist/components/time-period-selector.js +1 -1
- package/dist/esm/calendar-agenda-fill-icon_39.entry.js +1 -1
- package/dist/esm/calendar-agenda-fill-icon_39.entry.js.map +1 -1
- package/dist/esm/checkbox-component.entry.js +1 -1
- package/dist/esm/checkbox-component.entry.js.map +1 -1
- package/dist/esm/checkmark-icon_15.entry.js +3 -3
- package/dist/esm/checkmark-icon_15.entry.js.map +1 -1
- package/dist/esm/chevron-icon.search-icon.select-dropdown.entry.js.map +1 -1
- package/dist/esm/chevron-icon_3.entry.js +1 -1
- package/dist/esm/chevron-icon_3.entry.js.map +1 -1
- package/dist/esm/globe-icon.nylas-date-component.nylas-time-window-picker.entry.js.map +1 -1
- package/dist/esm/globe-icon_3.entry.js +1 -1
- package/dist/esm/globe-icon_3.entry.js.map +1 -1
- package/dist/esm/google-logo-icon_6.entry.js +1 -1
- package/dist/esm/input-component.entry.js +1 -1
- package/dist/esm/input-component.entry.js.map +1 -1
- package/dist/esm/nylas-booked-event-card_11.entry.js +1 -1
- package/dist/esm/nylas-booked-event-card_11.entry.js.map +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
- package/dist/esm/nylas-scheduling.entry.js +1 -1
- package/dist/esm/radio-button-group.entry.js +1 -1
- package/dist/esm/radio-button-group.entry.js.map +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/textarea-component.entry.js.map +1 -1
- package/dist/esm/{version-BxqBxG4o.js → version-DM0y_1NQ.js} +3 -3
- package/dist/esm/{version-BxqBxG4o.js.map → version-DM0y_1NQ.js.map} +1 -1
- package/dist/nylas-web-elements/checkbox-component.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/chevron-icon.search-icon.select-dropdown.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/globe-icon.nylas-date-component.nylas-time-window-picker.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/input-component.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/p-23df6f78.entry.js +8 -0
- package/dist/nylas-web-elements/p-23df6f78.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-34c4bf5b.entry.js +2 -0
- package/dist/nylas-web-elements/{p-2bff143d.entry.js.map → p-34c4bf5b.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-52a66db6.entry.js +2 -0
- package/dist/nylas-web-elements/{p-1ba901b1.entry.js.map → p-52a66db6.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-5b01e519.entry.js +2 -0
- package/dist/nylas-web-elements/p-5b01e519.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-9a5b1cfb.entry.js +2 -0
- package/dist/nylas-web-elements/{p-ab80b127.entry.js.map → p-9a5b1cfb.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-9c264d62.entry.js +2 -0
- package/dist/nylas-web-elements/{p-7655eeb0.entry.js.map → p-9c264d62.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-DM0y_1NQ.js +2 -0
- package/dist/nylas-web-elements/{p-BxqBxG4o.js.map → p-DM0y_1NQ.js.map} +1 -1
- package/dist/nylas-web-elements/p-b0306d35.entry.js +2 -0
- package/dist/nylas-web-elements/{p-70762abf.entry.js.map → p-b0306d35.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-9c78baa7.entry.js → p-b2c497eb.entry.js} +2 -2
- package/dist/nylas-web-elements/p-b2c497eb.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-70614faf.entry.js → p-b90acc64.entry.js} +2 -2
- package/dist/nylas-web-elements/p-c91eb1ba.entry.js +2 -0
- package/dist/nylas-web-elements/{p-e042747e.entry.js.map → p-c91eb1ba.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-2d23ef5e.entry.js → p-daf5083c.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-428a7363.entry.js → p-dbad0a98.entry.js} +2 -2
- package/dist/nylas-web-elements/radio-button-group.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/textarea-component.entry.esm.js.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/p-Dd9ZfJbD.js.map +0 -1
- package/dist/nylas-web-elements/p-1ba901b1.entry.js +0 -2
- package/dist/nylas-web-elements/p-2bff143d.entry.js +0 -2
- package/dist/nylas-web-elements/p-70762abf.entry.js +0 -2
- package/dist/nylas-web-elements/p-7655eeb0.entry.js +0 -2
- package/dist/nylas-web-elements/p-88112606.entry.js +0 -8
- package/dist/nylas-web-elements/p-88112606.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-9c78baa7.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-BxqBxG4o.js +0 -2
- package/dist/nylas-web-elements/p-ab80b127.entry.js +0 -2
- package/dist/nylas-web-elements/p-e042747e.entry.js +0 -2
- package/dist/nylas-web-elements/p-e82826b8.entry.js +0 -2
- package/dist/nylas-web-elements/p-e82826b8.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-70614faf.entry.js.map → p-b90acc64.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2d23ef5e.entry.js.map → p-daf5083c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-428a7363.entry.js.map → p-dbad0a98.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-Et75ok2y.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,k6HAAk6H;;;;;;;;;;;;;;;;MC0Bn7H,kBAAkB,GAAAA,kBAAA,CAAA,MAAA,kBAAA,SAAAC,CAAA,CAAA;AAN/B,IAAA,WAAA,GAAA;;;;;;AAeU,QAAA,IAAI,CAAA,IAAA,GAAW,UAAU;QAiDxB,IAAA,CAAA,QAAQ,GAAW,IAAI,CAAC,aAAa,IAAI,EAAE;QAI3C,IAAA,CAAA,OAAO,GAAW,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,EAAE;AAQ9F,QAAA,IAAA,CAAA,iBAAiB,GAAW,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,WA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,CACpJ,CACG,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhCX,UAAA,CAAA;AAZC,IAAA,iBAAiB,CAAwG;AACxH,QAAA,IAAI,EAAE,sBAAsB;QAC5B,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,qCAAqC,EAAE,qBAAqB,CAAC;YAC9D,CAAC,6BAA6B,EAAE,aAAa,CAAC;YAC9C,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAmCD,EAAA,kBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-event-location/nylas-event-location.scss?tag=nylas-event-location&encapsulation=shadow","src/components/scheduler-editor/nylas-event-location/nylas-event-location.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\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%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n\n span[slot='select-icon'] {\n border-right: 1px solid var(--nylas-base-200);\n padding: 16px 0.75rem 16px 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n height: 20px;\n }\n div.location-input {\n display: grid;\n grid-template-columns: auto 1fr;\n width: 100%;\n gap: 0.5rem;\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n input {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 12px 16px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n }\n }\n select-dropdown {\n width: 208px;\n @media #{$mobile} {\n width: 100%;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-content) {\n left: calc(35px + 0.5rem);\n }\n select-dropdown::part(sd_dropdown-button) {\n display: flex;\n justify-content: space-between;\n width: 100%;\n border: 1px solid var(--nylas-base-200);\n padding: 0 0.5rem;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n display: inline-flex;\n align-self: center;\n padding: 14px 0;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\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, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Conference, Configuration } from '@nylas/core';\nimport { CONFERENCE_PROVIDER_MAP, PROVIDER_CONFERENCE_MAP } from '@/common/constants';\nimport { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n/**\n * The `nylas-event-location` component is a form input for the location of an event.\n *\n * @part nel - The event location container\n * @part nel__location - The event location input\n * @part nel__dropdown - The dropdown container\n * @part nel__dropdown-button - The dropdown button\n * @part nel__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-event-location',\n styleUrl: 'nylas-event-location.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLocation {\n /*\n * The host element <nylas-event-location>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The name of the event location input.\n */\n @Prop() name: string = 'location';\n\n /**\n * @standalone\n * The current user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The users provider\n */\n @Prop() userProvider?: string;\n /**\n * @standalone\n * The event conferencing stored in the configuration\n */\n @Prop() eventConferencing?: Conference;\n /**\n * @standalone\n * The conference providers where the key is the provider name ('zoom') and the value is the grant id.\n * We currently support same provider ('google', 'microsoft') for all participants and 'zoom' for cross-provider conferencing.\n */\n @Prop() conferenceProviders?: Record<string, string>;\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event location stored in the configuration\n */\n @Prop() eventLocation?: string;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The selected event location state. This defaults to the event location from the configuration or an empty string.\n */\n @State() location: string = this.eventLocation ?? '';\n /**\n * The grant id for the conferencing of non-default conferencing options.\n */\n @State() grantId: string = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : '';\n /**\n * The selected location option. This defaults to 'none'.\n */\n @State() selectedLocationOption!: string;\n /**\n * The current user provider state.\n */\n @State() userProviderState: string = this.userProvider ?? this.currentUser?.provider ?? '';\n\n /**\n * The state to store location options.\n */\n @State() locationOptions = [\n { value: 'none', label: i18next.t('nylasEventLocation.conferenceOptions.none'), labelHTML: this.getLabelHTML('none') },\n { value: 'custom', label: i18next.t('nylasEventLocation.conferenceOptions.custom'), labelHTML: this.getLabelHTML('custom') },\n ];\n\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-event-location', '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 const configLocation = newValue?.event_booking?.location || this.eventLocation;\n const configConferencing = newValue?.event_booking?.conferencing || this.eventConferencing;\n if (configConferencing?.provider) {\n this.selectedLocationOption = this.setDefaultLocationOption(configConferencing, configLocation ?? '');\n this.grantId = this.setDefaultGrantID(configConferencing);\n this.location = configLocation ? configLocation : '';\n } else if (configLocation) {\n this.selectedLocationOption = configLocation ? 'custom' : 'none';\n this.location = configLocation;\n } else {\n this.selectedLocationOption = 'none';\n this.location = '';\n }\n }\n\n @Watch('currentUser')\n currentUserChangedHandler(newValue: User) {\n debug('nylas-custom-booking-flow', 'currentUserChangedHandler', newValue);\n if (newValue?.provider) {\n this.userProviderState = newValue?.provider;\n this.setLocationOptionsForProvider(this.userProviderState);\n }\n }\n\n @Watch('conferenceProviders')\n conferenceProvidersChanged(newValue: Record<string, string>) {\n if (newValue?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const locOptionValues = this.locationOptions.map(option => option.value);\n locOptionValues.forEach(option => {\n const index = this.locationOptions.findIndex(i => i.value === option);\n this.locationOptions[index].label = i18next.t(`nylasEventLocation.conferenceOptions.${option}`);\n this.locationOptions[index].labelHTML = this.getLabelHTML(option);\n });\n this.locationOptions = [...this.locationOptions];\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 /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-location', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n componentWillLoad() {\n debug('nylas-event-location', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-location', 'componentDidLoad');\n if (this.selectedConfiguration?.event_booking) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? '');\n this.location = this.eventLocation ?? '';\n }\n\n this.userProviderState = this.userProvider ?? this.currentUser?.provider ?? '';\n this.setLocationOptionsForProvider(this.userProviderState);\n const formElement = this.internals?.form;\n // Set the initial form value\n if (formElement) {\n const formData = new FormData(formElement);\n formData.set('conference', this.getConferencePayload());\n formData.set(this.name, this.location);\n }\n\n if (this.conferenceProviders?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-location', 'disconnectedCallback');\n }\n\n getConferencePayload() {\n if (this.selectedLocationOption === 'custom' || this.selectedLocationOption === 'none') {\n return JSON.stringify(null);\n }\n const grantId = this.conferenceProviders?.[this.selectedLocationOption];\n const payload = {\n provider: PROVIDER_CONFERENCE_MAP[this.selectedLocationOption],\n autocreate: grantId\n ? {\n conf_grant_id: grantId,\n }\n : {},\n };\n return JSON.stringify(payload);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string }>) {\n this.selectedLocationOption = event.detail.value;\n let payload;\n switch (this.selectedLocationOption) {\n case 'none': {\n this.location = '';\n this.setFormValue('', this.name);\n this.valueChanged.emit({ value: '', name: this.name });\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'custom': {\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'google': {\n this.location = '';\n this.setFormValue('', this.name);\n const googleConfGrantId = this.conferenceProviders?.['google'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.google,\n autocreate: googleConfGrantId\n ? {\n conf_grant_id: googleConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'microsoft': {\n this.location = '';\n this.setFormValue('', this.name);\n const microsoftConfGrantId = this.conferenceProviders?.['microsoft'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.microsoft,\n autocreate: microsoftConfGrantId\n ? {\n conf_grant_id: microsoftConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'zoom': {\n this.location = '';\n this.setFormValue('', this.name);\n const zoomConfGrantId = this.conferenceProviders?.['zoom'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.zoom,\n autocreate: zoomConfGrantId\n ? {\n conf_grant_id: zoomConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n }\n }\n\n setLocationOptionsForProvider(provider: string) {\n switch (provider) {\n case 'google':\n if (!this.locationOptions.some(option => option.value === 'google')) {\n this.locationOptions.push({ value: 'google', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('google') });\n }\n break;\n case 'microsoft':\n if (!this.locationOptions.some(option => option.value === 'microsoft')) {\n this.locationOptions.push({ value: 'microsoft', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('microsoft') });\n }\n break;\n }\n }\n\n setDefaultLocationOption(eventConferencing: Conference | null, eventLocation: string) {\n if (eventConferencing != null && eventConferencing?.provider != null) {\n return CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];\n }\n return eventLocation ? 'custom' : 'none';\n }\n setDefaultGrantID(eventConferencing: Conference) {\n if (eventConferencing != null && eventConferencing?.autocreate != null) {\n return eventConferencing?.autocreate?.conf_grant_id;\n }\n return '';\n }\n\n setFormValue(value: string, name: string) {\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(value, name);\n }\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.location = value;\n this.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n getIcon(location: string) {\n switch (location) {\n case 'none':\n return <location-off-icon />;\n case 'custom':\n return <location-icon />;\n case 'google':\n return <google-meet-icon />;\n case 'microsoft':\n return <microsoft-teams-icon />;\n case 'zoom':\n return <zoom-icon />;\n }\n }\n\n getLabelHTML(location: string) {\n return (\n <span\n class=\"location-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '16px',\n width: '-webkit-fill-available',\n }}\n >\n {this.getIcon(location)}\n <span\n class=\"location-text\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n }}\n >\n {i18next.t(`nylasEventLocation.conferenceOptions.${location}`)}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasEventLocation, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-location',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.conferenceProviders', 'conferenceProviders'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const defaultOption = typeof this.selectedLocationOption !== 'undefined' ? this.locationOptions.find(i => i.value == this.selectedLocationOption) : null;\n return (\n <Host>\n <div class=\"nylas-event-location\" part=\"nel\">\n <label htmlFor=\"location\">\n {i18next.t('nylasEventLocation.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventLocation.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div class=\"location-input\">\n {/* {defaultOption && defaultOption?.label && ( */}\n <select-dropdown\n withSearch={false}\n name=\"location\"\n options={this.locationOptions}\n defaultSelectedOption={defaultOption}\n themeConfig={this.themeConfig}\n exportparts=\"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content\"\n >\n <span slot=\"select-icon\">{this.getIcon(this.selectedLocationOption)}</span>\n </select-dropdown>\n {/* )} */}\n {this.selectedLocationOption === 'custom' && (\n <input type=\"text\" part=\"nel__location\" id=\"location\" name=\"location\" maxlength=\"1024\" value={this.location} onInput={e => this.handleChange(e)} />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-MMkYQKuh.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,qBAAqB,GAAG,k6HAAk6H;;;;;;;;;;;;;;;;MC0Bn7H,kBAAkB,GAAAA,kBAAA,CAAA,MAAA,kBAAA,SAAAC,CAAA,CAAA;AAN/B,IAAA,WAAA,GAAA;;;;;;AAeU,QAAA,IAAI,CAAA,IAAA,GAAW,UAAU;QAiDxB,IAAA,CAAA,QAAQ,GAAW,IAAI,CAAC,aAAa,IAAI,EAAE;Q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I,EAAC,eAAe,EAAC,EAAE,EAAC,UAAU,EAAC,IAAI,EAAC,UAAU,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAA,CAAI,CACpJ,CACG,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhCX,UAAA,CAAA;AAZC,IAAA,iBAAiB,CAAwG;AACxH,QAAA,IAAI,EAAE,sBAAsB;QAC5B,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,qCAAqC,EAAE,qBAAqB,CAAC;YAC9D,CAAC,6BAA6B,EAAE,aAAa,CAAC;YAC9C,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAmCD,EAAA,kBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-event-location/nylas-event-location.scss?tag=nylas-event-location&encapsulation=shadow","src/components/scheduler-editor/nylas-event-location/nylas-event-location.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-event-location {\n display: flex;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\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%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n\n span[slot='select-icon'] {\n border-right: 1px solid var(--nylas-base-200);\n padding: 16px 0.75rem 16px 0.5rem;\n border-radius: var(--nylas-border-radius-2x);\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n height: 20px;\n }\n div.location-input {\n display: grid;\n grid-template-columns: auto 1fr;\n width: 100%;\n gap: 0.5rem;\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n input {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 12px 16px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n }\n }\n select-dropdown {\n width: 208px;\n @media #{$mobile} {\n width: 100%;\n }\n }\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n select-dropdown::part(sd_dropdown-content) {\n left: calc(35px + 0.5rem);\n }\n select-dropdown::part(sd_dropdown-button) {\n display: flex;\n justify-content: space-between;\n width: 100%;\n border: 1px solid var(--nylas-base-200);\n padding: 0 0.5rem;\n }\n select-dropdown::part(sd_dropdown-button-selected-label) {\n display: inline-flex;\n align-self: center;\n padding: 14px 0;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\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, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Conference, Configuration } from '@nylas/core';\nimport { CONFERENCE_PROVIDER_MAP, PROVIDER_CONFERENCE_MAP } from '@/common/constants';\nimport { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n/**\n * The `nylas-event-location` component is a form input for the location of an event.\n *\n * @part nel - The event location container\n * @part nel__location - The event location input\n * @part nel__dropdown - The dropdown container\n * @part nel__dropdown-button - The dropdown button\n * @part nel__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-event-location',\n styleUrl: 'nylas-event-location.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventLocation {\n /*\n * The host element <nylas-event-location>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The name of the event location input.\n */\n @Prop() name: string = 'location';\n\n /**\n * @standalone\n * The current user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The users provider\n */\n @Prop() userProvider?: string;\n /**\n * @standalone\n * The event conferencing stored in the configuration\n */\n @Prop() eventConferencing?: Conference;\n /**\n * @standalone\n * The conference providers where the key is the provider name ('zoom') and the value is the grant id.\n * We currently support same provider ('google', 'microsoft') for all participants and 'zoom' for cross-provider conferencing.\n */\n @Prop() conferenceProviders?: Record<string, string>;\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The event location stored in the configuration\n */\n @Prop() eventLocation?: string;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The selected event location state. This defaults to the event location from the configuration or an empty string.\n */\n @State() location: string = this.eventLocation ?? '';\n /**\n * The grant id for the conferencing of non-default conferencing options.\n */\n @State() grantId: string = this.eventConferencing ? this.setDefaultGrantID(this.eventConferencing) : '';\n /**\n * The selected location option. This defaults to 'none'.\n */\n @State() selectedLocationOption!: string;\n /**\n * The current user provider state.\n */\n @State() userProviderState: string = this.userProvider ?? this.currentUser?.provider ?? '';\n\n /**\n * The state to store location options.\n */\n @State() locationOptions = [\n { value: 'none', label: i18next.t('nylasEventLocation.conferenceOptions.none'), labelHTML: this.getLabelHTML('none') },\n { value: 'custom', label: i18next.t('nylasEventLocation.conferenceOptions.custom'), labelHTML: this.getLabelHTML('custom') },\n ];\n\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-event-location', '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 const configLocation = newValue?.event_booking?.location || this.eventLocation;\n const configConferencing = newValue?.event_booking?.conferencing || this.eventConferencing;\n if (configConferencing?.provider) {\n this.selectedLocationOption = this.setDefaultLocationOption(configConferencing, configLocation ?? '');\n this.grantId = this.setDefaultGrantID(configConferencing);\n this.location = configLocation ? configLocation : '';\n } else if (configLocation) {\n this.selectedLocationOption = configLocation ? 'custom' : 'none';\n this.location = configLocation;\n } else {\n this.selectedLocationOption = 'none';\n this.location = '';\n }\n }\n\n @Watch('currentUser')\n currentUserChangedHandler(newValue: User) {\n debug('nylas-custom-booking-flow', 'currentUserChangedHandler', newValue);\n if (newValue?.provider) {\n this.userProviderState = newValue?.provider;\n this.setLocationOptionsForProvider(this.userProviderState);\n }\n }\n\n @Watch('conferenceProviders')\n conferenceProvidersChanged(newValue: Record<string, string>) {\n if (newValue?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const locOptionValues = this.locationOptions.map(option => option.value);\n locOptionValues.forEach(option => {\n const index = this.locationOptions.findIndex(i => i.value === option);\n this.locationOptions[index].label = i18next.t(`nylasEventLocation.conferenceOptions.${option}`);\n this.locationOptions[index].labelHTML = this.getLabelHTML(option);\n });\n this.locationOptions = [...this.locationOptions];\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 /**\n * This event is fired when the value of the event location changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-event-location', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n componentWillLoad() {\n debug('nylas-event-location', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-event-location', 'componentDidLoad');\n if (this.selectedConfiguration?.event_booking) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.selectedLocationOption = this.setDefaultLocationOption(this.eventConferencing || null, this.eventLocation ?? '');\n this.location = this.eventLocation ?? '';\n }\n\n this.userProviderState = this.userProvider ?? this.currentUser?.provider ?? '';\n this.setLocationOptionsForProvider(this.userProviderState);\n const formElement = this.internals?.form;\n // Set the initial form value\n if (formElement) {\n const formData = new FormData(formElement);\n formData.set('conference', this.getConferencePayload());\n formData.set(this.name, this.location);\n }\n\n if (this.conferenceProviders?.['zoom'] && !this.locationOptions.some(option => option.value === 'zoom')) {\n this.locationOptions.push({ value: 'zoom', label: i18next.t('nylasEventLocation.conferenceOptions.zoom'), labelHTML: this.getLabelHTML('zoom') });\n }\n }\n\n disconnectedCallback() {\n debug('nylas-event-location', 'disconnectedCallback');\n }\n\n getConferencePayload() {\n if (this.selectedLocationOption === 'custom' || this.selectedLocationOption === 'none') {\n return JSON.stringify(null);\n }\n const grantId = this.conferenceProviders?.[this.selectedLocationOption];\n const payload = {\n provider: PROVIDER_CONFERENCE_MAP[this.selectedLocationOption],\n autocreate: grantId\n ? {\n conf_grant_id: grantId,\n }\n : {},\n };\n return JSON.stringify(payload);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string }>) {\n this.selectedLocationOption = event.detail.value;\n let payload;\n switch (this.selectedLocationOption) {\n case 'none': {\n this.location = '';\n this.setFormValue('', this.name);\n this.valueChanged.emit({ value: '', name: this.name });\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'custom': {\n this.valueChanged.emit({ value: JSON.stringify(null), name: 'conference' });\n break;\n }\n case 'google': {\n this.location = '';\n this.setFormValue('', this.name);\n const googleConfGrantId = this.conferenceProviders?.['google'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.google,\n autocreate: googleConfGrantId\n ? {\n conf_grant_id: googleConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'microsoft': {\n this.location = '';\n this.setFormValue('', this.name);\n const microsoftConfGrantId = this.conferenceProviders?.['microsoft'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.microsoft,\n autocreate: microsoftConfGrantId\n ? {\n conf_grant_id: microsoftConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n case 'zoom': {\n this.location = '';\n this.setFormValue('', this.name);\n const zoomConfGrantId = this.conferenceProviders?.['zoom'];\n payload = {\n provider: PROVIDER_CONFERENCE_MAP.zoom,\n autocreate: zoomConfGrantId\n ? {\n conf_grant_id: zoomConfGrantId,\n }\n : {},\n };\n this.valueChanged.emit({ value: JSON.stringify(payload), name: 'conference' });\n this.valueChanged.emit({ value: '', name: this.name });\n break;\n }\n }\n }\n\n setLocationOptionsForProvider(provider: string) {\n switch (provider) {\n case 'google':\n if (!this.locationOptions.some(option => option.value === 'google')) {\n this.locationOptions.push({ value: 'google', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('google') });\n }\n break;\n case 'microsoft':\n if (!this.locationOptions.some(option => option.value === 'microsoft')) {\n this.locationOptions.push({ value: 'microsoft', label: i18next.t('nylasEventLocation.conferenceOptions.google'), labelHTML: this.getLabelHTML('microsoft') });\n }\n break;\n }\n }\n\n setDefaultLocationOption(eventConferencing: Conference | null, eventLocation: string) {\n if (eventConferencing != null && eventConferencing?.provider != null) {\n return CONFERENCE_PROVIDER_MAP[eventConferencing?.provider];\n }\n return eventLocation ? 'custom' : 'none';\n }\n setDefaultGrantID(eventConferencing: Conference) {\n if (eventConferencing != null && eventConferencing?.autocreate != null) {\n return eventConferencing?.autocreate?.conf_grant_id;\n }\n return '';\n }\n\n setFormValue(value: string, name: string) {\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(value, name);\n }\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.location = value;\n this.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\n }\n\n getIcon(location: string) {\n switch (location) {\n case 'none':\n return <location-off-icon />;\n case 'custom':\n return <location-icon />;\n case 'google':\n return <google-meet-icon />;\n case 'microsoft':\n return <microsoft-teams-icon />;\n case 'zoom':\n return <zoom-icon />;\n }\n }\n\n getLabelHTML(location: string) {\n return (\n <span\n class=\"location-label\"\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: '16px',\n width: '-webkit-fill-available',\n }}\n >\n {this.getIcon(location)}\n <span\n class=\"location-text\"\n style={{\n fontSize: '14px',\n fontWeight: '400',\n }}\n >\n {i18next.t(`nylasEventLocation.conferenceOptions.${location}`)}\n </span>\n </span>\n );\n }\n\n @RegisterComponent<NylasEventLocation, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-location',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.conferenceProviders', 'conferenceProviders'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n const defaultOption = typeof this.selectedLocationOption !== 'undefined' ? this.locationOptions.find(i => i.value == this.selectedLocationOption) : null;\n return (\n <Host>\n <div class=\"nylas-event-location\" part=\"nel\">\n <label htmlFor=\"location\">\n {i18next.t('nylasEventLocation.headerTitle')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasEventLocation.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <div class=\"location-input\">\n {/* {defaultOption && defaultOption?.label && ( */}\n <select-dropdown\n withSearch={false}\n name=\"location\"\n options={this.locationOptions}\n defaultSelectedOption={defaultOption}\n themeConfig={this.themeConfig}\n exportparts=\"sd_dropdown: nel__dropdown, sd_dropdown-button: nel__dropdown-button, sd_dropdown-content: nel__dropdown-content\"\n >\n <span slot=\"select-icon\">{this.getIcon(this.selectedLocationOption)}</span>\n </select-dropdown>\n {/* )} */}\n {this.selectedLocationOption === 'custom' && (\n <input type=\"text\" part=\"nel__location\" id=\"location\" name=\"location\" maxlength=\"1024\" value={this.location} onInput={e => this.handleChange(e)} />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -4,7 +4,7 @@ import { a as debug, b as instance } from './p-dEI4mtiM.js';
|
|
|
4
4
|
import { d as defineCustomElement$5 } from './p-BaI67hQ_.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './p-DAvS1ihh.js';
|
|
6
6
|
import { d as defineCustomElement$3 } from './p-BGfs-kGd.js';
|
|
7
|
-
import { d as defineCustomElement$2 } from './p-
|
|
7
|
+
import { d as defineCustomElement$2 } from './p-idvnK5Rl.js';
|
|
8
8
|
import { d as defineCustomElement$1 } from './p-Hj9jbKPX.js';
|
|
9
9
|
|
|
10
10
|
const nylasBookingCalendarPickerCss = ":host{display:block;--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;width:inherit}.nylas-booking-calendar-picker{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-booking-calendar-picker .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-booking-calendar-picker .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left;display:flex;align-items:center;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading{padding-bottom:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .label{display:flex;align-items:center;gap:0.5rem;margin:1rem 1rem 0;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button{margin:0 1rem;padding:0;width:inherit;height:48px;color:var(--nylas-base-900);font-size:16px;cursor:not-allowed;display:flex;gap:0.5rem;justify-content:space-between;align-items:center;background:transparent;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__loading .loading-button span{padding:0 1rem}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown{padding:1rem;display:flex;flex-direction:column;gap:4px}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label{display:flex;align-items:center;gap:4px;color:var(--nylas-base-800)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown span.label tooltip-component{display:flex}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown){width:100%}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-content){width:100%;max-width:unset}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button){width:100%;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x)}.nylas-booking-calendar-picker .nylas-booking-calendar-picker__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}";
|
|
@@ -219,6 +219,6 @@ function defineCustomElement() {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
export { NylasBookingCalendarPicker as N, defineCustomElement as d };
|
|
222
|
-
//# sourceMappingURL=p-
|
|
222
|
+
//# sourceMappingURL=p-QKc1T_NS.js.map
|
|
223
223
|
|
|
224
|
-
//# sourceMappingURL=p-
|
|
224
|
+
//# sourceMappingURL=p-QKc1T_NS.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-ybLp3dGv.js","mappings":";;;;;;;;;AAAA,MAAM,6BAA6B,GAAG,srJAAsrJ;;;;;;;;;;;;;;;;MCyB/sJ,0BAA0B,GAAAA,kBAAA,CAAA,MAAA,0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;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;;;;CA6DD,EAAA,0BAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.scss?tag=nylas-booking-calendar-picker&encapsulation=shadow","src/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.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-booking-calendar-picker {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n\n .header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n }\n\n .nylas-booking-calendar-picker__loading {\n padding-bottom: 1rem;\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n .label {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin: 1rem 1rem 0;\n color: var(--nylas-base-800);\n }\n\n .loading-button {\n margin: 0 1rem;\n padding: 0;\n width: inherit;\n height: 48px;\n color: var(--nylas-base-900);\n font-size: 16px;\n cursor: not-allowed;\n display: flex;\n gap: 0.5rem;\n justify-content: space-between;\n align-items: center;\n background: transparent;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n\n span {\n padding: 0 1rem;\n }\n }\n }\n\n .nylas-booking-calendar-picker__dropdown {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n span.label {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-800);\n\n tooltip-component {\n display: flex;\n }\n }\n\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n\n select-dropdown::part(sd_dropdown-content) {\n width: 100%;\n max-width: unset;\n }\n\n select-dropdown::part(sd_dropdown-button) {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n }\n\n select-dropdown::part(sd_dropdown-button-selected-label) {\n max-width: calc(100% - 2rem);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { Calendar, ThemeConfig } from '@nylas/core';\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 { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-booking-calendar-picker` component is a UI component that displays the booking calendar picker.\n * @part nbcp - The booking calendar picker container\n * @part nbcp__header - The header of the booking calendar picker\n * @part nbcp__input-label - The input label of the booking calendar picker\n * @part nbcp__dropdown - The dropdown container\n * @part nbcp__dropdown-button - The dropdown button\n * @part nbcp__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-booking-calendar-picker',\n styleUrl: 'nylas-booking-calendar-picker.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasBookingCalendarPicker {\n @Element() host!: HTMLNylasCalendarPickerElement;\n /**\n * @standalone\n * The calendars to choose from.\n */\n @Prop() calendars?: Calendar[];\n /**\n * @standalone\n * The current logged in user.\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The list of user's calendars.\n */\n @Prop() currentUserCalendars?: Calendar[];\n /**\n * @standalone\n * The name of the calendar picker.\n */\n @Prop() name: string = 'booking-calendar';\n /**\n * @standalone\n * The default selected calendar.\n */\n @Prop() defaultBookingCalendar: string = '';\n /**\n * The prop to hide the header.\n */\n @Prop() hideHeader: boolean = false;\n /**\n * Prop for express flow when creating a config\n */\n @Prop() expressFlow: boolean = false;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The selected calendars.\n */\n @State() selectedCalendar: string = '';\n\n /**\n * This event is fired when the selected booking calendar changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-booking-calendar-picker', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {\n debug('nylas-booking-calendar-picker', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-booking-calendar-picker', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n const primaryCalendar = this.calendars?.find(calendar => calendar.is_primary)?.id;\n const firstCalendar = this.calendars?.[0]?.id;\n const defaultCalendar = this.defaultBookingCalendar || primaryCalendar || firstCalendar || '';\n this.selectedCalendar = defaultCalendar;\n }\n\n componentDidLoad() {\n debug('nylas-booking-calendar-picker', 'componentDidLoad');\n const primaryCalendar = this.calendars?.find(calendar => calendar.is_primary)?.id;\n const firstCalendar = this.calendars?.[0]?.id;\n const defaultCalendar = this.defaultBookingCalendar || primaryCalendar || firstCalendar || '';\n this.isInternalsAvailable && this.internals.setFormValue(defaultCalendar.toString(), this.name);\n }\n\n componentWillUpdate() {\n debug('nylas-booking-calendar-picker', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-booking-calendar-picker', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-booking-calendar-picker', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-booking-calendar-picker', 'componentDidRender');\n }\n\n get isInternalsAvailable() {\n return this.internals !== undefined && 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-booking-calendar-picker', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('currentUserCalendars')\n currentUserCalendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-booking-calendar-picker', 'currentUserCalendarsChangedHandler', newValue);\n this.currentUserCalendars = 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 @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-booking-calendar-picker', 'nylasFormDropdownChangedHandler', event.detail);\n // Pass as handler so that if event.defaultPrevented by parent app, this will be skipped.\n this.isInternalsAvailable && this.internals.setValidity({});\n const valueChanged = (event: CustomEvent<{ value: string; name: string }>) => {\n const { value } = event.detail;\n this.selectedCalendar = value;\n this.isInternalsAvailable && this.internals.setFormValue(value.toString(), this.name);\n };\n this.valueChanged.emit({ value: event.detail.value, name: this.name, valueChanged });\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<NylasBookingCalendarPicker, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-booking-calendar-picker',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'currentUserCalendars'],\n ['schedulerConfig.currentUser', 'currentUser'],\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 const currentUserCalendarOptions =\n this.currentUserCalendars?.map(calendar => {\n return {\n value: calendar.id,\n label: calendar.name,\n };\n }) ?? [];\n\n const optionsFromCalendars =\n this.calendars?.map(calendar => {\n return {\n value: calendar.id,\n label: calendar.name,\n };\n }) ?? [];\n const calendarOptions = optionsFromCalendars?.length > 0 ? optionsFromCalendars : currentUserCalendarOptions || [];\n const defaultOption = calendarOptions.find(cal => cal.value == this.selectedCalendar || cal.value == this.defaultBookingCalendar);\n return (\n <Host>\n <div class=\"nylas-booking-calendar-picker\" part=\"nbcp\">\n {!this.hideHeader && (\n <div class=\"header\" part=\"nbcp__header\">\n <h3>{i18next.t('nylasBookingCalendarPicker.headerTitle')}</h3>\n <p>\n {i18next.t('nylasBookingCalendarPicker.headerSubTitle')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasBookingCalendarPicker.tooltip.desc')}</span>\n </tooltip-component>\n </p>\n </div>\n )}\n {calendarOptions.length > 0 ? (\n <div class=\"nylas-booking-calendar-picker__dropdown\">\n <select-dropdown\n name=\"booking-calendar\"\n options={[{ value: '', label: i18next.t('nylasBookingCalendarPicker.selectOptionLabel') }, ...calendarOptions]}\n withSearch={false}\n required={this.expressFlow}\n emptyValue={i18next.t('nylasBookingCalendarPicker.selectOptionLabel')}\n errorMessage={i18next.t('nylasBookingCalendarPicker.selectCalendarErrorMessage')}\n exportparts=\"sd_dropdown: nbcp__dropdown, sd_dropdown-button: nbcp__dropdown-button, sd_dropdown-content: nbcp__dropdown-content\"\n defaultSelectedOption={defaultOption ? defaultOption : null}\n themeConfig={this.themeConfig}\n />\n </div>\n ) : (\n <div class=\"nylas-booking-calendar-picker__loading\">\n <span class=\"label\">\n {i18next.t('nylasBookingCalendarPicker.tooltip.desc')} <info-icon />\n </span>\n <div class=\"loading-button\">\n <span>{i18next.t('loading')}...</span>\n </div>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-QKc1T_NS.js","mappings":";;;;;;;;;AAAA,MAAM,6BAA6B,GAAG,srJAAsrJ;;;;;;;;;;;;;;;;MCyB/sJ,0BAA0B,GAAAA,kBAAA,CAAA,MAAA,0BAAA,SAAAC,CAAA,CAAA;AANvC,IAAA,WAAA,GAAA;;;;;;AA2BU,QAAA,IAAI,CAAA,IAAA,GAAW,kBAAkB;AAK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,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;;;;CA6DD,EAAA,0BAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.scss?tag=nylas-booking-calendar-picker&encapsulation=shadow","src/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.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-booking-calendar-picker {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n\n .header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n }\n\n .nylas-booking-calendar-picker__loading {\n padding-bottom: 1rem;\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n .label {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n margin: 1rem 1rem 0;\n color: var(--nylas-base-800);\n }\n\n .loading-button {\n margin: 0 1rem;\n padding: 0;\n width: inherit;\n height: 48px;\n color: var(--nylas-base-900);\n font-size: 16px;\n cursor: not-allowed;\n display: flex;\n gap: 0.5rem;\n justify-content: space-between;\n align-items: center;\n background: transparent;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n\n span {\n padding: 0 1rem;\n }\n }\n }\n\n .nylas-booking-calendar-picker__dropdown {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n span.label {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-800);\n\n tooltip-component {\n display: flex;\n }\n }\n\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n\n select-dropdown::part(sd_dropdown-content) {\n width: 100%;\n max-width: unset;\n }\n\n select-dropdown::part(sd_dropdown-button) {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n }\n\n select-dropdown::part(sd_dropdown-button-selected-label) {\n max-width: calc(100% - 2rem);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { Calendar, ThemeConfig } from '@nylas/core';\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 { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-booking-calendar-picker` component is a UI component that displays the booking calendar picker.\n * @part nbcp - The booking calendar picker container\n * @part nbcp__header - The header of the booking calendar picker\n * @part nbcp__input-label - The input label of the booking calendar picker\n * @part nbcp__dropdown - The dropdown container\n * @part nbcp__dropdown-button - The dropdown button\n * @part nbcp__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-booking-calendar-picker',\n styleUrl: 'nylas-booking-calendar-picker.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasBookingCalendarPicker {\n @Element() host!: HTMLNylasCalendarPickerElement;\n /**\n * @standalone\n * The calendars to choose from.\n */\n @Prop() calendars?: Calendar[];\n /**\n * @standalone\n * The current logged in user.\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The list of user's calendars.\n */\n @Prop() currentUserCalendars?: Calendar[];\n /**\n * @standalone\n * The name of the calendar picker.\n */\n @Prop() name: string = 'booking-calendar';\n /**\n * @standalone\n * The default selected calendar.\n */\n @Prop() defaultBookingCalendar: string = '';\n /**\n * The prop to hide the header.\n */\n @Prop() hideHeader: boolean = false;\n /**\n * Prop for express flow when creating a config\n */\n @Prop() expressFlow: boolean = false;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The selected calendars.\n */\n @State() selectedCalendar: string = '';\n\n /**\n * This event is fired when the selected booking calendar changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-booking-calendar-picker', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {\n debug('nylas-booking-calendar-picker', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-booking-calendar-picker', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n const primaryCalendar = this.calendars?.find(calendar => calendar.is_primary)?.id;\n const firstCalendar = this.calendars?.[0]?.id;\n const defaultCalendar = this.defaultBookingCalendar || primaryCalendar || firstCalendar || '';\n this.selectedCalendar = defaultCalendar;\n }\n\n componentDidLoad() {\n debug('nylas-booking-calendar-picker', 'componentDidLoad');\n const primaryCalendar = this.calendars?.find(calendar => calendar.is_primary)?.id;\n const firstCalendar = this.calendars?.[0]?.id;\n const defaultCalendar = this.defaultBookingCalendar || primaryCalendar || firstCalendar || '';\n this.isInternalsAvailable && this.internals.setFormValue(defaultCalendar.toString(), this.name);\n }\n\n componentWillUpdate() {\n debug('nylas-booking-calendar-picker', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-booking-calendar-picker', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-booking-calendar-picker', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-booking-calendar-picker', 'componentDidRender');\n }\n\n get isInternalsAvailable() {\n return this.internals !== undefined && 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-booking-calendar-picker', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('currentUserCalendars')\n currentUserCalendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-booking-calendar-picker', 'currentUserCalendarsChangedHandler', newValue);\n this.currentUserCalendars = 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 @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-booking-calendar-picker', 'nylasFormDropdownChangedHandler', event.detail);\n // Pass as handler so that if event.defaultPrevented by parent app, this will be skipped.\n this.isInternalsAvailable && this.internals.setValidity({});\n const valueChanged = (event: CustomEvent<{ value: string; name: string }>) => {\n const { value } = event.detail;\n this.selectedCalendar = value;\n this.isInternalsAvailable && this.internals.setFormValue(value.toString(), this.name);\n };\n this.valueChanged.emit({ value: event.detail.value, name: this.name, valueChanged });\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<NylasBookingCalendarPicker, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-booking-calendar-picker',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'currentUserCalendars'],\n ['schedulerConfig.currentUser', 'currentUser'],\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 const currentUserCalendarOptions =\n this.currentUserCalendars?.map(calendar => {\n return {\n value: calendar.id,\n label: calendar.name,\n };\n }) ?? [];\n\n const optionsFromCalendars =\n this.calendars?.map(calendar => {\n return {\n value: calendar.id,\n label: calendar.name,\n };\n }) ?? [];\n const calendarOptions = optionsFromCalendars?.length > 0 ? optionsFromCalendars : currentUserCalendarOptions || [];\n const defaultOption = calendarOptions.find(cal => cal.value == this.selectedCalendar || cal.value == this.defaultBookingCalendar);\n return (\n <Host>\n <div class=\"nylas-booking-calendar-picker\" part=\"nbcp\">\n {!this.hideHeader && (\n <div class=\"header\" part=\"nbcp__header\">\n <h3>{i18next.t('nylasBookingCalendarPicker.headerTitle')}</h3>\n <p>\n {i18next.t('nylasBookingCalendarPicker.headerSubTitle')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasBookingCalendarPicker.tooltip.desc')}</span>\n </tooltip-component>\n </p>\n </div>\n )}\n {calendarOptions.length > 0 ? (\n <div class=\"nylas-booking-calendar-picker__dropdown\">\n <select-dropdown\n name=\"booking-calendar\"\n options={[{ value: '', label: i18next.t('nylasBookingCalendarPicker.selectOptionLabel') }, ...calendarOptions]}\n withSearch={false}\n required={this.expressFlow}\n emptyValue={i18next.t('nylasBookingCalendarPicker.selectOptionLabel')}\n errorMessage={i18next.t('nylasBookingCalendarPicker.selectCalendarErrorMessage')}\n exportparts=\"sd_dropdown: nbcp__dropdown, sd_dropdown-button: nbcp__dropdown-button, sd_dropdown-content: nbcp__dropdown-content\"\n defaultSelectedOption={defaultOption ? defaultOption : null}\n themeConfig={this.themeConfig}\n />\n </div>\n ) : (\n <div class=\"nylas-booking-calendar-picker__loading\">\n <span class=\"label\">\n {i18next.t('nylasBookingCalendarPicker.tooltip.desc')} <info-icon />\n </span>\n <div class=\"loading-button\">\n <span>{i18next.t('loading')}...</span>\n </div>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, e as createEvent, h } from './p-Bht9ktsW.js';
|
|
2
2
|
import { s as sanitize } from './p-dEI4mtiM.js';
|
|
3
3
|
|
|
4
|
-
const inputComponentCss = ":host{display:block;height:auto;--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;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0}label .error{color:var(--nylas-error)}.input_wrapper{display:flex;align-items:center;gap:1rem}input[type=text],input[type=number],input[type=email],input[type=phone_number]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;width:-moz-available;width:-webkit-fill-available}input[type=text]:focus,input[type=number]:focus,input[type=email]:focus,input[type=phone_number]:focus{outline-color:var(--nylas-primary)}input[type=text].error,input[type=number].error,input[type=email].error,input[type=phone_number].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=number].error::placeholder,input[type=email].error::placeholder,input[type=phone_number].error::placeholder{font-weight:400}input[type=text]::placeholder,input[type=number]::placeholder,input[type=email]::placeholder,input[type=phone_number]::placeholder{color:var(--nylas-base-300)}input:read-only{background-color:var(--nylas-base-100);cursor:not-allowed}";
|
|
4
|
+
const inputComponentCss = ":host{display:block;height:auto;--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;width:100%}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%;word-break:break-word;overflow-wrap:break-word;flex-direction:column;gap:4px;font-family:var(--nylas-font-family);font-size:16px;color:var(--nylas-base-800)}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}label p{margin:0}label .error{color:var(--nylas-error)}.input_wrapper{display:flex;align-items:center;gap:1rem}input[type=text],input[type=number],input[type=email],input[type=phone_number]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%;width:-moz-available;width:-webkit-fill-available}input[type=text]:focus,input[type=number]:focus,input[type=email]:focus,input[type=phone_number]:focus{outline-color:var(--nylas-primary)}input[type=text].error,input[type=number].error,input[type=email].error,input[type=phone_number].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=number].error::placeholder,input[type=email].error::placeholder,input[type=phone_number].error::placeholder{font-weight:400}input[type=text]::placeholder,input[type=number]::placeholder,input[type=email]::placeholder,input[type=phone_number]::placeholder{color:var(--nylas-base-300)}input:read-only{background-color:var(--nylas-base-100);cursor:not-allowed}";
|
|
5
5
|
|
|
6
6
|
const DefaultPattern = {
|
|
7
7
|
email: /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,
|
|
@@ -186,6 +186,6 @@ function defineCustomElement() {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
export { InputComponent as I, defineCustomElement as d };
|
|
189
|
-
//# sourceMappingURL=p-
|
|
189
|
+
//# sourceMappingURL=p-UahFYa1w.js.map
|
|
190
190
|
|
|
191
|
-
//# sourceMappingURL=p-
|
|
191
|
+
//# sourceMappingURL=p-UahFYa1w.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-D2DM2um3.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,6zHAA6zH;;ACIv1H,MAAM,cAAc,GAAG;AACrB,IAAA,KAAK,EAAE,sIAAsI;AAC7I,IAAA,YAAY,EAAE,eAAe;CAC9B;AAED,MAAM,kBAAkB,GAAG;AACzB,IAAA,KAAK,EAAE,kBAAkB;AACzB,IAAA,YAAY,EAAE,YAAY;CAC3B;MAYY,cAAc,GAAAA,kBAAA,CAAA,MAAA,cAAA,SAAAC,CAAA,CAAA;AAL3B,IAAA,WAAA,GAAA;;;;;;;AAaU,QAAA,IAAI,CAAA,IAAA,GAAW,OAAO;AAQtB,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AAKlB,QAAA,IAAI,CAAA,IAAA,GAAiD,MAAM;QAI3D,IAAA,CAAA,WAAW,GAAW,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;AAKnD,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAKzB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAMzB,QAAA,IAAS,CAAA,SAAA,GAAY,KAAK;AAU1B,QAAA,IAAS,CAAA,SAAA,GAAW,GAAG;AAKvB,QAAA,IAAY,CAAA,YAAA,GAAW,EAAE;AAKzB,QAAA,IAAa,CAAA,aAAA,GAAW,EAAE;AAgBzB,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AAyM5B;AA7KC,IAAA,wBAAwB,CAAC,QAAgB,EAAA;AACvC,QAAA,IAAI,CAAC,KAA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,SAAS,EACpD,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,GAAG,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ,GAAG,IAAI,CAAC,QAAQ,GAAG,SAAS,EACvD,GAAG,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ,GAAG,IAAI,CAAC,QAAQ,GAAG,SAAS,EACvD,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,EAC9B,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EACjC,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACjC,MAAM,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,EAC/B,CAAA,EACF,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,kBAAkB,EAAA,CAAQ,CACjC,EACL,IAAI,CAAC,KAAK,KACT,6DAAM,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,mBAAmB,EAAA,EACnD,IAAI,CAAC,KAAK,CACN,CACR,CACK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/design-system/input-component/input-component.scss?tag=input-component&encapsulation=shadow","src/components/design-system/input-component/input-component.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n@use '../../../common/mixins/inputs' as *;\n\n:host {\n display: block;\n height: auto;\n @include default-css-variables;\n width: 100%;\n}\n\nlabel {\n @include input-label;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n color: var(--nylas-base-800);\n\n p {\n margin: 0;\n }\n\n .error {\n color: var(--nylas-error);\n }\n}\n\n.input_wrapper {\n display: flex;\n align-items: center;\n gap: 1rem;\n}\n\ninput[type='text'],\ninput[type='number'],\ninput[type='email'],\ninput[type='phone_number'] {\n @include textfield;\n width: -moz-available;\n width: -webkit-fill-available;\n}\n\ninput:read-only {\n background-color: var(--nylas-base-100);\n cursor: not-allowed;\n}","import { Component, h, Prop, State, Event, EventEmitter, Listen, Watch, Element } from '@stencil/core';\nimport { sanitize } from '@/utils/utils';\nimport { ThemeConfig } from '@nylas/core';\n\nconst DefaultPattern = {\n email: /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,\n phone_number: /^\\+?\\d{1,15}$/,\n};\n\nconst DefaultPlaceholder = {\n email: 'name@example.com',\n phone_number: '1234567890',\n};\n\n/**\n * The `input-component` component is a UI component that allows users to input text, email, or phone number values.\n * This component is used in the scheduling form to input text, email and phone number type inputs.\n */\n\n@Component({\n tag: 'input-component',\n styleUrl: 'input-component.scss',\n shadow: true,\n})\nexport class InputComponent {\n /**\n * The host element\n */\n @Element() el!: HTMLElement;\n /**\n * The name of the input. This is used to identify the input when submitting a form.\n */\n @Prop() name: string = 'input';\n /**\n * The default value of the input. This is the value that is displayed when the input is rendered.\n */\n @Prop() defaultValue?: string;\n /**\n * The label of the input. This is displayed above the input.\n */\n @Prop() label: string = '';\n /**\n * The type of the input. This is used to determine the input's behavior.\n * Supported types are 'text', 'email', and 'phone_number'.\n */\n @Prop() type: 'text' | 'email' | 'phone_number' | 'number' = 'text';\n /**\n * The placeholder of the input. This is displayed when the input is empty.\n */\n @Prop() placeholder: string = DefaultPlaceholder[this.type];\n /**\n * Whether the input is required. If true, the input must have a value when submitting a form.\n * Default is false. If the input is required and the value is empty, an error message is displayed.\n */\n @Prop() required: boolean = false;\n /**\n * Whether the input is read-only. If true, the input cannot be edited.\n * Default is false.\n */\n @Prop() readOnly: boolean = false;\n /**\n * Whether the input should be focused when rendered.\n * Default is false. If true, the input is focused when rendered.\n * Use this to set the focus on the first input in a form.\n */\n @Prop() autoFocus: boolean = false;\n /**\n * The pattern to validate the input value. If the value does not match the pattern, an error message is displayed.\n * Default is null. If the pattern is not set, the pattern is determined by the input type for 'email' and 'phone_number'.\n */\n @Prop() pattern?: RegExp;\n /**\n * The maximum length of the input value. If the value is longer than the maximum length, an error message is displayed.\n * Default is 255.\n */\n @Prop() maxLength: number = 255;\n /**\n * The error message to display when the value does not match the pattern.\n * Default is 'Invalid <field> format.' where <field> is the input label.\n */\n @Prop() patternError: string = '';\n\n /**\n * This error message is displayed when the input value is empty and the input is required.\n */\n @Prop() requiredError: string = '';\n @Prop() maxValue?: number; // Optional max value for 'number'\n @Prop() minValue?: number; // Optional min value for 'number'\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The input value state.\n */\n @State() value!: string;\n /**\n * The error message state.\n */\n @State() error: string = '';\n\n /**\n * This event is fired when the input value is changed.\n * The scheduling form listens for this event to validate the input value and submit the form.\n * If using outside of the scheduling form, listen for this event to validate the input value\n * and handle the input value change.\n */\n @Event() nylasFormInputChanged!: EventEmitter<{\n value: string;\n name: string;\n label: string;\n type: string;\n error: string;\n }>;\n\n @Event() nylasFormInputFocused!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n @Event() nylasFormInputBlurred!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n // Lifecycle methods\n @Watch('defaultValue')\n handleDefaultValueChange(newValue: string) {\n this.value = sanitize(newValue);\n if (this.value) {\n this.validatePattern(this.value);\n }\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.el.style.setProperty(`${key}`, value);\n }\n }\n }\n\n connectedCallback() {\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.el.setAttribute('data-themed', '');\n }\n });\n }\n\n componentWillLoad() {\n // Theme already applied in connectedCallback\n }\n\n componentDidLoad() {\n this.value = sanitize(this.defaultValue || '');\n if (this.type !== 'text' && !this.pattern) {\n this.pattern = DefaultPattern[this.type];\n }\n\n if (this.value) {\n this.validatePattern(this.value);\n }\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n this.validatePattern(this.value);\n if (this.error) {\n event.preventDefault();\n }\n }\n\n @Listen('formSubmitted', { target: 'document' })\n async handleFormSubmitted(event: CustomEvent) {\n if (this.el?.getAttribute('data-page-styling')) {\n this.validatePattern(this.value);\n if (this.error) {\n event.preventDefault();\n }\n }\n }\n\n // Methods\n handleInput(e: Event) {\n this.error = '';\n const inputValue = (e.target as HTMLInputElement).value;\n\n // For 'number', ensure the value is valid\n if (this.type === 'number') {\n const numericValue = parseFloat(inputValue);\n if ((this.maxValue !== undefined && numericValue > this.maxValue) || (this.minValue !== undefined && numericValue < this.minValue)) {\n if (this.minValue === undefined) {\n this.error = `Value must be less than ${this.maxValue}`;\n } else if (this.maxValue === undefined) {\n this.error = `Value must be greater than ${this.minValue}`;\n } else {\n this.error = `Value must be between ${this.minValue} and ${this.maxValue}`;\n }\n } else if (isNaN(numericValue)) {\n this.error = this.patternError || 'Invalid format.';\n }\n }\n\n this.value = sanitize(inputValue);\n this.nylasFormInputChanged.emit({\n value: this.value,\n name: this.name,\n label: this.label,\n error: this.error,\n type: this.type,\n });\n }\n\n handleBlur() {\n this.nylasFormInputBlurred.emit({\n value: this.value,\n name: this.name,\n });\n }\n\n handleFocus() {\n this.nylasFormInputFocused.emit({\n value: this.value,\n name: this.name,\n });\n }\n\n validatePattern(value: string) {\n // Reset error\n this.error = '';\n\n if (this.required && !value) {\n this.error = this.requiredError || 'This field is required.';\n return;\n }\n\n if (this.type === 'number' && value) {\n const numericValue = parseFloat(value);\n if ((this.maxValue !== undefined && numericValue > this.maxValue) || (this.minValue !== undefined && numericValue < this.minValue)) {\n this.error = `Value must be between ${this.minValue} and ${this.maxValue}`;\n return;\n }\n }\n\n if (this.pattern && value && !this.pattern.test(value)) {\n this.error = this.patternError || 'Invalid format.';\n }\n }\n\n render() {\n return (\n <label part={this.error ? 'ic__label ic__label--error' : 'ic__label'} class={{ error: !!this.error }}>\n {this.label && (\n <p>\n <span class=\"label\">{this.label}</span>\n {this.required && <span class=\"required\">*</span>}\n </p>\n )}\n <div part=\"ic__input_wrapper\" class=\"input_wrapper\">\n <input\n type={this.type}\n name={this.name}\n part={this.error ? 'ic__input ic__input--error' : 'ic__input'}\n title={this.readOnly ? 'read-only field' : undefined}\n readOnly={this.readOnly}\n autoFocus={this.autoFocus}\n value={this.value}\n maxLength={this.maxLength}\n max={this.type === 'number' ? this.maxValue : undefined}\n min={this.type === 'number' ? this.minValue : undefined}\n placeholder={this.placeholder}\n class={{ error: !!this.error }}\n onInput={e => this.handleInput(e)}\n onFocus={() => this.handleFocus()}\n onBlur={() => this.handleBlur()}\n />\n <slot name=\"additional-input\"></slot>\n </div>\n {this.error && (\n <span class=\"error help-text\" part=\"ic__error_message\">\n {this.error}\n </span>\n )}\n </label>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-UahFYa1w.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,42HAA42H;;ACIt4H,MAAM,cAAc,GAAG;AACrB,IAAA,KAAK,EAAE,sIAAsI;AAC7I,IAAA,YAAY,EAAE,eAAe;CAC9B;AAED,MAAM,kBAAkB,GAAG;AACzB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AAC,CAAC,CAAC,EACjC,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACjC,MAAM,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,EAC/B,CAAA,EACF,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,kBAAkB,EAAA,CAAQ,CACjC,EACL,IAAI,CAAC,KAAK,KACT,6DAAM,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAC,mBAAmB,EAAA,EACnD,IAAI,CAAC,KAAK,CACN,CACR,CACK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/design-system/input-component/input-component.scss?tag=input-component&encapsulation=shadow","src/components/design-system/input-component/input-component.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n@use '../../../common/mixins/inputs' as *;\n\n:host {\n display: block;\n height: auto;\n @include default-css-variables;\n width: 100%;\n}\n\nlabel {\n @include input-label;\n flex-direction: column;\n gap: 4px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n color: var(--nylas-base-800);\n\n p {\n margin: 0;\n }\n\n .error {\n color: var(--nylas-error);\n }\n}\n\n.input_wrapper {\n display: flex;\n align-items: center;\n gap: 1rem;\n}\n\ninput[type='text'],\ninput[type='number'],\ninput[type='email'],\ninput[type='phone_number'] {\n @include textfield;\n width: -moz-available;\n width: -webkit-fill-available;\n}\n\ninput:read-only {\n background-color: var(--nylas-base-100);\n cursor: not-allowed;\n}","import { Component, h, Prop, State, Event, EventEmitter, Listen, Watch, Element } from '@stencil/core';\nimport { sanitize } from '@/utils/utils';\nimport { ThemeConfig } from '@nylas/core';\n\nconst DefaultPattern = {\n email: /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,\n phone_number: /^\\+?\\d{1,15}$/,\n};\n\nconst DefaultPlaceholder = {\n email: 'name@example.com',\n phone_number: '1234567890',\n};\n\n/**\n * The `input-component` component is a UI component that allows users to input text, email, or phone number values.\n * This component is used in the scheduling form to input text, email and phone number type inputs.\n */\n\n@Component({\n tag: 'input-component',\n styleUrl: 'input-component.scss',\n shadow: true,\n})\nexport class InputComponent {\n /**\n * The host element\n */\n @Element() el!: HTMLElement;\n /**\n * The name of the input. This is used to identify the input when submitting a form.\n */\n @Prop() name: string = 'input';\n /**\n * The default value of the input. This is the value that is displayed when the input is rendered.\n */\n @Prop() defaultValue?: string;\n /**\n * The label of the input. This is displayed above the input.\n */\n @Prop() label: string = '';\n /**\n * The type of the input. This is used to determine the input's behavior.\n * Supported types are 'text', 'email', and 'phone_number'.\n */\n @Prop() type: 'text' | 'email' | 'phone_number' | 'number' = 'text';\n /**\n * The placeholder of the input. This is displayed when the input is empty.\n */\n @Prop() placeholder: string = DefaultPlaceholder[this.type];\n /**\n * Whether the input is required. If true, the input must have a value when submitting a form.\n * Default is false. If the input is required and the value is empty, an error message is displayed.\n */\n @Prop() required: boolean = false;\n /**\n * Whether the input is read-only. If true, the input cannot be edited.\n * Default is false.\n */\n @Prop() readOnly: boolean = false;\n /**\n * Whether the input should be focused when rendered.\n * Default is false. If true, the input is focused when rendered.\n * Use this to set the focus on the first input in a form.\n */\n @Prop() autoFocus: boolean = false;\n /**\n * The pattern to validate the input value. If the value does not match the pattern, an error message is displayed.\n * Default is null. If the pattern is not set, the pattern is determined by the input type for 'email' and 'phone_number'.\n */\n @Prop() pattern?: RegExp;\n /**\n * The maximum length of the input value. If the value is longer than the maximum length, an error message is displayed.\n * Default is 255.\n */\n @Prop() maxLength: number = 255;\n /**\n * The error message to display when the value does not match the pattern.\n * Default is 'Invalid <field> format.' where <field> is the input label.\n */\n @Prop() patternError: string = '';\n\n /**\n * This error message is displayed when the input value is empty and the input is required.\n */\n @Prop() requiredError: string = '';\n @Prop() maxValue?: number; // Optional max value for 'number'\n @Prop() minValue?: number; // Optional min value for 'number'\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The input value state.\n */\n @State() value!: string;\n /**\n * The error message state.\n */\n @State() error: string = '';\n\n /**\n * This event is fired when the input value is changed.\n * The scheduling form listens for this event to validate the input value and submit the form.\n * If using outside of the scheduling form, listen for this event to validate the input value\n * and handle the input value change.\n */\n @Event() nylasFormInputChanged!: EventEmitter<{\n value: string;\n name: string;\n label: string;\n type: string;\n error: string;\n }>;\n\n @Event() nylasFormInputFocused!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n @Event() nylasFormInputBlurred!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n // Lifecycle methods\n @Watch('defaultValue')\n handleDefaultValueChange(newValue: string) {\n this.value = sanitize(newValue);\n if (this.value) {\n this.validatePattern(this.value);\n }\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.el.style.setProperty(`${key}`, value);\n }\n }\n }\n\n connectedCallback() {\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.el.setAttribute('data-themed', '');\n }\n });\n }\n\n componentWillLoad() {\n // Theme already applied in connectedCallback\n }\n\n componentDidLoad() {\n this.value = sanitize(this.defaultValue || '');\n if (this.type !== 'text' && !this.pattern) {\n this.pattern = DefaultPattern[this.type];\n }\n\n if (this.value) {\n this.validatePattern(this.value);\n }\n }\n\n // Event listeners\n /**\n * Listen for the bookingFormSubmitted event to validate the input value when the form is submitted.\n */\n @Listen('bookingFormSubmitted', { target: 'document' })\n handleBookingFormSubmitted(event: CustomEvent) {\n this.validatePattern(this.value);\n if (this.error) {\n event.preventDefault();\n }\n }\n\n @Listen('formSubmitted', { target: 'document' })\n async handleFormSubmitted(event: CustomEvent) {\n if (this.el?.getAttribute('data-page-styling')) {\n this.validatePattern(this.value);\n if (this.error) {\n event.preventDefault();\n }\n }\n }\n\n // Methods\n handleInput(e: Event) {\n this.error = '';\n const inputValue = (e.target as HTMLInputElement).value;\n\n // For 'number', ensure the value is valid\n if (this.type === 'number') {\n const numericValue = parseFloat(inputValue);\n if ((this.maxValue !== undefined && numericValue > this.maxValue) || (this.minValue !== undefined && numericValue < this.minValue)) {\n if (this.minValue === undefined) {\n this.error = `Value must be less than ${this.maxValue}`;\n } else if (this.maxValue === undefined) {\n this.error = `Value must be greater than ${this.minValue}`;\n } else {\n this.error = `Value must be between ${this.minValue} and ${this.maxValue}`;\n }\n } else if (isNaN(numericValue)) {\n this.error = this.patternError || 'Invalid format.';\n }\n }\n\n this.value = sanitize(inputValue);\n this.nylasFormInputChanged.emit({\n value: this.value,\n name: this.name,\n label: this.label,\n error: this.error,\n type: this.type,\n });\n }\n\n handleBlur() {\n this.nylasFormInputBlurred.emit({\n value: this.value,\n name: this.name,\n });\n }\n\n handleFocus() {\n this.nylasFormInputFocused.emit({\n value: this.value,\n name: this.name,\n });\n }\n\n validatePattern(value: string) {\n // Reset error\n this.error = '';\n\n if (this.required && !value) {\n this.error = this.requiredError || 'This field is required.';\n return;\n }\n\n if (this.type === 'number' && value) {\n const numericValue = parseFloat(value);\n if ((this.maxValue !== undefined && numericValue > this.maxValue) || (this.minValue !== undefined && numericValue < this.minValue)) {\n this.error = `Value must be between ${this.minValue} and ${this.maxValue}`;\n return;\n }\n }\n\n if (this.pattern && value && !this.pattern.test(value)) {\n this.error = this.patternError || 'Invalid format.';\n }\n }\n\n render() {\n return (\n <label part={this.error ? 'ic__label ic__label--error' : 'ic__label'} class={{ error: !!this.error }}>\n {this.label && (\n <p>\n <span class=\"label\">{this.label}</span>\n {this.required && <span class=\"required\">*</span>}\n </p>\n )}\n <div part=\"ic__input_wrapper\" class=\"input_wrapper\">\n <input\n type={this.type}\n name={this.name}\n part={this.error ? 'ic__input ic__input--error' : 'ic__input'}\n title={this.readOnly ? 'read-only field' : undefined}\n readOnly={this.readOnly}\n autoFocus={this.autoFocus}\n value={this.value}\n maxLength={this.maxLength}\n max={this.type === 'number' ? this.maxValue : undefined}\n min={this.type === 'number' ? this.minValue : undefined}\n placeholder={this.placeholder}\n class={{ error: !!this.error }}\n onInput={e => this.handleInput(e)}\n onFocus={() => this.handleFocus()}\n onBlur={() => this.handleBlur()}\n />\n <slot name=\"additional-input\"></slot>\n </div>\n {this.error && (\n <span class=\"error help-text\" part=\"ic__error_message\">\n {this.error}\n </span>\n )}\n </label>\n );\n }\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@ import { R as RegisterComponent } from './p-_xBp5cfI.js';
|
|
|
3
3
|
import { a as debug, b as instance, E as mergeDeep, F as parsePreviewLink } from './p-dEI4mtiM.js';
|
|
4
4
|
import { E as ErrorCategory, u } from './p-C1VNIgoH.js';
|
|
5
5
|
import { D as DEFAULT_OPEN_HOURS, e as editorTabComponentNames, C as CONFIGURATION_EVENT_TYPE } from './p-DUCeQ1R4.js';
|
|
6
|
-
import { i as isInitialized, a as init, c as captureMessage, b as captureFeedback, v as version, f as feedbackSyncIntegration } from './p-
|
|
6
|
+
import { i as isInitialized, a as init, c as captureMessage, b as captureFeedback, v as version, f as feedbackSyncIntegration } from './p-DICXD6Cy.js';
|
|
7
7
|
import { d as defineCustomElement$1o } from './p-Ha2t2y12.js';
|
|
8
8
|
import { d as defineCustomElement$1n } from './p-Dvm3cFRX.js';
|
|
9
9
|
import { d as defineCustomElement$1m } from './p-CSGxrebs.js';
|
|
@@ -11,7 +11,7 @@ import { d as defineCustomElement$1l } from './p-3TuqcJ7a.js';
|
|
|
11
11
|
import { d as defineCustomElement$1k } from './p-BW5AWWWU.js';
|
|
12
12
|
import { d as defineCustomElement$1j } from './p-CRjHH_OM.js';
|
|
13
13
|
import { d as defineCustomElement$1i } from './p-B8zO9u9G.js';
|
|
14
|
-
import { d as defineCustomElement$1h } from './p-
|
|
14
|
+
import { d as defineCustomElement$1h } from './p-B4WU6Ddk.js';
|
|
15
15
|
import { d as defineCustomElement$1g } from './p-dlRUGWVl.js';
|
|
16
16
|
import { d as defineCustomElement$1f } from './p-BaI67hQ_.js';
|
|
17
17
|
import { d as defineCustomElement$1e } from './p-BQqYYMC9.js';
|
|
@@ -27,65 +27,65 @@ import { d as defineCustomElement$15 } from './p-BXdPZfqZ.js';
|
|
|
27
27
|
import { d as defineCustomElement$14 } from './p-C-FqPkG1.js';
|
|
28
28
|
import { d as defineCustomElement$13 } from './p-sbWcoagv.js';
|
|
29
29
|
import { d as defineCustomElement$12 } from './p-DAvS1ihh.js';
|
|
30
|
-
import { d as defineCustomElement$11 } from './p-
|
|
31
|
-
import { d as defineCustomElement$10 } from './p-
|
|
30
|
+
import { d as defineCustomElement$11 } from './p-Dary9zXr.js';
|
|
31
|
+
import { d as defineCustomElement$10 } from './p-UahFYa1w.js';
|
|
32
32
|
import { d as defineCustomElement$$ } from './p-Dng-gcge.js';
|
|
33
|
-
import { d as defineCustomElement$_ } from './p-
|
|
33
|
+
import { d as defineCustomElement$_ } from './p-C4s3qYGu.js';
|
|
34
34
|
import { d as defineCustomElement$Z } from './p-hYRQCAHR.js';
|
|
35
35
|
import { d as defineCustomElement$Y } from './p-C7vQiSqU.js';
|
|
36
36
|
import { d as defineCustomElement$X } from './p-D0Ur_s8w.js';
|
|
37
37
|
import { d as defineCustomElement$W } from './p-BA0crRT4.js';
|
|
38
38
|
import { d as defineCustomElement$V } from './p-D5z467yH.js';
|
|
39
|
-
import { d as defineCustomElement$U } from './p-
|
|
40
|
-
import { d as defineCustomElement$T } from './p-
|
|
41
|
-
import { d as defineCustomElement$S } from './p-
|
|
42
|
-
import { d as defineCustomElement$R } from './p-
|
|
43
|
-
import { d as defineCustomElement$Q } from './p-
|
|
44
|
-
import { d as defineCustomElement$P } from './p-
|
|
45
|
-
import { d as defineCustomElement$O } from './p-
|
|
39
|
+
import { d as defineCustomElement$U } from './p-B-xvNL5X.js';
|
|
40
|
+
import { d as defineCustomElement$T } from './p-CZllU8ii.js';
|
|
41
|
+
import { d as defineCustomElement$S } from './p-QKc1T_NS.js';
|
|
42
|
+
import { d as defineCustomElement$R } from './p-BCNq-vH8.js';
|
|
43
|
+
import { d as defineCustomElement$Q } from './p-pLqfEMSB.js';
|
|
44
|
+
import { d as defineCustomElement$P } from './p-BdQ9iWW4.js';
|
|
45
|
+
import { d as defineCustomElement$O } from './p-DgfDGATC.js';
|
|
46
46
|
import { d as defineCustomElement$N } from './p-CPFYp0Ii.js';
|
|
47
47
|
import { d as defineCustomElement$M } from './p-BrVgWFgn.js';
|
|
48
|
-
import { d as defineCustomElement$L } from './p-
|
|
48
|
+
import { d as defineCustomElement$L } from './p-BvCTseDu.js';
|
|
49
49
|
import { d as defineCustomElement$K } from './p-C2CgHoR-.js';
|
|
50
50
|
import { d as defineCustomElement$J } from './p-1wZj-JiY.js';
|
|
51
|
-
import { d as defineCustomElement$I } from './p-
|
|
52
|
-
import { d as defineCustomElement$H } from './p-
|
|
53
|
-
import { d as defineCustomElement$G } from './p-
|
|
54
|
-
import { d as defineCustomElement$F } from './p-
|
|
55
|
-
import { d as defineCustomElement$E } from './p-
|
|
56
|
-
import { d as defineCustomElement$D } from './p-
|
|
51
|
+
import { d as defineCustomElement$I } from './p-BdQA_uHk.js';
|
|
52
|
+
import { d as defineCustomElement$H } from './p-DWCPI1lK.js';
|
|
53
|
+
import { d as defineCustomElement$G } from './p-BWgGjFXi.js';
|
|
54
|
+
import { d as defineCustomElement$F } from './p-CEvUNENN.js';
|
|
55
|
+
import { d as defineCustomElement$E } from './p-BJ6nYqW1.js';
|
|
56
|
+
import { d as defineCustomElement$D } from './p-DNm8Z4AY.js';
|
|
57
57
|
import { d as defineCustomElement$C } from './p-B_TCNkzt.js';
|
|
58
58
|
import { d as defineCustomElement$B } from './p-iVv0YwFU.js';
|
|
59
|
-
import { d as defineCustomElement$A } from './p-
|
|
60
|
-
import { d as defineCustomElement$z } from './p-
|
|
61
|
-
import { d as defineCustomElement$y } from './p-
|
|
59
|
+
import { d as defineCustomElement$A } from './p-MMkYQKuh.js';
|
|
60
|
+
import { d as defineCustomElement$z } from './p-BJHGQK2p.js';
|
|
61
|
+
import { d as defineCustomElement$y } from './p-DAr02cfd.js';
|
|
62
62
|
import { d as defineCustomElement$x } from './p-BfRJThsI.js';
|
|
63
|
-
import { d as defineCustomElement$w } from './p-
|
|
64
|
-
import { d as defineCustomElement$v } from './p-
|
|
65
|
-
import { d as defineCustomElement$u } from './p-
|
|
66
|
-
import { d as defineCustomElement$t } from './p-
|
|
63
|
+
import { d as defineCustomElement$w } from './p-keUQQIah.js';
|
|
64
|
+
import { d as defineCustomElement$v } from './p-DMltEU-a.js';
|
|
65
|
+
import { d as defineCustomElement$u } from './p-BjynTcY9.js';
|
|
66
|
+
import { d as defineCustomElement$t } from './p-Ci9dxGLY.js';
|
|
67
67
|
import { d as defineCustomElement$s } from './p-Dp-1pj3M.js';
|
|
68
68
|
import { d as defineCustomElement$r } from './p-ByIizSye.js';
|
|
69
|
-
import { d as defineCustomElement$q } from './p-
|
|
70
|
-
import { d as defineCustomElement$p } from './p-
|
|
71
|
-
import { d as defineCustomElement$o } from './p-
|
|
72
|
-
import { d as defineCustomElement$n } from './p-
|
|
73
|
-
import { d as defineCustomElement$m } from './p-
|
|
74
|
-
import { d as defineCustomElement$l } from './p-
|
|
75
|
-
import { d as defineCustomElement$k } from './p-
|
|
76
|
-
import { d as defineCustomElement$j } from './p-
|
|
69
|
+
import { d as defineCustomElement$q } from './p-BeGM4wbq.js';
|
|
70
|
+
import { d as defineCustomElement$p } from './p-BZ_muELE.js';
|
|
71
|
+
import { d as defineCustomElement$o } from './p-BsMclINV.js';
|
|
72
|
+
import { d as defineCustomElement$n } from './p-CVnhRnUq.js';
|
|
73
|
+
import { d as defineCustomElement$m } from './p-FrLX9pVa.js';
|
|
74
|
+
import { d as defineCustomElement$l } from './p-CIm8sd7h.js';
|
|
75
|
+
import { d as defineCustomElement$k } from './p-D13lTN27.js';
|
|
76
|
+
import { d as defineCustomElement$j } from './p-BGel3qwa.js';
|
|
77
77
|
import { d as defineCustomElement$i } from './p-CiXlFUAF.js';
|
|
78
|
-
import { d as defineCustomElement$h } from './p-
|
|
78
|
+
import { d as defineCustomElement$h } from './p-pRwtuoW0.js';
|
|
79
79
|
import { d as defineCustomElement$g } from './p-B-gCWV_D.js';
|
|
80
80
|
import { d as defineCustomElement$f } from './p-S5MMQ3kK.js';
|
|
81
81
|
import { d as defineCustomElement$e } from './p-RvuIq5wt.js';
|
|
82
82
|
import { d as defineCustomElement$d } from './p-D07tmsA6.js';
|
|
83
83
|
import { d as defineCustomElement$c } from './p-CC5LBxvb.js';
|
|
84
|
-
import { d as defineCustomElement$b } from './p-
|
|
84
|
+
import { d as defineCustomElement$b } from './p-DTF0fIhr.js';
|
|
85
85
|
import { d as defineCustomElement$a } from './p-BGfs-kGd.js';
|
|
86
|
-
import { d as defineCustomElement$9 } from './p-
|
|
87
|
-
import { d as defineCustomElement$8 } from './p-
|
|
88
|
-
import { d as defineCustomElement$7 } from './p-
|
|
86
|
+
import { d as defineCustomElement$9 } from './p-idvnK5Rl.js';
|
|
87
|
+
import { d as defineCustomElement$8 } from './p-B_ZbZ5lK.js';
|
|
88
|
+
import { d as defineCustomElement$7 } from './p-FFI2InLT.js';
|
|
89
89
|
import { d as defineCustomElement$6 } from './p--JWPNuJw.js';
|
|
90
90
|
import { d as defineCustomElement$5 } from './p-Hj9jbKPX.js';
|
|
91
91
|
import { d as defineCustomElement$4 } from './p-BO38LdDr.js';
|
|
@@ -1423,6 +1423,6 @@ function defineCustomElement() {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
|
|
1425
1425
|
export { NylasEditorTabs as N, defineCustomElement as d };
|
|
1426
|
-
//# sourceMappingURL=p-
|
|
1426
|
+
//# sourceMappingURL=p-cylqcpvp.js.map
|
|
1427
1427
|
|
|
1428
|
-
//# sourceMappingURL=p-
|
|
1428
|
+
//# sourceMappingURL=p-cylqcpvp.js.map
|