@genspectrum/dashboard-components 0.7.1 → 0.8.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 +1 -24
- package/dist/assets/mutationOverTimeWorker-BOCXtKzd.js.map +1 -1
- package/dist/dashboard-components.js +28 -27
- package/dist/dashboard-components.js.map +1 -1
- package/dist/genspectrum-components.d.ts +39 -50
- package/package.json +2 -2
- package/src/operator/SlidingOperator.ts +3 -0
- package/src/preact/components/error-display.tsx +1 -0
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +5 -34
- package/src/preact/mutationFilter/mutation-filter.tsx +0 -13
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +10 -4
- package/src/preact/prevalenceOverTime/__mockData__/numeratorFilterNoData.json +11 -0
- package/src/preact/prevalenceOverTime/prevalence-over-time-bar-chart.tsx +13 -6
- package/src/preact/prevalenceOverTime/prevalence-over-time-bubble-chart.tsx +13 -6
- package/src/preact/prevalenceOverTime/prevalence-over-time-line-chart.tsx +13 -6
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +74 -11
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +1 -1
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +12 -5
- package/src/preact/webWorkers/useWebWorker.ts +4 -8
- package/src/web-components/input/gs-mutation-filter.stories.ts +1 -27
- package/src/web-components/input/gs-mutation-filter.tsx +0 -11
- package/standalone-bundle/dashboard-components.js +2384 -2383
- package/standalone-bundle/dashboard-components.js.map +1 -1
package/custom-elements.json
CHANGED
|
@@ -887,7 +887,7 @@
|
|
|
887
887
|
"type": {
|
|
888
888
|
"text": "Meta<MutationFilterProps>"
|
|
889
889
|
},
|
|
890
|
-
"default": "{ title: 'Input/Mutation filter', component: 'gs-mutation-filter', parameters: withComponentDocs({ actions: { handles: ['gs-mutation-filter-changed',
|
|
890
|
+
"default": "{ title: 'Input/Mutation filter', component: 'gs-mutation-filter', parameters: withComponentDocs({ actions: { handles: ['gs-mutation-filter-changed', ...previewHandles], }, fetchMock: {}, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { initialValue: { control: { type: 'object', }, }, width: { control: 'text' }, }, tags: ['autodocs'], }"
|
|
891
891
|
},
|
|
892
892
|
{
|
|
893
893
|
"kind": "variable",
|
|
@@ -905,14 +905,6 @@
|
|
|
905
905
|
},
|
|
906
906
|
"default": "{ ...Template, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-filter'); const inputField = () => canvas.getByPlaceholderText('Enter a mutation', { exact: false }); const submitButton = () => canvas.getByRole('button', { name: '+' }); const listenerMock = fn(); await step('Setup event listener mock', async () => { canvasElement.addEventListener('gs-mutation-filter-changed', 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'); await waitFor(() => submitButton().click()); await waitFor(() => expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { nucleotideMutations: ['A123T'], aminoAcidMutations: [], nucleotideInsertions: [], aminoAcidInsertions: [], }, }), ), ); }); }, }"
|
|
907
907
|
},
|
|
908
|
-
{
|
|
909
|
-
"kind": "variable",
|
|
910
|
-
"name": "FiresFilterOnBlurEvent",
|
|
911
|
-
"type": {
|
|
912
|
-
"text": "StoryObj<MutationFilterProps>"
|
|
913
|
-
},
|
|
914
|
-
"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', async () => { canvasElement.addEventListener('gs-mutation-filter-on-blur', listenerMock); }); await step('wait until data is loaded', async () => { await waitFor(() => { return expect(inputField()).toBeEnabled(); }); }); await step('Move outside of input', async () => { await userEvent.type(inputField(), 'A123T'); await userEvent.tab(); await expect(listenerMock).toHaveBeenCalled(); }); }, }"
|
|
915
|
-
},
|
|
916
908
|
{
|
|
917
909
|
"kind": "variable",
|
|
918
910
|
"name": "MultiSegmentedReferenceGenomes",
|
|
@@ -947,14 +939,6 @@
|
|
|
947
939
|
"module": "src/web-components/input/gs-mutation-filter.stories.ts"
|
|
948
940
|
}
|
|
949
941
|
},
|
|
950
|
-
{
|
|
951
|
-
"kind": "js",
|
|
952
|
-
"name": "FiresFilterOnBlurEvent",
|
|
953
|
-
"declaration": {
|
|
954
|
-
"name": "FiresFilterOnBlurEvent",
|
|
955
|
-
"module": "src/web-components/input/gs-mutation-filter.stories.ts"
|
|
956
|
-
}
|
|
957
|
-
},
|
|
958
942
|
{
|
|
959
943
|
"kind": "js",
|
|
960
944
|
"name": "MultiSegmentedReferenceGenomes",
|
|
@@ -1002,13 +986,6 @@
|
|
|
1002
986
|
},
|
|
1003
987
|
"description": "Fired when: - The user has submitted a valid mutation or insertion - The user has removed a mutation or insertion",
|
|
1004
988
|
"name": "gs-mutation-filter-changed"
|
|
1005
|
-
},
|
|
1006
|
-
{
|
|
1007
|
-
"type": {
|
|
1008
|
-
"text": "CustomEvent<{nucleotideMutations: string[],aminoAcidMutations: string[],nucleotideInsertions: string[],aminoAcidInsertions: string[]}>"
|
|
1009
|
-
},
|
|
1010
|
-
"description": "Fired when: - the mutation filter has lost focus Contains the selected mutations in the format",
|
|
1011
|
-
"name": "gs-mutation-filter-on-blur"
|
|
1012
989
|
}
|
|
1013
990
|
],
|
|
1014
991
|
"attributes": [
|