@genspectrum/dashboard-components 0.5.6 → 0.6.0

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 (38) hide show
  1. package/custom-elements.json +13 -127
  2. package/dist/dashboard-components.js +95 -109
  3. package/dist/dashboard-components.js.map +1 -1
  4. package/dist/genspectrum-components.d.ts +14 -28
  5. package/dist/style.css +0 -4
  6. package/package.json +1 -1
  7. package/src/preact/aggregatedData/aggregate.stories.tsx +0 -2
  8. package/src/preact/aggregatedData/aggregate.tsx +3 -12
  9. package/src/preact/components/error-boundary.stories.tsx +2 -6
  10. package/src/preact/components/error-boundary.tsx +2 -5
  11. package/src/preact/components/scaling-selector.tsx +9 -3
  12. package/src/preact/mutationComparison/mutation-comparison.stories.tsx +0 -3
  13. package/src/preact/mutationComparison/mutation-comparison.tsx +3 -12
  14. package/src/preact/mutations/mutations.stories.tsx +0 -3
  15. package/src/preact/mutations/mutations.tsx +4 -13
  16. package/src/preact/numberSequencesOverTime/number-sequences-over-time-bar-chart.tsx +9 -2
  17. package/src/preact/numberSequencesOverTime/number-sequences-over-time-line-chart.tsx +9 -2
  18. package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +0 -2
  19. package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +70 -11
  20. package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +0 -4
  21. package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +4 -13
  22. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +0 -3
  23. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +2 -7
  24. package/src/web-components/visualization/gs-aggregate.stories.ts +0 -4
  25. package/src/web-components/visualization/gs-aggregate.tsx +0 -7
  26. package/src/web-components/visualization/gs-mutation-comparison.stories.ts +0 -4
  27. package/src/web-components/visualization/gs-mutation-comparison.tsx +0 -7
  28. package/src/web-components/visualization/gs-mutations.stories.ts +0 -4
  29. package/src/web-components/visualization/gs-mutations.tsx +0 -7
  30. package/src/web-components/visualization/gs-number-sequences-over-time.stories.ts +0 -3
  31. package/src/web-components/visualization/gs-number-sequences-over-time.tsx +14 -11
  32. package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +0 -5
  33. package/src/web-components/visualization/gs-prevalence-over-time.tsx +0 -7
  34. package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +0 -4
  35. package/src/web-components/visualization/gs-relative-growth-advantage.tsx +0 -7
  36. package/src/preact/components/headline.stories.tsx +0 -47
  37. package/src/preact/components/headline.tsx +0 -36
  38. package/src/preact/shared/charts/scales.ts +0 -16
@@ -1159,7 +1159,7 @@
1159
1159
  "type": {
1160
1160
  "text": "Meta<Required<AggregateProps>>"
1161
1161
  },
1162
- "default": "{ title: 'Visualization/Aggregate', component: 'gs-aggregate', argTypes: { fields: [{ control: 'object' }], views: { options: ['table'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, initialSortField: { control: 'text' }, initialSortDirection: { options: ['ascending', 'descending'], control: { type: 'radio' }, }, }, parameters: withComponentDocs({ fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'host'], country: 'USA', }, }, response: { status: 200, body: aggregatedData, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1162
+ "default": "{ title: 'Visualization/Aggregate', component: 'gs-aggregate', argTypes: { fields: [{ control: 'object' }], views: { options: ['table'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, pageSize: { control: 'object' }, initialSortField: { control: 'text' }, initialSortDirection: { options: ['ascending', 'descending'], control: { type: 'radio' }, }, }, parameters: withComponentDocs({ fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'host'], country: 'USA', }, }, response: { status: 200, body: aggregatedData, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1163
1163
  },
1164
1164
  {
1165
1165
  "kind": "variable",
@@ -1167,7 +1167,7 @@
1167
1167
  "type": {
1168
1168
  "text": "StoryObj<Required<AggregateProps>>"
1169
1169
  },
1170
- "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-aggregate .fields=${args.fields} .filter=${args.filter} .views=${args.views} .width=${args.width} .height=${args.height} .headline=${args.headline} .initialSortField=${args.initialSortField} .initialSortDirection=${args.initialSortDirection} .pageSize=${args.pageSize} ></gs-aggregate> </gs-app> `, args: { fields: ['division', 'host'], views: ['table'], filter: { country: 'USA', }, width: '100%', height: '700px', headline: 'Aggregate', initialSortField: 'count', initialSortDirection: 'descending', pageSize: 10, }, }"
1170
+ "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-aggregate .fields=${args.fields} .filter=${args.filter} .views=${args.views} .width=${args.width} .height=${args.height} .initialSortField=${args.initialSortField} .initialSortDirection=${args.initialSortDirection} .pageSize=${args.pageSize} ></gs-aggregate> </gs-app> `, args: { fields: ['division', 'host'], views: ['table'], filter: { country: 'USA', }, width: '100%', height: '700px', initialSortField: 'count', initialSortDirection: 'descending', pageSize: 10, }, }"
1171
1171
  }
