@genspectrum/dashboard-components 0.10.3 → 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/custom-elements.json +328 -0
- package/dist/assets/mutationOverTimeWorker-BjjkMGzd.js.map +1 -0
- package/dist/components.d.ts +178 -9
- package/dist/components.js +1164 -134
- package/dist/components.js.map +1 -1
- package/dist/{dateRangeOption-DjtcAEWq.js → dateRangeOption-Doo6WHKu.js} +3 -2
- package/dist/dateRangeOption-Doo6WHKu.js.map +1 -0
- package/dist/style.css +5 -1
- package/dist/util.d.ts +26 -9
- package/dist/util.js +1 -1
- package/package.json +9 -3
- package/src/preact/aggregatedData/aggregate.stories.tsx +1 -1
- 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/mutationsOverTime/mutations-over-time.stories.tsx +1 -1
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +1 -1
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +1 -1
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +1 -1
- package/src/preact/shared/stories/expectErrorMessage.ts +21 -0
- package/src/preact/textInput/text-input.stories.tsx +1 -1
- package/src/preact/useQuery.ts +9 -1
- package/src/styles/tailwind.css +1 -1
- package/src/types.ts +1 -0
- 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 +16187 -9391
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/dist/assets/mutationOverTimeWorker-CNg_ztNp.js.map +0 -1
- package/dist/dateRangeOption-DjtcAEWq.js.map +0 -1
- package/src/preact/shared/stories/expectInvalidAttributesErrorMessage.ts +0 -13
- package/standalone-bundle/assets/mutationOverTimeWorker-cIyshfj_.js.map +0 -1
|
@@ -18,7 +18,8 @@ const views = {
|
|
|
18
18
|
insertions: "insertions",
|
|
19
19
|
bar: "bar",
|
|
20
20
|
line: "line",
|
|
21
|
-
bubble: "bubble"
|
|
21
|
+
bubble: "bubble",
|
|
22
|
+
map: "map"
|
|
22
23
|
};
|
|
23
24
|
const mutationComparisonViewSchema = z.union([z.literal(views.table), z.literal(views.venn)]);
|
|
24
25
|
const toYYYYMMDD = (date) => {
|
|
@@ -102,4 +103,4 @@ export {
|
|
|
102
103
|
temporalGranularitySchema as t,
|
|
103
104
|
views as v
|
|
104
105
|
};
|
|
105
|
-
//# sourceMappingURL=dateRangeOption-
|
|
106
|
+
//# sourceMappingURL=dateRangeOption-Doo6WHKu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateRangeOption-Doo6WHKu.js","sources":["../src/types.ts","../src/preact/dateRangeSelector/dateConversion.ts","../src/preact/dateRangeSelector/dateRangeOption.ts"],"sourcesContent":["import z from 'zod';\n\nimport {\n type Deletion,\n type DeletionClass,\n type Insertion,\n type InsertionClass,\n type Substitution,\n type SubstitutionClass,\n} from './utils/mutations';\n\nexport const lapisFilterSchema = z.record(z.union([z.string(), z.number(), z.null(), z.boolean()]));\nexport type LapisFilter = z.infer<typeof lapisFilterSchema>;\n\nexport const namedLapisFilterSchema = z.object({\n lapisFilter: lapisFilterSchema,\n displayName: z.string(),\n});\nexport type NamedLapisFilter = z.infer<typeof namedLapisFilterSchema>;\n\nexport const temporalGranularitySchema = z.union([\n z.literal('day'),\n z.literal('week'),\n z.literal('month'),\n z.literal('year'),\n]);\nexport type TemporalGranularity = z.infer<typeof temporalGranularitySchema>;\n\nexport const sequenceTypeSchema = z.union([z.literal('nucleotide'), z.literal('amino acid')]);\nexport type SequenceType = z.infer<typeof sequenceTypeSchema>;\n\nexport type SubstitutionOrDeletion = 'substitution' | 'deletion';\n\nexport type MutationType = SubstitutionOrDeletion | 'insertion';\n\nexport type SubstitutionEntry<T extends Substitution = SubstitutionClass> = {\n type: 'substitution';\n mutation: T;\n count: number;\n proportion: number;\n};\n\nexport type DeletionEntry<T extends Deletion = DeletionClass> = {\n type: 'deletion';\n mutation: T;\n count: number;\n proportion: number;\n};\n\nexport type InsertionEntry<T extends Insertion = InsertionClass> = { type: 'insertion'; mutation: T; count: number };\n\nexport type SubstitutionOrDeletionEntry<\n S extends Substitution = SubstitutionClass,\n D extends Deletion = DeletionClass,\n> = SubstitutionEntry<S> | DeletionEntry<D>;\n\nexport type MutationEntry = SubstitutionEntry | DeletionEntry | InsertionEntry;\n\nexport const views = {\n table: 'table',\n venn: 'venn',\n grid: 'grid',\n insertions: 'insertions',\n bar: 'bar',\n line: 'line',\n bubble: 'bubble',\n map: 'map',\n} as const;\n\nexport const mutationComparisonViewSchema = z.union([z.literal(views.table), z.literal(views.venn)]);\nexport type MutationComparisonView = z.infer<typeof mutationComparisonViewSchema>;\n","export const toYYYYMMDD = (date: Date) => {\n const options: Intl.DateTimeFormatOptions = { year: 'numeric', month: '2-digit', day: '2-digit' };\n return date.toLocaleDateString('en-CA', options);\n};\n","import z from 'zod';\n\nimport { toYYYYMMDD } from './dateConversion';\n\n/**\n * A date range option that can be used in the `gs-date-range-selector` component.\n */\nexport const dateRangeOptionSchema = z.object({\n /** The label of the date range option that will be shown to the user */\n label: z.string(),\n /**\n * The start date of the date range in the format `YYYY-MM-DD`.\n * If not set, the date range selector will default to the `earliestDate` property.\n */\n dateFrom: z.string().date().optional(),\n /**\n * The end date of the date range in the format `YYYY-MM-DD`.\n * If not set, the date range selector will default to the current date.\n */\n dateTo: z.string().date().optional(),\n});\n\nexport type DateRangeOption = z.infer<typeof dateRangeOptionSchema>;\n\nexport type DateRangeSelectOption = string | { dateFrom: string; dateTo: string };\n\nexport class DateRangeOptionChangedEvent extends CustomEvent<DateRangeSelectOption> {\n constructor(detail: DateRangeSelectOption) {\n super('gs-date-range-option-changed', {\n detail,\n bubbles: true,\n composed: true,\n });\n }\n}\n\nconst today = new Date();\n\nconst twoWeeksAgo = new Date();\ntwoWeeksAgo.setDate(today.getDate() - 14);\n\nconst lastMonth = new Date(today);\nlastMonth.setMonth(today.getMonth() - 1);\n\nconst last2Months = new Date(today);\nlast2Months.setMonth(today.getMonth() - 2);\n\nconst last3Months = new Date(today);\nlast3Months.setMonth(today.getMonth() - 3);\n\nconst last6Months = new Date(today);\nlast6Months.setMonth(today.getMonth() - 6);\n\nconst lastYear = new Date(today);\nlastYear.setFullYear(today.getFullYear() - 1);\n\n/**\n * Presets for the `gs-date-range-selector` component that can be used as `dateRangeOptions`.\n */\nexport const dateRangeOptionPresets = {\n last2Weeks: {\n label: 'Last 2 weeks',\n dateFrom: toYYYYMMDD(twoWeeksAgo),\n },\n lastMonth: {\n label: 'Last month',\n dateFrom: toYYYYMMDD(lastMonth),\n },\n last2Months: {\n label: 'Last 2 months',\n dateFrom: toYYYYMMDD(last2Months),\n },\n last3Months: {\n label: 'Last 3 months',\n dateFrom: toYYYYMMDD(last3Months),\n },\n last6Months: {\n label: 'Last 6 months',\n dateFrom: toYYYYMMDD(last6Months),\n },\n lastYear: {\n label: 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ab:checked + .tab-content,
|
|
|
3142
3142
|
--tw-translate-y: -50%;
|
|
3143
3143
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
3144
3144
|
}
|
|
3145
|
+
.transform {
|
|
3146
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
3147
|
+
}
|
|
3145
3148
|
.cursor-pointer {
|
|
3146
3149
|
cursor: pointer;
|
|
3147
3150
|
}
|
|
@@ -3474,7 +3477,8 @@ input.tab:checked + .tab-content,
|
|
|
3474
3477
|
font-size: 2.25rem;
|
|
3475
3478
|
line-height: 2.5rem;
|
|
3476
3479
|
}
|
|
3477
|
-
}
|
|
3480
|
+
}
|
|
3481
|
+
.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{/*
|
|
3478
3482
|
/*rtl:begin:ignore*/left:0/*
|
|
3479
3483
|
/*rtl:end:ignore*/}/*
|
|
3480
3484
|
/*rtl:begin:ignore*/
|
package/dist/util.d.ts
CHANGED
|
@@ -134,6 +134,7 @@ export declare const views: {
|
|
|
134
134
|
readonly bar: "bar";
|
|
135
135
|
readonly line: "line";
|
|
136
136
|
readonly bubble: "bubble";
|
|
137
|
+
readonly map: "map";
|
|
137
138
|
};
|
|
138
139
|
|
|
139
140
|
export declare type YAxisMaxConfig = default_2.infer<typeof yAxisMaxConfigSchema>;
|
|
@@ -239,6 +240,22 @@ declare global {
|
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
|
|
243
|
+
declare global {
|
|
244
|
+
interface HTMLElementTagNameMap {
|
|
245
|
+
'gs-aggregate': AggregateComponent;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
declare global {
|
|
251
|
+
namespace JSX {
|
|
252
|
+
interface IntrinsicElements {
|
|
253
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
|
|
242
259
|
declare global {
|
|
243
260
|
interface HTMLElementTagNameMap {
|
|
244
261
|
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
@@ -257,7 +274,7 @@ declare global {
|
|
|
257
274
|
|
|
258
275
|
declare global {
|
|
259
276
|
interface HTMLElementTagNameMap {
|
|
260
|
-
'gs-
|
|
277
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
261
278
|
}
|
|
262
279
|
}
|
|
263
280
|
|
|
@@ -265,7 +282,7 @@ declare global {
|
|
|
265
282
|
declare global {
|
|
266
283
|
namespace JSX {
|
|
267
284
|
interface IntrinsicElements {
|
|
268
|
-
'gs-
|
|
285
|
+
'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
269
286
|
}
|
|
270
287
|
}
|
|
271
288
|
}
|
|
@@ -305,11 +322,10 @@ declare global {
|
|
|
305
322
|
|
|
306
323
|
declare global {
|
|
307
324
|
interface HTMLElementTagNameMap {
|
|
308
|
-
'gs-
|
|
325
|
+
'gs-location-filter': LocationFilterComponent;
|
|
309
326
|
}
|
|
310
327
|
interface HTMLElementEventMap {
|
|
311
|
-
'gs-
|
|
312
|
-
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
328
|
+
'gs-location-changed': CustomEvent<Record<string, string>>;
|
|
313
329
|
}
|
|
314
330
|
}
|
|
315
331
|
|
|
@@ -317,7 +333,7 @@ declare global {
|
|
|
317
333
|
declare global {
|
|
318
334
|
namespace JSX {
|
|
319
335
|
interface IntrinsicElements {
|
|
320
|
-
'gs-
|
|
336
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
321
337
|
}
|
|
322
338
|
}
|
|
323
339
|
}
|
|
@@ -325,10 +341,11 @@ declare global {
|
|
|
325
341
|
|
|
326
342
|
declare global {
|
|
327
343
|
interface HTMLElementTagNameMap {
|
|
328
|
-
'gs-
|
|
344
|
+
'gs-date-range-selector': DateRangeSelectorComponent;
|
|
329
345
|
}
|
|
330
346
|
interface HTMLElementEventMap {
|
|
331
|
-
'gs-
|
|
347
|
+
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
348
|
+
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
332
349
|
}
|
|
333
350
|
}
|
|
334
351
|
|
|
@@ -336,7 +353,7 @@ declare global {
|
|
|
336
353
|
declare global {
|
|
337
354
|
namespace JSX {
|
|
338
355
|
interface IntrinsicElements {
|
|
339
|
-
'gs-
|
|
356
|
+
'gs-date-range-selector': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
340
357
|
}
|
|
341
358
|
}
|
|
342
359
|
}
|
package/dist/util.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genspectrum/dashboard-components",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"description": "GenSpectrum web components for building dashboards",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -83,14 +83,16 @@
|
|
|
83
83
|
"@lit/context": "^1.1.1",
|
|
84
84
|
"@lit/reactive-element": "^2.0.4",
|
|
85
85
|
"@lit/task": "^1.0.0",
|
|
86
|
-
"chart.js": "^4.4.
|
|
86
|
+
"chart.js": "^4.4.6",
|
|
87
87
|
"chartjs-chart-error-bars": "^4.4.0",
|
|
88
88
|
"chartjs-chart-venn": "^4.3.0",
|
|
89
89
|
"dayjs": "^1.11.10",
|
|
90
90
|
"flatpickr": "^4.6.13",
|
|
91
91
|
"gridjs": "^6.2.0",
|
|
92
|
+
"leaflet": "^1.9.4",
|
|
92
93
|
"lit": "^3.1.3",
|
|
93
94
|
"preact": "^10.20.1",
|
|
95
|
+
"topojson-client": "^3.1.0",
|
|
94
96
|
"zod": "^3.23.0"
|
|
95
97
|
},
|
|
96
98
|
"devDependencies": {
|
|
@@ -112,7 +114,11 @@
|
|
|
112
114
|
"@storybook/web-components": "^8.0.9",
|
|
113
115
|
"@storybook/web-components-vite": "^8.0.9",
|
|
114
116
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
117
|
+
"@types/geojson": "^7946.0.15",
|
|
118
|
+
"@types/leaflet": "^1.9.15",
|
|
115
119
|
"@types/node": "^22.0.0",
|
|
120
|
+
"@types/topojson-client": "^3.1.5",
|
|
121
|
+
"@types/topojson-specification": "^1.0.5",
|
|
116
122
|
"@typescript-eslint/eslint-plugin": "^8.2.0",
|
|
117
123
|
"@typescript-eslint/parser": "^8.2.0",
|
|
118
124
|
"autoprefixer": "^10.4.19",
|
|
@@ -133,7 +139,7 @@
|
|
|
133
139
|
"storybook-addon-fetch-mock": "^2.0.0",
|
|
134
140
|
"tailwindcss": "^3.4.3",
|
|
135
141
|
"typescript": "~5.7.2",
|
|
136
|
-
"vite": "^
|
|
142
|
+
"vite": "^6.0.3",
|
|
137
143
|
"vite-plugin-dts": "^4.0.3",
|
|
138
144
|
"vitest": "^2.0.1"
|
|
139
145
|
}
|
|
@@ -5,7 +5,7 @@ import aggregatedData from './__mockData__/aggregated.json';
|
|
|
5
5
|
import { Aggregate, type AggregateProps } from './aggregate';
|
|
6
6
|
import { AGGREGATED_ENDPOINT, LAPIS_URL } from '../../constants';
|
|
7
7
|
import { LapisUrlContext } from '../LapisUrlContext';
|
|
8
|
-
import { expectInvalidAttributesErrorMessage } from '../shared/stories/
|
|
8
|
+
import { expectInvalidAttributesErrorMessage } from '../shared/stories/expectErrorMessage';
|
|
9
9
|
|
|
10
10
|
const meta: Meta<AggregateProps> = {
|
|
11
11
|
title: 'Visualization/Aggregate',
|
|
@@ -8,7 +8,7 @@ import { previewHandles } from '../../../.storybook/preview';
|
|
|
8
8
|
import { LAPIS_URL } from '../../constants';
|
|
9
9
|
import { LapisUrlContext } from '../LapisUrlContext';
|
|
10
10
|
import { dateRangeOptionPresets } from './dateRangeOption';
|
|
11
|
-
import { expectInvalidAttributesErrorMessage } from '../shared/stories/
|
|
11
|
+
import { expectInvalidAttributesErrorMessage } from '../shared/stories/expectErrorMessage';
|
|
12
12
|
|
|
13
13
|
const earliestDate = '1970-01-01';
|
|
14
14
|
|
|
@@ -5,7 +5,7 @@ import { previewHandles } from '../../../.storybook/preview';
|
|
|
5
5
|
import { AGGREGATED_ENDPOINT, LAPIS_URL } from '../../constants';
|
|
6
6
|
import aggregatedData from '../../preact/lineageFilter/__mockData__/aggregated.json';
|
|
7
7
|
import { LapisUrlContext } from '../LapisUrlContext';
|
|
8
|
-
import { expectInvalidAttributesErrorMessage } from '../shared/stories/
|
|
8
|
+
import { expectInvalidAttributesErrorMessage } from '../shared/stories/expectErrorMessage';
|
|
9
9
|
|
|
10
10
|
const meta: Meta = {
|
|
11
11
|
title: 'Input/LineageFilter',
|
|
@@ -5,7 +5,7 @@ import { LocationFilter, type LocationFilterProps } from './location-filter';
|
|
|
5
5
|
import { previewHandles } from '../../../.storybook/preview';
|
|
6
6
|
import { AGGREGATED_ENDPOINT, LAPIS_URL } from '../../constants';
|
|
7
7
|
import { LapisUrlContext } from '../LapisUrlContext';
|
|
8
|
-
import { expectInvalidAttributesErrorMessage } from '../shared/stories/
|
|
8
|
+
import { expectInvalidAttributesErrorMessage } from '../shared/stories/expectErrorMessage';
|
|
9
9
|
|
|
10
10
|
const meta: Meta<LocationFilterProps> = {
|
|
11
11
|
title: 'Input/LocationFilter',
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 1748,
|
|
5
|
+
"division": "Mecklenburg-Vorpommern"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"count": 10343,
|
|
9
|
+
"division": "Rheinland-Pfalz"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"count": 25459,
|
|
13
|
+
"division": "Saxony"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"count": 6198,
|
|
17
|
+
"division": "Niedersachsen"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"count": 3846,
|
|
21
|
+
"division": "Berlin"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"count": 7,
|
|
25
|
+
"division": "Germany"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"count": 3778,
|
|
29
|
+
"division": "Brandenburg"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"count": 1672,
|
|
33
|
+
"division": "Bremen"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"count": 4969,
|
|
37
|
+
"division": "Hesse"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"count": 3238,
|
|
41
|
+
"division": "Thuringia"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"count": 4747,
|
|
45
|
+
"division": "Saxony-Anhalt"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"count": 109800,
|
|
49
|
+
"division": null
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"count": 4911,
|
|
53
|
+
"division": "Saarland"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"count": 50650,
|
|
57
|
+
"division": "Baden-Wuerttemberg"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"count": 50102,
|
|
61
|
+
"division": "North Rhine Westphalia"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"count": 9832,
|
|
65
|
+
"division": "Schleswig-Holstein"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"count": 28546,
|
|
69
|
+
"division": "Bavaria"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"count": 9633,
|
|
73
|
+
"division": "Hamburg"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"info": {
|
|
77
|
+
"dataVersion": "1733676577",
|
|
78
|
+
"requestId": "7517dbd2-10ed-4a5a-8b2b-a6e08de55982",
|
|
79
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-12-09T16:14:08.190102574",
|
|
80
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report.",
|
|
81
|
+
"lapisVersion": "0.3.10"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": [
|
|
3
|
+
{
|
|
4
|
+
"count": 3,
|
|
5
|
+
"country": "Turkey"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"count": 966167,
|
|
9
|
+
"country": "United Kingdom"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"count": 1,
|
|
13
|
+
"country": "Netherlands"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"count": 138004,
|
|
17
|
+
"country": "Denmark"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"count": 2611,
|
|
21
|
+
"country": "Brazil"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"count": 4,
|
|
25
|
+
"country": "Côte d'Ivoire"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"count": 4,
|
|
29
|
+
"country": "Finland"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"count": 204,
|
|
33
|
+
"country": "Djibouti"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"count": 138,
|
|
37
|
+
"country": "China"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"count": 5904,
|
|
41
|
+
"country": "Iceland"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"count": 8,
|
|
45
|
+
"country": "Ireland"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"count": 180,
|
|
49
|
+
"country": "Malaysia"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"count": 855,
|
|
53
|
+
"country": "Kenya"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"count": 868,
|
|
57
|
+
"country": "South Africa"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"count": 329479,
|
|
61
|
+
"country": "Germany"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"count": 5,
|
|
65
|
+
"country": "Spain"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"count": 664,
|
|
69
|
+
"country": "Liechtenstein"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"count": 2,
|
|
73
|
+
"country": "Chile"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"count": 2,
|
|
77
|
+
"country": "Mali"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"count": 31,
|
|
81
|
+
"country": "South Korea"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"count": 13540,
|
|
85
|
+
"country": "Slovakia"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"count": 1,
|
|
89
|
+
"country": "Norway"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"count": 4949,
|
|
93
|
+
"country": "New Zealand"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"count": 354,
|
|
97
|
+
"country": "Laos"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"count": 5,
|
|
101
|
+
"country": "Saudi Arabia"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"count": 566,
|
|
105
|
+
"country": "Vietnam"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"count": 37,
|
|
109
|
+
"country": "Australia"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"count": 25,
|
|
113
|
+
"country": "Cameroon"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"count": 54,
|
|
117
|
+
"country": "Gambia"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"count": 1310,
|
|
121
|
+
"country": "Argentina"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"count": 548918,
|
|
125
|
+
"country": "USA"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"count": 4562,
|
|
129
|
+
"country": "Mexico"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"count": 28636,
|
|
133
|
+
"country": "Switzerland"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"count": 9,
|
|
137
|
+
"country": "Palau"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"count": 6,
|
|
141
|
+
"country": "Taiwan"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"count": 181,
|
|
145
|
+
"country": "Iraq"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"count": 7547,
|
|
149
|
+
"country": "France"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"count": 4536,
|
|
153
|
+
"country": "Japan"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"count": 1640,
|
|
157
|
+
"country": "Thailand"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"count": 59,
|
|
161
|
+
"country": "Colombia"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"count": 243,
|
|
165
|
+
"country": "India"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"count": 132,
|
|
169
|
+
"country": "Italy"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"count": 92,
|
|
173
|
+
"country": "Mongolia"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"count": 2,
|
|
177
|
+
"country": "Libya"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"count": 216,
|
|
181
|
+
"country": "Peru"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"count": 4,
|
|
185
|
+
"country": "Singapore"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"count": 25,
|
|
189
|
+
"country": "Myanmar"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"count": 395,
|
|
193
|
+
"country": "Bangladesh"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"count": 37,
|
|
197
|
+
"country": "Malawi"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"count": 3669,
|
|
201
|
+
"country": "Bahrain"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"count": 171,
|
|
205
|
+
"country": "Haiti"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"count": 40,
|
|
209
|
+
"country": "Palestine"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"count": 499,
|
|
213
|
+
"country": "Hong Kong"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"count": 19,
|
|
217
|
+
"country": "Austria"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"count": 9,
|
|
221
|
+
"country": "Jamaica"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"count": 83,
|
|
225
|
+
"country": "Russia"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"count": 197,
|
|
229
|
+
"country": "Seychelles"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"count": 20,
|
|
233
|
+
"country": "Nigeria"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"count": 6,
|
|
237
|
+
"country": "Canada"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"count": 208,
|
|
241
|
+
"country": "Kazakhstan"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"count": 34,
|
|
245
|
+
"country": "Benin"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"count": 113,
|
|
249
|
+
"country": "Pakistan"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"info": {
|
|
253
|
+
"dataVersion": "1733676577",
|
|
254
|
+
"requestId": "91268a09-b192-42da-b7c6-bcfc72bba982",
|
|
255
|
+
"requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2024-12-09T15:45:35.460317204",
|
|
256
|
+
"reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report.",
|
|
257
|
+
"lapisVersion": "0.3.10"
|
|
258
|
+
}
|
|
259
|
+
}
|