@nylas/web-elements 1.1.0-canary.19.c → 1.1.0-canary.19.e
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/cjs/add-circle-icon_2.cjs.entry.js +1 -1
- package/dist/cjs/archive-icon_7.cjs.entry.js +7 -7
- package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon_3.cjs.entry.js +3 -3
- package/dist/cjs/button-component_4.cjs.entry.js +203 -0
- package/dist/cjs/button-component_4.cjs.entry.js.map +1 -0
- package/dist/cjs/calendar-agenda-fill-icon_35.cjs.entry.js +6943 -0
- package/dist/cjs/calendar-agenda-fill-icon_35.cjs.entry.js.map +1 -0
- package/dist/cjs/chevron-icon_3.cjs.entry.js +11 -3
- package/dist/cjs/chevron-icon_3.cjs.entry.js.map +1 -1
- package/dist/cjs/clock-icon_2.cjs.entry.js +1 -1
- package/dist/cjs/{constants-3e962931.js → constants-7cc75333.js} +106 -1
- package/dist/cjs/{constants-3e962931.js.map → constants-7cc75333.js.map} +1 -1
- package/dist/cjs/copy-icon_4.cjs.entry.js +72 -0
- package/dist/cjs/copy-icon_4.cjs.entry.js.map +1 -0
- package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-icon_6.cjs.entry.js +7 -7
- package/dist/cjs/globe-icon.cjs.entry.js +1 -1
- package/dist/cjs/google-logo-icon_4.cjs.entry.js +192 -51
- package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -1
- package/dist/cjs/index-7af03e3f.js +20 -16
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/input-dropdown_2.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-icon.cjs.entry.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +144 -0
- package/dist/cjs/multi-select-dropdown.cjs.entry.js.map +1 -0
- package/dist/cjs/{nylas-api-request-a1751a40.js → nylas-api-request-393b08a0.js} +2 -1
- package/dist/cjs/nylas-api-request-393b08a0.js.map +1 -0
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +66 -35
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +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-list-folders.cjs.entry.js +1 -1
- package/dist/cjs/nylas-list-threads.cjs.entry.js +1 -1
- package/dist/cjs/nylas-login.cjs.entry.js +1 -1
- package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +1 -1
- package/dist/cjs/nylas-mailbox.cjs.entry.js +1 -1
- package/dist/cjs/nylas-provider.cjs.entry.js +3 -3
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +26 -9
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +3 -3
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-threads-refresh.cjs.entry.js +2 -2
- package/dist/cjs/nylas-threads-search.cjs.entry.js +1 -1
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js +1 -1
- package/dist/cjs/nylas-view-thread.cjs.entry.js +1 -1
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/play-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/{scheduler-config-store-9f19c7a9.js → scheduler-config-store-5bfc8cb8.js} +3 -1
- package/dist/cjs/scheduler-config-store-5bfc8cb8.js.map +1 -0
- package/dist/cjs/{scheduler-store-0f7328f1.js → scheduler-store-b5cf2e82.js} +43 -7
- package/dist/cjs/scheduler-store-b5cf2e82.js.map +1 -0
- package/dist/cjs/textarea-component.cjs.entry.js +3 -1
- package/dist/cjs/textarea-component.cjs.entry.js.map +1 -1
- package/dist/cjs/translate-icon.cjs.entry.js +1 -1
- package/dist/cjs/warning-icon.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +14 -0
- package/dist/collection/common/constants.js +102 -0
- package/dist/collection/common/constants.js.map +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 +63 -0
- package/dist/collection/common/icons/calendar-agenda-fill.js.map +1 -0
- package/dist/collection/common/icons/calendar-agenda.js +63 -0
- package/dist/collection/common/icons/calendar-agenda.js.map +1 -0
- package/dist/collection/common/icons/copy.js +63 -0
- package/dist/collection/common/icons/copy.js.map +1 -0
- package/dist/collection/common/icons/delete.js +63 -0
- package/dist/collection/common/icons/delete.js.map +1 -0
- package/dist/collection/common/icons/document-refresh.js +1 -1
- package/dist/collection/common/icons/dragable.js +63 -0
- package/dist/collection/common/icons/dragable.js.map +1 -0
- package/dist/collection/common/icons/edit.js +63 -0
- package/dist/collection/common/icons/edit.js.map +1 -0
- package/dist/collection/common/icons/eye.js +63 -0
- package/dist/collection/common/icons/eye.js.map +1 -0
- 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 +63 -0
- package/dist/collection/common/icons/google-meet.js.map +1 -0
- 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 +63 -0
- package/dist/collection/common/icons/microsof-teams.js.map +1 -0
- 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/people.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 +63 -0
- package/dist/collection/common/icons/plus.js.map +1 -0
- 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.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 +63 -0
- package/dist/collection/common/icons/zoom.js.map +1 -0
- package/dist/collection/common/nylas-api-request.js +1 -0
- package/dist/collection/common/nylas-api-request.js.map +1 -1
- package/dist/collection/common/types.js.map +1 -1
- package/dist/collection/components/design-system/button-component/button-component.css +4 -0
- package/dist/collection/components/design-system/button-component/button-component.js +1 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.css +15 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +46 -6
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.js.map +1 -1
- package/dist/collection/components/design-system/input-component/input-component.css +9 -1
- package/dist/collection/components/design-system/input-component/input-component.js +20 -8
- package/dist/collection/components/design-system/input-component/input-component.js.map +1 -1
- package/dist/collection/components/design-system/input-dropdown/input-dropdown.js +1 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.css +8 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +21 -2
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js.map +1 -1
- package/dist/collection/components/design-system/radio-button-group/radio-button-group.css +57 -1
- package/dist/collection/components/design-system/radio-button-group/radio-button-group.js +69 -10
- package/dist/collection/components/design-system/radio-button-group/radio-button-group.js.map +1 -1
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +45 -2
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js.map +1 -1
- package/dist/collection/components/design-system/textarea-component/textarea-component.js +23 -3
- package/dist/collection/components/design-system/textarea-component/textarea-component.js.map +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.css +1 -1
- package/dist/collection/components/design-system/toggle-switch/toggle-switch.js +5 -5
- package/dist/collection/components/design-system/toggle-switch/toggle-switch.js.map +1 -1
- package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +1 -1
- package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +1 -1
- package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +1 -1
- package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +1 -1
- package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +1 -1
- package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +1 -1
- package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +2 -2
- package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +2 -2
- package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +1 -1
- package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +1 -1
- package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.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.js +23 -4
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-booked-event-card/test/nylas-booked-event-card.spec.js +1 -0
- package/dist/collection/components/scheduler/nylas-booked-event-card/test/nylas-booked-event-card.spec.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +37 -21
- 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.js +42 -3
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/test/nylas-cancel-booking-form.spec.js +11 -0
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/test/nylas-cancel-booking-form.spec.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +2 -2
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +1 -1
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.css +4 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +3 -3
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +1 -1
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +2 -2
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +8 -7
- 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.css +16 -2
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +31 -12
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.css +3 -0
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +2 -2
- 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.css +3 -0
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +22 -6
- 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-form-config/nylas-booking-form-config.css +233 -0
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +388 -0
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.css +3 -20
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js +19 -9
- 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.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.css +105 -0
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js +298 -0
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js +5 -5
- 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.css +3 -0
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +106 -20
- 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 +7 -7
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +161 -11
- 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 +1 -1
- 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 +1 -1
- 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.css +79 -3
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +125 -22
- 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 +1 -1
- 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 +1 -1
- 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-participant-booking-calendars/nylas-participant-booking-calendars.css +105 -0
- package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js +324 -0
- package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +39 -5
- 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-scheduler-editor/ExpressFlow.js +4 -3
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +59 -9
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.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 +16 -16
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler-config.js +4 -2
- package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +41 -6
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/stores/scheduler-config-store.js +2 -0
- package/dist/collection/stores/scheduler-config-store.js.map +1 -1
- package/dist/collection/stores/scheduler-store.js +1 -0
- package/dist/collection/stores/scheduler-store.js.map +1 -1
- package/dist/collection/types/index.js.map +1 -1
- package/dist/components/add-circle.js +1 -1
- package/dist/components/archive.js +1 -1
- package/dist/components/arrow.js +1 -1
- package/dist/components/bold.js +1 -1
- package/dist/components/button-component2.js +2 -2
- package/dist/components/button-component2.js.map +1 -1
- package/dist/components/calendar-agenda-fill-icon.d.ts +11 -0
- package/dist/components/calendar-agenda-fill-icon.js +8 -0
- package/dist/components/calendar-agenda-fill-icon.js.map +1 -0
- package/dist/components/calendar-agenda-fill.js +37 -0
- package/dist/components/calendar-agenda-fill.js.map +1 -0
- package/dist/components/calendar-agenda-icon.d.ts +11 -0
- package/dist/components/calendar-agenda-icon.js +8 -0
- package/dist/components/calendar-agenda-icon.js.map +1 -0
- package/dist/components/calendar-agenda.js +37 -0
- package/dist/components/calendar-agenda.js.map +1 -0
- package/dist/components/checkbox-component2.js +18 -4
- package/dist/components/checkbox-component2.js.map +1 -1
- package/dist/components/constants.js +102 -1
- package/dist/components/constants.js.map +1 -1
- package/dist/components/copy-icon.d.ts +11 -0
- package/dist/components/copy-icon.js +8 -0
- package/dist/components/copy-icon.js.map +1 -0
- package/dist/components/copy.js +37 -0
- package/dist/components/copy.js.map +1 -0
- package/dist/components/delete-icon.d.ts +11 -0
- package/dist/components/delete-icon.js +8 -0
- package/dist/components/delete-icon.js.map +1 -0
- package/dist/components/delete.js +37 -0
- package/dist/components/delete.js.map +1 -0
- package/dist/components/document-refresh-icon.js +1 -1
- package/dist/components/dragable-icon.d.ts +11 -0
- package/dist/components/dragable-icon.js +8 -0
- package/dist/components/dragable-icon.js.map +1 -0
- package/dist/components/dragable.js +37 -0
- package/dist/components/dragable.js.map +1 -0
- package/dist/components/edit-icon.d.ts +11 -0
- package/dist/components/edit-icon.js +8 -0
- package/dist/components/edit-icon.js.map +1 -0
- package/dist/components/edit.js +37 -0
- package/dist/components/edit.js.map +1 -0
- package/dist/components/eye-icon.d.ts +11 -0
- package/dist/components/eye-icon.js +8 -0
- package/dist/components/eye-icon.js.map +1 -0
- package/dist/components/eye.js +37 -0
- package/dist/components/eye.js.map +1 -0
- package/dist/components/flow.js +1 -1
- package/dist/components/folder.js +1 -1
- package/dist/components/forward.js +1 -1
- package/dist/components/globe.js +1 -1
- package/dist/components/google-logo.js +1 -1
- package/dist/components/google-meet-icon.d.ts +11 -0
- package/dist/components/google-meet-icon.js +8 -0
- package/dist/components/google-meet-icon.js.map +1 -0
- package/dist/components/google-meet.js +37 -0
- package/dist/components/google-meet.js.map +1 -0
- package/dist/components/inbox.js +1 -1
- package/dist/components/info.js +1 -1
- package/dist/components/input-component2.js +17 -6
- package/dist/components/input-component2.js.map +1 -1
- package/dist/components/input-dropdown2.js +1 -1
- package/dist/components/italic.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 +37 -0
- package/dist/components/microsof-teams.js.map +1 -0
- package/dist/components/microsoft-logo.js +1 -1
- package/dist/components/microsoft-teams-icon.d.ts +11 -0
- package/dist/components/microsoft-teams-icon.js +8 -0
- package/dist/components/microsoft-teams-icon.js.map +1 -0
- package/dist/components/multi-select-dropdown2.js +5 -3
- package/dist/components/multi-select-dropdown2.js.map +1 -1
- package/dist/components/nylas-additional-participants2.js +26 -8
- package/dist/components/nylas-additional-participants2.js.map +1 -1
- package/dist/components/nylas-api-request.js +1 -0
- package/dist/components/nylas-api-request.js.map +1 -1
- package/dist/components/nylas-availability-picker2.js +2 -2
- package/dist/components/nylas-availability-picker2.js.map +1 -1
- package/dist/components/nylas-booked-event-card2.js +7 -4
- package/dist/components/nylas-booked-event-card2.js.map +1 -1
- package/dist/components/nylas-booking-calendar-picker2.js +5 -6
- package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-booking-form-config.d.ts +11 -0
- package/dist/components/nylas-booking-form-config.js +8 -0
- package/dist/components/nylas-booking-form-config.js.map +1 -0
- package/dist/components/nylas-booking-form-config2.js +3691 -0
- package/dist/components/nylas-booking-form-config2.js.map +1 -0
- package/dist/components/nylas-booking-form2.js +78 -32
- package/dist/components/nylas-booking-form2.js.map +1 -1
- package/dist/components/nylas-calendar-picker2.js +27 -23
- package/dist/components/nylas-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-cancel-booking-form2.js +21 -2
- package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
- package/dist/components/nylas-cancellation-policy2.js +1 -1
- package/dist/components/nylas-cancelled-event-card2.js +1 -1
- package/dist/components/nylas-composer2.js +1 -1
- package/dist/components/nylas-connected-calendars.d.ts +11 -0
- package/dist/components/nylas-connected-calendars.js +8 -0
- package/dist/components/nylas-connected-calendars.js.map +1 -0
- package/dist/components/nylas-connected-calendars2.js +232 -0
- package/dist/components/nylas-connected-calendars2.js.map +1 -0
- package/dist/components/nylas-custom-booking-flow.js +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-editor-tabs2.js +251 -113
- package/dist/components/nylas-editor-tabs2.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-limits2.js.map +1 -1
- package/dist/components/nylas-event-location2.js +138 -25
- package/dist/components/nylas-event-location2.js.map +1 -1
- package/dist/components/nylas-event-title2.js +1 -1
- package/dist/components/nylas-event-title2.js.map +1 -1
- 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 +142 -25
- package/dist/components/nylas-list-configurations2.js.map +1 -1
- package/dist/components/nylas-list-folders.js +1 -1
- package/dist/components/nylas-list-threads.js +1 -1
- package/dist/components/nylas-login.js +1 -1
- package/dist/components/nylas-logo2.js +1 -1
- package/dist/components/nylas-mailbox-toolbar-button.js +1 -1
- package/dist/components/nylas-mailbox.js +1 -1
- package/dist/components/nylas-min-booking-notice2.js +1 -1
- package/dist/components/nylas-min-booking-notice2.js.map +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
- package/dist/components/nylas-notification2.js +1 -1
- package/dist/components/nylas-participant-booking-calendars.d.ts +11 -0
- package/dist/components/nylas-participant-booking-calendars.js +8 -0
- package/dist/components/nylas-participant-booking-calendars.js.map +1 -0
- package/dist/components/nylas-participant-booking-calendars2.js +237 -0
- package/dist/components/nylas-participant-booking-calendars2.js.map +1 -0
- package/dist/components/nylas-participants-custom-availability2.js +18 -5
- package/dist/components/nylas-participants-custom-availability2.js.map +1 -1
- package/dist/components/nylas-provider.js +1 -1
- package/dist/components/nylas-scheduler-editor.js +210 -101
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js +70 -52
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-summarize-message-button2.js +2 -2
- package/dist/components/nylas-threads-refresh.js +2 -2
- package/dist/components/nylas-threads-search.js +1 -1
- package/dist/components/nylas-time-window-picker2.js +1 -1
- package/dist/components/nylas-timeslot-interval2.js +11 -11
- package/dist/components/nylas-timeslot-interval2.js.map +1 -1
- package/dist/components/nylas-timeslot-picker2.js +6 -5
- package/dist/components/nylas-timeslot-picker2.js.map +1 -1
- package/dist/components/nylas-view-email2.js +1 -1
- package/dist/components/nylas-view-thread.js +1 -1
- package/dist/components/people.js +1 -1
- package/dist/components/person.js +1 -1
- package/dist/components/play.js +1 -1
- package/dist/components/plus-icon.d.ts +11 -0
- package/dist/components/plus-icon.js +8 -0
- package/dist/components/plus-icon.js.map +1 -0
- package/dist/components/plus.js +37 -0
- package/dist/components/plus.js.map +1 -0
- package/dist/components/radio-button-group2.js +23 -6
- package/dist/components/radio-button-group2.js.map +1 -1
- package/dist/components/refresh.js +1 -1
- package/dist/components/reply-all.js +1 -1
- package/dist/components/reply.js +1 -1
- package/dist/components/scheduler-config-store.js +2 -0
- package/dist/components/scheduler-config-store.js.map +1 -1
- package/dist/components/scheduler-store.js +42 -6
- package/dist/components/scheduler-store.js.map +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/select-dropdown2.js +12 -2
- package/dist/components/select-dropdown2.js.map +1 -1
- package/dist/components/sent.js +1 -1
- package/dist/components/spam.js +1 -1
- package/dist/components/star.js +1 -1
- package/dist/components/stop.js +1 -1
- package/dist/components/textarea-component.js +1 -82
- package/dist/components/textarea-component.js.map +1 -1
- package/dist/components/textarea-component2.js +89 -0
- package/dist/components/textarea-component2.js.map +1 -0
- package/dist/components/time-period-selector2.js +1 -1
- package/dist/components/toggle-switch2.js +2 -2
- package/dist/components/toggle-switch2.js.map +1 -1
- package/dist/components/toolitp-component.js +1 -1
- package/dist/components/translate.js +1 -1
- package/dist/components/trash.js +1 -1
- package/dist/components/underline.js +1 -1
- package/dist/components/warning.js +1 -1
- package/dist/components/zoom-icon.d.ts +11 -0
- package/dist/components/zoom-icon.js +8 -0
- package/dist/components/zoom-icon.js.map +1 -0
- package/dist/components/zoom.js +37 -0
- package/dist/components/zoom.js.map +1 -0
- package/dist/esm/add-circle-icon_2.entry.js +1 -1
- package/dist/esm/archive-icon_7.entry.js +7 -7
- package/dist/esm/arrow-icon.entry.js +1 -1
- package/dist/esm/bold-icon_3.entry.js +3 -3
- package/dist/esm/button-component_4.entry.js +196 -0
- package/dist/esm/button-component_4.entry.js.map +1 -0
- package/dist/esm/calendar-agenda-fill-icon_35.entry.js +6905 -0
- package/dist/esm/calendar-agenda-fill-icon_35.entry.js.map +1 -0
- package/dist/esm/chevron-icon_3.entry.js +11 -3
- package/dist/esm/chevron-icon_3.entry.js.map +1 -1
- package/dist/esm/clock-icon_2.entry.js +1 -1
- package/dist/esm/{constants-f34b9c6e.js → constants-7ce66b44.js} +103 -2
- package/dist/esm/{constants-f34b9c6e.js.map → constants-7ce66b44.js.map} +1 -1
- package/dist/esm/copy-icon_4.entry.js +65 -0
- package/dist/esm/copy-icon_4.entry.js.map +1 -0
- package/dist/esm/document-refresh-icon.entry.js +1 -1
- package/dist/esm/forward-icon_6.entry.js +7 -7
- package/dist/esm/globe-icon.entry.js +1 -1
- package/dist/esm/google-logo-icon_4.entry.js +192 -51
- package/dist/esm/google-logo-icon_4.entry.js.map +1 -1
- package/dist/esm/index-7cb0dd3d.js +20 -16
- package/dist/esm/index.js +1 -1
- package/dist/esm/info-icon_2.entry.js +2 -2
- package/dist/esm/input-dropdown_2.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-icon.entry.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +140 -0
- package/dist/esm/multi-select-dropdown.entry.js.map +1 -0
- package/dist/esm/{nylas-api-request-a67d2997.js → nylas-api-request-4f8edff2.js} +2 -1
- package/dist/esm/nylas-api-request-4f8edff2.js.map +1 -0
- package/dist/esm/nylas-booked-event-card_10.entry.js +66 -35
- package/dist/esm/nylas-booked-event-card_10.entry.js.map +1 -1
- package/dist/esm/nylas-custom-booking-flow.entry.js +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-list-folders.entry.js +1 -1
- package/dist/esm/nylas-list-threads.entry.js +1 -1
- package/dist/esm/nylas-login.entry.js +1 -1
- package/dist/esm/nylas-mailbox-toolbar-button.entry.js +1 -1
- package/dist/esm/nylas-mailbox.entry.js +1 -1
- package/dist/esm/nylas-provider.entry.js +3 -3
- package/dist/esm/nylas-scheduler-editor.entry.js +26 -9
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +3 -3
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/nylas-threads-refresh.entry.js +2 -2
- package/dist/esm/nylas-threads-search.entry.js +1 -1
- package/dist/esm/nylas-time-window-picker.entry.js +1 -1
- package/dist/esm/nylas-view-thread.entry.js +1 -1
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/play-icon_2.entry.js +2 -2
- package/dist/esm/refresh-icon.entry.js +1 -1
- package/dist/esm/{scheduler-config-store-4a50a03d.js → scheduler-config-store-9ccfba4d.js} +3 -1
- package/dist/esm/scheduler-config-store-9ccfba4d.js.map +1 -0
- package/dist/esm/{scheduler-store-f02ce045.js → scheduler-store-8a400448.js} +43 -7
- package/dist/esm/scheduler-store-8a400448.js.map +1 -0
- package/dist/esm/textarea-component.entry.js +3 -1
- package/dist/esm/textarea-component.entry.js.map +1 -1
- package/dist/esm/translate-icon.entry.js +1 -1
- package/dist/esm/warning-icon.entry.js +1 -1
- package/dist/nylas-web-elements/index.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
- package/dist/nylas-web-elements/p-0161429f.entry.js +2 -0
- package/dist/nylas-web-elements/{p-33a6a75b.entry.js.map → p-0161429f.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-064c2ae5.entry.js +2 -0
- package/dist/nylas-web-elements/{p-de7b0878.entry.js → p-0aa1e433.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-3f122804.entry.js → p-0bf6f818.entry.js} +2 -2
- package/dist/nylas-web-elements/p-1102df14.entry.js +2 -0
- package/dist/nylas-web-elements/{p-f1a54acf.entry.js → p-155e5ce8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a85408e0.entry.js → p-18d100c8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-5231fc13.entry.js → p-1a7edf86.entry.js} +3 -3
- package/dist/nylas-web-elements/p-1d8c468f.entry.js +2 -0
- package/dist/nylas-web-elements/p-1d8c468f.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-be38a8eb.entry.js → p-1e1ae8d0.entry.js} +2 -2
- package/dist/nylas-web-elements/p-1f290858.entry.js +2 -0
- package/dist/nylas-web-elements/p-1f290858.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-eb7e8455.entry.js → p-1fbe50b1.entry.js} +2 -2
- package/dist/nylas-web-elements/p-20bbc663.js +2 -0
- package/dist/nylas-web-elements/p-20bbc663.js.map +1 -0
- package/dist/nylas-web-elements/{p-49f716ed.js → p-2270e6cf.js} +4 -4
- package/dist/nylas-web-elements/p-2270e6cf.js.map +1 -0
- package/dist/nylas-web-elements/{p-70e5cfb0.entry.js → p-22e05c7d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-554891cd.entry.js → p-26302ad0.entry.js} +2 -2
- package/dist/nylas-web-elements/p-27df8f01.entry.js +2 -0
- package/dist/nylas-web-elements/p-27df8f01.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-2b1d53fa.entry.js +8 -0
- package/dist/nylas-web-elements/p-2b1d53fa.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-6ce66add.entry.js → p-2f47205d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-28512ab6.entry.js → p-3277023d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-1a27960b.entry.js → p-3423de64.entry.js} +2 -2
- package/dist/nylas-web-elements/p-3423de64.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-b0c8021f.entry.js → p-34c747f9.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-d9a91bc9.entry.js → p-359af1e3.entry.js} +2 -2
- package/dist/nylas-web-elements/p-359af1e3.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-613c070f.js → p-371b20b2.js} +2 -2
- package/dist/nylas-web-elements/p-371b20b2.js.map +1 -0
- package/dist/nylas-web-elements/{p-e9ba368f.entry.js → p-3ae38e51.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6ef1024f.entry.js → p-3bc1289e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-7fcecf3f.entry.js → p-3d1e8e4d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-45c37986.entry.js → p-3dae0c71.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-acadfabf.entry.js → p-3db7ab8d.entry.js} +3 -3
- package/dist/nylas-web-elements/{p-66493463.entry.js → p-3e09b0fb.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-5c3c1888.entry.js → p-3eac9f45.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-dcc27b67.entry.js → p-4000107d.entry.js} +2 -2
- package/dist/nylas-web-elements/p-40cad9a8.entry.js +11 -0
- package/dist/nylas-web-elements/p-40cad9a8.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-445d8bb4.entry.js +11 -0
- package/dist/nylas-web-elements/p-445d8bb4.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-08d75d35.entry.js → p-47392968.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-16a3bfb2.entry.js → p-4a594ebe.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-d633e735.entry.js → p-4b6995fe.entry.js} +2 -2
- package/dist/nylas-web-elements/p-4cdd4107.entry.js +2 -0
- package/dist/nylas-web-elements/{p-39fd9c90.entry.js → p-4e8c8939.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9b68568e.entry.js → p-4e9ba325.entry.js} +2 -2
- package/dist/nylas-web-elements/p-4f55d0e5.entry.js +2 -0
- package/dist/nylas-web-elements/{p-12b83ea9.entry.js.map → p-4f55d0e5.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-9794f735.entry.js → p-524a6acc.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-6bd9c9c3.entry.js → p-533d39ce.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-e928898a.entry.js → p-5a379fb5.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c90755ba.entry.js → p-5a68368a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-37f41a90.entry.js → p-5b965d0d.entry.js} +2 -2
- package/dist/nylas-web-elements/p-5e1cd3c1.entry.js +2 -0
- package/dist/nylas-web-elements/p-5e1cd3c1.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-34f0d1fe.entry.js → p-5ff4e63b.entry.js} +2 -2
- package/dist/nylas-web-elements/p-62aeac5f.entry.js +2 -0
- package/dist/nylas-web-elements/p-62aeac5f.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-64d43339.entry.js +2 -0
- package/dist/nylas-web-elements/p-64d43339.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-656cf33f.entry.js +2 -0
- package/dist/nylas-web-elements/{p-cf589eab.entry.js → p-65b7a2a7.entry.js} +2 -2
- package/dist/nylas-web-elements/p-68471dbd.entry.js +8 -0
- package/dist/nylas-web-elements/p-68471dbd.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-692852d2.entry.js +2 -0
- package/dist/nylas-web-elements/p-692852d2.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-60b03f86.entry.js → p-6c8af4fb.entry.js} +2 -2
- package/dist/nylas-web-elements/p-6d410f0a.entry.js +2 -0
- package/dist/nylas-web-elements/{p-daac96cb.entry.js → p-6e50d2fd.entry.js} +3 -3
- package/dist/nylas-web-elements/p-6e8b7ce8.entry.js +2 -0
- package/dist/nylas-web-elements/p-7042eb03.entry.js +2 -0
- package/dist/nylas-web-elements/{p-958746a1.entry.js.map → p-7042eb03.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-b9fa6848.entry.js → p-7355937b.entry.js} +2 -2
- package/dist/nylas-web-elements/p-749238c6.entry.js +2 -0
- package/dist/nylas-web-elements/p-749238c6.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-76156a82.entry.js +2 -0
- package/dist/nylas-web-elements/p-79c1475e.entry.js +11 -0
- package/dist/nylas-web-elements/p-79c1475e.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-79c33cf9.entry.js +2 -0
- package/dist/nylas-web-elements/p-79c33cf9.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-052bc3b1.entry.js → p-7e08f131.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a12f3223.entry.js → p-7e10aa6d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a7b19349.entry.js → p-7e53588e.entry.js} +2 -2
- package/dist/nylas-web-elements/p-83de54ae.entry.js +2 -0
- package/dist/nylas-web-elements/{p-b2d95965.entry.js → p-884b66bd.entry.js} +2 -2
- package/dist/nylas-web-elements/p-8aac762b.entry.js +2 -0
- package/dist/nylas-web-elements/p-8aac762b.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-8d74c874.js +2 -0
- package/dist/nylas-web-elements/p-8d74c874.js.map +1 -0
- package/dist/nylas-web-elements/{p-a800e7af.entry.js → p-8ddf6518.entry.js} +2 -2
- package/dist/nylas-web-elements/p-8ddf6518.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-7a95bc3f.entry.js → p-90294a76.entry.js} +2 -2
- package/dist/nylas-web-elements/p-90817d1f.entry.js +2 -0
- package/dist/nylas-web-elements/{p-f1b0120b.entry.js → p-90d32fc3.entry.js} +2 -2
- package/dist/nylas-web-elements/p-94a93ca9.entry.js +2 -0
- package/dist/nylas-web-elements/p-94a93ca9.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-95a9d2f1.entry.js +2 -0
- package/dist/nylas-web-elements/p-96746b87.entry.js +2 -0
- package/dist/nylas-web-elements/p-97026709.entry.js +2 -0
- package/dist/nylas-web-elements/{p-65097f45.entry.js → p-987042a1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-7ce048c0.entry.js → p-9f903292.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-bd34f97d.entry.js → p-9fdbeba5.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-2a92691a.entry.js → p-a22908ba.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-091a8f00.entry.js → p-a3c76c06.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-520ffe94.entry.js → p-a63d6241.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-cf0d5ab9.entry.js → p-aa4e6e5e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-ba5a625c.entry.js → p-ab050d5b.entry.js} +2 -2
- package/dist/nylas-web-elements/p-b2b2d351.entry.js +2 -0
- package/dist/nylas-web-elements/p-b2b2d351.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-161c9325.entry.js → p-b348aad4.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-bfe8e06b.entry.js → p-b547209f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-e8cde784.entry.js → p-b5b051e0.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-aae7febd.entry.js → p-b7a53268.entry.js} +2 -2
- package/dist/nylas-web-elements/p-b8a9e8f4.entry.js +2 -0
- package/dist/nylas-web-elements/p-b8a9e8f4.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-385070ba.entry.js → p-bc6c9256.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-cb03e4d4.entry.js → p-be26ce19.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8a4ac2a4.entry.js → p-bed6d217.entry.js} +2 -2
- package/dist/nylas-web-elements/p-bf4e0d2a.entry.js +2 -0
- package/dist/nylas-web-elements/p-bf4e0d2a.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-8e63b66c.entry.js → p-cb9fd100.entry.js} +2 -2
- package/dist/nylas-web-elements/p-ce14a1d5.entry.js +2 -0
- package/dist/nylas-web-elements/{p-1fa7b832.entry.js.map → p-ce14a1d5.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-44507695.entry.js → p-cee0929a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b334d63b.entry.js → p-cffb3636.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b2aca6c4.entry.js → p-d1ab9d75.entry.js} +2 -2
- package/dist/nylas-web-elements/p-d6a19e25.entry.js +2 -0
- package/dist/nylas-web-elements/p-d6a19e25.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-f96b12de.entry.js → p-d830e428.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8075a758.entry.js → p-d9b08dd2.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8f843faf.entry.js → p-db73506b.entry.js} +2 -2
- package/dist/nylas-web-elements/p-dcf99ddf.entry.js +2 -0
- package/dist/nylas-web-elements/p-dcf99ddf.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-d513d2ee.entry.js → p-de2f4643.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f2d1b1a6.entry.js.map → p-de2f4643.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-25c97a60.entry.js → p-de84d999.entry.js} +2 -2
- package/dist/nylas-web-elements/p-debf614f.entry.js +8 -0
- package/dist/nylas-web-elements/p-debf614f.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-158fe1e9.entry.js → p-dfe9b5d0.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-085950eb.entry.js → p-e5452799.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f8653b9b.entry.js → p-e6e79d76.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-b813eb5d.entry.js → p-e944aa75.entry.js} +2 -2
- package/dist/nylas-web-elements/p-ec844414.entry.js +2 -0
- package/dist/nylas-web-elements/{p-34f0d1fe.entry.js.map → p-ec844414.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-ed64716c.entry.js +2 -0
- package/dist/nylas-web-elements/p-ed64716c.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-ecaf3ae1.entry.js → p-eff175d3.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-246983ed.entry.js → p-eff774e6.entry.js} +2 -2
- package/dist/nylas-web-elements/p-f03b9d40.entry.js +2 -0
- package/dist/nylas-web-elements/p-f03b9d40.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-2f148064.entry.js → p-f13b8bd3.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-8f3b02cd.entry.js → p-f7465959.entry.js} +2 -2
- package/dist/nylas-web-elements/p-f8e8270d.entry.js +2 -0
- package/dist/nylas-web-elements/p-f8e8270d.entry.js.map +1 -0
- package/dist/types/common/constants.d.ts +17 -0
- package/dist/types/common/icons/calendar-agenda-fill.d.ts +5 -0
- package/dist/types/common/icons/calendar-agenda.d.ts +5 -0
- package/dist/types/common/icons/copy.d.ts +5 -0
- package/dist/types/common/icons/delete.d.ts +5 -0
- package/dist/types/common/icons/dragable.d.ts +5 -0
- package/dist/types/common/icons/edit.d.ts +5 -0
- package/dist/types/common/icons/eye.d.ts +5 -0
- package/dist/types/common/icons/google-meet.d.ts +5 -0
- package/dist/types/common/icons/microsof-teams.d.ts +5 -0
- package/dist/types/common/icons/plus.d.ts +5 -0
- package/dist/types/common/icons/zoom.d.ts +5 -0
- package/dist/types/common/nylas-api-request.d.ts +1 -0
- package/dist/types/common/types.d.ts +1 -0
- package/dist/types/components/design-system/checkbox-component/checkbox-component.d.ts +3 -0
- package/dist/types/components/design-system/input-component/input-component.d.ts +2 -1
- package/dist/types/components/design-system/multi-select-dropdown/multi-select-dropdown.d.ts +1 -0
- package/dist/types/components/design-system/radio-button-group/radio-button-group.d.ts +6 -1
- package/dist/types/components/design-system/select-dropdown/select-dropdown.d.ts +3 -0
- package/dist/types/components/design-system/textarea-component/textarea-component.d.ts +2 -0
- package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +1 -0
- package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +8 -6
- package/dist/types/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.d.ts +3 -2
- package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +7 -4
- package/dist/types/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.d.ts +1 -0
- package/dist/types/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.d.ts +51 -0
- package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +1 -0
- package/dist/types/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.d.ts +41 -0
- package/dist/types/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +27 -4
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/tab-contents.d.ts +2 -1
- package/dist/types/components/scheduler-editor/nylas-event-location/nylas-event-location.d.ts +7 -1
- package/dist/types/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.d.ts +13 -2
- package/dist/types/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.d.ts +43 -0
- package/dist/types/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.d.ts +4 -2
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/ExpressFlow.d.ts +11 -2
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +4 -2
- package/dist/types/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.d.ts +2 -2
- package/dist/types/components.d.ts +723 -30
- package/dist/types/connector/shared/api/scheduler-config.d.ts +1 -1
- package/dist/types/stores/scheduler-config-store.d.ts +5 -2
- package/dist/types/stores/scheduler-store.d.ts +3 -1
- package/dist/types/types/index.d.ts +8 -0
- package/package.json +4 -3
- package/dist/cjs/button-component.cjs.entry.js +0 -31
- package/dist/cjs/button-component.cjs.entry.js.map +0 -1
- package/dist/cjs/calendar-info-icon_28.cjs.entry.js +0 -2935
- package/dist/cjs/calendar-info-icon_28.cjs.entry.js.map +0 -1
- package/dist/cjs/input-component.cjs.entry.js +0 -89
- package/dist/cjs/input-component.cjs.entry.js.map +0 -1
- package/dist/cjs/nylas-api-request-a1751a40.js.map +0 -1
- package/dist/cjs/scheduler-config-store-9f19c7a9.js.map +0 -1
- package/dist/cjs/scheduler-store-0f7328f1.js.map +0 -1
- package/dist/esm/button-component.entry.js +0 -27
- package/dist/esm/button-component.entry.js.map +0 -1
- package/dist/esm/calendar-info-icon_28.entry.js +0 -2904
- package/dist/esm/calendar-info-icon_28.entry.js.map +0 -1
- package/dist/esm/input-component.entry.js +0 -85
- package/dist/esm/input-component.entry.js.map +0 -1
- package/dist/esm/nylas-api-request-a67d2997.js.map +0 -1
- package/dist/esm/scheduler-config-store-4a50a03d.js.map +0 -1
- package/dist/esm/scheduler-store-f02ce045.js.map +0 -1
- package/dist/nylas-web-elements/p-019be093.entry.js +0 -11
- package/dist/nylas-web-elements/p-019be093.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-05833164.entry.js +0 -2
- package/dist/nylas-web-elements/p-05833164.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-061d0ae2.entry.js +0 -2
- package/dist/nylas-web-elements/p-061d0ae2.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-0c31f7ca.entry.js +0 -2
- package/dist/nylas-web-elements/p-0d98c728.entry.js +0 -2
- package/dist/nylas-web-elements/p-0d98c728.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-12b83ea9.entry.js +0 -2
- package/dist/nylas-web-elements/p-16fb6243.entry.js +0 -2
- package/dist/nylas-web-elements/p-1970b6ee.entry.js +0 -2
- package/dist/nylas-web-elements/p-1a27960b.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-1fa7b832.entry.js +0 -2
- package/dist/nylas-web-elements/p-26976360.entry.js +0 -2
- package/dist/nylas-web-elements/p-26976360.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-29938263.js +0 -2
- package/dist/nylas-web-elements/p-29938263.js.map +0 -1
- package/dist/nylas-web-elements/p-33a6a75b.entry.js +0 -2
- package/dist/nylas-web-elements/p-36f4b804.entry.js +0 -2
- package/dist/nylas-web-elements/p-36f4b804.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-39160c0d.entry.js +0 -11
- package/dist/nylas-web-elements/p-39160c0d.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-3b6bd448.entry.js +0 -2
- package/dist/nylas-web-elements/p-3eeab083.entry.js +0 -2
- package/dist/nylas-web-elements/p-49f716ed.js.map +0 -1
- package/dist/nylas-web-elements/p-53a1bb82.entry.js +0 -2
- package/dist/nylas-web-elements/p-53a1bb82.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-5bed86c2.entry.js +0 -2
- package/dist/nylas-web-elements/p-5ddd0c37.entry.js +0 -2
- package/dist/nylas-web-elements/p-613c070f.js.map +0 -1
- package/dist/nylas-web-elements/p-644ff4ee.entry.js +0 -2
- package/dist/nylas-web-elements/p-644ff4ee.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-64d73008.entry.js +0 -2
- package/dist/nylas-web-elements/p-6ddb4b95.entry.js +0 -2
- package/dist/nylas-web-elements/p-6ddb4b95.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-823c8aa2.js +0 -2
- package/dist/nylas-web-elements/p-823c8aa2.js.map +0 -1
- package/dist/nylas-web-elements/p-83444c0a.entry.js +0 -2
- package/dist/nylas-web-elements/p-83444c0a.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-8506a8d4.entry.js +0 -11
- package/dist/nylas-web-elements/p-8506a8d4.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-926dd201.entry.js +0 -2
- package/dist/nylas-web-elements/p-9283504a.entry.js +0 -2
- package/dist/nylas-web-elements/p-9283504a.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-958746a1.entry.js +0 -2
- package/dist/nylas-web-elements/p-9bb41364.entry.js +0 -2
- package/dist/nylas-web-elements/p-9bb41364.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-a800e7af.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-a8678862.entry.js +0 -2
- package/dist/nylas-web-elements/p-aac962c7.entry.js +0 -2
- package/dist/nylas-web-elements/p-aac962c7.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-b4d09fcf.entry.js +0 -2
- package/dist/nylas-web-elements/p-b4d09fcf.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-b9559f06.entry.js +0 -2
- package/dist/nylas-web-elements/p-b9559f06.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-bab1d562.entry.js +0 -2
- package/dist/nylas-web-elements/p-bab1d562.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-c18c15d0.entry.js +0 -2
- package/dist/nylas-web-elements/p-c1ff6499.entry.js +0 -2
- package/dist/nylas-web-elements/p-c1ff6499.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-d5d67115.entry.js +0 -2
- package/dist/nylas-web-elements/p-d5d67115.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-d9a91bc9.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-ea12997b.entry.js +0 -2
- package/dist/nylas-web-elements/p-f2d1b1a6.entry.js +0 -2
- package/dist/nylas-web-elements/p-f6fafe86.entry.js +0 -2
- package/dist/nylas-web-elements/p-f6fafe86.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-ffce3a49.entry.js +0 -2
- package/dist/nylas-web-elements/p-ffce3a49.entry.js.map +0 -1
- /package/dist/nylas-web-elements/{p-08d75d35.entry.js.map → p-064c2ae5.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5bed86c2.entry.js.map → p-0aa1e433.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3f122804.entry.js.map → p-0bf6f818.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-926dd201.entry.js.map → p-1102df14.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a7b19349.entry.js.map → p-155e5ce8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a85408e0.entry.js.map → p-18d100c8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5231fc13.entry.js.map → p-1a7edf86.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-554891cd.entry.js.map → p-1e1ae8d0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-65097f45.entry.js.map → p-1fbe50b1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-70e5cfb0.entry.js.map → p-22e05c7d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-be38a8eb.entry.js.map → p-26302ad0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2a92691a.entry.js.map → p-2f47205d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-085950eb.entry.js.map → p-3277023d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-64d73008.entry.js.map → p-34c747f9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-45c37986.entry.js.map → p-3ae38e51.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0c31f7ca.entry.js.map → p-3bc1289e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5ddd0c37.entry.js.map → p-3d1e8e4d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e9ba368f.entry.js.map → p-3dae0c71.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-acadfabf.entry.js.map → p-3db7ab8d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-28512ab6.entry.js.map → p-3e09b0fb.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-158fe1e9.entry.js.map → p-3eac9f45.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d513d2ee.entry.js.map → p-4000107d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3b6bd448.entry.js.map → p-47392968.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-16a3bfb2.entry.js.map → p-4a594ebe.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c90755ba.entry.js.map → p-4b6995fe.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b2d95965.entry.js.map → p-4cdd4107.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-25c97a60.entry.js.map → p-4e8c8939.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6bd9c9c3.entry.js.map → p-4e9ba325.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6ce66add.entry.js.map → p-524a6acc.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9b68568e.entry.js.map → p-533d39ce.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7a95bc3f.entry.js.map → p-5a379fb5.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-cb03e4d4.entry.js.map → p-5a68368a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1970b6ee.entry.js.map → p-5b965d0d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-091a8f00.entry.js.map → p-5ff4e63b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-37f41a90.entry.js.map → p-656cf33f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-246983ed.entry.js.map → p-65b7a2a7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-60b03f86.entry.js.map → p-6c8af4fb.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8e63b66c.entry.js.map → p-6d410f0a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-daac96cb.entry.js.map → p-6e50d2fd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c18c15d0.entry.js.map → p-6e8b7ce8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b9fa6848.entry.js.map → p-7355937b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a8678862.entry.js.map → p-76156a82.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-052bc3b1.entry.js.map → p-7e08f131.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2f148064.entry.js.map → p-7e10aa6d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b2aca6c4.entry.js.map → p-7e53588e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-aae7febd.entry.js.map → p-83de54ae.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-de7b0878.entry.js.map → p-884b66bd.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e928898a.entry.js.map → p-90294a76.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3eeab083.entry.js.map → p-90817d1f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f1b0120b.entry.js.map → p-90d32fc3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-dcc27b67.entry.js.map → p-95a9d2f1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-6ef1024f.entry.js.map → p-96746b87.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7fcecf3f.entry.js.map → p-97026709.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-eb7e8455.entry.js.map → p-987042a1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-44507695.entry.js.map → p-9f903292.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7ce048c0.entry.js.map → p-9fdbeba5.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9794f735.entry.js.map → p-a22908ba.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-16fb6243.entry.js.map → p-a3c76c06.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-520ffe94.entry.js.map → p-a63d6241.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-cf0d5ab9.entry.js.map → p-aa4e6e5e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ba5a625c.entry.js.map → p-ab050d5b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-161c9325.entry.js.map → p-b348aad4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5c3c1888.entry.js.map → p-b547209f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e8cde784.entry.js.map → p-b5b051e0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b0c8021f.entry.js.map → p-b7a53268.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-385070ba.entry.js.map → p-bc6c9256.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d633e735.entry.js.map → p-be26ce19.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8a4ac2a4.entry.js.map → p-bed6d217.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8f3b02cd.entry.js.map → p-cb9fd100.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bd34f97d.entry.js.map → p-cee0929a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b334d63b.entry.js.map → p-cffb3636.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f1a54acf.entry.js.map → p-d1ab9d75.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f96b12de.entry.js.map → p-d830e428.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8075a758.entry.js.map → p-d9b08dd2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-39fd9c90.entry.js.map → p-db73506b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-8f843faf.entry.js.map → p-de84d999.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bfe8e06b.entry.js.map → p-dfe9b5d0.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-66493463.entry.js.map → p-e5452799.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f8653b9b.entry.js.map → p-e6e79d76.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b813eb5d.entry.js.map → p-e944aa75.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a12f3223.entry.js.map → p-eff175d3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-cf589eab.entry.js.map → p-eff774e6.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ecaf3ae1.entry.js.map → p-f13b8bd3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ea12997b.entry.js.map → p-f7465959.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ErrorCategory","ComponentErrorType","APIErrorType","Errors","constructor","this","component","_title","category","Component","title","endtime_not_in_future","message","no_booking_info","no_timeslot_selected","no_timezone_selected","no_booking_id","invalid_start_time","invalid_end_time","invalid_timezone","api","Api","invalid_session","general_error","internal_error","invalid_request_error","timeslot_not_available","provider_error","not_found_error","NylaSchedulerAPIConnector","schedulerAPIURL","schedulerStore","sessionId","configId","errors","getHeaders","Authorization","makeAPIRequest","path","method","body","headers","schedulerURL","URL","pathname","response","fetch","decodeURIComponent","toString","Origin","window","location","origin","data","json","error","type","getErrorMessage","errorMessage","setConfigId","selectDate","date","set","selectTime","time","selectTimezone","timezone","toggleAdditionalData","value","refetchAvailability","setParticipantName","name","bookingInfo","state","primaryParticipant","setParticipantEmail","email","today","Date","startTime","getFullYear","getMonth","getTime","startTimeWithOffset","Math","floor","endTime","result","getAvailability","resetStoreStateAndFetchAvailability","firstAvailableDate","get","find","timeslot","start_time","_selectedDate","setReschedule","bookingID","eventInfo","setCancel","resetCancel","bookTimeslot","selectedTimeslot","selectedTimezone","guests","additional_fields","additionalFields","configIdParam","url","JSON","stringify","additional_guests","guest","end_time","errorType","getUISettings","undefined","getStartTimeWithMinBookingNotice","scheduler","min_booking_notice","getEndTimeForAvailableDaysInFuture","availableDaysInFuture","available_days_in_future","endTimeForAvailableDaysInFuture","addDaysToCurrentDate","endTimeWithOffset","min","params","URLSearchParams","now","nowTime","startOfMonth","endOfMonth","append","encodeURIComponent","queryString","availability","time_slots","map","availabilityTimeslotsFiltered","filter","cancelBooking","bookingId","reason","action","cancellation_reason","booking_id","rescheduleBooking","apiErrors","componentErrors","time_zone","event","CreateNylasSchedulerStore","defaultState","defaultNylasStoreState","selectedDate","selectedLanguage","navigator","language","Intl","DateTimeFormat","resolvedOptions","timeZone","showBookingForm","selectableDates","eventDuration","cancelledEventInfo","isLoading","nylasBranding","debug","store","createStore","onChange","durationMinutes","reset","key"],"sources":["src/connector/nylas-scheduler-connector/errors/index.ts","src/connector/shared/api/scheduler.ts","src/stores/scheduler-store.ts"],"sourcesContent":["export enum ErrorCategory {\n Component = 'component',\n Api = 'api',\n Auth = 'auth',\n}\n\nexport interface ErrorDetails {\n title: string;\n message: string;\n category: ErrorCategory;\n}\n\nexport enum ComponentErrorType {\n endtime_not_in_future = 'endtime_not_in_future',\n no_booking_info = 'no_booking_info',\n no_timeslot_selected = 'no_timeslot_selected',\n no_timezone_selected = 'no_timezone_selected',\n no_booking_id = 'no_booking_id',\n invalid_start_time = 'invalid_start_time',\n invalid_end_time = 'invalid_end_time',\n invalid_timezone = 'invalid_timezone',\n}\n\nexport enum APIErrorType {\n invalid_session = 'invalid_session',\n general_error = 'general_error',\n internal_error = 'internal_error',\n invalid_request_error = 'invalid_request_error',\n timeslot_not_available = 'timeslot_not_available',\n provider_error = 'provider_error',\n not_found_error = 'not_found_error',\n}\n\nexport class Errors {\n component = (_title: string): Record<ComponentErrorType, (message?: string) => ErrorDetails> => {\n const category = ErrorCategory.Component;\n const title = `${_title} Error`;\n return {\n endtime_not_in_future: (message: string = '\"endtime\" can not be in the future') => {\n return {\n title,\n message,\n category,\n };\n },\n no_booking_info: (message: string = 'No booking info provided') => {\n return {\n title,\n message,\n category,\n };\n },\n no_timeslot_selected: (message: string = 'No timeslot selected') => {\n return {\n title,\n message,\n category,\n };\n },\n no_timezone_selected: (message: string = 'No timezone selected') => {\n return {\n title,\n message,\n category,\n };\n },\n no_booking_id: (message: string = 'No booking id provided') => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_start_time: (message: string = 'Invalid start time') => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_end_time: (message: string = 'Invalid end time') => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_timezone: (message: string = 'Invalid timezone') => {\n return {\n title,\n message,\n category,\n };\n },\n };\n };\n\n api = (_title: string): Record<APIErrorType, (message: string) => ErrorDetails> => {\n const category = ErrorCategory.Api;\n const title = `${_title} Error`;\n\n return {\n invalid_session: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n general_error: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n internal_error: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_request_error: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n timeslot_not_available: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n provider_error: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n not_found_error: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n };\n };\n}\n","import { AvailabilityResponse, NylasEvent, UISettingsResponse } from '@/common/types';\nimport { NylasSchedulerStoreType } from '../../../components';\nimport type { NylasErrorResponse, NylasResponse, NylasSchedulerBookingData, NylasSchedulerResponse, Timeslot } from '@nylas/core';\nimport { APIErrorType, Errors } from '@/connector/nylas-scheduler-connector/errors';\nimport { addDaysToCurrentDate } from '@/utils/utils';\n\ntype NylasSchedulerAPIConnectorOptions = {\n schedulerAPIURL: string;\n schedulerStore: NylasSchedulerStoreType;\n sessionId?: string;\n configId?: string;\n};\n\n/**\n * NylaSchedulerConnector\n * This class is used to make API requests to the scheduler.\n */\nexport class NylaSchedulerAPIConnector {\n private schedulerStore: NylasSchedulerStoreType;\n private schedulerAPIURL: string;\n private sessionId: string | undefined;\n private configId: string | undefined;\n private errors = new Errors();\n\n constructor({ schedulerAPIURL, schedulerStore, sessionId, configId }: NylasSchedulerAPIConnectorOptions) {\n this.schedulerStore = schedulerStore;\n this.schedulerAPIURL = schedulerAPIURL;\n this.sessionId = sessionId;\n this.configId = configId;\n }\n\n private getHeaders() {\n return this.sessionId\n ? {\n Authorization: `Bearer ${this.sessionId}`,\n }\n : {};\n }\n\n /**\n * Makes an API request to the scheduler.\n * @param path The path to the API endpoint.\n * @param method The HTTP method.\n * @param body The request body (if any).\n * @returns {Promise<T>}\n */\n public async makeAPIRequest<T>(path: string, method: string, body: string | undefined, headers = {}): Promise<NylasResponse<T>> {\n try {\n const schedulerURL = new URL(this.schedulerAPIURL);\n schedulerURL.pathname = path;\n const response = await fetch(decodeURIComponent(schedulerURL.toString()), {\n method,\n headers: {\n 'Content-Type': 'application/json',\n 'Origin': window.location.origin,\n ...headers,\n },\n body,\n });\n // The server returns a json object for errors: eg.\n // {\n // \"request_id\": \"<request_id>\",\n // \"error\": {\n // \"type\": \"not_found_error\",\n // \"message\": \"Session not found\"\n // }\n // }\n const data = await response.json();\n return data as NylasResponse<T>;\n } catch (error: any) {\n // NOTE: current server implementation doesn't return a JSON object for errors on some endpoints\n // handle this case by returning the error response as a string to be handled downstream\n return {\n error: {\n message: error.message,\n title: 'API request failed',\n type: 'api',\n },\n } as NylasErrorResponse;\n }\n }\n\n private getErrorMessage(error: NylasErrorResponse['error']) {\n let errorMessage = error?.message || error?.title || 'Something went wrong';\n if (error?.type === 'provider_error') {\n errorMessage = error?.provider_error?.error?.message || error?.provider_error?.error?.title || 'Something went wrong';\n }\n return errorMessage;\n }\n\n public setConfigId(configId: string) {\n this.configId = configId;\n }\n\n /**\n * Selects a date in the scheduler.\n */\n public selectDate(date: Date) {\n this.schedulerStore.set('selectedDate', date);\n this.schedulerStore.set('selectedTimeslot', null);\n }\n\n /**\n * Selects a time in the scheduler.\n */\n public selectTime(time: Timeslot) {\n this.schedulerStore.set('selectedTimeslot', time);\n }\n\n /**\n * Sets the timezone in the scheduler.\n */\n public selectTimezone(timezone: string) {\n this.schedulerStore.set('selectedTimezone', timezone);\n }\n\n /**\n * Toggles showBookingForm\n * @param value boolean\n */\n public async toggleAdditionalData(value: boolean) {\n if (!value) {\n // Refetch availability\n await this.refetchAvailability();\n }\n this.schedulerStore.set('showBookingForm', value);\n }\n\n /**\n * Set/update the name of the participant booking the event.\n */\n public setParticipantName(name: string) {\n const { bookingInfo } = this.schedulerStore.state;\n this.schedulerStore.set('bookingInfo', {\n ...bookingInfo,\n primaryParticipant: {\n ...(bookingInfo?.primaryParticipant as NylasSchedulerBookingData['primaryParticipant']),\n name,\n },\n });\n }\n\n /**\n * Set/update the email of the participant booking the event.\n */\n public setParticipantEmail(email: string) {\n const { bookingInfo } = this.schedulerStore.state;\n this.schedulerStore.set('bookingInfo', {\n ...bookingInfo,\n primaryParticipant: {\n ...(bookingInfo?.primaryParticipant as NylasSchedulerBookingData['primaryParticipant']),\n email,\n },\n });\n }\n\n private async refetchAvailability() {\n const today = new Date();\n // Refetch availability\n const startTime = new Date(today.getFullYear(), today.getMonth(), 1).getTime() / 1000;\n const startTimeWithOffset = startTime < today.getTime() / 1000 ? Math.floor(today.getTime() / 1000) : startTime;\n const endTime = new Date(today.getFullYear(), today.getMonth() + 1, 1).getTime() / 1000;\n const result = await this.getAvailability(startTimeWithOffset, endTime);\n return result;\n }\n\n private async resetStoreStateAndFetchAvailability() {\n const today = new Date();\n // Refetch availability\n const result = await this.refetchAvailability();\n // Set selected date to first available date\n const firstAvailableDate = this.schedulerStore.get('availability').find((timeslot: any) => new Date(timeslot.start_time) > new Date());\n let _selectedDate = today;\n if (firstAvailableDate) {\n _selectedDate = firstAvailableDate.start_time;\n }\n this.schedulerStore.set('selectedDate', _selectedDate);\n // Reset store state\n this.schedulerStore.set('eventInfo', null);\n this.schedulerStore.set('showBookingForm', false);\n this.schedulerStore.set('selectedTimeslot', null);\n\n return result;\n }\n\n /**\n * Set reschedule booking id\n */\n public async setReschedule(bookingID: string) {\n const eventInfo = this.schedulerStore.state.eventInfo;\n if (eventInfo) {\n this.schedulerStore.set('reschedulingEventInfo', eventInfo);\n }\n // Set reschedule booking id\n const result = await this.resetStoreStateAndFetchAvailability();\n this.schedulerStore.set('rescheduleBookingId', bookingID);\n return result;\n }\n\n /**\n * Set cancel booking id\n */\n public async setCancel(bookingID: string) {\n this.schedulerStore.set('cancelBookingId', bookingID);\n }\n\n public async resetCancel() {\n const result = await this.resetStoreStateAndFetchAvailability();\n this.schedulerStore.set('cancelBookingId', '');\n this.schedulerStore.set('cancelledEventInfo', null);\n return result;\n }\n\n /**\n * Book the selected timeslot.\n * @param data The booking info.\n * @returns {Promise<NylasResponse<NylasEvent>>}\n */\n public async bookTimeslot(data?: NylasSchedulerBookingData & { timeslot?: Timeslot }): Promise<NylasSchedulerResponse<NylasEvent>> {\n this.schedulerStore.set('isLoading', true);\n const { selectedTimeslot, selectedTimezone, bookingInfo } = this.schedulerStore.state;\n if (!data && !bookingInfo) {\n return { error: this.errors.component('Booking').no_booking_info() };\n }\n\n const timeslot = data?.timeslot || selectedTimeslot;\n if (!timeslot) {\n return { error: this.errors.component('Create Booking').no_timeslot_selected() };\n }\n\n const timezone = data && data?.timezone ? data?.timezone : selectedTimezone;\n\n if (!timezone) {\n return { error: this.errors.component('Create Booking').no_timezone_selected() };\n }\n\n const primaryParticipant = data ? data?.primaryParticipant : bookingInfo?.primaryParticipant;\n const guests = data ? data?.guests || [] : bookingInfo?.guests || [];\n const additional_fields = data ? data?.additionalFields : bookingInfo?.additionalFields;\n\n const headers = this.getHeaders();\n const configIdParam = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : '';\n const url = `/v3/scheduling/bookings${configIdParam}`;\n\n const response = await this.makeAPIRequest<NylasEvent>(\n decodeURIComponent(url),\n 'POST',\n JSON.stringify({\n additional_fields,\n additional_guests: guests,\n guest: { ...primaryParticipant },\n start_time: timeslot.start_time.getTime() / 1000,\n end_time: timeslot.end_time.getTime() / 1000,\n timezone: timezone,\n }),\n headers,\n );\n\n if ('error' in response) {\n this.schedulerStore.set('isLoading', false);\n const errorType = response.error?.type;\n let error = response.error;\n if (errorType && errorType in this.errors.api('Create Booking')) {\n const errorMessage = this.getErrorMessage(error);\n error = this.errors.api('Create Booking')[errorType as APIErrorType](errorMessage);\n }\n return { error };\n }\n\n if ('data' in response) {\n this.schedulerStore.set('eventInfo', response?.data);\n }\n\n this.schedulerStore.set('isLoading', false);\n return response;\n }\n\n /**\n * Get UI settings for the scheduler.\n */\n public async getUISettings(): Promise<NylasSchedulerResponse<UISettingsResponse>> {\n this.schedulerStore.set('isLoading', true);\n const headers = this.getHeaders();\n const configIdParam = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : '';\n const url = `/v3/scheduling/ui-settings${configIdParam}`;\n\n const response = await this.makeAPIRequest<UISettingsResponse>(url, 'GET', undefined, headers);\n if ('error' in response) {\n this.schedulerStore.set('isLoading', false);\n const errorType = response.error?.type;\n let error = response.error;\n if (errorType && errorType in this.errors.api('Get UI Settings')) {\n error = this.errors.api('Get UI Settings')[errorType as APIErrorType](error?.message || error?.title || 'Something went wrong');\n }\n return { error };\n }\n if ('data' in response) {\n this.schedulerStore.set('configSettings', response.data);\n }\n this.schedulerStore.set('isLoading', false);\n return response;\n }\n\n private getStartTimeWithMinBookingNotice(startTime: number) {\n const scheduler = this.schedulerStore.get('configSettings')?.scheduler;\n const min_booking_notice = scheduler?.min_booking_notice;\n if (!min_booking_notice) {\n return startTime;\n }\n return startTime + min_booking_notice * 60;\n }\n\n private getEndTimeForAvailableDaysInFuture(endTime: number) {\n const today = new Date();\n const availableDaysInFuture = this.schedulerStore.get('configSettings')?.scheduler?.available_days_in_future;\n const endTimeForAvailableDaysInFuture = Math.floor(addDaysToCurrentDate(today, availableDaysInFuture).getTime() / 1000);\n const endTimeWithOffset = Math.min(endTimeForAvailableDaysInFuture, endTime);\n return endTimeWithOffset;\n }\n\n /**\n * Gets the availability for a page.\n * @param startTime The start time.\n * @param endTime The end time.\n * @returns {Promise<AvailabilityResponse>}\n */\n public async getAvailability(startTime: number = 0, endTime: number = 0): Promise<NylasSchedulerResponse<AvailabilityResponse>> {\n this.schedulerStore.set('isLoading', true);\n const params = new URLSearchParams();\n const now = new Date();\n const nowTime = now.getTime();\n\n if (endTime && endTime < nowTime / 1000) {\n this.schedulerStore.set('isLoading', false);\n const error = this.errors.component('Get Availability').endtime_not_in_future();\n return { error };\n }\n\n // Calculate the start of the current month if startTime is not provided\n if (!startTime) {\n const startOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);\n startTime = Math.floor(startOfMonth.getTime() / 1000); // Convert to UNIX timestamp in seconds\n }\n\n startTime = this.getStartTimeWithMinBookingNotice(startTime);\n // Calculate the end of the current month if endTime is not provided\n if (!endTime) {\n const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0); // Setting day to 0 gets the last day of the previous month, so in this case, the last day of the current month\n endTime = Math.floor(endOfMonth.getTime() / 1000); // Convert to UNIX timestamp in seconds\n }\n endTime = this.getEndTimeForAvailableDaysInFuture(endTime);\n\n params.append('start_time', encodeURIComponent(startTime.toString()));\n params.append('end_time', encodeURIComponent(endTime.toString()));\n if (this.configId && !this.sessionId) {\n params.append('configuration_id', encodeURIComponent(this.configId));\n }\n const queryString = params.toString();\n const url = `/v3/scheduling/availability${queryString ? `?${queryString}` : ''}`;\n const headers = this.getHeaders();\n const response = await this.makeAPIRequest<AvailabilityResponse>(decodeURIComponent(url), 'GET', undefined, headers);\n\n if ('error' in response) {\n this.schedulerStore.set('availability', []);\n this.schedulerStore.set('isLoading', false);\n const errorType = response.error?.type;\n let error = response.error;\n if (errorType && errorType in this.errors.api('Get Availability')) {\n const errorMessage = this.getErrorMessage(error);\n error = this.errors.api('Get Availability')[errorType as APIErrorType](errorMessage);\n }\n return { error };\n }\n\n if ('data' in response) {\n const availability =\n response.data?.time_slots?.map(timeslot => {\n return {\n ...timeslot,\n start_time: new Date(timeslot.start_time * 1000),\n end_time: new Date(timeslot.end_time * 1000),\n };\n }) || [];\n\n // Filter out timeslots that are in the past\n const availabilityTimeslotsFiltered = availability.filter(timeslot => timeslot.start_time.getTime() > nowTime);\n this.schedulerStore.set('availability', availabilityTimeslotsFiltered);\n }\n\n this.schedulerStore.set('isLoading', false);\n return response;\n }\n\n /**\n * Cancels a booking.\n * @param bookingId The booking ID.\n */\n public async cancelBooking(bookingId: string, reason: string): Promise<NylasSchedulerResponse<Partial<NylasEvent>>> {\n this.schedulerStore.set('isLoading', true);\n if (!bookingId) {\n return { error: this.errors.component('Cancel Booking').no_booking_id() };\n }\n const configIdParam = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : '';\n const url = `/v3/scheduling/bookings/${bookingId}${configIdParam}`;\n const headers = this.getHeaders();\n const response = await this.makeAPIRequest<Partial<NylasEvent>>(\n decodeURIComponent(url),\n 'DELETE',\n JSON.stringify({\n action: 'cancel',\n cancellation_reason: reason,\n }),\n headers,\n );\n\n if ('error' in response) {\n this.schedulerStore.set('isLoading', false);\n const errorType = response.error?.type;\n let error = response.error;\n if (errorType && errorType in this.errors.api('Cancel Booking')) {\n const errorMessage = this.getErrorMessage(error);\n error = this.errors.api('Cancel Booking')[errorType as APIErrorType](errorMessage);\n }\n return { error };\n }\n\n this.schedulerStore.set('cancelledEventInfo', {\n booking_id: bookingId,\n });\n\n this.schedulerStore.set('isLoading', false);\n return response;\n }\n\n /**\n * Reschedules a booking.\n * @param bookingId The booking ID.\n * @param data The booking info.\n * @returns {Promise<NylasResponse<NylasEvent>>}\n */\n public async rescheduleBooking(bookingId: string, data: NylasSchedulerBookingData): Promise<NylasSchedulerResponse<NylasEvent>> {\n this.schedulerStore.set('isLoading', true);\n if (!bookingId) {\n return { error: this.errors.component('Reschedule Booking').no_booking_id() };\n }\n const apiErrors = this.errors.api('Reschedule Booking');\n const componentErrors = this.errors.component('Reschedule Booking');\n const { bookingInfo, selectedTimeslot, selectedTimezone } = this.schedulerStore.state;\n // Validate data\n const { startTime, endTime, timezone } = data;\n const start_time = startTime || selectedTimeslot?.start_time;\n\n if (!start_time) {\n return { error: componentErrors.invalid_start_time('Please pass \"startTime\" in data or set \"selectedTimeslot\" in the defaultSchedulerState.') };\n }\n const end_time = endTime || selectedTimeslot?.end_time;\n if (!end_time) {\n return { error: componentErrors.invalid_end_time('Please pass \"endTime\" in data or set \"selectedTimeslot\" in the defaultSchedulerState.') };\n }\n const time_zone = timezone || selectedTimezone;\n if (!time_zone) {\n return { error: componentErrors.invalid_timezone('Please pass \"timezone\" in data or set \"selectedTimezone\" in the defaultSchedulerState.') };\n }\n\n const primaryParticipant = data ? data?.primaryParticipant : bookingInfo?.primaryParticipant;\n const guests = data ? data?.guests || [] : bookingInfo?.guests || [];\n const additional_fields = data ? { ...data?.additionalFields, guests } : { ...bookingInfo?.additionalFields, guests };\n\n const configIdParam = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : '';\n const url = `/v3/scheduling/bookings/${bookingId}${configIdParam}`;\n const headers = this.getHeaders();\n const response = await this.makeAPIRequest<NylasEvent>(\n decodeURIComponent(url),\n 'PATCH',\n JSON.stringify({\n start_time: start_time.getTime() / 1000,\n end_time: end_time.getTime() / 1000,\n time_zone,\n additional_fields,\n guest: { ...primaryParticipant },\n }),\n headers,\n );\n\n if ('error' in response) {\n this.schedulerStore.set('isLoading', false);\n const errorType = response.error?.type;\n let error = response.error;\n if (errorType && errorType in apiErrors) {\n const errorMessage = this.getErrorMessage(error);\n error = apiErrors[errorType as APIErrorType](errorMessage);\n }\n return { error };\n }\n\n const eventInfo = this.schedulerStore.get('reschedulingEventInfo');\n if ('data' in response) {\n this.schedulerStore.set('eventInfo', response?.data);\n } else if (eventInfo) {\n this.schedulerStore.set('eventInfo', eventInfo);\n } else {\n // We should technically never reach this point\n const event = {\n booking_id: bookingId,\n } as NylasEvent;\n this.schedulerStore.set('eventInfo', event);\n }\n\n this.schedulerStore.set('isLoading', false);\n return response;\n }\n}\n","import { DataState, NylasEvent } from '@/common/types';\nimport { debug } from '@/utils/utils';\nimport { NylasSchedulerBookingData, Timeslot } from '@nylas/core';\nimport { createStore } from '@stencil/store';\n\nexport type AvailabilityTimeslot = {\n emails: string[];\n start_time: Date;\n end_time: Date;\n};\n\nexport type LoadingState = {\n api: 'availability' | 'createBooking' | 'cancelBooking' | 'rescheduleBooking';\n};\n\nexport type ConfigSettings = {\n scheduler: {\n available_days_in_future: number;\n min_cancellation_notice: number;\n min_booking_notice: number;\n rescheduling_url?: string;\n cancellation_url?: string;\n cancellation_policy?: string;\n hide_additional_guests?: boolean;\n hide_cancellation_options?: boolean;\n hide_rescheduling_options?: boolean;\n };\n organizer: {\n name: string;\n email: string;\n };\n};\n\nexport interface NylasSchedulerStoreState {\n selectedDate: Date | null;\n selectedLanguage: string;\n selectedTimezone: string;\n selectedTimeslot: Timeslot | null;\n showBookingForm: boolean;\n selectableDates: Date[] | null;\n eventDuration: number;\n availability: AvailabilityTimeslot[];\n state: DataState;\n eventInfo: NylasEvent | null;\n cancelledEventInfo: Partial<NylasEvent> | null;\n reschedulingEventInfo?: NylasEvent;\n bookingInfo?: NylasSchedulerBookingData;\n rescheduleBookingId?: string;\n cancelBookingId?: string;\n isLoading: boolean;\n nylasBranding?: boolean;\n configSettings?: ConfigSettings;\n}\n\nexport type NylasSchedulerStoreType = ReturnType<typeof CreateNylasSchedulerStore>;\n\nexport function CreateNylasSchedulerStore(defaultState: Partial<NylasSchedulerStoreState> = {}) {\n const defaultNylasStoreState: NylasSchedulerStoreState = {\n selectedDate: null,\n selectedLanguage: navigator.language,\n selectedTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n selectedTimeslot: null,\n showBookingForm: false,\n selectableDates: null,\n availability: [],\n eventDuration: 0,\n state: 'ready',\n eventInfo: null,\n cancelledEventInfo: null,\n isLoading: false,\n nylasBranding: true,\n ...defaultState,\n };\n debug(`[defaultNylasStoreState]: `, defaultNylasStoreState);\n const store = createStore<NylasSchedulerStoreState>(defaultNylasStoreState);\n\n store.onChange('availability', availability => {\n debug(`[availability]: `, availability);\n const selectableDates = availability.map(timeslot => timeslot.start_time);\n debug(`[selectableDates]: `, selectableDates);\n store.set('selectableDates', selectableDates);\n const timeslot = availability[0];\n if (!timeslot) return;\n const durationMinutes = Math.floor((timeslot.end_time.getTime() - timeslot.start_time.getTime()) / 60000);\n debug(`[durationMinutes]: `, durationMinutes);\n store.set('eventDuration', durationMinutes);\n });\n\n /**\n * Reset the Nylas store to its default state.\n * There is something wrong with the stencil/store reset method,\n * so we have to do it via this hack.\n */\n store.reset = () => {\n for (const key in defaultNylasStoreState) {\n const value = defaultNylasStoreState[key as keyof typeof defaultNylasStoreState];\n store.set(key as any, value);\n }\n };\n\n return store;\n}\n"],"mappings":"mFAAYA,GAAZ,SAAYA,GACVA,EAAA,yBACAA,EAAA,aACAA,EAAA,cACD,EAJD,CAAYA,MAAa,KAYzB,IAAYC,GAAZ,SAAYA,GACVA,EAAA,iDACAA,EAAA,qCACAA,EAAA,+CACAA,EAAA,+CACAA,EAAA,iCACAA,EAAA,2CACAA,EAAA,uCACAA,EAAA,sCACD,EATD,CAAYA,MAAkB,KAW9B,IAAYC,GAAZ,SAAYA,GACVA,EAAA,qCACAA,EAAA,iCACAA,EAAA,mCACAA,EAAA,iDACAA,EAAA,mDACAA,EAAA,mCACAA,EAAA,oCACD,EARD,CAAYA,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Ae,QACZf,GAELgB,EAAM,6BAA8Bf,GACpC,MAAMgB,EAAQC,EAAsCjB,GAEpDgB,EAAME,SAAS,gBAAgBpC,IAC7BiC,EAAM,mBAAoBjC,GAC1B,MAAM4B,EAAkB5B,EAAaE,KAAI7C,GAAYA,EAASC,aAC9D2E,EAAM,sBAAuBL,GAC7BM,EAAM5G,IAAI,kBAAmBsG,GAC7B,MAAMvE,EAAW2C,EAAa,GAC9B,IAAK3C,EAAU,OACf,MAAMgF,EAAkBzF,KAAKC,OAAOQ,EAASoB,SAAS/B,UAAYW,EAASC,WAAWZ,WAAa,KACnGuF,EAAM,sBAAuBI,GAC7BH,EAAM5G,IAAI,gBAAiB+G,EAAgB,IAQ7CH,EAAMI,MAAQ,KACZ,IAAK,MAAMC,KAAOrB,EAAwB,CACxC,MAAMtF,EAAQsF,EAAuBqB,GACrCL,EAAM5G,IAAIiH,EAAY3G,E,GAI1B,OAAOsG,CACT,Q"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e,c as n,H as a,a as i}from"./p-68c2fadf.js";import{R as s}from"./p-795b324a.js";import{a as o,o as r,q as c}from"./p-6c11737d.js";import{D as l}from"./p-49f716ed.js";import"./p-02aa5f03.js";import"./p-cb65c223.js";const d=".sc-google-logo-icon-h{display:flex}";const b=d;const p=class{constructor(e){t(this,e);this.width="24";this.height="24"}render(){return e("svg",{key:"b0c9718f5f01c5044903623eebb3571312ac24bc",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{key:"08dcea5b87c9a8827a9ec7cf601d9700466afd20","clip-path":"url(#clip0_959_12452)"},e("path",{key:"377b1661c4681b7ad4cc2cddca5014089c4985e7",d:"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z",fill:"#4285F4"}),e("path",{key:"eb702cbeab32760d345abd0b22a69ab80101e91e",d:"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z",fill:"#34A853"}),e("path",{key:"f4b63840df9d63578200b31d2fdeed01fc2936cb",d:"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z",fill:"#FBBC05"}),e("path",{key:"ed489ed4d0cd1752264c606f24437fd3b532ae5a",d:"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z",fill:"#EA4335"})),e("defs",{key:"64991a75a0fe81dba956a25df61fb24d7cccb347"},e("clipPath",{key:"180a55c33c0e44ab2d2c62da946268edb7d726b6",id:"clip0_959_12452"},e("rect",{key:"3c85275b794ae89644790e51068fe930107305bf",width:24,height:24,fill:"white"}))))}};p.style=b;const f=".sc-microsoft-logo-icon-h{display:flex}";const h=f;const u=class{constructor(e){t(this,e);this.width="22";this.height="22"}render(){return e("svg",{key:"fad3ad1663c9fa006764a9873dff66dbd772107f",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"0293a62b04ae54a69ea09b43af00bd668799c425",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),e("path",{key:"467b9b055af0cdf8381bba492d37381373eb9129",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),e("path",{key:"293446329fc3900cba58a7145410bf8b7ef96e02",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),e("path",{key:"bb37a2d435d9184dafc6adaf86558067a87b9c08",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};u.style=h;function y({id:t,formState:n,activeTab:a,calendars:i}){switch(a){case"eventInfo":const a=n.title;const s=n.description;const o=parseInt(n.duration);const r=n.location;return e("div",{key:t},e("nylas-event-info",null,e("div",{slot:"inputs"},e("nylas-event-title",{name:"title",eventTitle:a,exportparts:"net, net__title, net__dropdown-content"}),e("nylas-event-duration",{name:"duration",eventDurationMinutes:o,exportparts:"ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content"}),e("nylas-event-location",{name:"location",eventLocation:r,exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),e("nylas-event-description",{name:"description",eventDescription:s,exportparts:"nedesc, nedesc__textarea"}))));case"availability":const c=n.availability.openHours;const l=n.availability.timezone?n.availability.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone;const d=n.participants?.find((t=>t.is_organizer));const b=d?.email??"primary";const p=n.calendarIds.length>0?n.calendarIds:[b];const f=n.bookingCalendar=="primary"?b:n.bookingCalendar;return e("div",{key:t},e("nylas-booking-calendar-picker",{name:"booking-calendar",calendars:i??[],defaultBookingCalendar:f,exportparts:"nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content"}),e("nylas-calendar-picker",{name:"calendars",calendars:i??[],defaultSelectedCalendars:p,exportparts:"ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content"}),e("nylas-availability-picker",{name:"availability",openHours:c,defaultTimezone:l,exportparts:"nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times"}));case"bookingOptions":return e("div",{key:t},e("nylas-buffer-time",{name:"buffer-time",buffer:n.buffer,exportparts:"nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview"}),e("nylas-event-limits",null,e("div",{slot:"inputs"},e("nylas-min-booking-notice",{name:"min-booking-notice",minBookingNotice:n.minBookingNotice,exportparts:"nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content"}),e("nylas-limit-future-bookings",{name:"limit-future-bookings",availableDaysInFuture:n.availableDaysInFuture,exportparts:"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content"}),e("nylas-min-cancellation-notice",{name:"min-cancellation-notice",minCancellationNotice:n.minCancellationNotice,exportparts:"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content"}),e("nylas-cancellation-policy",{name:"cancellation-policy",cancellationPolicy:n.cancellationPolicy,exportparts:"ncpolicy, ncpolicy__textarea"}))),e("nylas-timeslot-interval",{name:"timeslot-interval",eventDurationMinutes:parseInt(n.duration),exportparts:"nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content"}),e("nylas-customize-booking-settings",{name:"customize-booking-settings",exportparts:"ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options"}));case"participants":return e("div",{key:t},e("nylas-additional-participants",{name:"participants",eventParticipants:n.participants,exportparts:"nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant"}),e("nylas-participants-custom-availability",{name:"participant-custom-availability",participants:n.participants,exportparts:"npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider"}))}}const g='.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{height:554px;display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group;height:auto}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px;overflow-y:auto}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs{width:inherit}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.footer.sc-nylas-editor-tabs{display:flex;justify-content:space-between;align-items:center;gap:1rem;min-height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs{flex-direction:column;height:auto}}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .preview.sc-nylas-editor-tabs{margin-top:1rem;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;justify-self:flex-end;gap:1rem}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs{flex-direction:column-reverse;width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.sc-nylas-editor-tabs{max-width:524px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error.sc-nylas-editor-tabs{color:var(--nylas-error)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs p.error-full-width.sc-nylas-editor-tabs{max-width:660px}@media screen and (max-width: 768px){.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button-component.sc-nylas-editor-tabs{width:100%}}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs .buttons.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}';const m=g;var _=undefined&&undefined.__decorate||function(t,e,n,a){var i=arguments.length,s=i<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,n):a,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,e,n,a);else for(var r=t.length-1;r>=0;r--)if(o=t[r])s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s;return i>3&&s&&Object.defineProperty(e,n,s),s};var v=undefined&&undefined.__metadata||function(t,e){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(t,e)};const w=class{constructor(e){t(this,e);this.schedulerConfigChanged=n(this,"schedulerConfigChanged",7);this.cancelButtonClick=n(this,"cancelButtonClick",7);this.formSubmitted=n(this,"formSubmitted",7);this.previewButtonClicked=n(this,"previewButtonClicked",7);this.setError=t=>{this.error=t.message};this.formSubmissionHandler=async t=>{t.preventDefault();this.formSubmitted.emit();const e=this.formRef.checkValidity();if(!e){return}this.isLoading=true;this.hasUnsavedChanges=false;const n=this.updateFormState();const{title:a,description:i,duration:s,availability:o,calendarIds:c,bookingCalendar:d,location:b,bookingType:p,buffer:f,availableDaysInFuture:h,minCancellationNotice:u,minBookingNotice:y,cancellationPolicy:g,timeslotInterval:m,additionalGuestsHidden:_,hideCancellationOptions:v,hideReschedulingOptions:w,participants:k,participantOpenHours:x}=n;const C=this.selectedConfiguration?.participants?.find((t=>t.is_organizer));const H=s?parseInt(s):30;const S=k&&k?.length>0?k:[{name:C?.name??this.currentUser?.name??C?.email??this.currentUser?.email??"",email:C?.email??this.currentUser?.email??"",is_organizer:true,availability:{calendar_ids:c?.length?c:["primary"],open_hours:[]},booking:{calendar_id:d&&d!==""?d:"primary"}}];const I={...this.selectedConfiguration?.id&&{id:this.selectedConfiguration.id},version:this.selectedConfiguration?.version??"1.0.0",availability:{duration_minutes:H,interval_minutes:m?.interval??H,round_to:m?.roundTo,availability_rules:{availability_method:this.selectedConfiguration?.availability?.availability_rules?.availability_method??"collective",buffer:f||{before:0,after:0},default_open_hours:o?.openHours??this.selectedConfiguration?.availability?.availability_rules?.default_open_hours??l,round_robin_group_id:this.selectedConfiguration?.availability?.availability_rules?.round_robin_group_id??""}},participants:[...S?.map((t=>{if(t.is_organizer){return{name:t.name??t.email,email:t.email,is_organizer:true,availability:{calendar_ids:c?.length?c:["primary"],open_hours:x?.[t.email]??t.availability?.open_hours??[]},booking:{calendar_id:d&&d!==""?d:"primary"}}}return{...t,availability:{calendar_ids:t.availability?.calendar_ids??["primary"],open_hours:x?.[t.email]??t.availability?.open_hours??[]}}}))],event_booking:{title:a?.toString()??"",description:i?.toString()??"",location:b?.toString()??"",booking_type:p?.toString()??"booking",timezone:o?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone},scheduler:{cancellation_policy:g??"",available_days_in_future:h??30,min_cancellation_notice:u??0,min_booking_notice:y??60,hide_additional_guests:_??false,hide_cancellation_options:v??false,hide_rescheduling_options:w??false}};const j=r(I,this.selectedConfiguration);const B=this.action==="create"?j:I;const L=t=>{this.isLoading=false;this.changesSaved=true;setTimeout((()=>{this.changesSaved=false}),5e3)};this.schedulerConfigChanged.emit({config:B,resetLoadingState:L,setError:this.setError,action:this.action})};this.calendars=undefined;this.selectedConfiguration=undefined;this.currentUser=undefined;this.schedulerPreviewLink="";this.mode="app";this.action="create";this.activeTab="eventInfo";this.isLoading=false;this.hasUnsavedChanges=false;this.changesSaved=false;this.formState={};this.error=""}configChangedHandler(t){o("[nylas-editor-tabs]","configChangedHandler",t,this.selectedConfiguration);this.formState={...this.getFormStateFromConfig(t)};if(t.id){this.action="edit"}else{this.action="create"}}connectedCallback(){o("[nylas-editor-tabs]","connectedCallback")}componentWillLoad(){o("[nylas-editor-tabs]","componentWillLoad");this.formState=this.getFormStateFromConfig(this.selectedConfiguration)}componentDidLoad(){o("[nylas-editor-tabs]","componentDidLoad")}disconnectedCallback(){o("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(t){o("[nylas-editor-tabs]","handleValueChanged",t);const{name:e,value:n}=t.detail;this.setFormState(n,e);this.formState={...this.formState};this.hasUnsavedChanges=true;this.error=""}getFormStateFromConfig(t){const e=t?.participants?.find((t=>t.is_organizer));return{title:t?.event_booking?.title??"",description:t?.event_booking?.description??"",duration:t?.availability?.duration_minutes?.toString()??"30",availability:{timezone:t?.event_booking?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone,openHours:t?.availability?.availability_rules?.default_open_hours??l},calendarIds:e?.availability?.calendar_ids??[],participants:t?.participants??[],bookingCalendar:e?.booking?.calendar_id??e?.email??"",location:t?.event_booking?.location??"",bookingType:t?.event_booking?.booking_type??"booking",buffer:t?.availability?.availability_rules?.buffer??{before:0,after:0},cancellationPolicy:t?.scheduler?.cancellation_policy??"",availableDaysInFuture:t?.scheduler?.available_days_in_future??30,minCancellationNotice:t?.scheduler?.min_cancellation_notice??0,minBookingNotice:t?.scheduler?.min_booking_notice??60,timeslotInterval:{interval:t?.availability?.interval_minutes??t?.availability?.duration_minutes??10,roundTo:t?.availability?.round_to},additionalGuestsHidden:t?.scheduler?.hide_additional_guests??false,hideCancellationOptions:t?.scheduler?.hide_cancellation_options??false,hideReschedulingOptions:t?.scheduler?.hide_rescheduling_options??false}}setFormState(t,e){switch(e){case"title":this.formState.title=t.toString();break;case"description":this.formState.description=t.toString();break;case"duration":this.formState.duration=t.toString();break;case"availability":this.formState.availability=JSON.parse(t.toString());break;case"participants":this.formState.participants=JSON.parse(t.toString());break;case"calendars":this.formState.calendarIds=t.toString().split(",");break;case"booking-calendar":this.formState.bookingCalendar=t.toString();break;case"location":this.formState.location=t.toString();break;case"booking-type":this.formState.bookingType=t.toString();break;case"buffer-time":this.formState.buffer=JSON.parse(t.toString());break;case"limit-future-bookings":this.formState.availableDaysInFuture=parseInt(t.toString());break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(t.toString());break;case"min-booking-notice":this.formState.minBookingNotice=parseInt(t.toString());break;case"cancellation-policy":this.formState.cancellationPolicy=t.toString();break;case"timeslot-interval":this.formState.timeslotInterval=JSON.parse(t.toString());break;case"customize-booking-settings":const e=JSON.parse(t.toString());this.formState.additionalGuestsHidden=e.additionalGuestsHidden;this.formState.hideCancellationOptions=e.hideCancellationOptions;this.formState.hideReschedulingOptions=e.hideReschedulingOptions;break;case"participant-custom-availability":const n=JSON.parse(t.toString());this.formState.participantOpenHours=n;break}}updateFormState(){const t=new FormData(this.formRef);t.forEach(((t,e)=>{this.setFormState(t,e)}));this.formState={...this.formState};return this.formState}setActiveTab(t,e){t.preventDefault();this.updateFormState();this.activeTab=e}render(){o("[nylas-editor-tabs]","render",this.formState);const t=localStorage.getItem("nylas")==="Nylas Developer";return e(a,{key:"4b1ff2dd2a2bc6a70f601a34567ad2995d9dd66e"},e("form",{key:"3891f63b1d8cfab3399506b877a97da2dc6a1f83",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:t=>this.formRef=t,noValidate:true},this.mode==="app"?e("div",{class:"form-contents"},e("div",{class:"tabs"},e("button",{class:{tab:true,active:this.activeTab=="eventInfo"},onClick:t=>this.setActiveTab(t,"eventInfo")},e("calendar-info-icon",{width:"16",height:"16"}),"Event Info"),e("button",{class:{tab:true,active:this.activeTab=="availability"},onClick:t=>this.setActiveTab(t,"availability")},e("calendar-patterns-icon",{width:"16",height:"16"}),"Availability"),e("button",{class:{tab:true,active:this.activeTab=="bookingOptions"},onClick:t=>this.setActiveTab(t,"bookingOptions")},e("flow-icon",{width:"16",height:"16"}),"Booking Options"),t&&e("button",{class:{tab:true,active:this.activeTab=="participants"},onClick:t=>this.setActiveTab(t,"participants")},e("people-icon",{width:"16",height:"16"}),"Participants")),e("div",{class:"tab-content"},e(y,{formState:this.formState,activeTab:this.activeTab,calendars:this.calendars,id:this.selectedConfiguration?.id??"new"}))):e("slot",null),e("div",{key:"009ce40665a55e01c31d61bdf3a5459ea33b1e62",class:"footer"},e("div",{key:"8dfd2454f99a21722c793c60d5b7a8c190fb6aac",class:"preview"},this.schedulerPreviewLink!==""&&this.action==="edit"&&e("button-component",{type:"button",disabled:this.isLoading,clickHandler:t=>{t.preventDefault();const e=this.previewButtonClicked.emit(this.host);if(!e.defaultPrevented){window.open(c(this.schedulerPreviewLink,this.selectedConfiguration),"_blank")}},variant:"basic"},"Preview")),e("div",{key:"3c559d35e38c9e559c334c56ff119ac0ffa663b2",class:"buttons"},e("p",{key:"4d14766e8517fc07b64f17a0f5bbf067e1768b98",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved,error:this.error!=="","error-full-width":this.error!==""&&this.action==="create"}},this.error!==""?this.error:"",this.error==""&&this.hasUnsavedChanges&&!this.changesSaved?"Unsaved changes":this.error==""&&this.changesSaved?"Changes saved!":""),e("button-component",{key:"8ab2e56508f8ecff92b912eb9c29a7ab3d2b6208",type:"button",disabled:this.isLoading,clickHandler:t=>{t.preventDefault();this.cancelButtonClick.emit();this.error=""},variant:"basic"},"Cancel"),e("button-component",{key:"767c857c8dc9be7ebb9a89b457c517a6d0c59b5f",type:"submit",disabled:this.isLoading},this.isLoading?e("span",null,"Saving",e("loading-icon",null)," "):this.action=="create"?"Create":"Save changes")))))}get host(){return i(this)}static get watchers(){return{selectedConfiguration:["configChangedHandler"]}}};_([s({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.currentUser","currentUser"]]),eventToProps:{schedulerConfigChanged:async(t,e)=>{const{resetLoadingState:n,setError:a,action:i,config:s}=t.detail;const o=e=>{const[i,s]=e;if(!i&&s&&a){a(s)}if(n){n(t)}};if(i==="edit"){const t=await e.schedulerConfig.updateConfiguration(s);o(t)}else{const t=await e.schedulerConfig.createConfiguration(s);o(t)}},cancelButtonClick:async(t,e)=>{e.schedulerConfigStore.state.action=null},previewButtonClicked:async(t,e)=>{o("[nylas-editor-tabs]","previewButtonClicked",e)},formSubmitted:async(t,e)=>{o("[nylas-editor-tabs]","formSubmitted",e)}},localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),fireRegisterEvent:true}),v("design:type",Function),v("design:paramtypes",[]),v("design:returntype",void 0)],w.prototype,"render",null);w.style=m;const k=':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:1rem;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;overflow-y:auto}.configurations table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations table.no-configurations{height:100%}.configurations table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations table tr:last-of-type{border-bottom:0}.configurations table tr.hide{display:none}.configurations table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations table th.actions-header{text-align:right}.configurations table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations table th,.configurations table td{text-align:left;padding:1rem;font-family:inherit}.configurations table .actions{text-align:right}.configurations table .actions{display:flex;justify-content:flex-end;gap:1rem}@media screen and (max-width: 768px){.configurations table .actions{flex-direction:column;gap:0.5rem}}.configurations table .title{display:flex;flex-direction:column}.configurations table .title .config-event-title{font-weight:600}.configurations table .title .config-event-description{font-size:0.75rem}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}';const x=k;var C=undefined&&undefined.__decorate||function(t,e,n,a){var i=arguments.length,s=i<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,n):a,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,e,n,a);else for(var r=t.length-1;r>=0;r--)if(o=t[r])s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s;return i>3&&s&&Object.defineProperty(e,n,s),s};var H=undefined&&undefined.__metadata||function(t,e){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(t,e)};const S=class{constructor(e){t(this,e);this.initListConfigurations=n(this,"initListConfigurations",7);this.createButtonClick=n(this,"createButtonClick",7);this.editButtonClick=n(this,"editButtonClick",7);this.deleteButtonClick=n(this,"deleteButtonClick",7);this.configurations=[];this.schedulerPreviewLink="";this.state="loading";this.error="";this.copiedButtonIndex=-1}connectedCallback(){o("[nylas-list-configurations]","connectedCallback")}componentWillLoad(){o("[nylas-list-configurations]","componentWillLoad");if(this.configurations&&this.configurations.length>0){this.state="loaded"}}componentDidLoad(){o("[nylas-list-configurations]","componentDidLoad");this.initListConfigurations.emit(this.host)}disconnectedCallback(){o("[nylas-list-configurations]","disconnectedCallback")}async getState(){return this.state}async setState(t){this.state=t}async setError(t){this.error=t}getDurationString(t){const e=Math.floor(t/60);const n=t%60;return`${e?e:""} ${e?`${e>1?"hours":"hour"}`:""} ${n?n:""} ${n?`${n>1?"mins":"min"}`:""}`}render(){return e(a,null,e("div",{class:"header"},e("div",{class:"description"},e("h2",null,"All scheduling pages"),e("p",null,"Create, edit and manage all your scheduling pages.")),this.configurations&&this.configurations.length>0&&e("div",{class:"actions"},e("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new"))),e("div",{class:"configurations"},e("table",{class:{"no-configurations":this.state!=="loading"&&(!this.configurations||this.configurations.length===0)}},e("tr",{class:{hide:this.state==="loading"||this.configurations&&this.configurations.length===0}},e("th",null,"Scheduling page title"),e("th",null,"Duration"),e("th",{class:"actions-header"},"Actions")),this.state==="loading"&&e("tr",{class:"no-configurations"},e("td",{colSpan:3},e("div",null,e("h3",null,"Loading..."),e("p",null,"Please wait while we fetch the scheduling pages")))),this.state!=="loading"&&(!this.configurations||this.configurations.length===0)&&e("tr",{class:"no-configurations"},e("td",{colSpan:3},e("div",null,e("calendar-icon",{width:"48",height:"48"}),e("h3",null,"No scheduling pages found"),e("p",null,"Get started with creating your first scheduling page"),e("button-component",{clickHandler:()=>{this.createButtonClick.emit(this.host)}},"Create new")))),this.state!=="loading"&&this.configurations.map(((t,n)=>e("tr",{key:t.id},e("td",null,e("div",{class:"title"},e("span",{class:"config-event-title"},t.event_booking.title),e("span",{class:"config-event-description"},t.event_booking.description))),e("td",null,e("div",null,this.getDurationString(t.availability.duration_minutes))),e("td",null,e("div",{class:"actions"},e("button-component",{variant:"basic",id:"copy",key:`copy-${n}`,clickHandler:async e=>{e.preventDefault();const a=c(this.schedulerPreviewLink,t);await navigator.clipboard.writeText(a);this.copiedButtonIndex=n;setTimeout((()=>{this.copiedButtonIndex=-1}),3e3)}},this.copiedButtonIndex===n?"Copied!":"Copy link"),e("button-component",{variant:"basic",key:`edit-${n}`,clickHandler:e=>{e.preventDefault();this.editButtonClick.emit({host:this.host,configuration:t})}},"Edit"),e("button-component",{variant:"basic",key:`delete-${n}`,clickHandler:e=>{e.preventDefault();this.deleteButtonClick.emit({host:this.host,configuration:t})}},"Delete")))))))),this.state==="error"&&e("div",{class:"error-container"},e("p",{class:"error"},this.error)))}get host(){return i(this)}};C([s({name:"nylas-list-configurations",stateToProps:new Map([["schedulerConfig.configurations","configurations"]]),localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),eventToProps:{initListConfigurations:async(t,e)=>{const n=t.detail;await n.setState("loading");const[a,i]=await e.schedulerConfig.getConfigurations();if(!a&&i&&i.message){await n.setState("error");await n.setError(i.message);return}await n.setState("loaded")},createButtonClick:async(t,e)=>{e.schedulerConfigStore.resetSelectedConfiguration();e.schedulerConfigStore.state.action="create"},deleteButtonClick:async(t,e)=>{const{host:n,configuration:a}=t.detail;const[i,s]=await e.schedulerConfig.deleteConfiguration(a.id);if(!i&&s&&s.message){await n.setState("error");await n.setError(s.message)}},editButtonClick:async(t,e)=>{const{configuration:n}=t.detail;e.schedulerConfigStore.state.selectedConfiguration=n;e.schedulerConfigStore.state.action="edit"}},fireRegisterEvent:true}),H("design:type",Function),H("design:paramtypes",[]),H("design:returntype",void 0)],S.prototype,"render",null);S.style=x;export{p as google_logo_icon,u as microsoft_logo_icon,w as nylas_editor_tabs,S as nylas_list_configurations};
|
|
2
|
-
//# sourceMappingURL=p-83444c0a.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["iconCss","GoogleLogoIconStyle0","GoogleLogoIcon","render","h","key","width","this","height","viewBox","fill","xmlns","d","id","MicrosoftLogoIconStyle0","MicrosoftLogoIcon","TabContents","formState","activeTab","calendars","eventTitle","title","eventDescription","description","eventDuration","parseInt","duration","location","slot","name","exportparts","eventDurationMinutes","eventLocation","openHours","availability","timezone","Intl","DateTimeFormat","resolvedOptions","timeZone","organizer","participants","find","p","is_organizer","organizerEmail","email","selectedCalendars","calendarIds","length","bookingCalendar","defaultBookingCalendar","defaultSelectedCalendars","defaultTimezone","buffer","minBookingNotice","availableDaysInFuture","minCancellationNotice","cancellationPolicy","eventParticipants","nylasEditorTabsCss","NylasEditorTabsStyle0","NylasEditorTabs","setError","error","message","formSubmissionHandler","async","event","preventDefault","formSubmitted","emit","valid","formRef","checkValidity","isLoading","hasUnsavedChanges","updateFormState","bookingType","timeslotInterval","additionalGuestsHidden","hideCancellationOptions","hideReschedulingOptions","participantOpenHours","selectedConfiguration","durationMinutes","participantsList","currentUser","calendar_ids","open_hours","booking","calendar_id","configObject","version","duration_minutes","interval_minutes","interval","round_to","roundTo","availability_rules","availability_method","before","after","default_open_hours","DEFAULT_OPEN_HOURS","round_robin_group_id","map","event_booking","toString","booking_type","scheduler","cancellation_policy","available_days_in_future","min_cancellation_notice","min_booking_notice","hide_additional_guests","hide_cancellation_options","hide_rescheduling_options","configObjectWithDeveloperSettings","mergeDeep","finalConfig","action","resetLoadingState","_e","changesSaved","setTimeout","schedulerConfigChanged","config","configChangedHandler","newConfig","debug","getFormStateFromConfig","connectedCallback","componentWillLoad","componentDidLoad","disconnectedCallback","handleValueChanged","value","detail","setFormState","organizerParticipant","JSON","parse","split","settings","formData","FormData","forEach","setActiveTab","e","tabName","showParticipantsTab","localStorage","getItem","Host","onSubmit","class","ref","el","noValidate","mode","tab","active","onClick","schedulerPreviewLink","type","disabled","clickHandler","previewEvent","previewButtonClicked","host","defaultPrevented","window","open","parsePreviewLink","variant","cancelButtonClick","__decorate","RegisterComponent","stateToProps","Map","eventToProps","nylasSchedulerConfigConnector","checkForErrors","response","data","schedulerConfig","updateConfiguration","createConfiguration","_","schedulerConfigStore","state","localPropsToProp","fireRegisterEvent","nylasListConfigurationsCss","NylasListConfigurationsStyle0","NylasListConfigurations","configurations","initListConfigurations","getState","setState","getDurationString","hours","Math","floor","minutes","createButtonClick","hide","colSpan","i","link","navigator","clipboard","writeText","copiedButtonIndex","editButtonClick","configuration","deleteButtonClick","connector","getConfigurations","resetSelectedConfiguration","deleteConfiguration"],"sources":["src/common/icons/icon.css?tag=google-logo-icon&encapsulation=scoped","src/common/icons/google-logo.tsx","src/common/icons/icon.css?tag=microsoft-logo-icon&encapsulation=scoped","src/common/icons/microsoft-logo.tsx","src/components/scheduler-editor/nylas-editor-tabs/tab-contents.tsx","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.scss?tag=nylas-editor-tabs&encapsulation=scoped","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.tsx","src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.scss?tag=nylas-list-configurations&encapsulation=shadow","src/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.tsx"],"sourcesContent":[":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'google-logo-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class GoogleLogoIcon {\n @Prop() width: string = '24';\n @Prop() height: string = '24';\n\n render() {\n // Spam icon svg\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_959_12452)\">\n <path\n d=\"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z\"\n fill=\"#4285F4\"\n />\n <path\n d=\"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z\"\n fill=\"#34A853\"\n />\n <path\n d=\"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z\"\n fill=\"#FBBC05\"\n />\n <path\n d=\"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z\"\n fill=\"#EA4335\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_959_12452\">\n <rect width={24} height={24} fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n );\n }\n}\n",":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'microsoft-logo-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class MicrosoftLogoIcon {\n @Prop() width: string = '22';\n @Prop() height: string = '22';\n\n render() {\n // Spam icon svg\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 22 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z\" fill=\"#F35325\" />\n <path d=\"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z\" fill=\"#81BC06\" />\n <path d=\"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z\" fill=\"#05A6F0\" />\n <path d=\"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z\" fill=\"#FFBA08\" />\n </svg>\n );\n }\n}\n","import { h } from '@stencil/core';\n\nexport type TabContentsProps = {\n id: string;\n formState: any;\n activeTab: string;\n calendars?: any[];\n};\n\nexport default function TabContents({ id, formState, activeTab, calendars }: TabContentsProps) {\n switch (activeTab) {\n case 'eventInfo':\n const eventTitle = formState.title;\n const eventDescription = formState.description;\n const eventDuration = parseInt(formState.duration);\n const location = formState.location;\n\n return (\n <div key={id}>\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title name=\"title\" eventTitle={eventTitle} exportparts=\"net, net__title, net__dropdown-content\" />\n <nylas-event-duration\n name=\"duration\"\n eventDurationMinutes={eventDuration}\n exportparts=\"ned, ned__dropdown, ned__dropdown-button, ned__dropdown-content, ned__input_dropdown, ned__input_dropdown-input, ned__input_dropdown-content\"\n />\n <nylas-event-location name=\"location\" eventLocation={location} exportparts=\"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content\" />\n <nylas-event-description name=\"description\" eventDescription={eventDescription} exportparts=\"nedesc, nedesc__textarea\" />\n </div>\n </nylas-event-info>\n </div>\n );\n case 'availability':\n const openHours = formState.availability.openHours;\n const timezone = formState.availability.timezone ? formState.availability.timezone : Intl.DateTimeFormat().resolvedOptions().timeZone;\n const organizer = formState.participants?.find(p => p.is_organizer);\n const organizerEmail = organizer?.email ?? 'primary';\n const selectedCalendars = formState.calendarIds.length > 0 ? formState.calendarIds : [organizerEmail];\n const bookingCalendar = formState.bookingCalendar == 'primary' ? organizerEmail : formState.bookingCalendar;\n return (\n <div key={id}>\n <nylas-booking-calendar-picker\n name=\"booking-calendar\"\n calendars={calendars ?? []}\n defaultBookingCalendar={bookingCalendar}\n exportparts={'nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content'}\n />\n <nylas-calendar-picker\n name=\"calendars\"\n calendars={calendars ?? []}\n defaultSelectedCalendars={selectedCalendars}\n exportparts={'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content'}\n />\n <nylas-availability-picker\n name=\"availability\"\n openHours={openHours}\n defaultTimezone={timezone}\n exportparts={\n 'nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times'\n }\n />\n </div>\n );\n case 'bookingOptions':\n return (\n <div key={id}>\n <nylas-buffer-time\n name=\"buffer-time\"\n buffer={formState.buffer}\n exportparts={\n 'nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview'\n }\n />\n {/* <nylas-custom-booking-flow\n name=\"booking-type\"\n bookingType={formState.bookingType}\n exportparts={'ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content'}\n /> */}\n <nylas-event-limits>\n <div slot=\"inputs\">\n <nylas-min-booking-notice\n name=\"min-booking-notice\"\n minBookingNotice={formState.minBookingNotice}\n exportparts=\"nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content\"\n />\n <nylas-limit-future-bookings\n name=\"limit-future-bookings\"\n availableDaysInFuture={formState.availableDaysInFuture}\n exportparts=\"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content\"\n />\n <nylas-min-cancellation-notice\n name=\"min-cancellation-notice\"\n minCancellationNotice={formState.minCancellationNotice}\n exportparts=\"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content\"\n />\n <nylas-cancellation-policy name=\"cancellation-policy\" cancellationPolicy={formState.cancellationPolicy} exportparts=\"ncpolicy, ncpolicy__textarea\" />\n </div>\n </nylas-event-limits>\n <nylas-timeslot-interval\n name=\"timeslot-interval\"\n eventDurationMinutes={parseInt(formState.duration)}\n exportparts=\"nti, nti__header, nti__input-label, nti__dropdown, nti__dropdown-button, nti__dropdown-content\"\n />\n <nylas-customize-booking-settings\n name=\"customize-booking-settings\"\n exportparts=\"ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options\"\n />\n </div>\n );\n case 'participants':\n return (\n <div key={id}>\n <nylas-additional-participants\n name=\"participants\"\n eventParticipants={formState.participants}\n exportparts=\"nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant\"\n />\n <nylas-participants-custom-availability\n name=\"participant-custom-availability\"\n participants={formState.participants}\n exportparts=\"npca, npca__header, npca__content, npca__participant-container, npca__participant-title, npca__participant-toggle--container, npca__toggle-label, npca__toggle-input, npca__toggle-slider\"\n />\n </div>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.scheduler-editor {\n display: flex;\n flex-direction: column;\n .form-contents {\n height: 554px;\n display: grid;\n grid-template-columns: minmax(224px, 25%) 1fr;\n @media #{$mobile} {\n display: table-column-group;\n height: auto;\n }\n .tabs {\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-25);\n .tab {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--nylas-base-900);\n background: var(--nylas-base-0);\n border: none;\n height: 56px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n &:not(:first-of-type) {\n margin-top: 0.25rem;\n }\n &.active {\n font-weight: 600;\n background: var(--nylas-base-0);\n color: var(--nylas-primary);\n border-left: 4px solid var(--nylas-primary);\n box-shadow: 0px 1px 2px 0px #0000000f;\n box-shadow: 0px 1px 3px 0px #0000001a;\n }\n }\n }\n .tab-content {\n max-width: 692px;\n overflow-y: auto;\n nylas-event-info,\n nylas-event-limits {\n width: inherit;\n div[slot='inputs'] {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n }\n }\n }\n}\n\n.footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n min-height: 80px;\n padding: 0 1rem;\n border-top: 1px solid var(--nylas-base-200);\n @media #{$mobile} {\n flex-direction: column;\n height: auto;\n }\n .preview {\n @media #{$mobile} {\n margin-top: 1rem;\n width: 100%;\n }\n }\n .buttons {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n justify-self: flex-end;\n gap: 1rem;\n @media #{$mobile} {\n flex-direction: column-reverse;\n width: 100%;\n }\n p {\n max-width: 524px;\n &.unsaved-changes {\n color: var(--nylas-base-600);\n }\n &.saved-changes {\n color: var(--nylas-success);\n }\n &.error {\n color: var(--nylas-error);\n }\n &.error-full-width {\n max-width: 660px;\n }\n }\n\n button-component {\n @media #{$mobile} {\n width: 100%;\n }\n }\n button {\n @include primary-button;\n width: 148px;\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, mergeDeep, parsePreviewLink } from '@/utils/utils';\nimport { BookingType, Calendar, Configuration, OpenHours, Participant } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport TabContents from './tab-contents';\nimport { User } from '@/common/nylas-api-request';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\nimport { DataResponseReturnType } from '@/common/types';\n\ntype SchedulerEventDetail = {\n config: Partial<Configuration>;\n action: 'create' | 'edit';\n resetLoadingState?: (e: CustomEvent) => void;\n setError?: (error: Error) => void;\n};\n\n/**\n * The `nylas-editor-tabs` component is a UI component that displays the editor tabs for the scheduler editor.\n * @part nap__title - [nylas-additional-participants] The title of the component.\n * @part nap__subtitle - [nylas-additional-participants] The subtitle of the component.\n * @part nap__content - [nylas-additional-participants] The content of the component.\n * @part nap__input - [nylas-additional-participants] The input of the component.\n * @part nap__remove-participant - [nylas-additional-participants] The remove participant button of the component.\n * @part nap__add-participant - [nylas-additional-participants] The add participant button of the component.\n * @part nap__header - [nylas-availability-picker] The header of the availability picker\n * @part nap__select-timezone - [nylas-availability-picker] The timezone selection container\n * @part nap__select-timezone-button -[nylas-availability-picker] The timezone selection button\n * @part nap__select-timezone-dropdown-content -[nylas-availability-picker] The timezone selection dropdown content\n * @part nap__availability - [nylas-availability-picker] The availability container\n * @part nap__day - [nylas-availability-picker] The day container\n * @part nap__time-ranges - [nylas-availability-picker] The time ranges container\n * @part nap__time-range - [nylas-availability-picker] The time range container\n * @part nap__add-time-range - [nylas-availability-picker] The add time range button\n * @part nap__time-picker-container -[nylas-availability-picker] The time picker container\n * @part nap__time-picker-input - [nylas-availability-picker] The time picker input\n * @part nap__time-picker-times - [nylas-availability-picker] The time picker times\n * @part nbcp - [nylas-booking-calendar-picker] The booking calendar picker container\n * @part nbcp__header - [nylas-booking-calendar-picker] The header of the booking calendar picker\n * @part nbcp__input-label - [nylas-booking-calendar-picker] The input label of the booking calendar picker\n * @part nbcp__dropdown - [nylas-booking-calendar-picker] The dropdown container\n * @part nbcp__dropdown-button - [nylas-booking-calendar-picker] The dropdown button\n * @part nbcp__dropdown-content - [nylas-booking-calendar-picker] The dropdown content\n * @part nbt - [nylas-buffer-time] The buffer time container\n * @part nbt__header - [nylas-buffer-time] The header of the buffer time\n * @part nbt__body - [nylas-buffer-time] The body of the buffer time\n * @part nbt__dropdown-before - [nylas-buffer-time] The before buffer dropdown container\n * @part nbt__dropdown-button-before - [nylas-buffer-time] The before buffer dropdown button\n * @part nbt__dropdown-content-before - [nylas-buffer-time] The before buffer dropdown content\n * @part nbt__dropdown-after - [nylas-buffer-time] The after buffer dropdown container\n * @part nbt__dropdown-button-after - [nylas-buffer-time] The after buffer dropdown button\n * @part nbt__dropdown-content-after - [nylas-buffer-time] The after buffer dropdown content\n * @part nbt__preview - [nylas-buffer-time] The buffer time preview\n * @part ncp - [nylas-calendar-picker] The calendar picker container\n * @part ncp__header - [nylas-calendar-picker] The header of the calendar picker\n * @part ncp__dropdown - [nylas-calendar-picker] The dropdown container\n * @part ncp__dropdown-button - [nylas-calendar-picker] The dropdown button\n * @part ncp__dropdown-content - [nylas-calendar-picker] The dropdown content\n * @part ncbf - [nylas-custom-booking-flow] The custom booking flow container\n * @part ncbf__header - [nylas-custom-booking-flow] The header of the custom booking flow\n * @part ncbf__dropdown - [nylas-custom-booking-flow] The dropdown container\n * @part ncbf__dropdown-button - [nylas-custom-booking-flow] The dropdown button\n * @part ncbf__dropdown-content - [nylas-custom-booking-flow] The dropdown content\n * @part nedesc - [nylas-event-description] The event description container\n * @part nedesc__textarea - [nylas-event-description] The event description textarea\n * @part ned - [nylas-event-duration] The event duration container\n * @part ned__dropdown - [nylas-event-duration] The dropdown container for the duration increment\n * @part ned__dropdown-button - [nylas-event-duration] The dropdown button for the duration increment\n * @part ned__dropdown-content - [nylas-event-duration] The dropdown content for the duration increment\n * @part ned__input_dropdown - [nylas-event-duration] The input dropdown container for the duration minutes\n * @part ned__input_dropdown-input - [nylas-event-duration] The input for the duration minutes\n * @part ned__input_dropdown-content - [nylas-event-duration] The dropdown content for the input duration minutes\n * @part net - [nylas-event-title] The event title container\n * @part net__title - [nylas-event-title] The event title input\n * @part net__dropdown-content - [nylas-event-title] The token options container\n * @part nlfb - [nylas-limit-future-bookings] The limit future bookings container\n * @part nlfb__number-dropdown - [nylas-limit-future-bookings] The number dropdown container\n * @part nlfb__number-dropdown-button - [nylas-limit-future-bookings] The number dropdown button\n * @part nlfb__number-dropdown-content - [nylas-limit-future-bookings] The number dropdown content\n * @part nlfb__period-dropdown - [nylas-limit-future-bookings] The period dropdown container\n * @part nlfb__period-dropdown-button - [nylas-limit-future-bookings] The period dropdown button\n * @part nlfb__period-dropdown-content - [nylas-limit-future-bookings] The period dropdown content\n * @part nel - [nylas-event-location] The event location container\n * @part nel__location - [nylas-event-location] The event location input\n * @part nel__dropdown - [nylas-event-location] The dropdown container\n * @part nel__dropdown-button - [nylas-event-location] The dropdown button\n * @part nel__dropdown-content - [nylas-event-location] The dropdown content\n * @part nmbn - [nylas-min-booking-notice] The minimum booking notice container\n * @part nmbn__number-dropdown - [nylas-min-booking-notice] The number dropdown container\n * @part nmbn__number-dropdown-button - [nylas-min-booking-notice] The number dropdown button\n * @part nmbn__number-dropdown-content -[nylas-min-booking-notice] The number dropdown content\n * @part nmbn__period-dropdown - [nylas-min-booking-notice] The period dropdown container\n * @part nmbn__period-dropdown-button - [nylas-min-booking-notice] The period dropdown button\n * @part nmbn__period-dropdown-content - [nylas-min-booking-notice] The period dropdown content\n * @part nmcn - [nylas-min-cancellation-notice] The minimum cancellation notice container\n * @part nmcn__number-dropdown - [nylas-min-cancellation-notice] The number dropdown container\n * @part nmcn__number-dropdown-button - [nylas-min-cancellation-notice] The number dropdown button\n * @part nmcn__number-dropdown-content - [nylas-min-cancellation-notice] The number dropdown content\n * @part nmcn__period-dropdown - [nylas-min-cancellation-notice] The period dropdown container\n * @part nmcn__period-dropdown-button - [nylas-min-cancellation-notice] The period dropdown button\n * @part nmcn__period-dropdown-content - [nylas-min-cancellation-notice] The period dropdown content\n * @part ncpolicy - [nylas-cancellation-policy] The cancellation policy container\n * @part ncpolicy__textarea - [nylas-cancellation-policy] The cancellation policy textarea\n * @part nti - [nylas-timeslot-interval] The timeslot interval container\n * @part nti__header - [nylas-timeslot-interval] The header of the timeslot interval picker\n * @part nti__input-label - [nylas-timeslot-interval] The input label of the timeslot interval picker\n * @part nti__dropdown - [nylas-timeslot-interval] The dropdown container\n * @part nti__dropdown-button - [nylas-timeslot-interval] The dropdown button\n * @part nti__dropdown-content - [nylas-timeslot-interval] The dropdown content\n * @part npca - [nylas-participants-custom-availability] The participants custom availability container\n * @part npca__header - [nylas-participants-custom-availability] The header of the participants custom availability\n * @part npca__content - [nylas-participants-custom-availability] The content of the participants custom availability\n * @part npca__participant-container - [nylas-participants-custom-availability] The participant container\n * @part npca__participant-title - [nylas-participants-custom-availability] The participant title\n * @part npca__participant-toggle--container - [nylas-participants-custom-availability] The participant toggle container\n * @part npca__toggle-label - [nylas-participants-custom-availability] The toggle label\n * @part npca__toggle-input - [nylas-participants-custom-availability] The toggle input\n * @part npca__toggle-slider - [nylas-participants-custom-availability] The toggle slider\n * @part ncbs - [nylas-customize-booking-settings] The booking calendar picker container\n * @part ncbs__header - [nylas-customize-booking-settings] The header of the booking calendar picker\n * @part ncbs__settings - [nylas-customize-booking-settings] The settings container\n * @part ncbs__settings-div - [nylas-customize-booking-settings] The div inside the settings container that contains the checkbox and tooltip for each setting\n * @part ncbs__additional_guests - [nylas-customize-booking-settings] The additional guests setting\n * @part ncbs__cancellation_options - [nylas-customize-booking-settings] The cancellation options setting\n * @part ncbs__rescheduling_options - [nylas-customize-booking-settings] The rescheduling options setting\n */\n@Component({\n tag: 'nylas-editor-tabs',\n styleUrl: 'nylas-editor-tabs.scss',\n scoped: true,\n})\nexport class NylasEditorTabs {\n /**\n * The form reference to access the form data.\n */\n private formRef!: HTMLFormElement;\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasEditorTabsElement;\n /**\n * The list of calendars to use in the editor when configuring availability.\n */\n @Prop() calendars?: Calendar[];\n /**\n * The selected configuration to use in the editor when editing an existing configuration or creating a new one.\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * The current logged in user.\n */\n @Prop() currentUser?: User;\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use a placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n /**\n * The mode of the editor.\n * - `app`: The editor is used as a standalone app.\n * - `composable`: The editor is used as a composable component.\n */\n @Prop() mode?: 'app' | 'composable' = 'app';\n /**\n * The action to perform in the editor.\n * - `create`: Create a new configuration.\n * - `edit`: Edit an existing configuration.\n */\n @State() action: 'create' | 'edit' = 'create';\n /**\n * The active tab in the editor.\n */\n @State() activeTab: string = 'eventInfo';\n /**\n * The loading state of the editor.\n */\n @State() isLoading: boolean = false;\n /**\n * The unsaved changes state of the editor.\n */\n @State() hasUnsavedChanges: boolean = false;\n /**\n * The changes saved state of the editor.\n */\n @State() changesSaved: boolean = false;\n /**\n * The form state of the editor.\n */\n @State() formState: Partial<{\n title: string;\n description: string;\n duration: string;\n availability?: {\n timezone: string;\n openHours?: OpenHours[];\n };\n calendarIds: string[];\n participants?: Participant[];\n participantOpenHours?: { [key: string]: OpenHours[] };\n bookingCalendar?: string;\n location?: string;\n bookingType?: string;\n buffer?: { before: number; after: number };\n cancellationPolicy?: string;\n availableDaysInFuture?: number;\n minCancellationNotice?: number;\n minBookingNotice?: number;\n timeslotInterval?: {\n interval: number;\n roundTo?: number;\n };\n additionalGuestsHidden?: boolean;\n hideCancellationOptions?: boolean;\n hideReschedulingOptions?: boolean;\n }> = {};\n /**\n * The error state of the editor.\n */\n @State() error?: string = '';\n /**\n * Event emitted when the configuration is changed. This fires for both create and edit actions.\n */\n @Event() schedulerConfigChanged!: EventEmitter<SchedulerEventDetail>;\n /**\n * Event emitted when the user clicks the cancel button.\n */\n @Event() cancelButtonClick!: EventEmitter<void>;\n /**\n * Event emitted on form submission.\n */\n @Event() formSubmitted!: EventEmitter<void>;\n /**\n * Event emitted when the user clicks the preview button.\n */\n @Event() previewButtonClicked!: EventEmitter<HTMLNylasEditorTabsElement>;\n\n @Watch('selectedConfiguration')\n configChangedHandler(newConfig: Configuration) {\n debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.selectedConfiguration);\n this.formState = {\n ...this.getFormStateFromConfig(newConfig),\n };\n\n if (newConfig.id) {\n this.action = 'edit';\n } else {\n this.action = 'create';\n }\n }\n\n connectedCallback() {\n debug('[nylas-editor-tabs]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-editor-tabs]', 'componentWillLoad');\n this.formState = this.getFormStateFromConfig(this.selectedConfiguration);\n }\n\n componentDidLoad() {\n debug('[nylas-editor-tabs]', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('[nylas-editor-tabs]', 'disconnectedCallback');\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n this.setFormState(value, name);\n this.formState = { ...this.formState };\n this.hasUnsavedChanges = true;\n this.error = '';\n }\n\n getFormStateFromConfig(config?: Configuration) {\n const organizerParticipant = config?.participants?.find(p => p.is_organizer);\n return {\n title: config?.event_booking?.title ?? '',\n description: config?.event_booking?.description ?? '',\n duration: config?.availability?.duration_minutes?.toString() ?? '30',\n availability: {\n timezone: config?.event_booking?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,\n openHours: config?.availability?.availability_rules?.default_open_hours ?? DEFAULT_OPEN_HOURS,\n },\n calendarIds: organizerParticipant?.availability?.calendar_ids ?? [],\n participants: config?.participants ?? [],\n bookingCalendar: organizerParticipant?.booking?.calendar_id ?? organizerParticipant?.email ?? '',\n location: config?.event_booking?.location ?? '',\n bookingType: config?.event_booking?.booking_type ?? 'booking',\n buffer: config?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },\n cancellationPolicy: config?.scheduler?.cancellation_policy ?? '',\n availableDaysInFuture: config?.scheduler?.available_days_in_future ?? 30,\n minCancellationNotice: config?.scheduler?.min_cancellation_notice ?? 0,\n minBookingNotice: config?.scheduler?.min_booking_notice ?? 60,\n timeslotInterval: {\n interval: config?.availability?.interval_minutes ?? config?.availability?.duration_minutes ?? 10,\n roundTo: config?.availability?.round_to,\n },\n additionalGuestsHidden: config?.scheduler?.hide_additional_guests ?? false,\n hideCancellationOptions: config?.scheduler?.hide_cancellation_options ?? false,\n hideReschedulingOptions: config?.scheduler?.hide_rescheduling_options ?? false,\n };\n }\n\n setFormState(value, key) {\n switch (key) {\n case 'title':\n this.formState.title = value.toString();\n break;\n case 'description':\n this.formState.description = value.toString();\n break;\n case 'duration':\n this.formState.duration = value.toString();\n break;\n case 'availability':\n this.formState.availability = JSON.parse(value.toString());\n break;\n case 'participants':\n this.formState.participants = JSON.parse(value.toString());\n break;\n case 'calendars':\n this.formState.calendarIds = value.toString().split(',');\n break;\n case 'booking-calendar':\n this.formState.bookingCalendar = value.toString();\n break;\n case 'location':\n this.formState.location = value.toString();\n break;\n case 'booking-type':\n this.formState.bookingType = value.toString();\n break;\n case 'buffer-time':\n this.formState.buffer = JSON.parse(value.toString());\n break;\n case 'limit-future-bookings':\n this.formState.availableDaysInFuture = parseInt(value.toString());\n break;\n case 'min-cancellation-notice':\n this.formState.minCancellationNotice = parseInt(value.toString());\n break;\n case 'min-booking-notice':\n this.formState.minBookingNotice = parseInt(value.toString());\n break;\n case 'cancellation-policy':\n this.formState.cancellationPolicy = value.toString();\n break;\n case 'timeslot-interval':\n this.formState.timeslotInterval = JSON.parse(value.toString());\n break;\n case 'customize-booking-settings':\n const settings = JSON.parse(value.toString());\n this.formState.additionalGuestsHidden = settings.additionalGuestsHidden;\n this.formState.hideCancellationOptions = settings.hideCancellationOptions;\n this.formState.hideReschedulingOptions = settings.hideReschedulingOptions;\n break;\n case 'participant-custom-availability':\n const participantOpenHours = JSON.parse(value.toString());\n this.formState.participantOpenHours = participantOpenHours;\n break;\n }\n }\n\n updateFormState() {\n const formData = new FormData(this.formRef);\n formData.forEach((value, key) => {\n this.setFormState(value, key);\n });\n\n this.formState = { ...this.formState };\n return this.formState;\n }\n\n setActiveTab(e: Event, tabName: string) {\n e.preventDefault();\n this.updateFormState();\n this.activeTab = tabName;\n }\n\n setError = (error: Error) => {\n this.error = error.message;\n };\n\n formSubmissionHandler = async (event: Event) => {\n event.preventDefault();\n this.formSubmitted.emit();\n const valid = this.formRef.checkValidity();\n if (!valid) {\n return;\n }\n this.isLoading = true;\n this.hasUnsavedChanges = false;\n const formState = this.updateFormState();\n const {\n title,\n description,\n duration,\n availability,\n calendarIds,\n bookingCalendar,\n location,\n bookingType,\n buffer,\n availableDaysInFuture,\n minCancellationNotice,\n minBookingNotice,\n cancellationPolicy,\n timeslotInterval,\n additionalGuestsHidden,\n hideCancellationOptions,\n hideReschedulingOptions,\n participants,\n participantOpenHours,\n } = formState;\n const organizer = this.selectedConfiguration?.participants?.find(p => p.is_organizer);\n const durationMinutes = duration ? parseInt(duration) : 30;\n\n const participantsList =\n participants && participants?.length > 0\n ? participants\n : [\n {\n name: organizer?.name ?? this.currentUser?.name ?? organizer?.email ?? this.currentUser?.email ?? '',\n email: organizer?.email ?? this.currentUser?.email ?? '',\n is_organizer: true,\n availability: {\n calendar_ids: calendarIds?.length ? calendarIds : ['primary'],\n open_hours: [],\n },\n booking: {\n calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',\n },\n },\n ];\n const configObject: Partial<Configuration> = {\n ...(this.selectedConfiguration?.id && { id: this.selectedConfiguration.id }),\n version: this.selectedConfiguration?.version ?? '1.0.0',\n availability: {\n duration_minutes: durationMinutes,\n interval_minutes: timeslotInterval?.interval ?? durationMinutes,\n round_to: timeslotInterval?.roundTo,\n availability_rules: {\n availability_method: this.selectedConfiguration?.availability?.availability_rules?.availability_method ?? 'collective',\n buffer: buffer || { before: 0, after: 0 },\n default_open_hours: availability?.openHours ?? this.selectedConfiguration?.availability?.availability_rules?.default_open_hours ?? DEFAULT_OPEN_HOURS,\n round_robin_group_id: this.selectedConfiguration?.availability?.availability_rules?.round_robin_group_id ?? '',\n },\n },\n participants: [\n ...participantsList?.map(p => {\n if (p.is_organizer) {\n return {\n name: p.name ?? p.email,\n email: p.email,\n is_organizer: true,\n availability: {\n calendar_ids: calendarIds?.length ? calendarIds : ['primary'],\n open_hours: participantOpenHours?.[p.email] ?? p.availability?.open_hours ?? [],\n },\n booking: {\n calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',\n },\n };\n }\n return {\n ...p,\n availability: {\n calendar_ids: p.availability?.calendar_ids ?? ['primary'],\n open_hours: participantOpenHours?.[p.email] ?? p.availability?.open_hours ?? [],\n },\n };\n }),\n ],\n event_booking: {\n title: title?.toString() ?? '',\n description: description?.toString() ?? '',\n location: location?.toString() ?? '',\n booking_type: (bookingType?.toString() as BookingType) ?? 'booking',\n timezone: availability?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone,\n },\n scheduler: {\n cancellation_policy: cancellationPolicy ?? '',\n available_days_in_future: availableDaysInFuture ?? 30,\n min_cancellation_notice: minCancellationNotice ?? 0,\n min_booking_notice: minBookingNotice ?? 60,\n hide_additional_guests: additionalGuestsHidden ?? false,\n hide_cancellation_options: hideCancellationOptions ?? false,\n hide_rescheduling_options: hideReschedulingOptions ?? false,\n },\n };\n\n const configObjectWithDeveloperSettings = mergeDeep(configObject, this.selectedConfiguration);\n\n const finalConfig = this.action === 'create' ? configObjectWithDeveloperSettings : configObject;\n\n const resetLoadingState = (_e: CustomEvent) => {\n this.isLoading = false;\n this.changesSaved = true;\n setTimeout(() => {\n this.changesSaved = false;\n }, 5000);\n };\n this.schedulerConfigChanged.emit({ config: finalConfig, resetLoadingState, setError: this.setError, action: this.action });\n };\n\n @RegisterComponent<NylasEditorTabs, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-editor-tabs',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ]),\n eventToProps: {\n schedulerConfigChanged: async (event: CustomEvent<SchedulerEventDetail>, nylasSchedulerConfigConnector: NylasSchedulerConfigConnector) => {\n const { resetLoadingState, setError, action, config } = event.detail;\n const checkForErrors = (response: DataResponseReturnType) => {\n const [data, error] = response;\n if (!data && error && setError) {\n setError(error as Error);\n }\n if (resetLoadingState) {\n resetLoadingState(event);\n }\n };\n\n // If we have an ID, we are updating an existing configuration\n if (action === 'edit') {\n const response = await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);\n checkForErrors(response);\n } else {\n const response = await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);\n checkForErrors(response);\n }\n },\n cancelButtonClick: async (_, nylasSchedulerConfigConnector) => {\n nylasSchedulerConfigConnector.schedulerConfigStore.state.action = null;\n },\n previewButtonClicked: async (_, nylasSchedulerConfigConnector) => {\n debug('[nylas-editor-tabs]', 'previewButtonClicked', nylasSchedulerConfigConnector);\n },\n formSubmitted: async (_, nylasSchedulerConfigConnector) => {\n debug('[nylas-editor-tabs]', 'formSubmitted', nylasSchedulerConfigConnector);\n },\n },\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n fireRegisterEvent: true,\n })\n render() {\n debug('[nylas-editor-tabs]', 'render', this.formState);\n // TODO: Remove this check when the feature is ready to be released\n const showParticipantsTab = localStorage.getItem('nylas') === 'Nylas Developer';\n return (\n <Host>\n <form onSubmit={this.formSubmissionHandler} class=\"scheduler-editor\" ref={el => (this.formRef = el as HTMLFormElement)} noValidate>\n {this.mode === 'app' ? (\n <div class=\"form-contents\">\n <div class=\"tabs\">\n <button class={{ tab: true, active: this.activeTab == 'eventInfo' }} onClick={e => this.setActiveTab(e, 'eventInfo')}>\n <calendar-info-icon width=\"16\" height=\"16\" />\n Event Info\n </button>\n <button class={{ tab: true, active: this.activeTab == 'availability' }} onClick={e => this.setActiveTab(e, 'availability')}>\n <calendar-patterns-icon width=\"16\" height=\"16\" />\n Availability\n </button>\n <button class={{ tab: true, active: this.activeTab == 'bookingOptions' }} onClick={e => this.setActiveTab(e, 'bookingOptions')}>\n <flow-icon width=\"16\" height=\"16\" />\n Booking Options\n </button>\n {showParticipantsTab && (\n <button class={{ tab: true, active: this.activeTab == 'participants' }} onClick={e => this.setActiveTab(e, 'participants')}>\n <people-icon width=\"16\" height=\"16\" />\n Participants\n </button>\n )}\n </div>\n <div class=\"tab-content\">\n <TabContents formState={this.formState} activeTab={this.activeTab} calendars={this.calendars} id={this.selectedConfiguration?.id ?? 'new'} />\n </div>\n </div>\n ) : (\n <slot></slot>\n )}\n\n <div class=\"footer\">\n <div class=\"preview\">\n {this.schedulerPreviewLink !== '' && this.action === 'edit' && (\n <button-component\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n const previewEvent = this.previewButtonClicked.emit(this.host);\n if (!previewEvent.defaultPrevented) {\n window.open(parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');\n }\n }}\n variant={'basic'}\n >\n Preview\n </button-component>\n )}\n </div>\n <div class=\"buttons\">\n <p\n class={{\n 'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,\n 'saved-changes': this.changesSaved,\n 'error': this.error !== '',\n 'error-full-width': this.error !== '' && this.action === 'create',\n }}\n >\n {this.error !== '' ? this.error : ''}\n {this.error == '' && this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.error == '' && this.changesSaved ? 'Changes saved!' : ''}\n </p>\n <button-component\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n this.cancelButtonClick.emit();\n this.error = '';\n }}\n variant={'basic'}\n >\n Cancel\n </button-component>\n <button-component type=\"submit\" disabled={this.isLoading}>\n {this.isLoading ? (\n <span>\n Saving\n <loading-icon />{' '}\n </span>\n ) : this.action == 'create' ? (\n 'Create'\n ) : (\n 'Save changes'\n )}\n </button-component>\n </div>\n </div>\n </form>\n </Host>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: grid;\n grid-auto-flow: row;\n width: 100%;\n font-family: inherit;\n font-optical-sizing: auto;\n @include default-css-variables;\n}\n\n.header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 1rem;\n gap: 1rem;\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n align-items: unset;\n }\n h2 {\n margin: 0;\n font-size: 1.25rem;\n color: var(--nylas-base-900);\n font-weight: 600;\n }\n\n p {\n margin: 0;\n font-size: 1rem;\n color: var(--nylas-base-700);\n }\n\n .actions {\n justify-self: end;\n\n @media #{$mobile} {\n width: 100%;\n }\n }\n}\n\n.configurations {\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n background: var(--nylas-base-0);\n height: 100%;\n display: flex;\n overflow-y: auto;\n table {\n width: 100%;\n border-spacing: 0;\n border-collapse: collapse;\n font-family: inherit;\n height: max-content;\n\n &.no-configurations {\n height: 100%;\n }\n\n tr {\n color: var(--nylas-base-800);\n border-bottom: 1px solid var(--nylas-base-200);\n font-family: inherit;\n &:last-of-type {\n border-bottom: 0;\n }\n\n &.hide {\n display: none;\n }\n }\n\n th {\n font-weight: 600;\n text-transform: uppercase;\n font-size: 14px;\n line-height: 20px;\n &.actions-header {\n text-align: right;\n }\n }\n\n tr.no-configurations {\n td {\n > div {\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n\n padding: var(--nylas-border-radius-3x);\n\n h3 {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-700);\n }\n\n p {\n margin: 0 0 1rem 0;\n color: var(--nylas-base-600);\n }\n\n calendar-icon {\n margin-bottom: 1rem;\n color: var(--nylas-base-200);\n }\n }\n }\n }\n\n th,\n td {\n text-align: left;\n padding: 1rem;\n font-family: inherit;\n }\n\n .actions {\n text-align: right;\n }\n\n .actions {\n display: flex;\n justify-content: flex-end;\n gap: 1rem;\n @media #{$mobile} {\n flex-direction: column;\n gap: 0.5rem;\n }\n }\n\n .title {\n display: flex;\n flex-direction: column;\n\n .config-event-title {\n font-weight: 600;\n }\n\n .config-event-description {\n font-size: 0.75rem;\n }\n }\n }\n}\n\n.error-container {\n margin-top: 1.5rem;\n .error {\n color: var(--nylas-error);\n padding: 0.5rem 0;\n margin: 1rem 0 0;\n }\n}\n\nbutton-component#copy {\n button {\n width: 108px;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, parsePreviewLink } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, State, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\n\n/**\n * The `nylas-list-configurations` component displays a list of scheduling pages.\n */\n@Component({\n tag: 'nylas-list-configurations',\n styleUrl: 'nylas-list-configurations.scss',\n shadow: true,\n})\nexport class NylasListConfigurations {\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasListConfigurationsElement;\n\n /**\n * The list of configurations to display.\n */\n @Prop() configurations: Configuration[] = [];\n\n /**\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use a placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n\n /**\n * Event emitted when the component is initialized.\n */\n @Event() initListConfigurations!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the create event button.\n */\n @Event() createButtonClick!: EventEmitter<HTMLNylasListConfigurationsElement>;\n\n /**\n * Event emitted when the user clicks the edit event button.\n */\n @Event() editButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration;\n }>;\n\n /**\n * Event emitted when the user clicks the delete event button.\n */\n @Event() deleteButtonClick!: EventEmitter<{\n host: HTMLNylasListConfigurationsElement;\n configuration: Configuration;\n }>;\n\n /**\n * The current state of the component.\n */\n @State() private state: 'loading' | 'loaded' | 'error' = 'loading';\n\n /**\n * The error message to display.\n */\n @State() private error: string = '';\n\n /**\n * The copy link button label.\n */\n @State() private copiedButtonIndex: number = -1;\n\n connectedCallback() {\n debug('[nylas-list-configurations]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-list-configurations]', 'componentWillLoad');\n\n // If we have configurations, we will set the state to loaded.\n if (this.configurations && this.configurations.length > 0) {\n this.state = 'loaded';\n }\n }\n\n componentDidLoad() {\n debug('[nylas-list-configurations]', 'componentDidLoad');\n\n // Fire the init event. By default, we will fetch the configurations.\n // This is defined in the eventToProps object in the RegisterComponent decorator.\n this.initListConfigurations.emit(this.host);\n }\n\n disconnectedCallback() {\n debug('[nylas-list-configurations]', 'disconnectedCallback');\n }\n\n @Method()\n async getState() {\n return this.state;\n }\n\n @Method()\n async setState(state: 'loading' | 'loaded' | 'error') {\n this.state = state;\n }\n\n @Method()\n async setError(error: string) {\n this.error = error;\n }\n\n private getDurationString(duration: number) {\n const hours = Math.floor(duration / 60);\n const minutes = duration % 60;\n return `${hours ? hours : ''} ${hours ? `${hours > 1 ? 'hours' : 'hour'}` : ''} ${minutes ? minutes : ''} ${minutes ? `${minutes > 1 ? 'mins' : 'min'}` : ''}`;\n }\n\n @RegisterComponent<NylasListConfigurations, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-list-configurations',\n stateToProps: new Map([['schedulerConfig.configurations', 'configurations']]),\n localPropsToProp: new Map([['schedulerPreviewLink', 'schedulerPreviewLink']]),\n eventToProps: {\n initListConfigurations: async (event, connector) => {\n const host = event.detail;\n await host.setState('loading');\n const [data, error] = await connector.schedulerConfig.getConfigurations();\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n return;\n }\n await host.setState('loaded');\n },\n createButtonClick: async (_, connector) => {\n connector.schedulerConfigStore.resetSelectedConfiguration();\n connector.schedulerConfigStore.state.action = 'create';\n },\n deleteButtonClick: async (event, connector) => {\n const { host, configuration } = event.detail;\n const [data, error] = await connector.schedulerConfig.deleteConfiguration(configuration.id);\n if (!data && error && error.message) {\n await host.setState('error');\n await host.setError(error.message);\n }\n },\n editButtonClick: async (event, connector) => {\n const { configuration } = event.detail;\n connector.schedulerConfigStore.state.selectedConfiguration = configuration;\n connector.schedulerConfigStore.state.action = 'edit';\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"header\">\n <div class=\"description\">\n <h2>All scheduling pages</h2>\n <p>Create, edit and manage all your scheduling pages.</p>\n </div>\n {this.configurations && this.configurations.length > 0 && (\n <div class=\"actions\">\n <button-component\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n Create new\n </button-component>\n </div>\n )}\n </div>\n <div class=\"configurations\">\n <table\n class={{\n 'no-configurations': this.state !== 'loading' && (!this.configurations || this.configurations.length === 0),\n }}\n >\n <tr\n class={{\n hide: this.state === 'loading' || (this.configurations && this.configurations.length === 0),\n }}\n >\n <th>Scheduling page title</th>\n <th>Duration</th>\n <th class=\"actions-header\">Actions</th>\n </tr>\n {this.state === 'loading' && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <h3>Loading...</h3>\n <p>Please wait while we fetch the scheduling pages</p>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' && (!this.configurations || this.configurations.length === 0) && (\n <tr class=\"no-configurations\">\n <td colSpan={3}>\n <div>\n <calendar-icon width=\"48\" height=\"48\"></calendar-icon>\n <h3>No scheduling pages found</h3>\n <p>Get started with creating your first scheduling page</p>\n <button-component\n clickHandler={() => {\n this.createButtonClick.emit(this.host);\n }}\n >\n Create new\n </button-component>\n </div>\n </td>\n </tr>\n )}\n {this.state !== 'loading' &&\n this.configurations.map((config, i) => {\n return (\n <tr key={config.id}>\n <td>\n <div class=\"title\">\n <span class={'config-event-title'}>{config.event_booking.title}</span>\n <span class={'config-event-description'}>{config.event_booking.description}</span>\n </div>\n </td>\n <td>\n <div>{this.getDurationString(config.availability.duration_minutes)}</div>\n </td>\n <td>\n <div class=\"actions\">\n <button-component\n variant={'basic'}\n id=\"copy\"\n key={`copy-${i}`}\n clickHandler={async event => {\n event.preventDefault();\n const link = parsePreviewLink(this.schedulerPreviewLink, config);\n await navigator.clipboard.writeText(link);\n this.copiedButtonIndex = i;\n setTimeout(() => {\n this.copiedButtonIndex = -1;\n }, 3000);\n }}\n >\n {this.copiedButtonIndex === i ? 'Copied!' : 'Copy link'}\n </button-component>\n <button-component\n variant={'basic'}\n key={`edit-${i}`}\n clickHandler={event => {\n event.preventDefault();\n this.editButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n Edit\n </button-component>\n <button-component\n variant={'basic'}\n key={`delete-${i}`}\n clickHandler={event => {\n event.preventDefault();\n this.deleteButtonClick.emit({ host: this.host, configuration: config });\n }}\n >\n Delete\n </button-component>\n </div>\n </td>\n </tr>\n );\n })}\n </table>\n </div>\n {this.state === 'error' && (\n <div class=\"error-container\">\n <p class={'error'}>{this.error}</p>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"0OAAA,MAAMA,EAAU,uCAChB,MAAAC,EAAeD,E,MCMFE,EAAc,M,oCAC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AAgBmC,oBAAoBL,EAAc3M,IACxF,IAAK4K,GAAQzH,GAASA,EAAMC,QAAS,OAC7ByG,EAAK8B,SAAS,eACd9B,EAAK3G,SAASC,EAAMC,Q,GAG9BsJ,gBAAiBpJ,MAAOC,EAAOsJ,KAC7B,MAAMF,cAAEA,GAAkBpJ,EAAMsE,OAChCgF,EAAU5B,qBAAqBC,MAAM3G,sBAAwBoI,EAC7DE,EAAU5B,qBAAqBC,MAAMtE,OAAS,MAAM,GAGxDwE,kBAAmB,O"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{h,F as Fragment,r as registerInstance,c as createEvent,H as Host,a as getElement}from"./p-68c2fadf.js";import{X as Xr,N as NylasBaseProvider}from"./p-36e3bf97.js";import{N as NylasIdentityRequestWrapper}from"./p-613c070f.js";import{d as dataResponse,a as debug}from"./p-6c11737d.js";import{C as CreateNylasSchedulerConfigStore}from"./p-29938263.js";import{B as Buffer}from"./p-02aa5f03.js";import{p as process}from"./p-1ffbe196.js";import{c as commonjsGlobal}from"./p-cb65c223.js";import"./p-cabb2e68.js";class NylasSchedulerConfigAPIConnector{constructor({nylasApiRequest:t,nylasSchedulerConfigStore:e}){this.nylasApiRequest=t;this.nylasSchedulerConfigStore=e}async currentUser(){if(!this.nylasApiRequest){console.warn("Nylas API Request is not initialized");return null}return this.nylasApiRequest.currentUser()}async getCalendars(){if(!this.nylasApiRequest){console.warn("Nylas API Request is not initialized");return dataResponse(null,{message:"Error fetching calendars: Nylas API Request is not initialized"})}const[t,e]=await this.nylasApiRequest.request({method:"GET",path:`calendars`});if(e){return dataResponse(null,{message:"Error fetching calendars: "+e.message})}if(Xr(t)){return dataResponse(null,{message:"Error fetching calendars: "+t.error?.message})}this.nylasSchedulerConfigStore.state.calendars=t.data;return dataResponse(t.data)}async getConfigurationById(t,e=false){if(!this.nylasApiRequest){console.warn("Nylas API Request is not initialized");return dataResponse(null,{message:"Error fetching configuration: Nylas API Request is not initialized"})}if(!e){const e=this.nylasSchedulerConfigStore.state.configurations.find((e=>e.id===t));if(e){this.nylasSchedulerConfigStore.state.selectedConfiguration=e;return dataResponse(e)}}const[n,i]=await this.nylasApiRequest.request({method:"GET",path:`scheduling/configurations/${t}`});if(i){return dataResponse(null,{message:"Error fetching configuration: "+i.message})}if(Xr(n)){return dataResponse(null,{message:"Error fetching configuration: "+n.error?.message})}this.nylasSchedulerConfigStore.state.selectedConfiguration=n.data;if(this.nylasSchedulerConfigStore.state.configurations.find((e=>e.id===t))){this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.map((e=>e.id===t?n.data:e))}else{this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,n.data]}return dataResponse(n.data)}async getConfigurations(){if(!this.nylasApiRequest){console.warn("Nylas API Request is not initialized");return dataResponse(null,{message:"Error fetching configurations: Nylas API Request is not initialized"})}const[t,e]=await this.nylasApiRequest.request({method:"GET",path:`scheduling/configurations`});if(e){return dataResponse(null,{message:"Error fetching configurations: "+e.message})}if(Xr(t)){return dataResponse(null,{message:"Error fetching configurations: "+t.error?.message})}this.nylasSchedulerConfigStore.state.configurations=t.data;return dataResponse(t.data)}async createConfiguration(t){if(!this.nylasApiRequest){console.warn("Nylas API Request is not initialized");return dataResponse(null,{message:"Error creating configuration: Nylas API Request is not initialized"})}const[e,n]=await this.nylasApiRequest.request({method:"POST",path:`scheduling/configurations`,body:t});if(n){return dataResponse(null,{message:"Error creating configuration: "+n.message})}if(Xr(e)){return dataResponse(null,{message:"Error creating configuration: "+e.error?.message})}this.nylasSchedulerConfigStore.state.selectedConfiguration=e.data;this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,e.data];return dataResponse(e.data)}async updateConfiguration(t){if(!this.nylasApiRequest){console.warn("Nylas API Request is not initialized");return dataResponse(null,{message:"Error updating configuration: Nylas API Request is not initialized"})}const[e,n]=await this.nylasApiRequest.request({method:"PUT",path:`scheduling/configurations/${t.id}`,body:t});if(n){return dataResponse(null,{message:"Error updating configuration: "+n.message})}if(Xr(e)){return dataResponse(null,{message:"Error updating configuration: "+e.error?.message})}this.nylasSchedulerConfigStore.state.selectedConfiguration=e.data;if(this.nylasSchedulerConfigStore.state.configurations.find((e=>e.id===t.id))){this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.map((n=>n.id===t.id?e.data:n))}else{this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,e.data]}return dataResponse(e.data)}async deleteConfiguration(t){if(!this.nylasApiRequest){console.warn("Nylas API Request is not initialized");return dataResponse(null,{message:"Error deleting configuration: Nylas API Request is not initialized"})}const[e,n]=await this.nylasApiRequest.request({method:"DELETE",path:`scheduling/configurations/${t}`});if(n){return dataResponse(null,{message:"Error deleting configuration: "+n.message})}if(Xr(e)){return dataResponse(null,{message:"Error deleting configuration: "+e.error?.message})}this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.filter((e=>e.id!==t));if(this.nylasSchedulerConfigStore.state.selectedConfiguration?.id===t){this.nylasSchedulerConfigStore.resetSelectedConfiguration()}return dataResponse(e.data)}}class NylasSchedulerConfigConnector{constructor({nylasApiRequest:t,nylasSchedulerConfigStore:e}){this.nylasApiRequest=t;this.nylasSchedulerConfigStore=e}init(){debug("NylasSchedulerConfigConnector init")}get schedulerConfigStore(){return this.nylasSchedulerConfigStore}get schedulerConfig(){if(this._schedulerConfigConnector){return this._schedulerConfigConnector}this._schedulerConfigConnector=new NylasSchedulerConfigAPIConnector({nylasApiRequest:this.nylasApiRequest,nylasSchedulerConfigStore:this.nylasSchedulerConfigStore});return this._schedulerConfigConnector}resetStores(){debug("NylasSchedulerConfigConnector resetStores");this.nylasSchedulerConfigStore.reset()}async logout(){debug("NylasSchedulerConfigConnector logout");this.resetStores()}}class LocalStorage{get(t){return new Promise((e=>{const n=window.localStorage.getItem(t);if(!n){e(null)}else{e(JSON.parse(n))}}))}async remove(t){window.localStorage.removeItem(t);return new Promise((t=>{t(null)}))}set(t,e){window.localStorage.setItem(t,JSON.stringify(e));return new Promise((t=>{t(null)}))}}const PKCE_KEY="pkce";const GRANT_KEY="grant";const USER_KEY="user";class Storage{Storage=new LocalStorage;constructor(t){if(t){this.Storage=t;return}}setPKCE(t){const e=Buffer.from(t);this.Storage.set(PKCE_KEY,e.toString("base64"))}async getPKCE(){try{const t=await this.Storage.get(PKCE_KEY);if(t){const e=Buffer.from(t,"base64");return e.toString("utf8")}}catch(t){return null}return null}removePKCE(){this.Storage.remove(PKCE_KEY)}setGrant(t,e=false){const{grant_id:n}=t;this.Storage.set(`${GRANT_KEY}${e?"-"+n:""}`,t)}removeGrant(t,e=false){this.Storage.remove(`${GRANT_KEY}${e?"-"+t:""}`)}async getGrant(t,e=false){const n=await this.Storage.get(`${GRANT_KEY}${e?"-"+t:""}`);if(n){return n}return null}async setUserToken(t){const e=await this.getUserTokens();if(e){const n=e.find((e=>e.sub===t.sub));if(!n){const n=[...e,t];this.Storage.set(USER_KEY,n)}else{const n=e.map((e=>{if(e.sub===t.sub){e=t}return e}));this.Storage.set(USER_KEY,n)}}else{this.Storage.set(USER_KEY,[t])}}async getUserToken(t=""){const e=await this.Storage.get(USER_KEY);if(e){if(t===""){return e[0]}const n=e.find((e=>e.sub===t));return n}return null}async getUserTokens(){const t=await this.Storage.get(USER_KEY);if(t){return t}return null}removeUserTokens(){this.Storage.remove(USER_KEY)}async removeUserToken(t){const e=await this.getUserTokens();const n=e?.filter((e=>e.sub!==t));this.Storage.set(USER_KEY,n)}async clearSession(){const t=await this.getUserTokens();t?.forEach((t=>{this.removeGrant(t.sub)}));this.removePKCE();this.removeUserTokens()}}class IndexedDBStorage{databaseName="identity-db";storeName="identity";get(t){const e=this;return new Promise(((n,i)=>{e.openDatabase().then((function(r){const s=r.transaction(e.storeName,"readwrite");const o=s.objectStore(e.storeName);const a=o.get(t);a.onsuccess=()=>{n(a.result)};a.onerror=()=>{i(a.error)};s.oncomplete=()=>{r.close()}}))}))}async remove(t){const e=this;return new Promise(((n,i)=>{const r=indexedDB.open(this.databaseName);r.onupgradeneeded=function(t){const n=t.target.result;n.createObjectStore(e.storeName)};r.onerror=()=>{i(r.error)};r.onsuccess=e=>{const r=e.target.result;const s=r.transaction(this.storeName,"readwrite");const o=s.objectStore(this.storeName);const a=o.delete(t);a.onsuccess=()=>{n(null)};a.onerror=()=>{i(a.error)};s.oncomplete=()=>{r.close()}}}))}set(t,e){return new Promise(((n,i)=>{const r=indexedDB.open(this.databaseName);r.onerror=()=>{i(r.error)};r.onupgradeneeded=t=>{const e=t.target.result;e.createObjectStore(this.storeName)};r.onsuccess=r=>{const s=r.target.result;const o=s.transaction(this.storeName,"readwrite");const a=o.objectStore(this.storeName);const c=a.put(e,t);c.onsuccess=()=>{n(e)};c.onerror=()=>{i(c.error)};o.oncomplete=()=>{s.close()}}}))}openDatabase(){const t=this;return new Promise((function(e,n){const i=indexedDB.open(t.databaseName,2);i.onupgradeneeded=function(e){const n=e.target.result;n.createObjectStore(t.storeName)};i.onsuccess=function(t){e(t.target.result)};i.onerror=function(t){n(t.error)}}))}}var sha256={exports:{}};(function(module){(function(){var ERROR="input is invalid type";var WINDOW=typeof window==="object";var root=WINDOW?window:{};if(root.JS_SHA256_NO_WINDOW){WINDOW=false}var WEB_WORKER=!WINDOW&&typeof self==="object";var NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process==="object"&&process.versions&&process.versions.node;if(NODE_JS){root=commonjsGlobal}else if(WEB_WORKER){root=self}var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&"object"==="object"&&module.exports;var ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer!=="undefined";var HEX_CHARS="0123456789abcdef".split("");var EXTRA=[-2147483648,8388608,32768,128];var SHIFT=[24,16,8,0];var K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];var OUTPUT_TYPES=["hex","array","digest","arrayBuffer"];var blocks=[];if(root.JS_SHA256_NO_NODE_JS||!Array.isArray){Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"}}if(ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)){ArrayBuffer.isView=function(t){return typeof t==="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer}}var createOutputMethod=function(t,e){return function(n){return new Sha256(e,true).update(n)[t]()}};var createMethod=function(t){var e=createOutputMethod("hex",t);if(NODE_JS){e=nodeWrap(e,t)}e.create=function(){return new Sha256(t)};e.update=function(t){return e.create().update(t)};for(var n=0;n<OUTPUT_TYPES.length;++n){var i=OUTPUT_TYPES[n];e[i]=createOutputMethod(i,t)}return e};var nodeWrap=function(method,is224){var crypto=eval("require('crypto')");var Buffer=eval("require('buffer').Buffer");var algorithm=is224?"sha224":"sha256";var nodeMethod=function(t){if(typeof t==="string"){return crypto.createHash(algorithm).update(t,"utf8").digest("hex")}else{if(t===null||t===undefined){throw new Error(ERROR)}else if(t.constructor===ArrayBuffer){t=new Uint8Array(t)}}if(Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer){return crypto.createHash(algorithm).update(new Buffer(t)).digest("hex")}else{return method(t)}};return nodeMethod};var createHmacOutputMethod=function(t,e){return function(n,i){return new HmacSha256(n,e,true).update(i)[t]()}};var createHmacMethod=function(t){var e=createHmacOutputMethod("hex",t);e.create=function(e){return new HmacSha256(e,t)};e.update=function(t,n){return e.create(t).update(n)};for(var n=0;n<OUTPUT_TYPES.length;++n){var i=OUTPUT_TYPES[n];e[i]=createHmacOutputMethod(i,t)}return e};function Sha256(t,e){if(e){blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0;this.blocks=blocks}else{this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}if(t){this.h0=3238371032;this.h1=914150663;this.h2=812702999;this.h3=4144912697;this.h4=4290775857;this.h5=1750603025;this.h6=1694076839;this.h7=3204075428}else{this.h0=1779033703;this.h1=3144134277;this.h2=1013904242;this.h3=2773480762;this.h4=1359893119;this.h5=2600822924;this.h6=528734635;this.h7=1541459225}this.block=this.start=this.bytes=this.hBytes=0;this.finalized=this.hashed=false;this.first=true;this.is224=t}Sha256.prototype.update=function(t){if(this.finalized){return}var e,n=typeof t;if(n!=="string"){if(n==="object"){if(t===null){throw new Error(ERROR)}else if(ARRAY_BUFFER&&t.constructor===ArrayBuffer){t=new Uint8Array(t)}else if(!Array.isArray(t)){if(!ARRAY_BUFFER||!ArrayBuffer.isView(t)){throw new Error(ERROR)}}}else{throw new Error(ERROR)}e=true}var i,r=0,s,o=t.length,a=this.blocks;while(r<o){if(this.hashed){this.hashed=false;a[0]=this.block;a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0}if(e){for(s=this.start;r<o&&s<64;++r){a[s>>2]|=t[r]<<SHIFT[s++&3]}}else{for(s=this.start;r<o&&s<64;++r){i=t.charCodeAt(r);if(i<128){a[s>>2]|=i<<SHIFT[s++&3]}else if(i<2048){a[s>>2]|=(192|i>>6)<<SHIFT[s++&3];a[s>>2]|=(128|i&63)<<SHIFT[s++&3]}else if(i<55296||i>=57344){a[s>>2]|=(224|i>>12)<<SHIFT[s++&3];a[s>>2]|=(128|i>>6&63)<<SHIFT[s++&3];a[s>>2]|=(128|i&63)<<SHIFT[s++&3]}else{i=65536+((i&1023)<<10|t.charCodeAt(++r)&1023);a[s>>2]|=(240|i>>18)<<SHIFT[s++&3];a[s>>2]|=(128|i>>12&63)<<SHIFT[s++&3];a[s>>2]|=(128|i>>6&63)<<SHIFT[s++&3];a[s>>2]|=(128|i&63)<<SHIFT[s++&3]}}}this.lastByteIndex=s;this.bytes+=s-this.start;if(s>=64){this.block=a[16];this.start=s-64;this.hash();this.hashed=true}else{this.start=s}}if(this.bytes>4294967295){this.hBytes+=this.bytes/4294967296<<0;this.bytes=this.bytes%4294967296}return this};Sha256.prototype.finalize=function(){if(this.finalized){return}this.finalized=true;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block;t[e>>2]|=EXTRA[e&3];this.block=t[16];if(e>=56){if(!this.hashed){this.hash()}t[0]=this.block;t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0}t[14]=this.hBytes<<3|this.bytes>>>29;t[15]=this.bytes<<3;this.hash()};Sha256.prototype.hash=function(){var t=this.h0,e=this.h1,n=this.h2,i=this.h3,r=this.h4,s=this.h5,o=this.h6,a=this.h7,c=this.blocks,u,l,h,d,f,p,y,w,g,m,b;for(u=16;u<64;++u){f=c[u-15];l=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;f=c[u-2];h=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10;c[u]=c[u-16]+l+c[u-7]+h<<0}b=e&n;for(u=0;u<64;u+=4){if(this.first){if(this.is224){w=300032;f=c[0]-1413257819;a=f-150054599<<0;i=f+24177077<<0}else{w=704751109;f=c[0]-210244248;a=f-1521486534<<0;i=f+143694565<<0}this.first=false}else{l=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10);h=(r>>>6|r<<26)^(r>>>11|r<<21)^(r>>>25|r<<7);w=t&e;d=w^t&n^b;y=r&s^~r&o;f=a+h+y+K[u]+c[u];p=l+d;a=i+f<<0;i=f+p<<0}l=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10);h=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7);g=i&t;d=g^i&e^w;y=a&r^~a&s;f=o+h+y+K[u+1]+c[u+1];p=l+d;o=n+f<<0;n=f+p<<0;l=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10);h=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7);m=n&i;d=m^n&t^g;y=o&a^~o&r;f=s+h+y+K[u+2]+c[u+2];p=l+d;s=e+f<<0;e=f+p<<0;l=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10);h=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7);b=e&n;d=b^e&i^m;y=s&o^~s&a;f=r+h+y+K[u+3]+c[u+3];p=l+d;r=t+f<<0;t=f+p<<0}this.h0=this.h0+t<<0;this.h1=this.h1+e<<0;this.h2=this.h2+n<<0;this.h3=this.h3+i<<0;this.h4=this.h4+r<<0;this.h5=this.h5+s<<0;this.h6=this.h6+o<<0;this.h7=this.h7+a<<0};Sha256.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,i=this.h3,r=this.h4,s=this.h5,o=this.h6,a=this.h7;var c=HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[s&15]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[o&15];if(!this.is224){c+=HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15]}return c};Sha256.prototype.toString=Sha256.prototype.hex;Sha256.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,i=this.h3,r=this.h4,s=this.h5,o=this.h6,a=this.h7;var c=[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24&255,n>>16&255,n>>8&255,n&255,i>>24&255,i>>16&255,i>>8&255,i&255,r>>24&255,r>>16&255,r>>8&255,r&255,s>>24&255,s>>16&255,s>>8&255,s&255,o>>24&255,o>>16&255,o>>8&255,o&255];if(!this.is224){c.push(a>>24&255,a>>16&255,a>>8&255,a&255)}return c};Sha256.prototype.array=Sha256.prototype.digest;Sha256.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32);var e=new DataView(t);e.setUint32(0,this.h0);e.setUint32(4,this.h1);e.setUint32(8,this.h2);e.setUint32(12,this.h3);e.setUint32(16,this.h4);e.setUint32(20,this.h5);e.setUint32(24,this.h6);if(!this.is224){e.setUint32(28,this.h7)}return t};function HmacSha256(t,e,n){var i,r=typeof t;if(r==="string"){var s=[],o=t.length,a=0,c;for(i=0;i<o;++i){c=t.charCodeAt(i);if(c<128){s[a++]=c}else if(c<2048){s[a++]=192|c>>6;s[a++]=128|c&63}else if(c<55296||c>=57344){s[a++]=224|c>>12;s[a++]=128|c>>6&63;s[a++]=128|c&63}else{c=65536+((c&1023)<<10|t.charCodeAt(++i)&1023);s[a++]=240|c>>18;s[a++]=128|c>>12&63;s[a++]=128|c>>6&63;s[a++]=128|c&63}}t=s}else{if(r==="object"){if(t===null){throw new Error(ERROR)}else if(ARRAY_BUFFER&&t.constructor===ArrayBuffer){t=new Uint8Array(t)}else if(!Array.isArray(t)){if(!ARRAY_BUFFER||!ArrayBuffer.isView(t)){throw new Error(ERROR)}}}else{throw new Error(ERROR)}}if(t.length>64){t=new Sha256(e,true).update(t).array()}var u=[],l=[];for(i=0;i<64;++i){var h=t[i]||0;u[i]=92^h;l[i]=54^h}Sha256.call(this,e,n);this.update(l);this.oKeyPad=u;this.inner=true;this.sharedMemory=n}HmacSha256.prototype=new Sha256;HmacSha256.prototype.finalize=function(){Sha256.prototype.finalize.call(this);if(this.inner){this.inner=false;var t=this.array();Sha256.call(this,this.is224,this.sharedMemory);this.update(this.oKeyPad);this.update(t);Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports;exports.sha224=createMethod(true);exports.sha256.hmac=createHmacMethod();exports.sha224.hmac=createHmacMethod(true);if(COMMON_JS){module.exports=exports}else{root.sha256=exports.sha256;root.sha224=exports.sha224}})()})(sha256);var getRandomValues;var rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){getRandomValues=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=="undefined"&&typeof msCrypto.getRandomValues==="function"&&msCrypto.getRandomValues.bind(msCrypto);if(!getRandomValues){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return getRandomValues(rnds8)}const REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(t){return typeof t==="string"&®EX.test(t)}var byteToHex=[];for(var i=0;i<256;++i){byteToHex.push((i+256).toString(16).substr(1))}function stringify(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var n=(byteToHex[t[e+0]]+byteToHex[t[e+1]]+byteToHex[t[e+2]]+byteToHex[t[e+3]]+"-"+byteToHex[t[e+4]]+byteToHex[t[e+5]]+"-"+byteToHex[t[e+6]]+byteToHex[t[e+7]]+"-"+byteToHex[t[e+8]]+byteToHex[t[e+9]]+"-"+byteToHex[t[e+10]]+byteToHex[t[e+11]]+byteToHex[t[e+12]]+byteToHex[t[e+13]]+byteToHex[t[e+14]]+byteToHex[t[e+15]]).toLowerCase();if(!validate(n)){throw TypeError("Stringified UUID is invalid")}return n}function v4(t,e,n){t=t||{};var i=t.random||(t.rng||rng)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;if(e){n=n||0;for(var r=0;r<16;++r){e[n+r]=i[r]}return e}return stringify(i)}async function getBytes(t,e){const n=t.getReader();let i;while(!(i=await n.read()).done){e(i.value)}}function getLines(t){let e;let n;let i;let r=false;return function s(o){if(e===undefined){e=o;n=0;i=-1}else{e=concat(e,o)}const a=e.length;let c=0;while(n<a){if(r){if(e[n]===10){c=++n}r=false}let s=-1;for(;n<a&&s===-1;++n){switch(e[n]){case 58:if(i===-1){i=n-c}break;case 13:r=true;case 10:s=n;break}}if(s===-1){break}t(e.subarray(c,s),i);c=n;i=-1}if(c===a){e=undefined}else if(c!==0){e=e.subarray(c);n-=c}}}function getMessages(t,e,n){let i=newMessage();const r=new TextDecoder;return function s(o,a){if(o.length===0){n===null||n===void 0?void 0:n(i);i=newMessage()}else if(a>0){const n=r.decode(o.subarray(0,a));const s=a+(o[a+1]===32?2:1);const c=r.decode(o.subarray(s));switch(n){case"data":i.data=i.data?i.data+"\n"+c:c;break;case"event":i.event=c;break;case"id":t(i.id=c);break;case"retry":const n=parseInt(c,10);if(!isNaN(n)){e(i.retry=n)}break}}}}function concat(t,e){const n=new Uint8Array(t.length+e.length);n.set(t);n.set(e,t.length);return n}function newMessage(){return{data:"",event:"",id:"",retry:undefined}}var __rest=undefined&&undefined.__rest||function(t,e){var n={};for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0)n[i]=t[i];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++){if(e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r]))n[i[r]]=t[i[r]]}return n};const EventStreamContentType="text/event-stream";const DefaultRetryInterval=1e3;const LastEventId="last-event-id";function fetchEventSource(t,e){var{signal:n,headers:i,onopen:r,onmessage:s,onclose:o,onerror:a,openWhenHidden:c,fetch:u}=e,l=__rest(e,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((e,h)=>{const d=Object.assign({},i);if(!d.accept){d.accept=EventStreamContentType}let f;function p(){f.abort();if(!document.hidden){_()}}if(!c){document.addEventListener("visibilitychange",p)}let y=DefaultRetryInterval;let w=0;function g(){document.removeEventListener("visibilitychange",p);window.clearTimeout(w);f.abort()}n===null||n===void 0?void 0:n.addEventListener("abort",(()=>{g();e()}));const m=u!==null&&u!==void 0?u:window.fetch;const b=r!==null&&r!==void 0?r:defaultOnOpen;async function _(){var n;f=new AbortController;try{const n=await m(t,Object.assign(Object.assign({},l),{headers:d,signal:f.signal}));await b(n);await getBytes(n.body,getLines(getMessages((t=>{if(t){d[LastEventId]=t}else{delete d[LastEventId]}}),(t=>{y=t}),s)));o===null||o===void 0?void 0:o();g();e()}catch(t){if(!f.signal.aborted){try{const e=(n=a===null||a===void 0?void 0:a(t))!==null&&n!==void 0?n:y;window.clearTimeout(w);w=window.setTimeout(_,e)}catch(t){g();h(t)}}}}_()}))}function defaultOnOpen(t){const e=t.headers.get("content-type");if(!(e===null||e===void 0?void 0:e.startsWith(EventStreamContentType))){throw new Error(`Expected content-type to be ${EventStreamContentType}, Actual: ${e}`)}}function Base64EncodeUrl(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function getTimestamp(){return Math.floor(Date.now()/1e3)}function e(t){this.message=t}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r$1="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var i,r,s=0,o=0,a="";r=n.charAt(o++);~r&&(i=s%4?64*i+r:r,s++%4)?a+=String.fromCharCode(255&i>>(-2*s&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function t$1(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(r$1(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return r$1(e)}}function n$1(t){this.message=t}function o(t,e){if("string"!=typeof t)throw new n$1("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(t$1(t.split(".")[n]))}catch(t){throw new n$1("Invalid token specified: "+t.message)}}n$1.prototype=new Error,n$1.prototype.name="InvalidTokenError";class NylasSessions{clientId;redirectUri;accessType="online";domain="http://api.nylas.com";versioned=false;Storage;hosted=false;multiAccount=false;loginId="";constructor(t){this.clientId=t.clientId;this.redirectUri=t.redirectUri;if(t.domain){this.domain=t.domain;const e=this.domain.substring(this.domain.length-3);if(e.includes("/v")){this.versioned=true}}if(t.multiAccount){this.multiAccount=t.multiAccount}if(t.sw){const t=new IndexedDBStorage;this.Storage=new Storage(t)}else{this.Storage=new Storage}if(t.accessType){this.accessType=t.accessType}if(t.loginId){this.loginId=t.loginId}if(t.hosted){this.hosted=t.hosted}this.codeExchange(null)}async validateAccessToken(t=""){const e=await this.Storage.getGrant(t,this.multiAccount);if(!e){return false}const{access_token:n}=e;try{const t=await fetch(`${this.domain}/connect/tokeninfo?access_token=${n}`,{method:"GET"});const e=await t.json();if(!e.data){return false}return true}catch(t){return false}}async validateIDToken(t=""){const e=await this.Storage.getGrant(t,this.multiAccount);if(!e){return false}const{id_token:n}=e;try{const t=await fetch(`${this.domain}/connect/tokeninfo?id_token=${n}`,{method:"GET"});if(t.status!==200){return false}const e=await t.json();if(!e.data){return false}return true}catch(t){return false}}getDomain(){return this.domain}async auth(t){if(this.hosted&&(this.domain===window.location.origin||this.versioned&&this.domain.includes(window.location.origin))){await this.hostedSetCodeChallenge()}const e=await this.generateAuthURL(t);if(t.popup){this.popUp(e);return}return e}async generateAuthURL(t){const e=await this.getCodeChallege();let n=`${this.domain}/connect/auth?client_id=${this.clientId}&redirect_uri=${this.redirectUri}&access_type=${this.accessType}&response_type=code`;if(e){n+=`&code_challenge=${e}&code_challenge_method=S256&options=rotate_refresh_token`}if(t.provider){n+=`&provider=${t.provider}`}if(t.loginHint){n+=`&login_hint=${t.loginHint}`;if(t.includeGrantScopes){n+=`&include_grant_scopes=${t.includeGrantScopes}`}}if(t.scope){n+=`&scope=${t.scope.join(" ")}`}if(t.prompt){n+=`&prompt=${t.prompt}`}if(t.metadata){n+=`&metadata=${t.metadata}`}if(t.state||this.loginId){n+=`&state=${this.loginId?this.loginId:t.state}`}return n}async generateReauthURL(t,e){if(!t){throw new Error("Grant ID is required")}const n=await this.Storage.getUserToken(t);const i=await this.getCodeChallege();let r=`${this.domain}/connect/auth?client_id=${this.clientId}&redirect_uri=${this.redirectUri}&access_type=${this.accessType}&response_type=code`;if(i){r+=`&code_challenge=${i}&code_challenge_method=S256&options=rotate_refresh_token`}if(n?.provider){r+=`&provider=${n.provider}`}if(n?.email){r+=`&login_hint=${n.email}`}if(e){r+=`&scope=${e.join(" ")}`}return r}async generateCodeChallenge(){const t=await this.Storage.getPKCE();if(t){return}const e=v4();this.Storage.setPKCE(e);return}async hostedSetCodeChallenge(){if(!this.hosted){throw console.error("Method only used with hosted flag enabled")}const t=new URLSearchParams(window.location.search);const e=t.get("code_challenge");if(!e){const t=await this.Storage.getPKCE();if(t){return}console.warn("Code challenge is recomended");return}this.Storage.setPKCE(e)}async getCodeChallege(){if(this.hosted&&(this.domain===window.location.origin||this.versioned&&this.domain.includes(window.location.origin))){const t=new URLSearchParams(window.location.search);const e=t.get("code_challenge");if(!e){console.warn("Code challenge is recomended");return""}return e}const t=await this.Storage.getPKCE();if(t){const e=sha256.exports.sha256(t);let n=Buffer.from(e).toString("base64");n=Base64EncodeUrl(n);return n}return""}async isLoggedIn(){if(this.hosted&&(this.domain===window.location.origin||this.versioned&&this.domain.includes(window.location.origin))){return false}const t=await this.Storage.getUserTokens();if(t&&t.length>0){if(this.multiAccount){await this.generateCodeChallenge()}return true}await this.generateCodeChallenge();return false}isMultiAccount(){return this.multiAccount}async logout(){const t=await this.getProfile();await this.Storage.clearSession();const e={detail:t};window.dispatchEvent(new CustomEvent("onLogoutSuccess",e))}async getProfile(t=""){let e;if(t){e=await this.Storage.getUserToken(t)}else{e=await this.Storage.getUserToken()}if(e){return e}return null}async getProfiles(){const t=await this.Storage.getUserTokens();if(t){return t}return null}async removeProfile(t){await this.Storage.removeUserToken(t);await this.Storage.removeGrant(t);return null}async authIMAP(t){const e=await this.getCodeChallege();const n={imap_username:t.username,imap_password:t.password,imap_host:t.hostIMAP,imap_port:t.portIMAP,type:t.type,smtp_host:t.hostSMTP,smtp_port:t.portSMTP,provider:t.provider,redirect_uri:this.redirectUri,state:t.state,public_application_id:this.clientId,access_type:this.accessType};if(this.loginId){n.id=this.loginId}if(e!=""){n.code_challenge=e;n.code_challenge_method="S256"}const i=await fetch(`${this.domain}/connect/login/imap`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(n)});const r=await i.json();return r}async authEWS(t){const e=await this.getCodeChallege();const n={...t,redirect_uri:this.redirectUri,public_application_id:this.clientId,access_type:this.accessType};if(this.loginId){n.id=this.loginId}if(e!=""){n.code_challenge=e;n.code_challenge_method="S256"}const i=await fetch(`${this.domain}/connect/login/ews`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(n)});const r=await i.json();return r}async detectEmail(t){const e=await fetch(`${this.versioned?this.domain:this.domain+"/connect"}/providers/detect?client_id=${this.clientId}&email=${t}`,{method:"POST",headers:new Headers({"content-type":"application/json"})});const n=await e.json();return n.data}async applicationInfo(){const t=await fetch(`${this.versioned?this.domain:this.domain+"/connect"}/applications?client_id=${this.clientId}`,{method:"GET",headers:new Headers({"content-type":"application/json"})});const e=await t.json();return e.data}async getAvailableProviders(){const t=await fetch(`${this.domain}/connect/providers/find?client_id=${this.clientId}`,{method:"GET",headers:new Headers({"content-type":"application/json"})});if(t){const e=await t.json();const n=e.data;return n}return null}onLoginSuccess(t){window.addEventListener("onLoginSuccess",(e=>t(e)))}onLogoutSuccess(t){window.addEventListener("onLogoutSuccess",(e=>t(e)))}onLoginFail(t){window.addEventListener("onLoginFail",(e=>t(e)))}onTokenRefreshSuccess(t){window.addEventListener("onTokenRefreshSuccess",(e=>t(e)))}onTokenRefreshFail(t){window.addEventListener("onTokenRefreshFail",(e=>t(e)))}onSessionExpired(t){window.addEventListener("onSessionExpired",(e=>t(e)))}async codeExchange(t){let e=new URLSearchParams(window.location.search);if(t){e=new URLSearchParams(t)}const n=e.get("code");const i=e.get("state");const r=e.get("error");const s=e.get("error_description");const o=e.get("error_code");if(r&&s&&o){const t={detail:{error:r,error_description:s,error_code:o}};window.dispatchEvent(new CustomEvent("onLoginFail",t));window.history.pushState({},document.title,window.location.pathname);return false}if(!n){console.warn("No code found");return false}if(window.opener&&window.name==="uas-popup"){console.warn("Popup window detected");return false}const a=await this.Storage.getPKCE();if(!a){console.warn("No code verifier found");return false}try{const t={client_id:this.clientId,redirect_uri:this.redirectUri,code:n,grant_type:"authorization_code",code_verifier:a};const e=await fetch(`${this.domain}/connect/token`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(t)});const r=await e.json();if(r){if(r.error){const t={detail:r};window.dispatchEvent(new CustomEvent("onLoginFail",t));return true}const t=await this.handleCodeExchangeResponse(r);if(!t.valid){const e={detail:t.data};window.dispatchEvent(new CustomEvent("onLoginFail",e));return true}else{if(i){t.data.state=i}const e={detail:t.data};window.dispatchEvent(new CustomEvent("onLoginSuccess",e));window.history.pushState({},document.title,window.location.pathname)}}this.Storage.removePKCE();return true}catch(r){const t={detail:r};window.dispatchEvent(new CustomEvent("onLoginFail",t));window.history.pushState({},document.title,window.location.pathname);return false}}async tokenExchange(t=""){const e=await this.Storage.getGrant(t,this.multiAccount);if(!e){return false}const n=e.refresh_token;try{const e={client_id:this.clientId,redirect_uri:this.redirectUri,refresh_token:n,grant_type:"refresh_token"};const i=await fetch(`${this.domain}/connect/token`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(e)});const r=await i.json();if(r){if(r.error){const t={detail:r};window.dispatchEvent(new CustomEvent("onTokenRefreshFail",t));return true}const e=getTimestamp();r.expires_in=e+r.expires_in;this.Storage.setGrant(r,this.multiAccount);const n=await this.validateIDToken(t);if(!n){const t={detail:r};window.dispatchEvent(new CustomEvent("onTokenRefreshFail",t));return true}const i={detail:r};window.dispatchEvent(new CustomEvent("onTokenRefreshSuccess",i));return true}this.Storage.removePKCE()}catch(t){const e={detail:t};window.dispatchEvent(new CustomEvent("onTokenRefreshFail",e));return false}}async handleCodeExchangeResponse(t){const e=true;if(t.error){return{data:t,valid:false}}const n=getTimestamp();t.expires_in=n+t.expires_in;this.Storage.setGrant(t,this.multiAccount);const i=o(t.id_token);i.status="authenticated";this.Storage.setUserToken(i);const r=await this.validateIDToken(i.sub);if(!r){return{data:t,valid:false}}return{data:t,valid:e}}async popUp(t){const e=500;const n=600;const i=window.screenX+(window.outerWidth-e)/2;const r=window.screenY+(window.outerHeight-n)/2.5;const s=`uas-popup`;const o=t;const a=window.open(o,s,`width=${e},height=${n},left=${i},top=${r}`);if(!a){return}const c=setInterval((async()=>{if(a.closed){const t={detail:{error_description:"OAuth provider window closed"}};window.dispatchEvent(new CustomEvent("onLoginFail",t));c&&clearInterval(c);return}try{const t=a.location.href.split("?");if(!t[0]){return}const e=a.location.search;a.history.pushState({},document.title,window.location.pathname);if(t[0]===this.redirectUri&&t.length>1){const t=await this.codeExchange(e);a.close();if(t){location.reload()}c&&clearInterval(c);return}}catch(t){return}}),1e3)}async getAccessToken(t=""){const e=getTimestamp();const n=await this.Storage.getGrant(t,this.multiAccount);if(!n){return null}const{access_token:i,expires_in:r}=n;const s=i;if(s){if(r&&r>getTimestamp()){const t=r-e;if(t>30){return s}}}await this.tokenExchange(t);const o=await this.Storage.getGrant(t,this.multiAccount);return o.access_token}async sse(t,e){const n=e.headers||{};const i=n["Grant-ID"];let r="";if(this.multiAccount){if(!i){this.logout();throw new Error("Grant ID is required for multi account calls")}r=await this.getAccessToken(i)}else{r=await this.getAccessToken()}delete n["Grant-ID"];n["Authorization"]=`Bearer ${r}`;if(!n["content-type"]){n["content-type"]="application/json"}return fetchEventSource(`${this.domain}/${t}`,{...e,headers:n})}async fetch(t,e,n=true,i){let r="";let s=1;if(this.multiAccount){if(!e.grant_id){this.logout();throw new Error("Grant ID is required for multi account calls")}const t=await this.getProfiles();s=t?t.length:1;r=await this.getAccessToken(e.grant_id)}else{r=await this.getAccessToken()}if(!r){throw new Error("Access token not found")}let o=e.headers;if(!Headers.prototype.isPrototypeOf(o)){o=new Headers({Authorization:`Bearer ${r}`,"content-type":"application/json"})}else{o.append("Authorization",`Bearer ${r}`);if(!o.has("content-type")){o.append("content-type","application/json")}}try{if(e?.body){e.body=JSON.stringify(e?.body)}const r=await fetch(`${i||this.domain}/${t}`,{...e,headers:o});if(!n){return r}const a=await(r?.json());const c=await this.isAuthenticatedResponse(r.status,a);if(!c){if(s>1){const t=await this.getProfile(e.grant_id);if(t){t.status="unauthorized";await this.Storage.setUserToken(t);const e={detail:{user:t}};window.dispatchEvent(new CustomEvent("onSessionExpired",e))}}else{const t=await this.Storage.getUserToken();const e={detail:{user:t}};window.dispatchEvent(new CustomEvent("onSessionExpired",e))}this.logout();return}return a}catch(t){throw t}}async fetchRequest(t,e,n,i=true,r,s){const o=await this.isLoggedIn();const a=new URL(t,r??this.domain);const c=new Headers;c.append("Accept","application/json");c.append("Content-Type","application/json");c.append("User-Agent","nylas-identity");if(o){const t=await this.getAccessToken();c.append("Authorization",`Bearer ${t}`)}const u=await fetch(a.toString(),{method:e||"GET",headers:c,mode:"cors",referrer:location.origin,body:n?JSON.stringify(n):undefined,...s||{}});if(!i){return u.body}const l=await u.json();return l}async isAuthenticatedResponse(t,e){if(t==401&&e?.error?.type=="token.unauthorized_access"){return false}return true}addAPIKey(t,e,n){this.Storage.setUserToken({aud:"https://api-staging.us.nylas.com/",exp:2e9,email_verified:true,iat:getTimestamp(),iss:"",email:e,provider:"virtual-calendar",status:"authenticated",name:e,sub:t});this.Storage.setGrant({grant_id:t,access_token:n,expires_in:2e9},this.multiAccount)}}var react_production_min={};
|
|
2
|
-
/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(t){if(null===t||"object"!==typeof t)return null;t=z&&t[z]||t["@@iterator"];return"function"===typeof t?t:null}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(t,e,n){this.props=t;this.context=e;this.refs=D;this.updater=n||B}E.prototype.isReactComponent={};E.prototype.setState=function(t,e){if("object"!==typeof t&&"function"!==typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};E.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(t,e,n){this.props=t;this.context=e;this.refs=D;this.updater=n||B}var H=G.prototype=new F;H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function M(t,e,n){var i,r={},s=null,o=null;if(null!=e)for(i in void 0!==e.ref&&(o=e.ref),void 0!==e.key&&(s=""+e.key),e)J.call(e,i)&&!L.hasOwnProperty(i)&&(r[i]=e[i]);var a=arguments.length-2;if(1===a)r.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];r.children=c}if(t&&t.defaultProps)for(i in a=t.defaultProps,a)void 0===r[i]&&(r[i]=a[i]);return{$$typeof:l,type:t,key:s,ref:o,props:r,_owner:K.current}}function N(t,e){return{$$typeof:l,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function O(t){return"object"===typeof t&&null!==t&&t.$$typeof===l}function escape(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,(function(t){return e[t]}))}var P=/\/+/g;function Q(t,e){return"object"===typeof t&&null!==t&&null!=t.key?escape(""+t.key):e.toString(36)}function R(t,e,i,r,s){var o=typeof t;if("undefined"===o||"boolean"===o)t=null;var a=!1;if(null===t)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case l:case n:a=!0}}if(a)return a=t,s=s(a),t=""===r?"."+Q(a,0):r,I(s)?(i="",null!=t&&(i=t.replace(P,"$&/")+"/"),R(s,e,i,"",(function(t){return t}))):null!=s&&(O(s)&&(s=N(s,i+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(P,"$&/")+"/")+t)),e.push(s)),1;a=0;r=""===r?".":r+":";if(I(t))for(var c=0;c<t.length;c++){o=t[c];var u=r+Q(o,c);a+=R(o,e,i,u,s)}else if(u=A(t),"function"===typeof u)for(t=u.call(t),c=0;!(o=t.next()).done;)o=o.value,u=r+Q(o,c++),a+=R(o,e,i,u,s);else if("object"===o)throw e=String(t),Error("Objects are not valid as a React child (found: "+("[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function S(t,e,n){if(null==t)return t;var i=[],r=0;R(t,i,"","",(function(t){return e.call(n,t,r++)}));return i}function T(t){if(-1===t._status){var e=t._result;e=e();e.then((function(e){if(0===t._status||-1===t._status)t._status=1,t._result=e}),(function(e){if(0===t._status||-1===t._status)t._status=2,t._result=e}));-1===t._status&&(t._status=0,t._result=e)}if(1===t._status)return t._result.default;throw t._result}var U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};react_production_min.Children={map:S,forEach:function(t,e,n){S(t,(function(){e.apply(this,arguments)}),n)},count:function(t){var e=0;S(t,(function(){e++}));return e},toArray:function(t){return S(t,(function(t){return t}))||[]},only:function(t){if(!O(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};react_production_min.Component=E;react_production_min.Fragment=p;react_production_min.Profiler=r;react_production_min.PureComponent=G;react_production_min.StrictMode=q;react_production_min.Suspense=w;react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;react_production_min.cloneElement=function(t,e,n){if(null===t||void 0===t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=C({},t.props),r=t.key,s=t.ref,o=t._owner;if(null!=e){void 0!==e.ref&&(s=e.ref,o=K.current);void 0!==e.key&&(r=""+e.key);if(t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(c in e)J.call(e,c)&&!L.hasOwnProperty(c)&&(i[c]=void 0===e[c]&&void 0!==a?a[c]:e[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];i.children=a}return{$$typeof:l,type:t.type,key:r,ref:s,props:i,_owner:o}};react_production_min.createContext=function(e){e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};e.Provider={$$typeof:t,_context:e};return e.Consumer=e};react_production_min.createElement=M;react_production_min.createFactory=function(t){var e=M.bind(null,t);e.type=t;return e};react_production_min.createRef=function(){return{current:null}};react_production_min.forwardRef=function(t){return{$$typeof:v,render:t}};react_production_min.isValidElement=O;react_production_min.lazy=function(t){return{$$typeof:y,_payload:{_status:-1,_result:t},_init:T}};react_production_min.memo=function(t,e){return{$$typeof:x,type:t,compare:void 0===e?null:e}};react_production_min.startTransition=function(t){var e=V.transition;V.transition={};try{t()}finally{V.transition=e}};react_production_min.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};react_production_min.useCallback=function(t,e){return U.current.useCallback(t,e)};react_production_min.useContext=function(t){return U.current.useContext(t)};react_production_min.useDebugValue=function(){};react_production_min.useDeferredValue=function(t){return U.current.useDeferredValue(t)};react_production_min.useEffect=function(t,e){return U.current.useEffect(t,e)};react_production_min.useId=function(){return U.current.useId()};react_production_min.useImperativeHandle=function(t,e,n){return U.current.useImperativeHandle(t,e,n)};react_production_min.useInsertionEffect=function(t,e){return U.current.useInsertionEffect(t,e)};react_production_min.useLayoutEffect=function(t,e){return U.current.useLayoutEffect(t,e)};react_production_min.useMemo=function(t,e){return U.current.useMemo(t,e)};react_production_min.useReducer=function(t,e,n){return U.current.useReducer(t,e,n)};react_production_min.useRef=function(t){return U.current.useRef(t)};react_production_min.useState=function(t){return U.current.useState(t)};react_production_min.useSyncExternalStore=function(t,e,n){return U.current.useSyncExternalStore(t,e,n)};react_production_min.useTransition=function(){return U.current.useTransition()};react_production_min.version="18.2.0";const LoginRequired=({authenticationUrl:t})=>h("div",{class:"login-required"},h("div",{class:"card"},h("p",null,"Log into your account to use the Scheduler Editor."),h("button",{class:"google-button",onClick:async e=>{e.preventDefault();const n=await t("google");if(n){window.location.href=n}else{console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`)}}},h("span",{class:"icon"},h("google-logo-icon",{width:"15",height:"15"})),"Continue with Google"),h("button",{class:"microsoft-button",onClick:async e=>{e.preventDefault();const n=await t("microsoft");if(n){window.location.href=n}else{console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`)}}},h("span",{class:"icon"},h("microsoft-logo-icon",{width:"15",height:"15"})),"Continue with Microsoft"),h("button",{class:"other-provider-button",onClick:async e=>{e.preventDefault();const n=await t();if(n){window.location.href=n}else{console.error(`[nylas-scheduler-editor] Unable to get authentication URL.`)}}},"View all providers ",h("chevron-icon",{width:"17",height:"17"})),h("small",{class:"disclaimer-text"},"* You will be redirected to authenticate your account.")));const ExpressFlow=()=>h(Fragment,null,h("nylas-event-info",null,h("div",{slot:"inputs"},h("nylas-event-title",null),h("nylas-event-duration",null),h("nylas-event-location",null))),h("nylas-booking-calendar-picker",null));const nylasSchedulerEditorCss=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 0px 6px -2px rgba(0, 0, 0, 0.05), 0px 5px 15px -3px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}div.scheduler-editor-header{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--nylas-base-200);color:var(--nylas-base-900)}div.scheduler-editor-header h1.scheduler-editor-title{display:flex;align-items:center;gap:0.5rem;width:858px;margin:0;font-size:18px;line-height:24px;font-weight:600}@media screen and (max-width: 768px){div.scheduler-editor-header h1.scheduler-editor-title{width:auto;min-width:calc(325px - 1rem)}}div.scheduler-editor-header button{background:transparent;border:none;cursor:pointer}div.scheduler-editor-header button:hover,div.scheduler-editor-header button:active{color:var(--nylas-primary)}div.scheduler-editor-header button:disabled{cursor:not-allowed}nylas-editor-tabs{width:auto}nylas-editor-tabs nylas-event-info div[slot=inputs],nylas-editor-tabs nylas-event-limits div[slot=inputs]{display:flex;flex-direction:column;gap:1rem}.card{display:flex;flex-direction:column;padding:2rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;max-width:fit-content;align-self:center}.login-required{height:554px;overflow-y:auto;display:flex;flex-direction:column;justify-content:center;padding:2rem 1rem;background-color:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.login-required{height:auto}}.login-required p{margin:0 0 1rem}.login-required .microsoft-button,.login-required .google-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;margin-bottom:1rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;justify-content:center;gap:0.5rem;align-items:center}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;border:0;background-color:var(--nylas-base-0);height:48px;margin-bottom:1rem;font-size:0.95rem;justify-content:center;gap:0.25rem;align-items:center}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button svg{transform:rotate(180deg)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .disclaimer-text{font-size:0.75rem;color:var(--nylas-base-600);align-self:center}.list-configurations{padding:2rem;height:554px;background:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.list-configurations{height:auto}}.list-configurations nylas-list-configurations{height:inherit;display:flex;flex-direction:column}';const NylasSchedulerEditorStyle0=nylasSchedulerEditorCss;const NylasSchedulerEditor=class{constructor(t){registerInstance(this,t);this.init=createEvent(this,"init",7);this.loggedIn=createEvent(this,"loggedIn",7);this.loggedOut=createEvent(this,"loggedOut",7);this.schedulerConfigCloseClicked=createEvent(this,"schedulerConfigCloseClicked",7);this.handleSchedulerConfigCloseClicked=t=>{const e=this.schedulerConfigCloseClicked.emit(this.host);if(!e.defaultPrevented){localStorage.removeItem("grant");localStorage.removeItem("user");window.location.reload()}};this.authenticationUrl=async t=>{if(!this.nylasApiRequest){console.error(`[nylas-scheduler-editor] Nylas API Request is not initialized.`);return""}const e=await this.nylasApiRequest.authenticationUrl({provider:t});return e||""};this.configurationId=undefined;this.nylasApiRequest=undefined;this.nylasSessionsConfig=undefined;this.defaultAuthArgs=undefined;this.eventOverrides={};this.schedulerPreviewLink="";this.defaultSchedulerConfigState=undefined;this.mode="app";this.additionalParticipants=undefined;this.automaticComponentRegistration=true}connectedCallback(){debug(`[nylas-scheduler-editor] connectedCallback`)}async componentWillLoad(){debug(`[nylas-scheduler-editor] componentWillLoad`);this.stores={schedulerConfig:CreateNylasSchedulerConfigStore({...this.defaultSchedulerConfigState,additionalParticipants:this.additionalParticipants})};if(!this.nylasApiRequest&&this.nylasSessionsConfig){const t=new NylasSessions(this.nylasSessionsConfig);await t.isLoggedIn();t.onLoginSuccess((async()=>{const t=await(this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser());if(t){this.loggedIn.emit(this.host);this.loggedInHandler(t)}}));t.onLoginFail((async()=>{this.stores?.schedulerConfig?.set("currentUser",null);this.loggedOut.emit(this.host)}));this.nylasApiRequest=new NylasIdentityRequestWrapper(t)}if(this.nylasApiRequest&&this.defaultAuthArgs){this.nylasApiRequest.setDefaultAuthArgs(this.defaultAuthArgs)}this.baseProvider=new NylasBaseProvider(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const t=this.baseProvider.getStore("schedulerConfig");this.nylasSchedulerConfigConnector=new NylasSchedulerConfigConnector({nylasApiRequest:this.nylasApiRequest,nylasSchedulerConfigStore:t});const e=this.init.emit(this.host);if(!e.defaultPrevented){const t=await(this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser());if(t){this.loggedIn.emit(this.host);await this.loggedInHandler(t)}else{this.stores?.schedulerConfig?.set("currentUser",null);this.loggedOut.emit(this.host)}}this.stores?.schedulerConfig?.onChange("selectedConfiguration",(async t=>{if(t&&t.id){this.configurationId=t.id}}));this.baseProvider?.componentWillLoad(this.nylasSchedulerConfigConnector)}async componentDidLoad(){debug(`[nylas-scheduler-editor] componentDidLoad`);this.baseProvider?.componentDidLoad()}componentDisconnected(){this.baseProvider?.componentDisconnected()}async configurationIdChanged(t){if(t){await(this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(t));this.stores?.schedulerConfig?.set("action","edit")}else{this.stores?.schedulerConfig?.set("selectedConfiguration",{});this.stores?.schedulerConfig?.set("action",null)}}async store(){return this.stores?.schedulerConfig}async schedulerConnector(){return this.nylasSchedulerConfigConnector}async registerComponentHandler(t){this.baseProvider?.registerComponent(t.detail)}async unregisterComponentHandler(t){this.baseProvider?.unregisterComponent(t.detail)}async loggedInHandler(t){this.stores?.schedulerConfig?.set("currentUser",t);if(!this.nylasSchedulerConfigConnector){return}if(this.configurationId){const t=await(this.nylasSchedulerConfigConnector.schedulerConfig?.getConfigurationById(this.configurationId));if(t&&t[0]?.id){this.stores?.schedulerConfig?.set("action","edit")}}await(this.nylasSchedulerConfigConnector.schedulerConfig?.getCalendars())}render(){return h(Host,{key:"a48d674a738f32a2f7f0f5b8c8b81798b368f2ae"},h("div",{key:"3cce11f6c9c62914410b1c60098645fd896b6e3c",class:"scheduler-editor-header",part:"nse__header"},h("h1",{key:"face42c77c037f207bed8db2a8e916e9b9b89373",class:"scheduler-editor-title",part:"nse__title"},h("calendar-icon",{key:"3c1f3997897044d64bc14741dfa4834a35f71741",width:"18",height:"18"}),"Scheduler editor"),h("button",{key:"e19a066b77e2bdfeafeceadd5d4faec35f18ebe2",class:"scheduler-editor-close",title:"logout",onClick:t=>this.handleSchedulerConfigCloseClicked(t),part:"nse__close-button"},h("close-icon",{key:"8c8bbc1850bd45a79d5e5c99c75ceff5e4639091",width:"18",height:"18"}))),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action===null&&h("div",{class:"list-configurations"},h("nylas-list-configurations",null)),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create"&&h("nylas-editor-tabs",{mode:"composable"},h(ExpressFlow,null)),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="edit"&&h("nylas-editor-tabs",{mode:this.mode},this.mode==="composable"&&h("slot",null)),!this.stores?.schedulerConfig?.state.currentUser&&h("slot",{name:"login-required"},h(LoginRequired,{authenticationUrl:this.authenticationUrl})))}get host(){return getElement(this)}static get watchers(){return{configurationId:["configurationIdChanged"]}}};NylasSchedulerEditor.style=NylasSchedulerEditorStyle0;export{NylasSchedulerEditor as nylas_scheduler_editor};
|
|
11
|
-
//# sourceMappingURL=p-8506a8d4.entry.js.map
|