@genspectrum/dashboard-components 0.16.2 → 0.16.4

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 (48) hide show
  1. package/custom-elements.json +72 -7
  2. package/dist/assets/mutationOverTimeWorker-CPfQDLe6.js.map +1 -0
  3. package/dist/components.d.ts +60 -21
  4. package/dist/components.js +804 -608
  5. package/dist/components.js.map +1 -1
  6. package/dist/style.css +21 -0
  7. package/dist/util.d.ts +69 -25
  8. package/package.json +5 -2
  9. package/src/preact/MutationAnnotationsContext.spec.tsx +58 -0
  10. package/src/preact/MutationAnnotationsContext.tsx +72 -0
  11. package/src/preact/components/annotated-mutation.stories.tsx +164 -0
  12. package/src/preact/components/annotated-mutation.tsx +84 -0
  13. package/src/preact/components/error-display.tsx +9 -9
  14. package/src/preact/components/info.tsx +6 -13
  15. package/src/preact/components/modal.stories.tsx +7 -19
  16. package/src/preact/components/modal.tsx +35 -4
  17. package/src/preact/mutationComparison/mutation-comparison-table.tsx +14 -1
  18. package/src/preact/mutationComparison/mutation-comparison-venn.tsx +39 -8
  19. package/src/preact/mutationComparison/mutation-comparison.stories.tsx +36 -12
  20. package/src/preact/mutationComparison/mutation-comparison.tsx +2 -0
  21. package/src/preact/mutations/mutations-table.tsx +14 -2
  22. package/src/preact/mutations/mutations.stories.tsx +33 -1
  23. package/src/preact/mutations/mutations.tsx +1 -0
  24. package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +19 -8
  25. package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +29 -5
  26. package/src/preact/mutationsOverTime/mutations-over-time.tsx +13 -1
  27. package/src/preact/sequencesByLocation/sequences-by-location-map.tsx +28 -30
  28. package/src/preact/shared/stories/expectMutationAnnotation.ts +13 -0
  29. package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +6 -1
  30. package/src/utilEntrypoint.ts +2 -0
  31. package/src/web-components/gs-app.spec-d.ts +10 -0
  32. package/src/web-components/gs-app.stories.ts +24 -6
  33. package/src/web-components/gs-app.ts +17 -0
  34. package/src/web-components/mutation-annotations-context.ts +16 -0
  35. package/src/web-components/visualization/gs-mutation-comparison.stories.ts +18 -1
  36. package/src/web-components/visualization/gs-mutation-comparison.tsx +19 -8
  37. package/src/web-components/visualization/gs-mutations-over-time.stories.ts +19 -1
  38. package/src/web-components/visualization/gs-mutations-over-time.tsx +22 -11
  39. package/src/web-components/visualization/gs-mutations.stories.ts +19 -1
  40. package/src/web-components/visualization/gs-mutations.tsx +20 -9
  41. package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +11 -1
  42. package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +18 -7
  43. package/standalone-bundle/assets/mutationOverTimeWorker-CERZSdcA.js.map +1 -0
  44. package/standalone-bundle/dashboard-components.js +12555 -11853
  45. package/standalone-bundle/dashboard-components.js.map +1 -1
  46. package/standalone-bundle/style.css +1 -1
  47. package/dist/assets/mutationOverTimeWorker-BL50C-yi.js.map +0 -1
  48. package/standalone-bundle/assets/mutationOverTimeWorker-CFB5-Mdk.js.map +0 -1
@@ -1,12 +1,15 @@
1
+ import { consume } from '@lit/context';
1
2
  import { customElement, property } from 'lit/decorators.js';
2
3
  import { type DetailedHTMLProps, type HTMLAttributes } from 'react';
3
4
 
5
+ import { MutationAnnotationsContextProvider } from '../../preact/MutationAnnotationsContext';
4
6
  import {
5
7
  WastewaterMutationsOverTime,
6
8
  type WastewaterMutationsOverTimeProps,
7
9
  } from '../../preact/wastewater/mutationsOverTime/wastewater-mutations-over-time';
8
10
  import { type Equals, type Expect } from '../../utils/typeAssertions';
9
11
  import { PreactLitAdapterWithGridJsStyles } from '../PreactLitAdapterWithGridJsStyles';
12
+ import { type MutationAnnotations, mutationAnnotationsContext } from '../mutation-annotations-context';
10
13
 
11
14
  /**
12
15
  * ## Context
@@ -71,15 +74,23 @@ export class WastewaterMutationsOverTimeComponent extends PreactLitAdapterWithGr
71
74
  @property({ type: Number })
72
75
  maxNumberOfGridRows: number = 100;
73
76
 
77
+ /**
78
+ * @internal
79
+ */
80
+ @consume({ context: mutationAnnotationsContext, subscribe: true })
81
+ mutationAnnotations: MutationAnnotations = [];
82
+
74
83
  override render() {
75
84
  return (
76
- <WastewaterMutationsOverTime
77
- lapisFilter={this.lapisFilter}
78
- sequenceType={this.sequenceType}
79
- width={this.width}
80
- height={this.height}
81
- maxNumberOfGridRows={this.maxNumberOfGridRows}
82
- />
85
+ <MutationAnnotationsContextProvider value={this.mutationAnnotations}>
86
+ <WastewaterMutationsOverTime
87
+ lapisFilter={this.lapisFilter}
88
+ sequenceType={this.sequenceType}
89
+ width={this.width}
90
+ height={this.height}
91
+ maxNumberOfGridRows={this.maxNumberOfGridRows}
92
+ />
93
+ </MutationAnnotationsContextProvider>
83
94
  );
84
95
  }
85
96
  }