@genspectrum/dashboard-components 1.5.0 → 1.7.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/README.md +4 -0
- package/custom-elements.json +37 -2
- package/dist/{NumberRangeFilterChangedEvent-CQ32Qy8D.js → NumberRangeFilterChangedEvent-BnPI-Asz.js} +17 -3
- package/dist/NumberRangeFilterChangedEvent-BnPI-Asz.js.map +1 -0
- package/dist/assets/{mutationOverTimeWorker-BJ_P2T8Y.js.map → mutationOverTimeWorker-DPS3tmOd.js.map} +1 -1
- package/dist/components.d.ts +50 -29
- package/dist/components.js +155 -61
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +53 -29
- package/dist/util.js +2 -1
- package/package.json +1 -1
- package/src/preact/genomeViewer/CDSPlot.tsx +13 -2
- package/src/preact/genomeViewer/loadGff3.ts +6 -0
- package/src/preact/mutationFilter/mutation-filter-info.tsx +2 -2
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +72 -1
- package/src/preact/mutationFilter/mutation-filter.tsx +75 -37
- package/src/preact/mutationFilter/parseAndValidateMutation.ts +11 -11
- package/src/preact/mutationFilter/parseMutation.spec.ts +32 -22
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +7 -4
- package/src/query/queryMutationsOverTime.ts +1 -1
- package/src/types.ts +17 -1
- package/src/utilEntrypoint.ts +4 -0
- package/src/utils/mutations.spec.ts +32 -0
- package/src/utils/mutations.ts +57 -10
- package/src/web-components/input/gs-mutation-filter.stories.ts +30 -1
- package/src/web-components/input/gs-mutation-filter.tsx +25 -2
- package/standalone-bundle/assets/{mutationOverTimeWorker-CkeGpKWp.js.map → mutationOverTimeWorker-Dp-A14AP.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +8187 -8116
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/dist/NumberRangeFilterChangedEvent-CQ32Qy8D.js.map +0 -1
package/dist/components.d.ts
CHANGED
|
@@ -537,6 +537,11 @@ export declare class MutationComparisonComponent extends PreactLitAdapterWithGri
|
|
|
537
537
|
*
|
|
538
538
|
* Examples: `ins_S:614:G`, `ins_614:G`
|
|
539
539
|
*
|
|
540
|
+
* ### Enabled mutation types
|
|
541
|
+
*
|
|
542
|
+
* After parsing, the entered mutation/insertion also has to match the enabled mutation types,
|
|
543
|
+
* which are configured with the `enabledMutationTypes` attribute.
|
|
544
|
+
*
|
|
540
545
|
* @fires {CustomEvent<{
|
|
541
546
|
* nucleotideMutations: string[],
|
|
542
547
|
* aminoAcidMutations: string[],
|
|
@@ -565,6 +570,18 @@ export declare class MutationFilterComponent extends PreactLitAdapter {
|
|
|
565
570
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.
|
|
566
571
|
*/
|
|
567
572
|
width: string;
|
|
573
|
+
/**
|
|
574
|
+
* Which mutation types this input will accept.
|
|
575
|
+
* Any (or all) of the following can be given in a list:
|
|
576
|
+
*
|
|
577
|
+
* - `nucleotideMutations`
|
|
578
|
+
* - `nucleotideInsertions`
|
|
579
|
+
* - `aminoAcidMutations`
|
|
580
|
+
* - `aminoAcidInsertions`
|
|
581
|
+
*
|
|
582
|
+
* By default or if none are given, all types are accepted.
|
|
583
|
+
*/
|
|
584
|
+
enabledMutationTypes: MutationType[] | undefined;
|
|
568
585
|
render(): JSX_2.Element;
|
|
569
586
|
}
|
|
570
587
|
|
|
@@ -782,6 +799,10 @@ export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGrid
|
|
|
782
799
|
render(): JSX_2.Element;
|
|
783
800
|
}
|
|
784
801
|
|
|
802
|
+
declare type MutationType = default_2.infer<typeof mutationTypeSchema>;
|
|
803
|
+
|
|
804
|
+
declare const mutationTypeSchema: default_2.ZodEnum<["nucleotideMutations", "nucleotideInsertions", "aminoAcidMutations", "aminoAcidInsertions"]>;
|
|
805
|
+
|
|
785
806
|
/**
|
|
786
807
|
*
|
|
787
808
|
* ## Context
|
|
@@ -1701,7 +1722,7 @@ declare global {
|
|
|
1701
1722
|
|
|
1702
1723
|
declare global {
|
|
1703
1724
|
interface HTMLElementTagNameMap {
|
|
1704
|
-
'gs-
|
|
1725
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
1705
1726
|
}
|
|
1706
1727
|
}
|
|
1707
1728
|
|
|
@@ -1709,7 +1730,7 @@ declare global {
|
|
|
1709
1730
|
declare global {
|
|
1710
1731
|
namespace JSX {
|
|
1711
1732
|
interface IntrinsicElements {
|
|
1712
|
-
'gs-
|
|
1733
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1713
1734
|
}
|
|
1714
1735
|
}
|
|
1715
1736
|
}
|
|
@@ -1717,7 +1738,7 @@ declare global {
|
|
|
1717
1738
|
|
|
1718
1739
|
declare global {
|
|
1719
1740
|
interface HTMLElementTagNameMap {
|
|
1720
|
-
'gs-
|
|
1741
|
+
'gs-mutations-over-time': MutationsOverTimeComponent;
|
|
1721
1742
|
}
|
|
1722
1743
|
}
|
|
1723
1744
|
|
|
@@ -1725,7 +1746,7 @@ declare global {
|
|
|
1725
1746
|
declare global {
|
|
1726
1747
|
namespace JSX {
|
|
1727
1748
|
interface IntrinsicElements {
|
|
1728
|
-
'gs-
|
|
1749
|
+
'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1729
1750
|
}
|
|
1730
1751
|
}
|
|
1731
1752
|
}
|
|
@@ -1733,7 +1754,7 @@ declare global {
|
|
|
1733
1754
|
|
|
1734
1755
|
declare global {
|
|
1735
1756
|
interface HTMLElementTagNameMap {
|
|
1736
|
-
'gs-
|
|
1757
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
1737
1758
|
}
|
|
1738
1759
|
}
|
|
1739
1760
|
|
|
@@ -1741,7 +1762,7 @@ declare global {
|
|
|
1741
1762
|
declare global {
|
|
1742
1763
|
namespace JSX {
|
|
1743
1764
|
interface IntrinsicElements {
|
|
1744
|
-
'gs-
|
|
1765
|
+
'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1745
1766
|
}
|
|
1746
1767
|
}
|
|
1747
1768
|
}
|
|
@@ -1765,26 +1786,11 @@ declare global {
|
|
|
1765
1786
|
|
|
1766
1787
|
declare global {
|
|
1767
1788
|
interface HTMLElementTagNameMap {
|
|
1768
|
-
'gs-
|
|
1789
|
+
'gs-date-range-filter': DateRangeFilterComponent;
|
|
1769
1790
|
}
|
|
1770
1791
|
interface HTMLElementEventMap {
|
|
1771
|
-
[gsEventNames.
|
|
1772
|
-
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
declare global {
|
|
1777
|
-
namespace JSX {
|
|
1778
|
-
interface IntrinsicElements {
|
|
1779
|
-
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1780
|
-
}
|
|
1781
|
-
}
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
declare global {
|
|
1786
|
-
interface HTMLElementTagNameMap {
|
|
1787
|
-
'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
|
|
1792
|
+
[gsEventNames.dateRangeFilterChanged]: CustomEvent<Record<string, string>>;
|
|
1793
|
+
[gsEventNames.dateRangeOptionChanged]: DateRangeOptionChangedEvent;
|
|
1788
1794
|
}
|
|
1789
1795
|
}
|
|
1790
1796
|
|
|
@@ -1792,7 +1798,7 @@ declare global {
|
|
|
1792
1798
|
declare global {
|
|
1793
1799
|
namespace JSX {
|
|
1794
1800
|
interface IntrinsicElements {
|
|
1795
|
-
'gs-
|
|
1801
|
+
'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1796
1802
|
}
|
|
1797
1803
|
}
|
|
1798
1804
|
}
|
|
@@ -1800,11 +1806,10 @@ declare global {
|
|
|
1800
1806
|
|
|
1801
1807
|
declare global {
|
|
1802
1808
|
interface HTMLElementTagNameMap {
|
|
1803
|
-
'gs-
|
|
1809
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1804
1810
|
}
|
|
1805
1811
|
interface HTMLElementEventMap {
|
|
1806
|
-
[gsEventNames.
|
|
1807
|
-
[gsEventNames.dateRangeOptionChanged]: DateRangeOptionChangedEvent;
|
|
1812
|
+
[gsEventNames.locationChanged]: LocationChangedEvent;
|
|
1808
1813
|
}
|
|
1809
1814
|
}
|
|
1810
1815
|
|
|
@@ -1812,7 +1817,7 @@ declare global {
|
|
|
1812
1817
|
declare global {
|
|
1813
1818
|
namespace JSX {
|
|
1814
1819
|
interface IntrinsicElements {
|
|
1815
|
-
'gs-
|
|
1820
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1816
1821
|
}
|
|
1817
1822
|
}
|
|
1818
1823
|
}
|
|
@@ -1895,6 +1900,22 @@ declare global {
|
|
|
1895
1900
|
}
|
|
1896
1901
|
|
|
1897
1902
|
|
|
1903
|
+
declare global {
|
|
1904
|
+
interface HTMLElementTagNameMap {
|
|
1905
|
+
'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
|
|
1910
|
+
declare global {
|
|
1911
|
+
namespace JSX {
|
|
1912
|
+
interface IntrinsicElements {
|
|
1913
|
+
'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
|
|
1898
1919
|
declare module 'chart.js' {
|
|
1899
1920
|
interface CartesianScaleTypeRegistry {
|
|
1900
1921
|
logit: {
|