@genspectrum/dashboard-components 0.4.4 → 0.4.5
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 +107 -12
- package/dist/dashboard-components.js +186 -145
- package/dist/dashboard-components.js.map +1 -1
- package/dist/genspectrum-components.d.ts +24 -0
- package/package.json +1 -1
- package/src/preact/aggregatedData/aggregate-table.tsx +3 -2
- package/src/preact/aggregatedData/aggregate.stories.tsx +2 -0
- package/src/preact/aggregatedData/aggregate.tsx +8 -3
- package/src/preact/components/table.stories.tsx +51 -1
- package/src/preact/components/table.tsx +4 -3
- package/src/preact/locationFilter/location-filter.stories.tsx +12 -1
- package/src/preact/locationFilter/location-filter.tsx +10 -3
- package/src/preact/mutationComparison/mutation-comparison-table.tsx +7 -2
- package/src/preact/mutationComparison/mutation-comparison.stories.tsx +3 -0
- package/src/preact/mutationComparison/mutation-comparison.tsx +25 -3
- package/src/preact/mutations/mutations-grid.tsx +8 -2
- package/src/preact/mutations/mutations-insertions-table.tsx +3 -2
- package/src/preact/mutations/mutations-table.tsx +3 -2
- package/src/preact/mutations/mutations.stories.tsx +3 -0
- package/src/preact/mutations/mutations.tsx +16 -6
- package/src/preact/prevalenceOverTime/prevalence-over-time-table.tsx +3 -2
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +4 -0
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +8 -1
- package/src/web-components/input/gs-location-filter.stories.ts +11 -0
- package/src/web-components/input/gs-location-filter.tsx +14 -1
- package/src/web-components/visualization/gs-aggregate.stories.ts +4 -0
- package/src/web-components/visualization/gs-aggregate.tsx +8 -0
- package/src/web-components/visualization/gs-mutation-comparison.stories.ts +4 -0
- package/src/web-components/visualization/gs-mutation-comparison.tsx +8 -0
- package/src/web-components/visualization/gs-mutations.stories.ts +4 -0
- package/src/web-components/visualization/gs-mutations.tsx +8 -0
- package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +5 -0
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +12 -4
package/custom-elements.json
CHANGED
|
@@ -489,7 +489,7 @@
|
|
|
489
489
|
"type": {
|
|
490
490
|
"text": "Meta"
|
|
491
491
|
},
|
|
492
|
-
"default": "{ title: 'Input/Location filter', component: 'gs-location-filter', parameters: withComponentDocs({ actions: { handles: ['gs-location-changed'], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { fields: { control: { type: 'object', }, }, initialValue: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, }, decorators: [withActions], tags: ['autodocs'], }"
|
|
492
|
+
"default": "{ title: 'Input/Location filter', component: 'gs-location-filter', parameters: withComponentDocs({ actions: { handles: ['gs-location-changed'], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { fields: { control: { type: 'object', }, }, initialValue: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, placeholderText: { control: { type: 'text', }, }, }, decorators: [withActions], tags: ['autodocs'], }"
|
|
493
493
|
},
|
|
494
494
|
{
|
|
495
495
|
"kind": "variable",
|
|
@@ -497,7 +497,7 @@
|
|
|
497
497
|
"type": {
|
|
498
498
|
"text": "StoryObj<LocationFilterProps>"
|
|
499
499
|
},
|
|
500
|
-
"default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher: aggregatedEndpointMatcher, response: { status: 200, body: data, }, }, ], }, }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-location-filter'); await waitFor(() => { return expect(canvas.getByRole('combobox')).toBeEnabled(); }); }, }"
|
|
500
|
+
"default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher: aggregatedEndpointMatcher, response: { status: 200, body: data, }, }, ], }, }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-location-filter'); await waitFor(() => { return expect(canvas.getByRole('combobox')).toBeEnabled(); }); await waitFor(() => { return expect(canvas.getByPlaceholderText('Enter a location')).toBeInTheDocument(); }); }, }"
|
|
501
501
|
},
|
|
502
502
|
{
|
|
503
503
|
"kind": "variable",
|
|
@@ -605,6 +605,16 @@
|
|
|
605
605
|
"default": "'100%'",
|
|
606
606
|
"description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
|
|
607
607
|
"attribute": "width"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"kind": "field",
|
|
611
|
+
"name": "placeholderText",
|
|
612
|
+
"type": {
|
|
613
|
+
"text": "string"
|
|
614
|
+
},
|
|
615
|
+
"default": "''",
|
|
616
|
+
"description": "The placeholder text to display in the input field, if it is empty.",
|
|
617
|
+
"attribute": "placeholderText"
|
|
608
618
|
}
|
|
609
619
|
],
|
|
610
620
|
"events": [
|
|
@@ -643,6 +653,15 @@
|
|
|
643
653
|
"default": "'100%'",
|
|
644
654
|
"description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.",
|
|
645
655
|
"fieldName": "width"
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"name": "placeholderText",
|
|
659
|
+
"type": {
|
|
660
|
+
"text": "string"
|
|
661
|
+
},
|
|
662
|
+
"default": "''",
|
|
663
|
+
"description": "The placeholder text to display in the input field, if it is empty.",
|
|
664
|
+
"fieldName": "placeholderText"
|
|
646
665
|
}
|
|
647
666
|
],
|
|
648
667
|
"superclass": {
|
|
@@ -1124,7 +1143,7 @@
|
|
|
1124
1143
|
"type": {
|
|
1125
1144
|
"text": "Meta<Required<AggregateProps>>"
|
|
1126
1145
|
},
|
|
1127
|
-
"default": "{ title: 'Visualization/Aggregate', component: 'gs-aggregate', argTypes: { fields: [{ control: 'object' }], views: { options: ['table'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, initialSortField: { control: 'text' }, initialSortDirection: { options: ['ascending', 'descending'], control: { type: 'radio' }, }, }, parameters: withComponentDocs({ fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'host'], country: 'USA', }, }, response: { status: 200, body: aggregatedData, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1146
|
+
"default": "{ title: 'Visualization/Aggregate', component: 'gs-aggregate', argTypes: { fields: [{ control: 'object' }], views: { options: ['table'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, initialSortField: { control: 'text' }, initialSortDirection: { options: ['ascending', 'descending'], control: { type: 'radio' }, }, }, parameters: withComponentDocs({ fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'host'], country: 'USA', }, }, response: { status: 200, body: aggregatedData, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1128
1147
|
},
|
|
1129
1148
|
{
|
|
1130
1149
|
"kind": "variable",
|
|
@@ -1132,7 +1151,7 @@
|
|
|
1132
1151
|
"type": {
|
|
1133
1152
|
"text": "StoryObj<Required<AggregateProps>>"
|
|
1134
1153
|
},
|
|
1135
|
-
"default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-aggregate .fields=${args.fields} .filter=${args.filter} .views=${args.views} .width=${args.width} .height=${args.height} .headline=${args.headline} .initialSortField=${args.initialSortField} .initialSortDirection=${args.initialSortDirection} ></gs-aggregate> </gs-app> `, args: { fields: ['division', 'host'], views: ['table'], filter: { country: 'USA', }, width: '100%', height: '700px', headline: 'Aggregate', initialSortField: 'count', initialSortDirection: 'descending', }, }"
|
|
1154
|
+
"default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-aggregate .fields=${args.fields} .filter=${args.filter} .views=${args.views} .width=${args.width} .height=${args.height} .headline=${args.headline} .initialSortField=${args.initialSortField} .initialSortDirection=${args.initialSortDirection} .pageSize=${args.pageSize} ></gs-aggregate> </gs-app> `, args: { fields: ['division', 'host'], views: ['table'], filter: { country: 'USA', }, width: '100%', height: '700px', headline: 'Aggregate', initialSortField: 'count', initialSortDirection: 'descending', pageSize: 10, }, }"
|
|
1136
1155
|
}
|
|
1137
1156
|
],
|
|
1138
1157
|
"exports": [
|
|
@@ -1242,6 +1261,16 @@
|
|
|
1242
1261
|
"default": "'descending'",
|
|
1243
1262
|
"description": "The initial sort direction of the table.",
|
|
1244
1263
|
"attribute": "initialSortDirection"
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
"kind": "field",
|
|
1267
|
+
"name": "pageSize",
|
|
1268
|
+
"type": {
|
|
1269
|
+
"text": "boolean | number"
|
|
1270
|
+
},
|
|
1271
|
+
"default": "false",
|
|
1272
|
+
"description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
|
|
1273
|
+
"attribute": "pageSize"
|
|
1245
1274
|
}
|
|
1246
1275
|
],
|
|
1247
1276
|
"attributes": [
|
|
@@ -1316,6 +1345,15 @@
|
|
|
1316
1345
|
"default": "'descending'",
|
|
1317
1346
|
"description": "The initial sort direction of the table.",
|
|
1318
1347
|
"fieldName": "initialSortDirection"
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1350
|
+
"name": "pageSize",
|
|
1351
|
+
"type": {
|
|
1352
|
+
"text": "boolean | number"
|
|
1353
|
+
},
|
|
1354
|
+
"default": "false",
|
|
1355
|
+
"description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
|
|
1356
|
+
"fieldName": "pageSize"
|
|
1319
1357
|
}
|
|
1320
1358
|
],
|
|
1321
1359
|
"superclass": {
|
|
@@ -1355,7 +1393,7 @@
|
|
|
1355
1393
|
"type": {
|
|
1356
1394
|
"text": "Meta<Required<MutationComparisonProps>>"
|
|
1357
1395
|
},
|
|
1358
|
-
"default": "{ title: 'Visualization/Mutation comparison', component: 'gs-mutation-comparison', argTypes: { variants: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'venn'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1396
|
+
"default": "{ title: 'Visualization/Mutation comparison', component: 'gs-mutation-comparison', argTypes: { variants: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'venn'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1359
1397
|
},
|
|
1360
1398
|
{
|
|
1361
1399
|
"kind": "variable",
|
|
@@ -1363,7 +1401,7 @@
|
|
|
1363
1401
|
"type": {
|
|
1364
1402
|
"text": "StoryObj<Required<MutationComparisonProps>>"
|
|
1365
1403
|
},
|
|
1366
|
-
"default": "{ ...Template, args: { variants: [ { displayName: 'Some variant', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo }, }, { displayName: 'Other variant', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, }, }, ], sequenceType: 'nucleotide', views: ['table', 'venn'], width: '100%', height: '700px', headline: 'Mutation comparison', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'nucleotideMutationsSomeVariant', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsSomeVariant, }, }, { matcher: { name: 'nucleotideMutationsOtherVariant', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsOtherVariant, }, }, ], }, }, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-comparison'); await step('Min and max proportions should be 50% and 100%', async () => { const minInput = () => canvas.getAllByLabelText('%')[0]; const maxInput = () => canvas.getAllByLabelText('%')[1]; await waitFor(() => expect(minInput()).toHaveValue(50)); await waitFor(() => expect(maxInput()).toHaveValue(100)); }); }, }"
|
|
1404
|
+
"default": "{ ...Template, args: { variants: [ { displayName: 'Some variant', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo }, }, { displayName: 'Other variant', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, }, }, ], sequenceType: 'nucleotide', views: ['table', 'venn'], width: '100%', height: '700px', headline: 'Mutation comparison', pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'nucleotideMutationsSomeVariant', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsSomeVariant, }, }, { matcher: { name: 'nucleotideMutationsOtherVariant', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsOtherVariant, }, }, ], }, }, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-comparison'); await step('Min and max proportions should be 50% and 100%', async () => { const minInput = () => canvas.getAllByLabelText('%')[0]; const maxInput = () => canvas.getAllByLabelText('%')[1]; await waitFor(() => expect(minInput()).toHaveValue(50)); await waitFor(() => expect(maxInput()).toHaveValue(100)); }); }, }"
|
|
1367
1405
|
},
|
|
1368
1406
|
{
|
|
1369
1407
|
"kind": "variable",
|
|
@@ -1469,6 +1507,16 @@
|
|
|
1469
1507
|
"default": "'Mutation comparison'",
|
|
1470
1508
|
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1471
1509
|
"attribute": "headline"
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
"kind": "field",
|
|
1513
|
+
"name": "pageSize",
|
|
1514
|
+
"type": {
|
|
1515
|
+
"text": "boolean | number"
|
|
1516
|
+
},
|
|
1517
|
+
"default": "false",
|
|
1518
|
+
"description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
|
|
1519
|
+
"attribute": "pageSize"
|
|
1472
1520
|
}
|
|
1473
1521
|
],
|
|
1474
1522
|
"attributes": [
|
|
@@ -1525,6 +1573,15 @@
|
|
|
1525
1573
|
"default": "'Mutation comparison'",
|
|
1526
1574
|
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1527
1575
|
"fieldName": "headline"
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
"name": "pageSize",
|
|
1579
|
+
"type": {
|
|
1580
|
+
"text": "boolean | number"
|
|
1581
|
+
},
|
|
1582
|
+
"default": "false",
|
|
1583
|
+
"description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
|
|
1584
|
+
"fieldName": "pageSize"
|
|
1528
1585
|
}
|
|
1529
1586
|
],
|
|
1530
1587
|
"superclass": {
|
|
@@ -1564,7 +1621,7 @@
|
|
|
1564
1621
|
"type": {
|
|
1565
1622
|
"text": "Meta<Required<MutationsProps>>"
|
|
1566
1623
|
},
|
|
1567
|
-
"default": "{ title: 'Visualization/Mutations', component: 'gs-mutations', argTypes: { variant: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'grid', 'insertions'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, }, args: { variant: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo: '2022-01-01' }, sequenceType: 'nucleotide', views: ['grid', 'table', 'insertions'], width: '100%', height: '700px', headline: 'Mutations', }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1624
|
+
"default": "{ title: 'Visualization/Mutations', component: 'gs-mutations', argTypes: { variant: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'grid', 'insertions'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, }, args: { variant: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo: '2022-01-01' }, sequenceType: 'nucleotide', views: ['grid', 'table', 'insertions'], width: '100%', height: '700px', headline: 'Mutations', pageSize: 10, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1568
1625
|
},
|
|
1569
1626
|
{
|
|
1570
1627
|
"kind": "variable",
|
|
@@ -1694,6 +1751,16 @@
|
|
|
1694
1751
|
"default": "'Mutations'",
|
|
1695
1752
|
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1696
1753
|
"attribute": "headline"
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"kind": "field",
|
|
1757
|
+
"name": "pageSize",
|
|
1758
|
+
"type": {
|
|
1759
|
+
"text": "boolean | number"
|
|
1760
|
+
},
|
|
1761
|
+
"default": "false",
|
|
1762
|
+
"description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
|
|
1763
|
+
"attribute": "pageSize"
|
|
1697
1764
|
}
|
|
1698
1765
|
],
|
|
1699
1766
|
"attributes": [
|
|
@@ -1750,6 +1817,15 @@
|
|
|
1750
1817
|
"default": "'Mutations'",
|
|
1751
1818
|
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1752
1819
|
"fieldName": "headline"
|
|
1820
|
+
},
|
|
1821
|
+
{
|
|
1822
|
+
"name": "pageSize",
|
|
1823
|
+
"type": {
|
|
1824
|
+
"text": "boolean | number"
|
|
1825
|
+
},
|
|
1826
|
+
"default": "false",
|
|
1827
|
+
"description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
|
|
1828
|
+
"fieldName": "pageSize"
|
|
1753
1829
|
}
|
|
1754
1830
|
],
|
|
1755
1831
|
"superclass": {
|
|
@@ -1789,7 +1865,7 @@
|
|
|
1789
1865
|
"type": {
|
|
1790
1866
|
"text": "Meta<Required<PrevalenceOverTimeProps>>"
|
|
1791
1867
|
},
|
|
1792
|
-
"default": "{ title: 'Visualization/Prevalence over time', component: 'gs-prevalence-over-time', argTypes: { numerator: { control: 'object' }, denominator: { control: 'object' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, smoothingWindow: { control: 'number' }, views: { options: ['bar', 'line', 'bubble', 'table'], control: { type: 'check' }, }, confidenceIntervalMethods: { options: ['wilson'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1868
|
+
"default": "{ title: 'Visualization/Prevalence over time', component: 'gs-prevalence-over-time', argTypes: { numerator: { control: 'object' }, denominator: { control: 'object' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, smoothingWindow: { control: 'number' }, views: { options: ['bar', 'line', 'bubble', 'table'], control: { type: 'check' }, }, confidenceIntervalMethods: { options: ['wilson'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, headline: { control: 'text' }, pageSize: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1793
1869
|
},
|
|
1794
1870
|
{
|
|
1795
1871
|
"kind": "variable",
|
|
@@ -1797,7 +1873,7 @@
|
|
|
1797
1873
|
"type": {
|
|
1798
1874
|
"text": "StoryObj<Required<PrevalenceOverTimeProps>>"
|
|
1799
1875
|
},
|
|
1800
|
-
"default": "{ ...Template, args: { numerator: [ { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01' } }, { displayName: 'JN.1', lapisFilter: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' } }, ], denominator: { country: 'USA', dateFrom: '2023-01-01' }, granularity: 'month', smoothingWindow: 0, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', headline: 'Prevalence over time', lapisDateField: 'date', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorEG, }, }, { matcher: { name: 'numeratorJN1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorJN1, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: denominator, }, }, ], }, }, }"
|
|
1876
|
+
"default": "{ ...Template, args: { numerator: [ { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01' } }, { displayName: 'JN.1', lapisFilter: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' } }, ], denominator: { country: 'USA', dateFrom: '2023-01-01' }, granularity: 'month', smoothingWindow: 0, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', headline: 'Prevalence over time', lapisDateField: 'date', pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorEG, }, }, { matcher: { name: 'numeratorJN1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorJN1, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: denominator, }, }, ], }, }, }"
|
|
1801
1877
|
},
|
|
1802
1878
|
{
|
|
1803
1879
|
"kind": "variable",
|
|
@@ -1805,7 +1881,7 @@
|
|
|
1805
1881
|
"type": {
|
|
1806
1882
|
"text": "StoryObj<Required<PrevalenceOverTimeProps>>"
|
|
1807
1883
|
},
|
|
1808
|
-
"default": "{ ...Template, args: { numerator: { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01' }, }, denominator: { country: 'USA', dateFrom: '2023-10-01' }, granularity: 'day', smoothingWindow: 7, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', headline: 'Prevalence over time', lapisDateField: 'date', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorOneVariant', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: numeratorOneVariant, }, }, { matcher: { name: 'denominatorOneVariant', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: denominatorOneVariant, }, }, ], }, }, }"
|
|
1884
|
+
"default": "{ ...Template, args: { numerator: { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01' }, }, denominator: { country: 'USA', dateFrom: '2023-10-01' }, granularity: 'day', smoothingWindow: 7, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', headline: 'Prevalence over time', lapisDateField: 'date', pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorOneVariant', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: numeratorOneVariant, }, }, { matcher: { name: 'denominatorOneVariant', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: denominatorOneVariant, }, }, ], }, }, }"
|
|
1809
1885
|
},
|
|
1810
1886
|
{
|
|
1811
1887
|
"kind": "variable",
|
|
@@ -1896,7 +1972,7 @@
|
|
|
1896
1972
|
"kind": "field",
|
|
1897
1973
|
"name": "numerator",
|
|
1898
1974
|
"type": {
|
|
1899
|
-
"text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }\n | {\n
|
|
1975
|
+
"text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }\n | {\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
|
|
1900
1976
|
},
|
|
1901
1977
|
"default": "{ displayName: '', lapisFilter: {} }",
|
|
1902
1978
|
"description": "Required.\n\nEither a single variant or an array of variants to compare.\nThis must be a valid LAPIS filter object with an additional `displayName` property\nwhich will be used as the label for the variant in the views,\nor an array of such objects.",
|
|
@@ -1991,13 +2067,23 @@
|
|
|
1991
2067
|
"default": "'date'",
|
|
1992
2068
|
"description": "Required.\n\nThe LAPIS field that the data should be aggregated by.\nThe values will be used on the x-axis of the diagram.\nMust be a field of type `date` in LAPIS.",
|
|
1993
2069
|
"attribute": "lapisDateField"
|
|
2070
|
+
},
|
|
2071
|
+
{
|
|
2072
|
+
"kind": "field",
|
|
2073
|
+
"name": "pageSize",
|
|
2074
|
+
"type": {
|
|
2075
|
+
"text": "boolean | number"
|
|
2076
|
+
},
|
|
2077
|
+
"default": "false",
|
|
2078
|
+
"description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
|
|
2079
|
+
"attribute": "pageSize"
|
|
1994
2080
|
}
|
|
1995
2081
|
],
|
|
1996
2082
|
"attributes": [
|
|
1997
2083
|
{
|
|
1998
2084
|
"name": "numerator",
|
|
1999
2085
|
"type": {
|
|
2000
|
-
"text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }\n | {\n
|
|
2086
|
+
"text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }\n | {\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
|
|
2001
2087
|
},
|
|
2002
2088
|
"default": "{ displayName: '', lapisFilter: {} }",
|
|
2003
2089
|
"description": "Required.\n\nEither a single variant or an array of variants to compare.\nThis must be a valid LAPIS filter object with an additional `displayName` property\nwhich will be used as the label for the variant in the views,\nor an array of such objects.",
|
|
@@ -2083,6 +2169,15 @@
|
|
|
2083
2169
|
"default": "'date'",
|
|
2084
2170
|
"description": "Required.\n\nThe LAPIS field that the data should be aggregated by.\nThe values will be used on the x-axis of the diagram.\nMust be a field of type `date` in LAPIS.",
|
|
2085
2171
|
"fieldName": "lapisDateField"
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
"name": "pageSize",
|
|
2175
|
+
"type": {
|
|
2176
|
+
"text": "boolean | number"
|
|
2177
|
+
},
|
|
2178
|
+
"default": "false",
|
|
2179
|
+
"description": "The maximum number of rows to display in the table view.\nSet to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).",
|
|
2180
|
+
"fieldName": "pageSize"
|
|
2086
2181
|
}
|
|
2087
2182
|
],
|
|
2088
2183
|
"superclass": {
|