@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.
Files changed (86) hide show
  1. package/custom-elements.json +255 -57
  2. package/dist/components.d.ts +49 -32
  3. package/dist/components.js +361 -212
  4. package/dist/components.js.map +1 -1
  5. package/dist/style.css +9 -0
  6. package/dist/util.d.ts +43 -43
  7. package/package.json +1 -1
  8. package/src/preact/ReferenceGenomeContext.ts +16 -1
  9. package/src/preact/aggregatedData/aggregate-bar-chart.tsx +26 -5
  10. package/src/preact/aggregatedData/aggregate.stories.tsx +0 -1
  11. package/src/preact/aggregatedData/aggregate.tsx +5 -1
  12. package/src/preact/components/ReferenceGenomesAwaiter.tsx +1 -6
  13. package/src/preact/components/info.tsx +1 -0
  14. package/src/preact/components/resize-container.tsx +1 -1
  15. package/src/preact/mutationComparison/mutation-comparison-venn.tsx +4 -2
  16. package/src/preact/mutationComparison/mutation-comparison.stories.tsx +0 -1
  17. package/src/preact/mutationComparison/mutation-comparison.tsx +5 -1
  18. package/src/preact/mutationFilter/mutation-filter.stories.tsx +17 -1
  19. package/src/preact/mutationFilter/mutation-filter.tsx +8 -0
  20. package/src/preact/mutations/mutations.stories.tsx +0 -1
  21. package/src/preact/mutations/mutations.tsx +1 -1
  22. package/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts +70 -14
  23. package/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +30 -7
  24. package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +56 -55
  25. package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +26 -39
  26. package/src/preact/mutationsOverTime/mutations-over-time.tsx +22 -7
  27. package/src/preact/numberSequencesOverTime/number-sequences-over-time-bar-chart.tsx +8 -3
  28. package/src/preact/numberSequencesOverTime/number-sequences-over-time-line-chart.tsx +8 -3
  29. package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +3 -1
  30. package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +18 -3
  31. package/src/preact/prevalenceOverTime/prevalence-over-time-bar-chart.tsx +48 -35
  32. package/src/preact/prevalenceOverTime/prevalence-over-time-bubble-chart.tsx +83 -70
  33. package/src/preact/prevalenceOverTime/prevalence-over-time-line-chart.tsx +48 -37
  34. package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +0 -3
  35. package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +6 -1
  36. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage-chart.tsx +31 -23
  37. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +0 -1
  38. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +5 -1
  39. package/src/preact/sequencesByLocation/__mockData__/worldAtlas.json +1 -0
  40. package/src/preact/{map → sequencesByLocation}/sequences-by-location-map.tsx +6 -3
  41. package/src/preact/{map → sequencesByLocation}/sequences-by-location-table.tsx +1 -1
  42. package/src/preact/{map → sequencesByLocation}/sequences-by-location.stories.tsx +58 -1
  43. package/src/preact/{map → sequencesByLocation}/sequences-by-location.tsx +10 -1
  44. package/src/preact/shared/aspectRatio/AspectRatio.tsx +13 -0
  45. package/src/preact/shared/charts/getMaintainAspectRatio.ts +3 -0
  46. package/src/preact/statistic/statistics.stories.tsx +0 -1
  47. package/src/preact/statistic/statistics.tsx +4 -4
  48. package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +0 -1
  49. package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +1 -1
  50. package/src/query/computeMapLocationData.spec.ts +1 -1
  51. package/src/query/computeMapLocationData.ts +1 -1
  52. package/src/query/querySequencesByLocationData.ts +1 -1
  53. package/src/utilEntrypoint.ts +1 -1
  54. package/src/web-components/PreactLitAdapter.tsx +2 -5
  55. package/src/web-components/ResizeContainer.mdx +4 -1
  56. package/src/web-components/gs-app.ts +2 -4
  57. package/src/web-components/visualization/gs-aggregate.stories.ts +13 -6
  58. package/src/web-components/visualization/gs-aggregate.tsx +1 -1
  59. package/src/web-components/visualization/gs-mutation-comparison.stories.ts +8 -1
  60. package/src/web-components/visualization/gs-mutation-comparison.tsx +1 -1
  61. package/src/web-components/visualization/gs-mutations-over-time.stories.ts +24 -1
  62. package/src/web-components/visualization/gs-mutations-over-time.tsx +30 -1
  63. package/src/web-components/visualization/gs-mutations.stories.ts +8 -1
  64. package/src/web-components/visualization/gs-mutations.tsx +1 -1
  65. package/src/web-components/visualization/gs-number-sequences-over-time.stories.ts +11 -1
  66. package/src/web-components/visualization/gs-number-sequences-over-time.tsx +1 -1
  67. package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +8 -2
  68. package/src/web-components/visualization/gs-prevalence-over-time.tsx +1 -1
  69. package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +8 -1
  70. package/src/web-components/visualization/gs-relative-growth-advantage.tsx +1 -1
  71. package/src/web-components/visualization/gs-sequences-by-location.stories.ts +13 -7
  72. package/src/web-components/visualization/gs-sequences-by-location.tsx +6 -3
  73. package/src/web-components/visualization/gs-statistics.stories.ts +0 -1
  74. package/src/web-components/visualization/gs-statistics.tsx +1 -1
  75. package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +9 -1
  76. package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +1 -1
  77. package/standalone-bundle/dashboard-components.js +5817 -5706
  78. package/standalone-bundle/dashboard-components.js.map +1 -1
  79. package/standalone-bundle/style.css +1 -1
  80. package/src/preact/map/__mockData__/worldAtlas.json +0 -497127
  81. /package/src/preact/{map → sequencesByLocation}/__mockData__/aggregatedGermany.json +0 -0
  82. /package/src/preact/{map → sequencesByLocation}/__mockData__/aggregatedWorld.json +0 -0
  83. /package/src/preact/{map → sequencesByLocation}/__mockData__/germanyMap.json +0 -0
  84. /package/src/preact/{map → sequencesByLocation}/__mockData__/howToGenerateWorldMap.md +0 -0
  85. /package/src/preact/{map → sequencesByLocation}/leafletStyleModifications.css +0 -0
  86. /package/src/preact/{map → sequencesByLocation}/loadMapSource.tsx +0 -0
