@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.
- 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/nano-in-page-nav.cjs.entry.js +1 -1
- package/dist/cjs/nano-tab-group.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/components/in-page-nav/in-page-nav.css +3 -1
- package/dist/collection/components/tabs/tab-group.js +1 -1
- 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/nano-in-page-nav.js +1 -1
- package/dist/components/nano-tab-group.js +1 -1
- 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/nano-in-page-nav.entry.js +1 -1
- package/dist/esm/nano-tab-group.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 +8 -6
- 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/nano-in-page-nav.entry.js +1 -1
- package/dist/nano-components/nano-tab-group.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/W1hp42tj/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/W1hp42tj/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/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +1 -1
- package/dist/types/builds/W1hp42tj/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +2 -0
- package/dist/types/builds/W1hp42tj/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 +162 -153
- package/hydrate/index.mjs +162 -153
- 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/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
- /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
- /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
- /package/dist/types/{Users/John.Jenkins/projects → builds/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
- /package/dist/types/{Users/John.Jenkins/projects → builds/W1hp42tj/0/Digital}/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -1,9 +1,10 @@
|
|
1
1
|
/*!
|
2
2
|
* Custom elements for Nanopore-Digital Web applications
|
3
3
|
*/
|
4
|
-
import { Host, } from "@stencil/core";
|
4
|
+
import { Host, Build, } from "@stencil/core";
|
5
5
|
import searchInsight from "../../utils/search-insights";
|
6
6
|
import { transformTag, h } from "../../utils/renderer";
|
7
|
+
import { addGlobalStylesheetToShadow } from "../../utils/style";
|
7
8
|
const filterOldPosts = 'created > ' + Math.floor((Date.now() - 63115200000) / 1000);
|
8
9
|
let searchResultIds = 0;
|
9
10
|
/**
|
@@ -68,6 +69,9 @@ export class GlobalSearchResults {
|
|
68
69
|
};
|
69
70
|
this.algoliaEle.query = meta.query;
|
70
71
|
};
|
72
|
+
handleNanoFilterChanged() {
|
73
|
+
this.el.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
74
|
+
}
|
71
75
|
handleReorder(e) {
|
72
76
|
if (e
|
73
77
|
.composedPath()
|
@@ -105,7 +109,7 @@ export class GlobalSearchResults {
|
|
105
109
|
this.filtersDiv = this.algoliaEle.querySelector('#main-search-filters');
|
106
110
|
const oldResults = this.algoliaEle.querySelector('.old-posts');
|
107
111
|
if (oldResults) {
|
108
|
-
oldResults.addEventListener('
|
112
|
+
oldResults.addEventListener('nanoChange', (e) => {
|
109
113
|
this.toggleOldResults(e.target.checked);
|
110
114
|
});
|
111
115
|
}
|
@@ -122,8 +126,8 @@ export class GlobalSearchResults {
|
|
122
126
|
this.algoliaResultsEle.addEventListener('click', this.resultClick);
|
123
127
|
// wire up remove filter event listener
|
124
128
|
resultEle.querySelectorAll('.remove-filter').forEach((item) => {
|
125
|
-
item.removeEventListener('
|
126
|
-
item.addEventListener('
|
129
|
+
item.removeEventListener('nanoClose', this.removeFilterClick);
|
130
|
+
item.addEventListener('nanoClose', this.removeFilterClick);
|
127
131
|
});
|
128
132
|
// wire up the back button event listener
|
129
133
|
resultEle.querySelectorAll('.back-btn').forEach((item) => {
|
@@ -167,7 +171,8 @@ export class GlobalSearchResults {
|
|
167
171
|
setTimeout(() => this.filtersDiv.focus(), 20);
|
168
172
|
};
|
169
173
|
removeFilterClick = (e) => {
|
170
|
-
|
174
|
+
const target = e.target.closest('[data-filter-val]');
|
175
|
+
this.removeFilter(target?.dataset.filter, target?.dataset.filterVal);
|
171
176
|
};
|
172
177
|
tagClick = (e) => {
|
173
178
|
e.preventDefault();
|
@@ -203,7 +208,7 @@ export class GlobalSearchResults {
|
|
203
208
|
this.filtersDiv.classList.remove('show');
|
204
209
|
this.filtersDiv.setAttribute('aria-expanded', 'false');
|
205
210
|
document.body.style.overflow = '';
|
206
|
-
setTimeout(() => this.openFilterBtn
|
211
|
+
setTimeout(() => this.openFilterBtn?.focus(), 20);
|
207
212
|
}
|
208
213
|
toggleOldResults(show) {
|
209
214
|
if (show)
|
@@ -211,6 +216,10 @@ export class GlobalSearchResults {
|
|
211
216
|
else
|
212
217
|
this.algoliaEle.filters = [...this.algoliaEle.filters, filterOldPosts];
|
213
218
|
}
|
219
|
+
componentWillLoad() {
|
220
|
+
if (Build.isBrowser)
|
221
|
+
addGlobalStylesheetToShadow(this.el.shadowRoot);
|
222
|
+
}
|
214
223
|
connectedCallback() {
|
215
224
|
const globalNavTag = transformTag('nano-global-nav');
|
216
225
|
this.globalNav = this.el.closest(globalNavTag);
|
@@ -248,17 +257,17 @@ export class GlobalSearchResults {
|
|
248
257
|
this.ro.observe(this.el);
|
249
258
|
}
|
250
259
|
render() {
|
251
|
-
return (h(Host, { key: '
|
252
|
-
small: this.currentWidth <
|
260
|
+
return (h(Host, { key: '6f4387b28776c047e2bea038b7de5ebc43c16a49', class: {
|
261
|
+
small: this.currentWidth < 780,
|
253
262
|
'nano-global-search-results': true,
|
254
|
-
}, dir: this.el.ownerDocument.dir === 'rtl' ? 'rtl' : undefined }, h("nano-algolia", { key: '
|
263
|
+
}, dir: this.el.ownerDocument.dir === 'rtl' ? 'rtl' : undefined }, h("nano-algolia", { key: 'cf5fdf51f46cedf20c3242ddfd873903168bb04d', 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",
|
264
|
+
// @ts-expect-error this bubbles from nano-algolia-filter
|
265
|
+
onNanoFilterChanged: () => this.handleNanoFilterChanged() }, h("template", { key: '8abd5c449cb8f570ca9b3a8cdd9247e26dd4a116', slot: "template" },
|
255
266
|
/* html */ `<div class="main-search sc-nano-global-search-results">
|
256
267
|
<nano-algolia-results id="main-search-results" class="main-search__results sc-nano-global-search-results" infinite-scroll>
|
257
268
|
<script type="text/template" slot="start-template">
|
258
269
|
<div class="sc-nano-global-search-results main-search__topbar topbar">
|
259
|
-
<button class="sc-nano-global-search-results topbar__bkbtn back-btn icon-button">
|
260
|
-
<nano-icon class="sc-nano-global-search-results" name="light/chevron-left" size="small"></nano-icon>
|
261
|
-
</button>
|
270
|
+
<nano-icon-button icon-name="light/chevron-left" class="sc-nano-global-search-results topbar__bkbtn back-btn icon-button"></nano-icon-button>
|
262
271
|
<div>
|
263
272
|
<em class="sc-nano-global-search-results topbar__query">'{{ it.query }}' - </em> <strong>{{ it.totalHitsWithFilters }}</strong> Results
|
264
273
|
</div>
|
@@ -290,16 +299,15 @@ export class GlobalSearchResults {
|
|
290
299
|
{{ @if (it.appliedFilters) }}
|
291
300
|
{{ @each(it.appliedFilters) => filterObj }}
|
292
301
|
{{ @each(filterObj.values) => filterVal }}
|
293
|
-
<
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
302
|
+
<nano-tag
|
303
|
+
closable
|
304
|
+
size="large"
|
305
|
+
data-filter-val="{{ filterVal }}"
|
306
|
+
data-filter="{{ filterObj.name }}"
|
307
|
+
class="remove-filter"
|
308
|
+
>{{ filterVal | tag_tidy | public_name }}</nano-tag>
|
299
309
|
{{ /each }}
|
300
310
|
{{ /each }}
|
301
|
-
{{ #else }}
|
302
|
-
<span class="sc-nano-global-search-results main-search__applied-nofilter"> </span>
|
303
311
|
{{ /if }}
|
304
312
|
</div>
|
305
313
|
{{ /if }}
|
@@ -321,7 +329,7 @@ export class GlobalSearchResults {
|
|
321
329
|
{{ contentType = result.content_type ? result.content_type : result.type }}
|
322
330
|
<li class="sc-nano-global-search-results">
|
323
331
|
<div class="sc-nano-global-search-results result" data-hit-id="{{ result.objectID }}" data-hit-count="{{ resultIndex }}">
|
324
|
-
<
|
332
|
+
<strong class="sc-nano-global-search-results result__title" data-icon-set="{{(iconSet = false)}}">
|
325
333
|
<a href="{{ result.url | abs_url(it, result) }}">
|
326
334
|
{{ @if (result._snippetResult) }}
|
327
335
|
{{ result._snippetResult.title.value | safe }}
|
@@ -332,7 +340,7 @@ export class GlobalSearchResults {
|
|
332
340
|
<span class="sc-nano-global-search-results result__pdf">PDF</span>
|
333
341
|
{{ /if }}
|
334
342
|
</a>
|
335
|
-
</
|
343
|
+
</strong>
|
336
344
|
{{ @if (result.authors) }}
|
337
345
|
{{ @if (typeof result.authors === 'string') }}
|
338
346
|
<a class="sc-nano-global-search-results result__authors" href="{{ result.url | abs_url(it, result) }}">Authors: {{ result.authors | trim_to(50) }}</a>
|
@@ -350,12 +358,13 @@ export class GlobalSearchResults {
|
|
350
358
|
{{ @if (result.name) }}
|
351
359
|
<a class="sc-nano-global-search-results result__authors" href="{{ result.url | abs_url(it, result) }}">Speaker: {{ result.name | trim_to(50) }}</a>
|
352
360
|
{{ /if }}
|
361
|
+
|
362
|
+
{{ @if (result.image) }}
|
363
|
+
<div class="sc-nano-global-search-results result__image" style="background-image: url('{{ result.image | abs_url(it, result) }}')">
|
364
|
+
<nano-icon class="sc-nano-global-search-results" name="duotone/play-circle"></nano-icon>
|
365
|
+
</div>
|
366
|
+
{{ /if }}
|
353
367
|
<a class="sc-nano-global-search-results result__video-body" href="{{ result.url | abs_url(it, result) }}">
|
354
|
-
{{ @if (result.image) }}
|
355
|
-
<div class="sc-nano-global-search-results result__image" style="background-image: url('{{ result.image | abs_url(it, result) }}')">
|
356
|
-
<nano-icon class="sc-nano-global-search-results" name="duotone/play-circle"></nano-icon>
|
357
|
-
</div>
|
358
|
-
{{ /if }}
|
359
368
|
<div class="sc-nano-global-search-results result__body">
|
360
369
|
<div class="sc-nano-global-search-results result__description">
|
361
370
|
{{ @if (result.description) }}
|
@@ -363,36 +372,37 @@ export class GlobalSearchResults {
|
|
363
372
|
{{ /if }}
|
364
373
|
</div>
|
365
374
|
</div>
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
{{
|
374
|
-
</div>
|
375
|
+
</a>
|
376
|
+
<div class="sc-nano-global-search-results result__meta">
|
377
|
+
{{ @if (result.type || result.content_type) }}
|
378
|
+
<div class="sc-nano-global-search-results result__type">
|
379
|
+
{{ @if (contentType === 'lc_lightning_talk') }}
|
380
|
+
Presentation
|
381
|
+
{{ #else }}
|
382
|
+
{{ contentType }}
|
375
383
|
{{ /if }}
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
384
|
+
</div>
|
385
|
+
{{ /if }}
|
386
|
+
|
387
|
+
{{ @if (result.source) }}
|
388
|
+
<div class="sc-nano-global-search-results result__source">Source: {{ result.source }}</div>
|
389
|
+
{{ /if }}
|
390
|
+
</div>
|
391
|
+
{{ @if (result.tags) }}
|
392
|
+
<div class="sc-nano-global-search-results result__tags">
|
393
|
+
{{ @if (typeof result.tags === 'string') }}
|
394
|
+
<nano-tag><button data-value="{{ result.tags | lowercase }}" class="sc-nano-global-search-results result__tags-tag">{{ result.tags }}</button></nano-tag>
|
395
|
+
{{ #else }}
|
396
|
+
{{ @each(result.tags) => tag, index }}
|
397
|
+
{{ @if(index < 5)}}
|
398
|
+
{{ @if (tag !== "No video" && tag !== "Resources" && tag !== "Video") }}
|
399
|
+
<nano-tag><button data-value="{{ tag | lowercase }}" class="sc-nano-global-search-results result__tags-tag">{{ tag | tag_tidy }}</button></nano-tag>
|
400
|
+
{{ /if }}
|
388
401
|
{{ /if }}
|
389
|
-
|
390
|
-
{{ /if }}
|
391
|
-
{{ @if (result.source) }}
|
392
|
-
<div class="sc-nano-global-search-results result__source">Source: {{ result.source }}</div>
|
402
|
+
{{ /each }}
|
393
403
|
{{ /if }}
|
394
404
|
</div>
|
395
|
-
|
405
|
+
{{ /if }}
|
396
406
|
{{ /if }}
|
397
407
|
{{ @if (result.body) }}
|
398
408
|
<a class="sc-nano-global-search-results result__body" href="{{ result.url | abs_url(it, result) }}">
|
@@ -402,8 +412,8 @@ export class GlobalSearchResults {
|
|
402
412
|
</a>
|
403
413
|
{{ /if }}
|
404
414
|
{{ @if (contentType === 'product' }}
|
405
|
-
<
|
406
|
-
<a
|
415
|
+
<nano-cta size="small">
|
416
|
+
<a href="{{ result.url | abs_url(it, result) }}">View product</a>
|
407
417
|
</div>
|
408
418
|
{{ /if }}
|
409
419
|
{{ @if (contentType === 'event') }}
|
@@ -476,27 +486,27 @@ export class GlobalSearchResults {
|
|
476
486
|
{{ /if }}
|
477
487
|
{{ /if }}
|
478
488
|
{{ /if }}
|
479
|
-
{{ @if (result.tags) }}
|
480
|
-
<div class="sc-nano-global-search-results result__tags">
|
481
|
-
{{ @if (typeof result.tags === 'string') }}
|
482
|
-
{{ @if (result.tags !== "Resources" && result.tags !== "Tools" && result.tags !== "Publications" && result.tags !== "Case studies") }}
|
483
|
-
<button data-value="{{ result.tags | lowercase }}" class="sc-nano-global-search-results result__tags-tag">{{ result.tags }}</button>
|
484
|
-
{{ /if }}
|
485
|
-
{{ #else }}
|
486
|
-
{{ @each(result.tags) => tag, index }}
|
487
|
-
{{ @if(index < 5)}}
|
488
|
-
{{ @if (tag !== "Resources" && tag !== "Tools" && tag !== "Publications" && tag !== "Case studies") }}
|
489
|
-
<button data-value="{{ tag | lowercase }}" class="sc-nano-global-search-results result__tags-tag">{{ tag }}</button>
|
490
|
-
{{ /if }}
|
491
|
-
{{ /if }}
|
492
|
-
{{ /each }}
|
493
|
-
{{ /if }}
|
494
|
-
</div>
|
495
|
-
{{ /if }}
|
496
489
|
{{ @if (result.source) }}
|
497
490
|
<div class="sc-nano-global-search-results result__source">Source: {{ result.source }}</div>
|
498
491
|
{{ /if }}
|
499
492
|
</div>
|
493
|
+
{{ @if (result.tags) }}
|
494
|
+
<div class="sc-nano-global-search-results result__tags">
|
495
|
+
{{ @if (typeof result.tags === 'string') }}
|
496
|
+
{{ @if (result.tags !== "Resources" && result.tags !== "Tools" && result.tags !== "Publications" && result.tags !== "Case studies") }}
|
497
|
+
<nano-tag><button data-value="{{ result.tags | lowercase }}" class="result__tags-tag">{{ result.tags }}</button></nano-tag>
|
498
|
+
{{ /if }}
|
499
|
+
{{ #else }}
|
500
|
+
{{ @each(result.tags) => tag, index }}
|
501
|
+
{{ @if(index < 5)}}
|
502
|
+
{{ @if (tag !== "Resources" && tag !== "Tools" && tag !== "Publications" && tag !== "Case studies") }}
|
503
|
+
<nano-tag><button data-value="{{ tag | lowercase }}" class="result__tags-tag">{{ tag | tag_tidy }}</button></nano-tag>
|
504
|
+
{{ /if }}
|
505
|
+
{{ /if }}
|
506
|
+
{{ /each }}
|
507
|
+
{{ /if }}
|
508
|
+
</div>
|
509
|
+
{{ /if }}
|
500
510
|
{{ /if }}
|
501
511
|
</div>
|
502
512
|
</li>
|
@@ -515,30 +525,26 @@ export class GlobalSearchResults {
|
|
515
525
|
<div class="sc-nano-global-search-results filters-header">
|
516
526
|
<strong class="sc-nano-global-search-results filters-title">Filters</strong>
|
517
527
|
<button class="sc-nano-global-search-results filters-reset">Reset</button>
|
518
|
-
<button class="sc-nano-global-search-results filters__close-filters close-filters icon-button" aria-controls="main-search-filters">
|
519
|
-
<nano-icon class="sc-nano-global-search-results" name="light/xmark"></nano-icon>
|
520
|
-
</button>
|
528
|
+
<nano-icon-button class="sc-nano-global-search-results filters__close-filters close-filters icon-button" icon-name="light/xmark" aria-controls="main-search-filters"></nano-icon-button>
|
521
529
|
</div>
|
522
530
|
{{ /if }}
|
523
531
|
|
524
|
-
<div>
|
525
|
-
<
|
526
|
-
|
527
|
-
|
528
|
-
</label>
|
532
|
+
<div class="sc-nano-global-search-results filters-list">
|
533
|
+
<nano-checkbox value="old-posts" class="old-posts" name="old-posts" checked>
|
534
|
+
<span>Include posts older than 2 years</strong>)</span>
|
535
|
+
</nano-checkbox>
|
529
536
|
{{ @if(it.origFilters['type']) }}
|
530
|
-
<nano-details class="sc-nano-global-search-results" open={true}
|
531
|
-
<strong slot="label">Type</strong>
|
532
|
-
<nano-icon slot="icon-end" name="light/chevron-down" size="small"></nano-icon>
|
537
|
+
<nano-details class="sc-nano-global-search-results" open={true} label="Type" size="small">
|
533
538
|
<nano-algolia-filter store-id="searchf1" store-method="url-hash-push" filter-name="type">
|
534
539
|
<script type="text/template" slot="filter-template">
|
535
540
|
<ul class="sc-nano-global-search-results" data-num="{{(x = 0)}}">
|
536
541
|
{{ @foreach(it.dyn) => filter, filterVal }}
|
537
542
|
<li class="sc-nano-global-search-results" data-num="{{(x++)}}">
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
543
|
+
<input class="sc-nano-global-search-results filter-cb" type="checkbox" value="{{ filter }}" id="type-{{ filter }}-{{x}}" />
|
544
|
+
<label class="sc-nano-global-search-results filter-label" for="type-{{ filter }}-{{x}}">
|
545
|
+
<span>{{ filter | public_name }} (<strong>{{ filterVal }}</strong>)</span>
|
546
|
+
</label>
|
547
|
+
</li>
|
542
548
|
{{ /foreach }}
|
543
549
|
</ul>
|
544
550
|
</script>
|
@@ -548,18 +554,17 @@ export class GlobalSearchResults {
|
|
548
554
|
{{ /if }}
|
549
555
|
|
550
556
|
{{ @if(it.origFilters['channel']) }}
|
551
|
-
<nano-details open={true}
|
552
|
-
<strong slot="label">Channels</strong>
|
553
|
-
<nano-icon slot="icon-end" name="light/chevron-down" size="small"></nano-icon>
|
557
|
+
<nano-details open={true} label="Channels" size="small">
|
554
558
|
<nano-algolia-filter store-id="searchf2" store-method="url-hash-push" filter-name="channel">
|
555
559
|
<script type="text/template" slot="filter-template">
|
556
560
|
<ul class="sc-nano-global-search-results" data-num="{{(x = 0)}}">
|
557
561
|
{{ @foreach(it.dyn) => filter, filterVal }}
|
558
562
|
<li class="sc-nano-global-search-results" data-num="{{(x++)}}">
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
+
<input class="filter-cb sc-nano-global-search-results" type="checkbox" value="{{ filter }}" id="channel-{{ filter }}-{{x}}" />
|
564
|
+
<label class="filter-label sc-nano-global-search-results" for="channel-{{ filter }}-{{x}}">
|
565
|
+
<span>{{ filter | public_name }} (<strong>{{ filterVal }}</strong>)</span>
|
566
|
+
</label>
|
567
|
+
</li>
|
563
568
|
{{ /foreach }}
|
564
569
|
</ul>
|
565
570
|
</script>
|
@@ -569,18 +574,17 @@ export class GlobalSearchResults {
|
|
569
574
|
{{ /if }}
|
570
575
|
|
571
576
|
{{ @if(it.origFilters['authors']) }}
|
572
|
-
<nano-details open={true}
|
573
|
-
<strong slot="label">Authors</strong>
|
574
|
-
<nano-icon slot="icon-end" name="light/chevron-down" size="small"></nano-icon>
|
577
|
+
<nano-details open={true} label="Authors" size="small">
|
575
578
|
<nano-algolia-filter store-id="searchf3" store-method="url-hash-push" filter-name="authors">
|
576
579
|
<script type="text/template" slot="filter-template">
|
577
580
|
<ul class="sc-nano-global-search-results" data-num="{{(x = 0)}}">
|
578
581
|
{{ @foreach(it.dyn) => filter, filterVal }}
|
579
582
|
<li class="sc-nano-global-search-results" data-num="{{(x++)}}">
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
583
|
+
<input class="filter-cb sc-nano-global-search-results" type="checkbox" value="{{ filter }}" id="authors-{{ filter }}-{{x}}" />
|
584
|
+
<label class="filter-label sc-nano-global-search-results" for="authors-{{ filter }}-{{x}}">
|
585
|
+
<span>{{ filter | public_name }} (<strong>{{ filterVal }}</strong>)</span>
|
586
|
+
</label>
|
587
|
+
</li>
|
584
588
|
{{ /foreach }}
|
585
589
|
</ul>
|
586
590
|
</script>
|
@@ -590,19 +594,18 @@ export class GlobalSearchResults {
|
|
590
594
|
{{ /if }}
|
591
595
|
|
592
596
|
{{ @if(it.origFilters['categories_without_path']) }}
|
593
|
-
<nano-details open={true}
|
594
|
-
<strong slot="label">Category</strong>
|
595
|
-
<nano-icon slot="icon-end" name="light/chevron-down" size="small"></nano-icon>
|
597
|
+
<nano-details open={true} label="Categories" size="small">
|
596
598
|
<nano-algolia-filter store-id="searchf4" store-method="url-hash-push" filter-name="categories_without_path">
|
597
599
|
<script type="text/template" slot="filter-template">
|
598
600
|
<ul class="sc-nano-global-search-results" data-num="{{(x = 0)}}">
|
599
601
|
{{ @foreach(it.dyn) => filter, filterVal }}
|
600
602
|
{{ @if(!filter.match(/publication/)) }}
|
601
603
|
<li class="sc-nano-global-search-results" data-num="{{(x++)}}">
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
604
|
+
<input class="sc-nano-global-search-results filter-cb" type="checkbox" value="{{ filter }}" id="cwp-{{ filter }}-{{x}}" />
|
605
|
+
<label class="sc-nano-global-search-results filter-label" for="cwp-{{ filter }}-{{x}}">
|
606
|
+
<span>{{ filter | public_name }} (<strong>{{ filterVal }}</strong>)</span>
|
607
|
+
</label>
|
608
|
+
</li>
|
606
609
|
{{ /if }}
|
607
610
|
{{ /foreach }}
|
608
611
|
</ul>
|
@@ -613,18 +616,19 @@ export class GlobalSearchResults {
|
|
613
616
|
{{ /if }}
|
614
617
|
|
615
618
|
{{ @if(it.origFilters['tags']) }}
|
616
|
-
<nano-details open={true}
|
617
|
-
<strong slot="label">Tags</strong>
|
618
|
-
<nano-icon slot="icon-end" name="light/chevron-down" size="small"></nano-icon>
|
619
|
+
<nano-details open={true} label="Tags" size="small">
|
619
620
|
<nano-algolia-filter store-id="searchf5" store-method="url-hash-push" filter-name="tags">
|
620
621
|
<script type="text/template" slot="filter-template">
|
621
622
|
<ul class="sc-nano-global-search-results" data-num="{{(x = 0)}}">
|
622
623
|
{{ @foreach(it.dyn) => filter, filterVal }}
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
624
|
+
{{ @if(!filter.match('>')) }}
|
625
|
+
<li class="sc-nano-global-search-results" data-num="{{(x++)}}">
|
626
|
+
<input class="filter-cb sc-nano-global-search-results" type="checkbox" value="{{ filter | lowercase }}" id="tags-{{ filter }}-{{x}}" />
|
627
|
+
<label class="filter-label sc-nano-global-search-results" for="tags-{{ filter }}-{{x}}">
|
628
|
+
<span>{{ filter | public_name }} (<strong>{{ filterVal }}</strong>)</span>
|
629
|
+
</label>
|
630
|
+
</li>
|
631
|
+
{{ /if }}
|
628
632
|
{{ /foreach }}
|
629
633
|
</ul>
|
630
634
|
</script>
|
@@ -636,7 +640,7 @@ export class GlobalSearchResults {
|
|
636
640
|
</div>
|
637
641
|
</div>
|
638
642
|
{{ /if }}
|
639
|
-
</div>`), h("div", { key: '
|
643
|
+
</div>`), h("div", { key: '33b7b45a25b64b26e7ccd724e0171c997c145540', slot: "output" }), h("slot", { key: '15039307d1b06217c2666eb344a44fe9966a336f' }))));
|
640
644
|
}
|
641
645
|
static get is() { return "nano-global-search-results"; }
|
642
646
|
static get encapsulation() { return "shadow"; }
|
@@ -152,7 +152,7 @@ nav:has(.details-wrapper[open]) {
|
|
152
152
|
list-style: none;
|
153
153
|
}
|
154
154
|
.details-wrapper ul:not(ul ul) {
|
155
|
-
padding: 0 var(--spacing-l2)
|
155
|
+
padding: 0 var(--spacing-l2) 0 var(--spacing-l2);
|
156
156
|
}
|
157
157
|
.details-wrapper a {
|
158
158
|
cursor: pointer;
|
@@ -172,6 +172,8 @@ nav:has(.details-wrapper[open]) {
|
|
172
172
|
align-items: stretch;
|
173
173
|
justify-content: stretch;
|
174
174
|
inline-size: 100%;
|
175
|
+
}
|
176
|
+
.details-wrapper ul > li:not(ul > li li):not(:last-of-type) {
|
175
177
|
border-block-end: 1px solid var(--color-bottom-border);
|
176
178
|
}
|
177
179
|
.details-wrapper ul > li:not(ul > li li) a {
|
@@ -326,7 +326,7 @@ export class NanoTabGroup {
|
|
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: "
|
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 is() { return "nano-tab-group"; }
|
332
332
|
static get encapsulation() { return "shadow"; }
|
@@ -43,7 +43,7 @@ export default class Popover {
|
|
43
43
|
// this.isVisible = false;
|
44
44
|
this.popover.hidden = true;
|
45
45
|
this.popover.classList.remove(this.options.visibleClass);
|
46
|
-
this.popover.addEventListener('transitionend', this.handleTransitionEnd
|
46
|
+
this.popover.addEventListener('transitionend', this.handleTransitionEnd);
|
47
47
|
}
|
48
48
|
handleTransitionEnd(event) {
|
49
49
|
const target = event.target;
|
@@ -58,10 +58,13 @@ export default class Popover {
|
|
58
58
|
this.popover.classList.remove(this.options.visibleClass);
|
59
59
|
this.options.onAfterHide.call(this);
|
60
60
|
}
|
61
|
+
else {
|
62
|
+
this.options.onAfterShow.call(this);
|
63
|
+
}
|
61
64
|
}
|
62
65
|
}
|
63
66
|
destroy() {
|
64
|
-
this.popover.removeEventListener('transitionend', this.handleTransitionEnd
|
67
|
+
this.popover.removeEventListener('transitionend', this.handleTransitionEnd);
|
65
68
|
if (this.popper) {
|
66
69
|
this.popper.destroy();
|
67
70
|
this.popper = null;
|
@@ -115,7 +118,6 @@ export default class Popover {
|
|
115
118
|
},
|
116
119
|
],
|
117
120
|
});
|
118
|
-
this.popover.addEventListener('transitionend', () => this.options.onAfterShow.call(this), { once: true });
|
119
121
|
// Reposition the menu after it appears in case a modifier kicked in
|
120
122
|
requestAnimationFrame(() => {
|
121
123
|
this.popper?.update().catch((e) => {
|
@@ -2044,6 +2044,10 @@ filters.define('remove_spaces', (str) => str.replace(/ /g, '_'));
|
|
2044
2044
|
filters.define('add_spaces', (str) => (str = str.replace(/[_\-]/g, ' ')));
|
2045
2045
|
filters.define('capitalise', (str) => (str = str.charAt(0).toUpperCase() + str.slice(1)));
|
2046
2046
|
filters.define('lowercase', (str) => (str = str.toLowerCase()));
|
2047
|
+
filters.define('tag_tidy', (str) => {
|
2048
|
+
const arr = str.split('>');
|
2049
|
+
return arr.map((s) => s.trim())[arr.length - 1];
|
2050
|
+
});
|
2047
2051
|
const Squirrel = squirrel;
|
2048
2052
|
|
2049
2053
|
var multiverse = new Map();
|
@@ -317,8 +317,12 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLEle
|
|
317
317
|
distance: this.distance,
|
318
318
|
skidding: this.skidding,
|
319
319
|
transitionElement: this.panel,
|
320
|
-
onAfterHide: () =>
|
321
|
-
|
320
|
+
onAfterHide: () => {
|
321
|
+
this.nanoAfterHide.emit();
|
322
|
+
},
|
323
|
+
onAfterShow: () => {
|
324
|
+
this.nanoAfterShow.emit();
|
325
|
+
},
|
322
326
|
onTransitionEnd: () => {
|
323
327
|
if (!this.open) {
|
324
328
|
this.afterHide();
|
@@ -362,12 +366,12 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLEle
|
|
362
366
|
this.popover.destroy();
|
363
367
|
}
|
364
368
|
render() {
|
365
|
-
return (h(Host, { key: '
|
369
|
+
return (h(Host, { key: 'c0ed4b8b03d27f7437c148c8df305886c6cf29d9', class: "nano-dropdown" }, h("div", { key: '27165586e2caa99ba746e7db3aa1574f0e9d1576', part: "base", id: this.dropdownId, class: {
|
366
370
|
dropdown: true,
|
367
371
|
'dropdown--open': this.open,
|
368
|
-
} }, h("span", { key: '
|
372
|
+
} }, 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'
|
369
373
|
? undefined
|
370
|
-
: 'polite' }, this.dialogTitle)), h("slot", { key: '
|
374
|
+
: 'polite' }, this.dialogTitle)), h("slot", { key: '5da1881086c31481463b3b7244552e17ee66d997' }))))));
|
371
375
|
}
|
372
376
|
static get watchers() { return {
|
373
377
|
"open": ["handleOpenChange"],
|