@nylas/web-elements 1.1.0-canary.4 → 1.1.0-canary.7
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.cjs.entry.js +1 -1
- package/dist/cjs/add-circle-icon_22.cjs.entry.js +224 -94
- package/dist/cjs/add-circle-icon_22.cjs.entry.js.map +1 -1
- package/dist/cjs/archive-icon.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.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon_3.cjs.entry.js +3 -3
- package/dist/cjs/button-component.cjs.entry.js +2 -2
- package/dist/cjs/button-component.cjs.entry.js.map +1 -1
- package/dist/cjs/calendar-cancel-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-check-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-check-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/calendar-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-info-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-patterns-icon.cjs.entry.js +1 -1
- package/dist/cjs/checkmark-circle-icon.cjs.entry.js +1 -1
- package/dist/cjs/chevron-icon.cjs.entry.js +1 -1
- package/dist/cjs/chevron-icon_3.cjs.entry.js +4 -4
- package/dist/cjs/close-icon.cjs.entry.js +1 -1
- package/dist/cjs/{constants-6baf1f1d.js → constants-3e962931.js} +11 -1
- package/dist/cjs/{constants-6baf1f1d.js.map → constants-3e962931.js.map} +1 -1
- package/dist/cjs/{constants-0fba94a4.js → constants-d590922e.js} +11 -1
- package/dist/cjs/{constants-0fba94a4.js.map → constants-d590922e.js.map} +1 -1
- package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/flow-icon.cjs.entry.js +1 -1
- package/dist/cjs/folder-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-icon_6.cjs.entry.js +9 -9
- package/dist/cjs/globe-icon.cjs.entry.js +1 -1
- package/dist/cjs/google-logo-icon.cjs.entry.js +1 -1
- package/dist/cjs/google-logo-icon_4.cjs.entry.js +467 -0
- package/dist/cjs/google-logo-icon_4.cjs.entry.js.map +1 -0
- package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
- package/dist/cjs/index-7af03e3f.js +1 -158
- package/dist/cjs/index-c14ea8f5.js +1 -358
- package/dist/cjs/index.cjs.js +3 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{index.es-68425511.js → index.es-0a0f2d87.js} +9 -4
- package/dist/cjs/index.es-0a0f2d87.js.map +1 -0
- package/dist/cjs/{index.es-447c5aca.js → index.es-b12b7df1.js} +9 -4
- package/dist/cjs/index.es-b12b7df1.js.map +1 -0
- package/dist/cjs/info-icon.cjs.entry.js +1 -1
- package/dist/cjs/info-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/italic-icon.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-icon.cjs.entry.js +1 -1
- package/dist/cjs/location-icon.cjs.entry.js +1 -1
- package/dist/cjs/location-off-icon.cjs.entry.js +1 -1
- package/dist/cjs/{mailbox-store-556bc7b6.js → mailbox-store-05fa3bec.js} +3 -3
- package/dist/cjs/{mailbox-store-556bc7b6.js.map → mailbox-store-05fa3bec.js.map} +1 -1
- package/dist/cjs/{mailbox-store-aacd75ff.js → mailbox-store-14531fd4.js} +3 -3
- package/dist/cjs/{mailbox-store-aacd75ff.js.map → mailbox-store-14531fd4.js.map} +1 -1
- package/dist/cjs/microsoft-logo-icon.cjs.entry.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/nylas-additional-participants.cjs.entry.js +3 -3
- package/dist/cjs/nylas-api-request-27c25287.js +60 -0
- package/dist/cjs/nylas-api-request-27c25287.js.map +1 -0
- package/dist/cjs/nylas-api-request-abdb8dd8.js +58 -0
- package/dist/cjs/nylas-api-request-abdb8dd8.js.map +1 -0
- package/dist/cjs/nylas-availability-picker.cjs.entry.js +33 -16
- package/dist/cjs/nylas-availability-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booked-event-card.cjs.entry.js +3 -3
- package/dist/cjs/nylas-booked-event-card_10.cjs.entry.js +7 -7
- package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js +12 -6
- package/dist/cjs/nylas-booking-calendar-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-booking-form.cjs.entry.js +2 -2
- package/dist/cjs/nylas-buffer-time.cjs.entry.js +2 -2
- package/dist/cjs/nylas-calendar-picker.cjs.entry.js +13 -8
- package/dist/cjs/nylas-calendar-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-cancel-booking-form.cjs.entry.js +3 -3
- package/dist/cjs/nylas-cancelled-event-card.cjs.entry.js +3 -3
- package/dist/cjs/nylas-composer.cjs.entry.js +2 -2
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js +21 -12
- package/dist/cjs/nylas-custom-booking-flow.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js +85 -39
- package/dist/cjs/nylas-editor-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-description.cjs.entry.js +15 -6
- package/dist/cjs/nylas-event-description.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-duration.cjs.entry.js +15 -10
- package/dist/cjs/nylas-event-duration.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-event-info.cjs.entry.js +3 -3
- package/dist/cjs/nylas-event-limits.cjs.entry.js +3 -3
- package/dist/cjs/nylas-event-title.cjs.entry.js +52 -12
- package/dist/cjs/nylas-event-title.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +3 -3
- package/dist/cjs/nylas-if-state.cjs.entry.js +2 -2
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js +24 -11
- package/dist/cjs/nylas-limit-future-bookings.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-list-configurations.cjs.entry.js +129 -0
- package/dist/cjs/nylas-list-configurations.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-list-folders.cjs.entry.js +3 -3
- package/dist/cjs/nylas-list-threads.cjs.entry.js +3 -3
- package/dist/cjs/nylas-locale-switch.cjs.entry.js +3 -3
- package/dist/cjs/nylas-location-component.cjs.entry.js +17 -6
- package/dist/cjs/nylas-location-component.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-login.cjs.entry.js +3 -3
- package/dist/cjs/nylas-logo.cjs.entry.js +1 -1
- package/dist/cjs/nylas-mailbox-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +3 -3
- package/dist/cjs/nylas-mailbox.cjs.entry.js +4 -4
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js +28 -13
- package/dist/cjs/nylas-min-cancellation-notice.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-notification.cjs.entry.js +2 -2
- package/dist/cjs/nylas-provider.cjs.entry.js +6 -6
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +201 -75
- 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-selected-event-card.cjs.entry.js +3 -3
- package/dist/cjs/nylas-summarize-message-button.cjs.entry.js +4 -4
- package/dist/cjs/nylas-threads-refresh.cjs.entry.js +4 -4
- package/dist/cjs/nylas-threads-search.cjs.entry.js +3 -3
- package/dist/cjs/nylas-time-window-picker.cjs.entry.js +2 -2
- package/dist/cjs/nylas-timeslot-picker.cjs.entry.js +2 -2
- package/dist/cjs/nylas-view-email.cjs.entry.js +2 -2
- package/dist/cjs/nylas-view-thread.cjs.entry.js +3 -3
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/cjs/people-icon.cjs.entry.js +1 -1
- package/dist/cjs/play-icon.cjs.entry.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/{register-component-d729f3f7.js → register-component-09ebdf31.js} +8 -2
- package/dist/cjs/register-component-09ebdf31.js.map +1 -0
- package/dist/cjs/{register-component-f1ebc65d.js → register-component-c8b6e907.js} +8 -2
- package/dist/cjs/register-component-c8b6e907.js.map +1 -0
- package/dist/cjs/reply-all-icon.cjs.entry.js +1 -1
- package/dist/cjs/reply-icon.cjs.entry.js +1 -1
- package/dist/cjs/scheduler-config-store-37690bf0.js +32 -0
- package/dist/cjs/scheduler-config-store-37690bf0.js.map +1 -0
- package/dist/cjs/scheduler-config-store-529c8d7e.js +32 -0
- package/dist/cjs/scheduler-config-store-529c8d7e.js.map +1 -0
- package/dist/cjs/{scheduler-store-7320f5d0.js → scheduler-store-0081970d.js} +16 -3
- package/dist/cjs/scheduler-store-0081970d.js.map +1 -0
- package/dist/cjs/{scheduler-store-4cb46b3c.js → scheduler-store-67dc1986.js} +16 -3
- package/dist/cjs/scheduler-store-67dc1986.js.map +1 -0
- package/dist/cjs/search-icon.cjs.entry.js +1 -1
- package/dist/cjs/select-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/sent-icon.cjs.entry.js +1 -1
- package/dist/cjs/spam-icon.cjs.entry.js +1 -1
- package/dist/cjs/star-icon.cjs.entry.js +1 -1
- package/dist/cjs/stop-icon.cjs.entry.js +1 -1
- package/dist/cjs/time-period-selector.cjs.entry.js +2 -2
- package/dist/cjs/tooltip-component.cjs.entry.js +1 -1
- package/dist/cjs/translate-icon.cjs.entry.js +1 -1
- package/dist/cjs/trash-icon.cjs.entry.js +1 -1
- package/dist/cjs/underline-icon.cjs.entry.js +1 -1
- package/dist/cjs/{utils-53dd7574.js → utils-20663d54.js} +19 -1
- package/dist/cjs/utils-20663d54.js.map +1 -0
- package/dist/cjs/{utils-53298b01.js → utils-2c7f0895.js} +19 -1
- package/dist/cjs/{utils-53298b01.js.map → utils-2c7f0895.js.map} +1 -1
- package/dist/cjs/warning-icon.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/common/abstract-provider.js +7 -2
- package/dist/collection/common/abstract-provider.js.map +1 -1
- package/dist/collection/common/component-types.js.map +1 -1
- package/dist/collection/common/constants.js +9 -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-cancel.js +1 -1
- package/dist/collection/common/icons/calendar-check.js +1 -1
- package/dist/collection/common/icons/calendar-info.js +1 -1
- package/dist/collection/common/icons/calendar-patterns.js +1 -1
- package/dist/collection/common/icons/calendar.js +1 -1
- package/dist/collection/common/icons/checkmark-circle.js +1 -1
- package/dist/collection/common/icons/chevron.js +1 -1
- package/dist/collection/common/icons/close.js +1 -1
- package/dist/collection/common/icons/document-refresh.js +1 -1
- package/dist/collection/common/icons/flow.js +1 -1
- package/dist/collection/common/icons/folder.js +1 -1
- package/dist/collection/common/icons/forward.js +1 -1
- package/dist/collection/common/icons/globe.js +1 -1
- package/dist/collection/common/icons/google-logo.js +1 -1
- package/dist/collection/common/icons/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/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/play.js +1 -1
- package/dist/collection/common/icons/refresh.js +1 -1
- package/dist/collection/common/icons/reply-all.js +1 -1
- package/dist/collection/common/icons/reply.js +1 -1
- package/dist/collection/common/icons/search.js +1 -1
- package/dist/collection/common/icons/sent.js +1 -1
- package/dist/collection/common/icons/spam.js +1 -1
- package/dist/collection/common/icons/star.js +1 -1
- package/dist/collection/common/icons/stop.js +1 -1
- package/dist/collection/common/icons/translate.js +1 -1
- package/dist/collection/common/icons/trash.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/nylas-api-request.js +27 -7
- package/dist/collection/common/nylas-api-request.js.map +1 -1
- package/dist/collection/common/register-component.js +6 -0
- package/dist/collection/common/register-component.js.map +1 -1
- package/dist/collection/common/types.js.map +1 -1
- package/dist/collection/components/design-system/button-component/button-component.css +5 -0
- package/dist/collection/components/design-system/button-component/button-component.js +1 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +2 -2
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +2 -2
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +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-login/nylas-login.js +1 -1
- package/dist/collection/components/nylas-provider/nylas-provider.js +2 -2
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +1 -1
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +1 -1
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +55 -15
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.js +32 -5
- 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-calendar-picker/nylas-calendar-picker.js +23 -14
- package/dist/collection/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +41 -9
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.css +48 -9
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +167 -36
- 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 +4 -4
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/tab-contents.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.css +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +34 -2
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.css +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +35 -7
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.css +8 -1
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +83 -9
- 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 +45 -9
- 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 +142 -0
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js +330 -0
- package/dist/collection/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.css +2 -2
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js +37 -3
- package/dist/collection/components/scheduler-editor/nylas-location-component/nylas-location-component.js.map +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +49 -11
- 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-scheduler-editor/LoginRequired.js +30 -0
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/LoginRequired.js.map +1 -0
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.css +23 -2
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +108 -53
- 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/connector/nylas-scheduler-config-connector/index.js.map +1 -1
- package/dist/collection/connector/nylas-scheduler-connector/errors/index.js +8 -0
- package/dist/collection/connector/nylas-scheduler-connector/errors/index.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler-config.js +118 -30
- package/dist/collection/connector/shared/api/scheduler-config.js.map +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +6 -1
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/index.js +0 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/stores/scheduler-config-store.js +15 -2
- package/dist/collection/stores/scheduler-config-store.js.map +1 -1
- package/dist/collection/utils/utils.js +16 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/collection/utils/utils.spec.js +8 -1
- package/dist/collection/utils/utils.spec.js.map +1 -1
- package/dist/components/add-circle.js +1 -2
- package/dist/components/add-circle.js.map +1 -1
- package/dist/components/archive.js +1 -2
- package/dist/components/archive.js.map +1 -1
- package/dist/components/arrow.js +1 -2
- package/dist/components/arrow.js.map +1 -1
- package/dist/components/bold.js +1 -2
- package/dist/components/bold.js.map +1 -1
- package/dist/components/button-component2.js +2 -3
- package/dist/components/button-component2.js.map +1 -1
- package/dist/components/calendar-cancel.js +1 -2
- package/dist/components/calendar-cancel.js.map +1 -1
- package/dist/components/calendar-check.js +1 -2
- package/dist/components/calendar-check.js.map +1 -1
- package/dist/components/calendar-info.js +1 -2
- package/dist/components/calendar-info.js.map +1 -1
- package/dist/components/calendar-patterns.js +1 -2
- package/dist/components/calendar-patterns.js.map +1 -1
- package/dist/components/calendar.js +1 -2
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/checkmark-circle.js +1 -2
- package/dist/components/checkmark-circle.js.map +1 -1
- package/dist/components/chevron.js +1 -2
- package/dist/components/chevron.js.map +1 -1
- package/dist/components/close.js +1 -2
- package/dist/components/close.js.map +1 -1
- package/dist/components/constants.js +11 -2
- package/dist/components/constants.js.map +1 -1
- package/dist/components/document-refresh-icon.js +1 -2
- package/dist/components/document-refresh-icon.js.map +1 -1
- package/dist/components/flow.js +1 -2
- package/dist/components/flow.js.map +1 -1
- package/dist/components/focus-visible.js +1 -1
- package/dist/components/folder.js +1 -2
- package/dist/components/folder.js.map +1 -1
- package/dist/components/forward.js +1 -2
- package/dist/components/forward.js.map +1 -1
- package/dist/components/globe.js +1 -2
- package/dist/components/globe.js.map +1 -1
- package/dist/components/google-logo.js +1 -2
- package/dist/components/google-logo.js.map +1 -1
- package/dist/components/inbox.js +1 -2
- package/dist/components/inbox.js.map +1 -1
- package/dist/components/index.es.js +8 -3
- package/dist/components/index.es.js.map +1 -1
- package/dist/components/info.js +1 -2
- package/dist/components/info.js.map +1 -1
- package/dist/components/italic.js +1 -2
- package/dist/components/italic.js.map +1 -1
- package/dist/components/loading.js +1 -2
- package/dist/components/loading.js.map +1 -1
- package/dist/components/location-off.js +1 -2
- package/dist/components/location-off.js.map +1 -1
- package/dist/components/location.js +1 -2
- package/dist/components/location.js.map +1 -1
- package/dist/components/mailbox-store.js +1 -1
- package/dist/components/microsoft-logo.js +1 -2
- package/dist/components/microsoft-logo.js.map +1 -1
- package/dist/components/multi-select-dropdown2.js +3 -4
- package/dist/components/multi-select-dropdown2.js.map +1 -1
- package/dist/components/nylas-additional-participants.js +2 -3
- package/dist/components/nylas-additional-participants.js.map +1 -1
- package/dist/components/nylas-api-request.js +28 -7
- package/dist/components/nylas-api-request.js.map +1 -1
- package/dist/components/nylas-availability-picker2.js +33 -15
- package/dist/components/nylas-availability-picker2.js.map +1 -1
- package/dist/components/nylas-booked-event-card2.js +1 -2
- package/dist/components/nylas-booked-event-card2.js.map +1 -1
- package/dist/components/nylas-booking-calendar-picker2.js +12 -6
- package/dist/components/nylas-booking-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-booking-form2.js +1 -2
- package/dist/components/nylas-booking-form2.js.map +1 -1
- package/dist/components/nylas-buffer-time2.js +1 -2
- package/dist/components/nylas-buffer-time2.js.map +1 -1
- package/dist/components/nylas-calendar-picker2.js +13 -9
- package/dist/components/nylas-calendar-picker2.js.map +1 -1
- package/dist/components/nylas-cancel-booking-form2.js +2 -3
- package/dist/components/nylas-cancel-booking-form2.js.map +1 -1
- package/dist/components/nylas-cancelled-event-card2.js +2 -3
- package/dist/components/nylas-cancelled-event-card2.js.map +1 -1
- package/dist/components/nylas-composer2.js +2 -3
- package/dist/components/nylas-composer2.js.map +1 -1
- package/dist/components/nylas-custom-booking-flow2.js +23 -13
- package/dist/components/nylas-custom-booking-flow2.js.map +1 -1
- package/dist/components/nylas-date-picker2.js +1 -2
- package/dist/components/nylas-date-picker2.js.map +1 -1
- package/dist/components/nylas-editor-tabs2.js +91 -43
- package/dist/components/nylas-editor-tabs2.js.map +1 -1
- package/dist/components/nylas-event-description2.js +17 -7
- package/dist/components/nylas-event-description2.js.map +1 -1
- package/dist/components/nylas-event-duration2.js +16 -10
- package/dist/components/nylas-event-duration2.js.map +1 -1
- package/dist/components/nylas-event-info2.js +2 -3
- package/dist/components/nylas-event-info2.js.map +1 -1
- package/dist/components/nylas-event-limits2.js +2 -3
- package/dist/components/nylas-event-limits2.js.map +1 -1
- package/dist/components/nylas-event-title2.js +56 -14
- package/dist/components/nylas-event-title2.js.map +1 -1
- package/dist/components/nylas-form-card2.js +2 -3
- package/dist/components/nylas-form-card2.js.map +1 -1
- package/dist/components/nylas-if-state.js +1 -2
- package/dist/components/nylas-if-state.js.map +1 -1
- package/dist/components/nylas-limit-future-bookings2.js +25 -11
- package/dist/components/nylas-limit-future-bookings2.js.map +1 -1
- package/dist/components/nylas-list-configurations.d.ts +11 -0
- package/dist/components/nylas-list-configurations.js +8 -0
- package/dist/components/nylas-list-configurations.js.map +1 -0
- package/dist/components/nylas-list-configurations2.js +159 -0
- package/dist/components/nylas-list-configurations2.js.map +1 -0
- package/dist/components/nylas-list-folders.js +2 -3
- package/dist/components/nylas-list-folders.js.map +1 -1
- package/dist/components/nylas-list-threads.js +2 -3
- package/dist/components/nylas-list-threads.js.map +1 -1
- package/dist/components/nylas-locale-switch2.js +0 -1
- package/dist/components/nylas-locale-switch2.js.map +1 -1
- package/dist/components/nylas-location-component2.js +18 -6
- package/dist/components/nylas-location-component2.js.map +1 -1
- package/dist/components/nylas-login.js +1 -2
- package/dist/components/nylas-login.js.map +1 -1
- package/dist/components/nylas-logo2.js +1 -2
- package/dist/components/nylas-logo2.js.map +1 -1
- package/dist/components/nylas-mailbox-pagination.js +1 -2
- package/dist/components/nylas-mailbox-pagination.js.map +1 -1
- package/dist/components/nylas-mailbox-toolbar-button.js +2 -3
- package/dist/components/nylas-mailbox-toolbar-button.js.map +1 -1
- package/dist/components/nylas-mailbox.js +2 -3
- package/dist/components/nylas-mailbox.js.map +1 -1
- package/dist/components/nylas-min-cancellation-notice2.js +29 -13
- package/dist/components/nylas-min-cancellation-notice2.js.map +1 -1
- package/dist/components/nylas-notification2.js +2 -3
- package/dist/components/nylas-notification2.js.map +1 -1
- package/dist/components/nylas-provider.js +2 -3
- package/dist/components/nylas-provider.js.map +1 -1
- package/dist/components/nylas-scheduler-editor.js +270 -136
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling.js +1 -2
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-selected-event-card2.js +1 -2
- package/dist/components/nylas-selected-event-card2.js.map +1 -1
- package/dist/components/nylas-summarize-message-button2.js +3 -4
- package/dist/components/nylas-summarize-message-button2.js.map +1 -1
- package/dist/components/nylas-threads-refresh.js +3 -4
- package/dist/components/nylas-threads-refresh.js.map +1 -1
- package/dist/components/nylas-threads-search.js +2 -3
- package/dist/components/nylas-threads-search.js.map +1 -1
- package/dist/components/nylas-time-window-picker2.js +2 -4
- package/dist/components/nylas-time-window-picker2.js.map +1 -1
- package/dist/components/nylas-timeslot-picker2.js +1 -2
- package/dist/components/nylas-timeslot-picker2.js.map +1 -1
- package/dist/components/nylas-view-email2.js +2 -4
- package/dist/components/nylas-view-email2.js.map +1 -1
- package/dist/components/nylas-view-thread.js +2 -3
- package/dist/components/nylas-view-thread.js.map +1 -1
- package/dist/components/people-icon.js +1 -2
- package/dist/components/people-icon.js.map +1 -1
- package/dist/components/play.js +1 -2
- package/dist/components/play.js.map +1 -1
- package/dist/components/refresh.js +1 -2
- package/dist/components/refresh.js.map +1 -1
- package/dist/components/register-component.js +7 -1
- package/dist/components/register-component.js.map +1 -1
- package/dist/components/reply-all.js +1 -2
- package/dist/components/reply-all.js.map +1 -1
- package/dist/components/reply.js +1 -2
- package/dist/components/reply.js.map +1 -1
- package/dist/components/scheduler-config-store.js +15 -2
- package/dist/components/scheduler-config-store.js.map +1 -1
- package/dist/components/scheduler-store.js +15 -2
- package/dist/components/scheduler-store.js.map +1 -1
- package/dist/components/search.js +1 -2
- package/dist/components/search.js.map +1 -1
- package/dist/components/select-dropdown2.js +2 -3
- package/dist/components/select-dropdown2.js.map +1 -1
- package/dist/components/sent.js +1 -2
- package/dist/components/sent.js.map +1 -1
- package/dist/components/spam.js +1 -2
- package/dist/components/spam.js.map +1 -1
- package/dist/components/star.js +1 -2
- package/dist/components/star.js.map +1 -1
- package/dist/components/stop.js +1 -2
- package/dist/components/stop.js.map +1 -1
- package/dist/components/time-period-selector2.js +2 -3
- package/dist/components/time-period-selector2.js.map +1 -1
- package/dist/components/toolitp-component.js +1 -2
- package/dist/components/toolitp-component.js.map +1 -1
- package/dist/components/translate.js +1 -2
- package/dist/components/translate.js.map +1 -1
- package/dist/components/trash.js +1 -2
- package/dist/components/trash.js.map +1 -1
- package/dist/components/underline.js +1 -2
- package/dist/components/underline.js.map +1 -1
- package/dist/components/utils.js +49 -2
- package/dist/components/utils.js.map +1 -1
- package/dist/components/warning.js +1 -2
- package/dist/components/warning.js.map +1 -1
- package/dist/esm/add-circle-icon.entry.js +1 -1
- package/dist/esm/add-circle-icon_22.entry.js +224 -94
- package/dist/esm/add-circle-icon_22.entry.js.map +1 -1
- package/dist/esm/archive-icon.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.entry.js +1 -1
- package/dist/esm/bold-icon_3.entry.js +3 -3
- package/dist/esm/button-component.entry.js +2 -2
- package/dist/esm/button-component.entry.js.map +1 -1
- package/dist/esm/calendar-cancel-icon.entry.js +1 -1
- package/dist/esm/calendar-check-icon.entry.js +1 -1
- package/dist/esm/calendar-check-icon_2.entry.js +2 -2
- package/dist/esm/calendar-icon.entry.js +1 -1
- package/dist/esm/calendar-info-icon.entry.js +1 -1
- package/dist/esm/calendar-patterns-icon.entry.js +1 -1
- package/dist/esm/checkmark-circle-icon.entry.js +1 -1
- package/dist/esm/chevron-icon.entry.js +1 -1
- package/dist/esm/chevron-icon_3.entry.js +4 -4
- package/dist/esm/close-icon.entry.js +1 -1
- package/dist/esm/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
- package/dist/esm/{constants-335dffcf.js.map → constants-bf39e913.js.map} +1 -1
- package/dist/esm/{constants-6ee60d6d.js → constants-f34b9c6e.js} +11 -2
- package/dist/esm/{constants-6ee60d6d.js.map → constants-f34b9c6e.js.map} +1 -1
- package/dist/esm/document-refresh-icon.entry.js +1 -1
- package/dist/esm/flow-icon.entry.js +1 -1
- package/dist/esm/folder-icon.entry.js +1 -1
- package/dist/esm/forward-icon.entry.js +1 -1
- package/dist/esm/forward-icon_6.entry.js +9 -9
- package/dist/esm/globe-icon.entry.js +1 -1
- package/dist/esm/google-logo-icon.entry.js +1 -1
- package/dist/esm/google-logo-icon_4.entry.js +460 -0
- package/dist/esm/google-logo-icon_4.entry.js.map +1 -0
- package/dist/esm/inbox-icon.entry.js +1 -1
- package/dist/esm/index-7cb0dd3d.js +1 -158
- package/dist/esm/index-8362ce5c.js +1 -358
- package/dist/{nylas-web-elements/index.es-bd511719.js → esm/index.es-2842f8c8.js} +9 -4
- package/dist/esm/index.es-2842f8c8.js.map +1 -0
- package/dist/esm/{index.es-2578c6a5.js → index.es-f57e612a.js} +9 -4
- package/dist/esm/index.es-f57e612a.js.map +1 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/info-icon.entry.js +1 -1
- package/dist/esm/info-icon_2.entry.js +2 -2
- package/dist/esm/italic-icon.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-icon.entry.js +1 -1
- package/dist/esm/location-icon.entry.js +1 -1
- package/dist/esm/location-off-icon.entry.js +1 -1
- package/dist/esm/{mailbox-store-bb21512c.js → mailbox-store-47fc8a1a.js} +3 -3
- package/dist/esm/{mailbox-store-150cc456.js.map → mailbox-store-47fc8a1a.js.map} +1 -1
- package/dist/esm/{mailbox-store-150cc456.js → mailbox-store-d48269de.js} +3 -3
- package/dist/{nylas-web-elements/mailbox-store-150cc456.js.map → esm/mailbox-store-d48269de.js.map} +1 -1
- package/dist/esm/microsoft-logo-icon.entry.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +3 -3
- package/dist/esm/nylas-additional-participants.entry.js +3 -3
- package/dist/esm/nylas-api-request-8932547a.js +56 -0
- package/dist/esm/nylas-api-request-8932547a.js.map +1 -0
- package/dist/esm/nylas-api-request-b085294d.js +58 -0
- package/dist/esm/nylas-api-request-b085294d.js.map +1 -0
- package/dist/esm/nylas-availability-picker.entry.js +33 -16
- package/dist/esm/nylas-availability-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booked-event-card.entry.js +3 -3
- package/dist/esm/nylas-booked-event-card_10.entry.js +7 -7
- package/dist/esm/nylas-booking-calendar-picker.entry.js +12 -6
- package/dist/esm/nylas-booking-calendar-picker.entry.js.map +1 -1
- package/dist/esm/nylas-booking-form.entry.js +2 -2
- package/dist/esm/nylas-buffer-time.entry.js +2 -2
- package/dist/esm/nylas-calendar-picker.entry.js +13 -8
- package/dist/esm/nylas-calendar-picker.entry.js.map +1 -1
- package/dist/esm/nylas-cancel-booking-form.entry.js +3 -3
- package/dist/esm/nylas-cancelled-event-card.entry.js +3 -3
- package/dist/esm/nylas-composer.entry.js +2 -2
- package/dist/esm/nylas-custom-booking-flow.entry.js +21 -12
- package/dist/esm/nylas-custom-booking-flow.entry.js.map +1 -1
- package/dist/esm/nylas-date-picker.entry.js +2 -2
- package/dist/esm/nylas-editor-tabs.entry.js +86 -40
- package/dist/esm/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/esm/nylas-event-description.entry.js +15 -6
- package/dist/esm/nylas-event-description.entry.js.map +1 -1
- package/dist/esm/nylas-event-duration.entry.js +15 -10
- package/dist/esm/nylas-event-duration.entry.js.map +1 -1
- package/dist/esm/nylas-event-info.entry.js +3 -3
- package/dist/esm/nylas-event-limits.entry.js +3 -3
- package/dist/esm/nylas-event-title.entry.js +52 -12
- package/dist/esm/nylas-event-title.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +3 -3
- package/dist/esm/nylas-if-state.entry.js +2 -2
- package/dist/esm/nylas-limit-future-bookings.entry.js +24 -11
- package/dist/esm/nylas-limit-future-bookings.entry.js.map +1 -1
- package/dist/esm/nylas-list-configurations.entry.js +125 -0
- package/dist/esm/nylas-list-configurations.entry.js.map +1 -0
- package/dist/esm/nylas-list-folders.entry.js +3 -3
- package/dist/esm/nylas-list-threads.entry.js +3 -3
- package/dist/esm/nylas-locale-switch.entry.js +3 -3
- package/dist/esm/nylas-location-component.entry.js +17 -6
- package/dist/esm/nylas-location-component.entry.js.map +1 -1
- package/dist/esm/nylas-login.entry.js +3 -3
- package/dist/esm/nylas-logo.entry.js +1 -1
- package/dist/esm/nylas-mailbox-pagination.entry.js +2 -2
- package/dist/esm/nylas-mailbox-toolbar-button.entry.js +3 -3
- package/dist/esm/nylas-mailbox.entry.js +4 -4
- package/dist/esm/nylas-min-cancellation-notice.entry.js +28 -13
- package/dist/esm/nylas-min-cancellation-notice.entry.js.map +1 -1
- package/dist/esm/nylas-notification.entry.js +2 -2
- package/dist/esm/nylas-provider.entry.js +6 -6
- package/dist/esm/nylas-scheduler-editor.entry.js +202 -76
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +3 -3
- package/dist/esm/nylas-selected-event-card.entry.js +3 -3
- package/dist/esm/nylas-summarize-message-button.entry.js +4 -4
- package/dist/esm/nylas-threads-refresh.entry.js +4 -4
- package/dist/esm/nylas-threads-search.entry.js +3 -3
- package/dist/esm/nylas-time-window-picker.entry.js +2 -2
- package/dist/esm/nylas-timeslot-picker.entry.js +2 -2
- package/dist/esm/nylas-view-email.entry.js +2 -2
- package/dist/esm/nylas-view-thread.entry.js +3 -3
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/esm/people-icon.entry.js +1 -1
- package/dist/esm/play-icon.entry.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/{register-component-dc659dc3.js → register-component-cf5c8420.js} +8 -2
- package/dist/esm/register-component-cf5c8420.js.map +1 -0
- package/dist/{nylas-web-elements/register-component-0645dce0.js → esm/register-component-e5afe237.js} +8 -2
- package/dist/esm/register-component-e5afe237.js.map +1 -0
- package/dist/esm/reply-all-icon.entry.js +1 -1
- package/dist/esm/reply-icon.entry.js +1 -1
- package/dist/esm/scheduler-config-store-07d98279.js +30 -0
- package/dist/esm/scheduler-config-store-07d98279.js.map +1 -0
- package/dist/esm/scheduler-config-store-8f2e658e.js +30 -0
- package/dist/esm/scheduler-config-store-8f2e658e.js.map +1 -0
- package/dist/{nylas-web-elements/scheduler-store-4d0a4f8a.js → esm/scheduler-store-66c2168c.js} +16 -3
- package/dist/esm/scheduler-store-66c2168c.js.map +1 -0
- package/dist/esm/{scheduler-store-72116723.js → scheduler-store-a175fc3e.js} +16 -3
- package/dist/esm/scheduler-store-a175fc3e.js.map +1 -0
- package/dist/esm/search-icon.entry.js +1 -1
- package/dist/esm/select-dropdown.entry.js +2 -2
- package/dist/esm/sent-icon.entry.js +1 -1
- package/dist/esm/spam-icon.entry.js +1 -1
- package/dist/esm/star-icon.entry.js +1 -1
- package/dist/esm/stop-icon.entry.js +1 -1
- package/dist/esm/time-period-selector.entry.js +2 -2
- package/dist/esm/tooltip-component.entry.js +1 -1
- package/dist/esm/translate-icon.entry.js +1 -1
- package/dist/esm/trash-icon.entry.js +1 -1
- package/dist/esm/underline-icon.entry.js +1 -1
- package/dist/esm/{utils-3a8d433a.js → utils-73d8a928.js} +18 -2
- package/dist/{nylas-web-elements/utils-3a8d433a.js.map → esm/utils-73d8a928.js.map} +1 -1
- package/dist/esm/{utils-c00bdc3c.js → utils-d6204242.js} +18 -2
- package/dist/esm/utils-d6204242.js.map +1 -0
- package/dist/esm/warning-icon.entry.js +1 -1
- package/dist/nylas-web-elements/add-circle-icon.entry.js +1 -1
- package/dist/nylas-web-elements/archive-icon.entry.js +1 -1
- package/dist/nylas-web-elements/arrow-icon.entry.js +1 -1
- package/dist/nylas-web-elements/bold-icon.entry.js +1 -1
- package/dist/nylas-web-elements/button-component.entry.js +2 -2
- package/dist/nylas-web-elements/button-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-check-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-info-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +1 -1
- package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +1 -1
- package/dist/nylas-web-elements/chevron-icon.entry.js +1 -1
- package/dist/nylas-web-elements/close-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{constants-335dffcf.js → constants-bf39e913.js} +11 -2
- package/dist/nylas-web-elements/{constants-335dffcf.js.map → constants-bf39e913.js.map} +1 -1
- package/dist/nylas-web-elements/document-refresh-icon.entry.js +1 -1
- package/dist/nylas-web-elements/flow-icon.entry.js +1 -1
- package/dist/nylas-web-elements/folder-icon.entry.js +1 -1
- package/dist/nylas-web-elements/forward-icon.entry.js +1 -1
- package/dist/nylas-web-elements/globe-icon.entry.js +1 -1
- package/dist/nylas-web-elements/google-logo-icon.entry.js +1 -1
- package/dist/nylas-web-elements/inbox-icon.entry.js +1 -1
- package/dist/{esm/index.es-bd511719.js → nylas-web-elements/index.es-2842f8c8.js} +9 -4
- package/dist/nylas-web-elements/index.es-2842f8c8.js.map +1 -0
- package/dist/nylas-web-elements/index.esm.js +3 -1
- package/dist/nylas-web-elements/index.esm.js.map +1 -1
- package/dist/nylas-web-elements/info-icon.entry.js +1 -1
- package/dist/nylas-web-elements/italic-icon.entry.js +1 -1
- package/dist/nylas-web-elements/loading-icon.entry.js +1 -1
- package/dist/nylas-web-elements/location-icon.entry.js +1 -1
- package/dist/nylas-web-elements/location-off-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{mailbox-store-150cc456.js → mailbox-store-d48269de.js} +3 -3
- package/dist/{esm/mailbox-store-bb21512c.js.map → nylas-web-elements/mailbox-store-d48269de.js.map} +1 -1
- package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +1 -1
- package/dist/nylas-web-elements/multi-select-dropdown.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-api-request-b085294d.js +58 -0
- package/dist/nylas-web-elements/nylas-api-request-b085294d.js.map +1 -0
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js +33 -16
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +12 -6
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-booking-form.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +13 -8
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-composer.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +21 -12
- package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-date-picker.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +86 -40
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-description.entry.js +15 -6
- package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-duration.entry.js +15 -10
- package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-info.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-event-limits.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-event-title.entry.js +52 -12
- package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-form-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-if-state.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +24 -11
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-list-configurations.entry.js +125 -0
- package/dist/nylas-web-elements/nylas-list-configurations.entry.js.map +1 -0
- package/dist/nylas-web-elements/nylas-list-folders.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-list-threads.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-locale-switch.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-location-component.entry.js +17 -6
- package/dist/nylas-web-elements/nylas-location-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-login.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-logo.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-mailbox-pagination.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-mailbox-toolbar-button.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-mailbox.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +28 -13
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-notification.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-provider.entry.js +6 -6
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +202 -76
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-summarize-message-button.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-threads-refresh.entry.js +4 -4
- package/dist/nylas-web-elements/nylas-threads-search.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-view-email.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-view-thread.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/p-00a9efc1.entry.js +2 -0
- package/dist/nylas-web-elements/p-1a91cce5.entry.js +2 -0
- package/dist/nylas-web-elements/p-1a91cce5.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-3631e6e5.entry.js → p-1d25ca06.entry.js} +2 -2
- package/dist/nylas-web-elements/p-1e445e86.entry.js +2 -0
- package/dist/nylas-web-elements/{p-395f49eb.entry.js → p-2081b475.entry.js} +2 -2
- package/dist/nylas-web-elements/p-22e5436c.js +2 -0
- package/dist/nylas-web-elements/p-22e5436c.js.map +1 -0
- package/dist/nylas-web-elements/p-2b636359.entry.js +2 -0
- package/dist/nylas-web-elements/p-2b636359.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-4ee6f11e.entry.js → p-30784693.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-40ed7eab.entry.js → p-33b940fb.entry.js} +2 -2
- package/dist/nylas-web-elements/p-343a02e1.entry.js +2 -0
- package/dist/nylas-web-elements/{p-4d9fceeb.entry.js → p-343b8684.entry.js} +2 -2
- package/dist/nylas-web-elements/p-3909ec3f.entry.js +2 -0
- package/dist/nylas-web-elements/{p-d85eecf4.entry.js.map → p-3909ec3f.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-409d4410.entry.js → p-3b281401.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-901f9612.js → p-41dc0d93.js} +2 -2
- package/dist/nylas-web-elements/p-41dc0d93.js.map +1 -0
- package/dist/nylas-web-elements/{p-5a3809a7.entry.js → p-42791515.entry.js} +2 -2
- package/dist/nylas-web-elements/p-44a9ce77.entry.js +2 -0
- package/dist/nylas-web-elements/{p-1819b3d7.js → p-49f716ed.js} +4 -4
- package/dist/nylas-web-elements/p-49f716ed.js.map +1 -0
- package/dist/nylas-web-elements/{p-b2208193.entry.js → p-50b4a80f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-42a4c2fd.entry.js → p-571472d4.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-2523c292.entry.js → p-607b547b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-006ab406.entry.js → p-6110351b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-65062d50.entry.js → p-665ef10b.entry.js} +4 -4
- package/dist/nylas-web-elements/p-665ef10b.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-deafc6bc.entry.js → p-694b511a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-64364434.entry.js → p-73c062f8.entry.js} +2 -2
- package/dist/nylas-web-elements/p-75a8d077.entry.js +2 -0
- package/dist/nylas-web-elements/{p-41c1654e.entry.js.map → p-75a8d077.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-7c55dfa0.entry.js +2 -0
- package/dist/nylas-web-elements/{p-ba3d383f.entry.js.map → p-7c55dfa0.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-3da66838.entry.js → p-80d6175c.entry.js} +2 -2
- package/dist/nylas-web-elements/p-939db546.entry.js +2 -0
- package/dist/nylas-web-elements/{p-a1e27dc5.entry.js → p-95a3094a.entry.js} +2 -2
- package/dist/nylas-web-elements/p-9ea458c3.js +2 -0
- package/dist/nylas-web-elements/p-9ea458c3.js.map +1 -0
- package/dist/nylas-web-elements/p-a628eaeb.js +2 -0
- package/dist/nylas-web-elements/p-a628eaeb.js.map +1 -0
- package/dist/nylas-web-elements/p-ad64c2b8.entry.js +2 -0
- package/dist/nylas-web-elements/{p-baa620b4.entry.js → p-b25821e1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-374527e6.entry.js → p-b53062f7.entry.js} +2 -2
- package/dist/nylas-web-elements/p-bbf9aff2.entry.js +2 -0
- package/dist/nylas-web-elements/p-c20ab972.entry.js +2 -0
- package/dist/nylas-web-elements/{p-7b1bb792.entry.js → p-cc674b3b.entry.js} +3 -3
- package/dist/nylas-web-elements/p-d8f09631.entry.js +2 -0
- package/dist/nylas-web-elements/p-db15d382.js +2 -0
- package/dist/nylas-web-elements/p-db15d382.js.map +1 -0
- package/dist/nylas-web-elements/{p-9dac153b.entry.js → p-df6d54c7.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-d224c7af.entry.js → p-e03b2592.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9f168ff0.js → p-e22aa0b0.js} +2 -2
- package/dist/nylas-web-elements/{p-408dda49.js → p-eaa9151b.js} +2 -2
- package/dist/nylas-web-elements/p-eaa9151b.js.map +1 -0
- package/dist/nylas-web-elements/{p-ad9c3cab.entry.js → p-f154a362.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-ae01e1cb.entry.js → p-f1f8f745.entry.js} +2 -2
- package/dist/nylas-web-elements/people-icon.entry.js +1 -1
- package/dist/nylas-web-elements/play-icon.entry.js +1 -1
- package/dist/nylas-web-elements/refresh-icon.entry.js +1 -1
- package/dist/{esm/register-component-0645dce0.js → nylas-web-elements/register-component-e5afe237.js} +8 -2
- package/dist/nylas-web-elements/register-component-e5afe237.js.map +1 -0
- package/dist/nylas-web-elements/reply-all-icon.entry.js +1 -1
- package/dist/nylas-web-elements/reply-icon.entry.js +1 -1
- package/dist/nylas-web-elements/scheduler-config-store-8f2e658e.js +30 -0
- package/dist/nylas-web-elements/scheduler-config-store-8f2e658e.js.map +1 -0
- package/dist/{esm/scheduler-store-4d0a4f8a.js → nylas-web-elements/scheduler-store-66c2168c.js} +16 -3
- package/dist/nylas-web-elements/scheduler-store-66c2168c.js.map +1 -0
- package/dist/nylas-web-elements/search-icon.entry.js +1 -1
- package/dist/nylas-web-elements/select-dropdown.entry.js +2 -2
- package/dist/nylas-web-elements/sent-icon.entry.js +1 -1
- package/dist/nylas-web-elements/spam-icon.entry.js +1 -1
- package/dist/nylas-web-elements/star-icon.entry.js +1 -1
- package/dist/nylas-web-elements/stop-icon.entry.js +1 -1
- package/dist/nylas-web-elements/time-period-selector.entry.js +2 -2
- package/dist/nylas-web-elements/tooltip-component.entry.js +1 -1
- package/dist/nylas-web-elements/translate-icon.entry.js +1 -1
- package/dist/nylas-web-elements/trash-icon.entry.js +1 -1
- package/dist/nylas-web-elements/underline-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{utils-3a8d433a.js → utils-73d8a928.js} +18 -2
- package/dist/{esm/utils-3a8d433a.js.map → nylas-web-elements/utils-73d8a928.js.map} +1 -1
- package/dist/nylas-web-elements/warning-icon.entry.js +1 -1
- package/dist/types/common/component-types.d.ts +3 -1
- package/dist/types/common/constants.d.ts +2 -0
- package/dist/types/common/nylas-api-request.d.ts +6 -2
- package/dist/types/common/register-component.d.ts +1 -0
- package/dist/types/common/types.d.ts +3 -1
- package/dist/types/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.d.ts +10 -4
- package/dist/types/components/scheduler-editor/nylas-booking-calendar-picker/nylas-booking-calendar-picker.d.ts +2 -0
- package/dist/types/components/scheduler-editor/nylas-calendar-picker/nylas-calendar-picker.d.ts +3 -2
- package/dist/types/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.d.ts +4 -1
- package/dist/types/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.d.ts +41 -7
- package/dist/types/components/scheduler-editor/nylas-event-description/nylas-event-description.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-event-duration/nylas-event-duration.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-event-title/nylas-event-title.d.ts +6 -1
- package/dist/types/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.d.ts +6 -6
- package/dist/types/components/scheduler-editor/nylas-list-configurations/nylas-list-configurations.d.ts +27 -0
- package/dist/types/components/scheduler-editor/nylas-location-component/nylas-location-component.d.ts +3 -0
- package/dist/types/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.d.ts +4 -1
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/LoginRequired.d.ts +4 -0
- package/dist/types/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.d.ts +9 -4
- package/dist/types/components.d.ts +229 -18
- package/dist/types/connector/nylas-connector/index.d.ts +1 -1
- package/dist/types/connector/nylas-scheduler-config-connector/index.d.ts +3 -3
- package/dist/types/connector/nylas-scheduler-connector/errors/index.d.ts +1 -0
- package/dist/types/connector/shared/api/scheduler-config.d.ts +45 -8
- package/dist/types/index.d.ts +1 -1
- package/dist/types/stores/scheduler-config-store.d.ts +8 -2
- package/dist/types/utils/utils.d.ts +4 -1
- package/package.json +4 -3
- package/dist/cjs/google-logo-icon_3.cjs.entry.js +0 -302
- package/dist/cjs/google-logo-icon_3.cjs.entry.js.map +0 -1
- package/dist/cjs/index.es-447c5aca.js.map +0 -1
- package/dist/cjs/index.es-68425511.js.map +0 -1
- package/dist/cjs/nylas-api-request-8ec3a89c.js +0 -39
- package/dist/cjs/nylas-api-request-8ec3a89c.js.map +0 -1
- package/dist/cjs/nylas-api-request-ab24150d.js +0 -37
- package/dist/cjs/nylas-api-request-ab24150d.js.map +0 -1
- package/dist/cjs/register-component-d729f3f7.js.map +0 -1
- package/dist/cjs/register-component-f1ebc65d.js.map +0 -1
- package/dist/cjs/scheduler-config-store-31b83ad3.js +0 -19
- package/dist/cjs/scheduler-config-store-31b83ad3.js.map +0 -1
- package/dist/cjs/scheduler-config-store-9c2cc421.js +0 -19
- package/dist/cjs/scheduler-config-store-9c2cc421.js.map +0 -1
- package/dist/cjs/scheduler-store-4cb46b3c.js.map +0 -1
- package/dist/cjs/scheduler-store-7320f5d0.js.map +0 -1
- package/dist/cjs/utils-53dd7574.js.map +0 -1
- package/dist/components/_commonjsHelpers.js +0 -36
- package/dist/components/_commonjsHelpers.js.map +0 -1
- package/dist/esm/google-logo-icon_3.entry.js +0 -296
- package/dist/esm/google-logo-icon_3.entry.js.map +0 -1
- package/dist/esm/index.es-2578c6a5.js.map +0 -1
- package/dist/esm/index.es-bd511719.js.map +0 -1
- package/dist/esm/nylas-api-request-55446aba.js +0 -37
- package/dist/esm/nylas-api-request-55446aba.js.map +0 -1
- package/dist/esm/nylas-api-request-c97a0153.js +0 -35
- package/dist/esm/nylas-api-request-c97a0153.js.map +0 -1
- package/dist/esm/register-component-0645dce0.js.map +0 -1
- package/dist/esm/register-component-dc659dc3.js.map +0 -1
- package/dist/esm/scheduler-config-store-51ee4f42.js +0 -17
- package/dist/esm/scheduler-config-store-51ee4f42.js.map +0 -1
- package/dist/esm/scheduler-config-store-bc59545b.js +0 -17
- package/dist/esm/scheduler-config-store-bc59545b.js.map +0 -1
- package/dist/esm/scheduler-store-4d0a4f8a.js.map +0 -1
- package/dist/esm/scheduler-store-72116723.js.map +0 -1
- package/dist/esm/utils-c00bdc3c.js.map +0 -1
- package/dist/nylas-web-elements/index.es-bd511719.js.map +0 -1
- package/dist/nylas-web-elements/nylas-api-request-55446aba.js +0 -37
- package/dist/nylas-web-elements/nylas-api-request-55446aba.js.map +0 -1
- package/dist/nylas-web-elements/p-01bf65c2.entry.js +0 -2
- package/dist/nylas-web-elements/p-1819b3d7.js.map +0 -1
- package/dist/nylas-web-elements/p-2c5d5953.entry.js +0 -2
- package/dist/nylas-web-elements/p-39b280e2.entry.js +0 -2
- package/dist/nylas-web-elements/p-39b280e2.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-408dda49.js.map +0 -1
- package/dist/nylas-web-elements/p-41c1654e.entry.js +0 -2
- package/dist/nylas-web-elements/p-65062d50.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-65fdfb60.js +0 -2
- package/dist/nylas-web-elements/p-65fdfb60.js.map +0 -1
- package/dist/nylas-web-elements/p-901f9612.js.map +0 -1
- package/dist/nylas-web-elements/p-a0c2ce03.entry.js +0 -2
- package/dist/nylas-web-elements/p-a3d5a1dd.entry.js +0 -2
- package/dist/nylas-web-elements/p-ba3d383f.entry.js +0 -2
- package/dist/nylas-web-elements/p-bfdc148c.entry.js +0 -2
- package/dist/nylas-web-elements/p-cadc9052.js +0 -2
- package/dist/nylas-web-elements/p-cadc9052.js.map +0 -1
- package/dist/nylas-web-elements/p-d67d1c72.js +0 -2
- package/dist/nylas-web-elements/p-d67d1c72.js.map +0 -1
- package/dist/nylas-web-elements/p-d85eecf4.entry.js +0 -2
- package/dist/nylas-web-elements/p-d92a0405.entry.js +0 -2
- package/dist/nylas-web-elements/p-de63bc35.entry.js +0 -2
- package/dist/nylas-web-elements/p-df5e9aaf.js +0 -2
- package/dist/nylas-web-elements/p-df5e9aaf.js.map +0 -1
- package/dist/nylas-web-elements/p-eb93a363.entry.js +0 -2
- package/dist/nylas-web-elements/p-eb93a363.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-f48d0571.entry.js +0 -2
- package/dist/nylas-web-elements/p-fbbca7a6.entry.js +0 -2
- package/dist/nylas-web-elements/register-component-0645dce0.js.map +0 -1
- package/dist/nylas-web-elements/scheduler-config-store-bc59545b.js +0 -17
- package/dist/nylas-web-elements/scheduler-config-store-bc59545b.js.map +0 -1
- package/dist/nylas-web-elements/scheduler-store-4d0a4f8a.js.map +0 -1
- /package/dist/nylas-web-elements/{p-de63bc35.entry.js.map → p-00a9efc1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3631e6e5.entry.js.map → p-1d25ca06.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bfdc148c.entry.js.map → p-1e445e86.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-395f49eb.entry.js.map → p-2081b475.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4ee6f11e.entry.js.map → p-30784693.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-40ed7eab.entry.js.map → p-33b940fb.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d92a0405.entry.js.map → p-343a02e1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4d9fceeb.entry.js.map → p-343b8684.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-409d4410.entry.js.map → p-3b281401.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-5a3809a7.entry.js.map → p-42791515.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a0c2ce03.entry.js.map → p-44a9ce77.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-b2208193.entry.js.map → p-50b4a80f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-42a4c2fd.entry.js.map → p-571472d4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2523c292.entry.js.map → p-607b547b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-006ab406.entry.js.map → p-6110351b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-deafc6bc.entry.js.map → p-694b511a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-64364434.entry.js.map → p-73c062f8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3da66838.entry.js.map → p-80d6175c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-01bf65c2.entry.js.map → p-939db546.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a1e27dc5.entry.js.map → p-95a3094a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f48d0571.entry.js.map → p-ad64c2b8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-baa620b4.entry.js.map → p-b25821e1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-374527e6.entry.js.map → p-b53062f7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2c5d5953.entry.js.map → p-bbf9aff2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a3d5a1dd.entry.js.map → p-c20ab972.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7b1bb792.entry.js.map → p-cc674b3b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fbbca7a6.entry.js.map → p-d8f09631.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9dac153b.entry.js.map → p-df6d54c7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d224c7af.entry.js.map → p-e03b2592.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9f168ff0.js.map → p-e22aa0b0.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ad9c3cab.entry.js.map → p-f154a362.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ae01e1cb.entry.js.map → p-f1f8f745.entry.js.map} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-68c2fadf.js";const s=".sc-archive-icon-h{display:flex}";const a=s;const o=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"1b52f19fba89ca7184790e5beb6e0f8b006b2531",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"d9aad4815f9faabb40b6fe68827bdd483794e0c3",d:"M3 6H5H21",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"aab9d09e0a7f7ad6ca549d92989b9288865e07d7",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"}),e("path",{key:"c15b61e469283716f2127e9d0bec9cf5be9c67c1",d:"M10 11V17",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"a0ce485fc995006baa138da928b84538d65730f6",d:"M14 11V17",stroke:"auto","stroke-width":"1.5"}))}};o.style=a;const c=".sc-folder-icon-h{display:flex}";const d=c;const i=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"23af14d9c2696d6efca8e69a3a3a0166dc701ec7",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"c425010a33227de1f2a966acc6b96c256c4eadcb",d:"M3 8.2C3 7.07989 3 6.51984 3.21799 6.09202C3.40973 5.71569 3.71569 5.40973 4.09202 5.21799C4.51984 5 5.0799 5 6.2 5H9.67452C10.1637 5 10.4083 5 10.6385 5.05526C10.8425 5.10425 11.0376 5.18506 11.2166 5.29472C11.4184 5.4184 11.5914 5.59135 11.9373 5.93726L12.0627 6.06274C12.4086 6.40865 12.5816 6.5816 12.7834 6.70528C12.9624 6.81494 13.1575 6.89575 13.3615 6.94474C13.5917 7 13.8363 7 14.3255 7H17.8C18.9201 7 19.4802 7 19.908 7.21799C20.2843 7.40973 20.5903 7.71569 20.782 8.09202C21 8.51984 21 9.0799 21 10.2V15.8C21 16.9201 21 17.4802 20.782 17.908C20.5903 18.2843 20.2843 18.5903 19.908 18.782C19.4802 19 18.9201 19 17.8 19H6.2C5.07989 19 4.51984 19 4.09202 18.782C3.71569 18.5903 3.40973 18.2843 3.21799 17.908C3 17.4802 3 16.9201 3 15.8V8.2Z",stroke:"auto","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=d;const h=".sc-inbox-icon-h{display:flex}";const r=h;const f=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"e153fa9b609a6dd4f0ad200a3492beeddb7f8132",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"05b5b75c74881772330feeb0d1d1213522813905",d:"M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"d845bf5e1ccbe3e328be20e995c3c7713ff2b0f8",d:"M2 5L12 12.5L22 5",stroke:"auto","stroke-width":"1.5"}))}};f.style=r;const n=".sc-sent-icon-h{display:flex}";const C=n;const k=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"b3c088995658cd0e496bbb5add5a4f937b96837d",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"314fb0dd64e67ad973dac494453e2c1bbbdc9f3d",d:"M21.5 12L3.5 3.5L3.5 20.5L21.5 12Z",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"f24cbf7ceadf6efa9676bb277fc96ac254d9c668",d:"M3.5 3.5L12 10.5",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"491979a302745c0ecbce438405cbc392593d47dd",d:"M3.5 20.5L12 13.5",stroke:"auto","stroke-width":"1.5"}))}};k.style=C;const w=".sc-spam-icon-h{display:flex}";const b=w;const l=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"a1faf60f8ef46ef4f770dda1da7d3040836faac9",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"a8a11efc172095bd69c052641ac25a2deeba649d",d:"M20 3H4C2.89543 3 2 3.89543 2 5V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V5C22 3.89543 21.1046 3 20 3Z",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"2601512a6e12ac6f51145a3907d8d672f71e8cb4",d:"M2 5L12 12.5L22 5",stroke:"auto","stroke-width":"1.5"}))}};l.style=b;const u=".sc-star-icon-h{display:flex}";const p=u;const y=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"cde183d1ecede967504e09a1163d49440cb90202",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"2e6a40a4ac879c3f7cb5fb932c54a65e86aafcf8",d:"M9.15316 5.40838C10.4198 3.13613 11.0531 2 12 2C12.9469 2 13.5802 3.13612 14.8468 5.40837L15.1745 5.99623C15.5345 6.64193 15.7144 6.96479 15.9951 7.17781C16.2757 7.39083 16.6251 7.4699 17.3241 7.62805L17.9605 7.77203C20.4201 8.32856 21.65 8.60682 21.9426 9.54773C22.2352 10.4886 21.3968 11.4691 19.7199 13.4299L19.2861 13.9372C18.8096 14.4944 18.5713 14.773 18.4641 15.1177C18.357 15.4624 18.393 15.8341 18.465 16.5776L18.5306 17.2544C18.7841 19.8706 18.9109 21.1787 18.1449 21.7602C17.3788 22.3417 16.2273 21.8115 13.9243 20.7512L13.3285 20.4768C12.6741 20.1755 12.3469 20.0248 12 20.0248C11.6531 20.0248 11.3259 20.1755 10.6715 20.4768L10.0757 20.7512C7.77268 21.8115 6.62118 22.3417 5.85515 21.7602C5.08912 21.1787 5.21588 19.8706 5.4694 17.2544L5.53498 16.5776C5.60703 15.8341 5.64305 15.4624 5.53586 15.1177C5.42868 14.773 5.19043 14.4944 4.71392 13.9372L4.2801 13.4299C2.60325 11.4691 1.76482 10.4886 2.05742 9.54773C2.35002 8.60682 3.57986 8.32856 6.03954 7.77203L6.67589 7.62805C7.37485 7.4699 7.72433 7.39083 8.00494 7.17781C8.28555 6.96479 8.46553 6.64194 8.82547 5.99623L9.15316 5.40838Z",stroke:"auto","stroke-width":"1.5"}))}};y.style=p;const g=".sc-trash-icon-h{display:flex}";const x=g;const v=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"112a0f662aa55e21f66fea349837214b84582a4d",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"8405d564e9ae68e68a8462b7870ca35637512051",d:"M3 6H5H21",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"a002ff92613dc9fb30232a5588d04a52517461c0",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"}),e("path",{key:"63a384b8ae5234d01b263a7bc76313f9f95ec794",d:"M10 11V17",stroke:"auto","stroke-width":"1.5"}),e("path",{key:"58f9193d0888f843aeaa2c9ee9149e2c205f94ba",d:"M14 11V17",stroke:"auto","stroke-width":"1.5"}))}};v.style=x;export{o as archive_icon,i as folder_icon,f as inbox_icon,k as sent_icon,l as spam_icon,y as star_icon,v as trash_icon};
|
|
2
|
-
//# sourceMappingURL=p-a0c2ce03.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as c,h as a}from"./p-68c2fadf.js";const s=".sc-warning-icon-h{display:flex}";const t=s;const n=class{constructor(a){c(this,a);this.width="16";this.height="16"}render(){return a("svg",{key:"17a6924f3361b1cfc5d64fb4c07e8ec769617bb3",width:"21",height:"21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("path",{key:"cc403a3f0c8ec9bdb7c497de7235d24cc5c5cae7",d:"M10.149 7.054a.5.5 0 0 1 .5.5v4a.5.5 0 1 1-1 0v-4a.5.5 0 0 1 .5-.5Zm0 7.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM8.834 2.906a1.5 1.5 0 0 1 2.63 0l6.558 11.925a1.5 1.5 0 0 1-1.314 2.223H3.59a1.5 1.5 0 0 1-1.314-2.223L8.834 2.906Zm1.753.482a.5.5 0 0 0-.876 0L3.15 15.313a.5.5 0 0 0 .439.741h13.117a.5.5 0 0 0 .439-.741l-6.56-11.925Z",fill:"currentColor"}))}};n.style=t;export{n as warning_icon};
|
|
2
|
-
//# sourceMappingURL=p-a3d5a1dd.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as n,H as s,a as o}from"./p-68c2fadf.js";import{R as e}from"./p-408dda49.js";import{d as a}from"./p-901f9612.js";import"./p-cb65c223.js";const r=":host{display:contents}.container{height:var(--container-height, 100dvh);overflow-y:var(--container-overflow-y, auto)}.pagination{display:flex;justify-content:center;align-items:center;margin:0 auto;padding:0;list-style:none;font-size:0.875rem;font-weight:600;color:var(--nylas-color-primary-600)}.pagination sp-button svg{animation:rotate 1s linear infinite}sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}sp-button:hover{background-color:var(--nylas-color-primary-500)}sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}sp-button chevron-icon svg{width:15px;height:15px}.next chevron-icon{transform:rotate(180deg)}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";const l=r;var c=undefined&&undefined.__decorate||function(t,i,n,s){var o=arguments.length,e=o<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,n):s,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")e=Reflect.decorate(t,i,n,s);else for(var r=t.length-1;r>=0;r--)if(a=t[r])e=(o<3?a(e):o>3?a(i,n,e):a(i,n))||e;return o>3&&e&&Object.defineProperty(i,n,e),e};var h=undefined&&undefined.__metadata||function(t,i){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(t,i)};const d=class{constructor(n){t(this,n);this.next=i(this,"next",7);this.previous=i(this,"previous",7);this.state="ready";this.hasNextPage=false;this.hasPreviousPage=false;this.scrollTarget="container";this.mobileOnlyInfiniteScroll=true;this.mobileViewPortWidth=768;a(`[nylas-pagination] Constructed`);this.isScrollAtContainerBottom=this.isScrollAtContainerBottom.bind(this);this.isScrollAtPageBottom=this.isScrollAtPageBottom.bind(this);this.nextPage=this.nextPage.bind(this);this.previousPage=this.previousPage.bind(this);this.handlePageScroll=this.handlePageScroll.bind(this);this.handleContainerScroll=this.handleContainerScroll.bind(this)}connectedCallback(){a(`[nylas-pagination] Component connected`)}async componentWillLoad(){a(`[nylas-pagination] Component will load`)}async componentDidLoad(){a(`[nylas-pagination] Component did load`);if(this.containerElement){this.containerElement.addEventListener("scroll",this.handleContainerScroll)}}async componentWillRender(){a(`[nylas-pagination] Component will render`)}disconnectedCallback(){a(`[nylas-pagination] Component disconnected`);if(this.containerElement){this.containerElement.removeEventListener("scroll",this.handleContainerScroll)}}handlePageScroll(t){if(this.isScrollAtPageBottom()&&this.canScroll&&this.scrollTarget==="page"){this.nextPage()}}async nextPage(){const t=this.host.children.length>0;this.next.emit({hasChildren:t})}async previousPage(){const t=this.host.children.length>0;this.previous.emit({hasChildren:t})}handleContainerScroll(t){if(this.isScrollAtContainerBottom()&&this.canScroll&&this.scrollTarget==="container"){this.nextPage()}}isScrollAtContainerBottom(){if(!this.containerElement){return false}return this.containerElement&&this.containerElement.scrollTop+this.containerElement.clientHeight>=this.containerElement.scrollHeight}isScrollAtPageBottom(){return window.innerHeight+window.scrollY>=document.body.offsetHeight}get canScroll(){const t=this.host.children.length>0;return this.state==="ready"&&t&&(!this.mobileOnlyInfiniteScroll||window.innerWidth<this.mobileViewPortWidth)}render(){const t=this.host.children.length>0;if(t){return n(s,null,n("div",{class:"container",ref:t=>this.containerElement=t},n("slot",null),this.canScroll&&n("div",{class:"pagination"},n("sp-theme",{scale:"medium",color:"dark"},this.state==="ready"&&this.hasNextPage&&n("sp-button",{onClick:this.nextPage},n("div",{slot:"icon"},n("refresh-icon",{class:"refres-icon"}))," ","Load more...")))))}return n(s,null,n("sp-theme",{scale:"medium",color:"dark"},this.hasPreviousPage&&n("sp-button",{class:"previous",parr:"previous",onClick:this.previousPage},n("div",{slot:"icon"},n("chevron-icon",{class:"previous-icon"}))," ","Previous"),this.hasPreviousPage&&this.hasNextPage&&" ",this.hasNextPage&&n("sp-button",{class:"next",parr:"next",onClick:this.nextPage},n("div",{slot:"icon"},n("chevron-icon",{class:"next-icon"}))," ","Next")))}get host(){return o(this)}};c([e({name:"nylas-pagination",stateToProps:new Map([["mailbox.hasNextThreadPage","hasNextPage"],["mailbox.hasPreviousThreadPage","hasPreviousPage"],["mailbox.state","state"]]),eventToProps:{next:async(t,i)=>{a(`[nylas-pagination] Next page event fired`);const{hasChildren:n}=t.detail;await i.threads.nextThreadPage(n?"append":"overwrite",!n)},previous:async(t,i)=>{a(`[nylas-pagination] Previous page event fired`);const{hasChildren:n}=t.detail;await i.threads.previousThreadPage(n?"append":"overwrite",!n)}},fireRegisterEvent:true}),h("design:type",Function),h("design:paramtypes",[]),h("design:returntype",void 0)],d.prototype,"render",null);d.style=l;export{d as nylas_mailbox_pagination};
|
|
2
|
-
//# sourceMappingURL=p-ba3d383f.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-68c2fadf.js";const t=".wave{display:flex;align-items:center;justify-content:center}.dot{width:4px;height:4px;background-color:var(--dot-color, white);border-radius:50%;margin:0 2px;animation:wave 1.5s infinite ease-in-out}.dot:nth-child(2){animation-delay:0.2s}.dot:nth-child(3){animation-delay:0.4s}@keyframes wave{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-4px)}}";const s=t;const d=class{constructor(a){e(this,a);this.width="15";this.height="15"}render(){return a("div",{key:"527c232e2da580a89745cd8e3b51466eeeee2470",class:"wave"},a("div",{key:"a0299e733c420254c9ad8de27f63d83ded38424b",class:"dot"}),a("div",{key:"7b2cb22812150eab1f41c53808e5c927b91dc918",class:"dot"}),a("div",{key:"e8b2baa7ab5c445bc6e91b06b0193727d797a343",class:"dot"}))}};d.style=s;export{d as loading_icon};
|
|
2
|
-
//# sourceMappingURL=p-bfdc148c.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CreateNylasSchedulerConfigStore","defaultState","defaultNylasSchedulerConfigStoreState","config","configurations","calendars","currentUser","store","createStore"],"sources":["src/stores/scheduler-config-store.ts"],"sourcesContent":["import { Calendar, Configuration } from '@nylas/core';\nimport { createStore } from '@stencil/store';\nimport { User } from '@/common/nylas-api-request';\n\nexport interface NylasSchedulerConfigStoreState {\n config: Partial<Configuration>;\n configurations: Configuration[];\n calendars: Calendar[];\n currentUser: User | null;\n}\n\nexport type NylasSchedulerConfigStoreType = ReturnType<typeof CreateNylasSchedulerConfigStore>;\n\nexport function CreateNylasSchedulerConfigStore(defaultState: Partial<NylasSchedulerConfigStoreState> = {}) {\n const defaultNylasSchedulerConfigStoreState: NylasSchedulerConfigStoreState = {\n config: {},\n configurations: [],\n calendars: [],\n currentUser: null,\n ...defaultState,\n };\n const store = createStore<NylasSchedulerConfigStoreState>(defaultNylasSchedulerConfigStoreState);\n\n return store;\n}\n"],"mappings":"6CAagBA,EAAgCC,EAAwD,IACtG,MAAMC,EAAwE,CAC5EC,OAAQ,GACRC,eAAgB,GAChBC,UAAW,GACXC,YAAa,QACVL,GAEL,MAAMM,EAAQC,EAA4CN,GAE1D,OAAOK,CACT,Q"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
class t{constructor(t){this.session=t}setActiveGrantId(t){this.activeGrantId=t}async request({method:t,path:e,body:s,headers:n}){return this.session.fetch(`grants/me/${e}`,{method:t,headers:n?new Headers(n):undefined,body:s,...this.session.isMultiAccount()&&this.activeGrantId?{grant_id:this.activeGrantId}:{}})}async currentUser(){const t=this.session.isMultiAccount()?this.activeGrantId:undefined;const e=await this.session.getProfile(t);if(!e){return null}return{id:e.sub,email:e.email,name:e.name}}async authenticationUrl(t){return this.session.auth(t||{})}}export{t as N};
|
|
2
|
-
//# sourceMappingURL=p-d67d1c72.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["NylasIdentityRequestWrapper","constructor","session","this","setActiveGrantId","grantId","activeGrantId","request","method","path","body","headers","fetch","Headers","undefined","isMultiAccount","grant_id","currentUser","idToken","getProfile","id","sub","email","name","authenticationUrl","authArgs","auth"],"sources":["src/common/nylas-api-request.ts"],"sourcesContent":["import type { NylasSessions } from '@nylas/identity';\n\n/**\n * Arguments for making a request to the Nylas API.\n */\nexport type NylasRequestArgs = {\n method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';\n path: string;\n body?: any;\n headers?: Record<string, string>;\n};\n\n/**\n * A model representing a user in the Nylas Identity system.\n */\nexport type User = {\n id: string;\n email: string;\n name?: string;\n};\n\n/**\n * Arguments for authenticating a user with the Nylas Identity system.\n */\nexport type AuthArgs = {\n provider?: string;\n scope?: Array<string>;\n loginHint?: string;\n includeGrantScopes?: boolean;\n prompt?: string;\n metadata?: string;\n state?: string;\n};\n\n/**\n * Interface for making requests to the Nylas API.\n *\n * This is an abstract class that is meant to be implemented by customers to provide their own\n * implementation of making requests to the Nylas API. This allows customers to use their own\n * authentication mechanism, or to use a different HTTP client library.\n */\nexport abstract class NylasApiRequest {\n /**\n * This method should make an authenticated request to the Nylas API.\n * @param args NylasRequestArgs\n */\n abstract request<T>(args: NylasRequestArgs): Promise<T>;\n /**\n * This method should return the current user's information.\n */\n abstract currentUser(): Promise<User | null>;\n /**\n * This method should return the URL to redirect the user to for authentication.\n */\n abstract authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined>;\n}\n\n/**\n * A wrapper around the Nylas Identity session that implements the NylasApiRequest interface.\n * This class is used by the Nylas Web Elements to make requests to the Nylas API if no custom\n * implementation of NylasApiRequest is provided.\n */\nexport class NylasIdentityRequestWrapper implements NylasApiRequest {\n /**\n * The Nylas Identity session instance.\n */\n private session: NylasSessions;\n\n /**\n * The grant_id to use for requests, if there is multi-account support\n * enabled in the Nylas Identity settings.\n */\n private activeGrantId?: string;\n\n constructor(session: NylasSessions) {\n this.session = session;\n }\n\n /**\n * This method sets the grant_id to use for requests.\n * This is used when there is multi-account support enabled in the Nylas Identity settings.\n *\n * @param grantId\n */\n setActiveGrantId(grantId: string) {\n this.activeGrantId = grantId;\n }\n\n /**\n * This method makes a request to the Nylas API, using the Nylas Identity's fetch method.\n *\n * The `grants/me/` prefix is added because all requests made from the browser to the Nylas API\n * must be made on behalf of the currently logged in user with a valid access token.\n *\n * @param NylasRequestArgs\n * @returns Promise<T>\n */\n async request<T>({ method, path, body, headers }: NylasRequestArgs): Promise<T> {\n return this.session.fetch(`grants/me/${path}`, {\n method,\n headers: headers ? new Headers(headers) : undefined,\n body,\n ...(this.session.isMultiAccount() && this.activeGrantId ? { grant_id: this.activeGrantId } : {}),\n }) as Promise<T>;\n }\n\n /**\n * This method returns the current (logged in) user's information.\n * If the user is not logged in, it returns null.\n * @returns Promise<User | null>\n */\n async currentUser(): Promise<User | null> {\n const grantId = this.session.isMultiAccount() ? this.activeGrantId : undefined;\n const idToken = await this.session.getProfile(grantId);\n if (!idToken) {\n return null;\n }\n\n return {\n id: idToken.sub,\n email: idToken.email,\n name: idToken.name,\n };\n }\n\n /**\n * This method returns the URL to redirect the user to for authentication.\n * @param authConfig authArgs\n * @returns Promise<string | undefined>\n */\n async authenticationUrl(authArgs?: AuthArgs): Promise<string | undefined> {\n return this.session.auth(authArgs || {});\n }\n}\n"],"mappings":"MA8DaA,EAYX,WAAAC,CAAYC,GACVC,KAAKD,QAAUA,C,CASjB,gBAAAE,CAAiBC,GACfF,KAAKG,cAAgBD,C,CAYvB,aAAME,EAAWC,OAAEA,EAAMC,KAAEA,EAAIC,KAAEA,EAAIC,QAAEA,IACrC,OAAOR,KAAKD,QAAQU,MAAM,aAAaH,IAAQ,CAC7CD,SACAG,QAASA,EAAU,IAAIE,QAAQF,GAAWG,UAC1CJ,UACIP,KAAKD,QAAQa,kBAAoBZ,KAAKG,cAAgB,CAAEU,SAAUb,KAAKG,eAAkB,I,CASjG,iBAAMW,GACJ,MAAMZ,EAAUF,KAAKD,QAAQa,iBAAmBZ,KAAKG,cAAgBQ,UACrE,MAAMI,QAAgBf,KAAKD,QAAQiB,WAAWd,GAC9C,IAAKa,EAAS,CACZ,OAAO,I,CAGT,MAAO,CACLE,GAAIF,EAAQG,IACZC,MAAOJ,EAAQI,MACfC,KAAML,EAAQK,K,CASlB,uBAAMC,CAAkBC,GACtB,OAAOtB,KAAKD,QAAQwB,KAAKD,GAAY,G"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as a,h as t,H as n,a as s,F as r}from"./p-68c2fadf.js";import{R as i}from"./p-408dda49.js";import{d as o,l,m as c,n as d,o as f}from"./p-901f9612.js";import{T as b,g as p,L as y}from"./p-1819b3d7.js";import"./p-cb65c223.js";const h=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.event-card-wrapper{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;margin-bottom:2rem;width:424px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 0;display:flex;align-items:center;flex-direction:column;font-size:1rem;font-weight:400}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.booking-date-time,.booking-participants{padding:0 1rem;margin-top:1.5rem;margin-left:3rem;display:flex;flex-direction:column;justify-content:space-between;align-self:flex-start;position:relative}.booking-date-time svg,.booking-participants svg{color:var(--nylas-base-700);position:absolute;left:-10px}.booking-date-time .block,.booking-participants .block{display:block}.booking-date-time h3,.booking-participants h3{color:var(--nylas-base-600);margin:0;font-size:1rem;font-weight:600;line-height:1.25rem;text-align:justify;margin-bottom:4px}.booking-date-time p,.booking-participants p{font-size:16px;margin:0;font-weight:400;text-align:justify;color:var(--nylas-base-800)}.booking-participants{margin-bottom:1.5rem}.booked-event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:1.5rem;gap:4px;margin:2rem;align-items:center;align-self:flex-end}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:16px;padding:8px;font-family:var(--nylas-font-family);font-weight:600;height:48px;line-height:24px}sp-button.cancel{color:var(--nylas-error)}sp-button.cancel:hover,sp-button.cancel:focus{border-color:var(--nylas-error)}sp-button.cancel:active{color:var(--nylas-error-pressed);border-color:var(--nylas-error-pressed)}sp-button.reschedule:hover,sp-button.reschedule:focus{border-color:var(--nylas-primary)}sp-button.reschedule:active{border-color:var(--nylas-base-600)}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}';const u=h;var m=undefined&&undefined.__decorate||function(e,a,t,n){var s=arguments.length,r=s<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,t):n,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,a,t,n);else for(var o=e.length-1;o>=0;o--)if(i=e[o])r=(s<3?i(r):s>3?i(a,t,r):i(a,t))||r;return s>3&&r&&Object.defineProperty(a,t,r),r};var g=undefined&&undefined.__metadata||function(e,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,a)};const v=class{constructor(t){e(this,t);this.cancelBookingButtonClicked=a(this,"cancelBookingButtonClicked",7);this.rescheduleButtonClicked=a(this,"rescheduleButtonClicked",7);this.rescheduleBookedEventError=a(this,"rescheduleBookedEventError",7);this.handleCancelBookingButtonClicked=()=>{this.cancelBookingButtonClicked.emit({bookingId:this.eventInfo.booking_id})};this.handleRescheduleButtonClicked=()=>{const e=e=>{this.rescheduleBookedEventError.emit(e)};this.rescheduleButtonClicked.emit({bookingId:this.eventInfo.booking_id,errorHandler:e})};this.getOrganizer=e=>{const a=e?.organizer;return a};this.getPaticipantType=e=>{switch(e){case"host":return"Host";case"you":return"You";default:return""}};this.eventInfo=undefined;this.rescheduleBookingId=undefined;this.bookingInfo=undefined;this.selectedTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone;this.selectedTimeslot=undefined}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){o(`[nylas-booked-event-card] Component will load`)}async componentDidLoad(){o(`[nylas-booked-event-card] Component did load`)}render(){return t(n,{key:"1585329ee957e66c757861d989d29a9c1bb1451f",part:"nbec"},t("sp-theme",{key:"113da8c82dd485188d40f1dea9f814be0c408ca2",theme:"spectrum",color:"dark",scale:"medium"},t("div",{key:"af6b0a085e582f2d7bdb5503b9d5b6d3c7042fd3",class:"booked-event-timezone"},t("globe-icon",{key:"0c3fbff398a24c97d82bb74434d9da574349919f"}),b[this.selectedTimezone]),t("div",{key:"136d5341ef1d252b525359418e8df0a43f4160a0",class:"event-card-wrapper",part:"nbec__card"},t("div",{key:"767bcbb50f4ae8c294f3ab3733fe99cd7c4c78e1",class:"calendar-icon"},t("calendar-check-icon",{key:"e6fd3ec502795fbcaaf9d34b5b5c4cee2d732d4f"})),t("div",{key:"7dfa8cc7719760d396716ec81ab0022c01bbe22f",class:"booked-event-header"},t("h2",{key:"34a452c275a3880f64575735a9e67db5a8cdea45",slot:"card-title",part:"nbec__title"},"Booking ",!!this.rescheduleBookingId?"rescheduled":"confirmed","!"),t("div",{key:"a081b1a3791e2e80dd651d1f9dbf5de2f2057f9a",part:"nbec__description"},this.getOrganizer(this.eventInfo)?.name||this.getOrganizer(this.eventInfo)?.email," & ",this.bookingInfo?.primaryParticipant?.name||this.bookingInfo?.primaryParticipant?.email)),t("sp-divider",{key:"0744f0fa4f3fff8f2dc0dec978632496d26bfae6"}),t("div",{key:"38460fbfbe5d19b4f0d48cb0df02e6d12c2f2740",class:"booking-date-time"},t("checkmark-circle-icon",{key:"1e282c329489e4def089d8fca1bd532557f91b92"}),t("h3",{key:"34bebd074562352d54628f763c339ccd4c44918a"},"Booking date and time"),t("p",{key:"d897859d30e6dd6651c0d4b0079bf0eab1df0356"},new Date(this.selectedTimeslot.start_time).toLocaleDateString(undefined,{dateStyle:"full"})," ",t("br",{key:"2aa56898e654721616459102329cbe498232d3e8"}),new Date(this.selectedTimeslot.start_time).toLocaleTimeString(undefined,{timeStyle:"short"})," -"," ",new Date(this.selectedTimeslot.end_time).toLocaleTimeString(undefined,{timeStyle:"short"}))),t("div",{key:"5009ca55f795c2fd1240ed8bbc50216c4e66be87",class:"booking-participants"}),t("sp-divider",{key:"4b5b4325dda3f935387218429823b850d2a12f0e"}),t("div",{key:"d25cc602a134085c19f0acea006db0707ceae7e5",class:"footer"},t("sp-button",{key:"4625e515f2f79d6ecb0bb37813efe100c03cdaf2",variant:"secondary",treatment:"outline",class:"cancel",onClick:this.handleCancelBookingButtonClicked,part:"nbec__button-outline nbec__cancel-cta"},"Cancel booking"),t("sp-button",{key:"9cbdc95cd53aa2d536751984b91ef5974e71179d",variant:"secondary",treatment:"outline",class:"reschedule",onClick:this.handleRescheduleButtonClicked,part:"nbec__button-outline nbec__reschedule-cta"},"Reschedule")))))}};m([i({name:"nylas-booked-event-card",stateToProps:new Map([["scheduler.bookingInfo","bookingInfo"],["scheduler.rescheduleBookingId","rescheduleBookingId"],["scheduler.selectedTimezone","selectedTimezone"],["scheduler.selectedTimeslot","selectedTimeslot"]]),eventToProps:{cancelBookingButtonClicked:async(e,a)=>{a.scheduler.setCancel(e.detail.bookingId)},rescheduleButtonClicked:async(e,a)=>{const t=await a.scheduler.setReschedule(e.detail.bookingId);const{errorHandler:n}=e.detail;if(n&&(!t||"error"in t)){n(t)}}},fireRegisterEvent:true}),g("design:type",Function),g("design:paramtypes",[]),g("design:returntype",void 0)],v.prototype,"render",null);v.style=u;const k=':host{display:block;height:100%;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-booking-form{width:100%;padding:1.5rem;box-sizing:border-box;height:450px;overflow-y:auto;height:100%}form{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}sp-textfield{--spectrum-corner-radius-100:var(--nylas-border-radius-2x);--spectrum-textfield-border-color:var(--nylas-base-300);position:relative;width:100%;height:48px;margin-bottom:16px;color:var(--nylas-base-500)}.cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:0.5rem;padding:10px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.cta{flex-direction:column-reverse}}sp-button{background-color:transparent;color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);--button-width:50%;font-family:var(--nylas-font-family);font-size:16px;font-weight:600;border:none;height:48px;padding:14px}@media screen and (max-width: 768px){sp-button{--button-width:100%}}sp-button:hover,sp-button:focus{background-color:var(--nylas-base-100);color:var(--nylas-primary);border-radius:var(--nylas-border-radius-2x)}sp-button:active{background-color:var(--nylas-base-200);color:var(--nylas-base-800)}sp-button.back{width:var(--button-width);background-color:transparent;color:var(--nylas-base-700);outline:1px solid var(--nylas-base-300)}sp-button.back:hover,sp-button.back:focus{outline-color:var(--nylas-primary)}sp-button.back:active{outline:2px solid var(--nylas-base-600)}sp-button.book{width:var(--button-width);background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.book:hover,sp-button.book:focus{background-color:var(--nylas-base-600)}sp-button.book:active{background-color:var(--nylas-base-800)}.input-wrapper{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:1rem}.input-wrapper input::placeholder{color:var(--nylas-base-300)}.input-wrapper label,.input-wrapper input{font-family:var(--nylas-font-family)}.input-wrapper .help-text{margin:0;color:var(--nylas-error)}.button-wrapper{width:100%;align-items:flex-start;height:max-content;position:relative}sp-infield-button{--spectrum-infield-button-background-color:transparent;--spectrum-infield-button-background-color-hover:transparent;--spectrum-infield-button-background-color-active:transparent;--spectrum-infield-button-border-color:transparent;--spectrum-infield-button-border-width:1px;--spectrum-infield-button-border-radius:0;color:var(--nylas-base-600);background:transparent;border:none;outline:1px solid var(--nylas-base-300);border-radius:0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x) 0;height:52px;width:52px;display:flex;position:absolute;right:0;align-items:center;justify-content:center;cursor:pointer}sp-infield-button sp-icon-cross300{color:var(--nylas-base-600)}sp-infield-button.error{border-width:2px;border-color:var(--nylas-error)}input[type=text],input[type=email]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%}input[type=text].error,input[type=email].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=email].error::placeholder{font-weight:400}input[type=text].guest-email,input[type=email].guest-email{color:var(--nylas-base-900);padding-right:52px}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}';const x=k;var w=undefined&&undefined.__decorate||function(e,a,t,n){var s=arguments.length,r=s<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,t):n,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,a,t,n);else for(var o=e.length-1;o>=0;o--)if(i=e[o])r=(s<3?i(r):s>3?i(a,t,r):i(a,t))||r;return s>3&&r&&Object.defineProperty(a,t,r),r};var C=undefined&&undefined.__metadata||function(e,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,a)};const _=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;const z=class{constructor(t){e(this,t);this.nameChanged=a(this,"nameChanged",7);this.emailChanged=a(this,"emailChanged",7);this.backButtonClicked=a(this,"backButtonClicked",7);this.detailsConfirmed=a(this,"detailsConfirmed",7);this.bookingFormError=a(this,"bookingFormError",7);this.handleGuestChange=(e,a)=>{this.resetGuestEmailError(e);const t=[...this.guestEmails];t[e]=a;this.guestEmails=[...t]};this.handleGuestBlur=(e,a)=>{this.resetGuestEmailError(e);if(a===""){this.guestEmailErrors[e]="Email is required";return}if(!_.test(a)){this.guestEmailErrors[e]="Enter a valid email address";return}this.handleGuestChange(e,a)};this.addGuestButtonClickedHandler=()=>{this.guestEmails=[...this.guestEmails,""]};this.removeGuestButtonClickHandler=(e,a)=>{e.preventDefault();this.resetGuestEmailError(a);const t=[...this.guestEmails];t.splice(a,1);this.guestEmails=[...t]};this.handleBackButtonClicked=()=>{this.backButtonClicked.emit()};this.bookButtonClickedHandler=async e=>{e.preventDefault();o("nylas-booking-form","bookButtonClickedHandler",this.bookingInfo);const a=this.name||this.bookingInfo?.primaryParticipant?.name;const t=this.email||this.bookingInfo?.primaryParticipant?.email;if(!a||a===""){this.isNameValid=false;this.validationError.name="Name is required";this.bookingFormError.emit({title:"Booking form error",description:"Name is required"});return}if(!t||t===""){this.isEmailValid=false;this.validationError.email="Email is required";this.bookingFormError.emit({title:"Booking form error",description:"Email is required"});return}if(!_.test(t)){this.isEmailValid=false;this.validationError.email="Enter a valid email address";this.bookingFormError.emit({title:"Booking form error",description:"Invalid email"});return}let n=[];if(this.guestEmails.length>0){let e=false;this.guestEmails.forEach(((a,t)=>{if(a===""){e=true;this.guestEmailErrors={...this.guestEmailErrors,[t]:"Email is required"}}else if(!_.test(a)){e=true;this.guestEmailErrors={...this.guestEmailErrors,[t]:"Enter a valid email address"}}}));if(e){this.bookingFormError.emit({title:"Booking form error",description:"Invalid guest email"});return}n=this.guestEmails.map((e=>({name:"",email:e.trim()})))}else if(this.bookingInfo?.guests){n=this.bookingInfo?.guests}this.detailsConfirmed.emit({primaryParticipant:{name:a,email:t},guests:n,additionalFields:{...this.bookingInfo?.additionalFields}})};this.isLoading=undefined;this.bookingInfo=undefined;this.eventInfo=undefined;this.name="";this.email="";this.guestEmails=[];this.guestEmailErrors={};this.isNameValid=true;this.isEmailValid=true;this.validationError={name:"",email:""}}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){o("nylas-booking-form","componentWillLoad",this.bookingInfo);if(this.bookingInfo){this.name=this.bookingInfo.primaryParticipant?.name;this.email=this.bookingInfo.primaryParticipant?.email}}bookingInfoChangedHandler(e){if(e&&e.primaryParticipant){this.name=e.primaryParticipant.name;this.email=e.primaryParticipant.email}}changeName(e){this.isNameValid=true;this.validationError.name="";this.name=e;this.nameChanged.emit(e)}changeEmail(e){this.isEmailValid=true;this.validationError.email="";this.email=e;this.emailChanged.emit(e)}resetGuestEmailError(e){const a={...this.guestEmailErrors};delete a[e];this.guestEmailErrors={...a}}render(){return t(n,{key:"5a255277a21fa84d100bb53d13bb9dce0ce58e24"},t("form",{key:"19b7aecb9223557f0ff9d4c062968c3242026f0c",onSubmit:e=>this.bookButtonClickedHandler(e),noValidate:true},t("div",{key:"49276b2a59934eeaeb38c06db6968f957b7b9bee",class:"nylas-booking-form"},t("slot",{key:"ee0a8c29c1fb6b7273d6a2d3c8cb88180f0e9dbf",name:"custom-booking-form"},t("div",{key:"662e46f3a7925282f824547a069f52584b94d564",class:"input-wrapper"},t("label",{key:"a01c1903ee983e1555006ad14e75cd1b2c3036ff",htmlFor:"name",class:{"input-label":true,error:!this.isNameValid},part:"nbf__input-label"},"Name ",t("span",{key:"4729d580bbf9d851c2ac8b686dc826c4e3e4616f",class:"required"},"*")),t("input",{key:"51754a63345f1d0332a38f646dde6a8a998c8dee",id:"name",type:"text",placeholder:"Enter your name",value:this.name,class:{input:true,error:!this.isNameValid},part:"nbf__input-textfield",onInput:e=>this.changeName(e.target?.value)}),t("p",{key:"b8a6660e959a877421bdfffdb87279d8f09123b8",class:"help-text"},this.validationError.name)),t("div",{key:"e78a74e67abde7e61c1d3c555c234817770a4040",class:"input-wrapper"},t("label",{key:"d5507037f5c668f58e14031dba4276900ef5ed09",htmlFor:"email",class:{"input-label":true,error:!this.isEmailValid},part:"nbf__input-label"},"Email ",t("span",{key:"514f00587069ac1cfc6d16bfd30750d6d501817d",class:"required"},"*")),t("input",{key:"0b80ded98b2174f783fa9e7c951a47661aa894f6",id:"email",type:"email",placeholder:"Enter your email",value:this.email,class:{input:true,error:!this.isEmailValid},part:"nbf__input-textfield",onInput:e=>this.changeEmail(e.target?.value)}),t("p",{key:"ba185ccb2bec87049e94d8c5f8d211a838de0025",class:"help-text"},this.validationError.email)))),t("div",{key:"56e2cce79371533ad66cccad95a79dd8935fe3eb",class:"cta"},t("sp-button",{key:"2b6410b3cf2b7634737aa858396290ad065dfcfc",treatment:"outline",variant:"secondary",class:"back",part:"nbf__button-outline",onClick:this.handleBackButtonClicked},t("slot",{key:"4ba60a2fb3542434ede16ea382ec4ca80cb8d422",name:"booking-form-back-label"},"Back")),t("sp-button",{key:"49dd32531d7b55529bb73bc82eb0b91820c6ea33",variant:"primary",class:"book",part:"nbf__button-primary",type:"submit"},this.isLoading&&t("loading-icon",{slot:"icon"}),t("slot",{key:"a57ae44c1c3a1b020a110f0156435f27897410c6",name:"booking-form-book-label"},"Book now")))))}get host(){return s(this)}static get watchers(){return{bookingInfo:["bookingInfoChangedHandler"]}}};w([i({name:"nylas-booking-form",stateToProps:new Map([["scheduler.isLoading","isLoading"],["scheduler.bookingInfo","bookingInfo"],["scheduler.eventInfo","eventInfo"]]),eventToProps:{backButtonClicked:async(e,a)=>{a.scheduler.toggleAdditionalData(false)},nameChanged:async(e,a)=>{a.scheduler.setParticipantName(e.detail)},emailChanged:async(e,a)=>{a.scheduler.setParticipantEmail(e.detail)}},fireRegisterEvent:true}),C("design:type",Function),C("design:paramtypes",[]),C("design:returntype",void 0)],z.prototype,"render",null);z.style=x;const j=':host{display:block;width:400px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.nylas-cancel-booking-form{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}.nylas-cancel-booking-form__title{font-size:18px;font-weight:600;margin-bottom:0;color:var(--nylas-base-900)}.nylas-cancel-booking-form__description{font-size:1rem;font-style:normal;font-weight:400;line-height:140%;color:var(--nylas-base-600)}.nylas-cancel-booking-form__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;width:100%;height:48px;padding:8px;line-height:24px;font-family:var(--nylas-font-family)}sp-button.cancel{margin-top:1.25rem;background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.cancel:hover,sp-button.cancel:focus{background-color:var(--nylas-base-600)}sp-button.cancel:active{background-color:var(--nylas-base-800)}sp-button.back{margin-top:0.5rem}sp-button.back:hover,sp-button.back:focus{border-color:var(--nylas-primary)}sp-button.back:active{border-color:var(--nylas-base-600)}sp-field-label{margin-top:1rem;display:flex;color:var(--nylas-base-800);font-size:14px}sp-field-label.error{color:var(--nylas-error)}sp-field-label span.required{color:var(--nylas-error)}sp-textfield{--spectrum-textfield-border-color:var(--nylas-base-300);--spectrum-textfield-icon-color-invalid:var(--nylas-error);position:relative;width:100%;height:48px;margin-bottom:16px;background-color:var(--nylas-base-0);color:var(--nylas-base-500)}sp-textfield.error{--spectrum-textfield-border-color:var(--nylas-error)}sp-help-text{margin:0.25rem 0 1rem 0;color:var(--nylas-error)}';const R=j;var L=undefined&&undefined.__decorate||function(e,a,t,n){var s=arguments.length,r=s<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,t):n,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,a,t,n);else for(var o=e.length-1;o>=0;o--)if(i=e[o])r=(s<3?i(r):s>3?i(a,t,r):i(a,t))||r;return s>3&&r&&Object.defineProperty(a,t,r),r};var T=undefined&&undefined.__metadata||function(e,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,a)};const D=class{constructor(t){e(this,t);this.goBackButtonClicked=a(this,"goBackButtonClicked",7);this.cancelBookingFormSubmitted=a(this,"cancelBookingFormSubmitted",7);this.cancelBookedEventError=a(this,"cancelBookedEventError",7);this.cancelBookingFormError=a(this,"cancelBookingFormError",7);this.handleGoBackClicked=()=>{this.goBackButtonClicked.emit()};this.handleSubmitCancelBooking=e=>{e.preventDefault();if(!this.cancellationReason){this.cancellationError="Please provide a reason for cancellation.";this.cancelBookingFormError.emit({title:"Cancel booking form error",description:"Please provide a reason for cancellation."});return}o(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);const a=e=>{this.cancelBookedEventError.emit(e)};this.cancelBookingFormSubmitted.emit({bookingId:this.cancelBookingId,reason:this.cancellationReason,errorHandler:a})};this.handleOnChangeCancellationReason=e=>{this.cancellationError="";this.cancellationReason=e.target.value};this.cancelBookingId=undefined;this.cancellationReason="";this.cancellationError=""}connectedCallback(){o(`[nylas-cancel-booking-form] Component connected`)}async componentWillLoad(){o(`[nylas-cancel-booking-form] Component will load`)}async componentDidLoad(){o(`[nylas-cancel-booking-form] Component did load`)}disconnectedCallback(){o(`[nylas-cancel-booking-form] Component disconnected`)}render(){return t(n,{key:"3e77b83049c0b9cd2ed968cc97e665017f76837e",part:"ncec"},t("sp-theme",{key:"857ac295df09b0f642eb1e9d01021531b935c7ad",theme:"spectrum",scale:"medium"},t("div",{key:"9f52787bc3efc81618e5eac14219c5674f4efe5a",class:"nylas-cancel-booking-form",part:"ncec__card"},t("div",{key:"07ddd2cd5664aacf4e123d822bde07af562a8571",class:"nylas-cancel-booking-form__calendar-icon",part:"ncec__icon"},t("calendar-cancel-icon",{key:"04ccbf1eb7ccd7d9053265e1991f8fd494b7e4ae"})),t("h3",{key:"2fdbd40021dae8eb98e4288793af8719d3cc6226",class:"nylas-cancel-booking-form__title",part:"ncec__title"},"Cancel booking?"),t("div",{key:"3af3918de0c111bcf90f6ad44a468efdcab185ac",class:"nylas-cancel-booking-form__description",part:"ncec__description"},"Your current timeslot will become available to others."),t("form",{key:"7e136e261b22e513b395e47dfc2db696aced945f",onSubmit:this.handleSubmitCancelBooking},t("sp-field-label",{key:"fa566625fafbc74f98bb7c012dcb1c71093c0227",for:"cancel-reason",class:this.cancellationError?"error":""},"Reason for cancellation ",t("span",{key:"fb567a86677bfc33c63b6118ed9ce71eed7a5084",class:"required"},"*")),t("sp-textfield",{key:"c585d1f070700a4ccb39d52fdc7dba764c19d43f",id:"cancel-reason",class:this.cancellationError?"error":"",part:"ncec__reason-textarea",multiline:true,value:this.cancellationReason,onInput:this.handleOnChangeCancellationReason,onFocus:this.handleOnChangeCancellationReason,invalid:!!this.cancellationError},t("sp-help-text",{key:"cf6d0e82b648ee662fa9244a793cfcaa64913c4c",slot:"negative-help-text"},this.cancellationError)),t("sp-button",{key:"b8e17a34e57faaaa61585ea4beb2205537c38c49",variant:"primary",class:"cancel",type:"submit",part:"ncec__button-cta"},"Cancel booking"),t("sp-button",{key:"eafb068d14d0680d8ea5cd7e42fd358d3582e99a",variant:"secondary",class:"back",treatment:"outline",part:"ncec__button-outline",onClick:this.handleGoBackClicked},"Go back")))))}};L([i({name:"nylas-cancel-booking-form",eventToProps:{cancelBookingFormSubmitted:async(e,a)=>{const t=await a.scheduler.cancelBooking(e.detail.bookingId);const{errorHandler:n}=e.detail;if(n&&(!t||"error"in t)){n(t)}}},fireRegisterEvent:true}),T("design:type",Function),T("design:paramtypes",[]),T("design:returntype",void 0)],D.prototype,"render",null);D.style=R;const I=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.nylas-cancelled-event-card{display:flex;align-items:center;flex-direction:column;width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-cancelled-event-card{width:inherit}}.nylas-cancelled-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-cancelled-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-cancelled-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-cancelled-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:1rem;height:48px;padding:8px;line-height:24px;width:100%}sp-button:hover,sp-button:focus{border-color:var(--nylas-primary)}sp-button:active{border-color:var(--nylas-base-600)}';const E=I;var S=undefined&&undefined.__decorate||function(e,a,t,n){var s=arguments.length,r=s<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,t):n,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,a,t,n);else for(var o=e.length-1;o>=0;o--)if(i=e[o])r=(s<3?i(r):s>3?i(a,t,r):i(a,t))||r;return s>3&&r&&Object.defineProperty(a,t,r),r};var B=undefined&&undefined.__metadata||function(e,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,a)};const M=class{constructor(t){e(this,t);this.closeCancelEventCardClicked=a(this,"closeCancelEventCardClicked",7);this.handleCloseClicked=()=>{this.closeCancelEventCardClicked.emit()};this.cancelledEventInfo=undefined}connectedCallback(){o(`[nylas-cancelled-event-card] Component connected`)}async componentWillLoad(){o(`[nylas-cancelled-event-card] Component will load`)}async componentDidLoad(){o(`[nylas-cancelled-event-card] Component did load`)}disconnectedCallback(){o(`[nylas-cancelled-event-card] Component disconnected`)}render(){return t(n,{key:"52b1d729c8df61770be08c165665671f54189c9a",part:"ncec"},t("sp-theme",{key:"94633560e146be20b9321e9548edb007bf570e1c",theme:"spectrum",color:"dark",scale:"medium"},t("div",{key:"a18a0006aa5e84e58daa6f9446e2b85908867196",class:"nylas-cancelled-event-card",part:"ncec__card"},t("div",{key:"67cc5524db58cb7777feaf9b249070e5d713b17b",class:"nylas-cancelled-event-card__calendar-icon",part:"ncec__icon"},t("calendar-cancel-icon",{key:"87b0379d4847388505e4f6ddd62d059af9156303"})),t("h3",{key:"b7d36ece20f5926c8bb2d0e796a35ed44772e8cf",class:"nylas-cancelled-event-card__title",part:"ncec__title"},"Your booking has been cancelled successfully!"),t("div",{key:"808a6cdf14cec2782990c85e06c23e5b9936bc56",class:"nylas-cancelled-event-card__description",part:"ncec__description"},"A cancellation email has been sent to the participants."),t("div",{key:"cfd161ea961c637ab2247a568143e659bfb1b7da",class:"nylas-cancelled-event-card__cta"},t("sp-button",{key:"ab549c146571e0dd4e86cce46d9947875794a437",variant:"secondary",treatment:"outline",part:"ncec__button-outline",onClick:this.handleCloseClicked},"Close")))))}};S([i({name:"nylas-cancelled-event-card",eventToProps:{},fireRegisterEvent:true}),B("design:type",Function),B("design:paramtypes",[]),B("design:returntype",void 0)],M.prototype,"render",null);M.style=E;const O=new Date,H=new Date;function V(e,a,t,n){function s(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}s.floor=a=>(e(a=new Date(+a)),a);s.ceil=t=>(e(t=new Date(t-1)),a(t,1),e(t),t);s.round=e=>{const a=s(e),t=s.ceil(e);return e-a<t-e?a:t};s.offset=(e,t)=>(a(e=new Date(+e),t==null?1:Math.floor(t)),e);s.range=(t,n,r)=>{const i=[];t=s.ceil(t);r=r==null?1:Math.floor(r);if(!(t<n)||!(r>0))return i;let o;do{i.push(o=new Date(+t)),a(t,r),e(t)}while(o<t&&t<n);return i};s.filter=t=>V((a=>{if(a>=a)while(e(a),!t(a))a.setTime(a-1)}),((e,n)=>{if(e>=e){if(n<0)while(++n<=0){while(a(e,-1),!t(e)){}}else while(--n>=0){while(a(e,+1),!t(e)){}}}}));if(t){s.count=(a,n)=>{O.setTime(+a),H.setTime(+n);e(O),e(H);return Math.floor(t(O,H))};s.every=e=>{e=Math.floor(e);return!isFinite(e)||!(e>0)?null:!(e>1)?s:s.filter(n?a=>n(a)%e===0:a=>s.count(0,a)%e===0)}}return s}const F=1e3;const $=F*60;const P=$*60;const Z=P*24;const W=V((e=>e.setHours(0,0,0,0)),((e,a)=>e.setDate(e.getDate()+a)),((e,a)=>(a-e-(a.getTimezoneOffset()-e.getTimezoneOffset())*$)/Z),(e=>e.getDate()-1));V((e=>{e.setUTCHours(0,0,0,0)}),((e,a)=>{e.setUTCDate(e.getUTCDate()+a)}),((e,a)=>(a-e)/Z),(e=>e.getUTCDate()-1));V((e=>{e.setUTCHours(0,0,0,0)}),((e,a)=>{e.setUTCDate(e.getUTCDate()+a)}),((e,a)=>(a-e)/Z),(e=>Math.floor(e/Z)));const q=':host{display:block;min-height:444px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}@media screen and (max-width: 768px){:host{min-height:auto}}.nylas-date-picker{display:flex;gap:1rem;flex-direction:column}.header{margin:0 0.5rem;height:48px}.header h2{font-size:1.3125rem;font-weight:400;line-height:1rem;color:var(--nylas-base-800)}.header h2 strong{font-weight:600}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.dates{display:grid;justify-items:center;grid-template-columns:repeat(7, 1fr);gap:0.5rem;margin-bottom:1rem}.dates .date{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;height:48px;width:48px;min-width:2rem;min-height:2rem;cursor:pointer;border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;font-family:inherit;color:var(--nylas-base-text);background-color:var(--nylas-base-100);cursor:pointer;border:none}@media screen and (max-width: 412px){.dates .date{width:38px;height:38px;min-width:none}}.dates .date:hover:not(:disabled){box-shadow:0 0 0 2px var(--nylas-base-500) inset}.dates .date.date.current-month{color:var(--nylas-base-800)}.dates .date.date.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0);font-weight:700}.dates .date.date.day-skeleton{color:var(--nylas-base-300)}.dates .date:disabled{color:var(--nylas-base-300);background-color:transparent;font-weight:400;cursor:not-allowed}.dates .day{font-size:12px;color:var(--nylas-base-800);font-weight:600;letter-spacing:0.5px;height:32px;display:flex;align-items:center}@media screen and (max-width: 768px){.dates .day{font-size:14px}}.dates .date.day-skeleton{height:48px;width:48px;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out;background-color:var(--nylas-base-50)}@media screen and (max-width: 412px){.dates .date.day-skeleton{width:38px;height:38px;min-width:none}}.dates .date.current-day::after{content:"";position:absolute;bottom:6px;left:50%;transform:translateX(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--nylas-base-500)}.dates .date.current-day.selected::after{background-color:var(--nylas-base-100)}.pagination{display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:92px}.pagination .chevron-right{transform:rotate(180deg)}.pagination .button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);background-color:transparent;color:var(--nylas-base-800);cursor:pointer;border:none}.pagination .button:hover{background-color:var(--nylas-base-50)}.pagination .button:active{background-color:var(--nylas-base-100)}.pagination .button:disabled{background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.flex-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--nylas-base-500)}';const A=q;var N=undefined&&undefined.__decorate||function(e,a,t,n){var s=arguments.length,r=s<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,t):n,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,a,t,n);else for(var o=e.length-1;o>=0;o--)if(i=e[o])r=(s<3?i(r):s>3?i(a,t,r):i(a,t))||r;return s>3&&r&&Object.defineProperty(a,t,r),r};var X=undefined&&undefined.__metadata||function(e,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,a)};const U=class{constructor(t){e(this,t);this.dateSelected=a(this,"dateSelected",7);this.monthChanged=a(this,"monthChanged",7);this.selectableDates=undefined;this.selectedDate=undefined;this.isLoading=undefined;this.month=this.selectedDate||new Date;this.dates=this.getDates()}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){}getDates(){const e=l(this.month);const a=c(this.month);return W.range(W.offset(a,-a.getDay()),W.offset(e,7-e.getDay()))}selectDate(e){this.dateSelected.emit(e)}changeMonth(e){this.month=new Date(this.month.getFullYear(),this.month.getMonth()+e,1);this.dates=this.getDates();this.monthChanged.emit(this.month);this.selectDate()}isSelected(e,a,t){return e&&a&&d(e,a)&&t&&t?.length>0}isDisabled(e,a){return e&&a?.find((a=>d(a,e)))===undefined}render(){return t(n,{key:"da3c7e290b60613575379d559e03d5e1dca04535",part:"ndp"},t("div",{key:"4bb1b14f4f609f601b27f7ad2eb4baeed6cc4d55",class:"nylas-date-picker"},t("div",{key:"5d6c68298c5e9606bae9e45a99f0c59da3d36854",class:"header flex-row"},t("h2",{key:"2504a779961e1e07a881f2eb2f5ffa5d8329e627",part:"ndp__month-header"},t("strong",{key:"433fdd38ccf5b49144bafd3b284acd26b94d19c4"},this.month.toLocaleDateString(undefined,{month:"long"}))," ",this.month.toLocaleDateString(undefined,{year:"numeric"})),t("div",{key:"ffaa3276b249a85dc197828625835ad1f2278179",class:"pagination"},t("button",{key:"451c9d09fc01e4c7ae35742d7c6b4b2f3da4d3ee",onClick:()=>this.changeMonth(-1),class:{"chevron-left":true,button:true},disabled:!this.selectableDates?.length||this.month<=new Date,part:"ndp__month-button"},t("chevron-icon",{key:"3a23fa0fb325feab4b56477602f122b800dce5ce"})),t("button",{key:"56b81156d02525a70c6c567e5facb1d9995ea2de",onClick:()=>this.changeMonth(1),class:{"chevron-right":true,button:true},disabled:!this.selectableDates?.length,part:"ndp__month-button"},t("chevron-icon",{key:"1329d513678bffec6bc21d579b240e7af29ec530"})))),t("div",{key:"14eb94fe04ca2797f3377057a87825689b818719",class:"dates"},["SUN","MON","TUE","WED","THU","FRI","SAT"].map((e=>t("div",{class:"day",part:"ndp__day"},e))),this.dates.map(((e,a)=>{const n=this.isDisabled(e,this.selectableDates);if(this.isLoading){return t("button",{disabled:true,class:{"date day-skeleton":true,"current-month":f(e,this.month)},style:{animationDelay:`${a*20}ms`},part:"ndp__date"},e.getDate())}return t("button",{class:{date:true,selected:!!(this.selectedDate&&d(e,this.selectedDate)&&this.selectableDates&&this.selectableDates?.length>0),"current-day":d(e,new Date),"current-month":f(e,this.month)},"aria-lang":e.toLocaleDateString(undefined,{dateStyle:"full"}),disabled:n,onClick:()=>this.selectDate(e),part:`ndp__date ${this.isSelected(e,this.selectedDate,this.selectableDates)?"ndp__date--selected":""} ${d(e,new Date)?"ndp__date--current-day":""} ${f(e,this.month)?"ndp__date--current-month":""}`},e.getDate())})))))}};N([i({name:"nylas-date-picker",stateToProps:new Map([["scheduler.selectableDates","selectableDates"],["scheduler.selectedDate","selectedDate"],["scheduler.isLoading","isLoading"]]),eventToProps:{dateSelected:async(e,a)=>{a.scheduler.selectDate(e.detail)}},fireRegisterEvent:true}),X("design:type",Function),X("design:paramtypes",[]),X("design:returntype",void 0)],U.prototype,"render",null);U.style=A;const Y=':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-locale-switch{display:flex;flex-direction:row;justify-content:space-between;align-items:center;height:68px;border-left:none;border-right:none;color:var(--nylas-base-50);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease-in-out;font-family:inherit}@media screen and (max-width: 768px){.nylas-locale-switch{font-size:16px}}.select-wrapper{display:flex;align-items:center;gap:0.5rem}select{border:none;background:transparent;cursor:pointer;outline:none;background-color:transparent;margin:0 0 1px;padding:4px;vertical-align:middle}select#timezone{width:140px}select#language{width:80px}span.timezone-label{display:flex;width:-webkit-fill-available;justify-content:space-between}';const G=Y;var J=undefined&&undefined.__decorate||function(e,a,t,n){var s=arguments.length,r=s<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,t):n,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,a,t,n);else for(var o=e.length-1;o>=0;o--)if(i=e[o])r=(s<3?i(r):s>3?i(a,t,r):i(a,t))||r;return s>3&&r&&Object.defineProperty(a,t,r),r};var K=undefined&&undefined.__metadata||function(e,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,a)};const Q=class{constructor(t){e(this,t);this.timezoneChanged=a(this,"timezoneChanged",7);this.languageChanged=a(this,"languageChanged",7);this.selectedTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone;this.selectedLanguage=navigator.language}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){}changeTimezone(e){this.selectedTimezone=e;this.timezoneChanged.emit(e)}changeLanguage(e){this.selectedLanguage=e;this.languageChanged.emit(e)}selectedOptionChangedHandler(e){const{name:a,value:t}=e.detail;if(a==="timezone"){this.changeTimezone(t)}else if(a==="language"){this.changeLanguage(t)}}getTimezoneLabelHTML(e){const a=p(e);return t("span",{class:"timezone-label",style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"-webkit-fill-available"}},b[e]," ",t("span",{class:"timezone-offset",style:{fontSize:"14px",fontWeight:"400",color:"var(--nylas-base-500)"}},a))}render(){const e=Object.keys(b).map((e=>({labelHTML:this.getTimezoneLabelHTML(e),label:b[e],value:e})));const a=Object.keys(y).map((e=>({label:y[e],value:e})));return t(n,{key:"688b90cbd1410a8025a8becfd3f979fc854c60a2"},t("div",{key:"a4f485ce6204d89e16336c93809dbcf5ebf862ef",class:"nylas-locale-switch"},t("div",{key:"5525e493d2f8e3258a2fe8b4c739db49d7ef1a35",class:{"select-wrapper":true,timezone:true}},t("select-dropdown",{key:"68f7f48a2cada4cc0c7327431f15384d17ebc261",name:"timezone",options:e,defaultSelectedOption:e.find((e=>e.value==this.selectedTimezone))},t("span",{key:"d1213a8cba28b2163997cdb4bce7e13d7485e869",slot:"select-icon"},t("globe-icon",{key:"f11285b20c93a42a0f195f89966bc7ff7b2d7322",width:"20",height:"20"})))),t("div",{key:"0287627954a80ef5092ded694e61ec2a19606667",class:{"select-wrapper":true,language:true}},t("select-dropdown",{key:"1bd58884de605b22cb6a5631b8e9f960cfa058d4",name:"language",options:a,defaultSelectedOption:a.find((e=>e.value==this.selectedLanguage))},t("span",{key:"0681b6c8296d60c258c2df3bcb60d895c0e0c533",slot:"select-icon"},t("translate-icon",{key:"bd3f346f56da2a139c5050799c9e2774d311d72c",width:"20",height:"20"}))))))}};J([i({name:"nylas-locale-switch",stateToProps:new Map([["scheduler.selectedLanguage","selectedLanguage"],["scheduler.selectedTimezone","selectedTimezone"]]),eventToProps:{timezoneChanged:async(e,a)=>{a.scheduler.selectTimezone(e.detail)}},fireRegisterEvent:true}),K("design:type",Function),K("design:paramtypes",[]),K("design:returntype",void 0)],Q.prototype,"render",null);Q.style=G;const ee=".sc-nylas-logo-h{display:flex}";const ae=ee;const te=class{constructor(a){e(this,a);this.width="69";this.height="24"}render(){return t("svg",{key:"a305694aba91cff6d13167eab106e824536728cd",width:this.width,height:this.height,viewBox:"0 0 69 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("g",{key:"790edf0bee99fea0fe2cef131ed9a3340ff1ec70","clip-path":"url(#clip0_455_3543)"},t("path",{key:"bd29c1fe02931e4a6dceee45711ef6c212164d77",d:"M15.8092 3.03248C14.6497 1.86996 13.1076 1.23047 11.4646 1.23047C9.82156 1.23047 8.27753 1.86996 7.11999 3.03248L0.835347 9.33381C0.686846 9.4827 0.60498 9.68123 0.60498 9.89312C0.60498 10.105 0.686846 10.3035 0.835347 10.4524C0.983848 10.6013 1.18185 10.6834 1.39318 10.6834C1.60451 10.6834 1.80251 10.6013 1.95101 10.4524L8.23374 4.15111C10.0139 2.36627 12.9134 2.36627 14.6935 4.15111C16.4736 5.93785 16.4756 8.84322 14.6935 10.6281L8.4108 16.9275C8.10428 17.2348 8.10428 17.7368 8.4108 18.0461C8.5593 18.195 8.75731 18.2771 8.96863 18.2771C9.17996 18.2771 9.37796 18.195 9.52646 18.0461L15.8092 11.7467C16.9687 10.5841 17.6064 9.03793 17.6064 7.39053C17.6064 5.74314 16.9687 4.19501 15.8092 3.03439V3.03248Z",fill:"currentColor"}),t("path",{key:"6ad33f3a2c1524777ef9f33d8fccdefa87c6c4de",d:"M14.9296 7.39038C14.9296 6.46074 14.5698 5.58837 13.9148 4.93361C12.5631 3.57828 10.3641 3.57828 9.01239 4.93361L0.663961 13.3023C0.51546 13.4512 0.433594 13.6497 0.433594 13.8616C0.433594 14.0735 0.51546 14.272 0.663961 14.4209C0.812462 14.5698 1.01046 14.6519 1.22179 14.6519C1.43312 14.6519 1.63112 14.5698 1.77962 14.4209L10.0367 6.1515L10.05 6.13623C10.0747 6.10759 10.1014 6.07705 10.128 6.05033C10.1585 6.01978 10.1928 5.99115 10.2251 5.96252L10.2442 5.94534C10.9886 5.31349 12.1119 5.3593 12.8011 6.05033C13.4903 6.74135 13.536 7.78171 12.9705 8.53192L12.9648 8.53955C12.9058 8.61591 12.8544 8.67699 12.8011 8.73044C12.7497 8.78198 12.6906 8.83352 12.6069 8.90033L4.45264 17.0991C4.30414 17.248 4.22227 17.4465 4.22227 17.6584C4.22227 17.8703 4.30414 18.0689 4.45264 18.2177C4.60114 18.3666 4.79914 18.4487 5.01047 18.4487C5.2218 18.4487 5.4198 18.3666 5.5683 18.2177L13.9167 9.84716C14.5698 9.1924 14.9315 8.31812 14.9315 7.39038H14.9296Z",fill:"currentColor"}),t("path",{key:"cff70a4c9e84c0c16cbbc8f3a1e9432200e2f6c7",d:"M10.6821 9.11238C10.4727 9.01694 10.2861 8.88904 10.1281 8.7306C9.97008 8.57216 9.84252 8.38508 9.74733 8.1751L9.69021 8.05103L0.467916 17.2978C0.287049 17.4792 0.174721 17.7082 0.149971 17.9411C0.125221 18.1778 0.19376 18.3897 0.344165 18.5405C0.471724 18.6684 0.65259 18.739 0.850592 18.739C1.11142 18.739 1.37796 18.6207 1.58358 18.4145L10.8059 9.16774L10.6821 9.11047V9.11238Z",fill:"currentColor"}),t("path",{key:"f8deff8d4ba7374b51cd83e2dd01d58b75cc751a",d:"M68.401 10.6185C68.2126 10.2692 67.9593 9.97334 67.6433 9.73854C67.3235 9.49993 66.956 9.31094 66.5486 9.17541C66.1316 9.03606 65.7033 8.91771 65.2749 8.81844C64.7951 8.70582 64.3039 8.57983 63.8165 8.44811C63.3196 8.31258 62.9065 8.14269 62.5905 7.94225C62.4743 7.88689 62.3391 7.76663 62.3391 7.50129C62.3391 7.39821 62.3639 7.29704 62.4153 7.19587L62.4248 7.18059C62.5352 7.02216 62.7142 6.8828 62.975 6.75109C63.234 6.62128 63.609 6.55829 64.1231 6.55829C64.5286 6.55829 64.877 6.61365 65.1569 6.72436C65.4348 6.83508 65.6652 6.96871 65.8442 7.12524C66.0212 7.27986 66.1659 7.45357 66.2782 7.63873C66.3563 7.76854 66.4267 7.89262 66.4858 8.00525L68.2754 6.84081C68.1669 6.59456 68.0146 6.33495 67.8204 6.0677C67.6033 5.768 67.3254 5.4893 66.9922 5.23732C66.659 4.98534 66.2516 4.77345 65.7813 4.60929C65.3111 4.44512 64.7532 4.36304 64.1231 4.36304C63.3844 4.36304 62.7599 4.46421 62.2706 4.66083C61.7813 4.85935 61.3815 5.09988 61.0845 5.37667C60.7875 5.65346 60.5628 5.95125 60.4143 6.2605C60.2639 6.57547 60.1611 6.85799 60.1078 7.10233C60.0945 7.18059 60.0812 7.27031 60.0678 7.36767C60.0545 7.4593 60.0469 7.5452 60.0469 7.62537C60.0469 8.13314 60.1745 8.56074 60.4239 8.89671C60.679 9.24222 61.0045 9.53429 61.391 9.76336C61.7813 9.99624 62.2116 10.1852 62.6704 10.3227C63.1388 10.462 63.5862 10.5823 64.0012 10.6796C64.4067 10.777 64.7932 10.8782 65.1531 10.9774C65.5224 11.0786 65.8289 11.2122 66.0631 11.3745C66.2801 11.5425 66.3887 11.7448 66.3887 11.9777C66.3887 12.2278 66.2916 12.4263 66.0993 12.5695C65.9279 12.6954 65.7261 12.7985 65.4958 12.8711C65.273 12.9436 65.0407 12.9913 64.8066 13.0142C64.58 13.0352 64.3915 13.0467 64.2468 13.0467C63.8032 13.0467 63.4224 13.0028 63.1197 12.915C62.8151 12.8272 62.5638 12.7241 62.3734 12.6057C62.1811 12.4874 62.0288 12.3614 61.9222 12.2316C61.8213 12.1094 61.747 12.0082 61.7014 11.9319L61.4957 11.6303L59.708 12.7928C59.8508 13.0161 60.0298 13.2643 60.2392 13.5296C60.4772 13.8293 60.7837 14.1138 61.153 14.3734C61.5224 14.633 61.966 14.8525 62.4724 15.0243C62.9788 15.1961 63.5748 15.282 64.2468 15.282C64.797 15.282 65.2901 15.2324 65.7166 15.137C66.1412 15.0396 66.5162 14.9117 66.8285 14.7552C67.1388 14.6005 67.4015 14.4192 67.6109 14.2149C67.8223 14.0107 67.9974 13.8026 68.1326 13.6003C68.4563 13.1135 68.6409 12.5504 68.6828 11.9262C68.6828 11.4069 68.5876 10.9641 68.401 10.6166V10.6185Z",fill:"currentColor"}),t("path",{key:"0cc0f9ff674f031b72ebff2b4b4642f678a74a08",d:"M26.3585 4.27905C23.7901 4.27905 21.6997 6.37504 21.6997 8.95017V15.0701H23.9291V8.95017C23.9291 7.6082 25.0181 6.5163 26.3565 6.5163C27.695 6.5163 28.784 7.6082 28.784 8.95017V15.0701H31.0134V8.95017C31.0134 6.37504 28.9229 4.27905 26.3546 4.27905H26.3585Z",fill:"currentColor"}),t("path",{key:"fbc997ce655d72115a3f091a0c3df101d4311842",d:"M53.4522 4.27905C50.4251 4.27905 47.9634 6.74728 47.9634 9.78245C47.9634 12.8176 50.427 15.2859 53.4522 15.2859C54.5545 15.2859 55.6188 14.9594 56.5288 14.3409L56.7116 14.2169V15.0682H58.941V9.78245C58.941 6.74728 56.4793 4.27905 53.4522 4.27905ZM53.4522 13.0505C51.655 13.0505 50.1928 11.5845 50.1928 9.78245C50.1928 7.98044 51.655 6.51439 53.4522 6.51439C55.2494 6.51439 56.7116 7.98044 56.7116 9.78245C56.7116 11.5845 55.2494 13.0505 53.4522 13.0505Z",fill:"currentColor"}),t("path",{key:"1000a3c24e6495f474df5ffc6af307466f4c6fb6",d:"M45.5795 10.6166V0.356201H43.3501V10.6166C43.3501 13.1517 45.3758 15.2228 47.8908 15.2858V13.0486C46.6057 12.9875 45.5795 11.9204 45.5795 10.6166Z",fill:"currentColor"}),t("path",{key:"048a76e10c0489b5361747c3ff711e0c771071fc",d:"M39.5428 4.4967V10.63C39.5428 11.6761 38.8669 12.621 37.9016 12.9284C37.1249 13.1746 36.3157 13.0486 35.6817 12.5829C35.0592 12.1247 34.6879 11.3917 34.6879 10.6186V4.4967H32.4585V10.5995C32.4585 12.7165 33.8388 14.57 35.8131 15.1084C37.0354 15.4424 38.2995 15.2973 39.3695 14.7037L39.5428 14.6063V14.9747C39.5428 16.2766 38.5166 17.3437 37.2315 17.4067V19.6439C39.7465 19.5809 41.7722 17.5117 41.7722 14.9747V4.4967H39.5428Z",fill:"currentColor"})),t("defs",{key:"2ecd1149d28e4b4d5d5fce2e3775933ae12a1983"},t("clipPath",{key:"b0b608b033eafd9eb2ada24432d379f539f725e3",id:"clip0_455_3543"},t("rect",{key:"0277917a58837afc24f997ef1a66f8f415b9072e",width:"68.7123",height:"19.2877",fill:"white",transform:"translate(0.144043 0.356201)"}))))}};te.style=ae;const ne=':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.notif{display:flex;padding:17px;align-items:flex-start;justify-content:space-between;gap:16px;border-radius:var(--nylas-border-radius-2x);border:1.5px solid var(--nylas-error);background:var(--nylas-base-0)}@media screen and (max-width: 768px){.notif{width:auto}}.notif .content{display:flex;flex-direction:row;gap:8px}.notif .content .message{font-size:14px;font-weight:400;color:var(--nylas-base-800)}.notif .content .message .title{font-size:16px;font-weight:600;color:var(--nylas-base-950);display:block}.notif .content .message .description{font-size:14px;font-weight:400;color:var(--nylas-base-800);display:block}.notif .content .icon.error{color:var(--nylas-error)}.notif.error{border-color:var(--nylas-error)}.notif.warning{border-color:var(--nylas-warning)}.notif.info{border-color:var(--nylas-info)}.notif.success{border-color:var(--nylas-success)}.notif .dismiss-btn{background:none;border:none;color:var(--nylas-base-950);cursor:pointer}';const se=ne;const re=class{constructor(a){e(this,a);this.ttl=5e3;this.allowedCategories=["component","api","validation","invalid_session"];this.notifications=[]}onError(e){o(`[nylas-notification] Error: ${e.detail.title}`);this.handleNotification(e)}onWarning(e){o(`[nylas-notification] Warning: ${e.detail.title}`);this.handleNotification(e)}onInfo(e){o(`[nylas-notification] Info: ${e.detail.title}`);this.handleNotification(e)}onSuccess(e){o(`[nylas-notification] Success: ${e.detail.title}`);this.handleNotification(e)}handleNotification(e){if(e.defaultPrevented){o(`[nylas-notification] Event default prevented`);return}if(this.ttl===0){o(`[nylas-notification] TTL is 0`);return}if(this.allowedCategories.length>0&&!this.allowedCategories.includes(e.detail.category)){o(`[nylas-notification] Category not allowed`);return}this.notifications=[...this.notifications,{...e.detail}];if(e.detail.ttl!=="none"){const a=e.detail.ttl?e.detail.ttl:this.ttl;window.setTimeout((()=>{this.notifications=this.notifications.filter((a=>a.id!==e.detail.id))}),a)}}dismissNotification(e){this.notifications=this.notifications.filter((a=>a.id!==e))}render(){return t(n,{key:"947c58f3617a73e55731cc6f6c03c1931008d000"},t(r,{key:"d84045b56a35c322a194e4bf4c9d3982a5ce6d32"},this.notifications.map((e=>t("div",{class:`notif ${e.type}`,key:e.id},t("div",{class:"content"},t("span",{class:`icon ${e.type}`},(e.type==="error"||e.type==="warning")&&t("warning-icon",null)),t("span",{class:"message"},t("span",{class:"title"},e.title),e.description&&t("span",{class:"description"},e.description))),t("button",{class:"dismiss-btn",onClick:()=>this.dismissNotification(e.id)},t("close-icon",null))))),t("slot",{key:"e246e847f46fe0d99370eb909cc89a3546186089"})))}};re.style=se;const ie=":host{display:block}sp-theme{position:relative;height:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--nylas-font-family)}.event-card{display:flex;align-items:center;flex-direction:column;width:calc(100% - 3rem);background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:3rem 1.5rem 1.5rem 1.5rem;position:relative;box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card{margin-bottom:2rem}}.nylas-selected-event-card__date{font-size:min(max(16px, 3vw), 18px);font-weight:600}.nylas-selected-event-card__time{font-size:min(max(14px, 3vw), 16px);font-weight:500}.calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-icon{display:flex;align-items:center;justify-content:center;height:100%}.event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:8px;gap:4px;align-items:center}@media screen and (max-width: 768px){.event-timezone{margin-bottom:16px}}";const oe=ie;var le=undefined&&undefined.__decorate||function(e,a,t,n){var s=arguments.length,r=s<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,t):n,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,a,t,n);else for(var o=e.length-1;o>=0;o--)if(i=e[o])r=(s<3?i(r):s>3?i(a,t,r):i(a,t))||r;return s>3&&r&&Object.defineProperty(a,t,r),r};var ce=undefined&&undefined.__metadata||function(e,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,a)};const de=class{constructor(a){e(this,a);this.selectedDate=undefined;this.selectedTimeslot=undefined;this.selectedTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone;this.startTime="";this.endTime=""}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){o(`[nylas-selected-event-card] Component will load`)}async componentDidLoad(){o(`[nylas-selected-event-card] Component did load`)}handleSelectedTimeslotChange(e){this.startTime=new Date(e?.start_time).toLocaleString(undefined,{timeStyle:"short"});this.endTime=new Date(e?.end_time).toLocaleString(undefined,{timeStyle:"short"})}render(){return t(n,{key:"1104fd2969ab03bb794c17bbf08f1600a200448c",part:"nsec"},t("sp-theme",{key:"674934ecb54519d9e8c227a9946b9725518b77e5",theme:"spectrum",color:"dark",scale:"medium"},t("div",{key:"4d492e825e93b93ff96af4970812178656de4ab8",class:"event-card",part:"nsec__card"},t("div",{key:"239131412dab45da5b1f7bfe3b4a2eda45a2978b",class:"calendar-icon",part:"nsec__icon"},t("calendar-icon",{key:"a2fa2f47b94a2c331d4cac88ef736faef3e30dae"})),t("div",{key:"81c873d5c2019b6ae1d8b746685dbe5efc2d7d0b",class:"nylas-selected-event-card__date",part:"nsec__date"},this.selectedDate?.toLocaleDateString(undefined,{dateStyle:"full"})),t("div",{key:"67348e66fd879ead10594b216a2d66cf7da272aa",class:"nylas-selected-event-card__time",part:"nsec__time"},this.startTime," - ",this.endTime)),t("div",{key:"0fc6452dae7c5998a70d116c9bdfe25ab109661c",class:"event-timezone",part:"nsec__timezone"},t("globe-icon",{key:"86c4a1e2728a30e34805a7c286378fe9adef110e"}),b[this.selectedTimezone])))}static get watchers(){return{selectedTimeslot:["handleSelectedTimeslotChange"]}}};le([i({name:"nylas-selected-event-card",stateToProps:new Map([["scheduler.selectedDate","selectedDate"],["scheduler.selectedTimeslot","selectedTimeslot"],["scheduler.selectedTimezone","selectedTimezone"]]),eventToProps:{},fireRegisterEvent:true}),ce("design:type",Function),ce("design:paramtypes",[]),ce("design:returntype",void 0)],de.prototype,"render",null);de.style=oe;const fe=":host{display:block;height:calc(100% - 48px)}.time-picker-wrapper{display:flex;flex-direction:column;height:100%}.time-slots{position:relative;display:flex;flex-direction:column;gap:0.75rem;align-items:center;overflow-y:scroll;padding:0.5rem 1.5rem;flex:1}.time{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 12px;gap:0.5rem;font-size:16px;font-weight:500;font-family:inherit;width:100%;height:48px;color:var(--nylas-base-800);background:var(--nylas-base-0);border:none;outline:1.5px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);flex:none;order:4;align-self:stretch;flex-grow:0;cursor:pointer}.time:hover,.time:focus{color:var(--nylas-primary);outline-color:var(--nylas-primary)}.time.selected{font-weight:600;color:var(--nylas-primary);outline:2px solid var(--nylas-primary);border-color:transparent;box-shadow:0 0 0 2px var(--nylas-primary)}.empty{text-align:center;padding:0 1.5rem;color:var(--nylas-base-600);font-size:min(max(12px, 2vw), 14px);height:450px;display:flex;align-items:center;justify-content:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.loading{padding:0 1.5rem}.loading .time-slot-skeleton{width:100%;height:4rem;background-color:var(--nylas-base-50);margin-bottom:0.5rem;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out}.footer{width:100%;padding:10px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}.footer sp-button{padding:14px;color:var(--nylas-base-100);border-radius:var(--nylas-border-radius-2x);width:100%;height:48px;font-weight:600;font-size:16px;background-color:var(--nylas-primary);border:none}.footer sp-button:hover,.footer sp-button:focus{background-color:var(--nylas-base-600)}.footer sp-button:active{background-color:var(--nylas-base-800)}";const be=fe;var pe=undefined&&undefined.__decorate||function(e,a,t,n){var s=arguments.length,r=s<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,t):n,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(e,a,t,n);else for(var o=e.length-1;o>=0;o--)if(i=e[o])r=(s<3?i(r):s>3?i(a,t,r):i(a,t))||r;return s>3&&r&&Object.defineProperty(a,t,r),r};var ye=undefined&&undefined.__metadata||function(e,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,a)};const he=class{constructor(t){e(this,t);this.timeslotSelected=a(this,"timeslotSelected",7);this.timeslotConfirmed=a(this,"timeslotConfirmed",7);this.handleConfirmedTimeslot=async(e,a)=>{e.preventDefault();o(`[nylas-timeslot-picker] Confirm timeslot`,a);this.timeslotConfirmed.emit(a)};this.handleMouseEnter=e=>{this.hoveredTimeslotIndex=e};this.handleMouseLeave=()=>{this.hoveredTimeslotIndex=-1};this.selectedDate=new Date;this.availability=undefined;this.selectedTimeslot=undefined;this.isLoading=undefined;this.selectedTimezone=Intl.DateTimeFormat().resolvedOptions().timeZone;this.times=[];this.hoveredTimeslotIndex=undefined;this.selectedTimeslotIndex=undefined}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){const e=this.availability?.filter((e=>this.selectedDate&&d(e.start_time,this.selectedDate))).map((e=>e));this.times=e||[];o(`[nylas-timeslot-picker] Component will load`,{selectedDate:this.selectedDate,availability:this.availability,times:this.times})}async componentDidLoad(){o(`[nylas-timeslot-picker] Component did load`)}getTimeslotId(e,a){return`${e.toLocaleDateString()}-${a}`}onClickSelectTime(e,a){o(`[nylas-timeslot-picker] Time selected`,e,a);this.selectedTimeslotIndex=this.getTimeslotId(e.start_time,a);this.timeslotSelected.emit({start_time:e.start_time,end_time:e.end_time})}getTimeSlotLabel(e){const a=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"numeric",timeZone:this.selectedTimezone});return`${a.format(e.start_time)} - ${a.format(e.end_time)}`}selectedDateChanged(e){o(`[nylas-timeslot-picker] Selected date changed`,{newVal:e});if(e){this.selectedTimeslotIndex="";if(typeof e!=="undefined"){const a=this.availability?.filter((a=>d(a.start_time,e))).map((e=>e));this.times=a||[]}}}availabilityChanged(e){o(`[nylas-timeslot-picker] Available times changed`,{newVal:e,selectedDate:this.selectedDate});if(typeof e!=="undefined"){const a=e?.filter((e=>this.selectedDate&&d(e.start_time,this.selectedDate))).map((e=>e));this.times=a||[]}}render(){if(this.isLoading){return t(n,null,t("div",{class:"loading"},new Array(6).fill(0).map(((e,a)=>t("div",{class:"time-slot-skeleton",style:{animationDelay:`${a*20}ms`}})))))}if(this.availability&&this.availability.length===0){return t(n,null,t("div",{class:"empty"},t("span",null,"No dates available")))}if((!this.times||this.times.length===0)&&!!this.selectedDate){return t(n,null,t("div",{class:"empty"},t("span",null,"No time slots available for selected date")))}if(!this.selectedDate)return t(n,null);return t(n,{part:"ntp"},t("div",{class:"time-picker-wrapper"},t("div",{class:"time-slots"},this.times.map(((e,a)=>t("button",{part:`ntp__timeslot ${this.selectedTimeslot?.start_time?.getTime()===e.start_time.getTime()?"ntp__timeslot--selected":""}`,"aria-role":"button",class:{time:true,selected:typeof this.selectedTimeslot!=="undefined"&&this.selectedTimeslot?.start_time?.getTime()===e.start_time.getTime()},onClick:()=>this.onClickSelectTime(e,a),onMouseEnter:()=>this.handleMouseEnter(a),onMouseLeave:()=>this.handleMouseLeave()},this.hoveredTimeslotIndex==a||this.selectedTimeslotIndex==this.getTimeslotId(e.start_time,a)?this.getTimeSlotLabel(e):e.start_time.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",timeZone:this.selectedTimezone}))))),this.selectedTimeslot&&t("div",{class:"footer"},t("sp-button",{variant:"primary",onClick:e=>this.handleConfirmedTimeslot(e,this.selectedTimeslot),part:"ntp__button-primary"},t("slot",{name:"timeslot-picker-cta-label"},"Next")))))}static get watchers(){return{selectedDate:["selectedDateChanged"],availability:["availabilityChanged"]}}};pe([i({name:"nylas-timeslot-picker",stateToProps:new Map([["scheduler.selectedDate","selectedDate"],["scheduler.availability","availability"],["scheduler.selectedTimeslot","selectedTimeslot"],["scheduler.selectedTimezone","selectedTimezone"],["scheduler.isLoading","isLoading"]]),eventToProps:{timeslotSelected:async(e,a)=>{a.scheduler.selectTime(e.detail)},timeslotConfirmed:async(e,a)=>{if(e.detail){a.scheduler.toggleAdditionalData(true)}}},fireRegisterEvent:true}),ye("design:type",Function),ye("design:paramtypes",[]),ye("design:returntype",void 0)],he.prototype,"render",null);he.style=be;export{v as nylas_booked_event_card,z as nylas_booking_form,D as nylas_cancel_booking_form,M as nylas_cancelled_event_card,U as nylas_date_picker,Q as nylas_locale_switch,te as nylas_logo,re as nylas_notification,de as nylas_selected_event_card,he as nylas_timeslot_picker};
|
|
2
|
-
//# sourceMappingURL=p-d85eecf4.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r}from"./p-68c2fadf.js";const t=".sc-arrow-icon-h{display:flex}";const s=t;const e=class{constructor(r){o(this,r);this.width="15";this.height="15"}render(){return r("svg",{key:"db4337c46d0f73cb863335d2b838806c9a35370a",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r("path",{key:"658c3e161f9aa5a495402b7809d4d606056ea3d1",d:"M5 12H19M12 5L19 12L12 19",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};e.style=s;export{e as arrow_icon};
|
|
2
|
-
//# sourceMappingURL=p-d92a0405.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s}from"./p-68c2fadf.js";const o=".sc-play-icon-h{display:flex}";const e=o;const i=class{constructor(s){t(this,s);this.width="15";this.height="15"}render(){return s("svg",{key:"c68beab7911b331b95fb99e6b0790f909dbc4420",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"41b155cbaa2b3a1a3d834940d023e9530ef28112",d:"M21 12L3 21V3L21 12Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};i.style=e;const c=".sc-stop-icon-h{display:flex}";const r=c;const n=class{constructor(s){t(this,s);this.width="15";this.height="15"}render(){return s("svg",{key:"b39e317c3d3a25ed955ef96918cb986264487f42",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"auto",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"cec2514adff36410b8f035e6d0439ff58c7bf5cf",d:"M4 4H20V20H4V4Z",stroke:"auto","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))}};n.style=r;export{i as play_icon,n as stop_icon};
|
|
2
|
-
//# sourceMappingURL=p-de63bc35.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{d as e}from"./p-901f9612.js";import{c as t}from"./p-cabb2e68.js";var i;(function(e){e["Component"]="component";e["Api"]="api";e["Auth"]="auth"})(i||(i={}));var n;(function(e){e["endtime_not_in_future"]="endtime_not_in_future";e["no_booking_info"]="no_booking_info";e["no_timeslot_selected"]="no_timeslot_selected";e["no_booking_id"]="no_booking_id";e["invalid_start_time"]="invalid_start_time";e["invalid_end_time"]="invalid_end_time";e["invalid_timezone"]="invalid_timezone"})(n||(n={}));var s;(function(e){e["invalid_session"]="invalid_session";e["general_error"]="general_error";e["internal_error"]="internal_error";e["invalid_request_error"]="invalid_request_error";e["timeslot_not_available"]="timeslot_not_available"})(s||(s={}));class o{constructor(){this.component=e=>{const t=i.Component;const n=`${e} error`;return{endtime_not_in_future:(e='"endtime" can not be in the future')=>({title:n,message:e,category:t}),no_booking_info:(e="No booking info provided")=>({title:n,message:e,category:t}),no_timeslot_selected:(e="No timeslot selected")=>({title:n,message:e,category:t}),no_booking_id:(e="No booking id provided")=>({title:n,message:e,category:t}),invalid_start_time:(e="Invalid start time")=>({title:n,message:e,category:t}),invalid_end_time:(e="Invalid end time")=>({title:n,message:e,category:t}),invalid_timezone:(e="Invalid timezone")=>({title:n,message:e,category:t})}};this.api=e=>{const t=i.Api;const n=`${e} error`;return{invalid_session:e=>({title:n,message:e,category:t}),general_error:e=>({title:n,message:e,category:t}),internal_error:e=>({title:n,message:e,category:t}),invalid_request_error:e=>({title:n,message:e,category:t}),timeslot_not_available:e=>({title:n,message:e,category:t})}}}}class a{constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:i,configId:n}){this.errors=new o;this.schedulerStore=t;this.schedulerAPIURL=e;this.sessionId=i;this.configId=n}getHeaders(){return!this.configId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,i,n={}){try{const s=new URL(this.schedulerAPIURL);s.pathname=e;const o=await fetch(decodeURIComponent(s.toString()),{method:t,headers:{"Content-Type":"application/json",...n},body:i});const a=await o.json();return a}catch(e){return{error:{message:e.message,title:"API request failed",type:"api"}}}}selectDate(e){this.schedulerStore.set("selectedDate",e);this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}toggleAdditionalData(e){this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t?.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t?.primaryParticipant,email:e}})}async setReschedule(e){const t=new Date;this.schedulerStore.set("rescheduleBookingId",e);this.schedulerStore.set("selectedTimeslot",null);this.schedulerStore.set("eventInfo",null);this.schedulerStore.set("showBookingForm",false);const i=new Date(t.getFullYear(),t.getMonth(),1).getTime()/1e3;const n=new Date(t.getFullYear(),t.getMonth()+1,1).getTime()/1e3;const s=await this.getAvailability(i,n);const o=this.schedulerStore.get("availability").find((e=>new Date(e.start_time)>new Date));let a=t;if(o){a=o.start_time}this.schedulerStore.set("selectedDate",a);return s}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async bookTimeslot(e){this.schedulerStore.set("isLoading",true);const{selectedTimeslot:t,bookingInfo:i}=this.schedulerStore.state;if(!e&&!i){return{error:this.errors.component("Booking").no_booking_info()}}const n=e?.timeslot||t;if(!n){return{error:this.errors.component("Create Booking").no_timeslot_selected()}}const s=e?e?.primaryParticipant:i?.primaryParticipant;const o=e?e?.guests||[]:i?.guests||[];const a=e?{...e?.additionalFields,guests:o}:{...i?.additionalFields,guests:o};const r=this.getHeaders();const l=this.configId?`?configuration_id=${this.configId}`:"";const c=`/v3/scheduling/bookings${l}`;const d=await this.makeAPIRequest(decodeURIComponent(c),"POST",JSON.stringify({additional_fields:a,guest:{...s},start_time:n.start_time.getTime()/1e3,end_time:n.end_time.getTime()/1e3}),r);if("error"in d){this.schedulerStore.set("isLoading",false);const e=d.error?.type;let t=d.error;if(e&&e in this.errors.api("Create Booking")){t=this.errors.api("Create Booking")[e](t?.message||t?.title||"Something went wrong")}return{error:t}}if("data"in d){this.schedulerStore.set("eventInfo",d?.data)}this.schedulerStore.set("isLoading",false);return d}async getAvailability(e=0,t=0){this.schedulerStore.set("isLoading",true);const i=new URLSearchParams;const n=new Date;const s=n.getTime();if(t&&t<s/1e3){this.schedulerStore.set("isLoading",false);const e=this.errors.component("Get Availability").endtime_not_in_future();return{error:e}}if(!e){const t=new Date(n.getFullYear(),n.getMonth(),1);e=Math.floor(t.getTime()/1e3)}if(!t){const e=new Date(n.getFullYear(),n.getMonth()+1,0);t=Math.floor(e.getTime()/1e3)}i.append("start_time",encodeURIComponent(e.toString()));i.append("end_time",encodeURIComponent(t.toString()));if(this.configId){i.append("configuration_id",encodeURIComponent(this.configId))}const o=i.toString();const a=`/v3/scheduling/availability${o?`?${o}`:""}`;const r=this.getHeaders();const l=await this.makeAPIRequest(decodeURIComponent(a),"GET",undefined,r);if("error"in l){this.schedulerStore.set("availability",[]);this.schedulerStore.set("isLoading",false);const e=l.error?.type;let t=l.error;if(e&&e in this.errors.api("Get Availability")){t=this.errors.api("Get Availability")[e](t?.message||t?.title||"Something went wrong")}return{error:t}}if("data"in l){const e=l.data?.time_slots?.map((e=>({...e,start_time:new Date(e.start_time*1e3),end_time:new Date(e.end_time*1e3)})))||[];const t=e.filter((e=>e.start_time.getTime()>s));this.schedulerStore.set("availability",t)}this.schedulerStore.set("isLoading",false);return l}async cancelBooking(e){this.schedulerStore.set("isLoading",true);if(!e){return{error:this.errors.component("Cancel Booking").no_booking_id()}}const t=this.configId?`?configuration_id=${this.configId}`:"";const i=`/v3/scheduling/bookings/${e}${t}`;const n=this.getHeaders();const s=await this.makeAPIRequest(decodeURIComponent(i),"DELETE",JSON.stringify({action:"cancel"}),n);if("error"in s){this.schedulerStore.set("isLoading",false);const e=s.error?.type;let t=s.error;if(e&&e in this.errors.api("Cancel Booking")){t=this.errors.api("Cancel Booking")[e](t?.message||t?.title||"Something went wrong")}return{error:t}}this.schedulerStore.set("cancelledEventInfo",{booking_id:e});this.schedulerStore.set("isLoading",false);return s}async rescheduleBooking(e,t){this.schedulerStore.set("isLoading",true);if(!e){return{error:this.errors.component("Reschedule Booking").no_booking_id()}}const i=this.errors.api("Reschedule Booking");const n=this.errors.component("Reschedule Booking");const{bookingInfo:s,selectedTimeslot:o,selectedTimezone:a}=this.schedulerStore.state;const{startTime:r,endTime:l,timezone:c}=t;const d=r||o?.start_time;if(!d){return{error:n.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')}}const h=l||o?.end_time;if(!h){return{error:n.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')}}const g=c||a;if(!g){return{error:n.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')}}const m=t?t?.primaryParticipant:s?.primaryParticipant;const u=t?t?.guests||[]:s?.guests||[];const f=t?{...t?.additionalFields,guests:u}:{...s?.additionalFields,guests:u};const _=this.configId?`?configuration_id=${this.configId}`:"";const v=`/v3/scheduling/bookings/${e}${_}`;const y=this.getHeaders();const b=await this.makeAPIRequest(decodeURIComponent(v),"PATCH",JSON.stringify({start_time:d.getTime()/1e3,end_time:h.getTime()/1e3,time_zone:g,additional_fields:f,guest:{...m}}),y);if("error"in b){this.schedulerStore.set("isLoading",false);const e=b.error?.type;let t=b.error;if(e&&e in i){t=i[e](t?.message||t?.title||"Something went wrong")}}if("data"in b)this.schedulerStore.set("eventInfo",b?.data);this.schedulerStore.set("isLoading",false);return b}}function r(i={}){const n={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:false,selectableDates:null,availability:[],state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:false,nylasBranding:true,...i};e(`[defaultNylasStoreState]: `,n);const s=t(n);s.onChange("availability",(t=>{e(`[availability]: `,t);const i=t.map((e=>e.start_time));e(`[selectableDates]: `,i);s.set("selectableDates",i)}));s.reset=()=>{for(const e in n){const t=n[e];s.set(e,t)}};return s}export{r as C,i as E,a as N};
|
|
2
|
-
//# sourceMappingURL=p-df5e9aaf.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["ErrorCategory","ComponentErrorType","APIErrorType","Errors","constructor","this","component","_title","category","Component","title","endtime_not_in_future","message","no_booking_info","no_timeslot_selected","no_booking_id","invalid_start_time","invalid_end_time","invalid_timezone","api","Api","invalid_session","general_error","internal_error","invalid_request_error","timeslot_not_available","NylaSchedulerAPIConnector","schedulerAPIURL","schedulerStore","sessionId","configId","errors","getHeaders","Authorization","makeAPIRequest","path","method","body","headers","schedulerURL","URL","pathname","response","fetch","decodeURIComponent","toString","data","json","error","type","selectDate","date","set","selectTime","time","selectTimezone","timezone","toggleAdditionalData","value","setParticipantName","name","bookingInfo","state","primaryParticipant","setParticipantEmail","email","setReschedule","bookingID","today","Date","startTime","getFullYear","getMonth","getTime","endTime","result","getAvailability","firstAvailableDate","get","find","timeslot","start_time","_selectedDate","setCancel","bookTimeslot","selectedTimeslot","guests","additional_fields","additionalFields","configIdParam","url","JSON","stringify","guest","end_time","errorType","params","URLSearchParams","now","nowTime","startOfMonth","Math","floor","endOfMonth","append","encodeURIComponent","queryString","undefined","availability","time_slots","map","availabilityTimeslotsFiltered","filter","cancelBooking","bookingId","action","booking_id","rescheduleBooking","apiErrors","componentErrors","selectedTimezone","time_zone","CreateNylasSchedulerStore","defaultState","defaultNylasStoreState","selectedDate","selectedLanguage","navigator","language","Intl","DateTimeFormat","resolvedOptions","timeZone","showBookingForm","selectableDates","eventInfo","cancelledEventInfo","isLoading","nylasBranding","debug","store","createStore","onChange","reset","key"],"sources":["src/connector/nylas-scheduler-connector/errors/index.ts","src/connector/shared/api/scheduler.ts","src/stores/scheduler-store.ts"],"sourcesContent":["export enum ErrorCategory {\n Component = 'component',\n Api = 'api',\n Auth = 'auth',\n}\n\nexport interface ErrorDetails {\n title: string;\n message: string;\n category: ErrorCategory;\n}\n\nexport enum ComponentErrorType {\n endtime_not_in_future = 'endtime_not_in_future',\n no_booking_info = 'no_booking_info',\n no_timeslot_selected = 'no_timeslot_selected',\n no_booking_id = 'no_booking_id',\n invalid_start_time = 'invalid_start_time',\n invalid_end_time = 'invalid_end_time',\n invalid_timezone = 'invalid_timezone',\n}\n\nexport enum APIErrorType {\n invalid_session = 'invalid_session',\n general_error = 'general_error',\n internal_error = 'internal_error',\n invalid_request_error = 'invalid_request_error',\n timeslot_not_available = 'timeslot_not_available',\n}\n\nexport class Errors {\n component = (_title: string): Record<ComponentErrorType, (message?: string) => ErrorDetails> => {\n const category = ErrorCategory.Component;\n const title = `${_title} error`;\n return {\n endtime_not_in_future: (message: string = '\"endtime\" can not be in the future') => {\n return {\n title,\n message,\n category,\n };\n },\n no_booking_info: (message: string = 'No booking info provided') => {\n return {\n title,\n message,\n category,\n };\n },\n no_timeslot_selected: (message: string = 'No timeslot selected') => {\n return {\n title,\n message,\n category,\n };\n },\n no_booking_id: (message: string = 'No booking id provided') => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_start_time: (message: string = 'Invalid start time') => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_end_time: (message: string = 'Invalid end time') => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_timezone: (message: string = 'Invalid timezone') => {\n return {\n title,\n message,\n category,\n };\n },\n };\n };\n\n api = (_title: string): Record<APIErrorType, (message: string) => ErrorDetails> => {\n const category = ErrorCategory.Api;\n const title = `${_title} error`;\n\n return {\n invalid_session: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n general_error: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n internal_error: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n invalid_request_error: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n timeslot_not_available: (message: string) => {\n return {\n title,\n message,\n category,\n };\n },\n };\n };\n}\n","import { AvailabilityResponse, NylasEvent } 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';\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.configId\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 ...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 /**\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 toggleAdditionalData(value: boolean) {\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 /**\n * Set reschedule booking id\n */\n public async setReschedule(bookingID: string) {\n const today = new Date();\n // Set reschedule booking id\n this.schedulerStore.set('rescheduleBookingId', bookingID);\n // Reset store state\n this.schedulerStore.set('selectedTimeslot', null);\n this.schedulerStore.set('eventInfo', null);\n this.schedulerStore.set('showBookingForm', false);\n // Refetch availability\n const startTime = new Date(today.getFullYear(), today.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(today.getFullYear(), today.getMonth() + 1, 1).getTime() / 1000;\n const result = await this.getAvailability(startTime, endTime);\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 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 /**\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, 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 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 headers = this.getHeaders();\n const configIdParam = 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 guest: { ...primaryParticipant },\n start_time: timeslot.start_time.getTime() / 1000,\n end_time: timeslot.end_time.getTime() / 1000,\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 error = this.errors.api('Create Booking')[errorType as APIErrorType](error?.message || error?.title || 'Something went wrong');\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 * 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 // 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\n params.append('start_time', encodeURIComponent(startTime.toString()));\n params.append('end_time', encodeURIComponent(endTime.toString()));\n if (this.configId) {\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 error = this.errors.api('Get Availability')[errorType as APIErrorType](error?.message || error?.title || 'Something went wrong');\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): 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.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 }),\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 error = this.errors.api('Cancel Booking')[errorType as APIErrorType](error?.message || error?.title || 'Something went wrong');\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.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 error = apiErrors[errorType as APIErrorType](error?.message || error?.title || 'Something went wrong');\n }\n }\n\n if ('data' in response) this.schedulerStore.set('eventInfo', response?.data);\n\n this.schedulerStore.set('isLoading', false);\n return response;\n }\n}\n","import { DataState, NylasEvent } from '@/common/types';\nimport { debug } from '@/utils/utils';\nimport { NylasSchedulerBookingData, Timeslot } from '@nylas/core';\nimport { createStore } from '@stencil/store';\n\nexport type AvailabilityTimeslot = {\n emails: string[];\n start_time: Date;\n end_time: Date;\n};\n\nexport type LoadingState = {\n api: 'availability' | 'createBooking' | 'cancelBooking' | 'rescheduleBooking';\n};\n\nexport interface NylasSchedulerStoreState {\n selectedDate: Date | null;\n selectedLanguage: string;\n selectedTimezone: string;\n selectedTimeslot: Timeslot | null;\n showBookingForm: boolean;\n selectableDates: Date[] | null;\n availability: AvailabilityTimeslot[];\n state: DataState;\n eventInfo: NylasEvent | null;\n cancelledEventInfo: Partial<NylasEvent> | null;\n bookingInfo?: NylasSchedulerBookingData;\n rescheduleBookingId?: string;\n cancelBookingId?: string;\n isLoading: boolean;\n nylasBranding?: boolean;\n}\n\nexport type NylasSchedulerStoreType = ReturnType<typeof CreateNylasSchedulerStore>;\n\nexport function CreateNylasSchedulerStore(defaultState: Partial<NylasSchedulerStoreState> = {}) {\n const defaultNylasStoreState: NylasSchedulerStoreState = {\n selectedDate: null,\n selectedLanguage: navigator.language,\n selectedTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n selectedTimeslot: null,\n showBookingForm: false,\n selectableDates: null,\n availability: [],\n 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 });\n\n /**\n * Reset the Nylas store to its default state.\n * There is something wrong with the stencil/store reset method,\n * so we have to do it via this hack.\n */\n store.reset = () => {\n for (const key in defaultNylasStoreState) {\n const value = defaultNylasStoreState[key as keyof typeof defaultNylasStoreState];\n store.set(key as any, value);\n }\n };\n\n return store;\n}\n"],"mappings":"4EAAYA,GAAZ,SAAYA,GACVA,EAAA,yBACAA,EAAA,aACAA,EAAA,cACD,EAJD,CAAYA,MAAa,KAYzB,IAAYC,GAAZ,SAAYA,GACVA,EAAA,iDACAA,EAAA,qCACAA,EAAA,+CACAA,EAAA,iCACAA,EAAA,2CACAA,EAAA,uCACAA,EAAA,sCACD,EARD,CAAYA,MAAkB,KAU9B,IAAYC,GAAZ,SAAYA,GACVA,EAAA,qCACAA,EAAA,iCACAA,EAAA,mCACAA,EAAA,iDACAA,EAAA,kDACD,EAND,CAAYA,MAAY,K,MAQXC,EAAb,WAAAC,GACEC,KAAAC,UAAaC,IACX,MAAMC,EAAWR,EAAcS,UAC/B,MAAMC,EAAQ,GAAGH,UACjB,MAAO,CACLI,sBAAuB,CAACC,EAAkB,wCACjC,CACLF,QACAE,UACAJ,aAGJK,gBAAiB,CAACD,EAAkB,8BAC3B,CACLF,QACAE,UACAJ,aAGJM,qBAAsB,CAACF,EAAkB,0BAChC,CACLF,QACAE,UACAJ,aAGJO,cAAe,CAACH,EAAkB,4BACzB,CACLF,QACAE,UACAJ,aAGJQ,mBAAoB,CAACJ,EAAkB,wBAC9B,CACLF,QACAE,UACAJ,aAGJS,iBAAkB,CAACL,EAAkB,sBAC5B,CACLF,QACAE,UACAJ,aAGJU,iBAAkB,CAACN,EAAkB,sBAC5B,CACLF,QACAE,UACAJ,aAGL,EAGHH,KAAAc,IAAOZ,IACL,MAAMC,EAAWR,EAAcoB,IAC/B,MAAMV,EAAQ,GAAGH,UAEjB,MAAO,CACLc,gBAAkBT,IACT,CACLF,QACAE,UACAJ,aAGJ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vEzC,KAAKuB,eAAewB,IAAI,YAAa,OACrC,OAAOV,C,WCzWKgF,EAA0BC,EAAkD,IAC1F,MAAMC,EAAmD,CACvDC,aAAc,KACdC,iBAAkBC,UAAUC,SAC5BR,iBAAkBS,KAAKC,iBAAiBC,kBAAkBC,SAC1D/C,iBAAkB,KAClBgD,gBAAiB,MACjBC,gBAAiB,KACjB1B,aAAc,GACd9C,MAAO,QACPyE,UAAW,KACXC,mBAAoB,KACpBC,UAAW,MACXC,cAAe,QACZf,GAELgB,EAAM,6BAA8Bf,GACpC,MAAMgB,EAAQC,EAAsCjB,GAEpDgB,EAAME,SAAS,gBAAgBlC,IAC7B+B,EAAM,mBAAoB/B,GAC1B,MAAM0B,EAAkB1B,EAAaE,KAAI9B,GAAYA,EAASC,aAC9D0D,EAAM,sBAAuBL,GAC7BM,EAAMxF,IAAI,kBAAmBkF,EAAgB,IAQ/CM,EAAMG,MAAQ,KACZ,IAAK,MAAMC,KAAOpB,EAAwB,CACxC,MAAMlE,EAAQkE,EAAuBoB,GACrCJ,EAAMxF,IAAI4F,EAAYtF,E,GAI1B,OAAOkF,CACT,Q"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,c as a,H as n}from"./p-68c2fadf.js";import{R as s}from"./p-408dda49.js";import{d as o}from"./p-901f9612.js";import"./p-cb65c223.js";const i=".sc-google-logo-icon-h{display:flex}";const r=i;const d=class{constructor(t){e(this,t);this.width="24";this.height="24"}render(){return t("svg",{key:"054a6d1317c29eb0eed05c1f7d69611837b294f5",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("g",{key:"7a46687e247930c1200d1cdd0ef6c1463cec96ee","clip-path":"url(#clip0_959_12452)"},t("path",{key:"d64a97cc07c2e8094e71a79f03b96a2c495c9a28",d:"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z",fill:"#4285F4"}),t("path",{key:"00f94b17c43c5199a00537873106f5f4eeaaa9a7",d:"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z",fill:"#34A853"}),t("path",{key:"9391a8453b0adb7908ab1d06888a0cfcf0a32999",d:"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z",fill:"#FBBC05"}),t("path",{key:"57cc6b8f6edb5b0361468c8bb49d450d1f92727f",d:"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z",fill:"#EA4335"})),t("defs",{key:"ddb9c74f9a608e22e21f39feca20be85612e3e0d"},t("clipPath",{key:"4828256582d76ee2c0732552630581e5d756c7e5",id:"clip0_959_12452"},t("rect",{key:"5331dc073a4dbe01fabb56ee0fae553a0100edd9",width:24,height:24,fill:"white"}))))}};d.style=r;const c=".sc-microsoft-logo-icon-h{display:flex}";const l=c;const b=class{constructor(t){e(this,t);this.width="22";this.height="22"}render(){return t("svg",{key:"9c6a5f616c9e25067b87916d304b0cd32b00f083",width:this.width,height:this.height,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"bbe87ce62235b96d327cc0dd4dabc78f5273c034",d:"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z",fill:"#F35325"}),t("path",{key:"de6dd97b42e8103d81cad275c722b36e5b5233b5",d:"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z",fill:"#81BC06"}),t("path",{key:"b13b204df603dd53a9f4aba4af8a502a224ff580",d:"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z",fill:"#05A6F0"}),t("path",{key:"372e3c35aae7f712309a0d97c54f5e92741f6eb7",d:"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z",fill:"#FFBA08"}))}};b.style=l;function f({id:e,formState:a,activeTab:n,calendars:s}){switch(n){case"eventInfo":const n=a.title;const o=a.description;const i=parseInt(a.duration);const r=a.location;return t("div",{key:e},t("nylas-event-info",null,t("div",{slot:"inputs"},t("nylas-event-title",{name:"title",eventTitle:n,exportparts:"net, net__title, net__dropdown-content"}),t("nylas-event-duration",{name:"duration",eventDurationMinutes:i,exportparts:"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content"}),t("nylas-location-component",{name:"location",eventLocation:r,exportparts:"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content"}),t("nylas-event-description",{name:"description",eventDescription:o,exportparts:"nedesc, nedesc__textarea"}))));case"availability":const d=a.availability;const c=d?.[0]?.timezone??Intl.DateTimeFormat().resolvedOptions().timeZone;const l=a.participants?.find((e=>e.is_organizer));const b=l?.email??"primary";const f=a.calendarIds.length>0?a.calendarIds:[b];const p=a.bookingCalendar=="primary"?b:a.bookingCalendar;return t("div",{key:e},t("nylas-booking-calendar-picker",{name:"booking-calendar",calendars:s??[],defaultBookingCalendar:p,exportparts:"nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content"}),t("nylas-calendar-picker",{name:"calendars",calendars:s??[],defaultSelectedCalendars:f,organizerEmail:b,exportparts:"ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content"}),t("nylas-availability-picker",{name:"availability",openHours:d,defaultTimezone:c,exportparts:"nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times"}));case"bookingOptions":return t("div",{key:e},e=="new"&&t("p",null,"Config"),t("nylas-buffer-time",{name:"buffer-time",buffer:a.buffer,exportparts:"nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview"}),t("nylas-custom-booking-flow",{name:"booking-type",bookingType:a.bookingType,exportparts:"ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content"}),t("nylas-event-limits",null,t("div",{slot:"inputs"},t("nylas-limit-future-bookings",{name:"limit-future-bookings",availableDaysInFuture:a.availableDaysInFuture,exportparts:"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content"}),t("nylas-min-cancellation-notice",{name:"min-cancellation-notice",minCancellationNotice:a.minCancellationNotice,exportparts:"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content"}))))}}const p='.sc-nylas-editor-tabs-h{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.scheduler-editor.sc-nylas-editor-tabs{display:flex;flex-direction:column}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:grid;grid-template-columns:minmax(224px, 25%) 1fr}@media screen and (max-width: 768px){.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs{display:table-column-group}}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs{display:flex;flex-direction:column;border-right:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 1rem;color:var(--nylas-base-900);background:var(--nylas-base-0);border:none;height:56px;font-family:var(--nylas-font-family);font-size:16px;font-weight:500;line-height:24px;cursor:pointer}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.sc-nylas-editor-tabs:not(:first-of-type){margin-top:0.25rem}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tabs.sc-nylas-editor-tabs .tab.active.sc-nylas-editor-tabs{font-weight:600;background:var(--nylas-base-0);color:var(--nylas-primary);border-left:4px solid var(--nylas-primary);box-shadow:0px 1px 2px 0px rgba(0, 0, 0, 0.0588235294);box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1019607843)}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs{max-width:692px}.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-info.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs,.scheduler-editor.sc-nylas-editor-tabs .form-contents.sc-nylas-editor-tabs .tab-content.sc-nylas-editor-tabs nylas-event-limits.sc-nylas-editor-tabs div[slot=inputs].sc-nylas-editor-tabs{display:flex;flex-direction:column;gap:1rem}.footer.sc-nylas-editor-tabs{display:flex;justify-content:flex-end;align-items:center;gap:1rem;height:80px;padding:0 1rem;border-top:1px solid var(--nylas-base-200)}.footer.sc-nylas-editor-tabs .unsaved-changes.sc-nylas-editor-tabs{color:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs .saved-changes.sc-nylas-editor-tabs{color:var(--nylas-success)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs{background:var(--nylas-primary);color:var(--nylas-base-0);height:48px;border:none;border-radius:var(--nylas-border-radius-2x);font-size:1rem;line-height:24px;padding:0 1rem;cursor:pointer;width:148px}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:hover{background:var(--nylas-base-600)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:active{background:var(--nylas-base-800)}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs:disabled{background:var(--nylas-base-300);cursor:not-allowed}.footer.sc-nylas-editor-tabs button.sc-nylas-editor-tabs span.sc-nylas-editor-tabs{display:flex;align-items:center;justify-content:center;gap:0.5rem}';const y=p;var h=undefined&&undefined.__decorate||function(e,t,a,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,a):n,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,a,n);else for(var r=e.length-1;r>=0;r--)if(i=e[r])o=(s<3?i(o):s>3?i(t,a,o):i(t,a))||o;return s>3&&o&&Object.defineProperty(t,a,o),o};var u=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const _=class{constructor(t){e(this,t);this.schedulerConfigChanged=a(this,"schedulerConfigChanged",7);this.formSubmissionHandler=async e=>{e.preventDefault();this.isLoading=true;this.hasUnsavedChanges=false;this.updateFormState();const{title:t,description:a,duration:n,availability:s,calendarIds:o,bookingCalendar:i,location:r,bookingType:d,buffer:c,availableDaysInFuture:l,minCancellationNotice:b}=this.formState;const f=this.config?.participants?.find((e=>e.is_organizer));const p={...this.config?.id&&{id:this.config.id},version:this.config?.version??"1.0.0",availability:{duration_minutes:n?parseInt(n):0,availability_rules:{availability_method:this.config?.availability?.availability_rules?.availability_method??"collective",buffer:c||{before:0,after:0},default_open_hours:this.config?.availability?.availability_rules?.default_open_hours??[],round_robin_group_id:this.config?.availability?.availability_rules?.round_robin_group_id??""}},participants:[{name:f?.name??f?.email??this.currentUser?.name??this.currentUser?.email??"",email:f?.email??this.currentUser?.email??"",is_organizer:true,availability:{calendar_ids:o?.length?o:["primary"],open_hours:s??[]},booking:{calendar_id:i&&i!==""?i:"primary"}}],event_booking:{title:t?.toString()??"",description:a?.toString()??"",location:r?.toString()??"",booking_type:d?.toString()??"booking"},scheduler:{available_days_in_future:l??30,min_cancellation_notice:b??0}};const y=e=>{this.isLoading=false;this.changesSaved=true;setTimeout((()=>{this.changesSaved=false}),5e3)};this.schedulerConfigChanged.emit({config:p,resetLoadingState:y,action:this.action})};this.calendars=undefined;this.config=undefined;this.currentUser=undefined;this.action="create";this.activeTab="eventInfo";this.isLoading=false;this.hasUnsavedChanges=false;this.changesSaved=false;this.formState={}}configChangedHandler(e){o("[nylas-editor-tabs]","configChangedHandler",e,this.config);this.formState={...this.getFormStateFromConfig(e)};if(e.id){this.action="update"}else{this.action="create"}}connectedCallback(){o("[nylas-editor-tabs]","connectedCallback")}componentWillLoad(){o("[nylas-editor-tabs]","componentWillLoad");this.formState=this.getFormStateFromConfig(this.config)}componentDidLoad(){o("[nylas-editor-tabs]","componentDidLoad")}disconnectedCallback(){o("[nylas-editor-tabs]","disconnectedCallback")}handleValueChanged(e){o("[nylas-editor-tabs]","handleValueChanged",e);this.formState={...this.formState,[e.detail.name]:e.detail.value};this.hasUnsavedChanges=true}getFormStateFromConfig(e){const t=e?.participants?.find((e=>e.is_organizer));return{title:e?.event_booking?.title??"",description:e?.event_booking?.description??"",duration:e?.availability?.duration_minutes?.toString()??"10",availability:t?.availability?.open_hours??undefined,calendarIds:t?.availability?.calendar_ids??[],participants:e?.participants??[],bookingCalendar:t?.booking?.calendar_id??t?.email??"",location:this.config?.event_booking?.location??"",bookingType:this.config?.event_booking?.booking_type??"booking",buffer:this.config?.availability?.availability_rules?.buffer??{before:0,after:0},availableDaysInFuture:this.config?.scheduler?.available_days_in_future??30,minCancellationNotice:this.config?.scheduler?.min_cancellation_notice??0}}updateFormState(){const e=new FormData(this.formRef);e.forEach(((e,t)=>{switch(t){case"title":this.formState.title=e.toString();break;case"description":this.formState.description=e.toString();break;case"duration":this.formState.duration=e.toString();break;case"availability":this.formState.availability=JSON.parse(e.toString());break;case"participants":this.formState.participants=JSON.parse(e.toString());break;case"calendars":this.formState.calendarIds=e.toString().split(",");break;case"booking-calendar":this.formState.bookingCalendar=e.toString();break;case"location":this.formState.location=e.toString();break;case"booking-type":this.formState.bookingType=e.toString();break;case"buffer-time":this.formState.buffer=JSON.parse(e.toString());break;case"limit-future-bookings":this.formState.availableDaysInFuture=parseInt(e.toString());break;case"min-cancellation-notice":this.formState.minCancellationNotice=parseInt(e.toString());break}}));this.formState={...this.formState}}setActiveTab(e,t){e.preventDefault();this.updateFormState();this.activeTab=t}render(){o("[nylas-editor-tabs]","render",this.formState);return t(n,{key:"920332a1206e84229cd4875b598b388d196edc77"},t("form",{key:"cc33124020c4ec87dff2eb395d8a4151dd2a63a8",onSubmit:this.formSubmissionHandler,class:"scheduler-editor",ref:e=>this.formRef=e},t("div",{key:"e9a0e2d35d59ab3c95e0b17db057aa97de1c48d3",class:"form-contents"},t("div",{key:"c2b30e822e4b5a0d938b9d7fb5849e90503d5fee",class:"tabs"},t("button",{key:"1958ff2af28cf21a3c8b6a1029dfd0fdfd58bbf7",class:{tab:true,active:this.activeTab=="eventInfo"},onClick:e=>this.setActiveTab(e,"eventInfo")},t("calendar-info-icon",{key:"c62f9b3cad22d4c67791c78dcac202d47617eda0",width:"16",height:"16"}),"Event Info"),t("button",{key:"7858b3fe59f02eefba9cebc561e5e89b220a6018",class:{tab:true,active:this.activeTab=="availability"},onClick:e=>this.setActiveTab(e,"availability")},t("calendar-patterns-icon",{key:"b8d6ed526a37bd31ce150c4202e41a9599c553af",width:"16",height:"16"}),"Availability"),t("button",{key:"224c119608059affb6245f72b6337fe66aafe9fb",class:{tab:true,active:this.activeTab=="bookingOptions"},onClick:e=>this.setActiveTab(e,"bookingOptions")},t("flow-icon",{key:"149824372964f592dd1d754a7db6eef9367ffafc",width:"16",height:"16"}),"Booking Options")),t("div",{key:"0feb5d9500b8028542438e9d091b66bc87bc9673",class:"tab-content"},t(f,{key:"86de2a2ab92dd6c1081c7a4db4f3ceb62ee579fe",formState:this.formState,activeTab:this.activeTab,calendars:this.calendars,id:this.config?.id??"new"}))),t("div",{key:"8a63b2e9761aea3dea1e967784db8e2de5b65eda",class:"footer"},t("p",{key:"da0e2f2f19bc7a8b2910706f57ea437b291fc2b1",class:{"unsaved-changes":this.hasUnsavedChanges&&!this.changesSaved,"saved-changes":this.changesSaved}},this.hasUnsavedChanges&&!this.changesSaved?"Unsaved changes":this.changesSaved?"Changes saved!":""),t("button-component",{key:"6d41a5158d8ff68528056fcc65c1b668e3fcd6e6",type:"submit",disabled:this.isLoading},this.isLoading?t("span",null,"Saving",t("loading-icon",null)," "):this.action=="create"?"Create":"Save changes"))))}static get watchers(){return{config:["configChangedHandler"]}}};h([s({name:"nylas-editor-tabs",stateToProps:new Map([["schedulerConfig.calendars","calendars"],["schedulerConfig.config","config"],["schedulerConfig.currentUser","currentUser"]]),eventToProps:{schedulerConfigChanged:async(e,t)=>{const{resetLoadingState:a,action:n,config:s}=e.detail;if(a){a(e)}if(n==="update"){await t.schedulerConfig.updateConfiguration(s)}else{await t.schedulerConfig.createConfiguration(s)}}},fireRegisterEvent:true}),u("design:type",Function),u("design:paramtypes",[]),u("design:returntype",void 0)],_.prototype,"render",null);_.style=y;export{d as google_logo_icon,b as microsoft_logo_icon,_ as nylas_editor_tabs};
|
|
2
|
-
//# sourceMappingURL=p-eb93a363.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["iconCss","GoogleLogoIconStyle0","GoogleLogoIcon","render","h","key","width","this","height","viewBox","fill","xmlns","d","id","MicrosoftLogoIconStyle0","MicrosoftLogoIcon","TabContents","formState","activeTab","calendars","eventTitle","title","eventDescription","description","eventDuration","parseInt","duration","location","slot","name","exportparts","eventDurationMinutes","eventLocation","openHours","availability","timezone","Intl","DateTimeFormat","resolvedOptions","timeZone","organizer","participants","find","p","is_organizer","organizerEmail","email","selectedCalendars","calendarIds","length","bookingCalendar","defaultBookingCalendar","defaultSelectedCalendars","defaultTimezone","buffer","bookingType","availableDaysInFuture","minCancellationNotice","nylasEditorTabsCss","NylasEditorTabsStyle0","NylasEditorTabs","formSubmissionHandler","async","event","preventDefault","isLoading","hasUnsavedChanges","updateFormState","config","configObject","version","duration_minutes","availability_rules","availability_method","before","after","default_open_hours","round_robin_group_id","currentUser","calendar_ids","open_hours","booking","calendar_id","event_booking","toString","booking_type","scheduler","available_days_in_future","min_cancellation_notice","resetLoadingState","_e","changesSaved","setTimeout","schedulerConfigChanged","emit","action","configChangedHandler","newConfig","debug","getFormStateFromConfig","connectedCallback","componentWillLoad","componentDidLoad","disconnectedCallback","handleValueChanged","detail","value","organizerParticipant","undefined","formData","FormData","formRef","forEach","JSON","parse","split","setActiveTab","e","tabName","Host","onSubmit","class","ref","el","tab","active","onClick","type","disabled","__decorate","RegisterComponent","stateToProps","Map","eventToProps","nylasSchedulerConfigConnector","schedulerConfig","updateConfiguration","createConfiguration","fireRegisterEvent"],"sources":["src/common/icons/icon.css?tag=google-logo-icon&encapsulation=scoped","src/common/icons/google-logo.tsx","src/common/icons/icon.css?tag=microsoft-logo-icon&encapsulation=scoped","src/common/icons/microsoft-logo.tsx","src/components/scheduler-editor/nylas-editor-tabs/tab-contents.tsx","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.scss?tag=nylas-editor-tabs&encapsulation=scoped","src/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.tsx"],"sourcesContent":[":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'google-logo-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class GoogleLogoIcon {\n @Prop() width: string = '24';\n @Prop() height: string = '24';\n\n render() {\n // Spam icon svg\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_959_12452)\">\n <path\n d=\"M23.745 12.27C23.745 11.48 23.675 10.73 23.555 10H12.255V14.51H18.725C18.435 15.99 17.585 17.24 16.325 18.09V21.09H20.185C22.445 19 23.745 15.92 23.745 12.27Z\"\n fill=\"#4285F4\"\n />\n <path\n d=\"M12.255 24C15.495 24 18.205 22.92 20.185 21.09L16.325 18.09C15.245 18.81 13.875 19.25 12.255 19.25C9.12504 19.25 6.47505 17.14 5.52505 14.29H1.54504V17.38C3.51504 21.3 7.56504 24 12.255 24Z\"\n fill=\"#34A853\"\n />\n <path\n d=\"M5.52501 14.2901C5.27501 13.5701 5.145 12.8001 5.145 12.0001C5.145 11.2001 5.28501 10.4301 5.52501 9.71012V6.62012H1.545C0.725004 8.24012 0.255005 10.0601 0.255005 12.0001C0.255005 13.9401 0.725004 15.7601 1.545 17.3801L5.52501 14.2901Z\"\n fill=\"#FBBC05\"\n />\n <path\n d=\"M12.255 4.75C14.025 4.75 15.605 5.36 16.855 6.55L20.275 3.13C18.205 1.19 15.495 0 12.255 0C7.56504 0 3.51504 2.7 1.54504 6.62L5.52505 9.71C6.47505 6.86 9.12504 4.75 12.255 4.75Z\"\n fill=\"#EA4335\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_959_12452\">\n <rect width={24} height={24} fill=\"white\" />\n </clipPath>\n </defs>\n </svg>\n );\n }\n}\n",":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'microsoft-logo-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class MicrosoftLogoIcon {\n @Prop() width: string = '22';\n @Prop() height: string = '22';\n\n render() {\n // Spam icon svg\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 22 22\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M0.043457 0.043457H10.4782V10.4782H0.043457V0.043457Z\" fill=\"#F35325\" />\n <path d=\"M11.5217 0.043457H21.9565V10.4782H11.5217V0.043457Z\" fill=\"#81BC06\" />\n <path d=\"M0.043457 11.5217H10.4782V21.9565H0.043457V11.5217Z\" fill=\"#05A6F0\" />\n <path d=\"M11.5217 11.5217H21.9565V21.9565H11.5217V11.5217Z\" fill=\"#FFBA08\" />\n </svg>\n );\n }\n}\n","import { h } from '@stencil/core';\n\nexport type TabContentsProps = {\n id: string;\n formState: any;\n activeTab: string;\n calendars?: any[];\n};\n\nexport default function TabContents({ id, formState, activeTab, calendars }: TabContentsProps) {\n switch (activeTab) {\n case 'eventInfo':\n const eventTitle = formState.title;\n const eventDescription = formState.description;\n const eventDuration = parseInt(formState.duration);\n const location = formState.location;\n // const eventParticipants = formState.participants;\n\n return (\n <div key={id}>\n <nylas-event-info>\n <div slot=\"inputs\">\n <nylas-event-title name=\"title\" eventTitle={eventTitle} exportparts=\"net, net__title, net__dropdown-content\" />\n <nylas-event-duration\n name=\"duration\"\n eventDurationMinutes={eventDuration}\n exportparts=\"ned, ned__input, ned__dropdown, ned__dropdown-button, ned__dropdown-content\"\n />\n <nylas-location-component name=\"location\" eventLocation={location} exportparts=\"nel, nel__location, nel__dropdown, nel__dropdown-button, nel__dropdown-content\" />\n <nylas-event-description name=\"description\" eventDescription={eventDescription} exportparts=\"nedesc, nedesc__textarea\" />\n </div>\n </nylas-event-info>\n {/* <nylas-additional-participants\n name=\"participants\"\n eventParticipants={eventParticipants}\n exportparts={'nap__title, nap__subtitle, nap__content, nap__input_group, nap__input_wrapper, nap__input, nap__remove-participant, nap__add-participant'}\n /> */}\n </div>\n );\n case 'availability':\n const openHours = formState.availability;\n const timezone = openHours?.[0]?.timezone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;\n const organizer = formState.participants?.find(p => p.is_organizer);\n const organizerEmail = organizer?.email ?? 'primary';\n const selectedCalendars = formState.calendarIds.length > 0 ? formState.calendarIds : [organizerEmail];\n const bookingCalendar = formState.bookingCalendar == 'primary' ? organizerEmail : formState.bookingCalendar;\n return (\n <div key={id}>\n <nylas-booking-calendar-picker\n name=\"booking-calendar\"\n calendars={calendars ?? []}\n defaultBookingCalendar={bookingCalendar}\n exportparts={'nbcp, nbcp__header, nbcp__input-label, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content'}\n />\n <nylas-calendar-picker\n name=\"calendars\"\n calendars={calendars ?? []}\n defaultSelectedCalendars={selectedCalendars}\n organizerEmail={organizerEmail}\n exportparts={'ncp ncp__header, ncp__dropdown, ncp__dropdown-button, ncp__dropdown-content'}\n />\n <nylas-availability-picker\n name=\"availability\"\n openHours={openHours}\n defaultTimezone={timezone}\n exportparts={\n 'nap__header, nap__select-timezone, nap__select-timezone-button, nap__select-timezone-dropdown-content, nap__availability, nap__day, nap__time-ranges, nap__time-range, nap__add-time-range, nap__time-picker-container, nap__time-picker-input, nap__time-picker-times'\n }\n />\n </div>\n );\n case 'bookingOptions':\n return (\n <div key={id}>\n {id == 'new' && <p>Config</p>}\n <nylas-buffer-time\n name=\"buffer-time\"\n buffer={formState.buffer}\n exportparts={\n 'nbt, nbt__header, nbt__body, nbt__dropdown-before, nbt__dropdown-button-before, nbt__dropdown-content-before, nbt__dropdown-after, nbt__dropdown-button-after, nbt__dropdown-content-after, nbt__preview'\n }\n />\n <nylas-custom-booking-flow\n name=\"booking-type\"\n bookingType={formState.bookingType}\n exportparts={'ncbf, ncbf__header, ncbf__dropdown, ncbf__dropdown-button, ncbf__dropdown-content'}\n />\n <nylas-event-limits>\n <div slot=\"inputs\">\n <nylas-limit-future-bookings\n name=\"limit-future-bookings\"\n availableDaysInFuture={formState.availableDaysInFuture}\n exportparts=\"nlfb, nlfb__number-dropdown, nlfb__number-dropdown-button, nlfb__number-dropdown-content, nlfb__period-dropdown, nlfb__period-dropdown-button, nlfb__period-dropdown-content\"\n />\n <nylas-min-cancellation-notice\n name=\"min-cancellation-notice\"\n minCancellationNotice={formState.minCancellationNotice}\n exportparts=\"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content\"\n />\n </div>\n </nylas-event-limits>\n </div>\n );\n }\n}\n","@import '../../../common/styles/variables.scss';\n@import '../../../common/mixins/buttons.scss';\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.scheduler-editor {\n display: flex;\n flex-direction: column;\n .form-contents {\n display: grid;\n grid-template-columns: minmax(224px, 25%) 1fr;\n @media #{$mobile} {\n display: table-column-group;\n }\n .tabs {\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-25);\n .tab {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--nylas-base-900);\n background: var(--nylas-base-0);\n border: none;\n height: 56px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n &:not(:first-of-type) {\n margin-top: 0.25rem;\n }\n &.active {\n font-weight: 600;\n background: var(--nylas-base-0);\n color: var(--nylas-primary);\n border-left: 4px solid var(--nylas-primary);\n box-shadow: 0px 1px 2px 0px #0000000f;\n box-shadow: 0px 1px 3px 0px #0000001a;\n }\n }\n }\n .tab-content {\n max-width: 692px;\n nylas-event-info,\n nylas-event-limits {\n div[slot='inputs'] {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n }\n }\n }\n}\n\n.footer {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 1rem;\n height: 80px;\n padding: 0 1rem;\n border-top: 1px solid var(--nylas-base-200);\n .unsaved-changes {\n color: var(--nylas-base-600);\n }\n .saved-changes {\n color: var(--nylas-success);\n }\n button {\n @include primary-button;\n width: 148px;\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { BookingType, Calendar, Configuration } from '@nylas/core';\nimport { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport TabContents from './tab-contents';\nimport { User } from '@/common/nylas-api-request';\n\ntype SchedulerEventDetail = {\n config: Partial<Configuration>;\n action: 'create' | 'update';\n resetLoadingState?: (e: CustomEvent) => void;\n};\n\n/**\n * The `nylas-editor-tabs` component is a UI component that displays the editor tabs for the scheduler editor.\n * @part nap__title - [nylas-additional-participants] The title of the component.\n * @part nap__subtitle - [nylas-additional-participants] The subtitle of the component.\n * @part nap__content - [nylas-additional-participants] The content of the component.\n * @part nap__input - [nylas-additional-participants] The input of the component.\n * @part nap__remove-participant - [nylas-additional-participants] The remove participant button of the component.\n * @part nap__add-participant - [nylas-additional-participants] The add participant button of the component.\n * @part nap__header - [nylas-availability-picker] The header of the availability picker\n * @part nap__select-timezone - [nylas-availability-picker] The timezone selection container\n * @part nap__select-timezone-button -[nylas-availability-picker] The timezone selection button\n * @part nap__select-timezone-dropdown-content -[nylas-availability-picker] The timezone selection dropdown content\n * @part nap__availability - [nylas-availability-picker] The availability container\n * @part nap__day - [nylas-availability-picker] The day container\n * @part nap__time-ranges - [nylas-availability-picker] The time ranges container\n * @part nap__time-range - [nylas-availability-picker] The time range container\n * @part nap__add-time-range - [nylas-availability-picker] The add time range button\n * @part nap__time-picker-container -[nylas-availability-picker] The time picker container\n * @part nap__time-picker-input - [nylas-availability-picker] The time picker input\n * @part nap__time-picker-times - [nylas-availability-picker] The time picker times\n * @part nbcp - [nylas-booking-calendar-picker] The booking calendar picker container\n * @part nbcp__header - [nylas-booking-calendar-picker] The header of the booking calendar picker\n * @part nbcp__input-label - [nylas-booking-calendar-picker] The input label of the booking calendar picker\n * @part nbcp__dropdown - [nylas-booking-calendar-picker] The dropdown container\n * @part nbcp__dropdown-button - [nylas-booking-calendar-picker] The dropdown button\n * @part nbcp__dropdown-content - [nylas-booking-calendar-picker] The dropdown content\n * @part nbt - [nylas-buffer-time] The buffer time container\n * @part nbt__header - [nylas-buffer-time] The header of the buffer time\n * @part nbt__body - [nylas-buffer-time] The body of the buffer time\n * @part nbt__dropdown-before - [nylas-buffer-time] The before buffer dropdown container\n * @part nbt__dropdown-button-before - [nylas-buffer-time] The before buffer dropdown button\n * @part nbt__dropdown-content-before - [nylas-buffer-time] The before buffer dropdown content\n * @part nbt__dropdown-after - [nylas-buffer-time] The after buffer dropdown container\n * @part nbt__dropdown-button-after - [nylas-buffer-time] The after buffer dropdown button\n * @part nbt__dropdown-content-after - [nylas-buffer-time] The after buffer dropdown content\n * @part nbt__preview - [nylas-buffer-time] The buffer time preview\n * @part ncp - [nylas-calendar-picker] The calendar picker container\n * @part ncp__header - [nylas-calendar-picker] The header of the calendar picker\n * @part ncp__dropdown - [nylas-calendar-picker] The dropdown container\n * @part ncp__dropdown-button - [nylas-calendar-picker] The dropdown button\n * @part ncp__dropdown-content - [nylas-calendar-picker] The dropdown content\n * @part ncbf - [nylas-custom-booking-flow] The custom booking flow container\n * @part ncbf__header - [nylas-custom-booking-flow] The header of the custom booking flow\n * @part ncbf__dropdown - [nylas-custom-booking-flow] The dropdown container\n * @part ncbf__dropdown-button - [nylas-custom-booking-flow] The dropdown button\n * @part ncbf__dropdown-content - [nylas-custom-booking-flow] The dropdown content\n * @part nedesc - [nylas-event-description] The event description container\n * @part nedesc__textarea - [nylas-event-description] The event description textarea\n * @part ned - [nylas-event-duration] The event duration container\n * @part ned__input - [nylas-event-duration] The event duration input\n * @part ned__dropdown - [nylas-event-duration] The event duration dropdown\n * @part ned__dropdown-button - [nylas-event-duration] The event duration dropdown button\n * @part ned__dropdown-content - [nylas-event-duration] The event duration dropdown content\n * @part net - [nylas-event-title] The event title container\n * @part net__title - [nylas-event-title] The event title input\n * @part net__dropdown-content - [nylas-event-title] The token options container\n * @part nlfb - [nylas-limit-future-bookings] The limit future bookings container\n * @part nlfb__number-dropdown - [nylas-limit-future-bookings] The number dropdown container\n * @part nlfb__number-dropdown-button - [nylas-limit-future-bookings] The number dropdown button\n * @part nlfb__number-dropdown-content - [nylas-limit-future-bookings] The number dropdown content\n * @part nlfb__period-dropdown - [nylas-limit-future-bookings] The period dropdown container\n * @part nlfb__period-dropdown-button - [nylas-limit-future-bookings] The period dropdown button\n * @part nlfb__period-dropdown-content - [nylas-limit-future-bookings] The period dropdown content\n * @part nel - [nylas-location-component] The event location container\n * @part nel__location - [nylas-location-component] The event location input\n * @part nel__dropdown - [nylas-location-component] The dropdown container\n * @part nel__dropdown-button - [nylas-location-component] The dropdown button\n * @part nel__dropdown-content - [nylas-location-component] The dropdown content\n * @part nmcn - [nylas-min-cancellation-notice] The minimum cancellation notice container\n * @part nmcn__number-dropdown - [nylas-min-cancellation-notice] The number dropdown container\n * @part nmcn__number-dropdown-button - [nylas-min-cancellation-notice] The number dropdown button\n * @part nmcn__number-dropdown-content - [nylas-min-cancellation-notice] The number dropdown content\n * @part nmcn__period-dropdown - [nylas-min-cancellation-notice] The period dropdown container\n * @part nmcn__period-dropdown-button - [nylas-min-cancellation-notice] The period dropdown button\n * @part nmcn__period-dropdown-content - [nylas-min-cancellation-notice] The period dropdown content\n */\n@Component({\n tag: 'nylas-editor-tabs',\n styleUrl: 'nylas-editor-tabs.scss',\n scoped: true,\n})\nexport class NylasEditorTabs {\n private formRef!: HTMLFormElement;\n @Prop() calendars?: Calendar[];\n @Prop() config?: Configuration;\n @Prop() currentUser?: User;\n @State() action: 'create' | 'update' = 'create';\n @State() activeTab: string = 'eventInfo';\n @State() isLoading: boolean = false;\n @State() hasUnsavedChanges: boolean = false;\n @State() changesSaved: boolean = false;\n @State() formState: Partial<{\n title: string;\n description: string;\n duration: string;\n availability?: any;\n calendarIds: string[];\n participants?: any[];\n bookingCalendar?: string;\n location?: string;\n bookingType?: string;\n buffer?: { before: number; after: number };\n availableDaysInFuture?: number;\n minCancellationNotice?: number;\n }> = {};\n\n @Event() schedulerConfigChanged!: EventEmitter<SchedulerEventDetail>;\n\n @Watch('config')\n configChangedHandler(newConfig: Configuration) {\n debug('[nylas-editor-tabs]', 'configChangedHandler', newConfig, this.config);\n this.formState = {\n ...this.getFormStateFromConfig(newConfig),\n };\n\n if (newConfig.id) {\n this.action = 'update';\n } else {\n this.action = 'create';\n }\n }\n\n connectedCallback() {\n debug('[nylas-editor-tabs]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-editor-tabs]', 'componentWillLoad');\n this.formState = this.getFormStateFromConfig(this.config);\n }\n\n componentDidLoad() {\n debug('[nylas-editor-tabs]', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('[nylas-editor-tabs]', 'disconnectedCallback');\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n this.formState = { ...this.formState, [event.detail.name]: event.detail.value };\n this.hasUnsavedChanges = true;\n }\n\n getFormStateFromConfig(config?: Configuration) {\n const organizerParticipant = config?.participants?.find(p => p.is_organizer);\n return {\n title: config?.event_booking?.title ?? '',\n description: config?.event_booking?.description ?? '',\n duration: config?.availability?.duration_minutes?.toString() ?? '10',\n availability: organizerParticipant?.availability?.open_hours ?? undefined,\n calendarIds: organizerParticipant?.availability?.calendar_ids ?? [],\n participants: config?.participants ?? [],\n bookingCalendar: organizerParticipant?.booking?.calendar_id ?? organizerParticipant?.email ?? '',\n location: this.config?.event_booking?.location ?? '',\n bookingType: this.config?.event_booking?.booking_type ?? 'booking',\n buffer: this.config?.availability?.availability_rules?.buffer ?? { before: 0, after: 0 },\n availableDaysInFuture: this.config?.scheduler?.available_days_in_future ?? 30,\n minCancellationNotice: this.config?.scheduler?.min_cancellation_notice ?? 0,\n };\n }\n\n updateFormState() {\n const formData = new FormData(this.formRef);\n formData.forEach((value, key) => {\n switch (key) {\n case 'title':\n this.formState.title = value.toString();\n break;\n case 'description':\n this.formState.description = value.toString();\n break;\n case 'duration':\n this.formState.duration = value.toString();\n break;\n case 'availability':\n this.formState.availability = JSON.parse(value.toString());\n break;\n case 'participants':\n this.formState.participants = JSON.parse(value.toString());\n break;\n case 'calendars':\n this.formState.calendarIds = value.toString().split(',');\n break;\n case 'booking-calendar':\n this.formState.bookingCalendar = value.toString();\n break;\n case 'location':\n this.formState.location = value.toString();\n break;\n case 'booking-type':\n this.formState.bookingType = value.toString();\n break;\n case 'buffer-time':\n this.formState.buffer = JSON.parse(value.toString());\n break;\n case 'limit-future-bookings':\n this.formState.availableDaysInFuture = parseInt(value.toString());\n break;\n case 'min-cancellation-notice':\n this.formState.minCancellationNotice = parseInt(value.toString());\n break;\n }\n });\n this.formState = { ...this.formState };\n }\n\n setActiveTab(e: Event, tabName: string) {\n e.preventDefault();\n this.updateFormState();\n this.activeTab = tabName;\n }\n\n formSubmissionHandler = async (event: Event) => {\n event.preventDefault();\n this.isLoading = true;\n this.hasUnsavedChanges = false;\n this.updateFormState();\n const { title, description, duration, availability, calendarIds, bookingCalendar, location, bookingType, buffer, availableDaysInFuture, minCancellationNotice } =\n this.formState;\n\n const organizer = this.config?.participants?.find(p => p.is_organizer);\n\n const configObject: Partial<Configuration> = {\n ...(this.config?.id && { id: this.config.id }),\n version: this.config?.version ?? '1.0.0',\n availability: {\n duration_minutes: duration ? parseInt(duration) : 0,\n availability_rules: {\n availability_method: this.config?.availability?.availability_rules?.availability_method ?? 'collective',\n buffer: buffer || { before: 0, after: 0 },\n default_open_hours: this.config?.availability?.availability_rules?.default_open_hours ?? [],\n round_robin_group_id: this.config?.availability?.availability_rules?.round_robin_group_id ?? '',\n },\n },\n participants: [\n {\n name: organizer?.name ?? organizer?.email ?? this.currentUser?.name ?? this.currentUser?.email ?? '',\n email: organizer?.email ?? this.currentUser?.email ?? '',\n is_organizer: true,\n availability: {\n calendar_ids: calendarIds?.length ? calendarIds : ['primary'],\n open_hours: availability ?? [],\n },\n booking: {\n calendar_id: bookingCalendar && bookingCalendar !== '' ? bookingCalendar : 'primary',\n },\n },\n ],\n event_booking: {\n title: title?.toString() ?? '',\n description: description?.toString() ?? '',\n location: location?.toString() ?? '',\n booking_type: (bookingType?.toString() as BookingType) ?? 'booking',\n },\n scheduler: {\n available_days_in_future: availableDaysInFuture ?? 30,\n min_cancellation_notice: minCancellationNotice ?? 0,\n },\n };\n const resetLoadingState = (_e: CustomEvent) => {\n this.isLoading = false;\n this.changesSaved = true;\n setTimeout(() => {\n this.changesSaved = false;\n }, 5000);\n };\n this.schedulerConfigChanged.emit({ config: configObject, resetLoadingState, action: this.action });\n };\n\n @RegisterComponent<NylasEditorTabs, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-editor-tabs',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.config', 'config'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ]),\n eventToProps: {\n schedulerConfigChanged: async (event: CustomEvent<SchedulerEventDetail>, nylasSchedulerConfigConnector: NylasSchedulerConfigConnector) => {\n const { resetLoadingState, action, config } = event.detail;\n if (resetLoadingState) {\n resetLoadingState(event);\n }\n\n // If we have an ID, we are updating an existing configuration\n if (action === 'update') {\n await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);\n } else {\n await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n debug('[nylas-editor-tabs]', 'render', this.formState);\n return (\n <Host>\n <form onSubmit={this.formSubmissionHandler} class=\"scheduler-editor\" ref={el => (this.formRef = el as HTMLFormElement)}>\n <div class=\"form-contents\">\n <div class=\"tabs\">\n <button class={{ tab: true, active: this.activeTab == 'eventInfo' }} onClick={e => this.setActiveTab(e, 'eventInfo')}>\n <calendar-info-icon width=\"16\" height=\"16\" />\n Event Info\n </button>\n <button class={{ tab: true, active: this.activeTab == 'availability' }} onClick={e => this.setActiveTab(e, 'availability')}>\n <calendar-patterns-icon width=\"16\" height=\"16\" />\n Availability\n </button>\n <button class={{ tab: true, active: this.activeTab == 'bookingOptions' }} onClick={e => this.setActiveTab(e, 'bookingOptions')}>\n <flow-icon width=\"16\" height=\"16\" />\n Booking Options\n </button>\n </div>\n <div class=\"tab-content\">\n <TabContents formState={this.formState} activeTab={this.activeTab} calendars={this.calendars} id={this.config?.id ?? 'new'} />\n </div>\n </div>\n <div class=\"footer\">\n <p\n class={{\n 'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,\n 'saved-changes': this.changesSaved,\n }}\n >\n {this.hasUnsavedChanges && !this.changesSaved ? 'Unsaved changes' : this.changesSaved ? 'Changes saved!' : ''}\n </p>\n <button-component type=\"submit\" disabled={this.isLoading}>\n {this.isLoading ? (\n <span>\n Saving\n <loading-icon />{' '}\n </span>\n ) : this.action == 'create' ? (\n 'Create'\n ) : (\n 'Save changes'\n )}\n </button-component>\n </div>\n </form>\n </Host>\n );\n }\n}\n"],"mappings":"yJAAA,MAAMA,EAAU,uCAChB,MAAAC,EAAeD,E,MCMFE,EAAc,M,oCACD,K,YACC,I,CAEzB,MAAAC,GAEE,OACEC,EAAA,OAAAC,IAAA,2CAAKC,MAAOC,KAAKD,MAAOE,OAAQD,KAAKC,OAAQC,QAAQ,YAAYC,KAAK,OAAOC,MAAM,8BACjFP,EAAA,KAAAC,IAAA,uDAAa,yBACXD,EAAA,QAAAC,IAAA,2CACEO,EAAE,iKACFF,KAAK,YAEPN,EAAA,QAAAC,IAAA,2CACEO,EAAE,gMACFF,KAAK,YAEPN,EAAA,QAAAC,IAAA,2CACEO,EAAE,+OACFF,K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oBpF,KAAKoF,aAAe,iBAAmB,IAE7GvF,EAAA,oBAAAC,IAAA,2CAAkB0H,KAAK,SAASC,SAAUzH,KAAK0D,WAC5C1D,KAAK0D,UACJ7D,EAAA,qBAEEA,EAAA,qBAAiB,KAEjBG,KAAKwF,QAAU,SAAQ,SACjB,kB,iEAxCtBkC,EAAA,CAxBCC,EAAsH,CACrHrG,KAAM,oBACNsG,aAAc,IAAIC,IAAI,CACpB,CAAC,4BAA6B,aAC9B,CAAC,yBAA0B,UAC3B,CAAC,8BAA+B,iBAElCC,aAAc,CACZxC,uBAAwB/B,MAAOC,EAA0CuE,KACvE,MAAM7C,kBAAEA,EAAiBM,OAAEA,EAAM3B,OAAEA,GAAWL,EAAM0C,OACpD,GAAIhB,EAAmB,CACrBA,EAAkB1B,E,CAIpB,GAAIgC,IAAW,SAAU,OACjBuC,EAA8BC,gBAAgBC,oBAAoBpE,E,KACnE,OACCkE,EAA8BC,gBAAgBE,oBAAoBrE,E,IAI9EsE,kBAAmB,O"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as n,H as s}from"./p-68c2fadf.js";import{R as a}from"./p-408dda49.js";import{d as c}from"./p-901f9612.js";import"./p-cb65c223.js";const r=":host{display:block}sp-search{width:100%;border:0}";const o=r;var i=undefined&&undefined.__decorate||function(e,t,n,s){var a=arguments.length,c=a<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,n):s,r;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")c=Reflect.decorate(e,t,n,s);else for(var o=e.length-1;o>=0;o--)if(r=e[o])c=(a<3?r(c):a>3?r(t,n,c):r(t,n))||c;return a>3&&c&&Object.defineProperty(t,n,c),c};var d=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const f=class{constructor(n){e(this,n);this.search=t(this,"search",7);this.onSearch=async e=>{e.preventDefault();e.stopPropagation();const t=e.target;const n=t.value;if(n===this.internalQuery){return}this.internalQuery=n;this.search.emit(this.internalQuery)};this.query="";this.internalQuery=""}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){c(`[nylas-threads-search] Component will load`)}async componentDidLoad(){c(`[nylas-threads-search] Component did load`)}onQueryChange(){this.internalQuery=this.query}render(){return n(s,{key:"4273fc9982039d507cadbc07c36b1eb67fa1c087"},n("sp-theme",{key:"a78cf6506d82e5cfd91ecbacccb1580be3693c89",scale:"medium",color:"dark"},n("sp-search",{key:"1ca66aa0b045344ab4fdf003681923a389980c29",quiet:true,onSubmit:this.onSearch,onBlur:this.onSearch,value:this.internalQuery})))}static get watchers(){return{query:["onQueryChange"]}}};i([a({name:"nylas-pagination",stateToProps:new Map([["mailbox.searchQuery","query"]]),eventToProps:{search:async(e,t)=>{await t.threads.getThreads({search_query_native:e.detail||undefined,page_token:undefined})}},fireRegisterEvent:true}),d("design:type",Function),d("design:paramtypes",[]),d("design:returntype",void 0)],f.prototype,"render",null);f.style=o;export{f as nylas_threads_search};
|
|
2
|
-
//# sourceMappingURL=p-f48d0571.entry.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-68c2fadf.js";const s=".sc-bold-icon-h{display:flex}";const o=s;const i=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"9514a0bbbaf18a7dc73b2bd789efcfc09f6017f6",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"d9997f022df2cdcd7128866d61872717073e8adf",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"}))}};i.style=o;const n=".sc-italic-icon-h{display:flex}";const r=n;const c=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"bf8f15ab9e1facc02a4357479916a55e95be4043",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"7363a3d092b14ed99ba96510eae0e77b0718ca52",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m10 20 4-16m2 0h-4m0 16H8"}))}};c.style=r;const d=".sc-underline-icon-h{display:flex}";const h=d;const a=class{constructor(e){t(this,e);this.width="15";this.height="15"}render(){return e("svg",{key:"5e0070c733a6b740a5d0dc27e52bb12a2526479d",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{key:"ed960c7122816d4c3eed1f7d1955c797e31c7531",d:"M19 4V10C19 13.866 15.866 17 12 17C8.13401 17 5 13.866 5 10V4M8.5 4V10C8.5 13.2218 10.6766 15.9352 13.6395 16.7501M4 21H20M3 4L10.5 4M17 4L21 4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};a.style=h;export{i as bold_icon,c as italic_icon,a as underline_icon};
|
|
2
|
-
//# sourceMappingURL=p-fbbca7a6.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"register-component-0645dce0.js","mappings":";;;SAiBgB,oBAAoB,CAClC,QAAW,EACX,mBAA8C,EAC9C,YAAoB,mBAAmB;IAEvC,OAAO,IAAI,WAAW,CAA0C,SAAS,EAAE;QACzE,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,mBAAmB;KAC5B,CAAC,CAAC;AACL,CAAC;SAEe,wBAAwB,CACtC,QAAW,EACX,mBAA8C,EAC9C,YAAoB,qBAAqB;IAEzC,OAAO,IAAI,WAAW,CAA0C,SAAS,EAAE;QACzE,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,mBAAmB;KAC5B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,OAAO,EAAE,IAAI;oBACb,GAAG,MAAM;oBACT,YAAY,EAAE,eAAe;iBAC9B,CAAC;gBACF,MAAM,KAAK,GAAG,wBAAwB,CAAC,MAAM,EAAE,mBAAmB,EAAE,MAAM,CAAC,uBAAuB,CAAC,CAAC;gBACpG,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE;oBAC7B,KAAK,CAAC,IAAI,aAAa,eAAe,aAAa,0CAA0C,CAAC,CAAC;iBAChG;gBAED,OAAO,eAAe,CAAC;aACxB,CAAC;SACH;KACF,CAAC;AACJ;;;;","names":[],"sources":["src/common/register-component.ts"],"sourcesContent":["import { BaseNylasConnectorInterface } from '@/connector/connector-interface';\nimport { debug, error } from '@/utils/utils';\nimport { ComponentInterface, getElement } from '@stencil/core';\nimport { CombinedStoreStateKeys, EventEmitterEventType, ExtractEventEmitterKeys, ExtractEventEmitterProperties } from './types';\nexport interface RegisteredComponent<H extends ComponentInterface, B extends BaseNylasConnectorInterface, MailboxStores = string> {\n name: string;\n element: HTMLElement;\n getStoresToProp?: keyof H;\n storeToProps?: Map<string, keyof H>;\n stateToProps?: Map<MailboxStores, keyof H>;\n eventToProps?: Map<ExtractEventEmitterKeys<H>, (event: CustomEvent<EventEmitterEventType<H[ExtractEventEmitterKeys<H>]>>, nylasConnector: B) => Promise<void>>;\n authToProp?: keyof H;\n connectorToProp?: keyof H;\n registrationEventName?: string;\n unregistrationEventName?: string;\n}\n\nexport function createComponentEvent<T extends ComponentInterface, B extends BaseNylasConnectorInterface>(\n instance: T,\n registeredComponent: RegisteredComponent<T, B>,\n eventName: string = 'registerComponent',\n) {\n return new CustomEvent<RegisteredComponent<typeof instance, B>>(eventName, {\n bubbles: true,\n composed: true,\n detail: registeredComponent,\n });\n}\n\nexport function unregisterComponentEvent<T extends ComponentInterface, B extends BaseNylasConnectorInterface>(\n instance: T,\n registeredComponent: RegisteredComponent<T, B>,\n eventName: string = 'unregisterComponent',\n) {\n return new CustomEvent<RegisteredComponent<typeof instance, B>>(eventName, {\n bubbles: true,\n composed: true,\n detail: registeredComponent,\n });\n}\n\nexport interface RegisterComponentConfig<H extends ComponentInterface, B extends BaseNylasConnectorInterface, MailboxStores>\n extends Omit<RegisteredComponent<H, B, MailboxStores>, 'eventToProps' | 'name' | 'element'> {\n name: string;\n eventToProps?: Partial<{\n [P in ExtractEventEmitterProperties<H> as P['key']]: (event: CustomEvent<P['eventType']>, nylasConnector: B) => Promise<void>;\n }>;\n fireRegisterEvent?: boolean;\n}\n\nexport interface NylasComponentInterface extends ComponentInterface {\n authToProp?: keyof this;\n connectorToProp?: keyof this;\n}\n\nexport function RegisterComponent<H extends NylasComponentInterface, B extends BaseNylasConnectorInterface, MailboxStores extends Record<string, any>>(\n config: RegisterComponentConfig<H, B, CombinedStoreStateKeys<keyof MailboxStores, MailboxStores>>,\n) {\n return (target: H, propKey: string) => {\n const componentName = config.name;\n debug(`[${componentName}] Registering component ${componentName} being called on ${propKey}`);\n\n const origionalCallback = target.componentWillLoad;\n if (!origionalCallback) {\n error(`[${componentName}] componentWillLoad lifecycle method in ${componentName} missing. Required for RegisterComponent decorator.`);\n return;\n }\n\n const origionalConnectCallback = target.connectedCallback;\n if (!origionalConnectCallback) {\n error(`[${componentName}] connectedCallback lifecycle method in ${componentName} missing. Required for RegisterComponent decorator.`);\n return;\n }\n\n const origionalDisconnectCallback = target.disconnectedCallback;\n if (!origionalDisconnectCallback) {\n error(`[${componentName}] disconnectedCallback lifecycle method in ${componentName} missing. Required for RegisterComponent decorator.`);\n return;\n }\n\n // Detect a conflict if config.storeToProps and config.stateToProps are both defined\n // for overlapping prop keys\n if (config.storeToProps && config.stateToProps) {\n const storeToPropsKeys = Array.from(config.storeToProps.values());\n const stateToPropsKeys = Array.from(config.stateToProps.values());\n const intersection = storeToPropsKeys.filter(key => stateToPropsKeys.includes(key));\n if (intersection.length > 0) {\n error(\n `[${componentName}] Overlapping prop keys detected in ${componentName} for storeToProps and stateToProps. Make sure to only define them once. Overlapping keys: ${intersection.join(\n ', ',\n )}`,\n );\n return;\n }\n }\n\n // Convert the record of eventToProps to a map\n const eventToPropsMap = new Map<ExtractEventEmitterKeys<H>, (event: CustomEvent<EventEmitterEventType<H[ExtractEventEmitterKeys<H>]>>, nylasConnector: B) => Promise<void>>();\n if (config.eventToProps) {\n Object.keys(config.eventToProps).forEach(key => {\n eventToPropsMap.set(\n key as ExtractEventEmitterKeys<H>,\n config.eventToProps?.[key as ExtractEventEmitterKeys<H>] as (\n event: CustomEvent<EventEmitterEventType<H[ExtractEventEmitterKeys<H>]>>,\n nylasConnector: B,\n ) => Promise<void>,\n );\n });\n }\n\n target.connectedCallback = function () {\n debug(`[~${componentName}] connectedCallback called`);\n const origionalResult = origionalConnectCallback?.call(this);\n const host = getElement(this);\n\n // If the nylas id is already set, then we don't need to do anything\n if (host.dataset.nylasId) {\n return origionalResult;\n }\n\n Object.defineProperty(host, 'registerNylasComponent', {\n get() {\n return true;\n },\n enumerable: true,\n });\n Object.defineProperty(host, 'stateToProps', {\n get() {\n return config.stateToProps;\n },\n enumerable: true,\n });\n Object.defineProperty(host, 'getStoresToProp', {\n get() {\n return config.getStoresToProp;\n },\n enumerable: true,\n });\n Object.defineProperty(host, 'storeToProps', {\n get() {\n return config.storeToProps;\n },\n enumerable: true,\n });\n Object.defineProperty(host, 'eventToProps', {\n get() {\n return eventToPropsMap;\n },\n enumerable: true,\n });\n Object.defineProperty(host, 'authToProp', {\n get() {\n return config.authToProp;\n },\n enumerable: true,\n });\n Object.defineProperty(host, 'connectorToProp', {\n get() {\n return config.connectorToProp;\n },\n enumerable: true,\n });\n return origionalResult;\n };\n\n if (config.fireRegisterEvent) {\n target.componentWillLoad = function () {\n const origionalResult = origionalCallback?.call(this);\n const host = getElement(this);\n\n // We use our host element to dispatch a registration event that is picked up by the\n // the nylas-provider component.\n const registeredComponent: RegisteredComponent<H, B> = {\n element: host,\n ...config,\n eventToProps: eventToPropsMap,\n };\n const event = createComponentEvent(target, registeredComponent, config.registrationEventName);\n if (host.dispatchEvent(event)) {\n debug(`[${componentName}] Component ${componentName} successfully fired registration event`);\n }\n\n return origionalResult;\n };\n\n target.disconnectedCallback = function () {\n const origionalResult = origionalDisconnectCallback?.call(this);\n const host = getElement(this);\n\n // We use our host element to dispatch a registration event that is picked up by the\n // the nylas-provider component.\n const registeredComponent: RegisteredComponent<H, B> = {\n element: host,\n ...config,\n eventToProps: eventToPropsMap,\n };\n const event = unregisterComponentEvent(target, registeredComponent, config.unregistrationEventName);\n if (host.dispatchEvent(event)) {\n debug(`[${componentName}] Component ${componentName} successfully fired unregistration event`);\n }\n\n return origionalResult;\n };\n }\n };\n}\n"],"version":3}
|