@nanoporetech-digital/components 8.0.0 → 8.1.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.
Files changed (64) hide show
  1. package/dist/cjs/nano-algolia-results.cjs.entry.js +24 -26
  2. package/dist/cjs/nano-algolia.cjs.entry.js +4 -0
  3. package/dist/cjs/nano-avatar_5.cjs.entry.js +120 -117
  4. package/dist/cjs/nano-dropdown_2.cjs.entry.js +10 -6
  5. package/dist/cjs/nano-icon_3.cjs.entry.js +1 -1
  6. package/dist/cjs/nano-in-page-nav.cjs.entry.js +1 -1
  7. package/dist/cjs/nano-tab-group.cjs.entry.js +1 -1
  8. package/dist/cjs/{popover-D_uJstEp.js → popover-BxNxwqMv.js} +5 -3
  9. package/dist/collection/components/algolia/algolia-results.js +25 -27
  10. package/dist/collection/components/algolia/lib/template.js +4 -0
  11. package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
  12. package/dist/collection/components/dropdown/dropdown.js +9 -5
  13. package/dist/collection/components/global-search-results/global-search-results.css +121 -189
  14. package/dist/collection/components/global-search-results/global-search-results.js +121 -117
  15. package/dist/collection/components/in-page-nav/in-page-nav.css +3 -1
  16. package/dist/collection/components/tabs/tab-group.js +1 -1
  17. package/dist/collection/utils/popover.js +5 -3
  18. package/dist/components/algolia.js +4 -0
  19. package/dist/components/dropdown.js +9 -5
  20. package/dist/components/global-search-results.js +122 -118
  21. package/dist/components/nano-algolia-results.js +25 -27
  22. package/dist/components/nano-in-page-nav.js +1 -1
  23. package/dist/components/nano-tab-group.js +1 -1
  24. package/dist/components/popover.js +5 -3
  25. package/dist/esm/nano-algolia-results.entry.js +25 -27
  26. package/dist/esm/nano-algolia.entry.js +4 -0
  27. package/dist/esm/nano-avatar_5.entry.js +120 -117
  28. package/dist/esm/nano-dropdown_2.entry.js +10 -6
  29. package/dist/esm/nano-icon_3.entry.js +1 -1
  30. package/dist/esm/nano-in-page-nav.entry.js +1 -1
  31. package/dist/esm/nano-tab-group.entry.js +1 -1
  32. package/dist/esm/{popover-BKomgCqQ.js → popover-CWVbjtKn.js} +5 -3
  33. package/dist/nano-components/nano-algolia-results.entry.js +1 -1
  34. package/dist/nano-components/nano-algolia.entry.js +1 -1
  35. package/dist/nano-components/nano-avatar_5.entry.js +1 -1
  36. package/dist/nano-components/nano-components.css +8 -6
  37. package/dist/nano-components/nano-dropdown_2.entry.js +1 -1
  38. package/dist/nano-components/nano-icon_3.entry.js +1 -1
  39. package/dist/nano-components/nano-in-page-nav.entry.js +1 -1
  40. package/dist/nano-components/nano-tab-group.entry.js +1 -1
  41. package/dist/nano-components/{popover-BKomgCqQ.js → popover-CWVbjtKn.js} +1 -1
  42. package/dist/style/components.css +1 -1
  43. package/dist/style/components.css.map +1 -1
  44. package/dist/style/core.css +1 -1
  45. package/dist/style/core.css.map +1 -1
  46. package/dist/style/nano.css +1 -1
  47. package/dist/style/nano.css.map +1 -1
  48. package/dist/types/{Users/John.Jenkins/projects → builds/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +1 -1
  49. package/dist/types/{Users/John.Jenkins/projects → builds/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +1 -1
  50. package/dist/types/{Users/John.Jenkins/projects → builds/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +1 -1
  51. package/dist/types/builds/W1hp42tj/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +2 -0
  52. package/dist/types/builds/W1hp42tj/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +2 -0
  53. package/dist/types/components/global-search-results/global-search-results.d.ts +2 -0
  54. package/docs-json.json +2 -2
  55. package/hydrate/index.js +162 -153
  56. package/hydrate/index.mjs +162 -153
  57. package/package.json +2 -2
  58. package/dist/types/Users/John.Jenkins/projects/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -2
  59. package/dist/types/Users/John.Jenkins/projects/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -2
  60. /package/dist/types/{Users/John.Jenkins/projects → builds/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
  61. /package/dist/types/{Users/John.Jenkins/projects → builds/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
  62. /package/dist/types/{Users/John.Jenkins/projects → builds/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
  63. /package/dist/types/{Users/John.Jenkins/projects → builds/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
  64. /package/dist/types/{Users/John.Jenkins/projects → builds/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -326,7 +326,7 @@ const NanoTabGroup$1 = /*@__PURE__*/ proxyCustomElement(class NanoTabGroup exten
326
326
  group: true,
327
327
  'group--top': this.placement === 'top',
328
328
  'group--start': this.placement === 'start',
329
- }, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("nano-masked-overflow", { role: "nav", class: "group__tabs", part: "tabs__wrapper", exportparts: "items:tabs, scroll-button:tabs__scroll-button, indicator:active-tab-indicator", orientation: this.placement === 'top' ? 'horizontal' : 'vertical', isActiveHandler: (itm) => this.activeTab === itm, scrollControls: !this.noScrollControls, hideScrollbars: true }, h("slot", { name: "tabs", onSlotchange: this.handleTabSlotChange }), h("div", { class: "group__tabs-border" })), h("div", { part: "body", class: "group__body", onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h("slot", { onSlotchange: this.handleContentSlotChange })))));
329
+ }, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("nano-masked-overflow", { role: "navigation", class: "group__tabs", part: "tabs__wrapper", exportparts: "items:tabs, scroll-button:tabs__scroll-button, indicator:active-tab-indicator", orientation: this.placement === 'top' ? 'horizontal' : 'vertical', isActiveHandler: (itm) => this.activeTab === itm, scrollControls: !this.noScrollControls, hideScrollbars: true }, h("slot", { name: "tabs", onSlotchange: this.handleTabSlotChange }), h("div", { class: "group__tabs-border" })), h("div", { part: "body", class: "group__body", onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h("slot", { onSlotchange: this.handleContentSlotChange })))));
330
330
  }
331
331
  static get style() { return tabGroupCss; }
332
332
  }, [257, "nano-tab-group", {
@@ -1831,7 +1831,7 @@ class Popover {
1831
1831
  // this.isVisible = false;
1832
1832
  this.popover.hidden = true;
1833
1833
  this.popover.classList.remove(this.options.visibleClass);
1834
- this.popover.addEventListener('transitionend', this.handleTransitionEnd.bind(this));
1834
+ this.popover.addEventListener('transitionend', this.handleTransitionEnd);
1835
1835
  }
1836
1836
  handleTransitionEnd(event) {
1837
1837
  const target = event.target;
@@ -1846,10 +1846,13 @@ class Popover {
1846
1846
  this.popover.classList.remove(this.options.visibleClass);
1847
1847
  this.options.onAfterHide.call(this);
1848
1848
  }
1849
+ else {
1850
+ this.options.onAfterShow.call(this);
1851
+ }
1849
1852
  }
1850
1853
  }
1851
1854
  destroy() {
1852
- this.popover.removeEventListener('transitionend', this.handleTransitionEnd.bind(this));
1855
+ this.popover.removeEventListener('transitionend', this.handleTransitionEnd);
1853
1856
  if (this.popper) {
1854
1857
  this.popper.destroy();
1855
1858
  this.popper = null;
@@ -1901,7 +1904,6 @@ class Popover {
1901
1904
  },
1902
1905
  ],
1903
1906
  });
1904
- this.popover.addEventListener('transitionend', () => this.options.onAfterShow.call(this), { once: true });
1905
1907
  // Reposition the menu after it appears in case a modifier kicked in
1906
1908
  requestAnimationFrame(() => {
1907
1909
  this.popper?.update().catch((e) => {
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import { r as registerInstance, c as createEvent, g as getElement, e as readTask, a as Host } from './index-DgO0qeQ9.js';
4
+ import { r as registerInstance, c as createEvent, g as getElement, a as Host } from './index-DgO0qeQ9.js';
5
5
  import { h } from './renderer-T8etwwhk.js';
6
6
  import { W as Wormhole, S as SearchChangeEvent } from './algolia-data-D9ZAstcC.js';
7
7
 
@@ -160,30 +160,28 @@ const AlgoliaResults = class {
160
160
  this.nanoTplUpdated.emit(this.el);
161
161
  }
162
162
  connectedCallback() {
163
- readTask(() => {
164
- this.startTplSlot = this.el.querySelector('[slot="start-template"]');
165
- this.startOutputSlot = this.el.querySelector('[slot="start-output"]');
166
- if (this.startTplSlot) {
167
- this.startTpl = this.startTplSlot.innerHTML;
168
- this.startTpl = this.startTpl.replace(/=>/gm, '=>');
169
- }
170
- this.resultTplSlot = this.el.querySelector('[slot="result-template"]');
171
- this.outputSlot = this.el.querySelector('[slot="result-output"]');
172
- if (this.resultTplSlot) {
173
- this.resultTpl = this.resultTplSlot.innerHTML;
174
- this.resultTpl = this.resultTpl.replace(/=>/gm, '=>');
175
- }
176
- this.endTplSlot = this.el.querySelector('[slot="end-template"]');
177
- this.endOutputSlot = this.el.querySelector('[slot="end-output"]');
178
- if (this.endTplSlot) {
179
- this.endTpl = this.endTplSlot.innerHTML;
180
- this.endTpl = this.endTpl.replace(/=>/gm, '=>');
181
- }
182
- if (this.indexResults) {
183
- this.addContentIndex();
184
- this.updateResultContent();
185
- }
186
- });
163
+ this.startTplSlot = this.el.querySelector('[slot="start-template"]');
164
+ this.startOutputSlot = this.el.querySelector('[slot="start-output"]');
165
+ if (this.startTplSlot) {
166
+ this.startTpl = this.startTplSlot.innerHTML;
167
+ this.startTpl = this.startTpl.replace(/=>/gm, '=>');
168
+ }
169
+ this.resultTplSlot = this.el.querySelector('[slot="result-template"]');
170
+ this.outputSlot = this.el.querySelector('[slot="result-output"]');
171
+ if (this.resultTplSlot) {
172
+ this.resultTpl = this.resultTplSlot.innerHTML;
173
+ this.resultTpl = this.resultTpl.replace(/=>/gm, '=>');
174
+ }
175
+ this.endTplSlot = this.el.querySelector('[slot="end-template"]');
176
+ this.endOutputSlot = this.el.querySelector('[slot="end-output"]');
177
+ if (this.endTplSlot) {
178
+ this.endTpl = this.endTplSlot.innerHTML;
179
+ this.endTpl = this.endTpl.replace(/=>/gm, '=>');
180
+ }
181
+ if (this.indexResults) {
182
+ this.addContentIndex();
183
+ this.updateResultContent();
184
+ }
187
185
  }
188
186
  componentDidLoad() {
189
187
  this.updateStartEndContent();
@@ -195,10 +193,10 @@ const AlgoliaResults = class {
195
193
  }
196
194
  }
197
195
  render() {
198
- return (h(Host, { key: '14939adaa742d13214faf5375692737010467a7c', class: {
196
+ return (h(Host, { key: '857784ead2b9536559ef2220bff26d508061781c', class: {
199
197
  'show-results': this.showResults,
200
198
  'nano-results': true,
201
- } }, h("div", { key: '8153995d81af56df593694ca7902e93f6efb0565', class: "default" }, h("slot", { key: '60e2c4a10cdf5f6fbd609972114be5d04ccfe3f0' })), h("div", { key: 'cf589b852a52ffc84b8d9dd48c193603e733f02e', ref: (div) => (this.outputEle = div) }, h("slot", { key: 'aad8bfb81edca4af57503bc80b4eac5cbe69a97e', name: "start-output" }), h("slot", { key: '30e848bcf8b1d0f03d57b65cb805abcca87aefd5', name: "result-output" }), h("div", { key: '8663b935facbe62a5b30d4e6446cc978083369d7', ref: (div) => (this.infiniteScrollBar = div) }), h("slot", { key: 'b8652a198cd7fefe5a127b8bc9387305971be922', name: "end-output" }))));
199
+ } }, 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" }))));
202
200
  }
203
201
  static get watchers() { return {
204
202
  "results": ["addContentIndex", "resultsChange"],
@@ -1165,6 +1165,10 @@ filters.define('remove_spaces', (str) => str.replace(/ /g, '_'));
1165
1165
  filters.define('add_spaces', (str) => (str = str.replace(/[_\-]/g, ' ')));
1166
1166
  filters.define('capitalise', (str) => (str = str.charAt(0).toUpperCase() + str.slice(1)));
1167
1167
  filters.define('lowercase', (str) => (str = str.toLowerCase()));
1168
+ filters.define('tag_tidy', (str) => {
1169
+ const arr = str.split('>');
1170
+ return arr.map((s) => s.trim())[arr.length - 1];
1171
+ });
1168
1172
  const Squirrel = squirrel;
1169
1173
 
1170
1174
  const algoliaCss = ":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{position:relative;display:block}:host ::slotted([slot=search-template]){display:none !important}.loader{opacity:0;position:fixed;block-size:100%;inline-size:100%;min-block-size:100%;max-block-size:100vh !important;max-inline-size:100vw !important;inset-inline-start:0;inset-block-start:0;z-index:-10;font-size:60px;display:flex;align-items:center;justify-content:center;transition:opacity 0.2s ease, z-index 0.01s ease 0.2s}.loader.loading{opacity:1;z-index:10;transition:z-index 0.01s ease, opacity 0.2s ease 0.01s}.default{block-size:100%}.default:focus{outline:none}.results{opacity:0;outline:none;overflow:auto;transition:transform 0.3s ease, opacity 0.3s ease, visibility 0.01s ease 0.3s, z-index 0.01s ease 0.3s;transform:translate(0, 100px);visibility:hidden;z-index:-1;position:absolute;inset-block-start:0;inset-inline-start:0;display:none}.results-container{position:relative}.results.show{transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.3s ease 0.01s, opacity 0.3s ease 0.01s, overflow 0.01s ease 0.31s;transform:translate(0, 0);visibility:visible;opacity:1;z-index:10;overflow:hidden}.results.shown{block-size:auto !important;inline-size:auto !important;display:block;position:static;transform:none;z-index:auto;visibility:inherit;opacity:initial;overflow:visible}";