@nylas/web-elements 0.0.0-canary-20241008193213 → 0.0.0-canary-20241017103834
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/add-circle/add-circle.es.js +1 -1
- package/dist/cdn/add-circle-icon/add-circle-icon.es.js +1 -1
- package/dist/cdn/archive-icon/archive-icon.es.js +127 -127
- package/dist/cdn/arrow-icon/arrow-icon.es.js +248 -248
- package/dist/cdn/bold-icon/bold-icon.es.js +1 -1
- package/dist/cdn/button-component/button-component.es.js +2 -2
- package/dist/cdn/calendar/calendar.es.js +77 -77
- package/dist/cdn/calendar-agenda/calendar-agenda.es.js +1 -1
- package/dist/cdn/calendar-agenda-fill/calendar-agenda-fill.es.js +1 -1
- package/dist/cdn/calendar-agenda-fill-icon/calendar-agenda-fill-icon.es.js +1 -1
- package/dist/cdn/calendar-agenda-icon/calendar-agenda-icon.es.js +1 -1
- package/dist/cdn/calendar-cancel/calendar-cancel.es.js +1 -1
- package/dist/cdn/calendar-cancel-icon/calendar-cancel-icon.es.js +1 -1
- package/dist/cdn/calendar-check/calendar-check.es.js +139 -139
- package/dist/cdn/calendar-check-icon/calendar-check-icon.es.js +14 -14
- package/dist/cdn/calendar-icon/calendar-icon.es.js +24 -24
- package/dist/cdn/calendar-info/calendar-info.es.js +1 -1
- package/dist/cdn/calendar-info-icon/calendar-info-icon.es.js +1 -1
- package/dist/cdn/calendar-patterns/calendar-patterns.es.js +1 -1
- package/dist/cdn/calendar-patterns-icon/calendar-patterns-icon.es.js +1 -1
- package/dist/cdn/checkbox-component/checkbox-component.es.js +1 -1
- package/dist/cdn/checkmark/checkmark.es.js +86 -86
- package/dist/cdn/checkmark-circle/checkmark-circle.es.js +99 -99
- package/dist/cdn/checkmark-circle-icon/checkmark-circle-icon.es.js +14 -14
- package/dist/cdn/checkmark-icon/checkmark-icon.es.js +1 -1
- package/dist/cdn/chevron/chevron.es.js +16 -16
- package/dist/cdn/chevron-icon/chevron-icon.es.js +14 -14
- package/dist/cdn/clock/clock.es.js +16 -16
- package/dist/cdn/clock-icon/clock-icon.es.js +14 -14
- package/dist/cdn/close/close.es.js +1 -1
- package/dist/cdn/close-icon/close-icon.es.js +54 -54
- package/dist/cdn/constants/constants.es.js +3 -3
- package/dist/cdn/copy/copy.es.js +239 -239
- package/dist/cdn/copy-icon/copy-icon.es.js +271 -271
- package/dist/cdn/delete/delete.es.js +1 -1
- package/dist/cdn/delete-icon/delete-icon.es.js +1 -1
- package/dist/cdn/document-refresh-icon/document-refresh-icon.es.js +1 -1
- package/dist/cdn/dragable/dragable.es.js +54 -54
- package/dist/cdn/dragable-icon/dragable-icon.es.js +1 -1
- package/dist/cdn/edit/edit.es.js +1 -1
- package/dist/cdn/edit-icon/edit-icon.es.js +1 -1
- package/dist/cdn/envelope/envelope.es.js +25 -25
- package/dist/cdn/envelope-fill/envelope-fill.es.js +16 -16
- package/dist/cdn/envelope-fill-icon/envelope-fill-icon.es.js +97 -97
- package/dist/cdn/envelope-icon/envelope-icon.es.js +24 -24
- package/dist/cdn/eye/eye.es.js +1 -1
- package/dist/cdn/eye-icon/eye-icon.es.js +1 -1
- package/dist/cdn/feedback-icon/feedback-icon.es.js +86 -86
- package/dist/cdn/flow/flow.es.js +1 -1
- package/dist/cdn/flow-icon/flow-icon.es.js +1 -1
- package/dist/cdn/folder-icon/folder-icon.es.js +14 -14
- package/dist/cdn/forward-icon/forward-icon.es.js +240 -240
- package/dist/cdn/globe/globe.es.js +1 -1
- package/dist/cdn/globe-icon/globe-icon.es.js +1 -1
- package/dist/cdn/google-logo/google-logo.es.js +1 -1
- package/dist/cdn/google-logo-icon/google-logo-icon.es.js +1 -1
- package/dist/cdn/google-meet/google-meet.es.js +15 -15
- package/dist/cdn/google-meet-icon/google-meet-icon.es.js +1 -1
- package/dist/cdn/inbox-icon/inbox-icon.es.js +1 -1
- package/dist/cdn/info/info.es.js +239 -239
- package/dist/cdn/info-icon/info-icon.es.js +240 -240
- package/dist/cdn/input-color-picker/input-color-picker.es.js +3 -3
- package/dist/cdn/input-component/input-component.es.js +1 -1
- package/dist/cdn/input-dropdown/input-dropdown.es.js +1 -1
- package/dist/cdn/input-image-url/input-image-url.es.js +366 -366
- package/dist/cdn/italic-icon/italic-icon.es.js +86 -86
- package/dist/cdn/loading/loading.es.js +270 -270
- package/dist/cdn/loading-icon/loading-icon.es.js +271 -271
- package/dist/cdn/location/location.es.js +100 -100
- package/dist/cdn/location-icon/location-icon.es.js +19 -19
- package/dist/cdn/location-off/location-off.es.js +86 -86
- package/dist/cdn/location-off-icon/location-off-icon.es.js +1 -1
- package/dist/cdn/microsof-teams/microsof-teams.es.js +96 -96
- package/dist/cdn/microsoft-logo/microsoft-logo.es.js +1 -1
- package/dist/cdn/microsoft-logo-icon/microsoft-logo-icon.es.js +1 -1
- package/dist/cdn/microsoft-teams-icon/microsoft-teams-icon.es.js +97 -97
- package/dist/cdn/multi-select-dropdown/multi-select-dropdown.es.js +3 -3
- package/dist/cdn/nylas-additional-participants/nylas-additional-participants.es.js +55 -57
- package/dist/cdn/nylas-availability-picker/nylas-availability-picker.es.js +15 -15
- package/dist/cdn/nylas-booked-event-card/nylas-booked-event-card.es.js +10 -10
- package/dist/cdn/nylas-booking-calendar-picker/nylas-booking-calendar-picker.es.js +5 -5
- package/dist/cdn/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.es.js +7 -7
- package/dist/cdn/nylas-booking-confirmation-type/nylas-booking-confirmation-type.es.js +733 -734
- package/dist/cdn/nylas-booking-form/nylas-booking-form.es.js +154 -151
- package/dist/cdn/nylas-booking-form-config/nylas-booking-form-config.es.js +9 -9
- package/dist/cdn/nylas-buffer-time/nylas-buffer-time.es.js +5 -5
- package/dist/cdn/nylas-calendar-picker/nylas-calendar-picker.es.js +7 -7
- package/dist/cdn/nylas-cancel-booking-form/nylas-cancel-booking-form.es.js +10 -10
- package/dist/cdn/nylas-cancellation-policy/nylas-cancellation-policy.es.js +3 -3
- package/dist/cdn/nylas-cancelled-event-card/nylas-cancelled-event-card.es.js +7 -7
- package/dist/cdn/nylas-confirmation-email/nylas-confirmation-email.es.js +99 -95
- package/dist/cdn/nylas-confirmed-event-card/nylas-confirmed-event-card.es.js +723 -723
- package/dist/cdn/nylas-connected-calendars/nylas-connected-calendars.es.js +179 -179
- package/dist/cdn/nylas-custom-booking-flow/nylas-custom-booking-flow.es.js +2 -2
- package/dist/cdn/nylas-custom-event-slug/nylas-custom-event-slug.es.js +7 -7
- package/dist/cdn/nylas-customize-booking-settings/nylas-customize-booking-settings.es.js +147 -147
- package/dist/cdn/nylas-date-picker/nylas-date-picker.es.js +7 -7
- package/dist/cdn/nylas-editor-tabs/nylas-editor-tabs.es.js +6451 -6036
- package/dist/cdn/nylas-event-description/nylas-event-description.es.js +3 -3
- package/dist/cdn/nylas-event-duration/nylas-event-duration.es.js +232 -232
- package/dist/cdn/nylas-event-info/nylas-event-info.es.js +2 -2
- package/dist/cdn/nylas-event-limits/nylas-event-limits.es.js +2 -2
- package/dist/cdn/nylas-event-location/nylas-event-location.es.js +2558 -2533
- package/dist/cdn/nylas-event-title/nylas-event-title.es.js +10 -5
- package/dist/cdn/nylas-feedback-form/nylas-feedback-form.es.js +8 -8
- package/dist/cdn/nylas-form-card/nylas-form-card.es.js +1 -1
- package/dist/cdn/nylas-if-state/nylas-if-state.es.js +1 -1
- package/dist/cdn/nylas-limit-future-bookings/nylas-limit-future-bookings.es.js +8 -8
- package/dist/cdn/nylas-list-configurations/nylas-list-configurations.es.js +21 -17
- package/dist/cdn/nylas-locale-switch/nylas-locale-switch.es.js +1168 -1168
- package/dist/cdn/nylas-login/nylas-login.es.js +1 -1
- package/dist/cdn/nylas-logo/nylas-logo.es.js +125 -125
- package/dist/cdn/nylas-min-booking-notice/nylas-min-booking-notice.es.js +10 -10
- package/dist/cdn/nylas-min-cancellation-notice/nylas-min-cancellation-notice.es.js +10 -10
- package/dist/cdn/nylas-notification/nylas-notification.es.js +3 -3
- package/dist/cdn/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.es.js +6 -6
- package/dist/cdn/nylas-page-name/nylas-page-name.es.js +7 -7
- package/dist/cdn/nylas-page-styling/nylas-page-styling.es.js +4 -4
- package/dist/cdn/nylas-participant-booking-calendars/nylas-participant-booking-calendars.es.js +8 -8
- package/dist/cdn/nylas-participants-custom-availability/nylas-participants-custom-availability.es.js +176 -176
- package/dist/cdn/nylas-provider/nylas-provider.es.js +652 -644
- package/dist/cdn/nylas-reminder-emails/nylas-reminder-emails.es.js +17 -17
- package/dist/cdn/nylas-reminder-time/nylas-reminder-time.es.js +5 -5
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +1430 -1001
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1081 -1056
- package/dist/cdn/nylas-scheduling-method/nylas-scheduling-method.es.js +10 -12
- package/dist/cdn/nylas-selected-event-card/nylas-selected-event-card.es.js +4 -4
- package/dist/cdn/nylas-time-window-picker/nylas-time-window-picker.es.js +1 -1
- package/dist/cdn/nylas-timeslot-interval/nylas-timeslot-interval.es.js +147 -149
- package/dist/cdn/nylas-timeslot-picker/nylas-timeslot-picker.es.js +10 -9
- package/dist/cdn/paintbrush/paintbrush.es.js +239 -239
- package/dist/cdn/paintbrush-fill/paintbrush-fill.es.js +1 -1
- package/dist/cdn/paintbrush-fill-icon/paintbrush-fill-icon.es.js +1 -1
- package/dist/cdn/paintbrush-icon/paintbrush-icon.es.js +240 -240
- package/dist/cdn/people/people.es.js +1 -1
- package/dist/cdn/people-icon/people-icon.es.js +1 -1
- package/dist/cdn/person/person.es.js +1 -1
- package/dist/cdn/person-clipboard/person-clipboard.es.js +1 -1
- package/dist/cdn/person-clipboard-icon/person-clipboard-icon.es.js +1 -1
- package/dist/cdn/person-icon/person-icon.es.js +1 -1
- package/dist/cdn/play-icon/play-icon.es.js +248 -248
- package/dist/cdn/plus/plus.es.js +16 -16
- package/dist/cdn/plus-icon/plus-icon.es.js +14 -14
- package/dist/cdn/radio-button-group/radio-button-group.es.js +1 -1
- package/dist/cdn/refresh-icon/refresh-icon.es.js +14 -14
- package/dist/cdn/reply-all-icon/reply-all-icon.es.js +14 -14
- package/dist/cdn/reply-icon/reply-icon.es.js +14 -14
- package/dist/cdn/scheduler-store/scheduler-store.es.js +654 -646
- package/dist/cdn/search/search.es.js +1 -1
- package/dist/cdn/search-icon/search-icon.es.js +86 -86
- package/dist/cdn/select-dropdown/select-dropdown.es.js +3 -3
- package/dist/cdn/sent-icon/sent-icon.es.js +1 -1
- package/dist/cdn/spam-icon/spam-icon.es.js +86 -86
- package/dist/cdn/star-icon/star-icon.es.js +1 -1
- package/dist/cdn/stop-icon/stop-icon.es.js +1 -1
- package/dist/cdn/textarea-component/textarea-component.es.js +3 -3
- package/dist/cdn/time-period-selector/time-period-selector.es.js +230 -230
- package/dist/cdn/toggle-switch/toggle-switch.es.js +1 -1
- package/dist/cdn/toolitp-component/toolitp-component.es.js +23 -23
- package/dist/cdn/tooltip-component/tooltip-component.es.js +26 -26
- package/dist/cdn/translate/translate.es.js +246 -246
- package/dist/cdn/translate-icon/translate-icon.es.js +247 -247
- package/dist/cdn/trash/trash.es.js +1 -1
- package/dist/cdn/trash-fill-icon/trash-fill-icon.es.js +14 -14
- package/dist/cdn/trash-icon/trash-icon.es.js +1 -1
- package/dist/cdn/underline-icon/underline-icon.es.js +1 -1
- package/dist/cdn/warning/warning.es.js +247 -247
- package/dist/cdn/warning-icon/warning-icon.es.js +248 -248
- package/dist/cdn/zoom/zoom.es.js +1 -1
- package/dist/cdn/zoom-icon/zoom-icon.es.js +1 -1
- package/dist/cjs/add-circle-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/archive-icon.cjs.entry.js +1 -1
- package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon.cjs.entry.js +1 -1
- package/dist/cjs/button-component_2.cjs.entry.js +2 -2
- package/dist/cjs/{calendar-agenda-fill-icon_51.cjs.entry.js → calendar-agenda-fill-icon_54.cjs.entry.js} +736 -326
- package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js.map +1 -0
- package/dist/cjs/calendar-cancel-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-check-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/calendar-icon.cjs.entry.js +1 -1
- package/dist/cjs/checkbox-component_2.cjs.entry.js +2 -2
- package/dist/cjs/chevron-icon_3.cjs.entry.js +3 -3
- package/dist/cjs/clock-icon_4.cjs.entry.js +4 -4
- package/dist/cjs/copy-icon.cjs.entry.js +1 -1
- package/dist/cjs/delete-icon.cjs.entry.js +1 -1
- package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/folder-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-icon.cjs.entry.js +1 -1
- package/dist/cjs/globe-icon.cjs.entry.js +1 -1
- package/dist/cjs/google-logo-icon_4.cjs.entry.js +34 -23
- package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
- package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
- package/dist/cjs/index-7af03e3f.js +2 -10
- package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/input-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/input-component.cjs.entry.js +1 -1
- package/dist/cjs/input-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/italic-icon.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +35 -34
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-if-state.cjs.entry.js +1 -1
- package/dist/cjs/nylas-login.cjs.entry.js +1 -1
- package/dist/cjs/nylas-provider.cjs.entry.js +2 -2
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +22 -9
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js +1 -1
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/person-icon.cjs.entry.js +1 -1
- package/dist/cjs/play-icon.cjs.entry.js +1 -1
- package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/reply-all-icon.cjs.entry.js +1 -1
- package/dist/cjs/reply-icon.cjs.entry.js +1 -1
- package/dist/cjs/{scheduler-store-4489a68b.js → scheduler-store-e3ddffc1.js} +13 -4
- package/dist/cjs/scheduler-store-e3ddffc1.js.map +1 -0
- package/dist/cjs/sent-icon.cjs.entry.js +1 -1
- package/dist/cjs/spam-icon.cjs.entry.js +1 -1
- package/dist/cjs/star-icon.cjs.entry.js +1 -1
- package/dist/cjs/stop-icon.cjs.entry.js +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js +1 -1
- package/dist/cjs/time-period-selector.cjs.entry.js +1 -1
- package/dist/cjs/translate-icon.cjs.entry.js +1 -1
- package/dist/cjs/trash-fill-icon.cjs.entry.js +1 -1
- package/dist/cjs/underline-icon.cjs.entry.js +1 -1
- package/dist/cjs/warning-icon.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/common/icons/add-circle.js +1 -1
- package/dist/collection/common/icons/archive.js +1 -1
- package/dist/collection/common/icons/arrow.js +1 -1
- package/dist/collection/common/icons/bold.js +1 -1
- package/dist/collection/common/icons/calendar-agenda-fill.js +1 -1
- package/dist/collection/common/icons/calendar-agenda.js +1 -1
- package/dist/collection/common/icons/calendar-cancel.js +1 -1
- package/dist/collection/common/icons/calendar-check.js +1 -1
- package/dist/collection/common/icons/calendar-info.js +1 -1
- package/dist/collection/common/icons/calendar-patterns.js +1 -1
- package/dist/collection/common/icons/calendar.js +1 -1
- package/dist/collection/common/icons/checkmark-circle.js +1 -1
- package/dist/collection/common/icons/checkmark.js +1 -1
- package/dist/collection/common/icons/chevron.js +1 -1
- package/dist/collection/common/icons/clock.js +1 -1
- package/dist/collection/common/icons/close.js +1 -1
- package/dist/collection/common/icons/copy.js +1 -1
- package/dist/collection/common/icons/delete.js +1 -1
- package/dist/collection/common/icons/document-refresh.js +1 -1
- package/dist/collection/common/icons/dragable.js +1 -1
- package/dist/collection/common/icons/edit.js +1 -1
- package/dist/collection/common/icons/envelope-fill.js +1 -1
- package/dist/collection/common/icons/envelope.js +1 -1
- package/dist/collection/common/icons/eye.js +1 -1
- package/dist/collection/common/icons/feedback-icon.js +1 -1
- package/dist/collection/common/icons/flow.js +1 -1
- package/dist/collection/common/icons/folder.js +1 -1
- package/dist/collection/common/icons/forward.js +1 -1
- package/dist/collection/common/icons/globe.js +1 -1
- package/dist/collection/common/icons/google-logo.js +1 -1
- package/dist/collection/common/icons/google-meet.js +1 -1
- package/dist/collection/common/icons/inbox.js +1 -1
- package/dist/collection/common/icons/info.js +1 -1
- package/dist/collection/common/icons/italic.js +1 -1
- package/dist/collection/common/icons/loading.js +1 -1
- package/dist/collection/common/icons/location-off.js +1 -1
- package/dist/collection/common/icons/location.js +1 -1
- package/dist/collection/common/icons/microsof-teams.js +1 -1
- package/dist/collection/common/icons/microsoft-logo.js +1 -1
- package/dist/collection/common/icons/nylas-logo.js +1 -1
- package/dist/collection/common/icons/paintbrush-fill.js +1 -1
- package/dist/collection/common/icons/paintbrush.js +1 -1
- package/dist/collection/common/icons/people.js +1 -1
- package/dist/collection/common/icons/person-clipboard.js +1 -1
- package/dist/collection/common/icons/person.js +1 -1
- package/dist/collection/common/icons/play.js +1 -1
- package/dist/collection/common/icons/plus.js +1 -1
- package/dist/collection/common/icons/refresh.js +1 -1
- package/dist/collection/common/icons/reply-all.js +1 -1
- package/dist/collection/common/icons/reply.js +1 -1
- package/dist/collection/common/icons/search.js +1 -1
- package/dist/collection/common/icons/sent.js +1 -1
- package/dist/collection/common/icons/spam.js +1 -1
- package/dist/collection/common/icons/star.js +1 -1
- package/dist/collection/common/icons/stop.js +1 -1
- package/dist/collection/common/icons/translate.js +1 -1
- package/dist/collection/common/icons/trash-fill.js +1 -1
- package/dist/collection/common/icons/trash.js +1 -1
- package/dist/collection/common/icons/underline.js +1 -1
- package/dist/collection/common/icons/warning.js +1 -1
- package/dist/collection/common/icons/zoom.js +1 -1
- package/dist/collection/common/types.js.map +1 -1
- package/dist/collection/components/design-system/button-component/button-component.js +1 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +1 -1
- package/dist/collection/components/design-system/input-color-picker/input-color-picker.js +2 -2
- package/dist/collection/components/design-system/input-component/input-component.js +1 -1
- package/dist/collection/components/design-system/input-dropdown/input-dropdown.js +1 -1
- package/dist/collection/components/design-system/input-image-url/input-image-url.js +20 -2
- package/dist/collection/components/design-system/input-image-url/input-image-url.js.map +1 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +1 -1
- package/dist/collection/components/design-system/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +1 -1
- package/dist/collection/components/design-system/textarea-component/textarea-component.js +1 -1
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
- package/dist/collection/components/design-system/toggle-switch/toggle-switch.js +1 -1
- package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
- package/dist/collection/components/nylas-if-state/nylas-if-state.js +1 -1
- package/dist/collection/components/nylas-login/nylas-login.js +1 -1
- package/dist/collection/components/nylas-provider/nylas-provider.js +1 -1
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.css +23 -0
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +66 -51
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.css +23 -0
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +35 -24
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.css +23 -0
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +38 -29
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.css +23 -0
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +26 -23
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js +26 -23
- package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.css +23 -0
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +26 -20
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-feedback-form/nylas-feedback-form.js +2 -2
- package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.css +23 -0
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
- package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js +29 -23
- package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +24 -10
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js +143 -0
- package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.css +23 -0
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +3 -3
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +23 -0
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +50 -44
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +66 -55
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/test/nylas-additional-participants.spec.js +106 -0
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/test/nylas-additional-participants.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +44 -28
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +25 -10
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js +21 -9
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.js +19 -10
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +6 -3
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js +10 -4
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +45 -33
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.css +2 -1
- package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js +16 -7
- package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js +58 -30
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/test/nylas-confirmation-email.spec.js +33 -0
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/test/nylas-confirmation-email.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js +26 -10
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js +1 -0
- package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js +17 -11
- package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +62 -28
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/test/nylas-editor-tabs.spec.js +171 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/test/nylas-editor-tabs.spec.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +16 -7
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +20 -9
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration.spec.js +55 -0
- package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +74 -29
- package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +25 -11
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +16 -7
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js +32 -23
- package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +32 -23
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-page-name/nylas-page-name.js +43 -28
- package/dist/collection/components/scheduler-editor/nylas-page-name/nylas-page-name.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js +38 -26
- package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js +31 -12
- package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +18 -8
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-participants-custom-availability.spec.js +47 -0
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-participants-custom-availability.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-reminder-emails/nylas-reminder-emails.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.js +34 -27
- package/dist/collection/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +18 -53
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +12 -3
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/types/index.js +7 -6
- package/dist/collection/types/index.js.map +1 -1
- package/dist/collection/utils/test-utils.js +9 -0
- package/dist/collection/utils/test-utils.js.map +1 -1
- package/dist/components/add-circle.js +1 -1
- package/dist/components/archive-icon.js +1 -1
- package/dist/components/arrow-icon.js +1 -1
- package/dist/components/bold-icon.js +1 -1
- package/dist/components/button-component2.js +1 -1
- package/dist/components/calendar-agenda-fill.js +1 -1
- package/dist/components/calendar-agenda.js +1 -1
- package/dist/components/calendar-cancel.js +1 -1
- package/dist/components/calendar-check.js +1 -1
- package/dist/components/calendar-info.js +1 -1
- package/dist/components/calendar-patterns.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/checkbox-component2.js +1 -1
- package/dist/components/checkmark-circle.js +1 -1
- package/dist/components/checkmark.js +1 -1
- package/dist/components/chevron.js +1 -1
- package/dist/components/clock.js +1 -1
- package/dist/components/close.js +1 -1
- package/dist/components/constants.js +1 -1
- package/dist/components/copy.js +1 -1
- package/dist/components/delete.js +1 -1
- package/dist/components/document-refresh-icon.js +1 -1
- package/dist/components/dragable.js +1 -1
- package/dist/components/edit.js +1 -1
- package/dist/components/envelope-fill.js +1 -1
- package/dist/components/envelope.js +1 -1
- package/dist/components/eye.js +1 -1
- package/dist/components/feedback-icon2.js +1 -1
- package/dist/components/flow.js +1 -1
- package/dist/components/folder-icon.js +1 -1
- package/dist/components/forward-icon.js +1 -1
- package/dist/components/globe.js +1 -1
- package/dist/components/google-logo.js +1 -1
- package/dist/components/google-meet.js +1 -1
- package/dist/components/inbox-icon.js +1 -1
- package/dist/components/info.js +1 -1
- package/dist/components/input-color-picker.js +2 -2
- package/dist/components/input-component2.js +1 -1
- package/dist/components/input-dropdown2.js +1 -1
- package/dist/components/input-image-url2.js +6 -2
- package/dist/components/input-image-url2.js.map +1 -1
- package/dist/components/italic-icon.js +1 -1
- package/dist/components/loading.js +1 -1
- package/dist/components/location-off.js +1 -1
- package/dist/components/location.js +1 -1
- package/dist/components/microsof-teams.js +1 -1
- package/dist/components/microsoft-logo.js +1 -1
- package/dist/components/multi-select-dropdown2.js +1 -1
- package/dist/components/nylas-additional-participants2.js +16 -20
- package/dist/components/nylas-additional-participants2.js.map +1 -1
- package/dist/components/nylas-availability-picker2.js +5 -4
- package/dist/components/nylas-availability-picker2.js.map +1 -1
- package/dist/components/nylas-booked-event-card2.js +8 -8
- package/dist/components/nylas-booked-event-card2.js.map +1 -1
- package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-booking-confirmation-redirect2.js +1 -1
- package/dist/components/nylas-booking-confirmation-redirect2.js.map +1 -1
- package/dist/components/nylas-booking-confirmation-type2.js +2 -2
- package/dist/components/nylas-booking-confirmation-type2.js.map +1 -1
- package/dist/components/nylas-booking-form-config2.js +1 -1
- package/dist/components/nylas-booking-form-config2.js.map +1 -1
- package/dist/components/nylas-booking-form2.js +6 -5
- package/dist/components/nylas-booking-form2.js.map +1 -1
- package/dist/components/nylas-buffer-time2.js.map +1 -1
- package/dist/components/nylas-calendar-picker2.js +4 -4
- package/dist/components/nylas-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-cancel-booking-form2.js +4 -4
- package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
- package/dist/components/nylas-cancellation-policy2.js +1 -1
- package/dist/components/nylas-cancellation-policy2.js.map +1 -1
- package/dist/components/nylas-cancelled-event-card2.js +4 -4
- package/dist/components/nylas-cancelled-event-card2.js.map +1 -1
- package/dist/components/nylas-confirmation-email2.js +16 -6
- package/dist/components/nylas-confirmation-email2.js.map +1 -1
- package/dist/components/nylas-confirmed-event-card2.js +3 -3
- package/dist/components/nylas-confirmed-event-card2.js.map +1 -1
- package/dist/components/nylas-connected-calendars2.js +6 -2
- package/dist/components/nylas-connected-calendars2.js.map +1 -1
- package/dist/components/nylas-custom-booking-flow2.js +1 -1
- package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
- package/dist/components/nylas-custom-event-slug2.js +1 -0
- package/dist/components/nylas-custom-event-slug2.js.map +1 -1
- package/dist/components/nylas-customize-booking-settings2.js +4 -4
- package/dist/components/nylas-customize-booking-settings2.js.map +1 -1
- package/dist/components/nylas-date-picker2.js +4 -4
- package/dist/components/nylas-date-picker2.js.map +1 -1
- package/dist/components/nylas-editor-tabs2.js +196 -167
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-event-description2.js +1 -1
- package/dist/components/nylas-event-description2.js.map +1 -1
- package/dist/components/nylas-event-duration2.js +5 -3
- package/dist/components/nylas-event-duration2.js.map +1 -1
- package/dist/components/nylas-event-info2.js +1 -1
- package/dist/components/nylas-event-limits2.js +1 -1
- package/dist/components/nylas-event-location2.js +39 -15
- package/dist/components/nylas-event-location2.js.map +1 -1
- package/dist/components/nylas-event-title2.js +10 -5
- package/dist/components/nylas-event-title2.js.map +1 -1
- package/dist/components/nylas-feedback-form2.js +2 -2
- package/dist/components/nylas-form-card2.js +1 -1
- package/dist/components/nylas-if-state.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
- package/dist/components/nylas-list-configurations2.js +2 -2
- package/dist/components/nylas-list-configurations2.js.map +1 -1
- package/dist/components/nylas-locale-switch2.js +2 -2
- package/dist/components/nylas-locale-switch2.js.map +1 -1
- package/dist/components/nylas-login.js +1 -1
- package/dist/components/nylas-logo2.js +1 -1
- package/dist/components/nylas-min-booking-notice2.js +3 -3
- package/dist/components/nylas-min-booking-notice2.js.map +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js +3 -3
- package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
- package/dist/components/nylas-notification2.js +1 -1
- package/dist/components/nylas-organizer-confirmation-card2.js +3 -3
- package/dist/components/nylas-organizer-confirmation-card2.js.map +1 -1
- package/dist/components/nylas-page-name2.js +3 -3
- package/dist/components/nylas-page-name2.js.map +1 -1
- package/dist/components/nylas-page-styling2.js +3 -3
- package/dist/components/nylas-page-styling2.js.map +1 -1
- package/dist/components/nylas-participant-booking-calendars2.js +6 -2
- package/dist/components/nylas-participant-booking-calendars2.js.map +1 -1
- package/dist/components/nylas-participants-custom-availability2.js +3 -2
- package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
- package/dist/components/nylas-provider.js +1 -1
- package/dist/components/nylas-reminder-emails.js +1 -302
- package/dist/components/nylas-reminder-emails.js.map +1 -1
- package/dist/{esm/nylas-reminder-emails.entry.js → components/nylas-reminder-emails2.js} +123 -21
- package/dist/components/nylas-reminder-emails2.js.map +1 -0
- package/dist/components/nylas-reminder-time2.js +2 -2
- package/dist/components/nylas-scheduler-editor.js +179 -161
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling-method2.js +4 -6
- package/dist/components/nylas-scheduling-method2.js.map +1 -1
- package/dist/components/nylas-scheduling.js +22 -8
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-selected-event-card2.js +3 -3
- package/dist/components/nylas-selected-event-card2.js.map +1 -1
- package/dist/components/nylas-time-window-picker2.js +1 -1
- package/dist/components/nylas-timeslot-interval2.js +4 -8
- package/dist/components/nylas-timeslot-interval2.js.map +1 -1
- package/dist/components/nylas-timeslot-picker2.js +7 -7
- package/dist/components/nylas-timeslot-picker2.js.map +1 -1
- package/dist/components/paintbrush-fill.js +1 -1
- package/dist/components/paintbrush.js +1 -1
- package/dist/components/people.js +1 -1
- package/dist/components/person-clipboard.js +1 -1
- package/dist/components/person.js +1 -1
- package/dist/components/play-icon.js +1 -1
- package/dist/components/plus.js +1 -1
- package/dist/components/radio-button-group2.js +1 -1
- package/dist/components/refresh-icon.js +1 -1
- package/dist/components/reply-all-icon.js +1 -1
- package/dist/components/reply-icon.js +1 -1
- package/dist/components/scheduler-store.js +12 -3
- package/dist/components/scheduler-store.js.map +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/select-dropdown2.js +1 -1
- package/dist/components/sent-icon.js +1 -1
- package/dist/components/spam-icon.js +1 -1
- package/dist/components/star-icon.js +1 -1
- package/dist/components/stop-icon.js +1 -1
- package/dist/components/textarea-component2.js +1 -1
- package/dist/components/time-period-selector2.js +1 -1
- package/dist/components/toggle-switch2.js +1 -1
- package/dist/components/toolitp-component.js +1 -1
- package/dist/components/translate.js +1 -1
- package/dist/components/trash-fill-icon.js +1 -1
- package/dist/components/trash.js +1 -1
- package/dist/components/underline-icon.js +1 -1
- package/dist/components/warning.js +1 -1
- package/dist/components/zoom.js +1 -1
- package/dist/esm/add-circle-icon_2.entry.js +2 -2
- package/dist/esm/archive-icon.entry.js +1 -1
- package/dist/esm/arrow-icon.entry.js +1 -1
- package/dist/esm/bold-icon.entry.js +1 -1
- package/dist/esm/button-component_2.entry.js +2 -2
- package/dist/esm/{calendar-agenda-fill-icon_51.entry.js → calendar-agenda-fill-icon_54.entry.js} +735 -328
- package/dist/esm/calendar-agenda-fill-icon_54.entry.js.map +1 -0
- package/dist/esm/calendar-cancel-icon.entry.js +1 -1
- package/dist/esm/calendar-check-icon_2.entry.js +2 -2
- package/dist/esm/calendar-icon.entry.js +1 -1
- package/dist/esm/checkbox-component_2.entry.js +2 -2
- package/dist/esm/chevron-icon_3.entry.js +3 -3
- package/dist/esm/clock-icon_4.entry.js +4 -4
- package/dist/esm/{constants-94520f89.js → constants-c549b12b.js} +2 -2
- package/dist/esm/{constants-94520f89.js.map → constants-c549b12b.js.map} +1 -1
- package/dist/esm/copy-icon.entry.js +1 -1
- package/dist/esm/delete-icon.entry.js +1 -1
- package/dist/esm/document-refresh-icon.entry.js +1 -1
- package/dist/esm/folder-icon.entry.js +1 -1
- package/dist/esm/forward-icon.entry.js +1 -1
- package/dist/esm/globe-icon.entry.js +1 -1
- package/dist/esm/google-logo-icon_4.entry.js +35 -24
- package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
- package/dist/esm/inbox-icon.entry.js +1 -1
- package/dist/esm/index-7cb0dd3d.js +2 -10
- package/dist/esm/info-icon_2.entry.js +2 -2
- package/dist/esm/input-color-picker.entry.js +2 -2
- package/dist/esm/input-component.entry.js +1 -1
- package/dist/esm/input-dropdown.entry.js +1 -1
- package/dist/esm/italic-icon.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +1 -1
- package/dist/esm/nylas-booked-event-card_12.entry.js +36 -35
- package/dist/esm/nylas-booked-event-card_12.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +1 -1
- package/dist/esm/nylas-if-state.entry.js +1 -1
- package/dist/esm/nylas-login.entry.js +1 -1
- package/dist/esm/nylas-provider.entry.js +2 -2
- package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
- package/dist/esm/nylas-scheduling.entry.js +23 -10
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/nylas-time-window-picker.entry.js +1 -1
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/person-icon.entry.js +1 -1
- package/dist/esm/play-icon.entry.js +1 -1
- package/dist/esm/refresh-icon.entry.js +1 -1
- package/dist/esm/reply-all-icon.entry.js +1 -1
- package/dist/esm/reply-icon.entry.js +1 -1
- package/dist/esm/{scheduler-store-24e5fb65.js → scheduler-store-d4784b24.js} +13 -4
- package/dist/esm/scheduler-store-d4784b24.js.map +1 -0
- package/dist/esm/sent-icon.entry.js +1 -1
- package/dist/esm/spam-icon.entry.js +1 -1
- package/dist/esm/star-icon.entry.js +1 -1
- package/dist/esm/stop-icon.entry.js +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/time-period-selector.entry.js +1 -1
- package/dist/esm/translate-icon.entry.js +1 -1
- package/dist/esm/trash-fill-icon.entry.js +1 -1
- package/dist/esm/underline-icon.entry.js +1 -1
- package/dist/esm/warning-icon.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
- package/dist/nylas-web-elements/{p-14493c1f.entry.js → p-04d397d3.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b6e4de5b.js → p-08a590fe.js} +2 -2
- package/dist/nylas-web-elements/{p-7943a9f3.entry.js → p-108bd821.entry.js} +2 -2
- package/dist/nylas-web-elements/p-12d690b8.js +2 -0
- package/dist/nylas-web-elements/p-12d690b8.js.map +1 -0
- package/dist/nylas-web-elements/{p-d902a356.entry.js → p-1546bd61.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-651232a3.entry.js → p-1c25b695.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-caad44c4.entry.js → p-2c1432a2.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-21fb688e.entry.js → p-2f91359b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-27074ad6.entry.js → p-3268077f.entry.js} +2 -2
- package/dist/nylas-web-elements/p-32bc7f60.entry.js +2 -0
- package/dist/nylas-web-elements/p-33800554.entry.js +2 -0
- package/dist/nylas-web-elements/p-3971e86b.entry.js +2 -0
- package/dist/nylas-web-elements/p-483f2fb4.entry.js +2 -0
- package/dist/nylas-web-elements/{p-8a082b24.entry.js → p-4e57a9ee.entry.js} +2 -2
- package/dist/nylas-web-elements/p-4fb91c8b.entry.js +2 -0
- package/dist/nylas-web-elements/{p-effd77ed.entry.js → p-525bd709.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-7d5b3918.entry.js → p-56834b7a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-faeec15a.entry.js → p-5ed596d7.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6fa4597b.entry.js → p-6089d6fa.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-39af67b7.entry.js → p-61ea19c2.entry.js} +2 -2
- package/dist/nylas-web-elements/p-713505c9.entry.js +2 -0
- package/dist/nylas-web-elements/{p-bd85bf92.entry.js → p-7140bca8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-3f2f3b85.entry.js → p-762ae706.entry.js} +2 -2
- package/dist/nylas-web-elements/p-7919d41d.entry.js +2 -0
- package/dist/nylas-web-elements/p-7a1d51ab.entry.js +2 -0
- package/dist/nylas-web-elements/p-7a1d51ab.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-7bed0959.entry.js +2 -0
- package/dist/nylas-web-elements/p-7bed0959.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-27b52475.entry.js → p-7c20444b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-d55f619c.entry.js → p-988eee6f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-0519e48e.entry.js → p-9d8ffc7b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-fbddb6fe.entry.js → p-9f009793.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-1e2ffdc6.entry.js → p-aa4b24ce.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-5973b208.entry.js → p-ac8386d1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-062f6da2.entry.js → p-acfe4f6e.entry.js} +2 -2
- package/dist/nylas-web-elements/p-af2ab331.entry.js +2 -0
- package/dist/nylas-web-elements/{p-100c9ff7.entry.js → p-b110d5c1.entry.js} +2 -2
- package/dist/nylas-web-elements/p-bbf86b8c.entry.js +2 -0
- package/dist/nylas-web-elements/{p-e012eac3.entry.js → p-be938025.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-36792b8a.entry.js → p-cad17478.entry.js} +2 -2
- package/dist/nylas-web-elements/p-ce2c8e67.entry.js +2 -0
- package/dist/nylas-web-elements/{p-68320c97.entry.js → p-d1abdef7.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8013d0a2.entry.js → p-dcdb47dd.entry.js} +2 -2
- package/dist/nylas-web-elements/p-df131a08.entry.js +8 -0
- package/dist/nylas-web-elements/p-df131a08.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-cc8f94f7.entry.js → p-e1cd1887.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-00d89615.entry.js → p-eb2d8167.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9b62edf6.entry.js → p-ec302526.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-bbcf8659.entry.js → p-ec528a20.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-0e0c00cc.entry.js → p-eee29c7e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f62df769.entry.js → p-f2ae34c9.entry.js} +2 -2
- package/dist/nylas-web-elements/p-fc6ae4ec.entry.js +2 -0
- package/dist/nylas-web-elements/p-fc6ae4ec.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-fe34d0ee.entry.js +2 -0
- package/dist/nylas-web-elements/p-febf4adf.entry.js +2 -0
- package/dist/types/common/types.d.ts +3 -0
- package/dist/types/components/design-system/input-image-url/input-image-url.d.ts +4 -0
- package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +2 -2
- package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +3 -4
- package/dist/types/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.d.ts +1 -1
- package/dist/types/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.d.ts +1 -1
- package/dist/types/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.d.ts +1 -1
- package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +1 -1
- package/dist/types/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.d.ts +1 -1
- package/dist/types/components/scheduler/nylas-scheduling/nylas-scheduling.d.ts +5 -3
- package/dist/types/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.d.ts +2 -2
- package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +3 -3
- package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +2 -2
- package/dist/types/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.d.ts +5 -1
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +2 -1
- package/dist/types/components/scheduler-editor/nylas-event-location/nylas-event-location.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-page-name/nylas-page-name.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-page-styling/nylas-page-styling.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +1 -0
- package/dist/types/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.d.ts +0 -2
- package/dist/types/components.d.ts +265 -290
- package/dist/types/connector/shared/api/scheduler.d.ts +4 -4
- package/dist/types/types/index.d.ts +164 -32
- package/package.json +7 -5
- package/dist/cjs/calendar-agenda-fill-icon_51.cjs.entry.js.map +0 -1
- package/dist/cjs/nylas-reminder-emails.cjs.entry.js +0 -208
- package/dist/cjs/nylas-reminder-emails.cjs.entry.js.map +0 -1
- package/dist/cjs/nylas-reminder-time_2.cjs.entry.js +0 -175
- package/dist/cjs/nylas-reminder-time_2.cjs.entry.js.map +0 -1
- package/dist/cjs/scheduler-store-4489a68b.js.map +0 -1
- package/dist/esm/calendar-agenda-fill-icon_51.entry.js.map +0 -1
- package/dist/esm/nylas-reminder-emails.entry.js.map +0 -1
- package/dist/esm/nylas-reminder-time_2.entry.js +0 -170
- package/dist/esm/nylas-reminder-time_2.entry.js.map +0 -1
- package/dist/esm/scheduler-store-24e5fb65.js.map +0 -1
- package/dist/nylas-web-elements/p-06e44cfc.entry.js +0 -2
- package/dist/nylas-web-elements/p-06e44cfc.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-2653e311.entry.js +0 -2
- package/dist/nylas-web-elements/p-3ff76491.entry.js +0 -2
- package/dist/nylas-web-elements/p-3ff76491.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-51a66bf5.entry.js +0 -2
- package/dist/nylas-web-elements/p-5b237299.entry.js +0 -2
- package/dist/nylas-web-elements/p-63341f71.entry.js +0 -2
- package/dist/nylas-web-elements/p-6c833d5e.entry.js +0 -2
- package/dist/nylas-web-elements/p-6c833d5e.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-742d7c3c.entry.js +0 -2
- package/dist/nylas-web-elements/p-76fc639b.entry.js +0 -2
- package/dist/nylas-web-elements/p-781e954b.entry.js +0 -2
- package/dist/nylas-web-elements/p-7f56a139.entry.js +0 -2
- package/dist/nylas-web-elements/p-7f56a139.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-86194780.entry.js +0 -2
- package/dist/nylas-web-elements/p-86194780.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-96bcc255.entry.js +0 -2
- package/dist/nylas-web-elements/p-aeab587c.entry.js +0 -2
- package/dist/nylas-web-elements/p-c417fd2f.entry.js +0 -2
- package/dist/nylas-web-elements/p-ef3561ae.js +0 -2
- package/dist/nylas-web-elements/p-ef3561ae.js.map +0 -1
- package/dist/nylas-web-elements/p-fbe814b2.entry.js +0 -8
- package/dist/nylas-web-elements/p-fbe814b2.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-fdc60ce2.entry.js +0 -2
- package/dist/nylas-web-elements/p-fecf68ef.entry.js +0 -2
- /package/dist/nylas-web-elements/{p-14493c1f.entry.js.map → p-04d397d3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b6e4de5b.js.map → p-08a590fe.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7943a9f3.entry.js.map → p-108bd821.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d902a356.entry.js.map → p-1546bd61.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-651232a3.entry.js.map → p-1c25b695.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-caad44c4.entry.js.map → p-2c1432a2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-21fb688e.entry.js.map → p-2f91359b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-27074ad6.entry.js.map → p-3268077f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-aeab587c.entry.js.map → p-32bc7f60.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-76fc639b.entry.js.map → p-33800554.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-781e954b.entry.js.map → p-3971e86b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-63341f71.entry.js.map → p-483f2fb4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8a082b24.entry.js.map → p-4e57a9ee.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5b237299.entry.js.map → p-4fb91c8b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-effd77ed.entry.js.map → p-525bd709.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7d5b3918.entry.js.map → p-56834b7a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-faeec15a.entry.js.map → p-5ed596d7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6fa4597b.entry.js.map → p-6089d6fa.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-39af67b7.entry.js.map → p-61ea19c2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fdc60ce2.entry.js.map → p-713505c9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bd85bf92.entry.js.map → p-7140bca8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3f2f3b85.entry.js.map → p-762ae706.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c417fd2f.entry.js.map → p-7919d41d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-27b52475.entry.js.map → p-7c20444b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d55f619c.entry.js.map → p-988eee6f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0519e48e.entry.js.map → p-9d8ffc7b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fbddb6fe.entry.js.map → p-9f009793.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1e2ffdc6.entry.js.map → p-aa4b24ce.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5973b208.entry.js.map → p-ac8386d1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-062f6da2.entry.js.map → p-acfe4f6e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-742d7c3c.entry.js.map → p-af2ab331.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-100c9ff7.entry.js.map → p-b110d5c1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fecf68ef.entry.js.map → p-bbf86b8c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e012eac3.entry.js.map → p-be938025.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-36792b8a.entry.js.map → p-cad17478.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2653e311.entry.js.map → p-ce2c8e67.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-68320c97.entry.js.map → p-d1abdef7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8013d0a2.entry.js.map → p-dcdb47dd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-cc8f94f7.entry.js.map → p-e1cd1887.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-00d89615.entry.js.map → p-eb2d8167.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9b62edf6.entry.js.map → p-ec302526.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bbcf8659.entry.js.map → p-ec528a20.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0e0c00cc.entry.js.map → p-eee29c7e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f62df769.entry.js.map → p-f2ae34c9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-96bcc255.entry.js.map → p-fe34d0ee.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-51a66bf5.entry.js.map → p-febf4adf.entry.js.map} +0 -0
|
@@ -19,9 +19,9 @@ export class NylasConfirmationEmail {
|
|
|
19
19
|
constructor() {
|
|
20
20
|
this.selectedConfiguration = undefined;
|
|
21
21
|
this.confirmationEmailTemplate = {};
|
|
22
|
-
this.isOpen = false;
|
|
23
22
|
this.participants = [];
|
|
24
23
|
this.name = 'confirmation-email-template';
|
|
24
|
+
this.isOpen = false;
|
|
25
25
|
this.confirmationEmail = undefined;
|
|
26
26
|
this.isConfirmationEmailOpen = this.isOpen;
|
|
27
27
|
this.participantsState = this.participants;
|
|
@@ -74,8 +74,17 @@ export class NylasConfirmationEmail {
|
|
|
74
74
|
const { value, name } = event.detail;
|
|
75
75
|
if (name === 'confirmation-email-logo') {
|
|
76
76
|
this.confirmationEmail = { ...this.confirmationEmail, logo: value };
|
|
77
|
-
this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);
|
|
78
77
|
this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });
|
|
78
|
+
if (typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function') {
|
|
79
|
+
this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);
|
|
80
|
+
this.internals.setValidity({});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
async nylasFormInputImageUrlInvalidHandler(event) {
|
|
85
|
+
const { value, name } = event.detail;
|
|
86
|
+
if (name === 'confirmation-email-logo' && typeof this.internals.setValidity === 'function') {
|
|
87
|
+
this.internals.setValidity({ customError: true }, value || 'Invalid image URL.');
|
|
79
88
|
}
|
|
80
89
|
}
|
|
81
90
|
updateConfirmationFormValue() {
|
|
@@ -93,8 +102,9 @@ export class NylasConfirmationEmail {
|
|
|
93
102
|
this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });
|
|
94
103
|
}
|
|
95
104
|
render() {
|
|
96
|
-
const
|
|
97
|
-
|
|
105
|
+
const organizer = this.participantsState.find(p => p.is_organizer);
|
|
106
|
+
const organizerName = organizer?.name || organizer?.email;
|
|
107
|
+
return (h(Host, { key: 'bc4803b94f914d083bd33cf4cecd0cac70b0658c' }, h("div", { key: '6445d38b903bffd19b4db004e850f6488ed4c27f', class: "nylas-confirmation-email", part: "nce" }, h("div", { key: '7ce1ccd72ef83717aec42fe0b533902e3a254796', class: "header", part: "nce__header" }, h("div", { key: 'cbceb816c30deebc4e053a7abd1da1c82c171ebe' }, h("h3", { key: '36f5b00d5a98d325341ff06b2bb3ba3cf951e94f' }, this.confirmationEmail?.booking_confirmed?.title ?? `Booking confirmed with ${organizerName ? ` ${organizerName}` : ''}`), h("p", { key: '6f72022d71e5f4e3c03d0f6d07d7f0f5bc0f9686' }, "Booking confirmation email")), this.isConfirmationEmailOpen ? (h("div", { class: "confirmation-email-toggle", part: "nce__confirmation-email-toggle--container" }, h("span", { class: `chevron ${this.isConfirmationEmailOpen ? 'open' : 'closed'} `, onClick: () => this.toggleConfirmationEmail() }, h("chevron-icon", { width: "24", height: "24" })))) : (h("button-component", { variant: 'basic', clickHandler: event => {
|
|
98
108
|
event.preventDefault();
|
|
99
109
|
this.toggleConfirmationEmail();
|
|
100
110
|
} }, h("edit-icon", { width: "16", height: "16" }), "Edit"))), this.isConfirmationEmailOpen ? (h("div", { class: "nylas-confirmation-email__body", part: "nce__body" }, h("div", { class: "nylas-confirmation-email__section" }, h("div", { class: "nylas-confirmation-email__row" }, h("label", null, "Send confirmation email", h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, "You and your guests will receive a confirmation email immediately upon booking.")))), h("span", { class: "selected-value" }, "Immediately upon booking")), h("div", { class: "nylas-confirmation-email__row" }, h("div", { class: "subsection" }, h("div", { class: "input-container" }, h("label", null, "Company logo URL", h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, "This logo appears in the booking confirmation email. The URL must be publicly accessible. The image will be scaled down to a max size of 200px x 100px.")))), this.confirmationEmail && (h("input-image-url", { name: "confirmation-email-logo", exportparts: "iiu__logo-input-textfield: nce__input-image-url", imageUrl: this.confirmationEmail?.logo ?? '' }))))), h("div", { class: "nylas-confirmation-email__row full-width-col" }, h("div", { class: "subsection" }, h("h3", null, "Email message"), h("div", { class: "input-container" }, h("label", { htmlFor: "title" }, "Custom email title", h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, "An email title is a headline within the body of the email. This doesn't change the subject line.")))), h("input-component", { name: "confirmation-email-title", maxLength: 60, placeholder: `Booking confirmed ${organizerName ? `with ${organizerName}` : ''}`, defaultValue: this.confirmationEmail?.booking_confirmed?.title ?? '' })), h("div", { class: "input-container" }, h("textarea-component", { label: "Additional info", name: "confirmation-email-body", id: "confirmation-email-body", placeholder: "Default body", tooltip: "Scheduler adds the content of the box to the email body.", maxLength: 500, defaultValue: this.confirmationEmail?.booking_confirmed?.body ?? '' }))))))) : (h("div", { class: "nylas-confirmation-email__summary", part: "nce__summary" }, h("p", null, h("span", { class: "summary-icon" }, h("person-clipboard-icon", null)), "All host & guests"), h("p", null, h("span", { class: "summary-icon" }, h("clock-icon", null)), "Immediately on booking"))))));
|
|
@@ -131,8 +141,11 @@ export class NylasConfirmationEmail {
|
|
|
131
141
|
"required": false,
|
|
132
142
|
"optional": true,
|
|
133
143
|
"docs": {
|
|
134
|
-
"tags": [
|
|
135
|
-
|
|
144
|
+
"tags": [{
|
|
145
|
+
"name": "standalone",
|
|
146
|
+
"text": "The selected config"
|
|
147
|
+
}],
|
|
148
|
+
"text": ""
|
|
136
149
|
}
|
|
137
150
|
},
|
|
138
151
|
"confirmationEmailTemplate": {
|
|
@@ -152,29 +165,14 @@ export class NylasConfirmationEmail {
|
|
|
152
165
|
"required": false,
|
|
153
166
|
"optional": false,
|
|
154
167
|
"docs": {
|
|
155
|
-
"tags": [
|
|
156
|
-
|
|
168
|
+
"tags": [{
|
|
169
|
+
"name": "standalone",
|
|
170
|
+
"text": "The confirmation email template data to display"
|
|
171
|
+
}],
|
|
172
|
+
"text": ""
|
|
157
173
|
},
|
|
158
174
|
"defaultValue": "{} as EmailTemplate"
|
|
159
175
|
},
|
|
160
|
-
"isOpen": {
|
|
161
|
-
"type": "boolean",
|
|
162
|
-
"mutable": false,
|
|
163
|
-
"complexType": {
|
|
164
|
-
"original": "boolean",
|
|
165
|
-
"resolved": "boolean",
|
|
166
|
-
"references": {}
|
|
167
|
-
},
|
|
168
|
-
"required": false,
|
|
169
|
-
"optional": false,
|
|
170
|
-
"docs": {
|
|
171
|
-
"tags": [],
|
|
172
|
-
"text": "Is the confirmation email card open"
|
|
173
|
-
},
|
|
174
|
-
"attribute": "is-open",
|
|
175
|
-
"reflect": false,
|
|
176
|
-
"defaultValue": "false"
|
|
177
|
-
},
|
|
178
176
|
"participants": {
|
|
179
177
|
"type": "unknown",
|
|
180
178
|
"mutable": false,
|
|
@@ -192,8 +190,11 @@ export class NylasConfirmationEmail {
|
|
|
192
190
|
"required": false,
|
|
193
191
|
"optional": false,
|
|
194
192
|
"docs": {
|
|
195
|
-
"tags": [
|
|
196
|
-
|
|
193
|
+
"tags": [{
|
|
194
|
+
"name": "standalone",
|
|
195
|
+
"text": "List of participants"
|
|
196
|
+
}],
|
|
197
|
+
"text": ""
|
|
197
198
|
},
|
|
198
199
|
"defaultValue": "[]"
|
|
199
200
|
},
|
|
@@ -208,12 +209,33 @@ export class NylasConfirmationEmail {
|
|
|
208
209
|
"required": false,
|
|
209
210
|
"optional": false,
|
|
210
211
|
"docs": {
|
|
211
|
-
"tags": [
|
|
212
|
-
|
|
212
|
+
"tags": [{
|
|
213
|
+
"name": "standalone",
|
|
214
|
+
"text": "The name of the component"
|
|
215
|
+
}],
|
|
216
|
+
"text": ""
|
|
213
217
|
},
|
|
214
218
|
"attribute": "name",
|
|
215
219
|
"reflect": false,
|
|
216
220
|
"defaultValue": "'confirmation-email-template'"
|
|
221
|
+
},
|
|
222
|
+
"isOpen": {
|
|
223
|
+
"type": "boolean",
|
|
224
|
+
"mutable": false,
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "boolean",
|
|
227
|
+
"resolved": "boolean",
|
|
228
|
+
"references": {}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": false,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": "Is the confirmation email card open"
|
|
235
|
+
},
|
|
236
|
+
"attribute": "is-open",
|
|
237
|
+
"reflect": false,
|
|
238
|
+
"defaultValue": "false"
|
|
217
239
|
}
|
|
218
240
|
};
|
|
219
241
|
}
|
|
@@ -270,6 +292,12 @@ export class NylasConfirmationEmail {
|
|
|
270
292
|
"target": undefined,
|
|
271
293
|
"capture": false,
|
|
272
294
|
"passive": false
|
|
295
|
+
}, {
|
|
296
|
+
"name": "nylasFormInputImageUrlInvalid",
|
|
297
|
+
"method": "nylasFormInputImageUrlInvalidHandler",
|
|
298
|
+
"target": undefined,
|
|
299
|
+
"capture": false,
|
|
300
|
+
"passive": false
|
|
273
301
|
}];
|
|
274
302
|
}
|
|
275
303
|
static get attachInternalsMemberName() { return "internals"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-confirmation-email.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,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Y,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,YAAY,EAAE;YACZ,YAAY,EAAE,KAAK,EACjB,KAAiI,EACjI,8BAA6D,EAC7D,EAAE;gBACF,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBAEtC,IAAI,YAAY,EAAE,CAAC;oBACjB,YAAY,CAAC,KAAK,CAAC,CAAC;gBACtB,CAAC;YACH,CAAC;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;oDA0ID","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, EmailTemplate, Participant } from '@nylas/core';\n\n/**\n * The `nylas-confirmation-email` component is a UI component that allows users to set buffer time before and after an event.\n *\n * @part nce__tab-heading - The nylas-confirmation-email main tab heading\n * @part nce - The nylas-confirmation-email container\n * @part nce__header - The header of the event communication section\n * @part nce__body - The body of the event communication section\n * @part nce__confirmation-email-toggle--container - The confirmation email drawer toggle container\n * @part nce__input-image-url - The input image URL container\n * @part nce__summary - The confirmation card summary container\n */\n@Component({\n tag: 'nylas-confirmation-email',\n styleUrl: 'nylas-confirmation-email.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasConfirmationEmail {\n @Element() host!: HTMLNylasConfirmationEmailElement;\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * The confirmation email template data to display\n */\n @Prop() confirmationEmailTemplate: EmailTemplate = {} as EmailTemplate;\n /**\n * Is the confirmation email card open\n */\n @Prop() isOpen: boolean = false;\n /**\n * List of participants\n */\n @Prop() participants: Participant[] = [];\n /**\n * The name of the component\n */\n @Prop() name: string = 'confirmation-email-template';\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The confirmation email template state.\n */\n @State() confirmationEmail!: EmailTemplate;\n\n /**\n * The internal state to store the isOpen state.\n */\n @State() isConfirmationEmailOpen: boolean = this.isOpen;\n\n /**\n * The internal state to store the participants.\n */\n @State() participantsState: Participant[] = this.participants;\n\n /**\n * This event is fired when the email reminders change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-confirmation-email', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-confirmation-email', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-confirmation-email', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-confirmation-email', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.confirmationEmail = this.confirmationEmailTemplate;\n this.isConfirmationEmailOpen = this.isOpen;\n this.participantsState = this.participants;\n }\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-confirmation-email', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-confirmation-email', 'selectedConfigurationChangedHandler', newValue);\n this.confirmationEmail = newValue?.scheduler?.email_template || this.confirmationEmailTemplate;\n this.isConfirmationEmailOpen = !newValue?.event_booking?.reminders?.length;\n this.participantsState = newValue?.participants || this.participants;\n }\n\n @Listen('nylasFormInputChanged')\n async nylasFormInputChangeHandler(event: CustomEvent<{ value: string; name: string; type?: string }>) {\n const { name, value } = event.detail;\n const type = event.detail?.type;\n if (name === 'confirmation-email-title') {\n this.confirmationEmail = { ...this.confirmationEmail, booking_confirmed: { ...(this.confirmationEmail?.booking_confirmed || {}), title: value } };\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n } else if (name === 'confirmation-email-body' && type === 'multi_line_text') {\n this.handleEmailBodyChange(event);\n }\n }\n\n @Listen('valueChanged')\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-confirmation-email', 'valueChangedHandler', event.detail);\n const { value, name } = event.detail;\n\n if (name === 'confirmation-email-logo') {\n this.confirmationEmail = { ...this.confirmationEmail, logo: value };\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n }\n }\n\n updateConfirmationFormValue() {\n debug('nylas-confirmation-email', 'updateConfirmationFormValue');\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n }\n\n toggleConfirmationEmail() {\n this.isConfirmationEmailOpen = !this.isConfirmationEmailOpen;\n }\n\n handleEmailBodyChange(event) {\n const value = sanitize(event.detail.value);\n this.confirmationEmail = { ...this.confirmationEmail, booking_confirmed: { ...(this.confirmationEmail?.booking_confirmed || {}), body: value } };\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n }\n\n @RegisterComponent<NylasConfirmationEmail, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-confirmation-email',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\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 organizerName = this.participantsState.find(p => p.is_organizer)?.name;\n return (\n <Host>\n <div class=\"nylas-confirmation-email\" part=\"nce\">\n <div class=\"header\" part=\"nce__header\">\n <div>\n <h3>{this.confirmationEmail?.booking_confirmed?.title ?? `Booking confirmed with ${organizerName ? ` ${organizerName}` : ''}`}</h3>\n <p>Booking confirmation email</p>\n </div>\n {this.isConfirmationEmailOpen ? (\n <div class=\"confirmation-email-toggle\" part=\"nce__confirmation-email-toggle--container\">\n <span class={`chevron ${this.isConfirmationEmailOpen ? 'open' : 'closed'} `} onClick={() => this.toggleConfirmationEmail()}>\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n ) : (\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n this.toggleConfirmationEmail();\n }}\n >\n <edit-icon width=\"16\" height=\"16\"></edit-icon>\n Edit\n </button-component>\n )}\n </div>\n\n {this.isConfirmationEmailOpen ? (\n <div class=\"nylas-confirmation-email__body\" part=\"nce__body\">\n <div class=\"nylas-confirmation-email__section\">\n <div class=\"nylas-confirmation-email__row\">\n <label>\n Send confirmation email\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">You and your guests will receive a confirmation email immediately upon booking.</span>\n </tooltip-component>\n </span>\n </label>\n <span class=\"selected-value\">Immediately upon booking</span>\n </div>\n <div class=\"nylas-confirmation-email__row\">\n <div class=\"subsection\">\n <div class=\"input-container\">\n <label>\n Company logo URL\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n This logo appears in the booking confirmation email. The URL must be publicly accessible. The image will be scaled down to a max size of 200px x\n 100px.\n </span>\n </tooltip-component>\n </span>\n </label>\n\n {this.confirmationEmail && (\n <input-image-url\n name=\"confirmation-email-logo\"\n exportparts=\"iiu__logo-input-textfield: nce__input-image-url\"\n imageUrl={this.confirmationEmail?.logo ?? ''}\n />\n )}\n </div>\n </div>\n </div>\n <div class=\"nylas-confirmation-email__row full-width-col\">\n <div class=\"subsection\">\n <h3>Email message</h3>\n <div class=\"input-container\">\n <label htmlFor=\"title\">\n Custom email title\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">An email title is a headline within the body of the email. This doesn't change the subject line.</span>\n </tooltip-component>\n </span>\n </label>\n <input-component\n name=\"confirmation-email-title\"\n maxLength={60}\n placeholder={`Booking confirmed ${organizerName ? `with ${organizerName}` : ''}`}\n defaultValue={this.confirmationEmail?.booking_confirmed?.title ?? ''}\n ></input-component>\n </div>\n <div class=\"input-container\">\n {/* <label htmlFor=\"title\">Email body</label> */}\n <textarea-component\n label=\"Additional info\"\n name=\"confirmation-email-body\"\n id=\"confirmation-email-body\"\n placeholder=\"Default body\"\n tooltip=\"Scheduler adds the content of the box to the email body.\"\n maxLength={500}\n defaultValue={this.confirmationEmail?.booking_confirmed?.body ?? ''}\n ></textarea-component>\n\n {/* <textarea\n id=\"description\"\n part=\"nrt__textarea\"\n name=\"confirmation-email-body\"\n placeholder='Default body'\n value={this.confirmationEmail?.booking_confirmed?.body ?? ''}\n maxlength=\"500\"\n rows={2}\n onInput={e => this.handleEmailBodyChange(e)}\n ></textarea> */}\n </div>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div class=\"nylas-confirmation-email__summary\" part=\"nce__summary\">\n <p>\n <span class=\"summary-icon\">\n <person-clipboard-icon></person-clipboard-icon>\n </span>\n All host & guests\n </p>\n <p>\n <span class=\"summary-icon\">\n <clock-icon></clock-icon>\n </span>\n Immediately on booking\n </p>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-confirmation-email.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAqB9H,MAAM,OAAO,sBAAsB;;;yCAWkB,EAAmB;4BAKhC,EAAE;oBAKjB,6BAA6B;sBAI1B,KAAK;;uCAca,IAAI,CAAC,MAAM;iCAKX,IAAI,CAAC,YAAY;;IAY7D,iBAAiB;QACf,KAAK,CAAC,0BAA0B,EAAE,mBAAmB,CAAC,CAAC;IACzD,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAAC;IAC5D,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,0BAA0B,EAAE,mBAAmB,CAAC,CAAC;QAEvD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,0BAA0B,EAAE,kBAAkB,CAAC,CAAC;QACtD,IAAI,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC/B,IAAI,CAAC,mCAAmC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACvE,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,yBAAyB,CAAC;YACxD,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,MAAM,CAAC;YAC3C,IAAI,CAAC,iBAAiB,GAAG,IAAI,CA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;oDA4ID","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, EmailTemplate, Participant } from '@nylas/core';\n\n/**\n * The `nylas-confirmation-email` component is a UI component that allows users to set buffer time before and after an event.\n *\n * @part nce__tab-heading - The nylas-confirmation-email main tab heading\n * @part nce - The nylas-confirmation-email container\n * @part nce__header - The header of the event communication section\n * @part nce__body - The body of the event communication section\n * @part nce__confirmation-email-toggle--container - The confirmation email drawer toggle container\n * @part nce__input-image-url - The input image URL container\n * @part nce__summary - The confirmation card summary container\n */\n@Component({\n tag: 'nylas-confirmation-email',\n styleUrl: 'nylas-confirmation-email.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasConfirmationEmail {\n @Element() host!: HTMLNylasConfirmationEmailElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The confirmation email template data to display\n */\n @Prop() confirmationEmailTemplate: EmailTemplate = {} as EmailTemplate;\n /**\n * @standalone\n * List of participants\n */\n @Prop() participants: Participant[] = [];\n /**\n * @standalone\n * The name of the component\n */\n @Prop() name: string = 'confirmation-email-template';\n /**\n * Is the confirmation email card open\n */\n @Prop() isOpen: boolean = false;\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The confirmation email template state.\n */\n @State() confirmationEmail!: EmailTemplate;\n\n /**\n * The internal state to store the isOpen state.\n */\n @State() isConfirmationEmailOpen: boolean = this.isOpen;\n\n /**\n * The internal state to store the participants.\n */\n @State() participantsState: Participant[] = this.participants;\n\n /**\n * This event is fired when the email reminders change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-confirmation-email', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-confirmation-email', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-confirmation-email', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-confirmation-email', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.confirmationEmail = this.confirmationEmailTemplate;\n this.isConfirmationEmailOpen = this.isOpen;\n this.participantsState = this.participants;\n }\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-confirmation-email', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-confirmation-email', 'selectedConfigurationChangedHandler', newValue);\n this.confirmationEmail = newValue?.scheduler?.email_template || this.confirmationEmailTemplate;\n this.isConfirmationEmailOpen = !newValue?.event_booking?.reminders?.length;\n this.participantsState = newValue?.participants || this.participants;\n }\n\n @Listen('nylasFormInputChanged')\n async nylasFormInputChangeHandler(event: CustomEvent<{ value: string; name: string; type?: string }>) {\n const { name, value } = event.detail;\n const type = event.detail?.type;\n if (name === 'confirmation-email-title') {\n this.confirmationEmail = { ...this.confirmationEmail, booking_confirmed: { ...(this.confirmationEmail?.booking_confirmed || {}), title: value } };\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n } else if (name === 'confirmation-email-body' && type === 'multi_line_text') {\n this.handleEmailBodyChange(event);\n }\n }\n\n @Listen('valueChanged')\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-confirmation-email', 'valueChangedHandler', event.detail);\n const { value, name } = event.detail;\n\n if (name === 'confirmation-email-logo') {\n this.confirmationEmail = { ...this.confirmationEmail, logo: value };\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n if (typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.internals.setValidity({});\n }\n }\n }\n\n @Listen('nylasFormInputImageUrlInvalid')\n async nylasFormInputImageUrlInvalidHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { value, name } = event.detail;\n if (name === 'confirmation-email-logo' && typeof this.internals.setValidity === 'function') {\n this.internals.setValidity({ customError: true }, value || 'Invalid image URL.');\n }\n }\n\n updateConfirmationFormValue() {\n debug('nylas-confirmation-email', 'updateConfirmationFormValue');\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n }\n\n toggleConfirmationEmail() {\n this.isConfirmationEmailOpen = !this.isConfirmationEmailOpen;\n }\n\n handleEmailBodyChange(event) {\n const value = sanitize(event.detail.value);\n this.confirmationEmail = { ...this.confirmationEmail, booking_confirmed: { ...(this.confirmationEmail?.booking_confirmed || {}), body: value } };\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n }\n\n @RegisterComponent<NylasConfirmationEmail, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-confirmation-email',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\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 organizer = this.participantsState.find(p => p.is_organizer);\n const organizerName = organizer?.name || organizer?.email;\n\n return (\n <Host>\n <div class=\"nylas-confirmation-email\" part=\"nce\">\n <div class=\"header\" part=\"nce__header\">\n <div>\n <h3>{this.confirmationEmail?.booking_confirmed?.title ?? `Booking confirmed with ${organizerName ? ` ${organizerName}` : ''}`}</h3>\n <p>Booking confirmation email</p>\n </div>\n {this.isConfirmationEmailOpen ? (\n <div class=\"confirmation-email-toggle\" part=\"nce__confirmation-email-toggle--container\">\n <span class={`chevron ${this.isConfirmationEmailOpen ? 'open' : 'closed'} `} onClick={() => this.toggleConfirmationEmail()}>\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n ) : (\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n this.toggleConfirmationEmail();\n }}\n >\n <edit-icon width=\"16\" height=\"16\"></edit-icon>\n Edit\n </button-component>\n )}\n </div>\n\n {this.isConfirmationEmailOpen ? (\n <div class=\"nylas-confirmation-email__body\" part=\"nce__body\">\n <div class=\"nylas-confirmation-email__section\">\n <div class=\"nylas-confirmation-email__row\">\n <label>\n Send confirmation email\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">You and your guests will receive a confirmation email immediately upon booking.</span>\n </tooltip-component>\n </span>\n </label>\n <span class=\"selected-value\">Immediately upon booking</span>\n </div>\n <div class=\"nylas-confirmation-email__row\">\n <div class=\"subsection\">\n <div class=\"input-container\">\n <label>\n Company logo URL\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n This logo appears in the booking confirmation email. The URL must be publicly accessible. The image will be scaled down to a max size of 200px x\n 100px.\n </span>\n </tooltip-component>\n </span>\n </label>\n\n {this.confirmationEmail && (\n <input-image-url\n name=\"confirmation-email-logo\"\n exportparts=\"iiu__logo-input-textfield: nce__input-image-url\"\n imageUrl={this.confirmationEmail?.logo ?? ''}\n />\n )}\n </div>\n </div>\n </div>\n <div class=\"nylas-confirmation-email__row full-width-col\">\n <div class=\"subsection\">\n <h3>Email message</h3>\n <div class=\"input-container\">\n <label htmlFor=\"title\">\n Custom email title\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">An email title is a headline within the body of the email. This doesn't change the subject line.</span>\n </tooltip-component>\n </span>\n </label>\n <input-component\n name=\"confirmation-email-title\"\n maxLength={60}\n placeholder={`Booking confirmed ${organizerName ? `with ${organizerName}` : ''}`}\n defaultValue={this.confirmationEmail?.booking_confirmed?.title ?? ''}\n ></input-component>\n </div>\n <div class=\"input-container\">\n {/* <label htmlFor=\"title\">Email body</label> */}\n <textarea-component\n label=\"Additional info\"\n name=\"confirmation-email-body\"\n id=\"confirmation-email-body\"\n placeholder=\"Default body\"\n tooltip=\"Scheduler adds the content of the box to the email body.\"\n maxLength={500}\n defaultValue={this.confirmationEmail?.booking_confirmed?.body ?? ''}\n ></textarea-component>\n\n {/* <textarea\n id=\"description\"\n part=\"nrt__textarea\"\n name=\"confirmation-email-body\"\n placeholder='Default body'\n value={this.confirmationEmail?.booking_confirmed?.body ?? ''}\n maxlength=\"500\"\n rows={2}\n onInput={e => this.handleEmailBodyChange(e)}\n ></textarea> */}\n </div>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div class=\"nylas-confirmation-email__summary\" part=\"nce__summary\">\n <p>\n <span class=\"summary-icon\">\n <person-clipboard-icon></person-clipboard-icon>\n </span>\n All host & guests\n </p>\n <p>\n <span class=\"summary-icon\">\n <clock-icon></clock-icon>\n </span>\n Immediately on booking\n </p>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { NylasConfirmationEmail } from "../nylas-confirmation-email";
|
|
3
|
+
import { InputImageUrl } from "../../../design-system/input-image-url/input-image-url";
|
|
4
|
+
import { InputComponent } from "../../../design-system/input-component/input-component";
|
|
5
|
+
import { h } from "@stencil/core";
|
|
6
|
+
describe('nylas-confirmation-email', () => {
|
|
7
|
+
let page;
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
page = await newSpecPage({
|
|
10
|
+
components: [InputImageUrl, InputComponent, NylasConfirmationEmail],
|
|
11
|
+
template: () => {
|
|
12
|
+
return h("nylas-confirmation-email", { name: "confirmationEmail", isOpen: true });
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
await page.waitForChanges();
|
|
16
|
+
});
|
|
17
|
+
it('renders', async () => {
|
|
18
|
+
expect(page.root).toMatchSnapshot();
|
|
19
|
+
});
|
|
20
|
+
it('should show error message when invalid logo url is entered', async () => {
|
|
21
|
+
const inputImageUrl = page.root.shadowRoot.querySelector('input-image-url');
|
|
22
|
+
const inputEvent = new CustomEvent('nylasFormInputChanged', {
|
|
23
|
+
detail: {
|
|
24
|
+
name: 'confirmation-email-logo',
|
|
25
|
+
value: 'invalid-url',
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
inputImageUrl.dispatchEvent(inputEvent);
|
|
29
|
+
await page.waitForChanges();
|
|
30
|
+
expect(page.root).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=nylas-confirmation-email.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nylas-confirmation-email.spec.js","sourceRoot":"","sources":["../../../../../src/components/scheduler-editor/nylas-confirmation-email/test/nylas-confirmation-email.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACr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{ NylasConfirmationEmail } from '../nylas-confirmation-email';\nimport { InputImageUrl } from '../../../design-system/input-image-url/input-image-url';\nimport { InputComponent } from '../../../design-system/input-component/input-component';\nimport { h } from '@stencil/core';\n\ndescribe('nylas-confirmation-email', () => {\n let page: any;\n beforeEach(async () => {\n page = await newSpecPage({\n components: [InputImageUrl, InputComponent, NylasConfirmationEmail],\n template: () => {\n return <nylas-confirmation-email name=\"confirmationEmail\" isOpen={true} />;\n },\n });\n await page.waitForChanges();\n });\n\n it('renders', async () => {\n expect(page.root).toMatchSnapshot();\n });\n\n it('should show error message when invalid logo url is entered', async () => {\n const inputImageUrl = page.root.shadowRoot.querySelector('input-image-url');\n const inputEvent = new CustomEvent('nylasFormInputChanged', {\n detail: {\n name: 'confirmation-email-logo',\n value: 'invalid-url',\n },\n });\n inputImageUrl.dispatchEvent(inputEvent);\n await page.waitForChanges();\n expect(page.root).toMatchSnapshot();\n });\n});\n"]}
|
|
@@ -103,6 +103,10 @@ export class NylasConnectedCalendars {
|
|
|
103
103
|
this.selectedCalendars = this.setParticipants(this.selectedConfiguration?.participants);
|
|
104
104
|
this.participantCalendars = this.getParticipantCalendarOptions(this.selectedConfiguration?.participants, this.participantOptions);
|
|
105
105
|
}
|
|
106
|
+
else {
|
|
107
|
+
this.selectedCalendars = this.setParticipants(this.participants);
|
|
108
|
+
this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);
|
|
109
|
+
}
|
|
106
110
|
}
|
|
107
111
|
handleValueChanged(event) {
|
|
108
112
|
debug('[nylas-editor-tabs]', 'handleValueChanged', event);
|
|
@@ -144,12 +148,12 @@ export class NylasConnectedCalendars {
|
|
|
144
148
|
return selectedParticipants;
|
|
145
149
|
}
|
|
146
150
|
render() {
|
|
147
|
-
return (h(Host, { key: '
|
|
151
|
+
return (h(Host, { key: '32710fe762bdf90e238c62695957a9fca31db258' }, h("div", { key: 'a5ebf4adb7eb8e1b8a065bc05733738da06fbac3', class: "nylas-connected-calendars", part: "nccals" }, h("div", { key: 'f3c820bcde922a7b852630d86145b1e6e1bf0e25', class: "header", part: "nccals__header" }, h("h3", { key: 'e2b68d05d416c322b22f969d8d8c890a09812154' }, "Connected Calendars"), h("p", { key: '4dd41d10a6043fec1c0f4943371c312a29e1d489' }, "Select the calendars to use for checking your availability.", h("tooltip-component", { key: '6a8ec009fd879e1ed6b6fb65be75a88255adba17' }, h("info-icon", { key: '0d4a99eaee064ecee1c82ee5b13f3ab87a1d5d93', slot: "tooltip-icon" }), h("span", { key: 'de3779efce64d7a14dbc3f7759c827005f92ed50', slot: "tooltip-content" }, "Check availability across one or more calendars. If you select multiple calendars for a participant, the participant must be available across all of their calendars to be considered available.")))), h("div", { key: '720267110636c1dc06ac67b7e715515f56737b73', class: "content", part: "nccals__content" }, h("form", { key: 'f295ba327aa302ea186dbf2daef3a9c30f96ee5f', ref: el => (this.connectedCalendarsFormRef = el) }, Object.keys(this.participantCalendars).map((key, index) => {
|
|
148
152
|
const participant = this.selectedCalendars[key];
|
|
149
153
|
const participantCalendars = this.participantCalendars[key];
|
|
150
154
|
if (!participant || !participant.name)
|
|
151
155
|
return;
|
|
152
|
-
return (h("div", { class: "participant-container", part: "
|
|
156
|
+
return (h("div", { class: "participant-container", part: "nccals__container", key: `participant-conatiner-${index}` }, h("div", { class: "participant-title", part: "nccals__title" }, h("p", null, participant.name, "'s connected calendars"), h("div", { class: "participant-toggle", part: "nccals__toggle-container" }, h("span", { class: `chevron ${participant.isOpen ? 'open' : 'closed'}`, onClick: () => {
|
|
153
157
|
this.selectedCalendars[key].isOpen = !participant.isOpen;
|
|
154
158
|
this.selectedCalendars = { ...this.selectedCalendars };
|
|
155
159
|
} }, h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (h("nylas-calendar-picker", { key: key, name: `participant-${key}`, calendars: participantCalendars, defaultSelectedCalendars: this.participantDefaultSelectedCalendars[key] }))));
|
|
@@ -205,8 +209,11 @@ export class NylasConnectedCalendars {
|
|
|
205
209
|
"required": false,
|
|
206
210
|
"optional": true,
|
|
207
211
|
"docs": {
|
|
208
|
-
"tags": [
|
|
209
|
-
|
|
212
|
+
"tags": [{
|
|
213
|
+
"name": "standalone",
|
|
214
|
+
"text": "The selected config"
|
|
215
|
+
}],
|
|
216
|
+
"text": ""
|
|
210
217
|
}
|
|
211
218
|
},
|
|
212
219
|
"participants": {
|
|
@@ -226,8 +233,11 @@ export class NylasConnectedCalendars {
|
|
|
226
233
|
"required": false,
|
|
227
234
|
"optional": false,
|
|
228
235
|
"docs": {
|
|
229
|
-
"tags": [
|
|
230
|
-
|
|
236
|
+
"tags": [{
|
|
237
|
+
"name": "standalone",
|
|
238
|
+
"text": "The participants selected in the add participants section."
|
|
239
|
+
}],
|
|
240
|
+
"text": ""
|
|
231
241
|
},
|
|
232
242
|
"defaultValue": "this.selectedConfiguration?.participants || []"
|
|
233
243
|
},
|
|
@@ -248,8 +258,11 @@ export class NylasConnectedCalendars {
|
|
|
248
258
|
"required": false,
|
|
249
259
|
"optional": true,
|
|
250
260
|
"docs": {
|
|
251
|
-
"tags": [
|
|
252
|
-
|
|
261
|
+
"tags": [{
|
|
262
|
+
"name": "standalone",
|
|
263
|
+
"text": "The calendars to choose from for the organizer / logged in user."
|
|
264
|
+
}],
|
|
265
|
+
"text": ""
|
|
253
266
|
}
|
|
254
267
|
},
|
|
255
268
|
"participantOptions": {
|
|
@@ -269,8 +282,11 @@ export class NylasConnectedCalendars {
|
|
|
269
282
|
"required": false,
|
|
270
283
|
"optional": true,
|
|
271
284
|
"docs": {
|
|
272
|
-
"tags": [
|
|
273
|
-
|
|
285
|
+
"tags": [{
|
|
286
|
+
"name": "standalone",
|
|
287
|
+
"text": "The participant options passed in the additionalParticipants prop\nfrom the nylas-scheduler-editor component."
|
|
288
|
+
}],
|
|
289
|
+
"text": ""
|
|
274
290
|
}
|
|
275
291
|
}
|
|
276
292
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-connected-calendars.js","sourceRoot":"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C/B,wBAAwB,EAAE,IAAI,CAAC,mCAAmC,CAAC,GAAG,CAAC,GACvE,CACH,CACG,CACP,CAAC;oBACJ,CAAC,CAAC,CACG,CACH,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAxDC;IAVC,iBAAiB,CAA6G;QAC7H,IAAI,EAAE,2BAA2B;QACjC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,2BAA2B,EAAE,WAAW,CAAC;YAC1C,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;SACnE,CAAC;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDAwDD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { AdditionalParticipant, Calendar, Configuration, Participant } from '@nylas/core';\n\n/**\n * The `nylas-connected-calendars` component is a form input for selecting calendars to check availability for participants.\n */\n@Component({\n tag: 'nylas-connected-calendars',\n styleUrl: 'nylas-connected-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasConnectedCalendars {\n @Element() host!: HTMLNylasConnectedCalendarsElement;\n private connectedCalendarsFormRef!: HTMLFormElement;\n\n /**\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'connected-calendars';\n\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * The calendars to choose from for the organizer / logged in user.\n */\n @Prop() calendars?: Calendar[];\n\n /**\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedCalendars: {\n [key: string]: {\n isOpen: boolean;\n name: string;\n calendars?: Calendar[];\n };\n } = this.setParticipants(this.participants);\n\n /**\n * Participants calendar options.\n */\n @State() participantCalendars: {\n [key: string]: Calendar[];\n } = {};\n\n /**\n * The state to store the default selected calendars for each participant\n */\n @State() participantDefaultSelectedCalendars: {\n [key: string]: string[];\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-connected-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-connected-calendars', 'calendarsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-connected-calendars', 'participantsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(newValue, this.participantOptions);\n }\n\n @Watch('participantOptions')\n participantOptionsChangedHandler(newValue: AdditionalParticipant[]) {\n debug('nylas-calendar-picker', 'participantOptionsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-calendar-picker', 'selectedConfigurationChangedHandler', newValue);\n const participants = newValue?.participants || this.participants;\n if (participants && participants.length > 0) {\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n }\n\n getParticipantCalendarOptions(addedParticipants: Participant[], availableParticipantOptions: AdditionalParticipant[] | undefined) {\n // Get the participants from the availableParticipantOptions prop that are in the addedParticipants prop\n const organizer = addedParticipants?.find(participant => participant.is_organizer);\n const isRoundRobinConfig = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n const participantCalendars = {};\n if (availableParticipantOptions) {\n const participants = addedParticipants?.filter(participant => availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email));\n const remainingParticipants = addedParticipants?.filter(\n participant => !availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email),\n );\n\n // Get the calendar options for each participant with email as the key\n participants?.forEach(participant => {\n const participantOption = availableParticipantOptions?.find(participantOption => participantOption.email === participant.email);\n if (!participantOption) return;\n this.participantDefaultSelectedCalendars[participant.email] = participant.availability?.calendar_ids || [];\n const calendars = participantOption.calendars ?? [];\n participant.availability?.calendar_ids?.forEach(calendarId => {\n if (!calendars?.some(calendar => calendar.id === calendarId) && calendarId !== 'primary') {\n calendars.push({ id: calendarId, name: calendarId });\n }\n });\n participantCalendars[participant.email] = calendars;\n });\n if (isRoundRobinConfig) {\n // If it is round robin config, add the remaining participant calendars to the participantCalendars\n // (Round-robin does not have an organizer, and we filtered out the participants not passed in the participantOptions prop,\n // so we need to add the remaining participants calendars to the participantCalendars)\n remainingParticipants?.forEach(participant => {\n if (participant?.availability?.calendar_ids && participant?.availability?.calendar_ids?.length > 0 && !participant.is_organizer) {\n participantCalendars[participant.email] = this.calendars ?? [{ id: 'primary', name: participant.email }];\n this.participantDefaultSelectedCalendars[participant.email] = participant.availability?.calendar_ids || [];\n }\n });\n }\n }\n\n // Add the organizer's calendars to the participantCalendars\n if (organizer) {\n participantCalendars[organizer.email] = this.calendars ?? [{ id: 'primary', name: organizer.email }];\n this.participantDefaultSelectedCalendars[organizer.email] = organizer.availability?.calendar_ids || [];\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-connected-calendars', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-connected-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-connected-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-connected-calendars', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedCalendars = this.setParticipants(this.selectedConfiguration?.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.selectedConfiguration?.participants, this.participantOptions);\n }\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-')) {\n return;\n }\n // Validate the form\n if (!this.connectedCalendarsFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please select at least one calendar for each participant.');\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const key = name.split('participant-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendars'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key].calendars;\n });\n this.internals.setFormValue(JSON.stringify(participantsCalendars), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantsCalendars), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n if (participant?.availability?.calendar_ids && participant?.availability?.calendar_ids?.length > 0) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n name: participant.name || participant.email,\n availability: participant.availability,\n };\n }\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasConnectedCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-connected-calendars',\n stateToProps: new Map([\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-connected-calendars\" part=\"npca\">\n <div class=\"header\" part=\"npca__header\">\n <h3>Connected Calendars</h3>\n <p>\n Select the calendars to use for checking your availability.\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n Check availability across one or more calendars. If you select multiple calendars for a participant, the participant must be available across all of their\n calendars to be considered available.\n </span>\n </tooltip-component>\n </p>\n </div>\n <div class=\"content\" part=\"npca__content\">\n <form ref={el => (this.connectedCalendarsFormRef = el as HTMLFormElement)}>\n {Object.keys(this.participantCalendars).map((key, index) => {\n const participant = this.selectedCalendars[key];\n const participantCalendars = this.participantCalendars[key];\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"npca__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npca__participant-title\">\n <p>{participant.name}'s connected calendars</p>\n <div class=\"participant-toggle\" part=\"npca__participant-toggle--container\">\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.selectedCalendars[key].isOpen = !participant.isOpen;\n this.selectedCalendars = { ...this.selectedCalendars };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-calendar-picker\n key={key}\n name={`participant-${key}`}\n calendars={participantCalendars}\n defaultSelectedCalendars={this.participantDefaultSelectedCalendars[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-connected-calendars.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAmB9H,MAAM,OAAO,uBAAuB;;oBAOX,qBAAqB;;4BAYN,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;;;iCAqChF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;oCAOvC,EAAE;mDAOF,EAAE;;IAIN,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,2BAA2B,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QAC1E,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAGD,uBAAuB,CAAC,QAAoB;QAC1C,KAAK,CAAC,2BAA2B,EAAE,yBAAyB,EAAE,QAAQ,CAAC,CAAC;QACxE,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACjE,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,6BAA6B,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAC7G,CAAC;IAGD,0BAA0B,CAAC,QAAuB;QAChD,KAAK,CAAC,2BAA2B,EAAE,4BAA4B,EAAE,QAAQ,CAAC,CAAC;QAC3E,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACxD,IAAI,CAAC,oB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GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;wCACzD,CAAC;wCAED,oBAAc,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CAClC,CACH,CACF;4BACL,WAAW,CAAC,MAAM,IAAI,CACrB,6BACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,eAAe,GAAG,EAAE,EAC1B,SAAS,EAAE,oBAAoB,EAC/B,wBAAwB,EAAE,IAAI,CAAC,mCAAmC,CAAC,GAAG,CAAC,GACvE,CACH,CACG,CACP,CAAC;oBACJ,CAAC,CAAC,CACG,CACH,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAxDC;IAVC,iBAAiB,CAA6G;QAC7H,IAAI,EAAE,2BAA2B;QACjC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,2BAA2B,EAAE,WAAW,CAAC;YAC1C,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;SACnE,CAAC;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;qDAwDD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { AdditionalParticipant, Calendar, Configuration, Participant } from '@nylas/core';\n\n/**\n * The `nylas-connected-calendars` component is a form input for selecting calendars to check availability for participants.\n * @part nccals - The connected calendars host.\n * @part nccals__header - The header.\n * @part nccals__content - The content.\n * @part nccals__container - The container.\n * @part nccals__title - The title.\n * @part nccals__toggle-container - The toggle container.\n */\n@Component({\n tag: 'nylas-connected-calendars',\n styleUrl: 'nylas-connected-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasConnectedCalendars {\n @Element() host!: HTMLNylasConnectedCalendarsElement;\n private connectedCalendarsFormRef!: HTMLFormElement;\n\n /**\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'connected-calendars';\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * @standalone\n * The calendars to choose from for the organizer / logged in user.\n */\n @Prop() calendars?: Calendar[];\n\n /**\n * @standalone\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedCalendars: {\n [key: string]: {\n isOpen: boolean;\n name: string;\n calendars?: Calendar[];\n };\n } = this.setParticipants(this.participants);\n\n /**\n * Participants calendar options.\n */\n @State() participantCalendars: {\n [key: string]: Calendar[];\n } = {};\n\n /**\n * The state to store the default selected calendars for each participant\n */\n @State() participantDefaultSelectedCalendars: {\n [key: string]: string[];\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-connected-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-connected-calendars', 'calendarsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-connected-calendars', 'participantsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(newValue, this.participantOptions);\n }\n\n @Watch('participantOptions')\n participantOptionsChangedHandler(newValue: AdditionalParticipant[]) {\n debug('nylas-calendar-picker', 'participantOptionsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-calendar-picker', 'selectedConfigurationChangedHandler', newValue);\n const participants = newValue?.participants || this.participants;\n if (participants && participants.length > 0) {\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\n }\n }\n\n getParticipantCalendarOptions(addedParticipants: Participant[], availableParticipantOptions: AdditionalParticipant[] | undefined) {\n // Get the participants from the availableParticipantOptions prop that are in the addedParticipants prop\n const organizer = addedParticipants?.find(participant => participant.is_organizer);\n const isRoundRobinConfig = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n const participantCalendars = {};\n if (availableParticipantOptions) {\n const participants = addedParticipants?.filter(participant => availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email));\n const remainingParticipants = addedParticipants?.filter(\n participant => !availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email),\n );\n\n // Get the calendar options for each participant with email as the key\n participants?.forEach(participant => {\n const participantOption = availableParticipantOptions?.find(participantOption => participantOption.email === participant.email);\n if (!participantOption) return;\n this.participantDefaultSelectedCalendars[participant.email] = participant.availability?.calendar_ids || [];\n const calendars = participantOption.calendars ?? [];\n participant.availability?.calendar_ids?.forEach(calendarId => {\n if (!calendars?.some(calendar => calendar.id === calendarId) && calendarId !== 'primary') {\n calendars.push({ id: calendarId, name: calendarId });\n }\n });\n participantCalendars[participant.email] = calendars;\n });\n if (isRoundRobinConfig) {\n // If it is round robin config, add the remaining participant calendars to the participantCalendars\n // (Round-robin does not have an organizer, and we filtered out the participants not passed in the participantOptions prop,\n // so we need to add the remaining participants calendars to the participantCalendars)\n remainingParticipants?.forEach(participant => {\n if (participant?.availability?.calendar_ids && participant?.availability?.calendar_ids?.length > 0 && !participant.is_organizer) {\n participantCalendars[participant.email] = this.calendars ?? [{ id: 'primary', name: participant.email }];\n this.participantDefaultSelectedCalendars[participant.email] = participant.availability?.calendar_ids || [];\n }\n });\n }\n }\n\n // Add the organizer's calendars to the participantCalendars\n if (organizer) {\n participantCalendars[organizer.email] = this.calendars ?? [{ id: 'primary', name: organizer.email }];\n this.participantDefaultSelectedCalendars[organizer.email] = organizer.availability?.calendar_ids || [];\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-connected-calendars', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-connected-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-connected-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-connected-calendars', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedCalendars = this.setParticipants(this.selectedConfiguration?.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.selectedConfiguration?.participants, this.participantOptions);\n } else {\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-')) {\n return;\n }\n // Validate the form\n if (!this.connectedCalendarsFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please select at least one calendar for each participant.');\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const key = name.split('participant-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendars'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key].calendars;\n });\n this.internals.setFormValue(JSON.stringify(participantsCalendars), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantsCalendars), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n if (participant?.availability?.calendar_ids && participant?.availability?.calendar_ids?.length > 0) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n name: participant.name || participant.email,\n availability: participant.availability,\n };\n }\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasConnectedCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-connected-calendars',\n stateToProps: new Map([\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-connected-calendars\" part=\"nccals\">\n <div class=\"header\" part=\"nccals__header\">\n <h3>Connected Calendars</h3>\n <p>\n Select the calendars to use for checking your availability.\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n Check availability across one or more calendars. If you select multiple calendars for a participant, the participant must be available across all of their\n calendars to be considered available.\n </span>\n </tooltip-component>\n </p>\n </div>\n <div class=\"content\" part=\"nccals__content\">\n <form ref={el => (this.connectedCalendarsFormRef = el as HTMLFormElement)}>\n {Object.keys(this.participantCalendars).map((key, index) => {\n const participant = this.selectedCalendars[key];\n const participantCalendars = this.participantCalendars[key];\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"nccals__container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"nccals__title\">\n <p>{participant.name}'s connected calendars</p>\n <div class=\"participant-toggle\" part=\"nccals__toggle-container\">\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.selectedCalendars[key].isOpen = !participant.isOpen;\n this.selectedCalendars = { ...this.selectedCalendars };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-calendar-picker\n key={key}\n name={`participant-${key}`}\n calendars={participantCalendars}\n defaultSelectedCalendars={this.participantDefaultSelectedCalendars[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -30,7 +30,7 @@ export class NylasCustomBookingFlow {
|
|
|
30
30
|
checkForMissingSlots(['inputs'], this.el);
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: 'd9e4b13338b50f21575a7c7f0fba18a5b2828fe8', part: "ncbflow" }, h("nylas-form-card", { key: '1f53c24698354fbf45ecd67ac24f690e36133cca', exportparts: "nfc__header: ncbflow__header" }, h("h1", { key: '680813d1aaf33014732e8cf3038a27f4ab4bd607', slot: "header-title", class: "nylas-custom-booking-flow__title", part: "ncbflow__title" }, "Custom booking flow"), h("div", { key: '2da6f6587e05e65cd1e2b35718168f665c3348c1', slot: "content", class: "nylas-custom-booking-flow__content", part: "ncbflow__content" }, h("slot", { key: '73937227f3a398779b0d1c97e525ca0bec593d85', name: "inputs" })))));
|
|
34
34
|
}
|
|
35
35
|
static get is() { return "nylas-custom-booking-flow"; }
|
|
36
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-custom-booking-flow.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAwB7E,MAAM,OAAO,sBAAsB;IASjC,iBAAiB;QACf,KAAK,CAAC,2BAA2B,EAAE,mBAAmB,CAAC,CAAC;IAC1D,CAAC;IACD,oBAAoB;QAClB,KAAK,CAAC,2BAA2B,EAAE,sBAAsB,CAAC,CAAC;IAC7D,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,2BAA2B,EAAE,mBAAmB,CAAC,CAAC;IAC1D,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAAC;QACvD,oBAAoB,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC;IAOD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;
|
|
1
|
+
{"version":3,"file":"nylas-custom-booking-flow.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAwB7E,MAAM,OAAO,sBAAsB;IASjC,iBAAiB;QACf,KAAK,CAAC,2BAA2B,EAAE,mBAAmB,CAAC,CAAC;IAC1D,CAAC;IACD,oBAAoB;QAClB,KAAK,CAAC,2BAA2B,EAAE,sBAAsB,CAAC,CAAC;IAC7D,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,2BAA2B,EAAE,mBAAmB,CAAC,CAAC;IAC1D,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAAC;QACvD,oBAAoB,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC;IAOD,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDAAC,IAAI,EAAC,SAAS;YAClB,wEAAiB,WAAW,EAAC,8BAA8B;gBACzD,2DAAI,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,kCAAkC,EAAC,IAAI,EAAC,gBAAgB,0BAEjF;gBACL,4DAAK,IAAI,EAAC,SAAS,EAAC,KAAK,EAAC,oCAAoC,EAAC,IAAI,EAAC,kBAAkB;oBACpF,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACU,CACb,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;CACF;AAdC;IALC,iBAAiB,CAA4G;QAC5H,IAAI,EAAE,2BAA2B;QACjC,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;oDAcD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { checkForMissingSlots, debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Host, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\n/**\n * The `nylas-custom-booking-flow` component is an input form for booking type (automatically or manually accept bookings) and confirmation redirect URL (default or custom).\n * This component is a container for the `nylas-booking-confirmation-type`, `nylas-booking-confirmation-redirect` components.\n *\n * ```html\n * <nylas-custom-booking-flow>\n * <div slot=\"inputs\">\n * <nylas-booking-confirmation-type></nylas-booking-confirmation-type>\n * <nylas-booking-confirmation-redirect></nylas-booking-confirmation-redirect>\n * </div>\n * </nylas-custom-booking-flow>\n * ```\n *\n * @slot inputs - The custom booking flow inputs. This includes the booking type, confirmation redirect type, and custom redirect URL components.\n */\n@Component({\n tag: 'nylas-custom-booking-flow',\n styleUrl: 'nylas-custom-booking-flow.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasCustomBookingFlow {\n @Element() el!: HTMLElement;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-custom-booking-flow', 'connectedCallback');\n }\n disconnectedCallback() {\n debug('nylas-custom-booking-flow', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-custom-booking-flow', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-custom-booking-flow', 'componentDidLoad');\n checkForMissingSlots(['inputs'], this.el);\n }\n\n @RegisterComponent<NylasCustomBookingFlow, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-custom-booking-flow',\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncbflow\">\n <nylas-form-card exportparts=\"nfc__header: ncbflow__header\">\n <h1 slot=\"header-title\" class=\"nylas-custom-booking-flow__title\" part=\"ncbflow__title\">\n Custom booking flow\n </h1>\n <div slot=\"content\" class=\"nylas-custom-booking-flow__content\" part=\"ncbflow__content\">\n <slot name=\"inputs\"></slot>\n </div>\n </nylas-form-card>\n </Host>\n );\n }\n}\n"]}
|