@@ -1464,11 +1464,19 @@
1464
1464
  },
1465
1465
  {
1466
1466
  "kind": "variable",
1467
- "name": "Table",
1467
+ "name": "Default",
1468
+ "type": {
1469
+ "text": "StoryObj<Required<AggregateProps>>"
1470
+ },
1471
+ "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-aggregate .fields=${args.fields} .lapisFilter=${args.lapisFilter} .views=${args.views} .width=${args.width} .height=${args.height} .initialSortField=${args.initialSortField} .initialSortDirection=${args.initialSortDirection} .pageSize=${args.pageSize} .maxNumberOfBars=${args.maxNumberOfBars} ></gs-aggregate> </gs-app> `, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'host'], country: 'USA', }, }, response: { status: 200, body: aggregatedData, }, }, ], }, }, args: { fields: ['division', 'host'], views: ['table', 'bar'], lapisFilter: { country: 'USA', }, width: '100%', initialSortField: 'count', initialSortDirection: 'descending', pageSize: 10, maxNumberOfBars: 10, }, }"
1472
+ },
1473
+ {
1474
+ "kind": "variable",
1475
+ "name": "WithFixedHeight",
1468
1476
  "type": {
1469
1477
  "text": "StoryObj<Required<AggregateProps>>"
1470
1478
  },
1471
- "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-aggregate .fields=${args.fields} .lapisFilter=${args.lapisFilter} .views=${args.views} .width=${args.width} .height=${args.height} .initialSortField=${args.initialSortField} .initialSortDirection=${args.initialSortDirection} .pageSize=${args.pageSize} .maxNumberOfBars=${args.maxNumberOfBars} ></gs-aggregate> </gs-app> `, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'host'], country: 'USA', }, }, response: { status: 200, body: aggregatedData, }, }, ], }, }, args: { fields: ['division', 'host'], views: ['table', 'bar'], lapisFilter: { country: 'USA', }, width: '100%', height: '700px', initialSortField: 'count', initialSortDirection: 'descending', pageSize: 10, maxNumberOfBars: 10, }, }"
1479
+ "default": "{ ...Default, args: { ...Default.args, height: '700px', }, }"
1472
1480
  },
1473
1481
  {
1474
1482
  "kind": "variable",
@@ -1476,7 +1484,7 @@
1476
1484
  "type": {
1477
1485
  "text": "StoryObj<Required<AggregateProps>>"
1478
1486
  },
1479
- "default": "{ ...Table, args: { ...Table.args, fields: ['division'], views: ['bar', 'table'], }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division'], country: 'USA', }, }, response: { status: 200, body: aggregatedDataWith1Field, }, }, ], }, }, }"
1487
+ "default": "{ ...Default, args: { ...Default.args, fields: ['division'], views: ['bar', 'table'], }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division'], country: 'USA', }, }, response: { status: 200, body: aggregatedDataWith1Field, }, }, ], }, }, }"
1480
1488
  },
1481
1489
  {
1482
1490
  "kind": "variable",
@@ -1484,7 +1492,7 @@
1484
1492
  "type": {
1485
1493
  "text": "StoryObj<Required<AggregateProps>>"
1486
1494
  },
1487
- "default": "{ ...Table, args: { ...Table.args, fields: ['division', 'nextstrainClade'], lapisFilter: { country: 'Germany', dateTo: '2022-02-01', }, views: ['bar', 'table'], }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'nextstrainClade'], country: 'Germany', dateTo: '2022-02-01', }, }, response: { status: 200, body: aggregatedDataWith2Fields, }, }, ], }, }, }"
1495
+ "default": "{ ...Default, args: { ...Default.args, fields: ['division', 'nextstrainClade'], lapisFilter: { country: 'Germany', dateTo: '2022-02-01', }, views: ['bar', 'table'], }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'nextstrainClade'], country: 'Germany', dateTo: '2022-02-01', }, }, response: { status: 200, body: aggregatedDataWith2Fields, }, }, ], }, }, }"
1488
1496
  }
1489
1497
  ],
1490
1498
  "exports": [
@@ -1498,9 +1506,17 @@
1498
1506
  },
