@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,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
class t{constructor(t){this._map=new Map;this._roundAverageSize=false;this.totalSize=0;if(t?.roundAverageSize===true){this._roundAverageSize=true}}set(t,i){const s=this._map.get(t)||0;this._map.set(t,i);this.totalSize+=i-s}get averageSize(){if(this._map.size>0){const t=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(t):t}return 0}getSize(t){return this._map.get(t)}clear(){this._map.clear();this.totalSize=0}}
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2021 Google LLC
|
|
10
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
+
*/function i(t){return t==="horizontal"?"width":"height"}class s{_getDefaultConfig(){return{direction:"vertical"}}constructor(t,i){this._latestCoords={left:0,top:0};this._direction=null;this._viewportSize={width:0,height:0};this.totalScrollSize={width:0,height:0};this.offsetWithinScroller={left:0,top:0};this._pendingReflow=false;this._pendingLayoutUpdate=false;this._pin=null;this._firstVisible=0;this._lastVisible=0;this._physicalMin=0;this._physicalMax=0;this._first=-1;this._last=-1;this._sizeDim="height";this._secondarySizeDim="width";this._positionDim="top";this._secondaryPositionDim="left";this._scrollPosition=0;this._scrollError=0;this._items=[];this._scrollSize=1;this._overhang=1e3;this._hostSink=t;Promise.resolve().then((()=>this.config=i||this._getDefaultConfig()))}set config(t){Object.assign(this,Object.assign({},this._getDefaultConfig(),t))}get config(){return{direction:this.direction}}get items(){return this._items}set items(t){this._setItems(t)}_setItems(t){if(t!==this._items){this._items=t;this._scheduleReflow()}}get direction(){return this._direction}set direction(t){t=t==="horizontal"?t:"vertical";if(t!==this._direction){this._direction=t;this._sizeDim=t==="horizontal"?"width":"height";this._secondarySizeDim=t==="horizontal"?"height":"width";this._positionDim=t==="horizontal"?"left":"top";this._secondaryPositionDim=t==="horizontal"?"top":"left";this._triggerReflow()}}get viewportSize(){return this._viewportSize}set viewportSize(t){const{_viewDim1:i,_viewDim2:s}=this;Object.assign(this._viewportSize,t);if(s!==this._viewDim2){this._scheduleLayoutUpdate()}else if(i!==this._viewDim1){this._checkThresholds()}}get viewportScroll(){return this._latestCoords}set viewportScroll(t){Object.assign(this._latestCoords,t);const i=this._scrollPosition;this._scrollPosition=this._latestCoords[this._positionDim];const s=Math.abs(i-this._scrollPosition);if(s>=1){this._checkThresholds()}}reflowIfNeeded(t=false){if(t||this._pendingReflow){this._pendingReflow=false;this._reflow()}}set pin(t){this._pin=t;this._triggerReflow()}get pin(){if(this._pin!==null){const{index:t,block:i}=this._pin;return{index:Math.max(0,Math.min(t,this.items.length-1)),block:i}}return null}_clampScrollPosition(t){return Math.max(-this.offsetWithinScroller[this._positionDim],Math.min(t,this.totalScrollSize[i(this.direction)]-this._viewDim1))}unpin(){if(this._pin!==null){this._sendUnpinnedMessage();this._pin=null}}_updateLayout(){}get _viewDim1(){return this._viewportSize[this._sizeDim]}get _viewDim2(){return this._viewportSize[this._secondarySizeDim]}_scheduleReflow(){this._pendingReflow=true}_scheduleLayoutUpdate(){this._pendingLayoutUpdate=true;this._scheduleReflow()}_triggerReflow(){this._scheduleLayoutUpdate();Promise.resolve().then((()=>this.reflowIfNeeded()))}_reflow(){if(this._pendingLayoutUpdate){this._updateLayout();this._pendingLayoutUpdate=false}this._updateScrollSize();this._setPositionFromPin();this._getActiveItems();this._updateVisibleIndices();this._sendStateChangedMessage()}_setPositionFromPin(){if(this.pin!==null){const t=this._scrollPosition;const{index:i,block:s}=this.pin;this._scrollPosition=this._calculateScrollIntoViewPosition({index:i,block:s||"start"})-this.offsetWithinScroller[this._positionDim];this._scrollError=t-this._scrollPosition}}_calculateScrollIntoViewPosition(t){const{block:i}=t;const s=Math.min(this.items.length,Math.max(0,t.index));const h=this._getItemPosition(s)[this._positionDim];let e=h;if(i!=="start"){const t=this._getItemSize(s)[this._sizeDim];if(i==="center"){e=h-.5*this._viewDim1+.5*t}else{const s=h-this._viewDim1+t;if(i==="end"){e=s}else{const t=this._scrollPosition;e=Math.abs(t-h)<Math.abs(t-s)?h:s}}}e+=this.offsetWithinScroller[this._positionDim];return this._clampScrollPosition(e)}getScrollIntoViewCoordinates(t){return{[this._positionDim]:this._calculateScrollIntoViewPosition(t)}}_sendUnpinnedMessage(){this._hostSink({type:"unpinned"})}_sendVisibilityChangedMessage(){this._hostSink({type:"visibilityChanged",firstVisible:this._firstVisible,lastVisible:this._lastVisible})}_sendStateChangedMessage(){const t=new Map;if(this._first!==-1&&this._last!==-1){for(let i=this._first;i<=this._last;i++){t.set(i,this._getItemPosition(i))}}const i={type:"stateChanged",scrollSize:{[this._sizeDim]:this._scrollSize,[this._secondarySizeDim]:null},range:{first:this._first,last:this._last,firstVisible:this._firstVisible,lastVisible:this._lastVisible},childPositions:t};if(this._scrollError){i.scrollError={[this._positionDim]:this._scrollError,[this._secondaryPositionDim]:0};this._scrollError=0}this._hostSink(i)}get _num(){if(this._first===-1||this._last===-1){return 0}return this._last-this._first+1}_checkThresholds(){if(this._viewDim1===0&&this._num>0||this._pin!==null){this._scheduleReflow()}else{const t=Math.max(0,this._scrollPosition-this._overhang);const i=Math.min(this._scrollSize,this._scrollPosition+this._viewDim1+this._overhang);if(this._physicalMin>t||this._physicalMax<i){this._scheduleReflow()}else{this._updateVisibleIndices({emit:true})}}}_updateVisibleIndices(t){if(this._first===-1||this._last===-1)return;let i=this._first;while(i<this._last&&Math.round(this._getItemPosition(i)[this._positionDim]+this._getItemSize(i)[this._sizeDim])<=Math.round(this._scrollPosition)){i++}let s=this._last;while(s>this._first&&Math.round(this._getItemPosition(s)[this._positionDim])>=Math.round(this._scrollPosition+this._viewDim1)){s--}if(i!==this._firstVisible||s!==this._lastVisible){this._firstVisible=i;this._lastVisible=s;if(t&&t.emit){this._sendVisibilityChangedMessage()}}}}
|
|
12
|
+
/**
|
|
13
|
+
* @license
|
|
14
|
+
* Copyright 2021 Google LLC
|
|
15
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
|
+
*/const h=t=>Object.assign({type:a},t);function e(t){return t==="horizontal"?"marginLeft":"marginTop"}function n(t){return t==="horizontal"?"marginRight":"marginBottom"}function r(t){return t==="horizontal"?"xOffset":"yOffset"}function l(t,i){const s=[t,i].sort();return s[1]<=0?Math.min(...s):s[0]>=0?Math.max(...s):s[0]+s[1]}class o{constructor(){this._childSizeCache=new t;this._marginSizeCache=new t;this._metricsCache=new Map}update(t,s){const h=new Set;Object.keys(t).forEach((e=>{const n=Number(e);this._metricsCache.set(n,t[n]);this._childSizeCache.set(n,t[n][i(s)]);h.add(n);h.add(n+1)}));for(const t of h){const i=this._metricsCache.get(t)?.[e(s)]||0;const h=this._metricsCache.get(t-1)?.[n(s)]||0;this._marginSizeCache.set(t,l(i,h))}}get averageChildSize(){return this._childSizeCache.averageSize}get totalChildSize(){return this._childSizeCache.totalSize}get averageMarginSize(){return this._marginSizeCache.averageSize}get totalMarginSize(){return this._marginSizeCache.totalSize}getLeadingMarginValue(t,i){return this._metricsCache.get(t)?.[e(i)]||0}getChildSize(t){return this._childSizeCache.getSize(t)}getMarginSize(t){return this._marginSizeCache.getSize(t)}clear(){this._childSizeCache.clear();this._marginSizeCache.clear();this._metricsCache.clear()}}class a extends s{constructor(){super(...arguments);this._itemSize={width:100,height:100};this._physicalItems=new Map;this._newPhysicalItems=new Map;this._metricsCache=new o;this._anchorIdx=null;this._anchorPos=null;this._stable=true;this._measureChildren=true;this._estimate=true}get measureChildren(){return this._measureChildren}updateItemSizes(t){this._metricsCache.update(t,this.direction);this._scheduleReflow()}_getPhysicalItem(t){return this._newPhysicalItems.get(t)??this._physicalItems.get(t)}_getSize(t){const i=this._getPhysicalItem(t);return i&&this._metricsCache.getChildSize(t)}_getAverageSize(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}_estimatePosition(t){const i=this._metricsCache;if(this._first===-1||this._last===-1){return i.averageMarginSize+t*(i.averageMarginSize+this._getAverageSize())}else{if(t<this._first){const s=this._first-t;const h=this._getPhysicalItem(this._first);return h.pos-(i.getMarginSize(this._first-1)||i.averageMarginSize)-(s*i.averageChildSize+(s-1)*i.averageMarginSize)}else{const s=t-this._last;const h=this._getPhysicalItem(this._last);return h.pos+(i.getChildSize(this._last)||i.averageChildSize)+(i.getMarginSize(this._last)||i.averageMarginSize)+s*(i.averageChildSize+i.averageMarginSize)}}}_getPosition(t){const i=this._getPhysicalItem(t);const{averageMarginSize:s}=this._metricsCache;return t===0?this._metricsCache.getMarginSize(0)??s:i?i.pos:this._estimatePosition(t)}_calculateAnchor(t,i){if(t<=0){return 0}if(i>this._scrollSize-this._viewDim1){return this.items.length-1}return Math.max(0,Math.min(this.items.length-1,Math.floor((t+i)/2/this._delta)))}_getAnchor(t,i){if(this._physicalItems.size===0){return this._calculateAnchor(t,i)}if(this._first<0){return this._calculateAnchor(t,i)}if(this._last<0){return this._calculateAnchor(t,i)}const s=this._getPhysicalItem(this._first),h=this._getPhysicalItem(this._last),e=s.pos,n=h.pos,r=n+this._metricsCache.getChildSize(this._last);if(r<t){return this._calculateAnchor(t,i)}if(e>i){return this._calculateAnchor(t,i)}let l=this._firstVisible-1;let o=-Infinity;while(o<t){const t=this._getPhysicalItem(++l);o=t.pos+this._metricsCache.getChildSize(l)}return l}_getActiveItems(){if(this._viewDim1===0||this.items.length===0){this._clearItems()}else{this._getItems()}}_clearItems(){this._first=-1;this._last=-1;this._physicalMin=0;this._physicalMax=0;const t=this._newPhysicalItems;this._newPhysicalItems=this._physicalItems;this._newPhysicalItems.clear();this._physicalItems=t;this._stable=true}_getItems(){const t=this._newPhysicalItems;this._stable=true;let i,s;if(this.pin!==null){const{index:t}=this.pin;this._anchorIdx=t;this._anchorPos=this._getPosition(t)}i=this._scrollPosition-this._overhang;s=this._scrollPosition+this._viewDim1+this._overhang;if(s<0||i>this._scrollSize){this._clearItems();return}if(this._anchorIdx===null||this._anchorPos===null){this._anchorIdx=this._getAnchor(i,s);this._anchorPos=this._getPosition(this._anchorIdx)}let h=this._getSize(this._anchorIdx);if(h===undefined){this._stable=false;h=this._getAverageSize()}const e=this._metricsCache.getMarginSize(this._anchorIdx)??this._metricsCache.averageMarginSize;const n=this._metricsCache.getMarginSize(this._anchorIdx+1)??this._metricsCache.averageMarginSize;if(this._anchorIdx===0){this._anchorPos=e}if(this._anchorIdx===this.items.length-1){this._anchorPos=this._scrollSize-n-h}let r=0;if(this._anchorPos+h+n<i){r=i-(this._anchorPos+h+n)}if(this._anchorPos-e>s){r=s-(this._anchorPos-e)}if(r){this._scrollPosition-=r;i-=r;s-=r;this._scrollError+=r}t.set(this._anchorIdx,{pos:this._anchorPos,size:h});this._first=this._last=this._anchorIdx;this._physicalMin=this._anchorPos-e;this._physicalMax=this._anchorPos+h+n;while(this._physicalMin>i&&this._first>0){let i=this._getSize(--this._first);if(i===undefined){this._stable=false;i=this._getAverageSize()}let s=this._metricsCache.getMarginSize(this._first);if(s===undefined){this._stable=false;s=this._metricsCache.averageMarginSize}this._physicalMin-=i;const h=this._physicalMin;t.set(this._first,{pos:h,size:i});this._physicalMin-=s;if(this._stable===false&&this._estimate===false){break}}while(this._physicalMax<s&&this._last<this.items.length-1){let i=this._getSize(++this._last);if(i===undefined){this._stable=false;i=this._getAverageSize()}let s=this._metricsCache.getMarginSize(this._last);if(s===undefined){this._stable=false;s=this._metricsCache.averageMarginSize}const h=this._physicalMax;t.set(this._last,{pos:h,size:i});this._physicalMax+=i+s;if(!this._stable&&!this._estimate){break}}const l=this._calculateError();if(l){this._physicalMin-=l;this._physicalMax-=l;this._anchorPos-=l;this._scrollPosition-=l;t.forEach((t=>t.pos-=l));this._scrollError+=l}if(this._stable){this._newPhysicalItems=this._physicalItems;this._newPhysicalItems.clear();this._physicalItems=t}}_calculateError(){if(this._first===0){return this._physicalMin}else if(this._physicalMin<=0){return this._physicalMin-this._first*this._delta}else if(this._last===this.items.length-1){return this._physicalMax-this._scrollSize}else if(this._physicalMax>=this._scrollSize){return this._physicalMax-this._scrollSize+(this.items.length-1-this._last)*this._delta}return 0}_reflow(){const{_first:t,_last:i}=this;super._reflow();if(this._first===-1&&this._last==-1||this._first===t&&this._last===i){this._resetReflowState()}}_resetReflowState(){this._anchorIdx=null;this._anchorPos=null;this._stable=true}_updateScrollSize(){const{averageMarginSize:t}=this._metricsCache;this._scrollSize=Math.max(1,this.items.length*(t+this._getAverageSize())+t)}get _delta(){const{averageMarginSize:t}=this._metricsCache;return this._getAverageSize()+t}_getItemPosition(t){return{[this._positionDim]:this._getPosition(t),[this._secondaryPositionDim]:0,[r(this.direction)]:-(this._metricsCache.getLeadingMarginValue(t,this.direction)??this._metricsCache.averageMarginSize)}}_getItemSize(t){return{[this._sizeDim]:this._getSize(t)||this._getAverageSize(),[this._secondarySizeDim]:this._itemSize[this._secondarySizeDim]}}_viewDim2Changed(){this._metricsCache.clear();this._scheduleReflow()}}export{a as FlowLayout,h as flow};
|
|
17
|
+
//# sourceMappingURL=p-cc21d351.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SizeCache","constructor","config","this","_map","Map","_roundAverageSize","totalSize","roundAverageSize","set","index","value","prev","get","averageSize","size","average","Math","round","getSize","clear","dim1","direction","BaseLayout","_getDefaultConfig","hostSink","_latestCoords","left","top","_direction","_viewportSize","width","height","totalScrollSize","offsetWithinScroller","_pendingReflow","_pendingLayoutUpdate","_pin","_firstVisible","_lastVisible","_physicalMin","_physicalMax","_first","_last","_sizeDim","_secondarySizeDim","_positionDim","_secondaryPositionDim","_scrollPosition","_scrollError","_items","_scrollSize","_overhang","_hostSink","Promise","resolve","then","Object","assign","items","_setItems","_scheduleReflow","dir","_triggerReflow","viewportSize","dims","_viewDim1","_viewDim2","_scheduleLayoutUpdate","_checkThresholds","viewportScroll","coords","oldPos","change","abs","reflowIfNeeded","force","_reflow","pin","options","block","max","min","length","_clampScrollPosition","val","unpin","_sendUnpinnedMessage","_updateLayout","_updateScrollSize","_setPositionFromPin","_getActiveItems","_updateVisibleIndices","_sendStateChangedMessage","lastScrollPosition","_calculateScrollIntoViewPosition","itemStartPosition","_getItemPosition","scrollPosition","itemSize","_getItemSize","itemEndPosition","currentScrollPosition","getScrollIntoViewCoordinates","type","_sendVisibilityChangedMessage","firstVisible","lastVisible","childPositions","idx","message","scrollSize","range","first","last","scrollError","_num","emit","flow","FlowLayout","leadingMargin","trailingMargin","offset","collapseMargins","a","b","m","sort","MetricsCache","_childSizeCache","_marginSizeCache","_metricsCache","update","metrics","marginsToUpdate","Set","keys","forEach","key","k","Number","add","averageChildSize","totalChildSize","averageMarginSize","totalMarginSize","getLeadingMarginValue","getChildSize","getMarginSize","super","arguments","_itemSize","_physicalItems","_newPhysicalItems","_anchorIdx","_anchorPos","_stable","_measureChildren","_estimate","measureChildren","updateItemSizes","sizes","_getPhysicalItem","_getSize","item","_getAverageSize","_estimatePosition","c","delta","refItem","pos","_getPosition","_calculateAnchor","lower","upper","floor","_delta","_getAnchor","firstItem","lastItem","firstMin","lastMin","lastMax","candidateIdx","cMax","Infinity","candidate","_clearItems","_getItems","anchorSize","undefined","anchorLeadingMargin","anchorTrailingMargin","anchorErr","margin","extentErr","_calculateError","_resetReflowState","_viewDim2Changed"],"sources":["../../node_modules/.pnpm/@lit-labs+virtualizer@2.0.12/node_modules/@lit-labs/virtualizer/layouts/shared/SizeCache.js","../../node_modules/.pnpm/@lit-labs+virtualizer@2.0.12/node_modules/@lit-labs/virtualizer/layouts/shared/BaseLayout.js","../../node_modules/.pnpm/@lit-labs+virtualizer@2.0.12/node_modules/@lit-labs/virtualizer/layouts/flow.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport class SizeCache {\n constructor(config) {\n this._map = new Map();\n this._roundAverageSize = false;\n this.totalSize = 0;\n if (config?.roundAverageSize === true) {\n this._roundAverageSize = true;\n }\n }\n set(index, value) {\n const prev = this._map.get(index) || 0;\n this._map.set(index, value);\n this.totalSize += value - prev;\n }\n get averageSize() {\n if (this._map.size > 0) {\n const average = this.totalSize / this._map.size;\n return this._roundAverageSize ? Math.round(average) : average;\n }\n return 0;\n }\n getSize(index) {\n return this._map.get(index);\n }\n clear() {\n this._map.clear();\n this.totalSize = 0;\n }\n}\n//# sourceMappingURL=SizeCache.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nexport function dim1(direction) {\n return direction === 'horizontal' ? 'width' : 'height';\n}\nexport function dim2(direction) {\n return direction === 'horizontal' ? 'height' : 'width';\n}\nexport function pos1(direction) {\n return direction === 'horizontal' ? 'left' : 'top';\n}\nexport function pos2(direction) {\n return direction === 'horizontal' ? 'top' : 'left';\n}\nexport class BaseLayout {\n _getDefaultConfig() {\n return {\n direction: 'vertical',\n };\n }\n constructor(hostSink, config) {\n /**\n * The last set viewport scroll position.\n */\n this._latestCoords = { left: 0, top: 0 };\n /**\n * Scrolling direction.\n */\n this._direction = null;\n /**\n * Dimensions of the viewport.\n */\n this._viewportSize = { width: 0, height: 0 };\n this.totalScrollSize = { width: 0, height: 0 };\n this.offsetWithinScroller = { left: 0, top: 0 };\n /**\n * Flag for debouncing asynchronous reflow requests.\n */\n this._pendingReflow = false;\n this._pendingLayoutUpdate = false;\n this._pin = null;\n /**\n * The index of the first item intersecting the viewport.\n */\n this._firstVisible = 0;\n /**\n * The index of the last item intersecting the viewport.\n */\n this._lastVisible = 0;\n /**\n * Pixel offset in the scroll direction of the first child.\n */\n this._physicalMin = 0;\n /**\n * Pixel offset in the scroll direction of the last child.\n */\n this._physicalMax = 0;\n /**\n * Index of the first child.\n */\n this._first = -1;\n /**\n * Index of the last child.\n */\n this._last = -1;\n /**\n * Length in the scrolling direction.\n */\n this._sizeDim = 'height';\n /**\n * Length in the non-scrolling direction.\n */\n this._secondarySizeDim = 'width';\n /**\n * Position in the scrolling direction.\n */\n this._positionDim = 'top';\n /**\n * Position in the non-scrolling direction.\n */\n this._secondaryPositionDim = 'left';\n /**\n * Current scroll offset in pixels.\n */\n this._scrollPosition = 0;\n /**\n * Difference between current scroll offset and scroll offset calculated due\n * to a reflow.\n */\n this._scrollError = 0;\n /**\n * Total number of items that could possibly be displayed. Used to help\n * calculate the scroll size.\n */\n this._items = [];\n /**\n * The total (estimated) length of all items in the scrolling direction.\n */\n this._scrollSize = 1;\n /**\n * Number of pixels beyond the viewport to still include\n * in the active range of items.\n */\n // TODO (graynorton): Probably want to make this something we calculate based\n // on viewport size, item size, other factors, possibly still with a dial of some kind\n this._overhang = 1000;\n this._hostSink = hostSink;\n // Delay setting config so that subclasses do setup work first\n Promise.resolve().then(() => (this.config = config || this._getDefaultConfig()));\n }\n set config(config) {\n Object.assign(this, Object.assign({}, this._getDefaultConfig(), config));\n }\n get config() {\n return {\n direction: this.direction,\n };\n }\n /**\n * Maximum index of children + 1, to help estimate total height of the scroll\n * space.\n */\n get items() {\n return this._items;\n }\n set items(items) {\n this._setItems(items);\n }\n _setItems(items) {\n if (items !== this._items) {\n this._items = items;\n this._scheduleReflow();\n }\n }\n /**\n * Primary scrolling direction.\n */\n get direction() {\n return this._direction;\n }\n set direction(dir) {\n // Force it to be either horizontal or vertical.\n dir = dir === 'horizontal' ? dir : 'vertical';\n if (dir !== this._direction) {\n this._direction = dir;\n this._sizeDim = dir === 'horizontal' ? 'width' : 'height';\n this._secondarySizeDim = dir === 'horizontal' ? 'height' : 'width';\n this._positionDim = dir === 'horizontal' ? 'left' : 'top';\n this._secondaryPositionDim = dir === 'horizontal' ? 'top' : 'left';\n this._triggerReflow();\n }\n }\n /**\n * Height and width of the viewport.\n */\n get viewportSize() {\n return this._viewportSize;\n }\n set viewportSize(dims) {\n const { _viewDim1, _viewDim2 } = this;\n Object.assign(this._viewportSize, dims);\n if (_viewDim2 !== this._viewDim2) {\n // this._viewDim2Changed();\n this._scheduleLayoutUpdate();\n }\n else if (_viewDim1 !== this._viewDim1) {\n this._checkThresholds();\n }\n }\n /**\n * Scroll offset of the viewport.\n */\n get viewportScroll() {\n return this._latestCoords;\n }\n set viewportScroll(coords) {\n Object.assign(this._latestCoords, coords);\n const oldPos = this._scrollPosition;\n this._scrollPosition = this._latestCoords[this._positionDim];\n const change = Math.abs(oldPos - this._scrollPosition);\n if (change >= 1) {\n this._checkThresholds();\n }\n }\n /**\n * Perform a reflow if one has been scheduled.\n */\n reflowIfNeeded(force = false) {\n if (force || this._pendingReflow) {\n this._pendingReflow = false;\n this._reflow();\n }\n }\n set pin(options) {\n this._pin = options;\n this._triggerReflow();\n }\n get pin() {\n if (this._pin !== null) {\n const { index, block } = this._pin;\n return {\n index: Math.max(0, Math.min(index, this.items.length - 1)),\n block,\n };\n }\n return null;\n }\n _clampScrollPosition(val) {\n return Math.max(-this.offsetWithinScroller[this._positionDim], Math.min(val, this.totalScrollSize[dim1(this.direction)] - this._viewDim1));\n }\n unpin() {\n if (this._pin !== null) {\n this._sendUnpinnedMessage();\n this._pin = null;\n }\n }\n _updateLayout() {\n // Override\n }\n // protected _viewDim2Changed(): void {\n // this._scheduleLayoutUpdate();\n // }\n /**\n * The height or width of the viewport, whichever corresponds to the scrolling direction.\n */\n get _viewDim1() {\n return this._viewportSize[this._sizeDim];\n }\n /**\n * The height or width of the viewport, whichever does NOT correspond to the scrolling direction.\n */\n get _viewDim2() {\n return this._viewportSize[this._secondarySizeDim];\n }\n _scheduleReflow() {\n this._pendingReflow = true;\n }\n _scheduleLayoutUpdate() {\n this._pendingLayoutUpdate = true;\n this._scheduleReflow();\n }\n // For triggering a reflow based on incoming changes to\n // the layout config.\n _triggerReflow() {\n this._scheduleLayoutUpdate();\n // TODO graynorton@: reflowIfNeeded() isn't really supposed\n // to be called internally. Address in larger cleanup\n // of virtualizer / layout interaction pattern.\n // this.reflowIfNeeded(true);\n Promise.resolve().then(() => this.reflowIfNeeded());\n }\n _reflow() {\n if (this._pendingLayoutUpdate) {\n this._updateLayout();\n this._pendingLayoutUpdate = false;\n }\n this._updateScrollSize();\n this._setPositionFromPin();\n this._getActiveItems();\n this._updateVisibleIndices();\n this._sendStateChangedMessage();\n }\n /**\n * If we are supposed to be pinned to a particular\n * item or set of coordinates, we set `_scrollPosition`\n * accordingly and adjust `_scrollError` as needed\n * so that the virtualizer can keep the scroll\n * position in the DOM in sync\n */\n _setPositionFromPin() {\n if (this.pin !== null) {\n const lastScrollPosition = this._scrollPosition;\n const { index, block } = this.pin;\n this._scrollPosition =\n this._calculateScrollIntoViewPosition({\n index,\n block: block || 'start',\n }) - this.offsetWithinScroller[this._positionDim];\n this._scrollError = lastScrollPosition - this._scrollPosition;\n }\n }\n /**\n * Calculate the coordinates to scroll to, given\n * a request to scroll to the element at a specific\n * index.\n *\n * Supports the same positioning options (`start`,\n * `center`, `end`, `nearest`) as the standard\n * `Element.scrollIntoView()` method, but currently\n * only considers the provided value in the `block`\n * dimension, since we don't yet have any layouts\n * that support virtualization in two dimensions.\n */\n _calculateScrollIntoViewPosition(options) {\n const { block } = options;\n const index = Math.min(this.items.length, Math.max(0, options.index));\n const itemStartPosition = this._getItemPosition(index)[this._positionDim];\n let scrollPosition = itemStartPosition;\n if (block !== 'start') {\n const itemSize = this._getItemSize(index)[this._sizeDim];\n if (block === 'center') {\n scrollPosition =\n itemStartPosition - 0.5 * this._viewDim1 + 0.5 * itemSize;\n }\n else {\n const itemEndPosition = itemStartPosition - this._viewDim1 + itemSize;\n if (block === 'end') {\n scrollPosition = itemEndPosition;\n }\n else {\n // block === 'nearest'\n const currentScrollPosition = this._scrollPosition;\n scrollPosition =\n Math.abs(currentScrollPosition - itemStartPosition) <\n Math.abs(currentScrollPosition - itemEndPosition)\n ? itemStartPosition\n : itemEndPosition;\n }\n }\n }\n scrollPosition += this.offsetWithinScroller[this._positionDim];\n return this._clampScrollPosition(scrollPosition);\n }\n getScrollIntoViewCoordinates(options) {\n return {\n [this._positionDim]: this._calculateScrollIntoViewPosition(options),\n };\n }\n _sendUnpinnedMessage() {\n this._hostSink({\n type: 'unpinned',\n });\n }\n _sendVisibilityChangedMessage() {\n this._hostSink({\n type: 'visibilityChanged',\n firstVisible: this._firstVisible,\n lastVisible: this._lastVisible,\n });\n }\n _sendStateChangedMessage() {\n const childPositions = new Map();\n if (this._first !== -1 && this._last !== -1) {\n for (let idx = this._first; idx <= this._last; idx++) {\n childPositions.set(idx, this._getItemPosition(idx));\n }\n }\n const message = {\n type: 'stateChanged',\n scrollSize: {\n [this._sizeDim]: this._scrollSize,\n [this._secondarySizeDim]: null,\n },\n range: {\n first: this._first,\n last: this._last,\n firstVisible: this._firstVisible,\n lastVisible: this._lastVisible,\n },\n childPositions,\n };\n if (this._scrollError) {\n message.scrollError = {\n [this._positionDim]: this._scrollError,\n [this._secondaryPositionDim]: 0,\n };\n this._scrollError = 0;\n }\n this._hostSink(message);\n }\n /**\n * Number of items to display.\n */\n get _num() {\n if (this._first === -1 || this._last === -1) {\n return 0;\n }\n return this._last - this._first + 1;\n }\n _checkThresholds() {\n if ((this._viewDim1 === 0 && this._num > 0) || this._pin !== null) {\n this._scheduleReflow();\n }\n else {\n const min = Math.max(0, this._scrollPosition - this._overhang);\n const max = Math.min(this._scrollSize, this._scrollPosition + this._viewDim1 + this._overhang);\n if (this._physicalMin > min || this._physicalMax < max) {\n this._scheduleReflow();\n }\n else {\n this._updateVisibleIndices({ emit: true });\n }\n }\n }\n /**\n * Find the indices of the first and last items to intersect the viewport.\n * Emit a visibleindiceschange event when either index changes.\n */\n _updateVisibleIndices(options) {\n if (this._first === -1 || this._last === -1)\n return;\n let firstVisible = this._first;\n while (firstVisible < this._last &&\n Math.round(this._getItemPosition(firstVisible)[this._positionDim] +\n this._getItemSize(firstVisible)[this._sizeDim]) <= Math.round(this._scrollPosition)) {\n firstVisible++;\n }\n let lastVisible = this._last;\n while (lastVisible > this._first &&\n Math.round(this._getItemPosition(lastVisible)[this._positionDim]) >=\n Math.round(this._scrollPosition + this._viewDim1)) {\n lastVisible--;\n }\n if (firstVisible !== this._firstVisible ||\n lastVisible !== this._lastVisible) {\n this._firstVisible = firstVisible;\n this._lastVisible = lastVisible;\n if (options && options.emit) {\n this._sendVisibilityChangedMessage();\n }\n }\n }\n}\n//# sourceMappingURL=BaseLayout.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { SizeCache } from './shared/SizeCache.js';\nimport { BaseLayout, dim1 } from './shared/BaseLayout.js';\nexport const flow = (config) => Object.assign({\n type: FlowLayout,\n}, config);\nfunction leadingMargin(direction) {\n return direction === 'horizontal' ? 'marginLeft' : 'marginTop';\n}\nfunction trailingMargin(direction) {\n return direction === 'horizontal' ? 'marginRight' : 'marginBottom';\n}\nfunction offset(direction) {\n return direction === 'horizontal' ? 'xOffset' : 'yOffset';\n}\nfunction collapseMargins(a, b) {\n const m = [a, b].sort();\n return m[1] <= 0 ? Math.min(...m) : m[0] >= 0 ? Math.max(...m) : m[0] + m[1];\n}\nclass MetricsCache {\n constructor() {\n this._childSizeCache = new SizeCache();\n this._marginSizeCache = new SizeCache();\n this._metricsCache = new Map();\n }\n update(metrics, direction) {\n const marginsToUpdate = new Set();\n Object.keys(metrics).forEach((key) => {\n const k = Number(key);\n this._metricsCache.set(k, metrics[k]);\n this._childSizeCache.set(k, metrics[k][dim1(direction)]);\n marginsToUpdate.add(k);\n marginsToUpdate.add(k + 1);\n });\n for (const k of marginsToUpdate) {\n const a = this._metricsCache.get(k)?.[leadingMargin(direction)] || 0;\n const b = this._metricsCache.get(k - 1)?.[trailingMargin(direction)] || 0;\n this._marginSizeCache.set(k, collapseMargins(a, b));\n }\n }\n get averageChildSize() {\n return this._childSizeCache.averageSize;\n }\n get totalChildSize() {\n return this._childSizeCache.totalSize;\n }\n get averageMarginSize() {\n return this._marginSizeCache.averageSize;\n }\n get totalMarginSize() {\n return this._marginSizeCache.totalSize;\n }\n getLeadingMarginValue(index, direction) {\n return this._metricsCache.get(index)?.[leadingMargin(direction)] || 0;\n }\n getChildSize(index) {\n return this._childSizeCache.getSize(index);\n }\n getMarginSize(index) {\n return this._marginSizeCache.getSize(index);\n }\n clear() {\n this._childSizeCache.clear();\n this._marginSizeCache.clear();\n this._metricsCache.clear();\n }\n}\nexport class FlowLayout extends BaseLayout {\n constructor() {\n super(...arguments);\n /**\n * Initial estimate of item size\n */\n this._itemSize = { width: 100, height: 100 };\n /**\n * Indices of children mapped to their (position and length) in the scrolling\n * direction. Used to keep track of children that are in range.\n */\n this._physicalItems = new Map();\n /**\n * Used in tandem with _physicalItems to track children in range across\n * reflows.\n */\n this._newPhysicalItems = new Map();\n /**\n * Width and height of children by their index.\n */\n this._metricsCache = new MetricsCache();\n /**\n * anchorIdx is the anchor around which we reflow. It is designed to allow\n * jumping to any point of the scroll size. We choose it once and stick with\n * it until stable. _first and _last are deduced around it.\n */\n this._anchorIdx = null;\n /**\n * Position in the scrolling direction of the anchor child.\n */\n this._anchorPos = null;\n /**\n * Whether all children in range were in range during the previous reflow.\n */\n this._stable = true;\n this._measureChildren = true;\n this._estimate = true;\n }\n // protected _defaultConfig: BaseLayoutConfig = Object.assign({}, super._defaultConfig, {\n // })\n // constructor(config: Layout1dConfig) {\n // super(config);\n // }\n get measureChildren() {\n return this._measureChildren;\n }\n /**\n * Determine the average size of all children represented in the sizes\n * argument.\n */\n updateItemSizes(sizes) {\n this._metricsCache.update(sizes, this.direction);\n // if (this._nMeasured) {\n // this._updateItemSize();\n this._scheduleReflow();\n // }\n }\n /**\n * Set the average item size based on the total length and number of children\n * in range.\n */\n // _updateItemSize() {\n // // Keep integer values.\n // this._itemSize[this._sizeDim] = this._metricsCache.averageChildSize;\n // }\n _getPhysicalItem(idx) {\n return this._newPhysicalItems.get(idx) ?? this._physicalItems.get(idx);\n }\n _getSize(idx) {\n const item = this._getPhysicalItem(idx);\n return item && this._metricsCache.getChildSize(idx);\n }\n _getAverageSize() {\n return this._metricsCache.averageChildSize || this._itemSize[this._sizeDim];\n }\n _estimatePosition(idx) {\n const c = this._metricsCache;\n if (this._first === -1 || this._last === -1) {\n return (c.averageMarginSize +\n idx * (c.averageMarginSize + this._getAverageSize()));\n }\n else {\n if (idx < this._first) {\n const delta = this._first - idx;\n const refItem = this._getPhysicalItem(this._first);\n return (refItem.pos -\n (c.getMarginSize(this._first - 1) || c.averageMarginSize) -\n (delta * c.averageChildSize + (delta - 1) * c.averageMarginSize));\n }\n else {\n const delta = idx - this._last;\n const refItem = this._getPhysicalItem(this._last);\n return (refItem.pos +\n (c.getChildSize(this._last) || c.averageChildSize) +\n (c.getMarginSize(this._last) || c.averageMarginSize) +\n delta * (c.averageChildSize + c.averageMarginSize));\n }\n }\n }\n /**\n * Returns the position in the scrolling direction of the item at idx.\n * Estimates it if the item at idx is not in the DOM.\n */\n _getPosition(idx) {\n const item = this._getPhysicalItem(idx);\n const { averageMarginSize } = this._metricsCache;\n return idx === 0\n ? this._metricsCache.getMarginSize(0) ?? averageMarginSize\n : item\n ? item.pos\n : this._estimatePosition(idx);\n }\n _calculateAnchor(lower, upper) {\n if (lower <= 0) {\n return 0;\n }\n if (upper > this._scrollSize - this._viewDim1) {\n return this.items.length - 1;\n }\n return Math.max(0, Math.min(this.items.length - 1, Math.floor((lower + upper) / 2 / this._delta)));\n }\n _getAnchor(lower, upper) {\n if (this._physicalItems.size === 0) {\n return this._calculateAnchor(lower, upper);\n }\n if (this._first < 0) {\n return this._calculateAnchor(lower, upper);\n }\n if (this._last < 0) {\n return this._calculateAnchor(lower, upper);\n }\n const firstItem = this._getPhysicalItem(this._first), lastItem = this._getPhysicalItem(this._last), firstMin = firstItem.pos, lastMin = lastItem.pos, lastMax = lastMin + this._metricsCache.getChildSize(this._last);\n if (lastMax < lower) {\n // Window is entirely past physical items, calculate new anchor\n return this._calculateAnchor(lower, upper);\n }\n if (firstMin > upper) {\n // Window is entirely before physical items, calculate new anchor\n return this._calculateAnchor(lower, upper);\n }\n // Window contains a physical item\n // Find one, starting with the one that was previously first visible\n let candidateIdx = this._firstVisible - 1;\n let cMax = -Infinity;\n while (cMax < lower) {\n const candidate = this._getPhysicalItem(++candidateIdx);\n cMax = candidate.pos + this._metricsCache.getChildSize(candidateIdx);\n }\n return candidateIdx;\n }\n /**\n * Updates _first and _last based on items that should be in the current\n * viewed range.\n */\n _getActiveItems() {\n if (this._viewDim1 === 0 || this.items.length === 0) {\n this._clearItems();\n }\n else {\n this._getItems();\n }\n }\n /**\n * Sets the range to empty.\n */\n _clearItems() {\n this._first = -1;\n this._last = -1;\n this._physicalMin = 0;\n this._physicalMax = 0;\n const items = this._newPhysicalItems;\n this._newPhysicalItems = this._physicalItems;\n this._newPhysicalItems.clear();\n this._physicalItems = items;\n this._stable = true;\n }\n /*\n * Updates _first and _last based on items that should be in the given range.\n */\n _getItems() {\n const items = this._newPhysicalItems;\n this._stable = true;\n let lower, upper;\n // The anchorIdx is the anchor around which we reflow. It is designed to\n // allow jumping to any point of the scroll size. We choose it once and\n // stick with it until stable. first and last are deduced around it.\n // If we have a pinned item, we anchor on it\n if (this.pin !== null) {\n const { index } = this.pin;\n this._anchorIdx = index;\n this._anchorPos = this._getPosition(index);\n }\n // Determine the lower and upper bounds of the region to be\n // rendered, relative to the viewport\n lower = this._scrollPosition - this._overhang; //leadingOverhang;\n upper = this._scrollPosition + this._viewDim1 + this._overhang; // trailingOverhang;\n if (upper < 0 || lower > this._scrollSize) {\n this._clearItems();\n return;\n }\n // If we are scrolling to a specific index or if we are doing another\n // pass to stabilize a previously started reflow, we will already\n // have an anchor. If not, establish an anchor now.\n if (this._anchorIdx === null || this._anchorPos === null) {\n this._anchorIdx = this._getAnchor(lower, upper);\n this._anchorPos = this._getPosition(this._anchorIdx);\n }\n let anchorSize = this._getSize(this._anchorIdx);\n if (anchorSize === undefined) {\n this._stable = false;\n anchorSize = this._getAverageSize();\n }\n const anchorLeadingMargin = this._metricsCache.getMarginSize(this._anchorIdx) ??\n this._metricsCache.averageMarginSize;\n const anchorTrailingMargin = this._metricsCache.getMarginSize(this._anchorIdx + 1) ??\n this._metricsCache.averageMarginSize;\n if (this._anchorIdx === 0) {\n this._anchorPos = anchorLeadingMargin;\n }\n if (this._anchorIdx === this.items.length - 1) {\n this._anchorPos = this._scrollSize - anchorTrailingMargin - anchorSize;\n }\n // Anchor might be outside bounds, so prefer correcting the error and keep\n // that anchorIdx.\n let anchorErr = 0;\n if (this._anchorPos + anchorSize + anchorTrailingMargin < lower) {\n anchorErr = lower - (this._anchorPos + anchorSize + anchorTrailingMargin);\n }\n if (this._anchorPos - anchorLeadingMargin > upper) {\n anchorErr = upper - (this._anchorPos - anchorLeadingMargin);\n }\n if (anchorErr) {\n this._scrollPosition -= anchorErr;\n lower -= anchorErr;\n upper -= anchorErr;\n this._scrollError += anchorErr;\n }\n items.set(this._anchorIdx, { pos: this._anchorPos, size: anchorSize });\n this._first = this._last = this._anchorIdx;\n this._physicalMin = this._anchorPos - anchorLeadingMargin;\n this._physicalMax = this._anchorPos + anchorSize + anchorTrailingMargin;\n while (this._physicalMin > lower && this._first > 0) {\n let size = this._getSize(--this._first);\n if (size === undefined) {\n this._stable = false;\n size = this._getAverageSize();\n }\n let margin = this._metricsCache.getMarginSize(this._first);\n if (margin === undefined) {\n this._stable = false;\n margin = this._metricsCache.averageMarginSize;\n }\n this._physicalMin -= size;\n const pos = this._physicalMin;\n items.set(this._first, { pos, size });\n this._physicalMin -= margin;\n if (this._stable === false && this._estimate === false) {\n break;\n }\n }\n while (this._physicalMax < upper && this._last < this.items.length - 1) {\n let size = this._getSize(++this._last);\n if (size === undefined) {\n this._stable = false;\n size = this._getAverageSize();\n }\n let margin = this._metricsCache.getMarginSize(this._last);\n if (margin === undefined) {\n this._stable = false;\n margin = this._metricsCache.averageMarginSize;\n }\n const pos = this._physicalMax;\n items.set(this._last, { pos, size });\n this._physicalMax += size + margin;\n if (!this._stable && !this._estimate) {\n break;\n }\n }\n // This handles the cases where we were relying on estimated sizes.\n const extentErr = this._calculateError();\n if (extentErr) {\n this._physicalMin -= extentErr;\n this._physicalMax -= extentErr;\n this._anchorPos -= extentErr;\n this._scrollPosition -= extentErr;\n items.forEach((item) => (item.pos -= extentErr));\n this._scrollError += extentErr;\n }\n if (this._stable) {\n this._newPhysicalItems = this._physicalItems;\n this._newPhysicalItems.clear();\n this._physicalItems = items;\n }\n }\n _calculateError() {\n if (this._first === 0) {\n return this._physicalMin;\n }\n else if (this._physicalMin <= 0) {\n return this._physicalMin - this._first * this._delta;\n }\n else if (this._last === this.items.length - 1) {\n return this._physicalMax - this._scrollSize;\n }\n else if (this._physicalMax >= this._scrollSize) {\n return (this._physicalMax -\n this._scrollSize +\n (this.items.length - 1 - this._last) * this._delta);\n }\n return 0;\n }\n _reflow() {\n const { _first, _last } = this;\n super._reflow();\n if ((this._first === -1 && this._last == -1) ||\n (this._first === _first && this._last === _last)) {\n this._resetReflowState();\n }\n }\n _resetReflowState() {\n this._anchorIdx = null;\n this._anchorPos = null;\n this._stable = true;\n }\n _updateScrollSize() {\n const { averageMarginSize } = this._metricsCache;\n this._scrollSize = Math.max(1, this.items.length * (averageMarginSize + this._getAverageSize()) +\n averageMarginSize);\n }\n /**\n * Returns the average size (precise or estimated) of an item in the scrolling direction,\n * including any surrounding space.\n */\n get _delta() {\n const { averageMarginSize } = this._metricsCache;\n return this._getAverageSize() + averageMarginSize;\n }\n /**\n * Returns the top and left positioning of the item at idx.\n */\n _getItemPosition(idx) {\n return {\n [this._positionDim]: this._getPosition(idx),\n [this._secondaryPositionDim]: 0,\n [offset(this.direction)]: -(this._metricsCache.getLeadingMarginValue(idx, this.direction) ??\n this._metricsCache.averageMarginSize),\n };\n }\n /**\n * Returns the height and width of the item at idx.\n */\n _getItemSize(idx) {\n return {\n [this._sizeDim]: this._getSize(idx) || this._getAverageSize(),\n [this._secondarySizeDim]: this._itemSize[this._secondarySizeDim],\n };\n }\n _viewDim2Changed() {\n this._metricsCache.clear();\n this._scheduleReflow();\n }\n}\n//# sourceMappingURL=flow.js.map"],"mappings":";;;;;AAKO,MAAMA,EACT,WAAAC,CAAYC,GACRC,KAAKC,KAAO,IAAIC,IAChBF,KAAKG,kBAAoB,MACzBH,KAAKI,UAAY,EACjB,GAAIL,GAAQM,mBAAqB,KAAM,CACnCL,KAAKG,kBAAoB,IACrC,CACA,CACI,GAAAG,CAAIC,EAAOC,GACP,MAAMC,EAAOT,KAAKC,KAAKS,IAAIH,IAAU,EACrCP,KAAKC,KAAKK,IAAIC,EAAOC,GACrBR,KAAKI,WAAaI,EAAQC,CAClC,CACI,eAAIE,GACA,GAAIX,KAAKC,KAAKW,KAAO,EAAG,CACpB,MAAMC,EAAUb,KAAKI,UAAYJ,KAAKC,KAAKW,KAC3C,OAAOZ,KAAKG,kBAAoBW,KAAKC,MAAMF,GAAWA,CAClE,CACQ,OAAO,CACf,CACI,OAAAG,CAAQT,GACJ,OAAOP,KAAKC,K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C1G,KAAKyC,UAAWzC,KAAKgK,SAAStD,IAAQ1G,KAAKkK,kBAC5C,CAAClK,KAAK0C,mBAAoB1C,KAAKoJ,UAAUpJ,KAAK0C,mBAE1D,CACI,gBAAAyJ,GACInM,KAAKgI,cAAc/G,QACnBjB,KAAK0D,iBACb,S"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as t,H as n,a as e}from"./p-c66e27d0.js";import{R as a}from"./p-5862975b.js";import{d as r}from"./p-98ec4a7a.js";const s=":host{display:block}sp-button{border-radius:var(--nylas-border-radius);background-color:var(--nylas-color-primary-400);color:var(--nylas-color-primary-900);fill:var(--nylas-color-primary-900)}sp-button:hover{background-color:var(--nylas-color-primary-500)}sp-button:disabled{background-color:var(--nylas-color-primary-200);color:var(--nylas-color-primary-600);cursor:not-allowed}";const i=s;var l=undefined&&undefined.__decorate||function(o,t,n,e){var a=arguments.length,r=a<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,n):e,s;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(o,t,n,e);else for(var i=o.length-1;i>=0;i--)if(s=o[i])r=(a<3?s(r):a>3?s(t,n,r):s(t,n))||r;return a>3&&r&&Object.defineProperty(t,n,r),r};var c=undefined&&undefined.__metadata||function(o,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(o,t)};const d=class{constructor(t){o(this,t);this.onClick=async()=>{const o=this.method;r(`[nylas-mailbox-toolbar-button] onClick`,{method:o,mailboxConnector:this.mailboxConnector});if(this.mailboxConnector&&o){const t=this.callMethod(this.mailboxConnector,o);if(t){await t()}}};this.method=undefined;this.dataState=undefined;this.iconOnly=false;this.mailboxConnector=undefined}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){r(`[nylas-if-state] Component will load`)}async componentDidLoad(){r(`[nylas-if-state] Component did load`)}callMethod(o,t){const n=t.split(".");let e=o;for(const o of n.slice(0,-1)){e=e[o];if(!e){return undefined}}const a=n[n.length-1];const r=e[a];if(typeof r==="function"){return r.bind(e)}return undefined}renderByState(o){return o?t("slot",{name:"loading"},"Loading..."):t("slot",null,"Click")}hasSlot(o){return!!this.host.querySelector(`[slot="${o}"]`)}render(){let o=false;const e=this.mailboxConnector?.nylasMailboxStore;if(typeof e!=="undefined"){const t=String(this.dataState);o=this.dataState?e.get(t)==="loading":false}const a=o?`state-loading`:"state-ready";return t(n,{key:"8885d53e61f2fb52afc9a8b795a71de850b2fbe7"},t("sp-theme",{key:"7b7d856caa9e2389eaaff33381d374092572f922",scale:"medium",color:"dark"},t("sp-button",{onClick:this.onClick,disabled:o,key:a,"icon-only":this.iconOnly,label:this.renderByState(o)},this.hasSlot("icon")&&t("div",{slot:"icon",class:"slot"},t("slot",{name:"icon"})),!this.iconOnly&&this.renderByState(o))))}get host(){return e(this)}};l([a({name:"nylas-mailbox-toolbar-button",connectorToProp:"mailboxConnector",fireRegisterEvent:true}),c("design:type",Function),c("design:paramtypes",[]),c("design:returntype",void 0)],d.prototype,"render",null);d.style=i;export{d as nylas_mailbox_toolbar_button};
|
|
2
|
+
//# sourceMappingURL=p-d4b1e3e4.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["nylasMailboxToolbarButtonCss","NylasMailboxToolbarButtonStyle0","NylasMailboxToolbarButton","constructor","hostRef","this","onClick","async","method","debug","mailboxConnector","methodToCall","callMethod","connectedCallback","disconnectedCallback","componentWillLoad","componentDidLoad","obj","accessString","parts","split","current","part","slice","undefined","methodName","length","bind","renderByState","state","h","name","hasSlot","host","querySelector","render","store","nylasMailboxStore","storeKey","String","dataState","get","key","Host","scale","color","disabled","iconOnly","label","slot","class","__decorate","RegisterComponent","connectorToProp","fireRegisterEvent"],"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'}>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AAMI,EAAMb,EAAQ,gBAAkB,cACtC,OACEC,EAACa,EAAI,CAAAD,IAAA,4CACHZ,EAAA,YAAAY,IAAA,2CAAUE,MAAM,SAASC,MAAM,QAC7Bf,EAAA,aAAWxB,QAASD,KAAKC,QAASwC,SAAUjB,EAAOa,IAAKA,EAAG,YAAarC,KAAK0C,SAAUC,MAAO3C,KAAKuB,cAAcC,IAC9GxB,KAAK2B,QAAQ,SACZF,EAAA,OAAKmB,KAAK,OAAOC,MAAO,QACtBpB,EAAA,QAAMC,KAAK,WAGb1B,KAAK0C,UAAY1C,KAAKuB,cAAcC,K,6BAjBhDsB,EAAA,CALCC,EAAkB,CACjBrB,KAAM,+BACNsB,gBAAiB,mBACjBC,kBAAmB,O"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,h as o}from"./p-c66e27d0.js";const r=".sc-arrow-icon-h{display:flex}";const t=r;const s=class{constructor(o){e(this,o);this.width="15";this.height="15"}render(){return o("svg",{key:"770b5d82484a87e469ef32411199aea2c581e9c2",width:this.width,height:this.height,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{key:"ecf2d425603ffff83f506e293bfe2e06d17ab99b",d:"M5 12H19M12 5L19 12L12 19",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))}};s.style=t;export{s as arrow_icon};
|
|
2
|
+
//# sourceMappingURL=p-db24cc70.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["iconCss","ArrowIconStyle0","ArrowIcon","render","h","key","width","this","height","viewBox","fill","xmlns","d","stroke"],"sources":["src/common/icons/icon.css?tag=arrow-icon&encapsulation=scoped","src/common/icons/arrow.tsx"],"sourcesContent":[":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'arrow-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class ArrowIcon {\n @Prop() width: string = '15';\n @Prop() height: string = '15';\n\n render() {\n return (\n // Arrow icon svg\n <svg width={this.width} height={this.height} viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5 12H19M12 5L19 12L12 19\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAU,iCAChB,MAAAC,EAAeD,E,MCMFE,EAAS,M,oCACI,K,YACC,I,CAEzB,MAAAC,GACE,OAEEC,EAAA,OAAAC,IAAA,2CAAKC,MAAOC,KAAKD,MAAOE,OAAQD,KAAKC,OAAQC,QAAQ,YAAYC,KAAK,OAAOC,MAAM,8BACjFP,EAAA,QAAAC,IAAA,2CAAMO,EAAE,4BAA4BC,OAAO,eAAc,eAAc,IAAG,iBAAgB,QAAO,kBAAiB,U"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as e}from"./p-98ec4a7a.js";import{c as t}from"./p-eeb0a591.js";class o{constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:o}){this.schedulerStore=t;this.schedulerAPIURL=e;this.sessionId=o}async makeAPIRequest(e,t,o,i={}){try{const n=new URL(this.schedulerAPIURL);n.pathname=e;const s=await fetch(decodeURIComponent(n.toString()),{method:t,headers:{"Content-Type":"application/json",...i},body:o});if(s.status===204){return{data:null}}const a=await s.json();return a}catch(e){return{error:e}}}selectDate(e){this.schedulerStore.set("selectedDate",e);this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}toggleAdditionalData(e){this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t?.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t?.primaryParticipant,email:e}})}async setReschedule(e){const t=new Date;this.schedulerStore.set("rescheduleId",e);this.schedulerStore.set("selectedTimeslot",null);this.schedulerStore.set("showThankYouMessage",false);this.schedulerStore.set("showBookingForm",false);const o=new Date(t.getFullYear(),t.getMonth(),1).getTime()/1e3;const i=new Date(t.getFullYear(),t.getMonth()+1,1).getTime()/1e3;await this.getAvailability(o,i);const n=this.schedulerStore.get("availability").find((e=>new Date(e.start_time)>new Date));let s=t;if(n){s=n.start_time}this.schedulerStore.set("selectedDate",s)}async bookTimeslot(e){this.schedulerStore.set("bookedEventLoading",true);this.schedulerStore.set("bookedEventError",null);const{selectedTimeslot:t,bookingInfo:o}=this.schedulerStore.state;if(!e&&!o){return{error:{message:"No booking info provided"}}}const i=e?.timeslot||t;if(!i){return{error:{message:"No time slot selected"}}}const n=e?e?.primaryParticipant:o?.primaryParticipant;const s=e?e?.guests||[]:o?.guests||[];const a=e?{...e?.additionalFields}:{...o?.additionalFields};const r={Authorization:`Bearer ${this.sessionId}`};const l=`/schedule/bookings`;const c=await this.makeAPIRequest(decodeURIComponent(l),"POST",JSON.stringify({participants:[n,...s],additional_fields:a,start_time:i.start_time.getTime()/1e3,end_time:i.end_time.getTime()/1e3}),r);if("error"in c)this.schedulerStore.set("bookedEventError",c?.error);if("data"in c)this.schedulerStore.set("eventInfo",c?.data);this.schedulerStore.set("bookedEventLoading",false);return c}async getAvailability(e=0,t=0){this.schedulerStore.set("loadingState",{api:"availability"});const o=new URLSearchParams;const i=new Date;const n=i.getTime();if(t&&t<n/1e3){const e={title:"Availability error",message:"endTime should be in the future",category:"vaidation"};this.schedulerStore.set("availabilityTimeslotsError",e);return{error:e}}if(e)o.append("start_time",encodeURIComponent(e));if(t)o.append("end_time",encodeURIComponent(t));const s=o.toString();const a=`/schedule/availability${s?`?${s}`:""}`;const r={Authorization:`Bearer ${this.sessionId}`};const l=await this.makeAPIRequest(decodeURIComponent(a),"GET",undefined,r);if("error"in l){this.schedulerStore.set("availability",[])}if("data"in l){const e=l.data?.time_slots?.map((e=>({...e,start_time:new Date(e.start_time*1e3),end_time:new Date(e.end_time*1e3)})))||[];const t=e.filter((e=>e.start_time.getTime()>n));this.schedulerStore.set("availability",t)}this.schedulerStore.set("loadingState",null);return l}async cancelBooking(e){this.schedulerStore.set("bookedEventLoading",true);this.schedulerStore.set("bookedEventError",null);const t=`/schedule/bookings/${e}`;const o={Authorization:`Bearer ${this.sessionId}`};const i=await this.makeAPIRequest(decodeURIComponent(t),"PUT",JSON.stringify({action:"cancel"}),o);if("error"in i)this.schedulerStore.set("bookedEventError",i?.error);if("data"in i)this.schedulerStore.set("cancelledEvent",i?.data);this.schedulerStore.set("bookedEventLoading",false);return i}async rescheduleBooking(e,t){this.schedulerStore.set("bookedEventLoading",true);this.schedulerStore.set("bookedEventError",null);const{bookingInfo:o,selectedTimeslot:i,selectedTimezone:n}=this.schedulerStore.state;const{startTime:s,endTime:a,timezone:r}=t;const l=s||i?.start_time;const c={error:{title:"Reschedule error",message:"",type:"validation"}};if(!l){return{error:{...c,message:`Please pass 'startTime' in data or set 'selectedTimeslot in the defaultSchedulerStoreState.`}}}const d=a||i?.end_time;if(!d){return{error:{...c,message:`Please pass 'endTime' in data or set 'selectedTimeslot' in the defaultSchedulerStoreState.`}}}const h=r||n;if(!h){return{error:{...c,message:`Please pass 'timezone' in data or set 'selectedTimezone' in the defaultSchedulerStoreState.`}}}const u=t?t?.primaryParticipant:o?.primaryParticipant;const m=t?t?.guests||[]:o?.guests||[];const f=t?{...t?.additionalFields}:{...o?.additionalFields};const g=`/schedule/bookings/${e}`;const b={Authorization:`Bearer ${this.sessionId}`};const k=await this.makeAPIRequest(decodeURIComponent(g),"PATCH",JSON.stringify({start_time:l.getTime()/1e3,end_time:d.getTime()/1e3,time_zone:h,participants:[u,...m],additional_fields:f}),b);if("error"in k)this.schedulerStore.set("bookedEventError",{error:{...k?.error,category:"api"}});if("data"in k)this.schedulerStore.set("eventInfo",k?.data);this.schedulerStore.set("bookedEventLoading",false);return k}}function i(o={}){const i={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:false,showThankYouMessage:false,selectableDates:null,availability:[],availabilityTimeslotsError:null,state:"ready",eventInfo:null,cancelledEvent:null,bookedEventError:null,bookedEventLoading:false,loadingState:null,...o};e(`[defaultNylasStoreState]: `,i);const n=t(i);n.onChange("availability",(e=>{const t=e.map((e=>e.start_time));n.set("selectableDates",t)}));n.onChange("rescheduleId",(e=>{if(e){n.set("bookingFlow","rescheduling")}else{n.set("bookingFlow","booking")}}));n.reset=()=>{for(const e in i){const t=i[e];n.set(e,t)}};return n}export{i as C,o as N};
|
|
2
|
+
//# sourceMappingURL=p-de1bcc4a.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NylaSchedulerAPIConnector","constructor","schedulerAPIURL","schedulerStore","sessionId","this","makeAPIRequest","path","method","body","headers","schedulerURL","URL","pathname","response","fetch","decodeURIComponent","toString","status","data","json","error","selectDate","date","set","selectTime","time","selectTimezone","timezone","toggleAdditionalData","value","setParticipantName","name","bookingInfo","state","primaryParticipant","setParticipantEmail","email","setReschedule","bookingID","today","Date","startTime","getFullYear","getMonth","getTime","endTime","getAvailability","firstAvailableDate","get","find","timeslot","start_time","_selectedDate","bookTimeslot","selectedTimeslot","message","guests","additional_fields","additionalFields","Authorization","url","JSON","stringify","participants","end_time","api","params","URLSearchParams","now","nowTime","title","category","append","encodeURIComponent","queryString","undefined","availability","time_slots","map","availabilityTimeslotsFiltered","filter","cancelBooking","bookingId","action","rescheduleBooking","selectedTimezone","generalError","type","time_zone","CreateNylasSchedulerStore","defaultState","defaultNylasStoreState","selectedDate","selectedLanguage","navigator","language","Intl","DateTimeFormat","resolvedOptions","timeZone","showBookingForm","showThankYouMessage","selectableDates","availabilityTimeslotsError","eventInfo","cancelledEvent","bookedEventError","bookedEventLoading","loadingState","debug","store","createStore","onChange","rescheduleId","reset","key"],"sources":["src/connector/shared/api/scheduler.ts","src/stores/scheduler-store.ts"],"sourcesContent":["import { AvailabilityResponse, NylasEvent } from '@/common/types';\nimport { NylasSchedulerStoreType } from '../../../components';\nimport type { NylasErrorResponse, NylasResponse, NylasSchedulerBookingData, Timeslot } from '@nylas/core';\n\ntype NylasSchedulerAPIConnectorOptions = {\n schedulerAPIURL: string;\n schedulerStore: NylasSchedulerStoreType;\n sessionId?: string;\n};\n\n/**\n * NylaSchedulerConnector\n * This class is used to make API requests to the scheduler.\n */\nexport class NylaSchedulerAPIConnector {\n private schedulerStore: NylasSchedulerStoreType;\n private schedulerAPIURL: string;\n private sessionId: string | undefined;\n\n constructor({ schedulerAPIURL, schedulerStore, sessionId }: NylasSchedulerAPIConnectorOptions) {\n this.schedulerStore = schedulerStore;\n this.schedulerAPIURL = schedulerAPIURL;\n this.sessionId = sessionId;\n }\n\n /**\n * Makes an API request to the scheduler.\n * @param path The path to the API endpoint.\n * @param method The HTTP method.\n * @param body The request body (if any).\n * @returns {Promise<T>}\n */\n public async makeAPIRequest<T>(path: string, method: string, body: string | undefined, headers = {}): Promise<NylasResponse<T>> {\n try {\n const schedulerURL = new URL(this.schedulerAPIURL);\n schedulerURL.pathname = path;\n const response = await fetch(decodeURIComponent(schedulerURL.toString()), {\n method,\n headers: {\n 'Content-Type': 'application/json',\n ...headers,\n },\n body,\n });\n\n if (response.status === 204) {\n return { data: null } as NylasResponse<T>;\n }\n\n const data = await response.json();\n return data as NylasResponse<T>;\n } catch (error) {\n // NOTE: current server implementation doesn't return a JSON object for errors on some endpoints\n // handle this case by returning the error response as a string to be handled downstream\n return { error } as NylasErrorResponse;\n }\n }\n\n /**\n * Selects a date in the scheduler.\n */\n public selectDate(date: Date) {\n this.schedulerStore.set('selectedDate', date);\n this.schedulerStore.set('selectedTimeslot', null);\n }\n\n /**\n * Selects a time in the scheduler.\n */\n public selectTime(time: Timeslot) {\n this.schedulerStore.set('selectedTimeslot', time);\n }\n\n /**\n * Sets the timezone in the scheduler.\n */\n public selectTimezone(timezone: string) {\n this.schedulerStore.set('selectedTimezone', timezone);\n }\n\n /**\n * Toggles showBookingForm\n * @param value boolean\n */\n public toggleAdditionalData(value: boolean) {\n this.schedulerStore.set('showBookingForm', value);\n }\n\n /**\n * Set/update the name of the participant booking the event.\n */\n public setParticipantName(name: string) {\n const { bookingInfo } = this.schedulerStore.state;\n this.schedulerStore.set('bookingInfo', {\n ...bookingInfo,\n primaryParticipant: {\n ...(bookingInfo?.primaryParticipant as NylasSchedulerBookingData['primaryParticipant']),\n name,\n },\n });\n }\n\n /**\n * Set/update the email of the participant booking the event.\n */\n public setParticipantEmail(email: string) {\n const { bookingInfo } = this.schedulerStore.state;\n this.schedulerStore.set('bookingInfo', {\n ...bookingInfo,\n primaryParticipant: {\n ...(bookingInfo?.primaryParticipant as NylasSchedulerBookingData['primaryParticipant']),\n email,\n },\n });\n }\n\n /**\n * Set reschedule booking id\n */\n public async setReschedule(bookingID: string) {\n const today = new Date();\n // Set reschedule booking id\n this.schedulerStore.set('rescheduleId', bookingID);\n // Reset store state\n this.schedulerStore.set('selectedTimeslot', null);\n this.schedulerStore.set('showThankYouMessage', false);\n this.schedulerStore.set('showBookingForm', false);\n // Refetch availability\n const startTime = new Date(today.getFullYear(), today.getMonth(), 1).getTime() / 1000;\n const endTime = new Date(today.getFullYear(), today.getMonth() + 1, 1).getTime() / 1000;\n await this.getAvailability(startTime, endTime);\n // Set selected date to first available date\n const firstAvailableDate = this.schedulerStore.get('availability').find((timeslot: any) => new Date(timeslot.start_time) > new Date());\n let _selectedDate = today;\n if (firstAvailableDate) {\n _selectedDate = firstAvailableDate.start_time;\n }\n this.schedulerStore.set('selectedDate', _selectedDate);\n }\n\n /**\n * Book the selected timeslot.\n * @param data The booking info.\n * @returns {Promise<NylasResponse<NylasEvent>>}\n */\n public async bookTimeslot(data?: NylasSchedulerBookingData & { timeslot?: Timeslot }): Promise<NylasResponse<NylasEvent>> {\n this.schedulerStore.set('bookedEventLoading', true);\n this.schedulerStore.set('bookedEventError', null);\n const { selectedTimeslot, bookingInfo } = this.schedulerStore.state;\n if (!data && !bookingInfo) {\n return { error: { message: 'No booking info provided' } } as NylasErrorResponse;\n }\n\n const timeslot = data?.timeslot || selectedTimeslot;\n if (!timeslot) {\n return { error: { message: 'No time slot selected' } } as NylasErrorResponse;\n }\n\n const primaryParticipant = data ? data?.primaryParticipant : bookingInfo?.primaryParticipant;\n const guests = data ? data?.guests || [] : bookingInfo?.guests || [];\n const additional_fields = data ? { ...data?.additionalFields } : { ...bookingInfo?.additionalFields };\n\n const headers = {\n Authorization: `Bearer ${this.sessionId}`,\n };\n const url = `/schedule/bookings`;\n\n const response = await this.makeAPIRequest<NylasEvent>(\n decodeURIComponent(url),\n 'POST',\n JSON.stringify({\n participants: [primaryParticipant, ...guests],\n additional_fields,\n start_time: timeslot.start_time.getTime() / 1000,\n end_time: timeslot.end_time.getTime() / 1000,\n }),\n headers,\n );\n\n if ('error' in response) this.schedulerStore.set('bookedEventError', response?.error as NylasErrorResponse);\n\n if ('data' in response) this.schedulerStore.set('eventInfo', response?.data);\n\n this.schedulerStore.set('bookedEventLoading', false);\n return response;\n }\n\n /**\n * Gets the availability for a page.\n * @param startTime The start time.\n * @param endTime The end time.\n * @returns {Promise<AvailabilityResponse>}\n */\n public async getAvailability(startTime: number = 0, endTime: number = 0): Promise<NylasResponse<AvailabilityResponse>> {\n this.schedulerStore.set('loadingState', { api: 'availability' });\n const params = new URLSearchParams();\n const now = new Date();\n const nowTime = now.getTime();\n\n if (endTime && endTime < nowTime / 1000) {\n const error = { title: 'Availability error', message: 'endTime should be in the future', category: 'vaidation' };\n this.schedulerStore.set('availabilityTimeslotsError', error as NylasErrorResponse);\n return { error } as NylasErrorResponse;\n }\n\n if (startTime) params.append('start_time', encodeURIComponent(startTime));\n if (endTime) params.append('end_time', encodeURIComponent(endTime));\n\n const queryString = params.toString();\n const url = `/schedule/availability${queryString ? `?${queryString}` : ''}`;\n const headers = {\n Authorization: `Bearer ${this.sessionId}`,\n };\n const response = await this.makeAPIRequest<AvailabilityResponse>(decodeURIComponent(url), 'GET', undefined, headers);\n\n if ('error' in response) {\n this.schedulerStore.set('availability', []);\n }\n\n if ('data' in response) {\n const availability =\n response.data?.time_slots?.map(timeslot => {\n return {\n ...timeslot,\n start_time: new Date(timeslot.start_time * 1000),\n end_time: new Date(timeslot.end_time * 1000),\n };\n }) || [];\n\n // Filter out timeslots that are in the past\n const availabilityTimeslotsFiltered = availability.filter(timeslot => timeslot.start_time.getTime() > nowTime);\n this.schedulerStore.set('availability', availabilityTimeslotsFiltered);\n }\n\n this.schedulerStore.set('loadingState', null);\n return response;\n }\n\n /**\n * Cancels a booking.\n * @param bookingId The booking ID.\n */\n public async cancelBooking(bookingId: string): Promise<NylasResponse<null>> {\n this.schedulerStore.set('bookedEventLoading', true);\n this.schedulerStore.set('bookedEventError', null);\n const url = `/schedule/bookings/${bookingId}`;\n const headers = {\n Authorization: `Bearer ${this.sessionId}`,\n };\n const response = await this.makeAPIRequest<NylasEvent>(\n decodeURIComponent(url),\n 'PUT',\n JSON.stringify({\n action: 'cancel',\n }),\n headers,\n );\n\n if ('error' in response) this.schedulerStore.set('bookedEventError', response?.error as NylasErrorResponse);\n\n if ('data' in response) this.schedulerStore.set('cancelledEvent', response?.data);\n\n this.schedulerStore.set('bookedEventLoading', false);\n return response;\n }\n\n /**\n * Reschedules a booking.\n * @param bookingId The booking ID.\n * @param data The booking info.\n * @returns {Promise<NylasResponse<NylasEvent>>}\n */\n public async rescheduleBooking(bookingId: string, data: NylasSchedulerBookingData): Promise<NylasResponse<NylasEvent>> {\n this.schedulerStore.set('bookedEventLoading', true);\n this.schedulerStore.set('bookedEventError', null);\n const { bookingInfo, selectedTimeslot, selectedTimezone } = this.schedulerStore.state;\n // Validate data\n const { startTime, endTime, timezone } = data;\n const start_time = startTime || selectedTimeslot?.start_time;\n const generalError = { error: { title: 'Reschedule error', message: '', type: 'validation' } } as NylasErrorResponse;\n if (!start_time) {\n return { error: { ...generalError, message: `Please pass 'startTime' in data or set 'selectedTimeslot in the defaultSchedulerStoreState.` } } as NylasErrorResponse;\n }\n const end_time = endTime || selectedTimeslot?.end_time;\n if (!end_time) {\n return { error: { ...generalError, message: `Please pass 'endTime' in data or set 'selectedTimeslot' in the defaultSchedulerStoreState.` } } as NylasErrorResponse;\n }\n const time_zone = timezone || selectedTimezone;\n if (!time_zone) {\n return { error: { ...generalError, message: `Please pass 'timezone' in data or set 'selectedTimezone' in the defaultSchedulerStoreState.` } } as NylasErrorResponse;\n }\n\n const primaryParticipant = data ? data?.primaryParticipant : bookingInfo?.primaryParticipant;\n const guests = data ? data?.guests || [] : bookingInfo?.guests || [];\n const additional_fields = data ? { ...data?.additionalFields } : { ...bookingInfo?.additionalFields };\n\n const url = `/schedule/bookings/${bookingId}`;\n const headers = {\n Authorization: `Bearer ${this.sessionId}`,\n };\n const response = await this.makeAPIRequest<NylasEvent>(\n decodeURIComponent(url),\n 'PATCH',\n JSON.stringify({\n start_time: start_time.getTime() / 1000,\n end_time: end_time.getTime() / 1000,\n time_zone,\n participants: [primaryParticipant, ...guests],\n additional_fields,\n }),\n headers,\n );\n\n if ('error' in response) this.schedulerStore.set('bookedEventError', { error: { ...response?.error, category: 'api' } } as NylasErrorResponse);\n\n if ('data' in response) this.schedulerStore.set('eventInfo', response?.data);\n\n this.schedulerStore.set('bookedEventLoading', false);\n return response;\n }\n}\n","import { DataState, NylasEvent } from '@/common/types';\nimport { debug } from '@/utils/utils';\nimport { NylasErrorResponse, NylasSchedulerBookingData, Timeslot } from '@nylas/core';\nimport { createStore } from '@stencil/store';\n\nexport type AvailabilityTimeslot = {\n emails: string[];\n start_time: Date;\n end_time: Date;\n};\n\nexport type LoadingState = {\n api: 'availability' | 'createBooking' | 'cancelBooking' | 'rescheduleBooking';\n};\n\nexport interface NylasSchedulerStoreState {\n selectedDate: Date | null;\n selectedLanguage: string;\n selectedTimezone: string;\n selectedTimeslot: Timeslot | null;\n showBookingForm: boolean;\n showThankYouMessage: boolean;\n selectableDates: Date[] | null;\n availability: AvailabilityTimeslot[];\n availabilityTimeslotsError: NylasErrorResponse | null;\n state: DataState;\n eventInfo: NylasEvent | null;\n cancelledEvent: NylasEvent | null;\n bookedEventError: NylasErrorResponse | null;\n bookedEventLoading: boolean;\n bookingInfo?: NylasSchedulerBookingData;\n rescheduleId?: string;\n bookingFlow?: 'booking' | 'rescheduling';\n loadingState: LoadingState | null;\n}\n\nexport type NylasSchedulerStoreType = ReturnType<typeof CreateNylasSchedulerStore>;\n\nexport function CreateNylasSchedulerStore(defaultState: Partial<NylasSchedulerStoreState> = {}) {\n const defaultNylasStoreState: NylasSchedulerStoreState = {\n selectedDate: null,\n selectedLanguage: navigator.language,\n selectedTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n selectedTimeslot: null,\n showBookingForm: false,\n showThankYouMessage: false,\n selectableDates: null,\n availability: [],\n availabilityTimeslotsError: null,\n state: 'ready',\n eventInfo: null,\n cancelledEvent: null,\n bookedEventError: null,\n bookedEventLoading: false,\n loadingState: null,\n ...defaultState,\n };\n debug(`[defaultNylasStoreState]: `, defaultNylasStoreState);\n const store = createStore<NylasSchedulerStoreState>(defaultNylasStoreState);\n\n store.onChange('availability', availability => {\n const selectableDates = availability.map(timeslot => timeslot.start_time);\n store.set('selectableDates', selectableDates);\n });\n\n store.onChange('rescheduleId', rescheduleId => {\n if (rescheduleId) {\n store.set('bookingFlow', 'rescheduling');\n } else {\n store.set('bookingFlow', 'booking');\n }\n });\n\n /**\n * Reset the Nylas store to its default state.\n * There is something wrong with the stencil/store reset method,\n * so we have to do it via this hack.\n */\n store.reset = () => {\n for (const key in defaultNylasStoreState) {\n const value = defaultNylasStoreState[key as keyof typeof defaultNylasStoreState];\n store.set(key as any, value);\n }\n };\n\n return store;\n}\n"],"mappings":"8EAcaA,EAKX,WAAAC,EAAYC,gBAAEA,EAAeC,eAAEA,EAAcC,UAAEA,IAC7CC,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xB,EAAwB,CACxC,MAAM9D,EAAQ8D,EAAuBwB,GACrCL,EAAMvF,IAAI4F,EAAYtF,E,GAI1B,OAAOiF,CACT,Q"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["async","appGlobalScript","import","globalScripts"],"sources":["src/common/global.ts","@stencil/core/internal/app-globals"],"sourcesContent":["export default async function () {\n await import('@spectrum-web-components/bundle/elements.js');\n}\n","import appGlobalScript from '/Users/aarondemello/Developer/nylas/nylas/packages/nylas-web-elements/src/common/global.ts';\nexport const globalScripts = appGlobalScript;\n"],"mappings":"AAAeA,eAAAC,UACPC,OAAO,kBACf,CCDY,MAACC,EAAgBF,S"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{g as t,f as e}from"./p-c66e27d0.js";const n=(t,e,n)=>{const s=t.get(e);if(!s){t.set(e,[n])}else if(!s.includes(n)){s.push(n)}};const s=(t,e)=>{let n;return(...s)=>{if(n){clearTimeout(n)}n=setTimeout((()=>{n=0;t(...s)}),e)}};const o=t=>!("isConnected"in t)||t.isConnected;const r=s((t=>{for(let e of t.keys()){t.set(e,t.get(e).filter(o))}}),2e3);const c=()=>{if(typeof t!=="function"){return{}}const s=new Map;return{dispose:()=>s.clear(),get:e=>{const o=t();if(o){n(s,e,o)}},set:t=>{const n=s.get(t);if(n){s.set(t,n.filter(e))}r(s)},reset:()=>{s.forEach((t=>t.forEach(e)));r(s)}}};const i=t=>typeof t==="function"?t():t;const u=(t,e=((t,e)=>t!==e))=>{const n=i(t);let s=new Map(Object.entries(n!==null&&n!==void 0?n:{}));const o={dispose:[],get:[],set:[],reset:[]};const r=()=>{var e;s=new Map(Object.entries((e=i(t))!==null&&e!==void 0?e:{}));o.reset.forEach((t=>t()))};const c=()=>{o.dispose.forEach((t=>t()));r()};const u=t=>{o.get.forEach((e=>e(t)));return s.get(t)};const p=(t,n)=>{const r=s.get(t);if(e(n,r,t)){s.set(t,n);o.set.forEach((e=>e(t,n,r)))}};const a=typeof Proxy==="undefined"?{}:new Proxy(n,{get(t,e){return u(e)},ownKeys(t){return Array.from(s.keys())},getOwnPropertyDescriptor(){return{enumerable:true,configurable:true}},has(t,e){return s.has(e)},set(t,e,n){p(e,n);return true}});const d=(t,e)=>{o[t].push(e);return()=>{f(o[t],e)}};const l=(e,n)=>{const s=d("set",((t,s)=>{if(t===e){n(s)}}));const o=d("reset",(()=>n(i(t)[e])));return()=>{s();o()}};const g=(...t)=>{const e=t.reduce(((t,e)=>{if(e.set){t.push(d("set",e.set))}if(e.get){t.push(d("get",e.get))}if(e.reset){t.push(d("reset",e.reset))}if(e.dispose){t.push(d("dispose",e.dispose))}return t}),[]);return()=>e.forEach((t=>t()))};const y=t=>{const e=s.get(t);o.set.forEach((n=>n(t,e,e)))};return{state:a,get:u,set:p,on:d,onChange:l,use:g,dispose:c,reset:r,forceUpdate:y}};const f=(t,e)=>{const n=t.indexOf(e);if(n>=0){t[n]=t[t.length-1];t.length--}};const p=(t,e)=>{const n=u(t,e);n.use(c());return n};export{p as c};
|
|
2
|
+
//# sourceMappingURL=p-eeb0a591.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["appendToMap","map","propName","value","items","get","set","includes","push","debounce","fn","ms","timeoutId","args","clearTimeout","setTimeout","isConnected","maybeElement","cleanupElements","key","keys","filter","stencilSubscription","getRenderingRef","elmsToUpdate","Map","dispose","clear","elm","elements","forceUpdate","reset","forEach","elms","unwrap","val","createObservableMap","defaultState","shouldUpdate","a","b","unwrappedState","states","Object","entries","handlers","_a","cb","oldValue","state","Proxy","_","ownKeys","Array","from","getOwnPropertyDescriptor","enumerable","configurable","has","on","eventName","callback","removeFromArray","onChange","unSet","newValue","unReset","use","subscriptions","unsubs","reduce","subscription","unsub","array","item","index","indexOf","length","createStore"],"sources":["../../node_modules/.pnpm/@stencil+store@2.0.13_@stencil+core@4.12.0/node_modules/@stencil/store/dist/index.mjs"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n"],"mappings":"2CAEA,MAAMA,EAAc,CAACC,EAAKC,EAAUC,KAChC,MAAMC,EAAQH,EAAII,IAAIH,GACtB,IAAKE,EAAO,CACRH,EAAIK,IAAIJ,EAAU,CAACC,GAC3B,MACS,IAAKC,EAAMG,SAASJ,GAAQ,CAC7BC,EAAMI,KAAKL,EACnB,GAEA,MAAMM,EAAW,CAACC,EAAIC,KAClB,IAAIC,EACJ,MAAO,IAAIC,KACP,GAAID,EAAW,CACXE,aAAaF,EACzB,CACQA,EAAYG,YAAW,KACnBH,EAAY,EACZF,KAAMG,EAAK,GACZF,EAAG,CACT,EAYL,MAAMK,EAAeC,KAAmB,gBAAiBA,IAAiBA,EAAaD,YACvF,MAAME,EAAkBT,GAAUR,IAC9B,IAAK,IAAIkB,KAAOlB,EAAImB,OAAQ,CACxBnB,EAAIK,IAAIa,EAAKlB,EAAII,IAAIc,GAAKE,OAAOL,GACzC,IACG,KACH,MAAMM,EAAsB,KACxB,UAAWC,IAAoB,WAAY,CAGvC,MAAO,EACf,CACI,MAAMC,EAAe,IAAIC,IACzB,MAAO,CACHC,QAAS,IAAMF,EAAaG,QAC5BtB,IAAMH,IACF,MAAM0B,EAAML,IACZ,GAAIK,EAAK,CACL5B,EAAYwB,EAActB,EAAU0B,EACpD,GAEQtB,IAAMJ,IACF,MAAM2B,EAAWL,EAAanB,IAAIH,GAClC,GAAI2B,EAAU,CACVL,EAAalB,IAAIJ,EAAU2B,EAASR,OAAOS,GAC3D,CACYZ,EAAgBM,EAAa,EAEjCO,MAAO,KACHP,EAAaQ,SAASC,GAASA,EAAKD,QAAQF,KAC5CZ,EAAgBM,EAAa,EAEpC,EAGL,MAAMU,EAAUC,UAAgBA,IAAQ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9CrC,EAAIkE,IAAI7C,KACR,OAAOrB,CAAG,S"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as C,h as s}from"./p-c66e27d0.js";const t=".sc-globe-icon-h{display:flex}";const e=t;const o=class{constructor(s){C(this,s);this.width="16";this.height="16"}render(){return s("svg",{key:"81b372fb35acad3083b0c55e6008506a67ed1c2d",xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height,viewBox:"0 0 16 16",fill:"none"},s("path",{key:"1a04560040321d73a460eeffc0c3174d8853337a",d:"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z",fill:"currentColor"}))}};o.style=e;export{o as globe_icon};
|
|
2
|
+
//# sourceMappingURL=p-f029c1b7.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["iconCss","GlobeIconStyle0","GlobeIcon","render","h","key","xmlns","width","this","height","viewBox","fill","d"],"sources":["src/common/icons/icon.css?tag=globe-icon&encapsulation=scoped","src/common/icons/globe.tsx"],"sourcesContent":[":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'globe-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class GlobeIcon {\n @Prop() width: string = '16';\n @Prop() height: string = '16';\n\n render() {\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" width={this.width} height={this.height} viewBox=\"0 0 16 16\" fill=\"none\">\n <path\n d=\"M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM8 3C8.37372 3 8.87543 3.35608 9.31258 4.31781C9.4073 4.52619 9.49448 4.75446 9.57265 5H6.42735C6.50552 4.75446 6.5927 4.52619 6.68742 4.31781C7.12457 3.35608 7.62628 3 8 3ZM5.77705 3.90401C5.62614 4.23601 5.49428 4.6038 5.38411 5H3.99963C4.52341 4.30269 5.22525 3.74677 6.03766 3.39978C5.94287 3.56117 5.85596 3.7304 5.77705 3.90401ZM5.16299 6C5.05694 6.6275 5 7.30146 5 8C5 8.69854 5.05694 9.3725 5.16299 10H3.41604C3.14845 9.38754 3 8.7111 3 8C3 7.2889 3.14845 6.61246 3.41604 6H5.16299ZM5.38411 11C5.49428 11.3962 5.62614 11.764 5.77705 12.096C5.85596 12.2696 5.94287 12.4388 6.03766 12.6002C5.22525 12.2532 4.52341 11.6973 3.99963 11H5.38411ZM6.42735 11H9.57265C9.49448 11.2455 9.4073 11.4738 9.31258 11.6822C8.87543 12.6439 8.37372 13 8 13C7.62628 13 7.12457 12.6439 6.68742 11.6822C6.5927 11.4738 6.50552 11.2455 6.42735 11ZM9.82134 10H6.17866C6.06438 9.3892 6 8.71396 6 8C6 7.28604 6.06438 6.6108 6.17866 6H9.82134C9.93562 6.6108 10 7.28604 10 8C10 8.71396 9.93562 9.3892 9.82134 10ZM10.6159 11H12.0004C11.4766 11.6973 10.7747 12.2532 9.96234 12.6002C10.0571 12.4388 10.144 12.2696 10.2229 12.096C10.3739 11.764 10.5057 11.3962 10.6159 11ZM12.584 10H10.837C10.9431 9.3725 11 8.69854 11 8C11 7.30146 10.9431 6.6275 10.837 6H12.584C12.8516 6.61246 13 7.2889 13 8C13 8.7111 12.8516 9.38754 12.584 10ZM9.96234 3.39978C10.7747 3.74677 11.4766 4.30269 12.0004 5H10.6159C10.5057 4.6038 10.3739 4.23601 10.2229 3.90401C10.144 3.7304 10.0571 3.56117 9.96234 3.39978Z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAU,iCAChB,MAAAC,EAAeD,E,MCMFE,EAAS,M,oCACI,K,YACC,I,CAEzB,MAAAC,GACE,OACEC,EAAA,OAAAC,IAAA,2CAAKC,MAAM,6BAA6BC,MAAOC,KAAKD,MAAOE,OAAQD,KAAKC,OAAQC,QAAQ,YAAYC,KAAK,QACvGP,EAAA,QAAAC,IAAA,2CACEO,EAAE,wiDACFD,KAAK,iB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as c,h as s}from"./p-c66e27d0.js";const l=".sc-refresh-icon-h{display:flex}";const e=l;const t=class{constructor(s){c(this,s);this.width="15";this.height="15"}render(){return s("svg",{key:"ca078c7b5d03fdf36c79f63da707997d185a6fdf",fill:"auto",width:this.width,height:this.height,viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},s("path",{key:"2ad6d8ea518cf1dca9b97aeffc85e3c4f436ea54",d:"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z"}))}};t.style=e;export{t as refresh_icon};
|
|
2
|
+
//# sourceMappingURL=p-f9a4758a.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["iconCss","RefreshIconStyle0","RefreshIcon","render","h","key","fill","width","this","height","viewBox","version","xmlns","d"],"sources":["src/common/icons/icon.css?tag=refresh-icon&encapsulation=scoped","src/common/icons/refresh.tsx"],"sourcesContent":[":host {\n display: flex;\n}\n","import { Component, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'refresh-icon',\n styleUrl: 'icon.css',\n scoped: true,\n})\nexport class RefreshIcon {\n @Prop() width: string = '15';\n @Prop() height: string = '15';\n\n render() {\n return (\n <svg fill=\"auto\" width={this.width} height={this.height} viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M15.544 28.080c-0.002-0.006-0.008-0.010-0.012-0.015l-2.873-4.489c-0.204-0.335-0.646-0.454-0.992-0.266l-0.256 0.157c-0.344 0.188-0.337 0.673-0.133 1.008l1.841 2.857c-0.157-0.035-0.316-0.063-0.471-0.103-3.224-0.843-5.953-3.026-7.485-5.988-1.448-2.797-1.72-5.99-0.766-8.992s3.118-5.452 5.915-6.899c0.476-0.247 0.662-0.832 0.416-1.308-0.246-0.477-0.832-0.663-1.308-0.416-3.258 1.686-5.763 4.54-6.874 8.036s-0.794 7.215 0.892 10.473c1.786 3.448 4.963 5.989 8.72 6.973 0.043 0.011 0.087 0.017 0.13 0.028l-2.541 1.288c-0.344 0.189-0.458 0.613-0.254 0.948l0.098 0.256c0.205 0.335 0.557 0.454 0.9 0.266l4.651-2.381c0.006-0.004 0.012-0.003 0.018-0.007l0.312-0.171c0.172-0.095 0.287-0.249 0.332-0.422 0.047-0.172 0.025-0.364-0.076-0.531zM28.559 10.025c-1.783-3.447-4.862-5.988-8.618-6.972-0.267-0.070-0.541-0.124-0.814-0.179l2.494-1.265c0.344-0.189 0.549-0.614 0.345-0.949l-0.099-0.255c-0.205-0.336-0.648-0.454-0.991-0.267l-4.651 2.381c-0.006 0.003-0.012 0.002-0.018 0.006l-0.312 0.171c-0.173 0.095-0.287 0.249-0.332 0.422-0.047 0.172-0.025 0.364 0.077 0.53l0.185 0.304c0.003 0.006 0.008 0.010 0.012 0.016l2.873 4.489c0.203 0.335 0.646 0.454 0.991 0.266l0.226-0.157c0.344-0.188 0.366-0.673 0.163-1.008l-1.85-2.87c0.407 0.063 0.811 0.138 1.207 0.242 3.226 0.845 5.856 3.027 7.387 5.986 1.448 2.797 1.72 5.99 0.765 8.991s-3.020 5.451-5.818 6.901c-0.476 0.247-0.662 0.831-0.415 1.308 0.172 0.332 0.511 0.524 0.863 0.524 0.15 0 0.302-0.035 0.446-0.109 3.259-1.686 5.664-4.54 6.776-8.035 1.111-3.497 0.794-7.217-0.893-10.473z\"></path>\n </svg>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAU,mCAChB,MAAAC,EAAeD,E,MCMFE,EAAW,M,oCACE,K,YACC,I,CAEzB,MAAAC,GACE,OACEC,EAAA,OAAAC,IAAA,2CAAKC,KAAK,OAAOC,MAAOC,KAAKD,MAAOE,OAAQD,KAAKC,OAAQC,QAAQ,YAAYC,QAAQ,MAAMC,MAAM,8BAC/FR,EAAA,QAAAC,IAAA,2CAAMQ,EAAE,0+C"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { RegisteredComponent } from "./register-component";
|
|
2
|
+
import { BaseNylasConnectorInterface } from "../connector/connector-interface";
|
|
3
|
+
import { ObservableMap } from '@stencil/store';
|
|
4
|
+
import { EventOverride } from './component-types';
|
|
5
|
+
export type PropKey = string | number | symbol;
|
|
6
|
+
export type StoreKey = string;
|
|
7
|
+
export type StoreName<T> = keyof T;
|
|
8
|
+
export type StateKey = string;
|
|
9
|
+
export type ElementID = string;
|
|
10
|
+
export type PropStateRegistration = {
|
|
11
|
+
elementId: ElementID;
|
|
12
|
+
propKey: PropKey;
|
|
13
|
+
};
|
|
14
|
+
export type EventListenerRegistration = [HTMLElement, PropKey, (event: CustomEvent<any>) => Promise<void>];
|
|
15
|
+
export interface NylasProviderInterface<Stores extends Record<string, ObservableMap<any>>> {
|
|
16
|
+
nylasConnector?: BaseNylasConnectorInterface;
|
|
17
|
+
stores: Stores;
|
|
18
|
+
host?: HTMLElement;
|
|
19
|
+
automaticComponentRegistration: boolean;
|
|
20
|
+
registeredComponents: Record<ElementID, RegisteredComponent<any, any>>;
|
|
21
|
+
propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>>;
|
|
22
|
+
eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]>;
|
|
23
|
+
componentWillLoad(nylasConnector: BaseNylasConnectorInterface): Promise<void>;
|
|
24
|
+
componentDidLoad(): Promise<void>;
|
|
25
|
+
componentDisconnected(): Promise<void>;
|
|
26
|
+
getStore<K extends keyof ThisType<this['stores']>>(name: K): ThisType<this['stores']>[K];
|
|
27
|
+
registerComponent(component: RegisteredComponent<any, any>): void;
|
|
28
|
+
unregisterComponent(component: RegisteredComponent<any, any>): void;
|
|
29
|
+
}
|
|
30
|
+
export declare abstract class NylasAbstractProvider<Stores extends Record<string, ObservableMap<any>>> implements NylasProviderInterface<Stores> {
|
|
31
|
+
nylasConnector?: BaseNylasConnectorInterface;
|
|
32
|
+
stores: Stores;
|
|
33
|
+
host: HTMLElement;
|
|
34
|
+
automaticComponentRegistration: boolean;
|
|
35
|
+
registeredComponents: Record<ElementID, RegisteredComponent<any, any>>;
|
|
36
|
+
propStateRegistrations: Map<StoreName<this['stores']>, Map<StateKey, PropStateRegistration[]>>;
|
|
37
|
+
eventListenerRegistrations: Map<ElementID, EventListenerRegistration[]>;
|
|
38
|
+
eventOverrides: EventOverride<Exclude<typeof this.nylasConnector, undefined>>;
|
|
39
|
+
constructor(host: HTMLElement, stores: Stores, automaticComponentRegistration: boolean | undefined, eventOverrides: EventOverride<any>);
|
|
40
|
+
componentWillLoad(nylasConnector: BaseNylasConnectorInterface): Promise<void>;
|
|
41
|
+
componentDidLoad(): Promise<void>;
|
|
42
|
+
componentDisconnected(): Promise<void>;
|
|
43
|
+
registerComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void>;
|
|
44
|
+
unregisterComponentHandler(event: CustomEvent<RegisteredComponent<any, any>>): Promise<void>;
|
|
45
|
+
registerComponent(component: RegisteredComponent<any, any>): void;
|
|
46
|
+
unregisterComponent(component: RegisteredComponent<any, any>): void;
|
|
47
|
+
getStore<K extends keyof Stores>(name: K): Stores[K];
|
|
48
|
+
private setupStoreListeners;
|
|
49
|
+
private get hostTagName();
|
|
50
|
+
}
|
|
51
|
+
export declare class NylasBaseProvider<T extends Record<string, ObservableMap<any>>> extends NylasAbstractProvider<T> {
|
|
52
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseNylasConnectorInterface, NylasSchedulerConnectorInterface } from "../connector/connector-interface";
|
|
2
|
+
import { NylasBookedEventCard } from '../components/scheduler/nylas-booked-event-card/nylas-booked-event-card';
|
|
3
|
+
import { NylasDatePicker } from '../components/scheduler/nylas-date-picker/nylas-date-picker';
|
|
4
|
+
import { NylasLocaleSwitch } from '../components/scheduler/nylas-locale-switch/nylas-locale-switch';
|
|
5
|
+
import { NylasOpenHoursPicker } from '../components/scheduler/nylas-open-hours-picker/nylas-open-hours-picker';
|
|
6
|
+
import { NylasBookingForm } from '../components/scheduler/nylas-booking-form/nylas-booking-form';
|
|
7
|
+
import { NylasSelectedEventCard } from '../components/scheduler/nylas-selected-event-card/nylas-selected-event-card';
|
|
8
|
+
import { NylasTimeslotPicker } from '../components/scheduler/nylas-timeslot-picker/nylas-timeslot-picker';
|
|
9
|
+
import { ExtractEventEmitterProperties } from './types';
|
|
10
|
+
export type EventOverride<Connector extends BaseNylasConnectorInterface> = Record<string, (event: CustomEvent<any>, connector?: Connector) => Promise<void>>;
|
|
11
|
+
export type SchedulerComponents = NylasTimeslotPicker | NylasDatePicker | NylasLocaleSwitch | NylasOpenHoursPicker | NylasBookingForm | NylasSelectedEventCard | NylasBookedEventCard;
|
|
12
|
+
export type NylasTimeslotPickerEventEmitterProperties = Exclude<ExtractEventEmitterProperties<NylasTimeslotPicker>, undefined>;
|
|
13
|
+
export type NylasDatePickerEventEmitterProperties = Exclude<ExtractEventEmitterProperties<NylasDatePicker>, undefined>;
|
|
14
|
+
export type NylasLocaleSwitchEventEmitterProperties = Exclude<ExtractEventEmitterProperties<NylasLocaleSwitch>, undefined>;
|
|
15
|
+
export type NylasOpenHoursPickerEventEmitterProperties = Exclude<ExtractEventEmitterProperties<NylasOpenHoursPicker>, undefined>;
|
|
16
|
+
export type NylasSchedulerAdditionalDataEventEmitterProperties = Exclude<ExtractEventEmitterProperties<NylasBookingForm>, undefined>;
|
|
17
|
+
export type NylasSelectedEventCardEventEmitterProperties = Exclude<ExtractEventEmitterProperties<NylasSelectedEventCard>, undefined>;
|
|
18
|
+
export type NylasBookedEventCardEventEmitterProperties = Exclude<ExtractEventEmitterProperties<NylasBookedEventCard>, undefined>;
|
|
19
|
+
export type SchedulerEventEmitterProperties = NylasTimeslotPickerEventEmitterProperties | NylasDatePickerEventEmitterProperties | NylasLocaleSwitchEventEmitterProperties | NylasOpenHoursPickerEventEmitterProperties | NylasSchedulerAdditionalDataEventEmitterProperties | NylasSelectedEventCardEventEmitterProperties | NylasBookedEventCardEventEmitterProperties;
|
|
20
|
+
export type SchedulerEventOverride = Partial<{
|
|
21
|
+
[P in SchedulerEventEmitterProperties as P['key']]: (event: CustomEvent<P['eventType']>, connector?: NylasSchedulerConnectorInterface) => Promise<void>;
|
|
22
|
+
}> & EventOverride<NylasSchedulerConnectorInterface>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function (): Promise<void>;
|