@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler-config.js","sourceRoot":"","sources":["../../../../src/connector/shared/api/scheduler-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAA0C,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAW3F,MAAM,OAAO,gCAAgC;IAI3C,YAAY,EAAE,eAAe,EAAE,yBAAyB,EAA2C;QACjG,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,yBAAyB,GAAG,yBAAyB,CAAC;IAC7D,CAAC;IAMM,KAAK,CAAC,WAAW;QACtB,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BAA0B,EAAE,CAAC;QAC9D,CAAC;QAED,OAAO,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CACF","sourcesContent":["import { NylasApiRequest } from '@/common/nylas-api-request';\nimport { NylasSchedulerConfigStoreType } from '@/stores/scheduler-config-store';\nimport { dataResponse } from '@/utils/utils';\nimport { Calendar, Configuration, NylasResponse, isNylasErrorResponse } from '@nylas/core';\n\ntype NylasSchedulerConfigAPIConnectorOptions = {\n nylasApiRequest?: NylasApiRequest;\n nylasSchedulerConfigStore: NylasSchedulerConfigStoreType;\n};\n\n/**\n * Nylas Scheduler Config API Connector\n * This class is responsible for making API requests to the Nylas API for Scheduler Configurations.\n */\nexport class NylasSchedulerConfigAPIConnector {\n private nylasApiRequest?: NylasApiRequest;\n private nylasSchedulerConfigStore: NylasSchedulerConfigStoreType;\n\n constructor({ nylasApiRequest, nylasSchedulerConfigStore }: NylasSchedulerConfigAPIConnectorOptions) {\n this.nylasApiRequest = nylasApiRequest;\n this.nylasSchedulerConfigStore = nylasSchedulerConfigStore;\n }\n\n /**\n * Get the current user.\n * @returns The current user or null if the request is not initialized.\n */\n public async currentUser() {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return null;\n }\n\n return this.nylasApiRequest.currentUser();\n }\n\n /**\n * Get the current user's calendars.\n * @returns The current user's calendars or an error if the request is not initialized.\n */\n public async getCalendars() {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error fetching calendars: Nylas API Request is not initialized',\n });\n }\n\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Calendar[]>>({\n method: 'GET',\n path: `calendars`,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error fetching calendars: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error fetching calendars: ' + response.error?.message,\n });\n }\n\n // Set the new calendars as the current calendars\n this.nylasSchedulerConfigStore.state.calendars = response.data;\n\n return dataResponse(response.data);\n }\n\n /**\n * Get a configuration by its ID.\n * @param configurationId The ID of the configuration to fetch.\n */\n public async getConfigurationById(configurationId: string, forceFetch: boolean = false) {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error fetching configuration: Nylas API Request is not initialized',\n });\n }\n\n // If the configuration is already in the store, return it\n if (!forceFetch) {\n const existingConfig = this.nylasSchedulerConfigStore.state.configurations.find(c => c.id === configurationId);\n if (existingConfig) {\n this.nylasSchedulerConfigStore.state.selectedConfiguration = existingConfig;\n return dataResponse(existingConfig);\n }\n }\n\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Configuration>>({\n method: 'GET',\n path: `scheduling/configurations/${configurationId}`,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error fetching configuration: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error fetching configuration: ' + response.error?.message,\n });\n }\n\n // Set the new configuration as the current configuration\n this.nylasSchedulerConfigStore.state.selectedConfiguration = response.data;\n\n // If the configuration was updated, update the list of configurations\n // If it doesn't exist, add it to the list\n if (this.nylasSchedulerConfigStore.state.configurations.find(c => c.id === configurationId)) {\n this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.map(c => (c.id === configurationId ? response.data : c));\n } else {\n this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, response.data];\n }\n\n return dataResponse(response.data);\n }\n\n /**\n * Get all configurations.\n * @returns The list of configurations or an error if the request is not initialized.\n */\n public async getConfigurations() {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error fetching configurations: Nylas API Request is not initialized',\n });\n }\n\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Configuration[]>>({\n method: 'GET',\n path: `scheduling/configurations`,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error fetching configurations: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error fetching configurations: ' + response.error?.message,\n });\n }\n\n // Set the new configuration as the current configuration\n this.nylasSchedulerConfigStore.state.configurations = response.data;\n\n return dataResponse(response.data);\n }\n\n /**\n * Create a new configuration.\n * @param configuration The configuration to create.\n * @returns The new configuration or an error if the request is not initialized.\n */\n public async createConfiguration(configuration: Omit<Partial<Configuration>, 'id'>) {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error creating configuration: Nylas API Request is not initialized',\n });\n }\n\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Configuration>>({\n method: 'POST',\n path: `scheduling/configurations`,\n body: configuration,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error creating configuration: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error creating configuration: ' + response.error?.message,\n });\n }\n\n // Set the new configuration as the current configuration\n this.nylasSchedulerConfigStore.state.selectedConfiguration = response.data;\n\n // Add the new configuration to the list of configurations\n this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, response.data];\n\n return dataResponse(response.data);\n }\n\n /**\n * Update an existing configuration.\n * @param configuration The configuration to update.\n * @returns The updated configuration or an error if the request is not initialized.\n */\n public async updateConfiguration(configuration: Partial<Configuration>) {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error updating configuration: Nylas API Request is not initialized',\n });\n }\n\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Configuration>>({\n method: 'PUT',\n path: `scheduling/configurations/${configuration.id}`,\n body: configuration,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error updating configuration: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error updating configuration: ' + response.error?.message,\n });\n }\n\n // Set the new configuration as the current configuration\n this.nylasSchedulerConfigStore.state.selectedConfiguration = response.data;\n\n // If the configuration was updated, update the list of configurations\n // If it doesn't exist, add it to the list\n if (this.nylasSchedulerConfigStore.state.configurations.find(c => c.id === configuration.id)) {\n this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.map(c => (c.id === configuration.id ? response.data : c));\n } else {\n this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, response.data];\n }\n\n return dataResponse(response.data);\n }\n\n /**\n * Delete a configuration by its ID.\n * @param configurationId The ID of the configuration to delete.\n * @returns The deleted configuration or an error if the request is not initialized.\n */\n public async deleteConfiguration(configurationId: string) {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error deleting configuration: Nylas API Request is not initialized',\n });\n }\n\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Configuration>>({\n method: 'DELETE',\n path: `scheduling/configurations/${configurationId}`,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error deleting configuration: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error deleting configuration: ' + response.error?.message,\n });\n }\n\n // Remove the configuration from the list\n this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.filter(c => c.id !== configurationId);\n\n // If the deleted configuration was the current configuration, reset it\n if (this.nylasSchedulerConfigStore.state.selectedConfiguration?.id === configurationId) {\n this.nylasSchedulerConfigStore.resetSelectedConfiguration();\n }\n\n return dataResponse(response.data);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"scheduler-config.js","sourceRoot":"","sources":["../../../../src/connector/shared/api/scheduler-config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAA0C,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAW3F,MAAM,OAAO,gCAAgC;IAI3C,YAAY,E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,gCAAgC,GAAG,QAAQ,CAAC,KAAK,EAAE,OAAO;aACpE,CAAC,CAAC;QACL,CAAC;QAGD,IAAI,CAAC,yBAAyB,CAAC,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,yBAAyB,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,eAAe,CAAC,CAAC;QAGhJ,IAAI,IAAI,CAAC,yBAAyB,CAAC,KAAK,CAAC,qBAAqB,EAAE,EAAE,KAAK,eAAe,EAAE,CAAC;YACvF,IAAI,CAAC,yBAAyB,CAAC,0BAA0B,EAAE,CAAC;QAC9D,CAAC;QAED,OAAO,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CACF","sourcesContent":["import { NylasApiRequest } from '@/common/nylas-api-request';\nimport { NylasSchedulerConfigStoreType } from '@/stores/scheduler-config-store';\nimport { dataResponse } from '@/utils/utils';\nimport { Calendar, Configuration, NylasResponse, isNylasErrorResponse } from '@nylas/core';\n\ntype NylasSchedulerConfigAPIConnectorOptions = {\n nylasApiRequest?: NylasApiRequest;\n nylasSchedulerConfigStore: NylasSchedulerConfigStoreType;\n};\n\n/**\n * Nylas Scheduler Config API Connector\n * This class is responsible for making API requests to the Nylas API for Scheduler Configurations.\n */\nexport class NylasSchedulerConfigAPIConnector {\n private nylasApiRequest?: NylasApiRequest;\n private nylasSchedulerConfigStore: NylasSchedulerConfigStoreType;\n\n constructor({ nylasApiRequest, nylasSchedulerConfigStore }: NylasSchedulerConfigAPIConnectorOptions) {\n this.nylasApiRequest = nylasApiRequest;\n this.nylasSchedulerConfigStore = nylasSchedulerConfigStore;\n }\n\n /**\n * Get the current user.\n * @returns The current user or null if the request is not initialized.\n */\n public async currentUser() {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return null;\n }\n\n return this.nylasApiRequest.currentUser();\n }\n\n /**\n * Get the current user's calendars.\n * @returns The current user's calendars or an error if the request is not initialized.\n */\n public async getCalendars() {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error fetching calendars: Nylas API Request is not initialized',\n });\n }\n\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Calendar[]>>({\n method: 'GET',\n path: `calendars`,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error fetching calendars: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error fetching calendars: ' + response.error?.message,\n });\n }\n\n // Set the new calendars as the current calendars\n this.nylasSchedulerConfigStore.state.calendars = response.data;\n\n return dataResponse(response.data);\n }\n\n /**\n * Get a configuration by its ID.\n * @param configurationId The ID of the configuration to fetch.\n */\n public async getConfigurationById(configurationId: string, forceFetch: boolean = false) {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error fetching configuration: Nylas API Request is not initialized',\n });\n }\n\n // If the configuration is already in the store, return it\n if (!forceFetch) {\n const existingConfig = this.nylasSchedulerConfigStore.state.configurations.find(c => c.id === configurationId);\n if (existingConfig) {\n this.nylasSchedulerConfigStore.state.selectedConfiguration = existingConfig;\n return dataResponse(existingConfig);\n }\n }\n\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Configuration>>({\n method: 'GET',\n path: `scheduling/configurations/${configurationId}`,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error fetching configuration: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error fetching configuration: ' + response.error?.message,\n });\n }\n\n // Set the new configuration as the current configuration\n this.nylasSchedulerConfigStore.state.selectedConfiguration = response.data;\n\n // If the configuration was updated, update the list of configurations\n // If it doesn't exist, add it to the list\n if (this.nylasSchedulerConfigStore.state.configurations.find(c => c.id === configurationId)) {\n this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.map(c => (c.id === configurationId ? response.data : c));\n } else {\n this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, response.data];\n }\n\n return dataResponse(response.data);\n }\n\n /**\n * Get all configurations.\n * @returns The list of configurations or an error if the request is not initialized.\n */\n public async getConfigurations(cursor?: string) {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error fetching configurations: Nylas API Request is not initialized',\n });\n }\n const limit = 50;\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Configuration[]>>({\n method: 'GET',\n path: `scheduling/configurations?limit=${limit}${cursor ? `&page_token=${cursor}` : ''}`,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error fetching configurations: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error fetching configurations: ' + response.error?.message,\n });\n }\n\n // Set the configurations in the store\n this.nylasSchedulerConfigStore.state.configurations = response.data;\n this.nylasSchedulerConfigStore.state.listConfigurationsNextCursor = response.next_cursor || null;\n return dataResponse(response.data);\n }\n\n /**\n * Create a new configuration.\n * @param configuration The configuration to create.\n * @returns The new configuration or an error if the request is not initialized.\n */\n public async createConfiguration(configuration: Omit<Partial<Configuration>, 'id'>) {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error creating configuration: Nylas API Request is not initialized',\n });\n }\n\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Configuration>>({\n method: 'POST',\n path: `scheduling/configurations`,\n body: configuration,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error creating configuration: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error creating configuration: ' + response.error?.message,\n });\n }\n\n // Set the new configuration as the current configuration\n this.nylasSchedulerConfigStore.state.selectedConfiguration = response.data;\n\n // Add the new configuration to the list of configurations\n this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, response.data];\n\n return dataResponse(response.data);\n }\n\n /**\n * Update an existing configuration.\n * @param configuration The configuration to update.\n * @returns The updated configuration or an error if the request is not initialized.\n */\n public async updateConfiguration(configuration: Partial<Configuration>) {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error updating configuration: Nylas API Request is not initialized',\n });\n }\n\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Configuration>>({\n method: 'PUT',\n path: `scheduling/configurations/${configuration.id}`,\n body: configuration,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error updating configuration: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error updating configuration: ' + response.error?.message,\n });\n }\n\n // Set the new configuration as the current configuration\n this.nylasSchedulerConfigStore.state.selectedConfiguration = response.data;\n\n // If the configuration was updated, update the list of configurations\n // If it doesn't exist, add it to the list\n if (this.nylasSchedulerConfigStore.state.configurations.find(c => c.id === configuration.id)) {\n this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.map(c => (c.id === configuration.id ? response.data : c));\n } else {\n this.nylasSchedulerConfigStore.state.configurations = [...this.nylasSchedulerConfigStore.state.configurations, response.data];\n }\n\n return dataResponse(response.data);\n }\n\n /**\n * Delete a configuration by its ID.\n * @param configurationId The ID of the configuration to delete.\n * @returns The deleted configuration or an error if the request is not initialized.\n */\n public async deleteConfiguration(configurationId: string) {\n if (!this.nylasApiRequest) {\n console.warn('Nylas API Request is not initialized');\n return dataResponse(null, {\n message: 'Error deleting configuration: Nylas API Request is not initialized',\n });\n }\n\n const [response, error] = await this.nylasApiRequest.request<NylasResponse<Configuration>>({\n method: 'DELETE',\n path: `scheduling/configurations/${configurationId}`,\n });\n\n if (error) {\n return dataResponse(null, {\n message: 'Error deleting configuration: ' + error.message,\n });\n }\n\n if (isNylasErrorResponse(response)) {\n return dataResponse(null, {\n message: 'Error deleting configuration: ' + response.error?.message,\n });\n }\n\n // Remove the configuration from the list\n this.nylasSchedulerConfigStore.state.configurations = this.nylasSchedulerConfigStore.state.configurations.filter(c => c.id !== configurationId);\n\n // If the deleted configuration was the current configuration, reset it\n if (this.nylasSchedulerConfigStore.state.selectedConfiguration?.id === configurationId) {\n this.nylasSchedulerConfigStore.resetSelectedConfiguration();\n }\n\n return dataResponse(response.data);\n }\n}\n"]}
|
|
@@ -110,12 +110,15 @@ export class NylaSchedulerAPIConnector {
|
|
|
110
110
|
return result;
|
|
111
111
|
}
|
|
112
112
|
async setReschedule(bookingID) {
|
|
113
|
+
this.schedulerStore.set('isLoading', true);
|
|
113
114
|
const eventInfo = this.schedulerStore.state.eventInfo;
|
|
114
115
|
if (eventInfo) {
|
|
115
116
|
this.schedulerStore.set('reschedulingEventInfo', eventInfo);
|
|
116
117
|
}
|
|
117
|
-
const result = await this.resetStoreStateAndFetchAvailability();
|
|
118
118
|
this.schedulerStore.set('rescheduleBookingId', bookingID);
|
|
119
|
+
const result = await this.resetStoreStateAndFetchAvailability().finally(() => {
|
|
120
|
+
this.schedulerStore.set('isLoading', false);
|
|
121
|
+
});
|
|
119
122
|
return result;
|
|
120
123
|
}
|
|
121
124
|
async setCancel(bookingID) {
|
|
@@ -141,16 +144,28 @@ export class NylaSchedulerAPIConnector {
|
|
|
141
144
|
if (!timezone) {
|
|
142
145
|
return { error: this.errors.component('Create Booking').no_timezone_selected() };
|
|
143
146
|
}
|
|
144
|
-
const
|
|
147
|
+
const order = this.schedulerStore.get('availabilityOrderEmails');
|
|
148
|
+
let participantToBookWith = '';
|
|
149
|
+
if (order.length > 0) {
|
|
150
|
+
const emails = timeslot.emails;
|
|
151
|
+
for (let i = 0; i < order.length; i++) {
|
|
152
|
+
if (emails.includes(order[i])) {
|
|
153
|
+
participantToBookWith = order[i];
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
const primaryGuest = data ? data?.primaryParticipant : bookingInfo?.primaryParticipant;
|
|
145
159
|
const guests = data ? data?.guests || [] : bookingInfo?.guests || [];
|
|
146
160
|
const additional_fields = data ? data?.additionalFields : bookingInfo?.additionalFields;
|
|
147
161
|
const headers = this.getHeaders();
|
|
148
162
|
const configIdParam = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : '';
|
|
149
163
|
const url = `/v3/scheduling/bookings${configIdParam}`;
|
|
150
164
|
const response = await this.makeAPIRequest(decodeURIComponent(url), 'POST', JSON.stringify({
|
|
165
|
+
participants: participantToBookWith ? [{ email: participantToBookWith }] : undefined,
|
|
151
166
|
additional_fields,
|
|
152
167
|
additional_guests: guests,
|
|
153
|
-
guest: { ...
|
|
168
|
+
guest: { ...primaryGuest },
|
|
154
169
|
start_time: timeslot.start_time.getTime() / 1000,
|
|
155
170
|
end_time: timeslot.end_time.getTime() / 1000,
|
|
156
171
|
timezone: timezone,
|
|
@@ -232,6 +247,10 @@ export class NylaSchedulerAPIConnector {
|
|
|
232
247
|
if (this.configId && !this.sessionId) {
|
|
233
248
|
params.append('configuration_id', encodeURIComponent(this.configId));
|
|
234
249
|
}
|
|
250
|
+
const rescheduleBookingId = this.schedulerStore.get('rescheduleBookingId');
|
|
251
|
+
if (rescheduleBookingId) {
|
|
252
|
+
params.append('booking_id', encodeURIComponent(rescheduleBookingId));
|
|
253
|
+
}
|
|
235
254
|
const queryString = params.toString();
|
|
236
255
|
const url = `/v3/scheduling/availability${queryString ? `?${queryString}` : ''}`;
|
|
237
256
|
const headers = this.getHeaders();
|
|
@@ -257,6 +276,8 @@ export class NylaSchedulerAPIConnector {
|
|
|
257
276
|
}) || [];
|
|
258
277
|
const availabilityTimeslotsFiltered = availability.filter(timeslot => timeslot.start_time.getTime() > nowTime);
|
|
259
278
|
this.schedulerStore.set('availability', availabilityTimeslotsFiltered);
|
|
279
|
+
const order = response.data?.order || [];
|
|
280
|
+
this.schedulerStore.set('availabilityOrderEmails', order);
|
|
260
281
|
}
|
|
261
282
|
this.schedulerStore.set('isLoading', false);
|
|
262
283
|
return response;
|
|
@@ -286,6 +307,7 @@ export class NylaSchedulerAPIConnector {
|
|
|
286
307
|
this.schedulerStore.set('cancelledEventInfo', {
|
|
287
308
|
booking_id: bookingId,
|
|
288
309
|
});
|
|
310
|
+
this.schedulerStore.set('rescheduleBookingId', '');
|
|
289
311
|
this.schedulerStore.set('isLoading', false);
|
|
290
312
|
return response;
|
|
291
313
|
}
|
|
@@ -306,13 +328,24 @@ export class NylaSchedulerAPIConnector {
|
|
|
306
328
|
if (!end_time) {
|
|
307
329
|
return { error: componentErrors.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.') };
|
|
308
330
|
}
|
|
331
|
+
const order = this.schedulerStore.get('availabilityOrderEmails');
|
|
332
|
+
let participantToBookWith = '';
|
|
333
|
+
if (order.length > 0) {
|
|
334
|
+
const emails = selectedTimeslot?.emails || [];
|
|
335
|
+
for (let i = 0; i < order.length; i++) {
|
|
336
|
+
if (emails.includes(order[i])) {
|
|
337
|
+
participantToBookWith = order[i];
|
|
338
|
+
break;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
309
342
|
const time_zone = timezone || selectedTimezone;
|
|
310
343
|
if (!time_zone) {
|
|
311
344
|
return { error: componentErrors.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.') };
|
|
312
345
|
}
|
|
313
|
-
const
|
|
346
|
+
const primaryGuest = data ? data?.primaryParticipant : bookingInfo?.primaryParticipant;
|
|
314
347
|
const guests = data ? data?.guests || [] : bookingInfo?.guests || [];
|
|
315
|
-
const additional_fields = data ?
|
|
348
|
+
const additional_fields = data ? data?.additionalFields : bookingInfo?.additionalFields;
|
|
316
349
|
const configIdParam = !this.sessionId && this.configId ? `?configuration_id=${this.configId}` : '';
|
|
317
350
|
const url = `/v3/scheduling/bookings/${bookingId}${configIdParam}`;
|
|
318
351
|
const headers = this.getHeaders();
|
|
@@ -321,7 +354,9 @@ export class NylaSchedulerAPIConnector {
|
|
|
321
354
|
end_time: end_time.getTime() / 1000,
|
|
322
355
|
time_zone,
|
|
323
356
|
additional_fields,
|
|
324
|
-
guest: { ...
|
|
357
|
+
guest: { ...primaryGuest },
|
|
358
|
+
additional_guests: guests,
|
|
359
|
+
participants: participantToBookWith ? [{ email: participantToBookWith }] : undefined,
|
|
325
360
|
}), headers);
|
|
326
361
|
if ('error' in response) {
|
|
327
362
|
this.schedulerStore.set('isLoading', false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler.js","sourceRoot":"","sources":["../../../../src/connector/shared/api/scheduler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,MAAM,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAarD,MAAM,OAAO,yBAAyB;IAOpC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAqC;QAF/F,WAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QAG5B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEO,UAAU;QAChB,OAAO,IAAI,CAAC,SAAS;YACnB,CAAC,CAAC;gBACE,aAAa,EAAE,UAAU,IAAI,CAAC,SAAS,EAAE;aAC1C;YACH,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;IASM,KAAK,CAAC,cAAc,CAAI,IAAY,EAAE,MAAc,EAAE,IAAwB,EAAE,OAAO,GAAG,EAAE;QACjG,IAAI,CAAC;YACH,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YACnD,YAAY,CAAC,QAAQ,GAAG,IAAI,CAAC;YAC7B,MAAM,QAAQ,GAAG,MAA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AC,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF","sourcesContent":["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"]}
|
|
1
|
+
{"version":3,"file":"scheduler.js","sourceRoot":"","sources":["../../../../src/connector/shared/api/scheduler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,MAAM,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAarD,MAAM,OAAO,yBAAyB;IAOpC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAqC;QAF/F,WAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QAG5B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEO,UAAU;QAChB,OAAO,IAAI,CAAC,SAAS;YACnB,CAAC,CAAC;gBACE,aAAa,EAAE,UAAU,IAAI,CAAC,SAAS,EAAE;aAC1C;YACH,CAAC,CAAC,EAAE,CAAC;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,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;YACvC,IAAI,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;YAC3B,IAAI,SAAS,IAAI,SAAS,IAAI,SAAS,EAAE,CAAC;gBACxC,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;gBACjD,KAAK,GAAG,SAAS,CAAC,SAAyB,CAAC,CAAC,YAAY,CAAC,CAAC;YAC7D,CAAC;YACD,OAAO,EAAE,KAAK,EAAE,CAAC;QACnB,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QACnE,IAAI,MAAM,IAAI,QAAQ,EAAE,CAAC;YACvB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;QACvD,CAAC;aAAM,IAAI,SAAS,EAAE,CAAC;YACrB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAClD,CAAC;aAAM,CAAC;YAEN,MAAM,KAAK,GAAG;gBACZ,UAAU,EAAE,SAAS;aACR,CAAC;YAChB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAC9C,CAAC;QAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF","sourcesContent":["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 this.schedulerStore.set('isLoading', true);\n const eventInfo = this.schedulerStore.state.eventInfo;\n if (eventInfo) {\n this.schedulerStore.set('reschedulingEventInfo', eventInfo);\n }\n this.schedulerStore.set('rescheduleBookingId', bookingID);\n\n // Set reschedule booking id\n const result = await this.resetStoreStateAndFetchAvailability().finally(() => {\n this.schedulerStore.set('isLoading', false);\n });\n\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 const order = this.schedulerStore.get('availabilityOrderEmails');\n let participantToBookWith = '';\n if (order.length > 0) {\n // Get the emails in the timeslot\n const emails = timeslot.emails;\n for (let i = 0; i < order.length; i++) {\n if (emails.includes(order[i])) {\n participantToBookWith = order[i];\n break;\n }\n }\n }\n const primaryGuest = 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 participants: participantToBookWith ? [{ email: participantToBookWith }] : undefined,\n additional_fields,\n additional_guests: guests,\n guest: { ...primaryGuest },\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 rescheduleBookingId = this.schedulerStore.get('rescheduleBookingId');\n if (rescheduleBookingId) {\n params.append('booking_id', encodeURIComponent(rescheduleBookingId));\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 const order = response.data?.order || [];\n this.schedulerStore.set('availabilityOrderEmails', order);\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 this.schedulerStore.set('rescheduleBookingId', '');\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\n const order = this.schedulerStore.get('availabilityOrderEmails');\n let participantToBookWith = '';\n if (order.length > 0) {\n // Get the emails in the timeslot\n const emails = selectedTimeslot?.emails || [];\n for (let i = 0; i < order.length; i++) {\n if (emails.includes(order[i])) {\n participantToBookWith = order[i];\n break;\n }\n }\n }\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 primaryGuest = 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 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: { ...primaryGuest },\n additional_guests: guests,\n participants: participantToBookWith ? [{ email: participantToBookWith }] : undefined,\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"]}
|
|
@@ -3,10 +3,12 @@ export function CreateNylasSchedulerConfigStore(defaultState = {}) {
|
|
|
3
3
|
const defaultSchedulerConfigState = {
|
|
4
4
|
selectedConfiguration: {},
|
|
5
5
|
configurations: [],
|
|
6
|
+
listConfigurationsNextCursor: null,
|
|
6
7
|
calendars: [],
|
|
7
8
|
currentUser: null,
|
|
8
9
|
action: null,
|
|
9
10
|
additionalParticipants: [],
|
|
11
|
+
hideEditorTabs: [],
|
|
10
12
|
...defaultState,
|
|
11
13
|
};
|
|
12
14
|
const store = createStore(defaultSchedulerConfigState);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler-config-store.js","sourceRoot":"","sources":["../../src/stores/scheduler-config-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"scheduler-config-store.js","sourceRoot":"","sources":["../../src/stores/scheduler-config-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA6D5D,MAAM,UAAU,+BAA+B,CAAC,eAAwD,EAAE;IACxG,MAAM,2BAA2B,GAAmC;QAClE,qBAAqB,EAAE,EAAE;QACzB,cAAc,EAAE,EAAE;QAClB,4BAA4B,EAAE,IAAI;QAClC,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,IAAI;QACjB,MAAM,EAAE,IAAI;QACZ,sBAAsB,EAAE,EAAE;QAC1B,cAAc,EAAE,EAAE;QAClB,GAAG,YAAY;KAChB,CAAC;IACF,MAAM,KAAK,GAAG,WAAW,CAAiC,2BAA2B,CAAC,CAAC;IAMvF,SAAS,0BAA0B;QACjC,KAAK,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,GAAG,YAAY,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;IACnF,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACtC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,0BAA0B,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,KAAK;QACR,0BAA0B;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["import { AdditionalParticipant, Calendar, Configuration } from '@nylas/core';\nimport { ObservableMap, createStore } from '@stencil/store';\nimport { User } from '@/common/nylas-api-request';\n\ntype RecursivePartial<T> = {\n [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object | undefined ? RecursivePartial<T[P]> : T[P];\n};\n\nexport interface NylasSchedulerConfigStoreState {\n /**\n * The selected configuration.\n * This is the configuration that is currently selected, use it to populate default values for new configurations.\n */\n selectedConfiguration: RecursivePartial<Configuration>;\n /**\n * The list of configurations.\n * This is the list of configurations that the user has created.\n */\n configurations: Configuration[];\n /**\n * The list of calendars.\n * This is the list of calendars that the user has access to.\n */\n calendars: Calendar[];\n /**\n * The current user.\n * This is the user that is currently logged in.\n */\n currentUser: User | null;\n /**\n * The current action.\n * This is the current action that the user is performing.\n */\n action: 'create' | 'edit' | null;\n /**\n * The additional participants.\n */\n additionalParticipants: AdditionalParticipant[];\n /**\n * The next cursor for list configurations.\n */\n listConfigurationsNextCursor: string | null;\n /**\n * The list of tabs to hide in the scheduler editor (optional).\n */\n hideEditorTabs?: string[];\n /**\n * The conference providers.\n */\n conferenceProviders?: Record<'microsoft' | 'zoom' | 'google', string>;\n}\n\nexport type NylasSchedulerConfigStoreType = ReturnType<typeof CreateNylasSchedulerConfigStore>;\n\nexport type CreateNylasSchedulerConfigStoreReturnType = ObservableMap<NylasSchedulerConfigStoreState> & {\n /**\n * Reset the selected configuration to the default state.\n * This is used to reset the selected configuration to the default state instead of setting it to an empty object.\n */\n resetSelectedConfiguration: () => void;\n};\n\nexport function CreateNylasSchedulerConfigStore(defaultState: Partial<NylasSchedulerConfigStoreState> = {}): CreateNylasSchedulerConfigStoreReturnType {\n const defaultSchedulerConfigState: NylasSchedulerConfigStoreState = {\n selectedConfiguration: {},\n configurations: [],\n listConfigurationsNextCursor: null,\n calendars: [],\n currentUser: null,\n action: null,\n additionalParticipants: [],\n hideEditorTabs: [],\n ...defaultState,\n };\n const store = createStore<NylasSchedulerConfigStoreState>(defaultSchedulerConfigState);\n\n /**\n * Reset the selected configuration to the default state.\n * This is used to reset the selected configuration to the default state instead of setting it to an empty object.\n */\n function resetSelectedConfiguration() {\n store.set('selectedConfiguration', { ...defaultState['selectedConfiguration'] });\n }\n\n store.onChange('action', async action => {\n if (!action) {\n resetSelectedConfiguration();\n }\n });\n\n return {\n ...store,\n resetSelectedConfiguration,\n };\n}\n"]}
|
|
@@ -7,6 +7,7 @@ export function CreateNylasSchedulerStore(defaultState = {}) {
|
|
|
7
7
|
selectedTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
8
8
|
selectedTimeslot: null,
|
|
9
9
|
showBookingForm: false,
|
|
10
|
+
availabilityOrderEmails: [],
|
|
10
11
|
selectableDates: null,
|
|
11
12
|
availability: [],
|
|
12
13
|
eventDuration: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduler-store.js","sourceRoot":"","sources":["../../src/stores/scheduler-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"scheduler-store.js","sourceRoot":"","sources":["../../src/stores/scheduler-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAuD7C,MAAM,UAAU,yBAAyB,CAAC,eAAkD,EAAE;IAC5F,MAAM,sBAAsB,GAA6B;QACvD,YAAY,EAAE,IAAI;QAClB,gBAAgB,EAAE,SAAS,CAAC,QAAQ;QACpC,gBAAgB,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ;QAClE,gBAAgB,EAAE,IAAI;QACtB,eAAe,EAAE,KAAK;QACtB,uBAAuB,EAAE,EAAE;QAC3B,eAAe,EAAE,IAAI;QACrB,YAAY,EAAE,EAAE;QAChB,aAAa,EAAE,CAAC;QAChB,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,IAAI;QACf,kBAAkB,EAAE,IAAI;QACxB,SAAS,EAAE,KAAK;QAChB,aAAa,EAAE,IAAI;QACnB,GAAG,YAAY;KAChB,CAAC;IACF,KAAK,CAAC,4BAA4B,EAAE,sBAAsB,CAAC,CAAC;IAC5D,MAAM,KAAK,GAAG,WAAW,CAA2B,sBAAsB,CAAC,CAAC;IAE5E,KAAK,CAAC,QAAQ,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE;QAC5C,KAAK,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;QACxC,MAAM,eAAe,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC1E,KAAK,CAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;QAC9C,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC;QAC1G,KAAK,CAAC,qBAAqB,EAAE,eAAe,CAAC,CAAC;QAC9C,KAAK,CAAC,GAAG,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAOH,KAAK,CAAC,KAAK,GAAG,GAAG,EAAE;QACjB,KAAK,MAAM,GAAG,IAAI,sBAAsB,EAAE,CAAC;YACzC,MAAM,KAAK,GAAG,sBAAsB,CAAC,GAA0C,CAAC,CAAC;YACjF,KAAK,CAAC,GAAG,CAAC,GAAU,EAAE,KAAK,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { DataState, NylasEvent } from '@/common/types';\nimport { debug } from '@/utils/utils';\nimport { AdditionalFields, 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 additional_fields?: Record<string, AdditionalFields>;\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 availabilityOrderEmails: string[];\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 availabilityOrderEmails: [],\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAyFA,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,yCAA0B,CAAA;IAC1B,yCAA0B,CAAA;AAC5B,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","sourcesContent":["export interface NylasResponse<Data = any> {\n request_id: string;\n data?: Data;\n error?: {\n message: string;\n type: string;\n };\n}\n\n// Avaliability\nexport interface OpenHours {\n days: number[];\n exDates: string[];\n timezone: string;\n start: string;\n end: string;\n}\n\nexport interface MeetingBuffer {\n before: number;\n after: number;\n}\n\nexport interface Rules {\n availability_method: 'max-fairness' | 'max-availability' | 'collective';\n buffer: MeetingBuffer;\n default_open_hours?: OpenHours[];\n round_robin_group_id: string;\n}\n\n// Scheduling\nexport interface Configuration {\n id: string;\n version: string;\n participants: Participant[];\n availability: Availability;\n additional_fields?: AdditionalFields[];\n event_booking: EventBooking;\n scheduler: Scheduler;\n}\n\nexport interface AdditionalFields {\n type: string;\n required: boolean;\n order: number;\n options?: string[];\n label?: string;\n}\n\nexport interface UpdateConfiguration extends Omit<Configuration, 'id'> {}\n\nexport interface Participant {\n name: string;\n email: string;\n is_organizer?: boolean;\n availability?: ParticipantAvailability;\n booking?: ParticipantBooking;\n}\n\nexport interface ParticipantAvailability {\n calendar_ids: string[];\n open_hours?: OpenHours[];\n}\n\nexport interface ParticipantBooking {\n calendar_id: string;\n}\n\nexport interface Availability {\n duration_minutes: number;\n interval_minutes?: number;\n round_to?: number;\n availability_rules?: Rules;\n}\n\nexport interface EventBooking {\n title: string;\n description?: string;\n location?: string;\n booking_type: BookingType;\n additional_fields?: { [key: string]: any };\n hide_participants: boolean;\n}\n\nexport interface Scheduler {\n available_days_in_future: number;\n min_cancellation_notice: number;\n}\n\nexport enum BookingType {\n InstantBooking = 'booking',\n PreBooking = 'pre-booking',\n}\n"]}
|
|
@@ -11,7 +11,7 @@ const AddCircleIcon = proxyCustomElement(class AddCircleIcon extends HTMLElement
|
|
|
11
11
|
this.height = '25';
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h("svg", { key: '
|
|
14
|
+
return (h("svg", { key: 'c79d0b353d7f86b3aa85263b6826eff7f859d4fc', width: this.width, height: this.height, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'db54a7ebb7020a9c38678dbe369ae07256cf3ad5', d: "M12 2.5c5.523 0 10 4.477 10 10s-4.477 10-10 10-10-4.477-10-10 4.477-10 10-10ZM12 4a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17Zm0 3.5a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 12 7.5Z", fill: "currentColor" })));
|
|
15
15
|
}
|
|
16
16
|
static get style() { return AddCircleIconStyle0; }
|
|
17
17
|
}, [2, "add-circle-icon", {
|
|
@@ -11,7 +11,7 @@ const ArchiveIcon = proxyCustomElement(class ArchiveIcon extends HTMLElement {
|
|
|
11
11
|
this.height = '15';
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h("svg", { key: '
|
|
14
|
+
return (h("svg", { key: '3f58af70c24e93bedd141637b7cee1962b8fda17', width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "auto", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'a7772a464f1fa4b4c4ddc0f6382ca6c38c0374d5', d: "M3 6H5H21", stroke: "auto", "stroke-width": "1.5" }), h("path", { key: '2359cca9ae704553e5c06f55acfe4d3a00bd12ab', d: "M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z", stroke: "auto", "stroke-width": "1.5" }), h("path", { key: '613a8b40113f8606d34e783b0dcaa0cbc1dd2860', d: "M10 11V17", stroke: "auto", "stroke-width": "1.5" }), h("path", { key: '25e17f88e8ed8f9decde38fb7a9061c953979d06', d: "M14 11V17", stroke: "auto", "stroke-width": "1.5" })));
|
|
15
15
|
}
|
|
16
16
|
static get style() { return ArchiveIconStyle0; }
|
|
17
17
|
}, [2, "archive-icon", {
|
package/dist/components/arrow.js
CHANGED
|
@@ -11,7 +11,7 @@ const ArrowIcon = proxyCustomElement(class ArrowIcon extends HTMLElement {
|
|
|
11
11
|
this.height = '15';
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h("svg", { key: '
|
|
14
|
+
return (h("svg", { key: '1bbee7e4b5c39d25359e15abff713b6d48b58efa', width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '00a2f6dc6ba1bdcb8f05dedd85f767c10d3f8fe3', d: "M5 12H19M12 5L19 12L12 19", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
15
15
|
}
|
|
16
16
|
static get style() { return ArrowIconStyle0; }
|
|
17
17
|
}, [2, "arrow-icon", {
|
package/dist/components/bold.js
CHANGED
|
@@ -11,7 +11,7 @@ const BoldIcon = proxyCustomElement(class BoldIcon extends HTMLElement {
|
|
|
11
11
|
this.height = '15';
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h("svg", { key: '
|
|
14
|
+
return (h("svg", { key: '70f1dece0ba94733694adbc1189355e9b1ea8819', width: this.width, height: this.height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '4a5cb0ce048f4163fe65ea36a28f332ded4592b5', d: "M6 4V20M9.5 4H15.5C17.7091 4 19.5 5.79086 19.5 8C19.5 10.2091 17.7091 12 15.5 12H9.5H16.5C18.7091 12 20.5 13.7909 20.5 16C20.5 18.2091 18.7091 20 16.5 20H9.5M9.5 4V20M9.5 4H4M9.5 20H4", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
15
15
|
}
|
|
16
16
|
static get style() { return BoldIconStyle0; }
|
|
17
17
|
}, [2, "bold-icon", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const buttonComponentCss = "button.sc-button-component{height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;font-family:var(--nylas-font-family);font-weight:600}@media screen and (max-width: 768px){button.sc-button-component{width:100%}}button.button-primary.sc-button-component{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}button.button-primary.sc-button-component:hover{background:var(--nylas-base-600)}button.button-primary.sc-button-component:active{background:var(--nylas-base-800)}button.button-primary.sc-button-component:disabled{background:var(--nylas-base-300);cursor:not-allowed}button.button-basic.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-base-700);background:transparent}button.button-basic.sc-button-component:hover{background:transparent;border-color:var(--nylas-primary)}button.button-basic.sc-button-component:active{background:transparent;border-color:var(--nylas-base-600);border-width:2px}button.button-basic.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}button.button-destructive.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-error);background:transparent}button.button-destructive.sc-button-component:hover{background:transparent;border-color:var(--nylas-error)}button.button-destructive.sc-button-component:active{background:transparent;border-color:var(--nylas-error-pressed);border-width:2px;color:var(--nylas-error-pressed)}button.button-destructive.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}button.button-invisible.sc-button-component{background:transparent;color:var(--nylas-base-800);border:none}button.button-invisible.sc-button-component:hover{background:var(--nylas-base-50);color:var(--nylas-primary)}button.button-invisible.sc-button-component:active{background:var(--nylas-base-50);color:var(--nylas-base-850)}button.button-invisible.sc-button-component:disabled{background:transparent;color:var(--nylas-base-300);cursor:not-allowed}";
|
|
3
|
+
const buttonComponentCss = "button.sc-button-component{display:flex;align-items:center;justify-content:center;gap:0.75rem;height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;font-family:var(--nylas-font-family);font-weight:600}@media screen and (max-width: 768px){button.sc-button-component{width:100%}}button.button-primary.sc-button-component{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}button.button-primary.sc-button-component:hover{background:var(--nylas-base-600)}button.button-primary.sc-button-component:active{background:var(--nylas-base-800)}button.button-primary.sc-button-component:disabled{background:var(--nylas-base-300);cursor:not-allowed}button.button-basic.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-base-700);background:transparent}button.button-basic.sc-button-component:hover{background:transparent;border-color:var(--nylas-primary)}button.button-basic.sc-button-component:active{background:transparent;border-color:var(--nylas-base-600);border-width:2px}button.button-basic.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}button.button-destructive.sc-button-component{border:1px solid var(--nylas-base-300);color:var(--nylas-error);background:transparent}button.button-destructive.sc-button-component:hover{background:transparent;border-color:var(--nylas-error)}button.button-destructive.sc-button-component:active{background:transparent;border-color:var(--nylas-error-pressed);border-width:2px;color:var(--nylas-error-pressed)}button.button-destructive.sc-button-component:disabled{background:transparent;border-color:var(--nylas-base-300);color:var(--nylas-base-300);cursor:not-allowed}button.button-invisible.sc-button-component{background:transparent;color:var(--nylas-base-800);border:none}button.button-invisible.sc-button-component:hover{background:var(--nylas-base-50);color:var(--nylas-primary)}button.button-invisible.sc-button-component:active{background:var(--nylas-base-50);color:var(--nylas-base-850)}button.button-invisible.sc-button-component:disabled{background:transparent;color:var(--nylas-base-300);cursor:not-allowed}";
|
|
4
4
|
const ButtonComponentStyle0 = buttonComponentCss;
|
|
5
5
|
|
|
6
6
|
const ButtonComponent = proxyCustomElement(class ButtonComponent extends HTMLElement {
|
|
@@ -18,7 +18,7 @@ const ButtonComponent = proxyCustomElement(class ButtonComponent extends HTMLEle
|
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
20
|
const className = `button-${this.variant}` + (this.disabled ? ' disabled' : '');
|
|
21
|
-
return (h("button", { key: '
|
|
21
|
+
return (h("button", { key: '77fcafa20043b9f599b1fa1239bf683969b05eaf', class: className, disabled: this.disabled, type: "type", onClick: this.clickHandler, onMouseOver: this.mouseOverHandler, onMouseOut: this.mouseOutHandler, onFocus: this.focusHandler, onBlur: this.blurHandler }, h("slot", { key: 'd061264ee544bb9f4ca7ec3aa03f54b84c8af1fd' })));
|
|
22
22
|
}
|
|
23
23
|
static get style() { return ButtonComponentStyle0; }
|
|
24
24
|
}, [6, "button-component", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"button-component2.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,
|
|
1
|
+
{"file":"button-component2.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,w0EAAw0E,CAAC;AACp2E,8BAAe,kBAAkB;;MCOpB,eAAe;;;;uBAEI,SAAS;wBAGX,KAAK;oBAEV,QAAQ;;;;;;;IAO/B,MAAM;QACJ,MAAM,SAAS,GAAG,UAAU,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,QAAQ,GAAG,WAAW,GAAG,EAAE,CAAC,CAAC;QAEhF,QACE,+DACE,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,IAAI,EAAC,MAAM,EACX,OAAO,EAAE,IAAI,CAAC,YAAY,EAC1B,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAClC,UAAU,EAAE,IAAI,CAAC,eAAe,EAChC,OAAO,EAAE,IAAI,CAAC,YAAY,EAC1B,MAAM,EAAE,IAAI,CAAC,WAAW,IAExB,8DAAa,CACN,EACT;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/design-system/button-component/button-component.scss?tag=button-component&encapsulation=scoped","src/components/design-system/button-component/button-component.tsx"],"sourcesContent":["@import '../../../common/mixins/buttons.scss';\n@import '../../../common/styles/variables.scss';\n\nbutton {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.75rem;\n height: 48px;\n border: none;\n border-radius: var(--nylas-border-radius-2x);\n font-size: 1rem;\n line-height: 24px;\n padding: 0 1rem;\n cursor: pointer;\n font-family: var(--nylas-font-family);\n font-weight: 600;\n\n @media #{$mobile} {\n width: 100%;\n }\n\n &.button-primary {\n @include primary-button;\n }\n\n &.button-basic {\n border: 1px solid var(--nylas-base-300);\n color: var(--nylas-base-700);\n background: transparent;\n\n &:hover {\n background: transparent;\n border-color: var(--nylas-primary);\n }\n\n &:active {\n background: transparent;\n border-color: var(--nylas-base-600);\n border-width: 2px;\n }\n\n &:disabled {\n background: transparent;\n border-color: var(--nylas-base-300);\n color: var(--nylas-base-300);\n cursor: not-allowed;\n }\n }\n\n &.button-destructive {\n border: 1px solid var(--nylas-base-300);\n color: var(--nylas-error);\n background: transparent;\n\n &:hover {\n background: transparent;\n border-color: var(--nylas-error);\n }\n\n &:active {\n background: transparent;\n border-color: var(--nylas-error-pressed);\n border-width: 2px;\n color: var(--nylas-error-pressed);\n }\n\n &:disabled {\n background: transparent;\n border-color: var(--nylas-base-300);\n color: var(--nylas-base-300);\n cursor: not-allowed;\n }\n }\n\n &.button-invisible {\n background: transparent;\n color: var(--nylas-base-800);\n border: none;\n\n &:hover {\n background: var(--nylas-base-50);\n color: var(--nylas-primary);\n }\n\n &:active {\n background: var(--nylas-base-50);\n color: var(--nylas-base-850);\n }\n\n &:disabled {\n background: transparent;\n color: var(--nylas-base-300);\n cursor: not-allowed;\n }\n }\n}\n","import { Component, Prop, h } from '@stencil/core';\ntype ButtonType = 'primary' | 'basic' | 'destructive' | 'invisible';\n\n@Component({\n tag: 'button-component',\n styleUrl: 'button-component.scss',\n scoped: true,\n})\nexport class ButtonComponent {\n // Define a prop to accept the button type\n @Prop() variant: ButtonType = 'primary';\n\n // Define a prop for disabled state\n @Prop() disabled: boolean = false;\n\n @Prop() type: string = 'button';\n @Prop() clickHandler?: (event: MouseEvent) => void;\n @Prop() mouseOverHandler?: (event: MouseEvent) => void;\n @Prop() mouseOutHandler?: (event: MouseEvent) => void;\n @Prop() focusHandler?: (event: FocusEvent) => void;\n @Prop() blurHandler?: (event: FocusEvent) => void;\n\n render() {\n const className = `button-${this.variant}` + (this.disabled ? ' disabled' : '');\n\n return (\n <button\n class={className}\n disabled={this.disabled}\n type=\"type\"\n onClick={this.clickHandler}\n onMouseOver={this.mouseOverHandler}\n onMouseOut={this.mouseOutHandler}\n onFocus={this.focusHandler}\n onBlur={this.blurHandler}\n >\n <slot></slot>\n </button>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface CalendarAgendaFillIcon extends Components.CalendarAgendaFillIcon, HTMLElement {}
|
|
4
|
+
export const CalendarAgendaFillIcon: {
|
|
5
|
+
prototype: CalendarAgendaFillIcon;
|
|
6
|
+
new (): CalendarAgendaFillIcon;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { C as CalendarAgendaFillIcon$1, d as defineCustomElement$1 } from './calendar-agenda-fill.js';
|
|
2
|
+
|
|
3
|
+
const CalendarAgendaFillIcon = CalendarAgendaFillIcon$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { CalendarAgendaFillIcon, defineCustomElement };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=calendar-agenda-fill-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"calendar-agenda-fill-icon.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|