1499
1507
  {
1500
1508
  "kind": "js",
1501
- "name": "Table",
1509
+ "name": "Default",
1510
+ "declaration": {
1511
+ "name": "Default",
1512
+ "module": "src/web-components/visualization/gs-aggregate.stories.ts"
1513
+ }
1514
+ },
1515
+ {
1516
+ "kind": "js",
1517
+ "name": "WithFixedHeight",
1502
1518
  "declaration": {
1503
- "name": "Table",
1519
+ "name": "WithFixedHeight",
1504
1520
  "module": "src/web-components/visualization/gs-aggregate.stories.ts"
1505
1521
  }
1506
1522
  },
@@ -1575,9 +1591,9 @@
1575
1591
  "kind": "field",
1576
1592
  "name": "height",
1577
1593
  "type": {
1578
- "text": "string"
1594
+ "text": "string | undefined"
1579
1595
  },
1580
- "default": "'700px'",
1596
+ "default": "undefined",
1581
1597
  "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
1598
  "attribute": "height"
1583
1599
  },
@@ -1662,9 +1678,9 @@
1662
1678
  {
1663
1679
  "name": "height",
1664
1680
  "type": {
1665
- "text": "string"
1681
+ "text": "string | undefined"
1666
1682
  },
1667
- "default": "'700px'",
1683
+ "default": "undefined",
1668
1684
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1669
1685
  "fieldName": "height"
1670
1686
  },
@@ -1750,7 +1766,7 @@
1750
1766
  "type": {
1751
1767
  "text": "StoryObj<Required<MutationComparisonProps>>"
1752
1768
  },
1753
- "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)); }); }, }"
1769
+ "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%', 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)); }); }, }"
1754
1770
  },
1755
1771
  {
1756
1772
  "kind": "variable",
@@ -1759,6 +1775,14 @@
1759
1775
  "text": "StoryObj<Required<MutationComparisonProps>>"
1760
1776
  },
1761
1777
  "default": "{ ...Default, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-comparison'); await step('Switch to Venn diagram view', async () => { await waitFor(() => expect(canvas.getByRole('button', { name: 'Venn' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Venn' })); await waitFor(() => expect( canvas.getByText('You have no elements selected. Click in the venn diagram to select.'), ).toBeVisible(), ); }); }, }"
1778
+ },
1779
+ {
1780
+ "kind": "variable",
1781
+ "name": "WithFixedHeight",
1782
+ "type": {
1783
+ "text": "StoryObj<Required<MutationComparisonProps>>"
1784
+ },
1785
+ "default": "{ ...Default, args: { ...Default.args, height: '700px', }, }"
1762
1786
  }
1763
1787
  ],
1764
1788
  "exports": [
@@ -1785,6 +1809,14 @@
1785
1809
  "name": "VennDiagram",
1786
1810
  "module": "src/web-components/visualization/gs-mutation-comparison.stories.ts"
1787
1811
  }
1812
+ },
1813
+ {
1814
+ "kind": "js",
1815
+ "name": "WithFixedHeight",
1816
+ "declaration": {
1817
+ "name": "WithFixedHeight",
1818
+ "module": "src/web-components/visualization/gs-mutation-comparison.stories.ts"
1819
+ }
1788
1820
  }
1789
1821
  ]
1790
1822
  },
@@ -1841,9 +1873,9 @@
1841
1873
  "kind": "field",
1842
1874
  "name": "height",
1843
1875
  "type": {
1844
- "text": "string"
1876
+ "text": "string | undefined"
1845
1877
  },
1846
- "default": "'700px'",
1878
+ "default": "undefined",
1847
1879
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1848
1880
  "attribute": "height"
1849
1881
  },
@@ -1898,9 +1930,9 @@
1898
1930
  {
1899
1931
  "name": "height",
1900
1932
  "type": {
1901
- "text": "string"
1933
+ "text": "string | undefined"
1902
1934
  },
1903
- "default": "'700px'",
1935
+ "default": "undefined",
1904
1936
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1905
1937
  "fieldName": "height"
1906
1938
  },
@@ -1951,7 +1983,7 @@
1951
1983
  "type": {
1952
1984
  "text": "Meta<Required<MutationsOverTimeProps>>"
1953
1985
  },
1954
- "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' }, }, args: { lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-07-10' }, sequenceType: 'nucleotide', views: ['grid'], width: '100%', height: '700px', granularity: 'month', lapisDateField: 'date', }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
1986
+ "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' }, }, 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 }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
1955
1987
  },
1956
1988
  {
1957
1989
  "kind": "variable",
@@ -1961,6 +1993,14 @@
1961
1993
  },
1962
1994
  "default": "{ ...Template, }"
1963
1995
  },
1996
+ {
1997
+ "kind": "variable",
1998
+ "name": "ByMonthWithFilterOnDisplayedMutations",
1999
+ "type": {
2000
+ "text": "StoryObj<Required<MutationsOverTimeProps>>"
2001
+ },
2002
+ "default": "{ ...Template, args: { ...Template.args, displayMutations: ['A19722G', 'G21641T', 'T21653-'], }, }"
2003
+ },
1964
2004
  {
1965
2005
  "kind": "variable",
1966
2006
  "name": "ByWeek",
@@ -1984,6 +2024,14 @@
1984
2024
  "text": "StoryObj<Required<MutationsOverTimeProps>>"
1985
2025
  },
1986
2026
  "default": "{ ...ByMonth, args: { ...ByMonth.args, width: '300px', }, }"
