@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.
- package/custom-elements.json +72 -7
- package/dist/assets/mutationOverTimeWorker-CPfQDLe6.js.map +1 -0
- package/dist/components.d.ts +60 -21
- package/dist/components.js +804 -608
- package/dist/components.js.map +1 -1
- package/dist/style.css +21 -0
- package/dist/util.d.ts +69 -25
- package/package.json +5 -2
- package/src/preact/MutationAnnotationsContext.spec.tsx +58 -0
- package/src/preact/MutationAnnotationsContext.tsx +72 -0
- package/src/preact/components/annotated-mutation.stories.tsx +164 -0
- package/src/preact/components/annotated-mutation.tsx +84 -0
- package/src/preact/components/error-display.tsx +9 -9
- package/src/preact/components/info.tsx +6 -13
- package/src/preact/components/modal.stories.tsx +7 -19
- package/src/preact/components/modal.tsx +35 -4
- package/src/preact/mutationComparison/mutation-comparison-table.tsx +14 -1
- package/src/preact/mutationComparison/mutation-comparison-venn.tsx +39 -8
- package/src/preact/mutationComparison/mutation-comparison.stories.tsx +36 -12
- package/src/preact/mutationComparison/mutation-comparison.tsx +2 -0
- package/src/preact/mutations/mutations-table.tsx +14 -2
- package/src/preact/mutations/mutations.stories.tsx +33 -1
- package/src/preact/mutations/mutations.tsx +1 -0
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +19 -8
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +29 -5
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +13 -1
- package/src/preact/sequencesByLocation/sequences-by-location-map.tsx +28 -30
- package/src/preact/shared/stories/expectMutationAnnotation.ts +13 -0
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +6 -1
- package/src/utilEntrypoint.ts +2 -0
- package/src/web-components/gs-app.spec-d.ts +10 -0
- package/src/web-components/gs-app.stories.ts +24 -6
- package/src/web-components/gs-app.ts +17 -0
- package/src/web-components/mutation-annotations-context.ts +16 -0
- package/src/web-components/visualization/gs-mutation-comparison.stories.ts +18 -1
- package/src/web-components/visualization/gs-mutation-comparison.tsx +19 -8
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +19 -1
- package/src/web-components/visualization/gs-mutations-over-time.tsx +22 -11
- package/src/web-components/visualization/gs-mutations.stories.ts +19 -1
- package/src/web-components/visualization/gs-mutations.tsx +20 -9
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +11 -1
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +18 -7
- package/standalone-bundle/assets/mutationOverTimeWorker-CERZSdcA.js.map +1 -0
- package/standalone-bundle/dashboard-components.js +12555 -11853
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/dist/assets/mutationOverTimeWorker-BL50C-yi.js.map +0 -1
- 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
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
}
|