@nanoporetech-digital/components 5.12.1 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cjs/{local-my-account-d79ed0a2.js → local-my-account-1dfd69a0.js} +123 -15
  3. package/dist/{esm/local-my-account-6662da72.js.map → cjs/local-my-account-1dfd69a0.js.map} +1 -1
  4. package/dist/cjs/nano-algolia.cjs.entry.js +3 -0
  5. package/dist/cjs/nano-algolia.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nano-global-nav.cjs.entry.js +10 -8
  7. package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
  8. package/dist/cjs/nano-global-search-results.cjs.entry.js +17 -43
  9. package/dist/cjs/nano-global-search-results.cjs.entry.js.map +1 -1
  10. package/dist/collection/components/algolia/algolia-interface.js.map +1 -1
  11. package/dist/collection/components/algolia/algolia.js +1 -0
  12. package/dist/collection/components/algolia/algolia.js.map +1 -1
  13. package/dist/collection/components/algolia/lib/template.js +2 -0
  14. package/dist/collection/components/algolia/lib/template.js.map +1 -1
  15. package/dist/collection/components/global-nav/assets/local-my-account.json +120 -14
  16. package/dist/collection/components/global-nav/global-nav-interface.js.map +1 -1
  17. package/dist/collection/components/global-nav/global-nav.js +10 -8
  18. package/dist/collection/components/global-nav/global-nav.js.map +1 -1
  19. package/dist/collection/components/global-search-results/global-search-results.js +17 -43
  20. package/dist/collection/components/global-search-results/global-search-results.js.map +1 -1
  21. package/dist/components/algolia.js +3 -0
  22. package/dist/components/algolia.js.map +1 -1
  23. package/dist/components/local-my-account.js +122 -15
  24. package/dist/components/local-my-account.js.map +1 -1
  25. package/dist/components/nano-global-nav.js +9 -7
  26. package/dist/components/nano-global-nav.js.map +1 -1
  27. package/dist/components/nano-global-search-results.js +17 -43
  28. package/dist/components/nano-global-search-results.js.map +1 -1
  29. package/dist/esm/{local-my-account-6662da72.js → local-my-account-ddb62cc1.js} +123 -16
  30. package/dist/{cjs/local-my-account-d79ed0a2.js.map → esm/local-my-account-ddb62cc1.js.map} +1 -1
  31. package/dist/esm/nano-algolia.entry.js +3 -0
  32. package/dist/esm/nano-algolia.entry.js.map +1 -1
  33. package/dist/esm/nano-global-nav.entry.js +10 -8
  34. package/dist/esm/nano-global-nav.entry.js.map +1 -1
  35. package/dist/esm/nano-global-search-results.entry.js +17 -43
  36. package/dist/esm/nano-global-search-results.entry.js.map +1 -1
  37. package/dist/nano-assets/hash.txt +1 -1
  38. package/dist/nano-assets/local-my-account.json +120 -14
  39. package/dist/nano-components/assets/local-my-account.json +120 -14
  40. package/dist/nano-components/local-my-account-ddb62cc1.js +5 -0
  41. package/dist/nano-components/nano-algolia.entry.js +1 -1
  42. package/dist/nano-components/nano-algolia.entry.js.map +1 -1
  43. package/dist/nano-components/nano-global-nav.entry.js +1 -1
  44. package/dist/nano-components/nano-global-nav.entry.js.map +1 -1
  45. package/dist/nano-components/nano-global-search-results.entry.js +1 -1
  46. package/dist/nano-components/nano-global-search-results.entry.js.map +1 -1
  47. package/dist/types/components/algolia/algolia-interface.d.ts +9 -0
  48. package/dist/types/components/global-nav/global-nav-interface.d.ts +4 -0
  49. package/dist/types/interface.d.ts +5 -0
  50. package/docs-json.json +2 -2
  51. package/hydrate/index.js +151 -64
  52. package/package.json +2 -2
  53. package/dist/nano-components/local-my-account-6662da72.js +0 -5
  54. /package/dist/nano-components/{local-my-account-6662da72.js.map → local-my-account-ddb62cc1.js.map} +0 -0