1172
1172
  ],
1173
1173
  "exports": [
@@ -1248,16 +1248,6 @@
1248
1248
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1249
1249
  "attribute": "height"
1250
1250
  },
1251
- {
1252
- "kind": "field",
1253
- "name": "headline",
1254
- "type": {
1255
- "text": "string"
1256
- },
1257
- "default": "'Aggregate'",
1258
- "description": "The headline of the component. Set to an empty string to hide the headline.",
1259
- "attribute": "headline"
1260
- },
1261
1251
  {
1262
1252
  "kind": "field",
1263
1253
  "name": "initialSortField",
@@ -1335,15 +1325,6 @@
1335
1325
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1336
1326
  "fieldName": "height"
1337
1327
  },
1338
- {
1339
- "name": "headline",
1340
- "type": {
1341
- "text": "string"
1342
- },
1343
- "default": "'Aggregate'",
1344
- "description": "The headline of the component. Set to an empty string to hide the headline.",
1345
- "fieldName": "headline"
1346
- },
1347
1328
  {
1348
1329
  "name": "initialSortField",
1349
1330
  "type": {
@@ -1409,7 +1390,7 @@
1409
1390
  "type": {
1410
1391
  "text": "Meta<Required<MutationComparisonProps>>"
1411
1392
  },
1412
- "default": "{ title: 'Visualization/Mutation comparison', component: 'gs-mutation-comparison', argTypes: { lapisFilters: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'venn'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1393
+ "default": "{ title: 'Visualization/Mutation comparison', component: 'gs-mutation-comparison', argTypes: { lapisFilters: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'venn'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, pageSize: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1413
1394
  },
1414
1395
  {
1415
1396
  "kind": "variable",
@@ -1417,7 +1398,7 @@
1417
1398
  "type": {
1418
1399
  "text": "StoryObj<Required<MutationComparisonProps>>"
1419
1400
  },
1420
- "default": "{ ...Template, args: { lapisFilters: [ { displayName: 'Some dataset', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo }, }, { displayName: 'Other dataset', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, }, }, ], sequenceType: 'nucleotide', views: ['table', 'venn'], width: '100%', height: '700px', headline: 'Mutation comparison', pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'nucleotideMutationsSomeDataset', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsSomeDataset, }, }, { matcher: { name: 'nucleotideMutationsOtherDataset', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsOtherDataset, }, }, ], }, }, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-comparison'); await step('Min and max proportions should be 50% and 100%', async () => { const minInput = () => canvas.getAllByLabelText('%')[0]; const maxInput = () => canvas.getAllByLabelText('%')[1]; await waitFor(() => expect(minInput()).toHaveValue(50)); await waitFor(() => expect(maxInput()).toHaveValue(100)); }); }, }"
1401
+ "default": "{ ...Template, args: { lapisFilters: [ { displayName: 'Some dataset', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo }, }, { displayName: 'Other dataset', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, }, }, ], sequenceType: 'nucleotide', views: ['table', 'venn'], width: '100%', height: '700px', pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'nucleotideMutationsSomeDataset', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsSomeDataset, }, }, { matcher: { name: 'nucleotideMutationsOtherDataset', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsOtherDataset, }, }, ], }, }, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-comparison'); await step('Min and max proportions should be 50% and 100%', async () => { const minInput = () => canvas.getAllByLabelText('%')[0]; const maxInput = () => canvas.getAllByLabelText('%')[1]; await waitFor(() => expect(minInput()).toHaveValue(50)); await waitFor(() => expect(maxInput()).toHaveValue(100)); }); }, }"
1421
1402
  },
1422
1403
  {
1423
1404
  "kind": "variable",
@@ -1514,16 +1495,6 @@
1514
1495
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1515
1496
  "attribute": "height"
1516
1497
  },
1517
- {
1518
- "kind": "field",
1519
- "name": "headline",
1520
- "type": {
1521
- "text": "string"
1522
- },
1523
- "default": "'Mutation comparison'",
1524
- "description": "The headline of the component. Set to an empty string to hide the headline.",
1525
- "attribute": "headline"
1526
- },
1527
1498
  {
1528
1499
  "kind": "field",
1529
1500
  "name": "pageSize",
@@ -1581,15 +1552,6 @@
1581
1552
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1582
1553
  "fieldName": "height"
1583
1554
  },
1584
- {
1585
- "name": "headline",
1586
- "type": {
1587
- "text": "string"
1588
- },
1589
- "default": "'Mutation comparison'",
1590
- "description": "The headline of the component. Set to an empty string to hide the headline.",
1591
- "fieldName": "headline"
1592
- },
1593
1555
  {
1594
1556
  "name": "pageSize",
1595
1557
  "type": {
@@ -1637,7 +1599,7 @@
1637
1599
  "type": {
1638
1600
  "text": "Meta<Required<MutationsProps>>"
1639
1601
  },
1640
- "default": "{ title: 'Visualization/Mutations', component: 'gs-mutations', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'grid', 'insertions'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, }, args: { lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo: '2022-01-01' }, sequenceType: 'nucleotide', views: ['grid', 'table', 'insertions'], width: '100%', height: '700px', headline: 'Mutations', pageSize: 10, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1602
+ "default": "{ title: 'Visualization/Mutations', component: 'gs-mutations', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'grid', 'insertions'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, pageSize: { control: 'object' }, }, args: { lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo: '2022-01-01' }, sequenceType: 'nucleotide', views: ['grid', 'table', 'insertions'], width: '100%', height: '700px', pageSize: 10, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
1641
1603
  },
1642
1604
  {
1643
1605
  "kind": "variable",
@@ -1758,16 +1720,6 @@
1758
1720
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1759
1721
  "attribute": "height"
1760
1722
  },
1761
- {
1762
- "kind": "field",
1763
- "name": "headline",
1764
- "type": {
1765
- "text": "string"
1766
- },
1767
- "default": "'Mutations'",
1768
- "description": "The headline of the component. Set to an empty string to hide the headline.",
1769
- "attribute": "headline"
1770
- },
1771
1723
  {
1772
1724
  "kind": "field",
1773
1725
  "name": "pageSize",
@@ -1825,15 +1777,6 @@
1825
1777
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1826
1778
  "fieldName": "height"
1827
1779
  },
1828
- {
1829
- "name": "headline",
1830
- "type": {
1831
- "text": "string"
1832
- },
1833
- "default": "'Mutations'",
1834
- "description": "The headline of the component. Set to an empty string to hide the headline.",
1835
- "fieldName": "headline"
1836
- },
1837
1780
  {
1838
1781
  "name": "pageSize",
1839
1782
  "type": {
@@ -1981,7 +1924,7 @@
1981
1924
  "declarations": [
1982
1925
  {
1983
1926
  "kind": "class",
1984
- "description": "TODO(#330) write docs",
1927
+ "description": "## Context\n\nThis component displays the number of sequences over time of one or more datasets,\nselected by LAPIS filters.\n\nIn the chart views, the user can select the y-axis scale (linear, logistic).\nThe x-axis shows all available time intervals available in the datasets in the selected `granularity`.\nThus, the `lapisFilter` implicitly also defines the range that is shown on the x-axis.\nIf you want to restrict the x-axis to a smaller date range,\nthen you need to set appropriate filter values in the `lapisFilter`.",
1985
1928
  "name": "NumberSequencesOverTimeComponent",
1986
1929
  "members": [
1987
1930
  {
@@ -1991,7 +1934,7 @@
1991
1934
  "text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }\n | {\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
1992
1935
  },
1993
1936
  "default": "{ displayName: '', lapisFilter: {} }",
1994
- "description": "Required.\nEither a LAPIS filter or an array of LAPIS filters to calculate the prevalence for.\n\nThe `lapisFilter` will be sent as is to LAPIS to select the data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used as the label the prevalence in the views.\nIt should be human-readable.",
1937
+ "description": "Required.\n\nEither a LAPIS filter or an array of LAPIS filters to fetch the number of sequences for.\n\nThe `lapisFilter` will be sent as is to LAPIS to select the data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used to label the component views.\nIt should be human-readable.",
1995
1938
  "attribute": "lapisFilter"
1996
1939
  },
1997
1940
  {
@@ -2014,16 +1957,6 @@
2014
1957
  "description": "A list of tabs with views that this component should provide.",
2015
1958
  "attribute": "views"
2016
1959
  },
2017
- {
2018
- "kind": "field",
2019
- "name": "headline",
2020
- "type": {
2021
- "text": "string"
2022
- },
2023
- "default": "'Number of sequences of time'",
2024
- "description": "The headline of the component. Set to an empty string to hide the headline.",
2025
- "attribute": "headline"
2026
- },
2027
1960
  {
2028
1961
  "kind": "field",
2029
1962
  "name": "width",
@@ -2082,7 +2015,7 @@
2082
2015
  "text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }\n | {\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
2083
2016
  },
2084
2017
  "default": "{ displayName: '', lapisFilter: {} }",
2085
- "description": "Required.\nEither a LAPIS filter or an array of LAPIS filters to calculate the prevalence for.\n\nThe `lapisFilter` will be sent as is to LAPIS to select the data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used as the label the prevalence in the views.\nIt should be human-readable.",
2018
+ "description": "Required.\n\nEither a LAPIS filter or an array of LAPIS filters to fetch the number of sequences for.\n\nThe `lapisFilter` will be sent as is to LAPIS to select the data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used to label the component views.\nIt should be human-readable.",
2086
2019
  "fieldName": "lapisFilter"
2087
2020
  },
2088
2021
  {
@@ -2103,15 +2036,6 @@
2103
2036
  "description": "A list of tabs with views that this component should provide.",
2104
2037
  "fieldName": "views"
2105
2038
  },
2106
- {
2107
- "name": "headline",
2108
- "type": {
2109
- "text": "string"
2110
- },
2111
- "default": "'Number of sequences of time'",
2112
- "description": "The headline of the component. Set to an empty string to hide the headline.",
2113
- "fieldName": "headline"
2114
- },
2115
2039
  {
2116
2040
  "name": "width",
2117
2041
  "type": {
@@ -2195,7 +2119,7 @@
2195
2119
  "type": {
2196
2120
  "text": "Meta<Required<PrevalenceOverTimeComponentProps>>"
2197
2121
  },
2198
- "default": "{ title: 'Visualization/Prevalence over time', component: 'gs-prevalence-over-time', argTypes: { numeratorFilter: { control: 'object' }, denominatorFilter: { control: 'object' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, smoothingWindow: { control: 'number' }, views: { options: ['bar', 'line', 'bubble', 'table'], control: { type: 'check' }, }, confidenceIntervalMethods: { options: ['wilson'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, yAxisMaxLinear: { control: 'object' }, yAxisMaxLogarithmic: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2122
+ "default": "{ title: 'Visualization/Prevalence over time', component: 'gs-prevalence-over-time', argTypes: { numeratorFilter: { control: 'object' }, denominatorFilter: { control: 'object' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, smoothingWindow: { control: 'number' }, views: { options: ['bar', 'line', 'bubble', 'table'], control: { type: 'check' }, }, confidenceIntervalMethods: { options: ['wilson'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, pageSize: { control: 'object' }, yAxisMaxLinear: { control: 'object' }, yAxisMaxLogarithmic: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2199
2123
  },
2200
2124
  {
2201
2125
  "kind": "variable",
@@ -2203,7 +2127,7 @@
2203
2127
  "type": {
2204
2128
  "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
2205
2129
  },
2206
- "default": "{ ...Template, args: { numeratorFilter: [ { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01' } }, { displayName: 'JN.1', lapisFilter: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' } }, ], denominatorFilter: { country: 'USA', dateFrom: '2023-01-01' }, granularity: 'month', smoothingWindow: 0, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', headline: 'Prevalence over time', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterEG, }, }, { matcher: { name: 'numeratorJN1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterJN1, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilter, }, }, ], }, }, }"
2130
+ "default": "{ ...Template, args: { numeratorFilter: [ { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01' } }, { displayName: 'JN.1', lapisFilter: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' } }, ], denominatorFilter: { country: 'USA', dateFrom: '2023-01-01' }, granularity: 'month', smoothingWindow: 0, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterEG, }, }, { matcher: { name: 'numeratorJN1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterJN1, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilter, }, }, ], }, }, }"
2207
2131
  },
2208
2132
  {
2209
2133
  "kind": "variable",
@@ -2211,7 +2135,7 @@
2211
2135
  "type": {
2212
2136
  "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
2213
2137
  },
2214
- "default": "{ ...Template, args: { numeratorFilter: { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01' }, }, denominatorFilter: { country: 'USA', dateFrom: '2023-10-01' }, granularity: 'week', smoothingWindow: 2, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', headline: 'Prevalence over time', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorOneDataset', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterOneDataset, }, }, { matcher: { name: 'denominatorOneDataset', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilterOneDataset, }, }, ], }, }, }"
2138
+ "default": "{ ...Template, args: { numeratorFilter: { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01' }, }, denominatorFilter: { country: 'USA', dateFrom: '2023-10-01' }, granularity: 'week', smoothingWindow: 2, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorOneDataset', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterOneDataset, }, }, { matcher: { name: 'denominatorOneDataset', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilterOneDataset, }, }, ], }, }, }"
2215
2139
  },
2216
2140
  {
2217
2141
  "kind": "variable",
@@ -2358,16 +2282,6 @@
2358
2282
  "description": "A list of methods to calculate the confidence interval.\nThe option `none` is always available and disables confidence intervals.\nPass an empty array to disable the confidence interval selector.",
2359
2283
  "attribute": "confidenceIntervalMethods"
2360
2284
  },
2361
- {
2362
- "kind": "field",
2363
- "name": "headline",
2364
- "type": {
2365
- "text": "string"
2366
- },
2367
- "default": "'Prevalence over time'",
2368
- "description": "The headline of the component. Set to an empty string to hide the headline.",
2369
- "attribute": "headline"
2370
- },
2371
2285
  {
2372
2286
  "kind": "field",
2373
2287
  "name": "width",
@@ -2484,15 +2398,6 @@
2484
2398
  "description": "A list of methods to calculate the confidence interval.\nThe option `none` is always available and disables confidence intervals.\nPass an empty array to disable the confidence interval selector.",
2485
2399
  "fieldName": "confidenceIntervalMethods"
2486
2400
  },
2487
- {
2488
- "name": "headline",
2489
- "type": {
2490
- "text": "string"
2491
- },
2492
- "default": "'Prevalence over time'",
2493
- "description": "The headline of the component. Set to an empty string to hide the headline.",
2494
- "fieldName": "headline"
2495
- },
2496
2401
  {
2497
2402
  "name": "width",
2498
2403
  "type": {
@@ -2585,7 +2490,7 @@
2585
2490
  "type": {
2586
2491
  "text": "Meta<RelativeGrowthAdvantageComponentProps>"
2587
2492
  },
2588
- "default": "{ title: 'Visualization/Relative growth advantage', component: 'gs-relative-growth-advantage', argTypes: { numeratorFilter: { control: 'object' }, denominatorFilter: { control: 'object' }, generationTime: { control: 'number' }, views: { options: ['line'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, yAxisMaxLinear: { control: 'object' }, yAxisMaxLogarithmic: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2493
+ "default": "{ title: 'Visualization/Relative growth advantage', component: 'gs-relative-growth-advantage', argTypes: { numeratorFilter: { control: 'object' }, denominatorFilter: { control: 'object' }, generationTime: { control: 'number' }, views: { options: ['line'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, yAxisMaxLinear: { control: 'object' }, yAxisMaxLogarithmic: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2589
2494
  },
2590
2495
  {
2591
2496
  "kind": "variable",
@@ -2593,7 +2498,7 @@
2593
2498
  "type": {
2594
2499
  "text": "StoryObj<Required<RelativeGrowthAdvantageComponentProps>>"
2595
2500
  },
2596
- "default": "{ ...Template, args: { numeratorFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01', }, denominatorFilter: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01' }, generationTime: 7, views: ['line'], width: '100%', height: '700px', headline: 'Relative growth advantage', lapisDateField: 'date', yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorFilter', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilter, }, }, { matcher: { name: 'denominatorFilter', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilter, }, }, ], }, }, }"
2501
+ "default": "{ ...Template, args: { numeratorFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01', }, denominatorFilter: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01' }, generationTime: 7, views: ['line'], width: '100%', height: '700px', lapisDateField: 'date', yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorFilter', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilter, }, }, { matcher: { name: 'denominatorFilter', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilter, }, }, ], }, }, }"
2597
2502
  }
2598
2503
  ],
2599
2504
  "exports": [
@@ -2664,16 +2569,6 @@
2664
2569
  "description": "A list of tabs with views that this component should provide.",
2665
2570
  "attribute": "views"
2666
2571
  },
2667
- {
2668
- "kind": "field",
2669
- "name": "headline",
2670
- "type": {
2671
- "text": "string"
2672
- },
2673
- "default": "'Relative growth advantage'",
2674
- "description": "The headline of the component. Set to an empty string to hide the headline.",
2675
- "attribute": "headline"
2676
- },
2677
2572
  {
2678
2573
  "kind": "field",
2679
2574
  "name": "width",
@@ -2762,15 +2657,6 @@
2762
2657
  "description": "A list of tabs with views that this component should provide.",
2763
2658
  "fieldName": "views"
2764
2659
  },
2765
- {
2766
- "name": "headline",
2767
- "type": {
2768
- "text": "string"
2769
- },
2770
- "default": "'Relative growth advantage'",
2771
- "description": "The headline of the component. Set to an empty string to hide the headline.",
2772
- "fieldName": "headline"
2773
- },
2774
2660
  {
2775
2661
  "name": "width",
2776
2662
  "type": {