@genspectrum/dashboard-components 0.19.5 → 0.19.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 (57) hide show
  1. package/README.md +24 -8
  2. package/custom-elements.json +101 -2
  3. package/dist/{LineageFilterChangedEvent-GgkxoF3X.js → NumberRangeFilterChangedEvent-RZ8haPHq.js} +31 -5
  4. package/dist/NumberRangeFilterChangedEvent-RZ8haPHq.js.map +1 -0
  5. package/dist/assets/mutationOverTimeWorker-DQGh08AS.js.map +1 -0
  6. package/dist/components.d.ts +43 -12
  7. package/dist/components.js +78 -63
  8. package/dist/components.js.map +1 -1
  9. package/dist/util.d.ts +21 -10
  10. package/dist/util.js +3 -1
  11. package/package.json +1 -1
  12. package/src/preact/aggregatedData/aggregate.stories.tsx +6 -0
  13. package/src/preact/aggregatedData/aggregate.tsx +10 -1
  14. package/src/preact/components/tabs.tsx +4 -4
  15. package/src/preact/genomeViewer/CDSPlot.tsx +4 -1
  16. package/src/preact/genomeViewer/genome-data-viewer.stories.tsx +6 -0
  17. package/src/preact/mutationComparison/mutation-comparison.stories.tsx +6 -0
  18. package/src/preact/mutationComparison/mutation-comparison.tsx +4 -0
  19. package/src/preact/mutations/mutations.stories.tsx +6 -0
  20. package/src/preact/mutations/mutations.tsx +4 -1
  21. package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +6 -0
  22. package/src/preact/mutationsOverTime/mutations-over-time.tsx +4 -1
  23. package/src/preact/numberRangeFilter/NumberRangeFilterChangedEvent.ts +1 -1
  24. package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +3 -1
  25. package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +4 -0
  26. package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +6 -0
  27. package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +4 -1
  28. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +6 -0
  29. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +4 -1
  30. package/src/preact/sequencesByLocation/sequences-by-location.stories.tsx +6 -0
  31. package/src/preact/sequencesByLocation/sequences-by-location.tsx +4 -0
  32. package/src/preact/shared/stories/expectFinishedLoadingEvent.ts +12 -0
  33. package/src/preact/statistic/statistics.stories.tsx +6 -0
  34. package/src/preact/statistic/statistics.tsx +4 -1
  35. package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +2 -0
  36. package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +4 -1
  37. package/src/utilEntrypoint.ts +6 -1
  38. package/src/utils/gsEventNames.ts +1 -0
  39. package/src/utils/useDispatchFinishedLoadingEvent.ts +19 -0
  40. package/src/web-components/input/gs-number-range-filter.tsx +2 -2
  41. package/src/web-components/visualization/gs-aggregate.tsx +3 -0
  42. package/src/web-components/visualization/gs-genome-data-viewer.tsx +2 -0
  43. package/src/web-components/visualization/gs-mutation-comparison.tsx +3 -0
  44. package/src/web-components/visualization/gs-mutations-over-time.tsx +3 -0
  45. package/src/web-components/visualization/gs-mutations.tsx +2 -0
  46. package/src/web-components/visualization/gs-number-sequences-over-time.tsx +3 -0
  47. package/src/web-components/visualization/gs-prevalence-over-time.tsx +3 -0
  48. package/src/web-components/visualization/gs-relative-growth-advantage.tsx +3 -0
  49. package/src/web-components/visualization/gs-sequences-by-location.tsx +3 -0
  50. package/src/web-components/visualization/gs-statistics.tsx +3 -0
  51. package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +3 -0
  52. package/standalone-bundle/assets/mutationOverTimeWorker-DAf2_NiP.js.map +1 -0
  53. package/standalone-bundle/dashboard-components.js +6980 -6945
  54. package/standalone-bundle/dashboard-components.js.map +1 -1
  55. package/dist/LineageFilterChangedEvent-GgkxoF3X.js.map +0 -1
  56. package/dist/assets/mutationOverTimeWorker-ChQTFL68.js.map +0 -1
  57. package/standalone-bundle/assets/mutationOverTimeWorker-jChgWnwp.js.map +0 -1
@@ -32,6 +32,9 @@ import { TemplateResult } from 'lit-html';
32
32
  *
33
33
  * The chart shows the bars with the highest aggregated `count`.
34
34
  * The number of bars can be adjusted with the `maxNumberOfBars` property.
35
+ *
36
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
37
+ * Fired when the component has finished loading the required data from LAPIS.
35
38
  */
