@genspectrum/dashboard-components 0.13.0 → 0.13.2
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 +178 -0
- package/dist/assets/mutationOverTimeWorker-B1-WrM4b.js.map +1 -0
- package/dist/components.d.ts +108 -43
- package/dist/components.js +564 -295
- package/dist/components.js.map +1 -1
- package/dist/style.css +3 -0
- package/dist/util.d.ts +59 -43
- package/package.json +2 -2
- package/src/constants.ts +6 -0
- package/src/lapisApi/__mockData__/wiseReferenceGenome.json +9 -0
- package/src/lapisApi/lapisApi.ts +17 -0
- package/src/lapisApi/lapisTypes.ts +7 -1
- package/src/operator/FetchDetailsOperator.ts +28 -0
- package/src/preact/components/downshift-combobox.tsx +18 -20
- package/src/preact/components/tabs.tsx +1 -1
- package/src/preact/mutationsOverTime/MutationOverTimeData.ts +9 -5
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +5 -3
- package/src/preact/shared/sort/sortSubstitutionsAndDeletions.ts +4 -7
- package/src/preact/textInput/fetchStringAutocompleteList.spec.ts +34 -0
- package/src/preact/textInput/fetchStringAutocompleteList.ts +16 -2
- package/src/preact/textInput/text-input.tsx +22 -8
- package/src/preact/wastewater/mutationsOverTime/__mockData__/details.json +88 -0
- package/src/preact/wastewater/mutationsOverTime/computeWastewaterMutationsOverTimeDataPerLocation.spec.ts +159 -0
- package/src/preact/wastewater/mutationsOverTime/computeWastewaterMutationsOverTimeDataPerLocation.ts +51 -0
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +71 -0
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +151 -0
- package/src/query/queryMutationsOverTime.ts +6 -14
- package/src/query/queryWastewaterMutationsOverTime.spec.ts +94 -0
- package/src/query/queryWastewaterMutationsOverTime.ts +55 -0
- package/src/utils/map2d.ts +39 -0
- package/src/web-components/index.ts +1 -0
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +82 -0
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +112 -0
- package/src/web-components/wastewaterVisualization/index.ts +1 -0
- package/standalone-bundle/assets/{mutationOverTimeWorker-DEybsZ5r.js.map → mutationOverTimeWorker-Cls1J0cl.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +6228 -6008
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/dist/assets/mutationOverTimeWorker-DTv93Ere.js.map +0 -1
package/dist/components.d.ts
CHANGED
|
@@ -1269,6 +1269,55 @@ export declare class UserFacingError extends Error {
|
|
|
1269
1269
|
constructor(headline: string, message: string);
|
|
1270
1270
|
}
|
|
1271
1271
|
|
|
1272
|
+
/**
|
|
1273
|
+
* ## Context
|
|
1274
|
+
*
|
|
1275
|
+
* This component displays mutations for Swiss wastewater data generated within the WISE consortium. It is designed
|
|
1276
|
+
* only for this purpose and is not designed to be reused outside the WISE project.
|
|
1277
|
+
*
|
|
1278
|
+
* It relies on a LAPIS instance that has the fields `nucleotideMutationFrequency` and `aminoAcidMutationFrequency`.
|
|
1279
|
+
* Those fields are expected to be JSON strings of the format `{ [mutation]: frequency | null }`
|
|
1280
|
+
* (e.g. `{ "A123T": 0.5, "C456G": 0.7, "T789G": null }`).
|
|
1281
|
+
*
|
|
1282
|
+
* The component will stratify by `location`.
|
|
1283
|
+
* Every location will be rendered in a separate tab.
|
|
1284
|
+
* The content of the tab is a "mutations over time" grid, similar to the one used in the `gs-mutations-over-time` component.
|
|
1285
|
+
*
|
|
1286
|
+
* This component also assumes that the LAPIS instance has the field `date` which can be used for the time axis.
|
|
1287
|
+
*/
|
|
1288
|
+
export declare class WastewaterMutationsOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
|
|
1289
|
+
/**
|
|
1290
|
+
* Required.
|
|
1291
|
+
*
|
|
1292
|
+
* LAPIS filter to select the displayed data.
|
|
1293
|
+
*/
|
|
1294
|
+
lapisFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
1295
|
+
nucleotideMutations?: string[];
|
|
1296
|
+
aminoAcidMutations?: string[];
|
|
1297
|
+
nucleotideInsertions?: string[];
|
|
1298
|
+
aminoAcidInsertions?: string[];
|
|
1299
|
+
};
|
|
1300
|
+
/**
|
|
1301
|
+
* Required.
|
|
1302
|
+
*
|
|
1303
|
+
* Whether to display nucleotide or amino acid mutations.
|
|
1304
|
+
*/
|
|
1305
|
+
sequenceType: 'nucleotide' | 'amino acid';
|
|
1306
|
+
/**
|
|
1307
|
+
* The width of the component.
|
|
1308
|
+
*
|
|
1309
|
+
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
1310
|
+
*/
|
|
1311
|
+
width: string;
|
|
1312
|
+
/**
|
|
1313
|
+
* The height of the component.
|
|
1314
|
+
*
|
|
1315
|
+
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
1316
|
+
*/
|
|
1317
|
+
height: string;
|
|
1318
|
+
render(): JSX_2.Element;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1272
1321
|
export { }
|
|
1273
1322
|
|
|
1274
1323
|
|
|
@@ -1297,7 +1346,11 @@ declare global {
|
|
|
1297
1346
|
|
|
1298
1347
|
declare global {
|
|
1299
1348
|
interface HTMLElementTagNameMap {
|
|
1300
|
-
'gs-
|
|
1349
|
+
'gs-date-range-selector': DateRangeSelectorComponent;
|
|
1350
|
+
}
|
|
1351
|
+
interface HTMLElementEventMap {
|
|
1352
|
+
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
1353
|
+
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
1301
1354
|
}
|
|
1302
1355
|
}
|
|
1303
1356
|
|
|
@@ -1305,7 +1358,7 @@ declare global {
|
|
|
1305
1358
|
declare global {
|
|
1306
1359
|
namespace JSX {
|
|
1307
1360
|
interface IntrinsicElements {
|
|
1308
|
-
'gs-
|
|
1361
|
+
'gs-date-range-selector': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1309
1362
|
}
|
|
1310
1363
|
}
|
|
1311
1364
|
}
|
|
@@ -1313,7 +1366,10 @@ declare global {
|
|
|
1313
1366
|
|
|
1314
1367
|
declare global {
|
|
1315
1368
|
interface HTMLElementTagNameMap {
|
|
1316
|
-
'gs-
|
|
1369
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1370
|
+
}
|
|
1371
|
+
interface HTMLElementEventMap {
|
|
1372
|
+
'gs-location-changed': LocationChangedEvent;
|
|
1317
1373
|
}
|
|
1318
1374
|
}
|
|
1319
1375
|
|
|
@@ -1321,7 +1377,7 @@ declare global {
|
|
|
1321
1377
|
declare global {
|
|
1322
1378
|
namespace JSX {
|
|
1323
1379
|
interface IntrinsicElements {
|
|
1324
|
-
'gs-
|
|
1380
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1325
1381
|
}
|
|
1326
1382
|
}
|
|
1327
1383
|
}
|
|
@@ -1329,7 +1385,10 @@ declare global {
|
|
|
1329
1385
|
|
|
1330
1386
|
declare global {
|
|
1331
1387
|
interface HTMLElementTagNameMap {
|
|
1332
|
-
'gs-
|
|
1388
|
+
'gs-text-input': TextInputComponent;
|
|
1389
|
+
}
|
|
1390
|
+
interface HTMLElementEventMap {
|
|
1391
|
+
'gs-text-input-changed': TextInputChangedEvent;
|
|
1333
1392
|
}
|
|
1334
1393
|
}
|
|
1335
1394
|
|
|
@@ -1337,7 +1396,7 @@ declare global {
|
|
|
1337
1396
|
declare global {
|
|
1338
1397
|
namespace JSX {
|
|
1339
1398
|
interface IntrinsicElements {
|
|
1340
|
-
'gs-
|
|
1399
|
+
'gs-text-input': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1341
1400
|
}
|
|
1342
1401
|
}
|
|
1343
1402
|
}
|
|
@@ -1345,7 +1404,10 @@ declare global {
|
|
|
1345
1404
|
|
|
1346
1405
|
declare global {
|
|
1347
1406
|
interface HTMLElementTagNameMap {
|
|
1348
|
-
'gs-
|
|
1407
|
+
'gs-mutation-filter': MutationFilterComponent;
|
|
1408
|
+
}
|
|
1409
|
+
interface HTMLElementEventMap {
|
|
1410
|
+
'gs-mutation-filter-changed': CustomEvent<MutationsFilter>;
|
|
1349
1411
|
}
|
|
1350
1412
|
}
|
|
1351
1413
|
|
|
@@ -1353,7 +1415,7 @@ declare global {
|
|
|
1353
1415
|
declare global {
|
|
1354
1416
|
namespace JSX {
|
|
1355
1417
|
interface IntrinsicElements {
|
|
1356
|
-
'gs-
|
|
1418
|
+
'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1357
1419
|
}
|
|
1358
1420
|
}
|
|
1359
1421
|
}
|
|
@@ -1361,7 +1423,10 @@ declare global {
|
|
|
1361
1423
|
|
|
1362
1424
|
declare global {
|
|
1363
1425
|
interface HTMLElementTagNameMap {
|
|
1364
|
-
'gs-
|
|
1426
|
+
'gs-lineage-filter': LineageFilterComponent;
|
|
1427
|
+
}
|
|
1428
|
+
interface HTMLElementEventMap {
|
|
1429
|
+
'gs-lineage-filter-changed': LineageFilterChangedEvent;
|
|
1365
1430
|
}
|
|
1366
1431
|
}
|
|
1367
1432
|
|
|
@@ -1369,7 +1434,7 @@ declare global {
|
|
|
1369
1434
|
declare global {
|
|
1370
1435
|
namespace JSX {
|
|
1371
1436
|
interface IntrinsicElements {
|
|
1372
|
-
'gs-
|
|
1437
|
+
'gs-lineage-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1373
1438
|
}
|
|
1374
1439
|
}
|
|
1375
1440
|
}
|
|
@@ -1377,7 +1442,7 @@ declare global {
|
|
|
1377
1442
|
|
|
1378
1443
|
declare global {
|
|
1379
1444
|
interface HTMLElementTagNameMap {
|
|
1380
|
-
'gs-
|
|
1445
|
+
'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
|
|
1381
1446
|
}
|
|
1382
1447
|
}
|
|
1383
1448
|
|
|
@@ -1385,7 +1450,7 @@ declare global {
|
|
|
1385
1450
|
declare global {
|
|
1386
1451
|
namespace JSX {
|
|
1387
1452
|
interface IntrinsicElements {
|
|
1388
|
-
'gs-
|
|
1453
|
+
'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1389
1454
|
}
|
|
1390
1455
|
}
|
|
1391
1456
|
}
|
|
@@ -1393,7 +1458,7 @@ declare global {
|
|
|
1393
1458
|
|
|
1394
1459
|
declare global {
|
|
1395
1460
|
interface HTMLElementTagNameMap {
|
|
1396
|
-
'gs-
|
|
1461
|
+
'gs-mutation-comparison-component': MutationComparisonComponent;
|
|
1397
1462
|
}
|
|
1398
1463
|
}
|
|
1399
1464
|
|
|
@@ -1401,7 +1466,7 @@ declare global {
|
|
|
1401
1466
|
declare global {
|
|
1402
1467
|
namespace JSX {
|
|
1403
1468
|
interface IntrinsicElements {
|
|
1404
|
-
'gs-
|
|
1469
|
+
'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1405
1470
|
}
|
|
1406
1471
|
}
|
|
1407
1472
|
}
|
|
@@ -1409,7 +1474,7 @@ declare global {
|
|
|
1409
1474
|
|
|
1410
1475
|
declare global {
|
|
1411
1476
|
interface HTMLElementTagNameMap {
|
|
1412
|
-
'gs-
|
|
1477
|
+
'gs-mutations-component': MutationsComponent;
|
|
1413
1478
|
}
|
|
1414
1479
|
}
|
|
1415
1480
|
|
|
@@ -1417,7 +1482,7 @@ declare global {
|
|
|
1417
1482
|
declare global {
|
|
1418
1483
|
namespace JSX {
|
|
1419
1484
|
interface IntrinsicElements {
|
|
1420
|
-
'gs-
|
|
1485
|
+
'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1421
1486
|
}
|
|
1422
1487
|
}
|
|
1423
1488
|
}
|
|
@@ -1425,7 +1490,7 @@ declare global {
|
|
|
1425
1490
|
|
|
1426
1491
|
declare global {
|
|
1427
1492
|
interface HTMLElementTagNameMap {
|
|
1428
|
-
'gs-
|
|
1493
|
+
'gs-prevalence-over-time': PrevalenceOverTimeComponent;
|
|
1429
1494
|
}
|
|
1430
1495
|
}
|
|
1431
1496
|
|
|
@@ -1433,7 +1498,7 @@ declare global {
|
|
|
1433
1498
|
declare global {
|
|
1434
1499
|
namespace JSX {
|
|
1435
1500
|
interface IntrinsicElements {
|
|
1436
|
-
'gs-
|
|
1501
|
+
'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1437
1502
|
}
|
|
1438
1503
|
}
|
|
1439
1504
|
}
|
|
@@ -1441,11 +1506,7 @@ declare global {
|
|
|
1441
1506
|
|
|
1442
1507
|
declare global {
|
|
1443
1508
|
interface HTMLElementTagNameMap {
|
|
1444
|
-
'gs-
|
|
1445
|
-
}
|
|
1446
|
-
interface HTMLElementEventMap {
|
|
1447
|
-
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
1448
|
-
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
1509
|
+
'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
|
|
1449
1510
|
}
|
|
1450
1511
|
}
|
|
1451
1512
|
|
|
@@ -1453,7 +1514,7 @@ declare global {
|
|
|
1453
1514
|
declare global {
|
|
1454
1515
|
namespace JSX {
|
|
1455
1516
|
interface IntrinsicElements {
|
|
1456
|
-
'gs-
|
|
1517
|
+
'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1457
1518
|
}
|
|
1458
1519
|
}
|
|
1459
1520
|
}
|
|
@@ -1461,10 +1522,7 @@ declare global {
|
|
|
1461
1522
|
|
|
1462
1523
|
declare global {
|
|
1463
1524
|
interface HTMLElementTagNameMap {
|
|
1464
|
-
'gs-
|
|
1465
|
-
}
|
|
1466
|
-
interface HTMLElementEventMap {
|
|
1467
|
-
'gs-location-changed': LocationChangedEvent;
|
|
1525
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
1468
1526
|
}
|
|
1469
1527
|
}
|
|
1470
1528
|
|
|
@@ -1472,7 +1530,7 @@ declare global {
|
|
|
1472
1530
|
declare global {
|
|
1473
1531
|
namespace JSX {
|
|
1474
1532
|
interface IntrinsicElements {
|
|
1475
|
-
'gs-
|
|
1533
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1476
1534
|
}
|
|
1477
1535
|
}
|
|
1478
1536
|
}
|
|
@@ -1480,10 +1538,7 @@ declare global {
|
|
|
1480
1538
|
|
|
1481
1539
|
declare global {
|
|
1482
1540
|
interface HTMLElementTagNameMap {
|
|
1483
|
-
'gs-
|
|
1484
|
-
}
|
|
1485
|
-
interface HTMLElementEventMap {
|
|
1486
|
-
'gs-text-input-changed': TextInputChangedEvent;
|
|
1541
|
+
'gs-aggregate': AggregateComponent;
|
|
1487
1542
|
}
|
|
1488
1543
|
}
|
|
1489
1544
|
|
|
@@ -1491,7 +1546,7 @@ declare global {
|
|
|
1491
1546
|
declare global {
|
|
1492
1547
|
namespace JSX {
|
|
1493
1548
|
interface IntrinsicElements {
|
|
1494
|
-
'gs-
|
|
1549
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1495
1550
|
}
|
|
1496
1551
|
}
|
|
1497
1552
|
}
|
|
@@ -1499,10 +1554,7 @@ declare global {
|
|
|
1499
1554
|
|
|
1500
1555
|
declare global {
|
|
1501
1556
|
interface HTMLElementTagNameMap {
|
|
1502
|
-
'gs-
|
|
1503
|
-
}
|
|
1504
|
-
interface HTMLElementEventMap {
|
|
1505
|
-
'gs-mutation-filter-changed': CustomEvent<MutationsFilter>;
|
|
1557
|
+
'gs-mutations-over-time': MutationsOverTimeComponent;
|
|
1506
1558
|
}
|
|
1507
1559
|
}
|
|
1508
1560
|
|
|
@@ -1510,7 +1562,7 @@ declare global {
|
|
|
1510
1562
|
declare global {
|
|
1511
1563
|
namespace JSX {
|
|
1512
1564
|
interface IntrinsicElements {
|
|
1513
|
-
'gs-
|
|
1565
|
+
'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1514
1566
|
}
|
|
1515
1567
|
}
|
|
1516
1568
|
}
|
|
@@ -1518,10 +1570,23 @@ declare global {
|
|
|
1518
1570
|
|
|
1519
1571
|
declare global {
|
|
1520
1572
|
interface HTMLElementTagNameMap {
|
|
1521
|
-
'gs-
|
|
1573
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
1522
1574
|
}
|
|
1523
|
-
|
|
1524
|
-
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
declare global {
|
|
1579
|
+
namespace JSX {
|
|
1580
|
+
interface IntrinsicElements {
|
|
1581
|
+
'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
declare global {
|
|
1588
|
+
interface HTMLElementTagNameMap {
|
|
1589
|
+
'gs-statistics': StatisticsComponent;
|
|
1525
1590
|
}
|
|
1526
1591
|
}
|
|
1527
1592
|
|
|
@@ -1529,7 +1594,7 @@ declare global {
|
|
|
1529
1594
|
declare global {
|
|
1530
1595
|
namespace JSX {
|
|
1531
1596
|
interface IntrinsicElements {
|
|
1532
|
-
'gs-
|
|
1597
|
+
'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1533
1598
|
}
|
|
1534
1599
|
}
|
|
1535
1600
|
}
|