@genspectrum/dashboard-components 0.1.5 → 0.2.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 +1013 -931
- package/dist/dashboard-components.js +350 -171
- package/dist/dashboard-components.js.map +1 -1
- package/dist/genspectrum-components.d.ts +48 -57
- package/dist/style.css +74 -23
- package/package.json +2 -2
- package/src/preact/aggregatedData/aggregate.tsx +28 -28
- package/src/preact/components/error-boundary.stories.tsx +62 -0
- package/src/preact/components/error-boundary.tsx +31 -0
- package/src/preact/components/error-display.stories.tsx +24 -3
- package/src/preact/components/error-display.tsx +14 -1
- package/src/preact/components/loading-display.stories.tsx +6 -6
- package/src/preact/components/loading-display.tsx +1 -1
- package/src/preact/components/no-data-display.tsx +5 -1
- package/src/preact/dateRangeSelector/date-range-selector.stories.tsx +17 -0
- package/src/preact/dateRangeSelector/date-range-selector.tsx +33 -5
- package/src/preact/locationFilter/location-filter.stories.tsx +23 -6
- package/src/preact/locationFilter/location-filter.tsx +29 -18
- package/src/preact/mutationComparison/mutation-comparison.tsx +29 -25
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +17 -2
- package/src/preact/mutationFilter/mutation-filter.tsx +25 -7
- package/src/preact/mutations/mutations.tsx +23 -23
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +44 -28
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +43 -31
- package/src/preact/textInput/text-input.tsx +26 -3
- package/src/web-components/app.stories.ts +1 -2
- package/src/web-components/app.ts +4 -2
- package/src/web-components/index.ts +1 -1
- package/src/web-components/input/{date-range-selector-component.stories.ts → gs-date-range-selector.stories.ts} +19 -2
- package/src/web-components/input/{date-range-selector-component.tsx → gs-date-range-selector.tsx} +12 -0
- package/src/web-components/input/{location-filter-component.stories.ts → gs-location-filter.stories.ts} +29 -4
- package/src/web-components/input/{location-filter-component.tsx → gs-location-filter.tsx} +12 -1
- package/src/web-components/input/{mutation-filter-component.stories.ts → gs-mutation-filter.stories.ts} +20 -4
- package/src/web-components/input/{mutation-filter-component.tsx → gs-mutation-filter.tsx} +36 -5
- package/src/web-components/input/{text-input-component.stories.ts → gs-text-input.stories.ts} +31 -3
- package/src/web-components/input/{text-input-component.tsx → gs-text-input.tsx} +12 -0
- package/src/web-components/input/index.ts +4 -4
- package/src/web-components/visualization/data_visualization_statistical_analysis.mdx +26 -0
- package/src/web-components/{display/aggregate-component.stories.ts → visualization/gs-aggregate.stories.ts} +5 -6
- package/src/web-components/{display/aggregate-component.tsx → visualization/gs-aggregate.tsx} +1 -1
- package/src/web-components/{display/mutation-comparison-component.stories.ts → visualization/gs-mutation-comparison.stories.ts} +8 -9
- package/src/web-components/{display/mutation-comparison-component.tsx → visualization/gs-mutation-comparison.tsx} +1 -1
- package/src/web-components/{display/mutations-component.stories.ts → visualization/gs-mutations.stories.ts} +6 -7
- package/src/web-components/{display/mutations-component.tsx → visualization/gs-mutations.tsx} +2 -2
- package/src/web-components/{display/prevalence-over-time-component.stories.ts → visualization/gs-prevalence-over-time.stories.ts} +1 -2
- package/src/web-components/{display/prevalence-over-time-component.tsx → visualization/gs-prevalence-over-time.tsx} +3 -1
- package/src/web-components/{display/relative-growth-advantage-component.stories.ts → visualization/gs-relative-growth-advantage.stories.ts} +1 -2
- package/src/web-components/visualization/index.ts +5 -0
- package/src/web-components/display/index.ts +0 -5
- /package/src/web-components/{display/relative-growth-advantage-component.tsx → visualization/gs-relative-growth-advantage.tsx} +0 -0
package/custom-elements.json
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"type": {
|
|
65
65
|
"text": "Meta"
|
|
66
66
|
},
|
|
67
|
-
"default": "{ title: 'Wrapper/App', component: 'gs-app', parameters: withComponentDocs({ fetchMock: {}, componentDocs: {
|
|
67
|
+
"default": "{ title: 'Wrapper/App', component: 'gs-app', parameters: withComponentDocs({ fetchMock: {}, componentDocs: { opensShadowDom: false, expectsChildren: true, codeExample, }, }), decorators: [withActions], tags: ['autodocs'], }"
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"kind": "variable",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"type": {
|
|
89
89
|
"text": "StoryObj<{ lapis: string }>"
|
|
90
90
|
},
|
|
91
|
-
"default": "{ ...Template, args: { lapis: 'definitely-not-a-valid-url', }, play: async ({ canvasElement }) => { const canvas = within(canvasElement); await waitFor(() => { expect(canvas.getByText('Error')).toBeVisible(); }); }, }"
|
|
91
|
+
"default": "{ ...Template, args: { lapis: 'definitely-not-a-valid-url', }, play: async ({ canvasElement }) => { const canvas = within(canvasElement); await waitFor(() => { expect(canvas.getByText('Error', { exact: false })).toBeVisible(); }); }, }"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
"kind": "class",
|
|
@@ -223,23 +223,54 @@
|
|
|
223
223
|
},
|
|
224
224
|
{
|
|
225
225
|
"kind": "javascript-module",
|
|
226
|
-
"path": "src/web-components/
|
|
226
|
+
"path": "src/web-components/index.ts",
|
|
227
|
+
"declarations": [],
|
|
228
|
+
"exports": [
|
|
229
|
+
{
|
|
230
|
+
"kind": "js",
|
|
231
|
+
"name": "App",
|
|
232
|
+
"declaration": {
|
|
233
|
+
"name": "App",
|
|
234
|
+
"module": "./app.js"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"kind": "js",
|
|
239
|
+
"name": "*",
|
|
240
|
+
"declaration": {
|
|
241
|
+
"name": "*",
|
|
242
|
+
"package": "./visualization"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"kind": "js",
|
|
247
|
+
"name": "*",
|
|
248
|
+
"declaration": {
|
|
249
|
+
"name": "*",
|
|
250
|
+
"package": "./input"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"kind": "javascript-module",
|
|
257
|
+
"path": "src/web-components/input/gs-date-range-selector.stories.ts",
|
|
227
258
|
"declarations": [
|
|
228
259
|
{
|
|
229
260
|
"kind": "variable",
|
|
230
261
|
"name": "meta",
|
|
231
262
|
"type": {
|
|
232
|
-
"text": "Meta<
|
|
263
|
+
"text": "Meta<DateRangeSelectorProps<'CustomDateRange'>>"
|
|
233
264
|
},
|
|
234
|
-
"default": "{ title: '
|
|
265
|
+
"default": "{ title: 'Input/DateRangeSelector', component: 'gs-date-range-selector', parameters: withComponentDocs({ actions: { handles: ['gs-date-range-changed'], }, fetchMock: {}, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { initialValue: { control: { type: 'select', }, options: [ PRESET_VALUE_CUSTOM, PRESET_VALUE_ALL_TIMES, PRESET_VALUE_LAST_2_WEEKS, PRESET_VALUE_LAST_MONTH, PRESET_VALUE_LAST_2_MONTHS, PRESET_VALUE_LAST_3_MONTHS, PRESET_VALUE_LAST_6_MONTHS, 'CustomDateRange', ], }, customSelectOptions: { control: { type: 'object', }, }, earliestDate: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, }, args: { customSelectOptions: [{ label: 'CustomDateRange', dateFrom: '2021-01-01', dateTo: '2021-12-31' }], earliestDate: '1970-01-01', initialValue: PRESET_VALUE_LAST_6_MONTHS, width: '100%', }, decorators: [withActions], tags: ['autodocs'], }"
|
|
235
266
|
},
|
|
236
267
|
{
|
|
237
268
|
"kind": "variable",
|
|
238
|
-
"name": "
|
|
269
|
+
"name": "DateRangeSelectorStory",
|
|
239
270
|
"type": {
|
|
240
|
-
"text": "StoryObj<
|
|
271
|
+
"text": "StoryObj<DateRangeSelectorProps<'CustomDateRange'>>"
|
|
241
272
|
},
|
|
242
|
-
"default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-
|
|
273
|
+
"default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-screen-lg\"> <gs-date-range-selector .customSelectOptions=${args.customSelectOptions} .earliestDate=${args.earliestDate} .initialValue=${args.initialValue} .width=${args.width} ></gs-date-range-selector> </div> </gs-app>`, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-date-range-selector'); const dateTo = () => canvas.getByPlaceholderText('Date to'); await step('Expect last 6 months to be selected', async () => { await expect(canvas.getByRole('combobox')).toHaveValue('last6Months'); await waitFor(() => { expect(dateTo()).toHaveValue(toYYYYMMDD(new Date())); }); }); }, }"
|
|
243
274
|
}
|
|
244
275
|
],
|
|
245
276
|
"exports": [
|
|
@@ -248,227 +279,186 @@
|
|
|
248
279
|
"name": "default",
|
|
249
280
|
"declaration": {
|
|
250
281
|
"name": "meta",
|
|
251
|
-
"module": "src/web-components/
|
|
282
|
+
"module": "src/web-components/input/gs-date-range-selector.stories.ts"
|
|
252
283
|
}
|
|
253
284
|
},
|
|
254
285
|
{
|
|
255
286
|
"kind": "js",
|
|
256
|
-
"name": "
|
|
287
|
+
"name": "DateRangeSelectorStory",
|
|
257
288
|
"declaration": {
|
|
258
|
-
"name": "
|
|
259
|
-
"module": "src/web-components/
|
|
289
|
+
"name": "DateRangeSelectorStory",
|
|
290
|
+
"module": "src/web-components/input/gs-date-range-selector.stories.ts"
|
|
260
291
|
}
|
|
261
292
|
}
|
|
262
293
|
]
|
|
263
294
|
},
|
|
264
295
|
{
|
|
265
296
|
"kind": "javascript-module",
|
|
266
|
-
"path": "src/web-components/
|
|
297
|
+
"path": "src/web-components/input/gs-date-range-selector.tsx",
|
|
267
298
|
"declarations": [
|
|
268
299
|
{
|
|
269
300
|
"kind": "class",
|
|
270
|
-
"description": "## Context\
|
|
271
|
-
"name": "
|
|
301
|
+
"description": "## Context\nThis component is a group of input fields designed to specify a date range. It consists of 3 fields:\n\n- a select field to choose a predefined date range,\n- an input field with an attached date picker for the start date,\n- an input field with an attached date picker for the end date.\n\nSetting a value in the select field will overwrite the previous values of the start and end date.\nSetting a value in either of the date pickers will set the select field to \"custom\",\nwhich represents an arbitrary date range.",
|
|
302
|
+
"name": "DateRangeSelectorComponent",
|
|
272
303
|
"members": [
|
|
273
304
|
{
|
|
274
305
|
"kind": "field",
|
|
275
|
-
"name": "
|
|
306
|
+
"name": "customSelectOptions",
|
|
276
307
|
"type": {
|
|
277
|
-
"text": "string[]"
|
|
308
|
+
"text": "{ label: string; dateFrom: string; dateTo: string }[]"
|
|
278
309
|
},
|
|
279
310
|
"default": "[]",
|
|
280
|
-
"description": "
|
|
281
|
-
"attribute": "
|
|
311
|
+
"description": "An array of custom options that the select field should provide,\nin addition to the predefined options.\nThe `label` will be shown to the user, and it will be available as `initialValue`.\nThe dates must be in the format `YYYY-MM-DD`.",
|
|
312
|
+
"attribute": "customSelectOptions"
|
|
282
313
|
},
|
|
283
314
|
{
|
|
284
315
|
"kind": "field",
|
|
285
|
-
"name": "
|
|
316
|
+
"name": "earliestDate",
|
|
286
317
|
"type": {
|
|
287
|
-
"text": "
|
|
318
|
+
"text": "string | undefined"
|
|
288
319
|
},
|
|
289
|
-
"default": "
|
|
290
|
-
"description": "The
|
|
291
|
-
"attribute": "
|
|
320
|
+
"default": "'1900-01-01'",
|
|
321
|
+
"description": "The `dateFrom` value to use in the `allTimes` preset in the format `YYYY-MM-DD`.",
|
|
322
|
+
"attribute": "earliestDate"
|
|
292
323
|
},
|
|
293
324
|
{
|
|
294
325
|
"kind": "field",
|
|
295
|
-
"name": "
|
|
326
|
+
"name": "initialValue",
|
|
296
327
|
"type": {
|
|
297
|
-
"text": "
|
|
328
|
+
"text": "'custom'\n | 'allTimes'\n | 'last2Weeks'\n | 'lastMonth'\n | 'last2Months'\n | 'last3Months'\n | 'last6Months'\n | string\n | undefined"
|
|
298
329
|
},
|
|
299
|
-
"default": "
|
|
300
|
-
"description": "The
|
|
301
|
-
"attribute": "
|
|
330
|
+
"default": "'last6Months'",
|
|
331
|
+
"description": "The initial value to use for this date range selector.\nMust be a valid label from the preset labels or a `label` given in the `customSelectOptions`.\n\nIf the value is invalid, the component will default to `'last6Months'`.",
|
|
332
|
+
"attribute": "initialValue"
|
|
302
333
|
},
|
|
303
334
|
{
|
|
304
335
|
"kind": "field",
|
|
305
|
-
"name": "
|
|
336
|
+
"name": "width",
|
|
306
337
|
"type": {
|
|
307
|
-
"text": "
|
|
338
|
+
"text": "string | undefined"
|
|
308
339
|
},
|
|
309
340
|
"default": "undefined",
|
|
310
|
-
"description": "The
|
|
311
|
-
"attribute": "
|
|
312
|
-
}
|
|
341
|
+
"description": "The width of the component.\n\nIf not set, the component will take the full width of its container.\n\nThe width should be a string with a unit in css style, e.g. '100%', '500px' or '50vw'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
342
|
+
"attribute": "width"
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
"events": [
|
|
313
346
|
{
|
|
314
|
-
"kind": "field",
|
|
315
|
-
"name": "headline",
|
|
316
347
|
"type": {
|
|
317
|
-
"text": "string
|
|
348
|
+
"text": "CustomEvent<{ dateFrom: string; dateTo: string; }>"
|
|
318
349
|
},
|
|
319
|
-
"
|
|
320
|
-
"
|
|
321
|
-
"attribute": "headline"
|
|
350
|
+
"description": "Fired when: - The select field is changed, - A date is selected in either of the date pickers, - A date was typed into either of the date input fields, and the input field loses focus (\"on blur\"). Contains the dates in the format `YYYY-MM-DD`.",
|
|
351
|
+
"name": "gs-date-range-changed"
|
|
322
352
|
}
|
|
323
353
|
],
|
|
324
354
|
"attributes": [
|
|
325
355
|
{
|
|
326
|
-
"name": "
|
|
356
|
+
"name": "customSelectOptions",
|
|
327
357
|
"type": {
|
|
328
|
-
"text": "string[]"
|
|
358
|
+
"text": "{ label: string; dateFrom: string; dateTo: string }[]"
|
|
329
359
|
},
|
|
330
360
|
"default": "[]",
|
|
331
|
-
"description": "
|
|
332
|
-
"fieldName": "
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
"name": "views",
|
|
336
|
-
"type": {
|
|
337
|
-
"text": "View[]"
|
|
338
|
-
},
|
|
339
|
-
"default": "['table']",
|
|
340
|
-
"description": "The views are used to display the aggregated data.\nIn the table view, the data is presented in a table format where each field is a column,\nalong with the aggregated value and its proportion.\nThe proportion represents the ratio of the aggregated value to the total count of the data\n(considering the applied filter).",
|
|
341
|
-
"fieldName": "views"
|
|
361
|
+
"description": "An array of custom options that the select field should provide,\nin addition to the predefined options.\nThe `label` will be shown to the user, and it will be available as `initialValue`.\nThe dates must be in the format `YYYY-MM-DD`.",
|
|
362
|
+
"fieldName": "customSelectOptions"
|
|
342
363
|
},
|
|
343
364
|
{
|
|
344
|
-
"name": "
|
|
365
|
+
"name": "earliestDate",
|
|
345
366
|
"type": {
|
|
346
|
-
"text": "
|
|
367
|
+
"text": "string | undefined"
|
|
347
368
|
},
|
|
348
|
-
"default": "
|
|
349
|
-
"description": "The
|
|
350
|
-
"fieldName": "
|
|
369
|
+
"default": "'1900-01-01'",
|
|
370
|
+
"description": "The `dateFrom` value to use in the `allTimes` preset in the format `YYYY-MM-DD`.",
|
|
371
|
+
"fieldName": "earliestDate"
|
|
351
372
|
},
|
|
352
373
|
{
|
|
353
|
-
"name": "
|
|
374
|
+
"name": "initialValue",
|
|
354
375
|
"type": {
|
|
355
|
-
"text": "
|
|
376
|
+
"text": "'custom'\n | 'allTimes'\n | 'last2Weeks'\n | 'lastMonth'\n | 'last2Months'\n | 'last3Months'\n | 'last6Months'\n | string\n | undefined"
|
|
356
377
|
},
|
|
357
|
-
"default": "
|
|
358
|
-
"description": "The
|
|
359
|
-
"fieldName": "
|
|
378
|
+
"default": "'last6Months'",
|
|
379
|
+
"description": "The initial value to use for this date range selector.\nMust be a valid label from the preset labels or a `label` given in the `customSelectOptions`.\n\nIf the value is invalid, the component will default to `'last6Months'`.",
|
|
380
|
+
"fieldName": "initialValue"
|
|
360
381
|
},
|
|
361
382
|
{
|
|
362
|
-
"name": "
|
|
383
|
+
"name": "width",
|
|
363
384
|
"type": {
|
|
364
385
|
"text": "string | undefined"
|
|
365
386
|
},
|
|
366
|
-
"default": "
|
|
367
|
-
"description": "The
|
|
368
|
-
"fieldName": "
|
|
387
|
+
"default": "undefined",
|
|
388
|
+
"description": "The width of the component.\n\nIf not set, the component will take the full width of its container.\n\nThe width should be a string with a unit in css style, e.g. '100%', '500px' or '50vw'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
389
|
+
"fieldName": "width"
|
|
369
390
|
}
|
|
370
391
|
],
|
|
371
392
|
"superclass": {
|
|
372
|
-
"name": "
|
|
373
|
-
"module": "/src/web-components/
|
|
393
|
+
"name": "PreactLitAdapter",
|
|
394
|
+
"module": "/src/web-components/PreactLitAdapter"
|
|
374
395
|
},
|
|
375
|
-
"tagName": "gs-
|
|
396
|
+
"tagName": "gs-date-range-selector",
|
|
376
397
|
"customElement": true
|
|
377
398
|
}
|
|
378
399
|
],
|
|
379
400
|
"exports": [
|
|
380
401
|
{
|
|
381
402
|
"kind": "js",
|
|
382
|
-
"name": "
|
|
403
|
+
"name": "DateRangeSelectorComponent",
|
|
383
404
|
"declaration": {
|
|
384
|
-
"name": "
|
|
385
|
-
"module": "src/web-components/
|
|
405
|
+
"name": "DateRangeSelectorComponent",
|
|
406
|
+
"module": "src/web-components/input/gs-date-range-selector.tsx"
|
|
386
407
|
}
|
|
387
408
|
},
|
|
388
409
|
{
|
|
389
410
|
"kind": "custom-element-definition",
|
|
390
|
-
"name": "gs-
|
|
411
|
+
"name": "gs-date-range-selector",
|
|
391
412
|
"declaration": {
|
|
392
|
-
"name": "
|
|
393
|
-
"module": "src/web-components/
|
|
413
|
+
"name": "DateRangeSelectorComponent",
|
|
414
|
+
"module": "src/web-components/input/gs-date-range-selector.tsx"
|
|
394
415
|
}
|
|
395
416
|
}
|
|
396
417
|
]
|
|
397
418
|
},
|
|
398
419
|
{
|
|
399
420
|
"kind": "javascript-module",
|
|
400
|
-
"path": "src/web-components/
|
|
401
|
-
"declarations": [
|
|
402
|
-
"exports": [
|
|
403
|
-
{
|
|
404
|
-
"kind": "js",
|
|
405
|
-
"name": "MutationComparisonComponent",
|
|
406
|
-
"declaration": {
|
|
407
|
-
"name": "MutationComparisonComponent",
|
|
408
|
-
"module": "./mutation-comparison-component"
|
|
409
|
-
}
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
"kind": "js",
|
|
413
|
-
"name": "MutationsComponent",
|
|
414
|
-
"declaration": {
|
|
415
|
-
"name": "MutationsComponent",
|
|
416
|
-
"module": "./mutations-component"
|
|
417
|
-
}
|
|
418
|
-
},
|
|
421
|
+
"path": "src/web-components/input/gs-location-filter.stories.ts",
|
|
422
|
+
"declarations": [
|
|
419
423
|
{
|
|
420
|
-
"kind": "
|
|
421
|
-
"name": "
|
|
422
|
-
"
|
|
423
|
-
"
|
|
424
|
-
|
|
425
|
-
}
|
|
424
|
+
"kind": "variable",
|
|
425
|
+
"name": "meta",
|
|
426
|
+
"type": {
|
|
427
|
+
"text": "Meta"
|
|
428
|
+
},
|
|
429
|
+
"default": "{ title: 'Input/Location filter', component: 'gs-location-filter', parameters: withComponentDocs({ actions: { handles: ['gs-location-changed'], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { fields: { control: { type: 'object', }, }, initialValue: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, }, decorators: [withActions], tags: ['autodocs'], }"
|
|
426
430
|
},
|
|
427
431
|
{
|
|
428
|
-
"kind": "
|
|
429
|
-
"name": "
|
|
430
|
-
"
|
|
431
|
-
"
|
|
432
|
-
|
|
433
|
-
}
|
|
432
|
+
"kind": "variable",
|
|
433
|
+
"name": "LocationFilter",
|
|
434
|
+
"type": {
|
|
435
|
+
"text": "StoryObj<LocationFilterProps>"
|
|
436
|
+
},
|
|
437
|
+
"default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher: aggregatedEndpointMatcher, response: { status: 200, body: data, }, }, ], }, }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-location-filter'); await waitFor(() => { return expect(canvas.getByRole('combobox')).toBeEnabled(); }); }, }"
|
|
434
438
|
},
|
|
435
|
-
{
|
|
436
|
-
"kind": "js",
|
|
437
|
-
"name": "AggregateComponent",
|
|
438
|
-
"declaration": {
|
|
439
|
-
"name": "AggregateComponent",
|
|
440
|
-
"module": "./aggregate-component"
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
]
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
"kind": "javascript-module",
|
|
447
|
-
"path": "src/web-components/display/mutation-comparison-component.stories.ts",
|
|
448
|
-
"declarations": [
|
|
449
439
|
{
|
|
450
440
|
"kind": "variable",
|
|
451
|
-
"name": "
|
|
441
|
+
"name": "DelayToShowLoadingState",
|
|
452
442
|
"type": {
|
|
453
|
-
"text": "
|
|
443
|
+
"text": "StoryObj<LocationFilterProps>"
|
|
454
444
|
},
|
|
455
|
-
"default": "{
|
|
445
|
+
"default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher: aggregatedEndpointMatcher, response: { status: 200, body: data, }, options: { delay: 5000, }, }, ], }, }, }"
|
|
456
446
|
},
|
|
457
447
|
{
|
|
458
448
|
"kind": "variable",
|
|
459
|
-
"name": "
|
|
449
|
+
"name": "FetchingLocationsFails",
|
|
460
450
|
"type": {
|
|
461
|
-
"text": "StoryObj<
|
|
451
|
+
"text": "StoryObj<LocationFilterProps>"
|
|
462
452
|
},
|
|
463
|
-
"default": "{ ...Template,
|
|
453
|
+
"default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher: aggregatedEndpointMatcher, response: { status: 400, body: { error: 'no data' }, }, }, ], }, }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-location-filter'); await waitFor(() => expect(canvas.getByText('Oops! Something went wrong.', { exact: false })).toBeInTheDocument(), ); }, }"
|
|
464
454
|
},
|
|
465
455
|
{
|
|
466
456
|
"kind": "variable",
|
|
467
|
-
"name": "
|
|
457
|
+
"name": "FiresEvent",
|
|
468
458
|
"type": {
|
|
469
|
-
"text": "StoryObj<
|
|
459
|
+
"text": "StoryObj<LocationFilterProps>"
|
|
470
460
|
},
|
|
471
|
-
"default": "{ ...
|
|
461
|
+
"default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher: aggregatedEndpointMatcher, response: { status: 200, body: data, }, }, ], }, }, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-location-filter'); const submitButton = () => canvas.getByRole('button', { name: 'Submit' }); const inputField = () => canvas.getByRole('combobox'); const listenerMock = fn(); await step('Setup event listener mock', async () => { canvasElement.addEventListener('gs-location-changed', listenerMock); }); await step('wait until data is loaded', async () => { await waitFor(() => { return expect(inputField()).toBeEnabled(); }); }); await step('Input invalid location', async () => { await userEvent.type(inputField(), 'Not / A / Location'); await userEvent.click(submitButton()); await expect(listenerMock).not.toHaveBeenCalled(); await userEvent.type(inputField(), '{backspace>18/}'); }); await step('Select Asia', async () => { await userEvent.type(inputField(), 'Asia'); await userEvent.click(submitButton()); await expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { region: 'Asia', }, }), ); }); await step('Select Asia / Bangladesh / Rajshahi / Chapainawabgonj', async () => { await userEvent.type(inputField(), ' / Bangladesh / Rajshahi / Chapainawabgonj'); await userEvent.click(submitButton()); await expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { region: 'Asia', country: 'Bangladesh', division: 'Rajshahi', location: 'Chapainawabgonj', }, }), ); }); }, }"
|
|
472
462
|
}
|
|
473
463
|
],
|
|
474
464
|
"exports": [
|
|
@@ -477,196 +467,183 @@
|
|
|
477
467
|
"name": "default",
|
|
478
468
|
"declaration": {
|
|
479
469
|
"name": "meta",
|
|
480
|
-
"module": "src/web-components/
|
|
470
|
+
"module": "src/web-components/input/gs-location-filter.stories.ts"
|
|
481
471
|
}
|
|
482
472
|
},
|
|
483
473
|
{
|
|
484
474
|
"kind": "js",
|
|
485
|
-
"name": "
|
|
475
|
+
"name": "LocationFilter",
|
|
486
476
|
"declaration": {
|
|
487
|
-
"name": "
|
|
488
|
-
"module": "src/web-components/
|
|
477
|
+
"name": "LocationFilter",
|
|
478
|
+
"module": "src/web-components/input/gs-location-filter.stories.ts"
|
|
489
479
|
}
|
|
490
480
|
},
|
|
491
481
|
{
|
|
492
482
|
"kind": "js",
|
|
493
|
-
"name": "
|
|
483
|
+
"name": "DelayToShowLoadingState",
|
|
494
484
|
"declaration": {
|
|
495
|
-
"name": "
|
|
496
|
-
"module": "src/web-components/
|
|
485
|
+
"name": "DelayToShowLoadingState",
|
|
486
|
+
"module": "src/web-components/input/gs-location-filter.stories.ts"
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"kind": "js",
|
|
491
|
+
"name": "FetchingLocationsFails",
|
|
492
|
+
"declaration": {
|
|
493
|
+
"name": "FetchingLocationsFails",
|
|
494
|
+
"module": "src/web-components/input/gs-location-filter.stories.ts"
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"kind": "js",
|
|
499
|
+
"name": "FiresEvent",
|
|
500
|
+
"declaration": {
|
|
501
|
+
"name": "FiresEvent",
|
|
502
|
+
"module": "src/web-components/input/gs-location-filter.stories.ts"
|
|
497
503
|
}
|
|
498
504
|
}
|
|
499
505
|
]
|
|
500
506
|
},
|
|
501
507
|
{
|
|
502
508
|
"kind": "javascript-module",
|
|
503
|
-
"path": "src/web-components/
|
|
509
|
+
"path": "src/web-components/input/gs-location-filter.tsx",
|
|
504
510
|
"declarations": [
|
|
505
511
|
{
|
|
506
512
|
"kind": "class",
|
|
507
|
-
"description": "
|
|
508
|
-
"name": "
|
|
513
|
+
"description": "## Context\n\nThis component provides an input field to specify filters for locations.\n\nIt expects a list of fields that form a strict hierarchical order, such as continent, country, and city.\nThe component retrieves a list of all possible values for these fields from the Lapis instance.\nThis list is then utilized to display autocomplete suggestions and to validate the input.\n\nGiven `fields` are `['field1', 'field2', ..., 'fieldN']`,\nthen valid values for the location filter must be in the form `valueForField1 / valueForField2 / ... / valueForFieldK`,\nwhere `1 <= K <= N`.\nValues for the fields `i > K` are considered `undefined`.",
|
|
514
|
+
"name": "LocationFilterComponent",
|
|
509
515
|
"members": [
|
|
510
516
|
{
|
|
511
517
|
"kind": "field",
|
|
512
|
-
"name": "
|
|
518
|
+
"name": "initialValue",
|
|
513
519
|
"type": {
|
|
514
|
-
"text": "
|
|
520
|
+
"text": "string"
|
|
515
521
|
},
|
|
516
|
-
"default": "
|
|
517
|
-
"description": "
|
|
518
|
-
"attribute": "
|
|
522
|
+
"default": "''",
|
|
523
|
+
"description": "The initial value to use for this location filter.\nMust be of the form `valueForField1 / valueForField2 / ... / valueForFieldN`.",
|
|
524
|
+
"attribute": "initialValue"
|
|
519
525
|
},
|
|
520
526
|
{
|
|
521
527
|
"kind": "field",
|
|
522
|
-
"name": "
|
|
528
|
+
"name": "fields",
|
|
523
529
|
"type": {
|
|
524
|
-
"text": "
|
|
530
|
+
"text": "string[]"
|
|
525
531
|
},
|
|
526
|
-
"default": "
|
|
527
|
-
"description": "The
|
|
528
|
-
"attribute": "
|
|
532
|
+
"default": "[]",
|
|
533
|
+
"description": "The fields to display in the location filter, in hierarchical order.\nThe top-level field should be the first entry in the array.\nThis component assumes that the values for each field form a strict hierarchy\n(e.g., `fields = ['continent', 'country', 'city']`).",
|
|
534
|
+
"attribute": "fields"
|
|
529
535
|
},
|
|
530
536
|
{
|
|
531
537
|
"kind": "field",
|
|
532
|
-
"name": "
|
|
538
|
+
"name": "width",
|
|
533
539
|
"type": {
|
|
534
|
-
"text": "
|
|
535
|
-
},
|
|
536
|
-
"default": "['table']",
|
|
537
|
-
"description": "A list of tabs with views that this component should provide.",
|
|
538
|
-
"attribute": "views"
|
|
539
|
-
},
|
|
540
|
-
{
|
|
541
|
-
"kind": "field",
|
|
542
|
-
"name": "size",
|
|
543
|
-
"type": {
|
|
544
|
-
"text": "{ width?: string; height?: string } | undefined"
|
|
540
|
+
"text": "string | undefined"
|
|
545
541
|
},
|
|
546
542
|
"default": "undefined",
|
|
547
|
-
"description": "The
|
|
548
|
-
"attribute": "
|
|
549
|
-
}
|
|
543
|
+
"description": "The width of the component.\n\nIf not set, the component will take the full width of its container.\n\nThe width should be a string with a unit in css style, e.g. '100%', '500px' or '50vw'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
544
|
+
"attribute": "width"
|
|
545
|
+
}
|
|
546
|
+
],
|
|
547
|
+
"events": [
|
|
550
548
|
{
|
|
551
|
-
"kind": "field",
|
|
552
|
-
"name": "headline",
|
|
553
549
|
"type": {
|
|
554
|
-
"text": "string
|
|
550
|
+
"text": "CustomEvent<Record<string, string>>"
|
|
555
551
|
},
|
|
556
|
-
"
|
|
557
|
-
"
|
|
558
|
-
"attribute": "headline"
|
|
552
|
+
"description": "Fired when the field is submitted with a valid location value. The `details` of this event contain an object with all `fields` as keys and the corresponding values as values, if they are not `undefined`. Example: ``` { continent: \"Asia\", country: \"China\", city: \"Beijing\" } ```",
|
|
553
|
+
"name": "gs-location-changed"
|
|
559
554
|
}
|
|
560
555
|
],
|
|
561
556
|
"attributes": [
|
|
562
557
|
{
|
|
563
|
-
"name": "
|
|
564
|
-
"type": {
|
|
565
|
-
"text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
|
|
566
|
-
},
|
|
567
|
-
"default": "[]",
|
|
568
|
-
"description": "An array of variants to compare.\n\nThe `lapisFilter` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used as the label for the variant in the views.\nIt should be human-readable.",
|
|
569
|
-
"fieldName": "variants"
|
|
570
|
-
},
|
|
571
|
-
{
|
|
572
|
-
"name": "sequenceType",
|
|
573
|
-
"type": {
|
|
574
|
-
"text": "'nucleotide' | 'amino acid'"
|
|
575
|
-
},
|
|
576
|
-
"default": "'nucleotide'",
|
|
577
|
-
"description": "The type of the sequence for which the mutations should be shown.",
|
|
578
|
-
"fieldName": "sequenceType"
|
|
579
|
-
},
|
|
580
|
-
{
|
|
581
|
-
"name": "views",
|
|
558
|
+
"name": "initialValue",
|
|
582
559
|
"type": {
|
|
583
|
-
"text": "
|
|
560
|
+
"text": "string"
|
|
584
561
|
},
|
|
585
|
-
"default": "
|
|
586
|
-
"description": "
|
|
587
|
-
"fieldName": "
|
|
562
|
+
"default": "''",
|
|
563
|
+
"description": "The initial value to use for this location filter.\nMust be of the form `valueForField1 / valueForField2 / ... / valueForFieldN`.",
|
|
564
|
+
"fieldName": "initialValue"
|
|
588
565
|
},
|
|
589
566
|
{
|
|
590
|
-
"name": "
|
|
567
|
+
"name": "fields",
|
|
591
568
|
"type": {
|
|
592
|
-
"text": "
|
|
569
|
+
"text": "string[]"
|
|
593
570
|
},
|
|
594
|
-
"default": "
|
|
595
|
-
"description": "The
|
|
596
|
-
"fieldName": "
|
|
571
|
+
"default": "[]",
|
|
572
|
+
"description": "The fields to display in the location filter, in hierarchical order.\nThe top-level field should be the first entry in the array.\nThis component assumes that the values for each field form a strict hierarchy\n(e.g., `fields = ['continent', 'country', 'city']`).",
|
|
573
|
+
"fieldName": "fields"
|
|
597
574
|
},
|
|
598
575
|
{
|
|
599
|
-
"name": "
|
|
576
|
+
"name": "width",
|
|
600
577
|
"type": {
|
|
601
578
|
"text": "string | undefined"
|
|
602
579
|
},
|
|
603
|
-
"default": "
|
|
604
|
-
"description": "The
|
|
605
|
-
"fieldName": "
|
|
580
|
+
"default": "undefined",
|
|
581
|
+
"description": "The width of the component.\n\nIf not set, the component will take the full width of its container.\n\nThe width should be a string with a unit in css style, e.g. '100%', '500px' or '50vw'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
582
|
+
"fieldName": "width"
|
|
606
583
|
}
|
|
607
584
|
],
|
|
608
585
|
"superclass": {
|
|
609
|
-
"name": "
|
|
610
|
-
"module": "/src/web-components/
|
|
586
|
+
"name": "PreactLitAdapter",
|
|
587
|
+
"module": "/src/web-components/PreactLitAdapter"
|
|
611
588
|
},
|
|
612
|
-
"tagName": "gs-
|
|
589
|
+
"tagName": "gs-location-filter",
|
|
613
590
|
"customElement": true
|
|
614
591
|
}
|
|
615
592
|
],
|
|
616
593
|
"exports": [
|
|
617
594
|
{
|
|
618
595
|
"kind": "js",
|
|
619
|
-
"name": "
|
|
596
|
+
"name": "LocationFilterComponent",
|
|
620
597
|
"declaration": {
|
|
621
|
-
"name": "
|
|
622
|
-
"module": "src/web-components/
|
|
598
|
+
"name": "LocationFilterComponent",
|
|
599
|
+
"module": "src/web-components/input/gs-location-filter.tsx"
|
|
623
600
|
}
|
|
624
601
|
},
|
|
625
602
|
{
|
|
626
603
|
"kind": "custom-element-definition",
|
|
627
|
-
"name": "gs-
|
|
604
|
+
"name": "gs-location-filter",
|
|
628
605
|
"declaration": {
|
|
629
|
-
"name": "
|
|
630
|
-
"module": "src/web-components/
|
|
606
|
+
"name": "LocationFilterComponent",
|
|
607
|
+
"module": "src/web-components/input/gs-location-filter.tsx"
|
|
631
608
|
}
|
|
632
609
|
}
|
|
633
610
|
]
|
|
634
611
|
},
|
|
635
612
|
{
|
|
636
613
|
"kind": "javascript-module",
|
|
637
|
-
"path": "src/web-components/
|
|
614
|
+
"path": "src/web-components/input/gs-mutation-filter.stories.ts",
|
|
638
615
|
"declarations": [
|
|
639
616
|
{
|
|
640
617
|
"kind": "variable",
|
|
641
618
|
"name": "meta",
|
|
642
619
|
"type": {
|
|
643
|
-
"text": "Meta<
|
|
620
|
+
"text": "Meta<MutationFilterProps>"
|
|
644
621
|
},
|
|
645
|
-
"default": "{ title: '
|
|
622
|
+
"default": "{ title: 'Input/Mutation filter', component: 'gs-mutation-filter', parameters: withComponentDocs({ actions: { handles: ['gs-mutation-filter-changed', 'gs-mutation-filter-on-blur'], }, fetchMock: {}, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { initialValue: { control: { type: 'object', }, }, size: { control: { type: 'object', }, }, }, decorators: [withActions], tags: ['autodocs'], }"
|
|
646
623
|
},
|
|
647
624
|
{
|
|
648
625
|
"kind": "variable",
|
|
649
626
|
"name": "Default",
|
|
650
627
|
"type": {
|
|
651
|
-
"text": "StoryObj<
|
|
628
|
+
"text": "StoryObj<MutationFilterProps>"
|
|
652
629
|
},
|
|
653
|
-
"default": "{ ...Template,
|
|
630
|
+
"default": "{ ...Template, args: { initialValue: ['A123T'], }, }"
|
|
654
631
|
},
|
|
655
632
|
{
|
|
656
633
|
"kind": "variable",
|
|
657
|
-
"name": "
|
|
634
|
+
"name": "FiresFilterChangedEvent",
|
|
658
635
|
"type": {
|
|
659
|
-
"text": "StoryObj<
|
|
636
|
+
"text": "StoryObj<MutationFilterProps>"
|
|
660
637
|
},
|
|
661
|
-
"default": "{ ...
|
|
638
|
+
"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: [], }, }), ), ); }); }, }"
|
|
662
639
|
},
|
|
663
640
|
{
|
|
664
641
|
"kind": "variable",
|
|
665
|
-
"name": "
|
|
642
|
+
"name": "FiresFilterOnBlurEvent",
|
|
666
643
|
"type": {
|
|
667
|
-
"text": "StoryObj<
|
|
644
|
+
"text": "StoryObj<MutationFilterProps>"
|
|
668
645
|
},
|
|
669
|
-
"default": "{ ...
|
|
646
|
+
"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(); }); }, }"
|
|
670
647
|
}
|
|
671
648
|
],
|
|
672
649
|
"exports": [
|
|
@@ -675,7 +652,7 @@
|
|
|
675
652
|
"name": "default",
|
|
676
653
|
"declaration": {
|
|
677
654
|
"name": "meta",
|
|
678
|
-
"module": "src/web-components/
|
|
655
|
+
"module": "src/web-components/input/gs-mutation-filter.stories.ts"
|
|
679
656
|
}
|
|
680
657
|
},
|
|
681
658
|
{
|
|
@@ -683,65 +660,45 @@
|
|
|
683
660
|
"name": "Default",
|
|
684
661
|
"declaration": {
|
|
685
662
|
"name": "Default",
|
|
686
|
-
"module": "src/web-components/
|
|
663
|
+
"module": "src/web-components/input/gs-mutation-filter.stories.ts"
|
|
687
664
|
}
|
|
688
665
|
},
|
|
689
666
|
{
|
|
690
667
|
"kind": "js",
|
|
691
|
-
"name": "
|
|
668
|
+
"name": "FiresFilterChangedEvent",
|
|
692
669
|
"declaration": {
|
|
693
|
-
"name": "
|
|
694
|
-
"module": "src/web-components/
|
|
670
|
+
"name": "FiresFilterChangedEvent",
|
|
671
|
+
"module": "src/web-components/input/gs-mutation-filter.stories.ts"
|
|
695
672
|
}
|
|
696
673
|
},
|
|
697
674
|
{
|
|
698
675
|
"kind": "js",
|
|
699
|
-
"name": "
|
|
676
|
+
"name": "FiresFilterOnBlurEvent",
|
|
700
677
|
"declaration": {
|
|
701
|
-
"name": "
|
|
702
|
-
"module": "src/web-components/
|
|
678
|
+
"name": "FiresFilterOnBlurEvent",
|
|
679
|
+
"module": "src/web-components/input/gs-mutation-filter.stories.ts"
|
|
703
680
|
}
|
|
704
681
|
}
|
|
705
682
|
]
|
|
706
683
|
},
|
|
707
684
|
{
|
|
708
685
|
"kind": "javascript-module",
|
|
709
|
-
"path": "src/web-components/
|
|
686
|
+
"path": "src/web-components/input/gs-mutation-filter.tsx",
|
|
710
687
|
"declarations": [
|
|
711
688
|
{
|
|
712
689
|
"kind": "class",
|
|
713
|
-
"description": "
|
|
714
|
-
"name": "
|
|
690
|
+
"description": "## Context\nThis component provides an input field to specify filters for nucleotide and amino acid mutations and insertions.\n\nInput values have to be provided one at a time and submitted by pressing the Enter key or by clicking the '+' button.\nAfter submission, the component validates the input and fires an event with the selected mutations.\nAll previously selected mutations are displayed at the input field and added to the event.\nUsers can remove a mutation by clicking the 'x' button next to the mutation.\n\nValidation of the input is performed according to the following rules:\n\nMutations have to conform to the following format: `<gene/segment>:<symbol at reference><position><Substituted symbol/Deletion>`\n - Gene/segment: The gene or segment where the mutation occurs. Must be contained in the reference genome\n (Optional for elements with only one gene/segment)\n - Symbol at reference: The symbol at the reference position. (Optional)\n - Position: The position of the mutation. (Required)\n - Substituted symbol/Deletion: The substituted symbol or '-' for a deletion. (Required)\n Example: S:614G, 614G, 614- or 614G\n\nInsertions have to conform to the following format: `ins_<gene/segment>:<position>:<Inserted symbols>`\n - Gene/segment: The gene or segment where the insertion occurs. Must be contained in the reference genome\n (Optional for elements with only one gene/segment)\n - Position: The position of the insertion. (Required)\n - Inserted symbols: The symbols that are inserted. (Required)\n Example: ins_S:614:G, ins_614:G",
|
|
691
|
+
"name": "MutationFilterComponent",
|
|
715
692
|
"members": [
|
|
716
693
|
{
|
|
717
694
|
"kind": "field",
|
|
718
|
-
"name": "
|
|
719
|
-
"type": {
|
|
720
|
-
"text": "Record<string, string | number | null | boolean>"
|
|
721
|
-
},
|
|
722
|
-
"default": "{ displayName: '' }",
|
|
723
|
-
"description": "The `variant` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.",
|
|
724
|
-
"attribute": "variant"
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
"kind": "field",
|
|
728
|
-
"name": "sequenceType",
|
|
729
|
-
"type": {
|
|
730
|
-
"text": "'nucleotide' | 'amino acid'"
|
|
731
|
-
},
|
|
732
|
-
"default": "'nucleotide'",
|
|
733
|
-
"description": "The type of the sequence for which the mutations should be shown.",
|
|
734
|
-
"attribute": "sequenceType"
|
|
735
|
-
},
|
|
736
|
-
{
|
|
737
|
-
"kind": "field",
|
|
738
|
-
"name": "views",
|
|
695
|
+
"name": "initialValue",
|
|
739
696
|
"type": {
|
|
740
|
-
"text": "
|
|
697
|
+
"text": "{\n nucleotideMutations: string[];\n aminoAcidMutations: string[];\n nucleotideInsertions: string[];\n aminoAcidInsertions: string[];\n }\n | string[]\n | undefined"
|
|
741
698
|
},
|
|
742
|
-
"default": "
|
|
743
|
-
"description": "
|
|
744
|
-
"attribute": "
|
|
699
|
+
"default": "undefined",
|
|
700
|
+
"description": "The initial value to use for this mutation filter.\nMust be either\n- an array of strings of valid mutations.\n- an object with the keys `nucleotideMutations`, `aminoAcidMutations`, `nucleotideInsertions` and `aminoAcidInsertions` and corresponding string arrays.",
|
|
701
|
+
"attribute": "initialValue"
|
|
745
702
|
},
|
|
746
703
|
{
|
|
747
704
|
"kind": "field",
|
|
@@ -752,45 +709,33 @@
|
|
|
752
709
|
"default": "undefined",
|
|
753
710
|
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
754
711
|
"attribute": "size"
|
|
755
|
-
},
|
|
756
|
-
{
|
|
757
|
-
"kind": "field",
|
|
758
|
-
"name": "headline",
|
|
759
|
-
"type": {
|
|
760
|
-
"text": "string | undefined"
|
|
761
|
-
},
|
|
762
|
-
"default": "'Mutations'",
|
|
763
|
-
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
764
|
-
"attribute": "headline"
|
|
765
712
|
}
|
|
766
713
|
],
|
|
767
|
-
"
|
|
714
|
+
"events": [
|
|
768
715
|
{
|
|
769
|
-
"name": "variant",
|
|
770
716
|
"type": {
|
|
771
|
-
"text": "
|
|
717
|
+
"text": "CustomEvent<{nucleotideMutations: string[],aminoAcidMutations: string[],nucleotideInsertions: string[],aminoAcidInsertions: string[]}>"
|
|
772
718
|
},
|
|
773
|
-
"
|
|
774
|
-
"
|
|
775
|
-
"fieldName": "variant"
|
|
719
|
+
"description": "Fired when: - The user has submitted a valid mutation or insertion - The user has removed a mutation or insertion",
|
|
720
|
+
"name": "gs-mutation-filter-changed"
|
|
776
721
|
},
|
|
777
722
|
{
|
|
778
|
-
"name": "sequenceType",
|
|
779
723
|
"type": {
|
|
780
|
-
"text": "
|
|
724
|
+
"text": "CustomEvent<{nucleotideMutations: string[],aminoAcidMutations: string[],nucleotideInsertions: string[],aminoAcidInsertions: string[]}>"
|
|
781
725
|
},
|
|
782
|
-
"
|
|
783
|
-
"
|
|
784
|
-
|
|
785
|
-
|
|
726
|
+
"description": "Fired when: - the mutation filter has lost focus Contains the selected mutations in the format",
|
|
727
|
+
"name": "gs-mutation-filter-on-blur"
|
|
728
|
+
}
|
|
729
|
+
],
|
|
730
|
+
"attributes": [
|
|
786
731
|
{
|
|
787
|
-
"name": "
|
|
732
|
+
"name": "initialValue",
|
|
788
733
|
"type": {
|
|
789
|
-
"text": "
|
|
734
|
+
"text": "{\n nucleotideMutations: string[];\n aminoAcidMutations: string[];\n nucleotideInsertions: string[];\n aminoAcidInsertions: string[];\n }\n | string[]\n | undefined"
|
|
790
735
|
},
|
|
791
|
-
"default": "
|
|
792
|
-
"description": "
|
|
793
|
-
"fieldName": "
|
|
736
|
+
"default": "undefined",
|
|
737
|
+
"description": "The initial value to use for this mutation filter.\nMust be either\n- an array of strings of valid mutations.\n- an object with the keys `nucleotideMutations`, `aminoAcidMutations`, `nucleotideInsertions` and `aminoAcidInsertions` and corresponding string arrays.",
|
|
738
|
+
"fieldName": "initialValue"
|
|
794
739
|
},
|
|
795
740
|
{
|
|
796
741
|
"name": "size",
|
|
@@ -800,95 +745,62 @@
|
|
|
800
745
|
"default": "undefined",
|
|
801
746
|
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
802
747
|
"fieldName": "size"
|
|
803
|
-
},
|
|
804
|
-
{
|
|
805
|
-
"name": "headline",
|
|
806
|
-
"type": {
|
|
807
|
-
"text": "string | undefined"
|
|
808
|
-
},
|
|
809
|
-
"default": "'Mutations'",
|
|
810
|
-
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
811
|
-
"fieldName": "headline"
|
|
812
748
|
}
|
|
813
749
|
],
|
|
814
750
|
"superclass": {
|
|
815
|
-
"name": "
|
|
816
|
-
"module": "/src/web-components/
|
|
751
|
+
"name": "PreactLitAdapter",
|
|
752
|
+
"module": "/src/web-components/PreactLitAdapter"
|
|
817
753
|
},
|
|
818
|
-
"tagName": "gs-
|
|
754
|
+
"tagName": "gs-mutation-filter",
|
|
819
755
|
"customElement": true
|
|
820
756
|
}
|
|
821
757
|
],
|
|
822
758
|
"exports": [
|
|
823
759
|
{
|
|
824
760
|
"kind": "js",
|
|
825
|
-
"name": "
|
|
761
|
+
"name": "MutationFilterComponent",
|
|
826
762
|
"declaration": {
|
|
827
|
-
"name": "
|
|
828
|
-
"module": "src/web-components/
|
|
763
|
+
"name": "MutationFilterComponent",
|
|
764
|
+
"module": "src/web-components/input/gs-mutation-filter.tsx"
|
|
829
765
|
}
|
|
830
766
|
},
|
|
831
767
|
{
|
|
832
768
|
"kind": "custom-element-definition",
|
|
833
|
-
"name": "gs-
|
|
769
|
+
"name": "gs-mutation-filter",
|
|
834
770
|
"declaration": {
|
|
835
|
-
"name": "
|
|
836
|
-
"module": "src/web-components/
|
|
771
|
+
"name": "MutationFilterComponent",
|
|
772
|
+
"module": "src/web-components/input/gs-mutation-filter.tsx"
|
|
837
773
|
}
|
|
838
774
|
}
|
|
839
775
|
]
|
|
840
776
|
},
|
|
841
777
|
{
|
|
842
778
|
"kind": "javascript-module",
|
|
843
|
-
"path": "src/web-components/
|
|
779
|
+
"path": "src/web-components/input/gs-text-input.stories.ts",
|
|
844
780
|
"declarations": [
|
|
845
781
|
{
|
|
846
782
|
"kind": "variable",
|
|
847
783
|
"name": "meta",
|
|
848
784
|
"type": {
|
|
849
|
-
"text": "Meta<
|
|
850
|
-
},
|
|
851
|
-
"default": "{ title: 'Visualization/Prevalence over time', component: 'gs-prevalence-over-time', argTypes: { numerator: { control: 'object' }, denominator: { control: 'object' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, smoothingWindow: { control: 'number' }, views: { options: ['bar', 'line', 'bubble', 'table'], control: { type: 'check' }, }, confidenceIntervalMethods: { options: ['wilson'], control: { type: 'check' }, }, size: [{ control: 'object' }], headline: { control: 'text' }, }, parameters: withComponentDocs({ componentDocs: { tag: 'gs-prevalence-over-time', opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
852
|
-
},
|
|
853
|
-
{
|
|
854
|
-
"kind": "variable",
|
|
855
|
-
"name": "TwoVariants",
|
|
856
|
-
"type": {
|
|
857
|
-
"text": "StoryObj<PrevalenceOverTimeProps>"
|
|
858
|
-
},
|
|
859
|
-
"default": "{ ...Template, args: { numerator: [ { displayName: 'EG', country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01' }, { displayName: 'JN.1', country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' }, ], denominator: { country: 'USA', dateFrom: '2023-01-01', displayName: 'All' }, granularity: 'month', smoothingWindow: 0, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], size: { width: '100%', height: '700px' }, headline: 'Prevalence over time', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorEG, }, }, { matcher: { name: 'numeratorJN1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorJN1, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: denominator, }, }, ], }, }, }"
|
|
860
|
-
},
|
|
861
|
-
{
|
|
862
|
-
"kind": "variable",
|
|
863
|
-
"name": "OneVariant",
|
|
864
|
-
"type": {
|
|
865
|
-
"text": "StoryObj<PrevalenceOverTimeProps>"
|
|
866
|
-
},
|
|
867
|
-
"default": "{ ...Template, args: { numerator: { displayName: 'EG', country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01' }, denominator: { country: 'USA', dateFrom: '2023-10-01', displayName: 'All' }, granularity: 'day', smoothingWindow: 7, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], size: { width: '100%', height: '700px' }, headline: 'Prevalence over time', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorOneVariant', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: numeratorOneVariant, }, }, { matcher: { name: 'denominatorOneVariant', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: denominatorOneVariant, }, }, ], }, }, }"
|
|
868
|
-
},
|
|
869
|
-
{
|
|
870
|
-
"kind": "variable",
|
|
871
|
-
"name": "OneVariantOnLineTab",
|
|
872
|
-
"type": {
|
|
873
|
-
"text": "StoryObj<PrevalenceOverTimeProps>"
|
|
785
|
+
"text": "Meta<TextInputProps>"
|
|
874
786
|
},
|
|
875
|
-
"default": "{
|
|
787
|
+
"default": "{ title: 'Input/Text input', component: 'gs-text-input', parameters: withComponentDocs({ actions: { handles: ['gs-text-input-changed'], }, fetchMock: { mocks: [ { matcher: { name: 'hosts', url: AGGREGATED_ENDPOINT, body: { fields: ['host'], }, }, response: { status: 200, body: data, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { lapisField: { control: { type: 'text', }, }, placeholderText: { control: { type: 'text', }, }, initialValue: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, }, decorators: [withActions], tags: ['autodocs'], }"
|
|
876
788
|
},
|
|
877
789
|
{
|
|
878
790
|
"kind": "variable",
|
|
879
|
-
"name": "
|
|
791
|
+
"name": "Default",
|
|
880
792
|
"type": {
|
|
881
|
-
"text": "StoryObj<
|
|
793
|
+
"text": "StoryObj<TextInputProps>"
|
|
882
794
|
},
|
|
883
|
-
"default": "{
|
|
795
|
+
"default": "{ render: (args) => { return html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-screen-lg\"> <gs-text-input .lapisField=${args.lapisField} .placeholderText=${args.placeholderText} .initialValue=${args.initialValue} .width=${args.width} ></gs-text-input> </div> </gs-app>`; }, args: { lapisField: 'host', placeholderText: 'Enter host name', initialValue: 'Homo sapiens', width: '100%', }, }"
|
|
884
796
|
},
|
|
885
797
|
{
|
|
886
798
|
"kind": "variable",
|
|
887
|
-
"name": "
|
|
799
|
+
"name": "FiresEvent",
|
|
888
800
|
"type": {
|
|
889
|
-
"text": "StoryObj<
|
|
801
|
+
"text": "StoryObj<TextInputProps>"
|
|
890
802
|
},
|
|
891
|
-
"default": "{ ...
|
|
803
|
+
"default": "{ ...Default, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-text-input'); const inputField = () => canvas.getByPlaceholderText('Enter host name'); const listenerMock = fn(); await step('Setup event listener mock', async () => { canvasElement.addEventListener('gs-text-input-changed', listenerMock); }); await step('wait until data is loaded', async () => { await waitFor(() => { return expect(inputField()).toBeEnabled(); }); }); await step('Enters an invalid host name', async () => { await userEvent.type(inputField(), 'notInList'); await expect(listenerMock).not.toHaveBeenCalled(); await userEvent.type(inputField(), '{backspace>9/}'); }); await step('Enter a valid host name', async () => { await userEvent.type(inputField(), 'Homo'); await expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { host: 'Homo', }, }), ); }); }, args: { ...Default.args, initialValue: '', }, }"
|
|
892
804
|
}
|
|
893
805
|
],
|
|
894
806
|
"exports": [
|
|
@@ -897,261 +809,255 @@
|
|
|
897
809
|
"name": "default",
|
|
898
810
|
"declaration": {
|
|
899
811
|
"name": "meta",
|
|
900
|
-
"module": "src/web-components/
|
|
812
|
+
"module": "src/web-components/input/gs-text-input.stories.ts"
|
|
901
813
|
}
|
|
902
814
|
},
|
|
903
815
|
{
|
|
904
816
|
"kind": "js",
|
|
905
|
-
"name": "
|
|
817
|
+
"name": "Default",
|
|
906
818
|
"declaration": {
|
|
907
|
-
"name": "
|
|
908
|
-
"module": "src/web-components/
|
|
819
|
+
"name": "Default",
|
|
820
|
+
"module": "src/web-components/input/gs-text-input.stories.ts"
|
|
909
821
|
}
|
|
910
822
|
},
|
|
911
823
|
{
|
|
912
824
|
"kind": "js",
|
|
913
|
-
"name": "
|
|
825
|
+
"name": "FiresEvent",
|
|
914
826
|
"declaration": {
|
|
915
|
-
"name": "
|
|
916
|
-
"module": "src/web-components/
|
|
827
|
+
"name": "FiresEvent",
|
|
828
|
+
"module": "src/web-components/input/gs-text-input.stories.ts"
|
|
917
829
|
}
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
}
|
|
926
|
-
},
|
|
927
|
-
{
|
|
928
|
-
"kind": "js",
|
|
929
|
-
"name": "OneVariantOnBubbleTab",
|
|
930
|
-
"declaration": {
|
|
931
|
-
"name": "OneVariantOnBubbleTab",
|
|
932
|
-
"module": "src/web-components/display/prevalence-over-time-component.stories.ts"
|
|
933
|
-
}
|
|
934
|
-
},
|
|
935
|
-
{
|
|
936
|
-
"kind": "js",
|
|
937
|
-
"name": "OneVariantOnTableTab",
|
|
938
|
-
"declaration": {
|
|
939
|
-
"name": "OneVariantOnTableTab",
|
|
940
|
-
"module": "src/web-components/display/prevalence-over-time-component.stories.ts"
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
]
|
|
944
|
-
},
|
|
945
|
-
{
|
|
946
|
-
"kind": "javascript-module",
|
|
947
|
-
"path": "src/web-components/display/prevalence-over-time-component.tsx",
|
|
948
|
-
"declarations": [
|
|
830
|
+
}
|
|
831
|
+
]
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
"kind": "javascript-module",
|
|
835
|
+
"path": "src/web-components/input/gs-text-input.tsx",
|
|
836
|
+
"declarations": [
|
|
949
837
|
{
|
|
950
838
|
"kind": "class",
|
|
951
|
-
"description": "
|
|
952
|
-
"name": "
|
|
839
|
+
"description": "\n## Context\n\nThis component provides a text input field to specify filters for arbitrary fields of this Lapis instance.",
|
|
840
|
+
"name": "TextInputComponent",
|
|
953
841
|
"members": [
|
|
954
842
|
{
|
|
955
843
|
"kind": "field",
|
|
956
|
-
"name": "
|
|
957
|
-
"type": {
|
|
958
|
-
"text": "| (Record<string, string | number | null | boolean> & { displayName: string })\n | (Record<string, string | number | null | boolean> & {\n displayName: string;\n })[]"
|
|
959
|
-
},
|
|
960
|
-
"default": "{ displayName: '' }",
|
|
961
|
-
"description": "Either a single variant or an array of variants to compare.\nThis must be a valid LAPIS filter object with an additional `displayName` property\nwhich will be used as the label for the variant in the views,\nor an array of such objects.",
|
|
962
|
-
"attribute": "numerator"
|
|
963
|
-
},
|
|
964
|
-
{
|
|
965
|
-
"kind": "field",
|
|
966
|
-
"name": "denominator",
|
|
967
|
-
"type": {
|
|
968
|
-
"text": "Record<string, string | number | null | boolean> & { displayName: string }"
|
|
969
|
-
},
|
|
970
|
-
"default": "{ displayName: '' }",
|
|
971
|
-
"description": "The variant that the variants in `numerator` are compared to.",
|
|
972
|
-
"attribute": "denominator"
|
|
973
|
-
},
|
|
974
|
-
{
|
|
975
|
-
"kind": "field",
|
|
976
|
-
"name": "granularity",
|
|
977
|
-
"type": {
|
|
978
|
-
"text": "'day' | 'week' | 'month' | 'year'"
|
|
979
|
-
},
|
|
980
|
-
"default": "'day'",
|
|
981
|
-
"description": "The granularity of the time axis.",
|
|
982
|
-
"attribute": "granularity"
|
|
983
|
-
},
|
|
984
|
-
{
|
|
985
|
-
"kind": "field",
|
|
986
|
-
"name": "smoothingWindow",
|
|
987
|
-
"type": {
|
|
988
|
-
"text": "number"
|
|
989
|
-
},
|
|
990
|
-
"default": "0",
|
|
991
|
-
"description": "The number of time steps to use for smoothing the data.\n`0` means no smoothing.\nMust be a non-negative integer.\n\nFor a given time, the shown value is the mean of the neighbouring measured values.\nThe `smoothingWindow` value provides the number of neighbouring values to take into account.\nThe resulting time is computed via `Math.floor(smoothingWindow / 2)`.",
|
|
992
|
-
"attribute": "smoothingWindow"
|
|
993
|
-
},
|
|
994
|
-
{
|
|
995
|
-
"kind": "field",
|
|
996
|
-
"name": "views",
|
|
844
|
+
"name": "initialValue",
|
|
997
845
|
"type": {
|
|
998
|
-
"text": "
|
|
846
|
+
"text": "string | undefined"
|
|
999
847
|
},
|
|
1000
|
-
"default": "
|
|
1001
|
-
"description": "
|
|
1002
|
-
"attribute": "
|
|
848
|
+
"default": "''",
|
|
849
|
+
"description": "The initial value to use for this text input.",
|
|
850
|
+
"attribute": "initialValue"
|
|
1003
851
|
},
|
|
1004
852
|
{
|
|
1005
853
|
"kind": "field",
|
|
1006
|
-
"name": "
|
|
854
|
+
"name": "lapisField",
|
|
1007
855
|
"type": {
|
|
1008
|
-
"text": "
|
|
856
|
+
"text": "string"
|
|
1009
857
|
},
|
|
1010
|
-
"default": "
|
|
1011
|
-
"description": "
|
|
1012
|
-
"attribute": "
|
|
858
|
+
"default": "''",
|
|
859
|
+
"description": "The Lapis field name to use for this text input.",
|
|
860
|
+
"attribute": "lapisField"
|
|
1013
861
|
},
|
|
1014
862
|
{
|
|
1015
863
|
"kind": "field",
|
|
1016
|
-
"name": "
|
|
864
|
+
"name": "placeholderText",
|
|
1017
865
|
"type": {
|
|
1018
866
|
"text": "string | undefined"
|
|
1019
867
|
},
|
|
1020
|
-
"default": "'
|
|
1021
|
-
"description": "The
|
|
1022
|
-
"attribute": "
|
|
868
|
+
"default": "''",
|
|
869
|
+
"description": "The placeholder text to display in the input field.",
|
|
870
|
+
"attribute": "placeholderText"
|
|
1023
871
|
},
|
|
1024
872
|
{
|
|
1025
873
|
"kind": "field",
|
|
1026
|
-
"name": "
|
|
874
|
+
"name": "width",
|
|
1027
875
|
"type": {
|
|
1028
|
-
"text": "
|
|
876
|
+
"text": "string | undefined"
|
|
1029
877
|
},
|
|
1030
878
|
"default": "undefined",
|
|
1031
|
-
"description": "The
|
|
1032
|
-
"attribute": "
|
|
879
|
+
"description": "The width of the component.\n\nIf not set, the component will take the full width of its container.\n\nThe width should be a string with a unit in css style, e.g. '100%', '500px' or '50vw'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
880
|
+
"attribute": "width"
|
|
1033
881
|
}
|
|
1034
882
|
],
|
|
1035
|
-
"
|
|
1036
|
-
{
|
|
1037
|
-
"name": "numerator",
|
|
1038
|
-
"type": {
|
|
1039
|
-
"text": "| (Record<string, string | number | null | boolean> & { displayName: string })\n | (Record<string, string | number | null | boolean> & {\n displayName: string;\n })[]"
|
|
1040
|
-
},
|
|
1041
|
-
"default": "{ displayName: '' }",
|
|
1042
|
-
"description": "Either a single variant or an array of variants to compare.\nThis must be a valid LAPIS filter object with an additional `displayName` property\nwhich will be used as the label for the variant in the views,\nor an array of such objects.",
|
|
1043
|
-
"fieldName": "numerator"
|
|
1044
|
-
},
|
|
1045
|
-
{
|
|
1046
|
-
"name": "denominator",
|
|
1047
|
-
"type": {
|
|
1048
|
-
"text": "Record<string, string | number | null | boolean> & { displayName: string }"
|
|
1049
|
-
},
|
|
1050
|
-
"default": "{ displayName: '' }",
|
|
1051
|
-
"description": "The variant that the variants in `numerator` are compared to.",
|
|
1052
|
-
"fieldName": "denominator"
|
|
1053
|
-
},
|
|
1054
|
-
{
|
|
1055
|
-
"name": "granularity",
|
|
1056
|
-
"type": {
|
|
1057
|
-
"text": "'day' | 'week' | 'month' | 'year'"
|
|
1058
|
-
},
|
|
1059
|
-
"default": "'day'",
|
|
1060
|
-
"description": "The granularity of the time axis.",
|
|
1061
|
-
"fieldName": "granularity"
|
|
1062
|
-
},
|
|
883
|
+
"events": [
|
|
1063
884
|
{
|
|
1064
|
-
"name": "smoothingWindow",
|
|
1065
885
|
"type": {
|
|
1066
|
-
"text": "
|
|
886
|
+
"text": "CustomEvent<Record<string, string>>"
|
|
1067
887
|
},
|
|
1068
|
-
"
|
|
1069
|
-
"
|
|
1070
|
-
|
|
1071
|
-
|
|
888
|
+
"description": "Fired when the input field is changed. The `details` of this event contain an object with the `lapisField` as key and the input value as value. Example: ``` { \"host\": \"Homo sapiens\" } ```",
|
|
889
|
+
"name": "gs-text-input-changed"
|
|
890
|
+
}
|
|
891
|
+
],
|
|
892
|
+
"attributes": [
|
|
1072
893
|
{
|
|
1073
|
-
"name": "
|
|
894
|
+
"name": "initialValue",
|
|
1074
895
|
"type": {
|
|
1075
|
-
"text": "
|
|
896
|
+
"text": "string | undefined"
|
|
1076
897
|
},
|
|
1077
|
-
"default": "
|
|
1078
|
-
"description": "
|
|
1079
|
-
"fieldName": "
|
|
898
|
+
"default": "''",
|
|
899
|
+
"description": "The initial value to use for this text input.",
|
|
900
|
+
"fieldName": "initialValue"
|
|
1080
901
|
},
|
|
1081
902
|
{
|
|
1082
|
-
"name": "
|
|
903
|
+
"name": "lapisField",
|
|
1083
904
|
"type": {
|
|
1084
|
-
"text": "
|
|
905
|
+
"text": "string"
|
|
1085
906
|
},
|
|
1086
|
-
"default": "
|
|
1087
|
-
"description": "
|
|
1088
|
-
"fieldName": "
|
|
907
|
+
"default": "''",
|
|
908
|
+
"description": "The Lapis field name to use for this text input.",
|
|
909
|
+
"fieldName": "lapisField"
|
|
1089
910
|
},
|
|
1090
911
|
{
|
|
1091
|
-
"name": "
|
|
912
|
+
"name": "placeholderText",
|
|
1092
913
|
"type": {
|
|
1093
914
|
"text": "string | undefined"
|
|
1094
915
|
},
|
|
1095
|
-
"default": "'
|
|
1096
|
-
"description": "The
|
|
1097
|
-
"fieldName": "
|
|
916
|
+
"default": "''",
|
|
917
|
+
"description": "The placeholder text to display in the input field.",
|
|
918
|
+
"fieldName": "placeholderText"
|
|
1098
919
|
},
|
|
1099
920
|
{
|
|
1100
|
-
"name": "
|
|
921
|
+
"name": "width",
|
|
1101
922
|
"type": {
|
|
1102
|
-
"text": "
|
|
923
|
+
"text": "string | undefined"
|
|
1103
924
|
},
|
|
1104
925
|
"default": "undefined",
|
|
1105
|
-
"description": "The
|
|
1106
|
-
"fieldName": "
|
|
926
|
+
"description": "The width of the component.\n\nIf not set, the component will take the full width of its container.\n\nThe width should be a string with a unit in css style, e.g. '100%', '500px' or '50vw'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
927
|
+
"fieldName": "width"
|
|
1107
928
|
}
|
|
1108
929
|
],
|
|
1109
930
|
"superclass": {
|
|
1110
|
-
"name": "
|
|
1111
|
-
"module": "/src/web-components/
|
|
931
|
+
"name": "PreactLitAdapter",
|
|
932
|
+
"module": "/src/web-components/PreactLitAdapter"
|
|
1112
933
|
},
|
|
1113
|
-
"tagName": "gs-
|
|
934
|
+
"tagName": "gs-text-input",
|
|
1114
935
|
"customElement": true
|
|
1115
936
|
}
|
|
1116
937
|
],
|
|
1117
938
|
"exports": [
|
|
1118
939
|
{
|
|
1119
940
|
"kind": "js",
|
|
1120
|
-
"name": "
|
|
941
|
+
"name": "TextInputComponent",
|
|
1121
942
|
"declaration": {
|
|
1122
|
-
"name": "
|
|
1123
|
-
"module": "src/web-components/
|
|
943
|
+
"name": "TextInputComponent",
|
|
944
|
+
"module": "src/web-components/input/gs-text-input.tsx"
|
|
1124
945
|
}
|
|
1125
946
|
},
|
|
1126
947
|
{
|
|
1127
948
|
"kind": "custom-element-definition",
|
|
1128
|
-
"name": "gs-
|
|
949
|
+
"name": "gs-text-input",
|
|
1129
950
|
"declaration": {
|
|
1130
|
-
"name": "
|
|
1131
|
-
"module": "src/web-components/
|
|
951
|
+
"name": "TextInputComponent",
|
|
952
|
+
"module": "src/web-components/input/gs-text-input.tsx"
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
]
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"kind": "javascript-module",
|
|
959
|
+
"path": "src/web-components/input/index.ts",
|
|
960
|
+
"declarations": [],
|
|
961
|
+
"exports": [
|
|
962
|
+
{
|
|
963
|
+
"kind": "js",
|
|
964
|
+
"name": "DateRangeSelectorComponent",
|
|
965
|
+
"declaration": {
|
|
966
|
+
"name": "DateRangeSelectorComponent",
|
|
967
|
+
"module": "./gs-date-range-selector"
|
|
968
|
+
}
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
"kind": "js",
|
|
972
|
+
"name": "LocationFilterComponent",
|
|
973
|
+
"declaration": {
|
|
974
|
+
"name": "LocationFilterComponent",
|
|
975
|
+
"module": "./gs-location-filter"
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"kind": "js",
|
|
980
|
+
"name": "TextInputComponent",
|
|
981
|
+
"declaration": {
|
|
982
|
+
"name": "TextInputComponent",
|
|
983
|
+
"module": "./gs-text-input"
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"kind": "js",
|
|
988
|
+
"name": "MutationFilterComponent",
|
|
989
|
+
"declaration": {
|
|
990
|
+
"name": "MutationFilterComponent",
|
|
991
|
+
"module": "./gs-mutation-filter"
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
]
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"kind": "javascript-module",
|
|
998
|
+
"path": "src/web-components/lapis-context.ts",
|
|
999
|
+
"declarations": [
|
|
1000
|
+
{
|
|
1001
|
+
"kind": "variable",
|
|
1002
|
+
"name": "lapisContext"
|
|
1003
|
+
}
|
|
1004
|
+
],
|
|
1005
|
+
"exports": [
|
|
1006
|
+
{
|
|
1007
|
+
"kind": "js",
|
|
1008
|
+
"name": "lapisContext",
|
|
1009
|
+
"declaration": {
|
|
1010
|
+
"name": "lapisContext",
|
|
1011
|
+
"module": "src/web-components/lapis-context.ts"
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
]
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"kind": "javascript-module",
|
|
1018
|
+
"path": "src/web-components/reference-genome-context.ts",
|
|
1019
|
+
"declarations": [
|
|
1020
|
+
{
|
|
1021
|
+
"kind": "variable",
|
|
1022
|
+
"name": "referenceGenomeContext"
|
|
1023
|
+
}
|
|
1024
|
+
],
|
|
1025
|
+
"exports": [
|
|
1026
|
+
{
|
|
1027
|
+
"kind": "js",
|
|
1028
|
+
"name": "referenceGenomeContext",
|
|
1029
|
+
"declaration": {
|
|
1030
|
+
"name": "referenceGenomeContext",
|
|
1031
|
+
"module": "src/web-components/reference-genome-context.ts"
|
|
1132
1032
|
}
|
|
1133
1033
|
}
|
|
1134
1034
|
]
|
|
1135
1035
|
},
|
|
1136
1036
|
{
|
|
1137
1037
|
"kind": "javascript-module",
|
|
1138
|
-
"path": "src/web-components/
|
|
1038
|
+
"path": "src/web-components/visualization/data_visualization_statistical_analysis.mdx",
|
|
1039
|
+
"declarations": [],
|
|
1040
|
+
"exports": []
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
"kind": "javascript-module",
|
|
1044
|
+
"path": "src/web-components/visualization/gs-aggregate.stories.ts",
|
|
1139
1045
|
"declarations": [
|
|
1140
1046
|
{
|
|
1141
1047
|
"kind": "variable",
|
|
1142
1048
|
"name": "meta",
|
|
1143
1049
|
"type": {
|
|
1144
|
-
"text": "Meta<
|
|
1050
|
+
"text": "Meta<AggregateProps>"
|
|
1145
1051
|
},
|
|
1146
|
-
"default": "{ title: 'Visualization/
|
|
1052
|
+
"default": "{ title: 'Visualization/Aggregate', component: 'gs-aggregate', argTypes: { fields: [{ control: 'object' }], views: { options: ['table'], control: { type: 'check' }, }, size: [{ control: 'object' }], headline: { control: 'text' }, }, parameters: withComponentDocs({ fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'host'], country: 'USA', }, }, response: { status: 200, body: aggregatedData, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample: `<gs-aggregate fields='[\"division\", \"host\"]' filter='{\"country\": \"USA\"}' views='[\"table\"]'></gs-aggregate>`, }, }), tags: ['autodocs'], }"
|
|
1147
1053
|
},
|
|
1148
1054
|
{
|
|
1149
1055
|
"kind": "variable",
|
|
1150
|
-
"name": "
|
|
1056
|
+
"name": "Table",
|
|
1151
1057
|
"type": {
|
|
1152
|
-
"text": "StoryObj<
|
|
1058
|
+
"text": "StoryObj<AggregateProps>"
|
|
1153
1059
|
},
|
|
1154
|
-
"default": "{
|
|
1060
|
+
"default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-aggregate .fields=${args.fields} .filter=${args.filter} .views=${args.views} .size=${args.size} .headline=${args.headline} ></gs-aggregate> </gs-app> `, args: { fields: ['division', 'host'], views: ['table'], filter: { country: 'USA', }, size: { width: '100%', height: '700px' }, headline: 'Aggregate', }, }"
|
|
1155
1061
|
}
|
|
1156
1062
|
],
|
|
1157
1063
|
"exports": [
|
|
@@ -1160,67 +1066,67 @@
|
|
|
1160
1066
|
"name": "default",
|
|
1161
1067
|
"declaration": {
|
|
1162
1068
|
"name": "meta",
|
|
1163
|
-
"module": "src/web-components/
|
|
1069
|
+
"module": "src/web-components/visualization/gs-aggregate.stories.ts"
|
|
1164
1070
|
}
|
|
1165
1071
|
},
|
|
1166
1072
|
{
|
|
1167
1073
|
"kind": "js",
|
|
1168
|
-
"name": "
|
|
1074
|
+
"name": "Table",
|
|
1169
1075
|
"declaration": {
|
|
1170
|
-
"name": "
|
|
1171
|
-
"module": "src/web-components/
|
|
1076
|
+
"name": "Table",
|
|
1077
|
+
"module": "src/web-components/visualization/gs-aggregate.stories.ts"
|
|
1172
1078
|
}
|
|
1173
1079
|
}
|
|
1174
1080
|
]
|
|
1175
1081
|
},
|
|
1176
1082
|
{
|
|
1177
1083
|
"kind": "javascript-module",
|
|
1178
|
-
"path": "src/web-components/
|
|
1084
|
+
"path": "src/web-components/visualization/gs-aggregate.tsx",
|
|
1179
1085
|
"declarations": [
|
|
1180
1086
|
{
|
|
1181
1087
|
"kind": "class",
|
|
1182
|
-
"description": "
|
|
1183
|
-
"name": "
|
|
1088
|
+
"description": "## Context\n\nThis component displays aggregated data, which can provide an overview of the underlying data.\n\nIt expects a list of fields to aggregate by and a filter to apply to the data.",
|
|
1089
|
+
"name": "AggregateComponent",
|
|
1184
1090
|
"members": [
|
|
1185
1091
|
{
|
|
1186
1092
|
"kind": "field",
|
|
1187
|
-
"name": "
|
|
1093
|
+
"name": "fields",
|
|
1188
1094
|
"type": {
|
|
1189
|
-
"text": "
|
|
1095
|
+
"text": "string[]"
|
|
1190
1096
|
},
|
|
1191
|
-
"default": "
|
|
1192
|
-
"description": "The
|
|
1193
|
-
"attribute": "
|
|
1097
|
+
"default": "[]",
|
|
1098
|
+
"description": "The fields to aggregate by.",
|
|
1099
|
+
"attribute": "fields"
|
|
1194
1100
|
},
|
|
1195
1101
|
{
|
|
1196
1102
|
"kind": "field",
|
|
1197
|
-
"name": "
|
|
1103
|
+
"name": "views",
|
|
1198
1104
|
"type": {
|
|
1199
|
-
"text": "
|
|
1105
|
+
"text": "View[]"
|
|
1200
1106
|
},
|
|
1201
|
-
"default": "
|
|
1202
|
-
"description": "The
|
|
1203
|
-
"attribute": "
|
|
1107
|
+
"default": "['table']",
|
|
1108
|
+
"description": "The views are used to display the aggregated data.\nIn the table view, the data is presented in a table format where each field is a column,\nalong with the aggregated value and its proportion.\nThe proportion represents the ratio of the aggregated value to the total count of the data\n(considering the applied filter).",
|
|
1109
|
+
"attribute": "views"
|
|
1204
1110
|
},
|
|
1205
1111
|
{
|
|
1206
1112
|
"kind": "field",
|
|
1207
|
-
"name": "
|
|
1113
|
+
"name": "filter",
|
|
1208
1114
|
"type": {
|
|
1209
|
-
"text": "
|
|
1115
|
+
"text": "LapisFilter"
|
|
1210
1116
|
},
|
|
1211
|
-
"default": "
|
|
1212
|
-
"description": "The
|
|
1213
|
-
"attribute": "
|
|
1117
|
+
"default": "{}",
|
|
1118
|
+
"description": "The filter to apply to the data.",
|
|
1119
|
+
"attribute": "filter"
|
|
1214
1120
|
},
|
|
1215
1121
|
{
|
|
1216
1122
|
"kind": "field",
|
|
1217
|
-
"name": "
|
|
1123
|
+
"name": "size",
|
|
1218
1124
|
"type": {
|
|
1219
|
-
"text": "
|
|
1125
|
+
"text": "{ width?: string; height?: string } | undefined"
|
|
1220
1126
|
},
|
|
1221
|
-
"default": "
|
|
1222
|
-
"description": "
|
|
1223
|
-
"attribute": "
|
|
1127
|
+
"default": "undefined",
|
|
1128
|
+
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
1129
|
+
"attribute": "size"
|
|
1224
1130
|
},
|
|
1225
1131
|
{
|
|
1226
1132
|
"kind": "field",
|
|
@@ -1228,154 +1134,112 @@
|
|
|
1228
1134
|
"type": {
|
|
1229
1135
|
"text": "string | undefined"
|
|
1230
1136
|
},
|
|
1231
|
-
"default": "'
|
|
1137
|
+
"default": "'Aggregate'",
|
|
1232
1138
|
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1233
1139
|
"attribute": "headline"
|
|
1234
|
-
},
|
|
1235
|
-
{
|
|
1236
|
-
"kind": "field",
|
|
1237
|
-
"name": "size",
|
|
1238
|
-
"type": {
|
|
1239
|
-
"text": "{ width?: string; height?: string } | undefined"
|
|
1240
|
-
},
|
|
1241
|
-
"default": "undefined",
|
|
1242
|
-
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
1243
|
-
"attribute": "size"
|
|
1244
1140
|
}
|
|
1245
1141
|
],
|
|
1246
1142
|
"attributes": [
|
|
1247
1143
|
{
|
|
1248
|
-
"name": "
|
|
1144
|
+
"name": "fields",
|
|
1249
1145
|
"type": {
|
|
1250
|
-
"text": "
|
|
1146
|
+
"text": "string[]"
|
|
1251
1147
|
},
|
|
1252
|
-
"default": "
|
|
1253
|
-
"description": "The
|
|
1254
|
-
"fieldName": "
|
|
1148
|
+
"default": "[]",
|
|
1149
|
+
"description": "The fields to aggregate by.",
|
|
1150
|
+
"fieldName": "fields"
|
|
1255
1151
|
},
|
|
1256
1152
|
{
|
|
1257
|
-
"name": "
|
|
1153
|
+
"name": "views",
|
|
1258
1154
|
"type": {
|
|
1259
|
-
"text": "
|
|
1155
|
+
"text": "View[]"
|
|
1260
1156
|
},
|
|
1261
|
-
"default": "
|
|
1262
|
-
"description": "The
|
|
1263
|
-
"fieldName": "
|
|
1157
|
+
"default": "['table']",
|
|
1158
|
+
"description": "The views are used to display the aggregated data.\nIn the table view, the data is presented in a table format where each field is a column,\nalong with the aggregated value and its proportion.\nThe proportion represents the ratio of the aggregated value to the total count of the data\n(considering the applied filter).",
|
|
1159
|
+
"fieldName": "views"
|
|
1264
1160
|
},
|
|
1265
1161
|
{
|
|
1266
|
-
"name": "
|
|
1162
|
+
"name": "filter",
|
|
1267
1163
|
"type": {
|
|
1268
|
-
"text": "
|
|
1164
|
+
"text": "LapisFilter"
|
|
1269
1165
|
},
|
|
1270
|
-
"default": "
|
|
1271
|
-
"description": "The
|
|
1272
|
-
"fieldName": "
|
|
1166
|
+
"default": "{}",
|
|
1167
|
+
"description": "The filter to apply to the data.",
|
|
1168
|
+
"fieldName": "filter"
|
|
1273
1169
|
},
|
|
1274
1170
|
{
|
|
1275
|
-
"name": "
|
|
1171
|
+
"name": "size",
|
|
1276
1172
|
"type": {
|
|
1277
|
-
"text": "
|
|
1173
|
+
"text": "{ width?: string; height?: string } | undefined"
|
|
1278
1174
|
},
|
|
1279
|
-
"default": "
|
|
1280
|
-
"description": "
|
|
1281
|
-
"fieldName": "
|
|
1175
|
+
"default": "undefined",
|
|
1176
|
+
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
1177
|
+
"fieldName": "size"
|
|
1282
1178
|
},
|
|
1283
1179
|
{
|
|
1284
1180
|
"name": "headline",
|
|
1285
1181
|
"type": {
|
|
1286
1182
|
"text": "string | undefined"
|
|
1287
1183
|
},
|
|
1288
|
-
"default": "'
|
|
1184
|
+
"default": "'Aggregate'",
|
|
1289
1185
|
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1290
1186
|
"fieldName": "headline"
|
|
1291
|
-
},
|
|
1292
|
-
{
|
|
1293
|
-
"name": "size",
|
|
1294
|
-
"type": {
|
|
1295
|
-
"text": "{ width?: string; height?: string } | undefined"
|
|
1296
|
-
},
|
|
1297
|
-
"default": "undefined",
|
|
1298
|
-
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
1299
|
-
"fieldName": "size"
|
|
1300
1187
|
}
|
|
1301
1188
|
],
|
|
1302
1189
|
"superclass": {
|
|
1303
|
-
"name": "
|
|
1304
|
-
"module": "/src/web-components/
|
|
1190
|
+
"name": "PreactLitAdapterWithGridJsStyles",
|
|
1191
|
+
"module": "/src/web-components/PreactLitAdapterWithGridJsStyles"
|
|
1305
1192
|
},
|
|
1306
|
-
"tagName": "gs-
|
|
1193
|
+
"tagName": "gs-aggregate",
|
|
1307
1194
|
"customElement": true
|
|
1308
1195
|
}
|
|
1309
1196
|
],
|
|
1310
1197
|
"exports": [
|
|
1311
1198
|
{
|
|
1312
1199
|
"kind": "js",
|
|
1313
|
-
"name": "
|
|
1200
|
+
"name": "AggregateComponent",
|
|
1314
1201
|
"declaration": {
|
|
1315
|
-
"name": "
|
|
1316
|
-
"module": "src/web-components/
|
|
1202
|
+
"name": "AggregateComponent",
|
|
1203
|
+
"module": "src/web-components/visualization/gs-aggregate.tsx"
|
|
1317
1204
|
}
|
|
1318
1205
|
},
|
|
1319
1206
|
{
|
|
1320
1207
|
"kind": "custom-element-definition",
|
|
1321
|
-
"name": "gs-
|
|
1208
|
+
"name": "gs-aggregate",
|
|
1322
1209
|
"declaration": {
|
|
1323
|
-
"name": "
|
|
1324
|
-
"module": "src/web-components/
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
]
|
|
1328
|
-
},
|
|
1329
|
-
{
|
|
1330
|
-
"kind": "javascript-module",
|
|
1331
|
-
"path": "src/web-components/index.ts",
|
|
1332
|
-
"declarations": [],
|
|
1333
|
-
"exports": [
|
|
1334
|
-
{
|
|
1335
|
-
"kind": "js",
|
|
1336
|
-
"name": "App",
|
|
1337
|
-
"declaration": {
|
|
1338
|
-
"name": "App",
|
|
1339
|
-
"module": "./app.js"
|
|
1340
|
-
}
|
|
1341
|
-
},
|
|
1342
|
-
{
|
|
1343
|
-
"kind": "js",
|
|
1344
|
-
"name": "*",
|
|
1345
|
-
"declaration": {
|
|
1346
|
-
"name": "*",
|
|
1347
|
-
"package": "./display"
|
|
1348
|
-
}
|
|
1349
|
-
},
|
|
1350
|
-
{
|
|
1351
|
-
"kind": "js",
|
|
1352
|
-
"name": "*",
|
|
1353
|
-
"declaration": {
|
|
1354
|
-
"name": "*",
|
|
1355
|
-
"package": "./input"
|
|
1210
|
+
"name": "AggregateComponent",
|
|
1211
|
+
"module": "src/web-components/visualization/gs-aggregate.tsx"
|
|
1356
1212
|
}
|
|
1357
1213
|
}
|
|
1358
1214
|
]
|
|
1359
1215
|
},
|
|
1360
1216
|
{
|
|
1361
1217
|
"kind": "javascript-module",
|
|
1362
|
-
"path": "src/web-components/
|
|
1218
|
+
"path": "src/web-components/visualization/gs-mutation-comparison.stories.ts",
|
|
1363
1219
|
"declarations": [
|
|
1364
1220
|
{
|
|
1365
1221
|
"kind": "variable",
|
|
1366
|
-
"name": "meta",
|
|
1222
|
+
"name": "meta",
|
|
1223
|
+
"type": {
|
|
1224
|
+
"text": "Meta<MutationComparisonProps>"
|
|
1225
|
+
},
|
|
1226
|
+
"default": "{ title: 'Visualization/Mutation comparison', component: 'gs-mutation-comparison', argTypes: { variants: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'venn'], control: { type: 'check' }, }, size: { control: 'object' }, headline: { control: 'text' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
"kind": "variable",
|
|
1230
|
+
"name": "Default",
|
|
1367
1231
|
"type": {
|
|
1368
|
-
"text": "
|
|
1232
|
+
"text": "StoryObj<MutationComparisonProps>"
|
|
1369
1233
|
},
|
|
1370
|
-
"default": "{
|
|
1234
|
+
"default": "{ ...Template, args: { variants: [ { displayName: 'Some variant', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo }, }, { displayName: 'Other variant', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, }, }, ], sequenceType: 'nucleotide', views: ['table', 'venn'], size: { width: '100%', height: '700px' }, headline: 'Mutation comparison', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'nucleotideMutationsSomeVariant', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsSomeVariant, }, }, { matcher: { name: 'nucleotideMutationsOtherVariant', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsOtherVariant, }, }, ], }, }, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-comparison'); await step('Min and max proportions should be 50% and 100%', async () => { const minInput = () => canvas.getAllByLabelText('%')[0]; const maxInput = () => canvas.getAllByLabelText('%')[1]; await waitFor(() => expect(minInput()).toHaveValue(50)); await waitFor(() => expect(maxInput()).toHaveValue(100)); }); }, }"
|
|
1371
1235
|
},
|
|
1372
1236
|
{
|
|
1373
1237
|
"kind": "variable",
|
|
1374
|
-
"name": "
|
|
1238
|
+
"name": "VennDiagram",
|
|
1375
1239
|
"type": {
|
|
1376
|
-
"text": "StoryObj<
|
|
1240
|
+
"text": "StoryObj<MutationComparisonProps>"
|
|
1377
1241
|
},
|
|
1378
|
-
"default": "{
|
|
1242
|
+
"default": "{ ...Default, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-comparison'); await step('Switch to Venn diagram view', async () => { await waitFor(() => expect(canvas.getByRole('button', { name: 'Venn' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Venn' })); await waitFor(() => expect( canvas.getByText('You have no elements selected. Click in the venn diagram to select.'), ).toBeVisible(), ); }); }, }"
|
|
1379
1243
|
}
|
|
1380
1244
|
],
|
|
1381
1245
|
"exports": [
|
|
@@ -1384,206 +1248,196 @@
|
|
|
1384
1248
|
"name": "default",
|
|
1385
1249
|
"declaration": {
|
|
1386
1250
|
"name": "meta",
|
|
1387
|
-
"module": "src/web-components/
|
|
1251
|
+
"module": "src/web-components/visualization/gs-mutation-comparison.stories.ts"
|
|
1388
1252
|
}
|
|
1389
1253
|
},
|
|
1390
1254
|
{
|
|
1391
1255
|
"kind": "js",
|
|
1392
|
-
"name": "
|
|
1256
|
+
"name": "Default",
|
|
1393
1257
|
"declaration": {
|
|
1394
|
-
"name": "
|
|
1395
|
-
"module": "src/web-components/
|
|
1258
|
+
"name": "Default",
|
|
1259
|
+
"module": "src/web-components/visualization/gs-mutation-comparison.stories.ts"
|
|
1260
|
+
}
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
"kind": "js",
|
|
1264
|
+
"name": "VennDiagram",
|
|
1265
|
+
"declaration": {
|
|
1266
|
+
"name": "VennDiagram",
|
|
1267
|
+
"module": "src/web-components/visualization/gs-mutation-comparison.stories.ts"
|
|
1396
1268
|
}
|
|
1397
1269
|
}
|
|
1398
1270
|
]
|
|
1399
1271
|
},
|
|
1400
1272
|
{
|
|
1401
1273
|
"kind": "javascript-module",
|
|
1402
|
-
"path": "src/web-components/
|
|
1274
|
+
"path": "src/web-components/visualization/gs-mutation-comparison.tsx",
|
|
1403
1275
|
"declarations": [
|
|
1404
1276
|
{
|
|
1405
1277
|
"kind": "class",
|
|
1406
|
-
"description": "
|
|
1407
|
-
"name": "
|
|
1278
|
+
"description": "This component allows to compare mutations between different variants.\nA variant is defined by its LAPIS filter.\n\nIt only shows substitutions and deletions, it does not show insertions.\n\n## Views\n\n### Table View\n\nThe table view shows mutations\nand the proportions with which the mutation occurs in the respective variant.\nIt only shows mutations that are present in at least one of the variants\nand where the proportion is within the selected proportion interval for at least one variant.\n\n### Venn View\n\nThe Venn view shows the overlap of mutations between the variants in a Venn diagram.\nA variant is considered to have a certain mutation,\nif the proportion of the mutation in the variant is within the selected proportion interval.\nThus, changing the proportion interval may change a mutations from being \"common\" between variant\nto being \"for one variant only\".",
|
|
1279
|
+
"name": "MutationComparisonComponent",
|
|
1408
1280
|
"members": [
|
|
1409
1281
|
{
|
|
1410
1282
|
"kind": "field",
|
|
1411
|
-
"name": "
|
|
1283
|
+
"name": "variants",
|
|
1412
1284
|
"type": {
|
|
1413
|
-
"text": "{
|
|
1285
|
+
"text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
|
|
1414
1286
|
},
|
|
1415
1287
|
"default": "[]",
|
|
1416
|
-
"description": "An array of
|
|
1417
|
-
"attribute": "
|
|
1288
|
+
"description": "An array of variants to compare.\n\nThe `lapisFilter` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used as the label for the variant in the views.\nIt should be human-readable.",
|
|
1289
|
+
"attribute": "variants"
|
|
1418
1290
|
},
|
|
1419
1291
|
{
|
|
1420
1292
|
"kind": "field",
|
|
1421
|
-
"name": "
|
|
1293
|
+
"name": "sequenceType",
|
|
1422
1294
|
"type": {
|
|
1423
|
-
"text": "
|
|
1295
|
+
"text": "'nucleotide' | 'amino acid'"
|
|
1424
1296
|
},
|
|
1425
|
-
"default": "'
|
|
1426
|
-
"description": "The
|
|
1427
|
-
"attribute": "
|
|
1297
|
+
"default": "'nucleotide'",
|
|
1298
|
+
"description": "The type of the sequence for which the mutations should be shown.",
|
|
1299
|
+
"attribute": "sequenceType"
|
|
1428
1300
|
},
|
|
1429
1301
|
{
|
|
1430
1302
|
"kind": "field",
|
|
1431
|
-
"name": "
|
|
1303
|
+
"name": "views",
|
|
1432
1304
|
"type": {
|
|
1433
|
-
"text": "'
|
|
1305
|
+
"text": "('table' | 'venn')[]"
|
|
1434
1306
|
},
|
|
1435
|
-
"default": "'
|
|
1436
|
-
"description": "
|
|
1437
|
-
"attribute": "
|
|
1438
|
-
}
|
|
1439
|
-
],
|
|
1440
|
-
"events": [
|
|
1307
|
+
"default": "['table']",
|
|
1308
|
+
"description": "A list of tabs with views that this component should provide.",
|
|
1309
|
+
"attribute": "views"
|
|
1310
|
+
},
|
|
1441
1311
|
{
|
|
1312
|
+
"kind": "field",
|
|
1313
|
+
"name": "size",
|
|
1442
1314
|
"type": {
|
|
1443
|
-
"text": "
|
|
1315
|
+
"text": "{ width?: string; height?: string } | undefined"
|
|
1444
1316
|
},
|
|
1445
|
-
"
|
|
1446
|
-
"
|
|
1317
|
+
"default": "undefined",
|
|
1318
|
+
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
1319
|
+
"attribute": "size"
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
"kind": "field",
|
|
1323
|
+
"name": "headline",
|
|
1324
|
+
"type": {
|
|
1325
|
+
"text": "string | undefined"
|
|
1326
|
+
},
|
|
1327
|
+
"default": "'Mutation comparison'",
|
|
1328
|
+
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1329
|
+
"attribute": "headline"
|
|
1447
1330
|
}
|
|
1448
1331
|
],
|
|
1449
1332
|
"attributes": [
|
|
1450
1333
|
{
|
|
1451
|
-
"name": "
|
|
1334
|
+
"name": "variants",
|
|
1452
1335
|
"type": {
|
|
1453
|
-
"text": "{
|
|
1336
|
+
"text": "{\n lapisFilter: Record<string, string | number | null | boolean>;\n displayName: string;\n }[]"
|
|
1454
1337
|
},
|
|
1455
1338
|
"default": "[]",
|
|
1456
|
-
"description": "An array of
|
|
1457
|
-
"fieldName": "
|
|
1339
|
+
"description": "An array of variants to compare.\n\nThe `lapisFilter` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.\n\nThe `displayName` will be used as the label for the variant in the views.\nIt should be human-readable.",
|
|
1340
|
+
"fieldName": "variants"
|
|
1458
1341
|
},
|
|
1459
1342
|
{
|
|
1460
|
-
"name": "
|
|
1343
|
+
"name": "sequenceType",
|
|
1461
1344
|
"type": {
|
|
1462
|
-
"text": "
|
|
1345
|
+
"text": "'nucleotide' | 'amino acid'"
|
|
1463
1346
|
},
|
|
1464
|
-
"default": "'
|
|
1465
|
-
"description": "The
|
|
1466
|
-
"fieldName": "
|
|
1347
|
+
"default": "'nucleotide'",
|
|
1348
|
+
"description": "The type of the sequence for which the mutations should be shown.",
|
|
1349
|
+
"fieldName": "sequenceType"
|
|
1467
1350
|
},
|
|
1468
1351
|
{
|
|
1469
|
-
"name": "
|
|
1352
|
+
"name": "views",
|
|
1470
1353
|
"type": {
|
|
1471
|
-
"text": "'
|
|
1354
|
+
"text": "('table' | 'venn')[]"
|
|
1472
1355
|
},
|
|
1473
|
-
"default": "'
|
|
1474
|
-
"description": "
|
|
1475
|
-
"fieldName": "
|
|
1356
|
+
"default": "['table']",
|
|
1357
|
+
"description": "A list of tabs with views that this component should provide.",
|
|
1358
|
+
"fieldName": "views"
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
"name": "size",
|
|
1362
|
+
"type": {
|
|
1363
|
+
"text": "{ width?: string; height?: string } | undefined"
|
|
1364
|
+
},
|
|
1365
|
+
"default": "undefined",
|
|
1366
|
+
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
1367
|
+
"fieldName": "size"
|
|
1368
|
+
},
|
|
1369
|
+
{
|
|
1370
|
+
"name": "headline",
|
|
1371
|
+
"type": {
|
|
1372
|
+
"text": "string | undefined"
|
|
1373
|
+
},
|
|
1374
|
+
"default": "'Mutation comparison'",
|
|
1375
|
+
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1376
|
+
"fieldName": "headline"
|
|
1476
1377
|
}
|
|
1477
1378
|
],
|
|
1478
1379
|
"superclass": {
|
|
1479
|
-
"name": "
|
|
1480
|
-
"module": "/src/web-components/
|
|
1380
|
+
"name": "PreactLitAdapterWithGridJsStyles",
|
|
1381
|
+
"module": "/src/web-components/PreactLitAdapterWithGridJsStyles"
|
|
1481
1382
|
},
|
|
1482
|
-
"tagName": "gs-
|
|
1383
|
+
"tagName": "gs-mutation-comparison",
|
|
1483
1384
|
"customElement": true
|
|
1484
1385
|
}
|
|
1485
1386
|
],
|
|
1486
1387
|
"exports": [
|
|
1487
1388
|
{
|
|
1488
1389
|
"kind": "js",
|
|
1489
|
-
"name": "
|
|
1390
|
+
"name": "MutationComparisonComponent",
|
|
1490
1391
|
"declaration": {
|
|
1491
|
-
"name": "
|
|
1492
|
-
"module": "src/web-components/
|
|
1392
|
+
"name": "MutationComparisonComponent",
|
|
1393
|
+
"module": "src/web-components/visualization/gs-mutation-comparison.tsx"
|
|
1493
1394
|
}
|
|
1494
1395
|
},
|
|
1495
1396
|
{
|
|
1496
1397
|
"kind": "custom-element-definition",
|
|
1497
|
-
"name": "gs-
|
|
1498
|
-
"declaration": {
|
|
1499
|
-
"name": "DateRangeSelectorComponent",
|
|
1500
|
-
"module": "src/web-components/input/date-range-selector-component.tsx"
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
]
|
|
1504
|
-
},
|
|
1505
|
-
{
|
|
1506
|
-
"kind": "javascript-module",
|
|
1507
|
-
"path": "src/web-components/input/index.ts",
|
|
1508
|
-
"declarations": [],
|
|
1509
|
-
"exports": [
|
|
1510
|
-
{
|
|
1511
|
-
"kind": "js",
|
|
1512
|
-
"name": "DateRangeSelectorComponent",
|
|
1513
|
-
"declaration": {
|
|
1514
|
-
"name": "DateRangeSelectorComponent",
|
|
1515
|
-
"module": "./date-range-selector-component"
|
|
1516
|
-
}
|
|
1517
|
-
},
|
|
1518
|
-
{
|
|
1519
|
-
"kind": "js",
|
|
1520
|
-
"name": "LocationFilterComponent",
|
|
1521
|
-
"declaration": {
|
|
1522
|
-
"name": "LocationFilterComponent",
|
|
1523
|
-
"module": "./location-filter-component"
|
|
1524
|
-
}
|
|
1525
|
-
},
|
|
1526
|
-
{
|
|
1527
|
-
"kind": "js",
|
|
1528
|
-
"name": "TextInputComponent",
|
|
1529
|
-
"declaration": {
|
|
1530
|
-
"name": "TextInputComponent",
|
|
1531
|
-
"module": "./text-input-component"
|
|
1532
|
-
}
|
|
1533
|
-
},
|
|
1534
|
-
{
|
|
1535
|
-
"kind": "js",
|
|
1536
|
-
"name": "MutationFilterComponent",
|
|
1398
|
+
"name": "gs-mutation-comparison",
|
|
1537
1399
|
"declaration": {
|
|
1538
|
-
"name": "
|
|
1539
|
-
"module": "
|
|
1400
|
+
"name": "MutationComparisonComponent",
|
|
1401
|
+
"module": "src/web-components/visualization/gs-mutation-comparison.tsx"
|
|
1540
1402
|
}
|
|
1541
1403
|
}
|
|
1542
1404
|
]
|
|
1543
1405
|
},
|
|
1544
1406
|
{
|
|
1545
1407
|
"kind": "javascript-module",
|
|
1546
|
-
"path": "src/web-components/
|
|
1408
|
+
"path": "src/web-components/visualization/gs-mutations.stories.ts",
|
|
1547
1409
|
"declarations": [
|
|
1548
1410
|
{
|
|
1549
1411
|
"kind": "variable",
|
|
1550
1412
|
"name": "meta",
|
|
1551
1413
|
"type": {
|
|
1552
|
-
"text": "Meta"
|
|
1553
|
-
},
|
|
1554
|
-
"default": "{ title: 'Input/Location filter', component: 'gs-location-filter', parameters: withComponentDocs({ actions: { handles: ['gs-location-changed'], }, componentDocs: { tag: 'gs-location-filter', opensShadowDom: true, expectsChildren: false, codeExample: `<gs-location-filter fields=\"['continent', 'country']\" value='Europe / Switzerland'></gs-location-filter>`, }, }), decorators: [withActions], tags: ['autodocs'], }"
|
|
1555
|
-
},
|
|
1556
|
-
{
|
|
1557
|
-
"kind": "variable",
|
|
1558
|
-
"name": "LocationFilter",
|
|
1559
|
-
"type": {
|
|
1560
|
-
"text": "StoryObj<LocationFilterProps>"
|
|
1414
|
+
"text": "Meta<MutationsProps>"
|
|
1561
1415
|
},
|
|
1562
|
-
"default": "{
|
|
1416
|
+
"default": "{ title: 'Visualization/Mutations', component: 'gs-mutations', argTypes: { variant: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'grid', 'insertions'], control: { type: 'check' }, }, size: { control: 'object' }, headline: { control: 'text' }, }, args: { variant: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo: '2022-01-01' }, sequenceType: 'nucleotide', views: ['grid', 'table', 'insertions'], size: { width: '100%', height: '700px' }, headline: 'Mutations', }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1563
1417
|
},
|
|
1564
1418
|
{
|
|
1565
1419
|
"kind": "variable",
|
|
1566
|
-
"name": "
|
|
1420
|
+
"name": "Default",
|
|
1567
1421
|
"type": {
|
|
1568
|
-
"text": "StoryObj<
|
|
1422
|
+
"text": "StoryObj<MutationsProps>"
|
|
1569
1423
|
},
|
|
1570
|
-
"default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher:
|
|
1424
|
+
"default": "{ ...Template, parameters: { fetchMock: { mocks: [ { matcher: { name: 'nucleotideMutations', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo: '2022-01-01', minProportion: 0, }, }, response: { status: 200, body: nucleotideMutations, }, }, { matcher: { name: 'nucleotideInsertions', url: NUCLEOTIDE_INSERTIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo: '2022-01-01' }, }, response: { status: 200, body: nucleotideInsertions, }, }, ], }, }, }"
|
|
1571
1425
|
},
|
|
1572
1426
|
{
|
|
1573
1427
|
"kind": "variable",
|
|
1574
|
-
"name": "
|
|
1428
|
+
"name": "OnTableTab",
|
|
1575
1429
|
"type": {
|
|
1576
|
-
"text": "StoryObj<
|
|
1430
|
+
"text": "StoryObj<MutationsProps>"
|
|
1577
1431
|
},
|
|
1578
|
-
"default": "{ ...
|
|
1432
|
+
"default": "{ ...Default, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutations'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Table' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Table' })); }, }"
|
|
1579
1433
|
},
|
|
1580
1434
|
{
|
|
1581
1435
|
"kind": "variable",
|
|
1582
|
-
"name": "
|
|
1436
|
+
"name": "OnInsertionsTab",
|
|
1583
1437
|
"type": {
|
|
1584
|
-
"text": "StoryObj<
|
|
1438
|
+
"text": "StoryObj<MutationsProps>"
|
|
1585
1439
|
},
|
|
1586
|
-
"default": "{ ...
|
|
1440
|
+
"default": "{ ...Default, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutations'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Insertions' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Insertions' })); }, }"
|
|
1587
1441
|
}
|
|
1588
1442
|
],
|
|
1589
1443
|
"exports": [
|
|
@@ -1592,164 +1446,220 @@
|
|
|
1592
1446
|
"name": "default",
|
|
1593
1447
|
"declaration": {
|
|
1594
1448
|
"name": "meta",
|
|
1595
|
-
"module": "src/web-components/
|
|
1596
|
-
}
|
|
1597
|
-
},
|
|
1598
|
-
{
|
|
1599
|
-
"kind": "js",
|
|
1600
|
-
"name": "LocationFilter",
|
|
1601
|
-
"declaration": {
|
|
1602
|
-
"name": "LocationFilter",
|
|
1603
|
-
"module": "src/web-components/input/location-filter-component.stories.ts"
|
|
1449
|
+
"module": "src/web-components/visualization/gs-mutations.stories.ts"
|
|
1604
1450
|
}
|
|
1605
1451
|
},
|
|
1606
1452
|
{
|
|
1607
1453
|
"kind": "js",
|
|
1608
|
-
"name": "
|
|
1454
|
+
"name": "Default",
|
|
1609
1455
|
"declaration": {
|
|
1610
|
-
"name": "
|
|
1611
|
-
"module": "src/web-components/
|
|
1456
|
+
"name": "Default",
|
|
1457
|
+
"module": "src/web-components/visualization/gs-mutations.stories.ts"
|
|
1612
1458
|
}
|
|
1613
1459
|
},
|
|
1614
1460
|
{
|
|
1615
1461
|
"kind": "js",
|
|
1616
|
-
"name": "
|
|
1462
|
+
"name": "OnTableTab",
|
|
1617
1463
|
"declaration": {
|
|
1618
|
-
"name": "
|
|
1619
|
-
"module": "src/web-components/
|
|
1464
|
+
"name": "OnTableTab",
|
|
1465
|
+
"module": "src/web-components/visualization/gs-mutations.stories.ts"
|
|
1620
1466
|
}
|
|
1621
1467
|
},
|
|
1622
1468
|
{
|
|
1623
1469
|
"kind": "js",
|
|
1624
|
-
"name": "
|
|
1470
|
+
"name": "OnInsertionsTab",
|
|
1625
1471
|
"declaration": {
|
|
1626
|
-
"name": "
|
|
1627
|
-
"module": "src/web-components/
|
|
1472
|
+
"name": "OnInsertionsTab",
|
|
1473
|
+
"module": "src/web-components/visualization/gs-mutations.stories.ts"
|
|
1628
1474
|
}
|
|
1629
1475
|
}
|
|
1630
1476
|
]
|
|
1631
1477
|
},
|
|
1632
1478
|
{
|
|
1633
1479
|
"kind": "javascript-module",
|
|
1634
|
-
"path": "src/web-components/
|
|
1480
|
+
"path": "src/web-components/visualization/gs-mutations.tsx",
|
|
1635
1481
|
"declarations": [
|
|
1636
1482
|
{
|
|
1637
1483
|
"kind": "class",
|
|
1638
|
-
"description": "##
|
|
1639
|
-
"name": "
|
|
1484
|
+
"description": "This component displays mutations (substitutions, deletions and insertions) for a given variant.\n\n## Views\n\n### Table View\n\nThe table view shows all substitutions and deletions for the given variant.\nIt shows the type (substitution or deletion), the total count of the mutation\nand the proportion of the mutation in the variant.\nThe proportion is relative to the total number of sequences matching\nthe specified sequence filters with non-ambiguous reads at that position.\n\nThe proportion interval filter can be used to filter the displayed mutations on client side.\n\n### Grid View\n\nThe grid view shows the proportion of each sequence symbol (nucleotide or amino acid) for each position that has a mutation.\nOnly positions with at least one mutation in the selected proportion interval are shown.\n\n### Insertions View\n\nThe insertions view shows the count of all insertions for the given variant.",
|
|
1485
|
+
"name": "MutationsComponent",
|
|
1640
1486
|
"members": [
|
|
1641
1487
|
{
|
|
1642
1488
|
"kind": "field",
|
|
1643
|
-
"name": "
|
|
1489
|
+
"name": "variant",
|
|
1644
1490
|
"type": {
|
|
1645
|
-
"text": "string"
|
|
1491
|
+
"text": "Record<string, string | number | null | boolean>"
|
|
1646
1492
|
},
|
|
1647
|
-
"default": "
|
|
1648
|
-
"description": "The
|
|
1649
|
-
"attribute": "
|
|
1493
|
+
"default": "{}",
|
|
1494
|
+
"description": "The `variant` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.",
|
|
1495
|
+
"attribute": "variant"
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
"kind": "field",
|
|
1499
|
+
"name": "sequenceType",
|
|
1500
|
+
"type": {
|
|
1501
|
+
"text": "'nucleotide' | 'amino acid'"
|
|
1502
|
+
},
|
|
1503
|
+
"default": "'nucleotide'",
|
|
1504
|
+
"description": "The type of the sequence for which the mutations should be shown.",
|
|
1505
|
+
"attribute": "sequenceType"
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
"kind": "field",
|
|
1509
|
+
"name": "views",
|
|
1510
|
+
"type": {
|
|
1511
|
+
"text": "('table' | 'grid' | 'insertions')[]"
|
|
1512
|
+
},
|
|
1513
|
+
"default": "['table', 'grid']",
|
|
1514
|
+
"description": "A list of tabs with views that this component should provide.",
|
|
1515
|
+
"attribute": "views"
|
|
1516
|
+
},
|
|
1517
|
+
{
|
|
1518
|
+
"kind": "field",
|
|
1519
|
+
"name": "size",
|
|
1520
|
+
"type": {
|
|
1521
|
+
"text": "{ width?: string; height?: string } | undefined"
|
|
1522
|
+
},
|
|
1523
|
+
"default": "undefined",
|
|
1524
|
+
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
1525
|
+
"attribute": "size"
|
|
1650
1526
|
},
|
|
1651
1527
|
{
|
|
1652
1528
|
"kind": "field",
|
|
1653
|
-
"name": "
|
|
1529
|
+
"name": "headline",
|
|
1654
1530
|
"type": {
|
|
1655
|
-
"text": "string
|
|
1531
|
+
"text": "string | undefined"
|
|
1656
1532
|
},
|
|
1657
|
-
"default": "
|
|
1658
|
-
"description": "The
|
|
1659
|
-
"attribute": "
|
|
1533
|
+
"default": "'Mutations'",
|
|
1534
|
+
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1535
|
+
"attribute": "headline"
|
|
1660
1536
|
}
|
|
1661
1537
|
],
|
|
1662
|
-
"
|
|
1538
|
+
"attributes": [
|
|
1663
1539
|
{
|
|
1540
|
+
"name": "variant",
|
|
1664
1541
|
"type": {
|
|
1665
|
-
"text": "
|
|
1542
|
+
"text": "Record<string, string | number | null | boolean>"
|
|
1666
1543
|
},
|
|
1667
|
-
"
|
|
1668
|
-
"
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
"attributes": [
|
|
1544
|
+
"default": "{}",
|
|
1545
|
+
"description": "The `variant` will be sent as is to LAPIS to filter the mutation data.\nIt must be a valid LAPIS filter object.",
|
|
1546
|
+
"fieldName": "variant"
|
|
1547
|
+
},
|
|
1672
1548
|
{
|
|
1673
|
-
"name": "
|
|
1549
|
+
"name": "sequenceType",
|
|
1674
1550
|
"type": {
|
|
1675
|
-
"text": "
|
|
1551
|
+
"text": "'nucleotide' | 'amino acid'"
|
|
1676
1552
|
},
|
|
1677
|
-
"default": "''",
|
|
1678
|
-
"description": "The
|
|
1679
|
-
"fieldName": "
|
|
1553
|
+
"default": "'nucleotide'",
|
|
1554
|
+
"description": "The type of the sequence for which the mutations should be shown.",
|
|
1555
|
+
"fieldName": "sequenceType"
|
|
1680
1556
|
},
|
|
1681
1557
|
{
|
|
1682
|
-
"name": "
|
|
1558
|
+
"name": "views",
|
|
1683
1559
|
"type": {
|
|
1684
|
-
"text": "
|
|
1560
|
+
"text": "('table' | 'grid' | 'insertions')[]"
|
|
1685
1561
|
},
|
|
1686
|
-
"default": "[]",
|
|
1687
|
-
"description": "
|
|
1688
|
-
"fieldName": "
|
|
1562
|
+
"default": "['table', 'grid']",
|
|
1563
|
+
"description": "A list of tabs with views that this component should provide.",
|
|
1564
|
+
"fieldName": "views"
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
"name": "size",
|
|
1568
|
+
"type": {
|
|
1569
|
+
"text": "{ width?: string; height?: string } | undefined"
|
|
1570
|
+
},
|
|
1571
|
+
"default": "undefined",
|
|
1572
|
+
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
1573
|
+
"fieldName": "size"
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"name": "headline",
|
|
1577
|
+
"type": {
|
|
1578
|
+
"text": "string | undefined"
|
|
1579
|
+
},
|
|
1580
|
+
"default": "'Mutations'",
|
|
1581
|
+
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1582
|
+
"fieldName": "headline"
|
|
1689
1583
|
}
|
|
1690
1584
|
],
|
|
1691
1585
|
"superclass": {
|
|
1692
|
-
"name": "
|
|
1693
|
-
"module": "/src/web-components/
|
|
1586
|
+
"name": "PreactLitAdapterWithGridJsStyles",
|
|
1587
|
+
"module": "/src/web-components/PreactLitAdapterWithGridJsStyles"
|
|
1694
1588
|
},
|
|
1695
|
-
"tagName": "gs-
|
|
1589
|
+
"tagName": "gs-mutations",
|
|
1696
1590
|
"customElement": true
|
|
1697
1591
|
}
|
|
1698
1592
|
],
|
|
1699
1593
|
"exports": [
|
|
1700
1594
|
{
|
|
1701
1595
|
"kind": "js",
|
|
1702
|
-
"name": "
|
|
1596
|
+
"name": "MutationsComponent",
|
|
1703
1597
|
"declaration": {
|
|
1704
|
-
"name": "
|
|
1705
|
-
"module": "src/web-components/
|
|
1598
|
+
"name": "MutationsComponent",
|
|
1599
|
+
"module": "src/web-components/visualization/gs-mutations.tsx"
|
|
1706
1600
|
}
|
|
1707
1601
|
},
|
|
1708
1602
|
{
|
|
1709
1603
|
"kind": "custom-element-definition",
|
|
1710
|
-
"name": "gs-
|
|
1604
|
+
"name": "gs-mutations",
|
|
1711
1605
|
"declaration": {
|
|
1712
|
-
"name": "
|
|
1713
|
-
"module": "src/web-components/
|
|
1606
|
+
"name": "MutationsComponent",
|
|
1607
|
+
"module": "src/web-components/visualization/gs-mutations.tsx"
|
|
1714
1608
|
}
|
|
1715
1609
|
}
|
|
1716
1610
|
]
|
|
1717
1611
|
},
|
|
1718
1612
|
{
|
|
1719
1613
|
"kind": "javascript-module",
|
|
1720
|
-
"path": "src/web-components/
|
|
1614
|
+
"path": "src/web-components/visualization/gs-prevalence-over-time.stories.ts",
|
|
1721
1615
|
"declarations": [
|
|
1722
1616
|
{
|
|
1723
1617
|
"kind": "variable",
|
|
1724
1618
|
"name": "meta",
|
|
1725
1619
|
"type": {
|
|
1726
|
-
"text": "Meta<
|
|
1620
|
+
"text": "Meta<PrevalenceOverTimeProps>"
|
|
1727
1621
|
},
|
|
1728
|
-
"default": "{ title: '
|
|
1622
|
+
"default": "{ title: 'Visualization/Prevalence over time', component: 'gs-prevalence-over-time', argTypes: { numerator: { control: 'object' }, denominator: { control: 'object' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, smoothingWindow: { control: 'number' }, views: { options: ['bar', 'line', 'bubble', 'table'], control: { type: 'check' }, }, confidenceIntervalMethods: { options: ['wilson'], control: { type: 'check' }, }, size: [{ control: 'object' }], headline: { control: 'text' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1729
1623
|
},
|
|
1730
1624
|
{
|
|
1731
1625
|
"kind": "variable",
|
|
1732
|
-
"name": "
|
|
1626
|
+
"name": "TwoVariants",
|
|
1733
1627
|
"type": {
|
|
1734
|
-
"text": "StoryObj<
|
|
1628
|
+
"text": "StoryObj<PrevalenceOverTimeProps>"
|
|
1735
1629
|
},
|
|
1736
|
-
"default": "{ ...Template, args: {
|
|
1630
|
+
"default": "{ ...Template, args: { numerator: [ { displayName: 'EG', country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01' }, { displayName: 'JN.1', country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' }, ], denominator: { country: 'USA', dateFrom: '2023-01-01', displayName: 'All' }, granularity: 'month', smoothingWindow: 0, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], size: { width: '100%', height: '700px' }, headline: 'Prevalence over time', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorEG, }, }, { matcher: { name: 'numeratorJN1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorJN1, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: denominator, }, }, ], }, }, }"
|
|
1737
1631
|
},
|
|
1738
1632
|
{
|
|
1739
1633
|
"kind": "variable",
|
|
1740
|
-
"name": "
|
|
1634
|
+
"name": "OneVariant",
|
|
1741
1635
|
"type": {
|
|
1742
|
-
"text": "StoryObj<
|
|
1636
|
+
"text": "StoryObj<PrevalenceOverTimeProps>"
|
|
1743
1637
|
},
|
|
1744
|
-
"default": "{ ...Template,
|
|
1638
|
+
"default": "{ ...Template, args: { numerator: { displayName: 'EG', country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01' }, denominator: { country: 'USA', dateFrom: '2023-10-01', displayName: 'All' }, granularity: 'day', smoothingWindow: 7, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], size: { width: '100%', height: '700px' }, headline: 'Prevalence over time', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorOneVariant', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: numeratorOneVariant, }, }, { matcher: { name: 'denominatorOneVariant', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: denominatorOneVariant, }, }, ], }, }, }"
|
|
1745
1639
|
},
|
|
1746
1640
|
{
|
|
1747
1641
|
"kind": "variable",
|
|
1748
|
-
"name": "
|
|
1642
|
+
"name": "OneVariantOnLineTab",
|
|
1749
1643
|
"type": {
|
|
1750
|
-
"text": "StoryObj<
|
|
1644
|
+
"text": "StoryObj<PrevalenceOverTimeProps>"
|
|
1751
1645
|
},
|
|
1752
|
-
"default": "{ ...
|
|
1646
|
+
"default": "{ ...OneVariant, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Line' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Line' })); }, }"
|
|
1647
|
+
},
|
|
1648
|
+
{
|
|
1649
|
+
"kind": "variable",
|
|
1650
|
+
"name": "OneVariantOnBubbleTab",
|
|
1651
|
+
"type": {
|
|
1652
|
+
"text": "StoryObj<PrevalenceOverTimeProps>"
|
|
1653
|
+
},
|
|
1654
|
+
"default": "{ ...OneVariant, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Bubble' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Bubble' })); }, }"
|
|
1655
|
+
},
|
|
1656
|
+
{
|
|
1657
|
+
"kind": "variable",
|
|
1658
|
+
"name": "OneVariantOnTableTab",
|
|
1659
|
+
"type": {
|
|
1660
|
+
"text": "StoryObj<PrevalenceOverTimeProps>"
|
|
1661
|
+
},
|
|
1662
|
+
"default": "{ ...OneVariant, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-prevalence-over-time'); await waitFor(() => expect(canvas.getByRole('button', { name: 'Table' })).toBeInTheDocument()); await fireEvent.click(canvas.getByRole('button', { name: 'Table' })); }, }"
|
|
1753
1663
|
}
|
|
1754
1664
|
],
|
|
1755
1665
|
"exports": [
|
|
@@ -1758,136 +1668,261 @@
|
|
|
1758
1668
|
"name": "default",
|
|
1759
1669
|
"declaration": {
|
|
1760
1670
|
"name": "meta",
|
|
1761
|
-
"module": "src/web-components/
|
|
1671
|
+
"module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
|
|
1762
1672
|
}
|
|
1763
1673
|
},
|
|
1764
1674
|
{
|
|
1765
1675
|
"kind": "js",
|
|
1766
|
-
"name": "
|
|
1676
|
+
"name": "TwoVariants",
|
|
1767
1677
|
"declaration": {
|
|
1768
|
-
"name": "
|
|
1769
|
-
"module": "src/web-components/
|
|
1678
|
+
"name": "TwoVariants",
|
|
1679
|
+
"module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
|
|
1770
1680
|
}
|
|
1771
1681
|
},
|
|
1772
1682
|
{
|
|
1773
1683
|
"kind": "js",
|
|
1774
|
-
"name": "
|
|
1684
|
+
"name": "OneVariant",
|
|
1775
1685
|
"declaration": {
|
|
1776
|
-
"name": "
|
|
1777
|
-
"module": "src/web-components/
|
|
1686
|
+
"name": "OneVariant",
|
|
1687
|
+
"module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
|
|
1778
1688
|
}
|
|
1779
1689
|
},
|
|
1780
1690
|
{
|
|
1781
1691
|
"kind": "js",
|
|
1782
|
-
"name": "
|
|
1692
|
+
"name": "OneVariantOnLineTab",
|
|
1783
1693
|
"declaration": {
|
|
1784
|
-
"name": "
|
|
1785
|
-
"module": "src/web-components/
|
|
1694
|
+
"name": "OneVariantOnLineTab",
|
|
1695
|
+
"module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"kind": "js",
|
|
1700
|
+
"name": "OneVariantOnBubbleTab",
|
|
1701
|
+
"declaration": {
|
|
1702
|
+
"name": "OneVariantOnBubbleTab",
|
|
1703
|
+
"module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
|
|
1704
|
+
}
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
"kind": "js",
|
|
1708
|
+
"name": "OneVariantOnTableTab",
|
|
1709
|
+
"declaration": {
|
|
1710
|
+
"name": "OneVariantOnTableTab",
|
|
1711
|
+
"module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
|
|
1786
1712
|
}
|
|
1787
1713
|
}
|
|
1788
1714
|
]
|
|
1789
1715
|
},
|
|
1790
1716
|
{
|
|
1791
1717
|
"kind": "javascript-module",
|
|
1792
|
-
"path": "src/web-components/
|
|
1718
|
+
"path": "src/web-components/visualization/gs-prevalence-over-time.tsx",
|
|
1793
1719
|
"declarations": [
|
|
1794
1720
|
{
|
|
1795
1721
|
"kind": "class",
|
|
1796
|
-
"description": "
|
|
1797
|
-
"name": "
|
|
1722
|
+
"description": "This component displays the prevalence over time of one or more variants.\nThe prevalence is calculated as the ratio of the number of cases of each variant given as `numerator`\nto the number of cases of the variant given as `denominator`.\n\nIn the chart views,\n- the user can select whether to display a confidence interval (not available in the bubble chart).\n The confidence interval is calculated using [Wilson score interval](https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval),\n with a confidence level of 95%.\n- the x-axis shows time steps in the selected `granularity`.\n- the user can select the y-axis scale (linear, logistic, logit).\n\n## Views\n\n### Bar View\n\nDisplays the prevalence over time as a bar chart.\nShows a bar for each variant in the `numerator` on every time step.\n\n### Line View\n\nDisplays the prevalence over time as a line chart.\nEach data point is connected for better visibility.\nShows a line for each variant in the `numerator`.\n\n### Bubble View\n\nDisplays the prevalence over time as a bubble chart.\nThe size of the bubbles represents the number of cases of the `denominator` variant.\nThe height of the bubbles represents the prevalence of the `numerator` variants.\n\n### Table View\n\nDisplays the prevalence over time as a table with one row per time point.",
|
|
1723
|
+
"name": "PrevalenceOverTimeComponent",
|
|
1798
1724
|
"members": [
|
|
1799
1725
|
{
|
|
1800
|
-
"kind": "field",
|
|
1801
|
-
"name": "
|
|
1726
|
+
"kind": "field",
|
|
1727
|
+
"name": "numerator",
|
|
1728
|
+
"type": {
|
|
1729
|
+
"text": "(Record<string, string | number | null | boolean> & { displayName: string })\n | (Record<string, string | number | null | boolean> & {\n displayName: string;\n })[]"
|
|
1730
|
+
},
|
|
1731
|
+
"default": "{ displayName: '' }",
|
|
1732
|
+
"description": "Either a single variant or an array of variants to compare.\nThis must be a valid LAPIS filter object with an additional `displayName` property\nwhich will be used as the label for the variant in the views,\nor an array of such objects.",
|
|
1733
|
+
"attribute": "numerator"
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
"kind": "field",
|
|
1737
|
+
"name": "denominator",
|
|
1738
|
+
"type": {
|
|
1739
|
+
"text": "Record<string, string | number | null | boolean> & { displayName: string }"
|
|
1740
|
+
},
|
|
1741
|
+
"default": "{ displayName: '' }",
|
|
1742
|
+
"description": "The variant that the variants in `numerator` are compared to.",
|
|
1743
|
+
"attribute": "denominator"
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
"kind": "field",
|
|
1747
|
+
"name": "granularity",
|
|
1748
|
+
"type": {
|
|
1749
|
+
"text": "'day' | 'week' | 'month' | 'year'"
|
|
1750
|
+
},
|
|
1751
|
+
"default": "'day'",
|
|
1752
|
+
"description": "The granularity of the time axis.",
|
|
1753
|
+
"attribute": "granularity"
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"kind": "field",
|
|
1757
|
+
"name": "smoothingWindow",
|
|
1758
|
+
"type": {
|
|
1759
|
+
"text": "number"
|
|
1760
|
+
},
|
|
1761
|
+
"default": "0",
|
|
1762
|
+
"description": "The number of time steps to use for smoothing the data.\n`0` means no smoothing.\nMust be a non-negative integer.\n\nFor a given time, the shown value is the mean of the neighbouring measured values.\nThe `smoothingWindow` value provides the number of neighbouring values to take into account.\nThe resulting time is computed via `Math.floor(smoothingWindow / 2)`.",
|
|
1763
|
+
"attribute": "smoothingWindow"
|
|
1764
|
+
},
|
|
1765
|
+
{
|
|
1766
|
+
"kind": "field",
|
|
1767
|
+
"name": "views",
|
|
1768
|
+
"type": {
|
|
1769
|
+
"text": "('bar' | 'line' | 'bubble' | 'table')[]"
|
|
1770
|
+
},
|
|
1771
|
+
"default": "['bar', 'line', 'bubble', 'table']",
|
|
1772
|
+
"description": "A list of tabs with views that this component should provide.",
|
|
1773
|
+
"attribute": "views"
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
"kind": "field",
|
|
1777
|
+
"name": "confidenceIntervalMethods",
|
|
1778
|
+
"type": {
|
|
1779
|
+
"text": "('wilson' | 'none')[]"
|
|
1780
|
+
},
|
|
1781
|
+
"default": "['wilson']",
|
|
1782
|
+
"description": "A list of methods to calculate the confidence interval.\nThe option `none` is always available and disables confidence intervals.\nPass an empty array to disable the confidence interval selector.",
|
|
1783
|
+
"attribute": "confidenceIntervalMethods"
|
|
1784
|
+
},
|
|
1785
|
+
{
|
|
1786
|
+
"kind": "field",
|
|
1787
|
+
"name": "headline",
|
|
1788
|
+
"type": {
|
|
1789
|
+
"text": "string | undefined"
|
|
1790
|
+
},
|
|
1791
|
+
"default": "'Prevalence over time'",
|
|
1792
|
+
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1793
|
+
"attribute": "headline"
|
|
1794
|
+
},
|
|
1795
|
+
{
|
|
1796
|
+
"kind": "field",
|
|
1797
|
+
"name": "size",
|
|
1798
|
+
"type": {
|
|
1799
|
+
"text": "{ width?: string; height?: string } | undefined"
|
|
1800
|
+
},
|
|
1801
|
+
"default": "undefined",
|
|
1802
|
+
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
1803
|
+
"attribute": "size"
|
|
1804
|
+
}
|
|
1805
|
+
],
|
|
1806
|
+
"attributes": [
|
|
1807
|
+
{
|
|
1808
|
+
"name": "numerator",
|
|
1809
|
+
"type": {
|
|
1810
|
+
"text": "(Record<string, string | number | null | boolean> & { displayName: string })\n | (Record<string, string | number | null | boolean> & {\n displayName: string;\n })[]"
|
|
1811
|
+
},
|
|
1812
|
+
"default": "{ displayName: '' }",
|
|
1813
|
+
"description": "Either a single variant or an array of variants to compare.\nThis must be a valid LAPIS filter object with an additional `displayName` property\nwhich will be used as the label for the variant in the views,\nor an array of such objects.",
|
|
1814
|
+
"fieldName": "numerator"
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
"name": "denominator",
|
|
1818
|
+
"type": {
|
|
1819
|
+
"text": "Record<string, string | number | null | boolean> & { displayName: string }"
|
|
1820
|
+
},
|
|
1821
|
+
"default": "{ displayName: '' }",
|
|
1822
|
+
"description": "The variant that the variants in `numerator` are compared to.",
|
|
1823
|
+
"fieldName": "denominator"
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"name": "granularity",
|
|
1827
|
+
"type": {
|
|
1828
|
+
"text": "'day' | 'week' | 'month' | 'year'"
|
|
1829
|
+
},
|
|
1830
|
+
"default": "'day'",
|
|
1831
|
+
"description": "The granularity of the time axis.",
|
|
1832
|
+
"fieldName": "granularity"
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
"name": "smoothingWindow",
|
|
1836
|
+
"type": {
|
|
1837
|
+
"text": "number"
|
|
1838
|
+
},
|
|
1839
|
+
"default": "0",
|
|
1840
|
+
"description": "The number of time steps to use for smoothing the data.\n`0` means no smoothing.\nMust be a non-negative integer.\n\nFor a given time, the shown value is the mean of the neighbouring measured values.\nThe `smoothingWindow` value provides the number of neighbouring values to take into account.\nThe resulting time is computed via `Math.floor(smoothingWindow / 2)`.",
|
|
1841
|
+
"fieldName": "smoothingWindow"
|
|
1842
|
+
},
|
|
1843
|
+
{
|
|
1844
|
+
"name": "views",
|
|
1802
1845
|
"type": {
|
|
1803
|
-
"text": "
|
|
1846
|
+
"text": "('bar' | 'line' | 'bubble' | 'table')[]"
|
|
1804
1847
|
},
|
|
1805
|
-
"default": "
|
|
1806
|
-
"description": "
|
|
1807
|
-
"
|
|
1808
|
-
}
|
|
1809
|
-
],
|
|
1810
|
-
"events": [
|
|
1848
|
+
"default": "['bar', 'line', 'bubble', 'table']",
|
|
1849
|
+
"description": "A list of tabs with views that this component should provide.",
|
|
1850
|
+
"fieldName": "views"
|
|
1851
|
+
},
|
|
1811
1852
|
{
|
|
1853
|
+
"name": "confidenceIntervalMethods",
|
|
1812
1854
|
"type": {
|
|
1813
|
-
"text": "
|
|
1855
|
+
"text": "('wilson' | 'none')[]"
|
|
1814
1856
|
},
|
|
1815
|
-
"
|
|
1816
|
-
"
|
|
1857
|
+
"default": "['wilson']",
|
|
1858
|
+
"description": "A list of methods to calculate the confidence interval.\nThe option `none` is always available and disables confidence intervals.\nPass an empty array to disable the confidence interval selector.",
|
|
1859
|
+
"fieldName": "confidenceIntervalMethods"
|
|
1817
1860
|
},
|
|
1818
1861
|
{
|
|
1862
|
+
"name": "headline",
|
|
1819
1863
|
"type": {
|
|
1820
|
-
"text": "
|
|
1864
|
+
"text": "string | undefined"
|
|
1821
1865
|
},
|
|
1822
|
-
"
|
|
1823
|
-
"
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
"attributes": [
|
|
1866
|
+
"default": "'Prevalence over time'",
|
|
1867
|
+
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
1868
|
+
"fieldName": "headline"
|
|
1869
|
+
},
|
|
1827
1870
|
{
|
|
1828
|
-
"name": "
|
|
1871
|
+
"name": "size",
|
|
1829
1872
|
"type": {
|
|
1830
|
-
"text": "
|
|
1873
|
+
"text": "{ width?: string; height?: string } | undefined"
|
|
1831
1874
|
},
|
|
1832
1875
|
"default": "undefined",
|
|
1833
|
-
"description": "The
|
|
1834
|
-
"fieldName": "
|
|
1876
|
+
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
1877
|
+
"fieldName": "size"
|
|
1835
1878
|
}
|
|
1836
1879
|
],
|
|
1837
1880
|
"superclass": {
|
|
1838
|
-
"name": "
|
|
1839
|
-
"module": "/src/web-components/
|
|
1881
|
+
"name": "PreactLitAdapterWithGridJsStyles",
|
|
1882
|
+
"module": "/src/web-components/PreactLitAdapterWithGridJsStyles"
|
|
1840
1883
|
},
|
|
1841
|
-
"tagName": "gs-
|
|
1884
|
+
"tagName": "gs-prevalence-over-time",
|
|
1842
1885
|
"customElement": true
|
|
1843
1886
|
}
|
|
1844
1887
|
],
|
|
1845
1888
|
"exports": [
|
|
1846
1889
|
{
|
|
1847
1890
|
"kind": "js",
|
|
1848
|
-
"name": "
|
|
1891
|
+
"name": "PrevalenceOverTimeComponent",
|
|
1849
1892
|
"declaration": {
|
|
1850
|
-
"name": "
|
|
1851
|
-
"module": "src/web-components/
|
|
1893
|
+
"name": "PrevalenceOverTimeComponent",
|
|
1894
|
+
"module": "src/web-components/visualization/gs-prevalence-over-time.tsx"
|
|
1852
1895
|
}
|
|
1853
1896
|
},
|
|
1854
1897
|
{
|
|
1855
1898
|
"kind": "custom-element-definition",
|
|
1856
|
-
"name": "gs-
|
|
1899
|
+
"name": "gs-prevalence-over-time",
|
|
1857
1900
|
"declaration": {
|
|
1858
|
-
"name": "
|
|
1859
|
-
"module": "src/web-components/
|
|
1901
|
+
"name": "PrevalenceOverTimeComponent",
|
|
1902
|
+
"module": "src/web-components/visualization/gs-prevalence-over-time.tsx"
|
|
1860
1903
|
}
|
|
1861
1904
|
}
|
|
1862
1905
|
]
|
|
1863
1906
|
},
|
|
1864
1907
|
{
|
|
1865
1908
|
"kind": "javascript-module",
|
|
1866
|
-
"path": "src/web-components/
|
|
1909
|
+
"path": "src/web-components/visualization/gs-relative-growth-advantage.stories.ts",
|
|
1867
1910
|
"declarations": [
|
|
1868
1911
|
{
|
|
1869
1912
|
"kind": "variable",
|
|
1870
1913
|
"name": "meta",
|
|
1871
1914
|
"type": {
|
|
1872
|
-
"text": "Meta<
|
|
1915
|
+
"text": "Meta<RelativeGrowthAdvantageProps>"
|
|
1873
1916
|
},
|
|
1874
|
-
"default": "{ title: '
|
|
1917
|
+
"default": "{ title: 'Visualization/Relative growth advantage', component: 'gs-relative-growth-advantage', argTypes: { numerator: { control: 'object' }, denominator: { control: 'object' }, generationTime: { control: 'number' }, views: { options: ['line'], control: { type: 'check' }, }, size: [{ control: 'object' }], headline: { control: 'text' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
|
|
1875
1918
|
},
|
|
1876
1919
|
{
|
|
1877
1920
|
"kind": "variable",
|
|
1878
1921
|
"name": "Default",
|
|
1879
1922
|
"type": {
|
|
1880
|
-
"text": "StoryObj<
|
|
1881
|
-
},
|
|
1882
|
-
"default": "{ render: (args) => { return html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-screen-lg\"> <gs-text-input .lapisField=${args.lapisField} .placeholderText=${args.placeholderText} .initialValue=${args.initialValue} ></gs-text-input> </div> </gs-app>`; }, args: { lapisField: 'host', placeholderText: 'Enter host name', initialValue: 'Homo sapiens', }, }"
|
|
1883
|
-
},
|
|
1884
|
-
{
|
|
1885
|
-
"kind": "variable",
|
|
1886
|
-
"name": "FiresEvent",
|
|
1887
|
-
"type": {
|
|
1888
|
-
"text": "StoryObj<TextInputProps>"
|
|
1923
|
+
"text": "StoryObj<RelativeGrowthAdvantageProps>"
|
|
1889
1924
|
},
|
|
1890
|
-
"default": "{ ...
|
|
1925
|
+
"default": "{ ...Template, args: { numerator: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01' }, denominator: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01' }, generationTime: 7, views: ['line'], size: { width: '100%', height: '700px' }, headline: 'Relative growth advantage', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numerator', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: numerator, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: denominator, }, }, ], }, }, }"
|
|
1891
1926
|
}
|
|
1892
1927
|
],
|
|
1893
1928
|
"exports": [
|
|
@@ -1896,7 +1931,7 @@
|
|
|
1896
1931
|
"name": "default",
|
|
1897
1932
|
"declaration": {
|
|
1898
1933
|
"name": "meta",
|
|
1899
|
-
"module": "src/web-components/
|
|
1934
|
+
"module": "src/web-components/visualization/gs-relative-growth-advantage.stories.ts"
|
|
1900
1935
|
}
|
|
1901
1936
|
},
|
|
1902
1937
|
{
|
|
@@ -1904,160 +1939,207 @@
|
|
|
1904
1939
|
"name": "Default",
|
|
1905
1940
|
"declaration": {
|
|
1906
1941
|
"name": "Default",
|
|
1907
|
-
"module": "src/web-components/
|
|
1908
|
-
}
|
|
1909
|
-
},
|
|
1910
|
-
{
|
|
1911
|
-
"kind": "js",
|
|
1912
|
-
"name": "FiresEvent",
|
|
1913
|
-
"declaration": {
|
|
1914
|
-
"name": "FiresEvent",
|
|
1915
|
-
"module": "src/web-components/input/text-input-component.stories.ts"
|
|
1942
|
+
"module": "src/web-components/visualization/gs-relative-growth-advantage.stories.ts"
|
|
1916
1943
|
}
|
|
1917
1944
|
}
|
|
1918
1945
|
]
|
|
1919
1946
|
},
|
|
1920
1947
|
{
|
|
1921
1948
|
"kind": "javascript-module",
|
|
1922
|
-
"path": "src/web-components/
|
|
1949
|
+
"path": "src/web-components/visualization/gs-relative-growth-advantage.tsx",
|
|
1923
1950
|
"declarations": [
|
|
1924
1951
|
{
|
|
1925
1952
|
"kind": "class",
|
|
1926
|
-
"description": "\n
|
|
1927
|
-
"name": "
|
|
1953
|
+
"description": "We assume a discrete time model, where new infections happen exactly every `generationTime` days.\nThis is what we call a \"generation\".\n\nThis component estimates the relative growth advantage of a variant by performing a logistic regression.\nBased on the inferred logistic growth rate, we derive the relative growth advantage (per generation).\n\nFor details on the scientific method, see:\nChen, Chaoran, et al. \"Quantification of the spread of SARS-CoV-2 variant B.1.1.7 in Switzerland.\" Epidemics (2021);\ndoi: [10.1016/j.epidem.2021.100480](https://doi.org/10.1016/j.epidem.2021.100480)\n\nThis component fetches aggregated data from LAPIS.\nThen the data is sent to `https://cov-spectrum.org/api/v2/computed/model/chen2021Fitness`\nwhich performs the logistic regression and calculates the relative growth advantage.\n\n## Views\n\n### Line View\n\nThe line view shows the relative growth advantage over time in a line chart.\nThe dots in the plot show the proportions of the focal variant (`numerator`) to the `denominator` variant\nfor every day as observed in the data.\nThe line shows a logistic curve fitted to the data points, including a 95% confidence interval.",
|
|
1954
|
+
"name": "RelativeGrowthAdvantageComponent",
|
|
1928
1955
|
"members": [
|
|
1929
1956
|
{
|
|
1930
1957
|
"kind": "field",
|
|
1931
|
-
"name": "
|
|
1958
|
+
"name": "numerator",
|
|
1932
1959
|
"type": {
|
|
1933
|
-
"text": "string |
|
|
1960
|
+
"text": "Record<string, string | number | null | boolean>"
|
|
1934
1961
|
},
|
|
1935
|
-
"default": "
|
|
1936
|
-
"description": "The
|
|
1937
|
-
"attribute": "
|
|
1962
|
+
"default": "{}",
|
|
1963
|
+
"description": "The LAPIS filter for the focal variant.",
|
|
1964
|
+
"attribute": "numerator"
|
|
1938
1965
|
},
|
|
1939
1966
|
{
|
|
1940
1967
|
"kind": "field",
|
|
1941
|
-
"name": "
|
|
1968
|
+
"name": "denominator",
|
|
1942
1969
|
"type": {
|
|
1943
|
-
"text": "string"
|
|
1970
|
+
"text": "Record<string, string | number | null | boolean>"
|
|
1944
1971
|
},
|
|
1945
|
-
"default": "
|
|
1946
|
-
"description": "The
|
|
1947
|
-
"attribute": "
|
|
1972
|
+
"default": "{}",
|
|
1973
|
+
"description": "The LAPIS filter for the variant that the focal variant (`numerator`) should be compared to.",
|
|
1974
|
+
"attribute": "denominator"
|
|
1948
1975
|
},
|
|
1949
1976
|
{
|
|
1950
1977
|
"kind": "field",
|
|
1951
|
-
"name": "
|
|
1978
|
+
"name": "generationTime",
|
|
1979
|
+
"type": {
|
|
1980
|
+
"text": "number"
|
|
1981
|
+
},
|
|
1982
|
+
"default": "7",
|
|
1983
|
+
"description": "The generation time represents the number of days over which the variant's relative growth advantage is measured.\nFor example, if we set a generation time of 7 days, then we estimate the growth advantage per week.",
|
|
1984
|
+
"attribute": "generationTime"
|
|
1985
|
+
},
|
|
1986
|
+
{
|
|
1987
|
+
"kind": "field",
|
|
1988
|
+
"name": "views",
|
|
1989
|
+
"type": {
|
|
1990
|
+
"text": "'line'[]"
|
|
1991
|
+
},
|
|
1992
|
+
"default": "['line']",
|
|
1993
|
+
"description": "A list of tabs with views that this component should provide.",
|
|
1994
|
+
"attribute": "views"
|
|
1995
|
+
},
|
|
1996
|
+
{
|
|
1997
|
+
"kind": "field",
|
|
1998
|
+
"name": "headline",
|
|
1952
1999
|
"type": {
|
|
1953
2000
|
"text": "string | undefined"
|
|
1954
2001
|
},
|
|
1955
|
-
"default": "''",
|
|
1956
|
-
"description": "The
|
|
1957
|
-
"attribute": "
|
|
1958
|
-
}
|
|
1959
|
-
],
|
|
1960
|
-
"events": [
|
|
2002
|
+
"default": "'Relative growth advantage'",
|
|
2003
|
+
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
2004
|
+
"attribute": "headline"
|
|
2005
|
+
},
|
|
1961
2006
|
{
|
|
2007
|
+
"kind": "field",
|
|
2008
|
+
"name": "size",
|
|
1962
2009
|
"type": {
|
|
1963
|
-
"text": "
|
|
2010
|
+
"text": "{ width?: string; height?: string } | undefined"
|
|
1964
2011
|
},
|
|
1965
|
-
"
|
|
1966
|
-
"
|
|
2012
|
+
"default": "undefined",
|
|
2013
|
+
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
2014
|
+
"attribute": "size"
|
|
1967
2015
|
}
|
|
1968
2016
|
],
|
|
1969
2017
|
"attributes": [
|
|
1970
2018
|
{
|
|
1971
|
-
"name": "
|
|
2019
|
+
"name": "numerator",
|
|
1972
2020
|
"type": {
|
|
1973
|
-
"text": "string |
|
|
2021
|
+
"text": "Record<string, string | number | null | boolean>"
|
|
1974
2022
|
},
|
|
1975
|
-
"default": "
|
|
1976
|
-
"description": "The
|
|
1977
|
-
"fieldName": "
|
|
2023
|
+
"default": "{}",
|
|
2024
|
+
"description": "The LAPIS filter for the focal variant.",
|
|
2025
|
+
"fieldName": "numerator"
|
|
1978
2026
|
},
|
|
1979
2027
|
{
|
|
1980
|
-
"name": "
|
|
2028
|
+
"name": "denominator",
|
|
1981
2029
|
"type": {
|
|
1982
|
-
"text": "string"
|
|
2030
|
+
"text": "Record<string, string | number | null | boolean>"
|
|
1983
2031
|
},
|
|
1984
|
-
"default": "
|
|
1985
|
-
"description": "The
|
|
1986
|
-
"fieldName": "
|
|
2032
|
+
"default": "{}",
|
|
2033
|
+
"description": "The LAPIS filter for the variant that the focal variant (`numerator`) should be compared to.",
|
|
2034
|
+
"fieldName": "denominator"
|
|
1987
2035
|
},
|
|
1988
2036
|
{
|
|
1989
|
-
"name": "
|
|
2037
|
+
"name": "generationTime",
|
|
2038
|
+
"type": {
|
|
2039
|
+
"text": "number"
|
|
2040
|
+
},
|
|
2041
|
+
"default": "7",
|
|
2042
|
+
"description": "The generation time represents the number of days over which the variant's relative growth advantage is measured.\nFor example, if we set a generation time of 7 days, then we estimate the growth advantage per week.",
|
|
2043
|
+
"fieldName": "generationTime"
|
|
2044
|
+
},
|
|
2045
|
+
{
|
|
2046
|
+
"name": "views",
|
|
2047
|
+
"type": {
|
|
2048
|
+
"text": "'line'[]"
|
|
2049
|
+
},
|
|
2050
|
+
"default": "['line']",
|
|
2051
|
+
"description": "A list of tabs with views that this component should provide.",
|
|
2052
|
+
"fieldName": "views"
|
|
2053
|
+
},
|
|
2054
|
+
{
|
|
2055
|
+
"name": "headline",
|
|
1990
2056
|
"type": {
|
|
1991
2057
|
"text": "string | undefined"
|
|
1992
2058
|
},
|
|
1993
|
-
"default": "''",
|
|
1994
|
-
"description": "The
|
|
1995
|
-
"fieldName": "
|
|
2059
|
+
"default": "'Relative growth advantage'",
|
|
2060
|
+
"description": "The headline of the component. Set to an empty string to hide the headline.",
|
|
2061
|
+
"fieldName": "headline"
|
|
2062
|
+
},
|
|
2063
|
+
{
|
|
2064
|
+
"name": "size",
|
|
2065
|
+
"type": {
|
|
2066
|
+
"text": "{ width?: string; height?: string } | undefined"
|
|
2067
|
+
},
|
|
2068
|
+
"default": "undefined",
|
|
2069
|
+
"description": "The size of the component.\n\nIf not set, the component will take the full width of its container with height 700px.\n\nThe width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.\nIf the unit is %, the size will be relative to the container of the component.",
|
|
2070
|
+
"fieldName": "size"
|
|
1996
2071
|
}
|
|
1997
2072
|
],
|
|
1998
2073
|
"superclass": {
|
|
1999
2074
|
"name": "PreactLitAdapter",
|
|
2000
2075
|
"module": "/src/web-components/PreactLitAdapter"
|
|
2001
2076
|
},
|
|
2002
|
-
"tagName": "gs-
|
|
2077
|
+
"tagName": "gs-relative-growth-advantage",
|
|
2003
2078
|
"customElement": true
|
|
2004
2079
|
}
|
|
2005
2080
|
],
|
|
2006
2081
|
"exports": [
|
|
2007
2082
|
{
|
|
2008
2083
|
"kind": "js",
|
|
2009
|
-
"name": "
|
|
2084
|
+
"name": "RelativeGrowthAdvantageComponent",
|
|
2010
2085
|
"declaration": {
|
|
2011
|
-
"name": "
|
|
2012
|
-
"module": "src/web-components/
|
|
2086
|
+
"name": "RelativeGrowthAdvantageComponent",
|
|
2087
|
+
"module": "src/web-components/visualization/gs-relative-growth-advantage.tsx"
|
|
2013
2088
|
}
|
|
2014
2089
|
},
|
|
2015
2090
|
{
|
|
2016
2091
|
"kind": "custom-element-definition",
|
|
2017
|
-
"name": "gs-
|
|
2092
|
+
"name": "gs-relative-growth-advantage",
|
|
2018
2093
|
"declaration": {
|
|
2019
|
-
"name": "
|
|
2020
|
-
"module": "src/web-components/
|
|
2094
|
+
"name": "RelativeGrowthAdvantageComponent",
|
|
2095
|
+
"module": "src/web-components/visualization/gs-relative-growth-advantage.tsx"
|
|
2021
2096
|
}
|
|
2022
2097
|
}
|
|
2023
2098
|
]
|
|
2024
2099
|
},
|
|
2025
2100
|
{
|
|
2026
2101
|
"kind": "javascript-module",
|
|
2027
|
-
"path": "src/web-components/
|
|
2028
|
-
"declarations": [
|
|
2029
|
-
{
|
|
2030
|
-
"kind": "variable",
|
|
2031
|
-
"name": "lapisContext"
|
|
2032
|
-
}
|
|
2033
|
-
],
|
|
2102
|
+
"path": "src/web-components/visualization/index.ts",
|
|
2103
|
+
"declarations": [],
|
|
2034
2104
|
"exports": [
|
|
2035
2105
|
{
|
|
2036
2106
|
"kind": "js",
|
|
2037
|
-
"name": "
|
|
2107
|
+
"name": "MutationComparisonComponent",
|
|
2038
2108
|
"declaration": {
|
|
2039
|
-
"name": "
|
|
2040
|
-
"module": "
|
|
2109
|
+
"name": "MutationComparisonComponent",
|
|
2110
|
+
"module": "./gs-mutation-comparison"
|
|
2041
2111
|
}
|
|
2042
|
-
}
|
|
2043
|
-
]
|
|
2044
|
-
},
|
|
2045
|
-
{
|
|
2046
|
-
"kind": "javascript-module",
|
|
2047
|
-
"path": "src/web-components/reference-genome-context.ts",
|
|
2048
|
-
"declarations": [
|
|
2112
|
+
},
|
|
2049
2113
|
{
|
|
2050
|
-
"kind": "
|
|
2051
|
-
"name": "
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2114
|
+
"kind": "js",
|
|
2115
|
+
"name": "MutationsComponent",
|
|
2116
|
+
"declaration": {
|
|
2117
|
+
"name": "MutationsComponent",
|
|
2118
|
+
"module": "./gs-mutations"
|
|
2119
|
+
}
|
|
2120
|
+
},
|
|
2055
2121
|
{
|
|
2056
2122
|
"kind": "js",
|
|
2057
|
-
"name": "
|
|
2123
|
+
"name": "PrevalenceOverTimeComponent",
|
|
2058
2124
|
"declaration": {
|
|
2059
|
-
"name": "
|
|
2060
|
-
"module": "
|
|
2125
|
+
"name": "PrevalenceOverTimeComponent",
|
|
2126
|
+
"module": "./gs-prevalence-over-time"
|
|
2127
|
+
}
|
|
2128
|
+
},
|
|
2129
|
+
{
|
|
2130
|
+
"kind": "js",
|
|
2131
|
+
"name": "RelativeGrowthAdvantageComponent",
|
|
2132
|
+
"declaration": {
|
|
2133
|
+
"name": "RelativeGrowthAdvantageComponent",
|
|
2134
|
+
"module": "./gs-relative-growth-advantage"
|
|
2135
|
+
}
|
|
2136
|
+
},
|
|
2137
|
+
{
|
|
2138
|
+
"kind": "js",
|
|
2139
|
+
"name": "AggregateComponent",
|
|
2140
|
+
"declaration": {
|
|
2141
|
+
"name": "AggregateComponent",
|
|
2142
|
+
"module": "./gs-aggregate"
|
|
2061
2143
|
}
|
|
2062
2144
|
}
|
|
2063
2145
|
]
|