2027
+ },
2028
+ {
2029
+ "kind": "variable",
2030
+ "name": "WithFixedHeight",
2031
+ "type": {
2032
+ "text": "StoryObj<Required<MutationsOverTimeProps>>"
2033
+ },
2034
+ "default": "{ ...Template, args: { ...Template, height: '700px', }, }"
1987
2035
  }
1988
2036
  ],
1989
2037
  "exports": [
@@ -2003,6 +2051,14 @@
2003
2051
  "module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
2004
2052
  }
2005
2053
  },
2054
+ {
2055
+ "kind": "js",
2056
+ "name": "ByMonthWithFilterOnDisplayedMutations",
2057
+ "declaration": {
2058
+ "name": "ByMonthWithFilterOnDisplayedMutations",
2059
+ "module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
2060
+ }
2061
+ },
2006
2062
  {
2007
2063
  "kind": "js",
2008
2064
  "name": "ByWeek",
@@ -2026,6 +2082,14 @@
2026
2082
  "name": "HideProportionOnSmallScreen",
2027
2083
  "module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
2028
2084
  }
2085
+ },
2086
+ {
2087
+ "kind": "js",
2088
+ "name": "WithFixedHeight",
2089
+ "declaration": {
2090
+ "name": "WithFixedHeight",
2091
+ "module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
2092
+ }
2029
2093
  }
2030
2094
  ]
2031
2095
  },
@@ -2035,7 +2099,7 @@
2035
2099
  "declarations": [
2036
2100
  {
2037
2101
  "kind": "class",
2038
- "description": "## Context\n\nThis component displays mutations (substitutions and deletions) over time for a dataset selected by a LAPIS filter.\nThe shown date range is determined by the date field in the LAPIS filter.\nIf the date field is not set, the date range is determined by all available dates in the dataset.\n\n## Views\n\n### Grid View\n\nThe grid view shows the proportion for each mutation over date ranges.\n\nThe grid limits the number of rows and columns for browser performance reasons as\ntoo much data might make the browser unresponsive.\n\nThe number of columns is limited to 200.\nIf this number are exceeded, an error message will be shown.\nIt is your responsibility to make sure that this does not happen.\nDepending on the selected date range in the `lapisFilter`, you can adapt the granularity accordingly\n(e.g. use months instead of days).\n\nThe number of rows is limited to 100.\nIf there are more, the component will only show 100 mutations and notify the user.",
2102
+ "description": "## Context\n\nThis component displays mutations (substitutions and deletions) over time for a dataset selected by a LAPIS filter.\nThe shown date range is determined by the date field in the LAPIS filter.\nIf the date field is not set, the date range is determined by all available dates in the dataset.\n\n## Views\n\n### Grid View\n\nThe grid view shows the proportion for each mutation over date ranges.\n\nThe grid limits the number of rows and columns for browser performance reasons as\ntoo much data might make the browser unresponsive.\n\nThe number of columns is limited to 200.\nIf this number are exceeded, an error message will be shown.\nIt is your responsibility to make sure that this does not happen.\nDepending on the selected date range in the `lapisFilter`, you can adapt the granularity accordingly\n(e.g. use months instead of days).\n\nThe number of rows is limited to 100.\nIf there are more, the component will only show 100 mutations and notify the user.\n\nUsers can filter the displayed rows by mean proportion via a slider in the toolbar.\nThe mean proportion of each row is calculated by LAPIS over the whole data range that the component displays.\nThe initial mean proportion can be set via `initialMeanProportionInterval`.",
2039
2103
  "name": "MutationsOverTimeComponent",
2040
2104
  "members": [
2041
2105
  {
@@ -2082,9 +2146,9 @@
2082
2146
  "kind": "field",
2083
2147
  "name": "height",
2084
2148
  "type": {
2085
- "text": "string"
2149
+ "text": "string | undefined"
2086
2150
  },
2087
- "default": "'700px'",
2151
+ "default": "undefined",
2088
2152
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2089
2153
  "attribute": "height"
2090
2154
  },
@@ -2107,6 +2171,26 @@
2107
2171
  "default": "'date'",
2108
2172
  "description": "Required.\n\nThe LAPIS field that the data should be aggregated by.\nThe values will be used for the columns of the grid.\nMust be a field of type `date` in LAPIS.",
2109
2173
  "attribute": "lapisDateField"
2174
+ },
2175
+ {
2176
+ "kind": "field",
2177
+ "name": "displayMutations",
2178
+ "type": {
2179
+ "text": "string[] | undefined"
2180
+ },
2181
+ "default": "undefined",
2182
+ "description": "If provided, only the given mutations will be displayed.\nThe mutations must be provided in the exact format as they would be displayed by the component.",
2183
+ "attribute": "displayMutations"
2184
+ },
2185
+ {
2186
+ "kind": "field",
2187
+ "name": "initialMeanProportionInterval",
2188
+ "type": {
2189
+ "text": "{ min: number; max: number }"
2190
+ },
2191
+ "default": "{ min: 0.05, max: 0.9 }",
2192
+ "description": "The initial proportion interval for the grid view.\nThe values must be between 0 and 1, inclusive.",
2193
+ "attribute": "initialMeanProportionInterval"
2110
2194
  }
2111
2195
  ],
2112
2196
  "attributes": [
@@ -2149,9 +2233,9 @@
2149
2233
  {
2150
2234
  "name": "height",
2151
2235
  "type": {
2152
- "text": "string"
2236
+ "text": "string | undefined"
2153
2237
  },
2154
- "default": "'700px'",
2238
+ "default": "undefined",
2155
2239
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2156
2240
  "fieldName": "height"
2157
2241
  },
@@ -2172,6 +2256,24 @@
2172
2256
  "default": "'date'",
2173
2257
  "description": "Required.\n\nThe LAPIS field that the data should be aggregated by.\nThe values will be used for the columns of the grid.\nMust be a field of type `date` in LAPIS.",
2174
2258
  "fieldName": "lapisDateField"
2259
+ },
2260
+ {
2261
+ "name": "displayMutations",
2262
+ "type": {
2263
+ "text": "string[] | undefined"
2264
+ },
2265
+ "default": "undefined",
2266
+ "description": "If provided, only the given mutations will be displayed.\nThe mutations must be provided in the exact format as they would be displayed by the component.",
2267
+ "fieldName": "displayMutations"
2268
+ },
2269
+ {
2270
+ "name": "initialMeanProportionInterval",
2271
+ "type": {
2272
+ "text": "{ min: number; max: number }"
2273
+ },
2274
+ "default": "{ min: 0.05, max: 0.9 }",
2275
+ "description": "The initial proportion interval for the grid view.\nThe values must be between 0 and 1, inclusive.",
2276
+ "fieldName": "initialMeanProportionInterval"
2175
2277
  }
2176
2278
  ],
