@genspectrum/dashboard-components 0.19.7 → 0.19.9
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 +33 -15
- package/dist/assets/mutationOverTimeWorker-BzmkceEA.js.map +1 -0
- package/dist/components.d.ts +24 -24
- package/dist/components.js +121 -21
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +24 -24
- package/package.json +1 -1
- package/src/lapisApi/LineageDefinition.ts +9 -0
- package/src/lapisApi/lapisApi.ts +27 -0
- package/src/preact/lineageFilter/__mockData__/lineageDefinition.json +38118 -0
- package/src/preact/lineageFilter/fetchLineageAutocompleteList.spec.ts +264 -6
- package/src/preact/lineageFilter/fetchLineageAutocompleteList.ts +104 -7
- package/src/preact/lineageFilter/lineage-filter.stories.tsx +13 -1
- package/src/preact/lineageFilter/lineage-filter.tsx +21 -11
- package/src/web-components/input/gs-lineage-filter.stories.ts +13 -1
- package/src/web-components/input/introduction.mdx +57 -2
- package/src/web-components/tutorials/CreateYourFirstOwnDashboard.mdx +85 -0
- package/src/web-components/tutorials/UseTheComponentsWithPlainJavaScript.mdx +140 -0
- package/src/web-components/tutorials/UseTheComponentsWithReact.mdx +166 -0
- package/src/web-components/visualization/gs-mutations.tsx +2 -2
- package/src/web-components/visualization/introduction.mdx +51 -0
- package/standalone-bundle/assets/mutationOverTimeWorker-jUeItsGM.js.map +1 -0
- package/standalone-bundle/dashboard-components.js +7007 -6953
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/dist/assets/mutationOverTimeWorker-DQGh08AS.js.map +0 -1
- package/src/web-components/visualization/data_visualization_statistical_analysis.mdx +0 -26
- package/standalone-bundle/assets/mutationOverTimeWorker-DAf2_NiP.js.map +0 -1
- /package/src/web-components/{MutationAnnotations.mdx → mutationAnnotations.mdx} +0 -0
- /package/src/web-components/{ResizeContainer.mdx → sizeOfComponents.mdx} +0 -0
package/custom-elements.json
CHANGED
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"readme": "",
|
|
4
4
|
"modules": [
|
|
5
|
-
{
|
|
6
|
-
"kind": "javascript-module",
|
|
7
|
-
"path": "src/web-components/MutationAnnotations.mdx",
|
|
8
|
-
"declarations": [],
|
|
9
|
-
"exports": []
|
|
10
|
-
},
|
|
11
5
|
{
|
|
12
6
|
"kind": "javascript-module",
|
|
13
7
|
"path": "src/web-components/PreactLitAdapter.tsx",
|
|
@@ -60,12 +54,6 @@
|
|
|
60
54
|
}
|
|
61
55
|
]
|
|
62
56
|
},
|
|
63
|
-
{
|
|
64
|
-
"kind": "javascript-module",
|
|
65
|
-
"path": "src/web-components/ResizeContainer.mdx",
|
|
66
|
-
"declarations": [],
|
|
67
|
-
"exports": []
|
|
68
|
-
},
|
|
69
57
|
{
|
|
70
58
|
"kind": "javascript-module",
|
|
71
59
|
"path": "src/web-components/errorHandling.mdx",
|
|
@@ -594,7 +582,7 @@
|
|
|
594
582
|
"type": {
|
|
595
583
|
"text": "Meta<Required<LineageFilterProps>>"
|
|
596
584
|
},
|
|
597
|
-
"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, }, }, ], }, 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', }, }, }, }"
|
|
585
|
+
"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', }, }, }, }"
|
|
598
586
|
},
|
|
599
587
|
{
|
|
600
588
|
"kind": "variable",
|
|
@@ -626,7 +614,7 @@
|
|
|
626
614
|
"type": {
|
|
627
615
|
"text": "StoryObj<Required<LineageFilterProps>>"
|
|
628
616
|
},
|
|
629
|
-
"default": "{ ...LineageFilter, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-lineage-filter'); const inputField = () => canvas.getByPlaceholderText('Enter a lineage'); const listenerMock = fn(); await step('Setup event listener mock', () => { canvasElement.addEventListener(gsEventNames.lineageFilterChanged, listenerMock); }); await step('wait until data is loaded', async () => { await waitFor(() => { return expect(inputField()).toBeEnabled(); }); }); await step('Enters an invalid lineage value', async () => { await userEvent.type(inputField(), 'notInList'); await expect(listenerMock).not.toHaveBeenCalled(); }); await step('Empty input', async () => { await userEvent.type(inputField(), '{backspace>9/}'); await userEvent.click(canvas.getByLabelText('toggle menu')); await waitFor(() => { return expect(listenerMock.mock.calls.at(-1)![0].detail).toStrictEqual({ pangoLineage: undefined, }); }); }); await step('Enter a valid lineage value', async () => { await userEvent.type(inputField(), 'B.1.1.7*'); await userEvent.click(canvas.getByRole('option', { name: 'B.1.1.7*' })); await waitFor(() => { return expect(listenerMock.mock.calls.at(-1)![0].detail).toStrictEqual({ pangoLineage: 'B.1.1.7*', }); }); }); }, args: { ...LineageFilter.args, value: '', }, }"
|
|
617
|
+
"default": "{ ...LineageFilter, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-lineage-filter'); const inputField = () => canvas.getByPlaceholderText('Enter a lineage'); const listenerMock = fn(); await step('Setup event listener mock', () => { canvasElement.addEventListener(gsEventNames.lineageFilterChanged, listenerMock); }); await step('wait until data is loaded', async () => { await waitFor(() => { return expect(inputField()).toBeEnabled(); }); }); await step('Enters an invalid lineage value', async () => { await userEvent.type(inputField(), 'notInList'); await expect(listenerMock).not.toHaveBeenCalled(); }); await step('Empty input', async () => { await userEvent.type(inputField(), '{backspace>9/}'); await userEvent.click(canvas.getByLabelText('toggle menu')); await waitFor(() => { return expect(listenerMock.mock.calls.at(-1)![0].detail).toStrictEqual({ pangoLineage: undefined, }); }); }); await step('Enter a valid lineage value', async () => { await userEvent.type(inputField(), 'B.1.1.7*'); await userEvent.click(canvas.getByRole('option', { name: 'B.1.1.7*(677146)' })); await waitFor(() => { return expect(listenerMock.mock.calls.at(-1)![0].detail).toStrictEqual({ pangoLineage: 'B.1.1.7*', }); }); }); }, args: { ...LineageFilter.args, value: '', }, }"
|
|
630
618
|
}
|
|
631
619
|
],
|
|
632
620
|
"exports": [
|
|
@@ -1737,6 +1725,12 @@
|
|
|
1737
1725
|
}
|
|
1738
1726
|
]
|
|
1739
1727
|
},
|
|
1728
|
+
{
|
|
1729
|
+
"kind": "javascript-module",
|
|
1730
|
+
"path": "src/web-components/mutationAnnotations.mdx",
|
|
1731
|
+
"declarations": [],
|
|
1732
|
+
"exports": []
|
|
1733
|
+
},
|
|
1740
1734
|
{
|
|
1741
1735
|
"kind": "javascript-module",
|
|
1742
1736
|
"path": "src/web-components/reference-genome-context.ts",
|
|
@@ -1759,7 +1753,25 @@
|
|
|
1759
1753
|
},
|
|
1760
1754
|
{
|
|
1761
1755
|
"kind": "javascript-module",
|
|
1762
|
-
"path": "src/web-components/
|
|
1756
|
+
"path": "src/web-components/sizeOfComponents.mdx",
|
|
1757
|
+
"declarations": [],
|
|
1758
|
+
"exports": []
|
|
1759
|
+
},
|
|
1760
|
+
{
|
|
1761
|
+
"kind": "javascript-module",
|
|
1762
|
+
"path": "src/web-components/tutorials/CreateYourFirstOwnDashboard.mdx",
|
|
1763
|
+
"declarations": [],
|
|
1764
|
+
"exports": []
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
"kind": "javascript-module",
|
|
1768
|
+
"path": "src/web-components/tutorials/UseTheComponentsWithPlainJavaScript.mdx",
|
|
1769
|
+
"declarations": [],
|
|
1770
|
+
"exports": []
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
"kind": "javascript-module",
|
|
1774
|
+
"path": "src/web-components/tutorials/UseTheComponentsWithReact.mdx",
|
|
1763
1775
|
"declarations": [],
|
|
1764
1776
|
"exports": []
|
|
1765
1777
|
},
|
|
@@ -4707,6 +4719,12 @@
|
|
|
4707
4719
|
}
|
|
4708
4720
|
]
|
|
4709
4721
|
},
|
|
4722
|
+
{
|
|
4723
|
+
"kind": "javascript-module",
|
|
4724
|
+
"path": "src/web-components/visualization/introduction.mdx",
|
|
4725
|
+
"declarations": [],
|
|
4726
|
+
"exports": []
|
|
4727
|
+
},
|
|
4710
4728
|
{
|
|
4711
4729
|
"kind": "javascript-module",
|
|
4712
4730
|
"path": "src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.spec-d.ts",
|