@genspectrum/dashboard-components 0.16.1 → 0.16.3
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 +72 -7
- package/dist/assets/mutationOverTimeWorker-DJcZmEH9.js.map +1 -0
- package/dist/components.d.ts +63 -25
- package/dist/components.js +310 -151
- package/dist/components.js.map +1 -1
- package/dist/style.css +16 -0
- package/dist/util.d.ts +25 -25
- package/package.json +4 -2
- package/src/preact/MutationAnnotationsContext.spec.tsx +58 -0
- package/src/preact/MutationAnnotationsContext.tsx +72 -0
- package/src/preact/components/annotated-mutation.stories.tsx +163 -0
- package/src/preact/components/annotated-mutation.tsx +80 -0
- package/src/preact/components/downshift-combobox.tsx +6 -4
- package/src/preact/components/error-display.tsx +9 -9
- package/src/preact/components/info.tsx +6 -13
- package/src/preact/components/modal.stories.tsx +7 -19
- package/src/preact/components/modal.tsx +35 -4
- package/src/preact/mutations/mutations-table.tsx +14 -2
- package/src/preact/mutations/mutations.stories.tsx +40 -2
- package/src/preact/mutations/mutations.tsx +1 -0
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +19 -8
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +34 -5
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +13 -1
- package/src/preact/sequencesByLocation/sequences-by-location-map.tsx +28 -30
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +7 -2
- package/src/web-components/gs-app.spec-d.ts +10 -0
- package/src/web-components/gs-app.stories.ts +24 -6
- package/src/web-components/gs-app.ts +17 -0
- package/src/web-components/mutation-annotations-context.ts +16 -0
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +18 -1
- package/src/web-components/visualization/gs-mutations-over-time.tsx +22 -11
- package/src/web-components/visualization/gs-mutations.stories.ts +18 -1
- package/src/web-components/visualization/gs-mutations.tsx +20 -9
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +11 -1
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +18 -7
- package/standalone-bundle/assets/mutationOverTimeWorker-CERZSdcA.js.map +1 -0
- package/standalone-bundle/dashboard-components.js +8094 -7963
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/dist/assets/mutationOverTimeWorker-BL50C-yi.js.map +0 -1
- package/standalone-bundle/assets/mutationOverTimeWorker-CFB5-Mdk.js.map +0 -1
package/dist/components.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ export declare class AggregateComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
97
97
|
* It makes use of the [Lit Context](https://lit.dev/docs/data/context/) to
|
|
98
98
|
* - provide the URL to the LAPIS instance to all its children
|
|
99
99
|
* - fetch the reference genomes from LAPIS and provide it to all its children
|
|
100
|
+
* - distribute the mutation annotations config to its children
|
|
100
101
|
*
|
|
101
102
|
* This will show an error message if the reference genome cannot be fetched
|
|
102
103
|
* (e.g., due to an invalid LAPIS URL).
|
|
@@ -112,6 +113,18 @@ export declare class AppComponent extends LitElement {
|
|
|
112
113
|
* The URL of the LAPIS instance that all children of this component will use.
|
|
113
114
|
*/
|
|
114
115
|
lapis: string;
|
|
116
|
+
/**
|
|
117
|
+
* Supply lists of mutations that are especially relevant for the current organism.
|
|
118
|
+
* Whenever other components display mutations, matching mutations will be highlighted by appending the `symbol`.
|
|
119
|
+
* On hover, a tooltip with the `name` and `description` will be shown.
|
|
120
|
+
*/
|
|
121
|
+
mutationAnnotations: {
|
|
122
|
+
name: string;
|
|
123
|
+
description: string;
|
|
124
|
+
symbol: string;
|
|
125
|
+
nucleotideMutations: string[];
|
|
126
|
+
aminoAcidMutations: string[];
|
|
127
|
+
}[];
|
|
115
128
|
/* Excluded from this release type: referenceGenome */
|
|
116
129
|
/* Excluded from this release type: updateReferenceGenome */
|
|
117
130
|
render(): TemplateResult<1> | undefined;
|
|
@@ -332,6 +345,28 @@ export declare class LocationFilterComponent extends PreactLitAdapter {
|
|
|
332
345
|
render(): JSX_2.Element;
|
|
333
346
|
}
|
|
334
347
|
|
|
348
|
+
declare type MutationAnnotations = default_2.infer<typeof mutationAnnotationsSchema>;
|
|
349
|
+
|
|
350
|
+
declare const mutationAnnotationsSchema: default_2.ZodArray<default_2.ZodObject<{
|
|
351
|
+
name: default_2.ZodString;
|
|
352
|
+
description: default_2.ZodString;
|
|
353
|
+
symbol: default_2.ZodString;
|
|
354
|
+
nucleotideMutations: default_2.ZodArray<default_2.ZodString, "many">;
|
|
355
|
+
aminoAcidMutations: default_2.ZodArray<default_2.ZodString, "many">;
|
|
356
|
+
}, "strip", default_2.ZodTypeAny, {
|
|
357
|
+
symbol: string;
|
|
358
|
+
name: string;
|
|
359
|
+
description: string;
|
|
360
|
+
nucleotideMutations: string[];
|
|
361
|
+
aminoAcidMutations: string[];
|
|
362
|
+
}, {
|
|
363
|
+
symbol: string;
|
|
364
|
+
name: string;
|
|
365
|
+
description: string;
|
|
366
|
+
nucleotideMutations: string[];
|
|
367
|
+
aminoAcidMutations: string[];
|
|
368
|
+
}>, "many">;
|
|
369
|
+
|
|
335
370
|
/**
|
|
336
371
|
* ## Context
|
|
337
372
|
*
|
|
@@ -567,6 +602,7 @@ export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
567
602
|
* Set to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).
|
|
568
603
|
*/
|
|
569
604
|
pageSize: boolean | number;
|
|
605
|
+
/* Excluded from this release type: mutationAnnotations */
|
|
570
606
|
render(): JSX_2.Element;
|
|
571
607
|
}
|
|
572
608
|
|
|
@@ -654,6 +690,7 @@ export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGrid
|
|
|
654
690
|
min: number;
|
|
655
691
|
max: number;
|
|
656
692
|
};
|
|
693
|
+
/* Excluded from this release type: mutationAnnotations */
|
|
657
694
|
render(): JSX_2.Element;
|
|
658
695
|
}
|
|
659
696
|
|
|
@@ -1328,6 +1365,7 @@ export declare class WastewaterMutationsOverTimeComponent extends PreactLitAdapt
|
|
|
1328
1365
|
* The maximum number of grid rows to display.
|
|
1329
1366
|
*/
|
|
1330
1367
|
maxNumberOfGridRows: number;
|
|
1368
|
+
/* Excluded from this release type: mutationAnnotations */
|
|
1331
1369
|
render(): JSX_2.Element;
|
|
1332
1370
|
}
|
|
1333
1371
|
|
|
@@ -1391,7 +1429,7 @@ declare global {
|
|
|
1391
1429
|
|
|
1392
1430
|
declare global {
|
|
1393
1431
|
interface HTMLElementTagNameMap {
|
|
1394
|
-
'gs-
|
|
1432
|
+
'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
|
|
1395
1433
|
}
|
|
1396
1434
|
}
|
|
1397
1435
|
|
|
@@ -1399,7 +1437,7 @@ declare global {
|
|
|
1399
1437
|
declare global {
|
|
1400
1438
|
namespace JSX {
|
|
1401
1439
|
interface IntrinsicElements {
|
|
1402
|
-
'gs-
|
|
1440
|
+
'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1403
1441
|
}
|
|
1404
1442
|
}
|
|
1405
1443
|
}
|
|
@@ -1407,7 +1445,7 @@ declare global {
|
|
|
1407
1445
|
|
|
1408
1446
|
declare global {
|
|
1409
1447
|
interface HTMLElementTagNameMap {
|
|
1410
|
-
'gs-
|
|
1448
|
+
'gs-prevalence-over-time': PrevalenceOverTimeComponent;
|
|
1411
1449
|
}
|
|
1412
1450
|
}
|
|
1413
1451
|
|
|
@@ -1415,7 +1453,7 @@ declare global {
|
|
|
1415
1453
|
declare global {
|
|
1416
1454
|
namespace JSX {
|
|
1417
1455
|
interface IntrinsicElements {
|
|
1418
|
-
'gs-
|
|
1456
|
+
'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1419
1457
|
}
|
|
1420
1458
|
}
|
|
1421
1459
|
}
|
|
@@ -1423,7 +1461,7 @@ declare global {
|
|
|
1423
1461
|
|
|
1424
1462
|
declare global {
|
|
1425
1463
|
interface HTMLElementTagNameMap {
|
|
1426
|
-
'gs-
|
|
1464
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
1427
1465
|
}
|
|
1428
1466
|
}
|
|
1429
1467
|
|
|
@@ -1431,7 +1469,7 @@ declare global {
|
|
|
1431
1469
|
declare global {
|
|
1432
1470
|
namespace JSX {
|
|
1433
1471
|
interface IntrinsicElements {
|
|
1434
|
-
'gs-
|
|
1472
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1435
1473
|
}
|
|
1436
1474
|
}
|
|
1437
1475
|
}
|
|
@@ -1439,7 +1477,7 @@ declare global {
|
|
|
1439
1477
|
|
|
1440
1478
|
declare global {
|
|
1441
1479
|
interface HTMLElementTagNameMap {
|
|
1442
|
-
'gs-
|
|
1480
|
+
'gs-mutations-over-time': MutationsOverTimeComponent;
|
|
1443
1481
|
}
|
|
1444
1482
|
}
|
|
1445
1483
|
|
|
@@ -1447,7 +1485,7 @@ declare global {
|
|
|
1447
1485
|
declare global {
|
|
1448
1486
|
namespace JSX {
|
|
1449
1487
|
interface IntrinsicElements {
|
|
1450
|
-
'gs-
|
|
1488
|
+
'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1451
1489
|
}
|
|
1452
1490
|
}
|
|
1453
1491
|
}
|
|
@@ -1455,7 +1493,7 @@ declare global {
|
|
|
1455
1493
|
|
|
1456
1494
|
declare global {
|
|
1457
1495
|
interface HTMLElementTagNameMap {
|
|
1458
|
-
'gs-
|
|
1496
|
+
'gs-aggregate': AggregateComponent;
|
|
1459
1497
|
}
|
|
1460
1498
|
}
|
|
1461
1499
|
|
|
@@ -1463,7 +1501,7 @@ declare global {
|
|
|
1463
1501
|
declare global {
|
|
1464
1502
|
namespace JSX {
|
|
1465
1503
|
interface IntrinsicElements {
|
|
1466
|
-
'gs-
|
|
1504
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1467
1505
|
}
|
|
1468
1506
|
}
|
|
1469
1507
|
}
|
|
@@ -1471,7 +1509,7 @@ declare global {
|
|
|
1471
1509
|
|
|
1472
1510
|
declare global {
|
|
1473
1511
|
interface HTMLElementTagNameMap {
|
|
1474
|
-
'gs-
|
|
1512
|
+
'gs-statistics': StatisticsComponent;
|
|
1475
1513
|
}
|
|
1476
1514
|
}
|
|
1477
1515
|
|
|
@@ -1479,7 +1517,7 @@ declare global {
|
|
|
1479
1517
|
declare global {
|
|
1480
1518
|
namespace JSX {
|
|
1481
1519
|
interface IntrinsicElements {
|
|
1482
|
-
'gs-
|
|
1520
|
+
'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1483
1521
|
}
|
|
1484
1522
|
}
|
|
1485
1523
|
}
|
|
@@ -1487,7 +1525,10 @@ declare global {
|
|
|
1487
1525
|
|
|
1488
1526
|
declare global {
|
|
1489
1527
|
interface HTMLElementTagNameMap {
|
|
1490
|
-
'gs-
|
|
1528
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1529
|
+
}
|
|
1530
|
+
interface HTMLElementEventMap {
|
|
1531
|
+
'gs-location-changed': LocationChangedEvent;
|
|
1491
1532
|
}
|
|
1492
1533
|
}
|
|
1493
1534
|
|
|
@@ -1495,7 +1536,7 @@ declare global {
|
|
|
1495
1536
|
declare global {
|
|
1496
1537
|
namespace JSX {
|
|
1497
1538
|
interface IntrinsicElements {
|
|
1498
|
-
'gs-
|
|
1539
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1499
1540
|
}
|
|
1500
1541
|
}
|
|
1501
1542
|
}
|
|
@@ -1503,7 +1544,7 @@ declare global {
|
|
|
1503
1544
|
|
|
1504
1545
|
declare global {
|
|
1505
1546
|
interface HTMLElementTagNameMap {
|
|
1506
|
-
'gs-
|
|
1547
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
1507
1548
|
}
|
|
1508
1549
|
}
|
|
1509
1550
|
|
|
@@ -1511,7 +1552,7 @@ declare global {
|
|
|
1511
1552
|
declare global {
|
|
1512
1553
|
namespace JSX {
|
|
1513
1554
|
interface IntrinsicElements {
|
|
1514
|
-
'gs-
|
|
1555
|
+
'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1515
1556
|
}
|
|
1516
1557
|
}
|
|
1517
1558
|
}
|
|
@@ -1519,11 +1560,7 @@ declare global {
|
|
|
1519
1560
|
|
|
1520
1561
|
declare global {
|
|
1521
1562
|
interface HTMLElementTagNameMap {
|
|
1522
|
-
'gs-
|
|
1523
|
-
}
|
|
1524
|
-
interface HTMLElementEventMap {
|
|
1525
|
-
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
1526
|
-
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
1563
|
+
'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
|
|
1527
1564
|
}
|
|
1528
1565
|
}
|
|
1529
1566
|
|
|
@@ -1531,7 +1568,7 @@ declare global {
|
|
|
1531
1568
|
declare global {
|
|
1532
1569
|
namespace JSX {
|
|
1533
1570
|
interface IntrinsicElements {
|
|
1534
|
-
'gs-
|
|
1571
|
+
'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1535
1572
|
}
|
|
1536
1573
|
}
|
|
1537
1574
|
}
|
|
@@ -1539,10 +1576,11 @@ declare global {
|
|
|
1539
1576
|
|
|
1540
1577
|
declare global {
|
|
1541
1578
|
interface HTMLElementTagNameMap {
|
|
1542
|
-
'gs-
|
|
1579
|
+
'gs-date-range-filter': DateRangeFilterComponent;
|
|
1543
1580
|
}
|
|
1544
1581
|
interface HTMLElementEventMap {
|
|
1545
|
-
'gs-
|
|
1582
|
+
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
1583
|
+
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
1546
1584
|
}
|
|
1547
1585
|
}
|
|
1548
1586
|
|
|
@@ -1550,7 +1588,7 @@ declare global {
|
|
|
1550
1588
|
declare global {
|
|
1551
1589
|
namespace JSX {
|
|
1552
1590
|
interface IntrinsicElements {
|
|
1553
|
-
'gs-
|
|
1591
|
+
'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1554
1592
|
}
|
|
1555
1593
|
}
|
|
1556
1594
|
}
|