@nanoporetech-digital/components 8.3.2 → 8.4.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 (225) hide show
  1. package/dist/cjs/constructible-style-BsHBb9au.js +133 -0
  2. package/dist/cjs/{fade-BzBFJiQK.js → fade-DBuNbJEw.js} +1 -1
  3. package/dist/cjs/{fullscreen-Cz3eYnOp.js → fullscreen-Bk4jXSN0.js} +1 -1
  4. package/dist/cjs/index-DGttnXif.js +28 -16
  5. package/dist/cjs/{lazyload-DIFYejbf.js → lazyload-gQqOMvpr.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/nano-accordion.cjs.entry.js +28 -9
  8. package/dist/cjs/nano-avatar_5.cjs.entry.js +11 -11
  9. package/dist/cjs/nano-components.cjs.js +1 -1
  10. package/dist/cjs/{nano-data-table-DFEflpc4.js → nano-data-table-BHQIpW0N.js} +31 -1
  11. package/dist/cjs/nano-data-table.cjs.entry.js +1 -1
  12. package/dist/cjs/nano-details.cjs.entry.js +6 -4
  13. package/dist/cjs/nano-field-validator.cjs.entry.js +4 -2
  14. package/dist/cjs/nano-footer.cjs.entry.js +2 -2
  15. package/dist/cjs/nano-global-nav.cjs.entry.js +22 -21
  16. package/dist/cjs/nano-grid-item.cjs.entry.js +1 -1
  17. package/dist/cjs/nano-grid_2.cjs.entry.js +6 -130
  18. package/dist/cjs/nano-hero.cjs.entry.js +4 -4
  19. package/dist/cjs/{nano-icon_3.cjs.entry.js → nano-icon-button_2.cjs.entry.js} +2 -320
  20. package/dist/cjs/nano-icon.cjs.entry.js +326 -0
  21. package/dist/cjs/nano-in-page-nav.cjs.entry.js +1 -1
  22. package/dist/cjs/nano-increment.cjs.entry.js +1 -1
  23. package/dist/cjs/nano-intersection-observe.cjs.entry.js +1 -1
  24. package/dist/cjs/nano-masked-overflow.cjs.entry.js +3 -3
  25. package/dist/cjs/nano-menu-drawer.cjs.entry.js +2 -2
  26. package/dist/cjs/nano-more-less.cjs.entry.js +2 -2
  27. package/dist/cjs/nano-rating.cjs.entry.js +4 -4
  28. package/dist/cjs/nano-resize-observe.cjs.entry.js +2 -2
  29. package/dist/cjs/nano-slide.cjs.entry.js +1 -1
  30. package/dist/cjs/{nano-slides-C576PTmo.js → nano-slides-C73bSG0h.js} +7 -7
  31. package/dist/cjs/nano-slides.cjs.entry.js +1 -1
  32. package/dist/cjs/nano-sortable.cjs.entry.js +1 -1
  33. package/dist/cjs/nano-step-accordion.cjs.entry.js +101 -0
  34. package/dist/cjs/nano-step-breadcrumb.cjs.entry.js +133 -0
  35. package/dist/cjs/nano-sticker.cjs.entry.js +2 -2
  36. package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
  37. package/dist/cjs/nano-tab.cjs.entry.js +2 -2
  38. package/dist/cjs/nano-table.cjs.entry.js +2 -2
  39. package/dist/cjs/{page-dots-Clb2QknR.js → page-dots-BLPta5z5.js} +1 -1
  40. package/dist/cjs/{table.worker-DxRLPmU9.js → table.worker-BeE8kdSf.js} +1 -1
  41. package/dist/collection/collection-manifest.json +2 -0
  42. package/dist/collection/components/accordion/accordion.js +51 -13
  43. package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
  44. package/dist/collection/components/data-table/table.js +1 -13
  45. package/dist/collection/components/details/details.js +9 -6
  46. package/dist/collection/components/field-validator/field-validator.js +4 -2
  47. package/dist/collection/components/footer/footer.css +7 -7
  48. package/dist/collection/components/footer/footer.js +2 -1
  49. package/dist/collection/components/global-nav/global-nav.js +23 -22
  50. package/dist/collection/components/global-search-results/global-search-results.js +4 -4
  51. package/dist/collection/components/grid/grid-item.js +1 -1
  52. package/dist/collection/components/grid/grid.js +1 -1
  53. package/dist/collection/components/hero/hero.js +4 -4
  54. package/dist/collection/components/icon/icon.js +1 -1
  55. package/dist/collection/components/icon/validate.js +1 -1
  56. package/dist/collection/components/img/img.js +3 -3
  57. package/dist/collection/components/in-page-nav/in-page-nav.js +1 -1
  58. package/dist/collection/components/increment/increment.js +1 -1
  59. package/dist/collection/components/intersection-observe/intersection-observe.js +1 -1
  60. package/dist/collection/components/masked-overflow/masked-overflow.js +3 -3
  61. package/dist/collection/components/menu-drawer/menu-drawer.js +2 -2
  62. package/dist/collection/components/more-less/more-less.js +2 -2
  63. package/dist/collection/components/rating/rating.js +4 -4
  64. package/dist/collection/components/resize-observe/resize-observe.js +2 -2
  65. package/dist/collection/components/select/select.js +7 -7
  66. package/dist/collection/components/slides/slide.js +1 -1
  67. package/dist/collection/components/slides/slides.js +3 -3
  68. package/dist/collection/components/sortable/sortable.js +1 -1
  69. package/dist/collection/components/step-accordion/step-accordion.css +138 -0
  70. package/dist/collection/components/step-accordion/step-accordion.js +190 -0
  71. package/dist/collection/components/step-breadcrumb/step-breadcrumb.css +231 -0
  72. package/dist/collection/components/step-breadcrumb/step-breadcrumb.js +222 -0
  73. package/dist/collection/components/sticker/sticker.js +2 -2
  74. package/dist/collection/components/table/table.js +2 -2
  75. package/dist/collection/components/tabs/tab-content.js +2 -2
  76. package/dist/collection/components/tabs/tab.js +2 -2
  77. package/dist/collection/components/tooltip/tooltip.js +2 -2
  78. package/dist/collection/utils/constructible-style.js +2 -2
  79. package/dist/collection/utils/performance.js +17 -0
  80. package/dist/components/accordion.js +80 -0
  81. package/dist/components/constructible-style.js +131 -0
  82. package/dist/components/details.js +6 -4
  83. package/dist/components/global-search-results.js +4 -4
  84. package/dist/components/grid.js +5 -129
  85. package/dist/components/icon.js +2 -2
  86. package/dist/components/img.js +3 -3
  87. package/dist/components/masked-overflow.js +3 -3
  88. package/dist/components/nano-accordion.js +1 -56
  89. package/dist/components/nano-data-table.js +30 -0
  90. package/dist/components/nano-field-validator.js +4 -2
  91. package/dist/components/nano-footer.js +2 -2
  92. package/dist/components/nano-global-nav.js +22 -21
  93. package/dist/components/nano-grid-item.js +1 -1
  94. package/dist/components/nano-hero.js +4 -4
  95. package/dist/components/nano-in-page-nav.js +1 -1
  96. package/dist/components/nano-increment.js +1 -1
  97. package/dist/components/nano-intersection-observe.js +1 -1
  98. package/dist/components/nano-menu-drawer.js +2 -2
  99. package/dist/components/nano-more-less.js +2 -2
  100. package/dist/components/nano-rating.js +4 -4
  101. package/dist/components/nano-slide.js +1 -1
  102. package/dist/components/nano-sortable.js +1 -1
  103. package/dist/components/nano-step-accordion.d.ts +11 -0
  104. package/dist/components/nano-step-accordion.js +141 -0
  105. package/dist/components/nano-step-breadcrumb.d.ts +11 -0
  106. package/dist/components/nano-step-breadcrumb.js +181 -0
  107. package/dist/components/nano-tab-content.js +2 -2
  108. package/dist/components/nano-tab.js +2 -2
  109. package/dist/components/nano-table.js +2 -2
  110. package/dist/components/resize-observe.js +2 -2
  111. package/dist/components/select.js +7 -7
  112. package/dist/components/slides.js +3 -3
  113. package/dist/components/sticker.js +2 -2
  114. package/dist/components/tooltip.js +2 -2
  115. package/dist/esm/constructible-style-B2_GfhhS.js +131 -0
  116. package/dist/esm/{fade-D4P3XGVa.js → fade-C0NluV0K.js} +1 -1
  117. package/dist/esm/{fullscreen-Cfl6LvH2.js → fullscreen-Ck_w6MCZ.js} +1 -1
  118. package/dist/esm/index-BM3Om9WE.js +28 -16
  119. package/dist/esm/{lazyload-CQYknGN2.js → lazyload-DddTyM-A.js} +1 -1
  120. package/dist/esm/loader.js +1 -1
  121. package/dist/esm/nano-accordion.entry.js +28 -9
  122. package/dist/esm/nano-avatar_5.entry.js +11 -11
  123. package/dist/esm/nano-components.js +1 -1
  124. package/dist/esm/{nano-data-table-Bqk8ZUaL.js → nano-data-table-CWliPF7Y.js} +31 -1
  125. package/dist/esm/nano-data-table.entry.js +1 -1
  126. package/dist/esm/nano-details.entry.js +6 -4
  127. package/dist/esm/nano-field-validator.entry.js +4 -2
  128. package/dist/esm/nano-footer.entry.js +2 -2
  129. package/dist/esm/nano-global-nav.entry.js +22 -21
  130. package/dist/esm/nano-grid-item.entry.js +1 -1
  131. package/dist/esm/nano-grid_2.entry.js +7 -131
  132. package/dist/esm/nano-hero.entry.js +4 -4
  133. package/dist/esm/{nano-icon_3.entry.js → nano-icon-button_2.entry.js} +4 -321
  134. package/dist/esm/nano-icon.entry.js +324 -0
  135. package/dist/esm/nano-in-page-nav.entry.js +1 -1
  136. package/dist/esm/nano-increment.entry.js +1 -1
  137. package/dist/esm/nano-intersection-observe.entry.js +1 -1
  138. package/dist/esm/nano-masked-overflow.entry.js +3 -3
  139. package/dist/esm/nano-menu-drawer.entry.js +2 -2
  140. package/dist/esm/nano-more-less.entry.js +2 -2
  141. package/dist/esm/nano-rating.entry.js +4 -4
  142. package/dist/esm/nano-resize-observe.entry.js +2 -2
  143. package/dist/esm/nano-slide.entry.js +1 -1
  144. package/dist/esm/{nano-slides-DcJWApi6.js → nano-slides-BiPGpe5F.js} +7 -7
  145. package/dist/esm/nano-slides.entry.js +1 -1
  146. package/dist/esm/nano-sortable.entry.js +1 -1
  147. package/dist/esm/nano-step-accordion.entry.js +99 -0
  148. package/dist/esm/nano-step-breadcrumb.entry.js +131 -0
  149. package/dist/esm/nano-sticker.entry.js +2 -2
  150. package/dist/esm/nano-tab-content.entry.js +2 -2
  151. package/dist/esm/nano-tab.entry.js +2 -2
  152. package/dist/esm/nano-table.entry.js +2 -2
  153. package/dist/esm/{page-dots-kX7jiD3G.js → page-dots-WKehEjjM.js} +1 -1
  154. package/dist/esm/{table.worker-a52UkSRM.js → table.worker-DJks4i_l.js} +1 -1
  155. package/dist/nano-components/constructible-style-B2_GfhhS.js +4 -0
  156. package/dist/nano-components/{fade-D4P3XGVa.js → fade-C0NluV0K.js} +1 -1
  157. package/dist/nano-components/{fullscreen-Cfl6LvH2.js → fullscreen-Ck_w6MCZ.js} +1 -1
  158. package/dist/nano-components/{lazyload-CQYknGN2.js → lazyload-DddTyM-A.js} +1 -1
  159. package/dist/nano-components/nano-accordion.entry.js +1 -1
  160. package/dist/nano-components/nano-avatar_5.entry.js +1 -1
  161. package/dist/nano-components/nano-components.css +32 -1
  162. package/dist/nano-components/nano-components.esm.js +1 -1
  163. package/dist/nano-components/nano-data-table-CWliPF7Y.js +4 -0
  164. package/dist/nano-components/nano-data-table.entry.js +1 -1
  165. package/dist/nano-components/nano-details.entry.js +1 -1
  166. package/dist/nano-components/nano-field-validator.entry.js +1 -1
  167. package/dist/nano-components/nano-footer.entry.js +1 -1
  168. package/dist/nano-components/nano-global-nav.entry.js +1 -1
  169. package/dist/nano-components/nano-grid-item.entry.js +1 -1
  170. package/dist/nano-components/nano-grid_2.entry.js +1 -1
  171. package/dist/nano-components/nano-hero.entry.js +1 -1
  172. package/dist/nano-components/nano-icon-button_2.entry.js +4 -0
  173. package/dist/nano-components/nano-icon.entry.js +4 -0
  174. package/dist/nano-components/nano-in-page-nav.entry.js +1 -1
  175. package/dist/nano-components/nano-increment.entry.js +1 -1
  176. package/dist/nano-components/nano-intersection-observe.entry.js +1 -1
  177. package/dist/nano-components/nano-masked-overflow.entry.js +1 -1
  178. package/dist/nano-components/nano-menu-drawer.entry.js +1 -1
  179. package/dist/nano-components/nano-more-less.entry.js +1 -1
  180. package/dist/nano-components/nano-rating.entry.js +1 -1
  181. package/dist/nano-components/nano-resize-observe.entry.js +1 -1
  182. package/dist/nano-components/nano-slide.entry.js +1 -1
  183. package/dist/nano-components/{nano-slides-DcJWApi6.js → nano-slides-BiPGpe5F.js} +3 -3
  184. package/dist/nano-components/nano-slides.entry.js +1 -1
  185. package/dist/nano-components/nano-sortable.entry.js +1 -1
  186. package/dist/nano-components/nano-step-accordion.entry.js +4 -0
  187. package/dist/nano-components/nano-step-breadcrumb.entry.js +4 -0
  188. package/dist/nano-components/nano-sticker.entry.js +1 -1
  189. package/dist/nano-components/nano-tab-content.entry.js +1 -1
  190. package/dist/nano-components/nano-tab.entry.js +1 -1
  191. package/dist/nano-components/nano-table.entry.js +1 -1
  192. package/dist/nano-components/{page-dots-kX7jiD3G.js → page-dots-WKehEjjM.js} +1 -1
  193. package/dist/nano-components/{table.worker-a52UkSRM.js → table.worker-DJks4i_l.js} +1 -1
  194. package/dist/stencil.config.js +1 -0
  195. package/dist/style/components.css +1 -1
  196. package/dist/style/components.css.map +1 -1
  197. package/dist/style/core.css +1 -1
  198. package/dist/style/core.css.map +1 -1
  199. package/dist/style/nano.css +1 -1
  200. package/dist/style/nano.css.map +1 -1
  201. package/dist/types/components/accordion/accordion.d.ts +10 -4
  202. package/dist/types/components/details/details.d.ts +3 -2
  203. package/dist/types/components/footer/footer.d.ts +1 -0
  204. package/dist/types/components/global-nav/global-nav.d.ts +1 -1
  205. package/dist/types/components/step-accordion/step-accordion.d.ts +38 -0
  206. package/dist/types/components/step-breadcrumb/step-breadcrumb.d.ts +37 -0
  207. package/dist/types/components.d.ts +174 -4
  208. package/dist/types/utils/performance.d.ts +1 -0
  209. package/docs-json.json +352 -18
  210. package/docs-vscode.json +41 -2
  211. package/hydrate/index.js +404 -99
  212. package/hydrate/index.mjs +404 -99
  213. package/package.json +2 -2
  214. package/dist/nano-components/nano-data-table-Bqk8ZUaL.js +0 -4
  215. package/dist/nano-components/nano-icon_3.entry.js +0 -4
  216. /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +0 -0
  217. /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
  218. /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +0 -0
  219. /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +0 -0
  220. /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
  221. /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
  222. /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
  223. /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
  224. /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
  225. /package/dist/types/builds/{x6knoJK1 → QrfEi4pt}/0/Digital/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -0,0 +1,131 @@
1
+ /*!
2
+ * Custom elements for Nanopore-Digital Web applications
3
+ */
4
+ import { Build, h, Host, getElement } from '@stencil/core/internal/client';
5
+
6
+ // import type { VNode, HTMLStencilElement } from "@stencil/core";
7
+ const supportsConstructibleStylesheets = (() => {
8
+ try {
9
+ return !!new CSSStyleSheet();
10
+ }
11
+ catch (_e) {
12
+ return false;
13
+ }
14
+ })();
15
+ const cacheKeys = new WeakMap();
16
+ /**
17
+ * Dynamically create a constructible stylesheet which is applied to the component.
18
+ * The stylesheet is then cached for future instances of the component.
19
+ * @usage
20
+ As a string:
21
+ ```
22
+ @ConstructableStyle() style = `.bg { background: url('assets/${ this.mode }/bg.png'); }`;
23
+ ```
24
+ As a function:
25
+ ```
26
+ @ConstructableStyle() style = () => `.bg { background: url('assets/${ this.mode }/bg.png'); }`;
27
+ ```
28
+ * @param opts - optional `cacheKeyProperty` - in case an instance of a component could produce different styles based on variables.
29
+ * @returns `@ConstructableStyle` decorator
30
+ */
31
+ function ConstructibleStyle(opts = {}) {
32
+ return (target, propertyKey) => {
33
+ if (!opts.cacheKeyProperty) {
34
+ opts.cacheKeyProperty = propertyKey;
35
+ }
36
+ const { componentWillLoad, render, componentWillRender } = target;
37
+ if (supportsConstructibleStylesheets && !Build.isServer) {
38
+ // adds a constructible stylesheet to the component
39
+ const addStylesheet = (instance) => {
40
+ if (!instance[opts.cacheKeyProperty] ||
41
+ (cacheKeys.get(instance) &&
42
+ cacheKeys.get(instance) === instance[opts.cacheKeyProperty]))
43
+ return;
44
+ cacheKeys.set(instance, instance[opts.cacheKeyProperty]);
45
+ const host = getElement(instance);
46
+ const cssText = typeof instance[propertyKey] === 'function'
47
+ ? instance[propertyKey]()
48
+ : instance[propertyKey];
49
+ const root = (host.shadowRoot || document);
50
+ root.adoptedStyleSheets = [
51
+ ...(root.adoptedStyleSheets || []),
52
+ getOrCreateStylesheet(instance, target, cssText, opts),
53
+ ];
54
+ };
55
+ target.componentWillLoad = function () {
56
+ const willLoadResult = componentWillLoad && componentWillLoad.call(this);
57
+ addStylesheet(this);
58
+ return willLoadResult;
59
+ };
60
+ target.componentWillRender = function () {
61
+ const willRenderResult = componentWillRender && componentWillRender.call(this);
62
+ addStylesheet(this);
63
+ return willRenderResult;
64
+ };
65
+ }
66
+ else {
67
+ // adds a style element to the component
68
+ target.render = function () {
69
+ const cssText = typeof this[propertyKey] === 'function'
70
+ ? this[propertyKey]()
71
+ : this[propertyKey];
72
+ let renderedNode = render.call(this);
73
+ if (isHost(renderedNode)) {
74
+ appendStyleToHost(renderedNode, target.constructor.name, cssText);
75
+ }
76
+ else {
77
+ renderedNode = h(Host, null, renderedNode);
78
+ if (!('attachShadow' in HTMLElement.prototype)) {
79
+ appendStyleToHost(renderedNode, target.constructor.name, cssText);
80
+ }
81
+ else {
82
+ if (!target.__constructableStyle) {
83
+ const style = document.createElement('style');
84
+ style.setAttribute('type', 'text/css');
85
+ style.setAttribute('constructible-style', target.constructor.name);
86
+ style.innerHTML = cssText;
87
+ target.__constructableStyle = style;
88
+ document.head.appendChild(style);
89
+ }
90
+ }
91
+ }
92
+ return renderedNode;
93
+ };
94
+ }
95
+ };
96
+ }
97
+ function appendStyleToHost(node, targetName, cssText) {
98
+ (getHostChildren(node) || []).push(h("style", { type: "text/css", "constructible-style": targetName }, cssText));
99
+ }
100
+ function getOrCreateStylesheet(instance, target, cssText, opts) {
101
+ if (!target.__constructableStyle) {
102
+ target.__constructableStyle = {};
103
+ }
104
+ const key = instance[opts.cacheKeyProperty];
105
+ if (!target.__constructableStyle[key]) {
106
+ target.__constructableStyle[key] = new CSSStyleSheet();
107
+ target.__constructableStyle[key].replace(cssText);
108
+ }
109
+ return target.__constructableStyle[key];
110
+ }
111
+ function isHost(node) {
112
+ for (const prop in node) {
113
+ if (prop in node) {
114
+ if (node[prop] === Host) {
115
+ return true;
116
+ }
117
+ }
118
+ }
119
+ return false;
120
+ }
121
+ function getHostChildren(node) {
122
+ for (const prop in node) {
123
+ if (prop in node) {
124
+ if (Array.isArray(node[prop])) {
125
+ return node[prop];
126
+ }
127
+ }
128
+ }
129
+ }
130
+
131
+ export { ConstructibleStyle as C };
@@ -131,7 +131,9 @@ const NanoDetails = /*@__PURE__*/ proxyCustomElement(class NanoDetails extends H
131
131
  if (this.stateChanging)
132
132
  return;
133
133
  for (const change of changes) {
134
- if (change.type === 'attributes' && change.attributeName === 'open') {
134
+ if (change.type === 'attributes' &&
135
+ change.attributeName === 'open' &&
136
+ !this.disabled) {
135
137
  this.open = this.detailsEl.open;
136
138
  }
137
139
  }
@@ -159,13 +161,13 @@ const NanoDetails = /*@__PURE__*/ proxyCustomElement(class NanoDetails extends H
159
161
  }
160
162
  }
161
163
  render() {
162
- return (h(Host, { key: '4109b3670c8ccd41ddac5eb03e799e1c149ad7c8', class: "nano-details" }, h("details", { key: '6af0af31042e2bb156e835604b4f79edad79b7ce', part: "base", ref: (d) => (this.detailsEl = d), class: {
164
+ return (h(Host, { key: '1cbedc078a3390a3ad82b99ac0f37e8ea0f8d480', class: "nano-details" }, h("details", { key: '22659218ba7d1ec936523ff33c7ed2a1efb2af74', part: "base", ref: (d) => (this.detailsEl = d), class: {
163
165
  details: true,
164
166
  disabled: this.disabled,
165
- } }, h("summary", { key: '6589a9dd56e93246177f8c7b6f5e46f279e661c1', part: "header", "aria-controls": "content", "aria-expanded": this.open ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? '-1' : '0', id: "header", role: "button", class: "header", ref: (s) => (this.headerEl = s), onKeyDown: this.onKeyDown, onClick: this.onMouseDown }, this.slotCtrl.has('icon-start') && (h("span", { key: '7d794f0724f7c43bf4747edd1e402be32ec28129', part: "icon icon--start", class: "icon icon--start" }, h("slot", { key: '4e55292c3018d9bbcb4b65e2f69002bf0cb5ae43', name: "icon-start" }))), h("div", { key: 'd3ab36f253ae4f062fe2aa998c483648b382b7ca', part: "label", class: "label" }, this.label ? this.label : h("slot", { name: "label" })), h("span", { key: '6bd0a9630c2d657915811164bdcbf0696609d4e5', part: "icon icon--end", class: "icon icon--end" }, this.open ? (h("slot", { name: "icon-collapse" })) : (h("slot", { name: "icon-expand" })), h("slot", { key: 'b38f81f25f6d224da5afa1d701621993dba3d723', name: "icon-end" }, !this.slotCtrl.has('icon-start') &&
167
+ } }, h("summary", { key: '3a7cd64e7d8e2b5235b7c0f7d58c434cb2a52469', part: "header", "aria-controls": "content", "aria-expanded": this.open ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? '-1' : '0', id: "header", role: "button", class: "header", ref: (s) => (this.headerEl = s), onKeyDown: this.onKeyDown, onClick: this.onMouseDown }, this.slotCtrl.has('icon-start') && (h("span", { key: '4a8de08dca34823e162019e2d4dddef2ed2c123d', part: "icon icon--start", class: "icon icon--start" }, h("slot", { key: 'cf6ea31f1685afa4bde64a6cbdef43cb0d0a053a', name: "icon-start" }))), h("div", { key: '0b11c544cfbb5852dfeae66b482154f1780a2569', part: "label", class: "label" }, this.label ? this.label : h("slot", { name: "label" })), h("span", { key: '5470af7891318c513870c473a8ad1f501174f51b', part: "icon icon--end", class: "icon icon--end" }, this.open ? (h("slot", { name: "icon-collapse" })) : (h("slot", { name: "icon-expand" })), h("slot", { key: '45960716eeec5d5ad08b63fd536608fcd33ab8f2', name: "icon-end" }, !this.slotCtrl.has('icon-start') &&
166
168
  !this.slotCtrl.has('icon-end') &&
167
169
  !this.slotCtrl.has('icon-expand') &&
168
- !this.slotCtrl.has('icon-collapse') && (h("nano-icon", { key: 'be8d56737badde36a3a88f797f411065e5a59ae4', class: "default-icon", name: "light/chevron-down" }))))), h("div", { key: '90d0bba50dc77e45c5861ac74188aba8005980fc', part: "body", class: "body", ref: (div) => (this.bodyEl = div), role: "region", "aria-labelledby": "header" }, h("div", { key: 'ecc6e416fb9bc20d0d2feb99c7ed899104338c1e', class: "content-wrapper" }, h("div", { key: '18115d6264604535817c700ab7eea7265f4d7b3b', part: "content", class: "content", id: "content" }, h("slot", { key: 'bfdb6bda88ba909bbedec0e000b6fef5c1d1895c' })))))));
170
+ !this.slotCtrl.has('icon-collapse') && (h("nano-icon", { key: '5357b61cb197dc4a1ceccf415a34defdfeb6b290', class: "default-icon", name: "light/chevron-down" }))))), h("div", { key: 'aa7f850c8415c2cd40fd7a965fba8eb98fca62b5', part: "body", class: "body", ref: (div) => (this.bodyEl = div), role: "region", "aria-labelledby": "header" }, h("div", { key: 'e98e6a68e4c15525b4377d4229fb4a1855650732', part: "content-wrapper", class: "content-wrapper" }, h("div", { key: '6710e302f7e2a5987ccd6703ea3c6cc0bf705d23', part: "content", class: "content", id: "content" }, h("slot", { key: '891525e66383979e621787f766bcfbcea78a9630' })))))));
169
171
  }
170
172
  static get watchers() { return {
171
173
  "open": ["toggleClick"]
@@ -314,12 +314,12 @@ const GlobalSearchResults = /*@__PURE__*/ proxyCustomElement(class GlobalSearchR
314
314
  this.ro.observe(this.el);
315
315
  }
316
316
  render() {
317
- return (h(Host, { key: 'c3e9e501af8fea7703a69a11249b209a2b249d70', class: {
317
+ return (h(Host, { key: 'c88b1cd5b5fcf63cc3961cc3e190fe4432349b03', class: {
318
318
  small: this.currentWidth < 780,
319
319
  'nano-global-search-results': true,
320
- }, dir: this.el.ownerDocument.dir === 'rtl' ? 'rtl' : undefined }, h("nano-algolia", { key: 'f4778fa577bb79485a927565e938032db14981e3', storeId: this.queryId, storeMethod: "url-hash-push", class: "main-search__wrap sc-nano-global-search-results", ref: (ele) => requestAnimationFrame(() => (this.algoliaEle = ele)), id: "main-search",
320
+ }, dir: this.el.ownerDocument.dir === 'rtl' ? 'rtl' : undefined }, h("nano-algolia", { key: 'e27f4efbd7405ca852f9e6ea96d3a53b4ded8041', storeId: this.queryId, storeMethod: "url-hash-push", class: "main-search__wrap sc-nano-global-search-results", ref: (ele) => requestAnimationFrame(() => (this.algoliaEle = ele)), id: "main-search",
321
321
  // @ts-expect-error this bubbles from nano-algolia-filter
322
- onNanoFilterChanged: () => this.handleNanoFilterChanged() }, h("template", { key: '274742b09cfbccacda5776856a5a63fd3f256d5e', slot: "template" },
322
+ onNanoFilterChanged: () => this.handleNanoFilterChanged() }, h("template", { key: 'a614cc2ad29144b19555cf2106b8a38982817918', slot: "template" },
323
323
  /* html */ `<div class="main-search sc-nano-global-search-results">
324
324
  <nano-algolia-results id="main-search-results" class="main-search__results sc-nano-global-search-results" infinite-scroll>
325
325
  <script type="text/template" slot="start-template">
@@ -697,7 +697,7 @@ const GlobalSearchResults = /*@__PURE__*/ proxyCustomElement(class GlobalSearchR
697
697
  </div>
698
698
  </div>
699
699
  {{ /if }}
700
- </div>`), h("div", { key: 'f34469ff51c7c07f4451112bfe1aa3a3e0e2d47c', slot: "output" }), h("slot", { key: '099de4e70571d4d4de3c8bc279a4b62f44dd6191' }))));
700
+ </div>`), h("div", { key: 'c759117717909ec2ca8973bd4de0175e06fd73fa', slot: "output" }), h("slot", { key: '45d84a723310889c1acb75b2563839e6bd164296' }))));
701
701
  }
702
702
  static get watchers() { return {
703
703
  "algoliaEle": ["handleAlgoliaCredsChange", "handleAlgoliaIndexChange", "handleAlgoliaEleChange"],
@@ -1,133 +1,9 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import { Build, h, Host, getElement, proxyCustomElement, HTMLElement as HTMLElement$1 } from '@stencil/core/internal/client';
5
- import { h as h$1 } from './renderer.js';
6
-
7
- // import type { VNode, HTMLStencilElement } from "@stencil/core";
8
- const supportsConstructibleStylesheets = (() => {
9
- try {
10
- return !!new CSSStyleSheet();
11
- }
12
- catch (_e) {
13
- return false;
14
- }
15
- })();
16
- const cacheKeys = new WeakMap();
17
- /**
18
- * Dynamically create a constructible stylesheet which is applied to the component.
19
- * The stylesheet is then cached for future instances of the component.
20
- * @usage
21
- As a string:
22
- ```
23
- @ConstructableStyle() style = `.bg { background: url('assets/${ this.mode }/bg.png'); }`;
24
- ```
25
- As a function:
26
- ```
27
- @ConstructableStyle() style = () => `.bg { background: url('assets/${ this.mode }/bg.png'); }`;
28
- ```
29
- * @param opts - optional `cacheKeyProperty` - in case an instance of a component could produce different styles based on variables.
30
- * @returns `@ConstructableStyle` decorator
31
- */
32
- function ConstructibleStyle(opts = {}) {
33
- return (target, propertyKey) => {
34
- if (!opts.cacheKeyProperty) {
35
- opts.cacheKeyProperty = propertyKey;
36
- }
37
- const { componentWillLoad, render, componentWillRender } = target;
38
- if (!componentWillLoad)
39
- console.warn(`ConstructibleStyle requires you to have a \`componentWillLoad\` lifecycle method in \`${target.constructor.name}\`. Failure to add this function may cause ConstructibleStyle to fail due to StencilJS build optimizations.`);
40
- if (supportsConstructibleStylesheets && !Build.isServer) {
41
- const addStylesheet = (instance) => {
42
- if (!instance[opts.cacheKeyProperty] ||
43
- (cacheKeys.get(instance) &&
44
- cacheKeys.get(instance) === instance[opts.cacheKeyProperty]))
45
- return;
46
- cacheKeys.set(instance, instance[opts.cacheKeyProperty]);
47
- const host = getElement(instance);
48
- const cssText = typeof instance[propertyKey] === 'function'
49
- ? instance[propertyKey]()
50
- : instance[propertyKey];
51
- const root = (host.shadowRoot || document);
52
- root.adoptedStyleSheets = [
53
- ...(root.adoptedStyleSheets || []),
54
- getOrCreateStylesheet(instance, target, cssText, opts),
55
- ];
56
- };
57
- target.componentWillLoad = function () {
58
- const willLoadResult = componentWillLoad && componentWillLoad.call(this);
59
- addStylesheet(this);
60
- return willLoadResult;
61
- };
62
- target.componentWillRender = function () {
63
- const willRenderResult = componentWillRender && componentWillRender.call(this);
64
- addStylesheet(this);
65
- return willRenderResult;
66
- };
67
- }
68
- else {
69
- target.render = function () {
70
- const cssText = typeof this[propertyKey] === 'function'
71
- ? this[propertyKey]()
72
- : this[propertyKey];
73
- let renderedNode = render.call(this);
74
- if (isHost(renderedNode)) {
75
- appendStyleToHost(renderedNode, target.constructor.name, cssText);
76
- }
77
- else {
78
- renderedNode = h(Host, null, renderedNode);
79
- if (!('attachShadow' in HTMLElement.prototype)) {
80
- appendStyleToHost(renderedNode, target.constructor.name, cssText);
81
- }
82
- else {
83
- if (!target.__constructableStyle) {
84
- const style = document.createElement('style');
85
- style.setAttribute('type', 'text/css');
86
- style.setAttribute('constructible-style', target.constructor.name);
87
- style.innerHTML = cssText;
88
- target.__constructableStyle = style;
89
- document.head.appendChild(style);
90
- }
91
- }
92
- }
93
- return renderedNode;
94
- };
95
- }
96
- };
97
- }
98
- function appendStyleToHost(node, targetName, cssText) {
99
- (getHostChildren(node) || []).push(h("style", { type: "text/css", "constructible-style": targetName }, cssText));
100
- }
101
- function getOrCreateStylesheet(instance, target, cssText, opts) {
102
- if (!target.__constructableStyle) {
103
- target.__constructableStyle = {};
104
- }
105
- const key = instance[opts.cacheKeyProperty];
106
- if (!target.__constructableStyle[key]) {
107
- target.__constructableStyle[key] = new CSSStyleSheet();
108
- target.__constructableStyle[key].replace(cssText);
109
- }
110
- return target.__constructableStyle[key];
111
- }
112
- function isHost(node) {
113
- for (const prop in node) {
114
- if (prop in node) {
115
- if (node[prop] === Host) {
116
- return true;
117
- }
118
- }
119
- }
120
- return false;
121
- }
122
- function getHostChildren(node) {
123
- for (const prop in node) {
124
- if (prop in node) {
125
- if (Array.isArray(node[prop])) {
126
- return node[prop];
127
- }
128
- }
129
- }
130
- }
4
+ import { proxyCustomElement, HTMLElement, Host } from '@stencil/core/internal/client';
5
+ import { C as ConstructibleStyle } from './constructible-style.js';
6
+ import { h } from './renderer.js';
131
7
 
132
8
  const gridCss = ":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{--grid-col-gap:var(--nano-spacing-md);--grid-row-gap:var(--nano-spacing-md);--grid-align-items:start;--grid-justify-items:normal;--current-grid-size:\"grid size: s\";container-type:inline-size;display:block}:host .grid{display:grid;gap:var(--grid-row-gap) var(--grid-col-gap);block-size:inherit;min-block-size:inherit;place-items:var(--grid-align-items) var(--grid-justify-items)}:host([show-helper]:not([show-helper=false])){position:relative}:host([show-helper]:not([show-helper=false])) .grid--helper{position:absolute;inset:0;pointer-events:none;display:grid !important;overflow:hidden}:host([show-helper]:not([show-helper=false])) .grid--helper::before{content:var(--current-grid-size);font-size:30px;position:absolute;inline-size:100%;inset-inline-start:0;text-align:center;inset-block-start:50%;transform:translateY(-50%);color:rgba(0, 0, 0, 0.2);text-transform:uppercase;z-index:99;pointer-events:none}:host([show-helper]:not([show-helper=false])) .grid__helper-item{background:hsla(204, 80%, 72%, 0.25);block-size:100vh;inline-size:100%}";
133
9
 
@@ -145,7 +21,7 @@ var __metadata = (undefined && undefined.__metadata) || function (k, v) {
145
21
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
146
22
  return Reflect.metadata(k, v);
147
23
  };
148
- const Grid = /*@__PURE__*/ proxyCustomElement(class Grid extends HTMLElement$1 {
24
+ const Grid = /*@__PURE__*/ proxyCustomElement(class Grid extends HTMLElement {
149
25
  constructor() {
150
26
  super();
151
27
  this.__registerHost();
@@ -295,7 +171,7 @@ const Grid = /*@__PURE__*/ proxyCustomElement(class Grid extends HTMLElement$1 {
295
171
  this.constructSizeArray();
296
172
  }
297
173
  render() {
298
- return (h$1(Host, { key: '74b98156bf6fbb3bf105135be4f461737d7774ac', class: "nano-grid" }, h$1("div", { key: 'dda06ec152c7d25ee0e6090e6c301bc8e5e81aac', part: "grid", class: "grid", "cache-key": this.cacheKey }, h$1("slot", { key: '175e120e0198bfad25600316aa8a8becf9390866' })), this.showHelper && (h$1("div", { key: '773d0ca81af12cc416550578e4df88f08b7af3cd', class: "grid grid--helper", part: "helper", "cache-key": this.cacheKey }, [...Array(24)].map(() => (h$1("div", { class: "grid__helper-item" })))))));
174
+ return (h(Host, { key: '56ae0bda8aedac96841dd8cf308117ef1aaa9824', class: "nano-grid" }, h("div", { key: '6fffc201e4261b8f6c458bd044b31fe12cd9045e', part: "grid", class: "grid", "cache-key": this.cacheKey }, h("slot", { key: 'a6d7473ba9a8ffd21c4df95c2028e67026ffd1a5' })), this.showHelper && (h("div", { key: '275145f83283b504171fdc973741a1398cca6317', class: "grid grid--helper", part: "helper", "cache-key": this.cacheKey }, [...Array(24)].map(() => (h("div", { class: "grid__helper-item" })))))));
299
175
  }
300
176
  static get watchers() { return {
301
177
  "sTpl": ["constructSizeArray"],
@@ -67,7 +67,7 @@ const isStr = (val) => typeof val === 'string';
67
67
  const toLower = (val) => val.toLowerCase();
68
68
 
69
69
  const validateContent = (svgContent) => {
70
- if (svgContent) {
70
+ if (svgContent && document) {
71
71
  const div = document.createElement('div');
72
72
  div.innerHTML = svgContent;
73
73
  // setup this way to ensure it works on our buddy IE
@@ -307,7 +307,7 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
307
307
  (this.name.indexOf('arrow') > -1 ||
308
308
  this.name.indexOf('chevron') > -1) &&
309
309
  this.isRtl());
310
- return (h(Host, { key: '754a53ed280fd9bcb1dcbec89eba4180f491d1b8', class: {
310
+ return (h(Host, { key: '0bc1c17119f0e49b9798a1b61a4a768f6406129f', class: {
311
311
  loading: this.isLoading,
312
312
  'flip-rtl': !!flipRtl,
313
313
  'nano-icon': true,
@@ -142,16 +142,16 @@ const Img = /*@__PURE__*/ proxyCustomElement(class Img extends HTMLElement {
142
142
  const bgStyle = this.loadSrc
143
143
  ? { 'background-image': `url(${this.loadSrc})` }
144
144
  : {};
145
- return (h(Host, { key: '640969f1b1d3872d0314b455fd602be4e68955cc', class: "nano-img" }, h("div", { key: 'fdc45639dabc5872b5a00e7db92865efd5a2ac77', class: "img" }, h("div", { key: '5b9cc3e0ef11e3941a6085625b1d9f5e9d6de56a', class: "img__loader n-loader-skeleton" }, "Loading"), !!this.background && (h("div", { key: 'd8c3a0f6bf742608335189f33ba076d70b08d4a9', class: {
145
+ return (h(Host, { key: 'f8774fc9ad6e94727378337c2f405a068a7c88fb', class: "nano-img" }, h("div", { key: '15ae3c8ea944c8f0eab8616194f44fc1033e8fe2', class: "img" }, h("div", { key: 'ec3f433ded23dcb7fc57e53b0ecaba789ba492e0', class: "img__loader n-loader-skeleton" }, "Loading"), !!this.background && (h("div", { key: '8f4e8c9d595a31b477b0ae3f9e135f6b5c3f0e69', class: {
146
146
  loaded: this.hasLoaded,
147
147
  img__bg: true,
148
148
  'no-height': this.autoHeight === 'image',
149
- }, style: bgStyle }, h("slot", { key: 'ec35744e264cb18d1ec97a4e9c84f0c7a2d80a3e' }))), h("img", { key: 'be687a80241f559f7df7567854e1a59812437624', class: {
149
+ }, style: bgStyle }, h("slot", { key: '29bab2a5c86b3dfe18db8936af77674c44d743d0' }))), h("img", { key: 'e6731b48ed137d97aa98e64dc55488d56724f672', class: {
150
150
  img__image: true,
151
151
  loaded: this.hasLoaded,
152
152
  hide: this.background,
153
153
  'no-height': this.autoHeight === 'content',
154
- }, decoding: "async", src: Build.isServer ? this.src : this.loadSrc, loading: Build.isServer && this.lazy ? 'lazy' : undefined, alt: this.alt, onLoad: this.onLoad, onError: this.loadError }), h("nano-resize-observe", { key: '62398606dab9cc346ffb2acbbb913458684030db', class: "img__observer", onNanoResizeStateChange: this.onResize, states: this.imgStates }))));
154
+ }, decoding: "async", src: Build.isServer ? this.src : this.loadSrc, loading: Build.isServer && this.lazy ? 'lazy' : undefined, alt: this.alt, onLoad: this.onLoad, onError: this.loadError }), h("nano-resize-observe", { key: '0f1ce7d8b82adc19bfa459ff2adae708a4263c6e', class: "img__observer", onNanoResizeStateChange: this.onResize, states: this.imgStates }))));
155
155
  }
156
156
  static get watchers() { return {
157
157
  "_src": ["_srcChanged"],
@@ -320,7 +320,7 @@ const MaskedOverflow = /*@__PURE__*/ proxyCustomElement(class MaskedOverflow ext
320
320
  }
321
321
  }
322
322
  render() {
323
- return (h(Host, { key: '5e3818d9ff886b75194db22fd7f42af484fe17d7', dir: this.isRtl ? 'rtl' : null, class: "nano-masked-overflow", "has-scroll-controls": this.hasScrollControls }, h("div", { key: '991fa196ffc2eb42c907519bb8187f15c9868161', part: "base", class: {
323
+ return (h(Host, { key: '49485c7d6a96e8dd122f862abd2bd2f95b2343e7', dir: this.isRtl ? 'rtl' : null, class: "nano-masked-overflow", "has-scroll-controls": this.hasScrollControls }, h("div", { key: 'acd0541992b9dda0c1ab6414e67cd8a71f429918', part: "base", class: {
324
324
  onav: true,
325
325
  [`onav--${this.orientation}`]: true,
326
326
  'onav--has-scroll-controls': this.hasScrollControls,
@@ -329,12 +329,12 @@ const MaskedOverflow = /*@__PURE__*/ proxyCustomElement(class MaskedOverflow ext
329
329
  'onav--no-transitions': this.instantReCalc,
330
330
  'onnav--has-indicator': this.showIndicator,
331
331
  'onnav--hide-scrollbars': this.hideScrollbars && this.hideScrollbars !== 'false',
332
- }, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("div", { key: 'e6958d0060691af605afa2c6fd53194b4284f29d', class: "onav__nav" }, this.scrollControls && (h("nano-icon-button", { key: '167bb7fa1450371ceab4dc8467e5debbd672101f', part: "scroll-button scroll-button-prev", class: {
332
+ }, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("div", { key: 'ba25b3551a2b6be4906d538cbaabf0ba8cb859f6', class: "onav__nav" }, this.scrollControls && (h("nano-icon-button", { key: '72ca6ae1ef0300fc91a95d347702bac94fec97ac', part: "scroll-button scroll-button-prev", class: {
333
333
  'onav__scroll-button': true,
334
334
  'onav__scroll-button--start': true,
335
335
  }, ref: (btn) => (this.startBtn = btn), onClick: () => this.handleBtnClick(false), label: "Click to scroll", iconName: this.orientation === 'horizontal'
336
336
  ? 'light/chevron-left'
337
- : 'light/chevron-up' })), h("div", { key: '8d8d7c305c0c89738d9660aff6b75ca029506ab7', part: "scroller", ref: (el) => (this.nav = el), class: "onav__scroller", onScroll: this.handleScroll, tabindex: this.hasScrollControls ? 0 : undefined, role: "region", "aria-label": this.label || undefined }, h("div", { key: 'fdd83d15c431538a2992887e58aed07e9393d411', part: "items", ref: (el) => (this.itemContainer = el), class: "onav__items" }, this.showIndicator && (h("div", { key: 'a1fba6d2c2e62e05b5a062c563f22c8e2b0222a4', part: "indicator", ref: (el) => (this.activeIndicator = el), class: "onav__active-indicator" })), h("slot", { key: 'a6d602d437702479bd67d71bd5ac838d0ae02941', onSlotchange: this.slotChangeHandler }))), this.scrollControls && (h("nano-icon-button", { key: '30eae4cf86f7bead75734736b7192420255a64fc', part: "scroll-button scroll-button-next", class: {
337
+ : 'light/chevron-up' })), h("div", { key: '34893f5e055e8b44a78cb0706e974ee45261bdb8', part: "scroller", ref: (el) => (this.nav = el), class: "onav__scroller", onScroll: this.handleScroll, tabindex: this.hasScrollControls ? 0 : undefined, role: "region", "aria-label": this.label || undefined }, h("div", { key: '19ea27abc4878c5ab034e8ac0ee7085f19607a92', part: "items", ref: (el) => (this.itemContainer = el), class: "onav__items" }, this.showIndicator && (h("div", { key: '6cfdb83598367d649e6705fe709e89d8a8b505a6', part: "indicator", ref: (el) => (this.activeIndicator = el), class: "onav__active-indicator" })), h("slot", { key: '43f3164d6c962f951ac672f79d48943c44e0514e', onSlotchange: this.slotChangeHandler }))), this.scrollControls && (h("nano-icon-button", { key: 'eaa09e8faa9343fca660d1f2e0a4b5366b7c6668', part: "scroll-button scroll-button-next", class: {
338
338
  'onav__scroll-button': true,
339
339
  'onav__scroll-button--end': true,
340
340
  }, ref: (btn) => (this.endBtn = btn), onClick: () => this.handleBtnClick(true), label: "Click to scroll", iconName: this.orientation === 'horizontal'
@@ -1,62 +1,7 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import { proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
5
- import { t as transformTag, h } from './renderer.js';
6
- import { g as getDirectChildren } from './dom.js';
7
-
8
- const accordionCss = ":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{display:contents}";
9
-
10
- const NanoAccordion$1 = /*@__PURE__*/ proxyCustomElement(class NanoAccordion extends HTMLElement {
11
- constructor() {
12
- super();
13
- this.__registerHost();
14
- this.__attachShadow();
15
- this.nanoToggle = createEvent(this, "nanoToggle", 7);
16
- }
17
- itemOpened;
18
- get el() { return this; }
19
- /** Fires when accordion elements toggle */
20
- nanoToggle;
21
- onToggleHandler(event) {
22
- if (event.target?.tagName !== 'NANO-DETAILS')
23
- return;
24
- event.stopPropagation();
25
- const items = getDirectChildren(this.el, transformTag('nano-details')) ||
26
- this.el.querySelectorAll(transformTag('nano-details'));
27
- items.forEach((item, i) => {
28
- if (item !== event.target)
29
- item.open = false;
30
- else
31
- this.itemOpened = i;
32
- });
33
- this.nanoToggle.emit(event.target);
34
- }
35
- onClosedHandler(event) {
36
- event.stopPropagation();
37
- this.itemOpened = null;
38
- this.nanoToggle.emit();
39
- }
40
- render() {
41
- return h("slot", { key: 'ec9331ce0686c1234021e58af9a456aa267e9247' });
42
- }
43
- static get style() { return accordionCss; }
44
- }, [257, "nano-accordion", {
45
- "itemOpened": [32]
46
- }, [[0, "nanoOpen", "onToggleHandler"], [0, "nanoClose", "onClosedHandler"]]]);
47
- function defineCustomElement$1() {
48
- if (typeof customElements === "undefined") {
49
- return;
50
- }
51
- const components = ["nano-accordion"];
52
- components.forEach(tagName => { switch (tagName) {
53
- case "nano-accordion":
54
- if (!customElements.get(tagName)) {
55
- customElements.define(tagName, NanoAccordion$1);
56
- }
57
- break;
58
- } });
59
- }
4
+ import { N as NanoAccordion$1, d as defineCustomElement$1 } from './accordion.js';
60
5
 
61
6
  const NanoAccordion = NanoAccordion$1;
62
7
  const defineCustomElement = defineCustomElement$1;
@@ -15,6 +15,20 @@ import { d as defineCustomElement$4 } from './resize-observe.js';
15
15
  import { d as defineCustomElement$3 } from './spinner.js';
16
16
  import { d as defineCustomElement$2 } from './tooltip.js';
17
17
 
18
+ function perMark(name, end = false) {
19
+ if (!performance || false)
20
+ return;
21
+ if (end) {
22
+ performance?.mark('end' + name);
23
+ performance?.measure(name, 'start' + name, 'end' + name);
24
+ const entries = performance?.getEntriesByName(name);
25
+ console.info(entries[entries.length ? entries.length - 1 : 0]);
26
+ }
27
+ else {
28
+ performance?.mark('start' + name);
29
+ }
30
+ }
31
+
18
32
  const CSSNAMESPACE = 'nano-tbl';
19
33
 
20
34
  const isInstanceOf = (value, className) => {
@@ -1386,6 +1400,7 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1386
1400
  const sortEvent = this.nanoTblBeforeSort.emit({ column: column, order });
1387
1401
  if (sortEvent.defaultPrevented)
1388
1402
  return;
1403
+ perMark('sort');
1389
1404
  this.currentSort = order + ':' + column;
1390
1405
  // doesn't make sense to leave user in place for a sort
1391
1406
  this.scrollToTop(element);
@@ -1435,17 +1450,20 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1435
1450
  return { ...c, order: null };
1436
1451
  });
1437
1452
  this.nanoTblAfterSort.emit({ column: column, order });
1453
+ perMark('sort', true);
1438
1454
  }
1439
1455
  async searchStart() {
1440
1456
  this._loading = true;
1441
1457
  const sortEvent = this.nanoTblBeforeSearch.emit({ term: this.searchTerm });
1442
1458
  if (sortEvent.defaultPrevented)
1443
1459
  return;
1460
+ perMark('search');
1444
1461
  // doesn't make sense to leave user in place for a search
1445
1462
  this.scrollToTop();
1446
1463
  try {
1447
1464
  await storeSearch(this.host, this.searchTerm);
1448
1465
  this.nanoTblAfterSearch.emit({ term: this.searchTerm });
1466
+ perMark('search', true);
1449
1467
  }
1450
1468
  catch (e) {
1451
1469
  console.warn('search failed', e);
@@ -1472,6 +1490,7 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1472
1490
  const sortEvent = this.nanoTblBeforeFilter.emit({ filters: this.filters });
1473
1491
  if (sortEvent.defaultPrevented)
1474
1492
  return;
1493
+ perMark('filter');
1475
1494
  this.currentFilters = JSON.stringify(this.filters);
1476
1495
  // doesn't make sense to leave user in place for a search
1477
1496
  this.scrollToTop();
@@ -1526,6 +1545,7 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1526
1545
  });
1527
1546
  await storeFilter(this.host, this.filters);
1528
1547
  this.nanoTblAfterFilter.emit({ filters: this.filters });
1548
+ perMark('filter', true);
1529
1549
  }
1530
1550
  /** Scrolls to the top immediately - used whilst sorting / filtering */
1531
1551
  scrollToTop(element) {
@@ -1561,6 +1581,7 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1561
1581
  setInitialBlockDimension() {
1562
1582
  if (!this.blockElements?.length)
1563
1583
  return;
1584
+ perMark('blockDims');
1564
1585
  const testForDimensions = async () => {
1565
1586
  await this.setMeasureElement();
1566
1587
  if (this.unitHeight)
@@ -1586,6 +1607,8 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1586
1607
  });
1587
1608
  // we're all finished.
1588
1609
  dimensionsReady.then(() => {
1610
+ perMark('blockDims', true);
1611
+ perMark('init', true);
1589
1612
  requestAnimationFrame(() => (this.isReady = true));
1590
1613
  });
1591
1614
  }
@@ -1620,6 +1643,7 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1620
1643
  this.blocks = [];
1621
1644
  return;
1622
1645
  }
1646
+ perMark('setBlocks');
1623
1647
  // this.ignoreIO = true;
1624
1648
  let i = 1;
1625
1649
  const l = this.virtualTotalItems > dRows.length
@@ -1642,6 +1666,7 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1642
1666
  blocks.push({ rows, __uuid: cyrb53(rows.map((b) => b.__uuid).join()) });
1643
1667
  }
1644
1668
  this.blocks = blocks;
1669
+ perMark('setBlocks', true);
1645
1670
  }
1646
1671
  /**
1647
1672
  * Returns a block render height.
@@ -1691,6 +1716,7 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1691
1716
  */
1692
1717
  scrollHandler = () => {
1693
1718
  let scrollPos = 0;
1719
+ perMark('scrollHandler');
1694
1720
  // don't listen if this table isn't in the viewport
1695
1721
  if (!this.store?.general.state.isActive || !this.rows)
1696
1722
  return;
@@ -1728,6 +1754,7 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1728
1754
  }
1729
1755
  blockIndex++;
1730
1756
  }
1757
+ perMark('scrollHandler', true);
1731
1758
  });
1732
1759
  };
1733
1760
  /** Process slotted content */
@@ -1756,6 +1783,7 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1756
1783
  }
1757
1784
  // Component lifecycle
1758
1785
  async componentWillLoad() {
1786
+ perMark('init');
1759
1787
  // setup stores
1760
1788
  this.store = await generateStore(this.host, this.columns, this.scrollParent, this.isReady);
1761
1789
  this.handleRowsChange();
@@ -1797,9 +1825,11 @@ const NanoDataTable$1 = /*@__PURE__*/ proxyCustomElement(class NanoDataTable ext
1797
1825
  return false;
1798
1826
  }
1799
1827
  componentWillRender() {
1828
+ perMark('render');
1800
1829
  }
1801
1830
  componentDidRender() {
1802
1831
  this.setMeasureElement().then(() => this.setBlockHeight());
1832
+ perMark('render', true);
1803
1833
  }
1804
1834
  disconnectedCallback() {
1805
1835
  if (!this.activeWatcherIo)
@@ -508,7 +508,9 @@ const FieldValidator = /*@__PURE__*/ proxyCustomElement(class FieldValidator ext
508
508
  this._valid = this.activeForm.checkValidity();
509
509
  this.internalValidate = false;
510
510
  }
511
- this.nanoPayloadChange.emit(this._store.state);
511
+ setTimeout(() => {
512
+ this.nanoPayloadChange.emit(this._store.state);
513
+ }, 20);
512
514
  };
513
515
  /**
514
516
  * Handles nano field value changes and passes to store
@@ -601,7 +603,7 @@ const FieldValidator = /*@__PURE__*/ proxyCustomElement(class FieldValidator ext
601
603
  this.activeForm.removeEventListener('invalid', this.handleFormInvalid, true);
602
604
  }
603
605
  render() {
604
- return (h(Host, { key: '145b307561c5a2a35d5b6b6d88d03c88ba8a41b4', class: "nano-field-validator" }, this.userForm && h("slot", { key: '2a16d6a8f32afe2c22522e240e117ccf8446edc5' }), !this.userForm && (h("form", { key: 'c72a5b25d958c97d28c78279b05fa7a3643a994e', ref: (f) => (this.activeForm = f) }, h("slot", { key: '7983e9fc33115b5448b980cbcba0940163521db8' })))));
606
+ return (h(Host, { key: 'bb60437392e410d528560b9a8a63c58b13f25495', class: "nano-field-validator" }, this.userForm && h("slot", { key: '7e9ff598dce291e80b53638453a8544398382cdd' }), !this.userForm && (h("form", { key: '68241c190268172ff742839ff57a5ac1ff66ca8e', ref: (f) => (this.activeForm = f) }, h("slot", { key: 'e89427bf668eb47217accdb2844d14cb4c3abd36' })))));
605
607
  }
606
608
  static get watchers() { return {
607
609
  "userForm": ["userFormChange"],