@genspectrum/dashboard-components 0.13.6 → 0.14.1
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 +41 -79
- package/dist/{LineageFilterChangedEvent-GedKNGFI.js → LineageFilterChangedEvent-C9dXOxt6.js} +11 -3
- package/dist/LineageFilterChangedEvent-C9dXOxt6.js.map +1 -0
- package/dist/components.d.ts +63 -71
- package/dist/components.js +440 -312
- package/dist/components.js.map +1 -1
- package/dist/style.css +20 -5
- package/dist/util.d.ts +61 -51
- package/dist/util.js +1 -1
- package/package.json +1 -1
- package/src/preact/LapisUrlContext.ts +14 -1
- package/src/preact/aggregatedData/aggregate.stories.tsx +3 -3
- package/src/preact/aggregatedData/aggregate.tsx +3 -4
- package/src/preact/components/tabs.tsx +3 -5
- package/src/preact/dateRangeSelector/computeInitialValues.spec.ts +34 -20
- package/src/preact/dateRangeSelector/computeInitialValues.ts +25 -21
- package/src/preact/dateRangeSelector/date-range-selector.stories.tsx +104 -40
- package/src/preact/dateRangeSelector/date-range-selector.tsx +29 -20
- package/src/preact/dateRangeSelector/dateRangeOption.ts +11 -1
- package/src/preact/lineageFilter/lineage-filter.stories.tsx +3 -3
- package/src/preact/lineageFilter/lineage-filter.tsx +3 -4
- package/src/preact/locationFilter/location-filter.stories.tsx +3 -3
- package/src/preact/locationFilter/location-filter.tsx +4 -4
- package/src/preact/map/sequences-by-location.stories.tsx +3 -3
- package/src/preact/map/sequences-by-location.tsx +3 -4
- package/src/preact/mutationComparison/mutation-comparison.stories.tsx +3 -3
- package/src/preact/mutationComparison/mutation-comparison.tsx +4 -4
- package/src/preact/mutationFilter/ExampleMutation.tsx +68 -0
- package/src/preact/mutationFilter/mutation-filter-info.tsx +179 -112
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +5 -5
- package/src/preact/mutationFilter/mutation-filter.tsx +10 -5
- package/src/preact/mutations/mutations.stories.tsx +3 -3
- package/src/preact/mutations/mutations.tsx +4 -4
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +26 -4
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +3 -3
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +4 -4
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +3 -3
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +4 -4
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +3 -3
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +4 -4
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +3 -3
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +4 -4
- package/src/preact/statistic/statistics.stories.tsx +3 -3
- package/src/preact/statistic/statistics.tsx +2 -3
- package/src/preact/textInput/text-input.stories.tsx +3 -3
- package/src/preact/textInput/text-input.tsx +3 -4
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +5 -9
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +5 -5
- package/src/web-components/PreactLitAdapter.tsx +3 -3
- package/src/web-components/{app.stories.ts → gs-app.stories.ts} +1 -1
- package/src/web-components/{app.ts → gs-app.ts} +5 -3
- package/src/web-components/index.ts +1 -1
- package/src/web-components/input/gs-date-range-selector.stories.ts +6 -13
- package/src/web-components/input/gs-date-range-selector.tsx +15 -38
- package/src/web-components/input/gs-lineage-filter.stories.ts +1 -1
- package/src/web-components/input/gs-location-filter.stories.ts +1 -1
- 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 +7016 -6951
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/dist/LineageFilterChangedEvent-GedKNGFI.js.map +0 -1
|
@@ -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 */
|