@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.js
CHANGED
|
@@ -6,7 +6,7 @@ import { options, createContext as createContext$1, Fragment, render } from "pre
|
|
|
6
6
|
import { Grid } from "gridjs";
|
|
7
7
|
import { Chart, registerables, Scale } from "chart.js";
|
|
8
8
|
import { VennDiagramController, ArcSlice, extractSets } from "chartjs-chart-venn";
|
|
9
|
-
import {
|
|
9
|
+
import { v as views, n as namedLapisFilterSchema, s as sequenceTypeSchema, l as lapisFilterSchema, t as temporalGranularitySchema, a as dateRangeOptionSchema, b as toYYYYMMDD, D as DateRangeOptionChangedEvent, m as mutationsFilterSchema } from "./dateRangeOption-Bh2p78z0.js";
|
|
10
10
|
import { autoUpdate, computePosition, offset, shift, flip } from "@floating-ui/dom";
|
|
11
11
|
import { ReactiveElement } from "@lit/reactive-element";
|
|
12
12
|
import { BarWithErrorBarsController, BarWithErrorBar } from "chartjs-chart-error-bars";
|
|
@@ -2038,6 +2038,7 @@ function useQuery(fetchDataCallback, dependencies) {
|
|
|
2038
2038
|
}
|
|
2039
2039
|
return { data, error: null, isLoading: false };
|
|
2040
2040
|
}
|
|
2041
|
+
const mutationComparisonViewSchema = z$1.union([z$1.literal(views.table), z$1.literal(views.venn)]);
|
|
2041
2042
|
const mutationComparisonPropsSchema = z$1.object({
|
|
2042
2043
|
width: z$1.string(),
|
|
2043
2044
|
height: z$1.string(),
|
|
@@ -5640,11 +5641,11 @@ function filterMutationsData(data, displayedSegments, displayedMutationTypes) {
|
|
|
5640
5641
|
gridData: filteredSubstitutionsOrDeletions
|
|
5641
5642
|
};
|
|
5642
5643
|
}
|
|
5643
|
-
const
|
|
5644
|
+
const mutationsViewSchema = z$1.union([z$1.literal(views.table), z$1.literal(views.grid), z$1.literal(views.insertions)]);
|
|
5644
5645
|
const mutationsPropsSchema = z$1.object({
|
|
5645
5646
|
lapisFilter: lapisFilterSchema,
|
|
5646
5647
|
sequenceType: sequenceTypeSchema,
|
|
5647
|
-
views:
|
|
5648
|
+
views: mutationsViewSchema.array(),
|
|
5648
5649
|
pageSize: z$1.union([z$1.boolean(), z$1.number()]),
|
|
5649
5650
|
width: z$1.string(),
|
|
5650
5651
|
height: z$1.string()
|
|
@@ -5956,7 +5957,7 @@ const confidenceIntervalDataLabel = (value, lowerLimit, upperLimit, prefix) => {
|
|
|
5956
5957
|
};
|
|
5957
5958
|
const confidenceIntervalMethodSchema = z$1.union([z$1.literal("wilson"), z$1.literal("none")]);
|
|
5958
5959
|
const axisMaxSchema = z$1.union([z$1.literal("maxInData"), z$1.literal("limitTo1"), z$1.number()]);
|
|
5959
|
-
|
|
5960
|
+
z$1.object({
|
|
5960
5961
|
linear: axisMaxSchema.optional(),
|
|
5961
5962
|
logarithmic: axisMaxSchema.optional()
|
|
5962
5963
|
});
|
|
@@ -7019,12 +7020,6 @@ function getMinMaxNumber(values) {
|
|
|
7019
7020
|
}
|
|
7020
7021
|
return [min, max];
|
|
7021
7022
|
}
|
|
7022
|
-
function makeArray(arrayOrSingleItem) {
|
|
7023
|
-
if (Array.isArray(arrayOrSingleItem)) {
|
|
7024
|
-
return arrayOrSingleItem;
|
|
7025
|
-
}
|
|
7026
|
-
return [arrayOrSingleItem];
|
|
7027
|
-
}
|
|
7028
7023
|
Chart.register(...registerables, LogitScale);
|
|
7029
7024
|
const PrevalenceOverTimeBubbleChart = ({
|
|
7030
7025
|
data,
|
|
@@ -7450,8 +7445,7 @@ class DivisionOperator {
|
|
|
7450
7445
|
return { content };
|
|
7451
7446
|
}
|
|
7452
7447
|
}
|
|
7453
|
-
function queryPrevalenceOverTime(
|
|
7454
|
-
const numeratorFilters = makeArray(numeratorFilter);
|
|
7448
|
+
function queryPrevalenceOverTime(numeratorFilters, denominatorFilter, granularity, smoothingWindow, lapis, lapisDateField, signal) {
|
|
7455
7449
|
const denominatorData = queryAggregatedDataOverTime(
|
|
7456
7450
|
denominatorFilter,
|
|
7457
7451
|
granularity,
|
|
@@ -7543,7 +7537,7 @@ const ScalingSelector = ({
|
|
|
7543
7537
|
}
|
|
7544
7538
|
);
|
|
7545
7539
|
};
|
|
7546
|
-
const
|
|
7540
|
+
const prevalenceOverTimeViewSchema = z$1.union([
|
|
7547
7541
|
z$1.literal(views.table),
|
|
7548
7542
|
z$1.literal(views.bar),
|
|
7549
7543
|
z$1.literal(views.line),
|
|
@@ -7552,11 +7546,11 @@ const viewSchema$3 = z$1.union([
|
|
|
7552
7546
|
const prevalenceOverTimePropsSchema = z$1.object({
|
|
7553
7547
|
width: z$1.string(),
|
|
7554
7548
|
height: z$1.string(),
|
|
7555
|
-
|
|
7549
|
+
numeratorFilters: z$1.array(namedLapisFilterSchema).min(1),
|
|
7556
7550
|
denominatorFilter: lapisFilterSchema,
|
|
7557
7551
|
granularity: temporalGranularitySchema,
|
|
7558
7552
|
smoothingWindow: z$1.number(),
|
|
7559
|
-
views: z$1.array(
|
|
7553
|
+
views: z$1.array(prevalenceOverTimeViewSchema),
|
|
7560
7554
|
confidenceIntervalMethods: z$1.array(confidenceIntervalMethodSchema),
|
|
7561
7555
|
lapisDateField: z$1.string().min(1),
|
|
7562
7556
|
pageSize: z$1.union([z$1.boolean(), z$1.number()]),
|
|
@@ -7569,18 +7563,18 @@ const PrevalenceOverTime = (componentProps) => {
|
|
|
7569
7563
|
return /* @__PURE__ */ u$1(ErrorBoundary, { size, schema: prevalenceOverTimePropsSchema, componentProps, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(PrevalenceOverTimeInner, { ...componentProps }) }) });
|
|
7570
7564
|
};
|
|
7571
7565
|
const PrevalenceOverTimeInner = (componentProps) => {
|
|
7572
|
-
const {
|
|
7566
|
+
const { numeratorFilters, denominatorFilter, granularity, smoothingWindow, lapisDateField } = componentProps;
|
|
7573
7567
|
const lapis = x(LapisUrlContext);
|
|
7574
7568
|
const { data, error, isLoading } = useQuery(
|
|
7575
7569
|
() => queryPrevalenceOverTime(
|
|
7576
|
-
|
|
7570
|
+
numeratorFilters,
|
|
7577
7571
|
denominatorFilter,
|
|
7578
7572
|
granularity,
|
|
7579
7573
|
smoothingWindow,
|
|
7580
7574
|
lapis,
|
|
7581
7575
|
lapisDateField
|
|
7582
7576
|
),
|
|
7583
|
-
[lapis,
|
|
7577
|
+
[lapis, numeratorFilters, denominatorFilter, granularity, smoothingWindow, lapisDateField]
|
|
7584
7578
|
);
|
|
7585
7579
|
if (isLoading) {
|
|
7586
7580
|
return /* @__PURE__ */ u$1(LoadingDisplay, {});
|
|
@@ -7742,7 +7736,7 @@ var __decorateClass$b = (decorators, target, key, kind) => {
|
|
|
7742
7736
|
let PrevalenceOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles {
|
|
7743
7737
|
constructor() {
|
|
7744
7738
|
super(...arguments);
|
|
7745
|
-
this.
|
|
7739
|
+
this.numeratorFilters = [];
|
|
7746
7740
|
this.denominatorFilter = {};
|
|
7747
7741
|
this.granularity = "day";
|
|
7748
7742
|
this.smoothingWindow = 0;
|
|
@@ -7759,7 +7753,7 @@ let PrevalenceOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles
|
|
|
7759
7753
|
return /* @__PURE__ */ u$1(
|
|
7760
7754
|
PrevalenceOverTime,
|
|
7761
7755
|
{
|
|
7762
|
-
|
|
7756
|
+
numeratorFilters: this.numeratorFilters,
|
|
7763
7757
|
denominatorFilter: this.denominatorFilter,
|
|
7764
7758
|
granularity: this.granularity,
|
|
7765
7759
|
smoothingWindow: this.smoothingWindow,
|
|
@@ -7777,7 +7771,7 @@ let PrevalenceOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles
|
|
|
7777
7771
|
};
|
|
7778
7772
|
__decorateClass$b([
|
|
7779
7773
|
n2({ type: Object })
|
|
7780
|
-
], PrevalenceOverTimeComponent.prototype, "
|
|
7774
|
+
], PrevalenceOverTimeComponent.prototype, "numeratorFilters", 2);
|
|
7781
7775
|
__decorateClass$b([
|
|
7782
7776
|
n2({ type: Object })
|
|
7783
7777
|
], PrevalenceOverTimeComponent.prototype, "denominatorFilter", 2);
|
|
@@ -8041,16 +8035,17 @@ function toYearMonthDay(d2) {
|
|
|
8041
8035
|
count: d2.count
|
|
8042
8036
|
};
|
|
8043
8037
|
}
|
|
8044
|
-
const
|
|
8038
|
+
const relativeGrowthAdvantageViewSchema = z$1.literal(views.line);
|
|
8045
8039
|
const relativeGrowthAdvantagePropsSchema = z$1.object({
|
|
8046
8040
|
width: z$1.string(),
|
|
8047
8041
|
height: z$1.string(),
|
|
8048
8042
|
numeratorFilter: lapisFilterSchema,
|
|
8049
8043
|
denominatorFilter: lapisFilterSchema,
|
|
8050
8044
|
generationTime: z$1.number(),
|
|
8051
|
-
views: z$1.array(
|
|
8045
|
+
views: z$1.array(relativeGrowthAdvantageViewSchema),
|
|
8052
8046
|
lapisDateField: z$1.string().min(1),
|
|
8053
|
-
|
|
8047
|
+
yAxisMaxLinear: axisMaxSchema,
|
|
8048
|
+
yAxisMaxLogarithmic: axisMaxSchema
|
|
8054
8049
|
});
|
|
8055
8050
|
const RelativeGrowthAdvantage = (componentProps) => {
|
|
8056
8051
|
const { width, height } = componentProps;
|
|
@@ -8107,7 +8102,10 @@ const RelativeGrowthAdvantageTabs = ({
|
|
|
8107
8102
|
params: data.params
|
|
8108
8103
|
},
|
|
8109
8104
|
yAxisScaleType,
|
|
8110
|
-
yAxisMaxConfig:
|
|
8105
|
+
yAxisMaxConfig: {
|
|
8106
|
+
linear: originalComponentProps.yAxisMaxLinear,
|
|
8107
|
+
logarithmic: originalComponentProps.yAxisMaxLogarithmic
|
|
8108
|
+
}
|
|
8111
8109
|
}
|
|
8112
8110
|
)
|
|
8113
8111
|
};
|
|
@@ -8202,10 +8200,8 @@ let RelativeGrowthAdvantageComponent = class extends PreactLitAdapter {
|
|
|
8202
8200
|
width: this.width,
|
|
8203
8201
|
height: this.height,
|
|
8204
8202
|
lapisDateField: this.lapisDateField,
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
logarithmic: this.yAxisMaxLogarithmic
|
|
8208
|
-
}
|
|
8203
|
+
yAxisMaxLinear: this.yAxisMaxLinear,
|
|
8204
|
+
yAxisMaxLogarithmic: this.yAxisMaxLogarithmic
|
|
8209
8205
|
}
|
|
8210
8206
|
);
|
|
8211
8207
|
}
|
|
@@ -8288,11 +8284,11 @@ const AggregateTable = ({ data, fields, pageSize }) => {
|
|
|
8288
8284
|
];
|
|
8289
8285
|
return /* @__PURE__ */ u$1(Table, { data, columns: headers, pageSize });
|
|
8290
8286
|
};
|
|
8291
|
-
const
|
|
8287
|
+
const aggregateViewSchema = z$1.literal(views.table);
|
|
8292
8288
|
const aggregatePropsSchema = z$1.object({
|
|
8293
|
-
|
|
8289
|
+
lapisFilter: lapisFilterSchema,
|
|
8294
8290
|
fields: z$1.array(z$1.string().min(1)),
|
|
8295
|
-
views: z$1.array(
|
|
8291
|
+
views: z$1.array(aggregateViewSchema),
|
|
8296
8292
|
initialSortField: z$1.string(),
|
|
8297
8293
|
initialSortDirection: z$1.union([z$1.literal("ascending"), z$1.literal("descending")]),
|
|
8298
8294
|
pageSize: z$1.union([z$1.boolean(), z$1.number()]),
|
|
@@ -8305,11 +8301,14 @@ const Aggregate = (componentProps) => {
|
|
|
8305
8301
|
return /* @__PURE__ */ u$1(ErrorBoundary, { size, schema: aggregatePropsSchema, componentProps, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(AggregateInner, { ...componentProps }) }) });
|
|
8306
8302
|
};
|
|
8307
8303
|
const AggregateInner = (componentProps) => {
|
|
8308
|
-
const { fields,
|
|
8304
|
+
const { fields, lapisFilter, initialSortField, initialSortDirection } = componentProps;
|
|
8309
8305
|
const lapis = x(LapisUrlContext);
|
|
8310
8306
|
const { data, error, isLoading } = useQuery(async () => {
|
|
8311
|
-
return queryAggregateData(
|
|
8312
|
-
|
|
8307
|
+
return queryAggregateData(lapisFilter, fields, lapis, {
|
|
8308
|
+
field: initialSortField,
|
|
8309
|
+
direction: initialSortDirection
|
|
8310
|
+
});
|
|
8311
|
+
}, [lapisFilter, fields, lapis]);
|
|
8313
8312
|
if (isLoading) {
|
|
8314
8313
|
return /* @__PURE__ */ u$1(LoadingDisplay, {});
|
|
8315
8314
|
}
|
|
@@ -8376,7 +8375,7 @@ let AggregateComponent = class extends PreactLitAdapterWithGridJsStyles {
|
|
|
8376
8375
|
super(...arguments);
|
|
8377
8376
|
this.fields = [];
|
|
8378
8377
|
this.views = ["table"];
|
|
8379
|
-
this.
|
|
8378
|
+
this.lapisFilter = {};
|
|
8380
8379
|
this.width = "100%";
|
|
8381
8380
|
this.height = "700px";
|
|
8382
8381
|
this.initialSortField = "count";
|
|
@@ -8389,7 +8388,7 @@ let AggregateComponent = class extends PreactLitAdapterWithGridJsStyles {
|
|
|
8389
8388
|
{
|
|
8390
8389
|
fields: this.fields,
|
|
8391
8390
|
views: this.views,
|
|
8392
|
-
|
|
8391
|
+
lapisFilter: this.lapisFilter,
|
|
8393
8392
|
width: this.width,
|
|
8394
8393
|
height: this.height,
|
|
8395
8394
|
initialSortField: this.initialSortField,
|
|
@@ -8407,7 +8406,7 @@ __decorateClass$9([
|
|
|
8407
8406
|
], AggregateComponent.prototype, "views", 2);
|
|
8408
8407
|
__decorateClass$9([
|
|
8409
8408
|
n2({ type: Object })
|
|
8410
|
-
], AggregateComponent.prototype, "
|
|
8409
|
+
], AggregateComponent.prototype, "lapisFilter", 2);
|
|
8411
8410
|
__decorateClass$9([
|
|
8412
8411
|
n2({ type: String })
|
|
8413
8412
|
], AggregateComponent.prototype, "width", 2);
|
|
@@ -8566,11 +8565,10 @@ const NumberSequencesOverTimeTable = ({ data, granularity, pageSize }) => {
|
|
|
8566
8565
|
}, [data, granularity]);
|
|
8567
8566
|
return /* @__PURE__ */ u$1(Table, { data: flatTableData, columns, pageSize });
|
|
8568
8567
|
};
|
|
8569
|
-
async function queryNumberOfSequencesOverTime(lapis,
|
|
8570
|
-
const
|
|
8571
|
-
const queries = lapisFilters.map(async ({ displayName, lapisFilter: lapisFilter2 }) => {
|
|
8568
|
+
async function queryNumberOfSequencesOverTime(lapis, lapisFilters, lapisDateField, granularity, smoothingWindow) {
|
|
8569
|
+
const queries = lapisFilters.map(async ({ displayName, lapisFilter }) => {
|
|
8572
8570
|
const { content } = await queryAggregatedDataOverTime(
|
|
8573
|
-
|
|
8571
|
+
lapisFilter,
|
|
8574
8572
|
granularity,
|
|
8575
8573
|
smoothingWindow,
|
|
8576
8574
|
lapisDateField
|
|
@@ -8590,7 +8588,7 @@ const numberSequencesOverTimeViewSchema = z$1.union([
|
|
|
8590
8588
|
const numberSequencesOverTimePropsSchema = z$1.object({
|
|
8591
8589
|
width: z$1.string(),
|
|
8592
8590
|
height: z$1.string(),
|
|
8593
|
-
|
|
8591
|
+
lapisFilters: z$1.array(namedLapisFilterSchema).min(1),
|
|
8594
8592
|
lapisDateField: z$1.string().min(1),
|
|
8595
8593
|
views: z$1.array(numberSequencesOverTimeViewSchema),
|
|
8596
8594
|
granularity: temporalGranularitySchema,
|
|
@@ -8603,11 +8601,11 @@ const NumberSequencesOverTime = (componentProps) => {
|
|
|
8603
8601
|
return /* @__PURE__ */ u$1(ErrorBoundary, { size, componentProps, schema: numberSequencesOverTimePropsSchema, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(NumberSequencesOverTimeInner, { ...componentProps }) }) });
|
|
8604
8602
|
};
|
|
8605
8603
|
const NumberSequencesOverTimeInner = (componentProps) => {
|
|
8606
|
-
const {
|
|
8604
|
+
const { lapisFilters, lapisDateField, granularity, smoothingWindow } = componentProps;
|
|
8607
8605
|
const lapis = x(LapisUrlContext);
|
|
8608
8606
|
const { data, error, isLoading } = useQuery(
|
|
8609
|
-
() => queryNumberOfSequencesOverTime(lapis,
|
|
8610
|
-
[lapis,
|
|
8607
|
+
() => queryNumberOfSequencesOverTime(lapis, lapisFilters, lapisDateField, granularity, smoothingWindow),
|
|
8608
|
+
[lapis, lapisFilters, lapisDateField, granularity, smoothingWindow]
|
|
8611
8609
|
);
|
|
8612
8610
|
if (isLoading) {
|
|
8613
8611
|
return /* @__PURE__ */ u$1(LoadingDisplay, {});
|
|
@@ -8725,7 +8723,7 @@ var __decorateClass$8 = (decorators, target, key, kind) => {
|
|
|
8725
8723
|
let NumberSequencesOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles {
|
|
8726
8724
|
constructor() {
|
|
8727
8725
|
super(...arguments);
|
|
8728
|
-
this.
|
|
8726
|
+
this.lapisFilters = [];
|
|
8729
8727
|
this.lapisDateField = "";
|
|
8730
8728
|
this.views = ["bar", "line", "table"];
|
|
8731
8729
|
this.width = "100%";
|
|
@@ -8738,7 +8736,7 @@ let NumberSequencesOverTimeComponent = class extends PreactLitAdapterWithGridJsS
|
|
|
8738
8736
|
return /* @__PURE__ */ u$1(
|
|
8739
8737
|
NumberSequencesOverTime,
|
|
8740
8738
|
{
|
|
8741
|
-
|
|
8739
|
+
lapisFilters: this.lapisFilters,
|
|
8742
8740
|
lapisDateField: this.lapisDateField,
|
|
8743
8741
|
views: this.views,
|
|
8744
8742
|
width: this.width,
|
|
@@ -8752,7 +8750,7 @@ let NumberSequencesOverTimeComponent = class extends PreactLitAdapterWithGridJsS
|
|
|
8752
8750
|
};
|
|
8753
8751
|
__decorateClass$8([
|
|
8754
8752
|
n2({ type: Object })
|
|
8755
|
-
], NumberSequencesOverTimeComponent.prototype, "
|
|
8753
|
+
], NumberSequencesOverTimeComponent.prototype, "lapisFilters", 2);
|
|
8756
8754
|
__decorateClass$8([
|
|
8757
8755
|
n2({ type: String })
|
|
8758
8756
|
], NumberSequencesOverTimeComponent.prototype, "lapisDateField", 2);
|
|
@@ -9199,11 +9197,11 @@ function useWebWorker(messageToWorker, WorkerConstructor) {
|
|
|
9199
9197
|
}, [messageToWorker, worker]);
|
|
9200
9198
|
return { data, error, isLoading };
|
|
9201
9199
|
}
|
|
9202
|
-
const
|
|
9200
|
+
const mutationsOverTimeViewSchema = z$1.literal(views.grid);
|
|
9203
9201
|
const mutationOverTimeSchema = z$1.object({
|
|
9204
9202
|
lapisFilter: lapisFilterSchema,
|
|
9205
9203
|
sequenceType: sequenceTypeSchema,
|
|
9206
|
-
views: z$1.array(
|
|
9204
|
+
views: z$1.array(mutationsOverTimeViewSchema),
|
|
9207
9205
|
granularity: temporalGranularitySchema,
|
|
9208
9206
|
lapisDateField: z$1.string().min(1),
|
|
9209
9207
|
width: z$1.string(),
|
|
@@ -10630,7 +10628,7 @@ const dateRangeSelectorInnerPropsSchema = z$1.object({
|
|
|
10630
10628
|
initialValue: z$1.string().optional(),
|
|
10631
10629
|
initialDateFrom: z$1.string().date().optional(),
|
|
10632
10630
|
initialDateTo: z$1.string().date().optional(),
|
|
10633
|
-
|
|
10631
|
+
lapisDateField: z$1.string().min(1)
|
|
10634
10632
|
});
|
|
10635
10633
|
const dateRangeSelectorPropsSchema = dateRangeSelectorInnerPropsSchema.extend({
|
|
10636
10634
|
width: z$1.string()
|
|
@@ -10644,7 +10642,7 @@ const DateRangeSelectorInner = ({
|
|
|
10644
10642
|
dateRangeOptions,
|
|
10645
10643
|
earliestDate = "1900-01-01",
|
|
10646
10644
|
initialValue,
|
|
10647
|
-
|
|
10645
|
+
lapisDateField,
|
|
10648
10646
|
initialDateFrom,
|
|
10649
10647
|
initialDateTo
|
|
10650
10648
|
}) => {
|
|
@@ -10746,8 +10744,8 @@ const DateRangeSelectorInner = ({
|
|
|
10746
10744
|
const dateFrom = dateFromPicker == null ? void 0 : dateFromPicker.selectedDates[0];
|
|
10747
10745
|
const dateTo = dateToPicker == null ? void 0 : dateToPicker.selectedDates[0];
|
|
10748
10746
|
const detail = {
|
|
10749
|
-
...dateFrom !== void 0 && { [`${
|
|
10750
|
-
...dateTo !== void 0 && { [`${
|
|
10747
|
+
...dateFrom !== void 0 && { [`${lapisDateField}From`]: toYYYYMMDD(dateFrom) },
|
|
10748
|
+
...dateTo !== void 0 && { [`${lapisDateField}To`]: toYYYYMMDD(dateTo) }
|
|
10751
10749
|
};
|
|
10752
10750
|
(_a = divRef.current) == null ? void 0 : _a.dispatchEvent(
|
|
10753
10751
|
new CustomEvent("gs-date-range-filter-changed", {
|
|
@@ -10820,7 +10818,7 @@ let DateRangeSelectorComponent = class extends PreactLitAdapter {
|
|
|
10820
10818
|
this.initialDateFrom = void 0;
|
|
10821
10819
|
this.initialDateTo = void 0;
|
|
10822
10820
|
this.width = "100%";
|
|
10823
|
-
this.
|
|
10821
|
+
this.lapisDateField = "";
|
|
10824
10822
|
}
|
|
10825
10823
|
render() {
|
|
10826
10824
|
return /* @__PURE__ */ u$1(
|
|
@@ -10831,7 +10829,7 @@ let DateRangeSelectorComponent = class extends PreactLitAdapter {
|
|
|
10831
10829
|
initialValue: this.initialValue,
|
|
10832
10830
|
initialDateFrom: this.initialDateFrom,
|
|
10833
10831
|
initialDateTo: this.initialDateTo,
|
|
10834
|
-
|
|
10832
|
+
lapisDateField: this.lapisDateField,
|
|
10835
10833
|
width: this.width
|
|
10836
10834
|
}
|
|
10837
10835
|
);
|
|
@@ -10857,7 +10855,7 @@ __decorateClass$4([
|
|
|
10857
10855
|
], DateRangeSelectorComponent.prototype, "width", 2);
|
|
10858
10856
|
__decorateClass$4([
|
|
10859
10857
|
n2({ type: String })
|
|
10860
|
-
], DateRangeSelectorComponent.prototype, "
|
|
10858
|
+
], DateRangeSelectorComponent.prototype, "lapisDateField", 2);
|
|
10861
10859
|
DateRangeSelectorComponent = __decorateClass$4([
|
|
10862
10860
|
t$2("gs-date-range-selector")
|
|
10863
10861
|
], DateRangeSelectorComponent);
|
|
@@ -11402,14 +11400,8 @@ const parseAndValidateMutation = (value, referenceGenome) => {
|
|
|
11402
11400
|
}
|
|
11403
11401
|
return null;
|
|
11404
11402
|
};
|
|
11405
|
-
const selectedMutationFilterStringsSchema = z$1.object({
|
|
11406
|
-
nucleotideMutations: z$1.array(z$1.string()),
|
|
11407
|
-
aminoAcidMutations: z$1.array(z$1.string()),
|
|
11408
|
-
nucleotideInsertions: z$1.array(z$1.string()),
|
|
11409
|
-
aminoAcidInsertions: z$1.array(z$1.string())
|
|
11410
|
-
});
|
|
11411
11403
|
const mutationFilterInnerPropsSchema = z$1.object({
|
|
11412
|
-
initialValue: z$1.union([
|
|
11404
|
+
initialValue: z$1.union([mutationsFilterSchema.optional(), z$1.array(z$1.string()), z$1.undefined()])
|
|
11413
11405
|
});
|
|
11414
11406
|
const mutationFilterPropsSchema = mutationFilterInnerPropsSchema.extend({
|
|
11415
11407
|
width: z$1.string()
|