@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
@@ -3,7 +3,7 @@
|
|
3
3
|
*/
|
4
4
|
'use strict';
|
5
5
|
|
6
|
-
const index = require('./index-
|
6
|
+
const index = require('./index-b6fa04fa.js');
|
7
7
|
|
8
8
|
function EvEmitter() { }
|
9
9
|
const proto$4 = EvEmitter.prototype;
|
@@ -89,9 +89,9 @@ function getStyleSize(value) {
|
|
89
89
|
const isValid = value.indexOf('%') == -1 && !isNaN(num);
|
90
90
|
return isValid && num;
|
91
91
|
}
|
92
|
-
function noop() { }
|
92
|
+
function noop$1() { }
|
93
93
|
const logError = typeof console == 'undefined'
|
94
|
-
? noop
|
94
|
+
? noop$1
|
95
95
|
: function (message) {
|
96
96
|
console.error(message);
|
97
97
|
};
|
@@ -1432,7 +1432,1075 @@ utils.htmlInit(Flickity, 'flickity');
|
|
1432
1432
|
Flickity.Cell = Cell;
|
1433
1433
|
Flickity.Slide = Slide;
|
1434
1434
|
|
1435
|
+
/*!
|
1436
|
+
* Unipointer v2.4.0
|
1437
|
+
* base class for doing one thing with pointer event
|
1438
|
+
* MIT license
|
1439
|
+
*/
|
1440
|
+
function noop() { }
|
1441
|
+
function Unipointer() { }
|
1442
|
+
// inherit EvEmitter
|
1443
|
+
const pointerProto = (Unipointer.prototype = Object.create(EvEmitter.prototype));
|
1444
|
+
pointerProto.bindStartEvent = function (elem) {
|
1445
|
+
this._bindStartEvent(elem, true);
|
1446
|
+
};
|
1447
|
+
pointerProto.unbindStartEvent = function (elem) {
|
1448
|
+
this._bindStartEvent(elem, false);
|
1449
|
+
};
|
1450
|
+
/**
|
1451
|
+
* Add or remove start event
|
1452
|
+
* @param {Element} elem
|
1453
|
+
* @param {Boolean} isAdd - remove if falsey
|
1454
|
+
*/
|
1455
|
+
pointerProto._bindStartEvent = function (elem, isAdd) {
|
1456
|
+
// munge isAdd, default to true
|
1457
|
+
isAdd = isAdd === undefined ? true : isAdd;
|
1458
|
+
const bindMethod = isAdd ? 'addEventListener' : 'removeEventListener';
|
1459
|
+
// default to mouse events
|
1460
|
+
let startEvent = 'mousedown';
|
1461
|
+
if ('ontouchstart' in window) {
|
1462
|
+
// HACK prefer Touch Events as you can preventDefault on touchstart to
|
1463
|
+
// disable scroll in iOS & mobile Chrome metafizzy/flickity#1177
|
1464
|
+
startEvent = 'touchstart';
|
1465
|
+
}
|
1466
|
+
else if (window.PointerEvent) {
|
1467
|
+
// Pointer Events
|
1468
|
+
startEvent = 'pointerdown';
|
1469
|
+
}
|
1470
|
+
elem[bindMethod](startEvent, this);
|
1471
|
+
};
|
1472
|
+
// trigger handler methods for events
|
1473
|
+
pointerProto.handleEvent = function (event) {
|
1474
|
+
const method = 'on' + event.type;
|
1475
|
+
if (this[method]) {
|
1476
|
+
this[method](event);
|
1477
|
+
}
|
1478
|
+
};
|
1479
|
+
// returns the touch that we're keeping track of
|
1480
|
+
pointerProto.getTouch = function (touches) {
|
1481
|
+
for (let i = 0; i < touches.length; i++) {
|
1482
|
+
const touch = touches[i];
|
1483
|
+
if (touch.identifier == this.pointerIdentifier) {
|
1484
|
+
return touch;
|
1485
|
+
}
|
1486
|
+
}
|
1487
|
+
};
|
1488
|
+
// ----- start event ----- //
|
1489
|
+
pointerProto.onmousedown = function (event) {
|
1490
|
+
// dismiss clicks from right or middle buttons
|
1491
|
+
const button = event.button;
|
1492
|
+
if (button && button !== 0 && button !== 1) {
|
1493
|
+
return;
|
1494
|
+
}
|
1495
|
+
this._pointerDown(event, event);
|
1496
|
+
};
|
1497
|
+
pointerProto.ontouchstart = function (event) {
|
1498
|
+
this._pointerDown(event, event.changedTouches[0]);
|
1499
|
+
};
|
1500
|
+
pointerProto.onpointerdown = function (event) {
|
1501
|
+
this._pointerDown(event, event);
|
1502
|
+
};
|
1503
|
+
/**
|
1504
|
+
* pointer start
|
1505
|
+
* @param {Event} event
|
1506
|
+
* @param {Event or Touch} pointer
|
1507
|
+
*/
|
1508
|
+
pointerProto._pointerDown = function (event, pointer) {
|
1509
|
+
// dismiss right click and other pointers
|
1510
|
+
// button = 0 is okay, 1-4 not
|
1511
|
+
if (event.button || this.isPointerDown) {
|
1512
|
+
return;
|
1513
|
+
}
|
1514
|
+
this.isPointerDown = true;
|
1515
|
+
// save pointer identifier to match up touch events
|
1516
|
+
this.pointerIdentifier =
|
1517
|
+
pointer.pointerId !== undefined
|
1518
|
+
? // pointerId for pointer events, touch.indentifier for touch events
|
1519
|
+
pointer.pointerId
|
1520
|
+
: pointer.identifier;
|
1521
|
+
this.pointerDown(event, pointer);
|
1522
|
+
};
|
1523
|
+
pointerProto.pointerDown = function (event, pointer) {
|
1524
|
+
this._bindPostStartEvents(event);
|
1525
|
+
this.emitEvent('pointerDown', [event, pointer]);
|
1526
|
+
};
|
1527
|
+
// hash of events to be bound after start event
|
1528
|
+
const postStartEvents = {
|
1529
|
+
mousedown: ['mousemove', 'mouseup'],
|
1530
|
+
touchstart: ['touchmove', 'touchend', 'touchcancel'],
|
1531
|
+
pointerdown: ['pointermove', 'pointerup', 'pointercancel'],
|
1532
|
+
};
|
1533
|
+
pointerProto._bindPostStartEvents = function (event) {
|
1534
|
+
if (!event) {
|
1535
|
+
return;
|
1536
|
+
}
|
1537
|
+
// get proper events to match start event
|
1538
|
+
const events = postStartEvents[event.type];
|
1539
|
+
// bind events to node
|
1540
|
+
events.forEach(function (eventName) {
|
1541
|
+
window.addEventListener(eventName, this);
|
1542
|
+
}, this);
|
1543
|
+
// save these arguments
|
1544
|
+
this._boundPointerEvents = events;
|
1545
|
+
};
|
1546
|
+
pointerProto._unbindPostStartEvents = function () {
|
1547
|
+
// check for _boundEvents, in case dragEnd triggered twice (old IE8 bug)
|
1548
|
+
if (!this._boundPointerEvents) {
|
1549
|
+
return;
|
1550
|
+
}
|
1551
|
+
this._boundPointerEvents.forEach(function (eventName) {
|
1552
|
+
window.removeEventListener(eventName, this);
|
1553
|
+
}, this);
|
1554
|
+
delete this._boundPointerEvents;
|
1555
|
+
};
|
1556
|
+
// ----- move event ----- //
|
1557
|
+
pointerProto.onmousemove = function (event) {
|
1558
|
+
this._pointerMove(event, event);
|
1559
|
+
};
|
1560
|
+
pointerProto.onpointermove = function (event) {
|
1561
|
+
if (event.pointerId == this.pointerIdentifier) {
|
1562
|
+
this._pointerMove(event, event);
|
1563
|
+
}
|
1564
|
+
};
|
1565
|
+
pointerProto.ontouchmove = function (event) {
|
1566
|
+
const touch = this.getTouch(event.changedTouches);
|
1567
|
+
if (touch) {
|
1568
|
+
this._pointerMove(event, touch);
|
1569
|
+
}
|
1570
|
+
};
|
1571
|
+
/**
|
1572
|
+
* pointer move
|
1573
|
+
* @param {Event} event
|
1574
|
+
* @param {Event or Touch} pointer
|
1575
|
+
* @private
|
1576
|
+
*/
|
1577
|
+
pointerProto._pointerMove = function (event, pointer) {
|
1578
|
+
this.pointerMove(event, pointer);
|
1579
|
+
};
|
1580
|
+
// public
|
1581
|
+
pointerProto.pointerMove = function (event, pointer) {
|
1582
|
+
this.emitEvent('pointerMove', [event, pointer]);
|
1583
|
+
};
|
1584
|
+
// ----- end event ----- //
|
1585
|
+
pointerProto.onmouseup = function (event) {
|
1586
|
+
this._pointerUp(event, event);
|
1587
|
+
};
|
1588
|
+
pointerProto.onpointerup = function (event) {
|
1589
|
+
if (event.pointerId == this.pointerIdentifier) {
|
1590
|
+
this._pointerUp(event, event);
|
1591
|
+
}
|
1592
|
+
};
|
1593
|
+
pointerProto.ontouchend = function (event) {
|
1594
|
+
const touch = this.getTouch(event.changedTouches);
|
1595
|
+
if (touch) {
|
1596
|
+
this._pointerUp(event, touch);
|
1597
|
+
}
|
1598
|
+
};
|
1599
|
+
/**
|
1600
|
+
* pointer up
|
1601
|
+
* @param {Event} event
|
1602
|
+
* @param {Event or Touch} pointer
|
1603
|
+
* @private
|
1604
|
+
*/
|
1605
|
+
pointerProto._pointerUp = function (event, pointer) {
|
1606
|
+
this._pointerDone();
|
1607
|
+
this.pointerUp(event, pointer);
|
1608
|
+
};
|
1609
|
+
// public
|
1610
|
+
pointerProto.pointerUp = function (event, pointer) {
|
1611
|
+
this.emitEvent('pointerUp', [event, pointer]);
|
1612
|
+
};
|
1613
|
+
// ----- pointer done ----- //
|
1614
|
+
// triggered on pointer up & pointer cancel
|
1615
|
+
pointerProto._pointerDone = function () {
|
1616
|
+
this._pointerReset();
|
1617
|
+
this._unbindPostStartEvents();
|
1618
|
+
this.pointerDone();
|
1619
|
+
};
|
1620
|
+
pointerProto._pointerReset = function () {
|
1621
|
+
// reset properties
|
1622
|
+
this.isPointerDown = false;
|
1623
|
+
delete this.pointerIdentifier;
|
1624
|
+
};
|
1625
|
+
pointerProto.pointerDone = noop;
|
1626
|
+
// ----- pointer cancel ----- //
|
1627
|
+
pointerProto.onpointercancel = function (event) {
|
1628
|
+
if (event.pointerId == this.pointerIdentifier) {
|
1629
|
+
this._pointerCancel(event, event);
|
1630
|
+
}
|
1631
|
+
};
|
1632
|
+
pointerProto.ontouchcancel = function (event) {
|
1633
|
+
const touch = this.getTouch(event.changedTouches);
|
1634
|
+
if (touch) {
|
1635
|
+
this._pointerCancel(event, touch);
|
1636
|
+
}
|
1637
|
+
};
|
1638
|
+
/**
|
1639
|
+
* pointer cancel
|
1640
|
+
* @param {Event} event
|
1641
|
+
* @param {Event or Touch} pointer
|
1642
|
+
* @private
|
1643
|
+
*/
|
1644
|
+
pointerProto._pointerCancel = function (event, pointer) {
|
1645
|
+
this._pointerDone();
|
1646
|
+
this.pointerCancel(event, pointer);
|
1647
|
+
};
|
1648
|
+
// public
|
1649
|
+
pointerProto.pointerCancel = function (event, pointer) {
|
1650
|
+
this.emitEvent('pointerCancel', [event, pointer]);
|
1651
|
+
};
|
1652
|
+
// ----- ----- //
|
1653
|
+
// utility function for getting x/y coords from event
|
1654
|
+
Unipointer.getPointerPoint = function (pointer) {
|
1655
|
+
return {
|
1656
|
+
x: pointer.pageX,
|
1657
|
+
y: pointer.pageY,
|
1658
|
+
};
|
1659
|
+
};
|
1660
|
+
/*!
|
1661
|
+
* Unidragger v2.4.0
|
1662
|
+
* Draggable base class
|
1663
|
+
* MIT license
|
1664
|
+
*/
|
1665
|
+
function Unidragger() { }
|
1666
|
+
// inherit Unipointer & EvEmitter
|
1667
|
+
const draggerProto = (Unidragger.prototype = Object.create(Unipointer.prototype));
|
1668
|
+
// ----- bind start ----- //
|
1669
|
+
draggerProto.bindHandles = function () {
|
1670
|
+
this._bindHandles(true);
|
1671
|
+
};
|
1672
|
+
draggerProto.unbindHandles = function () {
|
1673
|
+
this._bindHandles(false);
|
1674
|
+
};
|
1675
|
+
/**
|
1676
|
+
* Add or remove start event
|
1677
|
+
* @param {Boolean} isAdd
|
1678
|
+
*/
|
1679
|
+
draggerProto._bindHandles = function (isAdd) {
|
1680
|
+
// munge isAdd, default to true
|
1681
|
+
isAdd = isAdd === undefined ? true : isAdd;
|
1682
|
+
// bind each handle
|
1683
|
+
const bindMethod = isAdd ? 'addEventListener' : 'removeEventListener';
|
1684
|
+
const touchAction = isAdd ? this._touchActionValue : '';
|
1685
|
+
for (let i = 0; i < this.handles.length; i++) {
|
1686
|
+
const handle = this.handles[i];
|
1687
|
+
this._bindStartEvent(handle, isAdd);
|
1688
|
+
handle[bindMethod]('click', this);
|
1689
|
+
// touch-action: none to override browser touch gestures. metafizzy/flickity#540
|
1690
|
+
if (window.PointerEvent) {
|
1691
|
+
handle.style.touchAction = touchAction;
|
1692
|
+
}
|
1693
|
+
}
|
1694
|
+
};
|
1695
|
+
// prototype so it can be overwriteable by Flickity
|
1696
|
+
draggerProto._touchActionValue = 'none';
|
1697
|
+
// ----- start event ----- //
|
1698
|
+
/**
|
1699
|
+
* pointer start
|
1700
|
+
* @param {Event} event
|
1701
|
+
* @param {Event or Touch} pointer
|
1702
|
+
*/
|
1703
|
+
draggerProto.pointerDown = function (event, pointer) {
|
1704
|
+
const isOkay = this.okayPointerDown(event);
|
1705
|
+
if (!isOkay) {
|
1706
|
+
return;
|
1707
|
+
}
|
1708
|
+
// track start event position
|
1709
|
+
// Safari 9 overrides pageX and pageY. These values needs to be copied. flickity#842
|
1710
|
+
this.pointerDownPointer = {
|
1711
|
+
pageX: pointer.pageX,
|
1712
|
+
pageY: pointer.pageY,
|
1713
|
+
};
|
1714
|
+
event.preventDefault();
|
1715
|
+
this.pointerDownBlur();
|
1716
|
+
// bind move and end events
|
1717
|
+
this._bindPostStartEvents(event);
|
1718
|
+
this.emitEvent('pointerDown', [event, pointer]);
|
1719
|
+
};
|
1720
|
+
// nodes that have text fields
|
1721
|
+
const cursorNodes = {
|
1722
|
+
TEXTAREA: true,
|
1723
|
+
INPUT: true,
|
1724
|
+
SELECT: true,
|
1725
|
+
OPTION: true,
|
1726
|
+
};
|
1727
|
+
// input types that do not have text fields
|
1728
|
+
const clickTypes = {
|
1729
|
+
radio: true,
|
1730
|
+
checkbox: true,
|
1731
|
+
button: true,
|
1732
|
+
submit: true,
|
1733
|
+
image: true,
|
1734
|
+
file: true,
|
1735
|
+
};
|
1736
|
+
// dismiss inputs with text fields. flickity#403, flickity#404
|
1737
|
+
draggerProto.okayPointerDown = function (event) {
|
1738
|
+
const isCursorNode = cursorNodes[event.target.nodeName];
|
1739
|
+
const isClickType = clickTypes[event.target.type];
|
1740
|
+
const isOkay = !isCursorNode || isClickType;
|
1741
|
+
if (!isOkay) {
|
1742
|
+
this._pointerReset();
|
1743
|
+
}
|
1744
|
+
return isOkay;
|
1745
|
+
};
|
1746
|
+
// kludge to blur previously focused input
|
1747
|
+
draggerProto.pointerDownBlur = function () {
|
1748
|
+
const focused = document.activeElement;
|
1749
|
+
// do not blur body for IE10, metafizzy/flickity#117
|
1750
|
+
const canBlur = focused && focused.blur && focused != document.body;
|
1751
|
+
if (canBlur) {
|
1752
|
+
focused.blur();
|
1753
|
+
}
|
1754
|
+
};
|
1755
|
+
// ----- move event ----- //
|
1756
|
+
/**
|
1757
|
+
* drag move
|
1758
|
+
* @param {Event} event
|
1759
|
+
* @param {Event or Touch} pointer
|
1760
|
+
*/
|
1761
|
+
draggerProto.pointerMove = function (event, pointer) {
|
1762
|
+
const moveVector = this._dragPointerMove(event, pointer);
|
1763
|
+
this.emitEvent('pointerMove', [event, pointer, moveVector]);
|
1764
|
+
this._dragMove(event, pointer, moveVector);
|
1765
|
+
};
|
1766
|
+
// base pointer move logic
|
1767
|
+
draggerProto._dragPointerMove = function (event, pointer) {
|
1768
|
+
const moveVector = {
|
1769
|
+
x: pointer.pageX - this.pointerDownPointer.pageX,
|
1770
|
+
y: pointer.pageY - this.pointerDownPointer.pageY,
|
1771
|
+
};
|
1772
|
+
// start drag if pointer has moved far enough to start drag
|
1773
|
+
if (!this.isDragging && this.hasDragStarted(moveVector)) {
|
1774
|
+
this._dragStart(event, pointer);
|
1775
|
+
}
|
1776
|
+
return moveVector;
|
1777
|
+
};
|
1778
|
+
// condition if pointer has moved far enough to start drag
|
1779
|
+
draggerProto.hasDragStarted = function (moveVector) {
|
1780
|
+
return Math.abs(moveVector.x) > 3 || Math.abs(moveVector.y) > 3;
|
1781
|
+
};
|
1782
|
+
// ----- end event ----- //
|
1783
|
+
/**
|
1784
|
+
* pointer up
|
1785
|
+
* @param {Event} event
|
1786
|
+
* @param {Event or Touch} pointer
|
1787
|
+
*/
|
1788
|
+
draggerProto.pointerUp = function (event, pointer) {
|
1789
|
+
this.emitEvent('pointerUp', [event, pointer]);
|
1790
|
+
this._dragPointerUp(event, pointer);
|
1791
|
+
};
|
1792
|
+
draggerProto._dragPointerUp = function (event, pointer) {
|
1793
|
+
if (this.isDragging) {
|
1794
|
+
this._dragEnd(event, pointer);
|
1795
|
+
}
|
1796
|
+
else {
|
1797
|
+
// pointer didn't move enough for drag to start
|
1798
|
+
this._staticClick(event, pointer);
|
1799
|
+
}
|
1800
|
+
};
|
1801
|
+
// -------------------------- drag -------------------------- //
|
1802
|
+
// dragStart
|
1803
|
+
draggerProto._dragStart = function (event, pointer) {
|
1804
|
+
this.isDragging = true;
|
1805
|
+
// prevent clicks
|
1806
|
+
this.isPreventingClicks = true;
|
1807
|
+
this.dragStart(event, pointer);
|
1808
|
+
};
|
1809
|
+
draggerProto.dragStart = function (event, pointer) {
|
1810
|
+
this.emitEvent('dragStart', [event, pointer]);
|
1811
|
+
};
|
1812
|
+
// dragMove
|
1813
|
+
draggerProto._dragMove = function (event, pointer, moveVector) {
|
1814
|
+
// do not drag if not dragging yet
|
1815
|
+
if (!this.isDragging) {
|
1816
|
+
return;
|
1817
|
+
}
|
1818
|
+
this.dragMove(event, pointer, moveVector);
|
1819
|
+
};
|
1820
|
+
draggerProto.dragMove = function (event, pointer, moveVector) {
|
1821
|
+
event.preventDefault();
|
1822
|
+
this.emitEvent('dragMove', [event, pointer, moveVector]);
|
1823
|
+
};
|
1824
|
+
// dragEnd
|
1825
|
+
draggerProto._dragEnd = function (event, pointer) {
|
1826
|
+
// set flags
|
1827
|
+
this.isDragging = false;
|
1828
|
+
// re-enable clicking async
|
1829
|
+
setTimeout(function () {
|
1830
|
+
delete this.isPreventingClicks;
|
1831
|
+
}.bind(this));
|
1832
|
+
this.dragEnd(event, pointer);
|
1833
|
+
};
|
1834
|
+
draggerProto.dragEnd = function (event, pointer) {
|
1835
|
+
this.emitEvent('dragEnd', [event, pointer]);
|
1836
|
+
};
|
1837
|
+
// ----- onclick ----- //
|
1838
|
+
// handle all clicks and prevent clicks when dragging
|
1839
|
+
draggerProto.onclick = function (event) {
|
1840
|
+
if (this.isPreventingClicks) {
|
1841
|
+
event.preventDefault();
|
1842
|
+
}
|
1843
|
+
};
|
1844
|
+
// ----- staticClick ----- //
|
1845
|
+
// triggered after pointer down & up with no/tiny movement
|
1846
|
+
draggerProto._staticClick = function (event, pointer) {
|
1847
|
+
// ignore emulated mouse up clicks
|
1848
|
+
if (this.isIgnoringMouseUp && event.type == 'mouseup') {
|
1849
|
+
return;
|
1850
|
+
}
|
1851
|
+
this.staticClick(event, pointer);
|
1852
|
+
// set flag for emulated clicks 300ms after touchend
|
1853
|
+
if (event.type != 'mouseup') {
|
1854
|
+
this.isIgnoringMouseUp = true;
|
1855
|
+
// reset flag after 300ms
|
1856
|
+
setTimeout(function () {
|
1857
|
+
delete this.isIgnoringMouseUp;
|
1858
|
+
}.bind(this), 400);
|
1859
|
+
}
|
1860
|
+
};
|
1861
|
+
draggerProto.staticClick = function (event, pointer) {
|
1862
|
+
this.emitEvent('staticClick', [event, pointer]);
|
1863
|
+
};
|
1864
|
+
// ----- utils ----- //
|
1865
|
+
Unidragger.getPointerPoint = Unipointer.getPointerPoint;
|
1866
|
+
|
1867
|
+
const drag = () => {
|
1868
|
+
// ----- defaults ----- //
|
1869
|
+
utils.extend(Flickity.defaults, {
|
1870
|
+
draggable: '>1',
|
1871
|
+
dragThreshold: 3,
|
1872
|
+
});
|
1873
|
+
// ----- create ----- //
|
1874
|
+
Flickity.createMethods.push('_createDrag');
|
1875
|
+
// -------------------------- drag prototype -------------------------- //
|
1876
|
+
const proto = Flickity.prototype;
|
1877
|
+
utils.extend(proto, Unidragger.prototype);
|
1878
|
+
proto._touchActionValue = 'pan-y';
|
1879
|
+
// -------------------------- -------------------------- //
|
1880
|
+
const isTouch = 'createTouch' in document;
|
1881
|
+
let isTouchmoveScrollCanceled = false;
|
1882
|
+
proto._createDrag = function () {
|
1883
|
+
this.on('activate', this.onActivateDrag);
|
1884
|
+
this.on('uiChange', this._uiChangeDrag);
|
1885
|
+
this.on('deactivate', this.onDeactivateDrag);
|
1886
|
+
this.on('cellChange', this.updateDraggable);
|
1887
|
+
// TODO updateDraggable on resize? if groupCells & slides change
|
1888
|
+
// HACK - add seemingly innocuous handler to fix iOS 10 scroll behavior
|
1889
|
+
// #457, RubaXa/Sortable#973
|
1890
|
+
if (isTouch && !isTouchmoveScrollCanceled) {
|
1891
|
+
window.addEventListener('touchmove', function () { });
|
1892
|
+
isTouchmoveScrollCanceled = true;
|
1893
|
+
}
|
1894
|
+
};
|
1895
|
+
proto.onActivateDrag = function () {
|
1896
|
+
this.handles = [this.viewport];
|
1897
|
+
this.bindHandles();
|
1898
|
+
this.updateDraggable();
|
1899
|
+
};
|
1900
|
+
proto.onDeactivateDrag = function () {
|
1901
|
+
this.unbindHandles();
|
1902
|
+
this.element.classList.remove('is-draggable');
|
1903
|
+
};
|
1904
|
+
proto.updateDraggable = function () {
|
1905
|
+
// disable dragging if less than 2 slides. #278
|
1906
|
+
if (this.options.draggable == '>1') {
|
1907
|
+
this.isDraggable = this.slides.length > 1;
|
1908
|
+
}
|
1909
|
+
else {
|
1910
|
+
this.isDraggable = this.options.draggable;
|
1911
|
+
}
|
1912
|
+
if (this.isDraggable) {
|
1913
|
+
this.element.classList.add('is-draggable');
|
1914
|
+
}
|
1915
|
+
else {
|
1916
|
+
this.element.classList.remove('is-draggable');
|
1917
|
+
}
|
1918
|
+
};
|
1919
|
+
// backwards compatibility
|
1920
|
+
proto.bindDrag = function () {
|
1921
|
+
this.options.draggable = true;
|
1922
|
+
this.updateDraggable();
|
1923
|
+
};
|
1924
|
+
proto.unbindDrag = function () {
|
1925
|
+
this.options.draggable = false;
|
1926
|
+
this.updateDraggable();
|
1927
|
+
};
|
1928
|
+
proto._uiChangeDrag = function () {
|
1929
|
+
delete this.isFreeScrolling;
|
1930
|
+
};
|
1931
|
+
// -------------------------- pointer events -------------------------- //
|
1932
|
+
proto.pointerDown = function (event, pointer) {
|
1933
|
+
if (!this.isDraggable) {
|
1934
|
+
this._pointerDownDefault(event, pointer);
|
1935
|
+
return;
|
1936
|
+
}
|
1937
|
+
const isOkay = this.okayPointerDown(event);
|
1938
|
+
if (!isOkay) {
|
1939
|
+
return;
|
1940
|
+
}
|
1941
|
+
this._pointerDownPreventDefault(event);
|
1942
|
+
this.pointerDownFocus(event);
|
1943
|
+
// blur
|
1944
|
+
if (document.activeElement != this.element) {
|
1945
|
+
// do not blur if already focused
|
1946
|
+
this.pointerDownBlur();
|
1947
|
+
}
|
1948
|
+
// stop if it was moving
|
1949
|
+
this.dragX = this.x;
|
1950
|
+
this.viewport.classList.add('is-pointer-down');
|
1951
|
+
// track scrolling
|
1952
|
+
this.pointerDownScroll = getScrollPosition();
|
1953
|
+
window.addEventListener('scroll', this);
|
1954
|
+
this._pointerDownDefault(event, pointer);
|
1955
|
+
};
|
1956
|
+
// default pointerDown logic, used for staticClick
|
1957
|
+
proto._pointerDownDefault = function (event, pointer) {
|
1958
|
+
// track start event position
|
1959
|
+
// Safari 9 overrides pageX and pageY. These values needs to be copied. #779
|
1960
|
+
this.pointerDownPointer = {
|
1961
|
+
pageX: pointer.pageX,
|
1962
|
+
pageY: pointer.pageY,
|
1963
|
+
};
|
1964
|
+
// bind move and end events
|
1965
|
+
this._bindPostStartEvents(event);
|
1966
|
+
this.dispatchEvent('pointerDown', event, [pointer]);
|
1967
|
+
};
|
1968
|
+
const focusNodes = {
|
1969
|
+
INPUT: true,
|
1970
|
+
TEXTAREA: true,
|
1971
|
+
SELECT: true,
|
1972
|
+
};
|
1973
|
+
proto.pointerDownFocus = function (event) {
|
1974
|
+
const isFocusNode = focusNodes[event.target.nodeName];
|
1975
|
+
if (!isFocusNode) {
|
1976
|
+
this.focus();
|
1977
|
+
}
|
1978
|
+
};
|
1979
|
+
proto._pointerDownPreventDefault = function (event) {
|
1980
|
+
const isTouchStart = event.type == 'touchstart';
|
1981
|
+
const isTouchPointer = event.pointerType == 'touch';
|
1982
|
+
const isFocusNode = focusNodes[event.target.nodeName];
|
1983
|
+
if (!isTouchStart && !isTouchPointer && !isFocusNode) {
|
1984
|
+
event.preventDefault();
|
1985
|
+
}
|
1986
|
+
};
|
1987
|
+
// ----- move ----- //
|
1988
|
+
proto.hasDragStarted = function (moveVector) {
|
1989
|
+
return Math.abs(moveVector.x) > this.options.dragThreshold;
|
1990
|
+
};
|
1991
|
+
// ----- up ----- //
|
1992
|
+
proto.pointerUp = function (event, pointer) {
|
1993
|
+
delete this.isTouchScrolling;
|
1994
|
+
this.viewport.classList.remove('is-pointer-down');
|
1995
|
+
this.dispatchEvent('pointerUp', event, [pointer]);
|
1996
|
+
this._dragPointerUp(event, pointer);
|
1997
|
+
};
|
1998
|
+
proto.pointerDone = function () {
|
1999
|
+
window.removeEventListener('scroll', this);
|
2000
|
+
delete this.pointerDownScroll;
|
2001
|
+
};
|
2002
|
+
// -------------------------- dragging -------------------------- //
|
2003
|
+
proto.dragStart = function (event, pointer) {
|
2004
|
+
if (!this.isDraggable) {
|
2005
|
+
return;
|
2006
|
+
}
|
2007
|
+
this.dragStartPosition = this.x;
|
2008
|
+
this.startAnimation();
|
2009
|
+
window.removeEventListener('scroll', this);
|
2010
|
+
this.dispatchEvent('dragStart', event, [pointer]);
|
2011
|
+
};
|
2012
|
+
proto.pointerMove = function (event, pointer) {
|
2013
|
+
const moveVector = this._dragPointerMove(event, pointer);
|
2014
|
+
this.dispatchEvent('pointerMove', event, [pointer, moveVector]);
|
2015
|
+
this._dragMove(event, pointer, moveVector);
|
2016
|
+
};
|
2017
|
+
proto.dragMove = function (event, pointer, moveVector) {
|
2018
|
+
if (!this.isDraggable) {
|
2019
|
+
return;
|
2020
|
+
}
|
2021
|
+
event.preventDefault();
|
2022
|
+
this.previousDragX = this.dragX;
|
2023
|
+
// reverse if right-to-left
|
2024
|
+
const direction = this.options.rightToLeft ? -1 : 1;
|
2025
|
+
if (this.options.wrapAround) {
|
2026
|
+
// wrap around move. #589
|
2027
|
+
moveVector.x = moveVector.x % this.slideableWidth;
|
2028
|
+
}
|
2029
|
+
let dragX = this.dragStartPosition + moveVector.x * direction;
|
2030
|
+
if (!this.options.wrapAround && this.slides.length) {
|
2031
|
+
// slow drag
|
2032
|
+
const originBound = Math.max(-this.slides[0].target, this.dragStartPosition);
|
2033
|
+
dragX = dragX > originBound ? (dragX + originBound) * 0.5 : dragX;
|
2034
|
+
const endBound = Math.min(-this.getLastSlide().target, this.dragStartPosition);
|
2035
|
+
dragX = dragX < endBound ? (dragX + endBound) * 0.5 : dragX;
|
2036
|
+
}
|
2037
|
+
this.dragX = dragX;
|
2038
|
+
this.dragMoveTime = new Date();
|
2039
|
+
this.dispatchEvent('dragMove', event, [pointer, moveVector]);
|
2040
|
+
};
|
2041
|
+
proto.dragEnd = function (event, pointer) {
|
2042
|
+
if (!this.isDraggable) {
|
2043
|
+
return;
|
2044
|
+
}
|
2045
|
+
if (this.options.freeScroll) {
|
2046
|
+
this.isFreeScrolling = true;
|
2047
|
+
}
|
2048
|
+
// set selectedIndex based on where flick will end up
|
2049
|
+
let index = this.dragEndRestingSelect();
|
2050
|
+
if (this.options.freeScroll && !this.options.wrapAround) {
|
2051
|
+
// if free-scroll & not wrap around
|
2052
|
+
// do not free-scroll if going outside of bounding slides
|
2053
|
+
// so bounding slides can attract slider, and keep it in bounds
|
2054
|
+
const restingX = this.getRestingPosition();
|
2055
|
+
this.isFreeScrolling =
|
2056
|
+
-restingX > this.slides[0].target &&
|
2057
|
+
-restingX < this.getLastSlide().target;
|
2058
|
+
}
|
2059
|
+
else if (!this.options.freeScroll && index == this.selectedIndex) {
|
2060
|
+
// boost selection if selected index has not changed
|
2061
|
+
index += this.dragEndBoostSelect();
|
2062
|
+
}
|
2063
|
+
delete this.previousDragX;
|
2064
|
+
// apply selection
|
2065
|
+
// TODO refactor this, selecting here feels weird
|
2066
|
+
// HACK, set flag so dragging stays in correct direction
|
2067
|
+
this.isDragSelect = this.options.wrapAround;
|
2068
|
+
this.select(index);
|
2069
|
+
delete this.isDragSelect;
|
2070
|
+
this.dispatchEvent('dragEnd', event, [pointer]);
|
2071
|
+
};
|
2072
|
+
proto.dragEndRestingSelect = function () {
|
2073
|
+
const restingX = this.getRestingPosition();
|
2074
|
+
// how far away from selected slide
|
2075
|
+
const distance = Math.abs(this.getSlideDistance(-restingX, this.selectedIndex));
|
2076
|
+
// get closet resting going up and going down
|
2077
|
+
const positiveResting = this._getClosestResting(restingX, distance, 1);
|
2078
|
+
const negativeResting = this._getClosestResting(restingX, distance, -1);
|
2079
|
+
// use closer resting for wrap-around
|
2080
|
+
const index = positiveResting.distance < negativeResting.distance
|
2081
|
+
? positiveResting.index
|
2082
|
+
: negativeResting.index;
|
2083
|
+
return index;
|
2084
|
+
};
|
2085
|
+
/**
|
2086
|
+
* given resting X and distance to selected cell
|
2087
|
+
* get the distance and index of the closest cell
|
2088
|
+
* @param {Number} restingX - estimated post-flick resting position
|
2089
|
+
* @param {Number} distance - distance to selected cell
|
2090
|
+
* @param {Integer} increment - +1 or -1, going up or down
|
2091
|
+
* @returns {Object} - { distance: {Number}, index: {Integer} }
|
2092
|
+
*/
|
2093
|
+
proto._getClosestResting = function (restingX, distance, increment) {
|
2094
|
+
let index = this.selectedIndex;
|
2095
|
+
let minDistance = Infinity;
|
2096
|
+
const condition = this.options.contain && !this.options.wrapAround
|
2097
|
+
? // if contain, keep going if distance is equal to minDistance
|
2098
|
+
function (d, md) {
|
2099
|
+
return d <= md;
|
2100
|
+
}
|
2101
|
+
: function (d, md) {
|
2102
|
+
return d < md;
|
2103
|
+
};
|
2104
|
+
while (condition(distance, minDistance)) {
|
2105
|
+
// measure distance to next cell
|
2106
|
+
index += increment;
|
2107
|
+
minDistance = distance;
|
2108
|
+
distance = this.getSlideDistance(-restingX, index);
|
2109
|
+
if (distance === null) {
|
2110
|
+
break;
|
2111
|
+
}
|
2112
|
+
distance = Math.abs(distance);
|
2113
|
+
}
|
2114
|
+
return {
|
2115
|
+
distance: minDistance,
|
2116
|
+
// selected was previous index
|
2117
|
+
index: index - increment,
|
2118
|
+
};
|
2119
|
+
};
|
2120
|
+
/**
|
2121
|
+
* measure distance between x and a slide target
|
2122
|
+
* @param {Number} x
|
2123
|
+
* @param {Integer} index - slide index
|
2124
|
+
* @returns null or distance number
|
2125
|
+
*/
|
2126
|
+
proto.getSlideDistance = function (x, index) {
|
2127
|
+
const len = this.slides.length;
|
2128
|
+
// wrap around if at least 2 slides
|
2129
|
+
const isWrapAround = this.options.wrapAround && len > 1;
|
2130
|
+
const slideIndex = isWrapAround ? utils.modulo(index, len) : index;
|
2131
|
+
const slide = this.slides[slideIndex];
|
2132
|
+
if (!slide) {
|
2133
|
+
return null;
|
2134
|
+
}
|
2135
|
+
// add distance for wrap-around slides
|
2136
|
+
const wrap = isWrapAround
|
2137
|
+
? this.slideableWidth * Math.floor(index / len)
|
2138
|
+
: 0;
|
2139
|
+
return x - (slide.target + wrap);
|
2140
|
+
};
|
2141
|
+
proto.dragEndBoostSelect = function () {
|
2142
|
+
// do not boost if no previousDragX or dragMoveTime
|
2143
|
+
if (this.previousDragX === undefined ||
|
2144
|
+
!this.dragMoveTime ||
|
2145
|
+
// or if drag was held for 100 ms
|
2146
|
+
new Date() - this.dragMoveTime > 100) {
|
2147
|
+
return 0;
|
2148
|
+
}
|
2149
|
+
const distance = this.getSlideDistance(-this.dragX, this.selectedIndex);
|
2150
|
+
const delta = this.previousDragX - this.dragX;
|
2151
|
+
if (distance > 0 && delta > 0) {
|
2152
|
+
// boost to next if moving towards the right, and positive velocity
|
2153
|
+
return 1;
|
2154
|
+
}
|
2155
|
+
else if (distance < 0 && delta < 0) {
|
2156
|
+
// boost to previous if moving towards the left, and negative velocity
|
2157
|
+
return -1;
|
2158
|
+
}
|
2159
|
+
return 0;
|
2160
|
+
};
|
2161
|
+
// ----- staticClick ----- //
|
2162
|
+
proto.staticClick = function (event, pointer) {
|
2163
|
+
// get clickedCell, if cell was clicked
|
2164
|
+
const clickedCell = this.getParentCell(event.target);
|
2165
|
+
const cellElem = clickedCell && clickedCell.element;
|
2166
|
+
const cellIndex = clickedCell && this.cells.indexOf(clickedCell);
|
2167
|
+
this.dispatchEvent('staticClick', event, [pointer, cellElem, cellIndex]);
|
2168
|
+
};
|
2169
|
+
// ----- scroll ----- //
|
2170
|
+
proto.onscroll = function () {
|
2171
|
+
const scroll = getScrollPosition();
|
2172
|
+
const scrollMoveX = this.pointerDownScroll.x - scroll.x;
|
2173
|
+
const scrollMoveY = this.pointerDownScroll.y - scroll.y;
|
2174
|
+
// cancel click/tap if scroll is too much
|
2175
|
+
if (Math.abs(scrollMoveX) > 3 || Math.abs(scrollMoveY) > 3) {
|
2176
|
+
this._pointerDone();
|
2177
|
+
}
|
2178
|
+
};
|
2179
|
+
// ----- utils ----- //
|
2180
|
+
function getScrollPosition() {
|
2181
|
+
return {
|
2182
|
+
x: window.scrollX,
|
2183
|
+
y: window.scrollY,
|
2184
|
+
};
|
2185
|
+
}
|
2186
|
+
};
|
2187
|
+
|
2188
|
+
const nowNext = () => {
|
2189
|
+
const svgURI = 'http://www.w3.org/2000/svg';
|
2190
|
+
// -------------------------- PrevNextButton -------------------------- //
|
2191
|
+
function PrevNextButton(direction, parent) {
|
2192
|
+
this.direction = direction;
|
2193
|
+
this.parent = parent;
|
2194
|
+
this.parentElement = this.parent.element.shadowRoot || this.parent.element;
|
2195
|
+
this._create();
|
2196
|
+
}
|
2197
|
+
PrevNextButton.prototype = Object.create(Unipointer.prototype);
|
2198
|
+
PrevNextButton.prototype._create = function () {
|
2199
|
+
// properties
|
2200
|
+
this.isEnabled = true;
|
2201
|
+
this.isPrevious = this.direction == -1;
|
2202
|
+
const leftDirection = this.parent.options.rightToLeft ? 1 : -1;
|
2203
|
+
this.isLeft = this.direction == leftDirection;
|
2204
|
+
const button = (this.element = document.createElement('button'));
|
2205
|
+
button.className = 'flickity-button flickity-prev-next-button';
|
2206
|
+
button.part.add('navigation-button');
|
2207
|
+
if (this.isPrevious) {
|
2208
|
+
button.classList.add('previous');
|
2209
|
+
button.part.add('navigation-button--previous');
|
2210
|
+
}
|
2211
|
+
else {
|
2212
|
+
button.classList.add('next');
|
2213
|
+
button.part.add('navigation-button--next');
|
2214
|
+
}
|
2215
|
+
// prevent button from submitting form http://stackoverflow.com/a/10836076/182183
|
2216
|
+
button.setAttribute('type', 'button');
|
2217
|
+
// init as disabled
|
2218
|
+
this.disable();
|
2219
|
+
button.setAttribute('aria-label', this.isPrevious ? 'Previous' : 'Next');
|
2220
|
+
const slot = document.createElement('slot');
|
2221
|
+
slot.name = this.isPrevious ? 'previous-icon' : 'next-icon';
|
2222
|
+
button.appendChild(slot);
|
2223
|
+
slot.addEventListener('slotchange', () => {
|
2224
|
+
slot.assignedElements({ flatten: true }).forEach((ele) => {
|
2225
|
+
ele.removeAttribute('hidden');
|
2226
|
+
});
|
2227
|
+
});
|
2228
|
+
// create arrow
|
2229
|
+
const svg = this.createSVG();
|
2230
|
+
slot.appendChild(svg);
|
2231
|
+
// events
|
2232
|
+
this.parent.on('select', this.update.bind(this));
|
2233
|
+
this.on('pointerDown', this.parent.childUIPointerDown.bind(this.parent));
|
2234
|
+
};
|
2235
|
+
PrevNextButton.prototype.activate = function () {
|
2236
|
+
this.bindStartEvent(this.element);
|
2237
|
+
this.element.addEventListener('click', this);
|
2238
|
+
// add to DOM
|
2239
|
+
this.parentElement.appendChild(this.element);
|
2240
|
+
};
|
2241
|
+
PrevNextButton.prototype.deactivate = function () {
|
2242
|
+
// remove from DOM
|
2243
|
+
this.parentElement.removeChild(this.element);
|
2244
|
+
// click events
|
2245
|
+
this.unbindStartEvent(this.element);
|
2246
|
+
this.element.removeEventListener('click', this);
|
2247
|
+
};
|
2248
|
+
PrevNextButton.prototype.createSVG = function () {
|
2249
|
+
const svg = document.createElementNS(svgURI, 'svg');
|
2250
|
+
svg.setAttribute('class', 'flickity-button-icon');
|
2251
|
+
svg.setAttribute('viewBox', '0 0 100 100');
|
2252
|
+
svg.part.add('navigation-icon');
|
2253
|
+
const path = document.createElementNS(svgURI, 'path');
|
2254
|
+
const pathMovements = getArrowMovements(this.parent.options.arrowShape);
|
2255
|
+
path.setAttribute('d', pathMovements);
|
2256
|
+
path.setAttribute('class', 'arrow');
|
2257
|
+
// rotate arrow
|
2258
|
+
if (!this.isLeft) {
|
2259
|
+
path.setAttribute('transform', 'translate(100, 100) rotate(180) ');
|
2260
|
+
}
|
2261
|
+
svg.appendChild(path);
|
2262
|
+
return svg;
|
2263
|
+
};
|
2264
|
+
// get SVG path movmement
|
2265
|
+
function getArrowMovements(shape) {
|
2266
|
+
// use shape as movement if string
|
2267
|
+
if (typeof shape == 'string') {
|
2268
|
+
return shape;
|
2269
|
+
}
|
2270
|
+
// create movement string
|
2271
|
+
return ('M ' +
|
2272
|
+
shape.x0 +
|
2273
|
+
',50' +
|
2274
|
+
' L ' +
|
2275
|
+
shape.x1 +
|
2276
|
+
',' +
|
2277
|
+
(shape.y1 + 50) +
|
2278
|
+
' L ' +
|
2279
|
+
shape.x2 +
|
2280
|
+
',' +
|
2281
|
+
(shape.y2 + 50) +
|
2282
|
+
' L ' +
|
2283
|
+
shape.x3 +
|
2284
|
+
',50 ' +
|
2285
|
+
' L ' +
|
2286
|
+
shape.x2 +
|
2287
|
+
',' +
|
2288
|
+
(50 - shape.y2) +
|
2289
|
+
' L ' +
|
2290
|
+
shape.x1 +
|
2291
|
+
',' +
|
2292
|
+
(50 - shape.y1) +
|
2293
|
+
' Z');
|
2294
|
+
}
|
2295
|
+
PrevNextButton.prototype.handleEvent = utils.handleEvent;
|
2296
|
+
PrevNextButton.prototype.onclick = function () {
|
2297
|
+
if (!this.isEnabled) {
|
2298
|
+
return;
|
2299
|
+
}
|
2300
|
+
this.parent.uiChange();
|
2301
|
+
const method = this.isPrevious ? 'previous' : 'next';
|
2302
|
+
this.parent[method]();
|
2303
|
+
};
|
2304
|
+
// ----- ----- //
|
2305
|
+
PrevNextButton.prototype.enable = function () {
|
2306
|
+
if (this.isEnabled) {
|
2307
|
+
return;
|
2308
|
+
}
|
2309
|
+
this.element.disabled = false;
|
2310
|
+
this.isEnabled = true;
|
2311
|
+
};
|
2312
|
+
PrevNextButton.prototype.disable = function () {
|
2313
|
+
if (!this.isEnabled) {
|
2314
|
+
return;
|
2315
|
+
}
|
2316
|
+
this.element.disabled = true;
|
2317
|
+
this.isEnabled = false;
|
2318
|
+
};
|
2319
|
+
PrevNextButton.prototype.update = function () {
|
2320
|
+
// index of first or last slide, if previous or next
|
2321
|
+
const slides = this.parent.slides;
|
2322
|
+
// enable is wrapAround and at least 2 slides
|
2323
|
+
if (this.parent.options.wrapAround && slides.length > 1) {
|
2324
|
+
this.enable();
|
2325
|
+
return;
|
2326
|
+
}
|
2327
|
+
const lastIndex = slides.length ? slides.length - 1 : 0;
|
2328
|
+
const boundIndex = this.isPrevious ? 0 : lastIndex;
|
2329
|
+
const method = this.parent.selectedIndex == boundIndex ? 'disable' : 'enable';
|
2330
|
+
this[method]();
|
2331
|
+
};
|
2332
|
+
PrevNextButton.prototype.destroy = function () {
|
2333
|
+
this.deactivate();
|
2334
|
+
this.allOff();
|
2335
|
+
};
|
2336
|
+
// -------------------------- Flickity prototype -------------------------- //
|
2337
|
+
utils.extend(Flickity.defaults, {
|
2338
|
+
prevNextButtons: true,
|
2339
|
+
arrowShape: {
|
2340
|
+
x0: 10,
|
2341
|
+
x1: 60,
|
2342
|
+
y1: 50,
|
2343
|
+
x2: 70,
|
2344
|
+
y2: 40,
|
2345
|
+
x3: 30,
|
2346
|
+
},
|
2347
|
+
});
|
2348
|
+
Flickity.createMethods.push('_createPrevNextButtons');
|
2349
|
+
const proto = Flickity.prototype;
|
2350
|
+
proto._createPrevNextButtons = function () {
|
2351
|
+
if (!this.options.prevNextButtons) {
|
2352
|
+
return;
|
2353
|
+
}
|
2354
|
+
this.prevButton = new PrevNextButton(-1, this);
|
2355
|
+
this.nextButton = new PrevNextButton(1, this);
|
2356
|
+
this.on('activate', this.activatePrevNextButtons);
|
2357
|
+
};
|
2358
|
+
proto.activatePrevNextButtons = function () {
|
2359
|
+
this.prevButton.activate();
|
2360
|
+
this.nextButton.activate();
|
2361
|
+
this.on('deactivate', this.deactivatePrevNextButtons);
|
2362
|
+
};
|
2363
|
+
proto.deactivatePrevNextButtons = function () {
|
2364
|
+
this.prevButton.deactivate();
|
2365
|
+
this.nextButton.deactivate();
|
2366
|
+
this.off('deactivate', this.deactivatePrevNextButtons);
|
2367
|
+
};
|
2368
|
+
// @ts-ignore
|
2369
|
+
Flickity.PrevNextButton = PrevNextButton;
|
2370
|
+
};
|
2371
|
+
|
2372
|
+
const player = () => {
|
2373
|
+
// -------------------------- Player -------------------------- //
|
2374
|
+
function Player(parent) {
|
2375
|
+
this.parent = parent;
|
2376
|
+
this.state = 'stopped';
|
2377
|
+
// visibility change event handler
|
2378
|
+
this.onVisibilityChange = this.visibilityChange.bind(this);
|
2379
|
+
this.onVisibilityPlay = this.visibilityPlay.bind(this);
|
2380
|
+
}
|
2381
|
+
Player.prototype = Object.create(EvEmitter.prototype);
|
2382
|
+
// start play
|
2383
|
+
Player.prototype.play = function () {
|
2384
|
+
if (this.state == 'playing') {
|
2385
|
+
return;
|
2386
|
+
}
|
2387
|
+
// do not play if page is hidden, start playing when page is visible
|
2388
|
+
const isPageHidden = document.hidden;
|
2389
|
+
if (isPageHidden) {
|
2390
|
+
document.addEventListener('visibilitychange', this.onVisibilityPlay);
|
2391
|
+
return;
|
2392
|
+
}
|
2393
|
+
this.state = 'playing';
|
2394
|
+
// listen to visibility change
|
2395
|
+
document.addEventListener('visibilitychange', this.onVisibilityChange);
|
2396
|
+
// start ticking
|
2397
|
+
this.tick();
|
2398
|
+
};
|
2399
|
+
Player.prototype.tick = function () {
|
2400
|
+
// do not tick if not playing
|
2401
|
+
if (this.state != 'playing') {
|
2402
|
+
return;
|
2403
|
+
}
|
2404
|
+
let time = this.parent.options.autoPlay;
|
2405
|
+
// default to 3 seconds
|
2406
|
+
time = typeof time == 'number' ? time : 3000;
|
2407
|
+
const _this = this;
|
2408
|
+
// HACK: reset ticks if stopped and started within interval
|
2409
|
+
this.clear();
|
2410
|
+
this.timeout = setTimeout(function () {
|
2411
|
+
_this.parent.next(true);
|
2412
|
+
_this.tick();
|
2413
|
+
}, time);
|
2414
|
+
};
|
2415
|
+
Player.prototype.stop = function () {
|
2416
|
+
this.state = 'stopped';
|
2417
|
+
this.clear();
|
2418
|
+
// remove visibility change event
|
2419
|
+
document.removeEventListener('visibilitychange', this.onVisibilityChange);
|
2420
|
+
};
|
2421
|
+
Player.prototype.clear = function () {
|
2422
|
+
clearTimeout(this.timeout);
|
2423
|
+
};
|
2424
|
+
Player.prototype.pause = function () {
|
2425
|
+
if (this.state == 'playing') {
|
2426
|
+
this.state = 'paused';
|
2427
|
+
this.clear();
|
2428
|
+
}
|
2429
|
+
};
|
2430
|
+
Player.prototype.unpause = function () {
|
2431
|
+
// re-start play if paused
|
2432
|
+
if (this.state == 'paused') {
|
2433
|
+
this.play();
|
2434
|
+
}
|
2435
|
+
};
|
2436
|
+
// pause if page visibility is hidden, unpause if visible
|
2437
|
+
Player.prototype.visibilityChange = function () {
|
2438
|
+
const isPageHidden = document.hidden;
|
2439
|
+
this[isPageHidden ? 'pause' : 'unpause']();
|
2440
|
+
};
|
2441
|
+
Player.prototype.visibilityPlay = function () {
|
2442
|
+
this.play();
|
2443
|
+
document.removeEventListener('visibilitychange', this.onVisibilityPlay);
|
2444
|
+
};
|
2445
|
+
// -------------------------- Flickity -------------------------- //
|
2446
|
+
utils.extend(Flickity.defaults, {
|
2447
|
+
pauseAutoPlayOnHover: true,
|
2448
|
+
});
|
2449
|
+
Flickity.createMethods.push('_createPlayer');
|
2450
|
+
const proto = Flickity.prototype;
|
2451
|
+
proto._createPlayer = function () {
|
2452
|
+
this.player = new Player(this);
|
2453
|
+
this.on('activate', this.activatePlayer);
|
2454
|
+
this.on('uiChange', this.stopPlayer);
|
2455
|
+
this.on('pointerDown', this.stopPlayer);
|
2456
|
+
this.on('deactivate', this.deactivatePlayer);
|
2457
|
+
};
|
2458
|
+
proto.activatePlayer = function () {
|
2459
|
+
if (!this.options.autoPlay) {
|
2460
|
+
return;
|
2461
|
+
}
|
2462
|
+
this.player.play();
|
2463
|
+
this.element.addEventListener('mouseenter', this);
|
2464
|
+
};
|
2465
|
+
// Player API, don't hate the ... thanks I know where the door is
|
2466
|
+
proto.playPlayer = function () {
|
2467
|
+
this.player.play();
|
2468
|
+
};
|
2469
|
+
proto.stopPlayer = function () {
|
2470
|
+
this.player.stop();
|
2471
|
+
};
|
2472
|
+
proto.pausePlayer = function () {
|
2473
|
+
this.player.pause();
|
2474
|
+
};
|
2475
|
+
proto.unpausePlayer = function () {
|
2476
|
+
this.player.unpause();
|
2477
|
+
};
|
2478
|
+
proto.deactivatePlayer = function () {
|
2479
|
+
this.player.stop();
|
2480
|
+
this.element.removeEventListener('mouseenter', this);
|
2481
|
+
};
|
2482
|
+
// ----- mouseenter/leave ----- //
|
2483
|
+
// pause auto-play on hover
|
2484
|
+
proto.onmouseenter = function () {
|
2485
|
+
if (!this.options.pauseAutoPlayOnHover) {
|
2486
|
+
return;
|
2487
|
+
}
|
2488
|
+
this.player.pause();
|
2489
|
+
this.element.addEventListener('mouseleave', this);
|
2490
|
+
};
|
2491
|
+
// resume auto-play on hover off
|
2492
|
+
proto.onmouseleave = function () {
|
2493
|
+
this.player.unpause();
|
2494
|
+
this.element.removeEventListener('mouseleave', this);
|
2495
|
+
};
|
2496
|
+
// @ts-ignore
|
2497
|
+
Flickity.Player = Player;
|
2498
|
+
};
|
2499
|
+
|
1435
2500
|
const flickity = Flickity;
|
2501
|
+
drag();
|
2502
|
+
nowNext();
|
2503
|
+
player();
|
1436
2504
|
|
1437
2505
|
const slidesCss = ":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--dot-color:#ccc;--dot-color-active:var(--nano-color-primary, #007495);--navbtns-icon-color:var(--dot-color-active);--navbtns-bg-color:white;--navbtns-icon-color-disabled:var(--dot-color-active);--navbtns-bg-color-disabled:white;--fsbtn-icon-color:var(--dot-color-active);--fsbtn-bg-color:white;display:block;-webkit-user-select:none;user-select:none;overflow:hidden;transition:opacity 0.2s;opacity:0;max-inline-size:100vw}:host([ready]){opacity:1}.slideshow{max-block-size:100%;min-block-size:inherit;block-size:inherit;position:relative}.slideshow.not-ready{inline-size:100%;overflow:hidden}.flickity-container{opacity:0;transition:opacity 0.2s;display:flex;inline-size:fit-content;block-size:fit-content}.not-ready .flickity-container{inline-size:fit-content;block-size:fit-content}.flickity-container.slides-ready{min-block-size:inherit;max-block-size:inherit;block-size:inherit;inline-size:auto}[hidden]{display:none !important}.ui-extras{pointer-events:none;position:absolute;block-size:100%;inline-size:100%;inset-block-start:0;inset-inline-start:0}.ui-extras *{pointer-events:all}/*! Flickity v2.2.1\nhttps://flickity.metafizzy.co\n---------------------------------------------- */.flickity-enabled{position:relative;opacity:1}.flickity-enabled:focus{outline:none}.flickity-viewport{overflow:hidden;position:relative;min-block-size:100%;flex:1}.flickity-slider{position:absolute;inline-size:100%;block-size:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:grabbing}.flickity-button{position:absolute;background:var(--navbtns-bg-color);border:none;color:#333;opacity:0.75}.flickity-button:hover{opacity:1;cursor:pointer}.flickity-button:focus{outline:none;box-shadow:0 0 0 5px #19f}.flickity-button:active{opacity:0.6}.flickity-button:disabled{opacity:0.3;cursor:auto;pointer-events:none;background:var(--navbtns-bg-color-disabled)}.flickity-button-icon{fill:var(--navbtns-icon-color)}.flickity-button:disabled .flickity-button-icon{fill:var(--navbtns-icon-color-disabled)}.flickity-prev-next-button{inset-block-start:50%;inline-size:44px;block-size:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{inset-inline-start:10px}.flickity-prev-next-button.next{inset-inline-end:10px}.flickity-rtl .flickity-prev-next-button.previous{inset-inline:auto 10px}.flickity-rtl .flickity-prev-next-button.next{inset-inline:10px auto}.flickity-prev-next-button .flickity-button-icon{position:absolute;inset-inline-start:20%;inset-block-start:20%;inline-size:60%;block-size:60%}.flickity-page-dots{position:absolute;inline-size:100%;inset-block-end:10px;padding:0;margin:0;list-style:none;text-align:center;line-height:1;z-index:4}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;inline-size:10px;block-size:10px;margin-block:0;margin-inline:8px;border-radius:50%;cursor:pointer;background:var(--dot-color)}.flickity-page-dots .dot.is-selected{opacity:1;background:var(--dot-color-active)}.flickity-enabled.is-fullscreen{position:fixed;inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;background:hsla(0, 0%, 0%, 0.9);padding-block-end:35px;z-index:100}.flickity-enabled.is-fullscreen .flickity-page-dots{inset-block-end:45px}html.is-flickity-fullscreen{overflow:hidden}.flickity-fullscreen-button{display:block;inset-inline-end:10px;inset-block-start:10px;inline-size:24px;block-size:24px;border-radius:4px;background:var(--fsbtn-bg-color);fill:var(--fsbtn-icon-color)}.flickity-rtl .flickity-fullscreen-button{inset-inline:10px auto}.flickity-fullscreen-button-exit{display:none}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-exit{display:block}.flickity-enabled.is-fullscreen .flickity-fullscreen-button-view{display:none}.flickity-fullscreen-button .flickity-button-icon{position:absolute;inline-size:16px;block-size:16px;inset-inline-start:4px;inset-block-start:4px}.flickity-enabled.is-fade .flickity-slider>*{pointer-events:none;z-index:0}.flickity-enabled.is-fade .flickity-slider ::slotted(.is-selected){pointer-events:auto;z-index:1}";
|
1438
2506
|
const NanoSlidesStyle0 = slidesCss;
|
@@ -1776,19 +2844,19 @@ const Slides = class {
|
|
1776
2844
|
}
|
1777
2845
|
async loadFlickityModules(opts) {
|
1778
2846
|
if (!this.hasFullScreenModule && opts.fullscreen) {
|
1779
|
-
await Promise.resolve().then(function () { return require('./fullscreen-
|
2847
|
+
await Promise.resolve().then(function () { return require('./fullscreen-5d0422de.js'); });
|
1780
2848
|
this.hasFullScreenModule = true;
|
1781
2849
|
}
|
1782
2850
|
if (!this.hasLazyLoadModule && opts.lazyLoad) {
|
1783
|
-
await Promise.resolve().then(function () { return require('./lazyload-
|
2851
|
+
await Promise.resolve().then(function () { return require('./lazyload-f181cb37.js'); });
|
1784
2852
|
this.hasLazyLoadModule = true;
|
1785
2853
|
}
|
1786
2854
|
if (!this.hasDotsModule && opts.pageDots) {
|
1787
|
-
await Promise.resolve().then(function () { return require('./page-dots-
|
2855
|
+
await Promise.resolve().then(function () { return require('./page-dots-99dd88f6.js'); });
|
1788
2856
|
this.hasDotsModule = true;
|
1789
2857
|
}
|
1790
2858
|
if (!this.hasFadeModule && opts.fade) {
|
1791
|
-
await Promise.resolve().then(function () { return require('./fade-
|
2859
|
+
await Promise.resolve().then(function () { return require('./fade-2dd9dd8b.js'); });
|
1792
2860
|
this.hasFadeModule = true;
|
1793
2861
|
}
|
1794
2862
|
}
|
@@ -1873,10 +2941,10 @@ const Slides = class {
|
|
1873
2941
|
select: this.handleSlideSelect,
|
1874
2942
|
change: this.nanoSlidesChange.emit,
|
1875
2943
|
scroll: this.nanoSlidesScroll.emit,
|
1876
|
-
settle: this.nanoSlidesTransitionEnd.emit,
|
1877
|
-
dragStart: this.nanoSlidesDragStart.emit,
|
1878
|
-
dragMove: this.nanoSlidesDragMove.emit,
|
1879
|
-
dragEnd: this.nanoSlidesDragEnd.emit,
|
2944
|
+
settle: () => requestAnimationFrame(() => this.nanoSlidesTransitionEnd.emit()),
|
2945
|
+
dragStart: () => requestAnimationFrame(() => this.nanoSlidesDragStart.emit()),
|
2946
|
+
dragMove: () => requestAnimationFrame(() => this.nanoSlidesDragMove.emit()),
|
2947
|
+
dragEnd: () => requestAnimationFrame(() => this.nanoSlidesDragEnd.emit()),
|
1880
2948
|
staticClick: this.nanoSlidesTap.emit,
|
1881
2949
|
fullscreenChange: this.handleFullscreen,
|
1882
2950
|
};
|
@@ -1922,15 +2990,15 @@ const Slides = class {
|
|
1922
2990
|
this.destroyflickity();
|
1923
2991
|
}
|
1924
2992
|
render() {
|
1925
|
-
return (index.h(index.Host, { key: '
|
2993
|
+
return (index.h(index.Host, { key: '9e97a224eef505b29bf19db52c901ba85c058f54' }, index.h("div", { key: 'e3b0778a1b68bf78fe52abc32c74f30e278a00e4', class: {
|
1926
2994
|
slideshow: true,
|
1927
2995
|
ready: this.ready,
|
1928
2996
|
'not-ready': !this.ready,
|
1929
|
-
}, part: "base" }, index.h("div", { key: '
|
2997
|
+
}, part: "base" }, index.h("div", { key: 'da56ec590908be9a10be1fc41bbf83fa3216e674', ref: (div) => (this.flickityEl = div), class: {
|
1930
2998
|
'flickity-container': true,
|
1931
2999
|
'slides-ready': this.slidesReady,
|
1932
3000
|
'slides-not-ready': !this.slidesReady,
|
1933
|
-
}, part: "slide-container" }, index.h("slot", { key: '
|
3001
|
+
}, part: "slide-container" }, index.h("slot", { key: '12d359c67d1f30245e7aef788018697b0c0b94ee' })), index.h("div", { key: '8a0a0190ea93acb5ba932b353baa6cbbae33547b', class: "ui-extras" }, index.h("slot", { key: 'fddc2df69c989ac09e5908a8953783b9ae32d3ba', name: "ui" })))));
|
1934
3002
|
}
|
1935
3003
|
static get watchers() { return {
|
1936
3004
|
"options": ["optionsChanged"],
|
@@ -1965,9 +3033,9 @@ const waitForSlides = (host) => {
|
|
1965
3033
|
};
|
1966
3034
|
Slides.style = NanoSlidesStyle0;
|
1967
3035
|
|
1968
|
-
exports.EvEmitter = EvEmitter;
|
1969
3036
|
exports.Flickity = Flickity;
|
1970
3037
|
exports.Slides = Slides;
|
3038
|
+
exports.Unipointer = Unipointer;
|
1971
3039
|
exports.utils = utils;
|
1972
3040
|
|
1973
|
-
//# sourceMappingURL=nano-slides-
|
3041
|
+
//# sourceMappingURL=nano-slides-612634dc.js.map
|