@nanoporetech-digital/components 8.18.0 → 8.19.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/{nano-data-table-CiPPql2J.js → nano-data-table-BC1htsdm.js} +47 -7
- package/dist/cjs/nano-data-table.cjs.entry.js +1 -1
- package/dist/cjs/nano-global-nav.cjs.entry.js +16 -12
- package/dist/cjs/{table.worker-D7SJpZlV.js → table.worker-BXs-g6xI.js} +2 -2
- package/dist/{esm/table.worker-TTndpijX.js → cjs/table.worker-DM_2DNEe.js} +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/collection/components/data-table/table.property-utils.js +35 -0
- package/dist/collection/components/data-table/table.store.js +11 -5
- package/dist/collection/components/data-table/table.utils.js +6 -1
- package/dist/collection/components/data-table/table.worker.js +16 -10
- package/dist/collection/components/global-nav/global-nav.js +17 -13
- package/dist/components/nano-data-table.js +46 -6
- package/dist/components/nano-global-nav.js +16 -12
- package/dist/components/table.worker.js +1 -1
- package/dist/esm/{nano-data-table-BXdzSqWC.js → nano-data-table-Bn4l0Q3q.js} +47 -7
- package/dist/esm/nano-data-table.entry.js +1 -1
- package/dist/esm/nano-global-nav.entry.js +16 -12
- package/dist/esm/{table.worker-DftFV8Z7.js → table.worker-BMDbprO8.js} +2 -2
- package/dist/{nano-components/table.worker-TTndpijX.js → esm/table.worker-DM_2DNEe.js} +1 -1
- package/dist/nano-components/nano-data-table-Bn4l0Q3q.js +4 -0
- package/dist/nano-components/nano-data-table.entry.js +1 -1
- package/dist/nano-components/nano-global-nav.entry.js +1 -1
- package/dist/nano-components/table.worker-BMDbprO8.js +4 -0
- package/dist/{cjs/table.worker-TTndpijX.js → nano-components/table.worker-DM_2DNEe.js} +1 -1
- package/dist/types/components/data-table/table.property-utils.d.ts +7 -0
- package/dist/types/components/data-table/table.utils.d.ts +2 -1
- package/dist/types/components/global-nav/global-nav.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/docs-json.json +3 -3
- package/docs-vscode.json +1 -1
- package/hydrate/index.js +77 -28
- package/hydrate/index.mjs +77 -28
- package/package.json +2 -2
- package/dist/nano-components/nano-data-table-BXdzSqWC.js +0 -4
- package/dist/nano-components/table.worker-DftFV8Z7.js +0 -4
- /package/dist/types/builds/{QrfEi4pt → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +0 -0
- /package/dist/types/builds/{QrfEi4pt → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
- /package/dist/types/builds/{QrfEi4pt → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +0 -0
- /package/dist/types/builds/{QrfEi4pt → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +0 -0
- /package/dist/types/builds/{QrfEi4pt → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
- /package/dist/types/builds/{QrfEi4pt → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
- /package/dist/types/builds/{QrfEi4pt → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
- /package/dist/types/builds/{QrfEi4pt → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
- /package/dist/types/builds/{QrfEi4pt → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
- /package/dist/types/builds/{QrfEi4pt → YtJk83se}/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{g as n,r as e,c as a,a as o,k as t}from"./index-BM3Om9WE.js";import{a as i}from"./algoliasearch-lite.esm.browser-BTIloVU8.js";import{h as r}from"./renderer-DpNDfhNy.js";import{d as s}from"./throttle-C93FMm2Z.js";import{a as l}from"./style-Ds52s5za.js";import{s as c}from"./search-insights-8OL2oeQN.js";const h=class{get host(){return n(this)}overflowMenu;overflowOpen=!1;logoUrl=location.protocol+"//"+location.host;cartUrl="";msgUrl="";loginUrl="";logoutUrl="";contactUrl="https://nanoporetech.com/contact";_sessionRedirect=window.location.href;get sessionRedirect(){return encodeURIComponent(this._sessionRedirect)}set sessionRedirect(n){this._sessionRedirect=n}cartCount=0;msgCount=0;async openOverflowMenu(){this.overflowOpen=!0}async closeOverflowMenu(){this.overflowOpen=!1}myAccountUrl;async handleMyAccountUrl(){this.myAccountUrl&&("local-logged-in"!==this.myAccountUrl?"local-logged-out"!==this.myAccountUrl?fetch(this.myAccountUrl+"/nav_bar_data.json").then((n=>n.json())).then((n=>{this.myAccountData=n})).catch((n=>{console.error("Error fetching MyAccount data",n)})):this.myAccountData=await import("./local-logged-out-BuucpKxf.js"):this.myAccountData=await import("./local-logged-in-B3A7tw10.js"))}myAccountData;nanoUserData;userLinks=[];isLoggedIn=!1;get myAccountUser(){return this.myAccountData?.user?.uuid?this.myAccountData.user:null}processUserData(){this.myAccountUser&&(this.userLinks=this.myAccountData?.links.filter((n=>"profile-panel-list"===n.area)),this.loginUrl=this.loginUrl||this.myAccountData.urls.login,this.logoutUrl=this.logoutUrl||this.myAccountData.urls.logout,this.msgUrl=this.msgUrl||this.myAccountData.urls.messages,this.msgCount=this.msgCount||this.myAccountData.notifications.count,this.cartUrl=this.cartUrl||this.myAccountData.urls.cart,this.cartCount=this.cartCount||this.myAccountData.cart.count,this.isLoggedIn=!0,this.nanoUserData.emit(this.myAccountUser))}formatLoginLink(n){return n?this.sessionRedirect?n.endsWith("=")?n+this.sessionRedirect:n.includes("?")?n+"&ReplayState="+this.sessionRedirect:n+"?ReplayState="+this.sessionRedirect:n:""}resizeObserver;cachedWidth;mainMenu;_mainMenuBar;get mainMenuBar(){return this._mainMenuBar}set mainMenuBar(n){this._mainMenuBar!==n&&(this._mainMenuBar=n,this.addMainmenuRo())}async triggerResize(){this.shouldResize=!0,this.breakpoint=0}shouldResize=!0;breakpoint=0;breakpointChanged(){this.breakpoint<this.bpPartials.mainMenu.breakpoint&&!1===this.shouldResize&&(this.overflowOpen=!1)}debounceResetResize=s((()=>{this.shouldResize=!1}),300);addMainmenuRo(){this.removeMainmenuRo(),(this.resizeObserver=new ResizeObserver((()=>{this.shouldResize||this.mainMenuBar.clientWidth>=this.cachedWidth&&0===this.breakpoint||this.mainMenuBar.clientWidth<=this.cachedWidth&&this.mainMenuBar.clientWidth>=this.mainMenu.scrollWidth||(this.shouldResize=!0,this.breakpoint=0)}))).observe(this.mainMenuBar)}removeMainmenuRo(){this.resizeObserver&&(this.mainMenuBar?this.resizeObserver.unobserve(this.mainMenuBar):this.resizeObserver.disconnect())}handleResize=()=>{this.shouldResize&&(this.breakpoint<4&&this.mainMenu.scrollWidth>this.mainMenuBar.clientWidth?this.breakpoint++:(this.cachedWidth=this.mainMenuBar.clientWidth,this.debounceResetResize()))};algoliaClient;searchResults;searchInput;activeIndex;autocompleteResults;searchForm;searchIndices=[];searchBarShown=!1;searchLoading=!1;_searchValue="";nanoSearchResult;nanoSearchError;nanoSearchReset;searchIndex="All";get searchValue(){return this._searchValue}set searchValue(n){n&&this.host.componentOnReady().then((()=>{this.searchBarShown=!0,this.handleSearchTermChangeEvent(n)}))}async submitSearch(){this.onSearchSubmit()}handleSearchIndex(){if(this.searchIndices?.length){if(this.searchIndex)return this.activeIndex=this.searchIndices.find((n=>n.name===this.searchIndex))||this.searchIndices[0],this.activeIndex;this.activeIndex=this.searchIndices[0]}}initSearch(){if(!this.myAccountData)return;const{search:n}=this.myAccountData;n?.app_id&&n?.api_key&&(this.algoliaClient=i(n.app_id,n.api_key),c.init(n.app_id,n.api_key).then((()=>{this.myAccountUser&&c.setUser(this.myAccountUser.uuid)})),this.searchIndices=this.myAccountData.search.indeces,this.searchIndices.forEach((n=>{n.algoliaIndex=this.algoliaClient.initIndex(n.index)})),this.searchIndex||(this.searchIndex=this.searchIndices[0].name))}onSearchSubmit=async n=>{if(n&&n.preventDefault(),!this.activeIndex||!this.myAccountData||this._searchValue?.length<3)return;this.searchResults||await this.doAlgoliaSearch();const{search:e}=this.myAccountData,a=this.searchResults?.results.find((n=>this.activeIndex.index===n.index)),{index:o,domain:t,filters:i,query:r,replicas:s}=a;this.searchBarShown=!1,this.nanoSearchResult.emit({meta:{indexTitle:a.indexName,index:o,domain:t,filters:i,query:r,replicas:s},client:{apiKey:e.api_key,appId:e.app_id}})};async doAlgoliaSearch(){if(this.searchResults=null,!this.algoliaClient)return;const n=this.searchIndices.map((n=>{const e={clickAnalytics:!0,attributesToSnippet:["body:5","title:8"],indexName:n.index,query:this._searchValue,facets:n.filters,hitsPerPage:5,filters:""};return"Community"===n.name&&(e.filters="created > "+Math.floor((Date.now()-631152e5)/1e3)),e}));try{this.searchLoading=!0,this.searchResults=this.processSearchResults(await this.algoliaClient.search(n))}catch(n){console.error(n),this.nanoSearchError.emit(n)}return this.searchLoading=!1,this.searchResults}processSearchResults(n){const e=n,a=n;return e?.results?(e.results.forEach(((n,a)=>{n={...n,indexName:this.searchIndices[a].name,selected:this.activeIndex.name===this.searchIndices[a].name,domain:this.activeIndex.domain||null,domains:this.myAccountData.domains||null,allGroup:!!this.searchIndices[a].allGroup,filters:this.searchIndices[a].filters,replicas:this.activeIndex.replicas},e.results[a]=this.processSearchResults(n)})),e):(a.hits.map((n=>{n.url&&!n.url.match(/^http/)&&(n.url=location.protocol+"//"+this.domainFor(n.origin)+n.url)})),a)}domainFor(n){if(!this.myAccountData)return"";const e=this.myAccountData.domains.find((e=>e.origin===n));return e?e.domain:""}async setAutocompleteResults(){this.autocompleteResults=null,this._searchValue.length<3?this._searchValue.length||this.nanoSearchReset.emit():this.autocompleteResults=(await this.doAlgoliaSearch())?.results.find((n=>n.selected))}autocompleteSnippet(n){return n._snippetResult?.title?.value||n.title}handleSearchOpenEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&this.searchInput&&(this.searchInput.setFocus(),this.searchBarShown=!0)};handleSearchCloseEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&requestAnimationFrame((()=>this.searchBarShown=!1))};handleSearchTermInputEvent=n=>{"input"===n.detail.type&&this.searchInput.value.length>=3&&(this.autocompleteResults=null,this.searchLoading=!0)};handleSearchTermChangeEvent=n=>{this._searchValue!==n&&(this._searchValue=n,this.setAutocompleteResults())};handleSearchIndexChangeEvent=n=>{if(!n.detail?.value?.length)return;const e=n.detail.value;if(this.activeIndex.index===e)return;const a=this.searchIndices.find((n=>n.index===e));a&&a.algoliaIndex&&(this.searchIndex=a.name,this._searchValue.length>=3&&(this.searchInput.setFocus(),this.searchBarShown=!0,this.setAutocompleteResults()))};constructor(n){e(this,n),this.nanoUserData=a(this,"nanoUserData",7),this.nanoSearchResult=a(this,"nanoSearchResult",7),this.nanoSearchError=a(this,"nanoSearchError",7),this.nanoSearchReset=a(this,"nanoSearchReset",7),this.handleResize=s(this.handleResize,75)}componentWillLoad(){this.handleMyAccountUrl(),this.initSearch(),this.processUserData(),l(this.host.shadowRoot)}componentDidRender(){this.handleResize()}loggedInPanel(){if(this.isLoggedIn&&this.myAccountUser)return r("div",{part:"user-panel",class:"gn__user-panel nano-theme-dark"},r("div",{class:"gn__user-panel-head",slot:"label"},r("nano-avatar",{initials:this.myAccountUser.first_name?.charAt(0)+this.myAccountUser.last_name?.charAt(0)},this.myAccountUser.small_avatar_url&&!this.myAccountUser.small_avatar_url.includes("generic")&&r("img",{src:this.myAccountUser.small_avatar_url,alt:"User Avatar",height:40,width:40})),r("div",null,this.myAccountUser.name,r("br",null),this.myAccountUser.job_title,", ",this.myAccountUser.company)),r("div",{class:"gn__user-panel-body"},this.userLinks.map((n=>r("a",{href:n.address,target:n.target||void 0},n.title,("Messages"===n.title||n.address.includes(this.msgUrl)||this.msgUrl.includes(n.address))&&this.msgCount>0&&r("nano-badge",{theme:"danger",strength:"2"},this.msgCount))))),r("div",{class:"gn__user-panel-foot"},r("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},r("a",{href:this.formatLoginLink(this.logoutUrl)},"Logout"))))}bpPartials={contact:{tpl:()=>r("a",{href:this.contactUrl},"Contact"),breakpoint:0},mainMenu:{tpl:()=>r("slot",{name:"menu"}),breakpoint:1},logo:{tpl:()=>{},breakpoint:2}};noResultPartial(){if(this.searchLoading||this.autocompleteResults?.hits.length||this._searchValue.length<3)return;const n=[];return"All"===this.searchIndex?(n.push(r("div",{slot:"no-result",class:"gn__search-no-results"},'No results matching for "',r("strong",null,this._searchValue),'" Try another phrase')),n):(this.searchResults?.results.forEach((e=>{e.hits.length&&n.push(r("nano-option",{class:"gn__search-result",onNanoSelect:n=>{n.preventDefault(),this.searchIndex=e.indexName,this.onSearchSubmit(n)}},'Show results for "',r("strong",null,this._searchValue),'" in ',r("strong",null,e.indexName)))})),n.unshift(r("div",{slot:n.length?"list-top":"no-result",class:"gn__search-no-results"},'No results matching for "',r("strong",null,this._searchValue),'" in'," ",r("strong",null,this.searchIndex),". Try another phrase")),n)}render(){const n=this.bpPartials;return r(o,{key:"3964e8a3aab86d4252876816ca934c69e75da22b",class:{"overflow-menu":this.breakpoint>n.mainMenu.breakpoint,"bar-menu":this.breakpoint<=n.mainMenu.breakpoint,"nano-global-nav":!0}},r("div",{key:"fc2f728b3c4412913ffc2d18c07d057bf6e0bf87",class:{gn:!0,"gn__search-open":this.searchBarShown}},r("nano-drawer",{key:"9a2c9109327ff9cd4eb2553df7e93571a29aa237",ref:n=>this.overflowMenu=n,label:"Main menu",part:"drawer",class:"gn__drawer nano-theme-dark",placement:"start",open:this.overflowOpen,onNanoAfterHide:()=>this.overflowOpen=!1,onNanoAfterShow:()=>this.overflowOpen=!0},r("div",{key:"649c672f237ce2145eda6c8988744f6709835615",class:"gn__drawer-header",part:"overflow-header",slot:"label"},"Main menu"),r("nav",{key:"d002c07a9eb1cdcc4e188e5b146ce8a11257ab98",class:"gn__drawer-menu",part:"overflow-menu"},this.breakpoint>n.mainMenu.breakpoint?n.mainMenu.tpl():"",r("slot",{key:"b6bf65e8ed92636f1eba4b376ecb2fd617bcd67f",name:"overflow"}))),r("div",{key:"b7a5e9d074b63f1841d3946d0166389c73161f25",class:"gn__menu-bar-wrapper"},r("div",{key:"6b4d27a83ed4cbf3a62c0b924b08c887e415904a",class:"gn__menu-bar",part:"menu-bar",ref:n=>this.mainMenuBar=n},r("nav",{key:"bf3736fc4eb98e53a04357e30cd49fab8bf9ef7d","aria-label":"Global navigation",class:"gn__main-menu "+(this.shouldResize?"resizing":""),part:"main-menu",ref:n=>this.mainMenu=n},this.breakpoint>n.mainMenu.breakpoint&&r("nano-icon-button",{key:"fb90f7ea03281cd5543b7723df27ac704367e43f",class:"gn__overflow-button",iconName:"light/bars",label:"Open Menu",onClick:()=>this.overflowMenu.show()}),r("slot",{key:"94e0abe01ad7562fb72abde08ebad80e95d11042",name:"logo"},r("a",{key:"1b01613c642f2bfd1df9df3d35517c6261f40b41",href:this.logoUrl,class:"gn__logo-link",part:"logo-link"},r("img",this.breakpoint<=n.logo.breakpoint?{src:t("../nano-assets/ont-logo.svg"),alt:"Oxford Nanopore Technologies logo. Features a stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--large",width:"152",height:"36",part:"logo logo--large"}:{src:t("../nano-assets/ont-wheel.svg"),alt:"Oxford Nanopore Technologies logo. A stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--small",width:"36",height:"36",part:"logo logo--small"}))),this.breakpoint<=n.mainMenu.breakpoint&&r("div",{key:"6b303f5b2de6b26a5ec9480e08a0269fcf2f6857",class:"gn__main-menu-links"},n.mainMenu.tpl()),r("div",{key:"c2a63e53e7d72e5fabf40190d78d780d25f34c99",class:"gn__main-menu-actions"},!this.myAccountData||!!this.searchIndices.length&&r("nano-dropdown",{key:"1ec162b4ecbfc8360d152780cb29a6274cca3d7d",dialogTitle:"Search Oxford Nanopore Technologies",placement:"bottom",class:"gn__search-dropdown",skidding:-30,distance:25,open:this.searchBarShown,onNanoAfterShow:this.handleSearchOpenEvent,onNanoAfterHide:this.handleSearchCloseEvent,autoOpen:!!this.searchIndices.length},r("nano-icon-button",{key:"978738e596466f583580e48b330a96bac0b14fdc",class:"gn__search-button",slot:"trigger",iconName:"light/magnifying-glass",label:"Search"}),r("form",{key:"6227358213b66c38888cce78218291144c33ca71",ref:n=>this.searchForm=n,class:"gn__search-form",part:"search-form",onSubmit:this.onSearchSubmit},this.searchIndices.length>1&&r("nano-select",{key:"36c4fe6caebc5e38702987ae9e3ba05d79e7ae28",part:"search-select",label:"Which site do you wish to search in?",mask:!0,hideLabel:!0,value:this.activeIndex?.index,onNanoChange:this.handleSearchIndexChangeEvent},this.searchIndices.map((n=>r("nano-option",{selected:n.name===this.searchIndex,value:n.index},n.name||n.index)))),r("nano-input",{key:"d10bf62d983978ab9a3c20f0cd1f64e543dea593",ref:n=>this.searchInput=n,part:"search-input",label:"Search Oxford Nanopore Technologies",placeholder:"Search Oxford Nanopore...",hideLabel:!0,clearable:!0,showInlineError:!1,onNanoChange:n=>{this.handleSearchTermChangeEvent(n.detail.value)},onNanoInput:this.handleSearchTermInputEvent,debounce:500,value:this._searchValue},r("nano-icon",{key:"f5d7f79ac22c414adb0d02219a215618ccd89a7b",slot:"end",name:"light/magnifying-glass"}),r("nano-datalist",{key:"a80c13a3d9382c730408d80f7f2058ca886678d2",class:"gn__search-results",onNanoSelect:n=>n.preventDefault(),dropDownConfig:{tetherTo:this.searchForm},disableFilter:!0},this.searchLoading&&r("div",{key:"1671b2988094fbefc0f3a7dfc09dd03688141e12",slot:"no-result",class:"gn__search-loading"},r("nano-spinner",{key:"dd88116ffa3881fe272673d57686f12159f056e4"},"Searching...")),this.noResultPartial(),!!this.autocompleteResults?.hits.length&&[this.autocompleteResults.hits.map(((n,e)=>r("nano-option",{href:n.url,class:"gn__search-result",onClick:()=>{c.sendClick({index:this.activeIndex.index,eventName:"Global nav quick search - search result clicked",queryID:this.autocompleteResults.queryID,objectIDs:[n.objectID],positions:[e+1]})}},r("span",{innerHTML:this.autocompleteSnippet(n)})))),r("nano-option",{key:"acbff4930245aabfbfe3d94cccbf0916a6419509",class:"gn__search-viewall",onNanoSelect:this.onSearchSubmit},"View all results")])))),r("div",{key:"91cdf552cbf807a5f307da6381ff16fbba419bbe",class:"gn__cart"},r("nano-icon-button",{key:"19c225ced356309ee741c74bc07fa7238e7bc9ff",iconName:"light/cart-shopping",label:"View your cart",href:this.cartUrl}),!!this.cartCount&&r("nano-badge",{key:"6c7d8a2da3276c017cb67f58b48a7358db22b428",theme:"danger",strength:"2"},this.cartCount>9?"9+":this.cartCount)),this.breakpoint<=n.contact.breakpoint?n.contact.tpl():"",this.isLoggedIn?r("nano-dropdown",{dialogTitle:"User menu",class:"gn__user-dropdown",distance:10,placement:"bottom-end"},r("button",{slot:"trigger",class:"gn__user-dropdown-trigger"},r("nano-icon",{name:"light/user"}),r("nano-icon",{name:"light/chevron-down",class:"gn__user-dropdown-chevron"}),!!this.msgCount&&r("nano-badge",{theme:"danger",strength:"2"},this.msgCount>9?"9+":this.msgCount)),this.loggedInPanel()):r("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},r("a",{href:this.formatLoginLink(this.loginUrl)},"Login")))))),r("nano-global-search-results",{key:"7a58924f37e6f4517bec274b3a878a6e3d3e2553",part:"site-search-results"},r("div",{key:"062c09847198b236c0731d6653584115ddd46e71",class:"gn__site",part:"site-wrapper"},r("slot",{key:"971633747f2ec2a6a4dbee587a5a5ccfaaedc088"})))))}static get assetsDirs(){return["assets"]}static get watchers(){return{myAccountUrl:["handleMyAccountUrl"],myAccountData:["processUserData","initSearch"],shouldResize:["breakpointChanged"],breakpoint:["breakpointChanged"],searchIndices:["handleSearchIndex"],searchIndex:["handleSearchIndex"]}}};h.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{--main-menu-bar-bg-color:var(--nano-color-base-0);--main-menu-text-color:var(--nano-color-base-1000);--main-menu-hover-text-color:var(--nano-color-primary-1000);--main-menu-active-text-color:var(--nano-color-primary-1200);--main-menu-active-border-color:var(--nano-color-primary-1000);--overflow-bg-color:var(--nano-color-grey-mono-1600);--overflow-text-color:var(--nano-color-basic-white);--overflow-hover-text-color:var(--nano-color-blue-cerulean-700);--overflow-active-text-color:var(--nano-color-blue-cerulean-300);display:block;color:var(--main-menu-text-color)}img{max-inline-size:none;display:block;block-size:revert-layer}::slotted(a),:host::slotted(a),a{text-decoration:none}a:has(img){display:inline-block}a:focus{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}nano-drawer:not(:defined){display:none}nano-badge{position:absolute;font-size:0.5625rem;pointer-events:none}.gn__cart{position:relative}.gn__cart nano-badge{inset-block-start:-0.35rem;inset-inline-end:-0.4rem}.gn__login-cta{--bg:transparent;--font-size:var(--nano-font-size-2xs);--padding-v:0.5em}.gn__menu-bar-wrapper{z-index:calc(var(--nano-z-index-menubar) + 1);position:relative}.gn__menu-bar-wrapper::after{content:"";position:absolute;block-size:1px;inline-size:100%;inset-inline:0;inset-block-end:-1px;z-index:-3;background-color:var(--nano-color-neutral-200)}.gn__menu-bar{inline-size:100%;overflow:clip;background-color:var(--main-menu-bar-bg-color)}.gn__menu-bar a{color:var(--main-menu-text-color)}.gn__menu-bar a:hover{color:var(--main-menu-hover-text-color)}.gn__menu-bar a:active{color:var(--main-menu-active-text-color)}.gn__main-menu{display:inline-flex;align-items:center;min-inline-size:100%;padding:var(--nano-spacing-md);transition:opacity var(--nano-transition-x-fast) ease;opacity:1}.gn__main-menu.resizing{transition:none;opacity:0}.gn__main-menu>*{margin-inline-end:var(--nano-spacing-xl)}.gn__main-menu>*:is(slot,slot-fb){display:flex}.gn__main-menu>*:last-child{margin-inline-end:0}.gn__overflow-button{--padding:0.5rem 0.875rem 0.5rem 0;margin-inline-end:0.875rem;font-size:1.125rem;position:relative}.gn__overflow-button::after{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-end:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__main-menu-links,.gn__main-menu-actions{display:inline-flex;align-items:center}.gn__main-menu-links .nano-icon,.gn__main-menu-links .nano-icon-button,.gn__main-menu-actions .nano-icon,.gn__main-menu-actions .nano-icon-button{--active-color:var(--main-menu-active-text-color);--hover-color:var(--main-menu-hover-text-color);font-size:1rem}.gn__main-menu-links .nano-icon-button:hover,.gn__main-menu-actions .nano-icon-button:hover{color:var(--main-menu-hover-text-color)}.gn__main-menu-links{gap:var(--nano-spacing-xl)}.gn__main-menu-links ::slotted(a),.gn__main-menu-links::slotted(a){color:var(--main-menu-text-color)}.gn__main-menu-links ::slotted(a:hover){color:var(--main-menu-hover-text-color)}.gn__main-menu-links ::slotted(*:active){color:var(--main-menu-active-text-color)}.gn__main-menu-actions{margin-inline-start:auto;font-size:0.9375rem;gap:var(--nano-spacing-md)}.gn__search-dropdown{--overflow:visible;--padding:0;--background:transparent}.gn__search-dropdown .nano-icon-button{position:relative}.gn__search-dropdown .nano-icon-button::before{content:"";position:absolute;background-color:var(--main-menu-active-border-color);block-size:4px;inset-inline:5px 2px;inset-block-end:-1.5625rem;transform:translateZ(0) scaleX(0);transform-origin:0 center;transition:transform var(--nano-transition-x-fast) ease-in-out}.gn__search-open .gn__search-dropdown .nano-icon-button::before{transform:translateZ(0) scaleX(1)}.gn__search-form{display:inline-flex;max-inline-size:100vw;inline-size:30.625rem}.gn__search-form .nano-select{--input-bg-color:var(--nano-color-neutral-200);flex:0}.gn__search-form .nano-select:focus-within{z-index:1}.gn__search-form .nano-select .form-ctrl__input{border-inline-end:none}.gn__search-form .nano-input{flex:1}.gn__search-results{--padding-start:var(--nano-spacing-md);--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);font-size:var(--nano-font-size-2xs)}.gn__search-loading{display:flex;justify-content:center}.gn__search-result{--padding-start:0.3125rem;--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-neutral-1400);font-size:var(--nano-font-size-2xs)}.gn__search-result .search__highlight{font-style:normal;background:var(--nano-color-highlight)}.gn__search-viewall{--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-primary-1200)}.gn__search-viewall::part(label){justify-content:flex-end;text-decoration:underline}.gn__user-dropdown-trigger{all:unset;cursor:pointer;color:var(--nano-color-primary-1200);display:flex;white-space:nowrap;gap:var(--nano-spacing-xs);align-items:center;position:relative;padding-inline-start:var(--nano-spacing-md)}.gn__user-dropdown-trigger:hover{color:var(--main-menu-hover-text-color)}.gn__user-dropdown-trigger:active{color:var(--main-menu-active-text-color)}.gn__user-dropdown-trigger:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.gn__user-dropdown-trigger::before{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-start:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__user-dropdown-trigger .gn__user-dropdown-chevron{transition:rotate var(--nano-transition-x-fast) linear}[open] .gn__user-dropdown-trigger .gn__user-dropdown-chevron{rotate:180deg}.gn__user-dropdown-trigger nano-badge{inset-block-start:-0.7rem;inset-inline-end:-0.7rem}.gn__user-dropdown{--background:var(--overflow-bg-color);--padding:0;--overflow:visible}.gn__user-panel{inline-size:21.25rem;max-inline-size:21.25rem;color:var(--overflow-text-color);padding:var(--nano-spacing-md)}.gn__user-panel a{color:var(--overflow-text-color)}.gn__user-panel a:hover{text-decoration:underline;color:var(--overflow-hover-text-color)}.gn__user-panel-head{font-size:var(--nano-font-size-xs);line-height:var(--nano-line-height-normal);letter-spacing:var(--nano-letter-spacing-loose);padding-block-end:var(--nano-spacing-md);display:flex;align-items:center;gap:var(--nano-spacing-sm);font-size:var(--nano-font-size-xs)}.gn__user-panel-head .gn__user-avatar nano-icon{font-size:2.5rem}.gn__user-panel-body{display:flex;flex-direction:column}.gn__user-panel-body a{position:relative;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);padding-block:var(--nano-spacing-md)}.gn__user-panel-body a:first-child{border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__user-panel-foot{padding-block-start:var(--nano-spacing-md);display:flex;align-items:center;justify-content:space-between;gap:var(--nano-spacing-md)}.gn__drawer{--panel-background:var(--overflow-bg-color);--header-button-color:var(--overflow-text-color);--body-spacing:0;--header-spacing:var(--nano-spacing-md) 0;--footer-spacing:var(--nano-spacing-md)}.gn__drawer::part(title){display:flex;justify-content:flex-end}.gn__drawer::part(header-actions){order:-1}.gn__drawer-header{clip-path:inset(50%);block-size:1px;overflow:hidden;position:absolute;white-space:nowrap;inline-size:1px}.gn__drawer-menu{display:flex;flex-direction:column;margin:0 var(--nano-spacing-md);padding-block-end:var(--nano-spacing-md);color:var(--overflow-text-color);border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);position:relative}.gn__drawer-menu ::slotted(a),.gn__drawer-menu::slotted(a){padding:var(--nano-spacing-md) 0}.gn__drawer-menu ::slotted(a),.gn__drawer-menu ::slotted(.nano-nav-item),.gn__drawer-menu::slotted(a),.gn__drawer-menu::slotted(.nano-nav-item){--padding:var(--nano-spacing-md) 0;display:block;color:inherit !important;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__drawer-menu ::slotted(a:hover),.gn__drawer-menu ::slotted(.nano-nav-item:hover){text-decoration:underline;color:var(--overflow-hover-text-color) !important}';export{h as nano_global_nav}
|
|
4
|
+
import{g as n,r as e,c as a,a as o,k as t}from"./index-BM3Om9WE.js";import{a as i}from"./algoliasearch-lite.esm.browser-BTIloVU8.js";import{h as r}from"./renderer-DpNDfhNy.js";import{d as s}from"./throttle-C93FMm2Z.js";import{a as l}from"./style-Ds52s5za.js";import{s as c}from"./search-insights-8OL2oeQN.js";const h=class{get host(){return n(this)}overflowMenu;overflowOpen=!1;logoUrl=location.protocol+"//"+location.host;cartUrl="";msgUrl="";loginUrl="";logoutUrl="";contactUrl="https://nanoporetech.com/contact";_sessionRedirect=window.location.href;get sessionRedirect(){return encodeURIComponent(this._sessionRedirect)}set sessionRedirect(n){this._sessionRedirect=n}cartCount=0;msgCount=0;async openOverflowMenu(){this.overflowOpen=!0}async closeOverflowMenu(){this.overflowOpen=!1}myAccountUrl;async handleMyAccountUrl(){this.myAccountUrl&&("local-logged-in"!==this.myAccountUrl?"local-logged-out"!==this.myAccountUrl?fetch(this.myAccountUrl+"/nav_bar_data.json").then((n=>n.json())).then((n=>{this.myAccountData=n})).catch((n=>{console.error("Error fetching MyAccount data",n)})):this.myAccountData=await import("./local-logged-out-BuucpKxf.js"):this.myAccountData=await import("./local-logged-in-B3A7tw10.js"))}myAccountData;nanoUserData;userLinks=[];isLoggedIn=!1;get myAccountUser(){return this.myAccountData?.user?.uuid?this.myAccountData.user:null}processUserData(){this.myAccountUser&&(this.userLinks=this.myAccountData?.links.filter((n=>"profile-panel-list"===n.area)),this.loginUrl=this.loginUrl||this.myAccountData.urls.login,this.logoutUrl=this.logoutUrl||this.myAccountData.urls.logout,this.msgUrl=this.msgUrl||this.myAccountData.urls.messages,this.msgCount=this.msgCount||this.myAccountData.notifications.count,this.cartUrl=this.cartUrl||this.myAccountData.urls.cart,this.cartCount=this.cartCount||this.myAccountData.cart.count,this.isLoggedIn=!0,this.nanoUserData.emit(this.myAccountUser))}formatLoginLink(n){return n?this.sessionRedirect?n.endsWith("=")?n+this.sessionRedirect:n.includes("?")?n+"&ReplayState="+this.sessionRedirect:n+"?ReplayState="+this.sessionRedirect:n:""}resizeObserver;cachedWidth;mainMenu;_mainMenuBar;get mainMenuBar(){return this._mainMenuBar}set mainMenuBar(n){this._mainMenuBar!==n&&(this._mainMenuBar=n,this.addMainmenuRo())}async triggerResize(){this.shouldResize=!0,this.breakpoint=0}shouldResize=!0;breakpoint=0;breakpointChanged(){this.breakpoint<this.bpPartials.mainMenu.breakpoint&&!1===this.shouldResize&&(this.overflowOpen=!1)}debounceResetResize=s((()=>{this.shouldResize=!1}),300);addMainmenuRo(){this.removeMainmenuRo(),(this.resizeObserver=new ResizeObserver((()=>{this.shouldResize||this.mainMenuBar.clientWidth>=this.cachedWidth&&0===this.breakpoint||this.mainMenuBar.clientWidth<=this.cachedWidth&&this.mainMenuBar.clientWidth>=this.mainMenu.scrollWidth||(this.shouldResize=!0,this.breakpoint=0)}))).observe(this.mainMenuBar)}removeMainmenuRo(){this.resizeObserver&&(this.mainMenuBar?this.resizeObserver.unobserve(this.mainMenuBar):this.resizeObserver.disconnect())}handleResize=()=>{this.shouldResize&&(this.breakpoint<4&&this.mainMenu.scrollWidth>this.mainMenuBar.clientWidth?this.breakpoint++:(this.cachedWidth=this.mainMenuBar.clientWidth,this.debounceResetResize()))};algoliaClient;searchResults;searchInput;activeIndex;autocompleteResults;searchForm;searchIndices=[];searchBarShown=!1;searchLoading=!1;_searchValue="";nanoSearchResult;nanoSearchError;nanoSearchReset;searchIndex="All";get searchValue(){return this._searchValue}set searchValue(n){n&&this.host.componentOnReady().then((()=>{this.searchBarShown=!0,this.handleSearchTermChangeEvent(n)}))}async submitSearch(){this.onSearchSubmit()}handleSearchIndex(){if(this.searchIndices?.length){if(this.searchIndex)return this.activeIndex=this.searchIndices.find((n=>n.name===this.searchIndex))||this.searchIndices[0],this.activeIndex;this.activeIndex=this.searchIndices[0]}}initSearch(){if(!this.myAccountData)return;const{search:n}=this.myAccountData;n?.app_id&&n?.api_key&&(this.algoliaClient=i(n.app_id,n.api_key),c.init(n.app_id,n.api_key).then((()=>{this.myAccountUser&&c.setUser(this.myAccountUser.uuid)})),this.searchIndices=this.myAccountData.search.indeces,this.searchIndices.forEach((n=>{n.algoliaIndex=this.algoliaClient.initIndex(n.index)})),this.searchIndex||(this.searchIndex=this.searchIndices[0].name))}onSearchSubmit=async n=>{if(n&&n.preventDefault(),!this.activeIndex||!this.myAccountData||this._searchValue?.length<3)return;this.searchResults||await this.doAlgoliaSearch();const{search:e}=this.myAccountData,a=this.searchResults?.results.find((n=>this.activeIndex.index===n.index)),{index:o,domain:t,filters:i,query:r,replicas:s}=a;this.searchBarShown=!1,this.nanoSearchResult.emit({meta:{indexTitle:a.indexName,index:o,domain:t,filters:i,query:r,replicas:s},client:{apiKey:e.api_key,appId:e.app_id}})};async doAlgoliaSearch(){if(this.searchResults=null,!this.algoliaClient)return;const n=this.searchIndices.map((n=>{const e={clickAnalytics:!0,attributesToSnippet:["body:5","title:8"],indexName:n.index,query:this._searchValue,facets:n.filters,hitsPerPage:5,filters:""};return"Community"===n.name&&(e.filters="created > "+Math.floor((Date.now()-631152e5)/1e3)),e}));try{this.searchLoading=!0,this.searchResults=this.processSearchResults(await this.algoliaClient.search(n))}catch(n){console.error(n),this.nanoSearchError.emit(n)}return this.searchLoading=!1,this.searchResults}processSearchResults(n){const e=n,a=n;return e?.results?(e.results.forEach(((n,a)=>{n={...n,indexName:this.searchIndices[a].name,selected:this.activeIndex.name===this.searchIndices[a].name,domain:this.activeIndex.domain||null,domains:this.myAccountData.domains||null,allGroup:!!this.searchIndices[a].allGroup,filters:this.searchIndices[a].filters,replicas:this.activeIndex.replicas},e.results[a]=this.processSearchResults(n)})),e):(a.hits.map((n=>{n.url&&!n.url.match(/^http/)&&(n.url=location.protocol+"//"+this.domainFor(n.origin)+n.url)})),a)}domainFor(n){if(!this.myAccountData)return"";const e=this.myAccountData.domains.find((e=>e.origin===n));return e?e.domain:""}async setAutocompleteResults(){this.autocompleteResults=null,this._searchValue.length<3?this._searchValue.length||this.nanoSearchReset.emit():this.autocompleteResults=(await this.doAlgoliaSearch())?.results.find((n=>n.selected))}autocompleteSnippet(n){return n._snippetResult?.title?.value||n.title}handleSearchOpenEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&this.searchInput&&(this.searchInput.setFocus(),this.searchBarShown=!0)};handleSearchCloseEvent=n=>{n.target.classList.contains("gn__search-dropdown")&&requestAnimationFrame((()=>this.searchBarShown=!1))};handleSearchTermInputEvent=n=>{"input"===n.detail.type&&this.searchInput.value.length>=3&&(this.autocompleteResults=null,this.searchLoading=!0)};handleSearchTermChangeEvent=n=>{this._searchValue!==n&&(this._searchValue=n,this.setAutocompleteResults())};handleSearchIndexChangeEvent=n=>{if(!n.detail?.value?.length)return;const e=n.detail.value;if(this.activeIndex.index===e)return;const a=this.searchIndices.find((n=>n.index===e));a&&a.algoliaIndex&&(this.searchIndex=a.name,this._searchValue.length>=3&&(this.searchInput.setFocus(),this.searchBarShown=!0,this.setAutocompleteResults()))};constructor(n){e(this,n),this.nanoUserData=a(this,"nanoUserData",7),this.nanoSearchResult=a(this,"nanoSearchResult",7),this.nanoSearchError=a(this,"nanoSearchError",7),this.nanoSearchReset=a(this,"nanoSearchReset",7),this.handleResize=s(this.handleResize,75)}componentWillLoad(){this.handleMyAccountUrl(),this.initSearch(),this.processUserData(),l(this.host.shadowRoot)}componentDidRender(){this.handleResize()}loggedInPanel(){if(this.isLoggedIn&&this.myAccountUser)return r("div",{part:"user-panel",class:"gn__user-panel nano-theme-dark"},r("div",{class:"gn__user-panel-head",slot:"label"},r("nano-avatar",{initials:this.myAccountUser.first_name?.charAt(0)+this.myAccountUser.last_name?.charAt(0)},this.myAccountUser.small_avatar_url&&!this.myAccountUser.small_avatar_url.includes("generic")&&r("img",{src:this.myAccountUser.small_avatar_url,alt:"User Avatar",height:40,width:40})),r("div",null,this.myAccountUser.name,r("br",null),this.myAccountUser.job_title&&this.myAccountUser?.company?`${this.myAccountUser.job_title}, ${this.myAccountUser.company}`:this.myAccountUser.job_title||this.myAccountUser.company||"")),r("div",{class:"gn__user-panel-body"},this.userLinks.map((n=>r("a",{href:n.address,target:n.target||void 0},n.title,("Messages"===n.title||n.address.includes(this.msgUrl)||this.msgUrl.includes(n.address))&&this.msgCount>0&&r("nano-badge",{theme:"danger",strength:"2"},this.msgCount))))),r("div",{class:"gn__user-panel-foot"},r("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},r("a",{href:this.formatLoginLink(this.logoutUrl)},"Logout"))))}bpPartials={contact:{tpl:()=>r("a",{href:this.contactUrl},"Contact"),breakpoint:0},mainMenu:{tpl:()=>r("slot",{name:"menu"}),breakpoint:1},logo:{tpl:()=>{},breakpoint:2}};noResultPartial(){if(this.searchLoading||this.autocompleteResults?.hits.length||this._searchValue.length<3)return;const n=[];return"All"===this.searchIndex?(n.push(r("div",{slot:"no-result",class:"gn__search-no-results"},'No results matching for "',r("strong",null,this._searchValue),'" Try another phrase')),n):(this.searchResults?.results.forEach((e=>{e.hits.length&&n.push(r("nano-option",{class:"gn__search-result",onNanoSelect:n=>{n.preventDefault(),this.searchIndex=e.indexName,this.onSearchSubmit(n)}},'Show results for "',r("strong",null,this._searchValue),'" in ',r("strong",null,e.indexName)))})),n.unshift(r("div",{slot:n.length?"list-top":"no-result",class:"gn__search-no-results"},'No results matching for "',r("strong",null,this._searchValue),'" in'," ",r("strong",null,this.searchIndex),". Try another phrase")),n)}render(){const n=this.bpPartials;return r(o,{key:"63e6202a06bc4bc7a6a63f88d1923c3321a2b47c",class:{"overflow-menu":this.breakpoint>n.mainMenu.breakpoint,"bar-menu":this.breakpoint<=n.mainMenu.breakpoint,"nano-global-nav":!0}},r("div",{key:"7fe0cb9446b86233ed7727fdc9aade6b94cb72eb",class:{gn:!0,"gn__search-open":this.searchBarShown}},r("nano-drawer",{key:"ef476cfee137ebbee63c2f7a99935d4aafd2f7e4",ref:n=>this.overflowMenu=n,label:"Main menu",part:"drawer",class:"gn__drawer nano-theme-dark",placement:"start",open:this.overflowOpen,onNanoAfterHide:()=>this.overflowOpen=!1,onNanoAfterShow:()=>this.overflowOpen=!0},r("div",{key:"c4cbe27955caffeb4f4a7dc755b6b08bf40a7f48",class:"gn__drawer-header",part:"overflow-header",slot:"label"},"Main menu"),r("nav",{key:"26ec816c93427ce9f9cc4025e327b5e6cf9ba3e2",class:"gn__drawer-menu",part:"overflow-menu"},this.breakpoint>n.mainMenu.breakpoint?n.mainMenu.tpl():"",r("slot",{key:"0693a9f4afdf63e63151b3f3fd4d3a0bbedde4ef",name:"overflow"}))),r("div",{key:"d9ff383fb0f91876a533e8eb98bc47817b044729",class:"gn__menu-bar-wrapper"},r("div",{key:"4536fd7593626672f20191b197a55b3d7b10b633",class:"gn__menu-bar",part:"menu-bar",ref:n=>this.mainMenuBar=n},r("nav",{key:"ad22eb106a5d9c0ffd8eac8e5e995833f8adcd7e","aria-label":"Global navigation",class:"gn__main-menu "+(this.shouldResize?"resizing":""),part:"main-menu",ref:n=>this.mainMenu=n},this.breakpoint>n.mainMenu.breakpoint&&r("nano-icon-button",{key:"c399d0e0c2a909a94a0b93ad00ebc5cb34e8c224",class:"gn__overflow-button",iconName:"light/bars",label:"Open Menu",onClick:()=>this.overflowMenu.show()}),r("slot",{key:"ee03de047e3937687e722a88e34356ffc151a9e9",name:"logo"},r("a",{key:"a39aad67426cdc5ce75fa334a303229bfab9e58c",href:this.logoUrl,class:"gn__logo-link",part:"logo-link"},r("img",this.breakpoint<=n.logo.breakpoint?{src:t("../nano-assets/ont-logo.svg"),alt:"Oxford Nanopore Technologies logo. Features a stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--large",width:"152",height:"36",part:"logo logo--large"}:{src:t("../nano-assets/ont-wheel.svg"),alt:"Oxford Nanopore Technologies logo. A stylised representation of a nanopore,\n (a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.",class:"gn__logo gn__logo--small",width:"36",height:"36",part:"logo logo--small"}))),this.breakpoint<=n.mainMenu.breakpoint&&r("div",{key:"46a926ede075e0bfde746fa174c0700a48bc308e",class:"gn__main-menu-links"},n.mainMenu.tpl()),r("div",{key:"e473ba724a01a0f596f6494b7bb452eef0c4ba53",class:"gn__main-menu-actions"},!this.myAccountData||!!this.searchIndices.length&&r("nano-dropdown",{key:"90fa8c9cc0566374afce5f8c722aa98176372d7d",dialogTitle:"Search Oxford Nanopore Technologies",placement:"bottom",class:"gn__search-dropdown",skidding:-30,distance:25,open:this.searchBarShown,onNanoAfterShow:this.handleSearchOpenEvent,onNanoAfterHide:this.handleSearchCloseEvent,autoOpen:!!this.searchIndices.length},r("nano-icon-button",{key:"73c7c855dd6baf3259429d55c9bf3d58c2e8ec03",class:"gn__search-button",slot:"trigger",iconName:"light/magnifying-glass",label:"Search"}),r("form",{key:"f265a2ba3269f22c2efcbe73c7ffe4328fe9d0e8",ref:n=>this.searchForm=n,class:"gn__search-form",part:"search-form",onSubmit:this.onSearchSubmit},this.searchIndices.length>1&&r("nano-select",{key:"498ea9e7b0dd5bb10dd92b2df0fccc76295b1042",part:"search-select",label:"Which site do you wish to search in?",mask:!0,hideLabel:!0,value:this.activeIndex?.index,onNanoChange:this.handleSearchIndexChangeEvent},this.searchIndices.map((n=>r("nano-option",{selected:n.name===this.searchIndex,value:n.index},n.name||n.index)))),r("nano-input",{key:"78baa1860b433e8ee36cd6f2d34d026a7c1e8b21",ref:n=>this.searchInput=n,part:"search-input",label:"Search Oxford Nanopore Technologies",placeholder:"Search Oxford Nanopore...",hideLabel:!0,clearable:!0,showInlineError:!1,onNanoChange:n=>{this.handleSearchTermChangeEvent(n.detail.value)},onNanoInput:this.handleSearchTermInputEvent,debounce:500,value:this._searchValue},r("nano-icon",{key:"f3b612bba31b0b1a930b170711080bce93324322",slot:"end",name:"light/magnifying-glass"}),r("nano-datalist",{key:"a264479248b83b20cb42155e09c3033356a221b4",class:"gn__search-results",onNanoSelect:n=>n.preventDefault(),dropDownConfig:{tetherTo:this.searchForm},disableFilter:!0},this.searchLoading&&r("div",{key:"21d365a6554c31144d57900ec8cf50e6caa105b2",slot:"no-result",class:"gn__search-loading"},r("nano-spinner",{key:"b4f28c952fcfe765dea3ab7e4c0691e10de1317e"},"Searching...")),this.noResultPartial(),!!this.autocompleteResults?.hits.length&&[this.autocompleteResults.hits.map(((n,e)=>r("nano-option",{href:n.url,class:"gn__search-result",onClick:()=>{c.sendClick({index:this.activeIndex.index,eventName:"Global nav quick search - search result clicked",queryID:this.autocompleteResults.queryID,objectIDs:[n.objectID],positions:[e+1]})}},r("span",{innerHTML:this.autocompleteSnippet(n)})))),r("nano-option",{key:"b2a1dc7ff83c80599377850136d6233fa64cee3c",class:"gn__search-viewall",onNanoSelect:this.onSearchSubmit},"View all results")])))),r("div",{key:"38bc65edb00ef4876340fdfc1f308a6805a1e1ec",class:"gn__cart"},r("nano-icon-button",{key:"b590faedc935181b9230c82509360ddc2a19f1cf",iconName:"light/cart-shopping",label:"View your cart",href:this.cartUrl}),!!this.cartCount&&r("nano-badge",{key:"c7f45eea27607c6d4380ccdf3a7f2cacfd26bc80",theme:"danger",strength:"2"},this.cartCount>9?"9+":this.cartCount)),this.breakpoint<=n.contact.breakpoint?n.contact.tpl():"",this.isLoggedIn?r("nano-dropdown",{dialogTitle:"User menu",class:"gn__user-dropdown",distance:10,placement:"bottom-end"},r("button",{slot:"trigger",class:"gn__user-dropdown-trigger"},r("nano-icon",{name:"light/user"}),r("nano-icon",{name:"light/chevron-down",class:"gn__user-dropdown-chevron"}),!!this.msgCount&&r("nano-badge",{theme:"danger",strength:"2"},this.msgCount>9?"9+":this.msgCount)),this.loggedInPanel()):r("nano-cta",{secondary:!0,size:"small",icon:"false",class:"gn__login-cta"},r("a",{href:this.formatLoginLink(this.loginUrl)},"Login")))))),r("nano-global-search-results",{key:"6443d9f0199f87ba5ca73b62b6c3c9e5700731b4",part:"site-search-results"},r("div",{key:"db0ce2d9157f7144b0c50d0833386ed4eeabdd02",class:"gn__site",part:"site-wrapper"},r("slot",{key:"a9ac7197c149153532f16f8f0f428b5e46d11b72"})))))}static get assetsDirs(){return["assets"]}static get watchers(){return{myAccountUrl:["handleMyAccountUrl"],myAccountData:["processUserData","initSearch"],shouldResize:["breakpointChanged"],breakpoint:["breakpointChanged"],searchIndices:["handleSearchIndex"],searchIndex:["handleSearchIndex"]}}};h.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{--main-menu-bar-bg-color:var(--nano-color-base-0);--main-menu-text-color:var(--nano-color-base-1000);--main-menu-hover-text-color:var(--nano-color-primary-1000);--main-menu-active-text-color:var(--nano-color-primary-1200);--main-menu-active-border-color:var(--nano-color-primary-1000);--overflow-bg-color:var(--nano-color-grey-mono-1600);--overflow-text-color:var(--nano-color-basic-white);--overflow-hover-text-color:var(--nano-color-blue-cerulean-700);--overflow-active-text-color:var(--nano-color-blue-cerulean-300);display:block;color:var(--main-menu-text-color)}img{max-inline-size:none;display:block;block-size:revert-layer}::slotted(a),:host::slotted(a),a{text-decoration:none}a:has(img){display:inline-block}a:focus{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}nano-drawer:not(:defined){display:none}nano-badge{position:absolute;font-size:0.5625rem;pointer-events:none}.gn__cart{position:relative}.gn__cart nano-badge{inset-block-start:-0.35rem;inset-inline-end:-0.4rem}.gn__login-cta{--bg:transparent;--font-size:var(--nano-font-size-2xs);--padding-v:0.5em}.gn__menu-bar-wrapper{z-index:calc(var(--nano-z-index-menubar) + 1);position:relative}.gn__menu-bar-wrapper::after{content:"";position:absolute;block-size:1px;inline-size:100%;inset-inline:0;inset-block-end:-1px;z-index:-3;background-color:var(--nano-color-neutral-200)}.gn__menu-bar{inline-size:100%;overflow:clip;background-color:var(--main-menu-bar-bg-color)}.gn__menu-bar a{color:var(--main-menu-text-color)}.gn__menu-bar a:hover{color:var(--main-menu-hover-text-color)}.gn__menu-bar a:active{color:var(--main-menu-active-text-color)}.gn__main-menu{display:inline-flex;align-items:center;min-inline-size:100%;padding:var(--nano-spacing-md);transition:opacity var(--nano-transition-x-fast) ease;opacity:1}.gn__main-menu.resizing{transition:none;opacity:0}.gn__main-menu>*{margin-inline-end:var(--nano-spacing-xl)}.gn__main-menu>*:is(slot,slot-fb){display:flex}.gn__main-menu>*:last-child{margin-inline-end:0}.gn__overflow-button{--padding:0.5rem 0.875rem 0.5rem 0;margin-inline-end:0.875rem;font-size:1.125rem;position:relative}.gn__overflow-button::after{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-end:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__main-menu-links,.gn__main-menu-actions{display:inline-flex;align-items:center}.gn__main-menu-links .nano-icon,.gn__main-menu-links .nano-icon-button,.gn__main-menu-actions .nano-icon,.gn__main-menu-actions .nano-icon-button{--active-color:var(--main-menu-active-text-color);--hover-color:var(--main-menu-hover-text-color);font-size:1rem}.gn__main-menu-links .nano-icon-button:hover,.gn__main-menu-actions .nano-icon-button:hover{color:var(--main-menu-hover-text-color)}.gn__main-menu-links{gap:var(--nano-spacing-xl)}.gn__main-menu-links ::slotted(a),.gn__main-menu-links::slotted(a){color:var(--main-menu-text-color)}.gn__main-menu-links ::slotted(a:hover){color:var(--main-menu-hover-text-color)}.gn__main-menu-links ::slotted(*:active){color:var(--main-menu-active-text-color)}.gn__main-menu-actions{margin-inline-start:auto;font-size:0.9375rem;gap:var(--nano-spacing-md)}.gn__search-dropdown{--overflow:visible;--padding:0;--background:transparent}.gn__search-dropdown .nano-icon-button{position:relative}.gn__search-dropdown .nano-icon-button::before{content:"";position:absolute;background-color:var(--main-menu-active-border-color);block-size:4px;inset-inline:5px 2px;inset-block-end:-1.5625rem;transform:translateZ(0) scaleX(0);transform-origin:0 center;transition:transform var(--nano-transition-x-fast) ease-in-out}.gn__search-open .gn__search-dropdown .nano-icon-button::before{transform:translateZ(0) scaleX(1)}.gn__search-form{display:inline-flex;max-inline-size:100vw;inline-size:30.625rem}.gn__search-form .nano-select{--input-bg-color:var(--nano-color-neutral-200);flex:0}.gn__search-form .nano-select:focus-within{z-index:1}.gn__search-form .nano-select .form-ctrl__input{border-inline-end:none}.gn__search-form .nano-input{flex:1}.gn__search-results{--padding-start:var(--nano-spacing-md);--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);font-size:var(--nano-font-size-2xs)}.gn__search-loading{display:flex;justify-content:center}.gn__search-result{--padding-start:0.3125rem;--padding-top:var(--nano-spacing-sm);--padding-bottom:var(--nano-spacing-sm);--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-neutral-1400);font-size:var(--nano-font-size-2xs)}.gn__search-result .search__highlight{font-style:normal;background:var(--nano-color-highlight)}.gn__search-viewall{--bg-focus:var(--nano-color-primary-300);--color-focus:var(--nano-color-neutral-1400);--color:var(--nano-color-primary-1200)}.gn__search-viewall::part(label){justify-content:flex-end;text-decoration:underline}.gn__user-dropdown-trigger{all:unset;cursor:pointer;color:var(--nano-color-primary-1200);display:flex;white-space:nowrap;gap:var(--nano-spacing-xs);align-items:center;position:relative;padding-inline-start:var(--nano-spacing-md)}.gn__user-dropdown-trigger:hover{color:var(--main-menu-hover-text-color)}.gn__user-dropdown-trigger:active{color:var(--main-menu-active-text-color)}.gn__user-dropdown-trigger:focus-visible{outline:var(--nano-focus-ring);outline-offset:var(--nano-focus-ring-offset)}.gn__user-dropdown-trigger::before{content:"";position:absolute;inline-size:1px;block-size:100%;inset-inline-start:0;background-color:var(--nano-color-neutral-300);opacity:0.7;inset-block-start:0}.gn__user-dropdown-trigger .gn__user-dropdown-chevron{transition:rotate var(--nano-transition-x-fast) linear}[open] .gn__user-dropdown-trigger .gn__user-dropdown-chevron{rotate:180deg}.gn__user-dropdown-trigger nano-badge{inset-block-start:-0.7rem;inset-inline-end:-0.7rem}.gn__user-dropdown{--background:var(--overflow-bg-color);--padding:0;--overflow:visible}.gn__user-panel{inline-size:21.25rem;max-inline-size:21.25rem;color:var(--overflow-text-color);padding:var(--nano-spacing-md)}.gn__user-panel a{color:var(--overflow-text-color)}.gn__user-panel a:hover{text-decoration:underline;color:var(--overflow-hover-text-color)}.gn__user-panel-head{font-size:var(--nano-font-size-xs);line-height:var(--nano-line-height-normal);letter-spacing:var(--nano-letter-spacing-loose);padding-block-end:var(--nano-spacing-md);display:flex;align-items:center;gap:var(--nano-spacing-sm);font-size:var(--nano-font-size-xs)}.gn__user-panel-head .gn__user-avatar nano-icon{font-size:2.5rem}.gn__user-panel-body{display:flex;flex-direction:column}.gn__user-panel-body a{position:relative;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);padding-block:var(--nano-spacing-md)}.gn__user-panel-body a:first-child{border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__user-panel-foot{padding-block-start:var(--nano-spacing-md);display:flex;align-items:center;justify-content:space-between;gap:var(--nano-spacing-md)}.gn__drawer{--panel-background:var(--overflow-bg-color);--header-button-color:var(--overflow-text-color);--body-spacing:0;--header-spacing:var(--nano-spacing-md) 0;--footer-spacing:var(--nano-spacing-md)}.gn__drawer::part(title){display:flex;justify-content:flex-end}.gn__drawer::part(header-actions){order:-1}.gn__drawer-header{clip-path:inset(50%);block-size:1px;overflow:hidden;position:absolute;white-space:nowrap;inline-size:1px}.gn__drawer-menu{display:flex;flex-direction:column;margin:0 var(--nano-spacing-md);padding-block-end:var(--nano-spacing-md);color:var(--overflow-text-color);border-block-start:1px solid rgb(var(--nano-color-base-rgb-1000)/10%);position:relative}.gn__drawer-menu ::slotted(a),.gn__drawer-menu::slotted(a){padding:var(--nano-spacing-md) 0}.gn__drawer-menu ::slotted(a),.gn__drawer-menu ::slotted(.nano-nav-item),.gn__drawer-menu::slotted(a),.gn__drawer-menu::slotted(.nano-nav-item){--padding:var(--nano-spacing-md) 0;display:block;color:inherit !important;border-block-end:1px solid rgb(var(--nano-color-base-rgb-1000)/10%)}.gn__drawer-menu ::slotted(a:hover),.gn__drawer-menu ::slotted(.nano-nav-item:hover){text-decoration:underline;color:var(--overflow-hover-text-color) !important}';export{h as nano_global_nav}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Custom elements for Nanopore-Digital Web applications
|
|
3
|
+
*/
|
|
4
|
+
import{c as t}from"./nano-data-table-Bn4l0Q3q.js";import"./index-BM3Om9WE.js";import"./renderer-DpNDfhNy.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",e="stencil.table.worker",o=new URL("table.worker-DM_2DNEe.js",import.meta.url).href;let s;try{s=t(o,r,e)}catch(i){const m=new Blob(['importScripts("'+o+'")'],{type:"text/javascript"}),p=URL.createObjectURL(m);s=t(p,r,e),URL.revokeObjectURL(p)}export{s as worker,e as workerMsgId,r as workerName,o as workerPath}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
|
3
3
|
*/
|
|
4
|
-
(()=>{const n=(n,t)=>{const r=globalThis[t];return null!=r&&n instanceof r},t=r=>{if(null!=r){if(n(r,"ArrayBuffer")||n(r,"MessagePort")||n(r,"ImageBitmap")||n(r,"OffscreenCanvas"))return[r];if("object"==typeof r)return r.constructor===Object&&(r=Object.values(r)),Array.isArray(r)?r.flatMap(t):t(r.buffer)}return[]},r={},e="stencil.table.worker",o=e+".cb";addEventListener("message",(async({data:n})=>{if(n&&n[0]===e){let u,i,c=n[1],s=n[2],f=n[3],a=0,l=f.length;try{for(;a<l;a++)if(Array.isArray(f[a])&&f[a][0]===o){const n=f[a][1];f[a]=(...t)=>{postMessage([o,n,t])}}u=await r[s](...f)}catch(n){u=null,i=n instanceof Error?{isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:{isError:!1,value:n},u=void 0}const p=t(u);postMessage([e,c,u,i],p)}}));var u,i,c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var f=s(function(){if(i)return u;i=1;var n=/[\\^$.*+?()[\]{}|]/g,t=RegExp(n.source),r="object"==typeof self&&self&&self.Object===Object&&self,e="object"==typeof c&&c&&c.Object===Object&&c||r||Function("return this")(),o=Object.prototype.toString,s=e.Symbol,f=s?s.prototype:void 0,a=f?f.toString:void 0;return u=function(r){var e;return(r=null==(e=r)?"":function(n){if("string"==typeof n)return n;if(function(n){return"symbol"==typeof n||function(n){return!!n&&"object"==typeof n}(n)&&"[object Symbol]"==o.call(n)}(n))return a?a.call(n):"";var t=n+"";return"0"==t&&1/n==-1/0?"-0":t}(e))&&t.test(r)?r.replace(n,"\\$&"):r}}());function a(n,t,r,e){if("object"!=typeof n){if("exists"===t.type)return!!t.key.test(r.join("."))&&!!n;{const o=r.join(".");for(const n of e.ignorePaths)if(n.test(o))return!1;if(e.includePaths){let n=!1;for(const t of e.includePaths)if(t.test(o)){n=!0;break}if(!n)return!1}return!(t.key&&!t.key.test(o))&&function(n,t){return"string"==typeof n?t.checkString(n):"number"==typeof n&&t.checkNumber(n)}(n,t)}}if(Array.isArray(n)){for(const o of n)if(a(o,t,r,e))return!0}else for(const o in n){r.push(o);const u=a(n[o],t,r,e);if(r.pop(),u)return!0}return!1}function l(n,t,r,e){if(t.length>0){let o=!1;for(const u of t)if(a(n,u,[],e)?!u.negate:u.negate){if("OR"===r)return!0;o=!0}else if("AND"===r)return!1;return o}return!0}function p(n,t){const r=[];let e=!1,o=0,u="";for(let i=0;i<n.length;i++){const c=n[i];e?c===u&&(e=!1,u=""):'"'===c||"'"===c?(e=!0,u=c):c.match(t)&&!e&&(r.push(n.slice(o,i).trim()),o=i+1),i===n.length-1&&r.push(n.slice(o).trim())}return r.map((n=>n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'")?n.slice(1,-1):n)).filter(Boolean)}const d={"<":function(n){const t=Number(n[0]);return n=>n<t},"<=":function(n){const t=Number(n[0]);return n=>n<=t},"=":function(n){const t=n[0].split(",").filter(Boolean).map(Number);return n=>{for(const r of t)if(n===r)return!0;return!1}},">=":function(n){const t=Number(n[0]);return n=>n>=t},">":function(n){const t=Number(n[0]);return n=>n>t},"..":function(n){const t=Number(n[0]),r=Number(n[1]);return n=>n>=t&&n<=r}};function w(n){const{values:t,operator:r}=function(n){const t=/^\s*\(?\s*(?<startOperator><=|>=|<|=|>|\.\.\s*)?\s*(?<firstValue>-?\d*\.?\d+)\s*(?:(?<afterDots>\.\.)\s*(?<secondValue>-?\d*\.?\d*))?\s*\)?\s*$/.exec(n);if(!t)return{operator:"=",values:[n]};if(!t.groups)throw new Error("unreachable");const{startOperator:r,firstValue:e,afterDots:o,secondValue:u}=t.groups;let i=r;const c=e?[e]:[];return".."===r?i="<=":r||!o||u?o&&(i=".."):i=">=",u&&(Number(u)<Number(e)?c.unshift(u):c.push(u)),{values:c,operator:i||"="}}(n),e=d[r];if(!e)throw new Error(`unknown operator ${r}`);return e(t)}const h={"<":function(n){return t=>t<n[0]},"<=":function(n){return t=>t<=n[0]},"=":function(n,t){const r=p(n[0],",").filter(Boolean).map((n=>new RegExp(`^${f(n)}$`,t)));return n=>{for(const t of r)if(t.test(n))return!0;return!1}},"~":function(n,t){const r=p(n[0],",").filter(Boolean).map((n=>new RegExp(f(n),t)));return n=>{for(const t of r)if(t.test(n))return!0;return!1}},">=":function(n){return t=>t>=n[0]},">":function(n){return t=>t>n[0]},"..":function(n){return t=>t>=n[0]&&t<=n[1]}};function y(n,t){const{values:r,operator:e}=function(n){const t=n.split(".."),r=/^\s*\(?(?<operator><=|<|=|>=|>)?\s*(?<value>\S*)\s*\)?$/.exec(t[0]);if(!r)return{operator:"~",values:[n]};if(!r.groups)throw new Error("unreachable");const{value:e}=r.groups;let{operator:o}=r.groups;const u=t[1]?.trim();let i=[e];return t.length>1&&(o="..",u?e?e<u?i.push(u):i.unshift(u):(i=[u],o="<="):o=">="),{operator:o||"~",values:i}}(n),o=h[e];if(!o)throw new Error(`unreachable unknown operator ${e}`);return o(r,t)}function
|
|
4
|
+
(()=>{const n=(n,t)=>{const r=globalThis[t];return null!=r&&n instanceof r},t=r=>{if(null!=r){if(n(r,"ArrayBuffer")||n(r,"MessagePort")||n(r,"ImageBitmap")||n(r,"OffscreenCanvas"))return[r];if("object"==typeof r)return r.constructor===Object&&(r=Object.values(r)),Array.isArray(r)?r.flatMap(t):t(r.buffer)}return[]},r={},e="stencil.table.worker",o=e+".cb";addEventListener("message",(async({data:n})=>{if(n&&n[0]===e){let u,i,c=n[1],s=n[2],f=n[3],a=0,l=f.length;try{for(;a<l;a++)if(Array.isArray(f[a])&&f[a][0]===o){const n=f[a][1];f[a]=(...t)=>{postMessage([o,n,t])}}u=await r[s](...f)}catch(n){u=null,i=n instanceof Error?{isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:{isError:!1,value:n},u=void 0}const p=t(u);postMessage([e,c,u,i],p)}}));var u,i,c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var f=s(function(){if(i)return u;i=1;var n=/[\\^$.*+?()[\]{}|]/g,t=RegExp(n.source),r="object"==typeof self&&self&&self.Object===Object&&self,e="object"==typeof c&&c&&c.Object===Object&&c||r||Function("return this")(),o=Object.prototype.toString,s=e.Symbol,f=s?s.prototype:void 0,a=f?f.toString:void 0;return u=function(r){var e;return(r=null==(e=r)?"":function(n){if("string"==typeof n)return n;if(function(n){return"symbol"==typeof n||function(n){return!!n&&"object"==typeof n}(n)&&"[object Symbol]"==o.call(n)}(n))return a?a.call(n):"";var t=n+"";return"0"==t&&1/n==-1/0?"-0":t}(e))&&t.test(r)?r.replace(n,"\\$&"):r}}());function a(n,t,r,e){if("object"!=typeof n){if("exists"===t.type)return!!t.key.test(r.join("."))&&!!n;{const o=r.join(".");for(const n of e.ignorePaths)if(n.test(o))return!1;if(e.includePaths){let n=!1;for(const t of e.includePaths)if(t.test(o)){n=!0;break}if(!n)return!1}return!(t.key&&!t.key.test(o))&&function(n,t){return"string"==typeof n?t.checkString(n):"number"==typeof n&&t.checkNumber(n)}(n,t)}}if(Array.isArray(n)){for(const o of n)if(a(o,t,r,e))return!0}else for(const o in n){r.push(o);const u=a(n[o],t,r,e);if(r.pop(),u)return!0}return!1}function l(n,t,r,e){if(t.length>0){let o=!1;for(const u of t)if(a(n,u,[],e)?!u.negate:u.negate){if("OR"===r)return!0;o=!0}else if("AND"===r)return!1;return o}return!0}function p(n,t){const r=[];let e=!1,o=0,u="";for(let i=0;i<n.length;i++){const c=n[i];e?c===u&&(e=!1,u=""):'"'===c||"'"===c?(e=!0,u=c):c.match(t)&&!e&&(r.push(n.slice(o,i).trim()),o=i+1),i===n.length-1&&r.push(n.slice(o).trim())}return r.map((n=>n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'")?n.slice(1,-1):n)).filter(Boolean)}const d={"<":function(n){const t=Number(n[0]);return n=>n<t},"<=":function(n){const t=Number(n[0]);return n=>n<=t},"=":function(n){const t=n[0].split(",").filter(Boolean).map(Number);return n=>{for(const r of t)if(n===r)return!0;return!1}},">=":function(n){const t=Number(n[0]);return n=>n>=t},">":function(n){const t=Number(n[0]);return n=>n>t},"..":function(n){const t=Number(n[0]),r=Number(n[1]);return n=>n>=t&&n<=r}};function w(n){const{values:t,operator:r}=function(n){const t=/^\s*\(?\s*(?<startOperator><=|>=|<|=|>|\.\.\s*)?\s*(?<firstValue>-?\d*\.?\d+)\s*(?:(?<afterDots>\.\.)\s*(?<secondValue>-?\d*\.?\d*))?\s*\)?\s*$/.exec(n);if(!t)return{operator:"=",values:[n]};if(!t.groups)throw new Error("unreachable");const{startOperator:r,firstValue:e,afterDots:o,secondValue:u}=t.groups;let i=r;const c=e?[e]:[];return".."===r?i="<=":r||!o||u?o&&(i=".."):i=">=",u&&(Number(u)<Number(e)?c.unshift(u):c.push(u)),{values:c,operator:i||"="}}(n),e=d[r];if(!e)throw new Error(`unknown operator ${r}`);return e(t)}const h={"<":function(n){return t=>t<n[0]},"<=":function(n){return t=>t<=n[0]},"=":function(n,t){const r=p(n[0],",").filter(Boolean).map((n=>new RegExp(`^${f(n)}$`,t)));return n=>{for(const t of r)if(t.test(n))return!0;return!1}},"~":function(n,t){const r=p(n[0],",").filter(Boolean).map((n=>new RegExp(f(n),t)));return n=>{for(const t of r)if(t.test(n))return!0;return!1}},">=":function(n){return t=>t>=n[0]},">":function(n){return t=>t>n[0]},"..":function(n){return t=>t>=n[0]&&t<=n[1]}};function y(n,t){const{values:r,operator:e}=function(n){const t=n.split(".."),r=/^\s*\(?(?<operator><=|<|=|>=|>)?\s*(?<value>\S*)\s*\)?$/.exec(t[0]);if(!r)return{operator:"~",values:[n]};if(!r.groups)throw new Error("unreachable");const{value:e}=r.groups;let{operator:o}=r.groups;const u=t[1]?.trim();let i=[e];return t.length>1&&(o="..",u?e?e<u?i.push(u):i.unshift(u):(i=[u],o="<="):o=">="),{operator:o||"~",values:i}}(n),o=h[e];if(!o)throw new Error(`unreachable unknown operator ${e}`);return o(r,t)}function g(n,t={}){const{index:r=!1,predicate:e="AND",ignorePaths:o=[],includePaths:u,pathAlias:i={}}=t,c=t.limit||1/0,s=t.caseSensitive?"":"i";let a=t.keywords||[];const d=function(n,t){const{insensitive:r}=t,e={};for(const[t,o]of Object.entries(n))e[t]=o instanceof RegExp?o:new RegExp(`(^|\\.)${f(o)}(\\.|$)`,r);return e}(i,{insensitive:s}),h=o.map((n=>"string"==typeof n?new RegExp(`(^|\\.)${f(n)}(\\.|$)`,s):n)),g=u?u.map((n=>"string"==typeof n?new RegExp(`(^|\\.)${f(n)}(\\.|$)`,s):n)):void 0;"string"==typeof a&&(a=p(a,/[\t\n\r ]/));const b=function(n,t={}){return n.map((n=>function(n,t={}){const{caseSensitive:r,pathAlias:e={}}=t,o=r?"":"i";let u=!1;n.startsWith("-")&&(u=!0,n=n.slice(1));const i=n.indexOf(":");if(-1!==i){const t=n.slice(Math.max(0,i+1));if(i>0){const r=n.slice(0,Math.max(0,i));return"is"===r?{type:"exists",negate:u,key:new RegExp(`(^|\\.)${f(t)}(\\.|$)`,o)}:{type:"matches",negate:u,key:e[r]||new RegExp(`(^|\\.)${f(r)}(\\.|$)`,o),checkNumber:w(t),checkString:y(t,o)}}}return{type:"matches",negate:u,checkNumber:w(n),checkString:y(n,o)}}(n,t)))}(a,{caseSensitive:t.caseSensitive,pathAlias:d});let v=0;if(r){const t=[];for(let r=0;r<n.length&&v<c;r++)l(n[r],b,e,{ignorePaths:h,includePaths:g})&&(v=t.push(r));return t}{const t=[];for(let r=0;r<n.length&&v<c;r++)l(n[r],b,e,{ignorePaths:h,includePaths:g})&&(v=t.push(n[r]));return t}}function b(n,t){if(!n||null==t)return;const r=String(t);if(void 0!==n[r])return n[r];if(!r.includes("."))return n[t];const e=r.split(".");let o=n;for(const n of e){if(null==o)return;o=o[n]}return o}const v=new Map;async function m(n,t){const r=v.get(n);if(!r)throw new Error("cannot find worker with ID "+n);if(r.searchTerm=t,!t||!t.length)return r.filterRows=r.rows,$(r,r.rows);const e=r.columns.filter((n=>!1!==n.searchable));return r.filterRows=g(r.rows,{keywords:t,predicate:"OR",includePaths:[...e.map((n=>n.prop))],ignorePaths:["__uuid","__index"]}),$(r,r.filterRows)}function E(n,t,r=[],e=!1){return r&&r.length||e||(r=function(n){return n.columns.filter((n=>null!=n.filter)).reduce(((n,t)=>{const{prop:r,filter:e}=t;return n.push({prop:r,filter:e}),n}),[])}(n)),r&&r.length?(r.forEach((n=>{t="boolean"==typeof n.filter?t.filter((t=>b(t,n.prop)===n.filter)):g(t,{predicate:"string"==typeof n.filter?"AND":"OR",keywords:n.filter,includePaths:[n.prop],ignorePaths:["__uuid","__index"]})})),t):t}function k(n,t,r,e){if(!r&&!e){const t=function(n){const t=n.columns.find((n=>!!n.order));if(t){const{prop:n,order:r}=t;return{prop:n,order:r}}return null}(n);t&&({prop:r,order:e}=t)}if(!r||!e||!t.length)return t;const o=n.columns.find((n=>n.prop===r));return o?.sortCompareFn&&"function"==typeof o.sortCompareFn?t.slice().sort(o.sortCompareFn(r,e)):"text"===o?.type&&"string"==typeof b(t[0],r)?t.slice().sort(((n,t)=>{const o=b(n,r),u=b(t,r);return o?u?"asc"===e?o.localeCompare(u):u.localeCompare(o):-1:1})):t.slice().sort(((n,t)=>{const o=b(n,r),u=b(t,r);return[void 0,null].includes(o)?1:[void 0,null].includes(u)?-1:o<u?"asc"===e?-1:1:o>u?"asc"===e?1:-1:0}))}function $(n,t){return k(n,t=E(n,t))}function x(n){return n.map((n=>(n?.sortCompareFn&&"string"==typeof n.sortCompareFn&&(n.sortCompareFn=new Function("return "+n.sortCompareFn)()),n)))}async function N(n){v.delete(n)}r.createWorkerStore=async function(n,t){const r=Date.now().toString(36)+Math.random().toString(36).substring(2);return v.set(r,{rows:n,columns:x(t)}),r},r.destroyWorkerStore=N,r.syncConfigToWorker=async function(n,t){const r=v.get(n);if(!r)throw new Error("cannot find worker with ID "+n);return r.columns=x(t),r.rows||r.columns||N(n),!0},r.syncDataToWorker=async function(n,t){const r=v.get(n);if(!r)throw new Error("cannot find worker with ID "+n);return r.rows=t,r.rows||r.columns||N(n),!0},r.workerFilter=async function(n,t){const r=v.get(n);if(!r)throw new Error("cannot find worker with ID "+n);const e=t&&t.length||!r.searchTerm?r.searchTerm?r.filterRows:r.rows:await m(n,r.searchTerm);return r.filterRows=E(r,e,t,!0),k(r,r.filterRows)},r.workerSearch=m,r.workerSort=async function(n,t,r){const e=v.get(n);if(!e)throw new Error("cannot find worker with ID "+n);return k(e,e.filterRows||e.rows,t,r)}})();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accesses a nested property using dot notation.
|
|
3
|
+
* @param obj - the object to access
|
|
4
|
+
* @param path - the property path (e.g., 'props.nested.name')
|
|
5
|
+
* @returns the value at the path, or undefined if not found
|
|
6
|
+
*/
|
|
7
|
+
export declare function getNestedProperty(obj: any, path: string | number): any;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { VNode } from '../../stencil-public-runtime';
|
|
2
|
+
import { getNestedProperty } from './table.property-utils';
|
|
2
3
|
import type { TableTypes } from './table-interface';
|
|
3
4
|
type ValidRenderTypes = 'tr' | 'th' | 'td';
|
|
5
|
+
export { getNestedProperty };
|
|
4
6
|
/**
|
|
5
7
|
* Get a model object for custom cell / property renderers.
|
|
6
8
|
* @param rowIndex - the current row index being rendered
|
|
@@ -60,4 +62,3 @@ export declare function headerPinClasses(type: ValidRenderTypes, vPinned?: Table
|
|
|
60
62
|
export declare function classListToStr(classes: {
|
|
61
63
|
[key: string]: boolean;
|
|
62
64
|
}): string;
|
|
63
|
-
export {};
|
|
@@ -42,7 +42,7 @@ export declare class GlobalNav implements ComponentInterface {
|
|
|
42
42
|
/** Url to the Nanopore contact page */
|
|
43
43
|
contactUrl: string;
|
|
44
44
|
private _sessionRedirect;
|
|
45
|
-
/** A url to take the user after login
|
|
45
|
+
/** A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded */
|
|
46
46
|
get sessionRedirect(): string;
|
|
47
47
|
set sessionRedirect(val: string);
|
|
48
48
|
/** MyAccount store cart count.*/
|
|
@@ -1620,7 +1620,7 @@ export namespace Components {
|
|
|
1620
1620
|
*/
|
|
1621
1621
|
"searchValue": string;
|
|
1622
1622
|
/**
|
|
1623
|
-
* A url to take the user after login
|
|
1623
|
+
* A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded
|
|
1624
1624
|
*/
|
|
1625
1625
|
"sessionRedirect": string;
|
|
1626
1626
|
/**
|
|
@@ -6803,7 +6803,7 @@ declare namespace LocalJSX {
|
|
|
6803
6803
|
*/
|
|
6804
6804
|
"searchValue"?: string;
|
|
6805
6805
|
/**
|
|
6806
|
-
* A url to take the user after login
|
|
6806
|
+
* A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded
|
|
6807
6807
|
*/
|
|
6808
6808
|
"sessionRedirect"?: string;
|
|
6809
6809
|
}
|
package/docs-json.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-
|
|
2
|
+
"timestamp": "2026-02-18T15:38:06",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.36.1",
|
|
@@ -3369,7 +3369,7 @@
|
|
|
3369
3369
|
"references": {
|
|
3370
3370
|
"Breadcrumb": {
|
|
3371
3371
|
"location": "local",
|
|
3372
|
-
"path": "/builds/
|
|
3372
|
+
"path": "/builds/YtJk83se/0/Digital/nano-components/packages/components/src/components/breadcrumb/breadcrumb.tsx",
|
|
3373
3373
|
"id": "src/components/breadcrumb/breadcrumb.tsx::Breadcrumb"
|
|
3374
3374
|
}
|
|
3375
3375
|
}
|
|
@@ -13315,7 +13315,7 @@
|
|
|
13315
13315
|
"mutable": false,
|
|
13316
13316
|
"attr": "session-redirect",
|
|
13317
13317
|
"reflectToAttr": false,
|
|
13318
|
-
"docs": "A url to take the user after login
|
|
13318
|
+
"docs": "A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded",
|
|
13319
13319
|
"docsTags": [],
|
|
13320
13320
|
"values": [
|
|
13321
13321
|
{
|
package/docs-vscode.json
CHANGED
|
@@ -2051,7 +2051,7 @@
|
|
|
2051
2051
|
},
|
|
2052
2052
|
{
|
|
2053
2053
|
"name": "session-redirect",
|
|
2054
|
-
"description": "A url to take the user after login
|
|
2054
|
+
"description": "A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded"
|
|
2055
2055
|
}
|
|
2056
2056
|
]
|
|
2057
2057
|
},
|
package/hydrate/index.js
CHANGED
|
@@ -14780,7 +14780,7 @@ class GlobalNav {
|
|
|
14780
14780
|
/** Url to the Nanopore contact page */
|
|
14781
14781
|
contactUrl = 'https://nanoporetech.com/contact';
|
|
14782
14782
|
_sessionRedirect = window.location.href;
|
|
14783
|
-
/** A url to take the user after login
|
|
14783
|
+
/** A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded */
|
|
14784
14784
|
get sessionRedirect() {
|
|
14785
14785
|
return encodeURIComponent(this._sessionRedirect);
|
|
14786
14786
|
}
|
|
@@ -15188,7 +15188,11 @@ class GlobalNav {
|
|
|
15188
15188
|
return;
|
|
15189
15189
|
return (h("div", { part: "user-panel", class: `gn__user-panel nano-theme-dark` }, h("div", { class: "gn__user-panel-head", slot: "label" }, h("nano-avatar", { initials: this.myAccountUser.first_name?.charAt(0) +
|
|
15190
15190
|
this.myAccountUser.last_name?.charAt(0) }, this.myAccountUser.small_avatar_url &&
|
|
15191
|
-
!this.myAccountUser.small_avatar_url.includes('generic') && (h("img", { src: this.myAccountUser.small_avatar_url, alt: "User Avatar", height: 40, width: 40 }))), h("div", null, this.myAccountUser.name, h("br", null), this.myAccountUser.job_title
|
|
15191
|
+
!this.myAccountUser.small_avatar_url.includes('generic') && (h("img", { src: this.myAccountUser.small_avatar_url, alt: "User Avatar", height: 40, width: 40 }))), h("div", null, this.myAccountUser.name, h("br", null), this.myAccountUser.job_title && this.myAccountUser?.company
|
|
15192
|
+
? `${this.myAccountUser.job_title}, ${this.myAccountUser.company}`
|
|
15193
|
+
: this.myAccountUser.job_title ||
|
|
15194
|
+
this.myAccountUser.company ||
|
|
15195
|
+
'')), h("div", { class: "gn__user-panel-body" }, this.userLinks.map((link) => (h("a", { href: link.address, target: link.target || undefined }, link.title, (link.title === 'Messages' ||
|
|
15192
15196
|
link.address.includes(this.msgUrl) ||
|
|
15193
15197
|
this.msgUrl.includes(link.address)) &&
|
|
15194
15198
|
this.msgCount > 0 && (h("nano-badge", { theme: "danger", strength: "2" }, this.msgCount)))))), h("div", { class: "gn__user-panel-foot" }, h("nano-cta", { secondary: true, size: "small", icon: "false", class: "gn__login-cta" }, h("a", { href: this.formatLoginLink(this.logoutUrl) }, "Logout")))));
|
|
@@ -15233,21 +15237,21 @@ class GlobalNav {
|
|
|
15233
15237
|
}
|
|
15234
15238
|
render() {
|
|
15235
15239
|
const bpps = this.bpPartials;
|
|
15236
|
-
return (h(Host, { key: '
|
|
15240
|
+
return (h(Host, { key: '63e6202a06bc4bc7a6a63f88d1923c3321a2b47c', class: {
|
|
15237
15241
|
'overflow-menu': this.breakpoint > bpps.mainMenu.breakpoint,
|
|
15238
15242
|
'bar-menu': this.breakpoint <= bpps.mainMenu.breakpoint,
|
|
15239
15243
|
'nano-global-nav': true,
|
|
15240
|
-
} }, h("div", { key: '
|
|
15244
|
+
} }, h("div", { key: '7fe0cb9446b86233ed7727fdc9aade6b94cb72eb', class: {
|
|
15241
15245
|
gn: true,
|
|
15242
15246
|
'gn__search-open': this.searchBarShown,
|
|
15243
|
-
} }, h("nano-drawer", { key: '
|
|
15247
|
+
} }, h("nano-drawer", { key: 'ef476cfee137ebbee63c2f7a99935d4aafd2f7e4', ref: (el) => (this.overflowMenu = el), label: "Main menu", part: "drawer", class: "gn__drawer nano-theme-dark", placement: "start", open: this.overflowOpen, onNanoAfterHide: () => (this.overflowOpen = false), onNanoAfterShow: () => (this.overflowOpen = true) }, h("div", { key: 'c4cbe27955caffeb4f4a7dc755b6b08bf40a7f48', class: "gn__drawer-header", part: "overflow-header", slot: "label" }, "Main menu"), h("nav", { key: '26ec816c93427ce9f9cc4025e327b5e6cf9ba3e2', class: "gn__drawer-menu", part: "overflow-menu" }, this.breakpoint > bpps.mainMenu.breakpoint
|
|
15244
15248
|
? bpps.mainMenu.tpl()
|
|
15245
|
-
: '', h("slot", { key: '
|
|
15249
|
+
: '', h("slot", { key: '0693a9f4afdf63e63151b3f3fd4d3a0bbedde4ef', name: "overflow" }))), h("div", { key: 'd9ff383fb0f91876a533e8eb98bc47817b044729', class: "gn__menu-bar-wrapper" }, h("div", { key: '4536fd7593626672f20191b197a55b3d7b10b633', class: "gn__menu-bar", part: "menu-bar", ref: (el) => (this.mainMenuBar = el) }, h("nav", { key: 'ad22eb106a5d9c0ffd8eac8e5e995833f8adcd7e', "aria-label": "Global navigation", class: `gn__main-menu ${this.shouldResize ? 'resizing' : ''}`, part: "main-menu", ref: (el) => (this.mainMenu = el) }, this.breakpoint > bpps.mainMenu.breakpoint && (h("nano-icon-button", { key: 'c399d0e0c2a909a94a0b93ad00ebc5cb34e8c224', class: "gn__overflow-button", iconName: "light/bars", label: "Open Menu", onClick: () => this.overflowMenu.show() })), h("slot", { key: 'ee03de047e3937687e722a88e34356ffc151a9e9', name: "logo" }, h("a", { key: 'a39aad67426cdc5ce75fa334a303229bfab9e58c', href: this.logoUrl, class: "gn__logo-link", part: "logo-link" }, this.breakpoint <= bpps.logo.breakpoint ? (h("img", { src: getAssetPath('../nano-assets/ont-logo.svg'), alt: `Oxford Nanopore Technologies logo. Features a stylised representation of a nanopore,
|
|
15246
15250
|
(a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.`, class: "gn__logo gn__logo--large", width: "152", height: "36", part: "logo logo--large" })) : (h("img", { src: getAssetPath('../nano-assets/ont-wheel.svg'), alt: `Oxford Nanopore Technologies logo. A stylised representation of a nanopore,
|
|
15247
|
-
(a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.`, class: "gn__logo gn__logo--small", width: "36", height: "36", part: "logo logo--small" })))), this.breakpoint <= bpps.mainMenu.breakpoint && (h("div", { key: '
|
|
15248
|
-
(!!this.searchIndices.length && (h("nano-dropdown", { key: '
|
|
15251
|
+
(a tiny protein channel embedded in a membrane) through which DNA or RNA molecules are passed in for sequencing.`, class: "gn__logo gn__logo--small", width: "36", height: "36", part: "logo logo--small" })))), this.breakpoint <= bpps.mainMenu.breakpoint && (h("div", { key: '46a926ede075e0bfde746fa174c0700a48bc308e', class: "gn__main-menu-links" }, bpps.mainMenu.tpl())), h("div", { key: 'e473ba724a01a0f596f6494b7bb452eef0c4ba53', class: "gn__main-menu-actions" }, !this.myAccountData ||
|
|
15252
|
+
(!!this.searchIndices.length && (h("nano-dropdown", { key: '90fa8c9cc0566374afce5f8c722aa98176372d7d', dialogTitle: "Search Oxford Nanopore Technologies", placement: "bottom", class: "gn__search-dropdown", skidding: -30, distance: 25, open: this.searchBarShown, onNanoAfterShow: this.handleSearchOpenEvent, onNanoAfterHide: this.handleSearchCloseEvent, autoOpen: !!this.searchIndices.length }, h("nano-icon-button", { key: '73c7c855dd6baf3259429d55c9bf3d58c2e8ec03', class: "gn__search-button", slot: "trigger", iconName: "light/magnifying-glass", label: "Search" }), h("form", { key: 'f265a2ba3269f22c2efcbe73c7ffe4328fe9d0e8', ref: (form) => (this.searchForm = form), class: "gn__search-form", part: "search-form", onSubmit: this.onSearchSubmit }, this.searchIndices.length > 1 && (h("nano-select", { key: '498ea9e7b0dd5bb10dd92b2df0fccc76295b1042', part: "search-select", label: "Which site do you wish to search in?", mask: true, hideLabel: true, value: this.activeIndex?.index, onNanoChange: this.handleSearchIndexChangeEvent }, this.searchIndices.map((index) => (h("nano-option", { selected: index.name === this.searchIndex, value: index.index }, index.name || index.index))))), h("nano-input", { key: '78baa1860b433e8ee36cd6f2d34d026a7c1e8b21', ref: (ele) => (this.searchInput = ele), part: "search-input", label: "Search Oxford Nanopore Technologies", placeholder: "Search Oxford Nanopore...", hideLabel: true, clearable: true, showInlineError: false, onNanoChange: (e) => {
|
|
15249
15253
|
this.handleSearchTermChangeEvent(e.detail.value);
|
|
15250
|
-
}, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, h("nano-icon", { key: '
|
|
15254
|
+
}, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, h("nano-icon", { key: 'f3b612bba31b0b1a930b170711080bce93324322', slot: "end", name: "light/magnifying-glass" }), h("nano-datalist", { key: 'a264479248b83b20cb42155e09c3033356a221b4', class: "gn__search-results", onNanoSelect: (e) => e.preventDefault(), dropDownConfig: { tetherTo: this.searchForm }, disableFilter: true }, this.searchLoading && (h("div", { key: '21d365a6554c31144d57900ec8cf50e6caa105b2', slot: "no-result", class: "gn__search-loading" }, h("nano-spinner", { key: 'b4f28c952fcfe765dea3ab7e4c0691e10de1317e' }, "Searching..."))), this.noResultPartial(), !!this.autocompleteResults?.hits.length && [
|
|
15251
15255
|
this.autocompleteResults.hits.map((hit, i) => (h("nano-option", { href: hit.url, class: "gn__search-result", onClick: () => {
|
|
15252
15256
|
searchInsight.sendClick({
|
|
15253
15257
|
index: this.activeIndex.index,
|
|
@@ -15257,10 +15261,10 @@ class GlobalNav {
|
|
|
15257
15261
|
positions: [i + 1],
|
|
15258
15262
|
});
|
|
15259
15263
|
} }, h("span", { innerHTML: this.autocompleteSnippet(hit) })))),
|
|
15260
|
-
h("nano-option", { key: '
|
|
15261
|
-
])))))), h("div", { key: '
|
|
15264
|
+
h("nano-option", { key: 'b2a1dc7ff83c80599377850136d6233fa64cee3c', class: "gn__search-viewall", onNanoSelect: this.onSearchSubmit }, "View all results"),
|
|
15265
|
+
])))))), h("div", { key: '38bc65edb00ef4876340fdfc1f308a6805a1e1ec', class: "gn__cart" }, h("nano-icon-button", { key: 'b590faedc935181b9230c82509360ddc2a19f1cf', iconName: "light/cart-shopping", label: "View your cart", href: this.cartUrl }), !!this.cartCount && (h("nano-badge", { key: 'c7f45eea27607c6d4380ccdf3a7f2cacfd26bc80', theme: "danger", strength: "2" }, this.cartCount > 9 ? '9+' : this.cartCount))), this.breakpoint <= bpps.contact.breakpoint
|
|
15262
15266
|
? bpps.contact.tpl()
|
|
15263
|
-
: '', this.isLoggedIn ? (h("nano-dropdown", { dialogTitle: "User menu", class: "gn__user-dropdown", distance: 10, placement: "bottom-end" }, h("button", { slot: "trigger", class: "gn__user-dropdown-trigger" }, h("nano-icon", { name: "light/user" }), h("nano-icon", { name: "light/chevron-down", class: "gn__user-dropdown-chevron" }), !!this.msgCount && (h("nano-badge", { theme: "danger", strength: "2" }, this.msgCount > 9 ? '9+' : this.msgCount))), this.loggedInPanel())) : (h("nano-cta", { secondary: true, size: "small", icon: "false", class: "gn__login-cta" }, h("a", { href: this.formatLoginLink(this.loginUrl) }, "Login"))))))), h("nano-global-search-results", { key: '
|
|
15267
|
+
: '', this.isLoggedIn ? (h("nano-dropdown", { dialogTitle: "User menu", class: "gn__user-dropdown", distance: 10, placement: "bottom-end" }, h("button", { slot: "trigger", class: "gn__user-dropdown-trigger" }, h("nano-icon", { name: "light/user" }), h("nano-icon", { name: "light/chevron-down", class: "gn__user-dropdown-chevron" }), !!this.msgCount && (h("nano-badge", { theme: "danger", strength: "2" }, this.msgCount > 9 ? '9+' : this.msgCount))), this.loggedInPanel())) : (h("nano-cta", { secondary: true, size: "small", icon: "false", class: "gn__login-cta" }, h("a", { href: this.formatLoginLink(this.loginUrl) }, "Login"))))))), h("nano-global-search-results", { key: '6443d9f0199f87ba5ca73b62b6c3c9e5700731b4', part: "site-search-results" }, h("div", { key: 'db0ce2d9157f7144b0c50d0833386ed4eeabdd02', class: "gn__site", part: "site-wrapper" }, h("slot", { key: 'a9ac7197c149153532f16f8f0f428b5e46d11b72' }))))));
|
|
15264
15268
|
}
|
|
15265
15269
|
static get assetsDirs() { return ["assets"]; }
|
|
15266
15270
|
static get watchers() { return {
|
|
@@ -20716,6 +20720,39 @@ function filter$1(data, options = {}) {
|
|
|
20716
20720
|
}
|
|
20717
20721
|
}
|
|
20718
20722
|
|
|
20723
|
+
// Separate file (so it's safe to import into the worker)
|
|
20724
|
+
/**
|
|
20725
|
+
* Accesses a nested property using dot notation.
|
|
20726
|
+
* @param obj - the object to access
|
|
20727
|
+
* @param path - the property path (e.g., 'props.nested.name')
|
|
20728
|
+
* @returns the value at the path, or undefined if not found
|
|
20729
|
+
*/
|
|
20730
|
+
function getNestedProperty(obj, path) {
|
|
20731
|
+
if (!obj || path === null || path === undefined)
|
|
20732
|
+
return undefined;
|
|
20733
|
+
// Convert to string for consistent handling
|
|
20734
|
+
const pathStr = String(path);
|
|
20735
|
+
// Check for a flattened property first (optimization for transformed values)
|
|
20736
|
+
// e.g., obj["user.birthDate"] takes precedence over obj.user.birthDate
|
|
20737
|
+
if (obj[pathStr] !== undefined) {
|
|
20738
|
+
return obj[pathStr];
|
|
20739
|
+
}
|
|
20740
|
+
// If the path doesn't contain a dot, just return the direct property
|
|
20741
|
+
if (!pathStr.includes('.')) {
|
|
20742
|
+
return obj[path];
|
|
20743
|
+
}
|
|
20744
|
+
// Split the path and traverse the object
|
|
20745
|
+
const keys = pathStr.split('.');
|
|
20746
|
+
let result = obj;
|
|
20747
|
+
for (const key of keys) {
|
|
20748
|
+
if (result === null || result === undefined) {
|
|
20749
|
+
return undefined;
|
|
20750
|
+
}
|
|
20751
|
+
result = result[key];
|
|
20752
|
+
}
|
|
20753
|
+
return result;
|
|
20754
|
+
}
|
|
20755
|
+
|
|
20719
20756
|
const dataWorkers = new Map();
|
|
20720
20757
|
function uid() {
|
|
20721
20758
|
return Date.now().toString(36) + Math.random().toString(36).substring(2);
|
|
@@ -20805,7 +20842,7 @@ function filter(workerStore, rows, filters = [], force = false) {
|
|
|
20805
20842
|
return rows;
|
|
20806
20843
|
filters.forEach((filter) => {
|
|
20807
20844
|
if (typeof filter.filter === 'boolean') {
|
|
20808
|
-
rows = rows.filter((row) => row
|
|
20845
|
+
rows = rows.filter((row) => getNestedProperty(row, filter.prop) === filter.filter);
|
|
20809
20846
|
}
|
|
20810
20847
|
else {
|
|
20811
20848
|
rows = filter$1(rows, {
|
|
@@ -20868,27 +20905,32 @@ function sort(workerStore, rows, prop, order) {
|
|
|
20868
20905
|
return sorted;
|
|
20869
20906
|
}
|
|
20870
20907
|
// text sort
|
|
20871
|
-
if (col?.type === 'text' &&
|
|
20908
|
+
if (col?.type === 'text' &&
|
|
20909
|
+
typeof getNestedProperty(rows[0], prop) === 'string') {
|
|
20872
20910
|
const sorted = rows.slice().sort((a, b) => {
|
|
20873
|
-
|
|
20911
|
+
const aVal = getNestedProperty(a, prop);
|
|
20912
|
+
const bVal = getNestedProperty(b, prop);
|
|
20913
|
+
if (!aVal)
|
|
20874
20914
|
return 1;
|
|
20875
|
-
if (!
|
|
20915
|
+
if (!bVal)
|
|
20876
20916
|
return -1;
|
|
20877
20917
|
return order === 'asc'
|
|
20878
|
-
?
|
|
20879
|
-
:
|
|
20918
|
+
? aVal.localeCompare(bVal)
|
|
20919
|
+
: bVal.localeCompare(aVal);
|
|
20880
20920
|
});
|
|
20881
20921
|
return sorted;
|
|
20882
20922
|
}
|
|
20883
20923
|
// catch-all - number / date / string sort
|
|
20884
20924
|
const sorted = rows.slice().sort((a, b) => {
|
|
20885
|
-
|
|
20925
|
+
const aVal = getNestedProperty(a, prop);
|
|
20926
|
+
const bVal = getNestedProperty(b, prop);
|
|
20927
|
+
if ([undefined, null].includes(aVal))
|
|
20886
20928
|
return 1;
|
|
20887
|
-
if ([undefined, null].includes(
|
|
20929
|
+
if ([undefined, null].includes(bVal))
|
|
20888
20930
|
return -1;
|
|
20889
|
-
if (
|
|
20931
|
+
if (aVal < bVal)
|
|
20890
20932
|
return order === 'asc' ? -1 : 1;
|
|
20891
|
-
if (
|
|
20933
|
+
if (aVal > bVal)
|
|
20892
20934
|
return order === 'asc' ? 1 : -1;
|
|
20893
20935
|
return 0;
|
|
20894
20936
|
});
|
|
@@ -21006,8 +21048,9 @@ function storeSetData(host, rows) {
|
|
|
21006
21048
|
// try our best to discern the column type (from first row) if unset
|
|
21007
21049
|
if (unknownCols.length && i === 0) {
|
|
21008
21050
|
store.config.state.columns = cols.map((col) => {
|
|
21009
|
-
|
|
21010
|
-
|
|
21051
|
+
const val = getNestedProperty(row, col.prop);
|
|
21052
|
+
if (unknownCols.includes(col) && val && !col.type) {
|
|
21053
|
+
col.type = getDataType(val);
|
|
21011
21054
|
if (col.type === 'date')
|
|
21012
21055
|
dateCols.push(col.prop);
|
|
21013
21056
|
}
|
|
@@ -21018,12 +21061,16 @@ function storeSetData(host, rows) {
|
|
|
21018
21061
|
dateCols.forEach((colName) => {
|
|
21019
21062
|
// coerce any date type;
|
|
21020
21063
|
// Date(), timestamp, valid date string
|
|
21021
|
-
const
|
|
21022
|
-
|
|
21064
|
+
const cellValue = getNestedProperty(row, colName);
|
|
21065
|
+
const coerceDate = new Date(cellValue);
|
|
21066
|
+
if (!!coerceDate && Number(coerceDate)) {
|
|
21067
|
+
// Store as a flattened property (e.g., row["user.birthDate"])
|
|
21068
|
+
// getNestedProperty will check this first before traversing nested structure
|
|
21023
21069
|
row[colName] = Number(coerceDate);
|
|
21070
|
+
}
|
|
21024
21071
|
});
|
|
21025
21072
|
row['__index'] = i;
|
|
21026
|
-
row['__uuid'] = cyrb53(cols.map((c) => row
|
|
21073
|
+
row['__uuid'] = cyrb53(cols.map((c) => getNestedProperty(row, c.prop)).join());
|
|
21027
21074
|
return row;
|
|
21028
21075
|
});
|
|
21029
21076
|
store.data.state.rows = rows;
|
|
@@ -21085,7 +21132,9 @@ function colDataModel(rowIndex, colIndex) {
|
|
|
21085
21132
|
const column = columns[colIndex];
|
|
21086
21133
|
const prop = column?.prop;
|
|
21087
21134
|
const rowModel = rows[rowIndex];
|
|
21088
|
-
const cellModel = rowModel
|
|
21135
|
+
const cellModel = rowModel
|
|
21136
|
+
? getNestedProperty(rowModel, columns[colIndex].prop)
|
|
21137
|
+
: '';
|
|
21089
21138
|
return {
|
|
21090
21139
|
prop,
|
|
21091
21140
|
cellModel,
|