@genspectrum/dashboard-components 0.15.0 → 0.16.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/custom-elements.json +255 -57
- package/dist/components.d.ts +49 -32
- package/dist/components.js +361 -212
- package/dist/components.js.map +1 -1
- package/dist/style.css +9 -0
- package/dist/util.d.ts +43 -43
- package/package.json +1 -1
- package/src/preact/ReferenceGenomeContext.ts +16 -1
- package/src/preact/aggregatedData/aggregate-bar-chart.tsx +26 -5
- package/src/preact/aggregatedData/aggregate.stories.tsx +0 -1
- package/src/preact/aggregatedData/aggregate.tsx +5 -1
- package/src/preact/components/ReferenceGenomesAwaiter.tsx +1 -6
- package/src/preact/components/info.tsx +1 -0
- package/src/preact/components/resize-container.tsx +1 -1
- package/src/preact/mutationComparison/mutation-comparison-venn.tsx +4 -2
- package/src/preact/mutationComparison/mutation-comparison.stories.tsx +0 -1
- package/src/preact/mutationComparison/mutation-comparison.tsx +5 -1
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +17 -1
- package/src/preact/mutationFilter/mutation-filter.tsx +8 -0
- package/src/preact/mutations/mutations.stories.tsx +0 -1
- package/src/preact/mutations/mutations.tsx +1 -1
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts +70 -14
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +30 -7
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +56 -55
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +26 -39
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +22 -7
- package/src/preact/numberSequencesOverTime/number-sequences-over-time-bar-chart.tsx +8 -3
- package/src/preact/numberSequencesOverTime/number-sequences-over-time-line-chart.tsx +8 -3
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +3 -1
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +18 -3
- package/src/preact/prevalenceOverTime/prevalence-over-time-bar-chart.tsx +48 -35
- package/src/preact/prevalenceOverTime/prevalence-over-time-bubble-chart.tsx +83 -70
- package/src/preact/prevalenceOverTime/prevalence-over-time-line-chart.tsx +48 -37
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +0 -3
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +6 -1
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage-chart.tsx +31 -23
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +0 -1
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +5 -1
- package/src/preact/sequencesByLocation/__mockData__/worldAtlas.json +1 -0
- package/src/preact/{map → sequencesByLocation}/sequences-by-location-map.tsx +6 -3
- package/src/preact/{map → sequencesByLocation}/sequences-by-location-table.tsx +1 -1
- package/src/preact/{map → sequencesByLocation}/sequences-by-location.stories.tsx +58 -1
- package/src/preact/{map → sequencesByLocation}/sequences-by-location.tsx +10 -1
- package/src/preact/shared/aspectRatio/AspectRatio.tsx +13 -0
- package/src/preact/shared/charts/getMaintainAspectRatio.ts +3 -0
- package/src/preact/statistic/statistics.stories.tsx +0 -1
- package/src/preact/statistic/statistics.tsx +4 -4
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +0 -1
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +1 -1
- package/src/query/computeMapLocationData.spec.ts +1 -1
- package/src/query/computeMapLocationData.ts +1 -1
- package/src/query/querySequencesByLocationData.ts +1 -1
- package/src/utilEntrypoint.ts +1 -1
- package/src/web-components/PreactLitAdapter.tsx +2 -5
- package/src/web-components/ResizeContainer.mdx +4 -1
- package/src/web-components/gs-app.ts +2 -4
- package/src/web-components/visualization/gs-aggregate.stories.ts +13 -6
- package/src/web-components/visualization/gs-aggregate.tsx +1 -1
- package/src/web-components/visualization/gs-mutation-comparison.stories.ts +8 -1
- package/src/web-components/visualization/gs-mutation-comparison.tsx +1 -1
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +24 -1
- package/src/web-components/visualization/gs-mutations-over-time.tsx +30 -1
- package/src/web-components/visualization/gs-mutations.stories.ts +8 -1
- package/src/web-components/visualization/gs-mutations.tsx +1 -1
- package/src/web-components/visualization/gs-number-sequences-over-time.stories.ts +11 -1
- package/src/web-components/visualization/gs-number-sequences-over-time.tsx +1 -1
- package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +8 -2
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +1 -1
- package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +8 -1
- package/src/web-components/visualization/gs-relative-growth-advantage.tsx +1 -1
- package/src/web-components/visualization/gs-sequences-by-location.stories.ts +13 -7
- package/src/web-components/visualization/gs-sequences-by-location.tsx +6 -3
- package/src/web-components/visualization/gs-statistics.stories.ts +0 -1
- package/src/web-components/visualization/gs-statistics.tsx +1 -1
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +9 -1
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +1 -1
- package/standalone-bundle/dashboard-components.js +5817 -5706
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/src/preact/map/__mockData__/worldAtlas.json +0 -497127
- /package/src/preact/{map → sequencesByLocation}/__mockData__/aggregatedGermany.json +0 -0
- /package/src/preact/{map → sequencesByLocation}/__mockData__/aggregatedWorld.json +0 -0
- /package/src/preact/{map → sequencesByLocation}/__mockData__/germanyMap.json +0 -0
- /package/src/preact/{map → sequencesByLocation}/__mockData__/howToGenerateWorldMap.md +0 -0
- /package/src/preact/{map → sequencesByLocation}/leafletStyleModifications.css +0 -0
- /package/src/preact/{map → sequencesByLocation}/loadMapSource.tsx +0 -0
|
@@ -99,7 +99,6 @@ export const TwoDatasets: StoryObj<Required<PrevalenceOverTimeProps>> = {
|
|
|
99
99
|
views: ['bar', 'line', 'bubble', 'table'],
|
|
100
100
|
confidenceIntervalMethods: ['wilson'],
|
|
101
101
|
width: '100%',
|
|
102
|
-
height: '700px',
|
|
103
102
|
lapisDateField: 'date',
|
|
104
103
|
pageSize: 10,
|
|
105
104
|
yAxisMaxLinear: 1,
|
|
@@ -175,7 +174,6 @@ export const OneDataset: StoryObj<Required<PrevalenceOverTimeProps>> = {
|
|
|
175
174
|
views: ['bar', 'line', 'bubble', 'table'],
|
|
176
175
|
confidenceIntervalMethods: ['wilson'],
|
|
177
176
|
width: '100%',
|
|
178
|
-
height: '700px',
|
|
179
177
|
lapisDateField: 'date',
|
|
180
178
|
pageSize: 10,
|
|
181
179
|
yAxisMaxLinear: 1,
|
|
@@ -252,3 +250,11 @@ export const OneDatasetOnTableTab: StoryObj<Required<PrevalenceOverTimeProps>> =
|
|
|
252
250
|
await fireEvent.click(canvas.getByRole('button', { name: 'Table' }));
|
|
253
251
|
},
|
|
254
252
|
};
|
|
253
|
+
|
|
254
|
+
export const WithFixedHeight: StoryObj<Required<PrevalenceOverTimeProps>> = {
|
|
255
|
+
...TwoDatasets,
|
|
256
|
+
args: {
|
|
257
|
+
...TwoDatasets.args,
|
|
258
|
+
height: '700px',
|
|
259
|
+
},
|
|
260
|
+
};
|
|
@@ -123,7 +123,7 @@ export class PrevalenceOverTimeComponent extends PreactLitAdapterWithGridJsStyle
|
|
|
123
123
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
124
124
|
*/
|
|
125
125
|
@property({ type: String })
|
|
126
|
-
height: string =
|
|
126
|
+
height: string | undefined = undefined;
|
|
127
127
|
|
|
128
128
|
/**
|
|
129
129
|
* Required.
|
|
@@ -81,7 +81,6 @@ export const Default: StoryObj<Required<RelativeGrowthAdvantageProps>> = {
|
|
|
81
81
|
generationTime: 7,
|
|
82
82
|
views: ['line'],
|
|
83
83
|
width: '100%',
|
|
84
|
-
height: '700px',
|
|
85
84
|
lapisDateField: 'date',
|
|
86
85
|
yAxisMaxLinear: 1,
|
|
87
86
|
yAxisMaxLogarithmic: 'limitTo1',
|
|
@@ -126,3 +125,11 @@ export const Default: StoryObj<Required<RelativeGrowthAdvantageProps>> = {
|
|
|
126
125
|
},
|
|
127
126
|
},
|
|
128
127
|
};
|
|
128
|
+
|
|
129
|
+
export const WithFixedHeight: StoryObj<Required<RelativeGrowthAdvantageProps>> = {
|
|
130
|
+
...Default,
|
|
131
|
+
args: {
|
|
132
|
+
...Default.args,
|
|
133
|
+
height: '700px',
|
|
134
|
+
},
|
|
135
|
+
};
|
|
@@ -87,7 +87,7 @@ export class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
|
|
|
87
87
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
88
88
|
*/
|
|
89
89
|
@property({ type: String })
|
|
90
|
-
height: string =
|
|
90
|
+
height: string | undefined = undefined;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Required.
|
|
@@ -5,11 +5,11 @@ import { html } from 'lit';
|
|
|
5
5
|
import { withComponentDocs } from '../../../.storybook/ComponentDocsBlock';
|
|
6
6
|
import { AGGREGATED_ENDPOINT, LAPIS_URL } from '../../constants';
|
|
7
7
|
import aggregatedData from '../../preact/aggregatedData/__mockData__/aggregated.json';
|
|
8
|
-
import aggregatedGermany from '../../preact/
|
|
9
|
-
import aggregatedWorld from '../../preact/
|
|
10
|
-
import mapOfGermany from '../../preact/
|
|
11
|
-
import worldAtlas from '../../preact/
|
|
12
|
-
import { type SequencesByLocationProps } from '../../preact/
|
|
8
|
+
import aggregatedGermany from '../../preact/sequencesByLocation/__mockData__/aggregatedGermany.json';
|
|
9
|
+
import aggregatedWorld from '../../preact/sequencesByLocation/__mockData__/aggregatedWorld.json';
|
|
10
|
+
import mapOfGermany from '../../preact/sequencesByLocation/__mockData__/germanyMap.json';
|
|
11
|
+
import worldAtlas from '../../preact/sequencesByLocation/__mockData__/worldAtlas.json';
|
|
12
|
+
import { type SequencesByLocationProps } from '../../preact/sequencesByLocation/sequences-by-location';
|
|
13
13
|
import { withinShadowRoot } from '../withinShadowRoot.story';
|
|
14
14
|
|
|
15
15
|
import './gs-sequences-by-location';
|
|
@@ -86,7 +86,6 @@ const Template: StoryObj<SequencesByLocationProps> = {
|
|
|
86
86
|
args: {
|
|
87
87
|
enableMapNavigation: false,
|
|
88
88
|
width: '1100px',
|
|
89
|
-
height: '700px',
|
|
90
89
|
views: ['map', 'table'],
|
|
91
90
|
pageSize: 10,
|
|
92
91
|
},
|
|
@@ -222,7 +221,6 @@ export const GermanyTableOnly: StoryObj<SequencesByLocationProps> = {
|
|
|
222
221
|
lapisFilter: { dateFrom: '2022-01-01', dateTo: '2022-04-01', country: 'Germany' },
|
|
223
222
|
lapisLocationField: 'division',
|
|
224
223
|
width: '100%',
|
|
225
|
-
height: '700px',
|
|
226
224
|
views: ['table'],
|
|
227
225
|
pageSize: 10,
|
|
228
226
|
},
|
|
@@ -249,3 +247,11 @@ export const GermanyTableOnly: StoryObj<SequencesByLocationProps> = {
|
|
|
249
247
|
},
|
|
250
248
|
},
|
|
251
249
|
};
|
|
250
|
+
|
|
251
|
+
export const WithFixedHeight: StoryObj<SequencesByLocationProps> = {
|
|
252
|
+
...WorldMap,
|
|
253
|
+
args: {
|
|
254
|
+
...WorldMap.args,
|
|
255
|
+
height: '700px',
|
|
256
|
+
},
|
|
257
|
+
};
|
|
@@ -3,8 +3,11 @@ import { unsafeCSS } from 'lit';
|
|
|
3
3
|
import { customElement, property } from 'lit/decorators.js';
|
|
4
4
|
import type { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
5
5
|
|
|
6
|
-
import leafletStyleModifications from '../../preact/
|
|
7
|
-
import {
|
|
6
|
+
import leafletStyleModifications from '../../preact/sequencesByLocation/leafletStyleModifications.css?inline';
|
|
7
|
+
import {
|
|
8
|
+
SequencesByLocation,
|
|
9
|
+
type SequencesByLocationProps,
|
|
10
|
+
} from '../../preact/sequencesByLocation/sequences-by-location';
|
|
8
11
|
import type { Equals, Expect } from '../../utils/typeAssertions';
|
|
9
12
|
import { PreactLitAdapterWithGridJsStyles } from '../PreactLitAdapterWithGridJsStyles';
|
|
10
13
|
|
|
@@ -148,7 +151,7 @@ export class SequencesByLocationComponent extends PreactLitAdapterWithGridJsStyl
|
|
|
148
151
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
149
152
|
*/
|
|
150
153
|
@property({ type: String })
|
|
151
|
-
height: string =
|
|
154
|
+
height: string | undefined = undefined;
|
|
152
155
|
|
|
153
156
|
/**
|
|
154
157
|
A list of tabs with views that this component should provide.
|
|
@@ -51,7 +51,7 @@ export class StatisticsComponent extends PreactLitAdapterWithGridJsStyles {
|
|
|
51
51
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
52
52
|
*/
|
|
53
53
|
@property({ type: String })
|
|
54
|
-
height: string =
|
|
54
|
+
height: string | undefined = undefined;
|
|
55
55
|
|
|
56
56
|
override render() {
|
|
57
57
|
return (
|
package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts
CHANGED
|
@@ -35,7 +35,7 @@ const meta: Meta<WastewaterMutationsOverTimeProps & { infoText: string }> = {
|
|
|
35
35
|
lapisFilter: { versionStatus: 'LATEST_VERSION', isRevocation: false },
|
|
36
36
|
sequenceType: 'nucleotide',
|
|
37
37
|
width: '100%',
|
|
38
|
-
height:
|
|
38
|
+
height: undefined,
|
|
39
39
|
infoText: 'Some info text',
|
|
40
40
|
maxNumberOfGridRows: 100,
|
|
41
41
|
},
|
|
@@ -88,3 +88,11 @@ export const WastewaterMutationsOverTime: StoryObj<WastewaterMutationsOverTimePr
|
|
|
88
88
|
},
|
|
89
89
|
},
|
|
90
90
|
};
|
|
91
|
+
|
|
92
|
+
export const WithFixedHeight: StoryObj<WastewaterMutationsOverTimeProps & { infoText: string }> = {
|
|
93
|
+
...WastewaterMutationsOverTime,
|
|
94
|
+
args: {
|
|
95
|
+
...WastewaterMutationsOverTime.args,
|
|
96
|
+
height: '700px',
|
|
97
|
+
},
|
|
98
|
+
};
|
|
@@ -63,7 +63,7 @@ export class WastewaterMutationsOverTimeComponent extends PreactLitAdapterWithGr
|
|
|
63
63
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
64
64
|
*/
|
|
65
65
|
@property({ type: String })
|
|
66
|
-
height: string =
|
|
66
|
+
height: string | undefined = undefined;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* The maximum number of grid rows to display.
|