@nanoporetech-digital/components 8.3.0 → 8.3.1
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-C0GwEner.js → algolia-data-BqpBVN89.js} +1 -1
- package/dist/cjs/{component-store-DvAjEA7o.js → component-store-C5eBOK0w.js} +1 -1
- package/dist/cjs/{dom-B-9iU7CY.js → dom-Dxk5vXYq.js} +1 -1
- package/dist/cjs/{fade-Cvsqaxtn.js → fade-BzBFJiQK.js} +3 -3
- package/dist/cjs/{form-control-OfNv03yU.js → form-control-B-3YQ1I7.js} +1 -1
- package/dist/cjs/{fullscreen-BtSF9KqT.js → fullscreen-Cz3eYnOp.js} +3 -3
- package/dist/cjs/{index-IiP89Cx8.js → index-CkLcAUj-.js} +1 -1
- package/dist/cjs/{index-Bp8uD6Gl.js → index-DGttnXif.js} +3 -0
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{lazyload-DxM1Zo3E.js → lazyload-DIFYejbf.js} +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{modal-CpGgJ4AI.js → modal-BlzeVZW4.js} +1 -1
- package/dist/cjs/nano-accordion.cjs.entry.js +3 -3
- package/dist/cjs/nano-alert.cjs.entry.js +7 -7
- package/dist/cjs/nano-algolia-filter.cjs.entry.js +4 -4
- package/dist/cjs/nano-algolia-pagination.cjs.entry.js +2 -2
- package/dist/cjs/nano-algolia-results.cjs.entry.js +3 -3
- package/dist/cjs/nano-algolia.cjs.entry.js +5 -5
- package/dist/cjs/nano-animation.cjs.entry.js +2 -2
- package/dist/cjs/nano-avatar_5.cjs.entry.js +27 -17
- package/dist/cjs/nano-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/nano-card-carousel.cjs.entry.js +2 -2
- package/dist/cjs/nano-card.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/nano-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/nano-collapsible-comparison.cjs.entry.js +2 -2
- package/dist/cjs/nano-components.cjs.js +2 -2
- package/dist/cjs/nano-content-links.cjs.entry.js +1 -1
- package/dist/cjs/nano-cta.cjs.entry.js +1 -1
- package/dist/cjs/{nano-data-table-C2mrjx5Y.js → nano-data-table-DFEflpc4.js} +5 -5
- package/dist/cjs/nano-data-table.cjs.entry.js +6 -6
- package/dist/cjs/nano-datalist_3.cjs.entry.js +3 -3
- package/dist/cjs/nano-date-input.cjs.entry.js +2 -2
- package/dist/cjs/nano-date-picker_2.cjs.entry.js +4 -4
- package/dist/cjs/nano-details.cjs.entry.js +4 -4
- package/dist/cjs/nano-dialog.cjs.entry.js +8 -8
- package/dist/cjs/nano-dropdown_2.cjs.entry.js +5 -5
- package/dist/cjs/nano-feature-box.cjs.entry.js +1 -1
- package/dist/cjs/nano-field-validator.cjs.entry.js +3 -3
- package/dist/cjs/nano-file-upload.cjs.entry.js +2 -2
- package/dist/cjs/nano-footer.cjs.entry.js +1 -1
- package/dist/cjs/nano-global-nav.cjs.entry.js +2 -2
- 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-hero.cjs.entry.js +2 -2
- package/dist/cjs/nano-icon-item.cjs.entry.js +1 -1
- package/dist/cjs/nano-icon_3.cjs.entry.js +2 -2
- package/dist/cjs/nano-in-page-nav.cjs.entry.js +4 -4
- package/dist/cjs/nano-increment.cjs.entry.js +2 -2
- package/dist/cjs/nano-intersection-observe.cjs.entry.js +4 -4
- package/dist/cjs/nano-masked-overflow.cjs.entry.js +4 -4
- package/dist/cjs/nano-menu-drawer.cjs.entry.js +4 -4
- package/dist/cjs/nano-more-less.cjs.entry.js +2 -2
- package/dist/cjs/nano-nav-item.cjs.entry.js +5 -5
- package/dist/cjs/nano-option-box.cjs.entry.js +1 -1
- package/dist/cjs/nano-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/nano-range.cjs.entry.js +2 -2
- package/dist/cjs/nano-rating.cjs.entry.js +2 -2
- package/dist/cjs/nano-resize-observe.cjs.entry.js +2 -2
- package/dist/cjs/nano-slide.cjs.entry.js +2 -2
- package/dist/cjs/{nano-slides-DLbZhf2H.js → nano-slides-C576PTmo.js} +6 -6
- package/dist/cjs/nano-slides.cjs.entry.js +3 -3
- package/dist/cjs/nano-sortable.cjs.entry.js +2 -2
- package/dist/cjs/nano-spinner.cjs.entry.js +1 -1
- package/dist/cjs/nano-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/nano-sticker.cjs.entry.js +4 -4
- package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
- package/dist/cjs/nano-tab-group.cjs.entry.js +4 -4
- package/dist/cjs/nano-tab.cjs.entry.js +2 -2
- package/dist/cjs/nano-table.cjs.entry.js +2 -2
- package/dist/cjs/{page-dots-DpnNe0bi.js → page-dots-Clb2QknR.js} +3 -3
- package/dist/cjs/{renderer-BiFPhR1V.js → renderer-B9M1kXq8.js} +1 -1
- package/dist/cjs/{scroll-C1Zu0yfO.js → scroll-C6pO9RvO.js} +1 -1
- package/dist/cjs/{slot-ZE4WOECU.js → slot-CJgcluNw.js} +2 -2
- package/dist/cjs/{tabbable-Dey_UhZv.js → tabbable-C-YwPfjA.js} +1 -1
- package/dist/cjs/{table.worker-BdeBfcyD.js → table.worker-DxRLPmU9.js} +6 -6
- package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/collection/components/global-search-results/global-search-results.js +30 -8
- package/dist/components/global-search-results.js +19 -9
- package/dist/esm/{algolia-data-D9ZAstcC.js → algolia-data-Kh0vPn3V.js} +1 -1
- package/dist/esm/{component-store-DeKxotC5.js → component-store-JYVuxwvK.js} +1 -1
- package/dist/esm/{dom-CrrHp_I_.js → dom-dlicJTEJ.js} +1 -1
- package/dist/esm/{fade-M1mjf4zm.js → fade-D4P3XGVa.js} +3 -3
- package/dist/esm/{form-control-D4EZD4gc.js → form-control-CIz-2SMG.js} +1 -1
- package/dist/esm/{fullscreen-BJlrN4_5.js → fullscreen-Cfl6LvH2.js} +3 -3
- package/dist/esm/{index-DgO0qeQ9.js → index-BM3Om9WE.js} +3 -0
- package/dist/esm/{index-CjVnX0W1.js → index-BlBZYxu4.js} +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/{lazyload-B6FI3nbb.js → lazyload-CQYknGN2.js} +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{modal-CYo2pVRA.js → modal-CY_3_LJ7.js} +1 -1
- package/dist/esm/nano-accordion.entry.js +3 -3
- package/dist/esm/nano-alert.entry.js +7 -7
- package/dist/esm/nano-algolia-filter.entry.js +4 -4
- package/dist/esm/nano-algolia-pagination.entry.js +2 -2
- package/dist/esm/nano-algolia-results.entry.js +3 -3
- package/dist/esm/nano-algolia.entry.js +5 -5
- package/dist/esm/nano-animation.entry.js +2 -2
- package/dist/esm/nano-avatar_5.entry.js +27 -17
- package/dist/esm/nano-breadcrumb.entry.js +1 -1
- package/dist/esm/nano-card-carousel.entry.js +2 -2
- package/dist/esm/nano-card.entry.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js +2 -2
- package/dist/esm/nano-checkbox.entry.js +2 -2
- package/dist/esm/nano-collapsible-comparison.entry.js +2 -2
- package/dist/esm/nano-components.js +3 -3
- package/dist/esm/nano-content-links.entry.js +1 -1
- package/dist/esm/nano-cta.entry.js +1 -1
- package/dist/esm/{nano-data-table-BP5Ccyob.js → nano-data-table-Bqk8ZUaL.js} +5 -5
- package/dist/esm/nano-data-table.entry.js +6 -6
- package/dist/esm/nano-datalist_3.entry.js +3 -3
- package/dist/esm/nano-date-input.entry.js +2 -2
- package/dist/esm/nano-date-picker_2.entry.js +4 -4
- package/dist/esm/nano-details.entry.js +4 -4
- package/dist/esm/nano-dialog.entry.js +8 -8
- package/dist/esm/nano-dropdown_2.entry.js +5 -5
- package/dist/esm/nano-feature-box.entry.js +1 -1
- package/dist/esm/nano-field-validator.entry.js +3 -3
- package/dist/esm/nano-file-upload.entry.js +2 -2
- package/dist/esm/nano-footer.entry.js +1 -1
- package/dist/esm/nano-global-nav.entry.js +2 -2
- package/dist/esm/nano-grid-item.entry.js +1 -1
- package/dist/esm/nano-grid_2.entry.js +2 -2
- package/dist/esm/nano-hero.entry.js +2 -2
- package/dist/esm/nano-icon-item.entry.js +1 -1
- package/dist/esm/nano-icon_3.entry.js +2 -2
- package/dist/esm/nano-in-page-nav.entry.js +4 -4
- package/dist/esm/nano-increment.entry.js +2 -2
- package/dist/esm/nano-intersection-observe.entry.js +4 -4
- package/dist/esm/nano-masked-overflow.entry.js +4 -4
- package/dist/esm/nano-menu-drawer.entry.js +4 -4
- package/dist/esm/nano-more-less.entry.js +2 -2
- package/dist/esm/nano-nav-item.entry.js +5 -5
- package/dist/esm/nano-option-box.entry.js +1 -1
- package/dist/esm/nano-progress-bar.entry.js +1 -1
- package/dist/esm/nano-range.entry.js +2 -2
- package/dist/esm/nano-rating.entry.js +2 -2
- package/dist/esm/nano-resize-observe.entry.js +2 -2
- package/dist/esm/nano-slide.entry.js +2 -2
- package/dist/esm/{nano-slides-CI0F1FDY.js → nano-slides-DcJWApi6.js} +6 -6
- package/dist/esm/nano-slides.entry.js +3 -3
- package/dist/esm/nano-sortable.entry.js +2 -2
- package/dist/esm/nano-spinner.entry.js +1 -1
- package/dist/esm/nano-split-pane.entry.js +2 -2
- package/dist/esm/nano-sticker.entry.js +4 -4
- package/dist/esm/nano-tab-content.entry.js +2 -2
- package/dist/esm/nano-tab-group.entry.js +4 -4
- package/dist/esm/nano-tab.entry.js +2 -2
- package/dist/esm/nano-table.entry.js +2 -2
- package/dist/esm/{page-dots-BsFo0sLb.js → page-dots-kX7jiD3G.js} +3 -3
- package/dist/esm/{renderer-T8etwwhk.js → renderer-BaP2L8CT.js} +1 -1
- package/dist/esm/{scroll-DtQwV9-u.js → scroll-1nFw8CNk.js} +1 -1
- package/dist/esm/{slot-ncg8_2lY.js → slot-CFTP7C_Z.js} +2 -2
- package/dist/esm/{tabbable-DbW4RUw6.js → tabbable-BgopY-vd.js} +1 -1
- package/dist/esm/{table.worker-CBjDZoxo.js → table.worker-a52UkSRM.js} +6 -6
- package/dist/nano-components/algolia-data-Kh0vPn3V.js +4 -0
- package/dist/nano-components/{component-store-DeKxotC5.js → component-store-JYVuxwvK.js} +1 -1
- package/dist/nano-components/dom-dlicJTEJ.js +4 -0
- package/dist/nano-components/{fade-M1mjf4zm.js → fade-D4P3XGVa.js} +1 -1
- package/dist/nano-components/{form-control-D4EZD4gc.js → form-control-CIz-2SMG.js} +1 -1
- package/dist/nano-components/{fullscreen-BJlrN4_5.js → fullscreen-Cfl6LvH2.js} +1 -1
- package/dist/nano-components/{index-DgO0qeQ9.js → index-BM3Om9WE.js} +1 -1
- package/dist/nano-components/{index-CjVnX0W1.js → index-BlBZYxu4.js} +1 -1
- package/dist/nano-components/index.esm.js +1 -1
- package/dist/nano-components/lazyload-CQYknGN2.js +4 -0
- package/dist/nano-components/{modal-CYo2pVRA.js → modal-CY_3_LJ7.js} +1 -1
- 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-animation.entry.js +1 -1
- package/dist/nano-components/nano-avatar_5.entry.js +1 -1
- package/dist/nano-components/nano-breadcrumb.entry.js +1 -1
- package/dist/nano-components/nano-card-carousel.entry.js +1 -1
- package/dist/nano-components/nano-card.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-collapsible-comparison.entry.js +1 -1
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-content-links.entry.js +1 -1
- package/dist/nano-components/nano-cta.entry.js +1 -1
- package/dist/nano-components/{nano-data-table-BP5Ccyob.js → nano-data-table-Bqk8ZUaL.js} +1 -1
- package/dist/nano-components/nano-data-table.entry.js +1 -1
- package/dist/nano-components/nano-datalist_3.entry.js +1 -1
- package/dist/nano-components/nano-date-input.entry.js +1 -1
- package/dist/nano-components/nano-date-picker_2.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-dropdown_2.entry.js +1 -1
- package/dist/nano-components/nano-feature-box.entry.js +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-footer.entry.js +1 -1
- package/dist/nano-components/nano-global-nav.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-hero.entry.js +1 -1
- package/dist/nano-components/nano-icon-item.entry.js +1 -1
- package/dist/nano-components/nano-icon_3.entry.js +1 -1
- package/dist/nano-components/nano-in-page-nav.entry.js +1 -1
- package/dist/nano-components/nano-increment.entry.js +1 -1
- package/dist/nano-components/nano-intersection-observe.entry.js +1 -1
- package/dist/nano-components/nano-masked-overflow.entry.js +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-nav-item.entry.js +1 -1
- package/dist/nano-components/nano-option-box.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-resize-observe.entry.js +1 -1
- package/dist/nano-components/nano-slide.entry.js +1 -1
- package/dist/nano-components/{nano-slides-CI0F1FDY.js → nano-slides-DcJWApi6.js} +3 -3
- 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-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.entry.js +1 -1
- package/dist/nano-components/nano-table.entry.js +1 -1
- package/dist/nano-components/{page-dots-BsFo0sLb.js → page-dots-kX7jiD3G.js} +1 -1
- package/dist/nano-components/{renderer-T8etwwhk.js → renderer-BaP2L8CT.js} +1 -1
- package/dist/nano-components/{scroll-DtQwV9-u.js → scroll-1nFw8CNk.js} +1 -1
- package/dist/nano-components/{slot-ncg8_2lY.js → slot-CFTP7C_Z.js} +1 -1
- package/dist/nano-components/tabbable-BgopY-vd.js +4 -0
- package/dist/nano-components/table.worker-a52UkSRM.js +4 -0
- package/dist/types/components/global-search-results/global-search-results.d.ts +2 -0
- package/docs-json.json +14 -2
- package/hydrate/index.js +22 -9
- package/hydrate/index.mjs +22 -9
- package/package.json +2 -2
- package/dist/nano-components/algolia-data-D9ZAstcC.js +0 -4
- package/dist/nano-components/dom-CrrHp_I_.js +0 -4
- package/dist/nano-components/lazyload-B6FI3nbb.js +0 -4
- package/dist/nano-components/tabbable-DbW4RUw6.js +0 -4
- package/dist/nano-components/table.worker-CBjDZoxo.js +0 -4
- /package/dist/types/builds/{uSGJX_GU → baEH6RK5}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +0 -0
- /package/dist/types/builds/{uSGJX_GU → baEH6RK5}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
- /package/dist/types/builds/{uSGJX_GU → baEH6RK5}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +0 -0
- /package/dist/types/builds/{uSGJX_GU → baEH6RK5}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +0 -0
- /package/dist/types/builds/{uSGJX_GU → baEH6RK5}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
- /package/dist/types/builds/{uSGJX_GU → baEH6RK5}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
- /package/dist/types/builds/{uSGJX_GU → baEH6RK5}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
- /package/dist/types/builds/{uSGJX_GU → baEH6RK5}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
- /package/dist/types/builds/{uSGJX_GU → baEH6RK5}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
- /package/dist/types/builds/{uSGJX_GU → baEH6RK5}/0/Digital/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{r as t,c as i,g as s,a as e}from"./index-DgO0qeQ9.js";import{a as h}from"./dom-CrrHp_I_.js";import{d as n}from"./throttle-C93FMm2Z.js";import{f as o}from"./scroll-DtQwV9-u.js";import{t as r,h as a}from"./renderer-T8etwwhk.js";function c(t,i){const s=i instanceof Document?document.documentElement:i;return h(t,s)}const d=class{constructor(s){t(this,s),this.nanoStuck=i(this,"nanoStuck",7),this.nanoUnstuck=i(this,"nanoUnstuck",7),this.nanoHide=i(this,"nanoHide",7),this.nanoShow=i(this,"nanoShow",7)}isRtl=!1;io;contentSizeObserver;parentSizeObserver;sticker;content;scrollPosCache=0;scrollPosThresholdCache=0;cacheOffset=0;slottedContent;pauseResizeWatcher=!1;listenForScrollParent=!1;stickToEleInitSize;positions=[];pauseHide=!1;hasBootstrapped=!1;get host(){return s(this)}isStuck=!1;isRootSticker=!0;hide=!1;scrollHide=!1;multiStickerHide=!1;scrollingTo=!1;quietModeIsOn=!1;stuckCounter=0;stickerIndex=0;stickToEle;triggerPos;trigger;_offset=0;autoResize=!0;isSticky=!0;offset=0;position="top";quietMode={h:600,w:600};hideOnNewStickers=!0;breakPointMax=null;breakPointMin=null;scrollParent;stickTo;nanoStuck;nanoUnstuck;nanoHide;nanoShow;async isHiding(){return this.hide}async isSticking(){return this.shouldStick(),this.isStuck}async setTriggerPos(t){return this._offset=t}async getTriggerPos(){return this.triggerPos}async pauseHiding(t){this.pauseHide=t}updateTriggerOffset(){this.trigger&&this.scrollParent&&this.listenForScrollParent&&(this.triggerPos=c(this.trigger,this.scrollParent))}stickerResizeListener(){this.content&&window.ResizeObserver&&(this.contentSizeObserver&&(this.contentSizeObserver.disconnect(),this.contentSizeObserver=void 0),this.contentSizeObserver=new ResizeObserver((t=>{for(const i of t){if(this.pauseResizeWatcher)return;i.contentRect.height&&("top"===this.position&&(this.host.style.height=i.contentRect.height+"px"),"bottom"===this.position&&(this.host.style.minHeight=i.contentRect.height+"px"))}})),this.contentSizeObserver.observe(this.content))}quietModeChange(){"on"===this.quietMode?requestAnimationFrame((()=>this.quietModeIsOn=!0)):"off"===this.quietMode&&requestAnimationFrame((()=>this.quietModeIsOn=!1))}setOffset(){let t,i,s,e;this.trigger&&this.trigger.setAttribute("style","");const h=this.isRootSticker||this.stickToEle?this.sticker:this.host;if(!h)return;"object"==typeof this.offset?({v:t,h:i}=this.offset):t=i=this.offset,"object"==typeof this._offset?({v:t=s,h:i=e}=this._offset):s=e=this._offset;const n=s=>{const e=s.match(/(top|bottom)/)?t:i;o(s),h.style[s]=e+"px",this.host.style.setProperty("--hide-transform-amount",e?`(110% + ${e}px)`:null)},o=h=>{const n=h.match(/(top|bottom)/)?t+s:i+e;this.trigger.style[h]=-1*n+"px",this.trigger.style.position="relative",this.trigger.style.minHeight="1px",this.trigger.style.maxHeight="1px",this.trigger.style.overflow="hidden"};(this.positions.includes("start")&&this.isRtl||this.positions.includes("end")&&!this.isRtl)&&n("right"),(this.positions.includes("end")&&this.isRtl||this.positions.includes("start")&&!this.isRtl)&&n("left"),this.positions.includes("top")&&n("top"),this.positions.includes("bottom")&&n("bottom")}positionChange(){this.positions=this.position.split("-"),this.setOffset()}async stuckChange(){this.isStuck?this.stickToEle?(this.slottedContent=Array.from(this.host.children),this.slottedContent.forEach((t=>{this.stickToEle.appendChild(t),t.style.order=this.stickerIndex+""})),this.nanoStuck.emit({sticker:this.stickToEle})):this.nanoStuck.emit({sticker:this.host}):(this.scrollHide=!1,this.stickToEle?(this.slottedContent.forEach((t=>{this.host.appendChild(t),t.style.order=""})),this.nanoUnstuck.emit({sticker:this.stickToEle})):this.nanoUnstuck.emit({sticker:this.host}))}attachScrollListeners(){this.quietModeIsOn?this.scrollParent.addEventListener("scroll",this.onScroll,{passive:!0,capture:!1}):this.scrollParent&&(this.scrollParent.removeEventListener("scroll",this.onScroll),this.moveTrigger(!0))}handleParentEvents(t,i=null){this.listenForScrollParent&&(i&&this.manageListenersOnParent(!1,i),this.scrollParent&&this.manageListenersOnParent(!this.stickToEle))}stickToEleChange(t,i){this.stickToEle&&(this.stickToEle.addEventListener("nanoHide",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoShow",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoStuck",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoUnstuck",this.onStickToDisplayEvent)),i&&(i.removeEventListener("nanoHide",this.onStickToDisplayEvent),i.removeEventListener("nanoShow",this.onStickToDisplayEvent),i.removeEventListener("nanoStuck",this.onStickToDisplayEvent),i.removeEventListener("nanoUnstuck",this.onStickToDisplayEvent))}stickToChange(){this.stickToEle="string"==typeof this.stickTo?this.scrollParent.querySelector(this.stickTo):this.stickTo?this.stickTo:void 0}visibilityDecisionHandler(){this.hide=!(!this.multiStickerHide&&!this.scrollHide)}handleHideChange(){this.hide?this.nanoHide.emit({sticker:this.host}):this.nanoShow.emit({sticker:this.host})}setupIO(){if(this.io&&(this.io.disconnect(),this.io=void 0),!this.scrollParent||!this.hasBootstrapped||!this.trigger)return;this.isRootSticker=this.scrollParent instanceof Document;let t=this.scrollParent;this.scrollParent instanceof Document&&(t=null),this.io=new window.IntersectionObserver((t=>{!this.pauseResizeWatcher&&this.isSticky&&this.shouldStick(t.slice(-1)[0])}),{root:t}),this.io.observe(this.trigger)}setupParentResizeListener=()=>{if(!window.ResizeObserver)return;this.parentSizeObserver&&(this.parentSizeObserver.disconnect(),this.parentSizeObserver=void 0),this.parentSizeObserver=new ResizeObserver((t=>{for(const i of t){let t,s;i.contentRect.height&&(t=i.contentRect.height),i.contentRect.width&&(s=i.contentRect.width),"object"==typeof this.quietMode&&(this.quietModeIsOn=s<this.quietMode.w||t<this.quietMode.h),this.breakPointMin&&(this.isSticky=s>this.breakPointMin),this.breakPointMax&&(this.isSticky=s<this.breakPointMax),this.isRootSticker&&this.sticker&&this.autoResize&&(this.sticker.style.width=this.host.scrollWidth+"px")}}));const t=this.scrollParent instanceof Document?this.scrollParent.documentElement:this.scrollParent;t&&this.parentSizeObserver.observe(t)};onStickToDisplayEvent=t=>{if(t.detail.sticker===this.stickToEle)switch(t.type){case"nanoHide":this._offset=0,this.cacheOffset=this.offset,this.offset=0,this.isStuck||this.moveTrigger(!1),!this.isRootSticker&&this.quietModeIsOn&&requestAnimationFrame((()=>{this.stickToEle.style.minHeight=this.stickToEleInitSize.height+(this.host.scrollHeight+("object"==typeof this.cacheOffset?this.cacheOffset.v:this.cacheOffset))+"px",this.stickToEle.setTriggerPos(-1*this.stickToEleInitSize.height)}));break;case"nanoShow":this._offset=this.stickToEleInitSize.height,this.offset=this.cacheOffset,this.moveTrigger(!0),!this.isRootSticker&&this.quietModeIsOn&&requestAnimationFrame((()=>{this.stickToEle.style.minHeight="",this.stickToEle.setTriggerPos(0)}));break;case"nanoStuck":this.stickToEleInitSize=this.stickToEle.getBoundingClientRect(),this._offset=this.stickToEleInitSize.height}};manageListenersOnParent(t,i){const s=i||this.scrollParent;if(s){if(t)s.addEventListener("nanoStuck",this.onStickEvent),s.addEventListener("nanoUnstuck",this.onStickEvent),this.quietModeIsOn&&this.attachScrollListeners();else try{this.quietModeIsOn&&s.removeEventListener("scroll",this.onScroll),s.removeEventListener("nanoStuck",this.onStickEvent),s.removeEventListener("nanoUnstuck",this.onStickEvent)}catch(t){console.error("Events haven`t been added")}this.setupParentResizeListener()}}onStickEvent=async t=>{const i=t.detail?t.detail.sticker:null;if(!i||i.position!==this.position)return;const s=await i.getTriggerPos();if("nanoStuck"===t.type&&i!==this.host&&i.scrollParent===this.host.scrollParent){if(this.stickerIndex++,!this.hideOnNewStickers)return;(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top)&&(this.multiStickerHide=!0,this.stuckCounter++)}if("nanoUnstuck"===t.type&&i!==this.host&&i.scrollParent===this.host.scrollParent){if(this.stickerIndex--,!this.hideOnNewStickers)return;(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top)&&(this.stuckCounter--,this.stuckCounter<1&&(this.multiStickerHide=!1))}};onScroll=()=>{const t=(i=this.scrollParent)instanceof Document?window.pageYOffset:i.scrollTop;var i;t<this.scrollPosCache&&(this.positions.includes("bottom")?this.handleScrollAway(t):this.handleScrollTo()),t>this.scrollPosCache&&(this.positions.includes("bottom")?this.handleScrollTo():this.handleScrollAway(t)),this.scrollPosCache=t};handleScrollTo(){this.scrollPosThresholdCache=null,this.scrollHide&&(!0!==this.scrollingTo&&(this._offset=this.cacheOffset||this._offset),this.scrollingTo=!0,this.scrollHide=!1)}handleScrollAway(t){this.scrollHide||this.isStuck&&(!1!==this.scrollingTo&&(this.cacheOffset=this._offset,this._offset=0),this.scrollingTo=!1,this.scrollPosThresholdCache?!this.pauseHide&&Math.abs(t-this.scrollPosThresholdCache)>100&&(this.scrollHide=!0):this.scrollPosThresholdCache=t)}moveTrigger(t){this.positions.includes("bottom")&&!t||!this.positions.includes("bottom")&&t?this.host.parentNode.insertBefore(this.trigger,this.host):this.host.parentNode.insertBefore(this.trigger,this.host.nextSibling)}shouldStick(t){let i;if(this.positions.includes("top"))i=this.isRootSticker?this.trigger.getBoundingClientRect().top:c(this.trigger,this.scrollParent).top,this.isStuck=i<-1;else if(this.positions.includes("bottom")){i=this.trigger.getBoundingClientRect().top;const s=t&&t.rootBounds?t.rootBounds:(this.scrollParent instanceof Document?document.documentElement:this.scrollParent).getBoundingClientRect();this.isStuck=!t.isIntersecting||i>s.height+s.top}}bootstrapGurantor(){this.hasBootstrapped=!0;const t=this.scrollParent||o(this.host);this.scrollParent=t===document.documentElement?document:t,this.isRootSticker=this.scrollParent instanceof Document,this.trigger=this.trigger||document.createElement("div"),this.trigger.innerHTML=" ",this.trigger.classList.add("sticker-trigger"),this.positionChange(),this.moveTrigger(!0),this.quietModeChange(),this.listenForScrollParent=!0,this.handleParentEvents(!0),this.stickerIndex=Array.from(this.scrollParent.querySelectorAll(r("nano-sticker"))).filter((t=>t.position===this.position)).findIndex((t=>t===this.host)),this.setOffset(),this.stickerResizeListener(),this.setupParentResizeListener(),this.slottedContent=Array.from(this.host.children),this.slottedContent.forEach((t=>{t.style.order=this.stickerIndex+""})),this.updateTriggerOffset(),this.stickToChange(),this.setupIO(),this.onStickToDisplayEvent=n(this.onStickToDisplayEvent,50)}connectedCallback(){this.isRtl="rtl"===this.host.dir||"rtl"===this.host.ownerDocument.dir,setTimeout((()=>{this.hasBootstrapped||this.bootstrapGurantor()}),1e3)}disconnectedCallback(){this.io&&(this.io.disconnect(),this.io=void 0),this.parentSizeObserver&&(this.parentSizeObserver.disconnect(),this.parentSizeObserver=void 0),this.scrollParent=null,this.hasBootstrapped=!1}render(){return a(e,{key:"f087d54cf3135fa7ba3d089f112157797efedaf2",sticky:!this.isRootSticker&&!this.stickToEle&&this.isSticky,hide:this.hide&&this.isStuck,siblings:this.stuckCounter,index:this.stickerIndex,stuck:this.isStuck&&this.isSticky,"placed-bottom":this.positions.includes("bottom"),"placed-top":this.positions.includes("top"),"placed-end":this.positions.includes("end"),"placed-start":this.positions.includes("start"),class:"nano-sticker"},a("div",{key:"db32b41390349cec6975dfad25b6b99ddadf5758",class:{sticker:!0,sticky:this.isRootSticker&&this.isSticky,stuck:this.isStuck&&this.isRootSticker&&this.isSticky,hide:this.isRootSticker&&this.hide&&this.isStuck},ref:t=>this.sticker=t},a("div",{key:"b1e54c375552b7460fb6991f1c476bf9f73c997f",class:"sticker-content",ref:t=>this.content=t},a("slot",{key:"a2ee69ba9e39d796d832340777f61deb21c2f5d1"}))))}static get watchers(){return{trigger:["updateTriggerOffset"],scrollParent:["updateTriggerOffset","handleParentEvents","setupIO"],position:["stickerResizeListener","positionChange"],quietMode:["quietModeChange"],offset:["setOffset"],_offset:["setOffset"],isStuck:["stuckChange"],quietModeIsOn:["attachScrollListeners"],stickToEle:["handleParentEvents","stickToEleChange"],stickTo:["stickToChange"],multiStickerHide:["visibilityDecisionHandler"],scrollHide:["visibilityDecisionHandler"],hide:["handleHideChange"]}}};d.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--stuck-left:initial;--stuck-right:initial;--stuck-z-index:var(--nano-z-index-menubar);--top-hide:translateY(-110%);--bottom-hide:translateY(110%);display:block;max-inline-size:100%}:host([sticky]){position:sticky;transition:0.3s ease transform;will-change:min-block-size}:host([sticky][stuck]){inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index) !important}:host([sticky][hide][placed-top]){transform:var(--top-hide)}:host([sticky][hide][placed-bottom]){transform:var(--bottom-hide)}:host([sticky][index="1"]){z-index:calc(var(--stuck-z-index) + 1)}:host([sticky][index="2"]){z-index:calc(var(--stuck-z-index) + 2)}:host([sticky][index="3"]){z-index:calc(var(--stuck-z-index) + 3)}:host([sticky][index="4"]){z-index:calc(var(--stuck-z-index) + 4)}:host([sticky][index="5"]){z-index:calc(var(--stuck-z-index) + 5)}.sticker{display:inherit;max-inline-size:inherit;inline-size:100%}.sticker:not(.stuck){inline-size:auto !important}.sticker.sticky{transition:0.3s ease all;position:relative}:host([index="1"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 1)}:host([index="2"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 2)}:host([index="3"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 3)}:host([index="4"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 4)}:host([index="5"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 5)}.sticker.stuck{position:fixed;inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index);transform:translateY(0)}:host([placed-top]) .sticker.stuck{inset-block-start:0}:host([placed-bottom]) .sticker.stuck{inset-block-end:0}:host([placed-top]) .sticker.stuck.hide{transform:var(--top-hide)}:host([placed-bottom]) .sticker.stuck.hide{transform:var(--bottom-hide)}.sticker-content{display:flex;flex-wrap:wrap}';export{d as nano_sticker}
|
4
|
+
import{r as t,c as i,g as s,a as e}from"./index-BM3Om9WE.js";import{a as h}from"./dom-dlicJTEJ.js";import{d as n}from"./throttle-C93FMm2Z.js";import{f as o}from"./scroll-1nFw8CNk.js";import{t as r,h as a}from"./renderer-BaP2L8CT.js";function c(t,i){const s=i instanceof Document?document.documentElement:i;return h(t,s)}const d=class{constructor(s){t(this,s),this.nanoStuck=i(this,"nanoStuck",7),this.nanoUnstuck=i(this,"nanoUnstuck",7),this.nanoHide=i(this,"nanoHide",7),this.nanoShow=i(this,"nanoShow",7)}isRtl=!1;io;contentSizeObserver;parentSizeObserver;sticker;content;scrollPosCache=0;scrollPosThresholdCache=0;cacheOffset=0;slottedContent;pauseResizeWatcher=!1;listenForScrollParent=!1;stickToEleInitSize;positions=[];pauseHide=!1;hasBootstrapped=!1;get host(){return s(this)}isStuck=!1;isRootSticker=!0;hide=!1;scrollHide=!1;multiStickerHide=!1;scrollingTo=!1;quietModeIsOn=!1;stuckCounter=0;stickerIndex=0;stickToEle;triggerPos;trigger;_offset=0;autoResize=!0;isSticky=!0;offset=0;position="top";quietMode={h:600,w:600};hideOnNewStickers=!0;breakPointMax=null;breakPointMin=null;scrollParent;stickTo;nanoStuck;nanoUnstuck;nanoHide;nanoShow;async isHiding(){return this.hide}async isSticking(){return this.shouldStick(),this.isStuck}async setTriggerPos(t){return this._offset=t}async getTriggerPos(){return this.triggerPos}async pauseHiding(t){this.pauseHide=t}updateTriggerOffset(){this.trigger&&this.scrollParent&&this.listenForScrollParent&&(this.triggerPos=c(this.trigger,this.scrollParent))}stickerResizeListener(){this.content&&window.ResizeObserver&&(this.contentSizeObserver&&(this.contentSizeObserver.disconnect(),this.contentSizeObserver=void 0),this.contentSizeObserver=new ResizeObserver((t=>{for(const i of t){if(this.pauseResizeWatcher)return;i.contentRect.height&&("top"===this.position&&(this.host.style.height=i.contentRect.height+"px"),"bottom"===this.position&&(this.host.style.minHeight=i.contentRect.height+"px"))}})),this.contentSizeObserver.observe(this.content))}quietModeChange(){"on"===this.quietMode?requestAnimationFrame((()=>this.quietModeIsOn=!0)):"off"===this.quietMode&&requestAnimationFrame((()=>this.quietModeIsOn=!1))}setOffset(){let t,i,s,e;this.trigger&&this.trigger.setAttribute("style","");const h=this.isRootSticker||this.stickToEle?this.sticker:this.host;if(!h)return;"object"==typeof this.offset?({v:t,h:i}=this.offset):t=i=this.offset,"object"==typeof this._offset?({v:t=s,h:i=e}=this._offset):s=e=this._offset;const n=s=>{const e=s.match(/(top|bottom)/)?t:i;o(s),h.style[s]=e+"px",this.host.style.setProperty("--hide-transform-amount",e?`(110% + ${e}px)`:null)},o=h=>{const n=h.match(/(top|bottom)/)?t+s:i+e;this.trigger.style[h]=-1*n+"px",this.trigger.style.position="relative",this.trigger.style.minHeight="1px",this.trigger.style.maxHeight="1px",this.trigger.style.overflow="hidden"};(this.positions.includes("start")&&this.isRtl||this.positions.includes("end")&&!this.isRtl)&&n("right"),(this.positions.includes("end")&&this.isRtl||this.positions.includes("start")&&!this.isRtl)&&n("left"),this.positions.includes("top")&&n("top"),this.positions.includes("bottom")&&n("bottom")}positionChange(){this.positions=this.position.split("-"),this.setOffset()}async stuckChange(){this.isStuck?this.stickToEle?(this.slottedContent=Array.from(this.host.children),this.slottedContent.forEach((t=>{this.stickToEle.appendChild(t),t.style.order=this.stickerIndex+""})),this.nanoStuck.emit({sticker:this.stickToEle})):this.nanoStuck.emit({sticker:this.host}):(this.scrollHide=!1,this.stickToEle?(this.slottedContent.forEach((t=>{this.host.appendChild(t),t.style.order=""})),this.nanoUnstuck.emit({sticker:this.stickToEle})):this.nanoUnstuck.emit({sticker:this.host}))}attachScrollListeners(){this.quietModeIsOn?this.scrollParent.addEventListener("scroll",this.onScroll,{passive:!0,capture:!1}):this.scrollParent&&(this.scrollParent.removeEventListener("scroll",this.onScroll),this.moveTrigger(!0))}handleParentEvents(t,i=null){this.listenForScrollParent&&(i&&this.manageListenersOnParent(!1,i),this.scrollParent&&this.manageListenersOnParent(!this.stickToEle))}stickToEleChange(t,i){this.stickToEle&&(this.stickToEle.addEventListener("nanoHide",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoShow",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoStuck",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoUnstuck",this.onStickToDisplayEvent)),i&&(i.removeEventListener("nanoHide",this.onStickToDisplayEvent),i.removeEventListener("nanoShow",this.onStickToDisplayEvent),i.removeEventListener("nanoStuck",this.onStickToDisplayEvent),i.removeEventListener("nanoUnstuck",this.onStickToDisplayEvent))}stickToChange(){this.stickToEle="string"==typeof this.stickTo?this.scrollParent.querySelector(this.stickTo):this.stickTo?this.stickTo:void 0}visibilityDecisionHandler(){this.hide=!(!this.multiStickerHide&&!this.scrollHide)}handleHideChange(){this.hide?this.nanoHide.emit({sticker:this.host}):this.nanoShow.emit({sticker:this.host})}setupIO(){if(this.io&&(this.io.disconnect(),this.io=void 0),!this.scrollParent||!this.hasBootstrapped||!this.trigger)return;this.isRootSticker=this.scrollParent instanceof Document;let t=this.scrollParent;this.scrollParent instanceof Document&&(t=null),this.io=new window.IntersectionObserver((t=>{!this.pauseResizeWatcher&&this.isSticky&&this.shouldStick(t.slice(-1)[0])}),{root:t}),this.io.observe(this.trigger)}setupParentResizeListener=()=>{if(!window.ResizeObserver)return;this.parentSizeObserver&&(this.parentSizeObserver.disconnect(),this.parentSizeObserver=void 0),this.parentSizeObserver=new ResizeObserver((t=>{for(const i of t){let t,s;i.contentRect.height&&(t=i.contentRect.height),i.contentRect.width&&(s=i.contentRect.width),"object"==typeof this.quietMode&&(this.quietModeIsOn=s<this.quietMode.w||t<this.quietMode.h),this.breakPointMin&&(this.isSticky=s>this.breakPointMin),this.breakPointMax&&(this.isSticky=s<this.breakPointMax),this.isRootSticker&&this.sticker&&this.autoResize&&(this.sticker.style.width=this.host.scrollWidth+"px")}}));const t=this.scrollParent instanceof Document?this.scrollParent.documentElement:this.scrollParent;t&&this.parentSizeObserver.observe(t)};onStickToDisplayEvent=t=>{if(t.detail.sticker===this.stickToEle)switch(t.type){case"nanoHide":this._offset=0,this.cacheOffset=this.offset,this.offset=0,this.isStuck||this.moveTrigger(!1),!this.isRootSticker&&this.quietModeIsOn&&requestAnimationFrame((()=>{this.stickToEle.style.minHeight=this.stickToEleInitSize.height+(this.host.scrollHeight+("object"==typeof this.cacheOffset?this.cacheOffset.v:this.cacheOffset))+"px",this.stickToEle.setTriggerPos(-1*this.stickToEleInitSize.height)}));break;case"nanoShow":this._offset=this.stickToEleInitSize.height,this.offset=this.cacheOffset,this.moveTrigger(!0),!this.isRootSticker&&this.quietModeIsOn&&requestAnimationFrame((()=>{this.stickToEle.style.minHeight="",this.stickToEle.setTriggerPos(0)}));break;case"nanoStuck":this.stickToEleInitSize=this.stickToEle.getBoundingClientRect(),this._offset=this.stickToEleInitSize.height}};manageListenersOnParent(t,i){const s=i||this.scrollParent;if(s){if(t)s.addEventListener("nanoStuck",this.onStickEvent),s.addEventListener("nanoUnstuck",this.onStickEvent),this.quietModeIsOn&&this.attachScrollListeners();else try{this.quietModeIsOn&&s.removeEventListener("scroll",this.onScroll),s.removeEventListener("nanoStuck",this.onStickEvent),s.removeEventListener("nanoUnstuck",this.onStickEvent)}catch(t){console.error("Events haven`t been added")}this.setupParentResizeListener()}}onStickEvent=async t=>{const i=t.detail?t.detail.sticker:null;if(!i||i.position!==this.position)return;const s=await i.getTriggerPos();if("nanoStuck"===t.type&&i!==this.host&&i.scrollParent===this.host.scrollParent){if(this.stickerIndex++,!this.hideOnNewStickers)return;(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top)&&(this.multiStickerHide=!0,this.stuckCounter++)}if("nanoUnstuck"===t.type&&i!==this.host&&i.scrollParent===this.host.scrollParent){if(this.stickerIndex--,!this.hideOnNewStickers)return;(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top)&&(this.stuckCounter--,this.stuckCounter<1&&(this.multiStickerHide=!1))}};onScroll=()=>{const t=(i=this.scrollParent)instanceof Document?window.pageYOffset:i.scrollTop;var i;t<this.scrollPosCache&&(this.positions.includes("bottom")?this.handleScrollAway(t):this.handleScrollTo()),t>this.scrollPosCache&&(this.positions.includes("bottom")?this.handleScrollTo():this.handleScrollAway(t)),this.scrollPosCache=t};handleScrollTo(){this.scrollPosThresholdCache=null,this.scrollHide&&(!0!==this.scrollingTo&&(this._offset=this.cacheOffset||this._offset),this.scrollingTo=!0,this.scrollHide=!1)}handleScrollAway(t){this.scrollHide||this.isStuck&&(!1!==this.scrollingTo&&(this.cacheOffset=this._offset,this._offset=0),this.scrollingTo=!1,this.scrollPosThresholdCache?!this.pauseHide&&Math.abs(t-this.scrollPosThresholdCache)>100&&(this.scrollHide=!0):this.scrollPosThresholdCache=t)}moveTrigger(t){this.positions.includes("bottom")&&!t||!this.positions.includes("bottom")&&t?this.host.parentNode.insertBefore(this.trigger,this.host):this.host.parentNode.insertBefore(this.trigger,this.host.nextSibling)}shouldStick(t){let i;if(this.positions.includes("top"))i=this.isRootSticker?this.trigger.getBoundingClientRect().top:c(this.trigger,this.scrollParent).top,this.isStuck=i<-1;else if(this.positions.includes("bottom")){i=this.trigger.getBoundingClientRect().top;const s=t&&t.rootBounds?t.rootBounds:(this.scrollParent instanceof Document?document.documentElement:this.scrollParent).getBoundingClientRect();this.isStuck=!t.isIntersecting||i>s.height+s.top}}bootstrapGurantor(){this.hasBootstrapped=!0;const t=this.scrollParent||o(this.host);this.scrollParent=t===document.documentElement?document:t,this.isRootSticker=this.scrollParent instanceof Document,this.trigger=this.trigger||document.createElement("div"),this.trigger.innerHTML=" ",this.trigger.classList.add("sticker-trigger"),this.positionChange(),this.moveTrigger(!0),this.quietModeChange(),this.listenForScrollParent=!0,this.handleParentEvents(!0),this.stickerIndex=Array.from(this.scrollParent.querySelectorAll(r("nano-sticker"))).filter((t=>t.position===this.position)).findIndex((t=>t===this.host)),this.setOffset(),this.stickerResizeListener(),this.setupParentResizeListener(),this.slottedContent=Array.from(this.host.children),this.slottedContent.forEach((t=>{t.style.order=this.stickerIndex+""})),this.updateTriggerOffset(),this.stickToChange(),this.setupIO(),this.onStickToDisplayEvent=n(this.onStickToDisplayEvent,50)}connectedCallback(){this.isRtl="rtl"===this.host.dir||"rtl"===this.host.ownerDocument.dir,setTimeout((()=>{this.hasBootstrapped||this.bootstrapGurantor()}),1e3)}disconnectedCallback(){this.io&&(this.io.disconnect(),this.io=void 0),this.parentSizeObserver&&(this.parentSizeObserver.disconnect(),this.parentSizeObserver=void 0),this.scrollParent=null,this.hasBootstrapped=!1}render(){return a(e,{key:"f087d54cf3135fa7ba3d089f112157797efedaf2",sticky:!this.isRootSticker&&!this.stickToEle&&this.isSticky,hide:this.hide&&this.isStuck,siblings:this.stuckCounter,index:this.stickerIndex,stuck:this.isStuck&&this.isSticky,"placed-bottom":this.positions.includes("bottom"),"placed-top":this.positions.includes("top"),"placed-end":this.positions.includes("end"),"placed-start":this.positions.includes("start"),class:"nano-sticker"},a("div",{key:"db32b41390349cec6975dfad25b6b99ddadf5758",class:{sticker:!0,sticky:this.isRootSticker&&this.isSticky,stuck:this.isStuck&&this.isRootSticker&&this.isSticky,hide:this.isRootSticker&&this.hide&&this.isStuck},ref:t=>this.sticker=t},a("div",{key:"b1e54c375552b7460fb6991f1c476bf9f73c997f",class:"sticker-content",ref:t=>this.content=t},a("slot",{key:"a2ee69ba9e39d796d832340777f61deb21c2f5d1"}))))}static get watchers(){return{trigger:["updateTriggerOffset"],scrollParent:["updateTriggerOffset","handleParentEvents","setupIO"],position:["stickerResizeListener","positionChange"],quietMode:["quietModeChange"],offset:["setOffset"],_offset:["setOffset"],isStuck:["stuckChange"],quietModeIsOn:["attachScrollListeners"],stickToEle:["handleParentEvents","stickToEleChange"],stickTo:["stickToChange"],multiStickerHide:["visibilityDecisionHandler"],scrollHide:["visibilityDecisionHandler"],hide:["handleHideChange"]}}};d.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--stuck-left:initial;--stuck-right:initial;--stuck-z-index:var(--nano-z-index-menubar);--top-hide:translateY(-110%);--bottom-hide:translateY(110%);display:block;max-inline-size:100%}:host([sticky]){position:sticky;transition:0.3s ease transform;will-change:min-block-size}:host([sticky][stuck]){inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index) !important}:host([sticky][hide][placed-top]){transform:var(--top-hide)}:host([sticky][hide][placed-bottom]){transform:var(--bottom-hide)}:host([sticky][index="1"]){z-index:calc(var(--stuck-z-index) + 1)}:host([sticky][index="2"]){z-index:calc(var(--stuck-z-index) + 2)}:host([sticky][index="3"]){z-index:calc(var(--stuck-z-index) + 3)}:host([sticky][index="4"]){z-index:calc(var(--stuck-z-index) + 4)}:host([sticky][index="5"]){z-index:calc(var(--stuck-z-index) + 5)}.sticker{display:inherit;max-inline-size:inherit;inline-size:100%}.sticker:not(.stuck){inline-size:auto !important}.sticker.sticky{transition:0.3s ease all;position:relative}:host([index="1"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 1)}:host([index="2"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 2)}:host([index="3"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 3)}:host([index="4"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 4)}:host([index="5"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 5)}.sticker.stuck{position:fixed;inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index);transform:translateY(0)}:host([placed-top]) .sticker.stuck{inset-block-start:0}:host([placed-bottom]) .sticker.stuck{inset-block-end:0}:host([placed-top]) .sticker.stuck.hide{transform:var(--top-hide)}:host([placed-bottom]) .sticker.stuck.hide{transform:var(--bottom-hide)}.sticker-content{display:flex;flex-wrap:wrap}';export{d as nano_sticker}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{r as t,g as a,a as n}from"./index-
|
4
|
+
import{r as t,g as a,a as n}from"./index-BM3Om9WE.js";import{h as e}from"./renderer-BaP2L8CT.js";let o=0;const i=class{constructor(a){t(this,a)}tabContentId="nano-tab-content-"+ ++o;ready=!1;get host(){return a(this)}name="";active=!1;componentDidLoad(){requestAnimationFrame((()=>this.ready=!0))}render(){return e(n,{key:"f182a99dab031220a40b2c5125d3229b8bacca1c",id:this.host.id||this.tabContentId,style:{display:this.active?"block":"none"},role:"tabpanel","aria-hidden":this.active?"false":"true",class:{ready:this.ready,"nano-tab-content":!0}},e("div",{key:"47b383859162b6a64518273a9057464de1d37479",part:"base",class:"nano-tab-content"},e("slot",{key:"3f908fec081c956f9ffd8d7de5e0f45b5e193a8c"})))}};i.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{display:block;opacity:1;animation:opacity 0.3s ease-in-out forwards;animation-duration:0s !important}:host(.ready){animation-duration:0.3s !important}@media only screen and (width <= 768px){:host([animation-dir=left]){animation:slide-right 0.3s ease-in-out;opacity:1}:host([animation-dir=right]){animation:slide-left 0.3s ease-in-out;opacity:1}}.nano-tab-content{position:relative}@keyframes opacity{0%{opacity:0}100%{opacity:1}}@keyframes slide-left{0%{transform:translate3d(-100%, 0, 0)}50%{transform:translate3d(0%) translate3d(-0.9em)}100%{transform:translate3d(0, 0, 0)}}@keyframes slide-right{0%{transform:translate3d(100%, 0, 0)}50%{transform:translateX(0%) translate3d(0.9em)}100%{transform:translate3d(0, 0, 0)}}@media (prefers-reduced-motion: reduce){*{animation:none !important}}";export{i as nano_tab_content}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{r as t,c as i,g as o,j as s,a as r}from"./index-
|
4
|
+
import{r as t,c as i,g as o,j as s,a as r}from"./index-BM3Om9WE.js";import{g as a}from"./dom-dlicJTEJ.js";import{C as n}from"./component-store-JYVuxwvK.js";import{t as e,h}from"./renderer-BaP2L8CT.js";import"./throttle-C93FMm2Z.js";let l=0;const d=class{constructor(o){t(this,o),this.nanoTabShow=i(this,"nanoTabShow",7),this.nanoTabHide=i(this,"nanoTabHide",7),this.nanoTabWillClose=i(this,"nanoTabWillClose",7),this.nanoTabClose=i(this,"nanoTabClose",7)}baseId="nano-tab-group-"+ ++l;activeTab;activePanel;isRtl;initialTouchX=null;initialTouchY=null;init=!0;_tab;get tab(){return this._tab}set tab(t){if(this.activeTab&&this.activeTab.panel===this._tab)return;const i=this.getAllActiveTabs.find((i=>i.panel===t));i&&(!this.init&&this.storeId&&n.update(this.storeId),this._tab=t,this.setActiveTab(i))}get host(){return o(this)}placement="top";noScrollControls=!1;equalTabSize=!1;size;storeId;storeMethod="url-hash";disableSwipe;nanoTabShow;nanoTabHide;nanoTabWillClose;nanoTabClose;async show(t){if(this.activeTab&&this.activeTab.panel===t)return;const i=this.getAllActiveTabs.find((i=>i.panel===t));i&&this.setActiveTab(i)}get getAllActiveTabs(){return this.getAllTabs.filter((t=>!t.disabled))}get getAllTabs(){return a(this.host,e("nano-tab"))}get getAllPanels(){return a(this.host,e("nano-tab-content"))}get getActiveTab(){return this.getAllActiveTabs.find((t=>t.active))}setActiveTab(t,i=!0){if(t&&t!==this.activeTab&&!t.disabled&&this.getAllActiveTabs.includes(t)){const o=this.activeTab;this.activeTab=t,this.tab=t.panel,this.getAllActiveTabs.map((t=>t.active=t===this.activeTab)),this.getAllPanels.map((t=>{t.name===this.activeTab.panel?(t.active=!0,this.activePanel=t):t.active=!1,t.removeAttribute("animation-dir")})),i&&(o&&this.nanoTabHide.emit({name:o.panel}),this.nanoTabShow.emit({name:this.activeTab.panel}))}}setAriaLabels(){const t=this.getAllPanels;this.getAllActiveTabs.map(((i,o)=>{const s=t.find((t=>t.name===i.panel));s&&(s.id||(s.id=`${this.baseId}-panel-${o}`),i.id||(i.id=`${this.baseId}-tab-${o}`),i.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",i.id))}))}handleTabClose(t){let i=this.getAllActiveTabs.indexOf(t.target);const o=t.target;if(i<0)return;const r=this.getAllPanels.find((t=>t.name===o.panel));if(r&&(t.stopImmediatePropagation(),!this.nanoTabWillClose.emit({name:o.panel}).defaultPrevented)){if(o.active){i=0===i?1:i-1;const t=this.getAllActiveTabs[i]?.panel;t&&this.host.show(t)}o.remove(),r.remove(),this.nanoTabClose.emit({name:o.panel}),s(this.host)}}handleClick=t=>{const i=t.target.closest(e("nano-tab"));i&&this.setActiveTab(i)};handleKeyDown=t=>{const i=document.activeElement;if(!i||i.tagName.toLowerCase()!==e("nano-tab"))return;if(["Enter"," "].includes(t.key)){const i=t.target.closest(e("nano-tab"));i&&(this.setActiveTab(i),t.preventDefault(),t.stopPropagation())}if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key))return;const o=this.getAllActiveTabs;let s=o.indexOf(i);"Home"===t.key&&(s=0),"End"===t.key&&(s=o.length-1),"top"===this.placement&&((this.isRtl&&"ArrowRight"===t.key||!this.isRtl&&"ArrowLeft"===t.key)&&(s=Math.max(0,s-1)),(this.isRtl&&"ArrowLeft"===t.key||!this.isRtl&&"ArrowRight"===t.key)&&(s=Math.min(o.length-1,s+1))),"start"===this.placement&&("ArrowUp"===t.key&&(s=Math.max(0,s-1)),"ArrowDown"===t.key&&(s=Math.min(o.length-1,s+1))),o[s].setFocus(),t.stopPropagation(),t.preventDefault()};handleTouchStart=t=>{if(this.disableSwipe)return;const i=t.changedTouches[0];this.initialTouchX=i.pageX,this.initialTouchY=i.pageY};handleTouchEnd=t=>{if(this.disableSwipe)return;const i=t.changedTouches[0],o=i.pageX-this.initialTouchX,s=this.initialTouchX-i.clientX,r=this.initialTouchY-i.clientY,a=Math.abs(o)>=70&&Math.abs(r)<=50,n=this.getAllActiveTabs,e=n.findIndex((t=>t.active));if(a){const t=o<0&&"top"===this.placement||o>0&&"top"!==this.placement?1:-1;n[e+t]&&(this.setActiveTab(n[e+t]),Math.abs(s)>Math.abs(r)&&this.activePanel.setAttribute("animation-dir",s>0?"left":"right"))}this.initialTouchX=null,this.initialTouchY=null};handleContentSlotChange=()=>{setTimeout((()=>{this.setAriaLabels(),this.setActiveTab(this.getActiveTab||this.getAllActiveTabs[0],!1)}))};handleTabSlotChange=()=>{setTimeout((()=>{this.setAriaLabels(),this.setActiveTab(this.getActiveTab||this.getAllActiveTabs[0],!1)}),500)};componentWillLoad(){this.init=!0}componentDidLoad(){new IntersectionObserver(((t,i)=>{if(t[0].intersectionRatio>0){if(this.setAriaLabels(),this.storeId){n.init(this,["tab"],this.storeMethod,this.storeId);const t=n.get(this.storeId),i=t.retrieve()?.tab;i&&i!==t.initialState?.tab&&this.getAllActiveTabs.forEach((t=>{t.active=t.panel===i}))}this.setActiveTab(this.getActiveTab||this.getAllActiveTabs[0],!1),i.unobserve(t[0].target),this.init=!1}})).observe(this.host)}connectedCallback(){this.isRtl="rtl"===this.host.dir||"rtl"===this.host.ownerDocument.dir}render(){if(this.isRtl="rtl"===this.host.ownerDocument.dir,0!==this.getAllTabs.length)return h(r,{dir:this.isRtl?"rtl":null,class:"nano-tab-group"},h("div",{part:"base",class:{group:!0,"group--top":"top"===this.placement,"group--start":"start"===this.placement},onClick:this.handleClick,onKeyDown:this.handleKeyDown},h("nano-masked-overflow",{role:"navigation",class:"group__tabs",part:"tabs__wrapper",exportparts:"items:tabs, scroll-button:tabs__scroll-button, indicator:active-tab-indicator",orientation:"top"===this.placement?"horizontal":"vertical",isActiveHandler:t=>this.activeTab===t,scrollControls:!this.noScrollControls,hideScrollbars:!0},h("slot",{name:"tabs",onSlotchange:this.handleTabSlotChange}),h("div",{class:"group__tabs-border"})),h("div",{part:"body",class:"group__body",onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},h("slot",{onSlotchange:this.handleContentSlotChange}))))}};d.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--border:2px solid var(--nano-color-neutral-300);--indicator-transition:var(--nano-transition-fast);--indicator-color:var(--nano-color-primary-1000);--indicator-track-color:var(--nano-color-neutral-300);--indicator-size:0;--tab-spacing:var(--nano-spacing-md);--content-spacing:var(--nano-spacing-l1-default);display:block;position:relative;z-index:var(--nano-z-index-raised)}.group{display:flex;border-radius:0;inline-size:100%;flex:inherit}:host([equal-tab-size]) .group__tabs-border,.group__tabs[has-scroll-controls] .group__tabs-border{display:none}.group__tabs::part(items){gap:var(--tab-spacing)}.group--top{flex-direction:column}.group--top .group__tabs{--fade-size:100px}.group--top .group__tabs::part(items){align-items:flex-end}.group--top .group__tabs-border{flex:1;border-block-end:var(--border)}.group--top .group__body{order:2;position:relative;flex:1 1 auto;border-block-end:var(--border);padding-block:var(--content-spacing)}.group--start{flex-direction:row}:host([equal-tab-size]) .group--start .group__tabs::part(items){display:grid;grid-auto-rows:1fr}.group--start .group__tabs-border{flex:1;border-inline-end:var(--border)}.group--start .group__body{flex:1 1 auto;order:2;overflow:hidden;padding-inline-start:var(--content-spacing)}";export{d as nano_tab_group}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{r as a,c as o,g as e,a as t}from"./index-
|
4
|
+
import{r as a,c as o,g as e,a as t}from"./index-BM3Om9WE.js";import{h as r}from"./renderer-BaP2L8CT.js";let n=0;const i=class{constructor(e){a(this,e),this.nanoTabClose=o(this,"nanoTabClose",7)}tabId="nano-tab-"+ ++n;tab;get host(){return e(this)}panel="";active=!1;disabled=!1;closable=!1;nanoTabClose;async setFocus(){this.tab.focus({preventScroll:!0})}async removeFocus(){this.tab.blur()}handleCloseClick=()=>{this.nanoTabClose.emit()};handleCloseKeydown=a=>{" "===a.key&&(a.preventDefault(),this.handleCloseClick())};render(){return r(t,{key:"7eca94a330509cbd3c6d232444fbcde422b755a6",id:this.host.id||this.tabId,role:"tab","aria-disabled":this.disabled?"true":"false","aria-selected":this.active?"true":"false",class:"nano-tab"},r("div",{key:"fca6ace8b5fc9c0142fcd04d70cb475323d8ef9d",part:`base${this.active?" base--active":""}${this.disabled?" base--disabled":""}${this.closable?" base--closable":""}`,class:{tab:!0,"tab--active":this.active,"tab--disabled":this.disabled,"tab--closable":this.closable}},r("slot",{key:"3693ff8719b24c34db9018941daab7c840434502",name:"start"}),r("div",{key:"c792fce22a28175e32f7e0b23a1a62f799016c76",part:"label",ref:a=>this.tab=a,tabindex:this.disabled||!this.active?"-1":"0",class:"tab__label"},r("slot",{key:"76b725cd050993d377bf5c7208ce5b7fdf224136"})),r("slot",{key:"f7bd50a43bb64b67b2ce181bf9215ada4c0ccd12",name:"end"}),this.closable&&!this.disabled&&r("nano-icon-button",{key:"96f6bddd3dee12d2e8adeb7a59f98d0cfe8b9c82",label:"Close this tab",iconName:"light/xmark",class:"tab__close-button",onClick:this.handleCloseClick,onKeyDown:this.handleCloseKeydown,part:"close-button"})))}};i.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--border:2px solid var(--nano-color-neutral-300);--border-hover-color:var(--nano-color-primary-700);--border-active-color:var(--nano-color-primary-1000);--text-hover-color:var(--nano-color-primary-1000);--text-active-color:var(--nano-color-primary-1000);--padding:var(--nano-spacing-md);font-size:var(--nano-font-size-sm);line-height:var(--nano-line-height-normal);letter-spacing:var(--nano-letter-spacing-loose);display:inline-block;cursor:pointer;color:var(--nano-color-neutral-1400);border:var(--border);border-inline-end-width:0;border-inline-start-width:0;border-block-start-width:0;border-block-end:var(--border)}:host(:not([disabled]):hover){border-color:var(--border-hover-color);color:var(--text-hover-color)}:host(:not([disabled]):active),:host([active]){border-color:var(--border-active-color);color:var(--text-active-color)}:host(.nano-sortable__dragged){background:var(--nano-color-base-0);opacity:0.9 !important;box-shadow:var(--nano-shadow-l0) !important}.tab{padding:var(--padding);display:flex;white-space:nowrap;align-items:center;position:relative;gap:var(--nano-spacing-sm);justify-content:center}.tab.tab--disabled{opacity:0.5;cursor:not-allowed}.tab.tab--closable{padding-inline-end:calc(var(--padding) - var(--nano-spacing-sm))}.tab ::slotted(*),.tab::slotted(*){display:flex;align-items:center}.tab ::slotted(.nano-sortable__keyboard-handle){position:absolute;inset-inline-end:-1em;z-index:1}.tab:not(.tab--disabled):has(.tab__label:focus-visible){outline:var(--nano-focus-ring);outline-offset:-3px}.tab__label{display:flex;flex-direction:column;gap:var(--nano-spacing-sm);align-items:center}.tab__label:focus{outline:none}.tab__close-button{color:var(--nano-color-primary-1200);--hover-color:var(--nano-color-primary-700)}";export{i as nano_tab}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{g as t,r as e,a as o}from"./index-
|
4
|
+
import{g as t,r as e,a as o}from"./index-BM3Om9WE.js";import{d as n}from"./throttle-C93FMm2Z.js";import{t as s,h as a}from"./renderer-BaP2L8CT.js";const i=class{get host(){return t(this)}propsReady=!1;compact="auto";handleCompactChange(){this.setupProperties()}scrollable=!0;hideCaption=!1;handleHideCaptionChange(){const t=this.caption;t&&t.classList.toggle("visually-hidden",this.hideCaption)}resizeObserver;mutationObserver;intersectionObserver;settingUp=!1;get table(){return this.host.querySelector("table")}get caption(){return this.host.querySelector("caption")||(console.error("nano-table: No caption found. For better a11y, please add a <caption> element to the table."),null)}setupProperties=()=>{const t=this.table;if(!t||this.settingUp)return;this.settingUp=!0;const e=Array.from(this.host.querySelectorAll("tr"));for(const t of e)1===this.getRowClickElements(t).length?(t.setAttribute("clickable","true"),t.addEventListener("click",this.rowClickHandler)):(t.removeAttribute("clickable"),t.removeEventListener("click",this.rowClickHandler));const o=t.querySelectorAll("thead, tbody, tfoot");let n=0;if(t.querySelector("[sticky=start], [sticky=end]")){for(const t of o)t.style.setProperty("--section-height",`${t.offsetHeight}px`);const t=Array.from(this.host.querySelectorAll("thead th, thead td"));for(const e of t)e.matches("[sticky=start]")&&(this.makeCellsSticky(e,"start",n),n>0&&e.style.setProperty("--sticky-start",`${n}px`),n+=e.offsetWidth-1);n=0;for(const e of[...t].reverse())e.matches("[sticky=end]")&&(this.makeCellsSticky(e,"end",n),n>0&&e.style.setProperty("--sticky-end",`${n}px`),n+=e.offsetWidth-1)}if(t.querySelector("[sticky=top]")){n=0;for(const t of o){const e=Array.from(t.querySelectorAll("tr[sticky]"));for(const[t,o]of e.entries())o.matches("[sticky=top]")&&n>0&&o.style.setProperty("--sticky-top",`${n}px`),t===e.length-1&&(n+=o.offsetHeight-1)}}this.settingUp=!1,this.propsReady=!0};getRowClickElements(t){const e=t.querySelectorAll("a"),o=t.querySelectorAll("button"),n=Array.from(t.querySelectorAll('input[type="checkbox"]')).filter((t=>!t.closest("nano-checkbox"))),s=Array.from(t.querySelectorAll('input[type="radio"]')).filter((t=>!t.closest("nano-checkbox")));return[...e,...o,...t.querySelectorAll("nano-checkbox"),...n,...s]}rowClickHandler=t=>{const e=t.target,o=e.closest("tr");if(!o)return;const n=this.getRowClickElements(o);1===n.length&&e.closest(n[0].tagName)!==n[0]&&n[0].click()};makeCellsSticky(t,e,o=0){const n=t.closest("table"),s=t.closest("tr"),a=Array.from(s.cells);let i=0;for(const e of a){if(e===t)break;i+=e.colSpan||1}for(const t of n.tBodies)for(const n of t.rows){let t=0;for(const s of n.cells){const n=s.colSpan||1;if(t<=i&&i<t+n){s.setAttribute("sticky",e),o>0&&s.style.setProperty("--sticky-"+e,`${o}px`);break}t+=n}}}addObservers(){this.resizeObserver=new ResizeObserver((()=>{this.setupProperties()})),this.resizeObserver.observe(this.host),this.mutationObserver=new MutationObserver((()=>{this.setupProperties()}));const t=this.table;this.mutationObserver.observe(t,{childList:!0,subtree:!0}),this.intersectionObserver=new IntersectionObserver((()=>{this.setupProperties(),this.intersectionObserver.disconnect()}),{threshold:1}),this.intersectionObserver.observe(t)}cleanUpObservers(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null)}constructor(t){e(this,t),this.setupProperties=n(this.setupProperties,100)}connectedCallback(){this.addObservers(),this.handleHideCaptionChange()}componentDidRender(){!1!==this.scrollable&&this.table&&customElements.whenDefined(s("nano-masked-overflow")).then((()=>{this.host.querySelector(".nano-table__overflow")?.appendChild(this.table)}))}disconnectedCallback(){this.cleanUpObservers()}render(){return a(o,{key:"61967ae8d9228be1374d9a4ee4e08b286cd4dd57",class:{"nano-table":!0,"nano-table--props-ready":this.propsReady}},this.scrollable&&a("nano-masked-overflow",{key:"eca1991383ebca49f6032066078f02b62c839d6c",hideScrollbars:!1,scrollControls:!1,label:this.caption?.textContent||void 0,class:"nano-table__overflow-container"},a("div",{key:"f3bcb6830439858393c1eda96d68c2c5ccadd15a",class:"nano-table__overflow"})),a("slot",{key:"7662741dcb672f75bae03c16b5745ff4946f12f7"}))}static get watchers(){return{compact:["handleCompactChange"],hideCaption:["handleHideCaptionChange"]}}};i.style=".sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{box-sizing:border-box}[hidden].sc-nano-table{display:none !important}@media (prefers-reduced-motion: reduce){.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{box-sizing:border-box}[hidden].sc-nano-table{display:none !important}@media (prefers-reduced-motion: reduce){.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}";export{i as nano_table}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{F as t,u as i,U as s}from"./nano-slides-
|
4
|
+
import{F as t,u as i,U as s}from"./nano-slides-DcJWApi6.js";import"./index-BM3Om9WE.js";import"./renderer-BaP2L8CT.js";function h(t){this.parent=t,this.parentElement=this.parent.element.shadowRoot||this.parent.element,this._create()}(h.prototype=Object.create(s.prototype))._create=function(){this.holder=document.createElement("div"),this.holder.className="flickity-page-dots",this.holder.part.add("pagination"),this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},h.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parentElement.appendChild(this.holder)},h.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parentElement.removeChild(this.holder)},h.prototype.setDots=function(){const t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},h.prototype.addDots=function(t){const i=document.createDocumentFragment(),s=[],h=this.dots.length,n=h+t;for(let t=h;t<n;t++){const h=document.createElement("button");h.classList.add("dot"),h.innerText=`Go to slide ${t+1}`,i.appendChild(h),s.push(h)}this.holder.appendChild(i),this.dots=this.dots.concat(s)},h.prototype.removeDots=function(t){this.dots.splice(this.dots.length-t,t).forEach((function(t){this.holder.removeChild(t)}),this)},h.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.classList.remove("is-selected"),this.selectedDot.part.remove("pagination-item--active"),this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.classList.add("is-selected"),this.selectedDot.part.add("pagination-item--active"),this.selectedDot.setAttribute("aria-current","step"))},h.prototype.onTap=h.prototype.onClick=function(t){const i=t.target;if("BUTTON"!=i.nodeName)return;this.parent.uiChange();const s=this.dots.indexOf(i);this.parent.select(s)},h.prototype.destroy=function(){this.deactivate(),this.allOff()},t.PageDots=h,i.extend(t.defaults,{pageDots:!0}),t.createMethods.push("_createPageDots");const n=t.prototype;n._createPageDots=function(){this.options.pageDots&&(this.pageDots=new h(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},n.activatePageDots=function(){this.pageDots.activate()},n.updateSelectedPageDots=function(){this.pageDots.updateSelected()},n.updatePageDots=function(){this.pageDots.setDots()},n.deactivatePageDots=function(){this.pageDots.deactivate()},t.PageDots=h;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{h as n}from"./index-
|
4
|
+
import{h as n}from"./index-BM3Om9WE.js";const t=["nano-avatar","nano-badge","nano-card","nano-cta","nano-icon-item","nano-tag","nano-content-links"];function o(n){return r&&n.startsWith("nano-")&&!t.includes(n)?`${r}-${n}`:n}function a(...t){const a=t[0];if(!a||"string"!=typeof a||!r)return n(...t);let e=a;"string"==typeof a&&(e=o(a));const i=t.slice(2);return n(e,t[1],i)}let r="";function e(n){return r=n,o}function i(){return r}a||(a={});export{i as g,a as h,e as s,o as t}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{a as t}from"./dom-
|
4
|
+
import{a as t}from"./dom-dlicJTEJ.js";const o=new Set;function n(t){if(o.add(t),document.documentElement.classList.contains("nano-scroll-lock"))return;const n=function(){const t=document.documentElement.clientWidth,o=Math.abs(window.innerWidth-t),{paddingRight:n,paddingInlineEnd:e}=getComputedStyle(document.body);let c=Number((e||n).replace(/px/,""));return(c||isNaN(c))&&(c=0),o+c}();let e=getComputedStyle(document.documentElement).scrollbarGutter;e&&"auto"!==e||(e="stable"),n<=0&&(e="revert"),document.documentElement.style.setProperty("--nano-scroll-lock-gutter",e),document.documentElement.classList.add("nano-scroll-lock"),document.documentElement.style.setProperty("--nano-scroll-lock-size",`${n}px`)}function e(t){o.delete(t),0===o.size&&(document.documentElement.classList.remove("nano-scroll-lock"),document.documentElement.style.removeProperty("--nano-scroll-lock-size"))}function c(t,o,n=!1){if(n)try{t.scrollTo({top:o,behavior:"smooth"})}catch(n){t.scrollTop=o}else try{t.scrollTo({left:o,behavior:"smooth"})}catch(n){t.scrollLeft=o}}function r(o,n,e="vertical",r="start"){if(!o)return;const l=t(o,n),u=l.top+n.scrollTop,a=l.left+n.scrollLeft,i=n.scrollLeft+n.offsetWidth,s=n.scrollTop,d=n.scrollTop+n.offsetHeight;"horizontal"!==e&&"both"!==e||("start"===r?a<n.scrollLeft?c(n,a):a+o.clientWidth>i&&c(n,a-n.offsetWidth+o.clientWidth):c(n,n.scrollLeft+l.left-(n.offsetWidth/2-o.offsetWidth/2))),"vertical"!==e&&"both"!==e||("start"===r?u<s?c(n,u,!0):u+o.clientHeight>d&&c(n,u-n.offsetHeight+o.clientHeight,!0):c(n,n.scrollTop+l.top-(n.offsetHeight/2-o.offsetHeight/2),!0))}function l(t){let o=getComputedStyle(t);const n="absolute"===o.position,e=/(auto|scroll)/;if("fixed"===o.position)return document.documentElement;for(let c=t;c=c.parentElement;)if(o=getComputedStyle(c),(!n||"static"!==o.position)&&e.test(o.overflow+o.overflowY+o.overflowX))return c;return document.documentElement}function u(t,o=100,n="y"){const e=t.getBoundingClientRect(),c=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;if(!(e.bottom||e.top||e.left||e.right||e.height||e.width||e.x||e.y))return!1;let l=!0;return"y"!==n&&"both"!==n||(l=!(Math.floor(100-(e.top>=0?0:e.top)/+-e.height*100)<o||Math.floor(100-(e.bottom-c)/e.height*100)<o)),("x"===n||"both"===n&&l)&&(l=!(Math.floor(100-(e.left>=0?0:e.left)/+-e.width*100)<o||Math.floor(100-(e.right-r)/e.width*100)<o)),l}export{l as f,u as i,n as l,r as s,e as u}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import{g as t,j as s}from"./index-
|
4
|
+
import{g as t,j as s}from"./index-BM3Om9WE.js";import{g as h}from"./dom-dlicJTEJ.js";function o(t){const s=t.getRootNode();return s.host?s.host.innerText:t.innerText}class i{host;slotNames=[];constructor(s,...h){this.slotNames=h;const o=s.componentWillLoad;s.componentWillLoad=()=>{this.host=t(s),o&&o.call(s)};const i=s.connectedCallback;s.connectedCallback=()=>{this.host=t(s),this.hostConnected(),i&&i.call(s)};const e=s.disconnectedCallback;s.disconnectedCallback=()=>{this.hostDisconnected(),this.host=void 0,e&&e.call(s)}}hasDefaultSlot(){return!!this.host&&[...this.host.childNodes].some((t=>t.nodeType===Node.TEXT_NODE&&""!==t.textContent.trim()||t.nodeType===Node.ELEMENT_NODE&&!t.hasAttribute("slot")))}hasNamedSlot(t){return!!this.host&&h(this.host,`[slot="${t}"]`,!0).length>0}has(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host&&this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange=t=>{const h=t.target;(this.slotNames.includes("[default]")&&!h.name||h.name&&this.slotNames.includes(h.name))&&s(this.host)}}export{i as H,o as g}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/*!
|
2
|
+
* Custom elements for Nanopore-Digital Web applications
|
3
|
+
*/
|
4
|
+
import"./index-BM3Om9WE.js";function t(e,n=!1,r=!1,i=!1){const a=[];if(e instanceof HTMLElement){if(function(t,e=!1){const n=t.tagName.toLowerCase();if(!["button","input","select","textarea","a","audio","video","summary"].includes(n))return!1;if("-1"===t.getAttribute("tabindex"))return!1;if(t.hasAttribute("disabled"))return!1;if(t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled"))return!1;if(t.hasAttribute("tabindex"))return!0;if(t.hasAttribute("contenteditable")&&"false"!==t.getAttribute("contenteditable"))return!0;if(("audio"===n||"video"===n)&&t.hasAttribute("controls"))return!0;if("input"===n&&"radio"===t.getAttribute("type")&&!t.hasAttribute("checked"))return!1;if("a"===n&&!t.hasAttribute("href"))return!1;if(!e){if(!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))return!1;if("function"==typeof t.checkVisibility&&!t.checkVisibility({opacityProperty:!0,visibilityProperty:!0}))return!1}return!0}(e,r)&&(a.push(e),n))return a;!i&&e.shadowRoot&&"open"===e.shadowRoot.mode&&t(e.shadowRoot,n,r).map((t=>{a.includes(t)||a.push(t)})),HTMLSlotElement&&e instanceof HTMLSlotElement&&e.assignedElements().map((e=>{t(e,n,r).map((t=>{a.includes(t)||a.push(t)}))}))}return Array.from(e.children).map((e=>{t(e,n,r).map((t=>{a.includes(t)||a.push(t)}))})),a}function e(e){const n=t(e,!0,!0);return n.length?n[0]:null}export{e as a,t as g}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/*!
|
2
|
+
* Custom elements for Nanopore-Digital Web applications
|
3
|
+
*/
|
4
|
+
import{c as t}from"./nano-data-table-Bqk8ZUaL.js";import"./index-BM3Om9WE.js";import"./renderer-BaP2L8CT.js";import"./math-BEqsTfVK.js";import"./throttle-C93FMm2Z.js";import"./scroll-1nFw8CNk.js";import"./dom-dlicJTEJ.js";import"./index-BlBZYxu4.js";const r="table.worker",o="stencil.table.worker",e=new URL("table.worker-TTndpijX.js",import.meta.url).href;let i;try{i=t(e,r,o)}catch(s){const m=new Blob(['importScripts("'+e+'")'],{type:"text/javascript"}),a=URL.createObjectURL(m);i=t(a,r,o),URL.revokeObjectURL(a)}export{i as worker,o as workerMsgId,r as workerName,e as workerPath}
|
@@ -45,6 +45,8 @@ export declare class GlobalSearchResults implements ComponentInterface {
|
|
45
45
|
};
|
46
46
|
}>): void;
|
47
47
|
attachResultListeners(e?: NanoAlgoliaResultsCustomEvent<IndexResult>): void;
|
48
|
+
onDocNanoSearchResult(e: CustomEvent): void;
|
49
|
+
onDocNanoSearchReset(e: CustomEvent): void;
|
48
50
|
/** Manually close the search panel */
|
49
51
|
closeSearch(): Promise<void>;
|
50
52
|
private resultClick;
|
package/docs-json.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"timestamp": "2025-
|
2
|
+
"timestamp": "2025-08-19T04:45:09",
|
3
3
|
"compiler": {
|
4
4
|
"name": "@stencil/core",
|
5
5
|
"version": "4.36.1",
|
@@ -3322,7 +3322,7 @@
|
|
3322
3322
|
"references": {
|
3323
3323
|
"Breadcrumb": {
|
3324
3324
|
"location": "local",
|
3325
|
-
"path": "/builds/
|
3325
|
+
"path": "/builds/baEH6RK5/0/Digital/nano-components/packages/components/src/components/breadcrumb/breadcrumb.tsx",
|
3326
3326
|
"id": "src/components/breadcrumb/breadcrumb.tsx::Breadcrumb"
|
3327
3327
|
}
|
3328
3328
|
}
|
@@ -13538,6 +13538,18 @@
|
|
13538
13538
|
"event": "nanoNewResults",
|
13539
13539
|
"capture": false,
|
13540
13540
|
"passive": false
|
13541
|
+
},
|
13542
|
+
{
|
13543
|
+
"event": "nanoSearchResult",
|
13544
|
+
"target": "document",
|
13545
|
+
"capture": false,
|
13546
|
+
"passive": false
|
13547
|
+
},
|
13548
|
+
{
|
13549
|
+
"event": "nanoSearchReset",
|
13550
|
+
"target": "document",
|
13551
|
+
"capture": false,
|
13552
|
+
"passive": false
|
13541
13553
|
}
|
13542
13554
|
],
|
13543
13555
|
"styles": [],
|
package/hydrate/index.js
CHANGED
@@ -2764,6 +2764,9 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
2764
2764
|
}
|
2765
2765
|
};
|
2766
2766
|
var getHostListenerTarget = (doc, elm, flags) => {
|
2767
|
+
if (flags & 4 /* TargetDocument */) {
|
2768
|
+
return doc;
|
2769
|
+
}
|
2767
2770
|
if (flags & 8 /* TargetWindow */) {
|
2768
2771
|
return win;
|
2769
2772
|
}
|
@@ -15415,6 +15418,20 @@ class GlobalSearchResults {
|
|
15415
15418
|
tag.addEventListener('click', this.tagClick);
|
15416
15419
|
});
|
15417
15420
|
}
|
15421
|
+
onDocNanoSearchResult(e) {
|
15422
|
+
if (!this.globalNav)
|
15423
|
+
return;
|
15424
|
+
if (e.target !== this.globalNav)
|
15425
|
+
return;
|
15426
|
+
this.handleGlobalNavSearch(e);
|
15427
|
+
}
|
15428
|
+
onDocNanoSearchReset(e) {
|
15429
|
+
if (!this.globalNav)
|
15430
|
+
return;
|
15431
|
+
if (e.target !== this.globalNav)
|
15432
|
+
return;
|
15433
|
+
this.handleGlobalNavReset();
|
15434
|
+
}
|
15418
15435
|
/** Manually close the search panel */
|
15419
15436
|
async closeSearch() {
|
15420
15437
|
this.goback();
|
@@ -15499,16 +15516,12 @@ class GlobalSearchResults {
|
|
15499
15516
|
console.error('`<nano-global-search-results>` must be a child of `<nano-global-nav>`');
|
15500
15517
|
return;
|
15501
15518
|
}
|
15502
|
-
this.globalNav.addEventListener('nanoSearchResult', this.handleGlobalNavSearch);
|
15503
|
-
this.globalNav.addEventListener('nanoSearchReset', this.handleGlobalNavReset);
|
15504
15519
|
this.handleAlgoliaEleChange();
|
15505
15520
|
}
|
15506
15521
|
disconnectedCallback() {
|
15507
15522
|
if (this.ro) {
|
15508
15523
|
this.ro.disconnect();
|
15509
15524
|
}
|
15510
|
-
this.globalNav.removeEventListener('nanoSearchResult', this.handleGlobalNavSearch);
|
15511
|
-
this.globalNav.removeEventListener('nanoSearchReset', this.handleGlobalNavReset);
|
15512
15525
|
}
|
15513
15526
|
componentDidLoad() {
|
15514
15527
|
if (!window['ResizeObserver'])
|
@@ -15523,12 +15536,12 @@ class GlobalSearchResults {
|
|
15523
15536
|
this.ro.observe(this.el);
|
15524
15537
|
}
|
15525
15538
|
render() {
|
15526
|
-
return (h(Host, { key: '
|
15539
|
+
return (h(Host, { key: 'c3e9e501af8fea7703a69a11249b209a2b249d70', class: {
|
15527
15540
|
small: this.currentWidth < 780,
|
15528
15541
|
'nano-global-search-results': true,
|
15529
|
-
}, dir: this.el.ownerDocument.dir === 'rtl' ? 'rtl' : undefined }, h("nano-algolia", { key: '
|
15542
|
+
}, dir: this.el.ownerDocument.dir === 'rtl' ? 'rtl' : undefined }, h("nano-algolia", { key: 'f4778fa577bb79485a927565e938032db14981e3', storeId: this.queryId, storeMethod: "url-hash-push", class: "main-search__wrap sc-nano-global-search-results", ref: (ele) => requestAnimationFrame(() => (this.algoliaEle = ele)), id: "main-search",
|
15530
15543
|
// @ts-expect-error this bubbles from nano-algolia-filter
|
15531
|
-
onNanoFilterChanged: () => this.handleNanoFilterChanged() }, h("template", { key: '
|
15544
|
+
onNanoFilterChanged: () => this.handleNanoFilterChanged() }, h("template", { key: '274742b09cfbccacda5776856a5a63fd3f256d5e', slot: "template" },
|
15532
15545
|
/* html */ `<div class="main-search sc-nano-global-search-results">
|
15533
15546
|
<nano-algolia-results id="main-search-results" class="main-search__results sc-nano-global-search-results" infinite-scroll>
|
15534
15547
|
<script type="text/template" slot="start-template">
|
@@ -15906,7 +15919,7 @@ class GlobalSearchResults {
|
|
15906
15919
|
</div>
|
15907
15920
|
</div>
|
15908
15921
|
{{ /if }}
|
15909
|
-
</div>`), h("div", { key: '
|
15922
|
+
</div>`), h("div", { key: 'f34469ff51c7c07f4451112bfe1aa3a3e0e2d47c', slot: "output" }), h("slot", { key: '099de4e70571d4d4de3c8bc279a4b62f44dd6191' }))));
|
15910
15923
|
}
|
15911
15924
|
static get watchers() { return {
|
15912
15925
|
"algoliaEle": ["handleAlgoliaCredsChange", "handleAlgoliaIndexChange", "handleAlgoliaEleChange"],
|
@@ -15928,7 +15941,7 @@ class GlobalSearchResults {
|
|
15928
15941
|
"index": [32],
|
15929
15942
|
"closeSearch": [64]
|
15930
15943
|
},
|
15931
|
-
"$listeners$": [[0, "nanoChange", "handleReorder"], [0, "nanoResultsShown", "attachListeners"], [0, "nanoNewResults", "attachResultListeners"]],
|
15944
|
+
"$listeners$": [[0, "nanoChange", "handleReorder"], [0, "nanoResultsShown", "attachListeners"], [0, "nanoNewResults", "attachResultListeners"], [4, "nanoSearchResult", "onDocNanoSearchResult"], [4, "nanoSearchReset", "onDocNanoSearchReset"]],
|
15932
15945
|
"$lazyBundleId$": "-",
|
15933
15946
|
"$attrsToReflect$": []
|
15934
15947
|
}; }
|
package/hydrate/index.mjs
CHANGED
@@ -2762,6 +2762,9 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
2762
2762
|
}
|
2763
2763
|
};
|
2764
2764
|
var getHostListenerTarget = (doc, elm, flags) => {
|
2765
|
+
if (flags & 4 /* TargetDocument */) {
|
2766
|
+
return doc;
|
2767
|
+
}
|
2765
2768
|
if (flags & 8 /* TargetWindow */) {
|
2766
2769
|
return win;
|
2767
2770
|
}
|
@@ -15413,6 +15416,20 @@ class GlobalSearchResults {
|
|
15413
15416
|
tag.addEventListener('click', this.tagClick);
|
15414
15417
|
});
|
15415
15418
|
}
|
15419
|
+
onDocNanoSearchResult(e) {
|
15420
|
+
if (!this.globalNav)
|
15421
|
+
return;
|
15422
|
+
if (e.target !== this.globalNav)
|
15423
|
+
return;
|
15424
|
+
this.handleGlobalNavSearch(e);
|
15425
|
+
}
|
15426
|
+
onDocNanoSearchReset(e) {
|
15427
|
+
if (!this.globalNav)
|
15428
|
+
return;
|
15429
|
+
if (e.target !== this.globalNav)
|
15430
|
+
return;
|
15431
|
+
this.handleGlobalNavReset();
|
15432
|
+
}
|
15416
15433
|
/** Manually close the search panel */
|
15417
15434
|
async closeSearch() {
|
15418
15435
|
this.goback();
|
@@ -15497,16 +15514,12 @@ class GlobalSearchResults {
|
|
15497
15514
|
console.error('`<nano-global-search-results>` must be a child of `<nano-global-nav>`');
|
15498
15515
|
return;
|
15499
15516
|
}
|
15500
|
-
this.globalNav.addEventListener('nanoSearchResult', this.handleGlobalNavSearch);
|
15501
|
-
this.globalNav.addEventListener('nanoSearchReset', this.handleGlobalNavReset);
|
15502
15517
|
this.handleAlgoliaEleChange();
|
15503
15518
|
}
|
15504
15519
|
disconnectedCallback() {
|
15505
15520
|
if (this.ro) {
|
15506
15521
|
this.ro.disconnect();
|
15507
15522
|
}
|
15508
|
-
this.globalNav.removeEventListener('nanoSearchResult', this.handleGlobalNavSearch);
|
15509
|
-
this.globalNav.removeEventListener('nanoSearchReset', this.handleGlobalNavReset);
|
15510
15523
|
}
|
15511
15524
|
componentDidLoad() {
|
15512
15525
|
if (!window['ResizeObserver'])
|
@@ -15521,12 +15534,12 @@ class GlobalSearchResults {
|
|
15521
15534
|
this.ro.observe(this.el);
|
15522
15535
|
}
|
15523
15536
|
render() {
|
15524
|
-
return (h(Host, { key: '
|
15537
|
+
return (h(Host, { key: 'c3e9e501af8fea7703a69a11249b209a2b249d70', class: {
|
15525
15538
|
small: this.currentWidth < 780,
|
15526
15539
|
'nano-global-search-results': true,
|
15527
|
-
}, dir: this.el.ownerDocument.dir === 'rtl' ? 'rtl' : undefined }, h("nano-algolia", { key: '
|
15540
|
+
}, dir: this.el.ownerDocument.dir === 'rtl' ? 'rtl' : undefined }, h("nano-algolia", { key: 'f4778fa577bb79485a927565e938032db14981e3', storeId: this.queryId, storeMethod: "url-hash-push", class: "main-search__wrap sc-nano-global-search-results", ref: (ele) => requestAnimationFrame(() => (this.algoliaEle = ele)), id: "main-search",
|
15528
15541
|
// @ts-expect-error this bubbles from nano-algolia-filter
|
15529
|
-
onNanoFilterChanged: () => this.handleNanoFilterChanged() }, h("template", { key: '
|
15542
|
+
onNanoFilterChanged: () => this.handleNanoFilterChanged() }, h("template", { key: '274742b09cfbccacda5776856a5a63fd3f256d5e', slot: "template" },
|
15530
15543
|
/* html */ `<div class="main-search sc-nano-global-search-results">
|
15531
15544
|
<nano-algolia-results id="main-search-results" class="main-search__results sc-nano-global-search-results" infinite-scroll>
|
15532
15545
|
<script type="text/template" slot="start-template">
|
@@ -15904,7 +15917,7 @@ class GlobalSearchResults {
|
|
15904
15917
|
</div>
|
15905
15918
|
</div>
|
15906
15919
|
{{ /if }}
|
15907
|
-
</div>`), h("div", { key: '
|
15920
|
+
</div>`), h("div", { key: 'f34469ff51c7c07f4451112bfe1aa3a3e0e2d47c', slot: "output" }), h("slot", { key: '099de4e70571d4d4de3c8bc279a4b62f44dd6191' }))));
|
15908
15921
|
}
|
15909
15922
|
static get watchers() { return {
|
15910
15923
|
"algoliaEle": ["handleAlgoliaCredsChange", "handleAlgoliaIndexChange", "handleAlgoliaEleChange"],
|
@@ -15926,7 +15939,7 @@ class GlobalSearchResults {
|
|
15926
15939
|
"index": [32],
|
15927
15940
|
"closeSearch": [64]
|
15928
15941
|
},
|
15929
|
-
"$listeners$": [[0, "nanoChange", "handleReorder"], [0, "nanoResultsShown", "attachListeners"], [0, "nanoNewResults", "attachResultListeners"]],
|
15942
|
+
"$listeners$": [[0, "nanoChange", "handleReorder"], [0, "nanoResultsShown", "attachListeners"], [0, "nanoNewResults", "attachResultListeners"], [4, "nanoSearchResult", "onDocNanoSearchResult"], [4, "nanoSearchReset", "onDocNanoSearchReset"]],
|
15930
15943
|
"$lazyBundleId$": "-",
|
15931
15944
|
"$attrsToReflect$": []
|
15932
15945
|
}; }
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nanoporetech-digital/components",
|
3
|
-
"version": "8.3.
|
3
|
+
"version": "8.3.1",
|
4
4
|
"sideEffects": false,
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -60,7 +60,7 @@
|
|
60
60
|
"smart-array-filter": "^4.0.2",
|
61
61
|
"stencil-wormhole": "3.2.1",
|
62
62
|
"tyqs": "^0.1.3",
|
63
|
-
"@nanoporetech-digital/style": "8.3.
|
63
|
+
"@nanoporetech-digital/style": "8.3.1"
|
64
64
|
},
|
65
65
|
"devDependencies": {
|
66
66
|
"@algolia/client-search": "^4.22.1",
|
@@ -1,4 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Custom elements for Nanopore-Digital Web applications
|
3
|
-
*/
|
4
|
-
import{g as e}from"./index-DgO0qeQ9.js";var n;!function(e){e.Filter="filter",e.Page="page",e.Replica="replica",e.Init="init"}(n||(n={}));const o=(n,o)=>function(n,o){var i=n.prototype,t=i.componentWillLoad;i.componentWillLoad=function(){var n,i=this,r=e(this),s={promise:new Promise((function(e){n=e})),resolve:n},u=new CustomEvent("openWormhole",{bubbles:!0,composed:!0,detail:{consumer:this,fields:o,updater:function(e,n){i[e]=n},onOpen:s}});return r.dispatchEvent(u),s.promise.then((function(){if(t)return t.call(i)}))}}(n,o);export{n as S,o as W}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Custom elements for Nanopore-Digital Web applications
|
3
|
-
*/
|
4
|
-
import"./index-DgO0qeQ9.js";var e;function t(e,t=this){return function t(n){if(!n||n===document||n===window)return null;n.assignedSlot&&(n=n.assignedSlot);return n.closest(e)||t(n.getRootNode().host)}(t)}function n(e,t,n=!0){if(!0===n)try{return t=":scope > "+t.split(",").join(", :scope >"),Array.from(e.querySelectorAll(t))}catch(e){console.error(e,"an error. sad")}const o=[];return Array.from(e.childNodes).forEach((e=>{e.matches&&e.matches(t)&&("SLOT"!==e.nodeName||"slot"!==n)?o.push(e):"SLOT"===e.nodeName?Array.from(e.assignedElements()).forEach((e=>{e.matches(t)&&o.push(e)})):n||o.push(e)})),o}function o(e,t){return t&&e?{top:e.getBoundingClientRect().top-t.getBoundingClientRect().top,left:e.getBoundingClientRect().left-t.getBoundingClientRect().left}:{top:0,left:0}}!function(e){e[e.ElementNode=1]="ElementNode",e[e.TextNode=3]="TextNode",e[e.CommentNode=8]="CommentNode",e[e.DocumentNode=9]="DocumentNode",e[e.DocumentTypeNode=10]="DocumentTypeNode",e[e.DocumentFragment=11]="DocumentFragment"}(e||(e={}));export{o as a,t as c,n as g}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Custom elements for Nanopore-Digital Web applications
|
3
|
-
*/
|
4
|
-
import{F as t,u as i}from"./nano-slides-CI0F1FDY.js";import"./index-DgO0qeQ9.js";import"./renderer-T8etwwhk.js";t.createMethods.push("_createLazyload");const s=t.prototype;function a(t,i){this.img=t,this.flickity=i,this.load()}s._createLazyload=function(){this.on("select",this.lazyLoad)},s.lazyLoad=function(){const t=this.options.lazyLoad;if(!t)return;const s=this.getAdjacentCellElements("number"==typeof t?t:0);let l=[];s.forEach((function(t){const s=function(t){if("IMG"==t.nodeName){const i=t.getAttribute("data-flickity-lazyload"),s=t.getAttribute("data-flickity-lazyload-src"),a=t.getAttribute("data-flickity-lazyload-srcset");if(i||s||a)return[t]}const s=t.querySelectorAll("img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]");return i.makeArray(s)}(t);l=l.concat(s)})),l.forEach((function(t){new a(t,this)}),this)},a.prototype.handleEvent=i.handleEvent,a.prototype.load=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this);const t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src"),i=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t,i&&this.img.setAttribute("srcset",i),this.img.removeAttribute("data-flickity-lazyload"),this.img.removeAttribute("data-flickity-lazyload-src"),this.img.removeAttribute("data-flickity-lazyload-srcset")},a.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")},a.prototype.onerror=function(t){this.complete(t,"flickity-lazyerror")},a.prototype.complete=function(t,i){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this);const s=this.flickity.getParentCell(this.img),a=s&&s.element;this.flickity.cellSizeChange(a),this.img.classList.add(i),this.flickity.dispatchEvent("lazyLoad",t,a)},t.LazyLoader=a;
|
@@ -1,4 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Custom elements for Nanopore-Digital Web applications
|
3
|
-
*/
|
4
|
-
import"./index-DgO0qeQ9.js";function e(t,n=!1,r=!1,i=!1){const a=[];if(t instanceof HTMLElement){if(function(e,t=!1){const n=e.tagName.toLowerCase();if(!["button","input","select","textarea","a","audio","video","summary"].includes(n))return!1;if("-1"===e.getAttribute("tabindex"))return!1;if(e.hasAttribute("disabled"))return!1;if(e.hasAttribute("aria-disabled")&&"false"!==e.getAttribute("aria-disabled"))return!1;if(e.hasAttribute("tabindex"))return!0;if(e.hasAttribute("contenteditable")&&"false"!==e.getAttribute("contenteditable"))return!0;if(("audio"===n||"video"===n)&&e.hasAttribute("controls"))return!0;if("input"===n&&"radio"===e.getAttribute("type")&&!e.hasAttribute("checked"))return!1;if("a"===n&&!e.hasAttribute("href"))return!1;if(!t){if(!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))return!1;if("function"==typeof e.checkVisibility&&!e.checkVisibility({opacityProperty:!0,visibilityProperty:!0}))return!1}return!0}(t,r)&&(a.push(t),n))return a;!i&&t.shadowRoot&&"open"===t.shadowRoot.mode&&e(t.shadowRoot,n,r).map((e=>{a.includes(e)||a.push(e)})),HTMLSlotElement&&t instanceof HTMLSlotElement&&t.assignedElements().map((t=>{e(t,n,r).map((e=>{a.includes(e)||a.push(e)}))}))}return Array.from(t.children).map((t=>{e(t,n,r).map((e=>{a.includes(e)||a.push(e)}))})),a}function t(t){const n=e(t,!0,!0);return n.length?n[0]:null}export{t as a,e as g}
|
@@ -1,4 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* Custom elements for Nanopore-Digital Web applications
|
3
|
-
*/
|
4
|
-
import{c as t}from"./nano-data-table-BP5Ccyob.js";import"./index-DgO0qeQ9.js";import"./renderer-T8etwwhk.js";import"./math-BEqsTfVK.js";import"./throttle-C93FMm2Z.js";import"./scroll-DtQwV9-u.js";import"./dom-CrrHp_I_.js";import"./index-CjVnX0W1.js";const r="table.worker",e="stencil.table.worker",o=new URL("table.worker-TTndpijX.js",import.meta.url).href;let s;try{s=t(o,r,e)}catch(i){const p=new Blob(['importScripts("'+o+'")'],{type:"text/javascript"}),m=URL.createObjectURL(p);s=t(m,r,e),URL.revokeObjectURL(m)}export{s as worker,e as workerMsgId,r as workerName,o as workerPath}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|