36
39
  export declare class AggregateComponent extends PreactLitAdapterWithGridJsStyles {
37
40
  /**
@@ -239,6 +242,8 @@ export { ErrorEvent_2 as ErrorEvent }
239
242
  * This component shows the Coding Sequence (CDS) of a genome using a gff3 file as input.
240
243
  * The CDS shows which parts of the genome are translated into proteins.
241
244
  *
245
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
246
+ * Fired when the component has finished loading the required data.
242
247
  */
243
248
  export declare class GenomeDataViewerComponent extends PreactLitAdapter {
244
249
  /**
@@ -437,6 +442,9 @@ declare const mutationAnnotationsSchema: default_2.ZodArray<default_2.ZodObject<
437
442
  * selected proportion interval.
438
443
  * Thus, changing the proportion interval may change a mutations from being "common" between the datasets
439
444
  * to being "for one dataset only".
445
+ *
446
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
447
+ * Fired when the component has finished loading the required data from LAPIS.
440
448
  */
441
449
  export declare class MutationComparisonComponent extends PreactLitAdapterWithGridJsStyles {
442
450
  /**
@@ -606,6 +614,8 @@ export declare class MutationFilterComponent extends PreactLitAdapter {
606
614
  *
607
615
  * The insertions view shows the count of all insertions for the dataset.
608
616
  *
617
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
618
+ * Fired when the component has finished loading the required data from LAPIS.
609
619
  */
610
620
  export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles {
611
621
  /**
@@ -688,6 +698,9 @@ export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles
688
698
  * Users can filter the displayed rows by mean proportion via a slider in the toolbar.
689
699
  * The mean proportion of each row is calculated by LAPIS over the whole data range that the component displays.
690
700
  * The initial mean proportion can be set via `initialMeanProportionInterval`.
701
+ *
702
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
703
+ * Fired when the component has finished loading the required data from LAPIS.
691
704
  */
692
705
  export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
693
706
  /**
@@ -762,7 +775,7 @@ export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGrid
762
775
  * The slider must be restricted to a certain range.
763
776
  * Users can however still enter values outside of this range in the text input fields.
764
777
  *
765
- * @fires {CustomEvent<Record<string, string | undefined>>} gs-number-range-filter-changed
778
+ * @fires {CustomEvent<Record<string, number | undefined>>} gs-number-range-filter-changed
766
779
  * Fired when the slider is released,
767
780
  * `onBlur` on the input fields after the user has typed a valid range in the input fields,
768
781
  * or when one of the input fields is cleared.
@@ -782,7 +795,7 @@ export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGrid
782
795
  * }
783
796
  * ```
784
797
  *
785
- * @fires {CustomEvent<Record<string, string | undefined>>} gs-number-range-value-changed
798
+ * @fires {CustomEvent<Record<string, number | undefined>>} gs-number-range-value-changed
786
799
  * Similar to the `gs-number-range-filter-changed` event,
787
800
  * but contains an `event.detail` that has a fixed format:
788
801
  * ```
@@ -860,6 +873,9 @@ export declare class NumberRangeFilterComponent extends PreactLitAdapter {
860
873
  * Thus, the `lapisFilter` implicitly also defines the range that is shown on the x-axis.
861
874
  * If you want to restrict the x-axis to a smaller date range,
862
875
  * then you need to set appropriate filter values in the `lapisFilter`.
876
+ *
877
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
878
+ * Fired when the component has finished loading the required data from LAPIS.
863
879
  */
864
880
  export declare class NumberSequencesOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
865
881
  /**
@@ -974,6 +990,9 @@ declare abstract class PreactLitAdapterWithGridJsStyles extends PreactLitAdapter
974
990
  * ### Table View
975
991
  *
976
992
  * Displays the prevalence over time as a table with one row per time point.
993
+ *
994
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
995
+ * Fired when the component has finished loading the required data from LAPIS.
977
996
  */
978
997
  export declare class PrevalenceOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
979
998
  /**
@@ -1141,6 +1160,9 @@ declare const referenceGenomeResponse: default_2.ZodObject<{
1141
1160
  * The dots in the plot show the proportions of the focal variant (defined by the `numeratorFilter`) to the baseline variant (defined by the `denominatorFilter`)
1142
1161
  * for every day as observed in the data.
1143
1162
  * The line shows a logistic curve fitted to the data points, including a 95% confidence interval.
1163
+ *
1164
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
1165
+ * Fired when the component has finished loading the required data from LAPIS.
1144
1166
  */
1145
1167
  export declare class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
1146
1168
  /**
@@ -1291,6 +1313,9 @@ export declare class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
1291
1313
  * - `lapisLocationField`,
1292
1314
  * - `count` (the number of samples in this location matching the `lapisFilter`),
1293
1315
  * - `proportion` (`count` / sum of the `count` of all locations).
1316
+ *
1317
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
1318
+ * Fired when the component has finished loading the required data from LAPIS.
1294
1319
  */
1295
1320
  export declare class SequencesByLocationComponent extends PreactLitAdapterWithGridJsStyles {
1296
1321
  static styles: CSSResult[];
@@ -1374,6 +1399,9 @@ export declare class SequencesByLocationComponent extends PreactLitAdapterWithGr
1374
1399
  *
1375
1400
  * This component displays general statistics (number of sequences, overall proportion)
1376
1401
  * for a given numerator and denominator filter.
1402
+ *
1403
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
1404
+ * Fired when the component has finished loading the required data from LAPIS.
1377
1405
  */
1378
1406
  export declare class StatisticsComponent extends PreactLitAdapterWithGridJsStyles {
1379
1407
  /**
@@ -1485,6 +1513,9 @@ export declare class UserFacingError extends Error {
1485
1513
  * This component also assumes that the LAPIS instance has the field `date` which can be used for the time axis.
1486
1514
  *
1487
1515
  * @slot infoText - Additional information text to be shown in the info modal (the "?" button).
1516
+ *
1517
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
1518
+ * Fired when the component has finished loading the required data from LAPIS.
1488
1519
  */
1489
1520
  export declare class WastewaterMutationsOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
1490
1521
  /**
@@ -1568,7 +1599,7 @@ declare global {
1568
1599
 
1569
1600
  declare global {
1570
1601
  interface HTMLElementTagNameMap {
1571
- 'gs-mutation-comparison-component': MutationComparisonComponent;
1602
+ 'gs-mutations-component': MutationsComponent;
1572
1603
  }
1573
1604
  }
1574
1605
 
@@ -1576,7 +1607,7 @@ declare global {
1576
1607
  declare global {
1577
1608
  namespace JSX {
1578
1609
  interface IntrinsicElements {
1579
- 'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1610
+ 'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1580
1611
  }
1581
1612
  }
1582
1613
  }
@@ -1584,7 +1615,7 @@ declare global {
1584
1615
 
1585
1616
  declare global {
1586
1617
  interface HTMLElementTagNameMap {
1587
- 'gs-mutations-component': MutationsComponent;
1618
+ 'gs-mutation-comparison-component': MutationComparisonComponent;
1588
1619
  }
1589
1620
  }
1590
1621
 
@@ -1592,7 +1623,7 @@ declare global {
1592
1623
  declare global {
1593
1624
  namespace JSX {
1594
1625
  interface IntrinsicElements {
1595
- 'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1626
+ 'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1596
1627
  }
1597
1628
  }
1598
1629
  }
@@ -1748,10 +1779,10 @@ declare global {
1748
1779
 
1749
1780
  declare global {
1750
1781
  interface HTMLElementTagNameMap {
1751
- 'gs-text-filter': TextFilterComponent;
1782
+ 'gs-location-filter': LocationFilterComponent;
1752
1783
  }
1753
1784
  interface HTMLElementEventMap {
1754
- [gsEventNames.textFilterChanged]: TextFilterChangedEvent;
1785
+ [gsEventNames.locationChanged]: LocationChangedEvent;
1755
1786
  }
1756
1787
  }
1757
1788
 
@@ -1759,7 +1790,7 @@ declare global {
1759
1790
  declare global {
1760
1791
  namespace JSX {
1761
1792
  interface IntrinsicElements {
1762
- 'gs-text-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1793
+ 'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1763
1794
  }
1764
1795
  }
1765
1796
  }
@@ -1767,10 +1798,10 @@ declare global {
1767
1798
 
1768
1799
  declare global {
1769
1800
  interface HTMLElementTagNameMap {
1770
- 'gs-location-filter': LocationFilterComponent;
1801
+ 'gs-text-filter': TextFilterComponent;
1771
1802
  }
1772
1803
  interface HTMLElementEventMap {
1773
- [gsEventNames.locationChanged]: LocationChangedEvent;
1804
+ [gsEventNames.textFilterChanged]: TextFilterChangedEvent;
1774
1805
  }
1775
1806
  }
1776
1807
 
@@ -1778,7 +1809,7 @@ declare global {
1778
1809
  declare global {
1779
1810
  namespace JSX {
1780
1811
  interface IntrinsicElements {
1781
- 'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1812
+ 'gs-text-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1782
1813
  }
1783
1814
  }
1784
1815
  }