@genspectrum/dashboard-components 1.3.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +97 -5
- package/dist/assets/{mutationOverTimeWorker-CQxrFo53.js.map → mutationOverTimeWorker-BJ_P2T8Y.js.map} +1 -1
- package/dist/components.d.ts +45 -25
- package/dist/components.js +118 -21
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +25 -25
- package/package.json +1 -1
- package/src/preact/lineageFilter/lineage-filter.stories.tsx +24 -0
- package/src/preact/lineageFilter/lineage-filter.tsx +13 -2
- package/src/preact/locationFilter/location-filter.stories.tsx +24 -0
- package/src/preact/locationFilter/location-filter.tsx +19 -3
- package/src/preact/mutationsOverTime/__mockData__/withGaps.ts +352 -0
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts +38 -0
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +11 -1
- package/src/preact/mutationsOverTime/mutationOverTimeWorker.mock.ts +2 -0
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +35 -0
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +28 -4
- package/src/preact/textFilter/text-filter.stories.tsx +29 -4
- package/src/preact/textFilter/text-filter.tsx +13 -2
- package/src/query/queryMutationsOverTime.ts +37 -4
- package/src/query/queryMutationsOverTimeNewEndpoint.spec.ts +122 -0
- package/src/utils/map2d.spec.ts +30 -0
- package/src/utils/map2d.ts +14 -1
- package/src/web-components/input/gs-lineage-filter.stories.ts +7 -0
- package/src/web-components/input/gs-lineage-filter.tsx +8 -0
- package/src/web-components/input/gs-location-filter.stories.ts +7 -0
- package/src/web-components/input/gs-location-filter.tsx +9 -1
- package/src/web-components/input/gs-text-filter.stories.ts +7 -0
- package/src/web-components/input/gs-text-filter.tsx +8 -0
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +14 -1
- package/src/web-components/visualization/gs-mutations-over-time.tsx +8 -0
- package/standalone-bundle/assets/{mutationOverTimeWorker-CDACUs6w.js.map → mutationOverTimeWorker-CkeGpKWp.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +1413 -1330
- package/standalone-bundle/dashboard-components.js.map +1 -1
package/dist/components.d.ts
CHANGED
|
@@ -319,6 +319,11 @@ export declare class LineageFilterComponent extends PreactLitAdapter {
|
|
|
319
319
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.
|
|
320
320
|
*/
|
|
321
321
|
width: string;
|
|
322
|
+
/**
|
|
323
|
+
* Whether to hide counts behind lineage options in the drop down selection.
|
|
324
|
+
* Defaults to false.
|
|
325
|
+
*/
|
|
326
|
+
hideCounts: boolean | undefined;
|
|
322
327
|
render(): JSX_2.Element;
|
|
323
328
|
}
|
|
324
329
|
|
|
@@ -381,6 +386,11 @@ export declare class LocationFilterComponent extends PreactLitAdapter {
|
|
|
381
386
|
* The placeholder text to display in the input field, if it is empty.
|
|
382
387
|
*/
|
|
383
388
|
placeholderText: string | undefined;
|
|
389
|
+
/**
|
|
390
|
+
* Whether to hide counts behind location options in the drop down selection.
|
|
391
|
+
* Defaults to false.
|
|
392
|
+
*/
|
|
393
|
+
hideCounts: boolean | undefined;
|
|
384
394
|
render(): JSX_2.Element;
|
|
385
395
|
}
|
|
386
396
|
|
|
@@ -753,6 +763,11 @@ export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGrid
|
|
|
753
763
|
min: number;
|
|
754
764
|
max: number;
|
|
755
765
|
};
|
|
766
|
+
/**
|
|
767
|
+
* If true, date ranges with no data will be hidden initially; if false, not.
|
|
768
|
+
* Can be switched with a button in the toolbar.
|
|
769
|
+
*/
|
|
770
|
+
hideGaps: boolean;
|
|
756
771
|
/**
|
|
757
772
|
* Whether to use the mutationsOverTime endpoint from LAPIS.
|
|
758
773
|
* If true, use the endpoint, if false, compute component data as before.
|
|
@@ -1484,6 +1499,11 @@ export declare class TextFilterComponent extends PreactLitAdapter {
|
|
|
1484
1499
|
* The placeholder text to display in the input field.
|
|
1485
1500
|
*/
|
|
1486
1501
|
placeholderText: string | undefined;
|
|
1502
|
+
/**
|
|
1503
|
+
* Whether to hide counts behind options in the drop down selection.
|
|
1504
|
+
* Defaults to false.
|
|
1505
|
+
*/
|
|
1506
|
+
hideCounts: boolean | undefined;
|
|
1487
1507
|
/**
|
|
1488
1508
|
* The width of the component.
|
|
1489
1509
|
*
|
|
@@ -1633,7 +1653,7 @@ declare global {
|
|
|
1633
1653
|
|
|
1634
1654
|
declare global {
|
|
1635
1655
|
interface HTMLElementTagNameMap {
|
|
1636
|
-
'gs-
|
|
1656
|
+
'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
|
|
1637
1657
|
}
|
|
1638
1658
|
}
|
|
1639
1659
|
|
|
@@ -1641,7 +1661,7 @@ declare global {
|
|
|
1641
1661
|
declare global {
|
|
1642
1662
|
namespace JSX {
|
|
1643
1663
|
interface IntrinsicElements {
|
|
1644
|
-
'gs-
|
|
1664
|
+
'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1645
1665
|
}
|
|
1646
1666
|
}
|
|
1647
1667
|
}
|
|
@@ -1649,7 +1669,7 @@ declare global {
|
|
|
1649
1669
|
|
|
1650
1670
|
declare global {
|
|
1651
1671
|
interface HTMLElementTagNameMap {
|
|
1652
|
-
'gs-
|
|
1672
|
+
'gs-prevalence-over-time': PrevalenceOverTimeComponent;
|
|
1653
1673
|
}
|
|
1654
1674
|
}
|
|
1655
1675
|
|
|
@@ -1657,7 +1677,7 @@ declare global {
|
|
|
1657
1677
|
declare global {
|
|
1658
1678
|
namespace JSX {
|
|
1659
1679
|
interface IntrinsicElements {
|
|
1660
|
-
'gs-
|
|
1680
|
+
'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1661
1681
|
}
|
|
1662
1682
|
}
|
|
1663
1683
|
}
|
|
@@ -1681,7 +1701,7 @@ declare global {
|
|
|
1681
1701
|
|
|
1682
1702
|
declare global {
|
|
1683
1703
|
interface HTMLElementTagNameMap {
|
|
1684
|
-
'gs-
|
|
1704
|
+
'gs-mutations-over-time': MutationsOverTimeComponent;
|
|
1685
1705
|
}
|
|
1686
1706
|
}
|
|
1687
1707
|
|
|
@@ -1689,7 +1709,7 @@ declare global {
|
|
|
1689
1709
|
declare global {
|
|
1690
1710
|
namespace JSX {
|
|
1691
1711
|
interface IntrinsicElements {
|
|
1692
|
-
'gs-
|
|
1712
|
+
'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1693
1713
|
}
|
|
1694
1714
|
}
|
|
1695
1715
|
}
|
|
@@ -1697,7 +1717,7 @@ declare global {
|
|
|
1697
1717
|
|
|
1698
1718
|
declare global {
|
|
1699
1719
|
interface HTMLElementTagNameMap {
|
|
1700
|
-
'gs-
|
|
1720
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
1701
1721
|
}
|
|
1702
1722
|
}
|
|
1703
1723
|
|
|
@@ -1705,7 +1725,7 @@ declare global {
|
|
|
1705
1725
|
declare global {
|
|
1706
1726
|
namespace JSX {
|
|
1707
1727
|
interface IntrinsicElements {
|
|
1708
|
-
'gs-
|
|
1728
|
+
'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1709
1729
|
}
|
|
1710
1730
|
}
|
|
1711
1731
|
}
|
|
@@ -1713,7 +1733,7 @@ declare global {
|
|
|
1713
1733
|
|
|
1714
1734
|
declare global {
|
|
1715
1735
|
interface HTMLElementTagNameMap {
|
|
1716
|
-
'gs-
|
|
1736
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
1717
1737
|
}
|
|
1718
1738
|
}
|
|
1719
1739
|
|
|
@@ -1721,7 +1741,7 @@ declare global {
|
|
|
1721
1741
|
declare global {
|
|
1722
1742
|
namespace JSX {
|
|
1723
1743
|
interface IntrinsicElements {
|
|
1724
|
-
'gs-
|
|
1744
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1725
1745
|
}
|
|
1726
1746
|
}
|
|
1727
1747
|
}
|
|
@@ -1729,7 +1749,7 @@ declare global {
|
|
|
1729
1749
|
|
|
1730
1750
|
declare global {
|
|
1731
1751
|
interface HTMLElementTagNameMap {
|
|
1732
|
-
'gs-
|
|
1752
|
+
'gs-statistics': StatisticsComponent;
|
|
1733
1753
|
}
|
|
1734
1754
|
}
|
|
1735
1755
|
|
|
@@ -1737,7 +1757,7 @@ declare global {
|
|
|
1737
1757
|
declare global {
|
|
1738
1758
|
namespace JSX {
|
|
1739
1759
|
interface IntrinsicElements {
|
|
1740
|
-
'gs-
|
|
1760
|
+
'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1741
1761
|
}
|
|
1742
1762
|
}
|
|
1743
1763
|
}
|
|
@@ -1745,11 +1765,10 @@ declare global {
|
|
|
1745
1765
|
|
|
1746
1766
|
declare global {
|
|
1747
1767
|
interface HTMLElementTagNameMap {
|
|
1748
|
-
'gs-
|
|
1768
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1749
1769
|
}
|
|
1750
1770
|
interface HTMLElementEventMap {
|
|
1751
|
-
[gsEventNames.
|
|
1752
|
-
[gsEventNames.dateRangeOptionChanged]: DateRangeOptionChangedEvent;
|
|
1771
|
+
[gsEventNames.locationChanged]: LocationChangedEvent;
|
|
1753
1772
|
}
|
|
1754
1773
|
}
|
|
1755
1774
|
|
|
@@ -1757,7 +1776,7 @@ declare global {
|
|
|
1757
1776
|
declare global {
|
|
1758
1777
|
namespace JSX {
|
|
1759
1778
|
interface IntrinsicElements {
|
|
1760
|
-
'gs-
|
|
1779
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1761
1780
|
}
|
|
1762
1781
|
}
|
|
1763
1782
|
}
|
|
@@ -1781,10 +1800,11 @@ declare global {
|
|
|
1781
1800
|
|
|
1782
1801
|
declare global {
|
|
1783
1802
|
interface HTMLElementTagNameMap {
|
|
1784
|
-
'gs-
|
|
1803
|
+
'gs-date-range-filter': DateRangeFilterComponent;
|
|
1785
1804
|
}
|
|
1786
1805
|
interface HTMLElementEventMap {
|
|
1787
|
-
[gsEventNames.
|
|
1806
|
+
[gsEventNames.dateRangeFilterChanged]: CustomEvent<Record<string, string>>;
|
|
1807
|
+
[gsEventNames.dateRangeOptionChanged]: DateRangeOptionChangedEvent;
|
|
1788
1808
|
}
|
|
1789
1809
|
}
|
|
1790
1810
|
|
|
@@ -1792,7 +1812,7 @@ declare global {
|
|
|
1792
1812
|
declare global {
|
|
1793
1813
|
namespace JSX {
|
|
1794
1814
|
interface IntrinsicElements {
|
|
1795
|
-
'gs-
|
|
1815
|
+
'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1796
1816
|
}
|
|
1797
1817
|
}
|
|
1798
1818
|
}
|
|
@@ -1800,10 +1820,10 @@ declare global {
|
|
|
1800
1820
|
|
|
1801
1821
|
declare global {
|
|
1802
1822
|
interface HTMLElementTagNameMap {
|
|
1803
|
-
'gs-
|
|
1823
|
+
'gs-text-filter': TextFilterComponent;
|
|
1804
1824
|
}
|
|
1805
1825
|
interface HTMLElementEventMap {
|
|
1806
|
-
[gsEventNames.
|
|
1826
|
+
[gsEventNames.textFilterChanged]: TextFilterChangedEvent;
|
|
1807
1827
|
}
|
|
1808
1828
|
}
|
|
1809
1829
|
|
|
@@ -1811,7 +1831,7 @@ declare global {
|
|
|
1811
1831
|
declare global {
|
|
1812
1832
|
namespace JSX {
|
|
1813
1833
|
interface IntrinsicElements {
|
|
1814
|
-
'gs-
|
|
1834
|
+
'gs-text-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1815
1835
|
}
|
|
1816
1836
|
}
|
|
1817
1837
|
}
|
|
@@ -1819,10 +1839,10 @@ declare global {
|
|
|
1819
1839
|
|
|
1820
1840
|
declare global {
|
|
1821
1841
|
interface HTMLElementTagNameMap {
|
|
1822
|
-
'gs-
|
|
1842
|
+
'gs-mutation-filter': MutationFilterComponent;
|
|
1823
1843
|
}
|
|
1824
1844
|
interface HTMLElementEventMap {
|
|
1825
|
-
[gsEventNames.
|
|
1845
|
+
[gsEventNames.mutationFilterChanged]: CustomEvent<MutationsFilter>;
|
|
1826
1846
|
}
|
|
1827
1847
|
}
|
|
1828
1848
|
|
|
@@ -1830,7 +1850,7 @@ declare global {
|
|
|
1830
1850
|
declare global {
|
|
1831
1851
|
namespace JSX {
|
|
1832
1852
|
interface IntrinsicElements {
|
|
1833
|
-
'gs-
|
|
1853
|
+
'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1834
1854
|
}
|
|
1835
1855
|
}
|
|
1836
1856
|
}
|