@nylas/web-elements 0.0.0-canary-20241008193213 → 0.0.0-canary-20241017103834
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/add-circle/add-circle.es.js +1 -1
- package/dist/cdn/add-circle-icon/add-circle-icon.es.js +1 -1
- package/dist/cdn/archive-icon/archive-icon.es.js +127 -127
- package/dist/cdn/arrow-icon/arrow-icon.es.js +248 -248
- package/dist/cdn/bold-icon/bold-icon.es.js +1 -1
- package/dist/cdn/button-component/button-component.es.js +2 -2
- package/dist/cdn/calendar/calendar.es.js +77 -77
- package/dist/cdn/calendar-agenda/calendar-agenda.es.js +1 -1
- package/dist/cdn/calendar-agenda-fill/calendar-agenda-fill.es.js +1 -1
- package/dist/cdn/calendar-agenda-fill-icon/calendar-agenda-fill-icon.es.js +1 -1
- package/dist/cdn/calendar-agenda-icon/calendar-agenda-icon.es.js +1 -1
- package/dist/cdn/calendar-cancel/calendar-cancel.es.js +1 -1
- package/dist/cdn/calendar-cancel-icon/calendar-cancel-icon.es.js +1 -1
- package/dist/cdn/calendar-check/calendar-check.es.js +139 -139
- package/dist/cdn/calendar-check-icon/calendar-check-icon.es.js +14 -14
- package/dist/cdn/calendar-icon/calendar-icon.es.js +24 -24
- package/dist/cdn/calendar-info/calendar-info.es.js +1 -1
- package/dist/cdn/calendar-info-icon/calendar-info-icon.es.js +1 -1
- package/dist/cdn/calendar-patterns/calendar-patterns.es.js +1 -1
- package/dist/cdn/calendar-patterns-icon/calendar-patterns-icon.es.js +1 -1
- package/dist/cdn/checkbox-component/checkbox-component.es.js +1 -1
- package/dist/cdn/checkmark/checkmark.es.js +86 -86
- package/dist/cdn/checkmark-circle/checkmark-circle.es.js +99 -99
- package/dist/cdn/checkmark-circle-icon/checkmark-circle-icon.es.js +14 -14
- package/dist/cdn/checkmark-icon/checkmark-icon.es.js +1 -1
- package/dist/cdn/chevron/chevron.es.js +16 -16
- package/dist/cdn/chevron-icon/chevron-icon.es.js +14 -14
- package/dist/cdn/clock/clock.es.js +16 -16
- package/dist/cdn/clock-icon/clock-icon.es.js +14 -14
- package/dist/cdn/close/close.es.js +1 -1
- package/dist/cdn/close-icon/close-icon.es.js +54 -54
- package/dist/cdn/constants/constants.es.js +3 -3
- package/dist/cdn/copy/copy.es.js +239 -239
- package/dist/cdn/copy-icon/copy-icon.es.js +271 -271
- package/dist/cdn/delete/delete.es.js +1 -1
- package/dist/cdn/delete-icon/delete-icon.es.js +1 -1
- package/dist/cdn/document-refresh-icon/document-refresh-icon.es.js +1 -1
- package/dist/cdn/dragable/dragable.es.js +54 -54
- package/dist/cdn/dragable-icon/dragable-icon.es.js +1 -1
- package/dist/cdn/edit/edit.es.js +1 -1
- package/dist/cdn/edit-icon/edit-icon.es.js +1 -1
- package/dist/cdn/envelope/envelope.es.js +25 -25
- package/dist/cdn/envelope-fill/envelope-fill.es.js +16 -16
- package/dist/cdn/envelope-fill-icon/envelope-fill-icon.es.js +97 -97
- package/dist/cdn/envelope-icon/envelope-icon.es.js +24 -24
- package/dist/cdn/eye/eye.es.js +1 -1
- package/dist/cdn/eye-icon/eye-icon.es.js +1 -1
- package/dist/cdn/feedback-icon/feedback-icon.es.js +86 -86
- package/dist/cdn/flow/flow.es.js +1 -1
- package/dist/cdn/flow-icon/flow-icon.es.js +1 -1
- package/dist/cdn/folder-icon/folder-icon.es.js +14 -14
- package/dist/cdn/forward-icon/forward-icon.es.js +240 -240
- package/dist/cdn/globe/globe.es.js +1 -1
- package/dist/cdn/globe-icon/globe-icon.es.js +1 -1
- package/dist/cdn/google-logo/google-logo.es.js +1 -1
- package/dist/cdn/google-logo-icon/google-logo-icon.es.js +1 -1
- package/dist/cdn/google-meet/google-meet.es.js +15 -15
- package/dist/cdn/google-meet-icon/google-meet-icon.es.js +1 -1
- package/dist/cdn/inbox-icon/inbox-icon.es.js +1 -1
- package/dist/cdn/info/info.es.js +239 -239
- package/dist/cdn/info-icon/info-icon.es.js +240 -240
- package/dist/cdn/input-color-picker/input-color-picker.es.js +3 -3
- package/dist/cdn/input-component/input-component.es.js +1 -1
- package/dist/cdn/input-dropdown/input-dropdown.es.js +1 -1
- package/dist/cdn/input-image-url/input-image-url.es.js +366 -366
- package/dist/cdn/italic-icon/italic-icon.es.js +86 -86
- package/dist/cdn/loading/loading.es.js +270 -270
- package/dist/cdn/loading-icon/loading-icon.es.js +271 -271
- package/dist/cdn/location/location.es.js +100 -100
- package/dist/cdn/location-icon/location-icon.es.js +19 -19
- package/dist/cdn/location-off/location-off.es.js +86 -86
- package/dist/cdn/location-off-icon/location-off-icon.es.js +1 -1
- package/dist/cdn/microsof-teams/microsof-teams.es.js +96 -96
- package/dist/cdn/microsoft-logo/microsoft-logo.es.js +1 -1
- package/dist/cdn/microsoft-logo-icon/microsoft-logo-icon.es.js +1 -1
- package/dist/cdn/microsoft-teams-icon/microsoft-teams-icon.es.js +97 -97
- package/dist/cdn/multi-select-dropdown/multi-select-dropdown.es.js +3 -3
- package/dist/cdn/nylas-additional-participants/nylas-additional-participants.es.js +55 -57
- package/dist/cdn/nylas-availability-picker/nylas-availability-picker.es.js +15 -15
- package/dist/cdn/nylas-booked-event-card/nylas-booked-event-card.es.js +10 -10
- package/dist/cdn/nylas-booking-calendar-picker/nylas-booking-calendar-picker.es.js +5 -5
- package/dist/cdn/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.es.js +7 -7
- package/dist/cdn/nylas-booking-confirmation-type/nylas-booking-confirmation-type.es.js +733 -734
- package/dist/cdn/nylas-booking-form/nylas-booking-form.es.js +154 -151
- package/dist/cdn/nylas-booking-form-config/nylas-booking-form-config.es.js +9 -9
- package/dist/cdn/nylas-buffer-time/nylas-buffer-time.es.js +5 -5
- package/dist/cdn/nylas-calendar-picker/nylas-calendar-picker.es.js +7 -7
- package/dist/cdn/nylas-cancel-booking-form/nylas-cancel-booking-form.es.js +10 -10
- package/dist/cdn/nylas-cancellation-policy/nylas-cancellation-policy.es.js +3 -3
- package/dist/cdn/nylas-cancelled-event-card/nylas-cancelled-event-card.es.js +7 -7
- package/dist/cdn/nylas-confirmation-email/nylas-confirmation-email.es.js +99 -95
- package/dist/cdn/nylas-confirmed-event-card/nylas-confirmed-event-card.es.js +723 -723
- package/dist/cdn/nylas-connected-calendars/nylas-connected-calendars.es.js +179 -179
- package/dist/cdn/nylas-custom-booking-flow/nylas-custom-booking-flow.es.js +2 -2
- package/dist/cdn/nylas-custom-event-slug/nylas-custom-event-slug.es.js +7 -7
- package/dist/cdn/nylas-customize-booking-settings/nylas-customize-booking-settings.es.js +147 -147
- package/dist/cdn/nylas-date-picker/nylas-date-picker.es.js +7 -7
- package/dist/cdn/nylas-editor-tabs/nylas-editor-tabs.es.js +6451 -6036
- package/dist/cdn/nylas-event-description/nylas-event-description.es.js +3 -3
- package/dist/cdn/nylas-event-duration/nylas-event-duration.es.js +232 -232
- package/dist/cdn/nylas-event-info/nylas-event-info.es.js +2 -2
- package/dist/cdn/nylas-event-limits/nylas-event-limits.es.js +2 -2
- package/dist/cdn/nylas-event-location/nylas-event-location.es.js +2558 -2533
- package/dist/cdn/nylas-event-title/nylas-event-title.es.js +10 -5
- package/dist/cdn/nylas-feedback-form/nylas-feedback-form.es.js +8 -8
- package/dist/cdn/nylas-form-card/nylas-form-card.es.js +1 -1
- package/dist/cdn/nylas-if-state/nylas-if-state.es.js +1 -1
- package/dist/cdn/nylas-limit-future-bookings/nylas-limit-future-bookings.es.js +8 -8
- package/dist/cdn/nylas-list-configurations/nylas-list-configurations.es.js +21 -17
- package/dist/cdn/nylas-locale-switch/nylas-locale-switch.es.js +1168 -1168
- package/dist/cdn/nylas-login/nylas-login.es.js +1 -1
- package/dist/cdn/nylas-logo/nylas-logo.es.js +125 -125
- package/dist/cdn/nylas-min-booking-notice/nylas-min-booking-notice.es.js +10 -10
- package/dist/cdn/nylas-min-cancellation-notice/nylas-min-cancellation-notice.es.js +10 -10
- package/dist/cdn/nylas-notification/nylas-notification.es.js +3 -3
- package/dist/cdn/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.es.js +6 -6
- package/dist/cdn/nylas-page-name/nylas-page-name.es.js +7 -7
- package/dist/cdn/nylas-page-styling/nylas-page-styling.es.js +4 -4
- package/dist/cdn/nylas-participant-booking-calendars/nylas-participant-booking-calendars.es.js +8 -8
- package/dist/cdn/nylas-participants-custom-availability/nylas-participants-custom-availability.es.js +176 -176
- package/dist/cdn/nylas-provider/nylas-provider.es.js +652 -644
- package/dist/cdn/nylas-reminder-emails/nylas-reminder-emails.es.js +17 -17
- package/dist/cdn/nylas-reminder-time/nylas-reminder-time.es.js +5 -5
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +1430 -1001
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1081 -1056
- package/dist/cdn/nylas-scheduling-method/nylas-scheduling-method.es.js +10 -12
- package/dist/cdn/nylas-selected-event-card/nylas-selected-event-card.es.js +4 -4
- package/dist/cdn/nylas-time-window-picker/nylas-time-window-picker.es.js +1 -1
- package/dist/cdn/nylas-timeslot-interval/nylas-timeslot-interval.es.js +147 -149
- package/dist/cdn/nylas-timeslot-picker/nylas-timeslot-picker.es.js +10 -9
- package/dist/cdn/paintbrush/paintbrush.es.js +239 -239
- package/dist/cdn/paintbrush-fill/paintbrush-fill.es.js +1 -1
- package/dist/cdn/paintbrush-fill-icon/paintbrush-fill-icon.es.js +1 -1
- package/dist/cdn/paintbrush-icon/paintbrush-icon.es.js +240 -240
- package/dist/cdn/people/people.es.js +1 -1
- package/dist/cdn/people-icon/people-icon.es.js +1 -1
- package/dist/cdn/person/person.es.js +1 -1
- package/dist/cdn/person-clipboard/person-clipboard.es.js +1 -1
- package/dist/cdn/person-clipboard-icon/person-clipboard-icon.es.js +1 -1
- package/dist/cdn/person-icon/person-icon.es.js +1 -1
- package/dist/cdn/play-icon/play-icon.es.js +248 -248
- package/dist/cdn/plus/plus.es.js +16 -16
- package/dist/cdn/plus-icon/plus-icon.es.js +14 -14
- package/dist/cdn/radio-button-group/radio-button-group.es.js +1 -1
- package/dist/cdn/refresh-icon/refresh-icon.es.js +14 -14
- package/dist/cdn/reply-all-icon/reply-all-icon.es.js +14 -14
- package/dist/cdn/reply-icon/reply-icon.es.js +14 -14
- package/dist/cdn/scheduler-store/scheduler-store.es.js +654 -646
- package/dist/cdn/search/search.es.js +1 -1
- package/dist/cdn/search-icon/search-icon.es.js +86 -86
- package/dist/cdn/select-dropdown/select-dropdown.es.js +3 -3
- package/dist/cdn/sent-icon/sent-icon.es.js +1 -1
- package/dist/cdn/spam-icon/spam-icon.es.js +86 -86
- package/dist/cdn/star-icon/star-icon.es.js +1 -1
- package/dist/cdn/stop-icon/stop-icon.es.js +1 -1
- package/dist/cdn/textarea-component/textarea-component.es.js +3 -3
- package/dist/cdn/time-period-selector/time-period-selector.es.js +230 -230
- package/dist/cdn/toggle-switch/toggle-switch.es.js +1 -1
- package/dist/cdn/toolitp-component/toolitp-component.es.js +23 -23
- package/dist/cdn/tooltip-component/tooltip-component.es.js +26 -26
- package/dist/cdn/translate/translate.es.js +246 -246
- package/dist/cdn/translate-icon/translate-icon.es.js +247 -247
- package/dist/cdn/trash/trash.es.js +1 -1
- package/dist/cdn/trash-fill-icon/trash-fill-icon.es.js +14 -14
- package/dist/cdn/trash-icon/trash-icon.es.js +1 -1
- package/dist/cdn/underline-icon/underline-icon.es.js +1 -1
- package/dist/cdn/warning/warning.es.js +247 -247
- package/dist/cdn/warning-icon/warning-icon.es.js +248 -248
- package/dist/cdn/zoom/zoom.es.js +1 -1
- package/dist/cdn/zoom-icon/zoom-icon.es.js +1 -1
- package/dist/cjs/add-circle-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/archive-icon.cjs.entry.js +1 -1
- package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon.cjs.entry.js +1 -1
- package/dist/cjs/button-component_2.cjs.entry.js +2 -2
- package/dist/cjs/{calendar-agenda-fill-icon_51.cjs.entry.js → calendar-agenda-fill-icon_54.cjs.entry.js} +736 -326
- package/dist/cjs/calendar-agenda-fill-icon_54.cjs.entry.js.map +1 -0
- package/dist/cjs/calendar-cancel-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-check-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/calendar-icon.cjs.entry.js +1 -1
- package/dist/cjs/checkbox-component_2.cjs.entry.js +2 -2
- package/dist/cjs/chevron-icon_3.cjs.entry.js +3 -3
- package/dist/cjs/clock-icon_4.cjs.entry.js +4 -4
- package/dist/cjs/copy-icon.cjs.entry.js +1 -1
- package/dist/cjs/delete-icon.cjs.entry.js +1 -1
- package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/folder-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-icon.cjs.entry.js +1 -1
- package/dist/cjs/globe-icon.cjs.entry.js +1 -1
- package/dist/cjs/google-logo-icon_4.cjs.entry.js +34 -23
- package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
- package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
- package/dist/cjs/index-7af03e3f.js +2 -10
- package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/input-color-picker.cjs.entry.js +2 -2
- package/dist/cjs/input-component.cjs.entry.js +1 -1
- package/dist/cjs/input-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/italic-icon.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js +35 -34
- package/dist/cjs/nylas-booked-event-card_12.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-if-state.cjs.entry.js +1 -1
- package/dist/cjs/nylas-login.cjs.entry.js +1 -1
- package/dist/cjs/nylas-provider.cjs.entry.js +2 -2
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +22 -9
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js +1 -1
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/person-icon.cjs.entry.js +1 -1
- package/dist/cjs/play-icon.cjs.entry.js +1 -1
- package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/reply-all-icon.cjs.entry.js +1 -1
- package/dist/cjs/reply-icon.cjs.entry.js +1 -1
- package/dist/cjs/{scheduler-store-4489a68b.js → scheduler-store-e3ddffc1.js} +13 -4
- package/dist/cjs/scheduler-store-e3ddffc1.js.map +1 -0
- package/dist/cjs/sent-icon.cjs.entry.js +1 -1
- package/dist/cjs/spam-icon.cjs.entry.js +1 -1
- package/dist/cjs/star-icon.cjs.entry.js +1 -1
- package/dist/cjs/stop-icon.cjs.entry.js +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js +1 -1
- package/dist/cjs/time-period-selector.cjs.entry.js +1 -1
- package/dist/cjs/translate-icon.cjs.entry.js +1 -1
- package/dist/cjs/trash-fill-icon.cjs.entry.js +1 -1
- package/dist/cjs/underline-icon.cjs.entry.js +1 -1
- package/dist/cjs/warning-icon.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/common/icons/add-circle.js +1 -1
- package/dist/collection/common/icons/archive.js +1 -1
- package/dist/collection/common/icons/arrow.js +1 -1
- package/dist/collection/common/icons/bold.js +1 -1
- package/dist/collection/common/icons/calendar-agenda-fill.js +1 -1
- package/dist/collection/common/icons/calendar-agenda.js +1 -1
- package/dist/collection/common/icons/calendar-cancel.js +1 -1
- package/dist/collection/common/icons/calendar-check.js +1 -1
- package/dist/collection/common/icons/calendar-info.js +1 -1
- package/dist/collection/common/icons/calendar-patterns.js +1 -1
- package/dist/collection/common/icons/calendar.js +1 -1
- package/dist/collection/common/icons/checkmark-circle.js +1 -1
- package/dist/collection/common/icons/checkmark.js +1 -1
- package/dist/collection/common/icons/chevron.js +1 -1
- package/dist/collection/common/icons/clock.js +1 -1
- package/dist/collection/common/icons/close.js +1 -1
- package/dist/collection/common/icons/copy.js +1 -1
- package/dist/collection/common/icons/delete.js +1 -1
- package/dist/collection/common/icons/document-refresh.js +1 -1
- package/dist/collection/common/icons/dragable.js +1 -1
- package/dist/collection/common/icons/edit.js +1 -1
- package/dist/collection/common/icons/envelope-fill.js +1 -1
- package/dist/collection/common/icons/envelope.js +1 -1
- package/dist/collection/common/icons/eye.js +1 -1
- package/dist/collection/common/icons/feedback-icon.js +1 -1
- package/dist/collection/common/icons/flow.js +1 -1
- package/dist/collection/common/icons/folder.js +1 -1
- package/dist/collection/common/icons/forward.js +1 -1
- package/dist/collection/common/icons/globe.js +1 -1
- package/dist/collection/common/icons/google-logo.js +1 -1
- package/dist/collection/common/icons/google-meet.js +1 -1
- package/dist/collection/common/icons/inbox.js +1 -1
- package/dist/collection/common/icons/info.js +1 -1
- package/dist/collection/common/icons/italic.js +1 -1
- package/dist/collection/common/icons/loading.js +1 -1
- package/dist/collection/common/icons/location-off.js +1 -1
- package/dist/collection/common/icons/location.js +1 -1
- package/dist/collection/common/icons/microsof-teams.js +1 -1
- package/dist/collection/common/icons/microsoft-logo.js +1 -1
- package/dist/collection/common/icons/nylas-logo.js +1 -1
- package/dist/collection/common/icons/paintbrush-fill.js +1 -1
- package/dist/collection/common/icons/paintbrush.js +1 -1
- package/dist/collection/common/icons/people.js +1 -1
- package/dist/collection/common/icons/person-clipboard.js +1 -1
- package/dist/collection/common/icons/person.js +1 -1
- package/dist/collection/common/icons/play.js +1 -1
- package/dist/collection/common/icons/plus.js +1 -1
- package/dist/collection/common/icons/refresh.js +1 -1
- package/dist/collection/common/icons/reply-all.js +1 -1
- package/dist/collection/common/icons/reply.js +1 -1
- package/dist/collection/common/icons/search.js +1 -1
- package/dist/collection/common/icons/sent.js +1 -1
- package/dist/collection/common/icons/spam.js +1 -1
- package/dist/collection/common/icons/star.js +1 -1
- package/dist/collection/common/icons/stop.js +1 -1
- package/dist/collection/common/icons/translate.js +1 -1
- package/dist/collection/common/icons/trash-fill.js +1 -1
- package/dist/collection/common/icons/trash.js +1 -1
- package/dist/collection/common/icons/underline.js +1 -1
- package/dist/collection/common/icons/warning.js +1 -1
- package/dist/collection/common/icons/zoom.js +1 -1
- package/dist/collection/common/types.js.map +1 -1
- package/dist/collection/components/design-system/button-component/button-component.js +1 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +1 -1
- package/dist/collection/components/design-system/input-color-picker/input-color-picker.js +2 -2
- package/dist/collection/components/design-system/input-component/input-component.js +1 -1
- package/dist/collection/components/design-system/input-dropdown/input-dropdown.js +1 -1
- package/dist/collection/components/design-system/input-image-url/input-image-url.js +20 -2
- package/dist/collection/components/design-system/input-image-url/input-image-url.js.map +1 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +1 -1
- package/dist/collection/components/design-system/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +1 -1
- package/dist/collection/components/design-system/textarea-component/textarea-component.js +1 -1
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
- package/dist/collection/components/design-system/toggle-switch/toggle-switch.js +1 -1
- package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
- package/dist/collection/components/nylas-if-state/nylas-if-state.js +1 -1
- package/dist/collection/components/nylas-login/nylas-login.js +1 -1
- package/dist/collection/components/nylas-provider/nylas-provider.js +1 -1
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.css +23 -0
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +66 -51
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.css +23 -0
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +35 -24
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.css +23 -0
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +38 -29
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.css +23 -0
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +26 -23
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js +26 -23
- package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.css +23 -0
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +26 -20
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-feedback-form/nylas-feedback-form.js +2 -2
- package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.css +23 -0
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
- package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js +29 -23
- package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +24 -10
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js +143 -0
- package/dist/collection/components/scheduler/nylas-scheduling/test/nylas-scheduling.spec.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.css +23 -0
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +3 -3
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +23 -0
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +50 -44
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +66 -55
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/test/nylas-additional-participants.spec.js +106 -0
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/test/nylas-additional-participants.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +44 -28
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +25 -10
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js +21 -9
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.js +19 -10
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +6 -3
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js +10 -4
- package/dist/collection/components/scheduler-editor/nylas-buffer-time/nylas-buffer-time.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +45 -33
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.css +2 -1
- package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js +16 -7
- package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js +58 -30
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/test/nylas-confirmation-email.spec.js +33 -0
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/test/nylas-confirmation-email.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js +26 -10
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js +1 -0
- package/dist/collection/components/scheduler-editor/nylas-custom-event-slug/nylas-custom-event-slug.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js +17 -11
- package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +62 -28
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/test/nylas-editor-tabs.spec.js +171 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/test/nylas-editor-tabs.spec.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +16 -7
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +20 -9
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration.spec.js +55 -0
- package/dist/collection/components/scheduler-editor/nylas-event-duration/test/nylas-event-duration.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +74 -29
- package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +25 -11
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +16 -7
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js +32 -23
- package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +32 -23
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-page-name/nylas-page-name.js +43 -28
- package/dist/collection/components/scheduler-editor/nylas-page-name/nylas-page-name.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js +38 -26
- package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js +31 -12
- package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +18 -8
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-participants-custom-availability.spec.js +47 -0
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/test/nylas-participants-custom-availability.spec.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-reminder-emails/nylas-reminder-emails.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.js +34 -27
- package/dist/collection/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +18 -53
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +12 -3
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/types/index.js +7 -6
- package/dist/collection/types/index.js.map +1 -1
- package/dist/collection/utils/test-utils.js +9 -0
- package/dist/collection/utils/test-utils.js.map +1 -1
- package/dist/components/add-circle.js +1 -1
- package/dist/components/archive-icon.js +1 -1
- package/dist/components/arrow-icon.js +1 -1
- package/dist/components/bold-icon.js +1 -1
- package/dist/components/button-component2.js +1 -1
- package/dist/components/calendar-agenda-fill.js +1 -1
- package/dist/components/calendar-agenda.js +1 -1
- package/dist/components/calendar-cancel.js +1 -1
- package/dist/components/calendar-check.js +1 -1
- package/dist/components/calendar-info.js +1 -1
- package/dist/components/calendar-patterns.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/checkbox-component2.js +1 -1
- package/dist/components/checkmark-circle.js +1 -1
- package/dist/components/checkmark.js +1 -1
- package/dist/components/chevron.js +1 -1
- package/dist/components/clock.js +1 -1
- package/dist/components/close.js +1 -1
- package/dist/components/constants.js +1 -1
- package/dist/components/copy.js +1 -1
- package/dist/components/delete.js +1 -1
- package/dist/components/document-refresh-icon.js +1 -1
- package/dist/components/dragable.js +1 -1
- package/dist/components/edit.js +1 -1
- package/dist/components/envelope-fill.js +1 -1
- package/dist/components/envelope.js +1 -1
- package/dist/components/eye.js +1 -1
- package/dist/components/feedback-icon2.js +1 -1
- package/dist/components/flow.js +1 -1
- package/dist/components/folder-icon.js +1 -1
- package/dist/components/forward-icon.js +1 -1
- package/dist/components/globe.js +1 -1
- package/dist/components/google-logo.js +1 -1
- package/dist/components/google-meet.js +1 -1
- package/dist/components/inbox-icon.js +1 -1
- package/dist/components/info.js +1 -1
- package/dist/components/input-color-picker.js +2 -2
- package/dist/components/input-component2.js +1 -1
- package/dist/components/input-dropdown2.js +1 -1
- package/dist/components/input-image-url2.js +6 -2
- package/dist/components/input-image-url2.js.map +1 -1
- package/dist/components/italic-icon.js +1 -1
- package/dist/components/loading.js +1 -1
- package/dist/components/location-off.js +1 -1
- package/dist/components/location.js +1 -1
- package/dist/components/microsof-teams.js +1 -1
- package/dist/components/microsoft-logo.js +1 -1
- package/dist/components/multi-select-dropdown2.js +1 -1
- package/dist/components/nylas-additional-participants2.js +16 -20
- package/dist/components/nylas-additional-participants2.js.map +1 -1
- package/dist/components/nylas-availability-picker2.js +5 -4
- package/dist/components/nylas-availability-picker2.js.map +1 -1
- package/dist/components/nylas-booked-event-card2.js +8 -8
- package/dist/components/nylas-booked-event-card2.js.map +1 -1
- package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-booking-confirmation-redirect2.js +1 -1
- package/dist/components/nylas-booking-confirmation-redirect2.js.map +1 -1
- package/dist/components/nylas-booking-confirmation-type2.js +2 -2
- package/dist/components/nylas-booking-confirmation-type2.js.map +1 -1
- package/dist/components/nylas-booking-form-config2.js +1 -1
- package/dist/components/nylas-booking-form-config2.js.map +1 -1
- package/dist/components/nylas-booking-form2.js +6 -5
- package/dist/components/nylas-booking-form2.js.map +1 -1
- package/dist/components/nylas-buffer-time2.js.map +1 -1
- package/dist/components/nylas-calendar-picker2.js +4 -4
- package/dist/components/nylas-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-cancel-booking-form2.js +4 -4
- package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
- package/dist/components/nylas-cancellation-policy2.js +1 -1
- package/dist/components/nylas-cancellation-policy2.js.map +1 -1
- package/dist/components/nylas-cancelled-event-card2.js +4 -4
- package/dist/components/nylas-cancelled-event-card2.js.map +1 -1
- package/dist/components/nylas-confirmation-email2.js +16 -6
- package/dist/components/nylas-confirmation-email2.js.map +1 -1
- package/dist/components/nylas-confirmed-event-card2.js +3 -3
- package/dist/components/nylas-confirmed-event-card2.js.map +1 -1
- package/dist/components/nylas-connected-calendars2.js +6 -2
- package/dist/components/nylas-connected-calendars2.js.map +1 -1
- package/dist/components/nylas-custom-booking-flow2.js +1 -1
- package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
- package/dist/components/nylas-custom-event-slug2.js +1 -0
- package/dist/components/nylas-custom-event-slug2.js.map +1 -1
- package/dist/components/nylas-customize-booking-settings2.js +4 -4
- package/dist/components/nylas-customize-booking-settings2.js.map +1 -1
- package/dist/components/nylas-date-picker2.js +4 -4
- package/dist/components/nylas-date-picker2.js.map +1 -1
- package/dist/components/nylas-editor-tabs2.js +196 -167
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-event-description2.js +1 -1
- package/dist/components/nylas-event-description2.js.map +1 -1
- package/dist/components/nylas-event-duration2.js +5 -3
- package/dist/components/nylas-event-duration2.js.map +1 -1
- package/dist/components/nylas-event-info2.js +1 -1
- package/dist/components/nylas-event-limits2.js +1 -1
- package/dist/components/nylas-event-location2.js +39 -15
- package/dist/components/nylas-event-location2.js.map +1 -1
- package/dist/components/nylas-event-title2.js +10 -5
- package/dist/components/nylas-event-title2.js.map +1 -1
- package/dist/components/nylas-feedback-form2.js +2 -2
- package/dist/components/nylas-form-card2.js +1 -1
- package/dist/components/nylas-if-state.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js +1 -1
- package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
- package/dist/components/nylas-list-configurations2.js +2 -2
- package/dist/components/nylas-list-configurations2.js.map +1 -1
- package/dist/components/nylas-locale-switch2.js +2 -2
- package/dist/components/nylas-locale-switch2.js.map +1 -1
- package/dist/components/nylas-login.js +1 -1
- package/dist/components/nylas-logo2.js +1 -1
- package/dist/components/nylas-min-booking-notice2.js +3 -3
- package/dist/components/nylas-min-booking-notice2.js.map +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js +3 -3
- package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
- package/dist/components/nylas-notification2.js +1 -1
- package/dist/components/nylas-organizer-confirmation-card2.js +3 -3
- package/dist/components/nylas-organizer-confirmation-card2.js.map +1 -1
- package/dist/components/nylas-page-name2.js +3 -3
- package/dist/components/nylas-page-name2.js.map +1 -1
- package/dist/components/nylas-page-styling2.js +3 -3
- package/dist/components/nylas-page-styling2.js.map +1 -1
- package/dist/components/nylas-participant-booking-calendars2.js +6 -2
- package/dist/components/nylas-participant-booking-calendars2.js.map +1 -1
- package/dist/components/nylas-participants-custom-availability2.js +3 -2
- package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
- package/dist/components/nylas-provider.js +1 -1
- package/dist/components/nylas-reminder-emails.js +1 -302
- package/dist/components/nylas-reminder-emails.js.map +1 -1
- package/dist/{esm/nylas-reminder-emails.entry.js → components/nylas-reminder-emails2.js} +123 -21
- package/dist/components/nylas-reminder-emails2.js.map +1 -0
- package/dist/components/nylas-reminder-time2.js +2 -2
- package/dist/components/nylas-scheduler-editor.js +179 -161
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling-method2.js +4 -6
- package/dist/components/nylas-scheduling-method2.js.map +1 -1
- package/dist/components/nylas-scheduling.js +22 -8
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-selected-event-card2.js +3 -3
- package/dist/components/nylas-selected-event-card2.js.map +1 -1
- package/dist/components/nylas-time-window-picker2.js +1 -1
- package/dist/components/nylas-timeslot-interval2.js +4 -8
- package/dist/components/nylas-timeslot-interval2.js.map +1 -1
- package/dist/components/nylas-timeslot-picker2.js +7 -7
- package/dist/components/nylas-timeslot-picker2.js.map +1 -1
- package/dist/components/paintbrush-fill.js +1 -1
- package/dist/components/paintbrush.js +1 -1
- package/dist/components/people.js +1 -1
- package/dist/components/person-clipboard.js +1 -1
- package/dist/components/person.js +1 -1
- package/dist/components/play-icon.js +1 -1
- package/dist/components/plus.js +1 -1
- package/dist/components/radio-button-group2.js +1 -1
- package/dist/components/refresh-icon.js +1 -1
- package/dist/components/reply-all-icon.js +1 -1
- package/dist/components/reply-icon.js +1 -1
- package/dist/components/scheduler-store.js +12 -3
- package/dist/components/scheduler-store.js.map +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/select-dropdown2.js +1 -1
- package/dist/components/sent-icon.js +1 -1
- package/dist/components/spam-icon.js +1 -1
- package/dist/components/star-icon.js +1 -1
- package/dist/components/stop-icon.js +1 -1
- package/dist/components/textarea-component2.js +1 -1
- package/dist/components/time-period-selector2.js +1 -1
- package/dist/components/toggle-switch2.js +1 -1
- package/dist/components/toolitp-component.js +1 -1
- package/dist/components/translate.js +1 -1
- package/dist/components/trash-fill-icon.js +1 -1
- package/dist/components/trash.js +1 -1
- package/dist/components/underline-icon.js +1 -1
- package/dist/components/warning.js +1 -1
- package/dist/components/zoom.js +1 -1
- package/dist/esm/add-circle-icon_2.entry.js +2 -2
- package/dist/esm/archive-icon.entry.js +1 -1
- package/dist/esm/arrow-icon.entry.js +1 -1
- package/dist/esm/bold-icon.entry.js +1 -1
- package/dist/esm/button-component_2.entry.js +2 -2
- package/dist/esm/{calendar-agenda-fill-icon_51.entry.js → calendar-agenda-fill-icon_54.entry.js} +735 -328
- package/dist/esm/calendar-agenda-fill-icon_54.entry.js.map +1 -0
- package/dist/esm/calendar-cancel-icon.entry.js +1 -1
- package/dist/esm/calendar-check-icon_2.entry.js +2 -2
- package/dist/esm/calendar-icon.entry.js +1 -1
- package/dist/esm/checkbox-component_2.entry.js +2 -2
- package/dist/esm/chevron-icon_3.entry.js +3 -3
- package/dist/esm/clock-icon_4.entry.js +4 -4
- package/dist/esm/{constants-94520f89.js → constants-c549b12b.js} +2 -2
- package/dist/esm/{constants-94520f89.js.map → constants-c549b12b.js.map} +1 -1
- package/dist/esm/copy-icon.entry.js +1 -1
- package/dist/esm/delete-icon.entry.js +1 -1
- package/dist/esm/document-refresh-icon.entry.js +1 -1
- package/dist/esm/folder-icon.entry.js +1 -1
- package/dist/esm/forward-icon.entry.js +1 -1
- package/dist/esm/globe-icon.entry.js +1 -1
- package/dist/esm/google-logo-icon_4.entry.js +35 -24
- package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
- package/dist/esm/inbox-icon.entry.js +1 -1
- package/dist/esm/index-7cb0dd3d.js +2 -10
- package/dist/esm/info-icon_2.entry.js +2 -2
- package/dist/esm/input-color-picker.entry.js +2 -2
- package/dist/esm/input-component.entry.js +1 -1
- package/dist/esm/input-dropdown.entry.js +1 -1
- package/dist/esm/italic-icon.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +1 -1
- package/dist/esm/nylas-booked-event-card_12.entry.js +36 -35
- package/dist/esm/nylas-booked-event-card_12.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +1 -1
- package/dist/esm/nylas-if-state.entry.js +1 -1
- package/dist/esm/nylas-login.entry.js +1 -1
- package/dist/esm/nylas-provider.entry.js +2 -2
- package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
- package/dist/esm/nylas-scheduling.entry.js +23 -10
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/nylas-time-window-picker.entry.js +1 -1
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/person-icon.entry.js +1 -1
- package/dist/esm/play-icon.entry.js +1 -1
- package/dist/esm/refresh-icon.entry.js +1 -1
- package/dist/esm/reply-all-icon.entry.js +1 -1
- package/dist/esm/reply-icon.entry.js +1 -1
- package/dist/esm/{scheduler-store-24e5fb65.js → scheduler-store-d4784b24.js} +13 -4
- package/dist/esm/scheduler-store-d4784b24.js.map +1 -0
- package/dist/esm/sent-icon.entry.js +1 -1
- package/dist/esm/spam-icon.entry.js +1 -1
- package/dist/esm/star-icon.entry.js +1 -1
- package/dist/esm/stop-icon.entry.js +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/time-period-selector.entry.js +1 -1
- package/dist/esm/translate-icon.entry.js +1 -1
- package/dist/esm/trash-fill-icon.entry.js +1 -1
- package/dist/esm/underline-icon.entry.js +1 -1
- package/dist/esm/warning-icon.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
- package/dist/nylas-web-elements/{p-14493c1f.entry.js → p-04d397d3.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b6e4de5b.js → p-08a590fe.js} +2 -2
- package/dist/nylas-web-elements/{p-7943a9f3.entry.js → p-108bd821.entry.js} +2 -2
- package/dist/nylas-web-elements/p-12d690b8.js +2 -0
- package/dist/nylas-web-elements/p-12d690b8.js.map +1 -0
- package/dist/nylas-web-elements/{p-d902a356.entry.js → p-1546bd61.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-651232a3.entry.js → p-1c25b695.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-caad44c4.entry.js → p-2c1432a2.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-21fb688e.entry.js → p-2f91359b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-27074ad6.entry.js → p-3268077f.entry.js} +2 -2
- package/dist/nylas-web-elements/p-32bc7f60.entry.js +2 -0
- package/dist/nylas-web-elements/p-33800554.entry.js +2 -0
- package/dist/nylas-web-elements/p-3971e86b.entry.js +2 -0
- package/dist/nylas-web-elements/p-483f2fb4.entry.js +2 -0
- package/dist/nylas-web-elements/{p-8a082b24.entry.js → p-4e57a9ee.entry.js} +2 -2
- package/dist/nylas-web-elements/p-4fb91c8b.entry.js +2 -0
- package/dist/nylas-web-elements/{p-effd77ed.entry.js → p-525bd709.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-7d5b3918.entry.js → p-56834b7a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-faeec15a.entry.js → p-5ed596d7.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6fa4597b.entry.js → p-6089d6fa.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-39af67b7.entry.js → p-61ea19c2.entry.js} +2 -2
- package/dist/nylas-web-elements/p-713505c9.entry.js +2 -0
- package/dist/nylas-web-elements/{p-bd85bf92.entry.js → p-7140bca8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-3f2f3b85.entry.js → p-762ae706.entry.js} +2 -2
- package/dist/nylas-web-elements/p-7919d41d.entry.js +2 -0
- package/dist/nylas-web-elements/p-7a1d51ab.entry.js +2 -0
- package/dist/nylas-web-elements/p-7a1d51ab.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-7bed0959.entry.js +2 -0
- package/dist/nylas-web-elements/p-7bed0959.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-27b52475.entry.js → p-7c20444b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-d55f619c.entry.js → p-988eee6f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-0519e48e.entry.js → p-9d8ffc7b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-fbddb6fe.entry.js → p-9f009793.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-1e2ffdc6.entry.js → p-aa4b24ce.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-5973b208.entry.js → p-ac8386d1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-062f6da2.entry.js → p-acfe4f6e.entry.js} +2 -2
- package/dist/nylas-web-elements/p-af2ab331.entry.js +2 -0
- package/dist/nylas-web-elements/{p-100c9ff7.entry.js → p-b110d5c1.entry.js} +2 -2
- package/dist/nylas-web-elements/p-bbf86b8c.entry.js +2 -0
- package/dist/nylas-web-elements/{p-e012eac3.entry.js → p-be938025.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-36792b8a.entry.js → p-cad17478.entry.js} +2 -2
- package/dist/nylas-web-elements/p-ce2c8e67.entry.js +2 -0
- package/dist/nylas-web-elements/{p-68320c97.entry.js → p-d1abdef7.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8013d0a2.entry.js → p-dcdb47dd.entry.js} +2 -2
- package/dist/nylas-web-elements/p-df131a08.entry.js +8 -0
- package/dist/nylas-web-elements/p-df131a08.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-cc8f94f7.entry.js → p-e1cd1887.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-00d89615.entry.js → p-eb2d8167.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9b62edf6.entry.js → p-ec302526.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-bbcf8659.entry.js → p-ec528a20.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-0e0c00cc.entry.js → p-eee29c7e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f62df769.entry.js → p-f2ae34c9.entry.js} +2 -2
- package/dist/nylas-web-elements/p-fc6ae4ec.entry.js +2 -0
- package/dist/nylas-web-elements/p-fc6ae4ec.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-fe34d0ee.entry.js +2 -0
- package/dist/nylas-web-elements/p-febf4adf.entry.js +2 -0
- package/dist/types/common/types.d.ts +3 -0
- package/dist/types/components/design-system/input-image-url/input-image-url.d.ts +4 -0
- package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +2 -2
- package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +3 -4
- package/dist/types/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.d.ts +1 -1
- package/dist/types/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.d.ts +1 -1
- package/dist/types/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.d.ts +1 -1
- package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +1 -1
- package/dist/types/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.d.ts +1 -1
- package/dist/types/components/scheduler/nylas-scheduling/nylas-scheduling.d.ts +5 -3
- package/dist/types/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.d.ts +2 -2
- package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +3 -3
- package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +2 -2
- package/dist/types/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.d.ts +5 -1
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +2 -1
- package/dist/types/components/scheduler-editor/nylas-event-location/nylas-event-location.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-page-name/nylas-page-name.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-page-styling/nylas-page-styling.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +1 -0
- package/dist/types/components/scheduler-editor/nylas-scheduling-method/nylas-scheduling-method.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.d.ts +0 -2
- package/dist/types/components.d.ts +265 -290
- package/dist/types/connector/shared/api/scheduler.d.ts +4 -4
- package/dist/types/types/index.d.ts +164 -32
- package/package.json +7 -5
- package/dist/cjs/calendar-agenda-fill-icon_51.cjs.entry.js.map +0 -1
- package/dist/cjs/nylas-reminder-emails.cjs.entry.js +0 -208
- package/dist/cjs/nylas-reminder-emails.cjs.entry.js.map +0 -1
- package/dist/cjs/nylas-reminder-time_2.cjs.entry.js +0 -175
- package/dist/cjs/nylas-reminder-time_2.cjs.entry.js.map +0 -1
- package/dist/cjs/scheduler-store-4489a68b.js.map +0 -1
- package/dist/esm/calendar-agenda-fill-icon_51.entry.js.map +0 -1
- package/dist/esm/nylas-reminder-emails.entry.js.map +0 -1
- package/dist/esm/nylas-reminder-time_2.entry.js +0 -170
- package/dist/esm/nylas-reminder-time_2.entry.js.map +0 -1
- package/dist/esm/scheduler-store-24e5fb65.js.map +0 -1
- package/dist/nylas-web-elements/p-06e44cfc.entry.js +0 -2
- package/dist/nylas-web-elements/p-06e44cfc.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-2653e311.entry.js +0 -2
- package/dist/nylas-web-elements/p-3ff76491.entry.js +0 -2
- package/dist/nylas-web-elements/p-3ff76491.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-51a66bf5.entry.js +0 -2
- package/dist/nylas-web-elements/p-5b237299.entry.js +0 -2
- package/dist/nylas-web-elements/p-63341f71.entry.js +0 -2
- package/dist/nylas-web-elements/p-6c833d5e.entry.js +0 -2
- package/dist/nylas-web-elements/p-6c833d5e.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-742d7c3c.entry.js +0 -2
- package/dist/nylas-web-elements/p-76fc639b.entry.js +0 -2
- package/dist/nylas-web-elements/p-781e954b.entry.js +0 -2
- package/dist/nylas-web-elements/p-7f56a139.entry.js +0 -2
- package/dist/nylas-web-elements/p-7f56a139.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-86194780.entry.js +0 -2
- package/dist/nylas-web-elements/p-86194780.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-96bcc255.entry.js +0 -2
- package/dist/nylas-web-elements/p-aeab587c.entry.js +0 -2
- package/dist/nylas-web-elements/p-c417fd2f.entry.js +0 -2
- package/dist/nylas-web-elements/p-ef3561ae.js +0 -2
- package/dist/nylas-web-elements/p-ef3561ae.js.map +0 -1
- package/dist/nylas-web-elements/p-fbe814b2.entry.js +0 -8
- package/dist/nylas-web-elements/p-fbe814b2.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-fdc60ce2.entry.js +0 -2
- package/dist/nylas-web-elements/p-fecf68ef.entry.js +0 -2
- /package/dist/nylas-web-elements/{p-14493c1f.entry.js.map → p-04d397d3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b6e4de5b.js.map → p-08a590fe.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7943a9f3.entry.js.map → p-108bd821.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d902a356.entry.js.map → p-1546bd61.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-651232a3.entry.js.map → p-1c25b695.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-caad44c4.entry.js.map → p-2c1432a2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-21fb688e.entry.js.map → p-2f91359b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-27074ad6.entry.js.map → p-3268077f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-aeab587c.entry.js.map → p-32bc7f60.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-76fc639b.entry.js.map → p-33800554.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-781e954b.entry.js.map → p-3971e86b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-63341f71.entry.js.map → p-483f2fb4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8a082b24.entry.js.map → p-4e57a9ee.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5b237299.entry.js.map → p-4fb91c8b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-effd77ed.entry.js.map → p-525bd709.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7d5b3918.entry.js.map → p-56834b7a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-faeec15a.entry.js.map → p-5ed596d7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6fa4597b.entry.js.map → p-6089d6fa.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-39af67b7.entry.js.map → p-61ea19c2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fdc60ce2.entry.js.map → p-713505c9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bd85bf92.entry.js.map → p-7140bca8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3f2f3b85.entry.js.map → p-762ae706.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c417fd2f.entry.js.map → p-7919d41d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-27b52475.entry.js.map → p-7c20444b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d55f619c.entry.js.map → p-988eee6f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0519e48e.entry.js.map → p-9d8ffc7b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fbddb6fe.entry.js.map → p-9f009793.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1e2ffdc6.entry.js.map → p-aa4b24ce.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5973b208.entry.js.map → p-ac8386d1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-062f6da2.entry.js.map → p-acfe4f6e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-742d7c3c.entry.js.map → p-af2ab331.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-100c9ff7.entry.js.map → p-b110d5c1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fecf68ef.entry.js.map → p-bbf86b8c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e012eac3.entry.js.map → p-be938025.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-36792b8a.entry.js.map → p-cad17478.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2653e311.entry.js.map → p-ce2c8e67.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-68320c97.entry.js.map → p-d1abdef7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8013d0a2.entry.js.map → p-dcdb47dd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-cc8f94f7.entry.js.map → p-e1cd1887.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-00d89615.entry.js.map → p-eb2d8167.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9b62edf6.entry.js.map → p-ec302526.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bbcf8659.entry.js.map → p-ec528a20.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0e0c00cc.entry.js.map → p-eee29c7e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f62df769.entry.js.map → p-f2ae34c9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-96bcc255.entry.js.map → p-fe34d0ee.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-51a66bf5.entry.js.map → p-febf4adf.entry.js.map} +0 -0
|
@@ -117,8 +117,9 @@ export class NylasBookingForm {
|
|
|
117
117
|
}
|
|
118
118
|
const bookingInfoAdditionalFields = {};
|
|
119
119
|
if (this.bookingInfo?.additionalFields) {
|
|
120
|
+
const configAdditionalFields = this.configSettings?.scheduler?.additional_fields || {};
|
|
120
121
|
Object.entries(this.bookingInfo.additionalFields).forEach(([key, obj]) => {
|
|
121
|
-
if (key in
|
|
122
|
+
if (key in configAdditionalFields) {
|
|
122
123
|
bookingInfoAdditionalFields[key] = obj.value;
|
|
123
124
|
}
|
|
124
125
|
});
|
|
@@ -226,7 +227,7 @@ export class NylasBookingForm {
|
|
|
226
227
|
this.updateAdditionalFields(event.detail.name, event.detail.value);
|
|
227
228
|
}
|
|
228
229
|
render() {
|
|
229
|
-
return (h(Host, { key: '
|
|
230
|
+
return (h(Host, { key: '0ea30bef8b00673240ee959d6b8baaffc7d2c715' }, h("form", { key: 'd5bf36df0f5419c98b5114719c731e8c3201bc7b', onSubmit: e => this.bookButtonClickedHandler(e), noValidate: true }, h("div", { key: '2a7a7cbaae2af6f3b79e23366752a421bf2304ba', class: "nylas-booking-form", part: "nbf" }, h("div", { key: '9af4ebc990cb2ef4e3e58af148eb7609b203c78a', class: "input-wrapper", part: "nbf__input-wrapper" }, h("input-component", { key: '31ea0d5c904a62c2c9b8d7572b448d9a28b24e86', label: i18next.t('name'), name: "name", id: "name", defaultValue: this.bookingInfo?.primaryParticipant?.name || this.name, placeholder: i18next.t('namePlaceholder'), type: "text", required: true, requiredError: i18next.t('fieldRequired', { field: i18next.t('name') }), patternError: i18next.t('invalidInputFormat', { field: i18next.t('name') }), part: "nbf__input-textfield" })), h("div", { key: '95de0dabca66d11e1370b282e4d23eb545fb33a6', class: "input-wrapper", part: "nbf__input-wrapper" }, h("input-component", { key: '712b25028a9d12bde236ada12c9b8ee15a70c885', label: i18next.t('email'), name: "email", id: "email", pattern: emailRegex, defaultValue: this.bookingInfo?.primaryParticipant?.email || this.email, placeholder: i18next.t('emailPlaceholder'), type: "email", required: true, requiredError: i18next.t('fieldRequired', { field: i18next.t('email') }), patternError: i18next.t('invalidInputFormat', { field: i18next.t('email') }), part: "nbf__input-textfield" })), this.configSettings?.scheduler?.hide_additional_guests !== true && (h("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, this.guestEmails.map((email, index) => (h("div", { class: "input-wrapper button-wrapper" }, h("label", { class: {
|
|
230
231
|
error: !!this.guestEmailErrors[index],
|
|
231
232
|
} }, i18next.t('guestEmail')), h("div", { class: "guest-email-input" }, h("input", { type: "email", id: `guest-email-${index}`, maxLength: 100, class: {
|
|
232
233
|
'guest-email': true,
|
|
@@ -253,7 +254,7 @@ export class NylasBookingForm {
|
|
|
253
254
|
default:
|
|
254
255
|
return (h("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, h("input-component", { label: label, name: key, id: key, type: field.type, defaultValue: defaultValue || '', requiredError: i18next.t('fieldRequired', { field: label }), required: field.required, part: "nbf__input-textfield" })));
|
|
255
256
|
}
|
|
256
|
-
})), h("div", { key: '
|
|
257
|
+
})), h("div", { key: 'f89d9ed23eca94e127aca472e8444336160a4a49', class: "cta" }, h("button-component", { key: 'e1de4364cd5d351f23499ab82bf4d444185a47cc', variant: 'basic', class: "back", part: "nbf__button-outline", isLoading: this.backButtonLoading && this.isLoading, onClick: this.handleBackButtonClicked }, h("slot", { key: '1b1a422766e53e8e1aec7d31db9c2406afec3da1', name: "booking-form-back-label" }, `${i18next.t('backButton')}`)), h("button-component", { key: '68c249ef1ca7dad8b6217d86662dd195ec77b016', variant: 'primary', isLoading: !this.backButtonLoading && this.isLoading, disabled: this.isLoading, part: "nbf__button-primary", type: "submit" }, h("slot", { key: 'de2c7d09c9203409e7d92b80f6901b5099ab1163', name: "booking-form-book-label" }, `${i18next.t('bookNowButton')}`))))));
|
|
257
258
|
}
|
|
258
259
|
static get is() { return "nylas-booking-form"; }
|
|
259
260
|
static get encapsulation() { return "shadow"; }
|
|
@@ -280,8 +281,11 @@ export class NylasBookingForm {
|
|
|
280
281
|
"required": false,
|
|
281
282
|
"optional": true,
|
|
282
283
|
"docs": {
|
|
283
|
-
"tags": [
|
|
284
|
-
|
|
284
|
+
"tags": [{
|
|
285
|
+
"name": "standalone",
|
|
286
|
+
"text": "The loading state."
|
|
287
|
+
}],
|
|
288
|
+
"text": ""
|
|
285
289
|
},
|
|
286
290
|
"attribute": "is-loading",
|
|
287
291
|
"reflect": false
|
|
@@ -303,8 +307,11 @@ export class NylasBookingForm {
|
|
|
303
307
|
"required": false,
|
|
304
308
|
"optional": true,
|
|
305
309
|
"docs": {
|
|
306
|
-
"tags": [
|
|
307
|
-
|
|
310
|
+
"tags": [{
|
|
311
|
+
"name": "standalone",
|
|
312
|
+
"text": "The booking info."
|
|
313
|
+
}],
|
|
314
|
+
"text": ""
|
|
308
315
|
}
|
|
309
316
|
},
|
|
310
317
|
"eventInfo": {
|
|
@@ -316,40 +323,44 @@ export class NylasBookingForm {
|
|
|
316
323
|
"references": {
|
|
317
324
|
"NylasEvent": {
|
|
318
325
|
"location": "import",
|
|
319
|
-
"path": "
|
|
320
|
-
"id": "src/
|
|
326
|
+
"path": "@/common/types",
|
|
327
|
+
"id": "src/common/types.ts::NylasEvent"
|
|
321
328
|
}
|
|
322
329
|
}
|
|
323
330
|
},
|
|
324
331
|
"required": false,
|
|
325
332
|
"optional": true,
|
|
326
333
|
"docs": {
|
|
327
|
-
"tags": [
|
|
328
|
-
|
|
334
|
+
"tags": [{
|
|
335
|
+
"name": "standalone",
|
|
336
|
+
"text": "The booked event (Used to track if a booking is created in an eventOverride)."
|
|
337
|
+
}],
|
|
338
|
+
"text": ""
|
|
329
339
|
}
|
|
330
340
|
},
|
|
331
341
|
"configSettings": {
|
|
332
|
-
"type": "
|
|
342
|
+
"type": "unknown",
|
|
333
343
|
"mutable": false,
|
|
334
344
|
"complexType": {
|
|
335
345
|
"original": "ConfigSettings",
|
|
336
|
-
"resolved": "
|
|
346
|
+
"resolved": "undefined | { configuration_id: string; scheduler: { available_days_in_future: number; min_cancellation_notice: number; min_booking_notice: number; rescheduling_url?: string | undefined; cancellation_url?: string | undefined; cancellation_policy?: string | undefined; hide_additional_guests?: boolean | undefined; hide_cancellation_options?: boolean | undefined; hide_rescheduling_options?: boolean | undefined; additional_fields?: Record<string, AdditionalFields> | undefined; confirmation_redirect_url?: string | undefined; organizer_confirmation_url?: string | undefined; }; organizer: { name: string; email: string; }; slug: string; appearance: Appearance; booking_type: string; name: string; }",
|
|
337
347
|
"references": {
|
|
338
348
|
"ConfigSettings": {
|
|
339
349
|
"location": "import",
|
|
340
|
-
"path": "
|
|
341
|
-
"id": "src/
|
|
350
|
+
"path": "@/stores/scheduler-store",
|
|
351
|
+
"id": "src/stores/scheduler-store.ts::ConfigSettings"
|
|
342
352
|
}
|
|
343
353
|
}
|
|
344
354
|
},
|
|
345
355
|
"required": false,
|
|
346
356
|
"optional": true,
|
|
347
357
|
"docs": {
|
|
348
|
-
"tags": [
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
358
|
+
"tags": [{
|
|
359
|
+
"name": "standalone",
|
|
360
|
+
"text": "The config settings for the scheduler."
|
|
361
|
+
}],
|
|
362
|
+
"text": ""
|
|
363
|
+
}
|
|
353
364
|
}
|
|
354
365
|
};
|
|
355
366
|
}
|
|
@@ -423,13 +434,13 @@ export class NylasBookingForm {
|
|
|
423
434
|
"text": "This event is fired when the book button is clicked and the form validation is complete and successful.\nThis event is fired before the booking request is sent."
|
|
424
435
|
},
|
|
425
436
|
"complexType": {
|
|
426
|
-
"original": "
|
|
427
|
-
"resolved": "
|
|
437
|
+
"original": "NylasSchedulerBookingDataWithFlatFields",
|
|
438
|
+
"resolved": "Omit<NylasSchedulerBookingData, \"additionalFields\"> & { additionalFields?: Record<string, string> | undefined; }",
|
|
428
439
|
"references": {
|
|
429
|
-
"
|
|
440
|
+
"NylasSchedulerBookingDataWithFlatFields": {
|
|
430
441
|
"location": "import",
|
|
431
442
|
"path": "@/common/types",
|
|
432
|
-
"id": "src/common/types.ts::
|
|
443
|
+
"id": "src/common/types.ts::NylasSchedulerBookingDataWithFlatFields"
|
|
433
444
|
}
|
|
434
445
|
}
|
|
435
446
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-booking-form.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-booking-form/nylas-booking-form.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAKhE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,MAAM,UAAU,GAAG,sIAAsI,CAAC;AAyB1J,MAAM,OAAO,gBAAgB;;QAwJ3B,sBAAiB,GAAG,CAAC,UAAkB,EAAE,KAAa,EAAE,EAAE;YAExD,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;YACtC,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;YACrC,MAAM,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;YACzC,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;QACjC,CAAC,CA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AqB,EAAE,WAAW,CAAC;YACpC,CAAC,uBAAuB,EAAE,aAAa,CAAC;YACxC,CAAC,qBAAqB,EAAE,WAAW,CAAC;YACpC,CAAC,0BAA0B,EAAE,gBAAgB,CAAC;SAC/C,CAAC;QACF,YAAY,EAAE;YACZ,iBAAiB,EAAE,KAAK,EAAE,MAA4B,EAAE,uBAAgD,EAAE,EAAE;gBAC1G,uBAAuB,CAAC,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAChE,CAAC;YACD,WAAW,EAAE,KAAK,EAAE,KAA0B,EAAE,uBAAgD,EAAE,EAAE;gBAClG,uBAAuB,CAAC,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACrE,CAAC;YACD,YAAY,EAAE,KAAK,EAAE,KAA0B,EAAE,uBAAgD,EAAE,EAAE;gBACnG,uBAAuB,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACtE,CAAC;YACD,gBAAgB,EAAE,KAAK,EAAE,KAA6C,EAAE,wBAAiD,EAAE,EAAE;gBAC3H,KAAK,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAChE,CAAC;YACD,oBAAoB,EAAE,KAAK,EAAE,KAAwB,EAAE,wBAAiD,EAAE,EAAE;gBAC1G,KAAK,CAAC,oBAAoB,EAAE,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YACpE,CAAC;YACD,gBAAgB,EAAE,KAAK,EAAE,KAAyC,EAAE,wBAAiD,EAAE,EAAE;gBACvH,KAAK,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAChE,CAAC;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;8CAgLD","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { RegisterComponent } from '@/common/register-component';\nimport { ConfigSettings, NylasSchedulerConnector } from '../../..';\nimport type { NylasEvent } from '../../..';\nimport type { NylasSchedulerBookingData } from '@/common/types';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug, sanitize } from '@/utils/utils';\nimport { Notification, NylasSchedulerBookingParticipant } from '@nylas/core';\nimport sanitizeHtml from 'sanitize-html';\nimport i18next from '@/utils/i18n';\n\nconst emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\n/**\n * The `nylas-booking-form` component is a UI component that allows users to book an event.\n *\n * The booking form component.\n * @part nbf - The booking form host.\n * @part nbf__input-textfield - The input textfield.\n * @part nbf__button-ghost - The ghost button.\n * @part nbf__button-outline - The outline button.\n * @part nbf__button-primary - The primary button.\n * @part nbf__input-wrapper - The input wrapper.\n * @part nbf__checkbox-component - The checkbox component.\n * @part nbf__radio-button-group - The radio button group.\n * @part nbf__textarea-component - The textarea component.\n * @part nbf__dropdown - The dropdown component.\n * @part nbf__dropdown-button - The dropdown button.\n * @part nbf__dropdown-content - The dropdown content.\n *\n */\n@Component({\n tag: 'nylas-booking-form',\n styleUrl: 'nylas-booking-form.scss',\n shadow: true,\n})\nexport class NylasBookingForm {\n /**\n * The host element\n */\n @Element() readonly host!: HTMLElement;\n\n /**\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * The booking info.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * The booked event (Used to track if a booking is created in an eventOverride).\n */\n @Prop() readonly eventInfo?: NylasEvent;\n\n /**\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * This event is fired when the name is changed.\n */\n @Event() nameChanged!: EventEmitter<string>;\n\n /**\n * This event is fired when the email is changed.\n */\n @Event() emailChanged!: EventEmitter<string>;\n\n /**\n * This event is fired when the cancel button is clicked.\n */\n @Event() backButtonClicked!: EventEmitter<boolean>;\n\n /**\n * This event is fired when the book button is clicked and the form validation is complete and successful.\n * This event is fired before the booking request is sent.\n */\n @Event() detailsConfirmed!: EventEmitter<NylasSchedulerBookingData>;\n\n /**\n * This event is fired when an error occurs in the booking form validation.\n */\n @Event() bookingFormError!: EventEmitter<Partial<Notification>>;\n\n /**\n * This event is fired immediately after the book button is clicked.\n * The booking form validation is not complete at this point.\n */\n @Event() bookingFormSubmitted!: EventEmitter<void>;\n\n /**\n * The name of the user.\n */\n @State() name: string = '';\n\n /**\n * The email address of the user.\n */\n @State() email: string = '';\n\n /**\n * The guests of the user.\n */\n @State() guestEmails: string[] = [];\n\n /**\n * Guest email input errors.\n */\n @State() guestEmailErrors: { [key: number]: string } = {};\n\n /**\n * State to check if name is valid.\n */\n @State() isNameValid: boolean = true;\n\n /**\n * State to check if email is valid.\n */\n @State() isEmailValid: boolean = true;\n\n @State() additionalFields?: Record<string, string> = {};\n\n /**\n * Error message state.\n */\n @State() validationError: { name: string; email: string } = { name: '', email: '' };\n\n @State() backButtonLoading: boolean = false;\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n componentWillLoad() {\n debug('nylas-booking-form', 'componentWillLoad', this.bookingInfo);\n if (this.bookingInfo && this.bookingInfo?.primaryParticipant) {\n this.name = this.bookingInfo.primaryParticipant?.name;\n this.email = this.bookingInfo.primaryParticipant?.email;\n }\n }\n\n @Watch('bookingInfo')\n bookingInfoChangedHandler(newValue: NylasSchedulerBookingData | undefined) {\n if (newValue && newValue.primaryParticipant) {\n this.name = newValue.primaryParticipant.name;\n this.email = newValue.primaryParticipant.email;\n }\n }\n\n /**\n * Change the name.\n * @param name The name to select.\n */\n changeName(name: string) {\n // Reset the validation error\n this.isNameValid = true;\n this.validationError.name = '';\n\n this.name = sanitize(name);\n this.nameChanged.emit(name);\n }\n\n /**\n * Change the email.\n * @param email The email to select.\n */\n changeEmail(email: string) {\n // Reset the validation error\n this.isEmailValid = true;\n this.validationError.email = '';\n\n this.email = sanitizeHtml(email);\n this.emailChanged.emit(email);\n }\n\n resetGuestEmailError(guestIndex: number) {\n const errors = { ...this.guestEmailErrors };\n delete errors[guestIndex];\n this.guestEmailErrors = { ...errors };\n }\n\n /**\n * Handle guest emails changed.\n */\n handleGuestChange = (guestIndex: number, email: string) => {\n // Reset the validation error\n this.resetGuestEmailError(guestIndex);\n const guests = [...this.guestEmails];\n guests[guestIndex] = sanitizeHtml(email);\n this.guestEmails = [...guests];\n };\n\n /**\n * Handle guest input blur.\n */\n handleGuestBlur = (guestIndex: number, email: string) => {\n this.resetGuestEmailError(guestIndex);\n\n if (email === '') {\n this.guestEmailErrors[guestIndex] = i18next.t('fieldRequired', { field: i18next.t('email') });\n return;\n }\n if (!emailRegex.test(email)) {\n this.guestEmailErrors[guestIndex] = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n return;\n }\n this.handleGuestChange(guestIndex, email);\n };\n\n /**\n * Handle add guest button clicked.\n */\n addGuestButtonClickedHandler = e => {\n e.preventDefault();\n this.guestEmails = [...this.guestEmails, ''];\n };\n\n /**\n * Handle remove guest button clicked.\n */\n removeGuestButtonClickHandler = (e: Event, guestIndex: number) => {\n e.preventDefault();\n this.resetGuestEmailError(guestIndex);\n\n const guests = [...this.guestEmails];\n guests.splice(guestIndex, 1);\n this.guestEmails = [...guests];\n };\n\n /**\n * Handle back button clicked.\n */\n handleBackButtonClicked = e => {\n e.preventDefault();\n this.backButtonLoading = true;\n this.backButtonClicked.emit();\n };\n\n /**\n * Handle book button clicked.\n */\n bookButtonClickedHandler = async (e: Event) => {\n e.preventDefault();\n const formSubmittedEvent = this.bookingFormSubmitted.emit();\n if (formSubmittedEvent.defaultPrevented) {\n return;\n }\n\n debug('nylas-booking-form', 'bookButtonClickedHandler', this.bookingInfo);\n const name = this.name || this.bookingInfo?.primaryParticipant?.name;\n const email = this.email || this.bookingInfo?.primaryParticipant?.email;\n\n if (!name || name === '') {\n this.isNameValid = false;\n this.validationError.name = i18next.t('fieldRequired', { field: i18next.t('name') }) || 'Name is required';\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: 'Name is required',\n });\n return;\n }\n if (!email || email === '') {\n this.isEmailValid = false;\n this.validationError.email = i18next.t('fieldRequired', { field: i18next.t('email') }) || 'Email is required';\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: 'Email is required',\n });\n return;\n }\n if (!emailRegex.test(email)) {\n this.isEmailValid = false;\n this.validationError.email = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: i18next.t('invalidInputFormat', { field: i18next.t('email') }) || 'Invalid email',\n });\n return;\n }\n\n let guests: NylasSchedulerBookingParticipant[] = [];\n if (this.guestEmails.length > 0) {\n let hasError = false;\n this.guestEmails.forEach((email: string, i: number) => {\n if (email === '') {\n hasError = true;\n this.guestEmailErrors = { ...this.guestEmailErrors, [i]: i18next.t('fieldRequired', { field: i18next.t('email') }) };\n } else if (!emailRegex.test(email)) {\n hasError = true;\n this.guestEmailErrors = { ...this.guestEmailErrors, [i]: i18next.t('invalidInputFormat', { field: i18next.t('email') }) };\n }\n });\n if (hasError) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: i18next.t('invalidInputFormat', { field: i18next.t('guestEmail') }) || 'Invalid guest email',\n });\n return;\n }\n guests = this.guestEmails.map((email: string) => ({ name: email.trim(), email: email.trim() }));\n } else if (this.bookingInfo?.guests) {\n guests = this.bookingInfo?.guests;\n }\n\n const bookingInfoAdditionalFields = {};\n if (this.bookingInfo?.additionalFields) {\n Object.entries(this.bookingInfo.additionalFields).forEach(([key, obj]) => {\n if (key in this.configSettings?.scheduler?.additional_fields) {\n bookingInfoAdditionalFields[key] = obj.value;\n }\n });\n }\n\n this.detailsConfirmed.emit({\n primaryParticipant: {\n name: name,\n email: email,\n },\n guests: guests,\n additionalFields: { ...bookingInfoAdditionalFields, ...this.additionalFields },\n });\n };\n\n updateAdditionalFields = (name: string, value: string) => {\n if (this.additionalFields) {\n this.additionalFields[name] = value;\n }\n };\n\n @Listen('nylasFormInputChanged')\n nylasFormInputChangedHandler(event: CustomEvent<{ value: string; name: string; error: string; label: string; type?: string }>) {\n switch (event.detail.name) {\n case 'name':\n this.changeName(event.detail.value);\n break;\n case 'email':\n this.changeEmail(event.detail.value);\n break;\n default:\n if (event.detail.error) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: event.detail.error,\n });\n return;\n }\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n break;\n }\n }\n\n @Listen('nylasFormDropdownChanged')\n selectOptionChangedHandler(event: CustomEvent<{ value: string; name: string; label: string; error?: string }>) {\n if (event.detail.error) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: event.detail.error,\n });\n return;\n }\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n }\n\n @Listen('nylasFormSwitchToggled')\n switchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.checked ? 'true' : 'false');\n }\n\n @Listen('nylasFormCheckboxToggled')\n checkboxToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.checked ? 'true' : 'false');\n }\n\n @Listen('nylasFormRadioChanged')\n radioChangedHandler(event: CustomEvent<{ value: string; name: string; label: string; type: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n }\n\n @Listen('nylasFormDropdownDefaultSelected')\n dropdownDefaultSelectedHandler(event: CustomEvent<{ value: string; name: string; label: string; error?: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n }\n\n @RegisterComponent<NylasBookingForm, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-booking-form',\n stateToProps: new Map([\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.bookingInfo', 'bookingInfo'],\n ['scheduler.eventInfo', 'eventInfo'],\n ['scheduler.configSettings', 'configSettings'],\n ]),\n eventToProps: {\n backButtonClicked: async (_event: CustomEvent<boolean>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.toggleAdditionalData(false);\n },\n nameChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.setParticipantName(event.detail);\n },\n emailChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.setParticipantEmail(event.detail);\n },\n detailsConfirmed: async (event: CustomEvent<NylasSchedulerBookingData>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'detailsConfirmed', event.detail);\n },\n bookingFormSubmitted: async (event: CustomEvent<void>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'bookingFormSubmitted', event.detail);\n },\n bookingFormError: async (event: CustomEvent<Partial<Notification>>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'bookingFormError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <form onSubmit={e => this.bookButtonClickedHandler(e)} noValidate>\n <div class=\"nylas-booking-form\" part=\"nbf\">\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={i18next.t('name')}\n name=\"name\"\n id=\"name\"\n defaultValue={this.bookingInfo?.primaryParticipant?.name || this.name}\n placeholder={i18next.t('namePlaceholder')}\n type=\"text\"\n required={true}\n requiredError={i18next.t('fieldRequired', { field: i18next.t('name') })}\n patternError={i18next.t('invalidInputFormat', { field: i18next.t('name') })}\n part=\"nbf__input-textfield\"\n />\n </div>\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={i18next.t('email')}\n name=\"email\"\n id=\"email\"\n pattern={emailRegex}\n defaultValue={this.bookingInfo?.primaryParticipant?.email || this.email}\n placeholder={i18next.t('emailPlaceholder')}\n type=\"email\"\n required={true}\n requiredError={i18next.t('fieldRequired', { field: i18next.t('email') })}\n patternError={i18next.t('invalidInputFormat', { field: i18next.t('email') })}\n part=\"nbf__input-textfield\"\n />\n </div>\n {this.configSettings?.scheduler?.hide_additional_guests !== true && (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n {this.guestEmails.map((email, index) => (\n <div class=\"input-wrapper button-wrapper\">\n <label\n class={{\n error: !!this.guestEmailErrors[index],\n }}\n >\n {i18next.t('guestEmail')}\n </label>\n <div class=\"guest-email-input\">\n <input\n type=\"email\"\n id={`guest-email-${index}`}\n maxLength={100}\n class={{\n 'guest-email': true,\n 'error': !!this.guestEmailErrors[index],\n }}\n placeholder={i18next.t('guestEmailPlaceholder')}\n value={email}\n data-index={index}\n part=\"nbf__input-textfield\"\n onBlur={(e: Event) => this.handleGuestBlur(index, (e.target as HTMLInputElement)?.value)}\n onInput={(e: Event) => this.handleGuestChange(index, (e.target as HTMLInputElement)?.value)}\n ></input>\n <button-component\n variant=\"basic\"\n tooltip=\"Remove guest\"\n onClick={(e: Event) => this.removeGuestButtonClickHandler(e, index)}\n class={{\n 'remove-guest': true,\n 'error': !!this.guestEmailErrors[index],\n }}\n >\n <close-icon />\n </button-component>\n </div>\n <p class=\"help-text\">{this.guestEmailErrors[index]}</p>\n </div>\n ))}\n <button-component class=\"add-guest\" variant=\"invisible\" part=\"nbf__button-ghost\" onClick={e => this.addGuestButtonClickedHandler(e)}>\n <div class=\"button-content\">\n <add-circle-icon slot=\"icon\"></add-circle-icon>\n {this.guestEmails.length > 0 ? `${i18next.t('addAnotherGuest')}` : `${i18next.t('addGuest')}`}\n </div>\n </button-component>\n </div>\n )}\n {Object.entries(\n (this.configSettings?.scheduler?.additional_fields || {}) as Record<\n string,\n {\n required: boolean;\n type: 'email' | 'text' | 'phone_number' | 'dropdown' | 'checkbox' | 'radio_button' | 'multi_line_text';\n order: number;\n options?: string[];\n label: string;\n }\n >,\n )\n ?.sort((a, b) => a[1].order - b[1].order)\n .map(x => {\n const field = x[1];\n const label = field.label;\n const key = x[0];\n const defaultValue = this.bookingInfo?.additionalFields?.[key]?.value || '';\n\n switch (field.type) {\n case 'dropdown':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <select-dropdown\n label={label}\n name={key}\n id={key}\n withSearch={false}\n defaultSelectedOption={defaultValue ? { value: defaultValue, label: defaultValue } : undefined}\n options={field.options?.map(option => ({ value: option, label: option }))}\n required={field.required}\n exportparts=\"sd_dropdown: nbf__dropdown, sd_dropdown-button: nbf__dropdown-button, sd_dropdown-content: nbf__dropdown-content\"\n />\n </div>\n );\n case 'checkbox':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <checkbox-component label={label} name={key} id={key} checked={defaultValue === 'true'} required={field.required} part=\"nbf__checkbox-component\" />\n </div>\n );\n case 'radio_button':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <radio-button-group\n label={label}\n name={key}\n id={key}\n defaultSelectedValue={defaultValue || field.options?.[0] || ''}\n options={field.options?.map(option => ({ value: option, label: option }))}\n required={field.required}\n part=\"nbf__radio-button-group\"\n />\n </div>\n );\n case 'multi_line_text':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <textarea-component label={label} defaultValue={defaultValue} name={key} id={key} required={field.required} part=\"nbf__textarea-component\" />\n </div>\n );\n default:\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={label}\n name={key}\n id={key}\n type={field.type}\n defaultValue={defaultValue || ''}\n requiredError={i18next.t('fieldRequired', { field: label })}\n required={field.required}\n part=\"nbf__input-textfield\"\n />\n </div>\n );\n }\n })}\n {/* <slot name=\"custom-booking-form\"></slot> */}\n </div>\n <div class=\"cta\">\n <button-component variant={'basic'} class=\"back\" part=\"nbf__button-outline\" isLoading={this.backButtonLoading && this.isLoading} onClick={this.handleBackButtonClicked}>\n <slot name=\"booking-form-back-label\">{`${i18next.t('backButton')}`}</slot>\n </button-component>\n <button-component variant={'primary'} isLoading={!this.backButtonLoading && this.isLoading} disabled={this.isLoading} part=\"nbf__button-primary\" type=\"submit\">\n <slot name=\"booking-form-book-label\">{`${i18next.t('bookNowButton')}`}</slot>\n </button-component>\n </div>\n </form>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-booking-form.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-booking-form/nylas-booking-form.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAKhE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,MAAM,UAAU,GAAG,sIAAsI,CAAC;AAyB1J,MAAM,OAAO,gBAAgB;;QA4J3B,sBAAiB,GAAG,CAAC,UAAkB,EAAE,KAAa,EAAE,EAAE;YAExD,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;YACtC,MAAM,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC;YACrC,MAAM,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;YACzC,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;QACjC,CAAC,CAAC;QAKF,oBAAe,GAAG,CAAC,UAAkB,EAAE,KAAa,EAAE,EAAE;YACtD,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;YAEtC,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;gBACjB,IAAI,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pC,CAAC,0BAA0B,EAAE,gBAAgB,CAAC;SAC/C,CAAC;QACF,YAAY,EAAE;YACZ,iBAAiB,EAAE,KAAK,EAAE,MAA4B,EAAE,uBAAgD,EAAE,EAAE;gBAC1G,uBAAuB,CAAC,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAChE,CAAC;YACD,WAAW,EAAE,KAAK,EAAE,KAA0B,EAAE,uBAAgD,EAAE,EAAE;gBAClG,uBAAuB,CAAC,SAAS,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACrE,CAAC;YACD,YAAY,EAAE,KAAK,EAAE,KAA0B,EAAE,uBAAgD,EAAE,EAAE;gBACnG,uBAAuB,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACtE,CAAC;YACD,gBAAgB,EAAE,KAAK,EAAE,KAA2D,EAAE,wBAAiD,EAAE,EAAE;gBACzI,KAAK,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAChE,CAAC;YACD,oBAAoB,EAAE,KAAK,EAAE,KAAwB,EAAE,wBAAiD,EAAE,EAAE;gBAC1G,KAAK,CAAC,oBAAoB,EAAE,sBAAsB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YACpE,CAAC;YACD,gBAAgB,EAAE,KAAK,EAAE,KAAyC,EAAE,wBAAiD,EAAE,EAAE;gBACvH,KAAK,CAAC,oBAAoB,EAAE,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAChE,CAAC;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;8CAgLD","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConnector } from '@/connector/nylas-scheduler-connector';\nimport type { ConfigSettings } from '@/stores/scheduler-store';\nimport type { NylasSchedulerBookingDataWithFlatFields, NylasSchedulerBookingData, NylasEvent } from '@/common/types';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug, sanitize } from '@/utils/utils';\nimport { Notification, NylasSchedulerBookingParticipant } from '@nylas/core';\nimport sanitizeHtml from 'sanitize-html';\nimport i18next from '@/utils/i18n';\n\nconst emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\n/**\n * The `nylas-booking-form` component is a UI component that allows users to book an event.\n *\n * The booking form component.\n * @part nbf - The booking form host.\n * @part nbf__input-textfield - The input textfield.\n * @part nbf__button-ghost - The ghost button.\n * @part nbf__button-outline - The outline button.\n * @part nbf__button-primary - The primary button.\n * @part nbf__input-wrapper - The input wrapper.\n * @part nbf__checkbox-component - The checkbox component.\n * @part nbf__radio-button-group - The radio button group.\n * @part nbf__textarea-component - The textarea component.\n * @part nbf__dropdown - The dropdown component.\n * @part nbf__dropdown-button - The dropdown button.\n * @part nbf__dropdown-content - The dropdown content.\n *\n */\n@Component({\n tag: 'nylas-booking-form',\n styleUrl: 'nylas-booking-form.scss',\n shadow: true,\n})\nexport class NylasBookingForm {\n /**\n * The host element\n */\n @Element() readonly host!: HTMLElement;\n\n /**\n * @standalone\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * @standalone\n * The booking info.\n */\n @Prop() readonly bookingInfo?: NylasSchedulerBookingData;\n\n /**\n * @standalone\n * The booked event (Used to track if a booking is created in an eventOverride).\n */\n @Prop() readonly eventInfo?: NylasEvent;\n\n /**\n * @standalone\n * The config settings for the scheduler.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * This event is fired when the name is changed.\n */\n @Event() nameChanged!: EventEmitter<string>;\n\n /**\n * This event is fired when the email is changed.\n */\n @Event() emailChanged!: EventEmitter<string>;\n\n /**\n * This event is fired when the cancel button is clicked.\n */\n @Event() backButtonClicked!: EventEmitter<boolean>;\n\n /**\n * This event is fired when the book button is clicked and the form validation is complete and successful.\n * This event is fired before the booking request is sent.\n */\n @Event() detailsConfirmed!: EventEmitter<NylasSchedulerBookingDataWithFlatFields>;\n\n /**\n * This event is fired when an error occurs in the booking form validation.\n */\n @Event() bookingFormError!: EventEmitter<Partial<Notification>>;\n\n /**\n * This event is fired immediately after the book button is clicked.\n * The booking form validation is not complete at this point.\n */\n @Event() bookingFormSubmitted!: EventEmitter<void>;\n\n /**\n * The name of the user.\n */\n @State() name: string = '';\n\n /**\n * The email address of the user.\n */\n @State() email: string = '';\n\n /**\n * The guests of the user.\n */\n @State() guestEmails: string[] = [];\n\n /**\n * Guest email input errors.\n */\n @State() guestEmailErrors: { [key: number]: string } = {};\n\n /**\n * State to check if name is valid.\n */\n @State() isNameValid: boolean = true;\n\n /**\n * State to check if email is valid.\n */\n @State() isEmailValid: boolean = true;\n\n @State() additionalFields?: Record<string, string> = {};\n\n /**\n * Error message state.\n */\n @State() validationError: { name: string; email: string } = { name: '', email: '' };\n\n @State() backButtonLoading: boolean = false;\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n componentWillLoad() {\n debug('nylas-booking-form', 'componentWillLoad', this.bookingInfo);\n if (this.bookingInfo && this.bookingInfo?.primaryParticipant) {\n this.name = this.bookingInfo.primaryParticipant?.name;\n this.email = this.bookingInfo.primaryParticipant?.email;\n }\n }\n\n @Watch('bookingInfo')\n bookingInfoChangedHandler(newValue: NylasSchedulerBookingData | undefined) {\n if (newValue && newValue.primaryParticipant) {\n this.name = newValue.primaryParticipant.name;\n this.email = newValue.primaryParticipant.email;\n }\n }\n\n /**\n * Change the name.\n * @param name The name to select.\n */\n changeName(name: string) {\n // Reset the validation error\n this.isNameValid = true;\n this.validationError.name = '';\n\n this.name = sanitize(name);\n this.nameChanged.emit(name);\n }\n\n /**\n * Change the email.\n * @param email The email to select.\n */\n changeEmail(email: string) {\n // Reset the validation error\n this.isEmailValid = true;\n this.validationError.email = '';\n\n this.email = sanitizeHtml(email);\n this.emailChanged.emit(email);\n }\n\n resetGuestEmailError(guestIndex: number) {\n const errors = { ...this.guestEmailErrors };\n delete errors[guestIndex];\n this.guestEmailErrors = { ...errors };\n }\n\n /**\n * Handle guest emails changed.\n */\n handleGuestChange = (guestIndex: number, email: string) => {\n // Reset the validation error\n this.resetGuestEmailError(guestIndex);\n const guests = [...this.guestEmails];\n guests[guestIndex] = sanitizeHtml(email);\n this.guestEmails = [...guests];\n };\n\n /**\n * Handle guest input blur.\n */\n handleGuestBlur = (guestIndex: number, email: string) => {\n this.resetGuestEmailError(guestIndex);\n\n if (email === '') {\n this.guestEmailErrors[guestIndex] = i18next.t('fieldRequired', { field: i18next.t('email') });\n return;\n }\n if (!emailRegex.test(email)) {\n this.guestEmailErrors[guestIndex] = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n return;\n }\n this.handleGuestChange(guestIndex, email);\n };\n\n /**\n * Handle add guest button clicked.\n */\n addGuestButtonClickedHandler = e => {\n e.preventDefault();\n this.guestEmails = [...this.guestEmails, ''];\n };\n\n /**\n * Handle remove guest button clicked.\n */\n removeGuestButtonClickHandler = (e: Event, guestIndex: number) => {\n e.preventDefault();\n this.resetGuestEmailError(guestIndex);\n\n const guests = [...this.guestEmails];\n guests.splice(guestIndex, 1);\n this.guestEmails = [...guests];\n };\n\n /**\n * Handle back button clicked.\n */\n handleBackButtonClicked = e => {\n e.preventDefault();\n this.backButtonLoading = true;\n this.backButtonClicked.emit();\n };\n\n /**\n * Handle book button clicked.\n */\n bookButtonClickedHandler = async (e: Event) => {\n e.preventDefault();\n const formSubmittedEvent = this.bookingFormSubmitted.emit();\n if (formSubmittedEvent.defaultPrevented) {\n return;\n }\n\n debug('nylas-booking-form', 'bookButtonClickedHandler', this.bookingInfo);\n const name = this.name || this.bookingInfo?.primaryParticipant?.name;\n const email = this.email || this.bookingInfo?.primaryParticipant?.email;\n\n if (!name || name === '') {\n this.isNameValid = false;\n this.validationError.name = i18next.t('fieldRequired', { field: i18next.t('name') }) || 'Name is required';\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: 'Name is required',\n });\n return;\n }\n if (!email || email === '') {\n this.isEmailValid = false;\n this.validationError.email = i18next.t('fieldRequired', { field: i18next.t('email') }) || 'Email is required';\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: 'Email is required',\n });\n return;\n }\n if (!emailRegex.test(email)) {\n this.isEmailValid = false;\n this.validationError.email = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: i18next.t('invalidInputFormat', { field: i18next.t('email') }) || 'Invalid email',\n });\n return;\n }\n\n let guests: NylasSchedulerBookingParticipant[] = [];\n if (this.guestEmails.length > 0) {\n let hasError = false;\n this.guestEmails.forEach((email: string, i: number) => {\n if (email === '') {\n hasError = true;\n this.guestEmailErrors = { ...this.guestEmailErrors, [i]: i18next.t('fieldRequired', { field: i18next.t('email') }) };\n } else if (!emailRegex.test(email)) {\n hasError = true;\n this.guestEmailErrors = { ...this.guestEmailErrors, [i]: i18next.t('invalidInputFormat', { field: i18next.t('email') }) };\n }\n });\n if (hasError) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: i18next.t('invalidInputFormat', { field: i18next.t('guestEmail') }) || 'Invalid guest email',\n });\n return;\n }\n guests = this.guestEmails.map((email: string) => ({ name: email.trim(), email: email.trim() }));\n } else if (this.bookingInfo?.guests) {\n guests = this.bookingInfo?.guests;\n }\n\n const bookingInfoAdditionalFields = {};\n if (this.bookingInfo?.additionalFields) {\n const configAdditionalFields = this.configSettings?.scheduler?.additional_fields || {};\n Object.entries(this.bookingInfo.additionalFields).forEach(([key, obj]) => {\n if (key in configAdditionalFields) {\n bookingInfoAdditionalFields[key] = obj.value;\n }\n });\n }\n\n this.detailsConfirmed.emit({\n primaryParticipant: {\n name: name,\n email: email,\n },\n guests: guests,\n additionalFields: { ...bookingInfoAdditionalFields, ...this.additionalFields },\n });\n };\n\n updateAdditionalFields = (name: string, value: string) => {\n if (this.additionalFields) {\n this.additionalFields[name] = value;\n }\n };\n\n @Listen('nylasFormInputChanged')\n nylasFormInputChangedHandler(event: CustomEvent<{ value: string; name: string; error: string; label: string; type?: string }>) {\n switch (event.detail.name) {\n case 'name':\n this.changeName(event.detail.value);\n break;\n case 'email':\n this.changeEmail(event.detail.value);\n break;\n default:\n if (event.detail.error) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: event.detail.error,\n });\n return;\n }\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n break;\n }\n }\n\n @Listen('nylasFormDropdownChanged')\n selectOptionChangedHandler(event: CustomEvent<{ value: string; name: string; label: string; error?: string }>) {\n if (event.detail.error) {\n this.bookingFormError.emit({\n title: 'Booking form error',\n description: event.detail.error,\n });\n return;\n }\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n }\n\n @Listen('nylasFormSwitchToggled')\n switchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.checked ? 'true' : 'false');\n }\n\n @Listen('nylasFormCheckboxToggled')\n checkboxToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.checked ? 'true' : 'false');\n }\n\n @Listen('nylasFormRadioChanged')\n radioChangedHandler(event: CustomEvent<{ value: string; name: string; label: string; type: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n }\n\n @Listen('nylasFormDropdownDefaultSelected')\n dropdownDefaultSelectedHandler(event: CustomEvent<{ value: string; name: string; label: string; error?: string }>) {\n this.updateAdditionalFields(event.detail.name, event.detail.value);\n }\n\n @RegisterComponent<NylasBookingForm, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-booking-form',\n stateToProps: new Map([\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.bookingInfo', 'bookingInfo'],\n ['scheduler.eventInfo', 'eventInfo'],\n ['scheduler.configSettings', 'configSettings'],\n ]),\n eventToProps: {\n backButtonClicked: async (_event: CustomEvent<boolean>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.toggleAdditionalData(false);\n },\n nameChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.setParticipantName(event.detail);\n },\n emailChanged: async (event: CustomEvent<string>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n nylasSchedulerConnector.scheduler.setParticipantEmail(event.detail);\n },\n detailsConfirmed: async (event: CustomEvent<NylasSchedulerBookingDataWithFlatFields>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'detailsConfirmed', event.detail);\n },\n bookingFormSubmitted: async (event: CustomEvent<void>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'bookingFormSubmitted', event.detail);\n },\n bookingFormError: async (event: CustomEvent<Partial<Notification>>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-booking-form', 'bookingFormError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <form onSubmit={e => this.bookButtonClickedHandler(e)} noValidate>\n <div class=\"nylas-booking-form\" part=\"nbf\">\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={i18next.t('name')}\n name=\"name\"\n id=\"name\"\n defaultValue={this.bookingInfo?.primaryParticipant?.name || this.name}\n placeholder={i18next.t('namePlaceholder')}\n type=\"text\"\n required={true}\n requiredError={i18next.t('fieldRequired', { field: i18next.t('name') })}\n patternError={i18next.t('invalidInputFormat', { field: i18next.t('name') })}\n part=\"nbf__input-textfield\"\n />\n </div>\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={i18next.t('email')}\n name=\"email\"\n id=\"email\"\n pattern={emailRegex}\n defaultValue={this.bookingInfo?.primaryParticipant?.email || this.email}\n placeholder={i18next.t('emailPlaceholder')}\n type=\"email\"\n required={true}\n requiredError={i18next.t('fieldRequired', { field: i18next.t('email') })}\n patternError={i18next.t('invalidInputFormat', { field: i18next.t('email') })}\n part=\"nbf__input-textfield\"\n />\n </div>\n {this.configSettings?.scheduler?.hide_additional_guests !== true && (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n {this.guestEmails.map((email, index) => (\n <div class=\"input-wrapper button-wrapper\">\n <label\n class={{\n error: !!this.guestEmailErrors[index],\n }}\n >\n {i18next.t('guestEmail')}\n </label>\n <div class=\"guest-email-input\">\n <input\n type=\"email\"\n id={`guest-email-${index}`}\n maxLength={100}\n class={{\n 'guest-email': true,\n 'error': !!this.guestEmailErrors[index],\n }}\n placeholder={i18next.t('guestEmailPlaceholder')}\n value={email}\n data-index={index}\n part=\"nbf__input-textfield\"\n onBlur={(e: Event) => this.handleGuestBlur(index, (e.target as HTMLInputElement)?.value)}\n onInput={(e: Event) => this.handleGuestChange(index, (e.target as HTMLInputElement)?.value)}\n ></input>\n <button-component\n variant=\"basic\"\n tooltip=\"Remove guest\"\n onClick={(e: Event) => this.removeGuestButtonClickHandler(e, index)}\n class={{\n 'remove-guest': true,\n 'error': !!this.guestEmailErrors[index],\n }}\n >\n <close-icon />\n </button-component>\n </div>\n <p class=\"help-text\">{this.guestEmailErrors[index]}</p>\n </div>\n ))}\n <button-component class=\"add-guest\" variant=\"invisible\" part=\"nbf__button-ghost\" onClick={e => this.addGuestButtonClickedHandler(e)}>\n <div class=\"button-content\">\n <add-circle-icon slot=\"icon\"></add-circle-icon>\n {this.guestEmails.length > 0 ? `${i18next.t('addAnotherGuest')}` : `${i18next.t('addGuest')}`}\n </div>\n </button-component>\n </div>\n )}\n {Object.entries(\n (this.configSettings?.scheduler?.additional_fields || {}) as Record<\n string,\n {\n required: boolean;\n type: 'email' | 'text' | 'phone_number' | 'dropdown' | 'checkbox' | 'radio_button' | 'multi_line_text';\n order: number;\n options?: string[];\n label: string;\n }\n >,\n )\n ?.sort((a, b) => a[1].order - b[1].order)\n .map(x => {\n const field = x[1];\n const label = field.label;\n const key = x[0];\n const defaultValue = this.bookingInfo?.additionalFields?.[key]?.value || '';\n\n switch (field.type) {\n case 'dropdown':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <select-dropdown\n label={label}\n name={key}\n id={key}\n withSearch={false}\n defaultSelectedOption={defaultValue ? { value: defaultValue, label: defaultValue } : undefined}\n options={field.options?.map(option => ({ value: option, label: option }))}\n required={field.required}\n exportparts=\"sd_dropdown: nbf__dropdown, sd_dropdown-button: nbf__dropdown-button, sd_dropdown-content: nbf__dropdown-content\"\n />\n </div>\n );\n case 'checkbox':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <checkbox-component label={label} name={key} id={key} checked={defaultValue === 'true'} required={field.required} part=\"nbf__checkbox-component\" />\n </div>\n );\n case 'radio_button':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <radio-button-group\n label={label}\n name={key}\n id={key}\n defaultSelectedValue={defaultValue || field.options?.[0] || ''}\n options={field.options?.map(option => ({ value: option, label: option }))}\n required={field.required}\n part=\"nbf__radio-button-group\"\n />\n </div>\n );\n case 'multi_line_text':\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <textarea-component label={label} defaultValue={defaultValue} name={key} id={key} required={field.required} part=\"nbf__textarea-component\" />\n </div>\n );\n default:\n return (\n <div class=\"input-wrapper\" part=\"nbf__input-wrapper\">\n <input-component\n label={label}\n name={key}\n id={key}\n type={field.type}\n defaultValue={defaultValue || ''}\n requiredError={i18next.t('fieldRequired', { field: label })}\n required={field.required}\n part=\"nbf__input-textfield\"\n />\n </div>\n );\n }\n })}\n {/* <slot name=\"custom-booking-form\"></slot> */}\n </div>\n <div class=\"cta\">\n <button-component variant={'basic'} class=\"back\" part=\"nbf__button-outline\" isLoading={this.backButtonLoading && this.isLoading} onClick={this.handleBackButtonClicked}>\n <slot name=\"booking-form-back-label\">{`${i18next.t('backButton')}`}</slot>\n </button-component>\n <button-component variant={'primary'} isLoading={!this.backButtonLoading && this.isLoading} disabled={this.isLoading} part=\"nbf__button-primary\" type=\"submit\">\n <slot name=\"booking-form-book-label\">{`${i18next.t('bookNowButton')}`}</slot>\n </button-component>\n </div>\n </form>\n </Host>\n );\n }\n}\n"]}
|
package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.css
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
:host {
|
|
2
|
+
--nylas-primary: #2563eb;
|
|
3
|
+
--nylas-error: #cc4841;
|
|
4
|
+
--nylas-error-pressed: #992222;
|
|
5
|
+
--nylas-wraning: #f06c00;
|
|
6
|
+
--nylas-success: #16a392;
|
|
7
|
+
--nylas-info: #2b8fc2;
|
|
8
|
+
--nylas-base-0: #ffffff;
|
|
9
|
+
--nylas-base-25: #fcfcfd;
|
|
10
|
+
--nylas-base-50: #f8f9fc;
|
|
11
|
+
--nylas-base-100: #eaecf5;
|
|
12
|
+
--nylas-base-200: #d5d9eb;
|
|
13
|
+
--nylas-base-300: #b3b8d8;
|
|
14
|
+
--nylas-base-400: #717bbc;
|
|
15
|
+
--nylas-base-500: #4e5ba6;
|
|
16
|
+
--nylas-base-600: #3e4784;
|
|
17
|
+
--nylas-base-700: #263f72;
|
|
18
|
+
--nylas-base-800: #293056;
|
|
19
|
+
--nylas-base-900: #101323;
|
|
20
|
+
--nylas-base-950: #0e101b;
|
|
21
|
+
--nylas-border-radius: 0.25rem;
|
|
22
|
+
--nylas-border-radius-2x: 0.5rem;
|
|
23
|
+
--nylas-border-radius-3x: 0.75rem;
|
|
24
|
+
--nylas-font-family: "Inter", sans-serif;
|
|
2
25
|
display: block;
|
|
3
26
|
width: 400px;
|
|
4
27
|
font-family: var(--nylas-font-family);
|
package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js
CHANGED
|
@@ -56,9 +56,9 @@ export class NylasCancelBookingForm {
|
|
|
56
56
|
};
|
|
57
57
|
this.cancelBookingId = undefined;
|
|
58
58
|
this.rejectBookingId = undefined;
|
|
59
|
+
this.selectedTimeslot = undefined;
|
|
59
60
|
this.configSettings = undefined;
|
|
60
61
|
this.eventInfo = undefined;
|
|
61
|
-
this.selectedTimeslot = undefined;
|
|
62
62
|
this.isLoading = undefined;
|
|
63
63
|
this.cancellationReason = '';
|
|
64
64
|
this.cancellationError = '';
|
|
@@ -90,7 +90,7 @@ export class NylasCancelBookingForm {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
|
-
return (h(Host, { key: '
|
|
93
|
+
return (h(Host, { key: 'c4bdf11986a6efc5b9005e82583c3e0543c424b7', part: "ncbf" }, h("div", { key: 'be45863d677fc6f4e0e7a473367d4e668988a6e3', class: "nylas-cancel-booking-form", part: "ncbf__card" }, h("div", { key: 'acd1467de81bc7518ef026d18abaf2bec08ee9e7', class: "nylas-cancel-booking-form__calendar-icon", part: "ncbf__icon" }, h("calendar-cancel-icon", { key: '8622cec85da5c6767d4acd913d540ab5379d6a6b' })), h("h3", { key: 'b16e109071f7b3ce4bdeff18d75b395b6397ef66', class: "nylas-cancel-booking-form__title", part: "ncbf__title" }, i18next.t('cancelBookingTitle')), h("div", { key: '99a98fda2cf78631fbf217425e98f50053819944', class: "nylas-cancel-booking-form__description", part: "ncbf__description" }, !this.configSettings?.scheduler?.cancellation_policy ? `${i18next.t('cancelBookingMessage')}` : this.cancellationPolicy), h("form", { key: '4f139a76c233767562d69e6abbc8bed2fe7068a4', onSubmit: this.handleSubmitCancelBooking }, h("textarea-component", { key: 'cb9cb36cbc8054f0c99049230edd6867864b85eb', id: "cancel-reason", name: "cancel-reason", required: true, label: i18next.t('reasonForCancellation'), class: this.cancellationError ? 'error' : '', part: "ncbf__reason-textarea", defaultValue: this.cancellationReason }), h("div", { key: 'd10517e31cc74630c726db714b2ec2f732ebb595', class: "footer" }, h("button-component", { key: '4074187227af0cb6c35a530faef004edde580f34', variant: 'destructive', class: "cancel", type: "submit", part: "ncbf__button-cta", disabled: this.isLoading }, i18next.t('cancelBookingButton')), !!this.eventInfo && (h("button-component", { variant: 'basic', class: "back", part: "ncbf__button-outline", onClick: this.handleGoBackClicked }, i18next.t('goBackButton'))))))));
|
|
94
94
|
}
|
|
95
95
|
static get is() { return "nylas-cancel-booking-form"; }
|
|
96
96
|
static get encapsulation() { return "shadow"; }
|
|
@@ -140,6 +140,27 @@ export class NylasCancelBookingForm {
|
|
|
140
140
|
"attribute": "reject-booking-id",
|
|
141
141
|
"reflect": false
|
|
142
142
|
},
|
|
143
|
+
"selectedTimeslot": {
|
|
144
|
+
"type": "unknown",
|
|
145
|
+
"mutable": false,
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "Timeslot",
|
|
148
|
+
"resolved": "{ start_time: Date; end_time: Date; emails?: string[] | undefined; }",
|
|
149
|
+
"references": {
|
|
150
|
+
"Timeslot": {
|
|
151
|
+
"location": "import",
|
|
152
|
+
"path": "@nylas/core",
|
|
153
|
+
"id": "../nylas-js-core/dist/index.d.ts::Timeslot"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": true,
|
|
158
|
+
"optional": false,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": "The selected timeslot."
|
|
162
|
+
}
|
|
163
|
+
},
|
|
143
164
|
"configSettings": {
|
|
144
165
|
"type": "unknown",
|
|
145
166
|
"mutable": false,
|
|
@@ -157,8 +178,11 @@ export class NylasCancelBookingForm {
|
|
|
157
178
|
"required": false,
|
|
158
179
|
"optional": true,
|
|
159
180
|
"docs": {
|
|
160
|
-
"tags": [
|
|
161
|
-
|
|
181
|
+
"tags": [{
|
|
182
|
+
"name": "standalone",
|
|
183
|
+
"text": "The config settings."
|
|
184
|
+
}],
|
|
185
|
+
"text": ""
|
|
162
186
|
}
|
|
163
187
|
},
|
|
164
188
|
"eventInfo": {
|
|
@@ -178,29 +202,11 @@ export class NylasCancelBookingForm {
|
|
|
178
202
|
"required": false,
|
|
179
203
|
"optional": true,
|
|
180
204
|
"docs": {
|
|
181
|
-
"tags": [
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
"type": "unknown",
|
|
187
|
-
"mutable": false,
|
|
188
|
-
"complexType": {
|
|
189
|
-
"original": "Timeslot",
|
|
190
|
-
"resolved": "{ start_time: Date; end_time: Date; emails?: string[] | undefined; }",
|
|
191
|
-
"references": {
|
|
192
|
-
"Timeslot": {
|
|
193
|
-
"location": "import",
|
|
194
|
-
"path": "@nylas/core",
|
|
195
|
-
"id": "../nylas-js-core/dist/index.d.ts::Timeslot"
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
"required": true,
|
|
200
|
-
"optional": false,
|
|
201
|
-
"docs": {
|
|
202
|
-
"tags": [],
|
|
203
|
-
"text": "The selected timeslot."
|
|
205
|
+
"tags": [{
|
|
206
|
+
"name": "standalone",
|
|
207
|
+
"text": "The event info."
|
|
208
|
+
}],
|
|
209
|
+
"text": ""
|
|
204
210
|
}
|
|
205
211
|
},
|
|
206
212
|
"isLoading": {
|
|
@@ -214,8 +220,11 @@ export class NylasCancelBookingForm {
|
|
|
214
220
|
"required": false,
|
|
215
221
|
"optional": true,
|
|
216
222
|
"docs": {
|
|
217
|
-
"tags": [
|
|
218
|
-
|
|
223
|
+
"tags": [{
|
|
224
|
+
"name": "standalone",
|
|
225
|
+
"text": "The loading state."
|
|
226
|
+
}],
|
|
227
|
+
"text": ""
|
|
219
228
|
},
|
|
220
229
|
"attribute": "is-loading",
|
|
221
230
|
"reflect": false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-cancel-booking-form.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,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AAE;gBACxG,KAAK,CAAC,2BAA2B,EAAE,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;gBACxE,uBAAuB,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;YAC7C,CAAC;YACD,sBAAsB,EAAE,KAAK,EAAE,KAA+C,EAAE,wBAAiD,EAAE,EAAE;gBACnI,KAAK,CAAC,2BAA2B,EAAE,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAC7E,CAAC;YACD,sBAAsB,EAAE,KAAK,EAAE,KAAyC,EAAE,wBAAiD,EAAE,EAAE;gBAC7H,KAAK,CAAC,2BAA2B,EAAE,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAC7E,CAAC;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;oDAsCD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { Component, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\nimport { NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { Notification, NylasSchedulerErrorResponse, Timeslot } from '@nylas/core';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { NylasEvent } from '@/common/types';\n\n/**\n * The `nylas-cancel-booking-form` component is a UI component that allows users to cancel a booking (DELETE request).\n * This component is also used to reject a booking (PUT request) by the organizer, if the prop `rejectBookingId` is provided.\n *\n * @part ncbf - The cancel booking form container.\n * @part ncbf__icon - The calendar icon.\n * @part ncbf__title - The title of the cancel booking form.\n * @part ncbf__description - The description of the cancel booking form.\n * @part ncbf__reason-textarea - The reason textarea.\n * @part ncbf__button-cta - The cancel booking form CTA button.\n * @part ncbf__button-outline - The cancel booking form outline button.\n * @part ncbf__card - The cancel booking form card.\n */\n@Component({\n tag: 'nylas-cancel-booking-form',\n styleUrl: 'nylas-cancel-booking-form.scss',\n shadow: true,\n})\nexport class NylasCancelBookingForm {\n /**\n * The booking ID to cancel.\n */\n @Prop() readonly cancelBookingId?: string;\n\n /**\n * The booking ID to reject.\n */\n @Prop() readonly rejectBookingId?: string;\n\n /**\n * The config settings.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * The event info.\n */\n @Prop() readonly eventInfo?: NylasEvent;\n\n /**\n * The selected timeslot.\n */\n @Prop() readonly selectedTimeslot!: Timeslot;\n\n /**\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * This event is fired when the Go back button is clicked on the cancel booking form.\n */\n @Event() readonly goBackButtonClicked!: EventEmitter<void>;\n\n /**\n * This event is fired when the cancel booking form is submitted.\n */\n @Event() readonly cancelBookingFormSubmitted!: EventEmitter<{\n bookingId: string;\n action: 'reject' | 'cancel';\n reason: string;\n errorHandler?: (error: NylasSchedulerErrorResponse) => void;\n }>;\n\n /**\n * This event is only for triggering the validation on the text area for cancellation reason. This is for internal purposes only.\n */\n @Event() readonly triggerValidation!: EventEmitter<{}>;\n /**\n * This event is fired when an error occurs while cancelling the booking.\n */\n @Event() readonly cancelBookedEventError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n /**\n * This event is fired when an error occurs in the booking form.\n */\n @Event() cancelBookingFormError!: EventEmitter<Partial<Notification>>;\n\n /**\n * The reason for cancellation.\n */\n @State() cancellationReason: string = '';\n\n @State() cancellationError: string = '';\n\n @State() cancellationPolicy: string = this.configSettings?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n\n @Watch('configSettings')\n configSettingsChangedHandler(newValue: ConfigSettings) {\n this.cancellationPolicy = newValue?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n }\n\n connectedCallback() {\n debug(`[nylas-cancel-booking-form] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-cancel-booking-form] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-cancel-booking-form] Component did load`);\n if (!this.cancelBookingId) {\n console.warn(`[nylas-cancel-booking-form] No booking ID provided, \"cancelBookingId\" prop is required.`);\n }\n }\n\n disconnectedCallback() {\n debug(`[nylas-cancel-booking-form] Component disconnected`);\n }\n\n private handleGoBackClicked = () => {\n this.goBackButtonClicked.emit();\n };\n\n private handleSubmitCancelBooking = (event: Event) => {\n this.triggerValidation.emit({});\n event.preventDefault();\n if (!this.cancellationReason) {\n this.cancellationError = i18next.t('cancellationErrorMessage');\n this.cancelBookingFormError.emit({ title: i18next.t('cancelBokingFormError'), description: i18next.t('cancellationErrorMessage') });\n return;\n }\n\n const minCancellationNotice = this.configSettings?.scheduler?.min_cancellation_notice;\n if (this.selectedTimeslot && minCancellationNotice) {\n const startTime = new Date(this.selectedTimeslot?.start_time);\n const dateTillCancellation = startTime.getTime() - minCancellationNotice * 60 * 1000;\n\n if (dateTillCancellation < new Date().getTime()) {\n this.cancelBookedEventError.emit({\n error: {\n title: i18next.t('cancellationErrorTitle'),\n message: i18next.t('minimumCancellationNoticeErrorMessage', { minCancellationNotice }),\n },\n });\n return;\n }\n }\n\n debug(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.cancelBookedEventError.emit(error);\n };\n if (this.cancelBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, action: 'cancel', reason: this.cancellationReason, errorHandler });\n } else if (this.rejectBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.rejectBookingId, action: 'reject', reason: this.cancellationReason, errorHandler });\n }\n };\n\n @Listen('nylasFormInputChanged')\n handleNylasFormInputChanged(event: CustomEvent<{ value: string; name: string; error: string; label: string; type: string }>) {\n this.triggerValidation.emit({});\n if (event.detail.name === 'cancel-reason') {\n this.cancellationReason = event.detail.value;\n this.cancellationError = event.detail.error;\n }\n }\n\n @RegisterComponent<NylasCancelBookingForm, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-cancel-booking-form',\n stateToProps: new Map([\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.eventInfo', 'eventInfo'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.cancelBookingId', 'cancelBookingId'],\n ['scheduler.rejectBookingId', 'rejectBookingId'],\n ]),\n eventToProps: {\n cancelBookingFormSubmitted: async (\n event: CustomEvent<{ bookingId: string; action: 'reject' | 'cancel'; reason: string; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n const { action, errorHandler } = event.detail;\n if (action === 'cancel') {\n const result = await nylasSchedulerConnector.scheduler.cancelBooking(event.detail.bookingId, event.detail.reason);\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n } else if (action === 'reject') {\n const result = await nylasSchedulerConnector.scheduler.updateBooking({\n bookingId: event.detail.bookingId,\n status: 'cancelled',\n reason: event.detail.reason,\n });\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n }\n },\n goBackButtonClicked: async (event: CustomEvent<void>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'goBackButtonClicked', event.detail);\n nylasSchedulerConnector.scheduler.goBack();\n },\n cancelBookedEventError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookedEventError', event.detail);\n },\n cancelBookingFormError: async (event: CustomEvent<Partial<Notification>>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookingFormError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncbf\">\n <div class=\"nylas-cancel-booking-form\" part=\"ncbf__card\">\n <div class=\"nylas-cancel-booking-form__calendar-icon\" part=\"ncbf__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-cancel-booking-form__title\" part=\"ncbf__title\">\n {i18next.t('cancelBookingTitle')}\n </h3>\n <div class=\"nylas-cancel-booking-form__description\" part=\"ncbf__description\">\n {!this.configSettings?.scheduler?.cancellation_policy ? `${i18next.t('cancelBookingMessage')}` : this.cancellationPolicy}\n </div>\n <form onSubmit={this.handleSubmitCancelBooking}>\n <textarea-component\n id=\"cancel-reason\"\n name=\"cancel-reason\"\n required={true}\n label={i18next.t('reasonForCancellation')}\n class={this.cancellationError ? 'error' : ''}\n part=\"ncbf__reason-textarea\"\n defaultValue={this.cancellationReason}\n ></textarea-component>\n <div class=\"footer\">\n <button-component variant={'destructive'} class=\"cancel\" type=\"submit\" part=\"ncbf__button-cta\" disabled={this.isLoading}>\n {i18next.t('cancelBookingButton')}\n </button-component>\n {!!this.eventInfo && (\n <button-component variant={'basic'} class=\"back\" part=\"ncbf__button-outline\" onClick={this.handleGoBackClicked}>\n {i18next.t('goBackButton')}\n </button-component>\n )}\n </div>\n </form>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nylas-cancel-booking-form.js","sourceRoot":"","sources":["../../../../src/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGpG,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,OAAO,OAAO,MAAM,cAAc,CAAC;AAqBnC,MAAM,OAAO,sBAAsB;;QAgGzB,wBAAmB,GAAG,GAAG,EAAE;YACjC,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC;QAClC,CAAC,CAAC;QAEM,8BAAyB,GAAG,CAAC,KAAY,EAAE,EAAE;YACnD,IAAI,CAAC,iBAAiB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C;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;oDAsCD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { Component, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from '@stencil/core';\nimport { NylasSchedulerConnector } from '../../..';\nimport { NylasScheduling } from '../nylas-scheduling/nylas-scheduling';\nimport { debug } from '@/utils/utils';\nimport { Notification, NylasSchedulerErrorResponse, Timeslot } from '@nylas/core';\nimport { ConfigSettings } from '@/stores/scheduler-store';\nimport i18next from '@/utils/i18n';\nimport { NylasEvent } from '@/common/types';\n\n/**\n * The `nylas-cancel-booking-form` component is a UI component that allows users to cancel a booking (DELETE request).\n * This component is also used to reject a booking (PUT request) by the organizer, if the prop `rejectBookingId` is provided.\n *\n * @part ncbf - The cancel booking form container.\n * @part ncbf__icon - The calendar icon.\n * @part ncbf__title - The title of the cancel booking form.\n * @part ncbf__description - The description of the cancel booking form.\n * @part ncbf__reason-textarea - The reason textarea.\n * @part ncbf__button-cta - The cancel booking form CTA button.\n * @part ncbf__button-outline - The cancel booking form outline button.\n * @part ncbf__card - The cancel booking form card.\n */\n@Component({\n tag: 'nylas-cancel-booking-form',\n styleUrl: 'nylas-cancel-booking-form.scss',\n shadow: true,\n})\nexport class NylasCancelBookingForm {\n /**\n * The booking ID to cancel.\n */\n @Prop() readonly cancelBookingId?: string;\n\n /**\n * The booking ID to reject.\n */\n @Prop() readonly rejectBookingId?: string;\n\n /**\n * The selected timeslot.\n */\n @Prop() readonly selectedTimeslot!: Timeslot;\n\n /**\n * @standalone\n * The config settings.\n */\n @Prop() readonly configSettings?: ConfigSettings;\n\n /**\n * @standalone\n * The event info.\n */\n @Prop() readonly eventInfo?: NylasEvent;\n\n /**\n * @standalone\n * The loading state.\n */\n @Prop() readonly isLoading?: boolean;\n\n /**\n * This event is fired when the Go back button is clicked on the cancel booking form.\n */\n @Event() readonly goBackButtonClicked!: EventEmitter<void>;\n\n /**\n * This event is fired when the cancel booking form is submitted.\n */\n @Event() readonly cancelBookingFormSubmitted!: EventEmitter<{\n bookingId: string;\n action: 'reject' | 'cancel';\n reason: string;\n errorHandler?: (error: NylasSchedulerErrorResponse) => void;\n }>;\n\n /**\n * This event is only for triggering the validation on the text area for cancellation reason. This is for internal purposes only.\n */\n @Event() readonly triggerValidation!: EventEmitter<{}>;\n /**\n * This event is fired when an error occurs while cancelling the booking.\n */\n @Event() readonly cancelBookedEventError!: EventEmitter<NylasSchedulerErrorResponse>;\n\n /**\n * This event is fired when an error occurs in the booking form.\n */\n @Event() cancelBookingFormError!: EventEmitter<Partial<Notification>>;\n\n /**\n * The reason for cancellation.\n */\n @State() cancellationReason: string = '';\n\n @State() cancellationError: string = '';\n\n @State() cancellationPolicy: string = this.configSettings?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n\n @Watch('configSettings')\n configSettingsChangedHandler(newValue: ConfigSettings) {\n this.cancellationPolicy = newValue?.scheduler?.cancellation_policy || 'Your current timeslot will become available to others.';\n }\n\n connectedCallback() {\n debug(`[nylas-cancel-booking-form] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-cancel-booking-form] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-cancel-booking-form] Component did load`);\n if (!this.cancelBookingId) {\n console.warn(`[nylas-cancel-booking-form] No booking ID provided, \"cancelBookingId\" prop is required.`);\n }\n }\n\n disconnectedCallback() {\n debug(`[nylas-cancel-booking-form] Component disconnected`);\n }\n\n private handleGoBackClicked = () => {\n this.goBackButtonClicked.emit();\n };\n\n private handleSubmitCancelBooking = (event: Event) => {\n this.triggerValidation.emit({});\n event.preventDefault();\n if (!this.cancellationReason) {\n this.cancellationError = i18next.t('cancellationErrorMessage');\n this.cancelBookingFormError.emit({ title: i18next.t('cancelBokingFormError'), description: i18next.t('cancellationErrorMessage') });\n return;\n }\n\n const minCancellationNotice = this.configSettings?.scheduler?.min_cancellation_notice;\n if (this.selectedTimeslot && minCancellationNotice) {\n const startTime = new Date(this.selectedTimeslot?.start_time);\n const dateTillCancellation = startTime.getTime() - minCancellationNotice * 60 * 1000;\n\n if (dateTillCancellation < new Date().getTime()) {\n this.cancelBookedEventError.emit({\n error: {\n title: i18next.t('cancellationErrorTitle'),\n message: i18next.t('minimumCancellationNoticeErrorMessage', { minCancellationNotice }),\n },\n });\n return;\n }\n }\n\n debug(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);\n const errorHandler = (error: NylasSchedulerErrorResponse) => {\n this.cancelBookedEventError.emit(error);\n };\n if (this.cancelBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, action: 'cancel', reason: this.cancellationReason, errorHandler });\n } else if (this.rejectBookingId) {\n this.cancelBookingFormSubmitted.emit({ bookingId: this.rejectBookingId, action: 'reject', reason: this.cancellationReason, errorHandler });\n }\n };\n\n @Listen('nylasFormInputChanged')\n handleNylasFormInputChanged(event: CustomEvent<{ value: string; name: string; error: string; label: string; type: string }>) {\n this.triggerValidation.emit({});\n if (event.detail.name === 'cancel-reason') {\n this.cancellationReason = event.detail.value;\n this.cancellationError = event.detail.error;\n }\n }\n\n @RegisterComponent<NylasCancelBookingForm, NylasSchedulerConnector, Exclude<NylasScheduling['stores'], undefined>>({\n name: 'nylas-cancel-booking-form',\n stateToProps: new Map([\n ['scheduler.configSettings', 'configSettings'],\n ['scheduler.selectedTimeslot', 'selectedTimeslot'],\n ['scheduler.eventInfo', 'eventInfo'],\n ['scheduler.isLoading', 'isLoading'],\n ['scheduler.cancelBookingId', 'cancelBookingId'],\n ['scheduler.rejectBookingId', 'rejectBookingId'],\n ]),\n eventToProps: {\n cancelBookingFormSubmitted: async (\n event: CustomEvent<{ bookingId: string; action: 'reject' | 'cancel'; reason: string; errorHandler?: (error: NylasSchedulerErrorResponse) => void }>,\n nylasSchedulerConnector: NylasSchedulerConnector,\n ) => {\n const { action, errorHandler } = event.detail;\n if (action === 'cancel') {\n const result = await nylasSchedulerConnector.scheduler.cancelBooking(event.detail.bookingId, event.detail.reason);\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n } else if (action === 'reject') {\n const result = await nylasSchedulerConnector.scheduler.updateBooking({\n bookingId: event.detail.bookingId,\n status: 'cancelled',\n reason: event.detail.reason,\n });\n if (errorHandler && (!result || 'error' in result)) {\n errorHandler(result);\n }\n }\n },\n goBackButtonClicked: async (event: CustomEvent<void>, nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'goBackButtonClicked', event.detail);\n nylasSchedulerConnector.scheduler.goBack();\n },\n cancelBookedEventError: async (event: CustomEvent<NylasSchedulerErrorResponse>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookedEventError', event.detail);\n },\n cancelBookingFormError: async (event: CustomEvent<Partial<Notification>>, _nylasSchedulerConnector: NylasSchedulerConnector) => {\n debug('nylas-cancel-booking-form', 'cancelBookingFormError', event.detail);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"ncbf\">\n <div class=\"nylas-cancel-booking-form\" part=\"ncbf__card\">\n <div class=\"nylas-cancel-booking-form__calendar-icon\" part=\"ncbf__icon\">\n <calendar-cancel-icon />\n </div>\n <h3 class=\"nylas-cancel-booking-form__title\" part=\"ncbf__title\">\n {i18next.t('cancelBookingTitle')}\n </h3>\n <div class=\"nylas-cancel-booking-form__description\" part=\"ncbf__description\">\n {!this.configSettings?.scheduler?.cancellation_policy ? `${i18next.t('cancelBookingMessage')}` : this.cancellationPolicy}\n </div>\n <form onSubmit={this.handleSubmitCancelBooking}>\n <textarea-component\n id=\"cancel-reason\"\n name=\"cancel-reason\"\n required={true}\n label={i18next.t('reasonForCancellation')}\n class={this.cancellationError ? 'error' : ''}\n part=\"ncbf__reason-textarea\"\n defaultValue={this.cancellationReason}\n ></textarea-component>\n <div class=\"footer\">\n <button-component variant={'destructive'} class=\"cancel\" type=\"submit\" part=\"ncbf__button-cta\" disabled={this.isLoading}>\n {i18next.t('cancelBookingButton')}\n </button-component>\n {!!this.eventInfo && (\n <button-component variant={'basic'} class=\"back\" part=\"ncbf__button-outline\" onClick={this.handleGoBackClicked}>\n {i18next.t('goBackButton')}\n </button-component>\n )}\n </div>\n </form>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
|
+
--nylas-primary: #2563eb;
|
|
4
|
+
--nylas-error: #cc4841;
|
|
5
|
+
--nylas-error-pressed: #992222;
|
|
6
|
+
--nylas-wraning: #f06c00;
|
|
7
|
+
--nylas-success: #16a392;
|
|
8
|
+
--nylas-info: #2b8fc2;
|
|
9
|
+
--nylas-base-0: #ffffff;
|
|
10
|
+
--nylas-base-25: #fcfcfd;
|
|
11
|
+
--nylas-base-50: #f8f9fc;
|
|
12
|
+
--nylas-base-100: #eaecf5;
|
|
13
|
+
--nylas-base-200: #d5d9eb;
|
|
14
|
+
--nylas-base-300: #b3b8d8;
|
|
15
|
+
--nylas-base-400: #717bbc;
|
|
16
|
+
--nylas-base-500: #4e5ba6;
|
|
17
|
+
--nylas-base-600: #3e4784;
|
|
18
|
+
--nylas-base-700: #263f72;
|
|
19
|
+
--nylas-base-800: #293056;
|
|
20
|
+
--nylas-base-900: #101323;
|
|
21
|
+
--nylas-base-950: #0e101b;
|
|
22
|
+
--nylas-border-radius: 0.25rem;
|
|
23
|
+
--nylas-border-radius-2x: 0.5rem;
|
|
24
|
+
--nylas-border-radius-3x: 0.75rem;
|
|
25
|
+
--nylas-font-family: "Inter", sans-serif;
|
|
3
26
|
}
|
|
4
27
|
|
|
5
28
|
.nylas-cancelled-event-card {
|