@genspectrum/dashboard-components 1.6.0 → 1.8.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 +82 -1
- package/dist/{NumberRangeFilterChangedEvent-CQ32Qy8D.js → NumberRangeFilterChangedEvent-BnPI-Asz.js} +17 -3
- package/dist/NumberRangeFilterChangedEvent-BnPI-Asz.js.map +1 -0
- package/dist/assets/{mutationOverTimeWorker-BmB6BvVM.js.map → mutationOverTimeWorker-DPS3tmOd.js.map} +1 -1
- package/dist/components.d.ts +52 -25
- package/dist/components.js +209 -75
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +48 -24
- package/dist/util.js +2 -1
- package/package.json +1 -1
- package/src/preact/MutationLinkTemplateContext.tsx +56 -0
- package/src/preact/components/annotated-mutation.stories.tsx +69 -17
- package/src/preact/components/annotated-mutation.tsx +45 -19
- package/src/preact/genomeViewer/CDSPlot.tsx +13 -2
- package/src/preact/genomeViewer/loadGff3.ts +6 -0
- package/src/preact/mutationComparison/mutation-comparison-table.tsx +3 -0
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +2 -1
- package/src/preact/mutationFilter/mutation-filter.tsx +24 -27
- package/src/preact/mutationFilter/parseAndValidateMutation.ts +11 -11
- package/src/preact/mutationFilter/parseMutation.spec.ts +32 -22
- package/src/preact/mutations/mutations-table.tsx +3 -0
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +7 -4
- package/src/preact/shared/stories/expectMutationAnnotation.ts +3 -1
- package/src/types.ts +17 -1
- package/src/utilEntrypoint.ts +4 -0
- package/src/utils/mutations.spec.ts +19 -0
- package/src/utils/mutations.ts +57 -10
- package/src/web-components/gs-app.spec-d.ts +7 -0
- package/src/web-components/gs-app.stories.ts +32 -2
- package/src/web-components/gs-app.ts +17 -0
- package/src/web-components/input/gs-mutation-filter.stories.ts +2 -1
- package/src/web-components/input/gs-mutation-filter.tsx +2 -6
- package/src/web-components/mutation-link-template-context.ts +13 -0
- package/src/web-components/mutationLinks.mdx +27 -0
- package/src/web-components/visualization/gs-mutation-comparison.tsx +18 -8
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +12 -1
- package/src/web-components/visualization/gs-mutations-over-time.tsx +24 -14
- package/src/web-components/visualization/gs-mutations.tsx +19 -9
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +17 -7
- package/standalone-bundle/assets/{mutationOverTimeWorker-B_xP8pIC.js.map → mutationOverTimeWorker-Dp-A14AP.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +7295 -7193
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/dist/NumberRangeFilterChangedEvent-CQ32Qy8D.js.map +0 -1
package/dist/components.d.ts
CHANGED
|
@@ -130,6 +130,16 @@ export declare class AppComponent extends LitElement {
|
|
|
130
130
|
aminoAcidMutations?: string[];
|
|
131
131
|
aminoAcidPositions?: string[];
|
|
132
132
|
}[];
|
|
133
|
+
/**
|
|
134
|
+
* Supply a link template for nucleotide and amino acid mutations.
|
|
135
|
+
* The template should include '{{mutation}}' where the mutation code will be inserted, for example:
|
|
136
|
+
*
|
|
137
|
+
* https://my-site.org/query?nucleotideMutation={{mutation}}
|
|
138
|
+
*/
|
|
139
|
+
mutationLinkTemplate: {
|
|
140
|
+
nucleotideMutation?: string;
|
|
141
|
+
aminoAcidMutation?: string;
|
|
142
|
+
};
|
|
133
143
|
/* Excluded from this release type: referenceGenome */
|
|
134
144
|
/* Excluded from this release type: updateReferenceGenome */
|
|
135
145
|
render(): TemplateResult<1> | undefined;
|
|
@@ -499,6 +509,7 @@ export declare class MutationComparisonComponent extends PreactLitAdapterWithGri
|
|
|
499
509
|
*/
|
|
500
510
|
pageSize: boolean | number;
|
|
501
511
|
/* Excluded from this release type: mutationAnnotations */
|
|
512
|
+
/* Excluded from this release type: mutationLinkTemplate */
|
|
502
513
|
render(): JSX_2.Element;
|
|
503
514
|
}
|
|
504
515
|
|
|
@@ -585,6 +596,19 @@ export declare class MutationFilterComponent extends PreactLitAdapter {
|
|
|
585
596
|
render(): JSX_2.Element;
|
|
586
597
|
}
|
|
587
598
|
|
|
599
|
+
declare type MutationLinkTemplate = default_2.infer<typeof mutationLinkTemplateSchema>;
|
|
600
|
+
|
|
601
|
+
declare const mutationLinkTemplateSchema: default_2.ZodObject<{
|
|
602
|
+
nucleotideMutation: default_2.ZodOptional<default_2.ZodString>;
|
|
603
|
+
aminoAcidMutation: default_2.ZodOptional<default_2.ZodString>;
|
|
604
|
+
}, "strip", default_2.ZodTypeAny, {
|
|
605
|
+
nucleotideMutation?: string | undefined;
|
|
606
|
+
aminoAcidMutation?: string | undefined;
|
|
607
|
+
}, {
|
|
608
|
+
nucleotideMutation?: string | undefined;
|
|
609
|
+
aminoAcidMutation?: string | undefined;
|
|
610
|
+
}>;
|
|
611
|
+
|
|
588
612
|
/**
|
|
589
613
|
* ## Context
|
|
590
614
|
*
|
|
@@ -687,6 +711,7 @@ export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
687
711
|
*/
|
|
688
712
|
pageSize: boolean | number;
|
|
689
713
|
/* Excluded from this release type: mutationAnnotations */
|
|
714
|
+
/* Excluded from this release type: mutationLinkTemplate */
|
|
690
715
|
render(): JSX_2.Element;
|
|
691
716
|
}
|
|
692
717
|
|
|
@@ -796,12 +821,13 @@ export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGrid
|
|
|
796
821
|
*/
|
|
797
822
|
pageSizes: number[] | number;
|
|
798
823
|
/* Excluded from this release type: mutationAnnotations */
|
|
824
|
+
/* Excluded from this release type: mutationLinkTemplate */
|
|
799
825
|
render(): JSX_2.Element;
|
|
800
826
|
}
|
|
801
827
|
|
|
802
828
|
declare type MutationType = default_2.infer<typeof mutationTypeSchema>;
|
|
803
829
|
|
|
804
|
-
declare const mutationTypeSchema: default_2.ZodEnum<["nucleotideMutations", "
|
|
830
|
+
declare const mutationTypeSchema: default_2.ZodEnum<["nucleotideMutations", "nucleotideInsertions", "aminoAcidMutations", "aminoAcidInsertions"]>;
|
|
805
831
|
|
|
806
832
|
/**
|
|
807
833
|
*
|
|
@@ -1595,6 +1621,7 @@ export declare class WastewaterMutationsOverTimeComponent extends PreactLitAdapt
|
|
|
1595
1621
|
*/
|
|
1596
1622
|
pageSizes: number[] | number;
|
|
1597
1623
|
/* Excluded from this release type: mutationAnnotations */
|
|
1624
|
+
/* Excluded from this release type: mutationLinkTemplate */
|
|
1598
1625
|
render(): JSX_2.Element;
|
|
1599
1626
|
}
|
|
1600
1627
|
|
|
@@ -1626,7 +1653,7 @@ declare global {
|
|
|
1626
1653
|
|
|
1627
1654
|
declare global {
|
|
1628
1655
|
interface HTMLElementTagNameMap {
|
|
1629
|
-
'gs-
|
|
1656
|
+
'gs-genome-data-viewer': GenomeDataViewerComponent;
|
|
1630
1657
|
}
|
|
1631
1658
|
}
|
|
1632
1659
|
|
|
@@ -1634,7 +1661,7 @@ declare global {
|
|
|
1634
1661
|
declare global {
|
|
1635
1662
|
namespace JSX {
|
|
1636
1663
|
interface IntrinsicElements {
|
|
1637
|
-
'gs-
|
|
1664
|
+
'gs-genome-data-viewer': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1638
1665
|
}
|
|
1639
1666
|
}
|
|
1640
1667
|
}
|
|
@@ -1656,22 +1683,6 @@ declare global {
|
|
|
1656
1683
|
}
|
|
1657
1684
|
|
|
1658
1685
|
|
|
1659
|
-
declare global {
|
|
1660
|
-
interface HTMLElementTagNameMap {
|
|
1661
|
-
'gs-genome-data-viewer': GenomeDataViewerComponent;
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
declare global {
|
|
1667
|
-
namespace JSX {
|
|
1668
|
-
interface IntrinsicElements {
|
|
1669
|
-
'gs-genome-data-viewer': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1670
|
-
}
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
1686
|
declare global {
|
|
1676
1687
|
interface HTMLElementTagNameMap {
|
|
1677
1688
|
'gs-mutations': MutationsComponent;
|
|
@@ -1800,6 +1811,22 @@ declare global {
|
|
|
1800
1811
|
}
|
|
1801
1812
|
|
|
1802
1813
|
|
|
1814
|
+
declare global {
|
|
1815
|
+
interface HTMLElementTagNameMap {
|
|
1816
|
+
'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
|
|
1821
|
+
declare global {
|
|
1822
|
+
namespace JSX {
|
|
1823
|
+
interface IntrinsicElements {
|
|
1824
|
+
'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
|
|
1803
1830
|
declare global {
|
|
1804
1831
|
interface HTMLElementTagNameMap {
|
|
1805
1832
|
'gs-date-range-filter': DateRangeFilterComponent;
|
|
@@ -1822,10 +1849,10 @@ declare global {
|
|
|
1822
1849
|
|
|
1823
1850
|
declare global {
|
|
1824
1851
|
interface HTMLElementTagNameMap {
|
|
1825
|
-
'gs-
|
|
1852
|
+
'gs-text-filter': TextFilterComponent;
|
|
1826
1853
|
}
|
|
1827
1854
|
interface HTMLElementEventMap {
|
|
1828
|
-
[gsEventNames.
|
|
1855
|
+
[gsEventNames.textFilterChanged]: TextFilterChangedEvent;
|
|
1829
1856
|
}
|
|
1830
1857
|
}
|
|
1831
1858
|
|
|
@@ -1833,7 +1860,7 @@ declare global {
|
|
|
1833
1860
|
declare global {
|
|
1834
1861
|
namespace JSX {
|
|
1835
1862
|
interface IntrinsicElements {
|
|
1836
|
-
'gs-
|
|
1863
|
+
'gs-text-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1837
1864
|
}
|
|
1838
1865
|
}
|
|
1839
1866
|
}
|
|
@@ -1841,10 +1868,10 @@ declare global {
|
|
|
1841
1868
|
|
|
1842
1869
|
declare global {
|
|
1843
1870
|
interface HTMLElementTagNameMap {
|
|
1844
|
-
'gs-
|
|
1871
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1845
1872
|
}
|
|
1846
1873
|
interface HTMLElementEventMap {
|
|
1847
|
-
[gsEventNames.
|
|
1874
|
+
[gsEventNames.locationChanged]: LocationChangedEvent;
|
|
1848
1875
|
}
|
|
1849
1876
|
}
|
|
1850
1877
|
|
|
@@ -1852,7 +1879,7 @@ declare global {
|
|
|
1852
1879
|
declare global {
|
|
1853
1880
|
namespace JSX {
|
|
1854
1881
|
interface IntrinsicElements {
|
|
1855
|
-
'gs-
|
|
1882
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1856
1883
|
}
|
|
1857
1884
|
}
|
|
1858
1885
|
}
|