@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,888 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2021 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
class SizeCache {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
this._map = new Map();
|
|
9
|
+
this._roundAverageSize = false;
|
|
10
|
+
this.totalSize = 0;
|
|
11
|
+
if (config?.roundAverageSize === true) {
|
|
12
|
+
this._roundAverageSize = true;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
set(index, value) {
|
|
16
|
+
const prev = this._map.get(index) || 0;
|
|
17
|
+
this._map.set(index, value);
|
|
18
|
+
this.totalSize += value - prev;
|
|
19
|
+
}
|
|
20
|
+
get averageSize() {
|
|
21
|
+
if (this._map.size > 0) {
|
|
22
|
+
const average = this.totalSize / this._map.size;
|
|
23
|
+
return this._roundAverageSize ? Math.round(average) : average;
|
|
24
|
+
}
|
|
25
|
+
return 0;
|
|
26
|
+
}
|
|
27
|
+
getSize(index) {
|
|
28
|
+
return this._map.get(index);
|
|
29
|
+
}
|
|
30
|
+
clear() {
|
|
31
|
+
this._map.clear();
|
|
32
|
+
this.totalSize = 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @license
|
|
38
|
+
* Copyright 2021 Google LLC
|
|
39
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
40
|
+
*/
|
|
41
|
+
function dim1(direction) {
|
|
42
|
+
return direction === 'horizontal' ? 'width' : 'height';
|
|
43
|
+
}
|
|
44
|
+
class BaseLayout {
|
|
45
|
+
_getDefaultConfig() {
|
|
46
|
+
return {
|
|
47
|
+
direction: 'vertical',
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
constructor(hostSink, config) {
|
|
51
|
+
/**
|
|
52
|
+
* The last set viewport scroll position.
|
|
53
|
+
*/
|
|
54
|
+
this._latestCoords = { left: 0, top: 0 };
|
|
55
|
+
/**
|
|
56
|
+
* Scrolling direction.
|
|
57
|
+
*/
|
|
58
|
+
this._direction = null;
|
|
59
|
+
/**
|
|
60
|
+
* Dimensions of the viewport.
|
|
61
|
+
*/
|
|
62
|
+
this._viewportSize = { width: 0, height: 0 };
|
|
63
|
+
this.totalScrollSize = { width: 0, height: 0 };
|
|
64
|
+
this.offsetWithinScroller = { left: 0, top: 0 };
|
|
65
|
+
/**
|
|
66
|
+
* Flag for debouncing asynchronous reflow requests.
|
|
67
|
+
*/
|
|
68
|
+
this._pendingReflow = false;
|
|
69
|
+
this._pendingLayoutUpdate = false;
|
|
70
|
+
this._pin = null;
|
|
71
|
+
/**
|
|
72
|
+
* The index of the first item intersecting the viewport.
|
|
73
|
+
*/
|
|
74
|
+
this._firstVisible = 0;
|
|
75
|
+
/**
|
|
76
|
+
* The index of the last item intersecting the viewport.
|
|
77
|
+
*/
|
|
78
|
+
this._lastVisible = 0;
|
|
79
|
+
/**
|
|
80
|
+
* Pixel offset in the scroll direction of the first child.
|
|
81
|
+
*/
|
|
82
|
+
this._physicalMin = 0;
|
|
83
|
+
/**
|
|
84
|
+
* Pixel offset in the scroll direction of the last child.
|
|
85
|
+
*/
|
|
86
|
+
this._physicalMax = 0;
|
|
87
|
+
/**
|
|
88
|
+
* Index of the first child.
|
|
89
|
+
*/
|
|
90
|
+
this._first = -1;
|
|
91
|
+
/**
|
|
92
|
+
* Index of the last child.
|
|
93
|
+
*/
|
|
94
|
+
this._last = -1;
|
|
95
|
+
/**
|
|
96
|
+
* Length in the scrolling direction.
|
|
97
|
+
*/
|
|
98
|
+
this._sizeDim = 'height';
|
|
99
|
+
/**
|
|
100
|
+
* Length in the non-scrolling direction.
|
|
101
|
+
*/
|
|
102
|
+
this._secondarySizeDim = 'width';
|
|
103
|
+
/**
|
|
104
|
+
* Position in the scrolling direction.
|
|
105
|
+
*/
|
|
106
|
+
this._positionDim = 'top';
|
|
107
|
+
/**
|
|
108
|
+
* Position in the non-scrolling direction.
|
|
109
|
+
*/
|
|
110
|
+
this._secondaryPositionDim = 'left';
|
|
111
|
+
/**
|
|
112
|
+
* Current scroll offset in pixels.
|
|
113
|
+
*/
|
|
114
|
+
this._scrollPosition = 0;
|
|
115
|
+
/**
|
|
116
|
+
* Difference between current scroll offset and scroll offset calculated due
|
|
117
|
+
* to a reflow.
|
|
118
|
+
*/
|
|
119
|
+
this._scrollError = 0;
|
|
120
|
+
/**
|
|
121
|
+
* Total number of items that could possibly be displayed. Used to help
|
|
122
|
+
* calculate the scroll size.
|
|
123
|
+
*/
|
|
124
|
+
this._items = [];
|
|
125
|
+
/**
|
|
126
|
+
* The total (estimated) length of all items in the scrolling direction.
|
|
127
|
+
*/
|
|
128
|
+
this._scrollSize = 1;
|
|
129
|
+
/**
|
|
130
|
+
* Number of pixels beyond the viewport to still include
|
|
131
|
+
* in the active range of items.
|
|
132
|
+
*/
|
|
133
|
+
// TODO (graynorton): Probably want to make this something we calculate based
|
|
134
|
+
// on viewport size, item size, other factors, possibly still with a dial of some kind
|
|
135
|
+
this._overhang = 1000;
|
|
136
|
+
this._hostSink = hostSink;
|
|
137
|
+
// Delay setting config so that subclasses do setup work first
|
|
138
|
+
Promise.resolve().then(() => (this.config = config || this._getDefaultConfig()));
|
|
139
|
+
}
|
|
140
|
+
set config(config) {
|
|
141
|
+
Object.assign(this, Object.assign({}, this._getDefaultConfig(), config));
|
|
142
|
+
}
|
|
143
|
+
get config() {
|
|
144
|
+
return {
|
|
145
|
+
direction: this.direction,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Maximum index of children + 1, to help estimate total height of the scroll
|
|
150
|
+
* space.
|
|
151
|
+
*/
|
|
152
|
+
get items() {
|
|
153
|
+
return this._items;
|
|
154
|
+
}
|
|
155
|
+
set items(items) {
|
|
156
|
+
this._setItems(items);
|
|
157
|
+
}
|
|
158
|
+
_setItems(items) {
|
|
159
|
+
if (items !== this._items) {
|
|
160
|
+
this._items = items;
|
|
161
|
+
this._scheduleReflow();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Primary scrolling direction.
|
|
166
|
+
*/
|
|
167
|
+
get direction() {
|
|
168
|
+
return this._direction;
|
|
169
|
+
}
|
|
170
|
+
set direction(dir) {
|
|
171
|
+
// Force it to be either horizontal or vertical.
|
|
172
|
+
dir = dir === 'horizontal' ? dir : 'vertical';
|
|
173
|
+
if (dir !== this._direction) {
|
|
174
|
+
this._direction = dir;
|
|
175
|
+
this._sizeDim = dir === 'horizontal' ? 'width' : 'height';
|
|
176
|
+
this._secondarySizeDim = dir === 'horizontal' ? 'height' : 'width';
|
|
177
|
+
this._positionDim = dir === 'horizontal' ? 'left' : 'top';
|
|
178
|
+
this._secondaryPositionDim = dir === 'horizontal' ? 'top' : 'left';
|
|
179
|
+
this._triggerReflow();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Height and width of the viewport.
|
|
184
|
+
*/
|
|
185
|
+
get viewportSize() {
|
|
186
|
+
return this._viewportSize;
|
|
187
|
+
}
|
|
188
|
+
set viewportSize(dims) {
|
|
189
|
+
const { _viewDim1, _viewDim2 } = this;
|
|
190
|
+
Object.assign(this._viewportSize, dims);
|
|
191
|
+
if (_viewDim2 !== this._viewDim2) {
|
|
192
|
+
// this._viewDim2Changed();
|
|
193
|
+
this._scheduleLayoutUpdate();
|
|
194
|
+
}
|
|
195
|
+
else if (_viewDim1 !== this._viewDim1) {
|
|
196
|
+
this._checkThresholds();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Scroll offset of the viewport.
|
|
201
|
+
*/
|
|
202
|
+
get viewportScroll() {
|
|
203
|
+
return this._latestCoords;
|
|
204
|
+
}
|
|
205
|
+
set viewportScroll(coords) {
|
|
206
|
+
Object.assign(this._latestCoords, coords);
|
|
207
|
+
const oldPos = this._scrollPosition;
|
|
208
|
+
this._scrollPosition = this._latestCoords[this._positionDim];
|
|
209
|
+
const change = Math.abs(oldPos - this._scrollPosition);
|
|
210
|
+
if (change >= 1) {
|
|
211
|
+
this._checkThresholds();
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Perform a reflow if one has been scheduled.
|
|
216
|
+
*/
|
|
217
|
+
reflowIfNeeded(force = false) {
|
|
218
|
+
if (force || this._pendingReflow) {
|
|
219
|
+
this._pendingReflow = false;
|
|
220
|
+
this._reflow();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
set pin(options) {
|
|
224
|
+
this._pin = options;
|
|
225
|
+
this._triggerReflow();
|
|
226
|
+
}
|
|
227
|
+
get pin() {
|
|
228
|
+
if (this._pin !== null) {
|
|
229
|
+
const { index, block } = this._pin;
|
|
230
|
+
return {
|
|
231
|
+
index: Math.max(0, Math.min(index, this.items.length - 1)),
|
|
232
|
+
block,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
return null;
|
|
236
|
+
}
|
|
237
|
+
_clampScrollPosition(val) {
|
|
238
|
+
return Math.max(-this.offsetWithinScroller[this._positionDim], Math.min(val, this.totalScrollSize[dim1(this.direction)] - this._viewDim1));
|
|
239
|
+
}
|
|
240
|
+
unpin() {
|
|
241
|
+
if (this._pin !== null) {
|
|
242
|
+
this._sendUnpinnedMessage();
|
|
243
|
+
this._pin = null;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
_updateLayout() {
|
|
247
|
+
// Override
|
|
248
|
+
}
|
|
249
|
+
// protected _viewDim2Changed(): void {
|
|
250
|
+
// this._scheduleLayoutUpdate();
|
|
251
|
+
// }
|
|
252
|
+
/**
|
|
253
|
+
* The height or width of the viewport, whichever corresponds to the scrolling direction.
|
|
254
|
+
*/
|
|
255
|
+
get _viewDim1() {
|
|
256
|
+
return this._viewportSize[this._sizeDim];
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* The height or width of the viewport, whichever does NOT correspond to the scrolling direction.
|
|
260
|
+
*/
|
|
261
|
+
get _viewDim2() {
|
|
262
|
+
return this._viewportSize[this._secondarySizeDim];
|
|
263
|
+
}
|
|
264
|
+
_scheduleReflow() {
|
|
265
|
+
this._pendingReflow = true;
|
|
266
|
+
}
|
|
267
|
+
_scheduleLayoutUpdate() {
|
|
268
|
+
this._pendingLayoutUpdate = true;
|
|
269
|
+
this._scheduleReflow();
|
|
270
|
+
}
|
|
271
|
+
// For triggering a reflow based on incoming changes to
|
|
272
|
+
// the layout config.
|
|
273
|
+
_triggerReflow() {
|
|
274
|
+
this._scheduleLayoutUpdate();
|
|
275
|
+
// TODO graynorton@: reflowIfNeeded() isn't really supposed
|
|
276
|
+
// to be called internally. Address in larger cleanup
|
|
277
|
+
// of virtualizer / layout interaction pattern.
|
|
278
|
+
// this.reflowIfNeeded(true);
|
|
279
|
+
Promise.resolve().then(() => this.reflowIfNeeded());
|
|
280
|
+
}
|
|
281
|
+
_reflow() {
|
|
282
|
+
if (this._pendingLayoutUpdate) {
|
|
283
|
+
this._updateLayout();
|
|
284
|
+
this._pendingLayoutUpdate = false;
|
|
285
|
+
}
|
|
286
|
+
this._updateScrollSize();
|
|
287
|
+
this._setPositionFromPin();
|
|
288
|
+
this._getActiveItems();
|
|
289
|
+
this._updateVisibleIndices();
|
|
290
|
+
this._sendStateChangedMessage();
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* If we are supposed to be pinned to a particular
|
|
294
|
+
* item or set of coordinates, we set `_scrollPosition`
|
|
295
|
+
* accordingly and adjust `_scrollError` as needed
|
|
296
|
+
* so that the virtualizer can keep the scroll
|
|
297
|
+
* position in the DOM in sync
|
|
298
|
+
*/
|
|
299
|
+
_setPositionFromPin() {
|
|
300
|
+
if (this.pin !== null) {
|
|
301
|
+
const lastScrollPosition = this._scrollPosition;
|
|
302
|
+
const { index, block } = this.pin;
|
|
303
|
+
this._scrollPosition =
|
|
304
|
+
this._calculateScrollIntoViewPosition({
|
|
305
|
+
index,
|
|
306
|
+
block: block || 'start',
|
|
307
|
+
}) - this.offsetWithinScroller[this._positionDim];
|
|
308
|
+
this._scrollError = lastScrollPosition - this._scrollPosition;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Calculate the coordinates to scroll to, given
|
|
313
|
+
* a request to scroll to the element at a specific
|
|
314
|
+
* index.
|
|
315
|
+
*
|
|
316
|
+
* Supports the same positioning options (`start`,
|
|
317
|
+
* `center`, `end`, `nearest`) as the standard
|
|
318
|
+
* `Element.scrollIntoView()` method, but currently
|
|
319
|
+
* only considers the provided value in the `block`
|
|
320
|
+
* dimension, since we don't yet have any layouts
|
|
321
|
+
* that support virtualization in two dimensions.
|
|
322
|
+
*/
|
|
323
|
+
_calculateScrollIntoViewPosition(options) {
|
|
324
|
+
const { block } = options;
|
|
325
|
+
const index = Math.min(this.items.length, Math.max(0, options.index));
|
|
326
|
+
const itemStartPosition = this._getItemPosition(index)[this._positionDim];
|
|
327
|
+
let scrollPosition = itemStartPosition;
|
|
328
|
+
if (block !== 'start') {
|
|
329
|
+
const itemSize = this._getItemSize(index)[this._sizeDim];
|
|
330
|
+
if (block === 'center') {
|
|
331
|
+
scrollPosition =
|
|
332
|
+
itemStartPosition - 0.5 * this._viewDim1 + 0.5 * itemSize;
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
const itemEndPosition = itemStartPosition - this._viewDim1 + itemSize;
|
|
336
|
+
if (block === 'end') {
|
|
337
|
+
scrollPosition = itemEndPosition;
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
// block === 'nearest'
|
|
341
|
+
const currentScrollPosition = this._scrollPosition;
|
|
342
|
+
scrollPosition =
|
|
343
|
+
Math.abs(currentScrollPosition - itemStartPosition) <
|
|
344
|
+
Math.abs(currentScrollPosition - itemEndPosition)
|
|
345
|
+
? itemStartPosition
|
|
346
|
+
: itemEndPosition;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
scrollPosition += this.offsetWithinScroller[this._positionDim];
|
|
351
|
+
return this._clampScrollPosition(scrollPosition);
|
|
352
|
+
}
|
|
353
|
+
getScrollIntoViewCoordinates(options) {
|
|
354
|
+
return {
|
|
355
|
+
[this._positionDim]: this._calculateScrollIntoViewPosition(options),
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
_sendUnpinnedMessage() {
|
|
359
|
+
this._hostSink({
|
|
360
|
+
type: 'unpinned',
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
_sendVisibilityChangedMessage() {
|
|
364
|
+
this._hostSink({
|
|
365
|
+
type: 'visibilityChanged',
|
|
366
|
+
firstVisible: this._firstVisible,
|
|
367
|
+
lastVisible: this._lastVisible,
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
_sendStateChangedMessage() {
|
|
371
|
+
const childPositions = new Map();
|
|
372
|
+
if (this._first !== -1 && this._last !== -1) {
|
|
373
|
+
for (let idx = this._first; idx <= this._last; idx++) {
|
|
374
|
+
childPositions.set(idx, this._getItemPosition(idx));
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
const message = {
|
|
378
|
+
type: 'stateChanged',
|
|
379
|
+
scrollSize: {
|
|
380
|
+
[this._sizeDim]: this._scrollSize,
|
|
381
|
+
[this._secondarySizeDim]: null,
|
|
382
|
+
},
|
|
383
|
+
range: {
|
|
384
|
+
first: this._first,
|
|
385
|
+
last: this._last,
|
|
386
|
+
firstVisible: this._firstVisible,
|
|
387
|
+
lastVisible: this._lastVisible,
|
|
388
|
+
},
|
|
389
|
+
childPositions,
|
|
390
|
+
};
|
|
391
|
+
if (this._scrollError) {
|
|
392
|
+
message.scrollError = {
|
|
393
|
+
[this._positionDim]: this._scrollError,
|
|
394
|
+
[this._secondaryPositionDim]: 0,
|
|
395
|
+
};
|
|
396
|
+
this._scrollError = 0;
|
|
397
|
+
}
|
|
398
|
+
this._hostSink(message);
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* Number of items to display.
|
|
402
|
+
*/
|
|
403
|
+
get _num() {
|
|
404
|
+
if (this._first === -1 || this._last === -1) {
|
|
405
|
+
return 0;
|
|
406
|
+
}
|
|
407
|
+
return this._last - this._first + 1;
|
|
408
|
+
}
|
|
409
|
+
_checkThresholds() {
|
|
410
|
+
if ((this._viewDim1 === 0 && this._num > 0) || this._pin !== null) {
|
|
411
|
+
this._scheduleReflow();
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
const min = Math.max(0, this._scrollPosition - this._overhang);
|
|
415
|
+
const max = Math.min(this._scrollSize, this._scrollPosition + this._viewDim1 + this._overhang);
|
|
416
|
+
if (this._physicalMin > min || this._physicalMax < max) {
|
|
417
|
+
this._scheduleReflow();
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
this._updateVisibleIndices({ emit: true });
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Find the indices of the first and last items to intersect the viewport.
|
|
426
|
+
* Emit a visibleindiceschange event when either index changes.
|
|
427
|
+
*/
|
|
428
|
+
_updateVisibleIndices(options) {
|
|
429
|
+
if (this._first === -1 || this._last === -1)
|
|
430
|
+
return;
|
|
431
|
+
let firstVisible = this._first;
|
|
432
|
+
while (firstVisible < this._last &&
|
|
433
|
+
Math.round(this._getItemPosition(firstVisible)[this._positionDim] +
|
|
434
|
+
this._getItemSize(firstVisible)[this._sizeDim]) <= Math.round(this._scrollPosition)) {
|
|
435
|
+
firstVisible++;
|
|
436
|
+
}
|
|
437
|
+
let lastVisible = this._last;
|
|
438
|
+
while (lastVisible > this._first &&
|
|
439
|
+
Math.round(this._getItemPosition(lastVisible)[this._positionDim]) >=
|
|
440
|
+
Math.round(this._scrollPosition + this._viewDim1)) {
|
|
441
|
+
lastVisible--;
|
|
442
|
+
}
|
|
443
|
+
if (firstVisible !== this._firstVisible ||
|
|
444
|
+
lastVisible !== this._lastVisible) {
|
|
445
|
+
this._firstVisible = firstVisible;
|
|
446
|
+
this._lastVisible = lastVisible;
|
|
447
|
+
if (options && options.emit) {
|
|
448
|
+
this._sendVisibilityChangedMessage();
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* @license
|
|
456
|
+
* Copyright 2021 Google LLC
|
|
457
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
458
|
+
*/
|
|
459
|
+
const flow = (config) => Object.assign({
|
|
460
|
+
type: FlowLayout,
|
|
461
|
+
}, config);
|
|
462
|
+
function leadingMargin(direction) {
|
|
463
|
+
return direction === 'horizontal' ? 'marginLeft' : 'marginTop';
|
|
464
|
+
}
|
|
465
|
+
function trailingMargin(direction) {
|
|
466
|
+
return direction === 'horizontal' ? 'marginRight' : 'marginBottom';
|
|
467
|
+
}
|
|
468
|
+
function offset(direction) {
|
|
469
|
+
return direction === 'horizontal' ? 'xOffset' : 'yOffset';
|
|
470
|
+
}
|
|
471
|
+
function collapseMargins(a, b) {
|
|
472
|
+
const m = [a, b].sort();
|
|
473
|
+
return m[1] <= 0 ? Math.min(...m) : m[0] >= 0 ? Math.max(...m) : m[0] + m[1];
|
|
474
|
+
}
|
|
475
|
+
class MetricsCache {
|
|
476
|
+
constructor() {
|
|
477
|
+
this._childSizeCache = new SizeCache();
|
|
478
|
+
this._marginSizeCache = new SizeCache();
|
|
479
|
+
this._metricsCache = new Map();
|
|
480
|
+
}
|
|
481
|
+
update(metrics, direction) {
|
|
482
|
+
const marginsToUpdate = new Set();
|
|
483
|
+
Object.keys(metrics).forEach((key) => {
|
|
484
|
+
const k = Number(key);
|
|
485
|
+
this._metricsCache.set(k, metrics[k]);
|
|
486
|
+
this._childSizeCache.set(k, metrics[k][dim1(direction)]);
|
|
487
|
+
marginsToUpdate.add(k);
|
|
488
|
+
marginsToUpdate.add(k + 1);
|
|
489
|
+
});
|
|
490
|
+
for (const k of marginsToUpdate) {
|
|
491
|
+
const a = this._metricsCache.get(k)?.[leadingMargin(direction)] || 0;
|
|
492
|
+
const b = this._metricsCache.get(k - 1)?.[trailingMargin(direction)] || 0;
|
|
493
|
+
this._marginSizeCache.set(k, collapseMargins(a, b));
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
get averageChildSize() {
|
|
497
|
+
return this._childSizeCache.averageSize;
|
|
498
|
+
}
|
|
499
|
+
get totalChildSize() {
|
|
500
|
+
return this._childSizeCache.totalSize;
|
|
501
|
+
}
|
|
502
|
+
get averageMarginSize() {
|
|
503
|
+
return this._marginSizeCache.averageSize;
|
|
504
|
+
}
|
|
505
|
+
get totalMarginSize() {
|
|
506
|
+
return this._marginSizeCache.totalSize;
|
|
507
|
+
}
|
|
508
|
+
getLeadingMarginValue(index, direction) {
|
|
509
|
+
return this._metricsCache.get(index)?.[leadingMargin(direction)] || 0;
|
|
510
|
+
}
|
|
511
|
+
getChildSize(index) {
|
|
512
|
+
return this._childSizeCache.getSize(index);
|
|
513
|
+
}
|
|
514
|
+
getMarginSize(index) {
|
|
515
|
+
return this._marginSizeCache.getSize(index);
|
|
516
|
+
}
|
|
517
|
+
clear() {
|
|
518
|
+
this._childSizeCache.clear();
|
|
519
|
+
this._marginSizeCache.clear();
|
|
520
|
+
this._metricsCache.clear();
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
class FlowLayout extends BaseLayout {
|
|
524
|
+
constructor() {
|
|
525
|
+
super(...arguments);
|
|
526
|
+
/**
|
|
527
|
+
* Initial estimate of item size
|
|
528
|
+
*/
|
|
529
|
+
this._itemSize = { width: 100, height: 100 };
|
|
530
|
+
/**
|
|
531
|
+
* Indices of children mapped to their (position and length) in the scrolling
|
|
532
|
+
* direction. Used to keep track of children that are in range.
|
|
533
|
+
*/
|
|
534
|
+
this._physicalItems = new Map();
|
|
535
|
+
/**
|
|
536
|
+
* Used in tandem with _physicalItems to track children in range across
|
|
537
|
+
* reflows.
|
|
538
|
+
*/
|
|
539
|
+
this._newPhysicalItems = new Map();
|
|
540
|
+
/**
|
|
541
|
+
* Width and height of children by their index.
|
|
542
|
+
*/
|
|
543
|
+
this._metricsCache = new MetricsCache();
|
|
544
|
+
/**
|
|
545
|
+
* anchorIdx is the anchor around which we reflow. It is designed to allow
|
|
546
|
+
* jumping to any point of the scroll size. We choose it once and stick with
|
|
547
|
+
* it until stable. _first and _last are deduced around it.
|
|
548
|
+
*/
|
|
549
|
+
this._anchorIdx = null;
|
|
550
|
+
/**
|
|
551
|
+
* Position in the scrolling direction of the anchor child.
|
|
552
|
+
*/
|
|
553
|
+
this._anchorPos = null;
|
|
554
|
+
/**
|
|
555
|
+
* Whether all children in range were in range during the previous reflow.
|
|
556
|
+
*/
|
|
557
|
+
this._stable = true;
|
|
558
|
+
this._measureChildren = true;
|
|
559
|
+
this._estimate = true;
|
|
560
|
+
}
|
|
561
|
+
// protected _defaultConfig: BaseLayoutConfig = Object.assign({}, super._defaultConfig, {
|
|
562
|
+
// })
|
|
563
|
+
// constructor(config: Layout1dConfig) {
|
|
564
|
+
// super(config);
|
|
565
|
+
// }
|
|
566
|
+
get measureChildren() {
|
|
567
|
+
return this._measureChildren;
|
|
568
|
+
}
|
|
569
|
+
/**
|
|
570
|
+
* Determine the average size of all children represented in the sizes
|
|
571
|
+
* argument.
|
|
572
|
+
*/
|
|
573
|
+
updateItemSizes(sizes) {
|
|
574
|
+
this._metricsCache.update(sizes, this.direction);
|
|
575
|
+
// if (this._nMeasured) {
|
|
576
|
+
// this._updateItemSize();
|
|
577
|
+
this._scheduleReflow();
|
|
578
|
+
// }
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Set the average item size based on the total length and number of children
|
|
582
|
+
* in range.
|
|
583
|
+
*/
|
|
584
|
+
// _updateItemSize() {
|
|
585
|
+
// // Keep integer values.
|
|
586
|
+
// this._itemSize[this._sizeDim] = this._metricsCache.averageChildSize;
|
|
587
|
+
// }
|
|
588
|
+
_getPhysicalItem(idx) {
|
|
589
|
+
return this._newPhysicalItems.get(idx) ?? this._physicalItems.get(idx);
|
|
590
|
+
}
|
|
591
|
+
_getSize(idx) {
|
|
592
|
+
const item = this._getPhysicalItem(idx);
|
|
593
|
+
return item && this._metricsCache.getChildSize(idx);
|
|
594
|
+
}
|
|
595
|
+
_getAverageSize() {
|
|
596
|
+
return this._metricsCache.averageChildSize || this._itemSize[this._sizeDim];
|
|
597
|
+
}
|
|
598
|
+
_estimatePosition(idx) {
|
|
599
|
+
const c = this._metricsCache;
|
|
600
|
+
if (this._first === -1 || this._last === -1) {
|
|
601
|
+
return (c.averageMarginSize +
|
|
602
|
+
idx * (c.averageMarginSize + this._getAverageSize()));
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
if (idx < this._first) {
|
|
606
|
+
const delta = this._first - idx;
|
|
607
|
+
const refItem = this._getPhysicalItem(this._first);
|
|
608
|
+
return (refItem.pos -
|
|
609
|
+
(c.getMarginSize(this._first - 1) || c.averageMarginSize) -
|
|
610
|
+
(delta * c.averageChildSize + (delta - 1) * c.averageMarginSize));
|
|
611
|
+
}
|
|
612
|
+
else {
|
|
613
|
+
const delta = idx - this._last;
|
|
614
|
+
const refItem = this._getPhysicalItem(this._last);
|
|
615
|
+
return (refItem.pos +
|
|
616
|
+
(c.getChildSize(this._last) || c.averageChildSize) +
|
|
617
|
+
(c.getMarginSize(this._last) || c.averageMarginSize) +
|
|
618
|
+
delta * (c.averageChildSize + c.averageMarginSize));
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Returns the position in the scrolling direction of the item at idx.
|
|
624
|
+
* Estimates it if the item at idx is not in the DOM.
|
|
625
|
+
*/
|
|
626
|
+
_getPosition(idx) {
|
|
627
|
+
const item = this._getPhysicalItem(idx);
|
|
628
|
+
const { averageMarginSize } = this._metricsCache;
|
|
629
|
+
return idx === 0
|
|
630
|
+
? this._metricsCache.getMarginSize(0) ?? averageMarginSize
|
|
631
|
+
: item
|
|
632
|
+
? item.pos
|
|
633
|
+
: this._estimatePosition(idx);
|
|
634
|
+
}
|
|
635
|
+
_calculateAnchor(lower, upper) {
|
|
636
|
+
if (lower <= 0) {
|
|
637
|
+
return 0;
|
|
638
|
+
}
|
|
639
|
+
if (upper > this._scrollSize - this._viewDim1) {
|
|
640
|
+
return this.items.length - 1;
|
|
641
|
+
}
|
|
642
|
+
return Math.max(0, Math.min(this.items.length - 1, Math.floor((lower + upper) / 2 / this._delta)));
|
|
643
|
+
}
|
|
644
|
+
_getAnchor(lower, upper) {
|
|
645
|
+
if (this._physicalItems.size === 0) {
|
|
646
|
+
return this._calculateAnchor(lower, upper);
|
|
647
|
+
}
|
|
648
|
+
if (this._first < 0) {
|
|
649
|
+
return this._calculateAnchor(lower, upper);
|
|
650
|
+
}
|
|
651
|
+
if (this._last < 0) {
|
|
652
|
+
return this._calculateAnchor(lower, upper);
|
|
653
|
+
}
|
|
654
|
+
const firstItem = this._getPhysicalItem(this._first), lastItem = this._getPhysicalItem(this._last), firstMin = firstItem.pos, lastMin = lastItem.pos, lastMax = lastMin + this._metricsCache.getChildSize(this._last);
|
|
655
|
+
if (lastMax < lower) {
|
|
656
|
+
// Window is entirely past physical items, calculate new anchor
|
|
657
|
+
return this._calculateAnchor(lower, upper);
|
|
658
|
+
}
|
|
659
|
+
if (firstMin > upper) {
|
|
660
|
+
// Window is entirely before physical items, calculate new anchor
|
|
661
|
+
return this._calculateAnchor(lower, upper);
|
|
662
|
+
}
|
|
663
|
+
// Window contains a physical item
|
|
664
|
+
// Find one, starting with the one that was previously first visible
|
|
665
|
+
let candidateIdx = this._firstVisible - 1;
|
|
666
|
+
let cMax = -Infinity;
|
|
667
|
+
while (cMax < lower) {
|
|
668
|
+
const candidate = this._getPhysicalItem(++candidateIdx);
|
|
669
|
+
cMax = candidate.pos + this._metricsCache.getChildSize(candidateIdx);
|
|
670
|
+
}
|
|
671
|
+
return candidateIdx;
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Updates _first and _last based on items that should be in the current
|
|
675
|
+
* viewed range.
|
|
676
|
+
*/
|
|
677
|
+
_getActiveItems() {
|
|
678
|
+
if (this._viewDim1 === 0 || this.items.length === 0) {
|
|
679
|
+
this._clearItems();
|
|
680
|
+
}
|
|
681
|
+
else {
|
|
682
|
+
this._getItems();
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Sets the range to empty.
|
|
687
|
+
*/
|
|
688
|
+
_clearItems() {
|
|
689
|
+
this._first = -1;
|
|
690
|
+
this._last = -1;
|
|
691
|
+
this._physicalMin = 0;
|
|
692
|
+
this._physicalMax = 0;
|
|
693
|
+
const items = this._newPhysicalItems;
|
|
694
|
+
this._newPhysicalItems = this._physicalItems;
|
|
695
|
+
this._newPhysicalItems.clear();
|
|
696
|
+
this._physicalItems = items;
|
|
697
|
+
this._stable = true;
|
|
698
|
+
}
|
|
699
|
+
/*
|
|
700
|
+
* Updates _first and _last based on items that should be in the given range.
|
|
701
|
+
*/
|
|
702
|
+
_getItems() {
|
|
703
|
+
const items = this._newPhysicalItems;
|
|
704
|
+
this._stable = true;
|
|
705
|
+
let lower, upper;
|
|
706
|
+
// The anchorIdx is the anchor around which we reflow. It is designed to
|
|
707
|
+
// allow jumping to any point of the scroll size. We choose it once and
|
|
708
|
+
// stick with it until stable. first and last are deduced around it.
|
|
709
|
+
// If we have a pinned item, we anchor on it
|
|
710
|
+
if (this.pin !== null) {
|
|
711
|
+
const { index } = this.pin;
|
|
712
|
+
this._anchorIdx = index;
|
|
713
|
+
this._anchorPos = this._getPosition(index);
|
|
714
|
+
}
|
|
715
|
+
// Determine the lower and upper bounds of the region to be
|
|
716
|
+
// rendered, relative to the viewport
|
|
717
|
+
lower = this._scrollPosition - this._overhang; //leadingOverhang;
|
|
718
|
+
upper = this._scrollPosition + this._viewDim1 + this._overhang; // trailingOverhang;
|
|
719
|
+
if (upper < 0 || lower > this._scrollSize) {
|
|
720
|
+
this._clearItems();
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
// If we are scrolling to a specific index or if we are doing another
|
|
724
|
+
// pass to stabilize a previously started reflow, we will already
|
|
725
|
+
// have an anchor. If not, establish an anchor now.
|
|
726
|
+
if (this._anchorIdx === null || this._anchorPos === null) {
|
|
727
|
+
this._anchorIdx = this._getAnchor(lower, upper);
|
|
728
|
+
this._anchorPos = this._getPosition(this._anchorIdx);
|
|
729
|
+
}
|
|
730
|
+
let anchorSize = this._getSize(this._anchorIdx);
|
|
731
|
+
if (anchorSize === undefined) {
|
|
732
|
+
this._stable = false;
|
|
733
|
+
anchorSize = this._getAverageSize();
|
|
734
|
+
}
|
|
735
|
+
const anchorLeadingMargin = this._metricsCache.getMarginSize(this._anchorIdx) ??
|
|
736
|
+
this._metricsCache.averageMarginSize;
|
|
737
|
+
const anchorTrailingMargin = this._metricsCache.getMarginSize(this._anchorIdx + 1) ??
|
|
738
|
+
this._metricsCache.averageMarginSize;
|
|
739
|
+
if (this._anchorIdx === 0) {
|
|
740
|
+
this._anchorPos = anchorLeadingMargin;
|
|
741
|
+
}
|
|
742
|
+
if (this._anchorIdx === this.items.length - 1) {
|
|
743
|
+
this._anchorPos = this._scrollSize - anchorTrailingMargin - anchorSize;
|
|
744
|
+
}
|
|
745
|
+
// Anchor might be outside bounds, so prefer correcting the error and keep
|
|
746
|
+
// that anchorIdx.
|
|
747
|
+
let anchorErr = 0;
|
|
748
|
+
if (this._anchorPos + anchorSize + anchorTrailingMargin < lower) {
|
|
749
|
+
anchorErr = lower - (this._anchorPos + anchorSize + anchorTrailingMargin);
|
|
750
|
+
}
|
|
751
|
+
if (this._anchorPos - anchorLeadingMargin > upper) {
|
|
752
|
+
anchorErr = upper - (this._anchorPos - anchorLeadingMargin);
|
|
753
|
+
}
|
|
754
|
+
if (anchorErr) {
|
|
755
|
+
this._scrollPosition -= anchorErr;
|
|
756
|
+
lower -= anchorErr;
|
|
757
|
+
upper -= anchorErr;
|
|
758
|
+
this._scrollError += anchorErr;
|
|
759
|
+
}
|
|
760
|
+
items.set(this._anchorIdx, { pos: this._anchorPos, size: anchorSize });
|
|
761
|
+
this._first = this._last = this._anchorIdx;
|
|
762
|
+
this._physicalMin = this._anchorPos - anchorLeadingMargin;
|
|
763
|
+
this._physicalMax = this._anchorPos + anchorSize + anchorTrailingMargin;
|
|
764
|
+
while (this._physicalMin > lower && this._first > 0) {
|
|
765
|
+
let size = this._getSize(--this._first);
|
|
766
|
+
if (size === undefined) {
|
|
767
|
+
this._stable = false;
|
|
768
|
+
size = this._getAverageSize();
|
|
769
|
+
}
|
|
770
|
+
let margin = this._metricsCache.getMarginSize(this._first);
|
|
771
|
+
if (margin === undefined) {
|
|
772
|
+
this._stable = false;
|
|
773
|
+
margin = this._metricsCache.averageMarginSize;
|
|
774
|
+
}
|
|
775
|
+
this._physicalMin -= size;
|
|
776
|
+
const pos = this._physicalMin;
|
|
777
|
+
items.set(this._first, { pos, size });
|
|
778
|
+
this._physicalMin -= margin;
|
|
779
|
+
if (this._stable === false && this._estimate === false) {
|
|
780
|
+
break;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
while (this._physicalMax < upper && this._last < this.items.length - 1) {
|
|
784
|
+
let size = this._getSize(++this._last);
|
|
785
|
+
if (size === undefined) {
|
|
786
|
+
this._stable = false;
|
|
787
|
+
size = this._getAverageSize();
|
|
788
|
+
}
|
|
789
|
+
let margin = this._metricsCache.getMarginSize(this._last);
|
|
790
|
+
if (margin === undefined) {
|
|
791
|
+
this._stable = false;
|
|
792
|
+
margin = this._metricsCache.averageMarginSize;
|
|
793
|
+
}
|
|
794
|
+
const pos = this._physicalMax;
|
|
795
|
+
items.set(this._last, { pos, size });
|
|
796
|
+
this._physicalMax += size + margin;
|
|
797
|
+
if (!this._stable && !this._estimate) {
|
|
798
|
+
break;
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
// This handles the cases where we were relying on estimated sizes.
|
|
802
|
+
const extentErr = this._calculateError();
|
|
803
|
+
if (extentErr) {
|
|
804
|
+
this._physicalMin -= extentErr;
|
|
805
|
+
this._physicalMax -= extentErr;
|
|
806
|
+
this._anchorPos -= extentErr;
|
|
807
|
+
this._scrollPosition -= extentErr;
|
|
808
|
+
items.forEach((item) => (item.pos -= extentErr));
|
|
809
|
+
this._scrollError += extentErr;
|
|
810
|
+
}
|
|
811
|
+
if (this._stable) {
|
|
812
|
+
this._newPhysicalItems = this._physicalItems;
|
|
813
|
+
this._newPhysicalItems.clear();
|
|
814
|
+
this._physicalItems = items;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
_calculateError() {
|
|
818
|
+
if (this._first === 0) {
|
|
819
|
+
return this._physicalMin;
|
|
820
|
+
}
|
|
821
|
+
else if (this._physicalMin <= 0) {
|
|
822
|
+
return this._physicalMin - this._first * this._delta;
|
|
823
|
+
}
|
|
824
|
+
else if (this._last === this.items.length - 1) {
|
|
825
|
+
return this._physicalMax - this._scrollSize;
|
|
826
|
+
}
|
|
827
|
+
else if (this._physicalMax >= this._scrollSize) {
|
|
828
|
+
return (this._physicalMax -
|
|
829
|
+
this._scrollSize +
|
|
830
|
+
(this.items.length - 1 - this._last) * this._delta);
|
|
831
|
+
}
|
|
832
|
+
return 0;
|
|
833
|
+
}
|
|
834
|
+
_reflow() {
|
|
835
|
+
const { _first, _last } = this;
|
|
836
|
+
super._reflow();
|
|
837
|
+
if ((this._first === -1 && this._last == -1) ||
|
|
838
|
+
(this._first === _first && this._last === _last)) {
|
|
839
|
+
this._resetReflowState();
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
_resetReflowState() {
|
|
843
|
+
this._anchorIdx = null;
|
|
844
|
+
this._anchorPos = null;
|
|
845
|
+
this._stable = true;
|
|
846
|
+
}
|
|
847
|
+
_updateScrollSize() {
|
|
848
|
+
const { averageMarginSize } = this._metricsCache;
|
|
849
|
+
this._scrollSize = Math.max(1, this.items.length * (averageMarginSize + this._getAverageSize()) +
|
|
850
|
+
averageMarginSize);
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* Returns the average size (precise or estimated) of an item in the scrolling direction,
|
|
854
|
+
* including any surrounding space.
|
|
855
|
+
*/
|
|
856
|
+
get _delta() {
|
|
857
|
+
const { averageMarginSize } = this._metricsCache;
|
|
858
|
+
return this._getAverageSize() + averageMarginSize;
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* Returns the top and left positioning of the item at idx.
|
|
862
|
+
*/
|
|
863
|
+
_getItemPosition(idx) {
|
|
864
|
+
return {
|
|
865
|
+
[this._positionDim]: this._getPosition(idx),
|
|
866
|
+
[this._secondaryPositionDim]: 0,
|
|
867
|
+
[offset(this.direction)]: -(this._metricsCache.getLeadingMarginValue(idx, this.direction) ??
|
|
868
|
+
this._metricsCache.averageMarginSize),
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Returns the height and width of the item at idx.
|
|
873
|
+
*/
|
|
874
|
+
_getItemSize(idx) {
|
|
875
|
+
return {
|
|
876
|
+
[this._sizeDim]: this._getSize(idx) || this._getAverageSize(),
|
|
877
|
+
[this._secondarySizeDim]: this._itemSize[this._secondarySizeDim],
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
_viewDim2Changed() {
|
|
881
|
+
this._metricsCache.clear();
|
|
882
|
+
this._scheduleReflow();
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export { FlowLayout, flow };
|
|
887
|
+
|
|
888
|
+
//# sourceMappingURL=flow.js.map
|