2177
2279
  "superclass": {
@@ -2211,7 +2313,7 @@
2211
2313
  "type": {
2212
2314
  "text": "Meta<Required<MutationsProps>>"
2213
2315
  },
2214
- "default": "{ title: 'Visualization/Mutations', component: 'gs-mutations', argTypes: { lapisFilter: { control: 'object' }, baselineLapisFilter: { 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' }, baselineLapisFilter: { country: 'Switzerland', 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'], }"
2316
+ "default": "{ title: 'Visualization/Mutations', component: 'gs-mutations', argTypes: { lapisFilter: { control: 'object' }, baselineLapisFilter: { 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' }, baselineLapisFilter: { country: 'Switzerland', dateTo: '2022-01-01' }, sequenceType: 'nucleotide', views: ['grid', 'table', 'insertions'], width: '100%', pageSize: 10, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2215
2317
  },
2216
2318
  {
2217
2319
  "kind": "variable",
@@ -2244,6 +2346,14 @@
2244
2346
  "text": "StoryObj<Required<MutationsProps>>"
2245
2347
  },
2246
2348
  "default": "{ ...Default, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutations'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Insertions' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Insertions' })); }, }"
2349
+ },
2350
+ {
2351
+ "kind": "variable",
2352
+ "name": "WithFixedHeight",
2353
+ "type": {
2354
+ "text": "StoryObj<Required<MutationsProps>>"
2355
+ },
2356
+ "default": "{ ...Default, args: { ...Default.args, height: '700px', }, }"
2247
2357
  }
2248
2358
  ],
2249
2359
  "exports": [
@@ -2286,6 +2396,14 @@
2286
2396
  "name": "OnInsertionsTab",
2287
2397
  "module": "src/web-components/visualization/gs-mutations.stories.ts"
2288
2398
  }
2399
+ },
2400
+ {
2401
+ "kind": "js",
2402
+ "name": "WithFixedHeight",
2403
+ "declaration": {
2404
+ "name": "WithFixedHeight",
2405
+ "module": "src/web-components/visualization/gs-mutations.stories.ts"
2406
+ }
2289
2407
  }
2290
2408
  ]
2291
2409
  },
@@ -2352,9 +2470,9 @@
2352
2470
  "kind": "field",
2353
2471
  "name": "height",
2354
2472
  "type": {
2355
- "text": "string"
2473
+ "text": "string | undefined"
2356
2474
  },
2357
- "default": "'700px'",
2475
+ "default": "undefined",
2358
2476
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2359
2477
  "attribute": "height"
2360
2478
  },
@@ -2418,9 +2536,9 @@
2418
2536
  {
2419
2537
  "name": "height",
2420
2538
  "type": {
2421
- "text": "string"
2539
+ "text": "string | undefined"
2422
2540
  },
2423
- "default": "'700px'",
2541
+ "default": "undefined",
2424
2542
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2425
2543
  "fieldName": "height"
2426
2544
  },
@@ -2471,7 +2589,7 @@
2471
2589
  "type": {
2472
2590
  "text": "Meta<NumberSequencesOverTimeProps>"
2473
2591
  },
2474
- "default": "{ title: 'Visualization/Number sequences over time', component: 'gs-number-sequences-over-time', argTypes: { granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, views: { options: ['bar', 'line', 'table'], control: { type: 'check' }, }, pageSize: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2592
+ "default": "{ title: 'Visualization/Number sequences over time', component: 'gs-number-sequences-over-time', argTypes: { granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, views: { options: ['bar', 'line', 'table'], control: { type: 'check' }, }, pageSize: { control: 'object' }, height: { control: 'text', }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2475
2593
  },
2476
2594
  {
2477
2595
  "kind": "variable",
@@ -2512,6 +2630,14 @@
2512
2630
  "text": "StoryObj<NumberSequencesOverTimeProps>"
2513
2631
  },
