@genspectrum/dashboard-components 0.10.2 → 0.10.4
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/README.md +19 -19
- package/custom-elements.json +377 -33
- package/dist/assets/mutationOverTimeWorker-BjjkMGzd.js.map +1 -0
- package/dist/components.d.ts +217 -59
- package/dist/components.js +1365 -177
- package/dist/components.js.map +1 -1
- package/dist/{dateRangeOption-du8H7LWu.js → dateRangeOption-Doo6WHKu.js} +17 -3
- package/dist/dateRangeOption-Doo6WHKu.js.map +1 -0
- package/dist/style.css +16 -6
- package/dist/util.d.ts +107 -41
- package/dist/util.js +1 -1
- package/package.json +10 -4
- package/src/preact/aggregatedData/aggregate.stories.tsx +14 -0
- package/src/preact/aggregatedData/aggregate.tsx +17 -15
- package/src/preact/components/error-boundary.stories.tsx +24 -3
- package/src/preact/components/error-boundary.tsx +3 -4
- package/src/preact/components/error-display.tsx +38 -17
- package/src/preact/components/tabs.tsx +2 -2
- package/src/preact/dateRangeSelector/date-range-selector.stories.tsx +1 -1
- package/src/preact/lineageFilter/lineage-filter.stories.tsx +1 -1
- package/src/preact/locationFilter/location-filter.stories.tsx +1 -1
- package/src/preact/map/__mockData__/aggregatedGermany.json +83 -0
- package/src/preact/map/__mockData__/aggregatedWorld.json +259 -0
- package/src/preact/map/__mockData__/germanyMap.json +9083 -0
- package/src/preact/map/__mockData__/howToGenerateWorldMap.md +9 -0
- package/src/preact/map/__mockData__/worldAtlas.json +497127 -0
- package/src/preact/map/leafletStyleModifications.css +3 -0
- package/src/preact/map/sequences-by-location-map.tsx +202 -0
- package/src/preact/map/sequences-by-location-table.tsx +18 -0
- package/src/preact/map/sequences-by-location.stories.tsx +144 -0
- package/src/preact/map/sequences-by-location.tsx +151 -0
- package/src/preact/map/useGeoJsonMap.tsx +62 -0
- package/src/preact/mutationComparison/mutation-comparison.tsx +1 -1
- package/src/preact/mutationFilter/mutation-filter.tsx +26 -13
- package/src/preact/mutations/mutations.tsx +16 -12
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +14 -0
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +18 -14
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +14 -0
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +22 -14
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +14 -0
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +28 -19
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +14 -0
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +18 -15
- package/src/preact/shared/charts/confideceInterval.ts +10 -8
- package/src/preact/shared/charts/getYAxisMax.ts +10 -5
- package/src/preact/shared/stories/expectErrorMessage.ts +21 -0
- package/src/preact/statistic/statistics.tsx +10 -8
- package/src/preact/textInput/text-input.stories.tsx +14 -0
- package/src/preact/textInput/text-input.tsx +16 -11
- package/src/preact/useQuery.ts +9 -1
- package/src/query/queryAggregateData.ts +2 -1
- package/src/styles/tailwind.css +1 -1
- package/src/types.ts +13 -1
- package/src/utilEntrypoint.ts +7 -0
- package/src/web-components/app.stories.ts +17 -2
- package/src/web-components/app.ts +17 -5
- package/src/web-components/input/gs-mutation-filter.stories.ts +2 -0
- package/src/web-components/input/gs-text-input.tsx +2 -2
- package/src/web-components/introduction.mdx +4 -4
- package/src/web-components/visualization/data_visualization_statistical_analysis.mdx +3 -3
- package/src/web-components/visualization/gs-mutations-over-time.tsx +1 -3
- package/src/web-components/visualization/gs-mutations.tsx +1 -3
- package/src/web-components/visualization/gs-number-sequences-over-time.tsx +1 -3
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +3 -6
- package/src/web-components/visualization/gs-relative-growth-advantage.tsx +1 -5
- package/src/web-components/visualization/gs-sequences-by-location.stories.ts +234 -0
- package/src/web-components/visualization/gs-sequences-by-location.tsx +253 -0
- package/src/web-components/visualization/index.ts +1 -0
- package/standalone-bundle/assets/mutationOverTimeWorker-DoUBht2e.js.map +1 -0
- package/standalone-bundle/dashboard-components.js +16223 -9292
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/dist/assets/mutationOverTimeWorker-Di6yP1e6.js.map +0 -1
- package/dist/dateRangeOption-du8H7LWu.js.map +0 -1
- package/src/preact/shared/stories/expectInvalidAttributesErrorMessage.ts +0 -13
- package/standalone-bundle/assets/mutationOverTimeWorker-cIyshfj_.js.map +0 -1
package/README.md
CHANGED
|
@@ -44,19 +44,19 @@ We use [Lit](https://lit.dev/) to create web components.
|
|
|
44
44
|
|
|
45
45
|
We have split the package into two parts:
|
|
46
46
|
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
47
|
+
- The components, which are web components that can be used in the browser.
|
|
48
|
+
- They can be imported with `import '@genspectrum/dashboard-components/components';`
|
|
49
|
+
- utility functions, which can also be used in a node environment.
|
|
50
|
+
- They can be imported with `import '@genspectrum/dashboard-components/util';`
|
|
51
51
|
|
|
52
52
|
We primarily provide two kinds of components:
|
|
53
53
|
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
- **Visualization components** (charts, tables, etc.)
|
|
55
|
+
- Those components fetch data from the LAPIS instance and visualize it.
|
|
56
|
+
- **Input components** that let you specify sequence filters for the LAPIS requests.
|
|
57
|
+
- Input changes will fire events that can be listened to by the visualization components.
|
|
58
|
+
It is the responsibility of the dashbaord maintainer to listen to those events
|
|
59
|
+
and to wire the data correctly into the visualization components.
|
|
60
60
|
|
|
61
61
|
## Local Development
|
|
62
62
|
|
|
@@ -125,15 +125,15 @@ This assumes that the Storybooks are running.
|
|
|
125
125
|
|
|
126
126
|
We follow this testing concept:
|
|
127
127
|
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
128
|
+
- Domain logic is tested with unit tests. Thus, that code should be kept separate from the components.
|
|
129
|
+
- Detailed tests of the components are done with interaction tests in the Preact Storybook.
|
|
130
|
+
- The Lit Storybook only contains tests for the most important functionality to ensure that the web component build
|
|
131
|
+
works.
|
|
132
|
+
- We use Playwright for
|
|
133
|
+
- snapshot tests of the visualization components:
|
|
134
|
+
- Screenshots of charts and tables that serve as visual regression.
|
|
135
|
+
- Snapshots of the CSV data that the visualization components offer as download.
|
|
136
|
+
- testing functionality of components that cannot be tested within Storybook due to technical limitations.
|
|
137
137
|
|
|
138
138
|
#### Mocking
|
|
139
139
|
|