@genspectrum/dashboard-components 0.13.4 → 0.13.5
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 +19 -0
- package/dist/components.d.ts +23 -17
- package/dist/components.js +22 -9
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +17 -17
- package/package.json +1 -1
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +11 -5
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +7 -1
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +9 -0
- package/standalone-bundle/dashboard-components.js +3478 -3467
- package/standalone-bundle/dashboard-components.js.map +1 -1
package/custom-elements.json
CHANGED
|
@@ -4047,6 +4047,16 @@
|
|
|
4047
4047
|
"default": "'700px'",
|
|
4048
4048
|
"description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
|
|
4049
4049
|
"attribute": "height"
|
|
4050
|
+
},
|
|
4051
|
+
{
|
|
4052
|
+
"kind": "field",
|
|
4053
|
+
"name": "maxNumberOfGridRows",
|
|
4054
|
+
"type": {
|
|
4055
|
+
"text": "number"
|
|
4056
|
+
},
|
|
4057
|
+
"default": "100",
|
|
4058
|
+
"description": "The maximum number of grid rows to display.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
|
|
4059
|
+
"attribute": "maxNumberOfGridRows"
|
|
4050
4060
|
}
|
|
4051
4061
|
],
|
|
4052
4062
|
"attributes": [
|
|
@@ -4085,6 +4095,15 @@
|
|
|
4085
4095
|
"default": "'700px'",
|
|
4086
4096
|
"description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
|
|
4087
4097
|
"fieldName": "height"
|
|
4098
|
+
},
|
|
4099
|
+
{
|
|
4100
|
+
"name": "maxNumberOfGridRows",
|
|
4101
|
+
"type": {
|
|
4102
|
+
"text": "number"
|
|
4103
|
+
},
|
|
4104
|
+
"default": "100",
|
|
4105
|
+
"description": "The maximum number of grid rows to display.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
|
|
4106
|
+
"fieldName": "maxNumberOfGridRows"
|
|
4088
4107
|
}
|
|
4089
4108
|
],
|
|
4090
4109
|
"superclass": {
|
package/dist/components.d.ts
CHANGED
|
@@ -1317,6 +1317,12 @@ export declare class WastewaterMutationsOverTimeComponent extends PreactLitAdapt
|
|
|
1317
1317
|
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
1318
1318
|
*/
|
|
1319
1319
|
height: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* The maximum number of grid rows to display.
|
|
1322
|
+
*
|
|
1323
|
+
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
1324
|
+
*/
|
|
1325
|
+
maxNumberOfGridRows: number;
|
|
1320
1326
|
render(): JSX_2.Element;
|
|
1321
1327
|
}
|
|
1322
1328
|
|
|
@@ -1380,7 +1386,7 @@ declare global {
|
|
|
1380
1386
|
|
|
1381
1387
|
declare global {
|
|
1382
1388
|
interface HTMLElementTagNameMap {
|
|
1383
|
-
'gs-
|
|
1389
|
+
'gs-prevalence-over-time': PrevalenceOverTimeComponent;
|
|
1384
1390
|
}
|
|
1385
1391
|
}
|
|
1386
1392
|
|
|
@@ -1388,7 +1394,7 @@ declare global {
|
|
|
1388
1394
|
declare global {
|
|
1389
1395
|
namespace JSX {
|
|
1390
1396
|
interface IntrinsicElements {
|
|
1391
|
-
'gs-
|
|
1397
|
+
'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1392
1398
|
}
|
|
1393
1399
|
}
|
|
1394
1400
|
}
|
|
@@ -1396,7 +1402,7 @@ declare global {
|
|
|
1396
1402
|
|
|
1397
1403
|
declare global {
|
|
1398
1404
|
interface HTMLElementTagNameMap {
|
|
1399
|
-
'gs-
|
|
1405
|
+
'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
|
|
1400
1406
|
}
|
|
1401
1407
|
}
|
|
1402
1408
|
|
|
@@ -1404,7 +1410,7 @@ declare global {
|
|
|
1404
1410
|
declare global {
|
|
1405
1411
|
namespace JSX {
|
|
1406
1412
|
interface IntrinsicElements {
|
|
1407
|
-
'gs-
|
|
1413
|
+
'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1408
1414
|
}
|
|
1409
1415
|
}
|
|
1410
1416
|
}
|
|
@@ -1412,7 +1418,7 @@ declare global {
|
|
|
1412
1418
|
|
|
1413
1419
|
declare global {
|
|
1414
1420
|
interface HTMLElementTagNameMap {
|
|
1415
|
-
'gs-
|
|
1421
|
+
'gs-aggregate': AggregateComponent;
|
|
1416
1422
|
}
|
|
1417
1423
|
}
|
|
1418
1424
|
|
|
@@ -1420,7 +1426,7 @@ declare global {
|
|
|
1420
1426
|
declare global {
|
|
1421
1427
|
namespace JSX {
|
|
1422
1428
|
interface IntrinsicElements {
|
|
1423
|
-
'gs-
|
|
1429
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1424
1430
|
}
|
|
1425
1431
|
}
|
|
1426
1432
|
}
|
|
@@ -1428,7 +1434,7 @@ declare global {
|
|
|
1428
1434
|
|
|
1429
1435
|
declare global {
|
|
1430
1436
|
interface HTMLElementTagNameMap {
|
|
1431
|
-
'gs-
|
|
1437
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
1432
1438
|
}
|
|
1433
1439
|
}
|
|
1434
1440
|
|
|
@@ -1436,7 +1442,7 @@ declare global {
|
|
|
1436
1442
|
declare global {
|
|
1437
1443
|
namespace JSX {
|
|
1438
1444
|
interface IntrinsicElements {
|
|
1439
|
-
'gs-
|
|
1445
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1440
1446
|
}
|
|
1441
1447
|
}
|
|
1442
1448
|
}
|
|
@@ -1547,10 +1553,10 @@ declare global {
|
|
|
1547
1553
|
|
|
1548
1554
|
declare global {
|
|
1549
1555
|
interface HTMLElementTagNameMap {
|
|
1550
|
-
'gs-
|
|
1556
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1551
1557
|
}
|
|
1552
1558
|
interface HTMLElementEventMap {
|
|
1553
|
-
'gs-
|
|
1559
|
+
'gs-location-changed': LocationChangedEvent;
|
|
1554
1560
|
}
|
|
1555
1561
|
}
|
|
1556
1562
|
|
|
@@ -1558,7 +1564,7 @@ declare global {
|
|
|
1558
1564
|
declare global {
|
|
1559
1565
|
namespace JSX {
|
|
1560
1566
|
interface IntrinsicElements {
|
|
1561
|
-
'gs-
|
|
1567
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1562
1568
|
}
|
|
1563
1569
|
}
|
|
1564
1570
|
}
|
|
@@ -1566,10 +1572,10 @@ declare global {
|
|
|
1566
1572
|
|
|
1567
1573
|
declare global {
|
|
1568
1574
|
interface HTMLElementTagNameMap {
|
|
1569
|
-
'gs-
|
|
1575
|
+
'gs-mutation-filter': MutationFilterComponent;
|
|
1570
1576
|
}
|
|
1571
1577
|
interface HTMLElementEventMap {
|
|
1572
|
-
'gs-
|
|
1578
|
+
'gs-mutation-filter-changed': CustomEvent<MutationsFilter>;
|
|
1573
1579
|
}
|
|
1574
1580
|
}
|
|
1575
1581
|
|
|
@@ -1577,7 +1583,7 @@ declare global {
|
|
|
1577
1583
|
declare global {
|
|
1578
1584
|
namespace JSX {
|
|
1579
1585
|
interface IntrinsicElements {
|
|
1580
|
-
'gs-
|
|
1586
|
+
'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1581
1587
|
}
|
|
1582
1588
|
}
|
|
1583
1589
|
}
|
|
@@ -1585,10 +1591,10 @@ declare global {
|
|
|
1585
1591
|
|
|
1586
1592
|
declare global {
|
|
1587
1593
|
interface HTMLElementTagNameMap {
|
|
1588
|
-
'gs-
|
|
1594
|
+
'gs-lineage-filter': LineageFilterComponent;
|
|
1589
1595
|
}
|
|
1590
1596
|
interface HTMLElementEventMap {
|
|
1591
|
-
'gs-
|
|
1597
|
+
'gs-lineage-filter-changed': LineageFilterChangedEvent;
|
|
1592
1598
|
}
|
|
1593
1599
|
}
|
|
1594
1600
|
|
|
@@ -1596,7 +1602,7 @@ declare global {
|
|
|
1596
1602
|
declare global {
|
|
1597
1603
|
namespace JSX {
|
|
1598
1604
|
interface IntrinsicElements {
|
|
1599
|
-
'gs-
|
|
1605
|
+
'gs-lineage-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1600
1606
|
}
|
|
1601
1607
|
}
|
|
1602
1608
|
}
|
package/dist/components.js
CHANGED
|
@@ -9472,15 +9472,20 @@ const Tooltip = ({ children, content, position = "bottom" }) => {
|
|
|
9472
9472
|
};
|
|
9473
9473
|
const MAX_NUMBER_OF_GRID_ROWS = 100;
|
|
9474
9474
|
const MUTATION_CELL_WIDTH_REM = 8;
|
|
9475
|
-
const MutationsOverTimeGrid = ({
|
|
9475
|
+
const MutationsOverTimeGrid = ({
|
|
9476
|
+
data,
|
|
9477
|
+
colorScale,
|
|
9478
|
+
maxNumberOfGridRows
|
|
9479
|
+
}) => {
|
|
9480
|
+
const currentMaxNumberOfGridRows = maxNumberOfGridRows ?? MAX_NUMBER_OF_GRID_ROWS;
|
|
9476
9481
|
const allMutations = data.getFirstAxisKeys();
|
|
9477
|
-
const shownMutations = allMutations.slice(0,
|
|
9482
|
+
const shownMutations = allMutations.slice(0, currentMaxNumberOfGridRows);
|
|
9478
9483
|
const dates = data.getSecondAxisKeys();
|
|
9479
9484
|
const gridRef = A$1(null);
|
|
9480
9485
|
return /* @__PURE__ */ u$1(Fragment, { children: [
|
|
9481
|
-
allMutations.length >
|
|
9486
|
+
allMutations.length > currentMaxNumberOfGridRows && /* @__PURE__ */ u$1("div", { className: "pl-2", children: [
|
|
9482
9487
|
"Showing ",
|
|
9483
|
-
|
|
9488
|
+
currentMaxNumberOfGridRows,
|
|
9484
9489
|
" of ",
|
|
9485
9490
|
allMutations.length,
|
|
9486
9491
|
" mutations. You can narrow the filter to reduce the number of mutations."
|
|
@@ -11186,7 +11191,8 @@ const wastewaterMutationOverTimeSchema = z$2.object({
|
|
|
11186
11191
|
lapisFilter: lapisFilterSchema,
|
|
11187
11192
|
sequenceType: sequenceTypeSchema,
|
|
11188
11193
|
width: z$2.string(),
|
|
11189
|
-
height: z$2.string()
|
|
11194
|
+
height: z$2.string(),
|
|
11195
|
+
maxNumberOfGridRows: z$2.number().optional()
|
|
11190
11196
|
});
|
|
11191
11197
|
const WastewaterMutationsOverTime = (componentProps) => {
|
|
11192
11198
|
const { width, height } = componentProps;
|
|
@@ -11220,18 +11226,20 @@ const WastewaterMutationsOverTimeInner = (componentProps) => {
|
|
|
11220
11226
|
MutationsOverTimeTabs,
|
|
11221
11227
|
{
|
|
11222
11228
|
mutationOverTimeDataPerLocation,
|
|
11223
|
-
originalComponentProps: componentProps
|
|
11229
|
+
originalComponentProps: componentProps,
|
|
11230
|
+
maxNumberOfGridRows: componentProps.maxNumberOfGridRows
|
|
11224
11231
|
}
|
|
11225
11232
|
);
|
|
11226
11233
|
};
|
|
11227
11234
|
const MutationsOverTimeTabs = ({
|
|
11228
11235
|
mutationOverTimeDataPerLocation,
|
|
11229
|
-
originalComponentProps
|
|
11236
|
+
originalComponentProps,
|
|
11237
|
+
maxNumberOfGridRows
|
|
11230
11238
|
}) => {
|
|
11231
11239
|
const [colorScale, setColorScale] = h({ min: 0, max: 1, color: "indigo" });
|
|
11232
11240
|
const tabs = mutationOverTimeDataPerLocation.map(({ location, data }) => ({
|
|
11233
11241
|
title: location,
|
|
11234
|
-
content: /* @__PURE__ */ u$1(MutationsOverTimeGrid, { data, colorScale })
|
|
11242
|
+
content: /* @__PURE__ */ u$1(MutationsOverTimeGrid, { data, colorScale, maxNumberOfGridRows })
|
|
11235
11243
|
}));
|
|
11236
11244
|
const toolbar = /* @__PURE__ */ u$1(
|
|
11237
11245
|
Toolbar,
|
|
@@ -11285,6 +11293,7 @@ let WastewaterMutationsOverTimeComponent = class extends PreactLitAdapterWithGri
|
|
|
11285
11293
|
this.sequenceType = "nucleotide";
|
|
11286
11294
|
this.width = "100%";
|
|
11287
11295
|
this.height = "700px";
|
|
11296
|
+
this.maxNumberOfGridRows = 100;
|
|
11288
11297
|
}
|
|
11289
11298
|
render() {
|
|
11290
11299
|
return /* @__PURE__ */ u$1(
|
|
@@ -11293,7 +11302,8 @@ let WastewaterMutationsOverTimeComponent = class extends PreactLitAdapterWithGri
|
|
|
11293
11302
|
lapisFilter: this.lapisFilter,
|
|
11294
11303
|
sequenceType: this.sequenceType,
|
|
11295
11304
|
width: this.width,
|
|
11296
|
-
height: this.height
|
|
11305
|
+
height: this.height,
|
|
11306
|
+
maxNumberOfGridRows: this.maxNumberOfGridRows
|
|
11297
11307
|
}
|
|
11298
11308
|
);
|
|
11299
11309
|
}
|
|
@@ -11310,6 +11320,9 @@ __decorateClass$5([
|
|
|
11310
11320
|
__decorateClass$5([
|
|
11311
11321
|
n$1({ type: String })
|
|
11312
11322
|
], WastewaterMutationsOverTimeComponent.prototype, "height", 2);
|
|
11323
|
+
__decorateClass$5([
|
|
11324
|
+
n$1({ type: Number })
|
|
11325
|
+
], WastewaterMutationsOverTimeComponent.prototype, "maxNumberOfGridRows", 2);
|
|
11313
11326
|
WastewaterMutationsOverTimeComponent = __decorateClass$5([
|
|
11314
11327
|
t$3("gs-wastewater-mutations-over-time")
|
|
11315
11328
|
], WastewaterMutationsOverTimeComponent);
|