@nanoporetech-digital/components 8.19.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-global-nav.cjs.entry.js +16 -12
- package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/collection/components/global-nav/global-nav.js +17 -13
- package/dist/components/nano-global-nav.js +16 -12
- package/dist/esm/nano-global-nav.entry.js +16 -12
- package/dist/nano-components/nano-global-nav.entry.js +1 -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 +16 -12
- package/hydrate/index.mjs +16 -12
- package/package.json +2 -2
- /package/dist/types/builds/{7a-7ssxC → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → YtJk83se}/0/Digital/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
|
@@ -30,7 +30,7 @@ const GlobalNav = class {
|
|
|
30
30
|
/** Url to the Nanopore contact page */
|
|
31
31
|
contactUrl = 'https://nanoporetech.com/contact';
|
|
32
32
|
_sessionRedirect = window.location.href;
|
|
33
|
-
/** A url to take the user after login
|
|
33
|
+
/** A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded */
|
|
34
34
|
get sessionRedirect() {
|
|
35
35
|
return encodeURIComponent(this._sessionRedirect);
|
|
36
36
|
}
|
|
@@ -439,7 +439,11 @@ const GlobalNav = class {
|
|
|
439
439
|
return;
|
|
440
440
|
return (renderer.h("div", { part: "user-panel", class: `gn__user-panel nano-theme-dark` }, renderer.h("div", { class: "gn__user-panel-head", slot: "label" }, renderer.h("nano-avatar", { initials: this.myAccountUser.first_name?.charAt(0) +
|
|
441
441
|
this.myAccountUser.last_name?.charAt(0) }, this.myAccountUser.small_avatar_url &&
|
|
442
|
-
!this.myAccountUser.small_avatar_url.includes('generic') && (renderer.h("img", { src: this.myAccountUser.small_avatar_url, alt: "User Avatar", height: 40, width: 40 }))), renderer.h("div", null, this.myAccountUser.name, renderer.h("br", null), this.myAccountUser.job_title
|
|
442
|
+
!this.myAccountUser.small_avatar_url.includes('generic') && (renderer.h("img", { src: this.myAccountUser.small_avatar_url, alt: "User Avatar", height: 40, width: 40 }))), renderer.h("div", null, this.myAccountUser.name, renderer.h("br", null), this.myAccountUser.job_title && this.myAccountUser?.company
|
|
443
|
+
? `${this.myAccountUser.job_title}, ${this.myAccountUser.company}`
|
|
444
|
+
: this.myAccountUser.job_title ||
|
|
445
|
+
this.myAccountUser.company ||
|
|
446
|
+
'')), renderer.h("div", { class: "gn__user-panel-body" }, this.userLinks.map((link) => (renderer.h("a", { href: link.address, target: link.target || undefined }, link.title, (link.title === 'Messages' ||
|
|
443
447
|
link.address.includes(this.msgUrl) ||
|
|
444
448
|
this.msgUrl.includes(link.address)) &&
|
|
445
449
|
this.msgCount > 0 && (renderer.h("nano-badge", { theme: "danger", strength: "2" }, this.msgCount)))))), renderer.h("div", { class: "gn__user-panel-foot" }, renderer.h("nano-cta", { secondary: true, size: "small", icon: "false", class: "gn__login-cta" }, renderer.h("a", { href: this.formatLoginLink(this.logoutUrl) }, "Logout")))));
|
|
@@ -484,21 +488,21 @@ const GlobalNav = class {
|
|
|
484
488
|
}
|
|
485
489
|
render() {
|
|
486
490
|
const bpps = this.bpPartials;
|
|
487
|
-
return (renderer.h(index.Host, { key: '
|
|
491
|
+
return (renderer.h(index.Host, { key: '63e6202a06bc4bc7a6a63f88d1923c3321a2b47c', class: {
|
|
488
492
|
'overflow-menu': this.breakpoint > bpps.mainMenu.breakpoint,
|
|
489
493
|
'bar-menu': this.breakpoint <= bpps.mainMenu.breakpoint,
|
|
490
494
|
'nano-global-nav': true,
|
|
491
|
-
} }, renderer.h("div", { key: '
|
|
495
|
+
} }, renderer.h("div", { key: '7fe0cb9446b86233ed7727fdc9aade6b94cb72eb', class: {
|
|
492
496
|
gn: true,
|
|
493
497
|
'gn__search-open': this.searchBarShown,
|
|
494
|
-
} }, renderer.h("nano-drawer", { key: '
|
|
498
|
+
} }, renderer.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) }, renderer.h("div", { key: 'c4cbe27955caffeb4f4a7dc755b6b08bf40a7f48', class: "gn__drawer-header", part: "overflow-header", slot: "label" }, "Main menu"), renderer.h("nav", { key: '26ec816c93427ce9f9cc4025e327b5e6cf9ba3e2', class: "gn__drawer-menu", part: "overflow-menu" }, this.breakpoint > bpps.mainMenu.breakpoint
|
|
495
499
|
? bpps.mainMenu.tpl()
|
|
496
|
-
: '', renderer.h("slot", { key: '
|
|
500
|
+
: '', renderer.h("slot", { key: '0693a9f4afdf63e63151b3f3fd4d3a0bbedde4ef', name: "overflow" }))), renderer.h("div", { key: 'd9ff383fb0f91876a533e8eb98bc47817b044729', class: "gn__menu-bar-wrapper" }, renderer.h("div", { key: '4536fd7593626672f20191b197a55b3d7b10b633', class: "gn__menu-bar", part: "menu-bar", ref: (el) => (this.mainMenuBar = el) }, renderer.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 && (renderer.h("nano-icon-button", { key: 'c399d0e0c2a909a94a0b93ad00ebc5cb34e8c224', class: "gn__overflow-button", iconName: "light/bars", label: "Open Menu", onClick: () => this.overflowMenu.show() })), renderer.h("slot", { key: 'ee03de047e3937687e722a88e34356ffc151a9e9', name: "logo" }, renderer.h("a", { key: 'a39aad67426cdc5ce75fa334a303229bfab9e58c', href: this.logoUrl, class: "gn__logo-link", part: "logo-link" }, this.breakpoint <= bpps.logo.breakpoint ? (renderer.h("img", { src: index.getAssetPath('../nano-assets/ont-logo.svg'), alt: `Oxford Nanopore Technologies logo. Features a stylised representation of a nanopore,
|
|
497
501
|
(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" })) : (renderer.h("img", { src: index.getAssetPath('../nano-assets/ont-wheel.svg'), alt: `Oxford Nanopore Technologies logo. A stylised representation of a nanopore,
|
|
498
|
-
(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 && (renderer.h("div", { key: '
|
|
499
|
-
(!!this.searchIndices.length && (renderer.h("nano-dropdown", { key: '
|
|
502
|
+
(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 && (renderer.h("div", { key: '46a926ede075e0bfde746fa174c0700a48bc308e', class: "gn__main-menu-links" }, bpps.mainMenu.tpl())), renderer.h("div", { key: 'e473ba724a01a0f596f6494b7bb452eef0c4ba53', class: "gn__main-menu-actions" }, !this.myAccountData ||
|
|
503
|
+
(!!this.searchIndices.length && (renderer.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 }, renderer.h("nano-icon-button", { key: '73c7c855dd6baf3259429d55c9bf3d58c2e8ec03', class: "gn__search-button", slot: "trigger", iconName: "light/magnifying-glass", label: "Search" }), renderer.h("form", { key: 'f265a2ba3269f22c2efcbe73c7ffe4328fe9d0e8', ref: (form) => (this.searchForm = form), class: "gn__search-form", part: "search-form", onSubmit: this.onSearchSubmit }, this.searchIndices.length > 1 && (renderer.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) => (renderer.h("nano-option", { selected: index.name === this.searchIndex, value: index.index }, index.name || index.index))))), renderer.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) => {
|
|
500
504
|
this.handleSearchTermChangeEvent(e.detail.value);
|
|
501
|
-
}, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, renderer.h("nano-icon", { key: '
|
|
505
|
+
}, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, renderer.h("nano-icon", { key: 'f3b612bba31b0b1a930b170711080bce93324322', slot: "end", name: "light/magnifying-glass" }), renderer.h("nano-datalist", { key: 'a264479248b83b20cb42155e09c3033356a221b4', class: "gn__search-results", onNanoSelect: (e) => e.preventDefault(), dropDownConfig: { tetherTo: this.searchForm }, disableFilter: true }, this.searchLoading && (renderer.h("div", { key: '21d365a6554c31144d57900ec8cf50e6caa105b2', slot: "no-result", class: "gn__search-loading" }, renderer.h("nano-spinner", { key: 'b4f28c952fcfe765dea3ab7e4c0691e10de1317e' }, "Searching..."))), this.noResultPartial(), !!this.autocompleteResults?.hits.length && [
|
|
502
506
|
this.autocompleteResults.hits.map((hit, i) => (renderer.h("nano-option", { href: hit.url, class: "gn__search-result", onClick: () => {
|
|
503
507
|
searchInsights.searchInsight.sendClick({
|
|
504
508
|
index: this.activeIndex.index,
|
|
@@ -508,10 +512,10 @@ const GlobalNav = class {
|
|
|
508
512
|
positions: [i + 1],
|
|
509
513
|
});
|
|
510
514
|
} }, renderer.h("span", { innerHTML: this.autocompleteSnippet(hit) })))),
|
|
511
|
-
renderer.h("nano-option", { key: '
|
|
512
|
-
])))))), renderer.h("div", { key: '
|
|
515
|
+
renderer.h("nano-option", { key: 'b2a1dc7ff83c80599377850136d6233fa64cee3c', class: "gn__search-viewall", onNanoSelect: this.onSearchSubmit }, "View all results"),
|
|
516
|
+
])))))), renderer.h("div", { key: '38bc65edb00ef4876340fdfc1f308a6805a1e1ec', class: "gn__cart" }, renderer.h("nano-icon-button", { key: 'b590faedc935181b9230c82509360ddc2a19f1cf', iconName: "light/cart-shopping", label: "View your cart", href: this.cartUrl }), !!this.cartCount && (renderer.h("nano-badge", { key: 'c7f45eea27607c6d4380ccdf3a7f2cacfd26bc80', theme: "danger", strength: "2" }, this.cartCount > 9 ? '9+' : this.cartCount))), this.breakpoint <= bpps.contact.breakpoint
|
|
513
517
|
? bpps.contact.tpl()
|
|
514
|
-
: '', this.isLoggedIn ? (renderer.h("nano-dropdown", { dialogTitle: "User menu", class: "gn__user-dropdown", distance: 10, placement: "bottom-end" }, renderer.h("button", { slot: "trigger", class: "gn__user-dropdown-trigger" }, renderer.h("nano-icon", { name: "light/user" }), renderer.h("nano-icon", { name: "light/chevron-down", class: "gn__user-dropdown-chevron" }), !!this.msgCount && (renderer.h("nano-badge", { theme: "danger", strength: "2" }, this.msgCount > 9 ? '9+' : this.msgCount))), this.loggedInPanel())) : (renderer.h("nano-cta", { secondary: true, size: "small", icon: "false", class: "gn__login-cta" }, renderer.h("a", { href: this.formatLoginLink(this.loginUrl) }, "Login"))))))), renderer.h("nano-global-search-results", { key: '
|
|
518
|
+
: '', this.isLoggedIn ? (renderer.h("nano-dropdown", { dialogTitle: "User menu", class: "gn__user-dropdown", distance: 10, placement: "bottom-end" }, renderer.h("button", { slot: "trigger", class: "gn__user-dropdown-trigger" }, renderer.h("nano-icon", { name: "light/user" }), renderer.h("nano-icon", { name: "light/chevron-down", class: "gn__user-dropdown-chevron" }), !!this.msgCount && (renderer.h("nano-badge", { theme: "danger", strength: "2" }, this.msgCount > 9 ? '9+' : this.msgCount))), this.loggedInPanel())) : (renderer.h("nano-cta", { secondary: true, size: "small", icon: "false", class: "gn__login-cta" }, renderer.h("a", { href: this.formatLoginLink(this.loginUrl) }, "Login"))))))), renderer.h("nano-global-search-results", { key: '6443d9f0199f87ba5ca73b62b6c3c9e5700731b4', part: "site-search-results" }, renderer.h("div", { key: 'db0ce2d9157f7144b0c50d0833386ed4eeabdd02', class: "gn__site", part: "site-wrapper" }, renderer.h("slot", { key: 'a9ac7197c149153532f16f8f0f428b5e46d11b72' }))))));
|
|
515
519
|
}
|
|
516
520
|
static get assetsDirs() { return ["assets"]; }
|
|
517
521
|
static get watchers() { return {
|
|
@@ -89,7 +89,7 @@ export class NanoBreadcrumb {
|
|
|
89
89
|
"references": {
|
|
90
90
|
"Breadcrumb": {
|
|
91
91
|
"location": "local",
|
|
92
|
-
"path": "/builds/
|
|
92
|
+
"path": "/builds/YtJk83se/0/Digital/nano-components/packages/components/src/components/breadcrumb/breadcrumb.tsx",
|
|
93
93
|
"id": "src/components/breadcrumb/breadcrumb.tsx::Breadcrumb"
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -50,7 +50,7 @@ export class GlobalNav {
|
|
|
50
50
|
/** Url to the Nanopore contact page */
|
|
51
51
|
contactUrl = 'https://nanoporetech.com/contact';
|
|
52
52
|
_sessionRedirect = window.location.href;
|
|
53
|
-
/** A url to take the user after login
|
|
53
|
+
/** A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded */
|
|
54
54
|
get sessionRedirect() {
|
|
55
55
|
return encodeURIComponent(this._sessionRedirect);
|
|
56
56
|
}
|
|
@@ -455,7 +455,11 @@ export class GlobalNav {
|
|
|
455
455
|
return;
|
|
456
456
|
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) +
|
|
457
457
|
this.myAccountUser.last_name?.charAt(0) }, this.myAccountUser.small_avatar_url &&
|
|
458
|
-
!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
|
|
458
|
+
!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
|
|
459
|
+
? `${this.myAccountUser.job_title}, ${this.myAccountUser.company}`
|
|
460
|
+
: this.myAccountUser.job_title ||
|
|
461
|
+
this.myAccountUser.company ||
|
|
462
|
+
'')), 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' ||
|
|
459
463
|
link.address.includes(this.msgUrl) ||
|
|
460
464
|
this.msgUrl.includes(link.address)) &&
|
|
461
465
|
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")))));
|
|
@@ -500,21 +504,21 @@ export class GlobalNav {
|
|
|
500
504
|
}
|
|
501
505
|
render() {
|
|
502
506
|
const bpps = this.bpPartials;
|
|
503
|
-
return (h(Host, { key: '
|
|
507
|
+
return (h(Host, { key: '63e6202a06bc4bc7a6a63f88d1923c3321a2b47c', class: {
|
|
504
508
|
'overflow-menu': this.breakpoint > bpps.mainMenu.breakpoint,
|
|
505
509
|
'bar-menu': this.breakpoint <= bpps.mainMenu.breakpoint,
|
|
506
510
|
'nano-global-nav': true,
|
|
507
|
-
} }, h("div", { key: '
|
|
511
|
+
} }, h("div", { key: '7fe0cb9446b86233ed7727fdc9aade6b94cb72eb', class: {
|
|
508
512
|
gn: true,
|
|
509
513
|
'gn__search-open': this.searchBarShown,
|
|
510
|
-
} }, h("nano-drawer", { key: '
|
|
514
|
+
} }, 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
|
|
511
515
|
? bpps.mainMenu.tpl()
|
|
512
|
-
: '', h("slot", { key: '
|
|
516
|
+
: '', 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,
|
|
513
517
|
(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,
|
|
514
|
-
(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: '
|
|
515
|
-
(!!this.searchIndices.length && (h("nano-dropdown", { key: '
|
|
518
|
+
(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 ||
|
|
519
|
+
(!!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) => {
|
|
516
520
|
this.handleSearchTermChangeEvent(e.detail.value);
|
|
517
|
-
}, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, h("nano-icon", { key: '
|
|
521
|
+
}, 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 && [
|
|
518
522
|
this.autocompleteResults.hits.map((hit, i) => (h("nano-option", { href: hit.url, class: "gn__search-result", onClick: () => {
|
|
519
523
|
searchInsight.sendClick({
|
|
520
524
|
index: this.activeIndex.index,
|
|
@@ -524,10 +528,10 @@ export class GlobalNav {
|
|
|
524
528
|
positions: [i + 1],
|
|
525
529
|
});
|
|
526
530
|
} }, h("span", { innerHTML: this.autocompleteSnippet(hit) })))),
|
|
527
|
-
h("nano-option", { key: '
|
|
528
|
-
])))))), h("div", { key: '
|
|
531
|
+
h("nano-option", { key: 'b2a1dc7ff83c80599377850136d6233fa64cee3c', class: "gn__search-viewall", onNanoSelect: this.onSearchSubmit }, "View all results"),
|
|
532
|
+
])))))), 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
|
|
529
533
|
? bpps.contact.tpl()
|
|
530
|
-
: '', 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: '
|
|
534
|
+
: '', 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' }))))));
|
|
531
535
|
}
|
|
532
536
|
static get is() { return "nano-global-nav"; }
|
|
533
537
|
static get encapsulation() { return "shadow"; }
|
|
@@ -677,7 +681,7 @@ export class GlobalNav {
|
|
|
677
681
|
"optional": false,
|
|
678
682
|
"docs": {
|
|
679
683
|
"tags": [],
|
|
680
|
-
"text": "A url to take the user after login
|
|
684
|
+
"text": "A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded"
|
|
681
685
|
},
|
|
682
686
|
"getter": true,
|
|
683
687
|
"setter": true,
|
|
@@ -45,7 +45,7 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class GlobalNav extends HTMLE
|
|
|
45
45
|
/** Url to the Nanopore contact page */
|
|
46
46
|
contactUrl = 'https://nanoporetech.com/contact';
|
|
47
47
|
_sessionRedirect = window.location.href;
|
|
48
|
-
/** A url to take the user after login
|
|
48
|
+
/** A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded */
|
|
49
49
|
get sessionRedirect() {
|
|
50
50
|
return encodeURIComponent(this._sessionRedirect);
|
|
51
51
|
}
|
|
@@ -457,7 +457,11 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class GlobalNav extends HTMLE
|
|
|
457
457
|
return;
|
|
458
458
|
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) +
|
|
459
459
|
this.myAccountUser.last_name?.charAt(0) }, this.myAccountUser.small_avatar_url &&
|
|
460
|
-
!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
|
|
460
|
+
!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
|
|
461
|
+
? `${this.myAccountUser.job_title}, ${this.myAccountUser.company}`
|
|
462
|
+
: this.myAccountUser.job_title ||
|
|
463
|
+
this.myAccountUser.company ||
|
|
464
|
+
'')), 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' ||
|
|
461
465
|
link.address.includes(this.msgUrl) ||
|
|
462
466
|
this.msgUrl.includes(link.address)) &&
|
|
463
467
|
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")))));
|
|
@@ -502,21 +506,21 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class GlobalNav extends HTMLE
|
|
|
502
506
|
}
|
|
503
507
|
render() {
|
|
504
508
|
const bpps = this.bpPartials;
|
|
505
|
-
return (h(Host, { key: '
|
|
509
|
+
return (h(Host, { key: '63e6202a06bc4bc7a6a63f88d1923c3321a2b47c', class: {
|
|
506
510
|
'overflow-menu': this.breakpoint > bpps.mainMenu.breakpoint,
|
|
507
511
|
'bar-menu': this.breakpoint <= bpps.mainMenu.breakpoint,
|
|
508
512
|
'nano-global-nav': true,
|
|
509
|
-
} }, h("div", { key: '
|
|
513
|
+
} }, h("div", { key: '7fe0cb9446b86233ed7727fdc9aade6b94cb72eb', class: {
|
|
510
514
|
gn: true,
|
|
511
515
|
'gn__search-open': this.searchBarShown,
|
|
512
|
-
} }, h("nano-drawer", { key: '
|
|
516
|
+
} }, 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
|
|
513
517
|
? bpps.mainMenu.tpl()
|
|
514
|
-
: '', h("slot", { key: '
|
|
518
|
+
: '', 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,
|
|
515
519
|
(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,
|
|
516
|
-
(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: '
|
|
517
|
-
(!!this.searchIndices.length && (h("nano-dropdown", { key: '
|
|
520
|
+
(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 ||
|
|
521
|
+
(!!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) => {
|
|
518
522
|
this.handleSearchTermChangeEvent(e.detail.value);
|
|
519
|
-
}, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, h("nano-icon", { key: '
|
|
523
|
+
}, 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 && [
|
|
520
524
|
this.autocompleteResults.hits.map((hit, i) => (h("nano-option", { href: hit.url, class: "gn__search-result", onClick: () => {
|
|
521
525
|
searchInsight.sendClick({
|
|
522
526
|
index: this.activeIndex.index,
|
|
@@ -526,10 +530,10 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class GlobalNav extends HTMLE
|
|
|
526
530
|
positions: [i + 1],
|
|
527
531
|
});
|
|
528
532
|
} }, h("span", { innerHTML: this.autocompleteSnippet(hit) })))),
|
|
529
|
-
h("nano-option", { key: '
|
|
530
|
-
])))))), h("div", { key: '
|
|
533
|
+
h("nano-option", { key: 'b2a1dc7ff83c80599377850136d6233fa64cee3c', class: "gn__search-viewall", onNanoSelect: this.onSearchSubmit }, "View all results"),
|
|
534
|
+
])))))), 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
|
|
531
535
|
? bpps.contact.tpl()
|
|
532
|
-
: '', 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: '
|
|
536
|
+
: '', 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' }))))));
|
|
533
537
|
}
|
|
534
538
|
static get assetsDirs() { return ["assets"]; }
|
|
535
539
|
static get watchers() { return {
|
|
@@ -28,7 +28,7 @@ const GlobalNav = class {
|
|
|
28
28
|
/** Url to the Nanopore contact page */
|
|
29
29
|
contactUrl = 'https://nanoporetech.com/contact';
|
|
30
30
|
_sessionRedirect = window.location.href;
|
|
31
|
-
/** A url to take the user after login
|
|
31
|
+
/** A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded */
|
|
32
32
|
get sessionRedirect() {
|
|
33
33
|
return encodeURIComponent(this._sessionRedirect);
|
|
34
34
|
}
|
|
@@ -437,7 +437,11 @@ const GlobalNav = class {
|
|
|
437
437
|
return;
|
|
438
438
|
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) +
|
|
439
439
|
this.myAccountUser.last_name?.charAt(0) }, this.myAccountUser.small_avatar_url &&
|
|
440
|
-
!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
|
|
440
|
+
!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
|
|
441
|
+
? `${this.myAccountUser.job_title}, ${this.myAccountUser.company}`
|
|
442
|
+
: this.myAccountUser.job_title ||
|
|
443
|
+
this.myAccountUser.company ||
|
|
444
|
+
'')), 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' ||
|
|
441
445
|
link.address.includes(this.msgUrl) ||
|
|
442
446
|
this.msgUrl.includes(link.address)) &&
|
|
443
447
|
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")))));
|
|
@@ -482,21 +486,21 @@ const GlobalNav = class {
|
|
|
482
486
|
}
|
|
483
487
|
render() {
|
|
484
488
|
const bpps = this.bpPartials;
|
|
485
|
-
return (h(Host, { key: '
|
|
489
|
+
return (h(Host, { key: '63e6202a06bc4bc7a6a63f88d1923c3321a2b47c', class: {
|
|
486
490
|
'overflow-menu': this.breakpoint > bpps.mainMenu.breakpoint,
|
|
487
491
|
'bar-menu': this.breakpoint <= bpps.mainMenu.breakpoint,
|
|
488
492
|
'nano-global-nav': true,
|
|
489
|
-
} }, h("div", { key: '
|
|
493
|
+
} }, h("div", { key: '7fe0cb9446b86233ed7727fdc9aade6b94cb72eb', class: {
|
|
490
494
|
gn: true,
|
|
491
495
|
'gn__search-open': this.searchBarShown,
|
|
492
|
-
} }, h("nano-drawer", { key: '
|
|
496
|
+
} }, 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
|
|
493
497
|
? bpps.mainMenu.tpl()
|
|
494
|
-
: '', h("slot", { key: '
|
|
498
|
+
: '', 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,
|
|
495
499
|
(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,
|
|
496
|
-
(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: '
|
|
497
|
-
(!!this.searchIndices.length && (h("nano-dropdown", { key: '
|
|
500
|
+
(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 ||
|
|
501
|
+
(!!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) => {
|
|
498
502
|
this.handleSearchTermChangeEvent(e.detail.value);
|
|
499
|
-
}, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, h("nano-icon", { key: '
|
|
503
|
+
}, 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 && [
|
|
500
504
|
this.autocompleteResults.hits.map((hit, i) => (h("nano-option", { href: hit.url, class: "gn__search-result", onClick: () => {
|
|
501
505
|
searchInsight.sendClick({
|
|
502
506
|
index: this.activeIndex.index,
|
|
@@ -506,10 +510,10 @@ const GlobalNav = class {
|
|
|
506
510
|
positions: [i + 1],
|
|
507
511
|
});
|
|
508
512
|
} }, h("span", { innerHTML: this.autocompleteSnippet(hit) })))),
|
|
509
|
-
h("nano-option", { key: '
|
|
510
|
-
])))))), h("div", { key: '
|
|
513
|
+
h("nano-option", { key: 'b2a1dc7ff83c80599377850136d6233fa64cee3c', class: "gn__search-viewall", onNanoSelect: this.onSearchSubmit }, "View all results"),
|
|
514
|
+
])))))), 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
|
|
511
515
|
? bpps.contact.tpl()
|
|
512
|
-
: '', 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: '
|
|
516
|
+
: '', 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' }))))));
|
|
513
517
|
}
|
|
514
518
|
static get assetsDirs() { return ["assets"]; }
|
|
515
519
|
static get watchers() { return {
|
|
@@ -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}
|
|
@@ -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 {
|
package/hydrate/index.mjs
CHANGED
|
@@ -14778,7 +14778,7 @@ class GlobalNav {
|
|
|
14778
14778
|
/** Url to the Nanopore contact page */
|
|
14779
14779
|
contactUrl = 'https://nanoporetech.com/contact';
|
|
14780
14780
|
_sessionRedirect = window.location.href;
|
|
14781
|
-
/** A url to take the user after login
|
|
14781
|
+
/** A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded */
|
|
14782
14782
|
get sessionRedirect() {
|
|
14783
14783
|
return encodeURIComponent(this._sessionRedirect);
|
|
14784
14784
|
}
|
|
@@ -15186,7 +15186,11 @@ class GlobalNav {
|
|
|
15186
15186
|
return;
|
|
15187
15187
|
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) +
|
|
15188
15188
|
this.myAccountUser.last_name?.charAt(0) }, this.myAccountUser.small_avatar_url &&
|
|
15189
|
-
!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
|
|
15189
|
+
!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
|
|
15190
|
+
? `${this.myAccountUser.job_title}, ${this.myAccountUser.company}`
|
|
15191
|
+
: this.myAccountUser.job_title ||
|
|
15192
|
+
this.myAccountUser.company ||
|
|
15193
|
+
'')), 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' ||
|
|
15190
15194
|
link.address.includes(this.msgUrl) ||
|
|
15191
15195
|
this.msgUrl.includes(link.address)) &&
|
|
15192
15196
|
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")))));
|
|
@@ -15231,21 +15235,21 @@ class GlobalNav {
|
|
|
15231
15235
|
}
|
|
15232
15236
|
render() {
|
|
15233
15237
|
const bpps = this.bpPartials;
|
|
15234
|
-
return (h(Host, { key: '
|
|
15238
|
+
return (h(Host, { key: '63e6202a06bc4bc7a6a63f88d1923c3321a2b47c', class: {
|
|
15235
15239
|
'overflow-menu': this.breakpoint > bpps.mainMenu.breakpoint,
|
|
15236
15240
|
'bar-menu': this.breakpoint <= bpps.mainMenu.breakpoint,
|
|
15237
15241
|
'nano-global-nav': true,
|
|
15238
|
-
} }, h("div", { key: '
|
|
15242
|
+
} }, h("div", { key: '7fe0cb9446b86233ed7727fdc9aade6b94cb72eb', class: {
|
|
15239
15243
|
gn: true,
|
|
15240
15244
|
'gn__search-open': this.searchBarShown,
|
|
15241
|
-
} }, h("nano-drawer", { key: '
|
|
15245
|
+
} }, 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
|
|
15242
15246
|
? bpps.mainMenu.tpl()
|
|
15243
|
-
: '', h("slot", { key: '
|
|
15247
|
+
: '', 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,
|
|
15244
15248
|
(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,
|
|
15245
|
-
(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: '
|
|
15246
|
-
(!!this.searchIndices.length && (h("nano-dropdown", { key: '
|
|
15249
|
+
(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 ||
|
|
15250
|
+
(!!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) => {
|
|
15247
15251
|
this.handleSearchTermChangeEvent(e.detail.value);
|
|
15248
|
-
}, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, h("nano-icon", { key: '
|
|
15252
|
+
}, 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 && [
|
|
15249
15253
|
this.autocompleteResults.hits.map((hit, i) => (h("nano-option", { href: hit.url, class: "gn__search-result", onClick: () => {
|
|
15250
15254
|
searchInsight.sendClick({
|
|
15251
15255
|
index: this.activeIndex.index,
|
|
@@ -15255,10 +15259,10 @@ class GlobalNav {
|
|
|
15255
15259
|
positions: [i + 1],
|
|
15256
15260
|
});
|
|
15257
15261
|
} }, h("span", { innerHTML: this.autocompleteSnippet(hit) })))),
|
|
15258
|
-
h("nano-option", { key: '
|
|
15259
|
-
])))))), h("div", { key: '
|
|
15262
|
+
h("nano-option", { key: 'b2a1dc7ff83c80599377850136d6233fa64cee3c', class: "gn__search-viewall", onNanoSelect: this.onSearchSubmit }, "View all results"),
|
|
15263
|
+
])))))), 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
|
|
15260
15264
|
? bpps.contact.tpl()
|
|
15261
|
-
: '', 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: '
|
|
15265
|
+
: '', 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' }))))));
|
|
15262
15266
|
}
|
|
15263
15267
|
static get assetsDirs() { return ["assets"]; }
|
|
15264
15268
|
static get watchers() { return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanoporetech-digital/components",
|
|
3
|
-
"version": "8.19.
|
|
3
|
+
"version": "8.19.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "A collection of Oxford Nanopore corporate / digital webcomponents",
|
|
6
6
|
"type": "module",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"smart-array-filter": "^4.0.2",
|
|
57
57
|
"stencil-wormhole": "3.2.1",
|
|
58
58
|
"tyqs": "^0.1.3",
|
|
59
|
-
"@nanoporetech-digital/style": "8.19.
|
|
59
|
+
"@nanoporetech-digital/style": "8.19.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@algolia/client-search": "^4.22.1",
|
|
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
|