@genspectrum/dashboard-components 0.10.4 → 0.11.0
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 +58 -58
- package/dist/components.d.ts +97 -47
- package/dist/components.js +57 -65
- package/dist/components.js.map +1 -1
- package/dist/{dateRangeOption-Doo6WHKu.js → dateRangeOption-Bh2p78z0.js} +9 -4
- package/dist/dateRangeOption-Bh2p78z0.js.map +1 -0
- package/dist/util.d.ts +624 -31
- package/dist/util.js +1 -1
- package/package.json +5 -5
- package/src/preact/aggregatedData/aggregate.stories.tsx +1 -1
- package/src/preact/aggregatedData/aggregate.tsx +11 -8
- package/src/preact/dateRangeSelector/date-range-selector.stories.tsx +3 -11
- package/src/preact/dateRangeSelector/date-range-selector.tsx +4 -4
- package/src/preact/mutationComparison/mutation-comparison.tsx +4 -6
- package/src/preact/mutationFilter/mutation-filter.tsx +4 -13
- package/src/preact/mutations/mutations.tsx +4 -4
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +4 -4
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +4 -13
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +4 -4
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +14 -25
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +8 -8
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +3 -14
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +11 -7
- package/src/query/queryNumberOfSequencesOverTime.spec.ts +4 -4
- package/src/query/queryNumberOfSequencesOverTime.ts +1 -4
- package/src/query/queryPrevalenceOverTime.ts +1 -4
- package/src/types.ts +11 -4
- package/src/utilEntrypoint.ts +16 -4
- package/src/utils/utils.ts +0 -29
- package/src/web-components/app.ts +1 -1
- package/src/web-components/input/gs-date-range-selector.stories.ts +4 -4
- package/src/web-components/input/gs-date-range-selector.tsx +5 -5
- package/src/web-components/input/gs-lineage-filter.tsx +1 -1
- package/src/web-components/input/gs-location-filter.tsx +1 -1
- package/src/web-components/input/gs-mutation-filter.tsx +5 -8
- package/src/web-components/input/gs-text-input.tsx +1 -1
- package/src/web-components/visualization/gs-aggregate.stories.ts +3 -3
- package/src/web-components/visualization/gs-aggregate.tsx +10 -6
- package/src/web-components/visualization/gs-mutation-comparison.tsx +7 -2
- package/src/web-components/visualization/gs-mutations-over-time.tsx +7 -2
- package/src/web-components/visualization/gs-mutations.tsx +7 -2
- package/src/web-components/visualization/gs-number-sequences-over-time.stories.ts +5 -5
- package/src/web-components/visualization/gs-number-sequences-over-time.tsx +13 -15
- package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +8 -8
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +17 -14
- package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +4 -5
- package/src/web-components/visualization/gs-relative-growth-advantage.tsx +17 -15
- package/src/web-components/visualization/gs-sequences-by-location.tsx +6 -1
- package/src/web-components/visualization/gs-statistics.tsx +12 -3
- package/standalone-bundle/dashboard-components.js +2520 -2516
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/dist/dateRangeOption-Doo6WHKu.js.map +0 -1
- package/src/utils/utils.spec.ts +0 -16
package/dist/components.d.ts
CHANGED
|
@@ -35,12 +35,17 @@ export declare class AggregateComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
35
35
|
/**
|
|
36
36
|
* A list of tabs with views that this component should provide.
|
|
37
37
|
*/
|
|
38
|
-
views:
|
|
38
|
+
views: AggregateView[];
|
|
39
39
|
/**
|
|
40
40
|
* The filter to apply to the data.
|
|
41
41
|
* It must be a valid LAPIS filter object.
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
lapisFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
44
|
+
nucleotideMutations?: string[];
|
|
45
|
+
aminoAcidMutations?: string[];
|
|
46
|
+
nucleotideInsertions?: string[];
|
|
47
|
+
aminoAcidInsertions?: string[];
|
|
48
|
+
};
|
|
44
49
|
/**
|
|
45
50
|
* The width of the component.
|
|
46
51
|
*
|
|
@@ -70,6 +75,10 @@ export declare class AggregateComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
70
75
|
render(): JSX_2.Element;
|
|
71
76
|
}
|
|
72
77
|
|
|
78
|
+
declare type AggregateView = default_2.infer<typeof aggregateViewSchema>;
|
|
79
|
+
|
|
80
|
+
declare const aggregateViewSchema: default_2.ZodLiteral<"table">;
|
|
81
|
+
|
|
73
82
|
/**
|
|
74
83
|
* ## Context
|
|
75
84
|
*
|
|
@@ -187,9 +196,9 @@ export declare class DateRangeSelectorComponent extends PreactLitAdapter {
|
|
|
187
196
|
*/
|
|
188
197
|
width: string;
|
|
189
198
|
/**
|
|
190
|
-
* The name of the
|
|
199
|
+
* The name of the metadata field in LAPIS that contains the date information.
|
|
191
200
|
*/
|
|
192
|
-
|
|
201
|
+
lapisDateField: string;
|
|
193
202
|
render(): JSX_2.Element;
|
|
194
203
|
}
|
|
195
204
|
|
|
@@ -199,10 +208,6 @@ declare class ErrorEvent_2 extends Event {
|
|
|
199
208
|
}
|
|
200
209
|
export { ErrorEvent_2 as ErrorEvent }
|
|
201
210
|
|
|
202
|
-
declare type LapisFilter = default_2.infer<typeof lapisFilterSchema>;
|
|
203
|
-
|
|
204
|
-
declare const lapisFilterSchema: default_2.ZodRecord<default_2.ZodString, default_2.ZodUnion<[default_2.ZodString, default_2.ZodNumber, default_2.ZodNull, default_2.ZodBoolean]>>;
|
|
205
|
-
|
|
206
211
|
/**
|
|
207
212
|
*
|
|
208
213
|
* ## Context
|
|
@@ -343,7 +348,12 @@ export declare class MutationComparisonComponent extends PreactLitAdapterWithGri
|
|
|
343
348
|
* It should be human-readable.
|
|
344
349
|
*/
|
|
345
350
|
lapisFilters: {
|
|
346
|
-
lapisFilter: Record<string, string | number | null | boolean
|
|
351
|
+
lapisFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
352
|
+
nucleotideMutations?: string[];
|
|
353
|
+
aminoAcidMutations?: string[];
|
|
354
|
+
nucleotideInsertions?: string[];
|
|
355
|
+
aminoAcidInsertions?: string[];
|
|
356
|
+
};
|
|
347
357
|
displayName: string;
|
|
348
358
|
}[];
|
|
349
359
|
/**
|
|
@@ -471,7 +481,12 @@ export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
471
481
|
/**
|
|
472
482
|
* LAPIS filter to select the displayed data. If not provided, all data is displayed.
|
|
473
483
|
*/
|
|
474
|
-
lapisFilter: Record<string, string | number | null | boolean
|
|
484
|
+
lapisFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
485
|
+
nucleotideMutations?: string[];
|
|
486
|
+
aminoAcidMutations?: string[];
|
|
487
|
+
nucleotideInsertions?: string[];
|
|
488
|
+
aminoAcidInsertions?: string[];
|
|
489
|
+
};
|
|
475
490
|
/**
|
|
476
491
|
* The type of the sequence for which the mutations should be shown.
|
|
477
492
|
*/
|
|
@@ -529,7 +544,12 @@ export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGrid
|
|
|
529
544
|
/**
|
|
530
545
|
* LAPIS filter to select the displayed data. If not provided, all data is displayed.
|
|
531
546
|
*/
|
|
532
|
-
lapisFilter: Record<string, string | number | null | boolean
|
|
547
|
+
lapisFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
548
|
+
nucleotideMutations?: string[];
|
|
549
|
+
aminoAcidMutations?: string[];
|
|
550
|
+
nucleotideInsertions?: string[];
|
|
551
|
+
aminoAcidInsertions?: string[];
|
|
552
|
+
};
|
|
533
553
|
/**
|
|
534
554
|
* The type of the sequence for which the mutations should be shown.
|
|
535
555
|
*/
|
|
@@ -587,11 +607,13 @@ export declare class NumberSequencesOverTimeComponent extends PreactLitAdapterWi
|
|
|
587
607
|
* The `displayName` will be used to label the component views.
|
|
588
608
|
* It should be human-readable.
|
|
589
609
|
*
|
|
590
|
-
*/
|
|
591
|
-
lapisFilter: Record<string, string | number | null | boolean
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
610
|
+
*/ lapisFilters: {
|
|
611
|
+
lapisFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
612
|
+
nucleotideMutations?: string[];
|
|
613
|
+
aminoAcidMutations?: string[];
|
|
614
|
+
nucleotideInsertions?: string[];
|
|
615
|
+
aminoAcidInsertions?: string[];
|
|
616
|
+
};
|
|
595
617
|
displayName: string;
|
|
596
618
|
}[];
|
|
597
619
|
/**
|
|
@@ -700,18 +722,25 @@ export declare class PrevalenceOverTimeComponent extends PreactLitAdapterWithGri
|
|
|
700
722
|
* It should be human-readable.
|
|
701
723
|
*
|
|
702
724
|
*/
|
|
703
|
-
|
|
704
|
-
lapisFilter: Record<string, string | number | null | boolean
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
725
|
+
numeratorFilters: {
|
|
726
|
+
lapisFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
727
|
+
nucleotideMutations?: string[];
|
|
728
|
+
aminoAcidMutations?: string[];
|
|
729
|
+
nucleotideInsertions?: string[];
|
|
730
|
+
aminoAcidInsertions?: string[];
|
|
731
|
+
};
|
|
708
732
|
displayName: string;
|
|
709
733
|
}[];
|
|
710
734
|
/**
|
|
711
735
|
* The LAPIS filter, to select the data of the reference.
|
|
712
736
|
* It must be a valid LAPIS filter object.
|
|
713
737
|
*/
|
|
714
|
-
denominatorFilter: Record<string, string | number | null | boolean
|
|
738
|
+
denominatorFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
739
|
+
nucleotideMutations?: string[];
|
|
740
|
+
aminoAcidMutations?: string[];
|
|
741
|
+
nucleotideInsertions?: string[];
|
|
742
|
+
aminoAcidInsertions?: string[];
|
|
743
|
+
};
|
|
715
744
|
/**
|
|
716
745
|
* The granularity of the time axis.
|
|
717
746
|
*/
|
|
@@ -854,12 +883,22 @@ export declare class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
|
|
|
854
883
|
* LAPIS filter to select the data of the focal variant.
|
|
855
884
|
* It must be a valid LAPIS filter object.
|
|
856
885
|
*/
|
|
857
|
-
numeratorFilter: Record<string, string | number | null | boolean
|
|
886
|
+
numeratorFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
887
|
+
nucleotideMutations?: string[];
|
|
888
|
+
aminoAcidMutations?: string[];
|
|
889
|
+
nucleotideInsertions?: string[];
|
|
890
|
+
aminoAcidInsertions?: string[];
|
|
891
|
+
};
|
|
858
892
|
/**
|
|
859
893
|
* LAPIS filter to select the data of the baseline variant.
|
|
860
894
|
* It must be a valid LAPIS filter object.
|
|
861
895
|
*/
|
|
862
|
-
denominatorFilter: Record<string, string | number | null | boolean
|
|
896
|
+
denominatorFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
897
|
+
nucleotideMutations?: string[];
|
|
898
|
+
aminoAcidMutations?: string[];
|
|
899
|
+
nucleotideInsertions?: string[];
|
|
900
|
+
aminoAcidInsertions?: string[];
|
|
901
|
+
};
|
|
863
902
|
/**
|
|
864
903
|
* The generation time represents the number of days over which the variant's relative growth advantage is measured.
|
|
865
904
|
* For example, if we set a generation time of 7 days, then we estimate the growth advantage per week.
|
|
@@ -996,7 +1035,12 @@ export declare class SequencesByLocationComponent extends PreactLitAdapterWithGr
|
|
|
996
1035
|
* If you want to display the distribution over the states of a certain country,
|
|
997
1036
|
* you should usually filter by that country here (e.g. { country: 'USA' }).
|
|
998
1037
|
*/
|
|
999
|
-
lapisFilter: Record<string, string | number | null | boolean
|
|
1038
|
+
lapisFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
1039
|
+
nucleotideMutations?: string[];
|
|
1040
|
+
aminoAcidMutations?: string[];
|
|
1041
|
+
nucleotideInsertions?: string[];
|
|
1042
|
+
aminoAcidInsertions?: string[];
|
|
1043
|
+
};
|
|
1000
1044
|
/**
|
|
1001
1045
|
* Required.
|
|
1002
1046
|
*
|
|
@@ -1072,12 +1116,22 @@ export declare class StatisticsComponent extends PreactLitAdapterWithGridJsStyle
|
|
|
1072
1116
|
* The filter to apply to the data for the overall number of sequences and as the numerator for the proportion.
|
|
1073
1117
|
* It must be a valid LAPIS filter object.
|
|
1074
1118
|
*/
|
|
1075
|
-
numeratorFilter:
|
|
1119
|
+
numeratorFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
1120
|
+
nucleotideMutations?: string[];
|
|
1121
|
+
aminoAcidMutations?: string[];
|
|
1122
|
+
nucleotideInsertions?: string[];
|
|
1123
|
+
aminoAcidInsertions?: string[];
|
|
1124
|
+
};
|
|
1076
1125
|
/**
|
|
1077
1126
|
* The filter to apply to the data for the denominator of the proportion.
|
|
1078
1127
|
* It must be a valid LAPIS filter object.
|
|
1079
1128
|
*/
|
|
1080
|
-
denominatorFilter:
|
|
1129
|
+
denominatorFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
1130
|
+
nucleotideMutations?: string[];
|
|
1131
|
+
aminoAcidMutations?: string[];
|
|
1132
|
+
nucleotideInsertions?: string[];
|
|
1133
|
+
aminoAcidInsertions?: string[];
|
|
1134
|
+
};
|
|
1081
1135
|
/**
|
|
1082
1136
|
* The width of the component.
|
|
1083
1137
|
*
|
|
@@ -1139,10 +1193,6 @@ export declare class UserFacingError extends Error {
|
|
|
1139
1193
|
constructor(headline: string, message: string);
|
|
1140
1194
|
}
|
|
1141
1195
|
|
|
1142
|
-
declare type View = default_2.infer<typeof viewSchema>;
|
|
1143
|
-
|
|
1144
|
-
declare const viewSchema: default_2.ZodLiteral<"table">;
|
|
1145
|
-
|
|
1146
1196
|
export { }
|
|
1147
1197
|
|
|
1148
1198
|
|
|
@@ -1235,7 +1285,7 @@ declare global {
|
|
|
1235
1285
|
|
|
1236
1286
|
declare global {
|
|
1237
1287
|
interface HTMLElementTagNameMap {
|
|
1238
|
-
'gs-
|
|
1288
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
1239
1289
|
}
|
|
1240
1290
|
}
|
|
1241
1291
|
|
|
@@ -1243,7 +1293,7 @@ declare global {
|
|
|
1243
1293
|
declare global {
|
|
1244
1294
|
namespace JSX {
|
|
1245
1295
|
interface IntrinsicElements {
|
|
1246
|
-
'gs-
|
|
1296
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1247
1297
|
}
|
|
1248
1298
|
}
|
|
1249
1299
|
}
|
|
@@ -1251,7 +1301,7 @@ declare global {
|
|
|
1251
1301
|
|
|
1252
1302
|
declare global {
|
|
1253
1303
|
interface HTMLElementTagNameMap {
|
|
1254
|
-
'gs-
|
|
1304
|
+
'gs-aggregate': AggregateComponent;
|
|
1255
1305
|
}
|
|
1256
1306
|
}
|
|
1257
1307
|
|
|
@@ -1259,7 +1309,7 @@ declare global {
|
|
|
1259
1309
|
declare global {
|
|
1260
1310
|
namespace JSX {
|
|
1261
1311
|
interface IntrinsicElements {
|
|
1262
|
-
'gs-
|
|
1312
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1263
1313
|
}
|
|
1264
1314
|
}
|
|
1265
1315
|
}
|
|
@@ -1267,7 +1317,7 @@ declare global {
|
|
|
1267
1317
|
|
|
1268
1318
|
declare global {
|
|
1269
1319
|
interface HTMLElementTagNameMap {
|
|
1270
|
-
'gs-
|
|
1320
|
+
'gs-mutations-over-time': MutationsOverTimeComponent;
|
|
1271
1321
|
}
|
|
1272
1322
|
}
|
|
1273
1323
|
|
|
@@ -1275,7 +1325,7 @@ declare global {
|
|
|
1275
1325
|
declare global {
|
|
1276
1326
|
namespace JSX {
|
|
1277
1327
|
interface IntrinsicElements {
|
|
1278
|
-
'gs-
|
|
1328
|
+
'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1279
1329
|
}
|
|
1280
1330
|
}
|
|
1281
1331
|
}
|
|
@@ -1283,7 +1333,7 @@ declare global {
|
|
|
1283
1333
|
|
|
1284
1334
|
declare global {
|
|
1285
1335
|
interface HTMLElementTagNameMap {
|
|
1286
|
-
'gs-
|
|
1336
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
1287
1337
|
}
|
|
1288
1338
|
}
|
|
1289
1339
|
|
|
@@ -1291,7 +1341,7 @@ declare global {
|
|
|
1291
1341
|
declare global {
|
|
1292
1342
|
namespace JSX {
|
|
1293
1343
|
interface IntrinsicElements {
|
|
1294
|
-
'gs-
|
|
1344
|
+
'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1295
1345
|
}
|
|
1296
1346
|
}
|
|
1297
1347
|
}
|
|
@@ -1315,10 +1365,11 @@ declare global {
|
|
|
1315
1365
|
|
|
1316
1366
|
declare global {
|
|
1317
1367
|
interface HTMLElementTagNameMap {
|
|
1318
|
-
'gs-
|
|
1368
|
+
'gs-date-range-selector': DateRangeSelectorComponent;
|
|
1319
1369
|
}
|
|
1320
1370
|
interface HTMLElementEventMap {
|
|
1321
|
-
'gs-
|
|
1371
|
+
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
1372
|
+
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
1322
1373
|
}
|
|
1323
1374
|
}
|
|
1324
1375
|
|
|
@@ -1326,7 +1377,7 @@ declare global {
|
|
|
1326
1377
|
declare global {
|
|
1327
1378
|
namespace JSX {
|
|
1328
1379
|
interface IntrinsicElements {
|
|
1329
|
-
'gs-
|
|
1380
|
+
'gs-date-range-selector': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1330
1381
|
}
|
|
1331
1382
|
}
|
|
1332
1383
|
}
|
|
@@ -1334,11 +1385,10 @@ declare global {
|
|
|
1334
1385
|
|
|
1335
1386
|
declare global {
|
|
1336
1387
|
interface HTMLElementTagNameMap {
|
|
1337
|
-
'gs-
|
|
1388
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1338
1389
|
}
|
|
1339
1390
|
interface HTMLElementEventMap {
|
|
1340
|
-
'gs-
|
|
1341
|
-
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
1391
|
+
'gs-location-changed': CustomEvent<Record<string, string>>;
|
|
1342
1392
|
}
|
|
1343
1393
|
}
|
|
1344
1394
|
|
|
@@ -1346,7 +1396,7 @@ declare global {
|
|
|
1346
1396
|
declare global {
|
|
1347
1397
|
namespace JSX {
|
|
1348
1398
|
interface IntrinsicElements {
|
|
1349
|
-
'gs-
|
|
1399
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1350
1400
|
}
|
|
1351
1401
|
}
|
|
1352
1402
|
}
|
|
@@ -1376,7 +1426,7 @@ declare global {
|
|
|
1376
1426
|
'gs-mutation-filter': MutationFilterComponent;
|
|
1377
1427
|
}
|
|
1378
1428
|
interface HTMLElementEventMap {
|
|
1379
|
-
'gs-mutation-filter-changed': CustomEvent<
|
|
1429
|
+
'gs-mutation-filter-changed': CustomEvent<MutationsFilter>;
|
|
1380
1430
|
}
|
|
1381
1431
|
}
|
|
1382
1432
|
|