@genspectrum/dashboard-components 0.6.13 → 0.6.14

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 (56) hide show
  1. package/README.md +29 -0
  2. package/custom-elements.json +11 -11
  3. package/dist/dashboard-components.js +8213 -37918
  4. package/dist/dashboard-components.js.map +1 -1
  5. package/dist/genspectrum-components.d.ts +7 -7
  6. package/dist/style.css +1 -1
  7. package/package.json +7 -6
  8. package/src/operator/FetchAggregatedOperator.ts +2 -7
  9. package/src/preact/components/info.tsx +1 -1
  10. package/src/preact/components/percent-intput.tsx +7 -2
  11. package/src/preact/components/proportion-selector.tsx +12 -2
  12. package/src/preact/dateRangeSelector/date-range-selector.tsx +4 -4
  13. package/src/preact/lineageFilter/lineage-filter.tsx +2 -2
  14. package/src/preact/locationFilter/location-filter.tsx +2 -2
  15. package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_01.json +13 -0
  16. package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_02.json +13 -0
  17. package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_03.json +13 -0
  18. package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_04.json +13 -0
  19. package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_05.json +13 -0
  20. package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_06.json +13 -0
  21. package/src/preact/mutationsOverTime/__mockData__/aggregated_2024_07.json +13 -0
  22. package/src/preact/mutationsOverTime/__mockData__/aggregated_20_01_2024.json +13 -0
  23. package/src/preact/mutationsOverTime/__mockData__/aggregated_21_01_2024.json +13 -0
  24. package/src/preact/mutationsOverTime/__mockData__/aggregated_22_01_2024.json +13 -0
  25. package/src/preact/mutationsOverTime/__mockData__/aggregated_23_01_2024.json +13 -0
  26. package/src/preact/mutationsOverTime/__mockData__/aggregated_24_01_2024.json +13 -0
  27. package/src/preact/mutationsOverTime/__mockData__/aggregated_25_01_2024.json +13 -0
  28. package/src/preact/mutationsOverTime/__mockData__/aggregated_26_01_2024.json +13 -0
  29. package/src/preact/mutationsOverTime/__mockData__/aggregated_tooManyMutations_total.json +13 -0
  30. package/src/preact/mutationsOverTime/__mockData__/aggregated_week3_2024.json +13 -0
  31. package/src/preact/mutationsOverTime/__mockData__/aggregated_week4_2024.json +13 -0
  32. package/src/preact/mutationsOverTime/__mockData__/aggregated_week5_2024.json +13 -0
  33. package/src/preact/mutationsOverTime/__mockData__/aggregated_week6_2024.json +13 -0
  34. package/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts +56 -8
  35. package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +4 -2
  36. package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +135 -0
  37. package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +2 -2
  38. package/src/preact/textInput/text-input.tsx +2 -2
  39. package/src/query/queryMutationsOverTime.spec.ts +210 -64
  40. package/src/query/queryMutationsOverTime.ts +10 -2
  41. package/src/web-components/input/gs-date-range-selector.tsx +24 -4
  42. package/src/web-components/input/gs-lineage-filter.tsx +15 -1
  43. package/src/web-components/input/gs-location-filter.tsx +13 -1
  44. package/src/web-components/input/gs-mutation-filter.tsx +1 -0
  45. package/src/web-components/input/gs-text-input.tsx +13 -1
  46. package/src/web-components/visualization/gs-aggregate.tsx +17 -1
  47. package/src/web-components/visualization/gs-mutation-comparison.tsx +9 -0
  48. package/src/web-components/visualization/gs-mutations-over-time.stories.ts +271 -0
  49. package/src/web-components/visualization/gs-mutations-over-time.tsx +7 -0
  50. package/src/web-components/visualization/gs-mutations.tsx +11 -5
  51. package/src/web-components/visualization/gs-number-sequences-over-time.tsx +15 -0
  52. package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +8 -9
  53. package/src/web-components/visualization/gs-prevalence-over-time.tsx +26 -8
  54. package/src/web-components/visualization/gs-relative-growth-advantage.tsx +43 -5
  55. package/standalone-bundle/dashboard-components.js +30887 -0
  56. package/standalone-bundle/dashboard-components.js.map +1 -0
package/README.md CHANGED
@@ -19,6 +19,35 @@ To install the package, run:
19
19
  npm i @genspectrum/dashboard-components
