@genspectrum/dashboard-components 0.15.0 → 0.16.1
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 +255 -57
- package/dist/components.d.ts +49 -32
- package/dist/components.js +361 -212
- package/dist/components.js.map +1 -1
- package/dist/style.css +9 -0
- package/dist/util.d.ts +43 -43
- package/package.json +1 -1
- package/src/preact/ReferenceGenomeContext.ts +16 -1
- package/src/preact/aggregatedData/aggregate-bar-chart.tsx +26 -5
- package/src/preact/aggregatedData/aggregate.stories.tsx +0 -1
- package/src/preact/aggregatedData/aggregate.tsx +5 -1
- package/src/preact/components/ReferenceGenomesAwaiter.tsx +1 -6
- package/src/preact/components/info.tsx +1 -0
- package/src/preact/components/resize-container.tsx +1 -1
- package/src/preact/mutationComparison/mutation-comparison-venn.tsx +4 -2
- package/src/preact/mutationComparison/mutation-comparison.stories.tsx +0 -1
- package/src/preact/mutationComparison/mutation-comparison.tsx +5 -1
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +17 -1
- package/src/preact/mutationFilter/mutation-filter.tsx +8 -0
- package/src/preact/mutations/mutations.stories.tsx +0 -1
- package/src/preact/mutations/mutations.tsx +1 -1
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts +70 -14
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +30 -7
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +56 -55
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +26 -39
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +22 -7
- package/src/preact/numberSequencesOverTime/number-sequences-over-time-bar-chart.tsx +8 -3
- package/src/preact/numberSequencesOverTime/number-sequences-over-time-line-chart.tsx +8 -3
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +3 -1
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +18 -3
- package/src/preact/prevalenceOverTime/prevalence-over-time-bar-chart.tsx +48 -35
- package/src/preact/prevalenceOverTime/prevalence-over-time-bubble-chart.tsx +83 -70
- package/src/preact/prevalenceOverTime/prevalence-over-time-line-chart.tsx +48 -37
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +0 -3
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +6 -1
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage-chart.tsx +31 -23
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +0 -1
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +5 -1
- package/src/preact/sequencesByLocation/__mockData__/worldAtlas.json +1 -0
- package/src/preact/{map → sequencesByLocation}/sequences-by-location-map.tsx +6 -3
- package/src/preact/{map → sequencesByLocation}/sequences-by-location-table.tsx +1 -1
- package/src/preact/{map → sequencesByLocation}/sequences-by-location.stories.tsx +58 -1
- package/src/preact/{map → sequencesByLocation}/sequences-by-location.tsx +10 -1
- package/src/preact/shared/aspectRatio/AspectRatio.tsx +13 -0
- package/src/preact/shared/charts/getMaintainAspectRatio.ts +3 -0
- package/src/preact/statistic/statistics.stories.tsx +0 -1
- package/src/preact/statistic/statistics.tsx +4 -4
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +0 -1
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +1 -1
- package/src/query/computeMapLocationData.spec.ts +1 -1
- package/src/query/computeMapLocationData.ts +1 -1
- package/src/query/querySequencesByLocationData.ts +1 -1
- package/src/utilEntrypoint.ts +1 -1
- package/src/web-components/PreactLitAdapter.tsx +2 -5
- package/src/web-components/ResizeContainer.mdx +4 -1
- package/src/web-components/gs-app.ts +2 -4
- package/src/web-components/visualization/gs-aggregate.stories.ts +13 -6
- package/src/web-components/visualization/gs-aggregate.tsx +1 -1
- package/src/web-components/visualization/gs-mutation-comparison.stories.ts +8 -1
- package/src/web-components/visualization/gs-mutation-comparison.tsx +1 -1
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +24 -1
- package/src/web-components/visualization/gs-mutations-over-time.tsx +30 -1
- package/src/web-components/visualization/gs-mutations.stories.ts +8 -1
- package/src/web-components/visualization/gs-mutations.tsx +1 -1
- package/src/web-components/visualization/gs-number-sequences-over-time.stories.ts +11 -1
- package/src/web-components/visualization/gs-number-sequences-over-time.tsx +1 -1
- package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +8 -2
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +1 -1
- package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +8 -1
- package/src/web-components/visualization/gs-relative-growth-advantage.tsx +1 -1
- package/src/web-components/visualization/gs-sequences-by-location.stories.ts +13 -7
- package/src/web-components/visualization/gs-sequences-by-location.tsx +6 -3
- package/src/web-components/visualization/gs-statistics.stories.ts +0 -1
- package/src/web-components/visualization/gs-statistics.tsx +1 -1
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +9 -1
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +1 -1
- package/standalone-bundle/dashboard-components.js +5817 -5706
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/src/preact/map/__mockData__/worldAtlas.json +0 -497127
- /package/src/preact/{map → sequencesByLocation}/__mockData__/aggregatedGermany.json +0 -0
- /package/src/preact/{map → sequencesByLocation}/__mockData__/aggregatedWorld.json +0 -0
- /package/src/preact/{map → sequencesByLocation}/__mockData__/germanyMap.json +0 -0
- /package/src/preact/{map → sequencesByLocation}/__mockData__/howToGenerateWorldMap.md +0 -0
- /package/src/preact/{map → sequencesByLocation}/leafletStyleModifications.css +0 -0
- /package/src/preact/{map → sequencesByLocation}/loadMapSource.tsx +0 -0
package/dist/components.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export declare class AggregateComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
67
67
|
*
|
|
68
68
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
69
69
|
*/
|
|
70
|
-
height: string;
|
|
70
|
+
height: string | undefined;
|
|
71
71
|
/**
|
|
72
72
|
* The field by which the table is initially sorted.
|
|
73
73
|
* Must be one of the fields specified in the fields property, 'count', or 'proportion'.
|
|
@@ -396,7 +396,7 @@ export declare class MutationComparisonComponent extends PreactLitAdapterWithGri
|
|
|
396
396
|
*
|
|
397
397
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
398
398
|
*/
|
|
399
|
-
height: string;
|
|
399
|
+
height: string | undefined;
|
|
400
400
|
/**
|
|
401
401
|
* The maximum number of rows to display in the table view.
|
|
402
402
|
* Set to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).
|
|
@@ -561,7 +561,7 @@ export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
561
561
|
*
|
|
562
562
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
563
563
|
*/
|
|
564
|
-
height: string;
|
|
564
|
+
height: string | undefined;
|
|
565
565
|
/**
|
|
566
566
|
* The maximum number of rows to display in the table view.
|
|
567
567
|
* Set to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).
|
|
@@ -594,6 +594,10 @@ export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
594
594
|
*
|
|
595
595
|
* The number of rows is limited to 100.
|
|
596
596
|
* If there are more, the component will only show 100 mutations and notify the user.
|
|
597
|
+
*
|
|
598
|
+
* Users can filter the displayed rows by mean proportion via a slider in the toolbar.
|
|
599
|
+
* The mean proportion of each row is calculated by LAPIS over the whole data range that the component displays.
|
|
600
|
+
* The initial mean proportion can be set via `initialMeanProportionInterval`.
|
|
597
601
|
*/
|
|
598
602
|
export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
|
|
599
603
|
/**
|
|
@@ -624,7 +628,7 @@ export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGrid
|
|
|
624
628
|
*
|
|
625
629
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
626
630
|
*/
|
|
627
|
-
height: string;
|
|
631
|
+
height: string | undefined;
|
|
628
632
|
/**
|
|
629
633
|
* The granularity of the time axis.
|
|
630
634
|
*/
|
|
@@ -637,6 +641,19 @@ export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGrid
|
|
|
637
641
|
* Must be a field of type `date` in LAPIS.
|
|
638
642
|
*/
|
|
639
643
|
lapisDateField: string;
|
|
644
|
+
/**
|
|
645
|
+
* If provided, only the given mutations will be displayed.
|
|
646
|
+
* The mutations must be provided in the exact format as they would be displayed by the component.
|
|
647
|
+
*/
|
|
648
|
+
displayMutations: string[] | undefined;
|
|
649
|
+
/**
|
|
650
|
+
* The initial proportion interval for the grid view.
|
|
651
|
+
* The values must be between 0 and 1, inclusive.
|
|
652
|
+
*/
|
|
653
|
+
initialMeanProportionInterval: {
|
|
654
|
+
min: number;
|
|
655
|
+
max: number;
|
|
656
|
+
};
|
|
640
657
|
render(): JSX_2.Element;
|
|
641
658
|
}
|
|
642
659
|
|
|
@@ -694,7 +711,7 @@ export declare class NumberSequencesOverTimeComponent extends PreactLitAdapterWi
|
|
|
694
711
|
*
|
|
695
712
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
696
713
|
*/
|
|
697
|
-
height: string;
|
|
714
|
+
height: string | undefined;
|
|
698
715
|
/**
|
|
699
716
|
* The granularity of the time axis.
|
|
700
717
|
*/
|
|
@@ -831,7 +848,7 @@ export declare class PrevalenceOverTimeComponent extends PreactLitAdapterWithGri
|
|
|
831
848
|
*
|
|
832
849
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
833
850
|
*/
|
|
834
|
-
height: string;
|
|
851
|
+
height: string | undefined;
|
|
835
852
|
/**
|
|
836
853
|
* Required.
|
|
837
854
|
*
|
|
@@ -974,7 +991,7 @@ export declare class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
|
|
|
974
991
|
*
|
|
975
992
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
976
993
|
*/
|
|
977
|
-
height: string;
|
|
994
|
+
height: string | undefined;
|
|
978
995
|
/**
|
|
979
996
|
* Required.
|
|
980
997
|
*
|
|
@@ -1130,7 +1147,7 @@ export declare class SequencesByLocationComponent extends PreactLitAdapterWithGr
|
|
|
1130
1147
|
*
|
|
1131
1148
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
1132
1149
|
*/
|
|
1133
|
-
height: string;
|
|
1150
|
+
height: string | undefined;
|
|
1134
1151
|
/**
|
|
1135
1152
|
A list of tabs with views that this component should provide.
|
|
1136
1153
|
*/
|
|
@@ -1198,7 +1215,7 @@ export declare class StatisticsComponent extends PreactLitAdapterWithGridJsStyle
|
|
|
1198
1215
|
*
|
|
1199
1216
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
1200
1217
|
*/
|
|
1201
|
-
height: string;
|
|
1218
|
+
height: string | undefined;
|
|
1202
1219
|
render(): JSX_2.Element;
|
|
1203
1220
|
}
|
|
1204
1221
|
|
|
@@ -1306,7 +1323,7 @@ export declare class WastewaterMutationsOverTimeComponent extends PreactLitAdapt
|
|
|
1306
1323
|
*
|
|
1307
1324
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
1308
1325
|
*/
|
|
1309
|
-
height: string;
|
|
1326
|
+
height: string | undefined;
|
|
1310
1327
|
/**
|
|
1311
1328
|
* The maximum number of grid rows to display.
|
|
1312
1329
|
*/
|
|
@@ -1342,7 +1359,7 @@ declare global {
|
|
|
1342
1359
|
|
|
1343
1360
|
declare global {
|
|
1344
1361
|
interface HTMLElementTagNameMap {
|
|
1345
|
-
'gs-
|
|
1362
|
+
'gs-mutation-comparison-component': MutationComparisonComponent;
|
|
1346
1363
|
}
|
|
1347
1364
|
}
|
|
1348
1365
|
|
|
@@ -1350,7 +1367,7 @@ declare global {
|
|
|
1350
1367
|
declare global {
|
|
1351
1368
|
namespace JSX {
|
|
1352
1369
|
interface IntrinsicElements {
|
|
1353
|
-
'gs-
|
|
1370
|
+
'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1354
1371
|
}
|
|
1355
1372
|
}
|
|
1356
1373
|
}
|
|
@@ -1358,7 +1375,7 @@ declare global {
|
|
|
1358
1375
|
|
|
1359
1376
|
declare global {
|
|
1360
1377
|
interface HTMLElementTagNameMap {
|
|
1361
|
-
'gs-
|
|
1378
|
+
'gs-mutations-component': MutationsComponent;
|
|
1362
1379
|
}
|
|
1363
1380
|
}
|
|
1364
1381
|
|
|
@@ -1366,7 +1383,7 @@ declare global {
|
|
|
1366
1383
|
declare global {
|
|
1367
1384
|
namespace JSX {
|
|
1368
1385
|
interface IntrinsicElements {
|
|
1369
|
-
'gs-
|
|
1386
|
+
'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1370
1387
|
}
|
|
1371
1388
|
}
|
|
1372
1389
|
}
|
|
@@ -1374,7 +1391,7 @@ declare global {
|
|
|
1374
1391
|
|
|
1375
1392
|
declare global {
|
|
1376
1393
|
interface HTMLElementTagNameMap {
|
|
1377
|
-
'gs-
|
|
1394
|
+
'gs-prevalence-over-time': PrevalenceOverTimeComponent;
|
|
1378
1395
|
}
|
|
1379
1396
|
}
|
|
1380
1397
|
|
|
@@ -1382,7 +1399,7 @@ declare global {
|
|
|
1382
1399
|
declare global {
|
|
1383
1400
|
namespace JSX {
|
|
1384
1401
|
interface IntrinsicElements {
|
|
1385
|
-
'gs-
|
|
1402
|
+
'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1386
1403
|
}
|
|
1387
1404
|
}
|
|
1388
1405
|
}
|
|
@@ -1390,7 +1407,7 @@ declare global {
|
|
|
1390
1407
|
|
|
1391
1408
|
declare global {
|
|
1392
1409
|
interface HTMLElementTagNameMap {
|
|
1393
|
-
'gs-
|
|
1410
|
+
'gs-aggregate': AggregateComponent;
|
|
1394
1411
|
}
|
|
1395
1412
|
}
|
|
1396
1413
|
|
|
@@ -1398,7 +1415,7 @@ declare global {
|
|
|
1398
1415
|
declare global {
|
|
1399
1416
|
namespace JSX {
|
|
1400
1417
|
interface IntrinsicElements {
|
|
1401
|
-
'gs-
|
|
1418
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1402
1419
|
}
|
|
1403
1420
|
}
|
|
1404
1421
|
}
|
|
@@ -1438,7 +1455,7 @@ declare global {
|
|
|
1438
1455
|
|
|
1439
1456
|
declare global {
|
|
1440
1457
|
interface HTMLElementTagNameMap {
|
|
1441
|
-
'gs-
|
|
1458
|
+
'gs-mutations-over-time': MutationsOverTimeComponent;
|
|
1442
1459
|
}
|
|
1443
1460
|
}
|
|
1444
1461
|
|
|
@@ -1446,7 +1463,7 @@ declare global {
|
|
|
1446
1463
|
declare global {
|
|
1447
1464
|
namespace JSX {
|
|
1448
1465
|
interface IntrinsicElements {
|
|
1449
|
-
'gs-
|
|
1466
|
+
'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1450
1467
|
}
|
|
1451
1468
|
}
|
|
1452
1469
|
}
|
|
@@ -1454,7 +1471,7 @@ declare global {
|
|
|
1454
1471
|
|
|
1455
1472
|
declare global {
|
|
1456
1473
|
interface HTMLElementTagNameMap {
|
|
1457
|
-
'gs-
|
|
1474
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
1458
1475
|
}
|
|
1459
1476
|
}
|
|
1460
1477
|
|
|
@@ -1462,7 +1479,7 @@ declare global {
|
|
|
1462
1479
|
declare global {
|
|
1463
1480
|
namespace JSX {
|
|
1464
1481
|
interface IntrinsicElements {
|
|
1465
|
-
'gs-
|
|
1482
|
+
'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1466
1483
|
}
|
|
1467
1484
|
}
|
|
1468
1485
|
}
|
|
@@ -1470,7 +1487,7 @@ declare global {
|
|
|
1470
1487
|
|
|
1471
1488
|
declare global {
|
|
1472
1489
|
interface HTMLElementTagNameMap {
|
|
1473
|
-
'gs-
|
|
1490
|
+
'gs-statistics': StatisticsComponent;
|
|
1474
1491
|
}
|
|
1475
1492
|
}
|
|
1476
1493
|
|
|
@@ -1478,7 +1495,7 @@ declare global {
|
|
|
1478
1495
|
declare global {
|
|
1479
1496
|
namespace JSX {
|
|
1480
1497
|
interface IntrinsicElements {
|
|
1481
|
-
'gs-
|
|
1498
|
+
'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1482
1499
|
}
|
|
1483
1500
|
}
|
|
1484
1501
|
}
|
|
@@ -1486,7 +1503,7 @@ declare global {
|
|
|
1486
1503
|
|
|
1487
1504
|
declare global {
|
|
1488
1505
|
interface HTMLElementTagNameMap {
|
|
1489
|
-
'gs-
|
|
1506
|
+
'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
|
|
1490
1507
|
}
|
|
1491
1508
|
}
|
|
1492
1509
|
|
|
@@ -1494,7 +1511,7 @@ declare global {
|
|
|
1494
1511
|
declare global {
|
|
1495
1512
|
namespace JSX {
|
|
1496
1513
|
interface IntrinsicElements {
|
|
1497
|
-
'gs-
|
|
1514
|
+
'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1498
1515
|
}
|
|
1499
1516
|
}
|
|
1500
1517
|
}
|
|
@@ -1560,10 +1577,10 @@ declare global {
|
|
|
1560
1577
|
|
|
1561
1578
|
declare global {
|
|
1562
1579
|
interface HTMLElementTagNameMap {
|
|
1563
|
-
'gs-
|
|
1580
|
+
'gs-mutation-filter': MutationFilterComponent;
|
|
1564
1581
|
}
|
|
1565
1582
|
interface HTMLElementEventMap {
|
|
1566
|
-
'gs-
|
|
1583
|
+
'gs-mutation-filter-changed': CustomEvent<MutationsFilter>;
|
|
1567
1584
|
}
|
|
1568
1585
|
}
|
|
1569
1586
|
|
|
@@ -1571,7 +1588,7 @@ declare global {
|
|
|
1571
1588
|
declare global {
|
|
1572
1589
|
namespace JSX {
|
|
1573
1590
|
interface IntrinsicElements {
|
|
1574
|
-
'gs-
|
|
1591
|
+
'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1575
1592
|
}
|
|
1576
1593
|
}
|
|
1577
1594
|
}
|
|
@@ -1579,10 +1596,10 @@ declare global {
|
|
|
1579
1596
|
|
|
1580
1597
|
declare global {
|
|
1581
1598
|
interface HTMLElementTagNameMap {
|
|
1582
|
-
'gs-
|
|
1599
|
+
'gs-lineage-filter': LineageFilterComponent;
|
|
1583
1600
|
}
|
|
1584
1601
|
interface HTMLElementEventMap {
|
|
1585
|
-
'gs-
|
|
1602
|
+
'gs-lineage-filter-changed': LineageFilterChangedEvent;
|
|
1586
1603
|
}
|
|
1587
1604
|
}
|
|
1588
1605
|
|
|
@@ -1590,7 +1607,7 @@ declare global {
|
|
|
1590
1607
|
declare global {
|
|
1591
1608
|
namespace JSX {
|
|
1592
1609
|
interface IntrinsicElements {
|
|
1593
|
-
'gs-
|
|
1610
|
+
'gs-lineage-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1594
1611
|
}
|
|
1595
1612
|
}
|
|
1596
1613
|
}
|