@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 +1 @@
|
|
|
1
|
-
{"file":"nylas-logo2.js","mappings":";;AAAA,MAAM,OAAO,GAAG,gCAAgC;;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AAsB,IACjC,6DACE,CAAC,EAAC,ysBAAysB,EAC3sB,IAAI,EAAC,cAAc,GACnB,EACF,6DACE,CAAC,EAAC,q7BAAq7B,EACv7B,IAAI,EAAC,cAAc,GACnB,EACF,6DACE,CAAC,EAAC,8XAA8X,EAChY,IAAI,EAAC,cAAc,GACnB,EACF,6DACE,CAAC,EAAC,yzEAAyzE,EAC3zE,IAAI,EAAC,cAAc,GACnB,EACF,6DACE,CAAC,EAAC,mQAAmQ,EACrQ,IAAI,EAAC,cAAc,GACnB,EACF,6DACE,CAAC,EAAC,ucAAuc,EACzc,IAAI,EAAC,cAAc,GACnB,EACF,6DACE,CAAC,EAAC,oJAAoJ,EACtJ,IAAI,EAAC,cAAc,GACnB,EACF,6DACE,CAAC,EAAC,2aAA2a,EAC7a,IAAI,EAAC,cAAc,GACnB,CACA,EACJ,+DACE,iEAAU,EAAE,EAAC,gBAAgB,IAC3B,6DAAM,KAAK,EAAC,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,8BAA8B,GAAG,CACtF,CACN,CACH,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/common/icons/icon.css?tag=nylas-logo&encapsulation=scoped","src/common/icons/nylas-logo.tsx"],"sourcesContent":[":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'nylas-logo',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class NylasLogo {\n @Prop() width: string = '69';\n @Prop() height: string = '24';\n\n render() {\n return (\n <svg width={this.width} height={this.height} viewBox=\"0 0 69 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_455_3543)\">\n <path\n 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\"\n fill=\"currentColor\"\n />\n <path\n 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\"\n fill=\"currentColor\"\n />\n <path\n 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\"\n fill=\"currentColor\"\n />\n <path\n 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\"\n fill=\"currentColor\"\n />\n <path\n 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\"\n fill=\"currentColor\"\n />\n <path\n 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\"\n fill=\"currentColor\"\n />\n <path\n 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\"\n fill=\"currentColor\"\n />\n <path\n 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\"\n fill=\"currentColor\"\n />\n </g>\n <defs>\n <clipPath id=\"clip0_455_3543\">\n <rect width=\"68.7123\" height=\"19.2877\" fill=\"white\" transform=\"translate(0.144043 0.356201)\" />\n </clipPath>\n </defs>\n </svg>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { R as RegisterComponent } from './register-component.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as debug } from './utils.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './chevron.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './refresh.js';
|
|
6
6
|
|
|
@@ -165,7 +165,6 @@ function defineCustomElement$1() {
|
|
|
165
165
|
break;
|
|
166
166
|
} });
|
|
167
167
|
}
|
|
168
|
-
defineCustomElement$1(NylasMailboxPagination$1);
|
|
169
168
|
|
|
170
169
|
const NylasMailboxPagination = NylasMailboxPagination$1;
|
|
171
170
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nylas-mailbox-pagination.js","mappings":";;;;;;AAAA,MAAM,yBAAyB,GAAG,y3BAAy3B;;;;;;;;;;;;;;;;MCe94BA,wBAAsB;IAmDjC;;;;;;qBA1C+C,OAAO;2BAKvB,KAAK;+BAKD,KAAK;4BAKK,WAAW;wCAKZ,IAAI;mCAKV,GAAG;QAkBvC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACxC,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3E,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACpE;IAED,iBAAiB;QACf,KAAK,CAAC,wCAAwC,CAAC,CAAC;KACjD;IAED,MAAM,iBAAiB;QACrB,KAAK,CAAC,wCAAwC,CAAC,CAAC;KACjD;IAED,MAAM,gBAAgB;QACpB,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC/C,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;SAC9E;KAC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mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.scss?tag=nylas-mailbox-pagination&encapsulation=shadow","src/components/mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.tsx"],"sourcesContent":[":host {\n display: contents;\n}\n\n.container {\n height: var(--container-height, 100dvh);\n overflow-y: var(--container-overflow-y, auto);\n}\n\n.pagination {\n display: flex;\n justify-content: center;\n align-items: center;\n margin: 0 auto;\n padding: 0;\n list-style: none;\n font-size: 0.875rem;\n font-weight: 600;\n color: var(--nylas-color-primary-600);\n\n sp-button {\n svg {\n animation: rotate 1s linear infinite;\n }\n }\n}\n\nsp-button {\n border-radius: var(--nylas-border-radius);\n background-color: var(--nylas-color-primary-400);\n color: var(--nylas-color-primary-900);\n fill: var(--nylas-color-primary-900);\n\n &:hover {\n background-color: var(--nylas-color-primary-500);\n }\n\n &:disabled {\n background-color: var(--nylas-color-primary-200);\n color: var(--nylas-color-primary-600);\n cursor: not-allowed;\n }\n\n chevron-icon {\n svg {\n width: 15px;\n height: 15px;\n }\n }\n}\n\n.next {\n chevron-icon {\n transform: rotate(180deg);\n }\n}\n\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { debug } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, h } from '@stencil/core';\nimport { NylasMailboxConnector } from '../../..';\nimport { NylasMailbox } from '../nylas-mailbox/nylas-mailbox';\n\nexport type PaginationEvent = {\n hasChildren: boolean;\n};\n\n@Component({\n tag: 'nylas-mailbox-pagination',\n styleUrl: 'nylas-mailbox-pagination.scss',\n shadow: true,\n})\nexport class NylasMailboxPagination {\n /**\n * @description The host element\n */\n @Element() host!: HTMLNylasMailboxPaginationElement;\n\n /**\n * @description The state of the mailbox\n */\n @Prop() state: 'ready' | 'loading' | 'error' = 'ready';\n\n /**\n * @description Whether or not the mailbox has a next or previous page of threads\n */\n @Prop() hasNextPage: boolean = false;\n\n /**\n * @description Whether or not the mailbox has a previous page of threads\n */\n @Prop() hasPreviousPage: boolean = false;\n\n /**\n * @description Whether or not the mailbox has a next or previous page of threads\n */\n @Prop() scrollTarget: 'container' | 'page' = 'container';\n\n /**\n * @description Whether or not the infinity scroll should only be enabled on mobile devices\n */\n @Prop() mobileOnlyInfiniteScroll: boolean = true;\n\n /**\n * @description The width of the mobile viewport\n */\n @Prop() mobileViewPortWidth: number = 768;\n\n /**\n * @description An event that is fired when the user scrolls to the bottom of the page\n */\n @Event() next!: EventEmitter<PaginationEvent>;\n\n /**\n * @description An event that is fired when the user scrolls to the top of the page\n */\n @Event() previous!: EventEmitter<PaginationEvent>;\n\n /**\n * @description The container element\n */\n private containerElement?: HTMLDivElement;\n\n constructor() {\n debug(`[nylas-pagination] Constructed`);\n this.isScrollAtContainerBottom = this.isScrollAtContainerBottom.bind(this);\n this.isScrollAtPageBottom = this.isScrollAtPageBottom.bind(this);\n this.nextPage = this.nextPage.bind(this);\n this.previousPage = this.previousPage.bind(this);\n this.handlePageScroll = this.handlePageScroll.bind(this);\n this.handleContainerScroll = this.handleContainerScroll.bind(this);\n }\n\n connectedCallback() {\n debug(`[nylas-pagination] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-pagination] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-pagination] Component did load`);\n if (this.containerElement) {\n this.containerElement.addEventListener('scroll', this.handleContainerScroll);\n }\n }\n\n async componentWillRender() {\n debug(`[nylas-pagination] Component will render`);\n }\n\n disconnectedCallback() {\n debug(`[nylas-pagination] Component disconnected`);\n if (this.containerElement) {\n this.containerElement.removeEventListener('scroll', this.handleContainerScroll);\n }\n }\n\n /**\n * @description Listen for scroll events and fire the next page event when the user scrolls to the bottom of the page\n * @param _event An event that is fired when the user scrolls\n */\n @Listen('scroll', { target: 'window' })\n public handlePageScroll(_event: Event) {\n if (this.isScrollAtPageBottom() && this.canScroll && this.scrollTarget === 'page') {\n this.nextPage();\n }\n }\n\n /**\n * @description Go to the next page of threads\n */\n @Method()\n public async nextPage() {\n const hasChildren = this.host.children.length > 0;\n this.next.emit({\n hasChildren,\n });\n }\n\n /**\n * @description Go to the previous page of threads\n */\n @Method()\n public async previousPage() {\n const hasChildren = this.host.children.length > 0;\n this.previous.emit({\n hasChildren,\n });\n }\n\n /**\n * @description Handle the scroll event\n * @param event An event that is fired when the user scrolls\n */\n private handleContainerScroll(_event: Event) {\n if (this.isScrollAtContainerBottom() && this.canScroll && this.scrollTarget === 'container') {\n this.nextPage();\n }\n }\n\n /**\n * @description Check if the user has scrolled to the bottom of the page\n */\n private isScrollAtContainerBottom() {\n if (!this.containerElement) {\n return false;\n }\n return this.containerElement && this.containerElement.scrollTop + this.containerElement.clientHeight >= this.containerElement.scrollHeight;\n }\n\n /**\n * @description Check if the user has scrolled to the bottom of the page\n */\n private isScrollAtPageBottom() {\n return window.innerHeight + window.scrollY >= document.body.offsetHeight;\n }\n\n /**\n * @description Check if the user can scroll to the next page\n * @returns boolean\n */\n private get canScroll() {\n const hasChildren = this.host.children.length > 0;\n return this.state === 'ready' && hasChildren && (!this.mobileOnlyInfiniteScroll || window.innerWidth < this.mobileViewPortWidth);\n }\n\n @RegisterComponent<NylasMailboxPagination, NylasMailboxConnector, Exclude<NylasMailbox['stores'], undefined>>({\n name: 'nylas-pagination',\n stateToProps: new Map([\n ['mailbox.hasNextThreadPage', 'hasNextPage'],\n ['mailbox.hasPreviousThreadPage', 'hasPreviousPage'],\n ['mailbox.state', 'state'],\n ]),\n eventToProps: {\n next: async (event: CustomEvent<PaginationEvent>, nylasConnector: NylasMailboxConnector) => {\n debug(`[nylas-pagination] Next page event fired`);\n const { hasChildren } = event.detail;\n await nylasConnector.threads.nextThreadPage(hasChildren ? 'append' : 'overwrite', !hasChildren);\n },\n previous: async (event: CustomEvent<PaginationEvent>, nylasConnector: NylasMailboxConnector) => {\n debug(`[nylas-pagination] Previous page event fired`);\n const { hasChildren } = event.detail;\n await nylasConnector.threads.previousThreadPage(hasChildren ? 'append' : 'overwrite', !hasChildren);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const hasChildren = this.host.children.length > 0;\n if (hasChildren) {\n return (\n <Host>\n <div class=\"container\" ref={r => (this.containerElement = r)}>\n <slot></slot>\n {this.canScroll && (\n <div class={'pagination'}>\n <sp-theme scale=\"medium\" color=\"dark\">\n {this.state === 'ready' && this.hasNextPage && (\n <sp-button onClick={this.nextPage}>\n <div slot=\"icon\">\n <refresh-icon class={'refres-icon'} />\n </div>{' '}\n Load more...\n </sp-button>\n )}\n </sp-theme>\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n return (\n <Host>\n <sp-theme scale=\"medium\" color=\"dark\">\n {this.hasPreviousPage && (\n <sp-button class={'previous'} parr=\"previous\" onClick={this.previousPage}>\n <div slot=\"icon\">\n <chevron-icon class={'previous-icon'} />\n </div>{' '}\n Previous\n </sp-button>\n )}\n {this.hasPreviousPage && this.hasNextPage && ' '}\n {this.hasNextPage && (\n <sp-button class={'next'} parr=\"next\" onClick={this.nextPage}>\n <div slot=\"icon\">\n <chevron-icon class={'next-icon'} />\n </div>{' '}\n Next\n </sp-button>\n )}\n </sp-theme>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"nylas-mailbox-pagination.js","mappings":";;;;;;AAAA,MAAM,yBAAyB,GAAG,y3BAAy3B;;;;;;;;;;;;;;;;MCe94BA,wBAAsB;IAmDjC;;;;;;qBA1C+C,OAAO;2BAKvB,KAAK;+BAKD,KAAK;4BAKK,WAAW;wCAKZ,IAAI;mCAKV,GAAG;QAkBvC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACxC,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3E,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjE,IAAI,CAAC,QAAQ,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E;YACZ,IAAI,EAAE,OAAO,KAAmC,EAAE,cAAqC;gBACrF,KAAK,CAAC,0CAA0C,CAAC,CAAC;gBAClD,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBACrC,MAAM,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,WAAW,GAAG,QAAQ,GAAG,WAAW,EAAE,CAAC,WAAW,CAAC,CAAC;aACjG;YACD,QAAQ,EAAE,OAAO,KAAmC,EAAE,cAAqC;gBACzF,KAAK,CAAC,8CAA8C,CAAC,CAAC;gBACtD,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;gBACrC,MAAM,cAAc,CAAC,OAAO,CAAC,kBAAkB,CAAC,WAAW,GAAG,QAAQ,GAAG,WAAW,EAAE,CAAC,WAAW,CAAC,CAAC;aACrG;SACF;QACD,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;sDAkDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NylasMailboxPagination"],"sources":["src/components/mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.scss?tag=nylas-mailbox-pagination&encapsulation=shadow","src/components/mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.tsx"],"sourcesContent":[":host {\n display: contents;\n}\n\n.container {\n height: var(--container-height, 100dvh);\n overflow-y: var(--container-overflow-y, auto);\n}\n\n.pagination {\n display: flex;\n justify-content: center;\n align-items: center;\n margin: 0 auto;\n padding: 0;\n list-style: none;\n font-size: 0.875rem;\n font-weight: 600;\n color: var(--nylas-color-primary-600);\n\n sp-button {\n svg {\n animation: rotate 1s linear infinite;\n }\n }\n}\n\nsp-button {\n border-radius: var(--nylas-border-radius);\n background-color: var(--nylas-color-primary-400);\n color: var(--nylas-color-primary-900);\n fill: var(--nylas-color-primary-900);\n\n &:hover {\n background-color: var(--nylas-color-primary-500);\n }\n\n &:disabled {\n background-color: var(--nylas-color-primary-200);\n color: var(--nylas-color-primary-600);\n cursor: not-allowed;\n }\n\n chevron-icon {\n svg {\n width: 15px;\n height: 15px;\n }\n }\n}\n\n.next {\n chevron-icon {\n transform: rotate(180deg);\n }\n}\n\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { debug } from '@/utils/utils';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, h } from '@stencil/core';\nimport { NylasMailboxConnector } from '../../..';\nimport { NylasMailbox } from '../nylas-mailbox/nylas-mailbox';\n\nexport type PaginationEvent = {\n hasChildren: boolean;\n};\n\n@Component({\n tag: 'nylas-mailbox-pagination',\n styleUrl: 'nylas-mailbox-pagination.scss',\n shadow: true,\n})\nexport class NylasMailboxPagination {\n /**\n * @description The host element\n */\n @Element() host!: HTMLNylasMailboxPaginationElement;\n\n /**\n * @description The state of the mailbox\n */\n @Prop() state: 'ready' | 'loading' | 'error' = 'ready';\n\n /**\n * @description Whether or not the mailbox has a next or previous page of threads\n */\n @Prop() hasNextPage: boolean = false;\n\n /**\n * @description Whether or not the mailbox has a previous page of threads\n */\n @Prop() hasPreviousPage: boolean = false;\n\n /**\n * @description Whether or not the mailbox has a next or previous page of threads\n */\n @Prop() scrollTarget: 'container' | 'page' = 'container';\n\n /**\n * @description Whether or not the infinity scroll should only be enabled on mobile devices\n */\n @Prop() mobileOnlyInfiniteScroll: boolean = true;\n\n /**\n * @description The width of the mobile viewport\n */\n @Prop() mobileViewPortWidth: number = 768;\n\n /**\n * @description An event that is fired when the user scrolls to the bottom of the page\n */\n @Event() next!: EventEmitter<PaginationEvent>;\n\n /**\n * @description An event that is fired when the user scrolls to the top of the page\n */\n @Event() previous!: EventEmitter<PaginationEvent>;\n\n /**\n * @description The container element\n */\n private containerElement?: HTMLDivElement;\n\n constructor() {\n debug(`[nylas-pagination] Constructed`);\n this.isScrollAtContainerBottom = this.isScrollAtContainerBottom.bind(this);\n this.isScrollAtPageBottom = this.isScrollAtPageBottom.bind(this);\n this.nextPage = this.nextPage.bind(this);\n this.previousPage = this.previousPage.bind(this);\n this.handlePageScroll = this.handlePageScroll.bind(this);\n this.handleContainerScroll = this.handleContainerScroll.bind(this);\n }\n\n connectedCallback() {\n debug(`[nylas-pagination] Component connected`);\n }\n\n async componentWillLoad() {\n debug(`[nylas-pagination] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-pagination] Component did load`);\n if (this.containerElement) {\n this.containerElement.addEventListener('scroll', this.handleContainerScroll);\n }\n }\n\n async componentWillRender() {\n debug(`[nylas-pagination] Component will render`);\n }\n\n disconnectedCallback() {\n debug(`[nylas-pagination] Component disconnected`);\n if (this.containerElement) {\n this.containerElement.removeEventListener('scroll', this.handleContainerScroll);\n }\n }\n\n /**\n * @description Listen for scroll events and fire the next page event when the user scrolls to the bottom of the page\n * @param _event An event that is fired when the user scrolls\n */\n @Listen('scroll', { target: 'window' })\n public handlePageScroll(_event: Event) {\n if (this.isScrollAtPageBottom() && this.canScroll && this.scrollTarget === 'page') {\n this.nextPage();\n }\n }\n\n /**\n * @description Go to the next page of threads\n */\n @Method()\n public async nextPage() {\n const hasChildren = this.host.children.length > 0;\n this.next.emit({\n hasChildren,\n });\n }\n\n /**\n * @description Go to the previous page of threads\n */\n @Method()\n public async previousPage() {\n const hasChildren = this.host.children.length > 0;\n this.previous.emit({\n hasChildren,\n });\n }\n\n /**\n * @description Handle the scroll event\n * @param event An event that is fired when the user scrolls\n */\n private handleContainerScroll(_event: Event) {\n if (this.isScrollAtContainerBottom() && this.canScroll && this.scrollTarget === 'container') {\n this.nextPage();\n }\n }\n\n /**\n * @description Check if the user has scrolled to the bottom of the page\n */\n private isScrollAtContainerBottom() {\n if (!this.containerElement) {\n return false;\n }\n return this.containerElement && this.containerElement.scrollTop + this.containerElement.clientHeight >= this.containerElement.scrollHeight;\n }\n\n /**\n * @description Check if the user has scrolled to the bottom of the page\n */\n private isScrollAtPageBottom() {\n return window.innerHeight + window.scrollY >= document.body.offsetHeight;\n }\n\n /**\n * @description Check if the user can scroll to the next page\n * @returns boolean\n */\n private get canScroll() {\n const hasChildren = this.host.children.length > 0;\n return this.state === 'ready' && hasChildren && (!this.mobileOnlyInfiniteScroll || window.innerWidth < this.mobileViewPortWidth);\n }\n\n @RegisterComponent<NylasMailboxPagination, NylasMailboxConnector, Exclude<NylasMailbox['stores'], undefined>>({\n name: 'nylas-pagination',\n stateToProps: new Map([\n ['mailbox.hasNextThreadPage', 'hasNextPage'],\n ['mailbox.hasPreviousThreadPage', 'hasPreviousPage'],\n ['mailbox.state', 'state'],\n ]),\n eventToProps: {\n next: async (event: CustomEvent<PaginationEvent>, nylasConnector: NylasMailboxConnector) => {\n debug(`[nylas-pagination] Next page event fired`);\n const { hasChildren } = event.detail;\n await nylasConnector.threads.nextThreadPage(hasChildren ? 'append' : 'overwrite', !hasChildren);\n },\n previous: async (event: CustomEvent<PaginationEvent>, nylasConnector: NylasMailboxConnector) => {\n debug(`[nylas-pagination] Previous page event fired`);\n const { hasChildren } = event.detail;\n await nylasConnector.threads.previousThreadPage(hasChildren ? 'append' : 'overwrite', !hasChildren);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const hasChildren = this.host.children.length > 0;\n if (hasChildren) {\n return (\n <Host>\n <div class=\"container\" ref={r => (this.containerElement = r)}>\n <slot></slot>\n {this.canScroll && (\n <div class={'pagination'}>\n <sp-theme scale=\"medium\" color=\"dark\">\n {this.state === 'ready' && this.hasNextPage && (\n <sp-button onClick={this.nextPage}>\n <div slot=\"icon\">\n <refresh-icon class={'refres-icon'} />\n </div>{' '}\n Load more...\n </sp-button>\n )}\n </sp-theme>\n </div>\n )}\n </div>\n </Host>\n );\n }\n\n return (\n <Host>\n <sp-theme scale=\"medium\" color=\"dark\">\n {this.hasPreviousPage && (\n <sp-button class={'previous'} parr=\"previous\" onClick={this.previousPage}>\n <div slot=\"icon\">\n <chevron-icon class={'previous-icon'} />\n </div>{' '}\n Previous\n </sp-button>\n )}\n {this.hasPreviousPage && this.hasNextPage && ' '}\n {this.hasNextPage && (\n <sp-button class={'next'} parr=\"next\" onClick={this.nextPage}>\n <div slot=\"icon\">\n <chevron-icon class={'next-icon'} />\n </div>{' '}\n Next\n </sp-button>\n )}\n </sp-theme>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { R as RegisterComponent } from './register-component.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as debug } from './utils.js';
|
|
4
4
|
|
|
5
5
|
const nylasMailboxToolbarButtonCss = ":host{display:block}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}";
|
|
6
6
|
|
|
@@ -76,7 +76,7 @@ const NylasMailboxToolbarButton$1 = proxyCustomElement(class NylasMailboxToolbar
|
|
|
76
76
|
state = this.dataState ? store.get(storeKey) === 'loading' : false;
|
|
77
77
|
}
|
|
78
78
|
const key = state ? `state-loading` : 'state-ready';
|
|
79
|
-
return (h(Host, { key: '
|
|
79
|
+
return (h(Host, { key: '2454ef2e4270d1642cabe57dacf53908fcdb34e6' }, h("sp-theme", { key: '97d71094fabc3466b87142dfdd1d0bb22659fd32', scale: "medium", color: "dark" }, h("sp-button", { onClick: this.onClick, disabled: state, key: key, "icon-only": this.iconOnly, label: this.renderByState(state) }, this.hasSlot('icon') && (h("div", { slot: "icon", class: 'slot' }, h("slot", { name: "icon" }))), !this.iconOnly && this.renderByState(state)))));
|
|
80
80
|
}
|
|
81
81
|
get host() { return this; }
|
|
82
82
|
static get style() { return nylasMailboxToolbarButtonCss; }
|
|
@@ -109,7 +109,6 @@ function defineCustomElement$1() {
|
|
|
109
109
|
break;
|
|
110
110
|
} });
|
|
111
111
|
}
|
|
112
|
-
defineCustomElement$1(NylasMailboxToolbarButton$1);
|
|
113
112
|
|
|
114
113
|
const NylasMailboxToolbarButton = NylasMailboxToolbarButton$1;
|
|
115
114
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nylas-mailbox-toolbar-button.js","mappings":";;;;AAAA,MAAM,4BAA4B,GAAG,6XAA6X;;;;;;;;;;;;;;;;MCqBrZA,2BAAyB;IAwBpC;;;;QAiBQ,YAAO,GAAG;YAChB,MAAM,MAAM,GAAG,IAAI,CAAC,MAA2B,CAAC;YAChD,KAAK,CAAC,wCAAwC,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACrG,IAAI,IAAI,CAAC,gBAAgB,IAAI,MAAM,EAAE;gBACnC,MAAM,YAAY,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;gBACpE,IAAI,YAAY,EAAE;oBAChB,MAAM,YAAY,EAAE,CAAC;iBACtB;aACF;SACF,CAAC;;;wBAlCmC,KAAK;;KAQ1B;IAEhB,iBAAiB,MAAK;IAEtB,oBAAoB,MAAK;IAEzB,MAAM,iBAAiB;QACrB,KAAK,CAAC,sCAAsC,CAAC,CAAC;KAC/C;IAED,MAAM,gBAAgB;QACpB,KAAK,CAAC,qCAAqC,CAAC,CAAC;KAC9C;IAsBO,UAAU,CAAC,GAAQ,EAAE,YAAoB;QAE/C,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAGtC,IAAI,OAAO,GAAG,GAAG,CAAC;QAClB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;YACrC,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;YACxB,IAAI,CAAC,OAAO,EAAE;gBACZ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EAAE,GAAG,eAAa,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IACpH,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KACnB,WAAK,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,MAAM,IAC5B,YAAM,IAAI,EAAC,MAAM,GAAG,CAChB,CACP,EACA,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAClC,CACH,CACN,EACP;KACH;;;;;;;;;AAtBD;IALC,iBAAiB,CAAC;QACjB,IAAI,EAAE,8BAA8B;QACpC,eAAe,EAAE,kBAAkB;QACnC,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;yDAuBD;;;;;;;;;;;;;;;;;;;;","names":["NylasMailboxToolbarButton"],"sources":["src/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.scss?tag=nylas-mailbox-toolbar-button&encapsulation=shadow","src/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\nsp-button {\n border-radius: var(--nylas-border-radius);\n background-color: var(--nylas-color-primary-400);\n color: var(--nylas-color-primary-900);\n fill: var(--nylas-color-primary-900);\n\n &:hover {\n background-color: var(--nylas-color-primary-500);\n }\n\n &:disabled {\n background-color: var(--nylas-color-primary-200);\n color: var(--nylas-color-primary-600);\n cursor: not-allowed;\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { MethodKeys } from '@/common/types';\nimport { NylasMailboxConnectorInterface } from '@/connector/connector-interface';\nimport { debug } from '@/utils/utils';\nimport { Component, Element, Host, Prop, h } from '@stencil/core';\nimport { ObservableMap } from '@stencil/store';\n\nexport type Stores = Record<string, ObservableMap<any>>;\nexport type PublicMethodsOfNylasMailboxConnector = Pick<NylasMailboxConnectorInterface, MethodKeys<NylasMailboxConnectorInterface>>;\nexport type PropertyPaths<T> = T extends object\n ? {\n [K in keyof T]: T[K] extends Function ? `${K & string}` : `${K & string}.${PropertyPaths<T[K]>}`;\n }[keyof T]\n : '';\nexport type MethodsOfNylasMailboxConnector = PropertyPaths<NylasMailboxConnectorInterface>;\n\n@Component({\n tag: 'nylas-mailbox-toolbar-button',\n styleUrl: 'nylas-mailbox-toolbar-button.scss',\n shadow: true,\n})\nexport class NylasMailboxToolbarButton {\n @Element() private host!: HTMLNylasMailboxToolbarButtonElement;\n\n /**\n * The name of the mailbox connector method to call.\n */\n @Prop({ attribute: 'method' }) readonly method!: MethodsOfNylasMailboxConnector;\n\n /**\n * The value of the state to compare against to check if the data is loading, error, or ready.\n */\n @Prop({ attribute: 'data-state' }) readonly dataState?: string;\n\n /**\n * If true, then the component will render the icon only.\n */\n @Prop() readonly iconOnly: boolean = false;\n\n /**\n * If true, then the component will render if the state is true.\n * This prop is used with the `state` prop.\n */\n @Prop() readonly mailboxConnector?: NylasMailboxConnectorInterface;\n\n constructor() {}\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n async componentWillLoad() {\n debug(`[nylas-if-state] Component will load`);\n }\n\n async componentDidLoad() {\n debug(`[nylas-if-state] Component did load`);\n }\n\n /**\n * The click handler for the button.\n */\n private onClick = async () => {\n const method = this.method as unknown as string;\n debug(`[nylas-mailbox-toolbar-button] onClick`, { method, mailboxConnector: this.mailboxConnector });\n if (this.mailboxConnector && method) {\n const methodToCall = this.callMethod(this.mailboxConnector, method);\n if (methodToCall) {\n await methodToCall();\n }\n }\n };\n\n /**\n * Traverses the object to find the method.\n * @param obj The object to traverse.\n * @param accessString The string to access the method.\n * @returns The method if it exists, undefined otherwise.\n */\n private callMethod(obj: any, accessString: string): (() => void) | undefined {\n // Split the string into parts\n const parts = accessString.split('.');\n\n // Traverse the object to find the method\n let current = obj;\n for (const part of parts.slice(0, -1)) {\n current = current[part];\n if (!current) {\n return undefined;\n }\n }\n\n // Get the method\n const methodName = parts[parts.length - 1];\n const method = current[methodName];\n\n // Check if the method is a function\n if (typeof method === 'function') {\n return method.bind(current);\n }\n\n return undefined;\n }\n\n /**\n * Renders the slot based on the state.\n * @param state The state of the data.\n */\n private renderByState(state: boolean) {\n return state ? <slot name=\"loading\">Loading...</slot> : <slot>Click</slot>;\n }\n\n /**\n * Checks if the slot exists.\n * @param name The name of the slot.\n * @returns True if the slot exists, false otherwise.\n */\n private hasSlot(name: string) {\n return !!this.host.querySelector(`[slot=\"${name}\"]`);\n }\n\n @RegisterComponent({\n name: 'nylas-mailbox-toolbar-button',\n connectorToProp: 'mailboxConnector',\n fireRegisterEvent: true,\n })\n render() {\n let state = false;\n const store = this.mailboxConnector?.nylasMailboxStore;\n if (typeof store !== 'undefined') {\n const storeKey = String(this.dataState) as keyof typeof store.state;\n state = this.dataState ? store.get(storeKey) === 'loading' : false;\n }\n const key = state ? `state-loading` : 'state-ready';\n return (\n <Host>\n <sp-theme scale=\"medium\" color=\"dark\">\n <sp-button onClick={this.onClick} disabled={state} key={key} icon-only={this.iconOnly} label={this.renderByState(state)}>\n {this.hasSlot('icon') && (\n <div slot=\"icon\" class={'slot'}>\n <slot name=\"icon\" />\n </div>\n )}\n {!this.iconOnly && this.renderByState(state)}\n </sp-button>\n </sp-theme>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { N as NylasBaseProvider, e as es } from './index.es.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as debug } from './utils.js';
|
|
4
4
|
import { N as NylasAuthConnector, a as NylasThreadsConnector, b as NylasMessagesConnector, c as NylasFoldersConnector, C as CreateNylasAuthStore, d as CreateNylasMailboxStore, H as HashRouter } from './mailbox-store.js';
|
|
5
5
|
|
|
6
6
|
class NylasMailboxConnector {
|
|
@@ -181,7 +181,7 @@ const NylasMailbox$1 = proxyCustomElement(class NylasMailbox extends HTMLElement
|
|
|
181
181
|
return this.nylasMailboxConnector;
|
|
182
182
|
}
|
|
183
183
|
render() {
|
|
184
|
-
return (h(Host, { key: '
|
|
184
|
+
return (h(Host, { key: '662c4d3f763c5cf9db31c4d2ba26bcdf47ead164' }, h("slot", { key: '5c2b75a569779dd2af6388648a4304721e82ba76' })));
|
|
185
185
|
}
|
|
186
186
|
get host() { return this; }
|
|
187
187
|
static get style() { return nylasMailboxCss; }
|
|
@@ -209,7 +209,6 @@ function defineCustomElement$1() {
|
|
|
209
209
|
break;
|
|
210
210
|
} });
|
|
211
211
|
}
|
|
212
|
-
defineCustomElement$1(NylasMailbox$1);
|
|
213
212
|
|
|
214
213
|
const NylasMailbox = NylasMailbox$1;
|
|
215
214
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nylas-mailbox.js","mappings":";;;;;MAca,qBAAqB;IAWhC,YAAY,MAAuB,EAAE,SAAwB,EAAE,cAAkC,EAAE,UAAiC;QAClI,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAC;KACrC;IAEM,IAAI;QACT,KAAK,CAAC,4BAA4B,CAAC,CAAC;KACrC;IAED,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,iBAAiB,CAAC;KAC/B;IAED,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,cAAc,CAAC;KAC5B;IAED,IAAW,IAAI;QACb,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,OAAO,IAAI,CAAC,cAAc,CAAC;SAC5B;QACD,IAAI,CAAC,cAAc,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QAClF,OAAO,IAAI,CAAC,cAAc,CAAC;KAC5B;IAED,IAAW,OAAO;QAChB,IAAI,IAAI,CAAC,gBAAgB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AC,KAAK,CAAC,MAAM,CAAC,CAAC;KACtD;IAOD,MAAM,eAAe;QACnB,OAAO,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;KAC/C;IAOD,MAAM,YAAY;QAChB,OAAO,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;KAC5C;IAOD,MAAM,YAAY;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;IAOD,MAAM,wBAAwB;QAC5B,OAAO,IAAI,CAAC,qBAAqB,CAAC;KACnC;IAkBD,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,8DAAQ,CACH,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["NylasMailbox","NylasAuth"],"sources":["src/connector/nylas-mailbox-connector/index.ts","src/components/mailbox/nylas-mailbox/nylas-mailbox.css?tag=nylas-mailbox&encapsulation=shadow","src/components/mailbox/nylas-mailbox/nylas-mailbox.tsx"],"sourcesContent":["import { RouterInterface } from '@/routers/router-interface';\nimport { NylasAuthStoreType } from '@/stores/auth-store';\nimport { NylasMailboxStoreType } from '@/stores/mailbox-store';\nimport { debug } from '@/utils/utils';\nimport type { NylasAuthType } from '@nylas/core';\nimport { NylasMailboxConnectorInterface } from '../connector-interface';\nimport { NylasAuthConnector } from '../shared/api/auth';\nimport { NylasMessagesConnector } from '../shared/api/messages';\nimport { NylasThreadsConnector } from '../shared/api/threads';\nimport { NylasFoldersConnector } from '../shared/api/folders';\n\n/**\n * Base class for the Nylas connector.\n */\nexport class NylasMailboxConnector implements NylasMailboxConnectorInterface {\n public nylasAuth: NylasAuthType;\n public nylasMailboxStore: NylasMailboxStoreType;\n public nylasAuthStore: NylasAuthStoreType;\n public router: RouterInterface;\n\n private _authConnector: NylasAuthConnector | undefined;\n private _threadConnector: NylasThreadsConnector | undefined;\n private _messageConnector: NylasMessagesConnector | undefined;\n private _foldersConnector: NylasFoldersConnector | undefined;\n\n constructor(router: RouterInterface, nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType, nylasStore: NylasMailboxStoreType) {\n this.router = router;\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n this.nylasMailboxStore = nylasStore;\n }\n\n public init() {\n debug('NylasMailboxConnector init');\n }\n\n public get mailboxStore() {\n return this.nylasMailboxStore;\n }\n\n public get authStore() {\n return this.nylasAuthStore;\n }\n\n public get auth() {\n if (this._authConnector) {\n return this._authConnector;\n }\n this._authConnector = new NylasAuthConnector(this.nylasAuth, this.nylasAuthStore);\n return this._authConnector;\n }\n\n public get threads() {\n if (this._threadConnector) {\n return this._threadConnector;\n }\n this._threadConnector = new NylasThreadsConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore, this.router);\n return this._threadConnector;\n }\n\n public get messages() {\n if (this._messageConnector) {\n return this._messageConnector;\n }\n this._messageConnector = new NylasMessagesConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore);\n return this._messageConnector;\n }\n\n public get folders() {\n if (this._foldersConnector) {\n return this._foldersConnector;\n }\n this._foldersConnector = new NylasFoldersConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore);\n return this._foldersConnector;\n }\n\n public getAuth() {\n return this.nylasAuth;\n }\n\n public resetStores() {\n this.nylasMailboxStore.reset();\n this.nylasAuthStore.reset();\n }\n\n public async logout() {\n await this.nylasAuth.logout();\n this.resetStores();\n }\n}\n\nexport type PublicMethods<T> = {\n [K in keyof T]: T[K] extends Function ? (string extends K ? never : K) : never;\n}[keyof T];\n\nexport type NylasMailboxConnectorPublicMethods = PublicMethods<NylasMailboxConnector>;\n",":host {\n display: contents;\n}\n","import { NylasBaseProvider } from '@/common/abstract-provider';\nimport { RegisteredComponent } from '@/common/register-component';\nimport type { EventOverride } from '@/common/component-types';\nimport { NylasMailboxConnector } from '@/connector/nylas-mailbox-connector';\nimport { HashRouter } from '@/routers/hash-router';\nimport { RouterInterface } from '@/routers/router-interface';\nimport { CreateNylasAuthStore, NylasAuthStoreState, NylasAuthStoreType } from '@/stores/auth-store';\nimport { CreateNylasMailboxStore, NylasMailboxStoreState, NylasMailboxStoreType } from '@/stores/mailbox-store';\nimport { AuthConfig, NylasAuth, NylasAuthType } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\n\n/**\n * The Nylas Mailbox component.\n * This component is used as a provider for all other Nylas Mailbox components.\n * It is responsible for managing the NylasAuth and NylasMailboxConnector instances.\n * It also manages the state of the NylasAuth and NylasMailboxStore instances.\n * @example\n * <nylas-mailbox\n * auth-config={{\n * clientId: 'YOUR_CLIENT_ID',\n * }}\n * default-auth-store-state={{\n * threadQueryParams: {\n * limit: 10,\n * }}\n * >\n * <nylas-mailbox-thread-list></nylas-mailbox-thread-list>\n * </nylas-mailbox>\n */\n@Component({\n tag: 'nylas-mailbox',\n styleUrl: 'nylas-mailbox.css',\n shadow: true,\n})\nexport class NylasMailbox {\n /**\n * Stores to be used by the provider.\n */\n private stores?: {\n auth: NylasAuthStoreType;\n mailbox: NylasMailboxStoreType;\n };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Auth instance.\n * Used to manage all things authentication with Nylas.\n */\n private nylasAuth?: NylasAuthType;\n\n /**\n * A router instance.\n */\n private router?: RouterInterface;\n\n /**\n * The Nylas Mailbox Connector instance.\n * The branins of the provider. It manages data fetching and state synchronization.\n */\n private nylasMailboxConnector?: NylasMailboxConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasMailboxElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n */\n @Prop() readonly automaticComponentRegistration: boolean = true;\n\n /**\n * This provides a way to override the default event handlers.\n */\n @Prop() eventOverrides: EventOverride<Exclude<typeof this.nylasMailboxConnector, undefined>> = {};\n\n /**\n * The Nylas Auth configuration.\n * Used to manage all things authentication with Nylas.\n */\n @Prop({ attribute: 'auth-config' }) readonly authConfig?: AuthConfig;\n\n /**\n * The default auth store state.\n * Used to set the initial state of the auth store.\n */\n @Prop({ attribute: 'default-auth-store-state' }) readonly defaultAuthStoreState?: NylasAuthStoreState;\n\n /**\n * The default mailbox store state.\n * Used to set the initial state of the mailbox store.\n */\n @Prop({ attribute: 'default-mailbox-store-state' }) readonly defaultMailboxStoreState?: NylasMailboxStoreState;\n\n /**\n * This event is fired when the provider is initialized.\n * It can be used to set the initial state of the provider,\n * or to prevent the provider from firing some default behavior.\n */\n @Event({ cancelable: true }) readonly init!: EventEmitter<HTMLNylasMailboxElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedIn!: EventEmitter<HTMLNylasMailboxElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedOut!: EventEmitter<HTMLNylasMailboxElement>;\n\n connectedCallback() {\n debug('[nylas-mailbox] connectedCallback');\n }\n\n async componentWillLoad() {\n this.stores = {\n auth: CreateNylasAuthStore(this.defaultAuthStoreState),\n mailbox: CreateNylasMailboxStore(this.defaultMailboxStoreState),\n };\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n /**\n * Create the router instance.\n * This will be used to manage the routing of the provider.\n */\n this.router = new HashRouter();\n\n /**\n * Create the NylasAuth instance.\n * This will be used to manage all things authentication with Nylas.\n */\n this.nylasAuth = NylasAuth({\n apiUri: 'https://api.us.nylas.com',\n elementsApiUri: 'https://elements.us.nylas.com',\n storageType: 'indexeddb',\n clientId: 'YOUR_CLIENT_ID',\n defaultScopes: [],\n redirectURI: '/',\n ...this.authConfig,\n });\n\n const authStore = this.baseProvider?.getStore('auth');\n if (!authStore) {\n throw new Error('Auth store is not defined');\n }\n\n const mailboxStore = this.baseProvider?.getStore('mailbox');\n if (!mailboxStore) {\n throw new Error('Mailbox store is not defined');\n }\n\n this.nylasMailboxConnector = new NylasMailboxConnector(this.router, this.nylasAuth, authStore, mailboxStore);\n\n const initEvent = this.init.emit(this.host);\n if (!initEvent.defaultPrevented) {\n /**\n * By default, on init, we will validate the session.\n * This will check if the user is logged in and if the session is still valid.\n * If the session is not valid, the user will be logged out.\n */\n await this.nylasMailboxConnector?.auth.validateSession();\n }\n\n // Handle our router\n this.router?.addRouteChangeListener(`/thread/:threadId`, async (_route, _path, routeParams) => {\n const threadId = routeParams.threadId;\n const thread = await this.nylasMailboxConnector?.threads.getThread(threadId);\n if (thread) {\n this.nylasMailboxConnector?.mailboxStore.set('selectedThread', thread);\n }\n });\n this.router?.addRouteChangeListener(`/`, async (_route, _path, _routeParams) => {\n if (!authStore.state.isAuthenticated) {\n return;\n }\n // Reset the selected thread\n this.nylasMailboxConnector?.threads.unSelectThread();\n this.nylasMailboxConnector?.folders.getFolders();\n\n // If we have a query param, search for threads\n const queryParams = window.location.hash.split('?')[1];\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n const searchQuery = params.get('query');\n if (searchQuery) {\n await this.nylasMailboxConnector?.threads.getThreads({\n search_query_native: searchQuery,\n page_token: undefined,\n });\n }\n } else {\n this.nylasMailboxConnector?.threads.getThreads();\n }\n });\n\n /**\n * Initialize the router.\n * This will be used to manage the routing of the provider.\n */\n this.router?.init();\n\n /**\n * Listen for changes in the NylasAuth isAuthenticated state.\n * This is used to fire the loggedIn and loggedOut events.\n */\n this.handleAuthChange(authStore.state.isAuthenticated);\n this.baseProvider?.componentWillLoad(this.nylasMailboxConnector);\n }\n\n async componentDidLoad() {\n const authStore = this.baseProvider?.getStore('auth');\n if (!authStore) {\n throw new Error('Auth store is not defined');\n }\n\n authStore.onChange('isAuthenticated', this.handleAuthChange);\n this.baseProvider?.componentDidLoad();\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to retrieve the mailboxStore instance\n * @returns The mailboxStore instance\n */\n @Method()\n async getMailboxStore(): Promise<NylasMailboxStoreType | undefined> {\n return this.baseProvider?.getStore('mailbox');\n }\n\n /**\n * This method is used to retrieve the authStore instance\n * @returns The authStore instance\n */\n @Method()\n async getAuthStore(): Promise<NylasAuthStoreType | undefined> {\n return this.baseProvider?.getStore('auth');\n }\n\n /**\n * This method is used to retrieve the NylasAuth instance\n * @returns The NylasAuth instance\n */\n @Method()\n async getNylasAuth(): Promise<NylasAuthType | undefined> {\n return this.nylasAuth;\n }\n\n /**\n * This method is used to retrieve the NylasMailboxConnector instance\n * @returns The NylasMailboxConnector instance\n */\n @Method()\n async getNylasMailboxConnector() {\n return this.nylasMailboxConnector;\n }\n\n /**\n * This method is used to handle changes in the NylasAuth isAuthenticated state\n * @param isAuthenticated isAuthenticated state\n * @returns void\n */\n private handleAuthChange = async (isAuthenticated: boolean) => {\n if (isAuthenticated) {\n this.loggedIn.emit(this.host);\n } else {\n const loggedOutEvent = this.loggedOut.emit(this.host);\n if (!loggedOutEvent.defaultPrevented) {\n await this.nylasMailboxConnector?.logout();\n }\n }\n };\n\n render() {\n return (\n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;;;;;;;;;;;;;;;;;;;;;;","names":["NylasMailbox","NylasAuth"],"sources":["src/connector/nylas-mailbox-connector/index.ts","src/components/mailbox/nylas-mailbox/nylas-mailbox.css?tag=nylas-mailbox&encapsulation=shadow","src/components/mailbox/nylas-mailbox/nylas-mailbox.tsx"],"sourcesContent":["import { RouterInterface } from '@/routers/router-interface';\nimport { NylasAuthStoreType } from '@/stores/auth-store';\nimport { NylasMailboxStoreType } from '@/stores/mailbox-store';\nimport { debug } from '@/utils/utils';\nimport type { NylasAuthType } from '@nylas/core';\nimport { NylasMailboxConnectorInterface } from '../connector-interface';\nimport { NylasAuthConnector } from '../shared/api/auth';\nimport { NylasMessagesConnector } from '../shared/api/messages';\nimport { NylasThreadsConnector } from '../shared/api/threads';\nimport { NylasFoldersConnector } from '../shared/api/folders';\n\n/**\n * Base class for the Nylas connector.\n */\nexport class NylasMailboxConnector implements NylasMailboxConnectorInterface {\n public nylasAuth: NylasAuthType;\n public nylasMailboxStore: NylasMailboxStoreType;\n public nylasAuthStore: NylasAuthStoreType;\n public router: RouterInterface;\n\n private _authConnector: NylasAuthConnector | undefined;\n private _threadConnector: NylasThreadsConnector | undefined;\n private _messageConnector: NylasMessagesConnector | undefined;\n private _foldersConnector: NylasFoldersConnector | undefined;\n\n constructor(router: RouterInterface, nylasAuth: NylasAuthType, nylasAuthStore: NylasAuthStoreType, nylasStore: NylasMailboxStoreType) {\n this.router = router;\n this.nylasAuth = nylasAuth;\n this.nylasAuthStore = nylasAuthStore;\n this.nylasMailboxStore = nylasStore;\n }\n\n public init() {\n debug('NylasMailboxConnector init');\n }\n\n public get mailboxStore() {\n return this.nylasMailboxStore;\n }\n\n public get authStore() {\n return this.nylasAuthStore;\n }\n\n public get auth() {\n if (this._authConnector) {\n return this._authConnector;\n }\n this._authConnector = new NylasAuthConnector(this.nylasAuth, this.nylasAuthStore);\n return this._authConnector;\n }\n\n public get threads() {\n if (this._threadConnector) {\n return this._threadConnector;\n }\n this._threadConnector = new NylasThreadsConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore, this.router);\n return this._threadConnector;\n }\n\n public get messages() {\n if (this._messageConnector) {\n return this._messageConnector;\n }\n this._messageConnector = new NylasMessagesConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore);\n return this._messageConnector;\n }\n\n public get folders() {\n if (this._foldersConnector) {\n return this._foldersConnector;\n }\n this._foldersConnector = new NylasFoldersConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore);\n return this._foldersConnector;\n }\n\n public getAuth() {\n return this.nylasAuth;\n }\n\n public resetStores() {\n this.nylasMailboxStore.reset();\n this.nylasAuthStore.reset();\n }\n\n public async logout() {\n await this.nylasAuth.logout();\n this.resetStores();\n }\n}\n\nexport type PublicMethods<T> = {\n [K in keyof T]: T[K] extends Function ? (string extends K ? never : K) : never;\n}[keyof T];\n\nexport type NylasMailboxConnectorPublicMethods = PublicMethods<NylasMailboxConnector>;\n",":host {\n display: contents;\n}\n","import { NylasBaseProvider } from '@/common/abstract-provider';\nimport { RegisteredComponent } from '@/common/register-component';\nimport type { EventOverride } from '@/common/component-types';\nimport { NylasMailboxConnector } from '@/connector/nylas-mailbox-connector';\nimport { HashRouter } from '@/routers/hash-router';\nimport { RouterInterface } from '@/routers/router-interface';\nimport { CreateNylasAuthStore, NylasAuthStoreState, NylasAuthStoreType } from '@/stores/auth-store';\nimport { CreateNylasMailboxStore, NylasMailboxStoreState, NylasMailboxStoreType } from '@/stores/mailbox-store';\nimport { AuthConfig, NylasAuth, NylasAuthType } from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\n\n/**\n * The Nylas Mailbox component.\n * This component is used as a provider for all other Nylas Mailbox components.\n * It is responsible for managing the NylasAuth and NylasMailboxConnector instances.\n * It also manages the state of the NylasAuth and NylasMailboxStore instances.\n * @example\n * <nylas-mailbox\n * auth-config={{\n * clientId: 'YOUR_CLIENT_ID',\n * }}\n * default-auth-store-state={{\n * threadQueryParams: {\n * limit: 10,\n * }}\n * >\n * <nylas-mailbox-thread-list></nylas-mailbox-thread-list>\n * </nylas-mailbox>\n */\n@Component({\n tag: 'nylas-mailbox',\n styleUrl: 'nylas-mailbox.css',\n shadow: true,\n})\nexport class NylasMailbox {\n /**\n * Stores to be used by the provider.\n */\n private stores?: {\n auth: NylasAuthStoreType;\n mailbox: NylasMailboxStoreType;\n };\n\n /**\n * This is a base provide that defines the common methods and properties\n * that all providers should have.\n *\n * Because stencil does not support abstract classes, we have to use a\n * property to store the base provider instance.\n */\n private baseProvider?: NylasBaseProvider<Exclude<typeof this.stores, undefined>>;\n\n /**\n * The Nylas Auth instance.\n * Used to manage all things authentication with Nylas.\n */\n private nylasAuth?: NylasAuthType;\n\n /**\n * A router instance.\n */\n private router?: RouterInterface;\n\n /**\n * The Nylas Mailbox Connector instance.\n * The branins of the provider. It manages data fetching and state synchronization.\n */\n private nylasMailboxConnector?: NylasMailboxConnector;\n\n /**\n * The host element.\n * Used to manage the host element of the provider.\n */\n @Element() private host!: HTMLNylasMailboxElement;\n\n /**\n * Automatically register components that have the `@RegisterComponent` decorator.\n * If this is set to false, you will need to manually register components using the\n * `registerComponent` method.\n */\n @Prop() readonly automaticComponentRegistration: boolean = true;\n\n /**\n * This provides a way to override the default event handlers.\n */\n @Prop() eventOverrides: EventOverride<Exclude<typeof this.nylasMailboxConnector, undefined>> = {};\n\n /**\n * The Nylas Auth configuration.\n * Used to manage all things authentication with Nylas.\n */\n @Prop({ attribute: 'auth-config' }) readonly authConfig?: AuthConfig;\n\n /**\n * The default auth store state.\n * Used to set the initial state of the auth store.\n */\n @Prop({ attribute: 'default-auth-store-state' }) readonly defaultAuthStoreState?: NylasAuthStoreState;\n\n /**\n * The default mailbox store state.\n * Used to set the initial state of the mailbox store.\n */\n @Prop({ attribute: 'default-mailbox-store-state' }) readonly defaultMailboxStoreState?: NylasMailboxStoreState;\n\n /**\n * This event is fired when the provider is initialized.\n * It can be used to set the initial state of the provider,\n * or to prevent the provider from firing some default behavior.\n */\n @Event({ cancelable: true }) readonly init!: EventEmitter<HTMLNylasMailboxElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedIn!: EventEmitter<HTMLNylasMailboxElement>;\n\n /**\n * This event is fired when the the NyalsAuth isAuthenticated state changes\n * to true.\n */\n @Event({ cancelable: true }) readonly loggedOut!: EventEmitter<HTMLNylasMailboxElement>;\n\n connectedCallback() {\n debug('[nylas-mailbox] connectedCallback');\n }\n\n async componentWillLoad() {\n this.stores = {\n auth: CreateNylasAuthStore(this.defaultAuthStoreState),\n mailbox: CreateNylasMailboxStore(this.defaultMailboxStoreState),\n };\n\n this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);\n\n /**\n * Create the router instance.\n * This will be used to manage the routing of the provider.\n */\n this.router = new HashRouter();\n\n /**\n * Create the NylasAuth instance.\n * This will be used to manage all things authentication with Nylas.\n */\n this.nylasAuth = NylasAuth({\n apiUri: 'https://api.us.nylas.com',\n elementsApiUri: 'https://elements.us.nylas.com',\n storageType: 'indexeddb',\n clientId: 'YOUR_CLIENT_ID',\n defaultScopes: [],\n redirectURI: '/',\n ...this.authConfig,\n });\n\n const authStore = this.baseProvider?.getStore('auth');\n if (!authStore) {\n throw new Error('Auth store is not defined');\n }\n\n const mailboxStore = this.baseProvider?.getStore('mailbox');\n if (!mailboxStore) {\n throw new Error('Mailbox store is not defined');\n }\n\n this.nylasMailboxConnector = new NylasMailboxConnector(this.router, this.nylasAuth, authStore, mailboxStore);\n\n const initEvent = this.init.emit(this.host);\n if (!initEvent.defaultPrevented) {\n /**\n * By default, on init, we will validate the session.\n * This will check if the user is logged in and if the session is still valid.\n * If the session is not valid, the user will be logged out.\n */\n await this.nylasMailboxConnector?.auth.validateSession();\n }\n\n // Handle our router\n this.router?.addRouteChangeListener(`/thread/:threadId`, async (_route, _path, routeParams) => {\n const threadId = routeParams.threadId;\n const thread = await this.nylasMailboxConnector?.threads.getThread(threadId);\n if (thread) {\n this.nylasMailboxConnector?.mailboxStore.set('selectedThread', thread);\n }\n });\n this.router?.addRouteChangeListener(`/`, async (_route, _path, _routeParams) => {\n if (!authStore.state.isAuthenticated) {\n return;\n }\n // Reset the selected thread\n this.nylasMailboxConnector?.threads.unSelectThread();\n this.nylasMailboxConnector?.folders.getFolders();\n\n // If we have a query param, search for threads\n const queryParams = window.location.hash.split('?')[1];\n if (queryParams) {\n const params = new URLSearchParams(queryParams);\n const searchQuery = params.get('query');\n if (searchQuery) {\n await this.nylasMailboxConnector?.threads.getThreads({\n search_query_native: searchQuery,\n page_token: undefined,\n });\n }\n } else {\n this.nylasMailboxConnector?.threads.getThreads();\n }\n });\n\n /**\n * Initialize the router.\n * This will be used to manage the routing of the provider.\n */\n this.router?.init();\n\n /**\n * Listen for changes in the NylasAuth isAuthenticated state.\n * This is used to fire the loggedIn and loggedOut events.\n */\n this.handleAuthChange(authStore.state.isAuthenticated);\n this.baseProvider?.componentWillLoad(this.nylasMailboxConnector);\n }\n\n async componentDidLoad() {\n const authStore = this.baseProvider?.getStore('auth');\n if (!authStore) {\n throw new Error('Auth store is not defined');\n }\n\n authStore.onChange('isAuthenticated', this.handleAuthChange);\n this.baseProvider?.componentDidLoad();\n }\n\n componentDisconnected() {\n this.baseProvider?.componentDisconnected();\n }\n\n /**\n * This is a custom event handler that is used to register a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to register\n * @returns Promise<void>\n */\n @Listen('registerComponent')\n async registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.registerComponent(event.detail);\n }\n\n /**\n * This is a custom event handler that is used to unregister a component with the provider.\n * It is used by components that have the `@RegisterComponent` decorator.\n * @param event A custom event that contains the component to unregister\n * @returns Promise<void>\n */\n @Listen('unregisterComponent')\n async unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void> {\n this.baseProvider?.unregisterComponent(event.detail);\n }\n\n /**\n * This method is used to retrieve the mailboxStore instance\n * @returns The mailboxStore instance\n */\n @Method()\n async getMailboxStore(): Promise<NylasMailboxStoreType | undefined> {\n return this.baseProvider?.getStore('mailbox');\n }\n\n /**\n * This method is used to retrieve the authStore instance\n * @returns The authStore instance\n */\n @Method()\n async getAuthStore(): Promise<NylasAuthStoreType | undefined> {\n return this.baseProvider?.getStore('auth');\n }\n\n /**\n * This method is used to retrieve the NylasAuth instance\n * @returns The NylasAuth instance\n */\n @Method()\n async getNylasAuth(): Promise<NylasAuthType | undefined> {\n return this.nylasAuth;\n }\n\n /**\n * This method is used to retrieve the NylasMailboxConnector instance\n * @returns The NylasMailboxConnector instance\n */\n @Method()\n async getNylasMailboxConnector() {\n return this.nylasMailboxConnector;\n }\n\n /**\n * This method is used to handle changes in the NylasAuth isAuthenticated state\n * @param isAuthenticated isAuthenticated state\n * @returns void\n */\n private handleAuthChange = async (isAuthenticated: boolean) => {\n if (isAuthenticated) {\n this.loggedIn.emit(this.host);\n } else {\n const loggedOutEvent = this.loggedOut.emit(this.host);\n if (!loggedOutEvent.defaultPrevented) {\n await this.nylasMailboxConnector?.logout();\n }\n }\n };\n\n render() {\n return (\n <Host>\n <slot />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { R as RegisterComponent } from './register-component.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as debug } from './utils.js';
|
|
4
4
|
import { d as defineCustomElement$6 } from './chevron.js';
|
|
5
5
|
import { d as defineCustomElement$5 } from './info.js';
|
|
6
6
|
import { d as defineCustomElement$4 } from './search.js';
|
|
@@ -31,6 +31,7 @@ const NylasMinCancellationNotice = proxyCustomElement(class NylasMinCancellation
|
|
|
31
31
|
this.__attachShadow();
|
|
32
32
|
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
33
33
|
this.internals = this.attachInternals();
|
|
34
|
+
this.selectedConfiguration = undefined;
|
|
34
35
|
this.minCancellationNotice = undefined;
|
|
35
36
|
this.name = 'min-cancellation-notice';
|
|
36
37
|
this.selectedNumber = 1;
|
|
@@ -40,10 +41,14 @@ const NylasMinCancellationNotice = proxyCustomElement(class NylasMinCancellation
|
|
|
40
41
|
debug('nylas-min-cancellation-notice', 'elementNameChangedHandler', newValue);
|
|
41
42
|
this.host.setAttribute('name', newValue);
|
|
42
43
|
}
|
|
44
|
+
selectedConfigurationChangedHandler(newVal) {
|
|
45
|
+
const minCancellationNotice = newVal?.scheduler?.min_cancellation_notice;
|
|
46
|
+
if (minCancellationNotice) {
|
|
47
|
+
this.updateNumberAndPeriodFromMinutes(minCancellationNotice);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
43
50
|
availableDaysInFutureChanged(newValue) {
|
|
44
|
-
|
|
45
|
-
this.selectedNumber = number;
|
|
46
|
-
this.selectedPeriod = period;
|
|
51
|
+
this.updateNumberAndPeriodFromMinutes(newValue);
|
|
47
52
|
}
|
|
48
53
|
connectedCallback() {
|
|
49
54
|
debug('nylas-min-cancellation-notice', 'connectedCallback');
|
|
@@ -88,55 +93,67 @@ const NylasMinCancellationNotice = proxyCustomElement(class NylasMinCancellation
|
|
|
88
93
|
else {
|
|
89
94
|
totalMinutes = 0;
|
|
90
95
|
}
|
|
91
|
-
this.valueChanged.emit({ value: totalMinutes, name:
|
|
96
|
+
this.valueChanged.emit({ value: totalMinutes, name: 'minCancellationNotice' });
|
|
92
97
|
if (typeof this.internals.setFormValue !== 'function') {
|
|
93
98
|
return;
|
|
94
99
|
}
|
|
95
100
|
this.internals.setFormValue(totalMinutes.toString(), this.name);
|
|
96
101
|
}
|
|
97
|
-
|
|
102
|
+
updateNumberAndPeriodFromMinutes(minutes) {
|
|
98
103
|
const minutesInHour = 60;
|
|
99
104
|
const minutesInDay = minutesInHour * 24;
|
|
100
105
|
const minutesInWeek = minutesInDay * 7;
|
|
101
106
|
const minutesInMonth = minutesInDay * 30;
|
|
107
|
+
let number, period;
|
|
102
108
|
if (minutes >= minutesInMonth) {
|
|
103
|
-
|
|
109
|
+
number = Math.floor(minutes / minutesInMonth);
|
|
110
|
+
period = 'month';
|
|
104
111
|
}
|
|
105
112
|
else if (minutes >= minutesInWeek) {
|
|
106
|
-
|
|
113
|
+
number = Math.floor(minutes / minutesInWeek);
|
|
114
|
+
period = 'week';
|
|
107
115
|
}
|
|
108
116
|
else if (minutes >= minutesInDay) {
|
|
109
|
-
|
|
117
|
+
number = Math.floor(minutes / minutesInDay);
|
|
118
|
+
period = 'day';
|
|
110
119
|
}
|
|
111
120
|
else if (minutes >= minutesInHour) {
|
|
112
|
-
|
|
121
|
+
number = Math.floor(minutes / minutesInHour);
|
|
122
|
+
period = 'hour';
|
|
113
123
|
}
|
|
114
124
|
else {
|
|
115
|
-
|
|
125
|
+
number = minutes;
|
|
126
|
+
period = 'minute';
|
|
116
127
|
}
|
|
128
|
+
this.selectedNumber = number;
|
|
129
|
+
this.selectedPeriod = period;
|
|
117
130
|
}
|
|
118
131
|
render() {
|
|
119
|
-
return (h(Host, { key: '
|
|
132
|
+
return (h(Host, { key: 'd2eb0d080d1ce4645a642a4f5d55270ed170e882' }, h("div", { key: '2743c3c781ad47c9d0d53fdad2773f45d172e1f4', class: "nylas-min-cancellation-notice", part: "nmcn" }, h("label", { key: '457729b50558651645ecb10398586af1078cfd34' }, "Minimum cancellation notice", h("span", { key: '00b310035def5b8bbc183fa03d2bcb37d7c04b42', class: "label-icon" }, h("tooltip-component", { key: '27c7695f6302e2d043899656f15a70846c2858e2' }, h("info-icon", { key: '10f878cb410cc284e86890a0d6047c27bdc7f455', slot: "tooltip-icon" }), h("span", { key: 'e853afaa116b43371d01fcb3b801e622902e22cd', slot: "tooltip-content" }, "Set the minimum amount of time required to cancel an event.")))), h("time-period-selector", { key: '8bb3955f8cce7661e213fbf2c107f8326937b467', id: "min-cancellation-notice", exportparts: "tps__number-dropdown: nmcn__number-dropdown, tps__number-dropdown-button: nmcn__number-dropdown-button, tps__number-dropdown-content: nmcn__number-dropdown-content, tps__period-dropdown: nmcn__period-dropdown, tps__period-dropdown-button: nmcn__period-dropdown-button, tps__period-dropdown-content: nmcn__period-dropdown-content", timePeriods: ['minute', 'hour', 'day', 'week'], defaultSelectedNumber: this.selectedNumber, defaultSelectedPeriod: this.selectedPeriod }))));
|
|
120
133
|
}
|
|
121
134
|
static get formAssociated() { return true; }
|
|
122
135
|
get host() { return this; }
|
|
123
136
|
static get watchers() { return {
|
|
124
137
|
"name": ["elementNameChangedHandler"],
|
|
138
|
+
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
125
139
|
"availableDaysInFuture": ["availableDaysInFutureChanged"]
|
|
126
140
|
}; }
|
|
127
141
|
static get style() { return nylasMinCancellationNoticeCss; }
|
|
128
142
|
}, [65, "nylas-min-cancellation-notice", {
|
|
143
|
+
"selectedConfiguration": [16],
|
|
129
144
|
"minCancellationNotice": [2, "min-cancellation-notice"],
|
|
130
145
|
"name": [1],
|
|
131
146
|
"selectedNumber": [32],
|
|
132
147
|
"selectedPeriod": [32]
|
|
133
148
|
}, [[0, "timePeriodChanged", "timePeriodChangedHandler"]], {
|
|
134
149
|
"name": ["elementNameChangedHandler"],
|
|
150
|
+
"selectedConfiguration": ["selectedConfigurationChangedHandler"],
|
|
135
151
|
"availableDaysInFuture": ["availableDaysInFutureChanged"]
|
|
136
152
|
}]);
|
|
137
153
|
__decorate([
|
|
138
154
|
RegisterComponent({
|
|
139
155
|
name: 'nylas-min-cancellation-notice',
|
|
156
|
+
stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),
|
|
140
157
|
eventToProps: {},
|
|
141
158
|
fireRegisterEvent: true,
|
|
142
159
|
}),
|
|
@@ -187,7 +204,6 @@ function defineCustomElement() {
|
|
|
187
204
|
break;
|
|
188
205
|
} });
|
|
189
206
|
}
|
|
190
|
-
defineCustomElement(NylasMinCancellationNotice);
|
|
191
207
|
|
|
192
208
|
export { NylasMinCancellationNotice as N, defineCustomElement as d };
|
|
193
209
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nylas-min-cancellation-notice2.js","mappings":";;;;;;;;;;AAAA,MAAM,6BAA6B,GAAG,+gCAA+gC;;;;;;;;;;;;;;;;MCsBxiC,0BAA0B;;;;;;;;oBAId,yBAAyB;8BAEd,CAAC;8BACD,KAAK;;IAQvC,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,+BAA+B,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QAC9E,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KAC1C;IAGD,4BAA4B,CAAC,QAAgB;QAC3C,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,mCAAmC,CAAC,QAAQ,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;KAC9B;IAOD,iBAAiB;QACf,KAAK,CAAC,+BAA+B,EAAE,mBAAmB,CAAC,CAAC;KAC7D;IAED,iBAAiB;QACf,KAAK,CAAC,+BAA+B,EAAE,mBAAmB,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;KAC3C;IAED,gBAAgB;QACd,KAAK,CAAC,+BAA+B,EAAE,kBAAkB,CAAC,CAAC;QAC3D,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,CAAC,CAAC;QACnE,IAAI,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,KAAK,UAAU,EAAE;YACrD,OAAO;SACR;QACD,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,qBAAqB,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,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,EAC9C,qBAAqB,EAAE,IAAI,CAAC,cAAc,EAC1C,qBAAqB,EAAE,IAAI,CAAC,cAAc,GAC1C,CACE,CACD,EACP;KACH;;;;;;;;;;;;;;;;;AAvBD;IALC,iBAAiB,CAAgH;QAChI,IAAI,EAAE,+BAA+B;QACrC,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;wDAwBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.scss?tag=nylas-min-cancellation-notice&encapsulation=shadow","src/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-min-cancellation-notice {\n display: flex;\n justify-content: space-between;\n font-family: var(--nylas-font-family);\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\n\n/**\n * The `nylas-min-cancellation-notice` component is a form input for the description of an event.\n * @part nmcn - The minimum cancellation notice container\n * @part nmcn__number-dropdown - The number dropdown container\n * @part nmcn__number-dropdown-button - The number dropdown button\n * @part nmcn__number-dropdown-content - The number dropdown content\n * @part nmcn__period-dropdown - The period dropdown container\n * @part nmcn__period-dropdown-button - The period dropdown button\n * @part nmcn__period-dropdown-content - The period dropdown content\n */\n@Component({\n tag: 'nylas-min-cancellation-notice',\n styleUrl: 'nylas-min-cancellation-notice.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasMinCancellationNotice {\n @Prop() minCancellationNotice?: number;\n @AttachInternals() internals!: ElementInternals;\n @Element() host!: HTMLElement;\n @Prop() name: string = 'min-cancellation-notice';\n\n @State() selectedNumber: number = 1;\n @State() selectedPeriod: string = 'day';\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-min-cancellation-notice', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('availableDaysInFuture')\n availableDaysInFutureChanged(newValue: number) {\n const { number, period } = this.calculateNumberAndPeriodFromMinutes(newValue);\n this.selectedNumber = number;\n this.selectedPeriod = period;\n }\n\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-min-cancellation-notice', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-min-cancellation-notice', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-min-cancellation-notice', 'componentDidLoad');\n this.availableDaysInFutureChanged(this.minCancellationNotice ?? 1);\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(this.minCancellationNotice?.toString() ?? '1', this.name);\n }\n\n disconnectedCallback() {\n debug('nylas-min-cancellation-notice', 'disconnectedCallback');\n }\n\n @Listen('timePeriodChanged')\n timePeriodChangedHandler(\n event: CustomEvent<{\n number: number;\n period: string;\n }>,\n ) {\n const { number, period } = event.detail;\n let totalMinutes;\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n\n if (period === 'minute') {\n totalMinutes = number;\n } else if (period === 'hour') {\n totalMinutes = number * minutesInHour;\n } else if (period === 'day') {\n totalMinutes = number * minutesInDay;\n } else if (period === 'week') {\n totalMinutes = number * minutesInWeek;\n } else if (period === 'month') {\n totalMinutes = number * minutesInMonth;\n } else {\n totalMinutes = 0;\n }\n this.valueChanged.emit({ value: totalMinutes, name: this.name });\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(totalMinutes.toString(), this.name);\n }\n\n private calculateNumberAndPeriodFromMinutes(minutes: number): { number: number; period: string } {\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n\n if (minutes >= minutesInMonth) {\n return { number: Math.floor(minutes / minutesInMonth), period: 'month' };\n } else if (minutes >= minutesInWeek) {\n return { number: Math.floor(minutes / minutesInWeek), period: 'week' };\n } else if (minutes >= minutesInDay) {\n return { number: Math.floor(minutes / minutesInDay), period: 'day' };\n } else if (minutes >= minutesInHour) {\n return { number: Math.floor(minutes / minutesInHour), period: 'hour' };\n } else {\n return { number: minutes, period: 'minute' };\n }\n }\n\n @RegisterComponent<NylasMinCancellationNotice, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-min-cancellation-notice',\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-min-cancellation-notice\" part=\"nmcn\">\n <label>\n Minimum cancellation notice\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">Set the minimum amount of time required to cancel an event.</span>\n </tooltip-component>\n </span>\n </label>\n <time-period-selector\n id=\"min-cancellation-notice\"\n exportparts=\"tps__number-dropdown: nmcn__number-dropdown, tps__number-dropdown-button: nmcn__number-dropdown-button, tps__number-dropdown-content: nmcn__number-dropdown-content, tps__period-dropdown: nmcn__period-dropdown, tps__period-dropdown-button: nmcn__period-dropdown-button, tps__period-dropdown-content: nmcn__period-dropdown-content\"\n timePeriods={['minute', 'hour', 'day', 'week']}\n defaultSelectedNumber={this.selectedNumber}\n defaultSelectedPeriod={this.selectedPeriod}\n />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"nylas-min-cancellation-notice2.js","mappings":";;;;;;;;;;AAAA,MAAM,6BAA6B,GAAG,+gCAA+gC;;;;;;;;;;;;;;;;MCuBxiC,0BAA0B;;;;;;;;;oBAQd,yBAAyB;8BAEd,CAAC;8BACD,KAAK;;IAQvC,yBAAyB,CAAC,QAAgB;QACxC,KAAK,CAAC,+BAA+B,EAAE,2BAA2B,EAAE,QAAQ,CAAC,CAAC;QAC9E,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KAC1C;IAGD,mCAAmC,CAAC,MAAqB;QACvD,MAAM,qBAAqB,GAAG,MAAM,EAAE,SAAS,EAAE,uBAAuB,CAAC;QACzE,IAAI,qBAAqB,EAAE;YACzB,IAAI,CAAC,gCAAgC,CAAC,qBAAqB,CAAC,CAAC;SAC9D;KACF;IAGD,4BAA4B,CAAC,QAAgB;QAC3C,IAAI,CAAC,gCAAgC,CAAC,QAAQ,CAAC,CAAC;KACjD;IAOD,iBAAiB;QACf,KAAK,CAAC,+BAA+B,EAAE,mBAAmB,CAAC,CAAC;KAC7D;IAED,iBAAiB;QACf,KAAK,CAAC,+BAA+B,EAAE,mBAAmB,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;KAC3C;IAED,gBAAgB;QACd,KAAK,CAAC,+BAA+B,EAAE,kBAAkB,CAAC,CAAC;QAC3D,IAAI,CAAC,4BAA4B,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,CAAC,CAAC;QACnE,IAAI,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tB,4EACE,kEAAW,IAAI,EAAC,cAAc,GAAG,EACjC,6DAAM,IAAI,EAAC,iBAAiB,kEAAmE,CAC7E,CACf,CACD,EACR,6EACE,EAAE,EAAC,yBAAyB,EAC5B,WAAW,EAAC,0UAA0U,EACtV,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,EAC9C,qBAAqB,EAAE,IAAI,CAAC,cAAc,EAC1C,qBAAqB,EAAE,IAAI,CAAC,cAAc,GAC1C,CACE,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;AAvBD;IANC,iBAAiB,CAAgH;QAChI,IAAI,EAAE,+BAA+B;QACrC,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,uCAAuC,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC3F,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;wDAwBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.scss?tag=nylas-min-cancellation-notice&encapsulation=shadow","src/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-min-cancellation-notice {\n display: flex;\n justify-content: space-between;\n font-family: var(--nylas-font-family);\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%; /* 21px */\n span.label-icon {\n margin-left: 4px;\n tooltip-component {\n display: flex;\n }\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration } from '@nylas/core';\n\n/**\n * The `nylas-min-cancellation-notice` component is a form input for the description of an event.\n * @part nmcn - The minimum cancellation notice container\n * @part nmcn__number-dropdown - The number dropdown container\n * @part nmcn__number-dropdown-button - The number dropdown button\n * @part nmcn__number-dropdown-content - The number dropdown content\n * @part nmcn__period-dropdown - The period dropdown container\n * @part nmcn__period-dropdown-button - The period dropdown button\n * @part nmcn__period-dropdown-content - The period dropdown content\n */\n@Component({\n tag: 'nylas-min-cancellation-notice',\n styleUrl: 'nylas-min-cancellation-notice.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasMinCancellationNotice {\n /**\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n @Prop() minCancellationNotice?: number;\n @AttachInternals() internals!: ElementInternals;\n @Element() host!: HTMLElement;\n @Prop() name: string = 'min-cancellation-notice';\n\n @State() selectedNumber: number = 1;\n @State() selectedPeriod: string = 'day';\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-min-cancellation-notice', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newVal: Configuration) {\n const minCancellationNotice = newVal?.scheduler?.min_cancellation_notice;\n if (minCancellationNotice) {\n this.updateNumberAndPeriodFromMinutes(minCancellationNotice);\n }\n }\n\n @Watch('availableDaysInFuture')\n availableDaysInFutureChanged(newValue: number) {\n this.updateNumberAndPeriodFromMinutes(newValue);\n }\n\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-min-cancellation-notice', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-min-cancellation-notice', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-min-cancellation-notice', 'componentDidLoad');\n this.availableDaysInFutureChanged(this.minCancellationNotice ?? 1);\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(this.minCancellationNotice?.toString() ?? '1', this.name);\n }\n\n disconnectedCallback() {\n debug('nylas-min-cancellation-notice', 'disconnectedCallback');\n }\n\n @Listen('timePeriodChanged')\n timePeriodChangedHandler(\n event: CustomEvent<{\n number: number;\n period: string;\n }>,\n ) {\n const { number, period } = event.detail;\n let totalMinutes;\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n\n if (period === 'minute') {\n totalMinutes = number;\n } else if (period === 'hour') {\n totalMinutes = number * minutesInHour;\n } else if (period === 'day') {\n totalMinutes = number * minutesInDay;\n } else if (period === 'week') {\n totalMinutes = number * minutesInWeek;\n } else if (period === 'month') {\n totalMinutes = number * minutesInMonth;\n } else {\n totalMinutes = 0;\n }\n this.valueChanged.emit({ value: totalMinutes, name: 'minCancellationNotice' });\n if (typeof this.internals.setFormValue !== 'function') {\n return;\n }\n this.internals.setFormValue(totalMinutes.toString(), this.name);\n }\n\n private updateNumberAndPeriodFromMinutes(minutes: number): void {\n const minutesInHour = 60;\n const minutesInDay = minutesInHour * 24;\n const minutesInWeek = minutesInDay * 7;\n const minutesInMonth = minutesInDay * 30; // Assuming 30 days in a month for simplification\n let number, period;\n if (minutes >= minutesInMonth) {\n number = Math.floor(minutes / minutesInMonth);\n period = 'month';\n } else if (minutes >= minutesInWeek) {\n number = Math.floor(minutes / minutesInWeek);\n period = 'week';\n } else if (minutes >= minutesInDay) {\n number = Math.floor(minutes / minutesInDay);\n period = 'day';\n } else if (minutes >= minutesInHour) {\n number = Math.floor(minutes / minutesInHour);\n period = 'hour';\n } else {\n number = minutes;\n period = 'minute';\n }\n this.selectedNumber = number;\n this.selectedPeriod = period;\n }\n\n @RegisterComponent<NylasMinCancellationNotice, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-min-cancellation-notice',\n stateToProps: new Map([['schedulerConfig.selectedConfiguration', 'selectedConfiguration']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-min-cancellation-notice\" part=\"nmcn\">\n <label>\n Minimum cancellation notice\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">Set the minimum amount of time required to cancel an event.</span>\n </tooltip-component>\n </span>\n </label>\n <time-period-selector\n id=\"min-cancellation-notice\"\n exportparts=\"tps__number-dropdown: nmcn__number-dropdown, tps__number-dropdown-button: nmcn__number-dropdown-button, tps__number-dropdown-content: nmcn__number-dropdown-content, tps__period-dropdown: nmcn__period-dropdown, tps__period-dropdown-button: nmcn__period-dropdown-button, tps__period-dropdown-content: nmcn__period-dropdown-content\"\n timePeriods={['minute', 'hour', 'day', 'week']}\n defaultSelectedNumber={this.selectedNumber}\n defaultSelectedPeriod={this.selectedPeriod}\n />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { a as debug } from './utils.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './close.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './warning.js';
|
|
5
5
|
|
|
@@ -55,7 +55,7 @@ const NylasNotification = proxyCustomElement(class NylasNotification extends HTM
|
|
|
55
55
|
this.notifications = this.notifications.filter(notif => notif.id !== id);
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
|
-
return (h(Host, { key: '
|
|
58
|
+
return (h(Host, { key: '16bd673245819e3ed76ba5689c3292be510e3cd7' }, h(Fragment, { key: 'd88e8ea863d00a8c982c7e26007c975526c7457f' }, this.notifications.map(notif => (h("div", { class: `notif ${notif.type}`, key: notif.id }, h("div", { class: "content" }, h("span", { class: `icon ${notif.type}` }, (notif.type === 'error' || notif.type === 'warning') && h("warning-icon", null)), h("span", { class: "message" }, h("span", { class: "title" }, notif.title), notif.description && h("span", { class: "description" }, notif.description))), h("button", { class: "dismiss-btn", onClick: () => this.dismissNotification(notif.id) }, h("close-icon", null))))), h("slot", { key: 'c40cb61ce0a1dbd3416824b7c26e08e3aea01eae' }))));
|
|
59
59
|
}
|
|
60
60
|
static get style() { return nylasNotificationCss; }
|
|
61
61
|
}, [1, "nylas-notification", {
|
|
@@ -86,7 +86,6 @@ function defineCustomElement() {
|
|
|
86
86
|
break;
|
|
87
87
|
} });
|
|
88
88
|
}
|
|
89
|
-
defineCustomElement(NylasNotification);
|
|
90
89
|
|
|
91
90
|
export { NylasNotification as N, defineCustomElement as d };
|
|
92
91
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"nylas-notification2.js","mappings":";;;;;AAAA,MAAM,oBAAoB,GAAG,glDAAglD;;MCYhmD,iBAAiB;;;;;mBAIG,IAAI;iCACG,CAAC,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,iBAAiB,CAAC;6BAElD,EAAE;;IAG3C,OAAO,CAAC,KAAgC;QACtC,KAAK,CAAC,+BAA+B,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3D,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;KAChC;IAGD,SAAS,CAAC,KAAgC;QACxC,KAAK,CAAC,iCAAiC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC7D,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;KAChC;IAGD,MAAM,CAAC,KAAgC;QACrC,KAAK,CAAC,8BAA8B,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1D,IAAI,CAAC,kB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AAE,KAAK,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aACvF,EAAE,GAAG,CAAC,CAAC;SACT;KACF;IAEO,mBAAmB,CAAC,EAAU;QACpC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;KAC1E;IAED,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,EAAC,QAAQ,uDACN,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,KAC3B,WAAK,KAAK,EAAE,SAAS,KAAK,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,IAC9C,WAAK,KAAK,EAAC,SAAS,IAClB,YAAM,KAAK,EAAE,QAAQ,KAAK,CAAC,IAAI,EAAE,IAAG,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,KAAK,uBAAgB,CAAQ,EACpH,YAAM,KAAK,EAAC,SAAS,IACnB,YAAM,KAAK,EAAC,OAAO,IAAE,KAAK,CAAC,KAAK,CAAQ,EACvC,KAAK,CAAC,WAAW,IAAI,YAAM,KAAK,EAAC,aAAa,IAAE,KAAK,CAAC,WAAW,CAAQ,CACrE,CACH,EACN,cAAQ,KAAK,EAAC,aAAa,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,IAC3E,qBAAc,CACP,CACL,CACP,CAAC,EACF,8DAAQ,CACC,CACN,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/scheduler/nylas-notification/nylas-notification.scss?tag=nylas-notification&encapsulation=shadow","src/components/scheduler/nylas-notification/nylas-notification.tsx"],"sourcesContent":["@import '../../../common/styles/variables.scss';\n\n:host {\n display: block;\n margin-bottom: -12px; // offset for the rounded border\n width: 100%;\n z-index: 1;\n @include default-css-variables;\n}\n.notif {\n display: flex;\n @media #{$mobile} {\n width: auto;\n }\n padding: 17px;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n border-radius: var(--nylas-border-radius-2x);\n border: 1.5px solid var(--nylas-error);\n background: var(--nylas-base-0);\n .content {\n display: flex;\n flex-direction: row;\n gap: 8px;\n .message {\n font-size: 14px;\n font-weight: 400;\n color: var(--nylas-base-800);\n .title {\n font-size: 16px;\n font-weight: 600;\n color: var(--nylas-base-950);\n display: block;\n }\n .description {\n font-size: 14px;\n font-weight: 400;\n color: var(--nylas-base-800);\n display: block;\n }\n }\n .icon {\n &.error {\n color: var(--nylas-error);\n }\n }\n }\n\n &.error {\n border-color: var(--nylas-error);\n }\n &.warning {\n border-color: var(--nylas-warning);\n }\n &.info {\n border-color: var(--nylas-info);\n }\n &.success {\n border-color: var(--nylas-success);\n }\n\n .dismiss-btn {\n background: none;\n border: none;\n color: var(--nylas-base-950);\n cursor: pointer;\n }\n}\n","import { Notification } from '@nylas/core';\nimport { Component, Fragment, Host, Listen, Prop, State, h } from '@stencil/core';\nimport { debug } from '@/utils/utils';\n\n/**\n * The `nylas-notification` component is a UI component that displays notifications.\n */\n@Component({\n tag: 'nylas-notification',\n styleUrl: 'nylas-notification.scss',\n shadow: true,\n})\nexport class NylasNotification {\n /**\n * The time-to-live for notifications in milliseconds. Set to 'none' to disable auto-dismissal.\n */\n @Prop() ttl: number | 'none' = 5000;\n @Prop() allowedCategories: string[] = ['component', 'api', 'validation', 'invalid_session'];\n\n @State() notifications: Notification[] = [];\n\n @Listen('nylasSchedulerError', { target: 'body' })\n onError(event: CustomEvent<Notification>) {\n debug(`[nylas-notification] Error: ${event.detail.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerWarning', { target: 'body' })\n onWarning(event: CustomEvent<Notification>) {\n debug(`[nylas-notification] Warning: ${event.detail.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerInfo', { target: 'body' })\n onInfo(event: CustomEvent<Notification>) {\n debug(`[nylas-notification] Info: ${event.detail.title}`);\n this.handleNotification(event);\n }\n\n @Listen('nylasSchedulerSuccess', { target: 'body' })\n onSuccess(event: CustomEvent<Notification>) {\n debug(`[nylas-notification] Success: ${event.detail.title}`);\n this.handleNotification(event);\n }\n\n private handleNotification(event: CustomEvent<Notification>) {\n if (event.defaultPrevented) {\n debug(`[nylas-notification] Event default prevented`);\n return;\n }\n if (this.ttl === 0) {\n debug(`[nylas-notification] TTL is 0`);\n return;\n }\n if (this.allowedCategories.length > 0 && !this.allowedCategories.includes(event.detail.category)) {\n debug(`[nylas-notification] Category not allowed`);\n return;\n }\n\n this.notifications = [...this.notifications, { ...event.detail }];\n if (event.detail.ttl !== 'none') {\n const ttl = event.detail.ttl ? event.detail.ttl : (this.ttl as number);\n window.setTimeout(() => {\n this.notifications = this.notifications.filter(notif => notif.id !== event.detail.id);\n }, ttl);\n }\n }\n\n private dismissNotification(id: string) {\n this.notifications = this.notifications.filter(notif => notif.id !== id);\n }\n\n render() {\n return (\n <Host>\n <Fragment>\n {this.notifications.map(notif => (\n <div class={`notif ${notif.type}`} key={notif.id}>\n <div class=\"content\">\n <span class={`icon ${notif.type}`}>{(notif.type === 'error' || notif.type === 'warning') && <warning-icon />}</span>\n <span class=\"message\">\n <span class=\"title\">{notif.title}</span>\n {notif.description && <span class=\"description\">{notif.description}</span>}\n </span>\n </div>\n <button class=\"dismiss-btn\" onClick={() => this.dismissNotification(notif.id)}>\n <close-icon />\n </button>\n </div>\n ))}\n <slot />\n </Fragment>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { N as NylasBaseProvider, e as es } from './index.es.js';
|
|
3
|
-
import {
|
|
3
|
+
import { a as debug } from './utils.js';
|
|
4
4
|
import { N as NylasAuthConnector, a as NylasThreadsConnector, b as NylasMessagesConnector, c as NylasFoldersConnector, C as CreateNylasAuthStore, d as CreateNylasMailboxStore, H as HashRouter } from './mailbox-store.js';
|
|
5
5
|
import { N as NylaSchedulerAPIConnector, C as CreateNylasSchedulerStore } from './scheduler-store.js';
|
|
6
6
|
import { C as CreateNylasSchedulerConfigStore } from './scheduler-config-store.js';
|
|
@@ -182,7 +182,7 @@ const NylasProvider$1 = proxyCustomElement(class NylasProvider extends HTMLEleme
|
|
|
182
182
|
return this.baseProvider?.getStore('schedulerConfig');
|
|
183
183
|
}
|
|
184
184
|
render() {
|
|
185
|
-
return (h(Host, { key: '
|
|
185
|
+
return (h(Host, { key: '782d47608825fb870d87153c8d43d778dc6c2b87' }, h("slot", { key: '2b01537d9d4a0cf4c81ad0b77ce3e6d761f3e1db' })));
|
|
186
186
|
}
|
|
187
187
|
get host() { return this; }
|
|
188
188
|
static get style() { return nylasProviderCss; }
|
|
@@ -210,7 +210,6 @@ function defineCustomElement$1() {
|
|
|
210
210
|
break;
|
|
211
211
|
} });
|
|
212
212
|
}
|
|
213
|
-
defineCustomElement$1(NylasProvider$1);
|
|
214
213
|
|
|
215
214
|
const NylasProvider = NylasProvider$1;
|
|
216
215
|
const defineCustomElement = defineCustomElement$1;
|