@genspectrum/dashboard-components 0.16.4 → 0.17.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 +130 -74
- package/dist/{LineageFilterChangedEvent-COWV-Y0k.js → LineageFilterChangedEvent-DkvWdq_G.js} +2 -2
- package/dist/LineageFilterChangedEvent-DkvWdq_G.js.map +1 -0
- package/dist/components.d.ts +64 -48
- package/dist/components.js +858 -242
- package/dist/components.js.map +1 -1
- package/dist/style.css +391 -12
- package/dist/util.d.ts +23 -25
- package/dist/util.js +1 -1
- package/package.json +2 -1
- package/src/preact/components/clearable-select.stories.tsx +75 -0
- package/src/preact/components/clearable-select.tsx +76 -0
- package/src/preact/components/downshift-combobox.tsx +9 -7
- package/src/preact/dateRangeFilter/computeInitialValues.spec.ts +31 -33
- package/src/preact/dateRangeFilter/computeInitialValues.ts +2 -15
- package/src/preact/dateRangeFilter/date-picker.tsx +66 -0
- package/src/preact/dateRangeFilter/date-range-filter.stories.tsx +69 -31
- package/src/preact/dateRangeFilter/date-range-filter.tsx +136 -139
- package/src/preact/dateRangeFilter/dateRangeOption.ts +11 -11
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +133 -84
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +46 -16
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +3 -0
- package/src/preact/shared/WithClassName/WithClassName.ts +1 -0
- package/src/preact/shared/icons/DeleteIcon.tsx +3 -0
- package/src/preact/shared/stories/expectOptionSelected.tsx +7 -0
- package/src/preact/shared/tanstackTable/pagination.tsx +132 -0
- package/src/preact/shared/tanstackTable/tanstackTable.tsx +43 -0
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +2 -1
- package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +3 -5
- package/src/utilEntrypoint.ts +1 -1
- package/src/web-components/MutationAnnotations.mdx +33 -0
- package/src/web-components/ResizeContainer.mdx +1 -1
- package/src/web-components/errorHandling.mdx +1 -1
- package/src/web-components/gs-app.ts +2 -2
- package/src/web-components/input/gs-date-range-filter.stories.ts +38 -32
- package/src/web-components/input/gs-date-range-filter.tsx +8 -2
- 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 +1 -1
- package/src/web-components/input/gs-text-filter.tsx +1 -1
- package/src/web-components/visualization/gs-aggregate.tsx +2 -2
- package/src/web-components/visualization/gs-mutation-comparison.tsx +5 -2
- package/src/web-components/visualization/gs-mutations-over-time.spec-d.ts +39 -0
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +4 -0
- package/src/web-components/visualization/gs-mutations-over-time.tsx +13 -33
- package/src/web-components/visualization/gs-mutations.tsx +5 -2
- package/src/web-components/visualization/gs-number-sequences-over-time.tsx +2 -2
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +2 -2
- package/src/web-components/visualization/gs-relative-growth-advantage.tsx +2 -2
- package/src/web-components/visualization/gs-sequences-by-location.tsx +2 -2
- package/src/web-components/visualization/gs-statistics.tsx +2 -2
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.spec-d.ts +24 -0
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +3 -3
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +7 -38
- package/standalone-bundle/dashboard-components.js +18384 -16486
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/dist/LineageFilterChangedEvent-COWV-Y0k.js.map +0 -1
package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts
CHANGED
|
@@ -14,7 +14,7 @@ const codeExample = String.raw`
|
|
|
14
14
|
sequenceType='nucleotide'
|
|
15
15
|
width='100%'
|
|
16
16
|
height='700px'
|
|
17
|
-
|
|
17
|
+
pageSizes='[5,10]'
|
|
18
18
|
>
|
|
19
19
|
<span slot="infoText">Some info text</span>
|
|
20
20
|
</gs-wastewater-mutations-over-time>`;
|
|
@@ -37,7 +37,7 @@ const meta: Meta<WastewaterMutationsOverTimeProps & { infoText: string }> = {
|
|
|
37
37
|
width: '100%',
|
|
38
38
|
height: undefined,
|
|
39
39
|
infoText: 'Some info text',
|
|
40
|
-
|
|
40
|
+
pageSizes: [10, 20, 30, 40, 50],
|
|
41
41
|
},
|
|
42
42
|
parameters: withComponentDocs({
|
|
43
43
|
componentDocs: {
|
|
@@ -70,7 +70,7 @@ export const WastewaterMutationsOverTime: StoryObj<WastewaterMutationsOverTimePr
|
|
|
70
70
|
.sequenceType=${args.sequenceType}
|
|
71
71
|
.width=${args.width}
|
|
72
72
|
.height=${args.height}
|
|
73
|
-
.
|
|
73
|
+
.pageSizes=${args.pageSizes}
|
|
74
74
|
>
|
|
75
75
|
<span slot="infoText">${args.infoText}</span>
|
|
76
76
|
</gs-wastewater-mutations-over-time>
|
|
@@ -3,11 +3,7 @@ import { customElement, property } from 'lit/decorators.js';
|
|
|
3
3
|
import { type DetailedHTMLProps, type HTMLAttributes } from 'react';
|
|
4
4
|
|
|
5
5
|
import { MutationAnnotationsContextProvider } from '../../preact/MutationAnnotationsContext';
|
|
6
|
-
import {
|
|
7
|
-
WastewaterMutationsOverTime,
|
|
8
|
-
type WastewaterMutationsOverTimeProps,
|
|
9
|
-
} from '../../preact/wastewater/mutationsOverTime/wastewater-mutations-over-time';
|
|
10
|
-
import { type Equals, type Expect } from '../../utils/typeAssertions';
|
|
6
|
+
import { WastewaterMutationsOverTime } from '../../preact/wastewater/mutationsOverTime/wastewater-mutations-over-time';
|
|
11
7
|
import { PreactLitAdapterWithGridJsStyles } from '../PreactLitAdapterWithGridJsStyles';
|
|
12
8
|
import { type MutationAnnotations, mutationAnnotationsContext } from '../mutation-annotations-context';
|
|
13
9
|
|
|
@@ -55,7 +51,7 @@ export class WastewaterMutationsOverTimeComponent extends PreactLitAdapterWithGr
|
|
|
55
51
|
/**
|
|
56
52
|
* The width of the component.
|
|
57
53
|
*
|
|
58
|
-
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/
|
|
54
|
+
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.
|
|
59
55
|
*/
|
|
60
56
|
@property({ type: String })
|
|
61
57
|
width: string = '100%';
|
|
@@ -63,16 +59,16 @@ export class WastewaterMutationsOverTimeComponent extends PreactLitAdapterWithGr
|
|
|
63
59
|
/**
|
|
64
60
|
* The height of the component.
|
|
65
61
|
*
|
|
66
|
-
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/
|
|
62
|
+
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.
|
|
67
63
|
*/
|
|
68
64
|
@property({ type: String })
|
|
69
65
|
height: string | undefined = undefined;
|
|
70
66
|
|
|
71
67
|
/**
|
|
72
|
-
* The
|
|
68
|
+
* The number of rows per page, which can be selected by the user.
|
|
73
69
|
*/
|
|
74
|
-
@property({ type:
|
|
75
|
-
|
|
70
|
+
@property({ type: Array })
|
|
71
|
+
pageSizes: number[] | number = [10, 20, 30, 40, 50];
|
|
76
72
|
|
|
77
73
|
/**
|
|
78
74
|
* @internal
|
|
@@ -88,7 +84,7 @@ export class WastewaterMutationsOverTimeComponent extends PreactLitAdapterWithGr
|
|
|
88
84
|
sequenceType={this.sequenceType}
|
|
89
85
|
width={this.width}
|
|
90
86
|
height={this.height}
|
|
91
|
-
|
|
87
|
+
pageSizes={this.pageSizes}
|
|
92
88
|
/>
|
|
93
89
|
</MutationAnnotationsContextProvider>
|
|
94
90
|
);
|
|
@@ -109,30 +105,3 @@ declare global {
|
|
|
109
105
|
}
|
|
110
106
|
}
|
|
111
107
|
}
|
|
112
|
-
|
|
113
|
-
/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
|
|
114
|
-
type LapisFilterMatches = Expect<
|
|
115
|
-
Equals<
|
|
116
|
-
typeof WastewaterMutationsOverTimeComponent.prototype.lapisFilter,
|
|
117
|
-
WastewaterMutationsOverTimeProps['lapisFilter']
|
|
118
|
-
>
|
|
119
|
-
>;
|
|
120
|
-
type SequenceTypeMatches = Expect<
|
|
121
|
-
Equals<
|
|
122
|
-
typeof WastewaterMutationsOverTimeComponent.prototype.sequenceType,
|
|
123
|
-
WastewaterMutationsOverTimeProps['sequenceType']
|
|
124
|
-
>
|
|
125
|
-
>;
|
|
126
|
-
type WidthMatches = Expect<
|
|
127
|
-
Equals<typeof WastewaterMutationsOverTimeComponent.prototype.width, WastewaterMutationsOverTimeProps['width']>
|
|
128
|
-
>;
|
|
129
|
-
type HeightMatches = Expect<
|
|
130
|
-
Equals<typeof WastewaterMutationsOverTimeComponent.prototype.height, WastewaterMutationsOverTimeProps['height']>
|
|
131
|
-
>;
|
|
132
|
-
type MaxNumberOfGridRowsMatches = Expect<
|
|
133
|
-
Equals<
|
|
134
|
-
typeof WastewaterMutationsOverTimeComponent.prototype.maxNumberOfGridRows,
|
|
135
|
-
WastewaterMutationsOverTimeProps['maxNumberOfGridRows']
|
|
136
|
-
>
|
|
137
|
-
>;
|
|
138
|
-
/* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
|