2514
2632
  "default": "{ ...Template, args: { ...Template.args, lapisFilters: [ { displayName: 'XBB', lapisFilter: { country: 'USA', pangoLineage: 'XBB*', dateFrom: '2022-01-01', dateTo: '2022-12-31' }, }, { displayName: 'JN.1', lapisFilter: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' } }, ], }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'XBB*', dateFrom: '2022-01-01', dateTo: '2022-12-31', fields: ['date'], }, }, response: { status: 200, body: twoVariantsXBB, }, }, { matcher: { name: 'aggregatedJN.1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: twoVariantsJN1, }, }, ], }, }, }"
2633
+ },
2634
+ {
2635
+ "kind": "variable",
2636
+ "name": "WithFixedHeight",
2637
+ "type": {
2638
+ "text": "StoryObj<NumberSequencesOverTimeProps>"
2639
+ },
2640
+ "default": "{ ...Template, args: { ...Template.args, height: '700px', }, }"
2515
2641
  }
2516
2642
  ],
2517
2643
  "exports": [
@@ -2562,6 +2688,14 @@
2562
2688
  "name": "TwoDatasetsWithNonOverlappingDates",
2563
2689
  "module": "src/web-components/visualization/gs-number-sequences-over-time.stories.ts"
2564
2690
  }
2691
+ },
2692
+ {
2693
+ "kind": "js",
2694
+ "name": "WithFixedHeight",
2695
+ "declaration": {
2696
+ "name": "WithFixedHeight",
2697
+ "module": "src/web-components/visualization/gs-number-sequences-over-time.stories.ts"
2698
+ }
2565
2699
  }
2566
2700
  ]
2567
2701
  },
@@ -2618,9 +2752,9 @@
2618
2752
  "kind": "field",
2619
2753
  "name": "height",
2620
2754
  "type": {
2621
- "text": "string"
2755
+ "text": "string | undefined"
2622
2756
  },
2623
- "default": "'700px'",
2757
+ "default": "undefined",
2624
2758
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2625
2759
  "attribute": "height"
2626
2760
  },
@@ -2695,9 +2829,9 @@
2695
2829
  {
2696
2830
  "name": "height",
2697
2831
  "type": {
2698
- "text": "string"
2832
+ "text": "string | undefined"
2699
2833
  },
2700
- "default": "'700px'",
2834
+ "default": "undefined",
2701
2835
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2702
2836
  "fieldName": "height"
2703
2837
  },
@@ -2774,7 +2908,7 @@
2774
2908
  "type": {
2775
2909
  "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2776
2910
  },
2777
- "default": "{ ...Template, args: { numeratorFilters: [ { 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, }, }, ], }, }, }"
2911
+ "default": "{ ...Template, args: { numeratorFilters: [ { 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%', 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, }, }, ], }, }, }"
2778
2912
  },
2779
2913
  {
2780
2914
  "kind": "variable",
@@ -2782,7 +2916,7 @@
2782
2916
  "type": {
2783
2917
  "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2784
2918
  },
2785
- "default": "{ ...Template, args: { numeratorFilters: [ { 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, }, }, ], }, }, }"
2919
+ "default": "{ ...Template, args: { numeratorFilters: [ { 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%', 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, }, }, ], }, }, }"
2786
2920
  },
2787
2921
  {
2788
2922
  "kind": "variable",
@@ -2807,6 +2941,14 @@
2807
2941
  "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2808
2942
  },
2809
2943
  "default": "{ ...OneDataset, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Table' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Table' })); }, }"
2944
+ },
2945
+ {
2946
+ "kind": "variable",
2947
+ "name": "WithFixedHeight",
2948
+ "type": {
2949
+ "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2950
+ },
2951
+ "default": "{ ...TwoDatasets, args: { ...TwoDatasets.args, height: '700px', }, }"
2810
2952
  }
2811
2953
  ],
2812
2954
  "exports": [
@@ -2857,6 +2999,14 @@
2857
2999
  "name": "OneDatasetOnTableTab",
2858
3000
  "module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
2859
3001
  }
3002
+ },
3003
+ {
3004
+ "kind": "js",
3005
+ "name": "WithFixedHeight",
3006
+ "declaration": {
3007
+ "name": "WithFixedHeight",
3008
+ "module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
3009
+ }
2860
3010
  }
2861
3011
  ]
2862
3012
  },
@@ -2943,9 +3093,9 @@
2943
3093
  "kind": "field",
2944
3094
  "name": "height",
2945
3095
  "type": {
2946
- "text": "string"
3096
+ "text": "string | undefined"
2947
3097
  },
2948
- "default": "'700px'",
3098
+ "default": "undefined",
2949
3099
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2950
3100
  "attribute": "height"
2951
3101
  },
@@ -3057,9 +3207,9 @@
3057
3207
  {
3058
3208
  "name": "height",
3059
3209
  "type": {
3060
- "text": "string"
3210
+ "text": "string | undefined"
3061
3211
  },
3062
- "default": "'700px'",
3212
+ "default": "undefined",
3063
3213
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3064
3214
  "fieldName": "height"
3065
3215
  },
@@ -3145,7 +3295,15 @@
3145
3295
  "type": {
3146
3296
  "text": "StoryObj<Required<RelativeGrowthAdvantageProps>>"
3147
3297
  },
