@genspectrum/dashboard-components 0.13.0 → 0.13.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 +178 -0
- package/dist/assets/mutationOverTimeWorker-B1-WrM4b.js.map +1 -0
- package/dist/components.d.ts +69 -4
- package/dist/components.js +536 -286
- package/dist/components.js.map +1 -1
- package/dist/style.css +3 -0
- package/dist/util.d.ts +20 -4
- 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/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/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 +6203 -5996
- 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
|
|
|
@@ -1295,6 +1344,22 @@ declare global {
|
|
|
1295
1344
|
}
|
|
1296
1345
|
|
|
1297
1346
|
|
|
1347
|
+
declare global {
|
|
1348
|
+
interface HTMLElementTagNameMap {
|
|
1349
|
+
'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
declare global {
|
|
1355
|
+
namespace JSX {
|
|
1356
|
+
interface IntrinsicElements {
|
|
1357
|
+
'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
|
|
1298
1363
|
declare global {
|
|
1299
1364
|
interface HTMLElementTagNameMap {
|
|
1300
1365
|
'gs-mutation-comparison-component': MutationComparisonComponent;
|
|
@@ -1393,7 +1458,7 @@ declare global {
|
|
|
1393
1458
|
|
|
1394
1459
|
declare global {
|
|
1395
1460
|
interface HTMLElementTagNameMap {
|
|
1396
|
-
'gs-
|
|
1461
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
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-sequences-by-location': 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-over-time': MutationsOverTimeComponent;
|
|
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-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1421
1486
|
}
|
|
1422
1487
|
}
|
|
1423
1488
|
}
|