20
20
  ```
21
21
 
22
+ Usage with a bundler in HTML:
23
+
24
+ ```html
25
+ <body>
26
+ <script>
27
+ import '@genspectrum/dashboard-components';
28
+ import '@genspectrum/dashboard-components/style.css';
29
+ </script>
30
+ <gs-app lapis="https://your.lapis.url"></gs-app>
31
+ </body>
32
+ ```
33
+
34
+ We also provide a standalone version of the components that can be used without installing the dependencies:
35
+
36
+ ```html
37
+ <html>
38
+ <head>
39
+ <script
40
+ type="module"
41
+ src="https://unpkg.com/@genspectrum/dashboard-components@latest/standalone-bundle/dashboard-components.js"
42
+ ></script>
43
+ <link rel="stylesheet" href="https://unpkg.com/@genspectrum/dashboard-components@latest/dist/style.css" />
44
+ </head>
45
+ <body>
46
+ <gs-app lapis="https://your.lapis.url"></gs-app>
47
+ </body>
48
+ </html>
49
+ ```
50
+
22
51
  ### Core Concepts
23
52
 
24
53
  Internally, the components use [Preact](https://preactjs.com/).
@@ -1795,7 +1795,7 @@
1795
1795
  "type": {
1796
1796
  "text": "StoryObj<Required<MutationsOverTimeProps>>"
1797
1797
  },
1798
- "default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregated_dates', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-01-15', dateTo: '2024-07-10', fields: ['date'], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_date, }, }, { matcher: { name: 'nucleotideMutations_overall', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-07-10', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutations_byMonthOverall, }, }, { matcher: { name: 'nucleotideMutations_01', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-01', dateTo: '2024-01-31', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_01, }, }, { matcher: { name: 'nucleotideMutations_02', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-02-01', dateTo: '2024-02-29', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_02, }, }, { matcher: { name: 'nucleotideMutations_03', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-03-01', dateTo: '2024-03-31', minProportion: 0.001, }, response: { status: 200, body: nucleotideMutation_03, }, }, }, { matcher: { name: 'nucleotideMutations_04', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-04-01', dateTo: '2024-04-30', minProportion: 0.001, }, response: { status: 200, body: nucleotideMutation_04, }, }, }, { matcher: { name: 'nucleotideMutations_05', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-05-01', dateTo: '2024-05-31', minProportion: 0.001, }, response: { status: 200, body: nucleotideMutation_05, }, }, }, { matcher: { name: 'nucleotideMutations_06', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-06-01', dateTo: '2024-06-30', minProportion: 0.001, }, response: { status: 200, body: nucleotideMutation_06, }, }, }, { matcher: { name: 'nucleotideMutations_07', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-07-01', dateTo: '2024-07-31', minProportion: 0.001, }, response: { status: 200, body: nucleotideMutation_07, }, }, }, ], }, }, }"
1798
+ "default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregated_dates', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-01-15', dateTo: '2024-07-10', fields: ['date'], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_date, }, }, { matcher: { name: 'aggregated_01', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-01-01', dateTo: '2024-01-31', fields: [], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_01, }, }, { matcher: { name: 'aggregated_02', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-02-01', dateTo: '2024-02-29', fields: [], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_02, }, }, { matcher: { name: 'aggregated_03', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-03-01', dateTo: '2024-03-31', fields: [], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_03, }, }, { matcher: { name: 'aggregated_04', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-04-01', dateTo: '2024-04-30', fields: [], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_04, }, }, { matcher: { name: 'aggregated_05', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-05-01', dateTo: '2024-05-31', fields: [], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_05, }, }, { matcher: { name: 'aggregated_06', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-06-01', dateTo: '2024-06-30', fields: [], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_06, }, }, { matcher: { name: 'aggregated_07', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-07-01', dateTo: '2024-07-31', fields: [], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_07, }, }, { matcher: { name: 'nucleotideMutations_overall', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-07-10', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutations_byMonthOverall, }, }, { matcher: { name: 'nucleotideMutations_01', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-01', dateTo: '2024-01-31', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_01, }, }, { matcher: { name: 'nucleotideMutations_02', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-02-01', dateTo: '2024-02-29', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_02, }, }, { matcher: { name: 'nucleotideMutations_03', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-03-01', dateTo: '2024-03-31', minProportion: 0.001, }, response: { status: 200, body: nucleotideMutation_03, }, }, }, { matcher: { name: 'nucleotideMutations_04', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-04-01', dateTo: '2024-04-30', minProportion: 0.001, }, response: { status: 200, body: nucleotideMutation_04, }, }, }, { matcher: { name: 'nucleotideMutations_05', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-05-01', dateTo: '2024-05-31', minProportion: 0.001, }, response: { status: 200, body: nucleotideMutation_05, }, }, }, { matcher: { name: 'nucleotideMutations_06', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-06-01', dateTo: '2024-06-30', minProportion: 0.001, }, response: { status: 200, body: nucleotideMutation_06, }, }, }, { matcher: { name: 'nucleotideMutations_07', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-07-01', dateTo: '2024-07-31', minProportion: 0.001, }, response: { status: 200, body: nucleotideMutation_07, }, }, }, ], }, }, }"
1799
1799
  },
1800
1800
  {
1801
1801
  "kind": "variable",
@@ -1803,7 +1803,7 @@
1803
1803
  "type": {
1804
1804
  "text": "StoryObj<Required<MutationsOverTimeProps>>"
1805
1805
  },
1806
- "default": "{ ...Template, args: { ...Template.args, lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-02-11' }, granularity: 'week', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregated_dates', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-01-15', dateTo: '2024-02-11', fields: ['date'], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_byWeek, }, }, { matcher: { name: 'nucleotideMutation_overall', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-02-11', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutations_byWeekOverall, }, }, { matcher: { name: 'nucleotideMutation_week3', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-01-21', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_week3, }, }, { matcher: { name: 'nucleotideMutation_week4', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-22', dateTo: '2024-01-28', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_week4, }, }, { matcher: { name: 'nucleotideMutation_week5', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-29', dateTo: '2024-02-04', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_week5, }, }, { matcher: { name: 'nucleotideMutation_week6', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-02-05', dateTo: '2024-02-11', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_week6, }, }, ], }, }, }"
1806
+ "default": "{ ...Template, args: { ...Template.args, lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-02-11' }, granularity: 'week', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregated_dates', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-01-15', dateTo: '2024-02-11', fields: ['date'], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_byWeek, }, }, { matcher: { name: 'aggregated_week3', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-01-15', dateTo: '2024-01-21', fields: [], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_week3, }, }, { matcher: { name: 'aggregated_week4', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-01-22', dateTo: '2024-01-28', fields: [], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_week4, }, }, { matcher: { name: 'aggregated_week5', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-01-29', dateTo: '2024-02-04', fields: [], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_week5, }, }, { matcher: { name: 'aggregated_week6', url: AGGREGATED_ENDPOINT, body: { dateFrom: '2024-02-05', dateTo: '2024-02-11', fields: [], pangoLineage: 'JN.1*', }, }, response: { status: 200, body: aggregated_week6, }, }, { matcher: { name: 'nucleotideMutation_overall', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-02-11', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutations_byWeekOverall, }, }, { matcher: { name: 'nucleotideMutation_week3', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-01-21', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_week3, }, }, { matcher: { name: 'nucleotideMutation_week4', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-22', dateTo: '2024-01-28', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_week4, }, }, { matcher: { name: 'nucleotideMutation_week5', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-29', dateTo: '2024-02-04', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_week5, }, }, { matcher: { name: 'nucleotideMutation_week6', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-02-05', dateTo: '2024-02-11', minProportion: 0.001, }, }, response: { status: 200, body: nucleotideMutation_week6, }, }, ], }, }, }"
1807
1807
  },
1808
1808
  {
1809
1809
  "kind": "variable",
@@ -1811,7 +1811,7 @@
1811
1811
  "type": {
1812
1812
  "text": "StoryObj<Required<MutationsOverTimeProps>>"
1813
1813
  },
1814
- "default": "{ ...Template, args: { ...Template.args, lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-20', dateTo: '2024-01-26' }, granularity: 'day', sequenceType: 'amino acid', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregated_byDay', url: AGGREGATED_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-20', dateTo: '2024-01-26', fields: ['date'] }, }, response: { status: 200, body: aggregated_byDay, }, }, { matcher: { name: 'aminoAcidMutations_overall', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-20', dateTo: '2024-01-26', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_byDayOverall, }, }, { matcher: { name: 'aminoAcidMutations_20_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-20', dateTo: '2024-01-20', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_20_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_21_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-21', dateTo: '2024-01-21', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_21_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_22_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-22', dateTo: '2024-01-22', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_22_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_23_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-23', dateTo: '2024-01-23', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_23_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_24_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-24', dateTo: '2024-01-24', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_24_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_25_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-25', dateTo: '2024-01-25', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_25_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_26_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-26', dateTo: '2024-01-26', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_26_01_2024, }, }, ], }, }, }"
1814
+ "default": "{ ...Template, args: { ...Template.args, lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-20', dateTo: '2024-01-26' }, granularity: 'day', sequenceType: 'amino acid', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregated_byDay', url: AGGREGATED_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-20', dateTo: '2024-01-26', fields: ['date'] }, }, response: { status: 200, body: aggregated_byDay, }, }, { matcher: { name: 'aggregated_20_01_2024', url: AGGREGATED_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-20', dateTo: '2024-01-20', fields: [] }, }, response: { status: 200, body: aggregated_20_01_2024, }, }, { matcher: { name: 'aggregated_21_01_2024', url: AGGREGATED_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-21', dateTo: '2024-01-21', fields: [] }, }, response: { status: 200, body: aggregated_21_01_2024, }, }, { matcher: { name: 'aggregated_22_01_2024', url: AGGREGATED_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-22', dateTo: '2024-01-22', fields: [] }, }, response: { status: 200, body: aggregated_22_01_2024, }, }, { matcher: { name: 'aggregated_23_01_2024', url: AGGREGATED_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-23', dateTo: '2024-01-23', fields: [] }, }, response: { status: 200, body: aggregated_23_01_2024, }, }, { matcher: { name: 'aggregated_24_01_2024', url: AGGREGATED_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-24', dateTo: '2024-01-24', fields: [] }, }, response: { status: 200, body: aggregated_24_01_2024, }, }, { matcher: { name: 'aggregated_25_01_2024', url: AGGREGATED_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-25', dateTo: '2024-01-25', fields: [] }, }, response: { status: 200, body: aggregated_25_01_2024, }, }, { matcher: { name: 'aggregated_26_01_2024', url: AGGREGATED_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-26', dateTo: '2024-01-26', fields: [] }, }, response: { status: 200, body: aggregated_26_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_overall', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-20', dateTo: '2024-01-26', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_byDayOverall, }, }, { matcher: { name: 'aminoAcidMutations_20_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-20', dateTo: '2024-01-20', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_20_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_21_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-21', dateTo: '2024-01-21', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_21_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_22_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-22', dateTo: '2024-01-22', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_22_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_23_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-23', dateTo: '2024-01-23', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_23_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_24_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-24', dateTo: '2024-01-24', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_24_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_25_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-25', dateTo: '2024-01-25', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_25_01_2024, }, }, { matcher: { name: 'aminoAcidMutations_26_01_2024', url: AMINO_ACID_MUTATIONS_ENDPOINT, body: { pangoLineage: 'JN.1*', dateFrom: '2024-01-26', dateTo: '2024-01-26', minProportion: 0.001, }, }, response: { status: 200, body: aminoAcidMutations_26_01_2024, }, }, ], }, }, }"
1815
1815
  },
1816
1816
  {
1817
1817
  "kind": "variable",
@@ -2565,7 +2565,7 @@
2565
2565
  "kind": "variable",
2566
2566
  "name": "meta",
2567
2567
  "type": {
2568
- "text": "Meta<Required<PrevalenceOverTimeComponentProps>>"
2568
+ "text": "Meta<Required<PrevalenceOverTimeProps>>"
2569
2569
  },
2570
2570
  "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'], }"
2571
2571
  },
@@ -2573,7 +2573,7 @@
2573
2573
  "kind": "variable",
2574
2574
  "name": "TwoDatasets",
2575
2575
  "type": {
2576
- "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
2576
+ "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2577
2577
  },
2578
2578
  "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, }, }, ], }, }, }"
2579
2579
  },
@@ -2581,7 +2581,7 @@
2581
2581
  "kind": "variable",
2582
2582
  "name": "OneDataset",
2583
2583
  "type": {
2584
- "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
2584
+ "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2585
2585
  },
2586
2586
  "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, }, }, ], }, }, }"
2587
2587
  },
@@ -2589,7 +2589,7 @@
2589
2589
  "kind": "variable",
2590
2590
  "name": "OneDatasetOnLineTab",
2591
2591
  "type": {
2592
- "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
2592
+ "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2593
2593
  },
2594
2594
  "default": "{ ...OneDataset, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Line' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Line' })); }, }"
2595
2595
  },
@@ -2597,7 +2597,7 @@
2597
2597
  "kind": "variable",
2598
2598
  "name": "OneDatasetOnBubbleTab",
2599
2599
  "type": {
2600
- "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
2600
+ "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2601
2601
  },
2602
2602
  "default": "{ ...OneDataset, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Bubble' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Bubble' })); }, }"
2603
2603
  },
@@ -2605,7 +2605,7 @@
2605
2605
  "kind": "variable",
2606
2606
  "name": "OneDatasetOnTableTab",
2607
2607
  "type": {
2608
- "text": "StoryObj<Required<PrevalenceOverTimeComponentProps>>"
2608
+ "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2609
2609
  },
2610
2610
  "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' })); }, }"
2611
2611
  }
@@ -2676,7 +2676,7 @@
2676
2676
  "type": {
2677
2677
  "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 }[]"
2678
2678
  },
2679
- "default": "{ displayName: '', lapisFilter: {} }",
2679
+ "default": "{displayName: '', lapisFilter: {}}",
2680
2680
  "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.",
2681
2681
  "attribute": "numeratorFilter"
2682
2682
  },
@@ -2797,7 +2797,7 @@
2797
2797
  "type": {
2798
2798
  "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 }[]"
2799
2799
  },
2800
- "default": "{ displayName: '', lapisFilter: {} }",
2800
+ "default": "{displayName: '', lapisFilter: {}}",
2801
2801
  "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.",
2802
2802
  "fieldName": "numeratorFilter"
2803
2803
  },