@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
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { customElement, property } from 'lit/decorators.js';
|
|
2
|
-
import {
|
|
2
|
+
import type { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
RelativeGrowthAdvantage,
|
|
6
6
|
type RelativeGrowthAdvantageProps,
|
|
7
7
|
} from '../../preact/relativeGrowthAdvantage/relative-growth-advantage';
|
|
8
|
-
import { type AxisMax } from '../../preact/shared/charts/getYAxisMax';
|
|
9
8
|
import { type Equals, type Expect } from '../../utils/typeAssertions';
|
|
10
9
|
import { PreactLitAdapter } from '../PreactLitAdapter';
|
|
11
10
|
|
|
@@ -42,14 +41,24 @@ export class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
|
|
|
42
41
|
* It must be a valid LAPIS filter object.
|
|
43
42
|
*/
|
|
44
43
|
@property({ type: Object })
|
|
45
|
-
numeratorFilter: Record<string, string | number | null | boolean>
|
|
44
|
+
numeratorFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
45
|
+
nucleotideMutations?: string[];
|
|
46
|
+
aminoAcidMutations?: string[];
|
|
47
|
+
nucleotideInsertions?: string[];
|
|
48
|
+
aminoAcidInsertions?: string[];
|
|
49
|
+
} = {};
|
|
46
50
|
|
|
47
51
|
/**
|
|
48
52
|
* LAPIS filter to select the data of the baseline variant.
|
|
49
53
|
* It must be a valid LAPIS filter object.
|
|
50
54
|
*/
|
|
51
55
|
@property({ type: Object })
|
|
52
|
-
denominatorFilter: Record<string, string | number | null | boolean>
|
|
56
|
+
denominatorFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
57
|
+
nucleotideMutations?: string[];
|
|
58
|
+
aminoAcidMutations?: string[];
|
|
59
|
+
nucleotideInsertions?: string[];
|
|
60
|
+
aminoAcidInsertions?: string[];
|
|
61
|
+
} = {};
|
|
53
62
|
|
|
54
63
|
/**
|
|
55
64
|
* The generation time represents the number of days over which the variant's relative growth advantage is measured.
|
|
@@ -120,20 +129,13 @@ export class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
|
|
|
120
129
|
width={this.width}
|
|
121
130
|
height={this.height}
|
|
122
131
|
lapisDateField={this.lapisDateField}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
logarithmic: this.yAxisMaxLogarithmic,
|
|
126
|
-
}}
|
|
132
|
+
yAxisMaxLinear={this.yAxisMaxLinear}
|
|
133
|
+
yAxisMaxLogarithmic={this.yAxisMaxLogarithmic}
|
|
127
134
|
/>
|
|
128
135
|
);
|
|
129
136
|
}
|
|
130
137
|
}
|
|
131
138
|
|
|
132
|
-
export interface RelativeGrowthAdvantageComponentProps extends Omit<RelativeGrowthAdvantageProps, 'yAxisMaxConfig'> {
|
|
133
|
-
yAxisMaxLinear?: AxisMax;
|
|
134
|
-
yAxisMaxLogarithmic?: AxisMax;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
139
|
declare global {
|
|
138
140
|
interface HTMLElementTagNameMap {
|
|
139
141
|
'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
|
|
@@ -186,13 +188,13 @@ type LapisDateFieldMatches = Expect<
|
|
|
186
188
|
type YAxisMaxLinearMatches = Expect<
|
|
187
189
|
Equals<
|
|
188
190
|
typeof RelativeGrowthAdvantageComponent.prototype.yAxisMaxLinear,
|
|
189
|
-
|
|
191
|
+
RelativeGrowthAdvantageProps['yAxisMaxLinear']
|
|
190
192
|
>
|
|
191
193
|
>;
|
|
192
194
|
type YAxisMaxLogarithmicMatches = Expect<
|
|
193
195
|
Equals<
|
|
194
196
|
typeof RelativeGrowthAdvantageComponent.prototype.yAxisMaxLogarithmic,
|
|
195
|
-
|
|
197
|
+
RelativeGrowthAdvantageProps['yAxisMaxLogarithmic']
|
|
196
198
|
>
|
|
197
199
|
>;
|
|
198
200
|
/* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
|
|
@@ -102,7 +102,12 @@ export class SequencesByLocationComponent extends PreactLitAdapterWithGridJsStyl
|
|
|
102
102
|
* you should usually filter by that country here (e.g. { country: 'USA' }).
|
|
103
103
|
*/
|
|
104
104
|
@property({ type: Object })
|
|
105
|
-
lapisFilter: Record<string, string | number | null | boolean>
|
|
105
|
+
lapisFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
106
|
+
nucleotideMutations?: string[];
|
|
107
|
+
aminoAcidMutations?: string[];
|
|
108
|
+
nucleotideInsertions?: string[];
|
|
109
|
+
aminoAcidInsertions?: string[];
|
|
110
|
+
} = {};
|
|
106
111
|
|
|
107
112
|
/**
|
|
108
113
|
* Required.
|
|
@@ -2,7 +2,6 @@ import { customElement, property } from 'lit/decorators.js';
|
|
|
2
2
|
import type { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
import { Statistics, type StatisticsProps } from '../../preact/statistic/statistics';
|
|
5
|
-
import type { LapisFilter } from '../../types';
|
|
6
5
|
import type { Equals, Expect } from '../../utils/typeAssertions';
|
|
7
6
|
import { PreactLitAdapterWithGridJsStyles } from '../PreactLitAdapterWithGridJsStyles';
|
|
8
7
|
|
|
@@ -19,14 +18,24 @@ export class StatisticsComponent extends PreactLitAdapterWithGridJsStyles {
|
|
|
19
18
|
* It must be a valid LAPIS filter object.
|
|
20
19
|
*/
|
|
21
20
|
@property({ type: Object })
|
|
22
|
-
numeratorFilter:
|
|
21
|
+
numeratorFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
22
|
+
nucleotideMutations?: string[];
|
|
23
|
+
aminoAcidMutations?: string[];
|
|
24
|
+
nucleotideInsertions?: string[];
|
|
25
|
+
aminoAcidInsertions?: string[];
|
|
26
|
+
} = {};
|
|
23
27
|
|
|
24
28
|
/**
|
|
25
29
|
* The filter to apply to the data for the denominator of the proportion.
|
|
26
30
|
* It must be a valid LAPIS filter object.
|
|
27
31
|
*/
|
|
28
32
|
@property({ type: Object })
|
|
29
|
-
denominatorFilter:
|
|
33
|
+
denominatorFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
|
|
34
|
+
nucleotideMutations?: string[];
|
|
35
|
+
aminoAcidMutations?: string[];
|
|
36
|
+
nucleotideInsertions?: string[];
|
|
37
|
+
aminoAcidInsertions?: string[];
|
|
38
|
+
} = {};
|
|
30
39
|
|
|
31
40
|
/**
|
|
32
41
|
* The width of the component.
|