@nanoporetech-digital/components 8.0.0 → 8.1.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-algolia-results.cjs.entry.js +24 -26
- package/dist/cjs/nano-algolia.cjs.entry.js +4 -0
- package/dist/cjs/nano-avatar_5.cjs.entry.js +120 -117
- package/dist/cjs/nano-dropdown_2.cjs.entry.js +10 -6
- package/dist/cjs/nano-icon_3.cjs.entry.js +1 -1
- package/dist/cjs/{popover-D_uJstEp.js → popover-BxNxwqMv.js} +5 -3
- package/dist/collection/components/algolia/algolia-results.js +25 -27
- package/dist/collection/components/algolia/lib/template.js +4 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +9 -5
- package/dist/collection/components/global-search-results/global-search-results.css +121 -189
- package/dist/collection/components/global-search-results/global-search-results.js +121 -117
- package/dist/collection/utils/popover.js +5 -3
- package/dist/components/algolia.js +4 -0
- package/dist/components/dropdown.js +9 -5
- package/dist/components/global-search-results.js +122 -118
- package/dist/components/nano-algolia-results.js +25 -27
- package/dist/components/popover.js +5 -3
- package/dist/esm/nano-algolia-results.entry.js +25 -27
- package/dist/esm/nano-algolia.entry.js +4 -0
- package/dist/esm/nano-avatar_5.entry.js +120 -117
- package/dist/esm/nano-dropdown_2.entry.js +10 -6
- package/dist/esm/nano-icon_3.entry.js +1 -1
- package/dist/esm/{popover-BKomgCqQ.js → popover-CWVbjtKn.js} +5 -3
- package/dist/nano-components/nano-algolia-results.entry.js +1 -1
- package/dist/nano-components/nano-algolia.entry.js +1 -1
- package/dist/nano-components/nano-avatar_5.entry.js +1 -1
- package/dist/nano-components/nano-components.css +5 -5
- package/dist/nano-components/nano-dropdown_2.entry.js +1 -1
- package/dist/nano-components/nano-icon_3.entry.js +1 -1
- package/dist/nano-components/{popover-BKomgCqQ.js → popover-CWVbjtKn.js} +1 -1
- package/dist/style/components.css +1 -1
- package/dist/style/components.css.map +1 -1
- package/dist/style/core.css +1 -1
- package/dist/style/core.css.map +1 -1
- package/dist/style/nano.css +1 -1
- package/dist/style/nano.css.map +1 -1
- package/dist/types/{Users/John.Jenkins/projects → builds/FKs_t1C_/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +1 -1
- package/dist/types/{Users/John.Jenkins/projects → builds/FKs_t1C_/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +1 -1
- package/dist/types/{Users/John.Jenkins/projects → builds/FKs_t1C_/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +1 -1
- package/dist/types/builds/FKs_t1C_/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +2 -0
- package/dist/types/builds/FKs_t1C_/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +2 -0
- package/dist/types/components/global-search-results/global-search-results.d.ts +2 -0
- package/docs-json.json +2 -2
- package/hydrate/index.js +160 -151
- package/hydrate/index.mjs +160 -151
- package/package.json +2 -2
- package/dist/types/Users/John.Jenkins/projects/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -2
- package/dist/types/Users/John.Jenkins/projects/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -2
- /package/dist/types/{Users/John.Jenkins/projects → builds/FKs_t1C_/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
- /package/dist/types/{Users/John.Jenkins/projects → builds/FKs_t1C_/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
- /package/dist/types/{Users/John.Jenkins/projects → builds/FKs_t1C_/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
- /package/dist/types/{Users/John.Jenkins/projects → builds/FKs_t1C_/0/Digital}/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
- /package/dist/types/{Users/John.Jenkins/projects → builds/FKs_t1C_/0/Digital}/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
var index = require('./index-Bp8uD6Gl.js');
|
7
7
|
var activeElement = require('./active-element-Vtuxns0n.js');
|
8
|
-
var popover = require('./popover-
|
8
|
+
var popover = require('./popover-BxNxwqMv.js');
|
9
9
|
var tabbable = require('./tabbable-Dey_UhZv.js');
|
10
10
|
var renderer = require('./renderer-BiFPhR1V.js');
|
11
11
|
var dom = require('./dom-B-9iU7CY.js');
|
@@ -319,8 +319,12 @@ const Dropdown = class {
|
|
319
319
|
distance: this.distance,
|
320
320
|
skidding: this.skidding,
|
321
321
|
transitionElement: this.panel,
|
322
|
-
onAfterHide: () =>
|
323
|
-
|
322
|
+
onAfterHide: () => {
|
323
|
+
this.nanoAfterHide.emit();
|
324
|
+
},
|
325
|
+
onAfterShow: () => {
|
326
|
+
this.nanoAfterShow.emit();
|
327
|
+
},
|
324
328
|
onTransitionEnd: () => {
|
325
329
|
if (!this.open) {
|
326
330
|
this.afterHide();
|
@@ -361,12 +365,12 @@ const Dropdown = class {
|
|
361
365
|
this.popover.destroy();
|
362
366
|
}
|
363
367
|
render() {
|
364
|
-
return (renderer.h(index.Host, { key: '
|
368
|
+
return (renderer.h(index.Host, { key: 'c0ed4b8b03d27f7437c148c8df305886c6cf29d9', class: "nano-dropdown" }, renderer.h("div", { key: '27165586e2caa99ba746e7db3aa1574f0e9d1576', part: "base", id: this.dropdownId, class: {
|
365
369
|
dropdown: true,
|
366
370
|
'dropdown--open': this.open,
|
367
|
-
} }, renderer.h("span", { key: '
|
371
|
+
} }, renderer.h("span", { key: 'b401a4d341e786ae4fe8c54adf06f8da1be4f531', part: "trigger", class: "dropdown__trigger", ref: (el) => (this.trigger = el), onKeyDown: this.handleTriggerKeyDown, onClick: this.togglePanel }, renderer.h("slot", { key: 'bd61e0f2d5e164b21d3ecba81c63ec72b0b7cc6f', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), renderer.h("div", { key: 'e0cb2a8823490b70f6aa01073d3873fa785fd763', ref: (el) => (this.positioner = el), class: "dropdown__positioner", popover: "manual", id: this.dropdownId + '-positioner' }, renderer.h("div", { key: '3f1b7e3911cd7616ff85d042fc0d1e3e358f36c2', ref: (el) => (this.panel = el), part: "panel", class: `dropdown__panel ${this.placement.split('-').join(' ')}`, "aria-hidden": !this.open, role: this.host.getAttribute('role') === 'group' ? 'group' : 'dialog', "aria-modal": this.host.getAttribute('role') === 'group' ? undefined : 'true', "aria-labelledby": this.dialogTitle ? this.labelId : undefined, tabIndex: this.isOverflowing() ? 0 : undefined }, this.dialogTitle && (renderer.h("span", { key: '19cc4dd331a4c2cbdc73a05687681cb2830fff0c', id: this.labelId, class: "dropdown__accessible-title", "aria-live": this.host.getAttribute('role') === 'group'
|
368
372
|
? undefined
|
369
|
-
: 'polite' }, this.dialogTitle)), renderer.h("slot", { key: '
|
373
|
+
: 'polite' }, this.dialogTitle)), renderer.h("slot", { key: '5da1881086c31481463b3b7244552e17ee66d997' }))))));
|
370
374
|
}
|
371
375
|
static get watchers() { return {
|
372
376
|
"open": ["handleOpenChange"],
|
@@ -1833,7 +1833,7 @@ class Popover {
|
|
1833
1833
|
// this.isVisible = false;
|
1834
1834
|
this.popover.hidden = true;
|
1835
1835
|
this.popover.classList.remove(this.options.visibleClass);
|
1836
|
-
this.popover.addEventListener('transitionend', this.handleTransitionEnd
|
1836
|
+
this.popover.addEventListener('transitionend', this.handleTransitionEnd);
|
1837
1837
|
}
|
1838
1838
|
handleTransitionEnd(event) {
|
1839
1839
|
const target = event.target;
|
@@ -1848,10 +1848,13 @@ class Popover {
|
|
1848
1848
|
this.popover.classList.remove(this.options.visibleClass);
|
1849
1849
|
this.options.onAfterHide.call(this);
|
1850
1850
|
}
|
1851
|
+
else {
|
1852
|
+
this.options.onAfterShow.call(this);
|
1853
|
+
}
|
1851
1854
|
}
|
1852
1855
|
}
|
1853
1856
|
destroy() {
|
1854
|
-
this.popover.removeEventListener('transitionend', this.handleTransitionEnd
|
1857
|
+
this.popover.removeEventListener('transitionend', this.handleTransitionEnd);
|
1855
1858
|
if (this.popper) {
|
1856
1859
|
this.popper.destroy();
|
1857
1860
|
this.popper = null;
|
@@ -1903,7 +1906,6 @@ class Popover {
|
|
1903
1906
|
},
|
1904
1907
|
],
|
1905
1908
|
});
|
1906
|
-
this.popover.addEventListener('transitionend', () => this.options.onAfterShow.call(this), { once: true });
|
1907
1909
|
// Reposition the menu after it appears in case a modifier kicked in
|
1908
1910
|
requestAnimationFrame(() => {
|
1909
1911
|
this.popper?.update().catch((e) => {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import { Host, Build,
|
4
|
+
import { Host, Build, } from "@stencil/core";
|
5
5
|
import { h } from "../../utils/renderer";
|
6
6
|
import { Wormhole, SearchChangeEvent } from "./algolia-data";
|
7
7
|
/**
|
@@ -164,30 +164,28 @@ export class AlgoliaResults {
|
|
164
164
|
this.nanoTplUpdated.emit(this.el);
|
165
165
|
}
|
166
166
|
connectedCallback() {
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
}
|
190
|
-
});
|
167
|
+
this.startTplSlot = this.el.querySelector('[slot="start-template"]');
|
168
|
+
this.startOutputSlot = this.el.querySelector('[slot="start-output"]');
|
169
|
+
if (this.startTplSlot) {
|
170
|
+
this.startTpl = this.startTplSlot.innerHTML;
|
171
|
+
this.startTpl = this.startTpl.replace(/=>/gm, '=>');
|
172
|
+
}
|
173
|
+
this.resultTplSlot = this.el.querySelector('[slot="result-template"]');
|
174
|
+
this.outputSlot = this.el.querySelector('[slot="result-output"]');
|
175
|
+
if (this.resultTplSlot) {
|
176
|
+
this.resultTpl = this.resultTplSlot.innerHTML;
|
177
|
+
this.resultTpl = this.resultTpl.replace(/=>/gm, '=>');
|
178
|
+
}
|
179
|
+
this.endTplSlot = this.el.querySelector('[slot="end-template"]');
|
180
|
+
this.endOutputSlot = this.el.querySelector('[slot="end-output"]');
|
181
|
+
if (this.endTplSlot) {
|
182
|
+
this.endTpl = this.endTplSlot.innerHTML;
|
183
|
+
this.endTpl = this.endTpl.replace(/=>/gm, '=>');
|
184
|
+
}
|
185
|
+
if (this.indexResults) {
|
186
|
+
this.addContentIndex();
|
187
|
+
this.updateResultContent();
|
188
|
+
}
|
191
189
|
}
|
192
190
|
componentDidLoad() {
|
193
191
|
this.updateStartEndContent();
|
@@ -199,10 +197,10 @@ export class AlgoliaResults {
|
|
199
197
|
}
|
200
198
|
}
|
201
199
|
render() {
|
202
|
-
return (h(Host, { key: '
|
200
|
+
return (h(Host, { key: '857784ead2b9536559ef2220bff26d508061781c', class: {
|
203
201
|
'show-results': this.showResults,
|
204
202
|
'nano-results': true,
|
205
|
-
} }, h("div", { key: '
|
203
|
+
} }, h("div", { key: 'be165b02c4ec5d2358e15dadfd4695fd5901f0b0', class: "default" }, h("slot", { key: '1ab64bb71c75531e8f6b0c65833de7d2dc1ee0ca' })), h("div", { key: 'cee981cead8b921e29fd4223e4985c3615e0e063', ref: (div) => (this.outputEle = div) }, h("slot", { key: 'cff96070ca2acf18f7b8165444b28f433ca3601d', name: "start-output" }), h("slot", { key: '76833dd55d415baf083527ed5580049f90c36b40', name: "result-output" }), h("div", { key: 'dac7a9081d1a65b4e17dec60044467e17575568e', ref: (div) => (this.infiniteScrollBar = div) }), h("slot", { key: '07c82d60a58c11bcc50807ab95d63cf3fd59d768', name: "end-output" }))));
|
206
204
|
}
|
207
205
|
static get is() { return "nano-algolia-results"; }
|
208
206
|
static get encapsulation() { return "shadow"; }
|
@@ -68,4 +68,8 @@ squirrel.filters.define('remove_spaces', (str) => str.replace(/ /g, '_'));
|
|
68
68
|
squirrel.filters.define('add_spaces', (str) => (str = str.replace(/[_\-]/g, ' ')));
|
69
69
|
squirrel.filters.define('capitalise', (str) => (str = str.charAt(0).toUpperCase() + str.slice(1)));
|
70
70
|
squirrel.filters.define('lowercase', (str) => (str = str.toLowerCase()));
|
71
|
+
squirrel.filters.define('tag_tidy', (str) => {
|
72
|
+
const arr = str.split('>');
|
73
|
+
return arr.map((s) => s.trim())[arr.length - 1];
|
74
|
+
});
|
71
75
|
export const Squirrel = squirrel;
|
@@ -89,7 +89,7 @@ export class NanoBreadcrumb {
|
|
89
89
|
"references": {
|
90
90
|
"Breadcrumb": {
|
91
91
|
"location": "local",
|
92
|
-
"path": "/
|
92
|
+
"path": "/builds/FKs_t1C_/0/Digital/nano-components/packages/components/src/components/breadcrumb/breadcrumb.tsx",
|
93
93
|
"id": "src/components/breadcrumb/breadcrumb.tsx::Breadcrumb"
|
94
94
|
}
|
95
95
|
}
|
@@ -318,8 +318,12 @@ export class Dropdown {
|
|
318
318
|
distance: this.distance,
|
319
319
|
skidding: this.skidding,
|
320
320
|
transitionElement: this.panel,
|
321
|
-
onAfterHide: () =>
|
322
|
-
|
321
|
+
onAfterHide: () => {
|
322
|
+
this.nanoAfterHide.emit();
|
323
|
+
},
|
324
|
+
onAfterShow: () => {
|
325
|
+
this.nanoAfterShow.emit();
|
326
|
+
},
|
323
327
|
onTransitionEnd: () => {
|
324
328
|
if (!this.open) {
|
325
329
|
this.afterHide();
|
@@ -363,12 +367,12 @@ export class Dropdown {
|
|
363
367
|
this.popover.destroy();
|
364
368
|
}
|
365
369
|
render() {
|
366
|
-
return (h(Host, { key: '
|
370
|
+
return (h(Host, { key: 'c0ed4b8b03d27f7437c148c8df305886c6cf29d9', class: "nano-dropdown" }, h("div", { key: '27165586e2caa99ba746e7db3aa1574f0e9d1576', part: "base", id: this.dropdownId, class: {
|
367
371
|
dropdown: true,
|
368
372
|
'dropdown--open': this.open,
|
369
|
-
} }, h("span", { key: '
|
373
|
+
} }, h("span", { key: 'b401a4d341e786ae4fe8c54adf06f8da1be4f531', part: "trigger", class: "dropdown__trigger", ref: (el) => (this.trigger = el), onKeyDown: this.handleTriggerKeyDown, onClick: this.togglePanel }, h("slot", { key: 'bd61e0f2d5e164b21d3ecba81c63ec72b0b7cc6f', name: "trigger", onSlotchange: this.handleTriggerSlotChange })), h("div", { key: 'e0cb2a8823490b70f6aa01073d3873fa785fd763', ref: (el) => (this.positioner = el), class: "dropdown__positioner", popover: "manual", id: this.dropdownId + '-positioner' }, h("div", { key: '3f1b7e3911cd7616ff85d042fc0d1e3e358f36c2', ref: (el) => (this.panel = el), part: "panel", class: `dropdown__panel ${this.placement.split('-').join(' ')}`, "aria-hidden": !this.open, role: this.host.getAttribute('role') === 'group' ? 'group' : 'dialog', "aria-modal": this.host.getAttribute('role') === 'group' ? undefined : 'true', "aria-labelledby": this.dialogTitle ? this.labelId : undefined, tabIndex: this.isOverflowing() ? 0 : undefined }, this.dialogTitle && (h("span", { key: '19cc4dd331a4c2cbdc73a05687681cb2830fff0c', id: this.labelId, class: "dropdown__accessible-title", "aria-live": this.host.getAttribute('role') === 'group'
|
370
374
|
? undefined
|
371
|
-
: 'polite' }, this.dialogTitle)), h("slot", { key: '
|
375
|
+
: 'polite' }, this.dialogTitle)), h("slot", { key: '5da1881086c31481463b3b7244552e17ee66d997' }))))));
|
372
376
|
}
|
373
377
|
static get is() { return "nano-dropdown"; }
|
374
378
|
static get encapsulation() { return "shadow"; }
|