@@ -2,21 +2,23 @@
2
2
  * Web Components for Nanopore digital Web Apps
3
3
  */
4
4
  const user = {
5
- id: "mr.test",
5
+ id: "john.jenkins",
6
6
  uuid: "2589690E-A907-50BB-9551-55E18ABB1273",
7
- name: "Logged in user",
8
- first_name: "mr",
9
- last_name: "test",
10
- email: "mr.test@nanoporetech.com",
11
- job_title: "CEO",
12
- company: "ONT",
13
- small_avatar_url: "https://picsum.photos/75",
14
- is_nanopore_user: false,
15
- lifecycle_stage: "Lead",
7
+ name: "John Jenkins",
8
+ first_name: "John",
9
+ last_name: "Jenkins",
10
+ email: "john.jenkins@nanoporetech.com",
11
+ company: "Oxford Nanopore Technologies",
12
+ lifecycle_stage: "Other",
16
13
  indirect_customer: false,
17
14
  registration: {
18
15
  next_url: null
19
- }
16
+ },
17
+ covid19_store_access: false,
18
+ ncm20_user_group: false,
19
+ job_title: "Tester",
20
+ small_avatar_url: "https://myaccount-dev.nanoporetech.com/assets/generic-user-f6fcf06f5177e63bec5a3e34f7aa4adec5de3777bdaefdf4706220cdd99ca340.png",
21
+ country_code: "GB"
20
22
  };
