@nylas/web-elements 0.0.0-canary-20241008193213 → 0.0.0-canary-20241015194719
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 +2 -2
- 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 +12 -12
- 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 +15 -15
- 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 +6323 -5910
- package/dist/cdn/nylas-event-description/nylas-event-description.es.js +3 -3
- package/dist/cdn/nylas-event-duration/nylas-event-duration.es.js +5 -5
- 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 +1364 -937
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1077 -1053
- 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 +6 -6
- 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} +703 -304
- 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 +33 -32
- 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/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 +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 +48 -42
- 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 +56 -41
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
- 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 +8 -4
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js.map +1 -1
- 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 +16 -7
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
- 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 +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 +6 -6
- 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 +3 -2
- 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 +1 -1
- 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 +5 -5
- 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} +702 -306
- 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 +34 -33
- 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-698d229c.entry.js +2 -0
- package/dist/nylas-web-elements/p-698d229c.entry.js.map +1 -0
- 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-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-b9a8d404.entry.js +8 -0
- package/dist/nylas-web-elements/p-b9a8d404.entry.js.map +1 -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-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-fecf68ef.entry.js → p-f4334e3a.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/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 +2 -2
- 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-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 +252 -289
- 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-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-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-fecf68ef.entry.js.map → p-f4334e3a.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-participant-booking-calendars.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-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,E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4CACzD,CAAC;4CAED,oBAAc,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CAClC,CACH,CACF;gCACL,WAAW,CAAC,MAAM,IAAI,CACrB,qCACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,uBAAuB,GAAG,EAAE,EAClC,SAAS,EAAE,oBAAoB,EAC/B,UAAU,EAAE,IAAI,EAChB,sBAAsB,EAAE,IAAI,CAAC,kCAAkC,CAAC,GAAG,CAAC,GACpE,CACH,CACG,CACP,CAAC;wBACJ,CAAC,CAAC,CACC,CACH,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAjDC;IAVC,iBAAiB,CAAsH;QACtI,IAAI,EAAE,qCAAqC;QAC3C,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;;;;8DAiDD","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-participant-booking-calendars` component is a form input for selecting calendars to check availability for participants.\n */\n@Component({\n tag: 'nylas-participant-booking-calendars',\n styleUrl: 'nylas-participant-booking-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantBookingCalendars {\n @Element() host!: HTMLNylasParticipantBookingCalendarsElement;\n private bookingCalendarsFormRef!: HTMLFormElement;\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-booking-calendars';\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 calendar?: 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() participantDefaultSelectedCalendar: {\n [key: string]: string;\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participant-booking-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-participant-booking-calendars', 'calendarsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-participant-booking-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.participantCalendars = this.getParticipantCalendarOptions(this.participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-participant-booking-calendars', '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 participantCalendars = {};\n const showAdditionalParticipantBookingCalendars = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n if (availableParticipantOptions && showAdditionalParticipantBookingCalendars) {\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.participantDefaultSelectedCalendar[participant.email] = participant.booking?.calendar_id ?? 'primary';\n const calendars = participantOption.calendars ?? [];\n participantCalendars[participant.email] = calendars;\n });\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?.booking?.calendar_id) {\n participantCalendars[participant.email] = this.calendars ?? [{ id: 'primary', name: participant.email }];\n this.participantDefaultSelectedCalendar[participant.email] = participant?.booking?.calendar_id ?? 'primary';\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.participantDefaultSelectedCalendar[organizer.email] = organizer?.booking?.calendar_id ?? 'primary';\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participant-booking-calendars', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participant-booking-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participant-booking-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participant-booking-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-booking-')) {\n return;\n }\n // Validate the form\n if (!this.bookingCalendarsFormRef.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-booking-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendar'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key]?.calendar;\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?.booking?.calendar_id) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n calendar: participant.booking?.calendar_id || 'primary',\n name: participant.name || participant.email,\n };\n }\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantBookingCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participant-booking-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-participant-booking-calendars\" part=\"npbc\">\n <div class=\"header\" part=\"npbc__header\">\n <h3>Book to this calendar</h3>\n <p>Select the calendar where you want to add event bookings.</p>\n </div>\n <div class=\"content\" part=\"npbc__content\">\n <form ref={el => (this.bookingCalendarsFormRef = el as HTMLFormElement)}>\n {this.participantCalendars &&\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=\"npbc__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npbc__participant-title\">\n <p>{participant.name}'s booking calendar</p>\n <div class=\"participant-toggle\" part=\"npbc__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-booking-calendar-picker\n key={key}\n name={`participant-booking-${key}`}\n calendars={participantCalendars}\n hideHeader={true}\n defaultBookingCalendar={this.participantDefaultSelectedCalendar[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-participant-booking-calendars.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-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;AAoB9H,MAAM,OAAO,gCAAgC;;;oBAYpB,+BAA+B;4BAMhB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;;;iCAqChF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;oCAOvC,EAAE;kDAOF,EAAE;;IAIN,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,qCAAqC,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QACpF,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAGD,uBAAuB,CAAC,QAAoB;QAC1C,KAAK,CAAC,qCAAqC,EAAE,yBAAyB,EAAE,QAAQ,CAAC,CAAC;QAClF,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,qCAAqC,EAAE,4BAA4B,EAAE,QAAQ,CAAC,CAAC;QACrF,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACxD,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,6BAA6B,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAA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AC;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;;;;8DAkDD","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-participant-booking-calendars` component is a form input for selecting calendars to check availability for participants.\n *\n * @part npbc - The participant booking calendars host.\n * @part npbc__header - The header.\n * @part npbc__content - The content.\n * @part npbc__participant-container - The participant container.\n * @part npbc__participant-title - The participant title.\n * @part npbc__participant-toggle-container - The participant toggle container.\n */\n@Component({\n tag: 'nylas-participant-booking-calendars',\n styleUrl: 'nylas-participant-booking-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantBookingCalendars {\n @Element() host!: HTMLNylasParticipantBookingCalendarsElement;\n private bookingCalendarsFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-booking-calendars';\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 calendar?: 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() participantDefaultSelectedCalendar: {\n [key: string]: string;\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participant-booking-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-participant-booking-calendars', 'calendarsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-participant-booking-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.participantCalendars = this.getParticipantCalendarOptions(this.participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-participant-booking-calendars', '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 participantCalendars = {};\n const showAdditionalParticipantBookingCalendars = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n if (availableParticipantOptions && showAdditionalParticipantBookingCalendars) {\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.participantDefaultSelectedCalendar[participant.email] = participant.booking?.calendar_id ?? 'primary';\n const calendars = participantOption.calendars ?? [];\n participantCalendars[participant.email] = calendars;\n });\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?.booking?.calendar_id) {\n participantCalendars[participant.email] = this.calendars ?? [{ id: 'primary', name: participant.email }];\n this.participantDefaultSelectedCalendar[participant.email] = participant?.booking?.calendar_id ?? 'primary';\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.participantDefaultSelectedCalendar[organizer.email] = organizer?.booking?.calendar_id ?? 'primary';\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participant-booking-calendars', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participant-booking-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participant-booking-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participant-booking-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-booking-')) {\n return;\n }\n // Validate the form\n if (!this.bookingCalendarsFormRef.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-booking-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendar'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key]?.calendar;\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?.booking?.calendar_id) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n calendar: participant.booking?.calendar_id || 'primary',\n name: participant.name || participant.email,\n };\n }\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantBookingCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participant-booking-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-participant-booking-calendars\" part=\"npbc\">\n <div class=\"header\" part=\"npbc__header\">\n <h3>Book to this calendar</h3>\n <p>Select the calendar where you want to add event bookings.</p>\n </div>\n <div class=\"content\" part=\"npbc__content\">\n <form ref={el => (this.bookingCalendarsFormRef = el as HTMLFormElement)}>\n {this.participantCalendars &&\n Object.keys(this.participantCalendars).map((key, index) => {\n const participant = this.selectedCalendars[key];\n const participantCalendars = this.participantCalendars[key];\n\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"npbc__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npbc__participant-title\">\n <p>{participant.name}'s booking calendar</p>\n <div class=\"participant-toggle\" part=\"npbc__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-booking-calendar-picker\n key={key}\n name={`participant-booking-${key}`}\n calendars={participantCalendars}\n hideHeader={true}\n defaultBookingCalendar={this.participantDefaultSelectedCalendar[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -103,12 +103,13 @@ export class NylasParticipantsCustomAvailability {
|
|
|
103
103
|
openHours: participant.availability?.open_hours || [],
|
|
104
104
|
name: participant.name || participant.email,
|
|
105
105
|
availability: participant.availability,
|
|
106
|
+
timezone: participant.timezone,
|
|
106
107
|
};
|
|
107
108
|
});
|
|
108
109
|
return selectedParticipants;
|
|
109
110
|
}
|
|
110
111
|
render() {
|
|
111
|
-
return (h(Host, { key: '
|
|
112
|
+
return (h(Host, { key: '6f9b3c61650e7dd61b6e548fe008be57494b5e89' }, h("div", { key: '256e2e41f0849180ffdb5c67c66dffd9c1ce031a', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: 'c3e1aefbb7872b233938aefeb22a13169f194864', class: "header", part: "npca__header" }, h("h3", { key: '8f7af6fa1435b2530fb5d179db1357e765270865' }, "Participant open hours"), h("p", { key: 'ff146ecd72673369a01773b2f00e81264654acf5' }, "If not set, Nylas uses the default open hours for this participant.")), h("div", { key: '52476fb7c7dc19935d92883ebd16f6af6746f8b5', class: "content", part: "npca__content" }, h("form", { key: '2b2fb94eb40a92b0e3326c9681051f61bbe4986e', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
|
|
112
113
|
const participant = this.selectedParticipants[key];
|
|
113
114
|
if (!participant || !participant.name || !participant.availability)
|
|
114
115
|
return;
|
|
@@ -117,7 +118,7 @@ export class NylasParticipantsCustomAvailability {
|
|
|
117
118
|
return;
|
|
118
119
|
this.selectedParticipants[key].isOpen = !participant.isOpen;
|
|
119
120
|
this.selectedParticipants = { ...this.selectedParticipants };
|
|
120
|
-
} }, h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (h("nylas-availability-picker", { key: index, name: `participant-${index}-${key}`, openHours: participant.openHours, defaultTimezone: participant.
|
|
121
|
+
} }, h("chevron-icon", { width: "24", height: "24" })))), participant.isOpen && (h("nylas-availability-picker", { key: index, name: `participant-${index}-${key}`, openHours: participant.openHours, defaultTimezone: participant.timezone, hideHeader: true }))));
|
|
121
122
|
}))))));
|
|
122
123
|
}
|
|
123
124
|
static get is() { return "nylas-participants-custom-availability"; }
|
|
@@ -152,8 +153,11 @@ export class NylasParticipantsCustomAvailability {
|
|
|
152
153
|
"required": false,
|
|
153
154
|
"optional": true,
|
|
154
155
|
"docs": {
|
|
155
|
-
"tags": [
|
|
156
|
-
|
|
156
|
+
"tags": [{
|
|
157
|
+
"name": "standalone",
|
|
158
|
+
"text": "The selected config"
|
|
159
|
+
}],
|
|
160
|
+
"text": ""
|
|
157
161
|
}
|
|
158
162
|
},
|
|
159
163
|
"name": {
|
|
@@ -167,8 +171,11 @@ export class NylasParticipantsCustomAvailability {
|
|
|
167
171
|
"required": false,
|
|
168
172
|
"optional": false,
|
|
169
173
|
"docs": {
|
|
170
|
-
"tags": [
|
|
171
|
-
|
|
174
|
+
"tags": [{
|
|
175
|
+
"name": "standalone",
|
|
176
|
+
"text": "The name of the participants custom availability."
|
|
177
|
+
}],
|
|
178
|
+
"text": ""
|
|
172
179
|
},
|
|
173
180
|
"attribute": "name",
|
|
174
181
|
"reflect": false,
|
|
@@ -191,8 +198,11 @@ export class NylasParticipantsCustomAvailability {
|
|
|
191
198
|
"required": false,
|
|
192
199
|
"optional": false,
|
|
193
200
|
"docs": {
|
|
194
|
-
"tags": [
|
|
195
|
-
|
|
201
|
+
"tags": [{
|
|
202
|
+
"name": "standalone",
|
|
203
|
+
"text": "The participants selected in the add participants section."
|
|
204
|
+
}],
|
|
205
|
+
"text": ""
|
|
196
206
|
},
|
|
197
207
|
"defaultValue": "this.selectedConfiguration?.participants || []"
|
|
198
208
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-participants-custom-availability.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.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;AAG9H,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAqBxD,MAAM,OAAO,mCAAmC;;;oBAWvB,iCAAiC;4BAKlB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;oCA0BhF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;;IAI3C,yBAAyB,CAAC,QAAgB;QACxC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,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AArDC;IANC,iBAAiB,CAAyH;QACzI,IAAI,EAAE,wCAAwC;QAC9C,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;iEAqDD","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 { Availability, Configuration, OpenHours, Participant } from '@nylas/core';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\n\n/**\n * The `nylas-participants-custom-availability` component is a form input for setting custom availability for participants.\n *\n * @part npca - The participants custom availability container\n * @part npca__header - The header of the participants custom availability\n * @part npca__content - The content of the participants custom availability\n * @part npca__participant-container - The participant container\n * @part npca__participant-title - The title of the participant\n * @part npca__participant-toggle--container - The toggle container for the participant\n * @part npca__toggle-label - The label of the toggle\n * @part npca_toggle-input - The input of the toggle\n * @part npca_toggle-slider - The slider of the toggle\n */\n@Component({\n tag: 'nylas-participants-custom-availability',\n styleUrl: 'nylas-participants-custom-availability.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantsCustomAvailability {\n @Element() host!: HTMLNylasParticipantsCustomAvailabilityElement;\n private participantFormRef!: HTMLFormElement;\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-custom-availability';\n\n /**\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\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() selectedParticipants: {\n [key: string]: {\n setCustom: boolean;\n isOpen: boolean;\n openHours: OpenHours[];\n name: string;\n availability?: Availability;\n };\n } = this.setParticipants(this.participants);\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[], oldValue: Participant[]) {\n debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue, oldValue);\n this.selectedParticipants = this.setParticipants(newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration, oldValue: Configuration) {\n debug('nylas-participants-custom-availability', 'selectedConfigurationChangedHandler', newValue, oldValue);\n if (newValue?.participants) {\n this.selectedParticipants = this.setParticipants(newValue?.participants);\n }\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participants-custom-availability', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participants-custom-availability', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participants-custom-availability', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participants-custom-availability', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedParticipants = this.setParticipants(this.selectedConfiguration?.participants);\n } else {\n this.selectedParticipants = this.setParticipants(this.participants);\n }\n }\n\n // Event Handlers\n @Listen('nylasFormSwitchToggled')\n nylasFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);\n const openHours = this.selectedConfiguration?.participants.find(participant => participant.email === event.detail.name)?.availability?.open_hours || [];\n this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['openHours'] = event.detail.checked ? (openHours?.length > 0 ? openHours : DEFAULT_OPEN_HOURS) : [];\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\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.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const jsonValue = JSON.parse(value);\n\n const key = name.split('-')[2];\n if (!this.selectedParticipants[key]) return;\n this.selectedParticipants[key]['openHours'] = jsonValue.openHours;\n this.selectedParticipants = { ...this.selectedParticipants };\n\n this.updateFormValue();\n }\n\n updateFormValue() {\n const participantOpenHours = {};\n const participants = this.selectedConfiguration?.participants || this.participants;\n participants.forEach(participant => {\n participantOpenHours[participant.email] = this.selectedParticipants[participant.email].openHours;\n });\n this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n selectedParticipants[participant.email] = {\n isOpen: false,\n setCustom: !!participant.availability?.open_hours ? true : false,\n openHours: participant.availability?.open_hours || [],\n name: participant.name || participant.email,\n availability: participant.availability,\n };\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantsCustomAvailability, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participants-custom-availability',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participants-custom-availability\" part=\"npca\">\n <div class=\"header\" part=\"npca__header\">\n <h3>Participant open hours</h3>\n <p>If not set, Nylas uses the default open hours for this participant.</p>\n </div>\n <div class=\"content\" part=\"npca__content\">\n <form ref={el => (this.participantFormRef = el as HTMLFormElement)}>\n {Object.keys(this.selectedParticipants).map((key, index) => {\n const participant = this.selectedParticipants[key];\n if (!participant || !participant.name || !participant.availability) 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 open hours</p>\n <div class=\"participant-toggle\" part=\"npca__participant-toggle--container\">\n <toggle-switch\n exportparts=\"ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider\"\n name={key}\n checked={!!participant?.openHours && participant?.openHours.length > 0}\n />\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`}\n onClick={() => {\n if (!participant.setCustom) return;\n this.selectedParticipants[key].isOpen = !participant.isOpen;\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-availability-picker\n key={index}\n name={`participant-${index}-${key}`}\n openHours={participant.openHours}\n defaultTimezone={participant.openHours?.[0]?.timezone}\n hideHeader={true}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-participants-custom-availability.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAA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AI,CAAC,oBAAoB,GAAG,EAAE,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;wCAC/D,CAAC;wCAED,oBAAc,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CAClC,CACH,CACF;4BACL,WAAW,CAAC,MAAM,IAAI,CACrB,iCACE,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,eAAe,KAAK,IAAI,GAAG,EAAE,EACnC,SAAS,EAAE,WAAW,CAAC,SAAS,EAChC,eAAe,EAAE,WAAW,CAAC,QAAQ,EACrC,UAAU,EAAE,IAAI,GAChB,CACH,CACG,CACP,CAAC;oBACJ,CAAC,CAAC,CACG,CACH,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AArDC;IANC,iBAAiB,CAAyH;QACzI,IAAI,EAAE,wCAAwC;QAC9C,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;iEAqDD","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 { Availability, Configuration, OpenHours, Participant } from '@nylas/core';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\n\n/**\n * The `nylas-participants-custom-availability` component is a form input for setting custom availability for participants.\n *\n * @part npca - The participants custom availability container\n * @part npca__header - The header of the participants custom availability\n * @part npca__content - The content of the participants custom availability\n * @part npca__participant-container - The participant container\n * @part npca__participant-title - The title of the participant\n * @part npca__participant-toggle--container - The toggle container for the participant\n * @part npca__toggle-label - The label of the toggle\n * @part npca_toggle-input - The input of the toggle\n * @part npca_toggle-slider - The slider of the toggle\n */\n@Component({\n tag: 'nylas-participants-custom-availability',\n styleUrl: 'nylas-participants-custom-availability.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantsCustomAvailability {\n @Element() host!: HTMLNylasParticipantsCustomAvailabilityElement;\n private participantFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-custom-availability';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\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() selectedParticipants: {\n [key: string]: {\n setCustom: boolean;\n isOpen: boolean;\n openHours: OpenHours[];\n name: string;\n availability?: Availability;\n timezone?: string;\n };\n } = this.setParticipants(this.participants);\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[], oldValue: Participant[]) {\n debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue, oldValue);\n this.selectedParticipants = this.setParticipants(newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration, oldValue: Configuration) {\n debug('nylas-participants-custom-availability', 'selectedConfigurationChangedHandler', newValue, oldValue);\n if (newValue?.participants) {\n this.selectedParticipants = this.setParticipants(newValue?.participants);\n }\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participants-custom-availability', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participants-custom-availability', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participants-custom-availability', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participants-custom-availability', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedParticipants = this.setParticipants(this.selectedConfiguration?.participants);\n } else {\n this.selectedParticipants = this.setParticipants(this.participants);\n }\n }\n\n // Event Handlers\n @Listen('nylasFormSwitchToggled')\n nylasFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);\n const openHours = this.selectedConfiguration?.participants.find(participant => participant.email === event.detail.name)?.availability?.open_hours || [];\n this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['openHours'] = event.detail.checked ? (openHours?.length > 0 ? openHours : DEFAULT_OPEN_HOURS) : [];\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\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.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const jsonValue = JSON.parse(value);\n\n const key = name.split('-')[2];\n if (!this.selectedParticipants[key]) return;\n this.selectedParticipants[key]['openHours'] = jsonValue.openHours;\n this.selectedParticipants = { ...this.selectedParticipants };\n\n this.updateFormValue();\n }\n\n updateFormValue() {\n const participantOpenHours = {};\n const participants = this.selectedConfiguration?.participants || this.participants;\n participants.forEach(participant => {\n participantOpenHours[participant.email] = this.selectedParticipants[participant.email].openHours;\n });\n this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n selectedParticipants[participant.email] = {\n isOpen: false,\n setCustom: !!participant.availability?.open_hours ? true : false,\n openHours: participant.availability?.open_hours || [],\n name: participant.name || participant.email,\n availability: participant.availability,\n timezone: participant.timezone,\n };\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantsCustomAvailability, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participants-custom-availability',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participants-custom-availability\" part=\"npca\">\n <div class=\"header\" part=\"npca__header\">\n <h3>Participant open hours</h3>\n <p>If not set, Nylas uses the default open hours for this participant.</p>\n </div>\n <div class=\"content\" part=\"npca__content\">\n <form ref={el => (this.participantFormRef = el as HTMLFormElement)}>\n {Object.keys(this.selectedParticipants).map((key, index) => {\n const participant = this.selectedParticipants[key];\n if (!participant || !participant.name || !participant.availability) 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 open hours</p>\n <div class=\"participant-toggle\" part=\"npca__participant-toggle--container\">\n <toggle-switch\n exportparts=\"ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider\"\n name={key}\n checked={!!participant?.openHours && participant?.openHours.length > 0}\n />\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`}\n onClick={() => {\n if (!participant.setCustom) return;\n this.selectedParticipants[key].isOpen = !participant.isOpen;\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-availability-picker\n key={index}\n name={`participant-${index}-${key}`}\n openHours={participant.openHours}\n defaultTimezone={participant.timezone}\n hideHeader={true}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { NylasParticipantsCustomAvailability } from "../nylas-participants-custom-availability";
|
|
3
|
+
import { NylasAvailabilityPicker } from "../../nylas-availability-picker/nylas-availability-picker";
|
|
4
|
+
import { h } from "@stencil/core";
|
|
5
|
+
import { SelectDropdown } from "../../../design-system/select-dropdown/select-dropdown";
|
|
6
|
+
import { selectedConfiguration } from "../../../../utils/test-utils";
|
|
7
|
+
describe('nylas-participants-custom-availability', () => {
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
const originalIntl = Intl;
|
|
10
|
+
global.Intl = {
|
|
11
|
+
...originalIntl,
|
|
12
|
+
DateTimeFormat: jest.fn().mockImplementation(() => ({
|
|
13
|
+
resolvedOptions: () => ({
|
|
14
|
+
timeZone: 'America/New_York',
|
|
15
|
+
}),
|
|
16
|
+
supportedLocalesOf: jest.fn(),
|
|
17
|
+
})),
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
afterEach(() => {
|
|
21
|
+
jest.restoreAllMocks();
|
|
22
|
+
});
|
|
23
|
+
it('selects default timezone passed as prop', async () => {
|
|
24
|
+
const config = JSON.parse(JSON.stringify(selectedConfiguration));
|
|
25
|
+
config.participants[0].timezone = 'Africa/Accra';
|
|
26
|
+
const page = await newSpecPage({
|
|
27
|
+
components: [NylasParticipantsCustomAvailability, NylasAvailabilityPicker, SelectDropdown],
|
|
28
|
+
template: () => {
|
|
29
|
+
return (h("form", { id: "availability-picker" }, h("nylas-participants-custom-availability", { name: "participant-xyx", selectedConfiguration: config })));
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
await page.waitForChanges();
|
|
33
|
+
expect(page.root).toMatchSnapshot();
|
|
34
|
+
const form = page.root?.shadowRoot?.querySelector('.nylas-participants-custom-availability .content form');
|
|
35
|
+
const participant1 = form?.querySelector('.participant-container');
|
|
36
|
+
const chevron = participant1?.querySelector('.participant-title .chevron');
|
|
37
|
+
chevron?.dispatchEvent(new Event('click'));
|
|
38
|
+
await page.waitForChanges();
|
|
39
|
+
const availabilityPicker = page.root?.shadowRoot?.querySelector('nylas-availability-picker');
|
|
40
|
+
expect(availabilityPicker).not.toBeNull();
|
|
41
|
+
const timezoneDropdown = availabilityPicker?.shadowRoot?.querySelector('.select-timezone select-dropdown')?.shadowRoot;
|
|
42
|
+
const timezoneButton = timezoneDropdown?.querySelector('button');
|
|
43
|
+
expect(timezoneButton).not.toBeNull();
|
|
44
|
+
expect(timezoneButton?.textContent).toEqual('Africa / Accra');
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=nylas-participants-custom-availability.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nylas-participants-custom-availability.spec.js","sourceRoot":"","sources":["../../../../../src/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-participants-custom-availability.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,mCAAmC,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,EAAE,uBAAuB,EAAE,MAAM,2DAA2D,CAAC;AACpG,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,QAAQ,CAAC,wCAAwC,EAAE,GAAG,EAAE;IACtD,UAAU,CAAC,GAAG,EAAE;Q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,CAAC;QACnE,MAAM,OAAO,GAAG,YAAY,EAAE,aAAa,CAAC,6BAA6B,CAAC,CAAC;QAC3E,OAAO,EAAE,aAAa,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3C,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;QAC7F,MAAM,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC1C,MAAM,gBAAgB,GAAG,kBAAkB,EAAE,UAAU,EAAE,aAAa,CAAC,kCAAkC,CAAC,EAAE,UAAU,CAAC;QACvH,MAAM,cAAc,GAAG,gBAAgB,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;QACjE,MAAM,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QACtC,MAAM,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { NylasParticipantsCustomAvailability } from '../nylas-participants-custom-availability';\nimport { NylasAvailabilityPicker } from '../../nylas-availability-picker/nylas-availability-picker';\nimport { h } from '@stencil/core';\nimport { SelectDropdown } from '../../../design-system/select-dropdown/select-dropdown';\nimport { selectedConfiguration } from '@/utils/test-utils';\n\ndescribe('nylas-participants-custom-availability', () => {\n beforeEach(() => {\n const originalIntl = Intl;\n\n global.Intl = {\n ...originalIntl,\n DateTimeFormat: jest.fn().mockImplementation(() => ({\n resolvedOptions: () => ({\n timeZone: 'America/New_York',\n }),\n supportedLocalesOf: jest.fn(),\n })) as any,\n };\n });\n\n afterEach(() => {\n jest.restoreAllMocks();\n });\n\n it('selects default timezone passed as prop', async () => {\n const config = JSON.parse(JSON.stringify(selectedConfiguration));\n config.participants[0].timezone = 'Africa/Accra';\n const page = await newSpecPage({\n components: [NylasParticipantsCustomAvailability, NylasAvailabilityPicker, SelectDropdown],\n template: () => {\n return (\n <form id=\"availability-picker\">\n <nylas-participants-custom-availability name=\"participant-xyx\" selectedConfiguration={config}></nylas-participants-custom-availability>\n </form>\n );\n },\n });\n\n await page.waitForChanges();\n expect(page.root).toMatchSnapshot();\n const form = page.root?.shadowRoot?.querySelector('.nylas-participants-custom-availability .content form');\n const participant1 = form?.querySelector('.participant-container');\n const chevron = participant1?.querySelector('.participant-title .chevron');\n chevron?.dispatchEvent(new Event('click'));\n await page.waitForChanges();\n const availabilityPicker = page.root?.shadowRoot?.querySelector('nylas-availability-picker');\n expect(availabilityPicker).not.toBeNull();\n const timezoneDropdown = availabilityPicker?.shadowRoot?.querySelector('.select-timezone select-dropdown')?.shadowRoot;\n const timezoneButton = timezoneDropdown?.querySelector('button');\n expect(timezoneButton).not.toBeNull();\n expect(timezoneButton?.textContent).toEqual('Africa / Accra');\n });\n});\n"]}
|
package/dist/collection/components/scheduler-editor/nylas-reminder-emails/nylas-reminder-emails.js
CHANGED
|
@@ -142,7 +142,7 @@ export class NylasReminderEmails {
|
|
|
142
142
|
value: 'host',
|
|
143
143
|
},
|
|
144
144
|
];
|
|
145
|
-
return (h(Host, { key: '
|
|
145
|
+
return (h(Host, { key: 'a71a8247248eec4834963b8887b713769b7210cf' }, h("div", { key: '8ab8b9fc62502a7ddf5a111727ab5ef53fc050a9', class: "cards-container" }, this.reminders.map((reminder, index) => {
|
|
146
146
|
return (h("div", { class: "nylas-reminder-email", part: "nre" }, h("div", { class: "header", part: "nre__header" }, h("div", null, h("h3", null, "Upcoming meeting", organizerName ? ` with ${organizerName} ` : ''), h("p", null, "Reminder before event")), !reminder.editing ? (h("button-component", { variant: 'basic', key: `edit-${index} `, clickHandler: event => {
|
|
147
147
|
event.preventDefault();
|
|
148
148
|
reminder.editing = true;
|
|
@@ -154,10 +154,10 @@ export class NylasReminderEmails {
|
|
|
154
154
|
reminder.editing = !reminder.editing;
|
|
155
155
|
this.reminders = [...this.reminders];
|
|
156
156
|
} }, h("chevron-icon", { width: "24", height: "24" }))))), reminder.editing ? (h("div", { class: "nylas-reminder-email__body", part: "nre__body" }, h("div", { class: "nylas-reminder-email__section" }, h("div", { class: "nylas-reminder-email__row" }, h("label", null, "Email recipients"), h("select-dropdown", { name: `recipient-${index}`, options: recipientOptions, defaultSelectedOption: recipientOptions.find(i => i.value === reminder.recipient) ?? recipientOptions[0], withSearch: false })), h("div", { class: "nylas-reminder-email__row" }, h("label", null, "Send confirmation email when", h("span", { class: "label-icon" }, h("tooltip-component", null, h("info-icon", { slot: "tooltip-icon" }), h("span", { slot: "tooltip-content" }, "The recipients will receive a reminder email at the specified time before the event.")))), h("nylas-reminder-time", { name: `reminder-time-${index}`, eventReminderTimeMinutes: reminder.minutes_before_event, exportparts: "nrt, nrt__input_dropdown: nre__reminder-input_dropdown,\n nrt__input_dropdown-input: nre__reminder-input_dropdown-input,\n nrt__input_dropdown-content: nre__reminder-input_dropdown-content,\n " }))))) : (h("div", { class: "nylas-reminder-email__summary", part: "nre__summary" }, h("p", null, h("span", { class: "summary-icon" }, h("person-clipboard-icon", null)), recipientOptions.find(i => i.value === reminder.recipient)?.label), h("p", null, h("span", { class: "summary-icon" }, h("clock-icon", null)), this.formatReminderTime(reminder.minutes_before_event), " before the event")))));
|
|
157
|
-
})), h("button-component", { key: '
|
|
157
|
+
})), h("button-component", { key: '67f3f31bf95a05c858a97da188b88788551d1171', class: "create-reminder", variant: 'basic', clickHandler: event => {
|
|
158
158
|
event.preventDefault();
|
|
159
159
|
this.addReminder();
|
|
160
|
-
} }, h("plus-icon", { key: '
|
|
160
|
+
} }, h("plus-icon", { key: 'ad8a8e742fdd8334e56af084356ea6fc7189405e', width: "16", height: "16" }), "New reminder")));
|
|
161
161
|
}
|
|
162
162
|
static get is() { return "nylas-reminder-emails"; }
|
|
163
163
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js
CHANGED
|
@@ -115,7 +115,7 @@ export class NylasReminderTime {
|
|
|
115
115
|
{ value: 60, label: 'hour' },
|
|
116
116
|
{ value: 60 * 24, label: 'day' },
|
|
117
117
|
];
|
|
118
|
-
return (h(Host, { key: '
|
|
118
|
+
return (h(Host, { key: 'd5f118391bdd7e4779f6eca15335285047fdb350' }, h("div", { key: '2dd8d3ba52d4f95480c9cf1fdaf5d0f1f7c1e523', class: "nylas-reminder-time", part: "nrt" }, h("div", { key: '3799c4b266f4078e22ad78b86225ef9abdc5fa49', class: "nylas-reminder-time__wrapper" }, h("input-dropdown", { key: '004b6336c041660e1424ac44f16e82c8a5a2ca53', name: 'reminder-time', options: this.reminderTimeMinutesOptions, inputValue: this.reminderTime.toString(), exportparts: "id_dropdown: nrt__input_dropdown, id_dropdown-input: nrt__input_dropdown-input, id_dropdown-content: nrt__input_dropdown-content", defaultInputOption: this.reminderTimeMinutesOptions.find(i => i.value == this.reminderTime) ?? reminderTimeOptions[0] }), h("select-dropdown", { key: '6a42c7f4633d89dd9a94d3c2f119e151613667ec', name: 'reminder-time-unit', options: reminderTimeOptions, pluralizedLabel: this.reminderTime > 1 ? 's' : '', exportparts: "sd_dropdown: nrt__dropdown, sd_dropdown-button: nrt__dropdown-button, sd_dropdown-content: nrt__dropdown-content", defaultSelectedOption: reminderTimeOptions.find(i => i.value == this.reminderTimeincrement) ?? reminderTimeOptions[0], withSearch: false })))));
|
|
119
119
|
}
|
|
120
120
|
static get is() { return "nylas-reminder-time"; }
|
|
121
121
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js
CHANGED
|
@@ -180,7 +180,7 @@ export class NylasSchedulerEditor {
|
|
|
180
180
|
render() {
|
|
181
181
|
const hasSlot = this.host.querySelector('[slot="custom-page-style-inputs"]');
|
|
182
182
|
const selectedConfigId = this.stores?.schedulerConfig?.state.selectedConfiguration?.id;
|
|
183
|
-
return (h(Host, { key: '
|
|
183
|
+
return (h(Host, { key: '35b140eeb034c18708cd362f6129e2a7cde71a7b' }, h("div", { key: '15eecb29f74a8401c6c80793d38678bee330f31e', class: "scheduler-editor-header", part: "nse__header" }, h("h1", { key: 'dabea2da65cc14b20698653f9662a8c456254b34', class: "scheduler-editor-title", part: "nse__title" }, h("calendar-icon", { key: 'eb26707b8c8d880655900353e50113504ba531cd', width: "18", height: "18" }), "Scheduler Editor"), h("button", { key: 'c841ccb7aa945f292c69d342426ecd0e3a5a1413', class: "scheduler-editor-close", title: "logout", onClick: e => this.handleSchedulerConfigCloseClicked(e), part: "nse__close-button" }, h("close-icon", { key: '79b157544d31b2cd401c0c1e8ed019e36c09f9dd', width: "18", height: "18" }))), h("div", { key: '02c2e2992587342832f6d8999c09b637bece7dc8', class: "scheduler-editor-content", part: "nse__content" }, this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === null && (h("div", { class: "list-configurations" }, h("nylas-list-configurations", { exportparts: "nlc__create-new-cta" }))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'create' && (h("nylas-editor-tabs", { mode: "composable" }, h(ExpressFlow, { currentUser: this.stores?.schedulerConfig?.state.currentUser, calendars: this.stores?.schedulerConfig?.state?.calendars, selectedConfiguration: this.stores?.schedulerConfig?.state?.selectedConfiguration }))), this.stores?.schedulerConfig?.state.currentUser && this.stores.schedulerConfig.state.action === 'edit' && (h("nylas-editor-tabs", { key: selectedConfigId, mode: this.mode }, this.mode === 'composable' && h("slot", null), this.mode === 'app' && hasSlot && (h("div", { style: { display: 'none' }, slot: "custom-page-style-inputs", key: selectedConfigId }, h("slot", { name: "custom-page-style-inputs" }))))), !this.stores?.schedulerConfig?.state.currentUser && (h("slot", { name: "login-required" }, h(LoginRequired, { authenticationUrl: this.authenticationUrl }))))));
|
|
184
184
|
}
|
|
185
185
|
static get is() { return "nylas-scheduler-editor"; }
|
|
186
186
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,8 +17,8 @@ import { debug } from "../../../utils/utils";
|
|
|
17
17
|
import { Host, h } from "@stencil/core";
|
|
18
18
|
export class NylasSchedulingMethod {
|
|
19
19
|
constructor() {
|
|
20
|
-
this.name = 'availability-method';
|
|
21
20
|
this.selectedConfiguration = undefined;
|
|
21
|
+
this.name = 'availability-method';
|
|
22
22
|
this.participantOptions = undefined;
|
|
23
23
|
this.readOnly = false;
|
|
24
24
|
this.selectedBookingType = '';
|
|
@@ -102,24 +102,6 @@ export class NylasSchedulingMethod {
|
|
|
102
102
|
}
|
|
103
103
|
static get properties() {
|
|
104
104
|
return {
|
|
105
|
-
"name": {
|
|
106
|
-
"type": "string",
|
|
107
|
-
"mutable": false,
|
|
108
|
-
"complexType": {
|
|
109
|
-
"original": "string",
|
|
110
|
-
"resolved": "string",
|
|
111
|
-
"references": {}
|
|
112
|
-
},
|
|
113
|
-
"required": false,
|
|
114
|
-
"optional": false,
|
|
115
|
-
"docs": {
|
|
116
|
-
"tags": [],
|
|
117
|
-
"text": "The name of the booking type picker."
|
|
118
|
-
},
|
|
119
|
-
"attribute": "name",
|
|
120
|
-
"reflect": false,
|
|
121
|
-
"defaultValue": "'availability-method'"
|
|
122
|
-
},
|
|
123
105
|
"selectedConfiguration": {
|
|
124
106
|
"type": "unknown",
|
|
125
107
|
"mutable": false,
|
|
@@ -137,10 +119,34 @@ export class NylasSchedulingMethod {
|
|
|
137
119
|
"required": false,
|
|
138
120
|
"optional": true,
|
|
139
121
|
"docs": {
|
|
140
|
-
"tags": [
|
|
141
|
-
|
|
122
|
+
"tags": [{
|
|
123
|
+
"name": "standalone",
|
|
124
|
+
"text": "The selected config"
|
|
125
|
+
}],
|
|
126
|
+
"text": ""
|
|
142
127
|
}
|
|
143
128
|
},
|
|
129
|
+
"name": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "string",
|
|
134
|
+
"resolved": "string",
|
|
135
|
+
"references": {}
|
|
136
|
+
},
|
|
137
|
+
"required": false,
|
|
138
|
+
"optional": false,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [{
|
|
141
|
+
"name": "standalone",
|
|
142
|
+
"text": "The name of the booking type picker."
|
|
143
|
+
}],
|
|
144
|
+
"text": ""
|
|
145
|
+
},
|
|
146
|
+
"attribute": "name",
|
|
147
|
+
"reflect": false,
|
|
148
|
+
"defaultValue": "'availability-method'"
|
|
149
|
+
},
|
|
144
150
|
"participantOptions": {
|
|
145
151
|
"type": "unknown",
|
|
146
152
|
"mutable": false,
|
|
@@ -158,8 +164,11 @@ export class NylasSchedulingMethod {
|
|
|
158
164
|
"required": false,
|
|
159
165
|
"optional": true,
|
|
160
166
|
"docs": {
|
|
161
|
-
"tags": [
|
|
162
|
-
|
|
167
|
+
"tags": [{
|
|
168
|
+
"name": "standalone",
|
|
169
|
+
"text": "The participant options passed in the additionalParticipants prop\nfrom the nylas-scheduler-editor component."
|
|
170
|
+
}],
|
|
171
|
+
"text": ""
|
|
163
172
|
}
|
|
164
173
|
},
|
|
165
174
|
"readOnly": {
|
|
@@ -231,10 +240,8 @@ export class NylasSchedulingMethod {
|
|
|
231
240
|
__decorate([
|
|
232
241
|
RegisterComponent({
|
|
233
242
|
name: 'nylas-scheduling-method',
|
|
234
|
-
stateToProps: new Map([
|
|
235
|
-
|
|
236
|
-
['schedulerConfig.additionalParticipants', 'participantOptions'],
|
|
237
|
-
]),
|
|
243
|
+
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
244
|
+
localPropsToProp: new Map([['additionalParticipants', 'participantOptions']]),
|
|
238
245
|
eventToProps: {
|
|
239
246
|
valueChanged: async (event, _nylasSchedulerConfigConnector) => {
|
|
240
247
|
const { valueChanged } = event.detail;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-scheduling-method.js","sourceRoot":"","sources":["../../../../src/components/sc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iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;mDAyED","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AdditionalParticipant, Configuration } from '@nylas/core';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\n/**\n * The `nylas-scheduling-method` component is a UI component that displays the booking calendar picker.\n * @part nsm - The booking calendar picker container\n * @part nsm__header - The header of the booking calendar picker\n * @part nsm__input-label - The input label of the booking calendar picker\n * @part nsm__dropdown - The dropdown container\n * @part nsm__dropdown-button - The dropdown button\n * @part nsm__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-scheduling-method',\n styleUrl: 'nylas-scheduling-method.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasSchedulingMethod {\n @Element() host!: HTMLNylasSchedulingMethodElement;\n\n /**\n * The name of the booking type picker.\n */\n @Prop() name: string = 'availability-method';\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n /**\n * This prop is used to display the component in a disabled state / read-only mode.\n */\n @Prop() readOnly: boolean = false;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The selected booking type.\n */\n @State() selectedBookingType: string = '';\n\n /**\n * This event is fired when the selected booking calendar changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-scheduling-method', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-scheduling-method', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-scheduling-method', '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-scheduling-method', 'componentDidLoad');\n const bookingtType = this.selectedConfiguration?.availability?.availability_rules?.availability_method?.toString();\n\n // TODO: Remove this when the internals in tests are fixed.\n if (bookingtType && typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(bookingtType, 'booking-calendar');\n }\n this.selectedBookingType = bookingtType || 'collective';\n this.valueChanged.emit({ value: this.selectedBookingType, name: this.name });\n }\n\n componentWillUpdate() {\n debug('nylas-scheduling-method', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-scheduling-method', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-scheduling-method', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-scheduling-method', 'componentDidRender');\n }\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-scheduling-method', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-scheduling-method', 'nylasFormDropdownChangedHandler', event.detail);\n // Pass as handler so that if event.defaultPrevented by parent app, this will be skipped.\n const valueChanged = (event: CustomEvent<{ value: string; name: string }>) => {\n const { value } = event.detail;\n if (value) {\n this.selectedBookingType = value;\n this.internals.setFormValue(value, this.name);\n }\n };\n this.valueChanged.emit({ value: event.detail.value, name: this.name, valueChanged });\n }\n\n @RegisterComponent<NylasSchedulingMethod, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-scheduling-method',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const bookingTypeOptions = [\n { label: 'Standard booking', value: 'collective' },\n { label: 'Round-robin max fairness', value: 'max-fairness' },\n { label: 'Round-robin max availability', value: 'max-availability' },\n ];\n const defaultBookingType = this.selectedConfiguration?.availability?.availability_rules?.availability_method?.toString();\n const hasAdditionalParticipants =\n this.participantOptions &&\n this.participantOptions?.length > 0 &&\n !!this.participantOptions[0].email &&\n !!this.participantOptions[0].name &&\n !!this.participantOptions[0].calendars &&\n this.participantOptions[0].calendars.length > 0;\n\n // If a default availability method is set in the configuration (developer settings), do not show the booking type picker.\n // Or, if a default availability method is not set and there are no additional participants, do not show the booking type picker.\n if ((defaultBookingType || !hasAdditionalParticipants) && !this.readOnly) {\n return null;\n }\n\n return (\n <Host>\n <div class=\"nylas-scheduling-method\" part=\"nsm\">\n <div class=\"header\" part=\"nsm__header\">\n <h3>Scheduling method</h3>\n </div>\n <div class=\"nylas-scheduling-method__dropdown\">\n <span class=\"nylas-scheduling-method__dropdown-label\">\n Select a scheduling method for the event.\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n <strong>Standard Booking</strong>\n <br />\n - Allows 1:1 bookings, or n:1 bookings with additional participants.\n <br />\n <br />\n <strong>Round-Robin Maximize Fairness</strong>\n <br />\n - Rotates through the list of participants you select, displaying the participant with the fewest recent bookings.\n <br />\n <br />\n <strong>Round-Robin Maximize Availability</strong>\n <br />\n - Rotates through the list of participants you select, prioritizing participants with the fewest recent bookings, but making as many time-slots available as\n possible.\n <br />\n </span>\n </tooltip-component>\n </span>\n {this.readOnly ? (\n <input-component\n name=\"availability-method-read-only\"\n type=\"text\"\n exportparts=\"ic__label: nsm__input-label, ic__input: nsm__input, ic__input_wrapper: nsm__input_wrapper\"\n readOnly\n defaultValue={bookingTypeOptions.find(cal => cal.value == defaultBookingType)?.label ?? bookingTypeOptions[0].label}\n />\n ) : (\n <select-dropdown\n name={this.name}\n options={bookingTypeOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: nsm__dropdown, sd_dropdown-button: nsm__dropdown-button, sd_dropdown-content: nsm__dropdown-content\"\n defaultSelectedOption={bookingTypeOptions.find(cal => cal.value == defaultBookingType) ?? bookingTypeOptions[0]}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-scheduling-method.js","sourceRoot":"","sources":["../../../../src/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,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;AAkB9H,MAAM,OAAO,qBAAqB;;;oBAYT,qBAAqB;;wBAUhB,KAAK;mCAUM,EAAE;;IAYzC,iBAAiB;QACf,KAAK,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;IACxD,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,yBAAyB,EAAE,sBAAsB,CAAC,CAAC;IAC3D,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;QAEtD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5C,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAzEC;IAlBC,iBAAiB,CAA2G;QAC3H,IAAI,EAAE,yBAAyB;QAC/B,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC,CAAC;QAC7E,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;;;;mDAyED","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AdditionalParticipant, Configuration } from '@nylas/core';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\n/**\n * The `nylas-scheduling-method` component is a UI component that displays the booking calendar picker.\n * @part nsm - The booking calendar picker container\n * @part nsm__header - The header of the booking calendar picker\n * @part nsm__input-label - The input label of the booking calendar picker\n * @part nsm__dropdown - The dropdown container\n * @part nsm__dropdown-button - The dropdown button\n * @part nsm__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-scheduling-method',\n styleUrl: 'nylas-scheduling-method.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasSchedulingMethod {\n @Element() host!: HTMLNylasSchedulingMethodElement;\n\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the booking type picker.\n */\n @Prop() name: string = 'availability-method';\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 * This prop is used to display the component in a disabled state / read-only mode.\n */\n @Prop() readOnly: boolean = false;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The selected booking type.\n */\n @State() selectedBookingType: string = '';\n\n /**\n * This event is fired when the selected booking calendar changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-scheduling-method', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-scheduling-method', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-scheduling-method', '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-scheduling-method', 'componentDidLoad');\n const bookingtType = this.selectedConfiguration?.availability?.availability_rules?.availability_method?.toString();\n\n // TODO: Remove this when the internals in tests are fixed.\n if (bookingtType && typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(bookingtType, 'booking-calendar');\n }\n this.selectedBookingType = bookingtType || 'collective';\n this.valueChanged.emit({ value: this.selectedBookingType, name: this.name });\n }\n\n componentWillUpdate() {\n debug('nylas-scheduling-method', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-scheduling-method', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-scheduling-method', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-scheduling-method', 'componentDidRender');\n }\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-scheduling-method', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-scheduling-method', 'nylasFormDropdownChangedHandler', event.detail);\n // Pass as handler so that if event.defaultPrevented by parent app, this will be skipped.\n const valueChanged = (event: CustomEvent<{ value: string; name: string }>) => {\n const { value } = event.detail;\n if (value) {\n this.selectedBookingType = value;\n this.internals.setFormValue(value, this.name);\n }\n };\n this.valueChanged.emit({ value: event.detail.value, name: this.name, valueChanged });\n }\n\n @RegisterComponent<NylasSchedulingMethod, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-scheduling-method',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n localPropsToProp: new Map([['additionalParticipants', 'participantOptions']]),\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 bookingTypeOptions = [\n { label: 'Standard booking', value: 'collective' },\n { label: 'Round-robin max fairness', value: 'max-fairness' },\n { label: 'Round-robin max availability', value: 'max-availability' },\n ];\n const defaultBookingType = this.selectedConfiguration?.availability?.availability_rules?.availability_method?.toString();\n const hasAdditionalParticipants =\n this.participantOptions &&\n this.participantOptions?.length > 0 &&\n !!this.participantOptions[0].email &&\n !!this.participantOptions[0].name &&\n !!this.participantOptions[0].calendars &&\n this.participantOptions[0].calendars.length > 0;\n\n // If a default availability method is set in the configuration (developer settings), do not show the booking type picker.\n // Or, if a default availability method is not set and there are no additional participants, do not show the booking type picker.\n if ((defaultBookingType || !hasAdditionalParticipants) && !this.readOnly) {\n return null;\n }\n\n return (\n <Host>\n <div class=\"nylas-scheduling-method\" part=\"nsm\">\n <div class=\"header\" part=\"nsm__header\">\n <h3>Scheduling method</h3>\n </div>\n <div class=\"nylas-scheduling-method__dropdown\">\n <span class=\"nylas-scheduling-method__dropdown-label\">\n Select a scheduling method for the event.\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n <strong>Standard Booking</strong>\n <br />\n - Allows 1:1 bookings, or n:1 bookings with additional participants.\n <br />\n <br />\n <strong>Round-Robin Maximize Fairness</strong>\n <br />\n - Rotates through the list of participants you select, displaying the participant with the fewest recent bookings.\n <br />\n <br />\n <strong>Round-Robin Maximize Availability</strong>\n <br />\n - Rotates through the list of participants you select, prioritizing participants with the fewest recent bookings, but making as many time-slots available as\n possible.\n <br />\n </span>\n </tooltip-component>\n </span>\n {this.readOnly ? (\n <input-component\n name=\"availability-method-read-only\"\n type=\"text\"\n exportparts=\"ic__label: nsm__input-label, ic__input: nsm__input, ic__input_wrapper: nsm__input_wrapper\"\n readOnly\n defaultValue={bookingTypeOptions.find(cal => cal.value == defaultBookingType)?.label ?? bookingTypeOptions[0].label}\n />\n ) : (\n <select-dropdown\n name={this.name}\n options={bookingTypeOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: nsm__dropdown, sd_dropdown-button: nsm__dropdown-button, sd_dropdown-content: nsm__dropdown-content\"\n defaultSelectedOption={bookingTypeOptions.find(cal => cal.value == defaultBookingType) ?? bookingTypeOptions[0]}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -254,7 +254,7 @@ export class TimeInput {
|
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
render() {
|
|
257
|
-
return (h(Host, { key: '
|
|
257
|
+
return (h(Host, { key: 'e83949b2270706557e5d45aff5958d937c6489c9' }, h("div", { key: '0cacfe5530a1186ce2ff50ccc3d9328a62d48e2f', class: "time-picker", part: "time-picker" }, h("input", { key: '8daf647468746997e503883478debf8d335a780d', type: "text", name: this.name, id: this.name, part: "time-input", class: {
|
|
258
258
|
'time-input': true,
|
|
259
259
|
'error': !!this.err || this.hasError,
|
|
260
260
|
}, ref: el => (this.timeInput = el), value: this.time, onClick: () => {
|