3148
- "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, }, }, ], }, }, }"
3298
+ "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%', 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, }, }, ], }, }, }"
3299
+ },
3300
+ {
3301
+ "kind": "variable",
3302
+ "name": "WithFixedHeight",
3303
+ "type": {
3304
+ "text": "StoryObj<Required<RelativeGrowthAdvantageProps>>"
3305
+ },
3306
+ "default": "{ ...Default, args: { ...Default.args, height: '700px', }, }"
3149
3307
  }
3150
3308
  ],
3151
3309
  "exports": [
@@ -3164,6 +3322,14 @@
3164
3322
  "name": "Default",
3165
3323
  "module": "src/web-components/visualization/gs-relative-growth-advantage.stories.ts"
3166
3324
  }
3325
+ },
3326
+ {
3327
+ "kind": "js",
3328
+ "name": "WithFixedHeight",
3329
+ "declaration": {
3330
+ "name": "WithFixedHeight",
3331
+ "module": "src/web-components/visualization/gs-relative-growth-advantage.stories.ts"
3332
+ }
3167
3333
  }
3168
3334
  ]
3169
3335
  },
@@ -3230,9 +3396,9 @@
3230
3396
  "kind": "field",
3231
3397
  "name": "height",
3232
3398
  "type": {
3233
- "text": "string"
3399
+ "text": "string | undefined"
3234
3400
  },
3235
- "default": "'700px'",
3401
+ "default": "undefined",
3236
3402
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3237
3403
  "attribute": "height"
3238
3404
  },
@@ -3316,9 +3482,9 @@
3316
3482
  {
3317
3483
  "name": "height",
3318
3484
  "type": {
3319
- "text": "string"
3485
+ "text": "string | undefined"
3320
3486
  },
3321
- "default": "'700px'",
3487
+ "default": "undefined",
3322
3488
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3323
3489
  "fieldName": "height"
3324
3490
  },
@@ -3419,7 +3585,15 @@
3419
3585
  "type": {
3420
3586
  "text": "StoryObj<SequencesByLocationProps>"
3421
3587
  },
3422
- "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-sequences-by-location .lapisFilter=${args.lapisFilter} .lapisLocationField=${args.lapisLocationField} .width=${args.width} .height=${args.height} .views=${args.views} .pageSize=${args.pageSize} ></gs-sequences-by-location> </gs-app> `, args: { lapisFilter: { dateFrom: '2022-01-01', dateTo: '2022-04-01', country: 'Germany' }, lapisLocationField: 'division', width: '100%', height: '700px', views: ['table'], pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division'], dateFrom: '2022-01-01', dateTo: '2022-04-01', country: 'Germany', }, }, response: { status: 200, body: aggregatedGermany, }, }, ], }, }, }"
3588
+ "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-sequences-by-location .lapisFilter=${args.lapisFilter} .lapisLocationField=${args.lapisLocationField} .width=${args.width} .height=${args.height} .views=${args.views} .pageSize=${args.pageSize} ></gs-sequences-by-location> </gs-app> `, args: { lapisFilter: { dateFrom: '2022-01-01', dateTo: '2022-04-01', country: 'Germany' }, lapisLocationField: 'division', width: '100%', views: ['table'], pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division'], dateFrom: '2022-01-01', dateTo: '2022-04-01', country: 'Germany', }, }, response: { status: 200, body: aggregatedGermany, }, }, ], }, }, }"
3589
+ },
3590
+ {
3591
+ "kind": "variable",
3592
+ "name": "WithFixedHeight",
3593
+ "type": {
3594
+ "text": "StoryObj<SequencesByLocationProps>"
3595
+ },
3596
+ "default": "{ ...WorldMap, args: { ...WorldMap.args, height: '700px', }, }"
3423
3597
  }
3424
3598
  ],
3425
3599
  "exports": [
@@ -3462,6 +3636,14 @@
3462
3636
  "name": "GermanyTableOnly",
3463
3637
  "module": "src/web-components/visualization/gs-sequences-by-location.stories.ts"
3464
3638
  }
3639
+ },
3640
+ {
3641
+ "kind": "js",
3642
+ "name": "WithFixedHeight",
3643
+ "declaration": {
3644
+ "name": "WithFixedHeight",
3645
+ "module": "src/web-components/visualization/gs-sequences-by-location.stories.ts"
3646
+ }
3465
3647
  }
3466
3648
  ]
3467
3649
  },
@@ -3528,9 +3710,9 @@
3528
3710
  "kind": "field",
3529
3711
  "name": "height",
3530
3712
  "type": {
3531
- "text": "string"
3713
+ "text": "string | undefined"
3532
3714
  },
3533
- "default": "'700px'",
3715
+ "default": "undefined",
3534
3716
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3535
3717
  "attribute": "height"
3536
3718
  },
@@ -3634,9 +3816,9 @@
3634
3816
  {
3635
3817
  "name": "height",
3636
3818
  "type": {
3637
- "text": "string"
3819
+ "text": "string | undefined"
3638
3820
  },
3639
- "default": "'700px'",
3821
+ "default": "undefined",
3640
3822
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3641
3823
  "fieldName": "height"
3642
3824
  },
@@ -3731,7 +3913,7 @@
3731
3913
  "type": {
3732
3914
  "text": "StoryObj<Required<StatisticsProps>>"
3733
3915
  },
