@genspectrum/dashboard-components 1.2.0 → 1.3.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/README.md +9 -0
- package/custom-elements.json +20 -1
- package/dist/assets/mutationOverTimeWorker-CQxrFo53.js.map +1 -0
- package/dist/components.d.ts +34 -28
- package/dist/components.js +48 -16
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +28 -28
- package/package.json +1 -1
- package/src/lapisApi/lapisApi.ts +29 -0
- package/src/lapisApi/lapisTypes.ts +35 -1
- package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutationsByDay.ts +1 -0
- package/src/preact/mutationsOverTime/__mockData__/byWeek.ts +1 -0
- package/src/preact/mutationsOverTime/__mockData__/defaultMockData.ts +1 -0
- package/src/preact/mutationsOverTime/__mockData__/noDataWhenNoMutationsAreInFilter.ts +1 -0
- package/src/preact/mutationsOverTime/__mockData__/noDataWhenThereAreNoDatesInFilter.ts +1 -0
- package/src/preact/mutationsOverTime/__mockData__/showsMessageWhenTooManyMutations.ts +1 -0
- package/src/preact/mutationsOverTime/__mockData__/withDisplayMutations.ts +352 -0
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts +0 -24
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +0 -8
- package/src/preact/mutationsOverTime/mutationOverTimeWorker.mock.ts +2 -0
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +2 -0
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +11 -6
- package/src/query/queryMutationsOverTime.spec.ts +98 -0
- package/src/query/queryMutationsOverTime.ts +172 -28
- package/src/query/queryMutationsOverTimeNewEndpoint.spec.ts +1057 -0
- package/src/web-components/visualization/gs-mutations-over-time.spec-d.ts +3 -0
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +3 -0
- package/src/web-components/visualization/gs-mutations-over-time.tsx +9 -0
- package/standalone-bundle/assets/mutationOverTimeWorker-CDACUs6w.js.map +1 -0
- package/standalone-bundle/dashboard-components.js +3628 -3594
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/dist/assets/mutationOverTimeWorker-DpW4YOGl.js.map +0 -1
- package/standalone-bundle/assets/mutationOverTimeWorker-CZVvQBze.js.map +0 -1
package/README.md
CHANGED
|
@@ -77,6 +77,15 @@ We primarily provide two kinds of components:
|
|
|
77
77
|
npm ci
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
> [!NOTE]
|
|
81
|
+
> **For Mac users**: By default, the `package-lock.json` installs linux dependencies for the
|
|
82
|
+
> storybook test runner. To use it, you need to reinstall it:
|
|
83
|
+
>
|
|
84
|
+
> ```
|
|
85
|
+
> npm uninstall @storybook/test-runner
|
|
86
|
+
> npm install @storybook/test-runner --force
|
|
87
|
+
> ```
|
|
88
|
+
|
|
80
89
|
### Custom Elements Manifest
|
|
81
90
|
|
|
82
91
|
This package also ships a [Custom Elements Manifest](https://custom-elements-manifest.open-wc.org/),
|
package/custom-elements.json
CHANGED
|
@@ -2464,7 +2464,7 @@
|
|
|
2464
2464
|
"type": {
|
|
2465
2465
|
"text": "Meta<Required<MutationsOverTimeProps>>"
|
|
2466
2466
|
},
|
|
2467
|
-
"default": "{ title: 'Visualization/Mutations over time', component: 'gs-mutations-over-time', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['grid'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, lapisDateField: { control: 'text' }, displayMutations: { control: 'object' }, initialMeanProportionInterval: { control: 'object' }, pageSizes: { control: 'object' }, }, args: { lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-07-10' }, sequenceType: 'nucleotide', views: ['grid'], width: '100%', granularity: 'month', lapisDateField: 'date', initialMeanProportionInterval: { min: 0.05, max: 0.9 }, pageSizes: [10, 20, 30, 40, 50], }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
|
|
2467
|
+
"default": "{ title: 'Visualization/Mutations over time', component: 'gs-mutations-over-time', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['grid'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, lapisDateField: { control: 'text' }, displayMutations: { control: 'object' }, initialMeanProportionInterval: { control: 'object' }, useNewEndpoint: { control: 'boolean' }, pageSizes: { control: 'object' }, }, args: { lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-07-10' }, sequenceType: 'nucleotide', views: ['grid'], width: '100%', granularity: 'month', lapisDateField: 'date', initialMeanProportionInterval: { min: 0.05, max: 0.9 }, useNewEndpoint: false, pageSizes: [10, 20, 30, 40, 50], }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
|
|
2468
2468
|
},
|
|
2469
2469
|
{
|
|
2470
2470
|
"kind": "variable",
|
|
@@ -2673,6 +2673,16 @@
|
|
|
2673
2673
|
"description": "The initial proportion interval for the grid view.\nThe values must be between 0 and 1, inclusive.",
|
|
2674
2674
|
"attribute": "initialMeanProportionInterval"
|
|
2675
2675
|
},
|
|
2676
|
+
{
|
|
2677
|
+
"kind": "field",
|
|
2678
|
+
"name": "useNewEndpoint",
|
|
2679
|
+
"type": {
|
|
2680
|
+
"text": "boolean | undefined"
|
|
2681
|
+
},
|
|
2682
|
+
"default": "false",
|
|
2683
|
+
"description": "Whether to use the mutationsOverTime endpoint from LAPIS.\nIf true, use the endpoint, if false, compute component data as before.\nEventually, the new endpoint will become the default.",
|
|
2684
|
+
"attribute": "useNewEndpoint"
|
|
2685
|
+
},
|
|
2676
2686
|
{
|
|
2677
2687
|
"kind": "field",
|
|
2678
2688
|
"name": "pageSizes",
|
|
@@ -2775,6 +2785,15 @@
|
|
|
2775
2785
|
"description": "The initial proportion interval for the grid view.\nThe values must be between 0 and 1, inclusive.",
|
|
2776
2786
|
"fieldName": "initialMeanProportionInterval"
|
|
2777
2787
|
},
|
|
2788
|
+
{
|
|
2789
|
+
"name": "useNewEndpoint",
|
|
2790
|
+
"type": {
|
|
2791
|
+
"text": "boolean | undefined"
|
|
2792
|
+
},
|
|
2793
|
+
"default": "false",
|
|
2794
|
+
"description": "Whether to use the mutationsOverTime endpoint from LAPIS.\nIf true, use the endpoint, if false, compute component data as before.\nEventually, the new endpoint will become the default.",
|
|
2795
|
+
"fieldName": "useNewEndpoint"
|
|
2796
|
+
},
|
|
2778
2797
|
{
|
|
2779
2798
|
"name": "pageSizes",
|
|
2780
2799
|
"type": {
|