@nylas/web-elements 1.0.0-prealpha1
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/LICENSE +21 -0
- package/dist/cjs/_commonjsHelpers-0a7b82d9.js +23 -0
- package/dist/cjs/_commonjsHelpers-0a7b82d9.js.map +1 -0
- package/dist/cjs/app-globals-d58ac016.js +11 -0
- package/dist/cjs/app-globals-d58ac016.js.map +1 -0
- package/dist/cjs/archive-icon_7.cjs.entry.js +120 -0
- package/dist/cjs/archive-icon_7.cjs.entry.js.map +1 -0
- package/dist/cjs/arrow-icon.cjs.entry.js +24 -0
- package/dist/cjs/arrow-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/bold-icon_3.cjs.entry.js +56 -0
- package/dist/cjs/bold-icon_3.cjs.entry.js.map +1 -0
- package/dist/cjs/calendar-cancel-icon.cjs.entry.js +24 -0
- package/dist/cjs/calendar-cancel-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/calendar-check-icon_3.cjs.entry.js +56 -0
- package/dist/cjs/calendar-check-icon_3.cjs.entry.js.map +1 -0
- package/dist/cjs/calendar-icon.cjs.entry.js +24 -0
- package/dist/cjs/calendar-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/chevron-icon.cjs.entry.js +24 -0
- package/dist/cjs/chevron-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/close-icon_2.cjs.entry.js +40 -0
- package/dist/cjs/close-icon_2.cjs.entry.js.map +1 -0
- package/dist/cjs/document-refresh-icon.cjs.entry.js +24 -0
- package/dist/cjs/document-refresh-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/duration-18b22d1b.js +84 -0
- package/dist/cjs/duration-18b22d1b.js.map +1 -0
- package/dist/cjs/elements-b06c817b.js +21585 -0
- package/dist/cjs/elements-b06c817b.js.map +1 -0
- package/dist/cjs/flow-d922fbd4.js +891 -0
- package/dist/cjs/flow-d922fbd4.js.map +1 -0
- package/dist/cjs/focus-visible-857fc8f9.js +327 -0
- package/dist/cjs/focus-visible-857fc8f9.js.map +1 -0
- package/dist/cjs/forward-icon_6.cjs.entry.js +2216 -0
- package/dist/cjs/forward-icon_6.cjs.entry.js.map +1 -0
- package/dist/cjs/globe-icon.cjs.entry.js +24 -0
- package/dist/cjs/globe-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/index-34e64e2d.js +2173 -0
- package/dist/cjs/index-34e64e2d.js.map +1 -0
- package/dist/cjs/index-e869130c.js +198 -0
- package/dist/cjs/index-e869130c.js.map +1 -0
- package/dist/cjs/index.cjs.js +12 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/index.es-e78884f5.js +3217 -0
- package/dist/cjs/index.es-e78884f5.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/loading-icon.cjs.entry.js +24 -0
- package/dist/cjs/loading-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/mailbox-store-0b1636fa.js +529 -0
- package/dist/cjs/mailbox-store-0b1636fa.js.map +1 -0
- package/dist/cjs/nylas-booked-event-card_9.cjs.entry.js +8127 -0
- package/dist/cjs/nylas-booked-event-card_9.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-if-state_3.cjs.entry.js +409 -0
- package/dist/cjs/nylas-if-state_3.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-list-folders.cjs.entry.js +120 -0
- package/dist/cjs/nylas-list-folders.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-list-threads.cjs.entry.js +89 -0
- package/dist/cjs/nylas-list-threads.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-mailbox-pagination.cjs.entry.js +140 -0
- package/dist/cjs/nylas-mailbox-pagination.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js +100 -0
- package/dist/cjs/nylas-mailbox-toolbar-button.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-open-hours-picker.cjs.entry.js +333 -0
- package/dist/cjs/nylas-open-hours-picker.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-provider.cjs.entry.js +184 -0
- package/dist/cjs/nylas-provider.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-scheduler.cjs.entry.js +242 -0
- package/dist/cjs/nylas-scheduler.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-threads-refresh.cjs.entry.js +118 -0
- package/dist/cjs/nylas-threads-refresh.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-threads-search.cjs.entry.js +84 -0
- package/dist/cjs/nylas-threads-search.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-view-thread.cjs.entry.js +234 -0
- package/dist/cjs/nylas-view-thread.cjs.entry.js.map +1 -0
- package/dist/cjs/nylas-web-elements.cjs.js +27 -0
- package/dist/cjs/nylas-web-elements.cjs.js.map +1 -0
- package/dist/cjs/play-icon_2.cjs.entry.js +40 -0
- package/dist/cjs/play-icon_2.cjs.entry.js.map +1 -0
- package/dist/cjs/property-d934a711.js +47 -0
- package/dist/cjs/property-d934a711.js.map +1 -0
- package/dist/cjs/refresh-icon.cjs.entry.js +24 -0
- package/dist/cjs/refresh-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/register-component-f76b61a6.js +140 -0
- package/dist/cjs/register-component-f76b61a6.js.map +1 -0
- package/dist/cjs/scheduler-store-e9822441.js +254 -0
- package/dist/cjs/scheduler-store-e9822441.js.map +1 -0
- package/dist/cjs/translate-icon.cjs.entry.js +24 -0
- package/dist/cjs/translate-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/utils-f91d4c73.js +161 -0
- package/dist/cjs/utils-f91d4c73.js.map +1 -0
- package/dist/collection/assets/icons/chevron.svg +3 -0
- package/dist/collection/collection-manifest.json +66 -0
- package/dist/collection/common/abstract-provider.js +231 -0
- package/dist/collection/common/abstract-provider.js.map +1 -0
- package/dist/collection/common/component-types.js +2 -0
- package/dist/collection/common/component-types.js.map +1 -0
- package/dist/collection/common/constants.js +12 -0
- package/dist/collection/common/constants.js.map +1 -0
- package/dist/collection/common/global.js +4 -0
- package/dist/collection/common/global.js.map +1 -0
- package/dist/collection/common/icons/archive.js +63 -0
- package/dist/collection/common/icons/archive.js.map +1 -0
- package/dist/collection/common/icons/arrow.js +63 -0
- package/dist/collection/common/icons/arrow.js.map +1 -0
- package/dist/collection/common/icons/bold.js +63 -0
- package/dist/collection/common/icons/bold.js.map +1 -0
- package/dist/collection/common/icons/calendar-cancel.js +63 -0
- package/dist/collection/common/icons/calendar-cancel.js.map +1 -0
- package/dist/collection/common/icons/calendar-check.js +63 -0
- package/dist/collection/common/icons/calendar-check.js.map +1 -0
- package/dist/collection/common/icons/calendar.js +63 -0
- package/dist/collection/common/icons/calendar.js.map +1 -0
- package/dist/collection/common/icons/checkmark-circle.js +63 -0
- package/dist/collection/common/icons/checkmark-circle.js.map +1 -0
- package/dist/collection/common/icons/chevron.js +63 -0
- package/dist/collection/common/icons/chevron.js.map +1 -0
- package/dist/collection/common/icons/close.js +63 -0
- package/dist/collection/common/icons/close.js.map +1 -0
- package/dist/collection/common/icons/document-refresh.js +63 -0
- package/dist/collection/common/icons/document-refresh.js.map +1 -0
- package/dist/collection/common/icons/folder.js +63 -0
- package/dist/collection/common/icons/folder.js.map +1 -0
- package/dist/collection/common/icons/forward.js +63 -0
- package/dist/collection/common/icons/forward.js.map +1 -0
- package/dist/collection/common/icons/globe.js +63 -0
- package/dist/collection/common/icons/globe.js.map +1 -0
- package/dist/collection/common/icons/icon.css +3 -0
- package/dist/collection/common/icons/inbox.js +63 -0
- package/dist/collection/common/icons/inbox.js.map +1 -0
- package/dist/collection/common/icons/italic.js +63 -0
- package/dist/collection/common/icons/italic.js.map +1 -0
- package/dist/collection/common/icons/loading.css +33 -0
- package/dist/collection/common/icons/loading.js +63 -0
- package/dist/collection/common/icons/loading.js.map +1 -0
- package/dist/collection/common/icons/nylas-logo.js +63 -0
- package/dist/collection/common/icons/nylas-logo.js.map +1 -0
- package/dist/collection/common/icons/people.js +63 -0
- package/dist/collection/common/icons/people.js.map +1 -0
- package/dist/collection/common/icons/play.js +63 -0
- package/dist/collection/common/icons/play.js.map +1 -0
- package/dist/collection/common/icons/refresh.js +63 -0
- package/dist/collection/common/icons/refresh.js.map +1 -0
- package/dist/collection/common/icons/reply-all.js +63 -0
- package/dist/collection/common/icons/reply-all.js.map +1 -0
- package/dist/collection/common/icons/reply.js +63 -0
- package/dist/collection/common/icons/reply.js.map +1 -0
- package/dist/collection/common/icons/sent.js +63 -0
- package/dist/collection/common/icons/sent.js.map +1 -0
- package/dist/collection/common/icons/spam.js +63 -0
- package/dist/collection/common/icons/spam.js.map +1 -0
- package/dist/collection/common/icons/star.js +63 -0
- package/dist/collection/common/icons/star.js.map +1 -0
- package/dist/collection/common/icons/stop.js +63 -0
- package/dist/collection/common/icons/stop.js.map +1 -0
- package/dist/collection/common/icons/translate.js +63 -0
- package/dist/collection/common/icons/translate.js.map +1 -0
- package/dist/collection/common/icons/trash.js +63 -0
- package/dist/collection/common/icons/trash.js.map +1 -0
- package/dist/collection/common/icons/underline.js +63 -0
- package/dist/collection/common/icons/underline.js.map +1 -0
- package/dist/collection/common/icons/warning.js +63 -0
- package/dist/collection/common/icons/warning.js.map +1 -0
- package/dist/collection/common/mocks/threads.js +57 -0
- package/dist/collection/common/mocks/threads.js.map +1 -0
- package/dist/collection/common/nylas-theme/index.js +4 -0
- package/dist/collection/common/nylas-theme/index.js.map +1 -0
- package/dist/collection/common/register-component.js +134 -0
- package/dist/collection/common/register-component.js.map +1 -0
- package/dist/collection/common/types.js +2 -0
- package/dist/collection/common/types.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-composer/nylas-composer.css +89 -0
- package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js +241 -0
- package/dist/collection/components/mailbox/nylas-composer/nylas-composer.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-composer/test/nylas-composer.e2e.js +10 -0
- package/dist/collection/components/mailbox/nylas-composer/test/nylas-composer.e2e.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-composer/test/nylas-composer.spec-disabled.js +12 -0
- package/dist/collection/components/mailbox/nylas-composer/test/nylas-composer.spec-disabled.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.css +37 -0
- package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js +193 -0
- package/dist/collection/components/mailbox/nylas-list-folders/nylas-list-folders.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-list-folders/test/nylas-list-folders.e2e.js +10 -0
- package/dist/collection/components/mailbox/nylas-list-folders/test/nylas-list-folders.e2e.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-list-folders/test/nylas-list-folders.spec.js +12 -0
- package/dist/collection/components/mailbox/nylas-list-folders/test/nylas-list-folders.spec.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.css +156 -0
- package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js +218 -0
- package/dist/collection/components/mailbox/nylas-list-threads/nylas-list-threads.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-list-threads/test/nylas-list-threads.e2e.js +22 -0
- package/dist/collection/components/mailbox/nylas-list-threads/test/nylas-list-threads.e2e.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-list-threads/test/nylas-list-threads.spec.js +25 -0
- package/dist/collection/components/mailbox/nylas-list-threads/test/nylas-list-threads.spec.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.css +3 -0
- package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js +474 -0
- package/dist/collection/components/mailbox/nylas-mailbox/nylas-mailbox.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-mailbox/test/nylas-mailbox.e2e.js +16 -0
- package/dist/collection/components/mailbox/nylas-mailbox/test/nylas-mailbox.e2e.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-mailbox/test/nylas-mailbox.spec.js +32 -0
- package/dist/collection/components/mailbox/nylas-mailbox/test/nylas-mailbox.spec.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.css +55 -0
- package/dist/collection/components/mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.js +371 -0
- package/dist/collection/components/mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-mailbox-pagination/test/nylas-mailbox-pagination.e2e.js +10 -0
- package/dist/collection/components/mailbox/nylas-mailbox-pagination/test/nylas-mailbox-pagination.e2e.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-mailbox-pagination/test/nylas-mailbox-pagination.spec.js +12 -0
- package/dist/collection/components/mailbox/nylas-mailbox-pagination/test/nylas-mailbox-pagination.spec.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.css +18 -0
- package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js +182 -0
- package/dist/collection/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.css +61 -0
- package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js +329 -0
- package/dist/collection/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-summarize-message-button/test/nylas-summarize-message-button.e2e.js +10 -0
- package/dist/collection/components/mailbox/nylas-summarize-message-button/test/nylas-summarize-message-button.e2e.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-summarize-message-button/test/nylas-summarize-message-button.spec.js +12 -0
- package/dist/collection/components/mailbox/nylas-summarize-message-button/test/nylas-summarize-message-button.spec.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.css +53 -0
- package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js +172 -0
- package/dist/collection/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-threads-refresh/test/nylas-threads-refresh.e2e.js +10 -0
- package/dist/collection/components/mailbox/nylas-threads-refresh/test/nylas-threads-refresh.e2e.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-threads-refresh/test/nylas-threads-refresh.spec.js +12 -0
- package/dist/collection/components/mailbox/nylas-threads-refresh/test/nylas-threads-refresh.spec.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.css +8 -0
- package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js +130 -0
- package/dist/collection/components/mailbox/nylas-threads-search/nylas-threads-search.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-threads-search/test/nylas-threads-search.e2e.js +10 -0
- package/dist/collection/components/mailbox/nylas-threads-search/test/nylas-threads-search.e2e.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-threads-search/test/nylas-threads-search.spec.js +12 -0
- package/dist/collection/components/mailbox/nylas-threads-search/test/nylas-threads-search.spec.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.css +43 -0
- package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js +282 -0
- package/dist/collection/components/mailbox/nylas-view-email/nylas-view-email.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.css +243 -0
- package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js +342 -0
- package/dist/collection/components/mailbox/nylas-view-thread/nylas-view-thread.js.map +1 -0
- package/dist/collection/components/mailbox/nylas-view-thread/view-thread-message.js +25 -0
- package/dist/collection/components/mailbox/nylas-view-thread/view-thread-message.js.map +1 -0
- package/dist/collection/components/nylas-if-state/nylas-if-state.css +84 -0
- package/dist/collection/components/nylas-if-state/nylas-if-state.js +241 -0
- package/dist/collection/components/nylas-if-state/nylas-if-state.js.map +1 -0
- package/dist/collection/components/nylas-if-state/test/nylas-if-state.e2e.js +10 -0
- package/dist/collection/components/nylas-if-state/test/nylas-if-state.e2e.js.map +1 -0
- package/dist/collection/components/nylas-if-state/test/nylas-if-state.spec.js +12 -0
- package/dist/collection/components/nylas-if-state/test/nylas-if-state.spec.js.map +1 -0
- package/dist/collection/components/nylas-login/nylas-login.css +94 -0
- package/dist/collection/components/nylas-login/nylas-login.js +289 -0
- package/dist/collection/components/nylas-login/nylas-login.js.map +1 -0
- package/dist/collection/components/nylas-login/test/nylas-login.e2e.js +10 -0
- package/dist/collection/components/nylas-login/test/nylas-login.e2e.js.map +1 -0
- package/dist/collection/components/nylas-login/test/nylas-login.spec.js +12 -0
- package/dist/collection/components/nylas-login/test/nylas-login.spec.js.map +1 -0
- package/dist/collection/components/nylas-provider/nylas-provider.css +3 -0
- package/dist/collection/components/nylas-provider/nylas-provider.js +423 -0
- package/dist/collection/components/nylas-provider/nylas-provider.js.map +1 -0
- package/dist/collection/components/nylas-provider/test/nylas-provider.e2e.js +10 -0
- package/dist/collection/components/nylas-provider/test/nylas-provider.e2e.js.map +1 -0
- package/dist/collection/components/nylas-provider/test/nylas-provider.spec.js +32 -0
- package/dist/collection/components/nylas-provider/test/nylas-provider.spec.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.css +155 -0
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js +178 -0
- package/dist/collection/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.css +129 -0
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +323 -0
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.css +78 -0
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +107 -0
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.css +150 -0
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js +213 -0
- package/dist/collection/components/scheduler/nylas-date-picker/nylas-date-picker.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.css +72 -0
- package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.js +147 -0
- package/dist/collection/components/scheduler/nylas-locale-switch/nylas-locale-switch.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.css +63 -0
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +132 -0
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-open-hours-picker/nylas-open-hours-picker.css +105 -0
- package/dist/collection/components/scheduler/nylas-open-hours-picker/nylas-open-hours-picker.js +460 -0
- package/dist/collection/components/scheduler/nylas-open-hours-picker/nylas-open-hours-picker.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-open-hours-picker/test/nylas-open-hours-picker.e2e.js +10 -0
- package/dist/collection/components/scheduler/nylas-open-hours-picker/test/nylas-open-hours-picker.e2e.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-open-hours-picker/test/nylas-open-hours-picker.spec.js +12 -0
- package/dist/collection/components/scheduler/nylas-open-hours-picker/test/nylas-open-hours-picker.spec.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduler.css +182 -0
- package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduler.js +533 -0
- package/dist/collection/components/scheduler/nylas-scheduler/nylas-scheduler.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-scheduler/scheduler-view.js +6 -0
- package/dist/collection/components/scheduler/nylas-scheduler/scheduler-view.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.css +63 -0
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +150 -0
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js.map +1 -0
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.css +115 -0
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js +311 -0
- package/dist/collection/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.js.map +1 -0
- package/dist/collection/connector/connector-interface.js +2 -0
- package/dist/collection/connector/connector-interface.js.map +1 -0
- package/dist/collection/connector/nylas-connector/index.js +78 -0
- package/dist/collection/connector/nylas-connector/index.js.map +1 -0
- package/dist/collection/connector/nylas-mailbox-connector/index.js +62 -0
- package/dist/collection/connector/nylas-mailbox-connector/index.js.map +1 -0
- package/dist/collection/connector/nylas-scheduler-connector/index.js +43 -0
- package/dist/collection/connector/nylas-scheduler-connector/index.js.map +1 -0
- package/dist/collection/connector/shared/api/auth.js +60 -0
- package/dist/collection/connector/shared/api/auth.js.map +1 -0
- package/dist/collection/connector/shared/api/folders.js +33 -0
- package/dist/collection/connector/shared/api/folders.js.map +1 -0
- package/dist/collection/connector/shared/api/messages.js +95 -0
- package/dist/collection/connector/shared/api/messages.js.map +1 -0
- package/dist/collection/connector/shared/api/scheduler.js +203 -0
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -0
- package/dist/collection/connector/shared/api/threads.js +165 -0
- package/dist/collection/connector/shared/api/threads.js.map +1 -0
- package/dist/collection/index.js +4 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/routers/hash-router.js +109 -0
- package/dist/collection/routers/hash-router.js.map +1 -0
- package/dist/collection/routers/router-interface.js +2 -0
- package/dist/collection/routers/router-interface.js.map +1 -0
- package/dist/collection/stores/auth-store.js +18 -0
- package/dist/collection/stores/auth-store.js.map +1 -0
- package/dist/collection/stores/mailbox-store.js +42 -0
- package/dist/collection/stores/mailbox-store.js.map +1 -0
- package/dist/collection/stores/scheduler-store.js +44 -0
- package/dist/collection/stores/scheduler-store.js.map +1 -0
- package/dist/collection/utils/color-utils.js +161 -0
- package/dist/collection/utils/color-utils.js.map +1 -0
- package/dist/collection/utils/utils.js +157 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/collection/utils/utils.spec.js +16 -0
- package/dist/collection/utils/utils.spec.js.map +1 -0
- package/dist/components/_commonjsHelpers.js +20 -0
- package/dist/components/_commonjsHelpers.js.map +1 -0
- package/dist/components/archive-icon.d.ts +11 -0
- package/dist/components/archive-icon.js +8 -0
- package/dist/components/archive-icon.js.map +1 -0
- package/dist/components/archive.js +37 -0
- package/dist/components/archive.js.map +1 -0
- package/dist/components/arrow-icon.d.ts +11 -0
- package/dist/components/arrow-icon.js +8 -0
- package/dist/components/arrow-icon.js.map +1 -0
- package/dist/components/arrow.js +37 -0
- package/dist/components/arrow.js.map +1 -0
- package/dist/components/assets/chevron.svg +3 -0
- package/dist/components/bold-icon.d.ts +11 -0
- package/dist/components/bold-icon.js +8 -0
- package/dist/components/bold-icon.js.map +1 -0
- package/dist/components/bold.js +37 -0
- package/dist/components/bold.js.map +1 -0
- package/dist/components/calendar-cancel-icon.d.ts +11 -0
- package/dist/components/calendar-cancel-icon.js +8 -0
- package/dist/components/calendar-cancel-icon.js.map +1 -0
- package/dist/components/calendar-cancel.js +37 -0
- package/dist/components/calendar-cancel.js.map +1 -0
- package/dist/components/calendar-check-icon.d.ts +11 -0
- package/dist/components/calendar-check-icon.js +8 -0
- package/dist/components/calendar-check-icon.js.map +1 -0
- package/dist/components/calendar-check.js +37 -0
- package/dist/components/calendar-check.js.map +1 -0
- package/dist/components/calendar-icon.d.ts +11 -0
- package/dist/components/calendar-icon.js +8 -0
- package/dist/components/calendar-icon.js.map +1 -0
- package/dist/components/calendar.js +37 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/checkmark-circle-icon.d.ts +11 -0
- package/dist/components/checkmark-circle-icon.js +8 -0
- package/dist/components/checkmark-circle-icon.js.map +1 -0
- package/dist/components/checkmark-circle.js +37 -0
- package/dist/components/checkmark-circle.js.map +1 -0
- package/dist/components/chevron-icon.d.ts +11 -0
- package/dist/components/chevron-icon.js +8 -0
- package/dist/components/chevron-icon.js.map +1 -0
- package/dist/components/chevron.js +37 -0
- package/dist/components/chevron.js.map +1 -0
- package/dist/components/close-icon.d.ts +11 -0
- package/dist/components/close-icon.js +8 -0
- package/dist/components/close-icon.js.map +1 -0
- package/dist/components/close.js +37 -0
- package/dist/components/close.js.map +1 -0
- package/dist/components/constants.js +7296 -0
- package/dist/components/constants.js.map +1 -0
- package/dist/components/define-element.js +40 -0
- package/dist/components/define-element.js.map +1 -0
- package/dist/components/document-refresh-icon.d.ts +11 -0
- package/dist/components/document-refresh-icon.js +40 -0
- package/dist/components/document-refresh-icon.js.map +1 -0
- package/dist/components/duration.js +78 -0
- package/dist/components/duration.js.map +1 -0
- package/dist/components/elements.js +21583 -0
- package/dist/components/elements.js.map +1 -0
- package/dist/components/flow.js +888 -0
- package/dist/components/flow.js.map +1 -0
- package/dist/components/focus-visible.js +325 -0
- package/dist/components/focus-visible.js.map +1 -0
- package/dist/components/folder-icon.d.ts +11 -0
- package/dist/components/folder-icon.js +8 -0
- package/dist/components/folder-icon.js.map +1 -0
- package/dist/components/folder.js +37 -0
- package/dist/components/folder.js.map +1 -0
- package/dist/components/forward-icon.d.ts +11 -0
- package/dist/components/forward-icon.js +8 -0
- package/dist/components/forward-icon.js.map +1 -0
- package/dist/components/forward.js +37 -0
- package/dist/components/forward.js.map +1 -0
- package/dist/components/globe-icon.d.ts +11 -0
- package/dist/components/globe-icon.js +8 -0
- package/dist/components/globe-icon.js.map +1 -0
- package/dist/components/globe.js +37 -0
- package/dist/components/globe.js.map +1 -0
- package/dist/components/inbox-icon.d.ts +11 -0
- package/dist/components/inbox-icon.js +8 -0
- package/dist/components/inbox-icon.js.map +1 -0
- package/dist/components/inbox.js +37 -0
- package/dist/components/inbox.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.es.js +3211 -0
- package/dist/components/index.es.js.map +1 -0
- package/dist/components/index.js +16 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index2.js +196 -0
- package/dist/components/index2.js.map +1 -0
- package/dist/components/italic-icon.d.ts +11 -0
- package/dist/components/italic-icon.js +8 -0
- package/dist/components/italic-icon.js.map +1 -0
- package/dist/components/italic.js +37 -0
- package/dist/components/italic.js.map +1 -0
- package/dist/components/loading-icon.d.ts +11 -0
- package/dist/components/loading-icon.js +8 -0
- package/dist/components/loading-icon.js.map +1 -0
- package/dist/components/loading.js +38 -0
- package/dist/components/loading.js.map +1 -0
- package/dist/components/mailbox-store.js +521 -0
- package/dist/components/mailbox-store.js.map +1 -0
- package/dist/components/nylas-booked-event-card.d.ts +11 -0
- package/dist/components/nylas-booked-event-card.js +8 -0
- package/dist/components/nylas-booked-event-card.js.map +1 -0
- package/dist/components/nylas-booked-event-card2.js +121 -0
- package/dist/components/nylas-booked-event-card2.js.map +1 -0
- package/dist/components/nylas-booking-form.d.ts +11 -0
- package/dist/components/nylas-booking-form.js +8 -0
- package/dist/components/nylas-booking-form.js.map +1 -0
- package/dist/components/nylas-booking-form2.js +224 -0
- package/dist/components/nylas-booking-form2.js.map +1 -0
- package/dist/components/nylas-cancelled-event-card.d.ts +11 -0
- package/dist/components/nylas-cancelled-event-card.js +8 -0
- package/dist/components/nylas-cancelled-event-card.js.map +1 -0
- package/dist/components/nylas-cancelled-event-card2.js +85 -0
- package/dist/components/nylas-cancelled-event-card2.js.map +1 -0
- package/dist/components/nylas-composer.d.ts +11 -0
- package/dist/components/nylas-composer.js +8 -0
- package/dist/components/nylas-composer.js.map +1 -0
- package/dist/components/nylas-composer2.js +186 -0
- package/dist/components/nylas-composer2.js.map +1 -0
- package/dist/components/nylas-date-picker.d.ts +11 -0
- package/dist/components/nylas-date-picker.js +8 -0
- package/dist/components/nylas-date-picker.js.map +1 -0
- package/dist/components/nylas-date-picker2.js +150 -0
- package/dist/components/nylas-date-picker2.js.map +1 -0
- package/dist/components/nylas-if-state.d.ts +11 -0
- package/dist/components/nylas-if-state.js +153 -0
- package/dist/components/nylas-if-state.js.map +1 -0
- package/dist/components/nylas-list-folders.d.ts +11 -0
- package/dist/components/nylas-list-folders.js +183 -0
- package/dist/components/nylas-list-folders.js.map +1 -0
- package/dist/components/nylas-list-threads.d.ts +11 -0
- package/dist/components/nylas-list-threads.js +109 -0
- package/dist/components/nylas-list-threads.js.map +1 -0
- package/dist/components/nylas-locale-switch.d.ts +11 -0
- package/dist/components/nylas-locale-switch.js +8 -0
- package/dist/components/nylas-locale-switch.js.map +1 -0
- package/dist/components/nylas-locale-switch2.js +103 -0
- package/dist/components/nylas-locale-switch2.js.map +1 -0
- package/dist/components/nylas-login.d.ts +11 -0
- package/dist/components/nylas-login.js +127 -0
- package/dist/components/nylas-login.js.map +1 -0
- package/dist/components/nylas-logo.d.ts +11 -0
- package/dist/components/nylas-logo.js +8 -0
- package/dist/components/nylas-logo.js.map +1 -0
- package/dist/components/nylas-logo2.js +37 -0
- package/dist/components/nylas-logo2.js.map +1 -0
- package/dist/components/nylas-mailbox-pagination.d.ts +11 -0
- package/dist/components/nylas-mailbox-pagination.js +175 -0
- package/dist/components/nylas-mailbox-pagination.js.map +1 -0
- package/dist/components/nylas-mailbox-toolbar-button.d.ts +11 -0
- package/dist/components/nylas-mailbox-toolbar-button.js +119 -0
- package/dist/components/nylas-mailbox-toolbar-button.js.map +1 -0
- package/dist/components/nylas-mailbox.d.ts +11 -0
- package/dist/components/nylas-mailbox.js +219 -0
- package/dist/components/nylas-mailbox.js.map +1 -0
- package/dist/components/nylas-notification.d.ts +11 -0
- package/dist/components/nylas-notification.js +8 -0
- package/dist/components/nylas-notification.js.map +1 -0
- package/dist/components/nylas-notification2.js +90 -0
- package/dist/components/nylas-notification2.js.map +1 -0
- package/dist/components/nylas-open-hours-picker.d.ts +11 -0
- package/dist/components/nylas-open-hours-picker.js +365 -0
- package/dist/components/nylas-open-hours-picker.js.map +1 -0
- package/dist/components/nylas-provider.d.ts +11 -0
- package/dist/components/nylas-provider.js +206 -0
- package/dist/components/nylas-provider.js.map +1 -0
- package/dist/components/nylas-scheduler.d.ts +11 -0
- package/dist/components/nylas-scheduler.js +392 -0
- package/dist/components/nylas-scheduler.js.map +1 -0
- package/dist/components/nylas-selected-event-card.d.ts +11 -0
- package/dist/components/nylas-selected-event-card.js +8 -0
- package/dist/components/nylas-selected-event-card.js.map +1 -0
- package/dist/components/nylas-selected-event-card2.js +110 -0
- package/dist/components/nylas-selected-event-card2.js.map +1 -0
- package/dist/components/nylas-summarize-message-button.d.ts +11 -0
- package/dist/components/nylas-summarize-message-button.js +8 -0
- package/dist/components/nylas-summarize-message-button.js.map +1 -0
- package/dist/components/nylas-summarize-message-button2.js +233 -0
- package/dist/components/nylas-summarize-message-button2.js.map +1 -0
- package/dist/components/nylas-threads-refresh.d.ts +11 -0
- package/dist/components/nylas-threads-refresh.js +149 -0
- package/dist/components/nylas-threads-refresh.js.map +1 -0
- package/dist/components/nylas-threads-search.d.ts +11 -0
- package/dist/components/nylas-threads-search.js +103 -0
- package/dist/components/nylas-threads-search.js.map +1 -0
- package/dist/components/nylas-timeslot-picker.d.ts +11 -0
- package/dist/components/nylas-timeslot-picker.js +8 -0
- package/dist/components/nylas-timeslot-picker.js.map +1 -0
- package/dist/components/nylas-timeslot-picker2.js +174 -0
- package/dist/components/nylas-timeslot-picker2.js.map +1 -0
- package/dist/components/nylas-view-email.d.ts +11 -0
- package/dist/components/nylas-view-email.js +8 -0
- package/dist/components/nylas-view-email.js.map +1 -0
- package/dist/components/nylas-view-email2.js +1859 -0
- package/dist/components/nylas-view-email2.js.map +1 -0
- package/dist/components/nylas-view-thread.d.ts +11 -0
- package/dist/components/nylas-view-thread.js +338 -0
- package/dist/components/nylas-view-thread.js.map +1 -0
- package/dist/components/people-icon.d.ts +11 -0
- package/dist/components/people-icon.js +8 -0
- package/dist/components/people-icon.js.map +1 -0
- package/dist/components/people.js +37 -0
- package/dist/components/people.js.map +1 -0
- package/dist/components/play-icon.d.ts +11 -0
- package/dist/components/play-icon.js +8 -0
- package/dist/components/play-icon.js.map +1 -0
- package/dist/components/play.js +37 -0
- package/dist/components/play.js.map +1 -0
- package/dist/components/property.js +36 -0
- package/dist/components/property.js.map +1 -0
- package/dist/components/refresh-icon.d.ts +11 -0
- package/dist/components/refresh-icon.js +8 -0
- package/dist/components/refresh-icon.js.map +1 -0
- package/dist/components/refresh.js +37 -0
- package/dist/components/refresh.js.map +1 -0
- package/dist/components/register-component.js +138 -0
- package/dist/components/register-component.js.map +1 -0
- package/dist/components/reply-all-icon.d.ts +11 -0
- package/dist/components/reply-all-icon.js +8 -0
- package/dist/components/reply-all-icon.js.map +1 -0
- package/dist/components/reply-all.js +37 -0
- package/dist/components/reply-all.js.map +1 -0
- package/dist/components/reply-icon.d.ts +11 -0
- package/dist/components/reply-icon.js +8 -0
- package/dist/components/reply-icon.js.map +1 -0
- package/dist/components/reply.js +37 -0
- package/dist/components/reply.js.map +1 -0
- package/dist/components/scheduler-store.js +251 -0
- package/dist/components/scheduler-store.js.map +1 -0
- package/dist/components/sent-icon.d.ts +11 -0
- package/dist/components/sent-icon.js +8 -0
- package/dist/components/sent-icon.js.map +1 -0
- package/dist/components/sent.js +37 -0
- package/dist/components/sent.js.map +1 -0
- package/dist/components/sp-icon-chevron-left.js +23 -0
- package/dist/components/sp-icon-chevron-left.js.map +1 -0
- package/dist/components/spam-icon.d.ts +11 -0
- package/dist/components/spam-icon.js +8 -0
- package/dist/components/spam-icon.js.map +1 -0
- package/dist/components/spam.js +37 -0
- package/dist/components/spam.js.map +1 -0
- package/dist/components/star-icon.d.ts +11 -0
- package/dist/components/star-icon.js +8 -0
- package/dist/components/star-icon.js.map +1 -0
- package/dist/components/star.js +37 -0
- package/dist/components/star.js.map +1 -0
- package/dist/components/stop-icon.d.ts +11 -0
- package/dist/components/stop-icon.js +8 -0
- package/dist/components/stop-icon.js.map +1 -0
- package/dist/components/stop.js +37 -0
- package/dist/components/stop.js.map +1 -0
- package/dist/components/translate-icon.d.ts +11 -0
- package/dist/components/translate-icon.js +8 -0
- package/dist/components/translate-icon.js.map +1 -0
- package/dist/components/translate.js +37 -0
- package/dist/components/translate.js.map +1 -0
- package/dist/components/trash-icon.d.ts +11 -0
- package/dist/components/trash-icon.js +8 -0
- package/dist/components/trash-icon.js.map +1 -0
- package/dist/components/trash.js +37 -0
- package/dist/components/trash.js.map +1 -0
- package/dist/components/underline-icon.d.ts +11 -0
- package/dist/components/underline-icon.js +8 -0
- package/dist/components/underline-icon.js.map +1 -0
- package/dist/components/underline.js +37 -0
- package/dist/components/underline.js.map +1 -0
- package/dist/components/utils.js +140 -0
- package/dist/components/utils.js.map +1 -0
- package/dist/components/warning-icon.d.ts +11 -0
- package/dist/components/warning-icon.js +8 -0
- package/dist/components/warning-icon.js.map +1 -0
- package/dist/components/warning.js +37 -0
- package/dist/components/warning.js.map +1 -0
- package/dist/esm/_commonjsHelpers-57e89916.js +20 -0
- package/dist/esm/_commonjsHelpers-57e89916.js.map +1 -0
- package/dist/esm/app-globals-47969cee.js +9 -0
- package/dist/esm/app-globals-47969cee.js.map +1 -0
- package/dist/esm/archive-icon_7.entry.js +110 -0
- package/dist/esm/archive-icon_7.entry.js.map +1 -0
- package/dist/esm/arrow-icon.entry.js +20 -0
- package/dist/esm/arrow-icon.entry.js.map +1 -0
- package/dist/esm/bold-icon_3.entry.js +50 -0
- package/dist/esm/bold-icon_3.entry.js.map +1 -0
- package/dist/esm/calendar-cancel-icon.entry.js +20 -0
- package/dist/esm/calendar-cancel-icon.entry.js.map +1 -0
- package/dist/esm/calendar-check-icon_3.entry.js +50 -0
- package/dist/esm/calendar-check-icon_3.entry.js.map +1 -0
- package/dist/esm/calendar-icon.entry.js +20 -0
- package/dist/esm/calendar-icon.entry.js.map +1 -0
- package/dist/esm/chevron-icon.entry.js +20 -0
- package/dist/esm/chevron-icon.entry.js.map +1 -0
- package/dist/esm/close-icon_2.entry.js +35 -0
- package/dist/esm/close-icon_2.entry.js.map +1 -0
- package/dist/esm/document-refresh-icon.entry.js +20 -0
- package/dist/esm/document-refresh-icon.entry.js.map +1 -0
- package/dist/esm/duration-bddc4a13.js +78 -0
- package/dist/esm/duration-bddc4a13.js.map +1 -0
- package/dist/esm/elements-60ebdb01.js +21583 -0
- package/dist/esm/elements-60ebdb01.js.map +1 -0
- package/dist/esm/flow-40ff9cea.js +888 -0
- package/dist/esm/flow-40ff9cea.js.map +1 -0
- package/dist/esm/focus-visible-e8093c16.js +325 -0
- package/dist/esm/focus-visible-e8093c16.js.map +1 -0
- package/dist/esm/forward-icon_6.entry.js +2207 -0
- package/dist/esm/forward-icon_6.entry.js.map +1 -0
- package/dist/esm/globe-icon.entry.js +20 -0
- package/dist/esm/globe-icon.entry.js.map +1 -0
- package/dist/esm/index-2b85580a.js +196 -0
- package/dist/esm/index-2b85580a.js.map +1 -0
- package/dist/esm/index-b2270b4a.js +2141 -0
- package/dist/esm/index-b2270b4a.js.map +1 -0
- package/dist/esm/index.es-6f3582a1.js +3211 -0
- package/dist/esm/index.es-6f3582a1.js.map +1 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/loading-icon.entry.js +20 -0
- package/dist/esm/loading-icon.entry.js.map +1 -0
- package/dist/esm/mailbox-store-0019772c.js +521 -0
- package/dist/esm/mailbox-store-0019772c.js.map +1 -0
- package/dist/esm/nylas-booked-event-card_9.entry.js +8115 -0
- package/dist/esm/nylas-booked-event-card_9.entry.js.map +1 -0
- package/dist/esm/nylas-if-state_3.entry.js +403 -0
- package/dist/esm/nylas-if-state_3.entry.js.map +1 -0
- package/dist/esm/nylas-list-folders.entry.js +116 -0
- package/dist/esm/nylas-list-folders.entry.js.map +1 -0
- package/dist/esm/nylas-list-threads.entry.js +85 -0
- package/dist/esm/nylas-list-threads.entry.js.map +1 -0
- package/dist/esm/nylas-mailbox-pagination.entry.js +136 -0
- package/dist/esm/nylas-mailbox-pagination.entry.js.map +1 -0
- package/dist/esm/nylas-mailbox-toolbar-button.entry.js +96 -0
- package/dist/esm/nylas-mailbox-toolbar-button.entry.js.map +1 -0
- package/dist/esm/nylas-open-hours-picker.entry.js +329 -0
- package/dist/esm/nylas-open-hours-picker.entry.js.map +1 -0
- package/dist/esm/nylas-provider.entry.js +180 -0
- package/dist/esm/nylas-provider.entry.js.map +1 -0
- package/dist/esm/nylas-scheduler.entry.js +238 -0
- package/dist/esm/nylas-scheduler.entry.js.map +1 -0
- package/dist/esm/nylas-threads-refresh.entry.js +114 -0
- package/dist/esm/nylas-threads-refresh.entry.js.map +1 -0
- package/dist/esm/nylas-threads-search.entry.js +80 -0
- package/dist/esm/nylas-threads-search.entry.js.map +1 -0
- package/dist/esm/nylas-view-thread.entry.js +230 -0
- package/dist/esm/nylas-view-thread.entry.js.map +1 -0
- package/dist/esm/nylas-web-elements.js +22 -0
- package/dist/esm/nylas-web-elements.js.map +1 -0
- package/dist/esm/play-icon_2.entry.js +35 -0
- package/dist/esm/play-icon_2.entry.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/property-0065dde7.js +36 -0
- package/dist/esm/property-0065dde7.js.map +1 -0
- package/dist/esm/refresh-icon.entry.js +20 -0
- package/dist/esm/refresh-icon.entry.js.map +1 -0
- package/dist/esm/register-component-55376f31.js +138 -0
- package/dist/esm/register-component-55376f31.js.map +1 -0
- package/dist/esm/scheduler-store-5a39585a.js +251 -0
- package/dist/esm/scheduler-store-5a39585a.js.map +1 -0
- package/dist/esm/translate-icon.entry.js +20 -0
- package/dist/esm/translate-icon.entry.js.map +1 -0
- package/dist/esm/utils-5074a070.js +140 -0
- package/dist/esm/utils-5074a070.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/nylas-web-elements/index.esm.js +2 -0
- package/dist/nylas-web-elements/index.esm.js.map +1 -0
- package/dist/nylas-web-elements/nylas-web-elements.css +239 -0
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +2 -0
- package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -0
- package/dist/nylas-web-elements/p-06974d68.js +2 -0
- package/dist/nylas-web-elements/p-06974d68.js.map +1 -0
- package/dist/nylas-web-elements/p-113fe52e.entry.js +2 -0
- package/dist/nylas-web-elements/p-113fe52e.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-16fb3c85.entry.js +2 -0
- package/dist/nylas-web-elements/p-16fb3c85.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-24c42c37.entry.js +2 -0
- package/dist/nylas-web-elements/p-24c42c37.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-2881b62f.js +16519 -0
- package/dist/nylas-web-elements/p-2881b62f.js.map +1 -0
- package/dist/nylas-web-elements/p-33da6cf1.entry.js +2 -0
- package/dist/nylas-web-elements/p-33da6cf1.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-37f99b96.entry.js +2 -0
- package/dist/nylas-web-elements/p-37f99b96.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-3bc3426e.entry.js +2 -0
- package/dist/nylas-web-elements/p-3bc3426e.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-3c8822f1.entry.js +2 -0
- package/dist/nylas-web-elements/p-3c8822f1.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-5770704d.js +2 -0
- package/dist/nylas-web-elements/p-5770704d.js.map +1 -0
- package/dist/nylas-web-elements/p-5862975b.js +2 -0
- package/dist/nylas-web-elements/p-5862975b.js.map +1 -0
- package/dist/nylas-web-elements/p-647cf7be.entry.js +2 -0
- package/dist/nylas-web-elements/p-647cf7be.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-663edeb8.entry.js +2 -0
- package/dist/nylas-web-elements/p-663edeb8.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-67c9158e.entry.js +2 -0
- package/dist/nylas-web-elements/p-67c9158e.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-6ba7a037.js +2 -0
- package/dist/nylas-web-elements/p-6ba7a037.js.map +1 -0
- package/dist/nylas-web-elements/p-6da0b8f0.entry.js +2 -0
- package/dist/nylas-web-elements/p-6da0b8f0.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-6df00ba0.js +27 -0
- package/dist/nylas-web-elements/p-6df00ba0.js.map +1 -0
- package/dist/nylas-web-elements/p-74141ef6.entry.js +2 -0
- package/dist/nylas-web-elements/p-74141ef6.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-85d41197.entry.js +2 -0
- package/dist/nylas-web-elements/p-85d41197.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-97518578.entry.js +2 -0
- package/dist/nylas-web-elements/p-97518578.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-98ec4a7a.js +2 -0
- package/dist/nylas-web-elements/p-98ec4a7a.js.map +1 -0
- package/dist/nylas-web-elements/p-998d25d5.entry.js +2 -0
- package/dist/nylas-web-elements/p-998d25d5.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-a7bfd3af.entry.js +77 -0
- package/dist/nylas-web-elements/p-a7bfd3af.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-a95208c7.js +2 -0
- package/dist/nylas-web-elements/p-a95208c7.js.map +1 -0
- package/dist/nylas-web-elements/p-adacdaeb.entry.js +2 -0
- package/dist/nylas-web-elements/p-adacdaeb.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-b7d4b7b5.entry.js +2 -0
- package/dist/nylas-web-elements/p-b7d4b7b5.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-b85dfeac.entry.js +2 -0
- package/dist/nylas-web-elements/p-b85dfeac.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-b96b37f1.entry.js +2 -0
- package/dist/nylas-web-elements/p-b96b37f1.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-c2e69618.entry.js +2 -0
- package/dist/nylas-web-elements/p-c2e69618.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-c440f148.entry.js +2 -0
- package/dist/nylas-web-elements/p-c440f148.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-c66e27d0.js +3 -0
- package/dist/nylas-web-elements/p-c66e27d0.js.map +1 -0
- package/dist/nylas-web-elements/p-c685e944.entry.js +3 -0
- package/dist/nylas-web-elements/p-c685e944.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-cb65c223.js +2 -0
- package/dist/nylas-web-elements/p-cb65c223.js.map +1 -0
- package/dist/nylas-web-elements/p-cc21d351.js +17 -0
- package/dist/nylas-web-elements/p-cc21d351.js.map +1 -0
- package/dist/nylas-web-elements/p-d4b1e3e4.entry.js +2 -0
- package/dist/nylas-web-elements/p-d4b1e3e4.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-db24cc70.entry.js +2 -0
- package/dist/nylas-web-elements/p-db24cc70.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-de1bcc4a.js +2 -0
- package/dist/nylas-web-elements/p-de1bcc4a.js.map +1 -0
- package/dist/nylas-web-elements/p-df9f71ea.js +2 -0
- package/dist/nylas-web-elements/p-df9f71ea.js.map +1 -0
- package/dist/nylas-web-elements/p-eeb0a591.js +2 -0
- package/dist/nylas-web-elements/p-eeb0a591.js.map +1 -0
- package/dist/nylas-web-elements/p-f029c1b7.entry.js +2 -0
- package/dist/nylas-web-elements/p-f029c1b7.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-f9a4758a.entry.js +2 -0
- package/dist/nylas-web-elements/p-f9a4758a.entry.js.map +1 -0
- package/dist/types/common/abstract-provider.d.ts +52 -0
- package/dist/types/common/component-types.d.ts +22 -0
- package/dist/types/common/constants.d.ts +6 -0
- package/dist/types/common/global.d.ts +1 -0
- package/dist/types/common/icons/archive.d.ts +5 -0
- package/dist/types/common/icons/arrow.d.ts +5 -0
- package/dist/types/common/icons/bold.d.ts +5 -0
- package/dist/types/common/icons/calendar-cancel.d.ts +5 -0
- package/dist/types/common/icons/calendar-check.d.ts +5 -0
- package/dist/types/common/icons/calendar.d.ts +5 -0
- package/dist/types/common/icons/checkmark-circle.d.ts +5 -0
- package/dist/types/common/icons/chevron.d.ts +5 -0
- package/dist/types/common/icons/close.d.ts +5 -0
- package/dist/types/common/icons/document-refresh.d.ts +5 -0
- package/dist/types/common/icons/folder.d.ts +5 -0
- package/dist/types/common/icons/forward.d.ts +5 -0
- package/dist/types/common/icons/globe.d.ts +5 -0
- package/dist/types/common/icons/inbox.d.ts +5 -0
- package/dist/types/common/icons/italic.d.ts +5 -0
- package/dist/types/common/icons/loading.d.ts +5 -0
- package/dist/types/common/icons/nylas-logo.d.ts +5 -0
- package/dist/types/common/icons/people.d.ts +5 -0
- package/dist/types/common/icons/play.d.ts +5 -0
- package/dist/types/common/icons/refresh.d.ts +5 -0
- package/dist/types/common/icons/reply-all.d.ts +5 -0
- package/dist/types/common/icons/reply.d.ts +5 -0
- package/dist/types/common/icons/sent.d.ts +5 -0
- package/dist/types/common/icons/spam.d.ts +5 -0
- package/dist/types/common/icons/star.d.ts +5 -0
- package/dist/types/common/icons/stop.d.ts +5 -0
- package/dist/types/common/icons/translate.d.ts +5 -0
- package/dist/types/common/icons/trash.d.ts +5 -0
- package/dist/types/common/icons/underline.d.ts +5 -0
- package/dist/types/common/icons/warning.d.ts +5 -0
- package/dist/types/common/mocks/threads.d.ts +3 -0
- package/dist/types/common/nylas-theme/index.d.ts +27 -0
- package/dist/types/common/register-component.d.ts +29 -0
- package/dist/types/common/types.d.ts +108 -0
- package/dist/types/components/mailbox/nylas-composer/nylas-composer.d.ts +22 -0
- package/dist/types/components/mailbox/nylas-composer/test/nylas-composer.spec-disabled.d.ts +1 -0
- package/dist/types/components/mailbox/nylas-list-folders/nylas-list-folders.d.ts +19 -0
- package/dist/types/components/mailbox/nylas-list-threads/nylas-list-threads.d.ts +19 -0
- package/dist/types/components/mailbox/nylas-mailbox/nylas-mailbox.d.ts +35 -0
- package/dist/types/components/mailbox/nylas-mailbox-pagination/nylas-mailbox-pagination.d.ts +30 -0
- package/dist/types/components/mailbox/nylas-mailbox-toolbar-button/nylas-mailbox-toolbar-button.d.ts +26 -0
- package/dist/types/components/mailbox/nylas-summarize-message-button/nylas-summarize-message-button.d.ts +25 -0
- package/dist/types/components/mailbox/nylas-threads-refresh/nylas-threads-refresh.d.ts +23 -0
- package/dist/types/components/mailbox/nylas-threads-search/nylas-threads-search.d.ts +13 -0
- package/dist/types/components/mailbox/nylas-view-email/nylas-view-email.d.ts +25 -0
- package/dist/types/components/mailbox/nylas-view-thread/nylas-view-thread.d.ts +30 -0
- package/dist/types/components/mailbox/nylas-view-thread/view-thread-message.d.ts +12 -0
- package/dist/types/components/nylas-if-state/nylas-if-state.d.ts +22 -0
- package/dist/types/components/nylas-login/nylas-login.d.ts +26 -0
- package/dist/types/components/nylas-provider/nylas-provider.d.ts +35 -0
- package/dist/types/components/scheduler/nylas-booked-event-card/nylas-booked-event-card.d.ts +22 -0
- package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +33 -0
- package/dist/types/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.d.ts +13 -0
- package/dist/types/components/scheduler/nylas-date-picker/nylas-date-picker.d.ts +19 -0
- package/dist/types/components/scheduler/nylas-locale-switch/nylas-locale-switch.d.ts +13 -0
- package/dist/types/components/scheduler/nylas-notification/nylas-notification.d.ts +13 -0
- package/dist/types/components/scheduler/nylas-open-hours-picker/nylas-open-hours-picker.d.ts +40 -0
- package/dist/types/components/scheduler/nylas-scheduler/nylas-scheduler.d.ts +41 -0
- package/dist/types/components/scheduler/nylas-scheduler/scheduler-view.d.ts +6 -0
- package/dist/types/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.d.ts +15 -0
- package/dist/types/components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker.d.ts +28 -0
- package/dist/types/components.d.ts +2123 -0
- package/dist/types/connector/connector-interface.d.ts +35 -0
- package/dist/types/connector/nylas-connector/index.d.ts +59 -0
- package/dist/types/connector/nylas-mailbox-connector/index.d.ts +52 -0
- package/dist/types/connector/nylas-scheduler-connector/index.d.ts +24 -0
- package/dist/types/connector/shared/api/auth.d.ts +13 -0
- package/dist/types/connector/shared/api/folders.d.ts +10 -0
- package/dist/types/connector/shared/api/messages.d.ts +13 -0
- package/dist/types/connector/shared/api/scheduler.d.ts +29 -0
- package/dist/types/connector/shared/api/threads.d.ts +20 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/routers/hash-router.d.ts +21 -0
- package/dist/types/routers/router-interface.d.ts +16 -0
- package/dist/types/stencil-public-runtime.d.ts +1681 -0
- package/dist/types/stores/auth-store.d.ts +9 -0
- package/dist/types/stores/mailbox-store.d.ts +19 -0
- package/dist/types/stores/scheduler-store.d.ts +32 -0
- package/dist/types/utils/color-utils.d.ts +9 -0
- package/dist/types/utils/utils.d.ts +28 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +69 -0
- package/readme.md +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"nylas-mailbox-toolbar-button.js","mappings":";;;;AAAA,MAAM,4BAA4B,GAAG,6XAA6X,CAAC;AACna,wCAAe,4BAA4B;;;;;;;;;;;;;;;;MCoB9BA,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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gBAAgB,EAAE,iBAAiB,CAAC;QACvD,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YAChC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAA6B,CAAC;YACpE,KAAK,GAAG,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,SAAS,GAAG,KAAK,CAAC;SACpE;QACD,MAAM,GAAG,GAAG,KAAK,GAAG,eAAe,GAAG,aAAa,CAAC;QACpD,QACE,EAAC,IAAI,uDACH,iEAAU,KAAK,EAAC,QAAQ,EAAC,KAAK,EAAC,MAAM,IACnC,iBAAW,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,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}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface NylasMailbox extends Components.NylasMailbox, HTMLElement {}
|
|
4
|
+
export const NylasMailbox: {
|
|
5
|
+
prototype: NylasMailbox;
|
|
6
|
+
new (): NylasMailbox;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { N as NylasBaseProvider, e as es } from './index.es.js';
|
|
3
|
+
import { d as debug } from './utils.js';
|
|
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
|
+
|
|
6
|
+
class NylasMailboxConnector {
|
|
7
|
+
constructor(router, nylasAuth, nylasAuthStore, nylasStore) {
|
|
8
|
+
this.router = router;
|
|
9
|
+
this.nylasAuth = nylasAuth;
|
|
10
|
+
this.nylasAuthStore = nylasAuthStore;
|
|
11
|
+
this.nylasMailboxStore = nylasStore;
|
|
12
|
+
}
|
|
13
|
+
init() {
|
|
14
|
+
debug('NylasMailboxConnector init');
|
|
15
|
+
}
|
|
16
|
+
get mailboxStore() {
|
|
17
|
+
return this.nylasMailboxStore;
|
|
18
|
+
}
|
|
19
|
+
get authStore() {
|
|
20
|
+
return this.nylasAuthStore;
|
|
21
|
+
}
|
|
22
|
+
get auth() {
|
|
23
|
+
if (this._authConnector) {
|
|
24
|
+
return this._authConnector;
|
|
25
|
+
}
|
|
26
|
+
this._authConnector = new NylasAuthConnector(this.nylasAuth, this.nylasAuthStore);
|
|
27
|
+
return this._authConnector;
|
|
28
|
+
}
|
|
29
|
+
get threads() {
|
|
30
|
+
if (this._threadConnector) {
|
|
31
|
+
return this._threadConnector;
|
|
32
|
+
}
|
|
33
|
+
this._threadConnector = new NylasThreadsConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore, this.router);
|
|
34
|
+
return this._threadConnector;
|
|
35
|
+
}
|
|
36
|
+
get messages() {
|
|
37
|
+
if (this._messageConnector) {
|
|
38
|
+
return this._messageConnector;
|
|
39
|
+
}
|
|
40
|
+
this._messageConnector = new NylasMessagesConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore);
|
|
41
|
+
return this._messageConnector;
|
|
42
|
+
}
|
|
43
|
+
get folders() {
|
|
44
|
+
if (this._foldersConnector) {
|
|
45
|
+
return this._foldersConnector;
|
|
46
|
+
}
|
|
47
|
+
this._foldersConnector = new NylasFoldersConnector(this.nylasAuth, this.nylasAuthStore, this.nylasMailboxStore);
|
|
48
|
+
return this._foldersConnector;
|
|
49
|
+
}
|
|
50
|
+
getAuth() {
|
|
51
|
+
return this.nylasAuth;
|
|
52
|
+
}
|
|
53
|
+
resetStores() {
|
|
54
|
+
this.nylasMailboxStore.reset();
|
|
55
|
+
this.nylasAuthStore.reset();
|
|
56
|
+
}
|
|
57
|
+
async logout() {
|
|
58
|
+
await this.nylasAuth.logout();
|
|
59
|
+
this.resetStores();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const nylasMailboxCss = ":host{display:contents}";
|
|
64
|
+
const NylasMailboxStyle0 = nylasMailboxCss;
|
|
65
|
+
|
|
66
|
+
const NylasMailbox$1 = proxyCustomElement(class NylasMailbox extends HTMLElement {
|
|
67
|
+
constructor() {
|
|
68
|
+
super();
|
|
69
|
+
this.__registerHost();
|
|
70
|
+
this.__attachShadow();
|
|
71
|
+
this.init = createEvent(this, "init", 7);
|
|
72
|
+
this.loggedIn = createEvent(this, "loggedIn", 7);
|
|
73
|
+
this.loggedOut = createEvent(this, "loggedOut", 7);
|
|
74
|
+
this.handleAuthChange = async (isAuthenticated) => {
|
|
75
|
+
if (isAuthenticated) {
|
|
76
|
+
this.loggedIn.emit(this.host);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
const loggedOutEvent = this.loggedOut.emit(this.host);
|
|
80
|
+
if (!loggedOutEvent.defaultPrevented) {
|
|
81
|
+
await this.nylasMailboxConnector?.logout();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
this.automaticComponentRegistration = true;
|
|
86
|
+
this.eventOverrides = {};
|
|
87
|
+
this.authConfig = undefined;
|
|
88
|
+
this.defaultAuthStoreState = undefined;
|
|
89
|
+
this.defaultMailboxStoreState = undefined;
|
|
90
|
+
}
|
|
91
|
+
connectedCallback() {
|
|
92
|
+
debug('[nylas-mailbox] connectedCallback');
|
|
93
|
+
}
|
|
94
|
+
async componentWillLoad() {
|
|
95
|
+
this.stores = {
|
|
96
|
+
auth: CreateNylasAuthStore(this.defaultAuthStoreState),
|
|
97
|
+
mailbox: CreateNylasMailboxStore(this.defaultMailboxStoreState),
|
|
98
|
+
};
|
|
99
|
+
this.baseProvider = new NylasBaseProvider(this.host, this.stores, this.automaticComponentRegistration, this.eventOverrides);
|
|
100
|
+
this.router = new HashRouter();
|
|
101
|
+
this.nylasAuth = es({
|
|
102
|
+
apiUri: 'https://api.us.nylas.com',
|
|
103
|
+
elementsApiUri: 'https://elements.us.nylas.com',
|
|
104
|
+
storageType: 'indexeddb',
|
|
105
|
+
clientId: 'YOUR_CLIENT_ID',
|
|
106
|
+
defaultScopes: [],
|
|
107
|
+
redirectURI: '/',
|
|
108
|
+
...this.authConfig,
|
|
109
|
+
});
|
|
110
|
+
const authStore = this.baseProvider?.getStore('auth');
|
|
111
|
+
if (!authStore) {
|
|
112
|
+
throw new Error('Auth store is not defined');
|
|
113
|
+
}
|
|
114
|
+
const mailboxStore = this.baseProvider?.getStore('mailbox');
|
|
115
|
+
if (!mailboxStore) {
|
|
116
|
+
throw new Error('Mailbox store is not defined');
|
|
117
|
+
}
|
|
118
|
+
this.nylasMailboxConnector = new NylasMailboxConnector(this.router, this.nylasAuth, authStore, mailboxStore);
|
|
119
|
+
const initEvent = this.init.emit(this.host);
|
|
120
|
+
if (!initEvent.defaultPrevented) {
|
|
121
|
+
await this.nylasMailboxConnector?.auth.validateSession();
|
|
122
|
+
}
|
|
123
|
+
this.router?.addRouteChangeListener(`/thread/:threadId`, async (_route, _path, routeParams) => {
|
|
124
|
+
const threadId = routeParams.threadId;
|
|
125
|
+
const thread = await this.nylasMailboxConnector?.threads.getThread(threadId);
|
|
126
|
+
if (thread) {
|
|
127
|
+
this.nylasMailboxConnector?.mailboxStore.set('selectedThread', thread);
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
this.router?.addRouteChangeListener(`/`, async (_route, _path, _routeParams) => {
|
|
131
|
+
if (!authStore.state.isAuthenticated) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
this.nylasMailboxConnector?.threads.unSelectThread();
|
|
135
|
+
this.nylasMailboxConnector?.folders.getFolders();
|
|
136
|
+
const queryParams = window.location.hash.split('?')[1];
|
|
137
|
+
if (queryParams) {
|
|
138
|
+
const params = new URLSearchParams(queryParams);
|
|
139
|
+
const searchQuery = params.get('query');
|
|
140
|
+
if (searchQuery) {
|
|
141
|
+
await this.nylasMailboxConnector?.threads.getThreads({
|
|
142
|
+
search_query_native: searchQuery,
|
|
143
|
+
page_token: undefined,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
this.nylasMailboxConnector?.threads.getThreads();
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
this.router?.init();
|
|
152
|
+
this.handleAuthChange(authStore.state.isAuthenticated);
|
|
153
|
+
this.baseProvider?.componentWillLoad(this.nylasMailboxConnector);
|
|
154
|
+
}
|
|
155
|
+
async componentDidLoad() {
|
|
156
|
+
const authStore = this.baseProvider?.getStore('auth');
|
|
157
|
+
if (!authStore) {
|
|
158
|
+
throw new Error('Auth store is not defined');
|
|
159
|
+
}
|
|
160
|
+
authStore.onChange('isAuthenticated', this.handleAuthChange);
|
|
161
|
+
this.baseProvider?.componentDidLoad();
|
|
162
|
+
}
|
|
163
|
+
componentDisconnected() {
|
|
164
|
+
this.baseProvider?.componentDisconnected();
|
|
165
|
+
}
|
|
166
|
+
async registerComponentHandler(event) {
|
|
167
|
+
this.baseProvider?.registerComponent(event.detail);
|
|
168
|
+
}
|
|
169
|
+
async unregisterComponentHandler(event) {
|
|
170
|
+
this.baseProvider?.unregisterComponent(event.detail);
|
|
171
|
+
}
|
|
172
|
+
async getMailboxStore() {
|
|
173
|
+
return this.baseProvider?.getStore('mailbox');
|
|
174
|
+
}
|
|
175
|
+
async getAuthStore() {
|
|
176
|
+
return this.baseProvider?.getStore('auth');
|
|
177
|
+
}
|
|
178
|
+
async getNylasAuth() {
|
|
179
|
+
return this.nylasAuth;
|
|
180
|
+
}
|
|
181
|
+
async getNylasMailboxConnector() {
|
|
182
|
+
return this.nylasMailboxConnector;
|
|
183
|
+
}
|
|
184
|
+
render() {
|
|
185
|
+
return (h(Host, { key: '08e87a3218f672e8944102d626b690aefb3bab3f' }, h("slot", { key: '05ab1ca1539a00ea199bb9cb25c8b96af8d6ab66' })));
|
|
186
|
+
}
|
|
187
|
+
get host() { return this; }
|
|
188
|
+
static get style() { return NylasMailboxStyle0; }
|
|
189
|
+
}, [1, "nylas-mailbox", {
|
|
190
|
+
"automaticComponentRegistration": [4, "automatic-component-registration"],
|
|
191
|
+
"eventOverrides": [16],
|
|
192
|
+
"authConfig": [16],
|
|
193
|
+
"defaultAuthStoreState": [16],
|
|
194
|
+
"defaultMailboxStoreState": [16],
|
|
195
|
+
"getMailboxStore": [64],
|
|
196
|
+
"getAuthStore": [64],
|
|
197
|
+
"getNylasAuth": [64],
|
|
198
|
+
"getNylasMailboxConnector": [64]
|
|
199
|
+
}, [[0, "registerComponent", "registerComponentHandler"], [0, "unregisterComponent", "unregisterComponentHandler"]]]);
|
|
200
|
+
function defineCustomElement$1() {
|
|
201
|
+
if (typeof customElements === "undefined") {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const components = ["nylas-mailbox"];
|
|
205
|
+
components.forEach(tagName => { switch (tagName) {
|
|
206
|
+
case "nylas-mailbox":
|
|
207
|
+
if (!customElements.get(tagName)) {
|
|
208
|
+
customElements.define(tagName, NylasMailbox$1);
|
|
209
|
+
}
|
|
210
|
+
break;
|
|
211
|
+
} });
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const NylasMailbox = NylasMailbox$1;
|
|
215
|
+
const defineCustomElement = defineCustomElement$1;
|
|
216
|
+
|
|
217
|
+
export { NylasMailbox, defineCustomElement };
|
|
218
|
+
|
|
219
|
+
//# sourceMappingURL=nylas-mailbox.js.map
|
|
@@ -0,0 +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,IAA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AC,MAAM,CAAC,CAAC;KACpD;IASD,MAAM,0BAA0B,CAAC,KAAiD;QAChF,IAAI,CAAC,YAAY,EAAE,mBAAmB,CAAC,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 { AuthConfg, 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?: AuthConfg;\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}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface NylasNotification extends Components.NylasNotification, HTMLElement {}
|
|
4
|
+
export const NylasNotification: {
|
|
5
|
+
prototype: NylasNotification;
|
|
6
|
+
new (): NylasNotification;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { N as NylasNotification$1, d as defineCustomElement$1 } from './nylas-notification2.js';
|
|
2
|
+
|
|
3
|
+
const NylasNotification = NylasNotification$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { NylasNotification, defineCustomElement };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=nylas-notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"nylas-notification.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host, Fragment } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as debug } from './utils.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './close.js';
|
|
4
|
+
import { d as defineCustomElement$1 } from './warning.js';
|
|
5
|
+
|
|
6
|
+
const nylasNotificationCss = ":host{display:block;position:absolute;top:1.5rem;right:1.5rem}.notif{display:flex;width:280px;padding:16px;align-items:flex-start;gap:16px;border-radius:8px;border:1.5px solid var(--nylas-error);background:var(--nylas-base-0)}.notif .content{display:flex;flex-direction:row;gap:8px}.notif .content .message{font-size:14px;font-weight:400;color:var(--nylas-base-800)}.notif .content .message .title{font-size:16px;font-weight:600;color:var(--nylas-base-950);display:inline-block}.notif .content .message .description{font-size:14px;font-weight:400;color:var(--nylas-base-800);display:inline-block}.notif .content .icon.error{color:var(--nylas-error)}.notif.nylasSchedulerError{border-color:var(--nylas-error)}.notif.nylasSchedulerWarning{border-color:var(--nylas-warning)}.notif.nylasSchedulerInfo{border-color:var(--nylas-info)}.notif.nylasSchedulerSuccess{border-color:var(--nylas-success)}.notif .dismiss-btn{background:none;border:none;color:var(--nylas-base-950);cursor:pointer;position:absolute;right:0.5rem;top:0.5rem}";
|
|
7
|
+
const NylasNotificationStyle0 = nylasNotificationCss;
|
|
8
|
+
|
|
9
|
+
const NylasNotification = proxyCustomElement(class NylasNotification extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
14
|
+
this.ttl = 5000;
|
|
15
|
+
this.allowedCategories = ['invalid_session', 'api', 'validation', 'internal'];
|
|
16
|
+
this.notifications = [];
|
|
17
|
+
}
|
|
18
|
+
onError(event) {
|
|
19
|
+
debug(`[nylas-notification] Error: ${event.detail.title}`);
|
|
20
|
+
this.handleNotification(event);
|
|
21
|
+
}
|
|
22
|
+
onWarning(event) {
|
|
23
|
+
debug(`[nylas-notification] Warning: ${event.detail.title}`);
|
|
24
|
+
this.handleNotification(event);
|
|
25
|
+
}
|
|
26
|
+
onInfo(event) {
|
|
27
|
+
debug(`[nylas-notification] Info: ${event.detail.title}`);
|
|
28
|
+
this.handleNotification(event);
|
|
29
|
+
}
|
|
30
|
+
onSuccess(event) {
|
|
31
|
+
debug(`[nylas-notification] Success: ${event.detail.title}`);
|
|
32
|
+
this.handleNotification(event);
|
|
33
|
+
}
|
|
34
|
+
handleNotification(event) {
|
|
35
|
+
if (event.defaultPrevented) {
|
|
36
|
+
debug(`[nylas-notification] Event default prevented`);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (this.ttl === 0) {
|
|
40
|
+
debug(`[nylas-notification] TTL is 0`);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (this.allowedCategories.length > 0 && !this.allowedCategories.includes(event.detail.category)) {
|
|
44
|
+
debug(`[nylas-notification] Category not allowed`);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.notifications = [...this.notifications, { ...event.detail }];
|
|
48
|
+
window.setTimeout(() => {
|
|
49
|
+
this.notifications = this.notifications.filter(notif => notif.id !== event.detail.id);
|
|
50
|
+
}, this.ttl);
|
|
51
|
+
}
|
|
52
|
+
dismissNotification(id) {
|
|
53
|
+
this.notifications = this.notifications.filter(notif => notif.id !== id);
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
return (h(Host, { key: 'abda5c2bf1feeda4561e4890dccf507062394cc5' }, h(Fragment, { key: '9eced3033f89523cf7a074d4e1c0d1ecec51b933' }, 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: 'a36441dda5f17822b9954f71aa35e8dae759e2dc' }))));
|
|
57
|
+
}
|
|
58
|
+
static get style() { return NylasNotificationStyle0; }
|
|
59
|
+
}, [1, "nylas-notification", {
|
|
60
|
+
"ttl": [2],
|
|
61
|
+
"allowedCategories": [16],
|
|
62
|
+
"notifications": [32]
|
|
63
|
+
}, [[16, "nylasSchedulerError", "onError"], [16, "nylasSchedulerWarning", "onWarning"], [16, "nylasSchedulerInfo", "onInfo"], [16, "nylasSchedulerSuccess", "onSuccess"]]]);
|
|
64
|
+
function defineCustomElement() {
|
|
65
|
+
if (typeof customElements === "undefined") {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const components = ["nylas-notification", "close-icon", "warning-icon"];
|
|
69
|
+
components.forEach(tagName => { switch (tagName) {
|
|
70
|
+
case "nylas-notification":
|
|
71
|
+
if (!customElements.get(tagName)) {
|
|
72
|
+
customElements.define(tagName, NylasNotification);
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
case "close-icon":
|
|
76
|
+
if (!customElements.get(tagName)) {
|
|
77
|
+
defineCustomElement$2();
|
|
78
|
+
}
|
|
79
|
+
break;
|
|
80
|
+
case "warning-icon":
|
|
81
|
+
if (!customElements.get(tagName)) {
|
|
82
|
+
defineCustomElement$1();
|
|
83
|
+
}
|
|
84
|
+
break;
|
|
85
|
+
} });
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { NylasNotification as N, defineCustomElement as d };
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=nylas-notification2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"nylas-notification2.js","mappings":";;;;;AAAA,MAAM,oBAAoB,GAAG,kgCAAkgC,CAAC;AAChiC,gCAAe,oBAAoB;;MCQtB,iBAAiB;;;;;mBACN,IAAI;iCACY,CAAC,iBAAiB,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC;6BAEjD,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,CA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,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":[":host {\n display: block;\n position: absolute;\n top: 1.5rem;\n right: 1.5rem;\n}\n.notif {\n display: flex;\n width: 280px;\n padding: 16px;\n align-items: flex-start;\n gap: 16px;\n border-radius: 8px;\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: inline-block;\n }\n .description {\n font-size: 14px;\n font-weight: 400;\n color: var(--nylas-base-800);\n display: inline-block;\n }\n }\n .icon {\n &.error {\n color: var(--nylas-error);\n }\n }\n }\n &.nylasSchedulerError {\n border-color: var(--nylas-error);\n }\n &.nylasSchedulerWarning {\n border-color: var(--nylas-warning);\n }\n &.nylasSchedulerInfo {\n border-color: var(--nylas-info);\n }\n &.nylasSchedulerSuccess {\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 position: absolute;\n right: 0.5rem;\n top: 0.5rem;\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@Component({\n tag: 'nylas-notification',\n styleUrl: 'nylas-notification.scss',\n shadow: true,\n})\nexport class NylasNotification {\n @Prop() ttl: number = 5000;\n @Prop() allowedCategories: string[] = ['invalid_session', 'api', 'validation', 'internal'];\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 window.setTimeout(() => {\n this.notifications = this.notifications.filter(notif => notif.id !== event.detail.id);\n }, this.ttl);\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}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface NylasOpenHoursPicker extends Components.NylasOpenHoursPicker, HTMLElement {}
|
|
4
|
+
export const NylasOpenHoursPicker: {
|
|
5
|
+
prototype: NylasOpenHoursPicker;
|
|
6
|
+
new (): NylasOpenHoursPicker;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|