@genspectrum/dashboard-components 0.6.5 → 0.6.7

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 (44) hide show
  1. package/custom-elements.json +51 -3
  2. package/dist/dashboard-components.js +359 -159
  3. package/dist/dashboard-components.js.map +1 -1
  4. package/dist/genspectrum-components.d.ts +3 -3
  5. package/dist/style.css +92 -8
  6. package/package.json +1 -1
  7. package/src/constants.ts +1 -0
  8. package/src/preact/aggregatedData/aggregate.tsx +1 -1
  9. package/src/preact/components/color-scale-selector-dropdown.stories.tsx +27 -0
  10. package/src/preact/components/color-scale-selector-dropdown.tsx +17 -0
  11. package/src/preact/components/color-scale-selector.stories.tsx +61 -0
  12. package/src/preact/components/color-scale-selector.tsx +79 -0
  13. package/src/preact/components/info.stories.tsx +37 -10
  14. package/src/preact/components/info.tsx +22 -43
  15. package/src/preact/components/min-max-range-slider.tsx +1 -1
  16. package/src/preact/components/tooltip.stories.tsx +12 -2
  17. package/src/preact/components/tooltip.tsx +38 -14
  18. package/src/preact/mutationComparison/mutation-comparison.tsx +1 -1
  19. package/src/preact/mutationFilter/mutation-filter-info.tsx +1 -1
  20. package/src/preact/mutationFilter/mutation-filter.stories.tsx +1 -1
  21. package/src/preact/mutationFilter/mutation-filter.tsx +2 -3
  22. package/src/preact/mutations/mutations.tsx +1 -1
  23. package/src/preact/mutationsOverTime/__mockData__/aggregated_byDay.json +38 -0
  24. package/src/preact/mutationsOverTime/__mockData__/aggregated_byWeek.json +122 -0
  25. package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutations_20_01_2024.json +6778 -0
  26. package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutations_21_01_2024.json +7129 -0
  27. package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutations_22_01_2024.json +4681 -0
  28. package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutations_23_01_2024.json +10738 -0
  29. package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutations_24_01_2024.json +11710 -0
  30. package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutations_25_01_2024.json +11557 -0
  31. package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutations_26_01_2024.json +8596 -0
  32. package/src/preact/mutationsOverTime/__mockData__/nucleotideMutations_week3_2024.json +8812 -0
  33. package/src/preact/mutationsOverTime/__mockData__/nucleotideMutations_week4_2024.json +9730 -0
  34. package/src/preact/mutationsOverTime/__mockData__/nucleotideMutations_week5_2024.json +9865 -0
  35. package/src/preact/mutationsOverTime/__mockData__/nucleotideMutations_week6_2024.json +11314 -0
  36. package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +83 -40
  37. package/src/preact/mutationsOverTime/mutations-over-time.tsx +50 -11
  38. package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +1 -1
  39. package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +1 -1
  40. package/src/preact/shared/charts/colors.ts +1 -1
  41. package/src/utils/temporal.spec.ts +3 -4
  42. package/src/utils/temporal.ts +9 -4
  43. package/src/web-components/visualization/gs-mutations-over-time.stories.ts +262 -2
  44. package/src/preact/shared/icons/DeleteIcon.tsx +0 -17
@@ -1791,11 +1791,35 @@
1791
1791
  },
1792
1792
  {
1793
1793
  "kind": "variable",
1794
- "name": "Default",
1794
+ "name": "ByMonth",
1795
1795
  "type": {
1796
1796
  "text": "StoryObj<Required<MutationsOverTimeProps>>"
1797
1797
  },
1798
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_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
+ },
1800
+ {
1801
+ "kind": "variable",
1802
+ "name": "ByWeek",
1803
+ "type": {
1804
+ "text": "StoryObj<Required<MutationsOverTimeProps>>"
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_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
+ },
1808
+ {
1809
+ "kind": "variable",
1810
+ "name": "AminoAcidMutationsByDay",
1811
+ "type": {
1812
+ "text": "StoryObj<Required<MutationsOverTimeProps>>"
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_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
+ },
1816
+ {
1817
+ "kind": "variable",
1818
+ "name": "HideProportionOnSmallScreen",
1819
+ "type": {
1820
+ "text": "StoryObj<Required<MutationsOverTimeProps>>"
1821
+ },
1822
+ "default": "{ ...ByMonth, args: { ...ByMonth.args, width: '300px', }, }"
1799
1823
  }
1800
1824
  ],
1801
1825
  "exports": [
@@ -1809,9 +1833,33 @@
1809
1833
  },
1810
1834
  {
1811
1835
  "kind": "js",
1812
- "name": "Default",
1836
+ "name": "ByMonth",
1813
1837
  "declaration": {
1814
- "name": "Default",
1838
+ "name": "ByMonth",
1839
+ "module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
1840
+ }
1841
+ },
1842
+ {
1843
+ "kind": "js",
1844
+ "name": "ByWeek",
1845
+ "declaration": {
1846
+ "name": "ByWeek",
1847
+ "module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
1848
+ }
1849
+ },
1850
+ {
1851
+ "kind": "js",
1852
+ "name": "AminoAcidMutationsByDay",
1853
+ "declaration": {
1854
+ "name": "AminoAcidMutationsByDay",
1855
+ "module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
1856
+ }
1857
+ },
1858
+ {
1859
+ "kind": "js",
1860
+ "name": "HideProportionOnSmallScreen",
1861
+ "declaration": {
1862
+ "name": "HideProportionOnSmallScreen",
1815
1863
  "module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
1816
1864
  }
1817
1865
  }