@genspectrum/dashboard-components 0.6.9 → 0.6.11
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 +3 -3
- package/dist/dashboard-components.js +366 -75
- package/dist/dashboard-components.js.map +1 -1
- package/dist/genspectrum-components.d.ts +2 -2
- package/dist/style.css +65 -1
- package/package.json +4 -1
- package/src/preact/aggregatedData/aggregate.tsx +14 -4
- package/src/preact/components/chart.tsx +14 -1
- package/src/preact/components/fullscreen.tsx +57 -0
- package/src/preact/components/info.tsx +88 -1
- package/src/preact/components/resize-container.tsx +5 -1
- package/src/preact/mutationComparison/mutation-comparison.tsx +2 -0
- package/src/preact/mutations/mutations.tsx +34 -2
- package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutations_byDayOverall.json +4726 -0
- package/src/preact/mutationsOverTime/__mockData__/nucleotideMutations_byMonthOverall.json +11143 -0
- package/src/preact/mutationsOverTime/__mockData__/nucleotideMutations_byWeekOverall.json +9154 -0
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts +66 -22
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +16 -7
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +17 -0
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +28 -4
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +42 -6
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +2 -1
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +46 -53
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +2 -0
- package/src/query/queryMutationsOverTime.ts +10 -1
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +51 -1
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +2 -4
|
@@ -20,6 +20,7 @@ import aminoAcidMutations_23_01_2024 from '../../preact/mutationsOverTime/__mock
|
|
|
20
20
|
import aminoAcidMutations_24_01_2024 from '../../preact/mutationsOverTime/__mockData__/aminoAcidMutations_24_01_2024.json';
|
|
21
21
|
import aminoAcidMutations_25_01_2024 from '../../preact/mutationsOverTime/__mockData__/aminoAcidMutations_25_01_2024.json';
|
|
22
22
|
import aminoAcidMutations_26_01_2024 from '../../preact/mutationsOverTime/__mockData__/aminoAcidMutations_26_01_2024.json';
|
|
23
|
+
import aminoAcidMutations_byDayOverall from '../../preact/mutationsOverTime/__mockData__/aminoAcidMutations_byDayOverall.json';
|
|
23
24
|
import nucleotideMutation_01 from '../../preact/mutationsOverTime/__mockData__/nucleotideMutations_2024_01.json';
|
|
24
25
|
import nucleotideMutation_02 from '../../preact/mutationsOverTime/__mockData__/nucleotideMutations_2024_02.json';
|
|
25
26
|
import nucleotideMutation_03 from '../../preact/mutationsOverTime/__mockData__/nucleotideMutations_2024_03.json';
|
|
@@ -27,6 +28,8 @@ import nucleotideMutation_04 from '../../preact/mutationsOverTime/__mockData__/n
|
|
|
27
28
|
import nucleotideMutation_05 from '../../preact/mutationsOverTime/__mockData__/nucleotideMutations_2024_05.json';
|
|
28
29
|
import nucleotideMutation_06 from '../../preact/mutationsOverTime/__mockData__/nucleotideMutations_2024_06.json';
|
|
29
30
|
import nucleotideMutation_07 from '../../preact/mutationsOverTime/__mockData__/nucleotideMutations_2024_07.json';
|
|
31
|
+
import nucleotideMutations_byMonthOverall from '../../preact/mutationsOverTime/__mockData__/nucleotideMutations_byMonthOverall.json';
|
|
32
|
+
import nucleotideMutations_byWeekOverall from '../../preact/mutationsOverTime/__mockData__/nucleotideMutations_byWeekOverall.json';
|
|
30
33
|
import nucleotideMutation_week3 from '../../preact/mutationsOverTime/__mockData__/nucleotideMutations_week3_2024.json';
|
|
31
34
|
import nucleotideMutation_week4 from '../../preact/mutationsOverTime/__mockData__/nucleotideMutations_week4_2024.json';
|
|
32
35
|
import nucleotideMutation_week5 from '../../preact/mutationsOverTime/__mockData__/nucleotideMutations_week5_2024.json';
|
|
@@ -38,7 +41,6 @@ const codeExample = String.raw`
|
|
|
38
41
|
lapisFilter='{ "pangoLineage": "JN.1*", "dateFrom": "2024-01-15", "dateTo": "2024-07-10" }'
|
|
39
42
|
sequenceType="nucleotide"
|
|
40
43
|
views='["grid"]'
|
|
41
|
-
headline="Mutations over time"
|
|
42
44
|
width='100%'
|
|
43
45
|
height='700px'
|
|
44
46
|
granularity="month"
|
|
@@ -124,6 +126,22 @@ export const ByMonth: StoryObj<Required<MutationsOverTimeProps>> = {
|
|
|
124
126
|
body: aggregated_date,
|
|
125
127
|
},
|
|
126
128
|
},
|
|
129
|
+
{
|
|
130
|
+
matcher: {
|
|
131
|
+
name: 'nucleotideMutations_overall',
|
|
132
|
+
url: NUCLEOTIDE_MUTATIONS_ENDPOINT,
|
|
133
|
+
body: {
|
|
134
|
+
pangoLineage: 'JN.1*',
|
|
135
|
+
dateFrom: '2024-01-15',
|
|
136
|
+
dateTo: '2024-07-10',
|
|
137
|
+
minProportion: 0.001,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
response: {
|
|
141
|
+
status: 200,
|
|
142
|
+
body: nucleotideMutations_byMonthOverall,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
127
145
|
{
|
|
128
146
|
matcher: {
|
|
129
147
|
name: 'nucleotideMutations_01',
|
|
@@ -268,6 +286,22 @@ export const ByWeek: StoryObj<Required<MutationsOverTimeProps>> = {
|
|
|
268
286
|
body: aggregated_byWeek,
|
|
269
287
|
},
|
|
270
288
|
},
|
|
289
|
+
{
|
|
290
|
+
matcher: {
|
|
291
|
+
name: 'nucleotideMutation_overall',
|
|
292
|
+
url: NUCLEOTIDE_MUTATIONS_ENDPOINT,
|
|
293
|
+
body: {
|
|
294
|
+
pangoLineage: 'JN.1*',
|
|
295
|
+
dateFrom: '2024-01-15',
|
|
296
|
+
dateTo: '2024-02-11',
|
|
297
|
+
minProportion: 0.001,
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
response: {
|
|
301
|
+
status: 200,
|
|
302
|
+
body: nucleotideMutations_byWeekOverall,
|
|
303
|
+
},
|
|
304
|
+
},
|
|
271
305
|
{
|
|
272
306
|
matcher: {
|
|
273
307
|
name: 'nucleotideMutation_week3',
|
|
@@ -359,6 +393,22 @@ export const AminoAcidMutationsByDay: StoryObj<Required<MutationsOverTimeProps>>
|
|
|
359
393
|
body: aggregated_byDay,
|
|
360
394
|
},
|
|
361
395
|
},
|
|
396
|
+
{
|
|
397
|
+
matcher: {
|
|
398
|
+
name: 'aminoAcidMutations_overall',
|
|
399
|
+
url: AMINO_ACID_MUTATIONS_ENDPOINT,
|
|
400
|
+
body: {
|
|
401
|
+
pangoLineage: 'JN.1*',
|
|
402
|
+
dateFrom: '2024-01-20',
|
|
403
|
+
dateTo: '2024-01-26',
|
|
404
|
+
minProportion: 0.001,
|
|
405
|
+
},
|
|
406
|
+
},
|
|
407
|
+
response: {
|
|
408
|
+
status: 200,
|
|
409
|
+
body: aminoAcidMutations_byDayOverall,
|
|
410
|
+
},
|
|
411
|
+
},
|
|
362
412
|
{
|
|
363
413
|
matcher: {
|
|
364
414
|
name: 'aminoAcidMutations_20_01_2024',
|
|
@@ -175,10 +175,8 @@ export class PrevalenceOverTimeComponent extends PreactLitAdapterWithGridJsStyle
|
|
|
175
175
|
height={this.height}
|
|
176
176
|
lapisDateField={this.lapisDateField}
|
|
177
177
|
pageSize={this.pageSize}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
logarithmic: this.yAxisMaxLogarithmic,
|
|
181
|
-
}}
|
|
178
|
+
yAxisMaxLinear={this.yAxisMaxLinear}
|
|
179
|
+
yAxisMaxLogarithmic={this.yAxisMaxLogarithmic}
|
|
182
180
|
/>
|
|
183
181
|
);
|
|
184
182
|
}
|