21
23
  const domains = [
22
24
  {
@@ -286,20 +288,38 @@ const urls = {
286
288
  logout: "https://myaccount-dev.nanoporetech.com/sso/logout?RelayState=",
287
289
  login: null,
288
290
  messages: "https://myaccount-dev.nanoporetech.com/message_centre",
289
- cart: "https://shop-test.nanoporetech.com/checkout/cart"
291
+ cart: "https://test.store.nanoporetech.com/cart"
290
292
  };
291
293
  const search = {
292
294
  app_id: "N8NZI5A47F",
293
295
  api_key: "b38860b015b02c9cb6993cf0367ed203",
294
296
  indeces: [
295
297
  {
296
- index: "all_prod_en",
298
+ index: "ont_dev_en_v3",
297
299
  name: "All",
298
300
  domain: "nanoporetech.com",
299
301
  all_group: true,
300
302
  filters: [
301
303
  "tags",
302
304
  "type"
305
+ ],
306
+ replicas: [
307
+ {
308
+ name: "Sort by: Most relevant",
309
+ index: "ont_dev_en_v3"
310
+ },
311
+ {
312
+ name: "Sort by: Newest",
313
+ index: "ont_dev_en_v3_date_desc"
314
+ },
315
+ {
316
+ name: "Sort by: Oldest",
317
+ index: "ont_dev_en_v3_date_asc"
318
+ },
319
+ {
320
+ name: "Sort by: Recent activity",
321
+ index: "ont_dev_en_v3_activity_date_desc"
322
+ }
303
323
  ]
304
324
  },
305
325
  {
@@ -309,6 +329,24 @@ const search = {
309
329
  filters: [
310
330
  "tags",
311
331
  "type"
332
+ ],
333
+ replicas: [
334
+ {
335
+ name: "Sort by: Most relevant",
336
+ index: "cws_english_en"
337
+ },
338
+ {
339
+ name: "Sort by: Newest",
340
+ index: "cws_english_en_date_desc"
341
+ },
342
+ {
343
+ name: "Sort by: Oldest",
344
+ index: "cws_english_en_date_asc"
345
+ },
346
+ {
347
+ name: "Sort by: Recent activity",
348
+ index: "cws_english_en_activity_date_desc"
349
+ }
312
350
  ]
313
351
  },
314
352
  {
@@ -317,6 +355,20 @@ const search = {
317
355
  domain: "store.nanoporetech.com",
318
356
  filters: [
319
357
  "type"
358
+ ],
359
+ replicas: [
360
+ {
361
+ name: "Sort by: Most relevant",
362
+ index: "store_prod"
363
+ },
364
+ {
365
+ name: "Sort by: Newest",
366
+ index: "store_date_desc"
367
+ },
368
+ {
369
+ name: "Sort by: Oldest",
370
+ index: "store_date_asc"
371
+ }
320
372
  ]
321
373
  },
322
374
  {
@@ -325,6 +377,20 @@ const search = {
325
377
  domain: "nanoporetech.com",
326
378
  filters: [
327
379
  "tags"
380
+ ],
381
+ replicas: [
382
+ {
383
+ name: "Sort by: Most relevant",
384
+ index: "cws_english_resources_en"
385
+ },
386
+ {
387
+ name: "Sort by: Newest",
388
+ index: "cws_english_resources_en_date_desc"
389
+ },
390
+ {
391
+ name: "Sort by: Oldest",
392
+ index: "cws_english_resources_en_date_asc"
393
+ }
328
394
  ]
329
395
  },
330
396
  {
@@ -336,10 +402,50 @@ const search = {
336
402
  "channel",
337
403
  "authors",
338
404
  "tags"
405
+ ],
406
+ replicas: [
407
+ {
408
+ name: "Sort by: Most relevant",
409
+ index: "community_prod"
410
+ },
411
+ {
412
+ name: "Sort by: Newest",
413
+ index: "community_prod_date_desc"
414
+ },
415
+ {
416
+ name: "Sort by: Oldest",
417
+ index: "community_prod_date_asc"
418
+ },
419
+ {
420
+ name: "Sort by: Recent activity",
421
+ index: "community_prod_activity_date_desc"
422
+ }
339
423
  ]
340
424
  }
341
425
  ]
342
426
  };
427
+ const promotion = {
428
+ header: {
429
+ img: "https://nanoporetech.com/sites/default/files/s3/gn-promotion-lc20.png",
430
+ label: "London Calling 2020 Online",
431
+ url: "https://londoncallingconf.co.uk/lc20"
432
+ },
433
+ description: "A conference hosted by Oxford Nanopore Technologies",
434
+ meta: [
435
+ {
436
+ icon: "calendar",
437
+ label: "18th - 19th June 2020"
438
+ },
439
+ {
440
+ icon: "map-marker",
441
+ label: "Online"
442
+ }
443
+ ],
444
+ cta: {
445
+ label: "Register Now",
446
+ url: "https://nanoporetech.com/lc-online/register"
447
+ }
448
+ };
343
449
  const localMyAccount = {
344
450
  user: user,
345
451
  domains: domains,
@@ -347,10 +453,11 @@ const localMyAccount = {
347
453
  notifications: notifications,
348
454
  links: links,
349
455
  urls: urls,
350
- search: search
456
+ search: search,
457
+ promotion: promotion
351
458
  };
352
459
 
353
460
  export default localMyAccount;
354
- export { cart, domains, links, notifications, search, urls, user };
461
+ export { cart, domains, links, notifications, promotion, search, urls, user };
355
462
 
356
463
  //# sourceMappingURL=local-my-account.js.map
@@ -1 +1 @@
1
- {"file":"local-my-account.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
1
+ {"file":"local-my-account.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -260,7 +260,7 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
260
260
  if (!this.algoliaSearchResults)
261
261
  await this.doAlgoliaSearch();
262
262
  const activeIndex = this.algoliaSearchResults.results.find((res) => res.selected);
263
- const { index, domain, filters, query } = activeIndex;
263
+ const { index, domain, filters, query, replicas } = activeIndex;
264
264
  this.nanoSearchResult.emit({
265
265
  meta: {
266
266
  indexTitle: activeIndex.indexName,
@@ -268,6 +268,7 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
268
268
  domain,
269
269
  filters,
270
270
  query,
271
+ replicas,
271
272
  },
272
273
  client: { apiKey: this.searchApiKey, appId: this.searchAppId },
273
274
  });
@@ -288,7 +289,7 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
288
289
  const selectedIndex = this.internalSearchIndeces.find((index) => index.index === indexStr);
289
290
  if (!selectedIndex || !selectedIndex.alogliaIndex)
290
291
  return;
291
- this.searchIndex = selectedIndex.index;
292
+ this.searchIndex = selectedIndex.name;
292
293
  if (this.isSearchValSet())
293
294
  await this.onSearchChange();
294
295
  };
@@ -425,7 +426,7 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
425
426
  this.searchAppId = undefined;
426
427
  this.searchApiKey = undefined;
427
428
  this.searchValue = '';
428
- this.searchIndex = 'all_prod_en';
429
+ this.searchIndex = 'All';
429
430
  this.cartCount = 0;
430
431
  this.msgCount = 0;
431
432
  this.cartUrl = null;
@@ -524,7 +525,7 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
524
525
  }
525
526
  if (!this.searchIndex)
526
527
  return this.internalSearchIndeces[0];
527
- const foundIndex = this.internalSearchIndeces.find((index) => index.index === this.searchIndex);
528
+ const foundIndex = this.internalSearchIndeces.find((index) => index.name === this.searchIndex);
528
529
  if (!foundIndex) {
529
530
  this.currentIndex = this.internalSearchIndeces[0];
530
531
  console.error('index not found');
@@ -558,7 +559,7 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
558
559
  searchIndex.alogliaIndex = this.algoliaClient.initIndex(searchIndex.index);
559
560
  });
560
561
  if (!this.searchIndex) {
561
- this.searchIndex = this.internalSearchIndeces[0].index;
562
+ this.searchIndex = this.internalSearchIndeces[0].name;
562
563
  }
563
564
  }
564
565
  /** Current content breakpoint. If it goes up, things can look wonky for a second so we temporarily hide stuff */
@@ -740,6 +741,7 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
740
741
  result.domains = this.myAccData.domains || null;
741
742
  result.allGroup = !!this.internalSearchIndeces[i].allGroup;
742
743
  result.filters = this.internalSearchIndeces[i].filters;
744
+ result.replicas = this.currentIndex.replicas;
743
745
  });
744
746
  return this.algoliaSearchResults;
745
747
  }
@@ -900,8 +902,8 @@ const GlobalNav = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
900
902
  }
