@nanoporetech-digital/components 7.4.4 → 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{algolia-data-7444589a.js → algolia-data-0447757c.js} +2 -2
- package/dist/cjs/{algolia-data-7444589a.js.map → algolia-data-0447757c.js.map} +1 -1
- package/dist/cjs/app-globals-93d8b419.js.map +1 -1
- package/dist/cjs/{component-store-5d69aa2a.js → component-store-6a330cd1.js} +2 -2
- package/dist/cjs/{component-store-5d69aa2a.js.map → component-store-6a330cd1.js.map} +1 -1
- package/dist/cjs/{dom-9d327924.js → dom-756fcdac.js} +2 -2
- package/dist/cjs/{dom-9d327924.js.map → dom-756fcdac.js.map} +1 -1
- package/dist/cjs/{fade-7a47badb.js → fade-2dd9dd8b.js} +6 -4
- package/dist/cjs/fade-2dd9dd8b.js.map +1 -0
- package/dist/cjs/{form-control-574da2db.js → form-control-2d88adb2.js} +2 -2
- package/dist/cjs/{form-control-574da2db.js.map → form-control-2d88adb2.js.map} +1 -1
- package/dist/cjs/{fullscreen-31e27faa.js → fullscreen-5d0422de.js} +3 -3
- package/dist/cjs/{fullscreen-31e27faa.js.map → fullscreen-5d0422de.js.map} +1 -1
- package/dist/cjs/{index-7f89ccce.js → index-7795a8f6.js} +5 -6
- package/dist/cjs/index-7795a8f6.js.map +1 -0
- package/dist/cjs/{index-05605cc8.js → index-b6fa04fa.js} +3 -3
- package/dist/cjs/{index-05605cc8.js.map → index-b6fa04fa.js.map} +1 -1
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{lazyload-77a7f763.js → lazyload-f181cb37.js} +3 -3
- package/dist/cjs/{lazyload-77a7f763.js.map → lazyload-f181cb37.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/nano-accordion.cjs.entry.js +2 -2
- package/dist/cjs/nano-alert.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia-filter.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia-results.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia.cjs.entry.js +4 -4
- package/dist/cjs/nano-algolia.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-animation.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/nano-components.cjs.js +3 -3
- package/dist/cjs/nano-components.cjs.js.map +1 -1
- package/dist/cjs/nano-datalist_3.cjs.entry.js +13 -12
- package/dist/cjs/nano-datalist_3.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-date-input.cjs.entry.js +1 -1
- package/dist/cjs/nano-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/nano-details.cjs.entry.js +1 -1
- package/dist/cjs/nano-dialog.cjs.entry.js +4 -4
- package/dist/cjs/nano-drawer.cjs.entry.js +5 -5
- package/dist/cjs/nano-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-dropdown.cjs.entry.js +5 -5
- package/dist/cjs/nano-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-field-validator.cjs.entry.js +2 -2
- package/dist/cjs/nano-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js +4 -4
- package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-global-nav.cjs.entry.js +2 -2
- package/dist/cjs/nano-global-search-results.cjs.entry.js +1 -1
- package/dist/cjs/nano-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/nano-grid_2.cjs.entry.js +2 -2
- package/dist/cjs/nano-grid_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-hero.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon-button_2.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon.cjs.entry.js +1 -1
- package/dist/cjs/nano-input.cjs.entry.js +4 -4
- package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-intersection-observe.cjs.entry.js +3 -3
- package/dist/cjs/nano-intersection-observe.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-menu-drawer.cjs.entry.js +2 -2
- package/dist/cjs/nano-more-less.cjs.entry.js +1 -1
- package/dist/cjs/nano-overflow-nav.cjs.entry.js +2 -2
- package/dist/cjs/nano-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/nano-range.cjs.entry.js +1 -1
- package/dist/cjs/nano-rating.cjs.entry.js +8 -7
- package/dist/cjs/nano-rating.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-resize-observe_2.cjs.entry.js +1 -1
- package/dist/cjs/nano-slide.cjs.entry.js +1 -1
- package/dist/cjs/{nano-slides-70182c35.js → nano-slides-612634dc.js} +1084 -16
- package/dist/cjs/nano-slides-612634dc.js.map +1 -0
- package/dist/cjs/nano-slides.cjs.entry.js +2 -2
- package/dist/cjs/nano-sortable.cjs.entry.js +1 -1
- package/dist/cjs/nano-spinner.cjs.entry.js +4 -4
- package/dist/cjs/nano-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-split-pane.cjs.entry.js +1 -1
- package/dist/cjs/nano-sticker.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab-content.cjs.entry.js +1 -1
- package/dist/cjs/nano-tab-group.cjs.entry.js +5 -5
- package/dist/cjs/nano-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-tab.cjs.entry.js +1 -1
- package/dist/cjs/{nano-table-862da228.js → nano-table-d81a0a48.js} +16 -16
- package/dist/cjs/nano-table-d81a0a48.js.map +1 -0
- package/dist/cjs/nano-table.cjs.entry.js +3 -3
- package/dist/cjs/page-dots-99dd88f6.js +140 -0
- package/dist/cjs/page-dots-99dd88f6.js.map +1 -0
- package/dist/cjs/{scroll-6abe4d89.js → scroll-772f7d0d.js} +2 -2
- package/dist/cjs/{scroll-6abe4d89.js.map → scroll-772f7d0d.js.map} +1 -1
- package/dist/cjs/{table.worker-5b29550e.js → table.worker-da5412ed.js} +1 -1
- package/dist/cjs/{table.worker-7510500c.js → table.worker-f14c92d4.js} +5 -5
- package/dist/cjs/table.worker-f14c92d4.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/alert/alert.helpers.js.map +1 -1
- package/dist/collection/components/datalist/datalist.js +12 -10
- package/dist/collection/components/datalist/datalist.js.map +1 -1
- package/dist/collection/components/drawer/drawer.css +8 -4
- package/dist/collection/components/dropdown/dropdown.js +5 -5
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/field-validator/field-validator.js +1 -1
- package/dist/collection/components/grid/grid.css +3 -1
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/intersection-observe/intersection-observe.js +3 -3
- package/dist/collection/components/intersection-observe/intersection-observe.js.map +1 -1
- package/dist/collection/components/rating/rating.js +7 -6
- package/dist/collection/components/rating/rating.js.map +1 -1
- package/dist/collection/components/select/select.css +1 -1
- package/dist/collection/components/slides/lib/js/drag.js +308 -305
- package/dist/collection/components/slides/lib/js/drag.js.map +1 -1
- package/dist/collection/components/slides/lib/js/fade.js +3 -1
- package/dist/collection/components/slides/lib/js/fade.js.map +1 -1
- package/dist/collection/components/slides/lib/js/index.js +6 -3
- package/dist/collection/components/slides/lib/js/index.js.map +1 -1
- package/dist/collection/components/slides/lib/js/player.js +123 -121
- package/dist/collection/components/slides/lib/js/player.js.map +1 -1
- package/dist/collection/components/slides/lib/js/prev-next-button.js +179 -178
- package/dist/collection/components/slides/lib/js/prev-next-button.js.map +1 -1
- package/dist/collection/components/slides/slides.js +7 -7
- package/dist/collection/components/slides/slides.js.map +1 -1
- package/dist/collection/components/sortable/sortable.js +5 -5
- package/dist/collection/components/spinner/spinner.js +5 -5
- package/dist/collection/components/spinner/spinner.js.map +1 -1
- package/dist/collection/components/table/table.js +12 -12
- package/dist/collection/components/table/table.js.map +1 -1
- package/dist/collection/components/table/table.worker.js +4 -5
- package/dist/collection/components/table/table.worker.js.map +1 -1
- package/dist/collection/components/tabs/tab-group.css +3 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/components/algolia-data.js.map +1 -1
- package/dist/components/algolia.js.map +1 -1
- package/dist/components/datalist.js +13 -11
- package/dist/components/datalist.js.map +1 -1
- package/dist/components/dropdown.js +4 -4
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/fade.js +3 -1
- package/dist/components/fade.js.map +1 -1
- package/dist/components/grid.js +1 -1
- package/dist/components/grid.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +3 -4
- package/dist/components/index2.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/nano-drawer.js +1 -1
- package/dist/components/nano-drawer.js.map +1 -1
- package/dist/components/nano-intersection-observe.js +2 -2
- package/dist/components/nano-intersection-observe.js.map +1 -1
- package/dist/components/nano-rating.js +7 -6
- package/dist/components/nano-rating.js.map +1 -1
- package/dist/components/nano-slides.js +1078 -10
- package/dist/components/nano-slides.js.map +1 -1
- package/dist/components/nano-tab-group.js +1 -1
- package/dist/components/nano-tab-group.js.map +1 -1
- package/dist/components/nano-table.js +12 -12
- package/dist/components/nano-table.js.map +1 -1
- package/dist/components/page-dots.js +1 -425
- package/dist/components/page-dots.js.map +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/spinner.js +3 -3
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/table.worker.js +1 -1
- package/dist/esm/{algolia-data-6fb6c60b.js → algolia-data-8fc24341.js} +2 -2
- package/dist/esm/{algolia-data-6fb6c60b.js.map → algolia-data-8fc24341.js.map} +1 -1
- package/dist/esm/app-globals-d4ab01f2.js.map +1 -1
- package/dist/esm/{component-store-a0eb3fb6.js → component-store-b798181b.js} +2 -2
- package/dist/esm/{component-store-a0eb3fb6.js.map → component-store-b798181b.js.map} +1 -1
- package/dist/esm/{dom-3db2202b.js → dom-d7f9f24c.js} +2 -2
- package/dist/esm/{dom-3db2202b.js.map → dom-d7f9f24c.js.map} +1 -1
- package/dist/esm/{fade-6d964000.js → fade-4ff5d9de.js} +6 -4
- package/dist/esm/fade-4ff5d9de.js.map +1 -0
- package/dist/esm/{form-control-53135184.js → form-control-812999d0.js} +2 -2
- package/dist/esm/{form-control-53135184.js.map → form-control-812999d0.js.map} +1 -1
- package/dist/esm/{fullscreen-a9c16b35.js → fullscreen-382d7890.js} +3 -3
- package/dist/esm/{fullscreen-a9c16b35.js.map → fullscreen-382d7890.js.map} +1 -1
- package/dist/esm/{index-815d3f98.js → index-3118109b.js} +3 -3
- package/dist/esm/{index-815d3f98.js.map → index-3118109b.js.map} +1 -1
- package/dist/esm/{index-32d24a05.js → index-d7a4a150.js} +5 -6
- package/dist/esm/index-d7a4a150.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{lazyload-07e752e9.js → lazyload-49b745e4.js} +3 -3
- package/dist/esm/{lazyload-07e752e9.js.map → lazyload-49b745e4.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/nano-accordion.entry.js +2 -2
- package/dist/esm/nano-alert.entry.js +3 -3
- package/dist/esm/nano-algolia-filter.entry.js +3 -3
- package/dist/esm/nano-algolia-pagination.entry.js +2 -2
- package/dist/esm/nano-algolia-results.entry.js +2 -2
- package/dist/esm/nano-algolia.entry.js +4 -4
- package/dist/esm/nano-algolia.entry.js.map +1 -1
- package/dist/esm/nano-animation.entry.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js +1 -1
- package/dist/esm/nano-checkbox.entry.js +1 -1
- package/dist/esm/nano-components.js +4 -4
- package/dist/esm/nano-components.js.map +1 -1
- package/dist/esm/nano-datalist_3.entry.js +13 -12
- package/dist/esm/nano-datalist_3.entry.js.map +1 -1
- package/dist/esm/nano-date-input.entry.js +1 -1
- package/dist/esm/nano-date-picker.entry.js +1 -1
- package/dist/esm/nano-details.entry.js +1 -1
- package/dist/esm/nano-dialog.entry.js +4 -4
- package/dist/esm/nano-drawer.entry.js +5 -5
- package/dist/esm/nano-drawer.entry.js.map +1 -1
- package/dist/esm/nano-dropdown.entry.js +5 -5
- package/dist/esm/nano-dropdown.entry.js.map +1 -1
- package/dist/esm/nano-field-validator.entry.js +2 -2
- package/dist/esm/nano-file-upload.entry.js +1 -1
- package/dist/esm/nano-global-nav-user-profile_3.entry.js +4 -4
- package/dist/esm/nano-global-nav-user-profile_3.entry.js.map +1 -1
- package/dist/esm/nano-global-nav.entry.js +2 -2
- package/dist/esm/nano-global-search-results.entry.js +1 -1
- package/dist/esm/nano-grid-item.entry.js +1 -1
- package/dist/esm/nano-grid_2.entry.js +2 -2
- package/dist/esm/nano-grid_2.entry.js.map +1 -1
- package/dist/esm/nano-hero.entry.js +1 -1
- package/dist/esm/nano-icon-button_2.entry.js +1 -1
- package/dist/esm/nano-icon.entry.js +1 -1
- package/dist/esm/nano-input.entry.js +4 -4
- package/dist/esm/nano-input.entry.js.map +1 -1
- package/dist/esm/nano-intersection-observe.entry.js +3 -3
- package/dist/esm/nano-intersection-observe.entry.js.map +1 -1
- package/dist/esm/nano-menu-drawer.entry.js +2 -2
- package/dist/esm/nano-more-less.entry.js +1 -1
- package/dist/esm/nano-overflow-nav.entry.js +2 -2
- package/dist/esm/nano-progress-bar.entry.js +1 -1
- package/dist/esm/nano-range.entry.js +1 -1
- package/dist/esm/nano-rating.entry.js +8 -7
- package/dist/esm/nano-rating.entry.js.map +1 -1
- package/dist/esm/nano-resize-observe_2.entry.js +1 -1
- package/dist/esm/nano-slide.entry.js +1 -1
- package/dist/esm/{nano-slides-3feab833.js → nano-slides-c3eb1afe.js} +1084 -16
- package/dist/esm/nano-slides-c3eb1afe.js.map +1 -0
- package/dist/esm/nano-slides.entry.js +2 -2
- package/dist/esm/nano-sortable.entry.js +1 -1
- package/dist/esm/nano-spinner.entry.js +4 -4
- package/dist/esm/nano-spinner.entry.js.map +1 -1
- package/dist/esm/nano-split-pane.entry.js +1 -1
- package/dist/esm/nano-sticker.entry.js +2 -2
- package/dist/esm/nano-tab-content.entry.js +1 -1
- package/dist/esm/nano-tab-group.entry.js +5 -5
- package/dist/esm/nano-tab-group.entry.js.map +1 -1
- package/dist/esm/nano-tab.entry.js +1 -1
- package/dist/esm/{nano-table-740b628d.js → nano-table-869f0a31.js} +16 -16
- package/dist/esm/nano-table-869f0a31.js.map +1 -0
- package/dist/esm/nano-table.entry.js +3 -3
- package/dist/esm/page-dots-986d3b32.js +138 -0
- package/dist/esm/page-dots-986d3b32.js.map +1 -0
- package/dist/esm/{scroll-913c51a0.js → scroll-f373a189.js} +2 -2
- package/dist/esm/{scroll-913c51a0.js.map → scroll-f373a189.js.map} +1 -1
- package/dist/esm/{table.worker-26419534.js → table.worker-4af386bc.js} +5 -5
- package/dist/esm/table.worker-4af386bc.js.map +1 -0
- package/dist/esm/{table.worker-5b29550e.js → table.worker-da5412ed.js} +1 -1
- package/dist/nano-components/{algolia-data-6fb6c60b.js → algolia-data-8fc24341.js} +2 -2
- package/dist/nano-components/{algolia-data-6fb6c60b.js.map → algolia-data-8fc24341.js.map} +1 -1
- package/dist/nano-components/app-globals-d4ab01f2.js.map +1 -1
- package/dist/nano-components/{component-store-a0eb3fb6.js → component-store-b798181b.js} +2 -2
- package/dist/nano-components/{dom-3db2202b.js → dom-d7f9f24c.js} +2 -2
- package/dist/nano-components/fade-4ff5d9de.js +5 -0
- package/dist/nano-components/fade-4ff5d9de.js.map +1 -0
- package/dist/nano-components/{form-control-53135184.js → form-control-812999d0.js} +2 -2
- package/dist/nano-components/{fullscreen-a9c16b35.js → fullscreen-382d7890.js} +2 -2
- package/dist/nano-components/{index-815d3f98.js → index-3118109b.js} +2 -2
- package/dist/nano-components/{index-815d3f98.js.map → index-3118109b.js.map} +1 -1
- package/dist/nano-components/index-d7a4a150.js +5 -0
- package/dist/nano-components/index-d7a4a150.js.map +1 -0
- package/dist/nano-components/index.esm.js +1 -1
- package/dist/nano-components/index.esm.js.map +1 -1
- package/dist/nano-components/{lazyload-07e752e9.js → lazyload-49b745e4.js} +2 -2
- package/dist/nano-components/nano-accordion.entry.js +1 -1
- package/dist/nano-components/nano-alert.entry.js +1 -1
- package/dist/nano-components/nano-algolia-filter.entry.js +1 -1
- package/dist/nano-components/nano-algolia-pagination.entry.js +1 -1
- package/dist/nano-components/nano-algolia-results.entry.js +1 -1
- package/dist/nano-components/nano-algolia.entry.js +1 -1
- package/dist/nano-components/nano-algolia.entry.js.map +1 -1
- package/dist/nano-components/nano-animation.entry.js +1 -1
- package/dist/nano-components/nano-checkbox-group.entry.js +1 -1
- package/dist/nano-components/nano-checkbox.entry.js +1 -1
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-components.esm.js.map +1 -1
- package/dist/nano-components/nano-datalist_3.entry.js +1 -1
- package/dist/nano-components/nano-datalist_3.entry.js.map +1 -1
- package/dist/nano-components/nano-date-input.entry.js +1 -1
- package/dist/nano-components/nano-date-picker.entry.js +1 -1
- package/dist/nano-components/nano-details.entry.js +1 -1
- package/dist/nano-components/nano-dialog.entry.js +1 -1
- package/dist/nano-components/nano-drawer.entry.js +1 -1
- package/dist/nano-components/nano-drawer.entry.js.map +1 -1
- package/dist/nano-components/nano-dropdown.entry.js +1 -1
- package/dist/nano-components/nano-dropdown.entry.js.map +1 -1
- package/dist/nano-components/nano-field-validator.entry.js +1 -1
- package/dist/nano-components/nano-file-upload.entry.js +1 -1
- package/dist/nano-components/nano-global-nav-user-profile_3.entry.js +1 -1
- package/dist/nano-components/nano-global-nav-user-profile_3.entry.js.map +1 -1
- package/dist/nano-components/nano-global-nav.entry.js +1 -1
- package/dist/nano-components/nano-global-search-results.entry.js +1 -1
- package/dist/nano-components/nano-grid-item.entry.js +1 -1
- package/dist/nano-components/nano-grid_2.entry.js +1 -1
- package/dist/nano-components/nano-grid_2.entry.js.map +1 -1
- package/dist/nano-components/nano-hero.entry.js +1 -1
- package/dist/nano-components/nano-icon-button_2.entry.js +1 -1
- package/dist/nano-components/nano-icon.entry.js +1 -1
- package/dist/nano-components/nano-input.entry.js +1 -1
- package/dist/nano-components/nano-input.entry.js.map +1 -1
- package/dist/nano-components/nano-intersection-observe.entry.js +1 -1
- package/dist/nano-components/nano-intersection-observe.entry.js.map +1 -1
- package/dist/nano-components/nano-menu-drawer.entry.js +1 -1
- package/dist/nano-components/nano-more-less.entry.js +1 -1
- package/dist/nano-components/nano-overflow-nav.entry.js +1 -1
- package/dist/nano-components/nano-progress-bar.entry.js +1 -1
- package/dist/nano-components/nano-range.entry.js +1 -1
- package/dist/nano-components/nano-rating.entry.js +1 -1
- package/dist/nano-components/nano-rating.entry.js.map +1 -1
- package/dist/nano-components/nano-resize-observe_2.entry.js +1 -1
- package/dist/nano-components/nano-slide.entry.js +1 -1
- package/dist/nano-components/nano-slides-c3eb1afe.js +20 -0
- package/dist/nano-components/nano-slides-c3eb1afe.js.map +1 -0
- package/dist/nano-components/nano-slides.entry.js +1 -1
- package/dist/nano-components/nano-sortable.entry.js +1 -1
- package/dist/nano-components/nano-spinner.entry.js +1 -1
- package/dist/nano-components/nano-spinner.entry.js.map +1 -1
- package/dist/nano-components/nano-split-pane.entry.js +1 -1
- package/dist/nano-components/nano-sticker.entry.js +1 -1
- package/dist/nano-components/nano-tab-content.entry.js +1 -1
- package/dist/nano-components/nano-tab-group.entry.js +1 -1
- package/dist/nano-components/nano-tab-group.entry.js.map +1 -1
- package/dist/nano-components/nano-tab.entry.js +1 -1
- package/dist/nano-components/{nano-table-740b628d.js → nano-table-869f0a31.js} +2 -2
- package/dist/nano-components/{nano-table-740b628d.js.map → nano-table-869f0a31.js.map} +1 -1
- package/dist/nano-components/nano-table.entry.js +1 -1
- package/dist/nano-components/page-dots-986d3b32.js +5 -0
- package/dist/nano-components/page-dots-986d3b32.js.map +1 -0
- package/dist/nano-components/{scroll-913c51a0.js → scroll-f373a189.js} +2 -2
- package/dist/nano-components/table.worker-4af386bc.js +5 -0
- package/dist/nano-components/{table.worker-5b29550e.js → table.worker-da5412ed.js} +1 -1
- package/dist/themes/nanopore.css +1 -1
- package/dist/themes/nanopore.css.map +1 -1
- package/dist/types/components/alert/alert.helpers.d.ts +1 -1
- package/dist/types/components/datalist/datalist.d.ts +1 -1
- package/dist/types/components/intersection-observe/intersection-observe.d.ts +1 -1
- package/dist/types/components/slides/lib/js/drag.d.ts +2 -1
- package/dist/types/components/slides/lib/js/index.d.ts +0 -3
- package/dist/types/components/slides/lib/js/player.d.ts +2 -1
- package/dist/types/components/slides/lib/js/prev-next-button.d.ts +2 -1
- package/dist/types/components/spinner/spinner.d.ts +1 -1
- package/dist/types/components.d.ts +4 -1408
- package/dist/types/index.d.ts +2 -0
- package/docs-json.json +17 -17
- package/docs-vscode.json +2 -2
- package/hydrate/index.js +709 -63
- package/hydrate/index.mjs +709 -63
- package/package.json +3 -4
- package/themes/nanopore.css +1 -1
- package/themes/nanopore.css.map +1 -1
- package/dist/cjs/fade-7a47badb.js.map +0 -1
- package/dist/cjs/index-7f89ccce.js.map +0 -1
- package/dist/cjs/nano-slides-70182c35.js.map +0 -1
- package/dist/cjs/nano-table-862da228.js.map +0 -1
- package/dist/cjs/page-dots-ad7c3b76.js +0 -564
- package/dist/cjs/page-dots-ad7c3b76.js.map +0 -1
- package/dist/cjs/table.worker-7510500c.js.map +0 -1
- package/dist/collection/components/alert/alert-interface.js +0 -2
- package/dist/collection/components/alert/alert-interface.js.map +0 -1
- package/dist/esm/fade-6d964000.js.map +0 -1
- package/dist/esm/index-32d24a05.js.map +0 -1
- package/dist/esm/nano-slides-3feab833.js.map +0 -1
- package/dist/esm/nano-table-740b628d.js.map +0 -1
- package/dist/esm/page-dots-ca0bbb51.js +0 -562
- package/dist/esm/page-dots-ca0bbb51.js.map +0 -1
- package/dist/esm/table.worker-26419534.js.map +0 -1
- package/dist/nano-components/fade-6d964000.js +0 -5
- package/dist/nano-components/fade-6d964000.js.map +0 -1
- package/dist/nano-components/index-32d24a05.js +0 -5
- package/dist/nano-components/index-32d24a05.js.map +0 -1
- package/dist/nano-components/nano-slides-3feab833.js +0 -10
- package/dist/nano-components/nano-slides-3feab833.js.map +0 -1
- package/dist/nano-components/page-dots-ca0bbb51.js +0 -10
- package/dist/nano-components/page-dots-ca0bbb51.js.map +0 -1
- package/dist/nano-components/table.worker-26419534.js +0 -5
- package/dist/types/components/alert/alert-interface.d.ts +0 -1
- /package/dist/nano-components/{component-store-a0eb3fb6.js.map → component-store-b798181b.js.map} +0 -0
- /package/dist/nano-components/{dom-3db2202b.js.map → dom-d7f9f24c.js.map} +0 -0
- /package/dist/nano-components/{form-control-53135184.js.map → form-control-812999d0.js.map} +0 -0
- /package/dist/nano-components/{fullscreen-a9c16b35.js.map → fullscreen-382d7890.js.map} +0 -0
- /package/dist/nano-components/{lazyload-07e752e9.js.map → lazyload-49b745e4.js.map} +0 -0
- /package/dist/nano-components/{scroll-913c51a0.js.map → scroll-f373a189.js.map} +0 -0
- /package/dist/nano-components/{table.worker-26419534.js.map → table.worker-4af386bc.js.map} +0 -0
- /package/dist/types/builds/{8qhywLzS → HitvqeWT}/0/Digital/nano-components/packages/components/.stencil/generators/custom-element-doc-generator.d.ts +0 -0
- /package/dist/types/builds/{8qhywLzS → HitvqeWT}/0/Digital/nano-components/packages/components/.stencil/generators/vue/generate-vue-component.d.ts +0 -0
- /package/dist/types/builds/{8qhywLzS → HitvqeWT}/0/Digital/nano-components/packages/components/.stencil/generators/vue/index.d.ts +0 -0
- /package/dist/types/builds/{8qhywLzS → HitvqeWT}/0/Digital/nano-components/packages/components/.stencil/generators/vue/output-vue.d.ts +0 -0
- /package/dist/types/builds/{8qhywLzS → HitvqeWT}/0/Digital/nano-components/packages/components/.stencil/generators/vue/plugin.d.ts +0 -0
- /package/dist/types/builds/{8qhywLzS → HitvqeWT}/0/Digital/nano-components/packages/components/.stencil/generators/vue/types.d.ts +0 -0
- /package/dist/types/builds/{8qhywLzS → HitvqeWT}/0/Digital/nano-components/packages/components/.stencil/generators/vue/utils.d.ts +0 -0
- /package/dist/types/builds/{8qhywLzS → HitvqeWT}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
- /package/dist/types/builds/{8qhywLzS → HitvqeWT}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
- /package/dist/types/builds/{8qhywLzS → HitvqeWT}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
- /package/dist/types/builds/{8qhywLzS → HitvqeWT}/0/Digital/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -4,321 +4,324 @@
|
|
4
4
|
import Flickity from "./flickity";
|
5
5
|
import { utils } from "./utils/utils";
|
6
6
|
import { Unidragger } from "./utils/gestures";
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
proto.
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
}
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
};
|
43
|
-
proto.updateDraggable = function () {
|
44
|
-
// disable dragging if less than 2 slides. #278
|
45
|
-
if (this.options.draggable == '>1') {
|
46
|
-
this.isDraggable = this.slides.length > 1;
|
47
|
-
}
|
48
|
-
else {
|
49
|
-
this.isDraggable = this.options.draggable;
|
50
|
-
}
|
51
|
-
if (this.isDraggable) {
|
52
|
-
this.element.classList.add('is-draggable');
|
53
|
-
}
|
54
|
-
else {
|
7
|
+
export default () => {
|
8
|
+
// ----- defaults ----- //
|
9
|
+
utils.extend(Flickity.defaults, {
|
10
|
+
draggable: '>1',
|
11
|
+
dragThreshold: 3,
|
12
|
+
});
|
13
|
+
// ----- create ----- //
|
14
|
+
Flickity.createMethods.push('_createDrag');
|
15
|
+
// -------------------------- drag prototype -------------------------- //
|
16
|
+
const proto = Flickity.prototype;
|
17
|
+
utils.extend(proto, Unidragger.prototype);
|
18
|
+
proto._touchActionValue = 'pan-y';
|
19
|
+
// -------------------------- -------------------------- //
|
20
|
+
const isTouch = 'createTouch' in document;
|
21
|
+
let isTouchmoveScrollCanceled = false;
|
22
|
+
proto._createDrag = function () {
|
23
|
+
this.on('activate', this.onActivateDrag);
|
24
|
+
this.on('uiChange', this._uiChangeDrag);
|
25
|
+
this.on('deactivate', this.onDeactivateDrag);
|
26
|
+
this.on('cellChange', this.updateDraggable);
|
27
|
+
// TODO updateDraggable on resize? if groupCells & slides change
|
28
|
+
// HACK - add seemingly innocuous handler to fix iOS 10 scroll behavior
|
29
|
+
// #457, RubaXa/Sortable#973
|
30
|
+
if (isTouch && !isTouchmoveScrollCanceled) {
|
31
|
+
window.addEventListener('touchmove', function () { });
|
32
|
+
isTouchmoveScrollCanceled = true;
|
33
|
+
}
|
34
|
+
};
|
35
|
+
proto.onActivateDrag = function () {
|
36
|
+
this.handles = [this.viewport];
|
37
|
+
this.bindHandles();
|
38
|
+
this.updateDraggable();
|
39
|
+
};
|
40
|
+
proto.onDeactivateDrag = function () {
|
41
|
+
this.unbindHandles();
|
55
42
|
this.element.classList.remove('is-draggable');
|
56
|
-
}
|
57
|
-
|
58
|
-
//
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
43
|
+
};
|
44
|
+
proto.updateDraggable = function () {
|
45
|
+
// disable dragging if less than 2 slides. #278
|
46
|
+
if (this.options.draggable == '>1') {
|
47
|
+
this.isDraggable = this.slides.length > 1;
|
48
|
+
}
|
49
|
+
else {
|
50
|
+
this.isDraggable = this.options.draggable;
|
51
|
+
}
|
52
|
+
if (this.isDraggable) {
|
53
|
+
this.element.classList.add('is-draggable');
|
54
|
+
}
|
55
|
+
else {
|
56
|
+
this.element.classList.remove('is-draggable');
|
57
|
+
}
|
58
|
+
};
|
59
|
+
// backwards compatibility
|
60
|
+
proto.bindDrag = function () {
|
61
|
+
this.options.draggable = true;
|
62
|
+
this.updateDraggable();
|
63
|
+
};
|
64
|
+
proto.unbindDrag = function () {
|
65
|
+
this.options.draggable = false;
|
66
|
+
this.updateDraggable();
|
67
|
+
};
|
68
|
+
proto._uiChangeDrag = function () {
|
69
|
+
delete this.isFreeScrolling;
|
70
|
+
};
|
71
|
+
// -------------------------- pointer events -------------------------- //
|
72
|
+
proto.pointerDown = function (event, pointer) {
|
73
|
+
if (!this.isDraggable) {
|
74
|
+
this._pointerDownDefault(event, pointer);
|
75
|
+
return;
|
76
|
+
}
|
77
|
+
const isOkay = this.okayPointerDown(event);
|
78
|
+
if (!isOkay) {
|
79
|
+
return;
|
80
|
+
}
|
81
|
+
this._pointerDownPreventDefault(event);
|
82
|
+
this.pointerDownFocus(event);
|
83
|
+
// blur
|
84
|
+
if (document.activeElement != this.element) {
|
85
|
+
// do not blur if already focused
|
86
|
+
this.pointerDownBlur();
|
87
|
+
}
|
88
|
+
// stop if it was moving
|
89
|
+
this.dragX = this.x;
|
90
|
+
this.viewport.classList.add('is-pointer-down');
|
91
|
+
// track scrolling
|
92
|
+
this.pointerDownScroll = getScrollPosition();
|
93
|
+
window.addEventListener('scroll', this);
|
73
94
|
this._pointerDownDefault(event, pointer);
|
74
|
-
return;
|
75
|
-
}
|
76
|
-
const isOkay = this.okayPointerDown(event);
|
77
|
-
if (!isOkay) {
|
78
|
-
return;
|
79
|
-
}
|
80
|
-
this._pointerDownPreventDefault(event);
|
81
|
-
this.pointerDownFocus(event);
|
82
|
-
// blur
|
83
|
-
if (document.activeElement != this.element) {
|
84
|
-
// do not blur if already focused
|
85
|
-
this.pointerDownBlur();
|
86
|
-
}
|
87
|
-
// stop if it was moving
|
88
|
-
this.dragX = this.x;
|
89
|
-
this.viewport.classList.add('is-pointer-down');
|
90
|
-
// track scrolling
|
91
|
-
this.pointerDownScroll = getScrollPosition();
|
92
|
-
window.addEventListener('scroll', this);
|
93
|
-
this._pointerDownDefault(event, pointer);
|
94
|
-
};
|
95
|
-
// default pointerDown logic, used for staticClick
|
96
|
-
proto._pointerDownDefault = function (event, pointer) {
|
97
|
-
// track start event position
|
98
|
-
// Safari 9 overrides pageX and pageY. These values needs to be copied. #779
|
99
|
-
this.pointerDownPointer = {
|
100
|
-
pageX: pointer.pageX,
|
101
|
-
pageY: pointer.pageY,
|
102
95
|
};
|
103
|
-
//
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
96
|
+
// default pointerDown logic, used for staticClick
|
97
|
+
proto._pointerDownDefault = function (event, pointer) {
|
98
|
+
// track start event position
|
99
|
+
// Safari 9 overrides pageX and pageY. These values needs to be copied. #779
|
100
|
+
this.pointerDownPointer = {
|
101
|
+
pageX: pointer.pageX,
|
102
|
+
pageY: pointer.pageY,
|
103
|
+
};
|
104
|
+
// bind move and end events
|
105
|
+
this._bindPostStartEvents(event);
|
106
|
+
this.dispatchEvent('pointerDown', event, [pointer]);
|
107
|
+
};
|
108
|
+
const focusNodes = {
|
109
|
+
INPUT: true,
|
110
|
+
TEXTAREA: true,
|
111
|
+
SELECT: true,
|
112
|
+
};
|
113
|
+
proto.pointerDownFocus = function (event) {
|
114
|
+
const isFocusNode = focusNodes[event.target.nodeName];
|
115
|
+
if (!isFocusNode) {
|
116
|
+
this.focus();
|
117
|
+
}
|
118
|
+
};
|
119
|
+
proto._pointerDownPreventDefault = function (event) {
|
120
|
+
const isTouchStart = event.type == 'touchstart';
|
121
|
+
const isTouchPointer = event.pointerType == 'touch';
|
122
|
+
const isFocusNode = focusNodes[event.target.nodeName];
|
123
|
+
if (!isTouchStart && !isTouchPointer && !isFocusNode) {
|
124
|
+
event.preventDefault();
|
125
|
+
}
|
126
|
+
};
|
127
|
+
// ----- move ----- //
|
128
|
+
proto.hasDragStarted = function (moveVector) {
|
129
|
+
return Math.abs(moveVector.x) > this.options.dragThreshold;
|
130
|
+
};
|
131
|
+
// ----- up ----- //
|
132
|
+
proto.pointerUp = function (event, pointer) {
|
133
|
+
delete this.isTouchScrolling;
|
134
|
+
this.viewport.classList.remove('is-pointer-down');
|
135
|
+
this.dispatchEvent('pointerUp', event, [pointer]);
|
136
|
+
this._dragPointerUp(event, pointer);
|
137
|
+
};
|
138
|
+
proto.pointerDone = function () {
|
139
|
+
window.removeEventListener('scroll', this);
|
140
|
+
delete this.pointerDownScroll;
|
141
|
+
};
|
142
|
+
// -------------------------- dragging -------------------------- //
|
143
|
+
proto.dragStart = function (event, pointer) {
|
144
|
+
if (!this.isDraggable) {
|
145
|
+
return;
|
146
|
+
}
|
147
|
+
this.dragStartPosition = this.x;
|
148
|
+
this.startAnimation();
|
149
|
+
window.removeEventListener('scroll', this);
|
150
|
+
this.dispatchEvent('dragStart', event, [pointer]);
|
151
|
+
};
|
152
|
+
proto.pointerMove = function (event, pointer) {
|
153
|
+
const moveVector = this._dragPointerMove(event, pointer);
|
154
|
+
this.dispatchEvent('pointerMove', event, [pointer, moveVector]);
|
155
|
+
this._dragMove(event, pointer, moveVector);
|
156
|
+
};
|
157
|
+
proto.dragMove = function (event, pointer, moveVector) {
|
158
|
+
if (!this.isDraggable) {
|
159
|
+
return;
|
160
|
+
}
|
123
161
|
event.preventDefault();
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
}
|
176
|
-
this.dragX = dragX;
|
177
|
-
this.dragMoveTime = new Date();
|
178
|
-
this.dispatchEvent('dragMove', event, [pointer, moveVector]);
|
179
|
-
};
|
180
|
-
proto.dragEnd = function (event, pointer) {
|
181
|
-
if (!this.isDraggable) {
|
182
|
-
return;
|
183
|
-
}
|
184
|
-
if (this.options.freeScroll) {
|
185
|
-
this.isFreeScrolling = true;
|
186
|
-
}
|
187
|
-
// set selectedIndex based on where flick will end up
|
188
|
-
let index = this.dragEndRestingSelect();
|
189
|
-
if (this.options.freeScroll && !this.options.wrapAround) {
|
190
|
-
// if free-scroll & not wrap around
|
191
|
-
// do not free-scroll if going outside of bounding slides
|
192
|
-
// so bounding slides can attract slider, and keep it in bounds
|
162
|
+
this.previousDragX = this.dragX;
|
163
|
+
// reverse if right-to-left
|
164
|
+
const direction = this.options.rightToLeft ? -1 : 1;
|
165
|
+
if (this.options.wrapAround) {
|
166
|
+
// wrap around move. #589
|
167
|
+
moveVector.x = moveVector.x % this.slideableWidth;
|
168
|
+
}
|
169
|
+
let dragX = this.dragStartPosition + moveVector.x * direction;
|
170
|
+
if (!this.options.wrapAround && this.slides.length) {
|
171
|
+
// slow drag
|
172
|
+
const originBound = Math.max(-this.slides[0].target, this.dragStartPosition);
|
173
|
+
dragX = dragX > originBound ? (dragX + originBound) * 0.5 : dragX;
|
174
|
+
const endBound = Math.min(-this.getLastSlide().target, this.dragStartPosition);
|
175
|
+
dragX = dragX < endBound ? (dragX + endBound) * 0.5 : dragX;
|
176
|
+
}
|
177
|
+
this.dragX = dragX;
|
178
|
+
this.dragMoveTime = new Date();
|
179
|
+
this.dispatchEvent('dragMove', event, [pointer, moveVector]);
|
180
|
+
};
|
181
|
+
proto.dragEnd = function (event, pointer) {
|
182
|
+
if (!this.isDraggable) {
|
183
|
+
return;
|
184
|
+
}
|
185
|
+
if (this.options.freeScroll) {
|
186
|
+
this.isFreeScrolling = true;
|
187
|
+
}
|
188
|
+
// set selectedIndex based on where flick will end up
|
189
|
+
let index = this.dragEndRestingSelect();
|
190
|
+
if (this.options.freeScroll && !this.options.wrapAround) {
|
191
|
+
// if free-scroll & not wrap around
|
192
|
+
// do not free-scroll if going outside of bounding slides
|
193
|
+
// so bounding slides can attract slider, and keep it in bounds
|
194
|
+
const restingX = this.getRestingPosition();
|
195
|
+
this.isFreeScrolling =
|
196
|
+
-restingX > this.slides[0].target &&
|
197
|
+
-restingX < this.getLastSlide().target;
|
198
|
+
}
|
199
|
+
else if (!this.options.freeScroll && index == this.selectedIndex) {
|
200
|
+
// boost selection if selected index has not changed
|
201
|
+
index += this.dragEndBoostSelect();
|
202
|
+
}
|
203
|
+
delete this.previousDragX;
|
204
|
+
// apply selection
|
205
|
+
// TODO refactor this, selecting here feels weird
|
206
|
+
// HACK, set flag so dragging stays in correct direction
|
207
|
+
this.isDragSelect = this.options.wrapAround;
|
208
|
+
this.select(index);
|
209
|
+
delete this.isDragSelect;
|
210
|
+
this.dispatchEvent('dragEnd', event, [pointer]);
|
211
|
+
};
|
212
|
+
proto.dragEndRestingSelect = function () {
|
193
213
|
const restingX = this.getRestingPosition();
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
//
|
200
|
-
index
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
}
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
};
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
*/
|
232
|
-
proto._getClosestResting = function (restingX, distance, increment) {
|
233
|
-
let index = this.selectedIndex;
|
234
|
-
let minDistance = Infinity;
|
235
|
-
const condition = this.options.contain && !this.options.wrapAround
|
236
|
-
? // if contain, keep going if distance is equal to minDistance
|
237
|
-
function (d, md) {
|
238
|
-
return d <= md;
|
214
|
+
// how far away from selected slide
|
215
|
+
const distance = Math.abs(this.getSlideDistance(-restingX, this.selectedIndex));
|
216
|
+
// get closet resting going up and going down
|
217
|
+
const positiveResting = this._getClosestResting(restingX, distance, 1);
|
218
|
+
const negativeResting = this._getClosestResting(restingX, distance, -1);
|
219
|
+
// use closer resting for wrap-around
|
220
|
+
const index = positiveResting.distance < negativeResting.distance
|
221
|
+
? positiveResting.index
|
222
|
+
: negativeResting.index;
|
223
|
+
return index;
|
224
|
+
};
|
225
|
+
/**
|
226
|
+
* given resting X and distance to selected cell
|
227
|
+
* get the distance and index of the closest cell
|
228
|
+
* @param {Number} restingX - estimated post-flick resting position
|
229
|
+
* @param {Number} distance - distance to selected cell
|
230
|
+
* @param {Integer} increment - +1 or -1, going up or down
|
231
|
+
* @returns {Object} - { distance: {Number}, index: {Integer} }
|
232
|
+
*/
|
233
|
+
proto._getClosestResting = function (restingX, distance, increment) {
|
234
|
+
let index = this.selectedIndex;
|
235
|
+
let minDistance = Infinity;
|
236
|
+
const condition = this.options.contain && !this.options.wrapAround
|
237
|
+
? // if contain, keep going if distance is equal to minDistance
|
238
|
+
function (d, md) {
|
239
|
+
return d <= md;
|
240
|
+
}
|
241
|
+
: function (d, md) {
|
242
|
+
return d < md;
|
243
|
+
};
|
244
|
+
while (condition(distance, minDistance)) {
|
245
|
+
// measure distance to next cell
|
246
|
+
index += increment;
|
247
|
+
minDistance = distance;
|
248
|
+
distance = this.getSlideDistance(-restingX, index);
|
249
|
+
if (distance === null) {
|
250
|
+
break;
|
239
251
|
}
|
240
|
-
|
241
|
-
|
252
|
+
distance = Math.abs(distance);
|
253
|
+
}
|
254
|
+
return {
|
255
|
+
distance: minDistance,
|
256
|
+
// selected was previous index
|
257
|
+
index: index - increment,
|
242
258
|
};
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
259
|
+
};
|
260
|
+
/**
|
261
|
+
* measure distance between x and a slide target
|
262
|
+
* @param {Number} x
|
263
|
+
* @param {Integer} index - slide index
|
264
|
+
* @returns null or distance number
|
265
|
+
*/
|
266
|
+
proto.getSlideDistance = function (x, index) {
|
267
|
+
const len = this.slides.length;
|
268
|
+
// wrap around if at least 2 slides
|
269
|
+
const isWrapAround = this.options.wrapAround && len > 1;
|
270
|
+
const slideIndex = isWrapAround ? utils.modulo(index, len) : index;
|
271
|
+
const slide = this.slides[slideIndex];
|
272
|
+
if (!slide) {
|
273
|
+
return null;
|
250
274
|
}
|
251
|
-
distance
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
index: index - increment,
|
275
|
+
// add distance for wrap-around slides
|
276
|
+
const wrap = isWrapAround
|
277
|
+
? this.slideableWidth * Math.floor(index / len)
|
278
|
+
: 0;
|
279
|
+
return x - (slide.target + wrap);
|
257
280
|
};
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
return x - (slide.target + wrap);
|
277
|
-
};
|
278
|
-
proto.dragEndBoostSelect = function () {
|
279
|
-
// do not boost if no previousDragX or dragMoveTime
|
280
|
-
if (this.previousDragX === undefined ||
|
281
|
-
!this.dragMoveTime ||
|
282
|
-
// or if drag was held for 100 ms
|
283
|
-
new Date() - this.dragMoveTime > 100) {
|
281
|
+
proto.dragEndBoostSelect = function () {
|
282
|
+
// do not boost if no previousDragX or dragMoveTime
|
283
|
+
if (this.previousDragX === undefined ||
|
284
|
+
!this.dragMoveTime ||
|
285
|
+
// or if drag was held for 100 ms
|
286
|
+
new Date() - this.dragMoveTime > 100) {
|
287
|
+
return 0;
|
288
|
+
}
|
289
|
+
const distance = this.getSlideDistance(-this.dragX, this.selectedIndex);
|
290
|
+
const delta = this.previousDragX - this.dragX;
|
291
|
+
if (distance > 0 && delta > 0) {
|
292
|
+
// boost to next if moving towards the right, and positive velocity
|
293
|
+
return 1;
|
294
|
+
}
|
295
|
+
else if (distance < 0 && delta < 0) {
|
296
|
+
// boost to previous if moving towards the left, and negative velocity
|
297
|
+
return -1;
|
298
|
+
}
|
284
299
|
return 0;
|
285
|
-
}
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
const scrollMoveY = this.pointerDownScroll.y - scroll.y;
|
311
|
-
// cancel click/tap if scroll is too much
|
312
|
-
if (Math.abs(scrollMoveX) > 3 || Math.abs(scrollMoveY) > 3) {
|
313
|
-
this._pointerDone();
|
300
|
+
};
|
301
|
+
// ----- staticClick ----- //
|
302
|
+
proto.staticClick = function (event, pointer) {
|
303
|
+
// get clickedCell, if cell was clicked
|
304
|
+
const clickedCell = this.getParentCell(event.target);
|
305
|
+
const cellElem = clickedCell && clickedCell.element;
|
306
|
+
const cellIndex = clickedCell && this.cells.indexOf(clickedCell);
|
307
|
+
this.dispatchEvent('staticClick', event, [pointer, cellElem, cellIndex]);
|
308
|
+
};
|
309
|
+
// ----- scroll ----- //
|
310
|
+
proto.onscroll = function () {
|
311
|
+
const scroll = getScrollPosition();
|
312
|
+
const scrollMoveX = this.pointerDownScroll.x - scroll.x;
|
313
|
+
const scrollMoveY = this.pointerDownScroll.y - scroll.y;
|
314
|
+
// cancel click/tap if scroll is too much
|
315
|
+
if (Math.abs(scrollMoveX) > 3 || Math.abs(scrollMoveY) > 3) {
|
316
|
+
this._pointerDone();
|
317
|
+
}
|
318
|
+
};
|
319
|
+
// ----- utils ----- //
|
320
|
+
function getScrollPosition() {
|
321
|
+
return {
|
322
|
+
x: window.scrollX,
|
323
|
+
y: window.scrollY,
|
324
|
+
};
|
314
325
|
}
|
315
326
|
};
|
316
|
-
// ----- utils ----- //
|
317
|
-
function getScrollPosition() {
|
318
|
-
return {
|
319
|
-
x: window.pageXOffset,
|
320
|
-
y: window.pageYOffset,
|
321
|
-
};
|
322
|
-
}
|
323
|
-
// ----- ----- //
|
324
327
|
//# sourceMappingURL=drag.js.map
|