@genspectrum/dashboard-components 1.4.0 → 1.6.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 +134 -7
- package/dist/assets/{mutationOverTimeWorker-CQxrFo53.js.map → mutationOverTimeWorker-BmB6BvVM.js.map} +1 -1
- package/dist/components.d.ts +52 -11
- package/dist/components.js +189 -45
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +11 -11
- package/package.json +1 -1
- package/src/preact/lineageFilter/lineage-filter.stories.tsx +24 -0
- package/src/preact/lineageFilter/lineage-filter.tsx +13 -2
- package/src/preact/locationFilter/location-filter.stories.tsx +24 -0
- package/src/preact/locationFilter/location-filter.tsx +19 -3
- package/src/preact/mutationFilter/mutation-filter-info.tsx +2 -2
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +71 -1
- package/src/preact/mutationFilter/mutation-filter.tsx +65 -24
- package/src/preact/mutationsOverTime/__mockData__/withGaps.ts +352 -0
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts +38 -0
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +10 -0
- package/src/preact/mutationsOverTime/mutationOverTimeWorker.mock.ts +2 -0
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +35 -0
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +28 -4
- package/src/preact/textFilter/text-filter.stories.tsx +29 -4
- package/src/preact/textFilter/text-filter.tsx +13 -2
- package/src/query/queryMutationsOverTime.ts +37 -4
- package/src/query/queryMutationsOverTimeNewEndpoint.spec.ts +122 -0
- package/src/utils/map2d.spec.ts +30 -0
- package/src/utils/map2d.ts +14 -1
- package/src/utils/mutations.spec.ts +13 -0
- package/src/utils/mutations.ts +3 -3
- package/src/web-components/input/gs-lineage-filter.stories.ts +7 -0
- package/src/web-components/input/gs-lineage-filter.tsx +8 -0
- package/src/web-components/input/gs-location-filter.stories.ts +7 -0
- package/src/web-components/input/gs-location-filter.tsx +9 -1
- package/src/web-components/input/gs-mutation-filter.stories.ts +29 -1
- package/src/web-components/input/gs-mutation-filter.tsx +29 -2
- package/src/web-components/input/gs-text-filter.stories.ts +7 -0
- package/src/web-components/input/gs-text-filter.tsx +8 -0
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +14 -1
- package/src/web-components/visualization/gs-mutations-over-time.tsx +8 -0
- package/standalone-bundle/assets/{mutationOverTimeWorker-CDACUs6w.js.map → mutationOverTimeWorker-B_xP8pIC.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +3666 -3553
- package/standalone-bundle/dashboard-components.js.map +1 -1
package/custom-elements.json
CHANGED
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
"type": {
|
|
564
564
|
"text": "Meta<Required<LineageFilterProps>>"
|
|
565
565
|
},
|
|
566
|
-
"default": "{ title: 'Input/Lineage filter', component: 'gs-lineage-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.lineageFilterChanged, ...previewHandles], }, fetchMock: { mocks: [ { matcher: { name: 'pangoLineage', url: AGGREGATED_ENDPOINT, body: { fields: ['pangoLineage'], country: 'Germany', }, }, response: { status: 200, body: aggregatedData, }, }, { matcher: { name: 'lineageDefinition', url: lineageDefinitionEndpoint(LAPIS_URL, 'pangoLineage'), }, response: { status: 200, body: lineageDefinition, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], argTypes: { lapisField: { control: { type: 'select', }, options: ['host'], }, placeholderText: { control: { type: 'text', }, }, value: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, lapisFilter: { control: { type: 'object', }, }, }, }"
|
|
566
|
+
"default": "{ title: 'Input/Lineage filter', component: 'gs-lineage-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.lineageFilterChanged, ...previewHandles], }, fetchMock: { mocks: [ { matcher: { name: 'pangoLineage', url: AGGREGATED_ENDPOINT, body: { fields: ['pangoLineage'], country: 'Germany', }, }, response: { status: 200, body: aggregatedData, }, }, { matcher: { name: 'lineageDefinition', url: lineageDefinitionEndpoint(LAPIS_URL, 'pangoLineage'), }, response: { status: 200, body: lineageDefinition, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], argTypes: { lapisField: { control: { type: 'select', }, options: ['host'], }, placeholderText: { control: { type: 'text', }, }, value: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, lapisFilter: { control: { type: 'object', }, }, hideCounts: { control: { type: 'boolean', }, }, }, }"
|
|
567
567
|
},
|
|
568
568
|
{
|
|
569
569
|
"kind": "variable",
|
|
@@ -699,6 +699,16 @@
|
|
|
699
699
|
"default": "'100%'",
|
|
700
700
|
"description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.",
|
|
701
701
|
"attribute": "width"
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
"kind": "field",
|
|
705
|
+
"name": "hideCounts",
|
|
706
|
+
"type": {
|
|
707
|
+
"text": "boolean | undefined"
|
|
708
|
+
},
|
|
709
|
+
"default": "false",
|
|
710
|
+
"description": "Whether to hide counts behind lineage options in the drop down selection.\nDefaults to false.",
|
|
711
|
+
"attribute": "hideCounts"
|
|
702
712
|
}
|
|
703
713
|
],
|
|
704
714
|
"events": [
|
|
@@ -755,6 +765,15 @@
|
|
|
755
765
|
"default": "'100%'",
|
|
756
766
|
"description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.",
|
|
757
767
|
"fieldName": "width"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "hideCounts",
|
|
771
|
+
"type": {
|
|
772
|
+
"text": "boolean | undefined"
|
|
773
|
+
},
|
|
774
|
+
"default": "false",
|
|
775
|
+
"description": "Whether to hide counts behind lineage options in the drop down selection.\nDefaults to false.",
|
|
776
|
+
"fieldName": "hideCounts"
|
|
758
777
|
}
|
|
759
778
|
],
|
|
760
779
|
"superclass": {
|
|
@@ -794,7 +813,7 @@
|
|
|
794
813
|
"type": {
|
|
795
814
|
"text": "Meta"
|
|
796
815
|
},
|
|
797
|
-
"default": "{ title: 'Input/Location filter', component: 'gs-location-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.locationChanged, ...previewHandles], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { fields: { control: { type: 'object', }, }, value: { control: { type: 'object', }, }, width: { control: { type: 'text', }, }, placeholderText: { control: { type: 'text', }, }, lapisFilter: { age: 18, }, }, tags: ['autodocs'], }"
|
|
816
|
+
"default": "{ title: 'Input/Location filter', component: 'gs-location-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.locationChanged, ...previewHandles], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { fields: { control: { type: 'object', }, }, value: { control: { type: 'object', }, }, width: { control: { type: 'text', }, }, placeholderText: { control: { type: 'text', }, }, hideCounts: { control: { type: 'boolean', }, }, lapisFilter: { age: 18, }, }, tags: ['autodocs'], }"
|
|
798
817
|
},
|
|
799
818
|
{
|
|
800
819
|
"kind": "variable",
|
|
@@ -930,6 +949,16 @@
|
|
|
930
949
|
"default": "undefined",
|
|
931
950
|
"description": "The placeholder text to display in the input field, if it is empty.",
|
|
932
951
|
"attribute": "placeholderText"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"kind": "field",
|
|
955
|
+
"name": "hideCounts",
|
|
956
|
+
"type": {
|
|
957
|
+
"text": "boolean | undefined"
|
|
958
|
+
},
|
|
959
|
+
"default": "false",
|
|
960
|
+
"description": "Whether to hide counts behind location options in the drop down selection.\nDefaults to false.",
|
|
961
|
+
"attribute": "hideCounts"
|
|
933
962
|
}
|
|
934
963
|
],
|
|
935
964
|
"events": [
|
|
@@ -986,6 +1015,15 @@
|
|
|
986
1015
|
"default": "undefined",
|
|
987
1016
|
"description": "The placeholder text to display in the input field, if it is empty.",
|
|
988
1017
|
"fieldName": "placeholderText"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"name": "hideCounts",
|
|
1021
|
+
"type": {
|
|
1022
|
+
"text": "boolean | undefined"
|
|
1023
|
+
},
|
|
1024
|
+
"default": "false",
|
|
1025
|
+
"description": "Whether to hide counts behind location options in the drop down selection.\nDefaults to false.",
|
|
1026
|
+
"fieldName": "hideCounts"
|
|
989
1027
|
}
|
|
990
1028
|
],
|
|
991
1029
|
"superclass": {
|
|
@@ -1025,7 +1063,7 @@
|
|
|
1025
1063
|
"type": {
|
|
1026
1064
|
"text": "Meta<MutationFilterProps>"
|
|
1027
1065
|
},
|
|
1028
|
-
"default": "{ title: 'Input/Mutation filter', component: 'gs-mutation-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.mutationFilterChanged, ...previewHandles], }, fetchMock: {}, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { initialValue: { control: { type: 'object', }, }, width: { control: 'text' }, }, tags: ['autodocs'], }"
|
|
1066
|
+
"default": "{ title: 'Input/Mutation filter', component: 'gs-mutation-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.mutationFilterChanged, ...previewHandles], }, fetchMock: {}, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { initialValue: { control: { type: 'object', }, }, width: { control: 'text' }, enabledMutationTypes: { control: { type: 'object', }, }, }, tags: ['autodocs'], }"
|
|
1029
1067
|
},
|
|
1030
1068
|
{
|
|
1031
1069
|
"kind": "variable",
|
|
@@ -1043,6 +1081,14 @@
|
|
|
1043
1081
|
},
|
|
1044
1082
|
"default": "{ ...Template, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-filter'); const inputField = () => canvas.getByPlaceholderText('Enter a mutation', { exact: false }); const listenerMock = fn(); await step('Setup event listener mock', () => { canvasElement.addEventListener(gsEventNames.mutationFilterChanged, listenerMock); }); await step('wait until data is loaded', async () => { await waitFor(() => { return expect(inputField()).toBeEnabled(); }); }); await step('Enter a valid mutation', async () => { await userEvent.type(inputField(), 'A123T'); const option = await canvas.findByRole('option'); await userEvent.click(option); await waitFor(() => expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { nucleotideMutations: ['A123T'], aminoAcidMutations: [], nucleotideInsertions: [], aminoAcidInsertions: [], }, }), ), ); }); }, }"
|
|
1045
1083
|
},
|
|
1084
|
+
{
|
|
1085
|
+
"kind": "variable",
|
|
1086
|
+
"name": "RestrictEnabledMutationTypes",
|
|
1087
|
+
"type": {
|
|
1088
|
+
"text": "StoryObj<MutationFilterProps>"
|
|
1089
|
+
},
|
|
1090
|
+
"default": "{ ...Template, args: { ...Template.args, enabledMutationTypes: ['nucleotideMutations', 'aminoAcidMutations'], }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-filter'); const inputField = () => canvas.getByPlaceholderText('Enter a mutation', { exact: false }); await waitFor(async () => { const placeholderText = inputField().getAttribute('placeholder'); await expect(placeholderText).toEqual('Enter a mutation (e.g. 23T, E:57Q)'); }); }, }"
|
|
1091
|
+
},
|
|
1046
1092
|
{
|
|
1047
1093
|
"kind": "variable",
|
|
1048
1094
|
"name": "MultiSegmentedReferenceGenomes",
|
|
@@ -1077,6 +1123,14 @@
|
|
|
1077
1123
|
"module": "src/web-components/input/gs-mutation-filter.stories.ts"
|
|
1078
1124
|
}
|
|
1079
1125
|
},
|
|
1126
|
+
{
|
|
1127
|
+
"kind": "js",
|
|
1128
|
+
"name": "RestrictEnabledMutationTypes",
|
|
1129
|
+
"declaration": {
|
|
1130
|
+
"name": "RestrictEnabledMutationTypes",
|
|
1131
|
+
"module": "src/web-components/input/gs-mutation-filter.stories.ts"
|
|
1132
|
+
}
|
|
1133
|
+
},
|
|
1080
1134
|
{
|
|
1081
1135
|
"kind": "js",
|
|
1082
1136
|
"name": "MultiSegmentedReferenceGenomes",
|
|
@@ -1093,7 +1147,7 @@
|
|
|
1093
1147
|
"declarations": [
|
|
1094
1148
|
{
|
|
1095
1149
|
"kind": "class",
|
|
1096
|
-
"description": "## Context\nThis component provides an input field to specify filters for nucleotide and amino acid mutations and insertions.\n\nInput values have to be provided one at a time and submitted by pressing the Enter key or by selecting an option from the dropdown.\nAlternatively, they can be provided as a string of comma-separated values, which will be directly parsed and validated.\nAfter submission (after pressing Enter or pasting a comma-separated string) an event is fired with the selected mutations.\nAll previously selected mutations are displayed at the input field and added to the event.\nUsers can remove a mutation by clicking the 'x' button next to the mutation.\n\n## Input Validation\n\nValidation of the input is performed according to the following rules:\n\n### Mutations\n\nMutations have to conform to the following format: `<gene/segment>:<symbol at reference><position><Substituted symbol/Deletion>`\n- Gene/segment: The gene or segment where the mutation occurs. Must be contained in the reference genome.\n (Optional for elements with only one gene/segment)\n- Symbol at reference: The symbol at the reference position. (Optional)\n- Position: The position of the mutation. (Required)\n- Substituted symbol/Deletion: The substituted symbol or '-' for a deletion. (Required)\n\nExamples: `S:614G`, `614G`, `614-`, `614G`\n\n### Insertions\n\nInsertions have to conform to the following format: `ins_<gene/segment>:<position>:<Inserted symbols>`\n- Gene/segment: The gene or segment where the insertion occurs. Must be contained in the reference genome.\n (Optional for elements with only one gene/segment)\n- Position: The position of the insertion. (Required)\n- Inserted symbols: The symbols that are inserted. (Required)\n\nExamples: `ins_S:614:G`, `ins_614:G`",
|
|
1150
|
+
"description": "## Context\nThis component provides an input field to specify filters for nucleotide and amino acid mutations and insertions.\n\nInput values have to be provided one at a time and submitted by pressing the Enter key or by selecting an option from the dropdown.\nAlternatively, they can be provided as a string of comma-separated values, which will be directly parsed and validated.\nAfter submission (after pressing Enter or pasting a comma-separated string) an event is fired with the selected mutations.\nAll previously selected mutations are displayed at the input field and added to the event.\nUsers can remove a mutation by clicking the 'x' button next to the mutation.\n\n## Input Validation\n\nValidation of the input is performed according to the following rules:\n\n### Mutations\n\nMutations have to conform to the following format: `<gene/segment>:<symbol at reference><position><Substituted symbol/Deletion>`\n- Gene/segment: The gene or segment where the mutation occurs. Must be contained in the reference genome.\n (Optional for elements with only one gene/segment)\n- Symbol at reference: The symbol at the reference position. (Optional)\n- Position: The position of the mutation. (Required)\n- Substituted symbol/Deletion: The substituted symbol or '-' for a deletion. (Required)\n\nExamples: `S:614G`, `614G`, `614-`, `614G`\n\n### Insertions\n\nInsertions have to conform to the following format: `ins_<gene/segment>:<position>:<Inserted symbols>`\n- Gene/segment: The gene or segment where the insertion occurs. Must be contained in the reference genome.\n (Optional for elements with only one gene/segment)\n- Position: The position of the insertion. (Required)\n- Inserted symbols: The symbols that are inserted. (Required)\n\nExamples: `ins_S:614:G`, `ins_614:G`\n\n### Enabled mutation types\n\nAfter parsing, the entered mutation/insertion also has to match the enabled mutation types,\nwhich are configured with the `enabledMutationTypes` attribute.",
|
|
1097
1151
|
"name": "MutationFilterComponent",
|
|
1098
1152
|
"members": [
|
|
1099
1153
|
{
|
|
@@ -1115,6 +1169,16 @@
|
|
|
1115
1169
|
"default": "'100%'",
|
|
1116
1170
|
"description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.",
|
|
1117
1171
|
"attribute": "width"
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
"kind": "field",
|
|
1175
|
+
"name": "enabledMutationTypes",
|
|
1176
|
+
"type": {
|
|
1177
|
+
"text": "MutationType[] | undefined"
|
|
1178
|
+
},
|
|
1179
|
+
"default": "undefined",
|
|
1180
|
+
"description": "Which mutation types this input will accept.\nAny (or all) of the following can be given in a list:\n\n- `nucleotideMutations`\n- `nucleotideInsertions`\n- `aminoAcidMutations`\n- `aminoAcidInsertions`\n\nBy default or if none are given, all types are accepted.",
|
|
1181
|
+
"attribute": "enabledMutationTypes"
|
|
1118
1182
|
}
|
|
1119
1183
|
],
|
|
1120
1184
|
"events": [
|
|
@@ -1144,6 +1208,15 @@
|
|
|
1144
1208
|
"default": "'100%'",
|
|
1145
1209
|
"description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.",
|
|
1146
1210
|
"fieldName": "width"
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
"name": "enabledMutationTypes",
|
|
1214
|
+
"type": {
|
|
1215
|
+
"text": "MutationType[] | undefined"
|
|
1216
|
+
},
|
|
1217
|
+
"default": "undefined",
|
|
1218
|
+
"description": "Which mutation types this input will accept.\nAny (or all) of the following can be given in a list:\n\n- `nucleotideMutations`\n- `nucleotideInsertions`\n- `aminoAcidMutations`\n- `aminoAcidInsertions`\n\nBy default or if none are given, all types are accepted.",
|
|
1219
|
+
"fieldName": "enabledMutationTypes"
|
|
1147
1220
|
}
|
|
1148
1221
|
],
|
|
1149
1222
|
"superclass": {
|
|
@@ -1398,7 +1471,7 @@
|
|
|
1398
1471
|
"type": {
|
|
1399
1472
|
"text": "Meta<Required<TextFilterProps>>"
|
|
1400
1473
|
},
|
|
1401
|
-
"default": "{ title: 'Input/Text filter', component: 'gs-text-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.textFilterChanged, ...previewHandles], }, fetchMock: { mocks: [ { matcher: { name: 'hosts', url: AGGREGATED_ENDPOINT, body: { fields: ['host'], country: 'Germany', }, }, response: { status: 200, body: data, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { lapisField: { control: { type: 'text', }, }, placeholderText: { control: { type: 'text', }, }, value: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, lapisFilter: { control: { type: 'object', }, }, }, tags: ['autodocs'], }"
|
|
1474
|
+
"default": "{ title: 'Input/Text filter', component: 'gs-text-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.textFilterChanged, ...previewHandles], }, fetchMock: { mocks: [ { matcher: { name: 'hosts', url: AGGREGATED_ENDPOINT, body: { fields: ['host'], country: 'Germany', }, }, response: { status: 200, body: data, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { lapisField: { control: { type: 'text', }, }, placeholderText: { control: { type: 'text', }, }, hideCounts: { control: { type: 'boolean', }, }, value: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, lapisFilter: { control: { type: 'object', }, }, }, tags: ['autodocs'], }"
|
|
1402
1475
|
},
|
|
1403
1476
|
{
|
|
1404
1477
|
"kind": "variable",
|
|
@@ -1406,7 +1479,7 @@
|
|
|
1406
1479
|
"type": {
|
|
1407
1480
|
"text": "StoryObj<Required<TextFilterProps>>"
|
|
1408
1481
|
},
|
|
1409
|
-
"default": "{ render: (args) => { return html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-(--breakpoint-lg)\"> <gs-text-filter .lapisField=${args.lapisField} .lapisFilter=${args.lapisFilter} .placeholderText=${args.placeholderText} .value=${args.value} .width=${args.width} ></gs-text-filter> </div> </gs-app>`; }, args: { lapisField: 'host', lapisFilter: { country: 'Germany' }, placeholderText: 'Enter host name', value: 'Homo sapiens', width: '100%', }, }"
|
|
1482
|
+
"default": "{ render: (args) => { return html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-(--breakpoint-lg)\"> <gs-text-filter .lapisField=${args.lapisField} .lapisFilter=${args.lapisFilter} .placeholderText=${args.placeholderText} .hideCounts=${args.hideCounts} .value=${args.value} .width=${args.width} ></gs-text-filter> </div> </gs-app>`; }, args: { lapisField: 'host', lapisFilter: { country: 'Germany' }, placeholderText: 'Enter host name', hideCounts: false, value: 'Homo sapiens', width: '100%', }, }"
|
|
1410
1483
|
},
|
|
1411
1484
|
{
|
|
1412
1485
|
"kind": "variable",
|
|
@@ -1493,6 +1566,16 @@
|
|
|
1493
1566
|
"description": "The placeholder text to display in the input field.",
|
|
1494
1567
|
"attribute": "placeholderText"
|
|
1495
1568
|
},
|
|
1569
|
+
{
|
|
1570
|
+
"kind": "field",
|
|
1571
|
+
"name": "hideCounts",
|
|
1572
|
+
"type": {
|
|
1573
|
+
"text": "boolean | undefined"
|
|
1574
|
+
},
|
|
1575
|
+
"default": "false",
|
|
1576
|
+
"description": "Whether to hide counts behind options in the drop down selection.\nDefaults to false.",
|
|
1577
|
+
"attribute": "hideCounts"
|
|
1578
|
+
},
|
|
1496
1579
|
{
|
|
1497
1580
|
"kind": "field",
|
|
1498
1581
|
"name": "width",
|
|
@@ -1550,6 +1633,15 @@
|
|
|
1550
1633
|
"description": "The placeholder text to display in the input field.",
|
|
1551
1634
|
"fieldName": "placeholderText"
|
|
1552
1635
|
},
|
|
1636
|
+
{
|
|
1637
|
+
"name": "hideCounts",
|
|
1638
|
+
"type": {
|
|
1639
|
+
"text": "boolean | undefined"
|
|
1640
|
+
},
|
|
1641
|
+
"default": "false",
|
|
1642
|
+
"description": "Whether to hide counts behind options in the drop down selection.\nDefaults to false.",
|
|
1643
|
+
"fieldName": "hideCounts"
|
|
1644
|
+
},
|
|
1553
1645
|
{
|
|
1554
1646
|
"name": "width",
|
|
1555
1647
|
"type": {
|
|
@@ -2464,7 +2556,7 @@
|
|
|
2464
2556
|
"type": {
|
|
2465
2557
|
"text": "Meta<Required<MutationsOverTimeProps>>"
|
|
2466
2558
|
},
|
|
2467
|
-
"default": "{ title: 'Visualization/Mutations over time', component: 'gs-mutations-over-time', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['grid'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, lapisDateField: { control: 'text' }, displayMutations: { control: 'object' }, initialMeanProportionInterval: { control: 'object' }, useNewEndpoint: { control: 'boolean' }, pageSizes: { control: 'object' }, }, args: { lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-07-10' }, sequenceType: 'nucleotide', views: ['grid'], width: '100%', granularity: 'month', lapisDateField: 'date', initialMeanProportionInterval: { min: 0.05, max: 0.9 }, useNewEndpoint: false, pageSizes: [10, 20, 30, 40, 50], }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
|
|
2559
|
+
"default": "{ title: 'Visualization/Mutations over time', component: 'gs-mutations-over-time', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['grid'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, lapisDateField: { control: 'text' }, displayMutations: { control: 'object' }, initialMeanProportionInterval: { control: 'object' }, hideGaps: { control: 'boolean' }, useNewEndpoint: { control: 'boolean' }, pageSizes: { control: 'object' }, }, args: { lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-07-10' }, sequenceType: 'nucleotide', views: ['grid'], width: '100%', granularity: 'month', lapisDateField: 'date', initialMeanProportionInterval: { min: 0.05, max: 0.9 }, hideGaps: false, useNewEndpoint: false, pageSizes: [10, 20, 30, 40, 50], }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
|
|
2468
2560
|
},
|
|
2469
2561
|
{
|
|
2470
2562
|
"kind": "variable",
|
|
@@ -2482,6 +2574,14 @@
|
|
|
2482
2574
|
},
|
|
2483
2575
|
"default": "{ ...Template, args: { ...Template.args, displayMutations: ['A19722G', 'G21641T', 'T21653-'], }, }"
|
|
2484
2576
|
},
|
|
2577
|
+
{
|
|
2578
|
+
"kind": "variable",
|
|
2579
|
+
"name": "ByMonthWithFilterOnDisplayedMutationsAndGaps",
|
|
2580
|
+
"type": {
|
|
2581
|
+
"text": "StoryObj<Required<MutationsOverTimeProps>>"
|
|
2582
|
+
},
|
|
2583
|
+
"default": "{ ...Template, args: { ...Template.args, displayMutations: ['A19722G', 'G21641T', 'T21652-'], hideGaps: true, }, }"
|
|
2584
|
+
},
|
|
2485
2585
|
{
|
|
2486
2586
|
"kind": "variable",
|
|
2487
2587
|
"name": "ByWeek",
|
|
@@ -2540,6 +2640,14 @@
|
|
|
2540
2640
|
"module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
|
|
2541
2641
|
}
|
|
2542
2642
|
},
|
|
2643
|
+
{
|
|
2644
|
+
"kind": "js",
|
|
2645
|
+
"name": "ByMonthWithFilterOnDisplayedMutationsAndGaps",
|
|
2646
|
+
"declaration": {
|
|
2647
|
+
"name": "ByMonthWithFilterOnDisplayedMutationsAndGaps",
|
|
2648
|
+
"module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
|
|
2649
|
+
}
|
|
2650
|
+
},
|
|
2543
2651
|
{
|
|
2544
2652
|
"kind": "js",
|
|
2545
2653
|
"name": "ByWeek",
|
|
@@ -2673,6 +2781,16 @@
|
|
|
2673
2781
|
"description": "The initial proportion interval for the grid view.\nThe values must be between 0 and 1, inclusive.",
|
|
2674
2782
|
"attribute": "initialMeanProportionInterval"
|
|
2675
2783
|
},
|
|
2784
|
+
{
|
|
2785
|
+
"kind": "field",
|
|
2786
|
+
"name": "hideGaps",
|
|
2787
|
+
"type": {
|
|
2788
|
+
"text": "boolean"
|
|
2789
|
+
},
|
|
2790
|
+
"default": "false",
|
|
2791
|
+
"description": "If true, date ranges with no data will be hidden initially; if false, not.\nCan be switched with a button in the toolbar.",
|
|
2792
|
+
"attribute": "hideGaps"
|
|
2793
|
+
},
|
|
2676
2794
|
{
|
|
2677
2795
|
"kind": "field",
|
|
2678
2796
|
"name": "useNewEndpoint",
|
|
@@ -2785,6 +2903,15 @@
|
|
|
2785
2903
|
"description": "The initial proportion interval for the grid view.\nThe values must be between 0 and 1, inclusive.",
|
|
2786
2904
|
"fieldName": "initialMeanProportionInterval"
|
|
2787
2905
|
},
|
|
2906
|
+
{
|
|
2907
|
+
"name": "hideGaps",
|
|
2908
|
+
"type": {
|
|
2909
|
+
"text": "boolean"
|
|
2910
|
+
},
|
|
2911
|
+
"default": "false",
|
|
2912
|
+
"description": "If true, date ranges with no data will be hidden initially; if false, not.\nCan be switched with a button in the toolbar.",
|
|
2913
|
+
"fieldName": "hideGaps"
|
|
2914
|
+
},
|
|
2788
2915
|
{
|
|
2789
2916
|
"name": "useNewEndpoint",
|
|
2790
2917
|
"type": {
|