@nanoporetech-digital/components 8.19.0 → 8.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/nano-global-nav.cjs.entry.js +36 -22
- package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/collection/components/global-nav/global-nav.js +41 -27
- package/dist/components/nano-global-nav.js +36 -22
- package/dist/esm/nano-global-nav.entry.js +36 -22
- package/dist/nano-components/nano-global-nav.entry.js +1 -1
- package/dist/types/components/global-nav/global-nav.d.ts +3 -3
- package/dist/types/components.d.ts +6 -6
- package/docs-json.json +15 -9
- package/docs-vscode.json +1 -1
- package/hydrate/index.js +37 -23
- package/hydrate/index.mjs +37 -23
- package/package.json +2 -2
- /package/dist/types/builds/{7a-7ssxC → x6knoJK1}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → x6knoJK1}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → x6knoJK1}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → x6knoJK1}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → x6knoJK1}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → x6knoJK1}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → x6knoJK1}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → x6knoJK1}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → x6knoJK1}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
- /package/dist/types/builds/{7a-7ssxC → x6knoJK1}/0/Digital/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
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
|
}
|
|
@@ -14837,15 +14837,22 @@ class GlobalNav {
|
|
|
14837
14837
|
return this.myAccountData?.user?.uuid ? this.myAccountData.user : null;
|
|
14838
14838
|
}
|
|
14839
14839
|
processUserData() {
|
|
14840
|
-
if (!this.myAccountUser)
|
|
14841
|
-
|
|
14842
|
-
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
14847
|
-
|
|
14848
|
-
this.
|
|
14840
|
+
if (!this.myAccountUser) {
|
|
14841
|
+
this.isLoggedIn = false;
|
|
14842
|
+
this.userLinks = [];
|
|
14843
|
+
this.msgUrl = '';
|
|
14844
|
+
this.msgCount = 0;
|
|
14845
|
+
this.nanoUserData.emit(null);
|
|
14846
|
+
return;
|
|
14847
|
+
}
|
|
14848
|
+
this.userLinks =
|
|
14849
|
+
this.myAccountData?.links?.filter((link) => link.area === 'profile-panel-list') || [];
|
|
14850
|
+
this.loginUrl = this.loginUrl || this.myAccountData.urls?.login;
|
|
14851
|
+
this.logoutUrl = this.logoutUrl || this.myAccountData.urls?.logout;
|
|
14852
|
+
this.msgUrl = this.msgUrl || this.myAccountData.urls?.messages;
|
|
14853
|
+
this.msgCount = this.msgCount || this.myAccountData.notifications?.count;
|
|
14854
|
+
this.cartUrl = this.cartUrl || this.myAccountData.urls?.cart;
|
|
14855
|
+
this.cartCount = this.cartCount || this.myAccountData.cart?.count;
|
|
14849
14856
|
this.isLoggedIn = true;
|
|
14850
14857
|
this.nanoUserData.emit(this.myAccountUser);
|
|
14851
14858
|
}
|
|
@@ -15186,14 +15193,18 @@ class GlobalNav {
|
|
|
15186
15193
|
return;
|
|
15187
15194
|
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
15195
|
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
|
|
15196
|
+
!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
|
|
15197
|
+
? `${this.myAccountUser.job_title}, ${this.myAccountUser.company}`
|
|
15198
|
+
: this.myAccountUser.job_title ||
|
|
15199
|
+
this.myAccountUser.company ||
|
|
15200
|
+
'')), 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
15201
|
link.address.includes(this.msgUrl) ||
|
|
15191
15202
|
this.msgUrl.includes(link.address)) &&
|
|
15192
|
-
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")))));
|
|
15203
|
+
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" }, typeof this.logoutUrl === 'string' ? (h("a", { href: this.formatLoginLink(this.logoutUrl) }, "Logout")) : (h("button", { onClick: this.logoutUrl }, "Logout"))))));
|
|
15193
15204
|
}
|
|
15194
15205
|
bpPartials = {
|
|
15195
15206
|
contact: {
|
|
15196
|
-
tpl: () => h("a", { href: this.contactUrl }, "Contact"),
|
|
15207
|
+
tpl: () => this.contactUrl && h("a", { href: this.contactUrl }, "Contact"),
|
|
15197
15208
|
breakpoint: 0,
|
|
15198
15209
|
},
|
|
15199
15210
|
mainMenu: {
|
|
@@ -15231,21 +15242,21 @@ class GlobalNav {
|
|
|
15231
15242
|
}
|
|
15232
15243
|
render() {
|
|
15233
15244
|
const bpps = this.bpPartials;
|
|
15234
|
-
return (h(Host, { key: '
|
|
15245
|
+
return (h(Host, { key: '6f3ecd6fac6825f4b137592e1becb86046278542', class: {
|
|
15235
15246
|
'overflow-menu': this.breakpoint > bpps.mainMenu.breakpoint,
|
|
15236
15247
|
'bar-menu': this.breakpoint <= bpps.mainMenu.breakpoint,
|
|
15237
15248
|
'nano-global-nav': true,
|
|
15238
|
-
} }, h("div", { key: '
|
|
15249
|
+
} }, h("div", { key: '8ecbd0ecc9ac93f1a1dd5defa8f119874f623daf', class: {
|
|
15239
15250
|
gn: true,
|
|
15240
15251
|
'gn__search-open': this.searchBarShown,
|
|
15241
|
-
} }, h("nano-drawer", { key: '
|
|
15252
|
+
} }, h("nano-drawer", { key: '728b760496d041fc5f1d78905081e7fe59b7047c', 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: 'd1b99ae15e00511594abf476a06f8374d4fad508', class: "gn__drawer-header", part: "overflow-header", slot: "label" }, "Main menu"), h("nav", { key: '97debdda75a0d7d9f2a6e23306fa93bd2d73de06', class: "gn__drawer-menu", part: "overflow-menu" }, this.breakpoint > bpps.mainMenu.breakpoint
|
|
15242
15253
|
? bpps.mainMenu.tpl()
|
|
15243
|
-
: '', h("slot", { key: '
|
|
15254
|
+
: '', h("slot", { key: 'd500a55cb220088df7af00b356f902a3d80fb47d', name: "overflow" }))), h("div", { key: 'c1454d4666561a77a850d9328d13795d5f989d89', class: "gn__menu-bar-wrapper" }, h("div", { key: 'f32f9a8302ad3501ae3d9e8afdf2ed7d59297335', class: "gn__menu-bar", part: "menu-bar", ref: (el) => (this.mainMenuBar = el) }, h("nav", { key: '8605e4bf473e4b34e3890ddaf69c555abc397716', "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: '04aaa626447c7377fadcd8d374fa9120ef5fea62', class: "gn__overflow-button", iconName: "light/bars", label: "Open Menu", onClick: () => this.overflowMenu.show() })), h("slot", { key: '3f858438db16a112c2dee67ee8b865afba9180fe', name: "logo" }, h("a", { key: 'ddc758422fb964b2644e825c98ec0aec832895db', 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
15255
|
(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: '
|
|
15256
|
+
(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: 'c48d4d74b18f876cffee723a8da0bd4d82300b7b', class: "gn__main-menu-links" }, bpps.mainMenu.tpl())), h("div", { key: 'e433743c122dc9e4427de3f0fdd7067bcd52f558', class: "gn__main-menu-actions" }, !this.myAccountData ||
|
|
15257
|
+
(!!this.searchIndices.length && (h("nano-dropdown", { key: 'e6c5655701e5a91409f5fad4f45efd868cbd1a50', 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: '8de3fb7f465103bda3063e96876345701d942a01', class: "gn__search-button", slot: "trigger", iconName: "light/magnifying-glass", label: "Search" }), h("form", { key: '18fca7445c9471089e013cea8d83aa749e655aab', ref: (form) => (this.searchForm = form), class: "gn__search-form", part: "search-form", onSubmit: this.onSearchSubmit }, this.searchIndices.length > 1 && (h("nano-select", { key: '7b37f759f2a24d8686d46a3ebbcb3afaa54cbbee', 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: '93838bee803808b06f56c14886975cd3fc8ab827', 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
15258
|
this.handleSearchTermChangeEvent(e.detail.value);
|
|
15248
|
-
}, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, h("nano-icon", { key: '
|
|
15259
|
+
}, onNanoInput: this.handleSearchTermInputEvent, debounce: 500, value: this._searchValue }, h("nano-icon", { key: 'd39203dd3727a34b60c5c71fc6b9a14c23ef2465', slot: "end", name: "light/magnifying-glass" }), h("nano-datalist", { key: '9826082e21b53f54254c8f2490b3b42c215edacb', class: "gn__search-results", onNanoSelect: (e) => e.preventDefault(), dropDownConfig: { tetherTo: this.searchForm }, disableFilter: true }, this.searchLoading && (h("div", { key: '65f17640b43bce0f44e59f092b7c8ef562f02e19', slot: "no-result", class: "gn__search-loading" }, h("nano-spinner", { key: 'f0162dd8c60aae95e35d9e02770a9398bede0828' }, "Searching..."))), this.noResultPartial(), !!this.autocompleteResults?.hits.length && [
|
|
15249
15260
|
this.autocompleteResults.hits.map((hit, i) => (h("nano-option", { href: hit.url, class: "gn__search-result", onClick: () => {
|
|
15250
15261
|
searchInsight.sendClick({
|
|
15251
15262
|
index: this.activeIndex.index,
|
|
@@ -15255,10 +15266,13 @@ class GlobalNav {
|
|
|
15255
15266
|
positions: [i + 1],
|
|
15256
15267
|
});
|
|
15257
15268
|
} }, h("span", { innerHTML: this.autocompleteSnippet(hit) })))),
|
|
15258
|
-
h("nano-option", { key: '
|
|
15259
|
-
])))))), h("div", { key: '
|
|
15269
|
+
h("nano-option", { key: 'ddf176669705bb04a45575ee1bf8897d46ae9704', class: "gn__search-viewall", onNanoSelect: this.onSearchSubmit }, "View all results"),
|
|
15270
|
+
])))))), h("div", { key: 'f84317012affbf6aa952810f627ca318f042dd0b', class: "gn__cart" }, this.cartUrl && [
|
|
15271
|
+
h("nano-icon-button", { key: 'c656b17e3ee2462900fc855c8128b2e92e3ad4cb', iconName: "light/cart-shopping", label: "View your cart", href: this.cartUrl }),
|
|
15272
|
+
this.cartCount && (h("nano-badge", { key: '878066adbf28890694e65f651031e35912b30f06', theme: "danger", strength: "2" }, this.cartCount > 9 ? '9+' : this.cartCount)),
|
|
15273
|
+
]), this.breakpoint <= bpps.contact.breakpoint
|
|
15260
15274
|
? 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: '
|
|
15275
|
+
: '', 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" }, typeof this.loginUrl === 'string' ? (h("a", { href: this.formatLoginLink(this.loginUrl) }, "Login")) : (h("button", { onClick: this.loginUrl }, "Login")))))))), h("nano-global-search-results", { key: 'afb40b7671b51b72cc58ce006b6ed163fb1d1e78', part: "site-search-results" }, h("div", { key: '660f6ad6fb20ca8c88118b44bdb2b44b3a06f19b', class: "gn__site", part: "site-wrapper" }, h("slot", { key: 'fcd45d11fb7fcdcf986940f8a4bda1287635856a' }))))));
|
|
15262
15276
|
}
|
|
15263
15277
|
static get assetsDirs() { return ["assets"]; }
|
|
15264
15278
|
static get watchers() { return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanoporetech-digital/components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.20.0",
|
|
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.
|
|
59
|
+
"@nanoporetech-digital/style": "8.20.0"
|
|
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
|