3734
- "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-statistics .numeratorFilter=${args.numeratorFilter} .denominatorFilter=${args.denominatorFilter} .width=${args.width} .height=${args.height} ></gs-statistics> </gs-app> `, args: { denominatorFilter: { country: 'USA', }, numeratorFilter: { country: 'USA', division: 'Alabama', }, width: '100%', height: '700px', }, }"
3916
+ "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-statistics .numeratorFilter=${args.numeratorFilter} .denominatorFilter=${args.denominatorFilter} .width=${args.width} .height=${args.height} ></gs-statistics> </gs-app> `, args: { denominatorFilter: { country: 'USA', }, numeratorFilter: { country: 'USA', division: 'Alabama', }, width: '100%', }, }"
3735
3917
  }
3736
3918
  ],
3737
3919
  "exports": [
@@ -3796,9 +3978,9 @@
3796
3978
  "kind": "field",
3797
3979
  "name": "height",
3798
3980
  "type": {
3799
- "text": "string"
3981
+ "text": "string | undefined"
3800
3982
  },
3801
- "default": "'100%'",
3983
+ "default": "undefined",
3802
3984
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3803
3985
  "attribute": "height"
3804
3986
  }
@@ -3834,9 +4016,9 @@
3834
4016
  {
3835
4017
  "name": "height",
3836
4018
  "type": {
3837
- "text": "string"
4019
+ "text": "string | undefined"
3838
4020
  },
3839
- "default": "'100%'",
4021
+ "default": "undefined",
3840
4022
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3841
4023
  "fieldName": "height"
3842
4024
  }
@@ -3957,7 +4139,7 @@
3957
4139
  "type": {
3958
4140
  "text": "Meta<WastewaterMutationsOverTimeProps & { infoText: string }>"
3959
4141
  },
3960
- "default": "{ title: 'Wastewater visualization/Wastewater mutations over time', component: 'gs-wastewater-mutations-over-time', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, width: { control: 'text' }, height: { control: 'text' }, }, args: { lapisFilter: { versionStatus: 'LATEST_VERSION', isRevocation: false }, sequenceType: 'nucleotide', width: '100%', height: '700px', infoText: 'Some info text', maxNumberOfGridRows: 100, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
4142
+ "default": "{ title: 'Wastewater visualization/Wastewater mutations over time', component: 'gs-wastewater-mutations-over-time', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, width: { control: 'text' }, height: { control: 'text' }, }, args: { lapisFilter: { versionStatus: 'LATEST_VERSION', isRevocation: false }, sequenceType: 'nucleotide', width: '100%', height: undefined, infoText: 'Some info text', maxNumberOfGridRows: 100, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
3961
4143
  },
3962
4144
  {
3963
4145
  "kind": "variable",
@@ -3966,6 +4148,14 @@
3966
4148
  "text": "StoryObj<WastewaterMutationsOverTimeProps & { infoText: string }>"
3967
4149
  },
3968
4150
  "default": "{ render: (args) => html` <gs-app lapis=\"${WISE_LAPIS_URL}\"> <gs-wastewater-mutations-over-time .lapisFilter=${args.lapisFilter} .sequenceType=${args.sequenceType} .width=${args.width} .height=${args.height} .maxNumberOfGridRows=${args.maxNumberOfGridRows} > <span slot=\"infoText\">${args.infoText}</span> </gs-wastewater-mutations-over-time> </gs-app> `, parameters: { fetchMock: { mocks: [ { matcher: { name: 'details', url: WISE_DETAILS_ENDPOINT, body: { fields: ['date', 'location', 'nucleotideMutationFrequency', 'aminoAcidMutationFrequency'], versionStatus: 'LATEST_VERSION', isRevocation: false, }, }, response: { status: 200, body: details, }, }, ], }, }, }"
4151
+ },
4152
+ {
4153
+ "kind": "variable",
4154
+ "name": "WithFixedHeight",
4155
+ "type": {
4156
+ "text": "StoryObj<WastewaterMutationsOverTimeProps & { infoText: string }>"
4157
+ },
4158
+ "default": "{ ...WastewaterMutationsOverTime, args: { ...WastewaterMutationsOverTime.args, height: '700px', }, }"
3969
4159
  }
3970
4160
  ],
3971
4161
  "exports": [
@@ -3984,6 +4174,14 @@
3984
4174
  "name": "WastewaterMutationsOverTime",
3985
4175
  "module": "src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts"
3986
4176
  }
4177
+ },
4178
+ {
4179
+ "kind": "js",
4180
+ "name": "WithFixedHeight",
4181
+ "declaration": {
4182
+ "name": "WithFixedHeight",
4183
+ "module": "src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts"
4184
+ }
3987
4185
  }
3988
4186
  ]
3989
4187
  },
@@ -4036,9 +4234,9 @@
4036
4234
  "kind": "field",
4037
4235
  "name": "height",
4038
4236
  "type": {
4039
- "text": "string"
4237
+ "text": "string | undefined"
4040
4238
  },
4041
- "default": "'700px'",
4239
+ "default": "undefined",
4042
4240
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
4043
4241
  "attribute": "height"
4044
4242
  },
@@ -4084,9 +4282,9 @@
4084
4282
  {
4085
4283
  "name": "height",
4086
4284
  "type": {
4087
- "text": "string"
4285
+ "text": "string | undefined"
4088
4286
  },
4089
- "default": "'700px'",
4287
+ "default": "undefined",
4090
4288
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
4091
4289
  "fieldName": "height"
4092
4290
  },