901
903
  searchWidget() {
902
904
  return [
903
- h("form", { class: "search-inputs", onSubmit: this.onSearchSubmit, id: "global-nav-search" }, h("nano-select", { class: "search-input", label: "Which area of content would you like to search?", hideLabel: true, showInlineError: false, value: this.searchIndex, onNanoChange: this.onSearchIndexChange, mask: true }, this.internalSearchIndeces.map((index) => {
904
- return (h("nano-option", { selected: index.index === this.searchIndex, value: index.index }, index.name || index.index));
905
+ h("form", { class: "search-inputs", onSubmit: this.onSearchSubmit, id: "global-nav-search" }, h("nano-select", { class: "search-input", label: "Which area of content would you like to search?", hideLabel: true, showInlineError: false, value: this.currentSelectedIndex()?.index, onNanoChange: this.onSearchIndexChange, mask: true }, this.internalSearchIndeces.map((index) => {
906
+ return (h("nano-option", { selected: index.name === this.searchIndex, value: index.index }, index.name || index.index));
905
907
  }), h("nano-icon", { name: "light/chevron-down", class: "select-input__arrow", slot: "down-arrow" })), h("nano-input", { class: "search-input", label: "What would you like to search for?", "aria-label": "What would you like to search for", hideLabel: true, showInlineError: false, "clear-input": true, placeholder: "Search Nanopore", type: "text", ref: (input) => (this.searchInput = input), onNanoChange: this.onSearchChange, onNanoInput: this.onSearchInput, onKeyDown: this.onAutocompleteInteract, debounce: 500, "aria-autocomplete": "list", "aria-activedescendant": this.autocompleteEles[this.currAIndex]
906
908
  ? this.autocompleteEles[this.currAIndex].id
907
909
  : false, "aria-controls": "autocomplete-results", onNanoFocus: this.showAutocompleteResults, value: this.searchValue, role: "textbox" }, h("button", { class: {