@genspectrum/dashboard-components 1.10.3 → 1.11.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 +38 -3
- package/dist/assets/{mutationOverTimeWorker-dhufsWQ2.js.map → mutationOverTimeWorker-CQQFRoK4.js.map} +1 -1
- package/dist/components.d.ts +40 -32
- package/dist/components.js +144 -66
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +45 -32
- package/package.json +1 -1
- package/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +1 -1
- package/src/preact/mutationsOverTime/mutations-over-time-grid-tooltip.stories.tsx +62 -10
- package/src/preact/mutationsOverTime/mutations-over-time-grid-tooltip.tsx +93 -51
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +36 -8
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +27 -0
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +5 -3
- package/src/query/queryMutationsOverTime.ts +21 -2
- package/src/query/queryMutationsOverTimeNewEndpoint.spec.ts +23 -23
- package/src/utilEntrypoint.ts +1 -0
- package/src/web-components/input/gs-lineage-filter.stories.ts +9 -1
- package/src/web-components/visualization/gs-mutations-over-time.spec-d.ts +3 -0
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +21 -0
- package/src/web-components/visualization/gs-mutations-over-time.tsx +8 -0
- package/standalone-bundle/assets/{mutationOverTimeWorker-CGqPKySO.js.map → mutationOverTimeWorker-DIpJukJC.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +2953 -2880
- package/standalone-bundle/dashboard-components.js.map +1 -1
package/custom-elements.json
CHANGED
|
@@ -628,7 +628,7 @@
|
|
|
628
628
|
"type": {
|
|
629
629
|
"text": "StoryObj<Required<LineageFilterProps>>"
|
|
630
630
|
},
|
|
631
|
-
"default": "{ render: (args) => { return html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-(--breakpoint-lg)\"> <gs-lineage-filter lapisField=\"pangoLineage\" placeholderText=\"Enter a lineage\" value=\"B.1.1.7\" .multiSelect=${args.multiSelect} ></gs-lineage-filter> </div> </gs-app>`; }, args: { multiSelect: false, }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-lineage-filter'); await waitFor(() => { return expect(canvas.getByPlaceholderText('Enter a lineage')).toBeVisible(); }); }, }"
|
|
631
|
+
"default": "{ render: (args) => { return html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-(--breakpoint-lg)\"> <gs-lineage-filter lapisField=\"pangoLineage\" placeholderText=\"Enter a lineage\" value=\"B.1.1.7\" .lapisFilter=${args.lapisFilter} .multiSelect=${args.multiSelect} ></gs-lineage-filter> </div> </gs-app>`; }, args: { multiSelect: false, lapisFilter: { country: 'Germany', }, }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-lineage-filter'); await waitFor(() => { return expect(canvas.getByPlaceholderText('Enter a lineage')).toBeVisible(); }); }, }"
|
|
632
632
|
},
|
|
633
633
|
{
|
|
634
634
|
"kind": "variable",
|
|
@@ -636,7 +636,7 @@
|
|
|
636
636
|
"type": {
|
|
637
637
|
"text": "StoryObj<Required<LineageFilterProps>>"
|
|
638
638
|
},
|
|
639
|
-
"default": "{ render: (args) => { return html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-(--breakpoint-lg)\"> <gs-lineage-filter lapisField=\"pangoLineage\" placeholderText=\"Enter a lineage\" value='[\"B.1.1.7\", \"B.1.1.10\"]' .multiSelect=${args.multiSelect} ></gs-lineage-filter> </div> </gs-app>`; }, args: { multiSelect: true, }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-lineage-filter'); await waitFor(() => { return expect(canvas.getByPlaceholderText('Enter a lineage')).toBeVisible(); }); }, }"
|
|
639
|
+
"default": "{ render: (args) => { return html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-(--breakpoint-lg)\"> <gs-lineage-filter lapisField=\"pangoLineage\" placeholderText=\"Enter a lineage\" value='[\"B.1.1.7\", \"B.1.1.10\"]' .lapisFilter=${args.lapisFilter} .multiSelect=${args.multiSelect} ></gs-lineage-filter> </div> </gs-app>`; }, args: { multiSelect: true, lapisFilter: { country: 'Germany', }, }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-lineage-filter'); await waitFor(() => { return expect(canvas.getByPlaceholderText('Enter a lineage')).toBeVisible(); }); }, }"
|
|
640
640
|
},
|
|
641
641
|
{
|
|
642
642
|
"kind": "variable",
|
|
@@ -2717,7 +2717,7 @@
|
|
|
2717
2717
|
"type": {
|
|
2718
2718
|
"text": "Meta<Required<MutationsOverTimeProps>>"
|
|
2719
2719
|
},
|
|
2720
|
-
"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'], }"
|
|
2720
|
+
"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' }, customColumns: { 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'], }"
|
|
2721
2721
|
},
|
|
2722
2722
|
{
|
|
2723
2723
|
"kind": "variable",
|
|
@@ -2774,6 +2774,14 @@
|
|
|
2774
2774
|
"text": "StoryObj<Required<MutationsOverTimeProps>>"
|
|
2775
2775
|
},
|
|
2776
2776
|
"default": "{ ...Template, args: { ...Template, height: '700px', }, }"
|
|
2777
|
+
},
|
|
2778
|
+
{
|
|
2779
|
+
"kind": "variable",
|
|
2780
|
+
"name": "WithCustomColumns",
|
|
2781
|
+
"type": {
|
|
2782
|
+
"text": "StoryObj<Required<MutationsOverTimeProps>>"
|
|
2783
|
+
},
|
|
2784
|
+
"default": "{ ...Template, args: { ...Template.args, displayMutations: ['A19722G', 'G21641T', 'T21653-'], customColumns: [ { header: 'Jaccard Index', values: { A19722G: 0.75, G21641T: 0.92, 'T21653-': 0.58, }, }, ], }, }"
|
|
2777
2785
|
}
|
|
2778
2786
|
],
|
|
2779
2787
|
"exports": [
|
|
@@ -2840,6 +2848,14 @@
|
|
|
2840
2848
|
"name": "WithFixedHeight",
|
|
2841
2849
|
"module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
|
|
2842
2850
|
}
|
|
2851
|
+
},
|
|
2852
|
+
{
|
|
2853
|
+
"kind": "js",
|
|
2854
|
+
"name": "WithCustomColumns",
|
|
2855
|
+
"declaration": {
|
|
2856
|
+
"name": "WithCustomColumns",
|
|
2857
|
+
"module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
|
|
2858
|
+
}
|
|
2843
2859
|
}
|
|
2844
2860
|
]
|
|
2845
2861
|
},
|
|
@@ -2971,6 +2987,16 @@
|
|
|
2971
2987
|
"default": "[10, 20, 30, 40, 50]",
|
|
2972
2988
|
"description": "The number of rows per page, which can be selected by the user.",
|
|
2973
2989
|
"attribute": "pageSizes"
|
|
2990
|
+
},
|
|
2991
|
+
{
|
|
2992
|
+
"kind": "field",
|
|
2993
|
+
"name": "customColumns",
|
|
2994
|
+
"type": {
|
|
2995
|
+
"text": "{ header: string; values: Record<string, string | number> }[] | undefined"
|
|
2996
|
+
},
|
|
2997
|
+
"default": "undefined",
|
|
2998
|
+
"description": "Custom columns to add to the grid.\nEach column has a header and a map of mutation codes to values.",
|
|
2999
|
+
"attribute": "customColumns"
|
|
2974
3000
|
}
|
|
2975
3001
|
],
|
|
2976
3002
|
"events": [
|
|
@@ -3090,6 +3116,15 @@
|
|
|
3090
3116
|
"default": "[10, 20, 30, 40, 50]",
|
|
3091
3117
|
"description": "The number of rows per page, which can be selected by the user.",
|
|
3092
3118
|
"fieldName": "pageSizes"
|
|
3119
|
+
},
|
|
3120
|
+
{
|
|
3121
|
+
"name": "customColumns",
|
|
3122
|
+
"type": {
|
|
3123
|
+
"text": "{ header: string; values: Record<string, string | number> }[] | undefined"
|
|
3124
|
+
},
|
|
3125
|
+
"default": "undefined",
|
|
3126
|
+
"description": "Custom columns to add to the grid.\nEach column has a header and a map of mutation codes to values.",
|
|
3127
|
+
"fieldName": "customColumns"
|
|
3093
3128
|
}
|
|
3094
3129
|
],
|
|
3095
3130
|
"superclass": {
|