@genspectrum/dashboard-components 1.14.1 → 1.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.d.ts +55 -55
- package/dist/components.js +27 -1
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +55 -55
- package/package.json +1 -2
- package/src/preact/components/features-over-time-grid.tsx +10 -2
- package/src/preact/wastewater/mutationsOverTime/computeWastewaterMutationsOverTimeDataPerLocation.spec.ts +55 -0
- package/src/preact/wastewater/mutationsOverTime/computeWastewaterMutationsOverTimeDataPerLocation.ts +26 -0
- package/standalone-bundle/dashboard-components.js +3664 -3652
- package/standalone-bundle/dashboard-components.js.map +1 -1
package/dist/components.d.ts
CHANGED
|
@@ -1791,11 +1791,7 @@ declare global {
|
|
|
1791
1791
|
|
|
1792
1792
|
declare global {
|
|
1793
1793
|
interface HTMLElementTagNameMap {
|
|
1794
|
-
'gs-
|
|
1795
|
-
}
|
|
1796
|
-
interface HTMLElementEventMap {
|
|
1797
|
-
[gsEventNames.dateRangeFilterChanged]: CustomEvent<Record<string, string>>;
|
|
1798
|
-
[gsEventNames.dateRangeOptionChanged]: DateRangeOptionChangedEvent;
|
|
1794
|
+
'gs-genome-data-viewer': GenomeDataViewerComponent;
|
|
1799
1795
|
}
|
|
1800
1796
|
}
|
|
1801
1797
|
|
|
@@ -1803,7 +1799,7 @@ declare global {
|
|
|
1803
1799
|
declare global {
|
|
1804
1800
|
namespace JSX {
|
|
1805
1801
|
interface IntrinsicElements {
|
|
1806
|
-
'gs-
|
|
1802
|
+
'gs-genome-data-viewer': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1807
1803
|
}
|
|
1808
1804
|
}
|
|
1809
1805
|
}
|
|
@@ -1811,10 +1807,7 @@ declare global {
|
|
|
1811
1807
|
|
|
1812
1808
|
declare global {
|
|
1813
1809
|
interface HTMLElementTagNameMap {
|
|
1814
|
-
'gs-
|
|
1815
|
-
}
|
|
1816
|
-
interface HTMLElementEventMap {
|
|
1817
|
-
[gsEventNames.locationChanged]: LocationChangedEvent;
|
|
1810
|
+
'gs-mutation-comparison': MutationComparisonComponent;
|
|
1818
1811
|
}
|
|
1819
1812
|
}
|
|
1820
1813
|
|
|
@@ -1822,7 +1815,7 @@ declare global {
|
|
|
1822
1815
|
declare global {
|
|
1823
1816
|
namespace JSX {
|
|
1824
1817
|
interface IntrinsicElements {
|
|
1825
|
-
'gs-
|
|
1818
|
+
'gs-mutation-comparison': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1826
1819
|
}
|
|
1827
1820
|
}
|
|
1828
1821
|
}
|
|
@@ -1830,10 +1823,7 @@ declare global {
|
|
|
1830
1823
|
|
|
1831
1824
|
declare global {
|
|
1832
1825
|
interface HTMLElementTagNameMap {
|
|
1833
|
-
'gs-
|
|
1834
|
-
}
|
|
1835
|
-
interface HTMLElementEventMap {
|
|
1836
|
-
[gsEventNames.textFilterChanged]: TextFilterChangedEvent;
|
|
1826
|
+
'gs-mutations': MutationsComponent;
|
|
1837
1827
|
}
|
|
1838
1828
|
}
|
|
1839
1829
|
|
|
@@ -1841,7 +1831,7 @@ declare global {
|
|
|
1841
1831
|
declare global {
|
|
1842
1832
|
namespace JSX {
|
|
1843
1833
|
interface IntrinsicElements {
|
|
1844
|
-
'gs-
|
|
1834
|
+
'gs-mutations': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1845
1835
|
}
|
|
1846
1836
|
}
|
|
1847
1837
|
}
|
|
@@ -1849,10 +1839,7 @@ declare global {
|
|
|
1849
1839
|
|
|
1850
1840
|
declare global {
|
|
1851
1841
|
interface HTMLElementTagNameMap {
|
|
1852
|
-
'gs-
|
|
1853
|
-
}
|
|
1854
|
-
interface HTMLElementEventMap {
|
|
1855
|
-
[gsEventNames.mutationFilterChanged]: CustomEvent<MutationsFilter>;
|
|
1842
|
+
'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
|
|
1856
1843
|
}
|
|
1857
1844
|
}
|
|
1858
1845
|
|
|
@@ -1860,7 +1847,7 @@ declare global {
|
|
|
1860
1847
|
declare global {
|
|
1861
1848
|
namespace JSX {
|
|
1862
1849
|
interface IntrinsicElements {
|
|
1863
|
-
'gs-
|
|
1850
|
+
'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1864
1851
|
}
|
|
1865
1852
|
}
|
|
1866
1853
|
}
|
|
@@ -1868,11 +1855,7 @@ declare global {
|
|
|
1868
1855
|
|
|
1869
1856
|
declare global {
|
|
1870
1857
|
interface HTMLElementTagNameMap {
|
|
1871
|
-
'gs-
|
|
1872
|
-
}
|
|
1873
|
-
interface HTMLElementEventMap {
|
|
1874
|
-
[gsEventNames.lineageFilterChanged]: LineageFilterChangedEvent;
|
|
1875
|
-
[gsEventNames.lineageFilterMultiChanged]: LineageMultiFilterChangedEvent;
|
|
1858
|
+
'gs-prevalence-over-time': PrevalenceOverTimeComponent;
|
|
1876
1859
|
}
|
|
1877
1860
|
}
|
|
1878
1861
|
|
|
@@ -1880,7 +1863,7 @@ declare global {
|
|
|
1880
1863
|
declare global {
|
|
1881
1864
|
namespace JSX {
|
|
1882
1865
|
interface IntrinsicElements {
|
|
1883
|
-
'gs-
|
|
1866
|
+
'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1884
1867
|
}
|
|
1885
1868
|
}
|
|
1886
1869
|
}
|
|
@@ -1888,11 +1871,7 @@ declare global {
|
|
|
1888
1871
|
|
|
1889
1872
|
declare global {
|
|
1890
1873
|
interface HTMLElementTagNameMap {
|
|
1891
|
-
'gs-
|
|
1892
|
-
}
|
|
1893
|
-
interface HTMLElementEventMap {
|
|
1894
|
-
[gsEventNames.numberRangeFilterChanged]: NumberRangeFilterChangedEvent;
|
|
1895
|
-
[gsEventNames.numberRangeValueChanged]: NumberRangeValueChangedEvent;
|
|
1874
|
+
'gs-aggregate': AggregateComponent;
|
|
1896
1875
|
}
|
|
1897
1876
|
}
|
|
1898
1877
|
|
|
@@ -1900,7 +1879,7 @@ declare global {
|
|
|
1900
1879
|
declare global {
|
|
1901
1880
|
namespace JSX {
|
|
1902
1881
|
interface IntrinsicElements {
|
|
1903
|
-
'gs-
|
|
1882
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1904
1883
|
}
|
|
1905
1884
|
}
|
|
1906
1885
|
}
|
|
@@ -1908,7 +1887,7 @@ declare global {
|
|
|
1908
1887
|
|
|
1909
1888
|
declare global {
|
|
1910
1889
|
interface HTMLElementTagNameMap {
|
|
1911
|
-
'gs-
|
|
1890
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
1912
1891
|
}
|
|
1913
1892
|
}
|
|
1914
1893
|
|
|
@@ -1916,7 +1895,7 @@ declare global {
|
|
|
1916
1895
|
declare global {
|
|
1917
1896
|
namespace JSX {
|
|
1918
1897
|
interface IntrinsicElements {
|
|
1919
|
-
'gs-
|
|
1898
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1920
1899
|
}
|
|
1921
1900
|
}
|
|
1922
1901
|
}
|
|
@@ -1924,7 +1903,7 @@ declare global {
|
|
|
1924
1903
|
|
|
1925
1904
|
declare global {
|
|
1926
1905
|
interface HTMLElementTagNameMap {
|
|
1927
|
-
'gs-
|
|
1906
|
+
'gs-mutations-over-time': MutationsOverTimeComponent;
|
|
1928
1907
|
}
|
|
1929
1908
|
}
|
|
1930
1909
|
|
|
@@ -1932,7 +1911,7 @@ declare global {
|
|
|
1932
1911
|
declare global {
|
|
1933
1912
|
namespace JSX {
|
|
1934
1913
|
interface IntrinsicElements {
|
|
1935
|
-
'gs-
|
|
1914
|
+
'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1936
1915
|
}
|
|
1937
1916
|
}
|
|
1938
1917
|
}
|
|
@@ -1940,7 +1919,7 @@ declare global {
|
|
|
1940
1919
|
|
|
1941
1920
|
declare global {
|
|
1942
1921
|
interface HTMLElementTagNameMap {
|
|
1943
|
-
'gs-
|
|
1922
|
+
'gs-queries-over-time': QueriesOverTimeComponent;
|
|
1944
1923
|
}
|
|
1945
1924
|
}
|
|
1946
1925
|
|
|
@@ -1948,7 +1927,7 @@ declare global {
|
|
|
1948
1927
|
declare global {
|
|
1949
1928
|
namespace JSX {
|
|
1950
1929
|
interface IntrinsicElements {
|
|
1951
|
-
'gs-
|
|
1930
|
+
'gs-queries-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1952
1931
|
}
|
|
1953
1932
|
}
|
|
1954
1933
|
}
|
|
@@ -1956,7 +1935,7 @@ declare global {
|
|
|
1956
1935
|
|
|
1957
1936
|
declare global {
|
|
1958
1937
|
interface HTMLElementTagNameMap {
|
|
1959
|
-
'gs-
|
|
1938
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
1960
1939
|
}
|
|
1961
1940
|
}
|
|
1962
1941
|
|
|
@@ -1964,7 +1943,7 @@ declare global {
|
|
|
1964
1943
|
declare global {
|
|
1965
1944
|
namespace JSX {
|
|
1966
1945
|
interface IntrinsicElements {
|
|
1967
|
-
'gs-
|
|
1946
|
+
'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1968
1947
|
}
|
|
1969
1948
|
}
|
|
1970
1949
|
}
|
|
@@ -1972,7 +1951,7 @@ declare global {
|
|
|
1972
1951
|
|
|
1973
1952
|
declare global {
|
|
1974
1953
|
interface HTMLElementTagNameMap {
|
|
1975
|
-
'gs-
|
|
1954
|
+
'gs-statistics': StatisticsComponent;
|
|
1976
1955
|
}
|
|
1977
1956
|
}
|
|
1978
1957
|
|
|
@@ -1980,7 +1959,7 @@ declare global {
|
|
|
1980
1959
|
declare global {
|
|
1981
1960
|
namespace JSX {
|
|
1982
1961
|
interface IntrinsicElements {
|
|
1983
|
-
'gs-
|
|
1962
|
+
'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1984
1963
|
}
|
|
1985
1964
|
}
|
|
1986
1965
|
}
|
|
@@ -1988,7 +1967,11 @@ declare global {
|
|
|
1988
1967
|
|
|
1989
1968
|
declare global {
|
|
1990
1969
|
interface HTMLElementTagNameMap {
|
|
1991
|
-
'gs-
|
|
1970
|
+
'gs-date-range-filter': DateRangeFilterComponent;
|
|
1971
|
+
}
|
|
1972
|
+
interface HTMLElementEventMap {
|
|
1973
|
+
[gsEventNames.dateRangeFilterChanged]: CustomEvent<Record<string, string>>;
|
|
1974
|
+
[gsEventNames.dateRangeOptionChanged]: DateRangeOptionChangedEvent;
|
|
1992
1975
|
}
|
|
1993
1976
|
}
|
|
1994
1977
|
|
|
@@ -1996,7 +1979,7 @@ declare global {
|
|
|
1996
1979
|
declare global {
|
|
1997
1980
|
namespace JSX {
|
|
1998
1981
|
interface IntrinsicElements {
|
|
1999
|
-
'gs-
|
|
1982
|
+
'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
2000
1983
|
}
|
|
2001
1984
|
}
|
|
2002
1985
|
}
|
|
@@ -2004,7 +1987,10 @@ declare global {
|
|
|
2004
1987
|
|
|
2005
1988
|
declare global {
|
|
2006
1989
|
interface HTMLElementTagNameMap {
|
|
2007
|
-
'gs-
|
|
1990
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1991
|
+
}
|
|
1992
|
+
interface HTMLElementEventMap {
|
|
1993
|
+
[gsEventNames.locationChanged]: LocationChangedEvent;
|
|
2008
1994
|
}
|
|
2009
1995
|
}
|
|
2010
1996
|
|
|
@@ -2012,7 +1998,7 @@ declare global {
|
|
|
2012
1998
|
declare global {
|
|
2013
1999
|
namespace JSX {
|
|
2014
2000
|
interface IntrinsicElements {
|
|
2015
|
-
'gs-
|
|
2001
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
2016
2002
|
}
|
|
2017
2003
|
}
|
|
2018
2004
|
}
|
|
@@ -2020,7 +2006,10 @@ declare global {
|
|
|
2020
2006
|
|
|
2021
2007
|
declare global {
|
|
2022
2008
|
interface HTMLElementTagNameMap {
|
|
2023
|
-
'gs-
|
|
2009
|
+
'gs-text-filter': TextFilterComponent;
|
|
2010
|
+
}
|
|
2011
|
+
interface HTMLElementEventMap {
|
|
2012
|
+
[gsEventNames.textFilterChanged]: TextFilterChangedEvent;
|
|
2024
2013
|
}
|
|
2025
2014
|
}
|
|
2026
2015
|
|
|
@@ -2028,7 +2017,7 @@ declare global {
|
|
|
2028
2017
|
declare global {
|
|
2029
2018
|
namespace JSX {
|
|
2030
2019
|
interface IntrinsicElements {
|
|
2031
|
-
'gs-
|
|
2020
|
+
'gs-text-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
2032
2021
|
}
|
|
2033
2022
|
}
|
|
2034
2023
|
}
|
|
@@ -2036,7 +2025,10 @@ declare global {
|
|
|
2036
2025
|
|
|
2037
2026
|
declare global {
|
|
2038
2027
|
interface HTMLElementTagNameMap {
|
|
2039
|
-
'gs-
|
|
2028
|
+
'gs-mutation-filter': MutationFilterComponent;
|
|
2029
|
+
}
|
|
2030
|
+
interface HTMLElementEventMap {
|
|
2031
|
+
[gsEventNames.mutationFilterChanged]: CustomEvent<MutationsFilter>;
|
|
2040
2032
|
}
|
|
2041
2033
|
}
|
|
2042
2034
|
|
|
@@ -2044,7 +2036,7 @@ declare global {
|
|
|
2044
2036
|
declare global {
|
|
2045
2037
|
namespace JSX {
|
|
2046
2038
|
interface IntrinsicElements {
|
|
2047
|
-
'gs-
|
|
2039
|
+
'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
2048
2040
|
}
|
|
2049
2041
|
}
|
|
2050
2042
|
}
|
|
@@ -2052,7 +2044,11 @@ declare global {
|
|
|
2052
2044
|
|
|
2053
2045
|
declare global {
|
|
2054
2046
|
interface HTMLElementTagNameMap {
|
|
2055
|
-
'gs-
|
|
2047
|
+
'gs-lineage-filter': LineageFilterComponent;
|
|
2048
|
+
}
|
|
2049
|
+
interface HTMLElementEventMap {
|
|
2050
|
+
[gsEventNames.lineageFilterChanged]: LineageFilterChangedEvent;
|
|
2051
|
+
[gsEventNames.lineageFilterMultiChanged]: LineageMultiFilterChangedEvent;
|
|
2056
2052
|
}
|
|
2057
2053
|
}
|
|
2058
2054
|
|
|
@@ -2060,7 +2056,7 @@ declare global {
|
|
|
2060
2056
|
declare global {
|
|
2061
2057
|
namespace JSX {
|
|
2062
2058
|
interface IntrinsicElements {
|
|
2063
|
-
'gs-
|
|
2059
|
+
'gs-lineage-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
2064
2060
|
}
|
|
2065
2061
|
}
|
|
2066
2062
|
}
|
|
@@ -2068,7 +2064,11 @@ declare global {
|
|
|
2068
2064
|
|
|
2069
2065
|
declare global {
|
|
2070
2066
|
interface HTMLElementTagNameMap {
|
|
2071
|
-
'gs-
|
|
2067
|
+
'gs-number-range-filter': NumberRangeFilterComponent;
|
|
2068
|
+
}
|
|
2069
|
+
interface HTMLElementEventMap {
|
|
2070
|
+
[gsEventNames.numberRangeFilterChanged]: NumberRangeFilterChangedEvent;
|
|
2071
|
+
[gsEventNames.numberRangeValueChanged]: NumberRangeValueChangedEvent;
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
2074
|
|
|
@@ -2076,7 +2076,7 @@ declare global {
|
|
|
2076
2076
|
declare global {
|
|
2077
2077
|
namespace JSX {
|
|
2078
2078
|
interface IntrinsicElements {
|
|
2079
|
-
'gs-
|
|
2079
|
+
'gs-number-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
2080
2080
|
}
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
package/dist/components.js
CHANGED
|
@@ -8162,11 +8162,17 @@ function FeaturesOverTimeGrid({
|
|
|
8162
8162
|
id: `date-${index}`,
|
|
8163
8163
|
header: () => /* @__PURE__ */ u$1("div", { className: "@container min-w-[0.05rem]", children: /* @__PURE__ */ u$1("p", { ...styleGridHeader(index, dates.length), children: date.dateString }) }),
|
|
8164
8164
|
cell: ({ getValue, row, column, table: table2 }) => {
|
|
8165
|
-
const
|
|
8165
|
+
const valueRaw = getValue();
|
|
8166
|
+
const value = valueRaw ?? null;
|
|
8166
8167
|
const rowIndex = row.index;
|
|
8167
8168
|
const columnIndex = column.getIndex();
|
|
8168
8169
|
const numberOfRows = table2.getRowModel().rows.length;
|
|
8169
8170
|
const numberOfColumns = table2.getAllColumns().length;
|
|
8171
|
+
if (valueRaw === void 0) {
|
|
8172
|
+
console.error(
|
|
8173
|
+
`Found undefined value for ${row.original.feature} - ${date.dateString}. This shouldn't happen.`
|
|
8174
|
+
);
|
|
8175
|
+
}
|
|
8170
8176
|
const tooltip2 = featureRenderer.renderTooltip(row.original.feature, date, value);
|
|
8171
8177
|
return /* @__PURE__ */ u$1("div", { className: "text-center", children: /* @__PURE__ */ u$1(
|
|
8172
8178
|
ProportionCell,
|
|
@@ -10491,13 +10497,21 @@ async function computeWastewaterMutationsOverTimeDataPerLocation(lapis, lapisFil
|
|
|
10491
10497
|
}
|
|
10492
10498
|
function groupMutationDataByLocation(data, sequenceType) {
|
|
10493
10499
|
const locationMap = /* @__PURE__ */ new Map();
|
|
10500
|
+
const locationMutations = /* @__PURE__ */ new Map();
|
|
10501
|
+
const locationDates = /* @__PURE__ */ new Map();
|
|
10494
10502
|
for (const row of data) {
|
|
10495
10503
|
if (!locationMap.has(row.location)) {
|
|
10496
10504
|
locationMap.set(row.location, new BaseMutationOverTimeDataMap());
|
|
10505
|
+
locationMutations.set(row.location, /* @__PURE__ */ new Set());
|
|
10506
|
+
locationDates.set(row.location, /* @__PURE__ */ new Set());
|
|
10497
10507
|
}
|
|
10498
10508
|
const map2 = locationMap.get(row.location);
|
|
10509
|
+
const mutations = locationMutations.get(row.location);
|
|
10510
|
+
const dates = locationDates.get(row.location);
|
|
10499
10511
|
const mutationFrequencies = sequenceType === "nucleotide" ? row.nucleotideMutationFrequency : row.aminoAcidMutationFrequency;
|
|
10500
10512
|
for (const mutation of mutationFrequencies) {
|
|
10513
|
+
dates.add(row.date.dateString);
|
|
10514
|
+
mutations.add(mutation.mutation.code);
|
|
10501
10515
|
map2.set(
|
|
10502
10516
|
mutation.mutation,
|
|
10503
10517
|
row.date,
|
|
@@ -10505,6 +10519,18 @@ function groupMutationDataByLocation(data, sequenceType) {
|
|
|
10505
10519
|
);
|
|
10506
10520
|
}
|
|
10507
10521
|
}
|
|
10522
|
+
for (const [location, map2] of locationMap.entries()) {
|
|
10523
|
+
const allMutations = Array.from(locationMutations.get(location));
|
|
10524
|
+
const allDates = Array.from(locationDates.get(location)).map((dateStr) => map2.keysSecondAxis.get(dateStr));
|
|
10525
|
+
for (const mutationCode of allMutations) {
|
|
10526
|
+
const mutation = map2.keysFirstAxis.get(mutationCode);
|
|
10527
|
+
for (const date of allDates) {
|
|
10528
|
+
if (map2.get(mutation, date) === void 0) {
|
|
10529
|
+
map2.set(mutation, date, null);
|
|
10530
|
+
}
|
|
10531
|
+
}
|
|
10532
|
+
}
|
|
10533
|
+
}
|
|
10508
10534
|
return [...locationMap.entries()].map(([location, data2]) => ({
|
|
10509
10535
|
location,
|
|
10510
10536
|
data: new SortedMap2d(
|