@genspectrum/dashboard-components 0.14.2 → 0.16.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 +281 -105
- package/dist/{LineageFilterChangedEvent-C9dXOxt6.js → LineageFilterChangedEvent-COWV-Y0k.js} +6 -6
- package/dist/LineageFilterChangedEvent-COWV-Y0k.js.map +1 -0
- package/dist/assets/{mutationOverTimeWorker-Dxnxrfe0.js.map → mutationOverTimeWorker-BL50C-yi.js.map} +1 -1
- package/dist/components.d.ts +40 -40
- package/dist/components.js +373 -243
- package/dist/components.js.map +1 -1
- package/dist/style.css +9 -0
- package/dist/util.d.ts +49 -49
- package/dist/util.js +2 -2
- package/package.json +1 -1
- package/src/preact/ReferenceGenomeContext.ts +14 -1
- package/src/preact/aggregatedData/aggregate-bar-chart.tsx +26 -5
- package/src/preact/aggregatedData/aggregate.stories.tsx +0 -1
- package/src/preact/aggregatedData/aggregate.tsx +5 -1
- package/src/preact/components/ReferenceGenomesAwaiter.tsx +1 -6
- package/src/preact/components/resize-container.tsx +1 -1
- package/src/preact/{dateRangeSelector/date-range-selector.stories.tsx → dateRangeFilter/date-range-filter.stories.tsx} +15 -15
- package/src/preact/{dateRangeSelector/date-range-selector.tsx → dateRangeFilter/date-range-filter.tsx} +9 -9
- package/src/preact/{dateRangeSelector → dateRangeFilter}/dateRangeOption.ts +2 -2
- package/src/preact/mutationComparison/mutation-comparison-venn.tsx +4 -2
- package/src/preact/mutationComparison/mutation-comparison.stories.tsx +0 -1
- package/src/preact/mutationComparison/mutation-comparison.tsx +5 -1
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +17 -1
- package/src/preact/mutationFilter/mutation-filter.tsx +8 -0
- package/src/preact/mutations/mutations.stories.tsx +0 -1
- package/src/preact/mutations/mutations.tsx +1 -1
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +0 -2
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +1 -1
- package/src/preact/numberSequencesOverTime/number-sequences-over-time-bar-chart.tsx +8 -3
- package/src/preact/numberSequencesOverTime/number-sequences-over-time-line-chart.tsx +8 -3
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +3 -1
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +18 -3
- package/src/preact/prevalenceOverTime/prevalence-over-time-bar-chart.tsx +48 -35
- package/src/preact/prevalenceOverTime/prevalence-over-time-bubble-chart.tsx +83 -70
- package/src/preact/prevalenceOverTime/prevalence-over-time-line-chart.tsx +48 -37
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +0 -3
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +6 -1
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage-chart.tsx +31 -23
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +0 -1
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +5 -1
- package/src/preact/sequencesByLocation/__mockData__/worldAtlas.json +1 -0
- package/src/preact/{map → sequencesByLocation}/sequences-by-location-map.tsx +6 -3
- package/src/preact/{map → sequencesByLocation}/sequences-by-location-table.tsx +1 -1
- package/src/preact/{map → sequencesByLocation}/sequences-by-location.stories.tsx +58 -1
- package/src/preact/{map → sequencesByLocation}/sequences-by-location.tsx +10 -1
- package/src/preact/shared/aspectRatio/AspectRatio.tsx +13 -0
- package/src/preact/shared/charts/getMaintainAspectRatio.ts +3 -0
- package/src/preact/statistic/statistics.stories.tsx +0 -1
- package/src/preact/statistic/statistics.tsx +4 -4
- package/src/preact/{textInput/TextInputChangedEvent.ts → textFilter/TextFilterChangedEvent.ts} +2 -2
- package/src/preact/{textInput/text-input.stories.tsx → textFilter/text-filter.stories.tsx} +10 -10
- package/src/preact/{textInput/text-input.tsx → textFilter/text-filter.tsx} +10 -10
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +0 -1
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +1 -1
- package/src/query/computeMapLocationData.spec.ts +1 -1
- package/src/query/computeMapLocationData.ts +1 -1
- package/src/query/querySequencesByLocationData.ts +1 -1
- package/src/utilEntrypoint.ts +3 -3
- package/src/web-components/ResizeContainer.mdx +4 -1
- package/src/web-components/input/{gs-date-range-selector.stories.ts → gs-date-range-filter.stories.ts} +59 -14
- package/src/web-components/input/{gs-date-range-selector.tsx → gs-date-range-filter.tsx} +28 -13
- package/src/web-components/input/{gs-text-input.stories.ts → gs-text-filter.stories.ts} +15 -15
- package/src/web-components/input/{gs-text-input.tsx → gs-text-filter.tsx} +16 -16
- package/src/web-components/input/index.ts +2 -2
- package/src/web-components/visualization/gs-aggregate.stories.ts +13 -6
- package/src/web-components/visualization/gs-aggregate.tsx +1 -1
- package/src/web-components/visualization/gs-mutation-comparison.stories.ts +8 -1
- package/src/web-components/visualization/gs-mutation-comparison.tsx +1 -1
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +9 -1
- package/src/web-components/visualization/gs-mutations-over-time.tsx +1 -1
- package/src/web-components/visualization/gs-mutations.stories.ts +8 -1
- package/src/web-components/visualization/gs-mutations.tsx +1 -1
- package/src/web-components/visualization/gs-number-sequences-over-time.stories.ts +11 -1
- package/src/web-components/visualization/gs-number-sequences-over-time.tsx +1 -1
- package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +8 -2
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +1 -1
- package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +8 -1
- package/src/web-components/visualization/gs-relative-growth-advantage.tsx +1 -1
- package/src/web-components/visualization/gs-sequences-by-location.stories.ts +13 -7
- package/src/web-components/visualization/gs-sequences-by-location.tsx +6 -3
- package/src/web-components/visualization/gs-statistics.stories.ts +0 -1
- package/src/web-components/visualization/gs-statistics.tsx +1 -1
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +9 -1
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +1 -1
- package/standalone-bundle/assets/{mutationOverTimeWorker-CmSrq4SZ.js.map → mutationOverTimeWorker-CFB5-Mdk.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +6032 -5937
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/dist/LineageFilterChangedEvent-C9dXOxt6.js.map +0 -1
- package/src/preact/map/__mockData__/worldAtlas.json +0 -497127
- /package/src/preact/{dateRangeSelector → dateRangeFilter}/computeInitialValues.spec.ts +0 -0
- /package/src/preact/{dateRangeSelector → dateRangeFilter}/computeInitialValues.ts +0 -0
- /package/src/preact/{dateRangeSelector → dateRangeFilter}/dateConversion.ts +0 -0
- /package/src/preact/{dateRangeSelector → dateRangeFilter}/selectableOptions.ts +0 -0
- /package/src/preact/{map → sequencesByLocation}/__mockData__/aggregatedGermany.json +0 -0
- /package/src/preact/{map → sequencesByLocation}/__mockData__/aggregatedWorld.json +0 -0
- /package/src/preact/{map → sequencesByLocation}/__mockData__/germanyMap.json +0 -0
- /package/src/preact/{map → sequencesByLocation}/__mockData__/howToGenerateWorldMap.md +0 -0
- /package/src/preact/{map → sequencesByLocation}/leafletStyleModifications.css +0 -0
- /package/src/preact/{map → sequencesByLocation}/loadMapSource.tsx +0 -0
- /package/src/preact/{textInput → textFilter}/__mockData__/aggregated_hosts.json +0 -0
- /package/src/preact/{textInput → textFilter}/fetchStringAutocompleteList.spec.ts +0 -0
- /package/src/preact/{textInput → textFilter}/fetchStringAutocompleteList.ts +0 -0
package/dist/style.css
CHANGED
|
@@ -3065,6 +3065,9 @@ input.tab:checked + .tab-content,
|
|
|
3065
3065
|
.relative {
|
|
3066
3066
|
position: relative;
|
|
3067
3067
|
}
|
|
3068
|
+
.inset-0 {
|
|
3069
|
+
inset: 0px;
|
|
3070
|
+
}
|
|
3068
3071
|
.-right-3 {
|
|
3069
3072
|
right: -0.75rem;
|
|
3070
3073
|
}
|
|
@@ -3248,6 +3251,9 @@ input.tab:checked + .tab-content,
|
|
|
3248
3251
|
.min-w-32 {
|
|
3249
3252
|
min-width: 8rem;
|
|
3250
3253
|
}
|
|
3254
|
+
.min-w-\[180px\] {
|
|
3255
|
+
min-width: 180px;
|
|
3256
|
+
}
|
|
3251
3257
|
.min-w-\[7\.5rem\] {
|
|
3252
3258
|
min-width: 7.5rem;
|
|
3253
3259
|
}
|
|
@@ -3331,6 +3337,9 @@ input.tab:checked + .tab-content,
|
|
|
3331
3337
|
.whitespace-nowrap {
|
|
3332
3338
|
white-space: nowrap;
|
|
3333
3339
|
}
|
|
3340
|
+
.text-wrap {
|
|
3341
|
+
text-wrap: wrap;
|
|
3342
|
+
}
|
|
3334
3343
|
.text-nowrap {
|
|
3335
3344
|
text-wrap: nowrap;
|
|
3336
3345
|
}
|
package/dist/util.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare const aggregatePropsSchema: default_2.ZodObject<{
|
|
|
25
25
|
initialSortDirection: default_2.ZodUnion<[default_2.ZodLiteral<"ascending">, default_2.ZodLiteral<"descending">]>;
|
|
26
26
|
pageSize: default_2.ZodUnion<[default_2.ZodBoolean, default_2.ZodNumber]>;
|
|
27
27
|
width: default_2.ZodString;
|
|
28
|
-
height: default_2.ZodString
|
|
28
|
+
height: default_2.ZodOptional<default_2.ZodString>;
|
|
29
29
|
maxNumberOfBars: default_2.ZodNumber;
|
|
30
30
|
}, "strip", default_2.ZodTypeAny, {
|
|
31
31
|
lapisFilter: Record<string, string | number | boolean | string[] | null | undefined> & {
|
|
@@ -35,13 +35,13 @@ declare const aggregatePropsSchema: default_2.ZodObject<{
|
|
|
35
35
|
aminoAcidInsertions?: string[] | undefined;
|
|
36
36
|
};
|
|
37
37
|
fields: string[];
|
|
38
|
-
height: string;
|
|
39
38
|
width: string;
|
|
40
39
|
pageSize: number | boolean;
|
|
41
40
|
views: ("table" | "bar")[];
|
|
42
41
|
initialSortField: string;
|
|
43
42
|
initialSortDirection: "ascending" | "descending";
|
|
44
43
|
maxNumberOfBars: number;
|
|
44
|
+
height?: string | undefined;
|
|
45
45
|
}, {
|
|
46
46
|
lapisFilter: Record<string, string | number | boolean | string[] | null | undefined> & {
|
|
47
47
|
nucleotideMutations?: string[] | undefined;
|
|
@@ -50,13 +50,13 @@ declare const aggregatePropsSchema: default_2.ZodObject<{
|
|
|
50
50
|
aminoAcidInsertions?: string[] | undefined;
|
|
51
51
|
};
|
|
52
52
|
fields: string[];
|
|
53
|
-
height: string;
|
|
54
53
|
width: string;
|
|
55
54
|
pageSize: number | boolean;
|
|
56
55
|
views: ("table" | "bar")[];
|
|
57
56
|
initialSortField: string;
|
|
58
57
|
initialSortDirection: "ascending" | "descending";
|
|
59
58
|
maxNumberOfBars: number;
|
|
59
|
+
height?: string | undefined;
|
|
60
60
|
}>;
|
|
61
61
|
|
|
62
62
|
export declare type AggregateView = default_2.infer<typeof aggregateViewSchema>;
|
|
@@ -78,7 +78,7 @@ export declare class DateRangeOptionChangedEvent extends CustomEvent<DateRangeSe
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
* Presets for the `gs-date-range-
|
|
81
|
+
* Presets for the `gs-date-range-filter` component that can be used as `dateRangeOptions`.
|
|
82
82
|
*/
|
|
83
83
|
export declare const dateRangeOptionPresets: {
|
|
84
84
|
last2Weeks: {
|
|
@@ -111,7 +111,7 @@ export declare const dateRangeOptionPresets: {
|
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
* A date range option that can be used in the `gs-date-range-
|
|
114
|
+
* A date range option that can be used in the `gs-date-range-filter` component.
|
|
115
115
|
*/
|
|
116
116
|
declare const dateRangeOptionSchema: default_2.ZodObject<{
|
|
117
117
|
/** The label of the date range option that will be shown to the user */
|
|
@@ -206,7 +206,7 @@ export declare type MutationComparisonProps = default_2.infer<typeof mutationCom
|
|
|
206
206
|
|
|
207
207
|
declare const mutationComparisonPropsSchema: default_2.ZodObject<{
|
|
208
208
|
width: default_2.ZodString;
|
|
209
|
-
height: default_2.ZodString
|
|
209
|
+
height: default_2.ZodOptional<default_2.ZodString>;
|
|
210
210
|
lapisFilters: default_2.ZodArray<default_2.ZodObject<{
|
|
211
211
|
lapisFilter: default_2.ZodIntersection<default_2.ZodRecord<default_2.ZodString, default_2.ZodUnion<[default_2.ZodString, default_2.ZodArray<default_2.ZodString, "many">, default_2.ZodNumber, default_2.ZodNull, default_2.ZodBoolean, default_2.ZodUndefined]>>, default_2.ZodObject<{
|
|
212
212
|
nucleotideMutations: default_2.ZodOptional<default_2.ZodArray<default_2.ZodString, "many">>;
|
|
@@ -246,7 +246,6 @@ declare const mutationComparisonPropsSchema: default_2.ZodObject<{
|
|
|
246
246
|
views: default_2.ZodArray<default_2.ZodUnion<[default_2.ZodLiteral<"table">, default_2.ZodLiteral<"venn">]>, "many">;
|
|
247
247
|
pageSize: default_2.ZodUnion<[default_2.ZodBoolean, default_2.ZodNumber]>;
|
|
248
248
|
}, "strip", default_2.ZodTypeAny, {
|
|
249
|
-
height: string;
|
|
250
249
|
width: string;
|
|
251
250
|
pageSize: number | boolean;
|
|
252
251
|
lapisFilters: {
|
|
@@ -260,8 +259,8 @@ declare const mutationComparisonPropsSchema: default_2.ZodObject<{
|
|
|
260
259
|
}[];
|
|
261
260
|
sequenceType: "nucleotide" | "amino acid";
|
|
262
261
|
views: ("table" | "venn")[];
|
|
262
|
+
height?: string | undefined;
|
|
263
263
|
}, {
|
|
264
|
-
height: string;
|
|
265
264
|
width: string;
|
|
266
265
|
pageSize: number | boolean;
|
|
267
266
|
lapisFilters: {
|
|
@@ -275,6 +274,7 @@ declare const mutationComparisonPropsSchema: default_2.ZodObject<{
|
|
|
275
274
|
}[];
|
|
276
275
|
sequenceType: "nucleotide" | "amino acid";
|
|
277
276
|
views: ("table" | "venn")[];
|
|
277
|
+
height?: string | undefined;
|
|
278
278
|
}>;
|
|
279
279
|
|
|
280
280
|
export declare type MutationComparisonView = default_2.infer<typeof mutationComparisonViewSchema>;
|
|
@@ -339,7 +339,7 @@ declare const mutationsPropsSchema: default_2.ZodObject<{
|
|
|
339
339
|
views: default_2.ZodArray<default_2.ZodUnion<[default_2.ZodLiteral<"table">, default_2.ZodLiteral<"grid">, default_2.ZodLiteral<"insertions">]>, "many">;
|
|
340
340
|
pageSize: default_2.ZodUnion<[default_2.ZodBoolean, default_2.ZodNumber]>;
|
|
341
341
|
width: default_2.ZodString;
|
|
342
|
-
height: default_2.ZodString
|
|
342
|
+
height: default_2.ZodOptional<default_2.ZodString>;
|
|
343
343
|
}, "strip", default_2.ZodTypeAny, {
|
|
344
344
|
lapisFilter: Record<string, string | number | boolean | string[] | null | undefined> & {
|
|
345
345
|
nucleotideMutations?: string[] | undefined;
|
|
@@ -347,11 +347,11 @@ declare const mutationsPropsSchema: default_2.ZodObject<{
|
|
|
347
347
|
nucleotideInsertions?: string[] | undefined;
|
|
348
348
|
aminoAcidInsertions?: string[] | undefined;
|
|
349
349
|
};
|
|
350
|
-
height: string;
|
|
351
350
|
width: string;
|
|
352
351
|
pageSize: number | boolean;
|
|
353
352
|
sequenceType: "nucleotide" | "amino acid";
|
|
354
353
|
views: ("table" | "grid" | "insertions")[];
|
|
354
|
+
height?: string | undefined;
|
|
355
355
|
baselineLapisFilter?: (Record<string, string | number | boolean | string[] | null | undefined> & {
|
|
356
356
|
nucleotideMutations?: string[] | undefined;
|
|
357
357
|
aminoAcidMutations?: string[] | undefined;
|
|
@@ -365,11 +365,11 @@ declare const mutationsPropsSchema: default_2.ZodObject<{
|
|
|
365
365
|
nucleotideInsertions?: string[] | undefined;
|
|
366
366
|
aminoAcidInsertions?: string[] | undefined;
|
|
367
367
|
};
|
|
368
|
-
height: string;
|
|
369
368
|
width: string;
|
|
370
369
|
pageSize: number | boolean;
|
|
371
370
|
sequenceType: "nucleotide" | "amino acid";
|
|
372
371
|
views: ("table" | "grid" | "insertions")[];
|
|
372
|
+
height?: string | undefined;
|
|
373
373
|
baselineLapisFilter?: (Record<string, string | number | boolean | string[] | null | undefined> & {
|
|
374
374
|
nucleotideMutations?: string[] | undefined;
|
|
375
375
|
aminoAcidMutations?: string[] | undefined;
|
|
@@ -424,7 +424,7 @@ export declare type NumberSequencesOverTimeProps = default_2.infer<typeof number
|
|
|
424
424
|
|
|
425
425
|
declare const numberSequencesOverTimePropsSchema: default_2.ZodObject<{
|
|
426
426
|
width: default_2.ZodString;
|
|
427
|
-
height: default_2.ZodString
|
|
427
|
+
height: default_2.ZodOptional<default_2.ZodString>;
|
|
428
428
|
lapisFilters: default_2.ZodArray<default_2.ZodObject<{
|
|
429
429
|
lapisFilter: default_2.ZodIntersection<default_2.ZodRecord<default_2.ZodString, default_2.ZodUnion<[default_2.ZodString, default_2.ZodArray<default_2.ZodString, "many">, default_2.ZodNumber, default_2.ZodNull, default_2.ZodBoolean, default_2.ZodUndefined]>>, default_2.ZodObject<{
|
|
430
430
|
nucleotideMutations: default_2.ZodOptional<default_2.ZodArray<default_2.ZodString, "many">>;
|
|
@@ -466,7 +466,6 @@ declare const numberSequencesOverTimePropsSchema: default_2.ZodObject<{
|
|
|
466
466
|
smoothingWindow: default_2.ZodNumber;
|
|
467
467
|
pageSize: default_2.ZodUnion<[default_2.ZodBoolean, default_2.ZodNumber]>;
|
|
468
468
|
}, "strip", default_2.ZodTypeAny, {
|
|
469
|
-
height: string;
|
|
470
469
|
width: string;
|
|
471
470
|
pageSize: number | boolean;
|
|
472
471
|
lapisFilters: {
|
|
@@ -482,8 +481,8 @@ declare const numberSequencesOverTimePropsSchema: default_2.ZodObject<{
|
|
|
482
481
|
granularity: "day" | "week" | "month" | "year";
|
|
483
482
|
smoothingWindow: number;
|
|
484
483
|
lapisDateField: string;
|
|
484
|
+
height?: string | undefined;
|
|
485
485
|
}, {
|
|
486
|
-
height: string;
|
|
487
486
|
width: string;
|
|
488
487
|
pageSize: number | boolean;
|
|
489
488
|
lapisFilters: {
|
|
@@ -499,6 +498,7 @@ declare const numberSequencesOverTimePropsSchema: default_2.ZodObject<{
|
|
|
499
498
|
granularity: "day" | "week" | "month" | "year";
|
|
500
499
|
smoothingWindow: number;
|
|
501
500
|
lapisDateField: string;
|
|
501
|
+
height?: string | undefined;
|
|
502
502
|
}>;
|
|
503
503
|
|
|
504
504
|
export declare type NumberSequencesOverTimeView = default_2.infer<typeof numberSequencesOverTimeViewSchema>;
|
|
@@ -509,7 +509,7 @@ export declare type PrevalenceOverTimeProps = default_2.infer<typeof prevalenceO
|
|
|
509
509
|
|
|
510
510
|
declare const prevalenceOverTimePropsSchema: default_2.ZodObject<{
|
|
511
511
|
width: default_2.ZodString;
|
|
512
|
-
height: default_2.ZodString
|
|
512
|
+
height: default_2.ZodOptional<default_2.ZodString>;
|
|
513
513
|
numeratorFilters: default_2.ZodArray<default_2.ZodObject<{
|
|
514
514
|
lapisFilter: default_2.ZodIntersection<default_2.ZodRecord<default_2.ZodString, default_2.ZodUnion<[default_2.ZodString, default_2.ZodArray<default_2.ZodString, "many">, default_2.ZodNumber, default_2.ZodNull, default_2.ZodBoolean, default_2.ZodUndefined]>>, default_2.ZodObject<{
|
|
515
515
|
nucleotideMutations: default_2.ZodOptional<default_2.ZodArray<default_2.ZodString, "many">>;
|
|
@@ -570,7 +570,6 @@ declare const prevalenceOverTimePropsSchema: default_2.ZodObject<{
|
|
|
570
570
|
yAxisMaxLinear: default_2.ZodUnion<[default_2.ZodLiteral<"maxInData">, default_2.ZodLiteral<"limitTo1">, default_2.ZodNumber]>;
|
|
571
571
|
yAxisMaxLogarithmic: default_2.ZodUnion<[default_2.ZodLiteral<"maxInData">, default_2.ZodLiteral<"limitTo1">, default_2.ZodNumber]>;
|
|
572
572
|
}, "strip", default_2.ZodTypeAny, {
|
|
573
|
-
height: string;
|
|
574
573
|
width: string;
|
|
575
574
|
pageSize: number | boolean;
|
|
576
575
|
views: ("table" | "bar" | "line" | "bubble")[];
|
|
@@ -595,8 +594,8 @@ declare const prevalenceOverTimePropsSchema: default_2.ZodObject<{
|
|
|
595
594
|
lapisDateField: string;
|
|
596
595
|
yAxisMaxLinear: number | "maxInData" | "limitTo1";
|
|
597
596
|
yAxisMaxLogarithmic: number | "maxInData" | "limitTo1";
|
|
597
|
+
height?: string | undefined;
|
|
598
598
|
}, {
|
|
599
|
-
height: string;
|
|
600
599
|
width: string;
|
|
601
600
|
pageSize: number | boolean;
|
|
602
601
|
views: ("table" | "bar" | "line" | "bubble")[];
|
|
@@ -621,6 +620,7 @@ declare const prevalenceOverTimePropsSchema: default_2.ZodObject<{
|
|
|
621
620
|
lapisDateField: string;
|
|
622
621
|
yAxisMaxLinear: number | "maxInData" | "limitTo1";
|
|
623
622
|
yAxisMaxLogarithmic: number | "maxInData" | "limitTo1";
|
|
623
|
+
height?: string | undefined;
|
|
624
624
|
}>;
|
|
625
625
|
|
|
626
626
|
export declare type PrevalenceOverTimeView = default_2.infer<typeof prevalenceOverTimeViewSchema>;
|
|
@@ -631,7 +631,7 @@ export declare type RelativeGrowthAdvantageProps = default_2.infer<typeof relati
|
|
|
631
631
|
|
|
632
632
|
declare const relativeGrowthAdvantagePropsSchema: default_2.ZodObject<{
|
|
633
633
|
width: default_2.ZodString;
|
|
634
|
-
height: default_2.ZodString
|
|
634
|
+
height: default_2.ZodOptional<default_2.ZodString>;
|
|
635
635
|
numeratorFilter: default_2.ZodIntersection<default_2.ZodRecord<default_2.ZodString, default_2.ZodUnion<[default_2.ZodString, default_2.ZodArray<default_2.ZodString, "many">, default_2.ZodNumber, default_2.ZodNull, default_2.ZodBoolean, default_2.ZodUndefined]>>, default_2.ZodObject<{
|
|
636
636
|
nucleotideMutations: default_2.ZodOptional<default_2.ZodArray<default_2.ZodString, "many">>;
|
|
637
637
|
aminoAcidMutations: default_2.ZodOptional<default_2.ZodArray<default_2.ZodString, "many">>;
|
|
@@ -670,7 +670,6 @@ declare const relativeGrowthAdvantagePropsSchema: default_2.ZodObject<{
|
|
|
670
670
|
yAxisMaxLinear: default_2.ZodUnion<[default_2.ZodLiteral<"maxInData">, default_2.ZodLiteral<"limitTo1">, default_2.ZodNumber]>;
|
|
671
671
|
yAxisMaxLogarithmic: default_2.ZodUnion<[default_2.ZodLiteral<"maxInData">, default_2.ZodLiteral<"limitTo1">, default_2.ZodNumber]>;
|
|
672
672
|
}, "strip", default_2.ZodTypeAny, {
|
|
673
|
-
height: string;
|
|
674
673
|
width: string;
|
|
675
674
|
views: "line"[];
|
|
676
675
|
denominatorFilter: Record<string, string | number | boolean | string[] | null | undefined> & {
|
|
@@ -689,8 +688,8 @@ declare const relativeGrowthAdvantagePropsSchema: default_2.ZodObject<{
|
|
|
689
688
|
aminoAcidInsertions?: string[] | undefined;
|
|
690
689
|
};
|
|
691
690
|
generationTime: number;
|
|
691
|
+
height?: string | undefined;
|
|
692
692
|
}, {
|
|
693
|
-
height: string;
|
|
694
693
|
width: string;
|
|
695
694
|
views: "line"[];
|
|
696
695
|
denominatorFilter: Record<string, string | number | boolean | string[] | null | undefined> & {
|
|
@@ -709,6 +708,7 @@ declare const relativeGrowthAdvantagePropsSchema: default_2.ZodObject<{
|
|
|
709
708
|
aminoAcidInsertions?: string[] | undefined;
|
|
710
709
|
};
|
|
711
710
|
generationTime: number;
|
|
711
|
+
height?: string | undefined;
|
|
712
712
|
}>;
|
|
713
713
|
|
|
714
714
|
export declare type RelativeGrowthAdvantageView = default_2.infer<typeof relativeGrowthAdvantageViewSchema>;
|
|
@@ -723,7 +723,7 @@ export declare type StatisticsProps = default_2.infer<typeof statisticsPropsSche
|
|
|
723
723
|
|
|
724
724
|
declare const statisticsPropsSchema: default_2.ZodObject<{
|
|
725
725
|
width: default_2.ZodString;
|
|
726
|
-
height: default_2.ZodString
|
|
726
|
+
height: default_2.ZodOptional<default_2.ZodString>;
|
|
727
727
|
numeratorFilter: default_2.ZodIntersection<default_2.ZodRecord<default_2.ZodString, default_2.ZodUnion<[default_2.ZodString, default_2.ZodArray<default_2.ZodString, "many">, default_2.ZodNumber, default_2.ZodNull, default_2.ZodBoolean, default_2.ZodUndefined]>>, default_2.ZodObject<{
|
|
728
728
|
nucleotideMutations: default_2.ZodOptional<default_2.ZodArray<default_2.ZodString, "many">>;
|
|
729
729
|
aminoAcidMutations: default_2.ZodOptional<default_2.ZodArray<default_2.ZodString, "many">>;
|
|
@@ -757,7 +757,6 @@ declare const statisticsPropsSchema: default_2.ZodObject<{
|
|
|
757
757
|
aminoAcidInsertions?: string[] | undefined;
|
|
758
758
|
}>>;
|
|
759
759
|
}, "strip", default_2.ZodTypeAny, {
|
|
760
|
-
height: string;
|
|
761
760
|
width: string;
|
|
762
761
|
denominatorFilter: Record<string, string | number | boolean | string[] | null | undefined> & {
|
|
763
762
|
nucleotideMutations?: string[] | undefined;
|
|
@@ -771,8 +770,8 @@ declare const statisticsPropsSchema: default_2.ZodObject<{
|
|
|
771
770
|
nucleotideInsertions?: string[] | undefined;
|
|
772
771
|
aminoAcidInsertions?: string[] | undefined;
|
|
773
772
|
};
|
|
773
|
+
height?: string | undefined;
|
|
774
774
|
}, {
|
|
775
|
-
height: string;
|
|
776
775
|
width: string;
|
|
777
776
|
denominatorFilter: Record<string, string | number | boolean | string[] | null | undefined> & {
|
|
778
777
|
nucleotideMutations?: string[] | undefined;
|
|
@@ -786,13 +785,14 @@ declare const statisticsPropsSchema: default_2.ZodObject<{
|
|
|
786
785
|
nucleotideInsertions?: string[] | undefined;
|
|
787
786
|
aminoAcidInsertions?: string[] | undefined;
|
|
788
787
|
};
|
|
788
|
+
height?: string | undefined;
|
|
789
789
|
}>;
|
|
790
790
|
|
|
791
791
|
export declare type TemporalGranularity = default_2.infer<typeof temporalGranularitySchema>;
|
|
792
792
|
|
|
793
793
|
declare const temporalGranularitySchema: default_2.ZodUnion<[default_2.ZodLiteral<"day">, default_2.ZodLiteral<"week">, default_2.ZodLiteral<"month">, default_2.ZodLiteral<"year">]>;
|
|
794
794
|
|
|
795
|
-
export declare class
|
|
795
|
+
export declare class TextFilterChangedEvent extends CustomEvent<LapisTextFilter> {
|
|
796
796
|
constructor(detail: LapisTextFilter);
|
|
797
797
|
}
|
|
798
798
|
|
|
@@ -848,7 +848,7 @@ declare global {
|
|
|
848
848
|
|
|
849
849
|
declare global {
|
|
850
850
|
interface HTMLElementTagNameMap {
|
|
851
|
-
'gs-
|
|
851
|
+
'gs-mutation-comparison-component': MutationComparisonComponent;
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
854
|
|
|
@@ -856,7 +856,7 @@ declare global {
|
|
|
856
856
|
declare global {
|
|
857
857
|
namespace JSX {
|
|
858
858
|
interface IntrinsicElements {
|
|
859
|
-
'gs-
|
|
859
|
+
'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
862
|
}
|
|
@@ -864,7 +864,7 @@ declare global {
|
|
|
864
864
|
|
|
865
865
|
declare global {
|
|
866
866
|
interface HTMLElementTagNameMap {
|
|
867
|
-
'gs-
|
|
867
|
+
'gs-mutations-component': MutationsComponent;
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
870
|
|
|
@@ -872,7 +872,7 @@ declare global {
|
|
|
872
872
|
declare global {
|
|
873
873
|
namespace JSX {
|
|
874
874
|
interface IntrinsicElements {
|
|
875
|
-
'gs-
|
|
875
|
+
'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
878
|
}
|
|
@@ -912,7 +912,7 @@ declare global {
|
|
|
912
912
|
|
|
913
913
|
declare global {
|
|
914
914
|
interface HTMLElementTagNameMap {
|
|
915
|
-
'gs-
|
|
915
|
+
'gs-aggregate': AggregateComponent;
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
918
|
|
|
@@ -920,7 +920,7 @@ declare global {
|
|
|
920
920
|
declare global {
|
|
921
921
|
namespace JSX {
|
|
922
922
|
interface IntrinsicElements {
|
|
923
|
-
'gs-
|
|
923
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
}
|
|
@@ -928,7 +928,7 @@ declare global {
|
|
|
928
928
|
|
|
929
929
|
declare global {
|
|
930
930
|
interface HTMLElementTagNameMap {
|
|
931
|
-
'gs-
|
|
931
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
934
|
|
|
@@ -936,7 +936,7 @@ declare global {
|
|
|
936
936
|
declare global {
|
|
937
937
|
namespace JSX {
|
|
938
938
|
interface IntrinsicElements {
|
|
939
|
-
'gs-
|
|
939
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
940
940
|
}
|
|
941
941
|
}
|
|
942
942
|
}
|
|
@@ -992,7 +992,11 @@ declare global {
|
|
|
992
992
|
|
|
993
993
|
declare global {
|
|
994
994
|
interface HTMLElementTagNameMap {
|
|
995
|
-
'gs-
|
|
995
|
+
'gs-date-range-filter': DateRangeFilterComponent;
|
|
996
|
+
}
|
|
997
|
+
interface HTMLElementEventMap {
|
|
998
|
+
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
999
|
+
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
996
1000
|
}
|
|
997
1001
|
}
|
|
998
1002
|
|
|
@@ -1000,7 +1004,7 @@ declare global {
|
|
|
1000
1004
|
declare global {
|
|
1001
1005
|
namespace JSX {
|
|
1002
1006
|
interface IntrinsicElements {
|
|
1003
|
-
'gs-
|
|
1007
|
+
'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1004
1008
|
}
|
|
1005
1009
|
}
|
|
1006
1010
|
}
|
|
@@ -1008,11 +1012,10 @@ declare global {
|
|
|
1008
1012
|
|
|
1009
1013
|
declare global {
|
|
1010
1014
|
interface HTMLElementTagNameMap {
|
|
1011
|
-
'gs-
|
|
1015
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1012
1016
|
}
|
|
1013
1017
|
interface HTMLElementEventMap {
|
|
1014
|
-
'gs-
|
|
1015
|
-
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
1018
|
+
'gs-location-changed': LocationChangedEvent;
|
|
1016
1019
|
}
|
|
1017
1020
|
}
|
|
1018
1021
|
|
|
@@ -1020,7 +1023,7 @@ declare global {
|
|
|
1020
1023
|
declare global {
|
|
1021
1024
|
namespace JSX {
|
|
1022
1025
|
interface IntrinsicElements {
|
|
1023
|
-
'gs-
|
|
1026
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1024
1027
|
}
|
|
1025
1028
|
}
|
|
1026
1029
|
}
|
|
@@ -1028,10 +1031,10 @@ declare global {
|
|
|
1028
1031
|
|
|
1029
1032
|
declare global {
|
|
1030
1033
|
interface HTMLElementTagNameMap {
|
|
1031
|
-
'gs-text-
|
|
1034
|
+
'gs-text-filter': TextFilterComponent;
|
|
1032
1035
|
}
|
|
1033
1036
|
interface HTMLElementEventMap {
|
|
1034
|
-
'gs-text-
|
|
1037
|
+
'gs-text-filter-changed': TextFilterChangedEvent;
|
|
1035
1038
|
}
|
|
1036
1039
|
}
|
|
1037
1040
|
|
|
@@ -1039,7 +1042,7 @@ declare global {
|
|
|
1039
1042
|
declare global {
|
|
1040
1043
|
namespace JSX {
|
|
1041
1044
|
interface IntrinsicElements {
|
|
1042
|
-
'gs-text-
|
|
1045
|
+
'gs-text-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1043
1046
|
}
|
|
1044
1047
|
}
|
|
1045
1048
|
}
|
|
@@ -1047,10 +1050,10 @@ declare global {
|
|
|
1047
1050
|
|
|
1048
1051
|
declare global {
|
|
1049
1052
|
interface HTMLElementTagNameMap {
|
|
1050
|
-
'gs-
|
|
1053
|
+
'gs-mutation-filter': MutationFilterComponent;
|
|
1051
1054
|
}
|
|
1052
1055
|
interface HTMLElementEventMap {
|
|
1053
|
-
'gs-
|
|
1056
|
+
'gs-mutation-filter-changed': CustomEvent<MutationsFilter>;
|
|
1054
1057
|
}
|
|
1055
1058
|
}
|
|
1056
1059
|
|
|
@@ -1058,7 +1061,7 @@ declare global {
|
|
|
1058
1061
|
declare global {
|
|
1059
1062
|
namespace JSX {
|
|
1060
1063
|
interface IntrinsicElements {
|
|
1061
|
-
'gs-
|
|
1064
|
+
'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1062
1065
|
}
|
|
1063
1066
|
}
|
|
1064
1067
|
}
|
|
@@ -1085,10 +1088,7 @@ declare global {
|
|
|
1085
1088
|
|
|
1086
1089
|
declare global {
|
|
1087
1090
|
interface HTMLElementTagNameMap {
|
|
1088
|
-
'gs-
|
|
1089
|
-
}
|
|
1090
|
-
interface HTMLElementEventMap {
|
|
1091
|
-
'gs-mutation-filter-changed': CustomEvent<MutationsFilter>;
|
|
1091
|
+
'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
1094
|
|
|
@@ -1096,7 +1096,7 @@ declare global {
|
|
|
1096
1096
|
declare global {
|
|
1097
1097
|
namespace JSX {
|
|
1098
1098
|
interface IntrinsicElements {
|
|
1099
|
-
'gs-
|
|
1099
|
+
'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
package/dist/util.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { D, a, L, T, d, v } from "./LineageFilterChangedEvent-
|
|
1
|
+
import { D, a, L, T, d, v } from "./LineageFilterChangedEvent-COWV-Y0k.js";
|
|
2
2
|
export {
|
|
3
3
|
D as DateRangeOptionChangedEvent,
|
|
4
4
|
a as LineageFilterChangedEvent,
|
|
5
5
|
L as LocationChangedEvent,
|
|
6
|
-
T as
|
|
6
|
+
T as TextFilterChangedEvent,
|
|
7
7
|
d as dateRangeOptionPresets,
|
|
8
8
|
v as views
|
|
9
9
|
};
|
package/package.json
CHANGED
|
@@ -2,4 +2,17 @@ import { createContext } from 'preact';
|
|
|
2
2
|
|
|
3
3
|
import { type ReferenceGenome } from '../lapisApi/ReferenceGenome';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const UNINITIALIZED_SEQUENCE = '__uninitialized__';
|
|
6
|
+
|
|
7
|
+
export const ReferenceGenomeContext = createContext<ReferenceGenome>({
|
|
8
|
+
nucleotideSequences: [{ name: UNINITIALIZED_SEQUENCE, sequence: '' }],
|
|
9
|
+
genes: [],
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export function isNotInitialized(referenceGenome: ReferenceGenome) {
|
|
13
|
+
return (
|
|
14
|
+
referenceGenome.genes.length === 0 &&
|
|
15
|
+
referenceGenome.nucleotideSequences.length === 1 &&
|
|
16
|
+
referenceGenome.nucleotideSequences[0].name === UNINITIALIZED_SEQUENCE
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -13,6 +13,7 @@ interface AggregateBarChartProps {
|
|
|
13
13
|
data: AggregateData;
|
|
14
14
|
fields: string[];
|
|
15
15
|
maxNumberOfBars: number;
|
|
16
|
+
maintainAspectRatio: boolean;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
Chart.register(...registerables, BarController);
|
|
@@ -23,7 +24,12 @@ type DataPoint = {
|
|
|
23
24
|
proportion: number;
|
|
24
25
|
};
|
|
25
26
|
|
|
26
|
-
export const AggregateBarChart: FunctionComponent<AggregateBarChartProps> = ({
|
|
27
|
+
export const AggregateBarChart: FunctionComponent<AggregateBarChartProps> = ({
|
|
28
|
+
data,
|
|
29
|
+
fields,
|
|
30
|
+
maxNumberOfBars,
|
|
31
|
+
maintainAspectRatio,
|
|
32
|
+
}) => {
|
|
27
33
|
if (data.length === 0) {
|
|
28
34
|
return <NoDataDisplay />;
|
|
29
35
|
}
|
|
@@ -42,10 +48,22 @@ export const AggregateBarChart: FunctionComponent<AggregateBarChartProps> = ({ d
|
|
|
42
48
|
);
|
|
43
49
|
}
|
|
44
50
|
|
|
45
|
-
return
|
|
51
|
+
return (
|
|
52
|
+
<AggregateBarChartInner
|
|
53
|
+
data={data}
|
|
54
|
+
fields={fields}
|
|
55
|
+
maxNumberOfBars={maxNumberOfBars}
|
|
56
|
+
maintainAspectRatio={maintainAspectRatio}
|
|
57
|
+
/>
|
|
58
|
+
);
|
|
46
59
|
};
|
|
47
60
|
|
|
48
|
-
const AggregateBarChartInner: FunctionComponent<AggregateBarChartProps> = ({
|
|
61
|
+
const AggregateBarChartInner: FunctionComponent<AggregateBarChartProps> = ({
|
|
62
|
+
data,
|
|
63
|
+
fields,
|
|
64
|
+
maxNumberOfBars,
|
|
65
|
+
maintainAspectRatio,
|
|
66
|
+
}) => {
|
|
49
67
|
const config = useMemo((): ChartConfiguration<'bar', DataPoint[]> => {
|
|
50
68
|
const { datasets, countsOfEachBar } = getDatasets(fields, maxNumberOfBars, data);
|
|
51
69
|
|
|
@@ -55,7 +73,7 @@ const AggregateBarChartInner: FunctionComponent<AggregateBarChartProps> = ({ dat
|
|
|
55
73
|
datasets,
|
|
56
74
|
},
|
|
57
75
|
options: {
|
|
58
|
-
maintainAspectRatio
|
|
76
|
+
maintainAspectRatio,
|
|
59
77
|
animation: false,
|
|
60
78
|
indexAxis: 'y',
|
|
61
79
|
scales: {
|
|
@@ -64,6 +82,9 @@ const AggregateBarChartInner: FunctionComponent<AggregateBarChartProps> = ({ dat
|
|
|
64
82
|
},
|
|
65
83
|
y: {
|
|
66
84
|
stacked: true,
|
|
85
|
+
ticks: {
|
|
86
|
+
autoSkip: false,
|
|
87
|
+
},
|
|
67
88
|
},
|
|
68
89
|
},
|
|
69
90
|
plugins: {
|
|
@@ -92,7 +113,7 @@ const AggregateBarChartInner: FunctionComponent<AggregateBarChartProps> = ({ dat
|
|
|
92
113
|
},
|
|
93
114
|
},
|
|
94
115
|
};
|
|
95
|
-
}, [data, fields, maxNumberOfBars]);
|
|
116
|
+
}, [data, fields, maintainAspectRatio, maxNumberOfBars]);
|
|
96
117
|
|
|
97
118
|
return <GsChart configuration={config} />;
|
|
98
119
|
};
|
|
@@ -15,6 +15,7 @@ import { ResizeContainer } from '../components/resize-container';
|
|
|
15
15
|
import Tabs from '../components/tabs';
|
|
16
16
|
import { useQuery } from '../useQuery';
|
|
17
17
|
import { AggregateBarChart } from './aggregate-bar-chart';
|
|
18
|
+
import { getMaintainAspectRatio } from '../shared/charts/getMaintainAspectRatio';
|
|
18
19
|
|
|
19
20
|
const aggregateViewSchema = z.union([z.literal(views.table), z.literal(views.bar)]);
|
|
20
21
|
export type AggregateView = z.infer<typeof aggregateViewSchema>;
|
|
@@ -27,7 +28,7 @@ const aggregatePropsSchema = z.object({
|
|
|
27
28
|
initialSortDirection: z.union([z.literal('ascending'), z.literal('descending')]),
|
|
28
29
|
pageSize: z.union([z.boolean(), z.number()]),
|
|
29
30
|
width: z.string(),
|
|
30
|
-
height: z.string(),
|
|
31
|
+
height: z.string().optional(),
|
|
31
32
|
maxNumberOfBars: z.number(),
|
|
32
33
|
});
|
|
33
34
|
export type AggregateProps = z.infer<typeof aggregatePropsSchema>;
|
|
@@ -74,6 +75,8 @@ type AggregatedDataTabsProps = {
|
|
|
74
75
|
};
|
|
75
76
|
|
|
76
77
|
const AggregatedDataTabs: FunctionComponent<AggregatedDataTabsProps> = ({ data, originalComponentProps }) => {
|
|
78
|
+
const maintainAspectRatio = getMaintainAspectRatio(originalComponentProps.height);
|
|
79
|
+
|
|
77
80
|
const getTab = (view: AggregateView) => {
|
|
78
81
|
switch (view) {
|
|
79
82
|
case views.table:
|
|
@@ -97,6 +100,7 @@ const AggregatedDataTabs: FunctionComponent<AggregatedDataTabsProps> = ({ data,
|
|
|
97
100
|
data={data}
|
|
98
101
|
fields={originalComponentProps.fields}
|
|
99
102
|
maxNumberOfBars={originalComponentProps.maxNumberOfBars}
|
|
103
|
+
maintainAspectRatio={maintainAspectRatio}
|
|
100
104
|
/>
|
|
101
105
|
),
|
|
102
106
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type ComponentChildren, type FunctionalComponent } from 'preact';
|
|
2
2
|
import { useContext } from 'preact/hooks';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
import { ReferenceGenomeContext } from '../ReferenceGenomeContext';
|
|
4
|
+
import { isNotInitialized, ReferenceGenomeContext } from '../ReferenceGenomeContext';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Sometimes the reference genome is not immediately available.
|
|
@@ -19,7 +18,3 @@ export const ReferenceGenomesAwaiter: FunctionalComponent<{ children: ComponentC
|
|
|
19
18
|
|
|
20
19
|
return <>{children}</>;
|
|
21
20
|
};
|
|
22
|
-
|
|
23
|
-
function isNotInitialized(referenceGenome: ReferenceGenome) {
|
|
24
|
-
return referenceGenome.nucleotideSequences.length === 0 && referenceGenome.genes.length === 0;
|
|
25
|
-
}
|