@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,282 @@
|
|
|
1
|
+
import { processStyles } from "../../../utils/color-utils";
|
|
2
|
+
import { debug, detectHTMLOrPlainText, detectIfMessageIsHTML, parsePlainTextToHTML } from "../../../utils/utils";
|
|
3
|
+
import { Fragment, Host, h } from "@stencil/core";
|
|
4
|
+
import DOMPurify from "dompurify";
|
|
5
|
+
DOMPurify.addHook('afterSanitizeAttributes', function (node) {
|
|
6
|
+
if ('target' in node) {
|
|
7
|
+
node.setAttribute('target', '_blank');
|
|
8
|
+
node.setAttribute('rel', 'noopener');
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export class NylasViewEmail {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.htmlElement = document.createElement('html');
|
|
14
|
+
this.setBody = (body) => {
|
|
15
|
+
this.state = 'loading';
|
|
16
|
+
this.styles = [];
|
|
17
|
+
this.hoistedFontURLs = new Map();
|
|
18
|
+
this.sanitizedBody = '';
|
|
19
|
+
document.querySelectorAll('.nylas-view-email-font').forEach(link => {
|
|
20
|
+
link.remove();
|
|
21
|
+
});
|
|
22
|
+
const isHTML = this.message ? detectIfMessageIsHTML(this.message) : detectHTMLOrPlainText(body);
|
|
23
|
+
if (!isHTML) {
|
|
24
|
+
body = `<html><body>${parsePlainTextToHTML(body)}</body></html>`;
|
|
25
|
+
}
|
|
26
|
+
this.htmlElement.innerHTML = body;
|
|
27
|
+
if (this.detectDarkMode) {
|
|
28
|
+
processStyles(this.htmlElement);
|
|
29
|
+
}
|
|
30
|
+
this.htmlElement.querySelectorAll('link').forEach(link => {
|
|
31
|
+
console.debug(`[nylas-view-email] Hoisting link: ${link.getAttribute('href')}`);
|
|
32
|
+
if (link.getAttribute('rel') === 'stylesheet' && link.getAttribute('href')) {
|
|
33
|
+
const href = link.getAttribute('href');
|
|
34
|
+
if (href) {
|
|
35
|
+
const url = new URL(href, window.location.href);
|
|
36
|
+
if (url.protocol === 'https:' || url.protocol === 'http:') {
|
|
37
|
+
this.hoistedFontURLs.set(url.href, url.href);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
this.htmlElement.querySelectorAll('style').forEach(style => {
|
|
43
|
+
style.innerHTML.split('\n').forEach(line => {
|
|
44
|
+
const match = line.match(/@import url\((.*)\)/);
|
|
45
|
+
if (match) {
|
|
46
|
+
const url = new URL(match[1], window.location.href);
|
|
47
|
+
if (url.protocol === 'https:' || url.protocol === 'http:') {
|
|
48
|
+
this.hoistedFontURLs.set(url.href, url.href);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
style.innerHTML = style.innerHTML.replace('body', ':host');
|
|
53
|
+
this.styles.push(style);
|
|
54
|
+
style.remove();
|
|
55
|
+
});
|
|
56
|
+
this.htmlElement.querySelectorAll('a').forEach(a => {
|
|
57
|
+
a.setAttribute('target', '_blank');
|
|
58
|
+
});
|
|
59
|
+
const gmailQuote = this.htmlElement.querySelector('.gmail_quote');
|
|
60
|
+
if (gmailQuote) {
|
|
61
|
+
const toggleButton = document.createElement('button');
|
|
62
|
+
toggleButton.classList.add('nylas-view-email-toggle-button');
|
|
63
|
+
toggleButton.setAttribute('aria-label', 'Show quoted text');
|
|
64
|
+
toggleButton.innerText = '...';
|
|
65
|
+
gmailQuote.parentElement?.insertBefore(toggleButton, gmailQuote);
|
|
66
|
+
}
|
|
67
|
+
this.sanitizedBody = DOMPurify.sanitize(this.htmlElement.innerHTML);
|
|
68
|
+
this.hoistedFontURLs.forEach((url, _key) => {
|
|
69
|
+
const link = document.createElement('link');
|
|
70
|
+
link.setAttribute('rel', 'stylesheet');
|
|
71
|
+
link.setAttribute('href', url);
|
|
72
|
+
link.classList.add('nylas-view-email-font');
|
|
73
|
+
document.head.appendChild(link);
|
|
74
|
+
});
|
|
75
|
+
this.state = 'ready';
|
|
76
|
+
};
|
|
77
|
+
this.handleMobileSize = () => {
|
|
78
|
+
const vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
|
|
79
|
+
if (vw <= 768) {
|
|
80
|
+
const viewEmailReact = this.viewEmailElement?.getBoundingClientRect();
|
|
81
|
+
if (viewEmailReact && this.viewEmailElement && this.parent) {
|
|
82
|
+
if (viewEmailReact.width > vw) {
|
|
83
|
+
const parentElement = this.parent;
|
|
84
|
+
const parentReact = parentElement?.getBoundingClientRect();
|
|
85
|
+
debug('Parent width:', parentReact?.width, 'Parent height:', parentReact?.height);
|
|
86
|
+
debug('Parent client width:', parentElement.clientWidth, 'Parent client height:', parentElement.clientHeight);
|
|
87
|
+
const scaleX = parentReact.width / viewEmailReact.width;
|
|
88
|
+
const scaleY = parentReact.height / viewEmailReact.height;
|
|
89
|
+
const scale = Math.min(scaleX, scaleY);
|
|
90
|
+
debug('Scale:', scale);
|
|
91
|
+
this.viewEmailElement.style.setProperty('transform', `scale(${scale})`);
|
|
92
|
+
this.viewEmailElement.style.setProperty('transform-origin', `top left`);
|
|
93
|
+
this.viewEmailElement.style.setProperty('height', `${viewEmailReact.height * scale}px`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
this.viewEmailElement?.style.removeProperty('transform');
|
|
99
|
+
this.viewEmailElement?.style.removeProperty('transform-origin');
|
|
100
|
+
this.viewEmailElement?.style.removeProperty('height');
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
this.message = undefined;
|
|
104
|
+
this.parent = undefined;
|
|
105
|
+
this.attachments = [];
|
|
106
|
+
this.detectDarkMode = true;
|
|
107
|
+
this.state = 'loading';
|
|
108
|
+
this.sanitizedBody = '';
|
|
109
|
+
this.styles = [];
|
|
110
|
+
this.viewEmailElement = undefined;
|
|
111
|
+
this.hoistedFontURLs = new Map();
|
|
112
|
+
}
|
|
113
|
+
connectedCallback() { }
|
|
114
|
+
disconnectedCallback() {
|
|
115
|
+
debug(`[nylas-view-email] Component disconnected`);
|
|
116
|
+
this.state = 'loading';
|
|
117
|
+
this.styles = [];
|
|
118
|
+
this.hoistedFontURLs = new Map();
|
|
119
|
+
this.sanitizedBody = '';
|
|
120
|
+
document.querySelectorAll('.nylas-view-email-font').forEach(link => {
|
|
121
|
+
link.remove();
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
async componentWillLoad() {
|
|
125
|
+
debug(`[nylas-view-email] component loaded`);
|
|
126
|
+
this.setBody(this.message?.body ?? '');
|
|
127
|
+
}
|
|
128
|
+
async componentDidLoad() {
|
|
129
|
+
debug(`[nylas-view-thread] Component did load`);
|
|
130
|
+
this.handleMobileSize();
|
|
131
|
+
}
|
|
132
|
+
async messageChanged() {
|
|
133
|
+
debug(`[nylas-view-thread] Message changed`, { message: this.message });
|
|
134
|
+
this.setBody(this.message?.body ?? '');
|
|
135
|
+
}
|
|
136
|
+
handleScroll() {
|
|
137
|
+
this.handleMobileSize();
|
|
138
|
+
}
|
|
139
|
+
viewEmailElementChanged() {
|
|
140
|
+
const toggleButton = this.viewEmailElement?.querySelectorAll('.nylas-view-email-toggle-button');
|
|
141
|
+
if (toggleButton) {
|
|
142
|
+
toggleButton.forEach(button => {
|
|
143
|
+
button.addEventListener('click', () => {
|
|
144
|
+
const gmailQuote = this.viewEmailElement?.querySelector('.gmail_quote');
|
|
145
|
+
if (gmailQuote) {
|
|
146
|
+
gmailQuote.classList.toggle('show');
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
render() {
|
|
153
|
+
console.debug(`[nylas-view-email] render`, { hoistedFontURLs: this.hoistedFontURLs });
|
|
154
|
+
return (h(Host, { key: 'c32409cd5bf30781d0d400103e9715bf48e13b23' }, this.state === 'loading' && h("div", null, "Loading..."), this.state === 'ready' && (h(Fragment, null, this.styles.map(style => (h("style", null, DOMPurify.sanitize(style.innerHTML)))), h("div", { class: 'view-email', part: "view-email", innerHTML: this.sanitizedBody, ref: el => (this.viewEmailElement = el) })))));
|
|
155
|
+
}
|
|
156
|
+
static get is() { return "nylas-view-email"; }
|
|
157
|
+
static get encapsulation() { return "shadow"; }
|
|
158
|
+
static get originalStyleUrls() {
|
|
159
|
+
return {
|
|
160
|
+
"$": ["nylas-view-email.scss"]
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
static get styleUrls() {
|
|
164
|
+
return {
|
|
165
|
+
"$": ["nylas-view-email.css"]
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
static get properties() {
|
|
169
|
+
return {
|
|
170
|
+
"message": {
|
|
171
|
+
"type": "unknown",
|
|
172
|
+
"mutable": false,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "Message",
|
|
175
|
+
"resolved": "Message | undefined",
|
|
176
|
+
"references": {
|
|
177
|
+
"Message": {
|
|
178
|
+
"location": "import",
|
|
179
|
+
"path": "@nylas/core",
|
|
180
|
+
"id": "../nylas-js-core/dist/index.d.ts::Message"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"required": false,
|
|
185
|
+
"optional": true,
|
|
186
|
+
"docs": {
|
|
187
|
+
"tags": [],
|
|
188
|
+
"text": ""
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"parent": {
|
|
192
|
+
"type": "unknown",
|
|
193
|
+
"mutable": false,
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "HTMLElement",
|
|
196
|
+
"resolved": "HTMLElement | undefined",
|
|
197
|
+
"references": {
|
|
198
|
+
"HTMLElement": {
|
|
199
|
+
"location": "global",
|
|
200
|
+
"id": "global::HTMLElement"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"required": false,
|
|
205
|
+
"optional": true,
|
|
206
|
+
"docs": {
|
|
207
|
+
"tags": [],
|
|
208
|
+
"text": ""
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"attachments": {
|
|
212
|
+
"type": "unknown",
|
|
213
|
+
"mutable": false,
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "InternalAttachment[]",
|
|
216
|
+
"resolved": "InternalAttachment[]",
|
|
217
|
+
"references": {
|
|
218
|
+
"InternalAttachment": {
|
|
219
|
+
"location": "import",
|
|
220
|
+
"path": "@/common/types",
|
|
221
|
+
"id": "src/common/types.ts::InternalAttachment"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"required": false,
|
|
226
|
+
"optional": false,
|
|
227
|
+
"docs": {
|
|
228
|
+
"tags": [],
|
|
229
|
+
"text": ""
|
|
230
|
+
},
|
|
231
|
+
"defaultValue": "[]"
|
|
232
|
+
},
|
|
233
|
+
"detectDarkMode": {
|
|
234
|
+
"type": "boolean",
|
|
235
|
+
"mutable": false,
|
|
236
|
+
"complexType": {
|
|
237
|
+
"original": "boolean",
|
|
238
|
+
"resolved": "boolean",
|
|
239
|
+
"references": {}
|
|
240
|
+
},
|
|
241
|
+
"required": false,
|
|
242
|
+
"optional": false,
|
|
243
|
+
"docs": {
|
|
244
|
+
"tags": [],
|
|
245
|
+
"text": ""
|
|
246
|
+
},
|
|
247
|
+
"attribute": "detect-dark-mode",
|
|
248
|
+
"reflect": false,
|
|
249
|
+
"defaultValue": "true"
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
static get states() {
|
|
254
|
+
return {
|
|
255
|
+
"state": {},
|
|
256
|
+
"sanitizedBody": {},
|
|
257
|
+
"styles": {},
|
|
258
|
+
"viewEmailElement": {},
|
|
259
|
+
"hoistedFontURLs": {}
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
static get elementRef() { return "host"; }
|
|
263
|
+
static get watchers() {
|
|
264
|
+
return [{
|
|
265
|
+
"propName": "message",
|
|
266
|
+
"methodName": "messageChanged"
|
|
267
|
+
}, {
|
|
268
|
+
"propName": "viewEmailElement",
|
|
269
|
+
"methodName": "viewEmailElementChanged"
|
|
270
|
+
}];
|
|
271
|
+
}
|
|
272
|
+
static get listeners() {
|
|
273
|
+
return [{
|
|
274
|
+
"name": "resize",
|
|
275
|
+
"method": "handleScroll",
|
|
276
|
+
"target": "window",
|
|
277
|
+
"capture": false,
|
|
278
|
+
"passive": true
|
|
279
|
+
}];
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
//# sourceMappingURL=nylas-view-email.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nylas-view-email.js","sourceRoot":"","sources":["../../../../src/components/mailbox/nylas-view-email/nylas-view-email.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1G,OAAO,EAAE,SA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eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;QACtF,OAAO,CACL,EAAC,IAAI;YACF,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,4BAAqB;YACjD,IAAI,CAAC,KAAK,KAAK,OAAO,IAAI,CACzB,EAAC,QAAQ;gBACN,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACxB,iBAAQ,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAS,CACrD,CAAC;gBACF,WAAK,KAAK,EAAE,YAAY,EAAE,IAAI,EAAC,YAAY,EAAC,SAAS,EAAE,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,GAAI,CAC7G,CACZ,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { InternalAttachment } from '@/common/types';\nimport { processStyles } from '@/utils/color-utils';\nimport { debug, detectHTMLOrPlainText, detectIfMessageIsHTML, parsePlainTextToHTML } from '@/utils/utils';\nimport { Message } from '@nylas/core';\nimport { Component, Element, Fragment, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport DOMPurify from 'dompurify';\n\nDOMPurify.addHook('afterSanitizeAttributes', function (node) {\n // set all elements owning target to target=_blank\n if ('target' in node) {\n node.setAttribute('target', '_blank');\n node.setAttribute('rel', 'noopener');\n }\n});\n\n@Component({\n tag: 'nylas-view-email',\n styleUrl: 'nylas-view-email.scss',\n shadow: true,\n})\nexport class NylasViewEmail {\n @Element() readonly host!: HTMLDivElement;\n\n @Prop() readonly message?: Message;\n @Prop() readonly parent?: HTMLElement;\n @Prop() readonly attachments: InternalAttachment[] = [];\n @Prop() readonly detectDarkMode: boolean = true;\n\n @State() state: 'loading' | 'ready' = 'loading';\n @State() sanitizedBody: string = '';\n @State() styles: HTMLStyleElement[] = [];\n\n @State() private viewEmailElement?: HTMLDivElement;\n @State() private hoistedFontURLs: Map<string, string> = new Map();\n\n private readonly htmlElement: HTMLHtmlElement = document.createElement('html');\n\n connectedCallback() {}\n\n disconnectedCallback() {\n debug(`[nylas-view-email] Component disconnected`);\n this.state = 'loading';\n\n this.styles = [];\n this.hoistedFontURLs = new Map();\n this.sanitizedBody = '';\n\n // Find all hoisted font links and remove them\n document.querySelectorAll('.nylas-view-email-font').forEach(link => {\n link.remove();\n });\n }\n\n // TODO: We should obfuscate and randomize ids and classes\n async componentWillLoad() {\n debug(`[nylas-view-email] component loaded`);\n this.setBody(this.message?.body ?? '');\n }\n\n async componentDidLoad() {\n debug(`[nylas-view-thread] Component did load`);\n this.handleMobileSize();\n }\n\n @Watch('message')\n async messageChanged() {\n debug(`[nylas-view-thread] Message changed`, { message: this.message });\n this.setBody(this.message?.body ?? '');\n }\n\n private setBody = (body: string) => {\n this.state = 'loading';\n\n this.styles = [];\n this.hoistedFontURLs = new Map();\n this.sanitizedBody = '';\n\n // Find all hoisted font links and remove them\n document.querySelectorAll('.nylas-view-email-font').forEach(link => {\n link.remove();\n });\n\n // Detect if the body is HTML or plain text\n const isHTML = this.message ? detectIfMessageIsHTML(this.message) : detectHTMLOrPlainText(body);\n if (!isHTML) {\n body = `<html><body>${parsePlainTextToHTML(body)}</body></html>`;\n }\n\n this.htmlElement.innerHTML = body;\n\n // Applies styles to handle darkmode and other things\n if (this.detectDarkMode) {\n processStyles(this.htmlElement);\n }\n\n // Find any font links and hoist them to the parent\n this.htmlElement.querySelectorAll('link').forEach(link => {\n console.debug(`[nylas-view-email] Hoisting link: ${link.getAttribute('href')}`);\n if (link.getAttribute('rel') === 'stylesheet' && link.getAttribute('href')) {\n const href = link.getAttribute('href');\n if (href) {\n const url = new URL(href, window.location.href);\n if (url.protocol === 'https:' || url.protocol === 'http:') {\n this.hoistedFontURLs.set(url.href, url.href);\n }\n }\n }\n });\n\n // We need to take out all the styles fromm the email body\n // and inject them into the shadow dom, otherwise they will\n // not be applied\n this.htmlElement.querySelectorAll('style').forEach(style => {\n // Find any font links imported in the style\n style.innerHTML.split('\\n').forEach(line => {\n const match = line.match(/@import url\\((.*)\\)/);\n if (match) {\n const url = new URL(match[1], window.location.href);\n if (url.protocol === 'https:' || url.protocol === 'http:') {\n this.hoistedFontURLs.set(url.href, url.href);\n }\n }\n });\n\n // There is no body in shadow dom, so we replace it with :host\n style.innerHTML = style.innerHTML.replace('body', ':host');\n this.styles.push(style);\n\n // No need to keep the style in the body\n style.remove();\n });\n\n // We want all links to open in a new tab\n this.htmlElement.querySelectorAll('a').forEach(a => {\n a.setAttribute('target', '_blank');\n });\n\n // Find the first instance of `.gmail_quote` and append a toggle button to it\n // When the toggle button is clicked, a \"show\" class is appended to\n // `.gmail_quote` which shows/hides the rest of the email\n const gmailQuote = this.htmlElement.querySelector('.gmail_quote');\n if (gmailQuote) {\n const toggleButton = document.createElement('button');\n toggleButton.classList.add('nylas-view-email-toggle-button');\n toggleButton.setAttribute('aria-label', 'Show quoted text');\n toggleButton.innerText = '...';\n gmailQuote.parentElement?.insertBefore(toggleButton, gmailQuote);\n }\n\n // Sanitize the body before rendering it in the shadow dom\n this.sanitizedBody = DOMPurify.sanitize(this.htmlElement.innerHTML);\n\n // Set the fonts on the document head, with a class so we can remove them later\n this.hoistedFontURLs.forEach((url, _key) => {\n const link = document.createElement('link');\n link.setAttribute('rel', 'stylesheet');\n link.setAttribute('href', url);\n link.classList.add('nylas-view-email-font');\n document.head.appendChild(link);\n });\n\n this.state = 'ready';\n };\n\n @Listen('resize', { target: 'window' })\n handleScroll() {\n this.handleMobileSize();\n }\n\n @Watch('viewEmailElement')\n viewEmailElementChanged() {\n // If the view email element changes, find all instances of\n // .nylas-view-email-toggle-button and add a click handler to them\n // that toggles the .show class on .gmail_quote\n const toggleButton = this.viewEmailElement?.querySelectorAll('.nylas-view-email-toggle-button');\n if (toggleButton) {\n toggleButton.forEach(button => {\n button.addEventListener('click', () => {\n const gmailQuote = this.viewEmailElement?.querySelector('.gmail_quote');\n if (gmailQuote) {\n gmailQuote.classList.toggle('show');\n }\n });\n });\n }\n }\n\n private handleMobileSize = () => {\n const vw = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n // Mobile size detection\n if (vw <= 768) {\n const viewEmailReact = this.viewEmailElement?.getBoundingClientRect();\n if (viewEmailReact && this.viewEmailElement && this.parent) {\n if (viewEmailReact.width > vw) {\n const parentElement = this.parent;\n const parentReact = parentElement?.getBoundingClientRect();\n debug('Parent width:', parentReact?.width, 'Parent height:', parentReact?.height);\n debug('Parent client width:', parentElement.clientWidth, 'Parent client height:', parentElement.clientHeight);\n\n const scaleX = parentReact.width / viewEmailReact.width;\n const scaleY = parentReact.height / viewEmailReact.height;\n const scale = Math.min(scaleX, scaleY);\n\n debug('Scale:', scale);\n\n this.viewEmailElement.style.setProperty('transform', `scale(${scale})`);\n this.viewEmailElement.style.setProperty('transform-origin', `top left`);\n this.viewEmailElement.style.setProperty('height', `${viewEmailReact.height * scale}px`);\n }\n }\n } else {\n this.viewEmailElement?.style.removeProperty('transform');\n this.viewEmailElement?.style.removeProperty('transform-origin');\n this.viewEmailElement?.style.removeProperty('height');\n }\n };\n\n render() {\n console.debug(`[nylas-view-email] render`, { hoistedFontURLs: this.hoistedFontURLs });\n return (\n <Host>\n {this.state === 'loading' && <div>Loading...</div>}\n {this.state === 'ready' && (\n <Fragment>\n {this.styles.map(style => (\n <style>{DOMPurify.sanitize(style.innerHTML)}</style>\n ))}\n <div class={'view-email'} part=\"view-email\" innerHTML={this.sanitizedBody} ref={el => (this.viewEmailElement = el)} />\n </Fragment>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
font-size: inherit;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.avatar {
|
|
7
|
+
z-index: 1;
|
|
8
|
+
border-radius: 100%;
|
|
9
|
+
background-color: var(--nylas-color-primary-200);
|
|
10
|
+
height: 40px;
|
|
11
|
+
width: 40px;
|
|
12
|
+
align-items: center;
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
border: 1px solid var(--nylas-color-primary-200);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.view-thread {
|
|
19
|
+
display: grid;
|
|
20
|
+
grid-auto-flow: row;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
.view-thread .header {
|
|
24
|
+
display: grid;
|
|
25
|
+
grid-gap: 1rem;
|
|
26
|
+
/* grid-auto-flow: row;
|
|
27
|
+
grid-auto-columns: fit-content(50%); */
|
|
28
|
+
align-items: center;
|
|
29
|
+
margin-bottom: 1rem;
|
|
30
|
+
}
|
|
31
|
+
.view-thread .header .subject {
|
|
32
|
+
font-size: 1.25rem;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
line-height: 1.5rem;
|
|
35
|
+
}
|
|
36
|
+
.view-thread .header .folders {
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-auto-flow: column;
|
|
39
|
+
grid-auto-columns: min-content;
|
|
40
|
+
overflow-x: auto;
|
|
41
|
+
gap: 1rem;
|
|
42
|
+
}
|
|
43
|
+
.view-thread .header .folders .folder {
|
|
44
|
+
padding: 0 0.5rem;
|
|
45
|
+
font-size: 0.9rem;
|
|
46
|
+
color: var(--nylas-color-primary-900);
|
|
47
|
+
background-color: var(--nylas-color-primary-300);
|
|
48
|
+
}
|
|
49
|
+
.view-thread .messages {
|
|
50
|
+
display: grid;
|
|
51
|
+
gap: 1rem;
|
|
52
|
+
}
|
|
53
|
+
.view-thread .messages hr {
|
|
54
|
+
margin: 0;
|
|
55
|
+
width: 100%;
|
|
56
|
+
border: 1px solid var(--nylas-color-primary-200);
|
|
57
|
+
}
|
|
58
|
+
.view-thread .messages hr:last-of-type {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
.view-thread .messages .message {
|
|
62
|
+
display: grid;
|
|
63
|
+
grid-auto-flow: row;
|
|
64
|
+
gap: 1rem;
|
|
65
|
+
}
|
|
66
|
+
.view-thread .messages .message:last-of-type .sub-header {
|
|
67
|
+
cursor: default;
|
|
68
|
+
}
|
|
69
|
+
.view-thread .messages .message .sub-header {
|
|
70
|
+
display: grid;
|
|
71
|
+
grid-template: "avatar from date buttons" "avatar to to buttons";
|
|
72
|
+
grid-column-gap: 1rem;
|
|
73
|
+
grid-template-columns: auto 1fr auto auto;
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
}
|
|
76
|
+
.view-thread .messages .message .sub-header > * {
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
}
|
|
79
|
+
.view-thread .messages .message .sub-header .avatar {
|
|
80
|
+
grid-area: avatar;
|
|
81
|
+
}
|
|
82
|
+
.view-thread .messages .message .sub-header .from {
|
|
83
|
+
grid-area: from;
|
|
84
|
+
}
|
|
85
|
+
.view-thread .messages .message .sub-header .from span.email {
|
|
86
|
+
display: none;
|
|
87
|
+
color: var(--nylas-color-primary-400);
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
}
|
|
90
|
+
.view-thread .messages .message .sub-header .buttons {
|
|
91
|
+
grid-area: buttons;
|
|
92
|
+
align-self: center;
|
|
93
|
+
}
|
|
94
|
+
.view-thread .messages .message .sub-header .buttons * {
|
|
95
|
+
pointer-events: all;
|
|
96
|
+
}
|
|
97
|
+
.view-thread .messages .message .sub-header .date {
|
|
98
|
+
grid-area: date;
|
|
99
|
+
align-self: center;
|
|
100
|
+
color: var(--nylas-color-primary-400);
|
|
101
|
+
}
|
|
102
|
+
.view-thread .messages .message .sub-header .snippet {
|
|
103
|
+
width: 90%;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
text-overflow: ellipsis;
|
|
107
|
+
color: var(--nylas-color-primary-600);
|
|
108
|
+
}
|
|
109
|
+
.view-thread .messages .message .sub-header .to {
|
|
110
|
+
grid-area: to;
|
|
111
|
+
color: var(--nylas-color-primary-400);
|
|
112
|
+
}
|
|
113
|
+
.view-thread .messages .message .sub-header .to > span {
|
|
114
|
+
color: var(--nylas-color-primary-400);
|
|
115
|
+
}
|
|
116
|
+
.view-thread .messages .message .sub-header .to button {
|
|
117
|
+
border: 0;
|
|
118
|
+
background-color: transparent;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
pointer-events: all;
|
|
121
|
+
padding: 0;
|
|
122
|
+
margin: 0;
|
|
123
|
+
}
|
|
124
|
+
.view-thread .messages .message .sub-header .to button > * {
|
|
125
|
+
pointer-events: none;
|
|
126
|
+
}
|
|
127
|
+
.view-thread .messages .message .sub-header .to button chevron-icon {
|
|
128
|
+
display: inline-table;
|
|
129
|
+
fill: var(--nylas-color-primary-400);
|
|
130
|
+
width: 15px;
|
|
131
|
+
height: 15px;
|
|
132
|
+
vertical-align: middle;
|
|
133
|
+
}
|
|
134
|
+
.view-thread .messages .message .sub-header .to button chevron-icon svg {
|
|
135
|
+
width: 15px;
|
|
136
|
+
height: 15px;
|
|
137
|
+
transform: rotate(90deg);
|
|
138
|
+
}
|
|
139
|
+
.view-thread .messages .message .sub-header .to button.expand--showContactData chevron-icon svg {
|
|
140
|
+
transform: rotate(270deg);
|
|
141
|
+
}
|
|
142
|
+
.view-thread .messages .message .address-info {
|
|
143
|
+
display: grid;
|
|
144
|
+
column-gap: 1rem;
|
|
145
|
+
row-gap: 0.5rem;
|
|
146
|
+
grid-template-columns: auto 1fr;
|
|
147
|
+
grid-template-rows: 1fr;
|
|
148
|
+
padding: 1rem 2rem;
|
|
149
|
+
border-radius: var(--nylas-border-radius-2x);
|
|
150
|
+
border: 1px solid var(--nylas-color-primary-200);
|
|
151
|
+
align-items: flex-start;
|
|
152
|
+
color: var(--nylas-color-primary-600);
|
|
153
|
+
}
|
|
154
|
+
.view-thread .messages .message .address-info .label {
|
|
155
|
+
color: var(--nylas-color-primary-400);
|
|
156
|
+
font-weight: 600;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.show-more {
|
|
160
|
+
position: relative;
|
|
161
|
+
display: flex;
|
|
162
|
+
width: 100%;
|
|
163
|
+
}
|
|
164
|
+
.show-more .sr-only {
|
|
165
|
+
display: none;
|
|
166
|
+
}
|
|
167
|
+
.show-more button {
|
|
168
|
+
position: relative;
|
|
169
|
+
display: inline-flex;
|
|
170
|
+
width: 100%;
|
|
171
|
+
padding: 0;
|
|
172
|
+
border: 0;
|
|
173
|
+
background-color: transparent;
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
text-align: left;
|
|
176
|
+
overflow: hidden;
|
|
177
|
+
}
|
|
178
|
+
.show-more button span {
|
|
179
|
+
border: 1px solid var(--nylas-color-primary-400);
|
|
180
|
+
}
|
|
181
|
+
.show-more button:hover span {
|
|
182
|
+
background-color: var(--nylas-color-primary-700);
|
|
183
|
+
}
|
|
184
|
+
.show-more button::after {
|
|
185
|
+
border-top: 1px solid rgba(100, 121, 143, 0.122);
|
|
186
|
+
border-bottom: 1px solid rgba(100, 121, 143, 0.122);
|
|
187
|
+
content: "";
|
|
188
|
+
height: 4px;
|
|
189
|
+
width: 100%;
|
|
190
|
+
position: absolute;
|
|
191
|
+
top: 50%;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.loading {
|
|
195
|
+
position: absolute;
|
|
196
|
+
width: 100%;
|
|
197
|
+
height: 100%;
|
|
198
|
+
background-color: var(--loading__background-color);
|
|
199
|
+
top: 0;
|
|
200
|
+
bottom: 0;
|
|
201
|
+
left: 0;
|
|
202
|
+
z-index: 1;
|
|
203
|
+
display: grid;
|
|
204
|
+
justify-content: center;
|
|
205
|
+
align-items: center;
|
|
206
|
+
font-weight: 600;
|
|
207
|
+
overflow: hidden;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.reply-buttons {
|
|
211
|
+
display: grid;
|
|
212
|
+
grid-auto-flow: column;
|
|
213
|
+
grid-auto-columns: min-content;
|
|
214
|
+
gap: 1rem;
|
|
215
|
+
margin-top: 1rem;
|
|
216
|
+
}
|
|
217
|
+
.reply-buttons sp-button {
|
|
218
|
+
border-radius: var(--nylas-border-radius);
|
|
219
|
+
background-color: var(--nylas-color-primary-400);
|
|
220
|
+
color: var(--nylas-color-primary-900);
|
|
221
|
+
fill: var(--nylas-color-primary-900);
|
|
222
|
+
}
|
|
223
|
+
.reply-buttons sp-button:hover {
|
|
224
|
+
background-color: var(--nylas-color-primary-500);
|
|
225
|
+
}
|
|
226
|
+
.reply-buttons sp-button:disabled {
|
|
227
|
+
background-color: var(--nylas-color-primary-200);
|
|
228
|
+
color: var(--nylas-color-primary-600);
|
|
229
|
+
cursor: not-allowed;
|
|
230
|
+
}
|
|
231
|
+
.reply-buttons sp-button chevron-icon {
|
|
232
|
+
display: inline-block;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* Extra small devices (phones, 600px and down) */
|
|
236
|
+
/* Small devices (portrait tablets and large phones, 600px and up) */
|
|
237
|
+
/* Medium devices (landscape tablets, 768px and up) */
|
|
238
|
+
@media only screen and (min-width: 768px) {
|
|
239
|
+
.view-thread .messages .message .sub-header .from span.email {
|
|
240
|
+
display: inline;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
/* Large devices (laptops/desktops, 992px and up) */
|