@genspectrum/dashboard-components 1.14.2 → 1.15.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 +5 -5
- package/dist/components.d.ts +11 -9
- package/dist/components.js +67 -11
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +28 -13
- package/package.json +1 -1
- package/src/lapisApi/lapisTypes.ts +1 -1
- package/src/preact/queriesOverTime/queries-over-time-row-label-tooltip.stories.tsx +60 -0
- package/src/preact/queriesOverTime/queries-over-time-row-label-tooltip.tsx +34 -0
- package/src/preact/queriesOverTime/queries-over-time.stories.tsx +24 -0
- package/src/preact/queriesOverTime/queries-over-time.tsx +63 -14
- package/src/web-components/visualization/gs-queries-over-time.stories.ts +4 -0
- package/src/web-components/visualization/gs-queries-over-time.tsx +3 -1
- package/standalone-bundle/dashboard-components.js +3575 -3527
- package/standalone-bundle/dashboard-components.js.map +1 -1
package/custom-elements.json
CHANGED
|
@@ -4152,7 +4152,7 @@
|
|
|
4152
4152
|
"type": {
|
|
4153
4153
|
"text": "Meta<Required<QueriesOverTimeProps>>"
|
|
4154
4154
|
},
|
|
4155
|
-
"default": "{ title: 'Visualization/Queries over time', component: 'gs-queries-over-time', argTypes: { lapisFilter: { control: 'object' }, queries: { control: 'object' }, views: { options: ['grid'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, lapisDateField: { control: 'text' }, initialMeanProportionInterval: { control: 'object' }, hideGaps: { control: 'boolean' }, pageSizes: { control: 'object' }, customColumns: { control: 'object' }, }, args: { lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-04-30' }, queries: [ { displayLabel: 'S:F456L (single mutation)', countQuery: 'S:456L', coverageQuery: '!S:456N', }, { displayLabel: 'R346T + F456L (combination)', countQuery: 'S:346T & S:456L', coverageQuery: '!S:346N & !S:456N', }, { displayLabel: 'C22916T or T22917G (nucleotide OR)', countQuery: 'C22916T | T22917G', coverageQuery: '!22916N & !22917N', }, ], views: ['grid'], width: '100%', granularity: 'month', lapisDateField: 'date', initialMeanProportionInterval: { min: 0, max: 1 }, hideGaps: false, pageSizes: [10, 20, 30, 40, 50], }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: { mocks: [ { matcher: { url: `${LAPIS_URL}/component/queriesOverTime`, body: { filters: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-04-30', }, queries: [ { displayLabel: 'S:F456L (single mutation)', countQuery: 'S:456L', coverageQuery: '!S:456N', }, { displayLabel: 'R346T + F456L (combination)', countQuery: 'S:346T & S:456L', coverageQuery: '!S:346N & !S:456N', }, { displayLabel: 'C22916T or T22917G (nucleotide OR)', countQuery: 'C22916T | T22917G', coverageQuery: '!22916N & !22917N', }, ], dateRanges: [ { dateFrom: '2024-01-01', dateTo: '2024-01-31' }, { dateFrom: '2024-02-01', dateTo: '2024-02-29' }, { dateFrom: '2024-03-01', dateTo: '2024-03-31' }, { dateFrom: '2024-04-01', dateTo: '2024-04-30' }, ], dateField: 'date', }, matchPartialBody: true, response: { status: 200, body: mockDefaultQueriesOverTime, }, }, }, ], }, }), tags: ['autodocs'], }"
|
|
4155
|
+
"default": "{ title: 'Visualization/Queries over time', component: 'gs-queries-over-time', argTypes: { lapisFilter: { control: 'object' }, queries: { control: 'object' }, views: { options: ['grid'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, lapisDateField: { control: 'text' }, initialMeanProportionInterval: { control: 'object' }, hideGaps: { control: 'boolean' }, pageSizes: { control: 'object' }, customColumns: { control: 'object' }, }, args: { lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-04-30' }, queries: [ { displayLabel: 'S:F456L (single mutation)', description: 'This mutation is associated with increased transmissibility.', countQuery: 'S:456L', coverageQuery: '!S:456N', }, { displayLabel: 'R346T + F456L (combination)', description: 'Common mutation combination found in the JN.1 lineage.', countQuery: 'S:346T & S:456L', coverageQuery: '!S:346N & !S:456N', }, { displayLabel: 'C22916T or T22917G (nucleotide OR)', countQuery: 'C22916T | T22917G', coverageQuery: '!22916N & !22917N', }, ], views: ['grid'], width: '100%', granularity: 'month', lapisDateField: 'date', initialMeanProportionInterval: { min: 0, max: 1 }, hideGaps: false, pageSizes: [10, 20, 30, 40, 50], }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: { mocks: [ { matcher: { url: `${LAPIS_URL}/component/queriesOverTime`, body: { filters: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-04-30', }, queries: [ { displayLabel: 'S:F456L (single mutation)', countQuery: 'S:456L', coverageQuery: '!S:456N', }, { displayLabel: 'R346T + F456L (combination)', countQuery: 'S:346T & S:456L', coverageQuery: '!S:346N & !S:456N', }, { displayLabel: 'C22916T or T22917G (nucleotide OR)', countQuery: 'C22916T | T22917G', coverageQuery: '!22916N & !22917N', }, ], dateRanges: [ { dateFrom: '2024-01-01', dateTo: '2024-01-31' }, { dateFrom: '2024-02-01', dateTo: '2024-02-29' }, { dateFrom: '2024-03-01', dateTo: '2024-03-31' }, { dateFrom: '2024-04-01', dateTo: '2024-04-30' }, ], dateField: 'date', }, matchPartialBody: true, response: { status: 200, body: mockDefaultQueriesOverTime, }, }, }, ], }, }), tags: ['autodocs'], }"
|
|
4156
4156
|
},
|
|
4157
4157
|
{
|
|
4158
4158
|
"kind": "variable",
|
|
@@ -4285,10 +4285,10 @@
|
|
|
4285
4285
|
"kind": "field",
|
|
4286
4286
|
"name": "queries",
|
|
4287
4287
|
"type": {
|
|
4288
|
-
"text": "{\n displayLabel: string;\n countQuery: string;\n coverageQuery: string;\n }[]"
|
|
4288
|
+
"text": "{\n displayLabel: string;\n description?: string;\n countQuery: string;\n coverageQuery: string;\n }[]"
|
|
4289
4289
|
},
|
|
4290
4290
|
"default": "[]",
|
|
4291
|
-
"description": "Required.\n\nArray of queries to display. Each query has:\n- displayLabel: string - The name to show in the grid row label\n- countQuery: string - Query string to count matches\n- coverageQuery: string - Query string to determine coverage/denominator\n\nBoth queries (count and coverage) are 'advanced queries' as they are defined in LAPIS.",
|
|
4291
|
+
"description": "Required.\n\nArray of queries to display. Each query has:\n- displayLabel: string - The name to show in the grid row label. Must be unique.\n- description: string (optional) - Optional description shown in tooltip\n- countQuery: string - Query string to count matches\n- coverageQuery: string - Query string to determine coverage/denominator\n\nBoth queries (count and coverage) are 'advanced queries' as they are defined in LAPIS.",
|
|
4292
4292
|
"attribute": "queries"
|
|
4293
4293
|
},
|
|
4294
4294
|
{
|
|
@@ -4404,10 +4404,10 @@
|
|
|
4404
4404
|
{
|
|
4405
4405
|
"name": "queries",
|
|
4406
4406
|
"type": {
|
|
4407
|
-
"text": "{\n displayLabel: string;\n countQuery: string;\n coverageQuery: string;\n }[]"
|
|
4407
|
+
"text": "{\n displayLabel: string;\n description?: string;\n countQuery: string;\n coverageQuery: string;\n }[]"
|
|
4408
4408
|
},
|
|
4409
4409
|
"default": "[]",
|
|
4410
|
-
"description": "Required.\n\nArray of queries to display. Each query has:\n- displayLabel: string - The name to show in the grid row label\n- countQuery: string - Query string to count matches\n- coverageQuery: string - Query string to determine coverage/denominator\n\nBoth queries (count and coverage) are 'advanced queries' as they are defined in LAPIS.",
|
|
4410
|
+
"description": "Required.\n\nArray of queries to display. Each query has:\n- displayLabel: string - The name to show in the grid row label. Must be unique.\n- description: string (optional) - Optional description shown in tooltip\n- countQuery: string - Query string to count matches\n- coverageQuery: string - Query string to determine coverage/denominator\n\nBoth queries (count and coverage) are 'advanced queries' as they are defined in LAPIS.",
|
|
4411
4411
|
"fieldName": "queries"
|
|
4412
4412
|
},
|
|
4413
4413
|
{
|
package/dist/components.d.ts
CHANGED
|
@@ -1212,7 +1212,8 @@ export declare class QueriesOverTimeComponent extends PreactLitAdapterWithGridJs
|
|
|
1212
1212
|
* Required.
|
|
1213
1213
|
*
|
|
1214
1214
|
* Array of queries to display. Each query has:
|
|
1215
|
-
* - displayLabel: string - The name to show in the grid row label
|
|
1215
|
+
* - displayLabel: string - The name to show in the grid row label. Must be unique.
|
|
1216
|
+
* - description: string (optional) - Optional description shown in tooltip
|
|
1216
1217
|
* - countQuery: string - Query string to count matches
|
|
1217
1218
|
* - coverageQuery: string - Query string to determine coverage/denominator
|
|
1218
1219
|
*
|
|
@@ -1220,6 +1221,7 @@ export declare class QueriesOverTimeComponent extends PreactLitAdapterWithGridJs
|
|
|
1220
1221
|
*/
|
|
1221
1222
|
queries: {
|
|
1222
1223
|
displayLabel: string;
|
|
1224
|
+
description?: string;
|
|
1223
1225
|
countQuery: string;
|
|
1224
1226
|
coverageQuery: string;
|
|
1225
1227
|
}[];
|
|
@@ -1839,7 +1841,7 @@ declare global {
|
|
|
1839
1841
|
|
|
1840
1842
|
declare global {
|
|
1841
1843
|
interface HTMLElementTagNameMap {
|
|
1842
|
-
'gs-
|
|
1844
|
+
'gs-prevalence-over-time': PrevalenceOverTimeComponent;
|
|
1843
1845
|
}
|
|
1844
1846
|
}
|
|
1845
1847
|
|
|
@@ -1847,7 +1849,7 @@ declare global {
|
|
|
1847
1849
|
declare global {
|
|
1848
1850
|
namespace JSX {
|
|
1849
1851
|
interface IntrinsicElements {
|
|
1850
|
-
'gs-
|
|
1852
|
+
'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1851
1853
|
}
|
|
1852
1854
|
}
|
|
1853
1855
|
}
|
|
@@ -1855,7 +1857,7 @@ declare global {
|
|
|
1855
1857
|
|
|
1856
1858
|
declare global {
|
|
1857
1859
|
interface HTMLElementTagNameMap {
|
|
1858
|
-
'gs-
|
|
1860
|
+
'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
|
|
1859
1861
|
}
|
|
1860
1862
|
}
|
|
1861
1863
|
|
|
@@ -1863,7 +1865,7 @@ declare global {
|
|
|
1863
1865
|
declare global {
|
|
1864
1866
|
namespace JSX {
|
|
1865
1867
|
interface IntrinsicElements {
|
|
1866
|
-
'gs-
|
|
1868
|
+
'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1867
1869
|
}
|
|
1868
1870
|
}
|
|
1869
1871
|
}
|
|
@@ -1903,7 +1905,7 @@ declare global {
|
|
|
1903
1905
|
|
|
1904
1906
|
declare global {
|
|
1905
1907
|
interface HTMLElementTagNameMap {
|
|
1906
|
-
'gs-
|
|
1908
|
+
'gs-queries-over-time': QueriesOverTimeComponent;
|
|
1907
1909
|
}
|
|
1908
1910
|
}
|
|
1909
1911
|
|
|
@@ -1911,7 +1913,7 @@ declare global {
|
|
|
1911
1913
|
declare global {
|
|
1912
1914
|
namespace JSX {
|
|
1913
1915
|
interface IntrinsicElements {
|
|
1914
|
-
'gs-
|
|
1916
|
+
'gs-queries-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1915
1917
|
}
|
|
1916
1918
|
}
|
|
1917
1919
|
}
|
|
@@ -1919,7 +1921,7 @@ declare global {
|
|
|
1919
1921
|
|
|
1920
1922
|
declare global {
|
|
1921
1923
|
interface HTMLElementTagNameMap {
|
|
1922
|
-
'gs-
|
|
1924
|
+
'gs-mutations-over-time': MutationsOverTimeComponent;
|
|
1923
1925
|
}
|
|
1924
1926
|
}
|
|
1925
1927
|
|
|
@@ -1927,7 +1929,7 @@ declare global {
|
|
|
1927
1929
|
declare global {
|
|
1928
1930
|
namespace JSX {
|
|
1929
1931
|
interface IntrinsicElements {
|
|
1930
|
-
'gs-
|
|
1932
|
+
'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1931
1933
|
}
|
|
1932
1934
|
}
|
|
1933
1935
|
}
|