@genspectrum/dashboard-components 0.13.5 → 0.13.7
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 +29 -29
- package/dist/components.d.ts +15 -17
- package/dist/components.js +462 -285
- package/dist/components.js.map +1 -1
- package/dist/style.css +20 -5
- package/dist/util.d.ts +14 -14
- package/package.json +1 -1
- package/src/preact/components/downshift-combobox.tsx +2 -2
- package/src/preact/components/mutation-info.tsx +36 -0
- package/src/preact/components/tabs.tsx +3 -5
- package/src/preact/locationFilter/fetchAutocompletionList.spec.ts +13 -13
- package/src/preact/locationFilter/fetchAutocompletionList.ts +55 -19
- package/src/preact/locationFilter/location-filter.stories.tsx +1 -1
- package/src/preact/locationFilter/location-filter.tsx +18 -12
- package/src/preact/mutationComparison/mutation-comparison.tsx +26 -2
- package/src/preact/mutationFilter/ExampleMutation.tsx +68 -0
- package/src/preact/mutationFilter/mutation-filter-info.tsx +179 -112
- package/src/preact/mutationFilter/mutation-filter.tsx +10 -5
- package/src/preact/mutations/mutations.tsx +5 -23
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +26 -4
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +2 -6
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +1 -1
- package/src/query/queryWastewaterMutationsOverTime.spec.ts +29 -1
- package/src/query/queryWastewaterMutationsOverTime.ts +30 -16
- package/src/web-components/{app.stories.ts → gs-app.stories.ts} +1 -1
- package/src/web-components/{app.ts → gs-app.ts} +2 -2
- package/src/web-components/index.ts +1 -1
- package/src/web-components/input/gs-date-range-selector.stories.ts +1 -1
- package/src/web-components/input/gs-lineage-filter.stories.ts +1 -1
- package/src/web-components/input/gs-location-filter.stories.ts +2 -2
- package/src/web-components/input/gs-mutation-filter.stories.ts +2 -2
- package/src/web-components/input/gs-text-input.stories.ts +1 -1
- package/src/web-components/visualization/gs-aggregate.stories.ts +1 -1
- package/src/web-components/visualization/gs-mutation-comparison.stories.ts +1 -1
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +1 -1
- package/src/web-components/visualization/gs-mutations.stories.ts +1 -1
- package/src/web-components/visualization/gs-number-sequences-over-time.stories.ts +1 -1
- package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +1 -1
- package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +1 -1
- package/src/web-components/visualization/gs-sequences-by-location.stories.ts +1 -1
- package/src/web-components/visualization/gs-statistics.stories.ts +1 -1
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +4 -1
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +6 -2
- package/standalone-bundle/dashboard-components.js +5561 -5445
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
|
@@ -29,7 +29,7 @@ const lapisUrlSchema = z.string().url();
|
|
|
29
29
|
* This component does __not__ use a shadow DOM. Children of this component will be rendered directly in the light DOM.
|
|
30
30
|
*/
|
|
31
31
|
@customElement('gs-app')
|
|
32
|
-
export class
|
|
32
|
+
export class AppComponent extends LitElement {
|
|
33
33
|
/**
|
|
34
34
|
* Required.
|
|
35
35
|
*
|
|
@@ -84,7 +84,7 @@ function GsAppError(error: string) {
|
|
|
84
84
|
|
|
85
85
|
declare global {
|
|
86
86
|
interface HTMLElementTagNameMap {
|
|
87
|
-
'gs-app':
|
|
87
|
+
'gs-app': AppComponent;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
@@ -7,7 +7,7 @@ import { previewHandles } from '../../../.storybook/preview';
|
|
|
7
7
|
import { LAPIS_URL } from '../../constants';
|
|
8
8
|
import { type DateRangeSelectorProps } from '../../preact/dateRangeSelector/date-range-selector';
|
|
9
9
|
import './gs-date-range-selector';
|
|
10
|
-
import '../app';
|
|
10
|
+
import '../gs-app';
|
|
11
11
|
import { toYYYYMMDD } from '../../preact/dateRangeSelector/dateConversion';
|
|
12
12
|
import { dateRangeOptionPresets } from '../../preact/dateRangeSelector/dateRangeOption';
|
|
13
13
|
import { withinShadowRoot } from '../withinShadowRoot.story';
|
|
@@ -5,7 +5,7 @@ import { html } from 'lit';
|
|
|
5
5
|
import { withComponentDocs } from '../../../.storybook/ComponentDocsBlock';
|
|
6
6
|
import { previewHandles } from '../../../.storybook/preview';
|
|
7
7
|
import { AGGREGATED_ENDPOINT, LAPIS_URL } from '../../constants';
|
|
8
|
-
import '../app';
|
|
8
|
+
import '../gs-app';
|
|
9
9
|
import './gs-lineage-filter';
|
|
10
10
|
import aggregatedData from '../../preact/lineageFilter/__mockData__/aggregated.json';
|
|
11
11
|
import { type LineageFilterProps } from '../../preact/lineageFilter/lineage-filter';
|
|
@@ -6,7 +6,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
6
6
|
import { withComponentDocs } from '../../../.storybook/ComponentDocsBlock';
|
|
7
7
|
import { previewHandles } from '../../../.storybook/preview';
|
|
8
8
|
import { AGGREGATED_ENDPOINT, LAPIS_URL } from '../../constants';
|
|
9
|
-
import '../app';
|
|
9
|
+
import '../gs-app';
|
|
10
10
|
import './gs-location-filter';
|
|
11
11
|
import data from '../../preact/locationFilter/__mockData__/aggregated.json';
|
|
12
12
|
import { type LocationFilterProps } from '../../preact/locationFilter/location-filter';
|
|
@@ -219,7 +219,7 @@ export const FiresEvent: StoryObj<LocationFilterProps> = {
|
|
|
219
219
|
|
|
220
220
|
await step('Select Asia', async () => {
|
|
221
221
|
await userEvent.type(inputField(), 'Asia');
|
|
222
|
-
await userEvent.click(canvas.getByRole('option', { name:
|
|
222
|
+
await userEvent.click(canvas.getByRole('option', { name: /^Asia.*Asia$/ }));
|
|
223
223
|
|
|
224
224
|
await waitFor(() => {
|
|
225
225
|
return expect(listenerMock.mock.calls.at(-1)![0].detail).toStrictEqual({
|
|
@@ -5,7 +5,7 @@ import { html } from 'lit';
|
|
|
5
5
|
import { withComponentDocs } from '../../../.storybook/ComponentDocsBlock';
|
|
6
6
|
import { previewHandles } from '../../../.storybook/preview';
|
|
7
7
|
import { LAPIS_URL, REFERENCE_GENOME_ENDPOINT } from '../../constants';
|
|
8
|
-
import '../app';
|
|
8
|
+
import '../gs-app';
|
|
9
9
|
import { type MutationFilterProps } from '../../preact/mutationFilter/mutation-filter';
|
|
10
10
|
import { withinShadowRoot } from '../withinShadowRoot.story';
|
|
11
11
|
import './gs-mutation-filter';
|
|
@@ -158,7 +158,7 @@ export const MultiSegmentedReferenceGenomes: StoryObj<MutationFilterProps> = {
|
|
|
158
158
|
const placeholderText = inputField().getAttribute('placeholder');
|
|
159
159
|
|
|
160
160
|
expect(placeholderText).toEqual(
|
|
161
|
-
'Enter a mutation (e.g. seg1:
|
|
161
|
+
'Enter a mutation (e.g. seg1:23T, ins_seg1:10462:A, gene1:57Q, ins_gene1:31:N)',
|
|
162
162
|
);
|
|
163
163
|
});
|
|
164
164
|
|
|
@@ -5,7 +5,7 @@ import { html } from 'lit';
|
|
|
5
5
|
import { withComponentDocs } from '../../../.storybook/ComponentDocsBlock';
|
|
6
6
|
import { previewHandles } from '../../../.storybook/preview';
|
|
7
7
|
import { AGGREGATED_ENDPOINT, LAPIS_URL } from '../../constants';
|
|
8
|
-
import '../app';
|
|
8
|
+
import '../gs-app';
|
|
9
9
|
import './gs-text-input';
|
|
10
10
|
import data from '../../preact/textInput/__mockData__/aggregated_hosts.json';
|
|
11
11
|
import type { TextInputProps } from '../../preact/textInput/text-input';
|
|
@@ -9,7 +9,7 @@ import aggregatedDataWith2Fields from '../../preact/aggregatedData/__mockData__/
|
|
|
9
9
|
import type { AggregateProps } from '../../preact/aggregatedData/aggregate';
|
|
10
10
|
|
|
11
11
|
import './gs-aggregate';
|
|
12
|
-
import '../app';
|
|
12
|
+
import '../gs-app';
|
|
13
13
|
|
|
14
14
|
const codeExample = `
|
|
15
15
|
<gs-aggregate
|
|
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/web-components';
|
|
|
3
3
|
import { html } from 'lit';
|
|
4
4
|
|
|
5
5
|
import './gs-mutation-comparison';
|
|
6
|
-
import '../app';
|
|
6
|
+
import '../gs-app';
|
|
7
7
|
import { withComponentDocs } from '../../../.storybook/ComponentDocsBlock';
|
|
8
8
|
import { LAPIS_URL, NUCLEOTIDE_MUTATIONS_ENDPOINT } from '../../constants';
|
|
9
9
|
import nucleotideMutationsOtherDataset from '../../preact/mutationComparison/__mockData__/nucleotideMutationsOtherDataset.json';
|
|
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components';
|
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
|
|
4
4
|
import './gs-mutations-over-time';
|
|
5
|
-
import '../app';
|
|
5
|
+
import '../gs-app';
|
|
6
6
|
import { withComponentDocs } from '../../../.storybook/ComponentDocsBlock';
|
|
7
7
|
import { LAPIS_URL } from '../../constants';
|
|
8
8
|
import { type MutationsOverTimeProps } from '../../preact/mutationsOverTime/mutations-over-time';
|
|
@@ -17,7 +17,7 @@ import { type MutationsProps } from '../../preact/mutations/mutations';
|
|
|
17
17
|
import { withinShadowRoot } from '../withinShadowRoot.story';
|
|
18
18
|
|
|
19
19
|
import './gs-mutations';
|
|
20
|
-
import '../app';
|
|
20
|
+
import '../gs-app';
|
|
21
21
|
|
|
22
22
|
const codeExample = String.raw`
|
|
23
23
|
<gs-mutations
|
|
@@ -2,7 +2,7 @@ import { expect, fireEvent, waitFor } from '@storybook/test';
|
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/web-components';
|
|
3
3
|
import { html } from 'lit';
|
|
4
4
|
|
|
5
|
-
import '../app';
|
|
5
|
+
import '../gs-app';
|
|
6
6
|
import './gs-number-sequences-over-time';
|
|
7
7
|
import { withComponentDocs } from '../../../.storybook/ComponentDocsBlock';
|
|
8
8
|
import { AGGREGATED_ENDPOINT, LAPIS_URL } from '../../constants';
|
|
@@ -2,7 +2,7 @@ import { expect, fireEvent, waitFor } from '@storybook/test';
|
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/web-components';
|
|
3
3
|
import { html } from 'lit';
|
|
4
4
|
|
|
5
|
-
import '../app';
|
|
5
|
+
import '../gs-app';
|
|
6
6
|
import './gs-prevalence-over-time';
|
|
7
7
|
import { withComponentDocs } from '../../../.storybook/ComponentDocsBlock';
|
|
8
8
|
import { AGGREGATED_ENDPOINT, LAPIS_URL } from '../../constants';
|
|
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components';
|
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
|
|
4
4
|
import './gs-relative-growth-advantage';
|
|
5
|
-
import '../app';
|
|
5
|
+
import '../gs-app';
|
|
6
6
|
import { withComponentDocs } from '../../../.storybook/ComponentDocsBlock';
|
|
7
7
|
import { AGGREGATED_ENDPOINT, LAPIS_URL } from '../../constants';
|
|
8
8
|
import denominatorFilter from '../../preact/relativeGrowthAdvantage/__mockData__/denominatorFilter.json';
|
|
@@ -13,7 +13,7 @@ import { type SequencesByLocationProps } from '../../preact/map/sequences-by-loc
|
|
|
13
13
|
import { withinShadowRoot } from '../withinShadowRoot.story';
|
|
14
14
|
|
|
15
15
|
import './gs-sequences-by-location';
|
|
16
|
-
import '../app';
|
|
16
|
+
import '../gs-app';
|
|
17
17
|
|
|
18
18
|
const codeExample = `<gs-sequences-by-location
|
|
19
19
|
lapisFilter='{"dateFrom":"2022-01-01","dateTo":"2022-04-01"}'
|
|
@@ -8,7 +8,7 @@ import numeratorData from '../../preact/statistic/__mockData__/numerator.json';
|
|
|
8
8
|
import { type StatisticsProps } from '../../preact/statistic/statistics';
|
|
9
9
|
|
|
10
10
|
import './gs-statistics';
|
|
11
|
-
import '../app';
|
|
11
|
+
import '../gs-app';
|
|
12
12
|
|
|
13
13
|
const codeExample = `
|
|
14
14
|
<gs-statistics
|
package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components';
|
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
|
|
4
4
|
import './gs-wastewater-mutations-over-time';
|
|
5
|
-
import '../app';
|
|
5
|
+
import '../gs-app';
|
|
6
6
|
import { withComponentDocs } from '../../../.storybook/ComponentDocsBlock';
|
|
7
7
|
import { WISE_DETAILS_ENDPOINT, WISE_LAPIS_URL } from '../../constants';
|
|
8
8
|
import details from '../../preact/wastewater/mutationsOverTime/__mockData__/details.json';
|
|
@@ -14,6 +14,7 @@ const codeExample = String.raw`
|
|
|
14
14
|
sequenceType='nucleotide'
|
|
15
15
|
width='100%'
|
|
16
16
|
height='700px'
|
|
17
|
+
maxNumberOfGridRows='100'
|
|
17
18
|
>
|
|
18
19
|
<span slot="infoText">Some info text</span>
|
|
19
20
|
</gs-wastewater-mutations-over-time>`;
|
|
@@ -36,6 +37,7 @@ const meta: Meta<WastewaterMutationsOverTimeProps & { infoText: string }> = {
|
|
|
36
37
|
width: '100%',
|
|
37
38
|
height: '700px',
|
|
38
39
|
infoText: 'Some info text',
|
|
40
|
+
maxNumberOfGridRows: 100,
|
|
39
41
|
},
|
|
40
42
|
parameters: withComponentDocs({
|
|
41
43
|
componentDocs: {
|
|
@@ -58,6 +60,7 @@ export const WastewaterMutationsOverTime: StoryObj<WastewaterMutationsOverTimePr
|
|
|
58
60
|
.sequenceType=${args.sequenceType}
|
|
59
61
|
.width=${args.width}
|
|
60
62
|
.height=${args.height}
|
|
63
|
+
.maxNumberOfGridRows=${args.maxNumberOfGridRows}
|
|
61
64
|
>
|
|
62
65
|
<span slot="infoText">${args.infoText}</span>
|
|
63
66
|
</gs-wastewater-mutations-over-time>
|
|
@@ -67,8 +67,6 @@ export class WastewaterMutationsOverTimeComponent extends PreactLitAdapterWithGr
|
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* The maximum number of grid rows to display.
|
|
70
|
-
*
|
|
71
|
-
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
72
70
|
*/
|
|
73
71
|
@property({ type: Number })
|
|
74
72
|
maxNumberOfGridRows: number = 100;
|
|
@@ -120,4 +118,10 @@ type WidthMatches = Expect<
|
|
|
120
118
|
type HeightMatches = Expect<
|
|
121
119
|
Equals<typeof WastewaterMutationsOverTimeComponent.prototype.height, WastewaterMutationsOverTimeProps['height']>
|
|
122
120
|
>;
|
|
121
|
+
type MaxNumberOfGridRowsMatches = Expect<
|
|
122
|
+
Equals<
|
|
123
|
+
typeof WastewaterMutationsOverTimeComponent.prototype.maxNumberOfGridRows,
|
|
124
|
+
WastewaterMutationsOverTimeProps['maxNumberOfGridRows']
|
|
125
|
+
>
|
|
126
|
+
>;
|
|
123
127
|
/* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
|