@genspectrum/dashboard-components 0.14.2 → 0.16.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.
Files changed (104) hide show
  1. package/custom-elements.json +281 -105
  2. package/dist/{LineageFilterChangedEvent-C9dXOxt6.js → LineageFilterChangedEvent-COWV-Y0k.js} +6 -6
  3. package/dist/LineageFilterChangedEvent-COWV-Y0k.js.map +1 -0
  4. package/dist/assets/{mutationOverTimeWorker-Dxnxrfe0.js.map → mutationOverTimeWorker-BL50C-yi.js.map} +1 -1
  5. package/dist/components.d.ts +40 -40
  6. package/dist/components.js +373 -243
  7. package/dist/components.js.map +1 -1
  8. package/dist/style.css +9 -0
  9. package/dist/util.d.ts +49 -49
  10. package/dist/util.js +2 -2
  11. package/package.json +1 -1
  12. package/src/preact/ReferenceGenomeContext.ts +14 -1
  13. package/src/preact/aggregatedData/aggregate-bar-chart.tsx +26 -5
  14. package/src/preact/aggregatedData/aggregate.stories.tsx +0 -1
  15. package/src/preact/aggregatedData/aggregate.tsx +5 -1
  16. package/src/preact/components/ReferenceGenomesAwaiter.tsx +1 -6
  17. package/src/preact/components/resize-container.tsx +1 -1
  18. package/src/preact/{dateRangeSelector/date-range-selector.stories.tsx → dateRangeFilter/date-range-filter.stories.tsx} +15 -15
  19. package/src/preact/{dateRangeSelector/date-range-selector.tsx → dateRangeFilter/date-range-filter.tsx} +9 -9
  20. package/src/preact/{dateRangeSelector → dateRangeFilter}/dateRangeOption.ts +2 -2
  21. package/src/preact/mutationComparison/mutation-comparison-venn.tsx +4 -2
  22. package/src/preact/mutationComparison/mutation-comparison.stories.tsx +0 -1
  23. package/src/preact/mutationComparison/mutation-comparison.tsx +5 -1
  24. package/src/preact/mutationFilter/mutation-filter.stories.tsx +17 -1
  25. package/src/preact/mutationFilter/mutation-filter.tsx +8 -0
  26. package/src/preact/mutations/mutations.stories.tsx +0 -1
  27. package/src/preact/mutations/mutations.tsx +1 -1
  28. package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +0 -2
  29. package/src/preact/mutationsOverTime/mutations-over-time.tsx +1 -1
  30. package/src/preact/numberSequencesOverTime/number-sequences-over-time-bar-chart.tsx +8 -3
  31. package/src/preact/numberSequencesOverTime/number-sequences-over-time-line-chart.tsx +8 -3
  32. package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +3 -1
  33. package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +18 -3
  34. package/src/preact/prevalenceOverTime/prevalence-over-time-bar-chart.tsx +48 -35
  35. package/src/preact/prevalenceOverTime/prevalence-over-time-bubble-chart.tsx +83 -70
  36. package/src/preact/prevalenceOverTime/prevalence-over-time-line-chart.tsx +48 -37
  37. package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +0 -3
  38. package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +6 -1
  39. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage-chart.tsx +31 -23
  40. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +0 -1
  41. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +5 -1
  42. package/src/preact/sequencesByLocation/__mockData__/worldAtlas.json +1 -0
  43. package/src/preact/{map → sequencesByLocation}/sequences-by-location-map.tsx +6 -3
  44. package/src/preact/{map → sequencesByLocation}/sequences-by-location-table.tsx +1 -1
  45. package/src/preact/{map → sequencesByLocation}/sequences-by-location.stories.tsx +58 -1
  46. package/src/preact/{map → sequencesByLocation}/sequences-by-location.tsx +10 -1
  47. package/src/preact/shared/aspectRatio/AspectRatio.tsx +13 -0
  48. package/src/preact/shared/charts/getMaintainAspectRatio.ts +3 -0
  49. package/src/preact/statistic/statistics.stories.tsx +0 -1
  50. package/src/preact/statistic/statistics.tsx +4 -4
  51. package/src/preact/{textInput/TextInputChangedEvent.ts → textFilter/TextFilterChangedEvent.ts} +2 -2
  52. package/src/preact/{textInput/text-input.stories.tsx → textFilter/text-filter.stories.tsx} +10 -10
  53. package/src/preact/{textInput/text-input.tsx → textFilter/text-filter.tsx} +10 -10
  54. package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.stories.tsx +0 -1
  55. package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +1 -1
  56. package/src/query/computeMapLocationData.spec.ts +1 -1
  57. package/src/query/computeMapLocationData.ts +1 -1
  58. package/src/query/querySequencesByLocationData.ts +1 -1
  59. package/src/utilEntrypoint.ts +3 -3
  60. package/src/web-components/ResizeContainer.mdx +4 -1
  61. package/src/web-components/input/{gs-date-range-selector.stories.ts → gs-date-range-filter.stories.ts} +59 -14
  62. package/src/web-components/input/{gs-date-range-selector.tsx → gs-date-range-filter.tsx} +28 -13
  63. package/src/web-components/input/{gs-text-input.stories.ts → gs-text-filter.stories.ts} +15 -15
  64. package/src/web-components/input/{gs-text-input.tsx → gs-text-filter.tsx} +16 -16
  65. package/src/web-components/input/index.ts +2 -2
  66. package/src/web-components/visualization/gs-aggregate.stories.ts +13 -6
  67. package/src/web-components/visualization/gs-aggregate.tsx +1 -1
  68. package/src/web-components/visualization/gs-mutation-comparison.stories.ts +8 -1
  69. package/src/web-components/visualization/gs-mutation-comparison.tsx +1 -1
  70. package/src/web-components/visualization/gs-mutations-over-time.stories.ts +9 -1
  71. package/src/web-components/visualization/gs-mutations-over-time.tsx +1 -1
  72. package/src/web-components/visualization/gs-mutations.stories.ts +8 -1
  73. package/src/web-components/visualization/gs-mutations.tsx +1 -1
  74. package/src/web-components/visualization/gs-number-sequences-over-time.stories.ts +11 -1
  75. package/src/web-components/visualization/gs-number-sequences-over-time.tsx +1 -1
  76. package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +8 -2
  77. package/src/web-components/visualization/gs-prevalence-over-time.tsx +1 -1
  78. package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +8 -1
  79. package/src/web-components/visualization/gs-relative-growth-advantage.tsx +1 -1
  80. package/src/web-components/visualization/gs-sequences-by-location.stories.ts +13 -7
  81. package/src/web-components/visualization/gs-sequences-by-location.tsx +6 -3
  82. package/src/web-components/visualization/gs-statistics.stories.ts +0 -1
  83. package/src/web-components/visualization/gs-statistics.tsx +1 -1
  84. package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts +9 -1
  85. package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +1 -1
  86. package/standalone-bundle/assets/{mutationOverTimeWorker-CmSrq4SZ.js.map → mutationOverTimeWorker-CFB5-Mdk.js.map} +1 -1
  87. package/standalone-bundle/dashboard-components.js +6032 -5937
  88. package/standalone-bundle/dashboard-components.js.map +1 -1
  89. package/standalone-bundle/style.css +1 -1
  90. package/dist/LineageFilterChangedEvent-C9dXOxt6.js.map +0 -1
  91. package/src/preact/map/__mockData__/worldAtlas.json +0 -497127
  92. /package/src/preact/{dateRangeSelector → dateRangeFilter}/computeInitialValues.spec.ts +0 -0
  93. /package/src/preact/{dateRangeSelector → dateRangeFilter}/computeInitialValues.ts +0 -0
  94. /package/src/preact/{dateRangeSelector → dateRangeFilter}/dateConversion.ts +0 -0
  95. /package/src/preact/{dateRangeSelector → dateRangeFilter}/selectableOptions.ts +0 -0
  96. /package/src/preact/{map → sequencesByLocation}/__mockData__/aggregatedGermany.json +0 -0
  97. /package/src/preact/{map → sequencesByLocation}/__mockData__/aggregatedWorld.json +0 -0
  98. /package/src/preact/{map → sequencesByLocation}/__mockData__/germanyMap.json +0 -0
  99. /package/src/preact/{map → sequencesByLocation}/__mockData__/howToGenerateWorldMap.md +0 -0
  100. /package/src/preact/{map → sequencesByLocation}/leafletStyleModifications.css +0 -0
  101. /package/src/preact/{map → sequencesByLocation}/loadMapSource.tsx +0 -0
  102. /package/src/preact/{textInput → textFilter}/__mockData__/aggregated_hosts.json +0 -0
  103. /package/src/preact/{textInput → textFilter}/fetchStringAutocompleteList.spec.ts +0 -0
  104. /package/src/preact/{textInput → textFilter}/fetchStringAutocompleteList.ts +0 -0
@@ -290,31 +290,47 @@
290
290
  },
291
291
  {
292
292
  "kind": "javascript-module",
293
- "path": "src/web-components/input/gs-date-range-selector.stories.ts",
293
+ "path": "src/web-components/input/gs-date-range-filter.stories.ts",
294
294
  "declarations": [
295
295
  {
296
296
  "kind": "variable",
297
297
  "name": "meta",
298
298
  "type": {
299
- "text": "Meta<Required<DateRangeSelectorProps>>"
299
+ "text": "Meta<Required<DateRangeFilterProps>>"
300
300
  },
301
- "default": "{ title: 'Input/DateRangeSelector', component: 'gs-date-range-selector', parameters: withComponentDocs({ actions: { handles: ['gs-date-range-filter-changed', 'gs-date-range-option-changed', ...previewHandles], }, fetchMock: {}, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { value: { control: { type: 'object', }, }, lapisDateField: { control: { type: 'text' } }, dateRangeOptions: { control: { type: 'object', }, }, earliestDate: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, }, args: { dateRangeOptions: [ dateRangeOptionPresets.lastMonth, dateRangeOptionPresets.last3Months, dateRangeOptionPresets.allTimes, customDateRange, ], earliestDate: '1970-01-01', value: dateRangeOptionPresets.lastMonth.label, lapisDateField: 'aDateColumn', width: '100%', }, tags: ['autodocs'], }"
301
+ "default": "{ title: 'Input/DateRangeFilter', component: 'gs-date-range-filter', parameters: withComponentDocs({ actions: { handles: ['gs-date-range-filter-changed', 'gs-date-range-option-changed', ...previewHandles], }, fetchMock: {}, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { value: { control: { type: 'object', }, }, lapisDateField: { control: { type: 'text' } }, dateRangeOptions: { control: { type: 'object', }, }, earliestDate: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, }, args: { dateRangeOptions: [ dateRangeOptionPresets.lastMonth, dateRangeOptionPresets.last3Months, dateRangeOptionPresets.allTimes, { label: '2021', dateFrom: '2021-01-01', dateTo: '2021-12-31' }, customDateRange, ], earliestDate: '1970-01-01', value: dateRangeOptionPresets.lastMonth.label, lapisDateField: 'aDateColumn', width: '100%', }, tags: ['autodocs'], }"
302
302
  },
303
303
  {
304
304
  "kind": "variable",
305
305
  "name": "Default",
306
306
  "type": {
307
- "text": "StoryObj<Required<DateRangeSelectorProps>>"
307
+ "text": "StoryObj<Required<DateRangeFilterProps>>"
308
308
  },
309
- "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-screen-lg\"> <gs-date-range-selector .dateRangeOptions=${args.dateRangeOptions} .earliestDate=${args.earliestDate} .value=${args.value} .width=${args.width} .lapisDateField=${args.lapisDateField} ></gs-date-range-selector> </div> </gs-app>`, }"
309
+ "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-screen-lg\"> <gs-date-range-filter .dateRangeOptions=${args.dateRangeOptions} .earliestDate=${args.earliestDate} .value=${args.value} .width=${args.width} .lapisDateField=${args.lapisDateField} ></gs-date-range-filter> </div> </gs-app>`, }"
310
+ },
311
+ {
312
+ "kind": "variable",
313
+ "name": "TestRenderAttributesInHtmlInsteadOfUsingPropertyExpression",
314
+ "type": {
315
+ "text": "StoryObj<Required<DateRangeFilterProps>>"
316
+ },
317
+ "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-screen-lg\"> <gs-date-range-filter .dateRangeOptions=${args.dateRangeOptions} earliestDate=\"${args.earliestDate}\" value=\"${args.value}\" width=\"${args.width}\" lapisDateField=\"${args.lapisDateField}\" ></gs-date-range-filter> </div> </gs-app>`, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-date-range-filter'); await waitFor(async () => { await expect(selectField(canvas)).toHaveValue('Last month'); }); }, argTypes: { value: { control: { type: 'text', }, }, }, }"
318
+ },
319
+ {
320
+ "kind": "variable",
321
+ "name": "TestSettingANumericValueIsTreatedAsString",
322
+ "type": {
323
+ "text": "StoryObj<Required<DateRangeFilterProps>>"
324
+ },
325
+ "default": "{ ...TestRenderAttributesInHtmlInsteadOfUsingPropertyExpression, args: { ...TestRenderAttributesInHtmlInsteadOfUsingPropertyExpression.args, value: '2021', }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-date-range-filter'); await waitFor(async () => { await expect(selectField(canvas)).toHaveValue('2021'); }); }, }"
310
326
  },
311
327
  {
312
328
  "kind": "variable",
313
329
  "name": "FiresEvents",
314
330
  "type": {
315
- "text": "StoryObj<Required<DateRangeSelectorProps>>"
331
+ "text": "StoryObj<Required<DateRangeFilterProps>>"
316
332
  },
317
- "default": "{ ...Default, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-date-range-selector'); const filterChangedListenerMock = fn(); const optionChangedListenerMock = fn(); await step('Setup event listener mock', () => { canvasElement.addEventListener('gs-date-range-filter-changed', filterChangedListenerMock); canvasElement.addEventListener('gs-date-range-option-changed', optionChangedListenerMock); }); await step('Expect last 6 months to be selected', async () => { await expect(selectField(canvas)).toHaveValue('Last month'); await waitFor(async () => { await expect(dateToPicker(canvas)).toHaveValue(toYYYYMMDD(new Date())); }); }); await step('Expect event to be fired when selecting a different value', async () => { await userEvent.selectOptions(selectField(canvas), 'CustomDateRange'); await expect(dateToPicker(canvas)).toHaveValue(customDateRange.dateTo); await expect(filterChangedListenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { aDateColumnFrom: customDateRange.dateFrom, aDateColumnTo: customDateRange.dateTo, }, }), ); await expect(optionChangedListenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: customDateRange.label, }), ); }); }, }"
333
+ "default": "{ ...Default, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-date-range-filter'); const filterChangedListenerMock = fn(); const optionChangedListenerMock = fn(); await step('Setup event listener mock', () => { canvasElement.addEventListener('gs-date-range-filter-changed', filterChangedListenerMock); canvasElement.addEventListener('gs-date-range-option-changed', optionChangedListenerMock); }); await step('Expect last 6 months to be selected', async () => { await expect(selectField(canvas)).toHaveValue('Last month'); await waitFor(async () => { await expect(dateToPicker(canvas)).toHaveValue(toYYYYMMDD(new Date())); }); }); await step('Expect event to be fired when selecting a different value', async () => { await userEvent.selectOptions(selectField(canvas), 'CustomDateRange'); await expect(dateToPicker(canvas)).toHaveValue(customDateRange.dateTo); await expect(filterChangedListenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { aDateColumnFrom: customDateRange.dateFrom, aDateColumnTo: customDateRange.dateTo, }, }), ); await expect(optionChangedListenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: customDateRange.label, }), ); }); }, }"
318
334
  }
319
335
  ],
320
336
  "exports": [
@@ -323,7 +339,7 @@
323
339
  "name": "default",
324
340
  "declaration": {
325
341
  "name": "meta",
326
- "module": "src/web-components/input/gs-date-range-selector.stories.ts"
342
+ "module": "src/web-components/input/gs-date-range-filter.stories.ts"
327
343
  }
328
344
  },
329
345
  {
@@ -331,7 +347,23 @@
331
347
  "name": "Default",
332
348
  "declaration": {
333
349
  "name": "Default",
334
- "module": "src/web-components/input/gs-date-range-selector.stories.ts"
350
+ "module": "src/web-components/input/gs-date-range-filter.stories.ts"
351
+ }
352
+ },
353
+ {
354
+ "kind": "js",
355
+ "name": "TestRenderAttributesInHtmlInsteadOfUsingPropertyExpression",
356
+ "declaration": {
357
+ "name": "TestRenderAttributesInHtmlInsteadOfUsingPropertyExpression",
358
+ "module": "src/web-components/input/gs-date-range-filter.stories.ts"
359
+ }
360
+ },
361
+ {
362
+ "kind": "js",
363
+ "name": "TestSettingANumericValueIsTreatedAsString",
364
+ "declaration": {
365
+ "name": "TestSettingANumericValueIsTreatedAsString",
366
+ "module": "src/web-components/input/gs-date-range-filter.stories.ts"
335
367
  }
336
368
  },
337
369
  {
@@ -339,19 +371,19 @@
339
371
  "name": "FiresEvents",
340
372
  "declaration": {
341
373
  "name": "FiresEvents",
342
- "module": "src/web-components/input/gs-date-range-selector.stories.ts"
374
+ "module": "src/web-components/input/gs-date-range-filter.stories.ts"
343
375
  }
344
376
  }
345
377
  ]
346
378
  },
347
379
  {
348
380
  "kind": "javascript-module",
349
- "path": "src/web-components/input/gs-date-range-selector.tsx",
381
+ "path": "src/web-components/input/gs-date-range-filter.tsx",
350
382
  "declarations": [
351
383
  {
352
384
  "kind": "class",
353
385
  "description": "## Context\nThis component is a group of input fields designed to specify date range filters\nfor a given date column of this Lapis instance. 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.",
354
- "name": "DateRangeSelectorComponent",
386
+ "name": "DateRangeFilterComponent",
355
387
  "members": [
356
388
  {
357
389
  "kind": "field",
@@ -471,25 +503,25 @@
471
503
  "name": "PreactLitAdapter",
472
504
  "module": "/src/web-components/PreactLitAdapter"
473
505
  },
474
- "tagName": "gs-date-range-selector",
506
+ "tagName": "gs-date-range-filter",
475
507
  "customElement": true
476
508
  }
477
509
  ],
478
510
  "exports": [
479
511
  {
480
512
  "kind": "js",
481
- "name": "DateRangeSelectorComponent",
513
+ "name": "DateRangeFilterComponent",
482
514
  "declaration": {
483
- "name": "DateRangeSelectorComponent",
484
- "module": "src/web-components/input/gs-date-range-selector.tsx"
515
+ "name": "DateRangeFilterComponent",
516
+ "module": "src/web-components/input/gs-date-range-filter.tsx"
485
517
  }
486
518
  },
487
519
  {
488
520
  "kind": "custom-element-definition",
489
- "name": "gs-date-range-selector",
521
+ "name": "gs-date-range-filter",
490
522
  "declaration": {
491
- "name": "DateRangeSelectorComponent",
492
- "module": "src/web-components/input/gs-date-range-selector.tsx"
523
+ "name": "DateRangeFilterComponent",
524
+ "module": "src/web-components/input/gs-date-range-filter.tsx"
493
525
  }
494
526
  }
495
527
  ]
@@ -1116,31 +1148,31 @@
1116
1148
  },
1117
1149
  {
1118
1150
  "kind": "javascript-module",
1119
- "path": "src/web-components/input/gs-text-input.stories.ts",
1151
+ "path": "src/web-components/input/gs-text-filter.stories.ts",
1120
1152
  "declarations": [
1121
1153
  {
1122
1154
  "kind": "variable",
1123
1155
  "name": "meta",
1124
1156
  "type": {
1125
- "text": "Meta<Required<TextInputProps>>"
1157
+ "text": "Meta<Required<TextFilterProps>>"
1126
1158
  },
1127
- "default": "{ title: 'Input/Text input', component: 'gs-text-input', parameters: withComponentDocs({ actions: { handles: ['gs-text-input-changed', ...previewHandles], }, fetchMock: { mocks: [ { matcher: { name: 'hosts', url: AGGREGATED_ENDPOINT, body: { fields: ['host'], country: 'Germany', }, }, response: { status: 200, body: data, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { lapisField: { control: { type: 'text', }, }, placeholderText: { control: { type: 'text', }, }, value: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, lapisFilter: { control: { type: 'object', }, }, }, tags: ['autodocs'], }"
1159
+ "default": "{ title: 'Input/Text filter', component: 'gs-text-filter', parameters: withComponentDocs({ actions: { handles: ['gs-text-filter-changed', ...previewHandles], }, fetchMock: { mocks: [ { matcher: { name: 'hosts', url: AGGREGATED_ENDPOINT, body: { fields: ['host'], country: 'Germany', }, }, response: { status: 200, body: data, }, }, ], }, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { lapisField: { control: { type: 'text', }, }, placeholderText: { control: { type: 'text', }, }, value: { control: { type: 'text', }, }, width: { control: { type: 'text', }, }, lapisFilter: { control: { type: 'object', }, }, }, tags: ['autodocs'], }"
1128
1160
  },
1129
1161
  {
1130
1162
  "kind": "variable",
1131
1163
  "name": "Default",
1132
1164
  "type": {
1133
- "text": "StoryObj<Required<TextInputProps>>"
1165
+ "text": "StoryObj<Required<TextFilterProps>>"
1134
1166
  },
1135
- "default": "{ render: (args) => { return html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-screen-lg\"> <gs-text-input .lapisField=${args.lapisField} .lapisFilter=${args.lapisFilter} .placeholderText=${args.placeholderText} .value=${args.value} .width=${args.width} ></gs-text-input> </div> </gs-app>`; }, args: { lapisField: 'host', lapisFilter: { country: 'Germany' }, placeholderText: 'Enter host name', value: 'Homo sapiens', width: '100%', }, }"
1167
+ "default": "{ render: (args) => { return html` <gs-app lapis=\"${LAPIS_URL}\"> <div class=\"max-w-screen-lg\"> <gs-text-filter .lapisField=${args.lapisField} .lapisFilter=${args.lapisFilter} .placeholderText=${args.placeholderText} .value=${args.value} .width=${args.width} ></gs-text-filter> </div> </gs-app>`; }, args: { lapisField: 'host', lapisFilter: { country: 'Germany' }, placeholderText: 'Enter host name', value: 'Homo sapiens', width: '100%', }, }"
1136
1168
  },
1137
1169
  {
1138
1170
  "kind": "variable",
1139
1171
  "name": "FiresEvents",
1140
1172
  "type": {
1141
- "text": "StoryObj<Required<TextInputProps>>"
1173
+ "text": "StoryObj<Required<TextFilterProps>>"
1142
1174
  },
1143
- "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', () => { 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 step('Empty input', async () => { await userEvent.type(inputField(), '{backspace>9/}'); }); await step('Enter a valid host name', async () => { await userEvent.type(inputField(), 'Homo s'); const dropdownOption = await canvas.findByText('Homo sapiens'); await userEvent.click(dropdownOption); }); await step('Verify event is fired with correct detail', async () => { await waitFor(async () => { await expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { host: 'Homo sapiens', }, }), ); }); }); await step('Remove initial value', async () => { await fireEvent.click(canvas.getByRole('button', { name: 'clear selection' })); await expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { host: undefined, }, }), ); }); await step('Empty input', async () => { inputField().blur(); await expect(listenerMock.mock.calls.at(-1)![0].detail).toStrictEqual({ host: undefined, }); }); }, args: { ...Default.args, value: '', }, }"
1175
+ "default": "{ ...Default, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-text-filter'); const inputField = () => canvas.getByPlaceholderText('Enter host name'); const listenerMock = fn(); await step('Setup event listener mock', () => { canvasElement.addEventListener('gs-text-filter-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 step('Empty input', async () => { await userEvent.type(inputField(), '{backspace>9/}'); }); await step('Enter a valid host name', async () => { await userEvent.type(inputField(), 'Homo s'); const dropdownOption = await canvas.findByText('Homo sapiens'); await userEvent.click(dropdownOption); }); await step('Verify event is fired with correct detail', async () => { await waitFor(async () => { await expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { host: 'Homo sapiens', }, }), ); }); }); await step('Remove initial value', async () => { await fireEvent.click(canvas.getByRole('button', { name: 'clear selection' })); await expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { host: undefined, }, }), ); }); await step('Empty input', async () => { inputField().blur(); await expect(listenerMock.mock.calls.at(-1)![0].detail).toStrictEqual({ host: undefined, }); }); }, args: { ...Default.args, value: '', }, }"
1144
1176
  }
1145
1177
  ],
1146
1178
  "exports": [
@@ -1149,7 +1181,7 @@
1149
1181
  "name": "default",
1150
1182
  "declaration": {
1151
1183
  "name": "meta",
1152
- "module": "src/web-components/input/gs-text-input.stories.ts"
1184
+ "module": "src/web-components/input/gs-text-filter.stories.ts"
1153
1185
  }
1154
1186
  },
1155
1187
  {
@@ -1157,7 +1189,7 @@
1157
1189
  "name": "Default",
1158
1190
  "declaration": {
1159
1191
  "name": "Default",
1160
- "module": "src/web-components/input/gs-text-input.stories.ts"
1192
+ "module": "src/web-components/input/gs-text-filter.stories.ts"
1161
1193
  }
1162
1194
  },
1163
1195
  {
@@ -1165,19 +1197,19 @@
1165
1197
  "name": "FiresEvents",
1166
1198
  "declaration": {
1167
1199
  "name": "FiresEvents",
1168
- "module": "src/web-components/input/gs-text-input.stories.ts"
1200
+ "module": "src/web-components/input/gs-text-filter.stories.ts"
1169
1201
  }
1170
1202
  }
1171
1203
  ]
1172
1204
  },
1173
1205
  {
1174
1206
  "kind": "javascript-module",
1175
- "path": "src/web-components/input/gs-text-input.tsx",
1207
+ "path": "src/web-components/input/gs-text-filter.tsx",
1176
1208
  "declarations": [
1177
1209
  {
1178
1210
  "kind": "class",
1179
1211
  "description": "\n## Context\n\nThis component provides a text input field to specify filters for arbitrary fields of this LAPIS instance.",
1180
- "name": "TextInputComponent",
1212
+ "name": "TextFilterComponent",
1181
1213
  "members": [
1182
1214
  {
1183
1215
  "kind": "field",
@@ -1186,7 +1218,7 @@
1186
1218
  "text": "string | undefined"
1187
1219
  },
1188
1220
  "default": "undefined",
1189
- "description": "The initial value to use for this text input.",
1221
+ "description": "The initial value to use for this text filter.",
1190
1222
  "attribute": "value"
1191
1223
  },
1192
1224
  {
@@ -1196,7 +1228,7 @@
1196
1228
  "text": "string"
1197
1229
  },
1198
1230
  "default": "''",
1199
- "description": "Required.\n\nThe LAPIS field name to use for this text input.\nThe field must exist on this LAPIS instance.",
1231
+ "description": "Required.\n\nThe LAPIS field name to use for this text filter.\nThe field must exist on this LAPIS instance.",
1200
1232
  "attribute": "lapisField"
1201
1233
  },
1202
1234
  {
@@ -1236,7 +1268,7 @@
1236
1268
  "text": "CustomEvent<Record<string, string | undefined>>"
1237
1269
  },
1238
1270
  "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\" } ```",
1239
- "name": "gs-text-input-changed"
1271
+ "name": "gs-text-filter-changed"
1240
1272
  }
1241
1273
  ],
1242
1274
  "attributes": [
@@ -1246,7 +1278,7 @@
1246
1278
  "text": "string | undefined"
1247
1279
  },
1248
1280
  "default": "undefined",
1249
- "description": "The initial value to use for this text input.",
1281
+ "description": "The initial value to use for this text filter.",
1250
1282
  "fieldName": "value"
1251
1283
  },
1252
1284
  {
@@ -1255,7 +1287,7 @@
1255
1287
  "text": "string"
1256
1288
  },
1257
1289
  "default": "''",
1258
- "description": "Required.\n\nThe LAPIS field name to use for this text input.\nThe field must exist on this LAPIS instance.",
1290
+ "description": "Required.\n\nThe LAPIS field name to use for this text filter.\nThe field must exist on this LAPIS instance.",
1259
1291
  "fieldName": "lapisField"
1260
1292
  },
1261
1293
  {
@@ -1290,25 +1322,25 @@
1290
1322
  "name": "PreactLitAdapter",
1291
1323
  "module": "/src/web-components/PreactLitAdapter"
1292
1324
  },
1293
- "tagName": "gs-text-input",
1325
+ "tagName": "gs-text-filter",
1294
1326
  "customElement": true
1295
1327
  }
1296
1328
  ],
1297
1329
  "exports": [
1298
1330
  {
1299
1331
  "kind": "js",
1300
- "name": "TextInputComponent",
1332
+ "name": "TextFilterComponent",
1301
1333
  "declaration": {
1302
- "name": "TextInputComponent",
1303
- "module": "src/web-components/input/gs-text-input.tsx"
1334
+ "name": "TextFilterComponent",
1335
+ "module": "src/web-components/input/gs-text-filter.tsx"
1304
1336
  }
1305
1337
  },
1306
1338
  {
1307
1339
  "kind": "custom-element-definition",
1308
- "name": "gs-text-input",
1340
+ "name": "gs-text-filter",
1309
1341
  "declaration": {
1310
- "name": "TextInputComponent",
1311
- "module": "src/web-components/input/gs-text-input.tsx"
1342
+ "name": "TextFilterComponent",
1343
+ "module": "src/web-components/input/gs-text-filter.tsx"
1312
1344
  }
1313
1345
  }
1314
1346
  ]
@@ -1320,10 +1352,10 @@
1320
1352
  "exports": [
1321
1353
  {
1322
1354
  "kind": "js",
1323
- "name": "DateRangeSelectorComponent",
1355
+ "name": "DateRangeFilterComponent",
1324
1356
  "declaration": {
1325
- "name": "DateRangeSelectorComponent",
1326
- "module": "./gs-date-range-selector"
1357
+ "name": "DateRangeFilterComponent",
1358
+ "module": "./gs-date-range-filter"
1327
1359
  }
1328
1360
  },
1329
1361
  {
@@ -1336,10 +1368,10 @@
1336
1368
  },
1337
1369
  {
1338
1370
  "kind": "js",
1339
- "name": "TextInputComponent",
1371
+ "name": "TextFilterComponent",
1340
1372
  "declaration": {
1341
- "name": "TextInputComponent",
1342
- "module": "./gs-text-input"
1373
+ "name": "TextFilterComponent",
1374
+ "module": "./gs-text-filter"
1343
1375
  }
1344
1376
  },
1345
1377
  {
@@ -1432,11 +1464,19 @@
1432
1464
  },
1433
1465
  {
1434
1466
  "kind": "variable",
1435
- "name": "Table",
1467
+ "name": "Default",
1436
1468
  "type": {
1437
1469
  "text": "StoryObj<Required<AggregateProps>>"
1438
1470
  },
1439
- "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-aggregate .fields=${args.fields} .lapisFilter=${args.lapisFilter} .views=${args.views} .width=${args.width} .height=${args.height} .initialSortField=${args.initialSortField} .initialSortDirection=${args.initialSortDirection} .pageSize=${args.pageSize} .maxNumberOfBars=${args.maxNumberOfBars} ></gs-aggregate> </gs-app> `, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'host'], country: 'USA', }, }, response: { status: 200, body: aggregatedData, }, }, ], }, }, args: { fields: ['division', 'host'], views: ['table', 'bar'], lapisFilter: { country: 'USA', }, width: '100%', height: '700px', initialSortField: 'count', initialSortDirection: 'descending', pageSize: 10, maxNumberOfBars: 10, }, }"
1471
+ "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-aggregate .fields=${args.fields} .lapisFilter=${args.lapisFilter} .views=${args.views} .width=${args.width} .height=${args.height} .initialSortField=${args.initialSortField} .initialSortDirection=${args.initialSortDirection} .pageSize=${args.pageSize} .maxNumberOfBars=${args.maxNumberOfBars} ></gs-aggregate> </gs-app> `, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'host'], country: 'USA', }, }, response: { status: 200, body: aggregatedData, }, }, ], }, }, args: { fields: ['division', 'host'], views: ['table', 'bar'], lapisFilter: { country: 'USA', }, width: '100%', initialSortField: 'count', initialSortDirection: 'descending', pageSize: 10, maxNumberOfBars: 10, }, }"
1472
+ },
1473
+ {
1474
+ "kind": "variable",
1475
+ "name": "WithFixedHeight",
1476
+ "type": {
1477
+ "text": "StoryObj<Required<AggregateProps>>"
1478
+ },
1479
+ "default": "{ ...Default, args: { ...Default.args, height: '700px', }, }"
1440
1480
  },
1441
1481
  {
1442
1482
  "kind": "variable",
@@ -1444,7 +1484,7 @@
1444
1484
  "type": {
1445
1485
  "text": "StoryObj<Required<AggregateProps>>"
1446
1486
  },
1447
- "default": "{ ...Table, args: { ...Table.args, fields: ['division'], views: ['bar', 'table'], }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division'], country: 'USA', }, }, response: { status: 200, body: aggregatedDataWith1Field, }, }, ], }, }, }"
1487
+ "default": "{ ...Default, args: { ...Default.args, fields: ['division'], views: ['bar', 'table'], }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division'], country: 'USA', }, }, response: { status: 200, body: aggregatedDataWith1Field, }, }, ], }, }, }"
1448
1488
  },
1449
1489
  {
1450
1490
  "kind": "variable",
@@ -1452,7 +1492,7 @@
1452
1492
  "type": {
1453
1493
  "text": "StoryObj<Required<AggregateProps>>"
1454
1494
  },
1455
- "default": "{ ...Table, args: { ...Table.args, fields: ['division', 'nextstrainClade'], lapisFilter: { country: 'Germany', dateTo: '2022-02-01', }, views: ['bar', 'table'], }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'nextstrainClade'], country: 'Germany', dateTo: '2022-02-01', }, }, response: { status: 200, body: aggregatedDataWith2Fields, }, }, ], }, }, }"
1495
+ "default": "{ ...Default, args: { ...Default.args, fields: ['division', 'nextstrainClade'], lapisFilter: { country: 'Germany', dateTo: '2022-02-01', }, views: ['bar', 'table'], }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division', 'nextstrainClade'], country: 'Germany', dateTo: '2022-02-01', }, }, response: { status: 200, body: aggregatedDataWith2Fields, }, }, ], }, }, }"
1456
1496
  }
1457
1497
  ],
1458
1498
  "exports": [
@@ -1466,9 +1506,17 @@
1466
1506
  },
1467
1507
  {
1468
1508
  "kind": "js",
1469
- "name": "Table",
1509
+ "name": "Default",
1510
+ "declaration": {
1511
+ "name": "Default",
1512
+ "module": "src/web-components/visualization/gs-aggregate.stories.ts"
1513
+ }
1514
+ },
1515
+ {
1516
+ "kind": "js",
1517
+ "name": "WithFixedHeight",
1470
1518
  "declaration": {
1471
- "name": "Table",
1519
+ "name": "WithFixedHeight",
1472
1520
  "module": "src/web-components/visualization/gs-aggregate.stories.ts"
1473
1521
  }
1474
1522
  },
@@ -1543,9 +1591,9 @@
1543
1591
  "kind": "field",
1544
1592
  "name": "height",
1545
1593
  "type": {
1546
- "text": "string"
1594
+ "text": "string | undefined"
1547
1595
  },
1548
- "default": "'700px'",
1596
+ "default": "undefined",
1549
1597
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1550
1598
  "attribute": "height"
1551
1599
  },
@@ -1630,9 +1678,9 @@
1630
1678
  {
1631
1679
  "name": "height",
1632
1680
  "type": {
1633
- "text": "string"
1681
+ "text": "string | undefined"
1634
1682
  },
1635
- "default": "'700px'",
1683
+ "default": "undefined",
1636
1684
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1637
1685
  "fieldName": "height"
1638
1686
  },
@@ -1718,7 +1766,7 @@
1718
1766
  "type": {
1719
1767
  "text": "StoryObj<Required<MutationComparisonProps>>"
1720
1768
  },
1721
- "default": "{ ...Template, args: { lapisFilters: [ { displayName: 'Some dataset', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo }, }, { displayName: 'Other dataset', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, }, }, ], sequenceType: 'nucleotide', views: ['table', 'venn'], width: '100%', height: '700px', pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'nucleotideMutationsSomeDataset', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsSomeDataset, }, }, { matcher: { name: 'nucleotideMutationsOtherDataset', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsOtherDataset, }, }, ], }, }, 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)); }); }, }"
1769
+ "default": "{ ...Template, args: { lapisFilters: [ { displayName: 'Some dataset', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo }, }, { displayName: 'Other dataset', lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, }, }, ], sequenceType: 'nucleotide', views: ['table', 'venn'], width: '100%', pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'nucleotideMutationsSomeDataset', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsSomeDataset, }, }, { matcher: { name: 'nucleotideMutationsOtherDataset', url: NUCLEOTIDE_MUTATIONS_ENDPOINT, body: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom, dateTo, minProportion: 0, }, }, response: { status: 200, body: nucleotideMutationsOtherDataset, }, }, ], }, }, 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)); }); }, }"
1722
1770
  },
1723
1771
  {
1724
1772
  "kind": "variable",
@@ -1727,6 +1775,14 @@
1727
1775
  "text": "StoryObj<Required<MutationComparisonProps>>"
1728
1776
  },
1729
1777
  "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(), ); }); }, }"
1778
+ },
1779
+ {
1780
+ "kind": "variable",
1781
+ "name": "WithFixedHeight",
1782
+ "type": {
1783
+ "text": "StoryObj<Required<MutationComparisonProps>>"
1784
+ },
1785
+ "default": "{ ...Default, args: { ...Default.args, height: '700px', }, }"
1730
1786
  }
1731
1787
  ],
1732
1788
  "exports": [
@@ -1753,6 +1809,14 @@
1753
1809
  "name": "VennDiagram",
1754
1810
  "module": "src/web-components/visualization/gs-mutation-comparison.stories.ts"
1755
1811
  }
1812
+ },
1813
+ {
1814
+ "kind": "js",
1815
+ "name": "WithFixedHeight",
1816
+ "declaration": {
1817
+ "name": "WithFixedHeight",
1818
+ "module": "src/web-components/visualization/gs-mutation-comparison.stories.ts"
1819
+ }
1756
1820
  }
1757
1821
  ]
1758
1822
  },
@@ -1809,9 +1873,9 @@
1809
1873
  "kind": "field",
1810
1874
  "name": "height",
1811
1875
  "type": {
1812
- "text": "string"
1876
+ "text": "string | undefined"
1813
1877
  },
1814
- "default": "'700px'",
1878
+ "default": "undefined",
1815
1879
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1816
1880
  "attribute": "height"
1817
1881
  },
@@ -1866,9 +1930,9 @@
1866
1930
  {
1867
1931
  "name": "height",
1868
1932
  "type": {
1869
- "text": "string"
1933
+ "text": "string | undefined"
1870
1934
  },
1871
- "default": "'700px'",
1935
+ "default": "undefined",
1872
1936
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
1873
1937
  "fieldName": "height"
1874
1938
  },
@@ -1919,7 +1983,7 @@
1919
1983
  "type": {
1920
1984
  "text": "Meta<Required<MutationsOverTimeProps>>"
1921
1985
  },
1922
- "default": "{ title: 'Visualization/Mutations over time', component: 'gs-mutations-over-time', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['grid'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, lapisDateField: { control: 'text' }, }, args: { lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-07-10' }, sequenceType: 'nucleotide', views: ['grid'], width: '100%', height: '700px', granularity: 'month', lapisDateField: 'date', }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
1986
+ "default": "{ title: 'Visualization/Mutations over time', component: 'gs-mutations-over-time', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['grid'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, lapisDateField: { control: 'text' }, }, args: { lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-07-10' }, sequenceType: 'nucleotide', views: ['grid'], width: '100%', granularity: 'month', lapisDateField: 'date', }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
1923
1987
  },
1924
1988
  {
1925
1989
  "kind": "variable",
@@ -1952,6 +2016,14 @@
1952
2016
  "text": "StoryObj<Required<MutationsOverTimeProps>>"
1953
2017
  },
1954
2018
  "default": "{ ...ByMonth, args: { ...ByMonth.args, width: '300px', }, }"
2019
+ },
2020
+ {
2021
+ "kind": "variable",
2022
+ "name": "WithFixedHeight",
2023
+ "type": {
2024
+ "text": "StoryObj<Required<MutationsOverTimeProps>>"
2025
+ },
2026
+ "default": "{ ...Template, args: { ...Template, height: '700px', }, }"
1955
2027
  }
1956
2028
  ],
1957
2029
  "exports": [
@@ -1994,6 +2066,14 @@
1994
2066
  "name": "HideProportionOnSmallScreen",
1995
2067
  "module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
1996
2068
  }
2069
+ },
2070
+ {
2071
+ "kind": "js",
2072
+ "name": "WithFixedHeight",
2073
+ "declaration": {
2074
+ "name": "WithFixedHeight",
2075
+ "module": "src/web-components/visualization/gs-mutations-over-time.stories.ts"
2076
+ }
1997
2077
  }
1998
2078
  ]
1999
2079
  },
@@ -2050,9 +2130,9 @@
2050
2130
  "kind": "field",
2051
2131
  "name": "height",
2052
2132
  "type": {
2053
- "text": "string"
2133
+ "text": "string | undefined"
2054
2134
  },
2055
- "default": "'700px'",
2135
+ "default": "undefined",
2056
2136
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2057
2137
  "attribute": "height"
2058
2138
  },
@@ -2117,9 +2197,9 @@
2117
2197
  {
2118
2198
  "name": "height",
2119
2199
  "type": {
2120
- "text": "string"
2200
+ "text": "string | undefined"
2121
2201
  },
2122
- "default": "'700px'",
2202
+ "default": "undefined",
2123
2203
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2124
2204
  "fieldName": "height"
2125
2205
  },
@@ -2179,7 +2259,7 @@
2179
2259
  "type": {
2180
2260
  "text": "Meta<Required<MutationsProps>>"
2181
2261
  },
2182
- "default": "{ title: 'Visualization/Mutations', component: 'gs-mutations', argTypes: { lapisFilter: { control: 'object' }, baselineLapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'grid', 'insertions'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, pageSize: { control: 'object' }, }, args: { lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo: '2022-01-01' }, baselineLapisFilter: { country: 'Switzerland', dateTo: '2022-01-01' }, sequenceType: 'nucleotide', views: ['grid', 'table', 'insertions'], width: '100%', height: '700px', pageSize: 10, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2262
+ "default": "{ title: 'Visualization/Mutations', component: 'gs-mutations', argTypes: { lapisFilter: { control: 'object' }, baselineLapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, views: { options: ['table', 'grid', 'insertions'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, pageSize: { control: 'object' }, }, args: { lapisFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateTo: '2022-01-01' }, baselineLapisFilter: { country: 'Switzerland', dateTo: '2022-01-01' }, sequenceType: 'nucleotide', views: ['grid', 'table', 'insertions'], width: '100%', pageSize: 10, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2183
2263
  },
2184
2264
  {
2185
2265
  "kind": "variable",
@@ -2212,6 +2292,14 @@
2212
2292
  "text": "StoryObj<Required<MutationsProps>>"
2213
2293
  },
2214
2294
  "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' })); }, }"
2295
+ },
2296
+ {
2297
+ "kind": "variable",
2298
+ "name": "WithFixedHeight",
2299
+ "type": {
2300
+ "text": "StoryObj<Required<MutationsProps>>"
2301
+ },
2302
+ "default": "{ ...Default, args: { ...Default.args, height: '700px', }, }"
2215
2303
  }
2216
2304
  ],
2217
2305
  "exports": [
@@ -2254,6 +2342,14 @@
2254
2342
  "name": "OnInsertionsTab",
2255
2343
  "module": "src/web-components/visualization/gs-mutations.stories.ts"
2256
2344
  }
2345
+ },
2346
+ {
2347
+ "kind": "js",
2348
+ "name": "WithFixedHeight",
2349
+ "declaration": {
2350
+ "name": "WithFixedHeight",
2351
+ "module": "src/web-components/visualization/gs-mutations.stories.ts"
2352
+ }
2257
2353
  }
2258
2354
  ]
2259
2355
  },
@@ -2320,9 +2416,9 @@
2320
2416
  "kind": "field",
2321
2417
  "name": "height",
2322
2418
  "type": {
2323
- "text": "string"
2419
+ "text": "string | undefined"
2324
2420
  },
2325
- "default": "'700px'",
2421
+ "default": "undefined",
2326
2422
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2327
2423
  "attribute": "height"
2328
2424
  },
@@ -2386,9 +2482,9 @@
2386
2482
  {
2387
2483
  "name": "height",
2388
2484
  "type": {
2389
- "text": "string"
2485
+ "text": "string | undefined"
2390
2486
  },
2391
- "default": "'700px'",
2487
+ "default": "undefined",
2392
2488
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2393
2489
  "fieldName": "height"
2394
2490
  },
@@ -2439,7 +2535,7 @@
2439
2535
  "type": {
2440
2536
  "text": "Meta<NumberSequencesOverTimeProps>"
2441
2537
  },
2442
- "default": "{ title: 'Visualization/Number sequences over time', component: 'gs-number-sequences-over-time', argTypes: { granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, views: { options: ['bar', 'line', 'table'], control: { type: 'check' }, }, pageSize: { control: 'object' }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2538
+ "default": "{ title: 'Visualization/Number sequences over time', component: 'gs-number-sequences-over-time', argTypes: { granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, views: { options: ['bar', 'line', 'table'], control: { type: 'check' }, }, pageSize: { control: 'object' }, height: { control: 'text', }, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), tags: ['autodocs'], }"
2443
2539
  },
2444
2540
  {
2445
2541
  "kind": "variable",
@@ -2480,6 +2576,14 @@
2480
2576
  "text": "StoryObj<NumberSequencesOverTimeProps>"
2481
2577
  },
2482
2578
  "default": "{ ...Template, args: { ...Template.args, lapisFilters: [ { displayName: 'XBB', lapisFilter: { country: 'USA', pangoLineage: 'XBB*', dateFrom: '2022-01-01', dateTo: '2022-12-31' }, }, { displayName: 'JN.1', lapisFilter: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' } }, ], }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'XBB*', dateFrom: '2022-01-01', dateTo: '2022-12-31', fields: ['date'], }, }, response: { status: 200, body: twoVariantsXBB, }, }, { matcher: { name: 'aggregatedJN.1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: twoVariantsJN1, }, }, ], }, }, }"
2579
+ },
2580
+ {
2581
+ "kind": "variable",
2582
+ "name": "WithFixedHeight",
2583
+ "type": {
2584
+ "text": "StoryObj<NumberSequencesOverTimeProps>"
2585
+ },
2586
+ "default": "{ ...Template, args: { ...Template.args, height: '700px', }, }"
2483
2587
  }
2484
2588
  ],
2485
2589
  "exports": [
@@ -2530,6 +2634,14 @@
2530
2634
  "name": "TwoDatasetsWithNonOverlappingDates",
2531
2635
  "module": "src/web-components/visualization/gs-number-sequences-over-time.stories.ts"
2532
2636
  }
2637
+ },
2638
+ {
2639
+ "kind": "js",
2640
+ "name": "WithFixedHeight",
2641
+ "declaration": {
2642
+ "name": "WithFixedHeight",
2643
+ "module": "src/web-components/visualization/gs-number-sequences-over-time.stories.ts"
2644
+ }
2533
2645
  }
2534
2646
  ]
2535
2647
  },
@@ -2586,9 +2698,9 @@
2586
2698
  "kind": "field",
2587
2699
  "name": "height",
2588
2700
  "type": {
2589
- "text": "string"
2701
+ "text": "string | undefined"
2590
2702
  },
2591
- "default": "'700px'",
2703
+ "default": "undefined",
2592
2704
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2593
2705
  "attribute": "height"
2594
2706
  },
@@ -2663,9 +2775,9 @@
2663
2775
  {
2664
2776
  "name": "height",
2665
2777
  "type": {
2666
- "text": "string"
2778
+ "text": "string | undefined"
2667
2779
  },
2668
- "default": "'700px'",
2780
+ "default": "undefined",
2669
2781
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2670
2782
  "fieldName": "height"
2671
2783
  },
@@ -2742,7 +2854,7 @@
2742
2854
  "type": {
2743
2855
  "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2744
2856
  },
2745
- "default": "{ ...Template, args: { numeratorFilters: [ { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01' } }, { displayName: 'JN.1', lapisFilter: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' } }, ], denominatorFilter: { country: 'USA', dateFrom: '2023-01-01' }, granularity: 'month', smoothingWindow: 0, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterEG, }, }, { matcher: { name: 'numeratorJN1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterJN1, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilter, }, }, ], }, }, }"
2857
+ "default": "{ ...Template, args: { numeratorFilters: [ { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01' } }, { displayName: 'JN.1', lapisFilter: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01' } }, ], denominatorFilter: { country: 'USA', dateFrom: '2023-01-01' }, granularity: 'month', smoothingWindow: 0, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorEG', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'EG*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterEG, }, }, { matcher: { name: 'numeratorJN1', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'JN.1*', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterJN1, }, }, { matcher: { name: 'denominator', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-01-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilter, }, }, ], }, }, }"
2746
2858
  },
2747
2859
  {
2748
2860
  "kind": "variable",
@@ -2750,7 +2862,7 @@
2750
2862
  "type": {
2751
2863
  "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2752
2864
  },
2753
- "default": "{ ...Template, args: { numeratorFilters: [ { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01' }, }, ], denominatorFilter: { country: 'USA', dateFrom: '2023-10-01' }, granularity: 'week', smoothingWindow: 2, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', height: '700px', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorOneDataset', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterOneDataset, }, }, { matcher: { name: 'denominatorOneDataset', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilterOneDataset, }, }, ], }, }, }"
2865
+ "default": "{ ...Template, args: { numeratorFilters: [ { displayName: 'EG', lapisFilter: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01' }, }, ], denominatorFilter: { country: 'USA', dateFrom: '2023-10-01' }, granularity: 'week', smoothingWindow: 2, views: ['bar', 'line', 'bubble', 'table'], confidenceIntervalMethods: ['wilson'], width: '100%', lapisDateField: 'date', pageSize: 10, yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorOneDataset', url: AGGREGATED_ENDPOINT, body: { country: 'USA', pangoLineage: 'BA.2.86*', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: numeratorFilterOneDataset, }, }, { matcher: { name: 'denominatorOneDataset', url: AGGREGATED_ENDPOINT, body: { country: 'USA', dateFrom: '2023-10-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilterOneDataset, }, }, ], }, }, }"
2754
2866
  },
2755
2867
  {
2756
2868
  "kind": "variable",
@@ -2775,6 +2887,14 @@
2775
2887
  "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2776
2888
  },
2777
2889
  "default": "{ ...OneDataset, 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' })); }, }"
2890
+ },
2891
+ {
2892
+ "kind": "variable",
2893
+ "name": "WithFixedHeight",
2894
+ "type": {
2895
+ "text": "StoryObj<Required<PrevalenceOverTimeProps>>"
2896
+ },
2897
+ "default": "{ ...TwoDatasets, args: { ...TwoDatasets.args, height: '700px', }, }"
2778
2898
  }
2779
2899
  ],
2780
2900
  "exports": [
@@ -2825,6 +2945,14 @@
2825
2945
  "name": "OneDatasetOnTableTab",
2826
2946
  "module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
2827
2947
  }
2948
+ },
2949
+ {
2950
+ "kind": "js",
2951
+ "name": "WithFixedHeight",
2952
+ "declaration": {
2953
+ "name": "WithFixedHeight",
2954
+ "module": "src/web-components/visualization/gs-prevalence-over-time.stories.ts"
2955
+ }
2828
2956
  }
2829
2957
  ]
2830
2958
  },
@@ -2911,9 +3039,9 @@
2911
3039
  "kind": "field",
2912
3040
  "name": "height",
2913
3041
  "type": {
2914
- "text": "string"
3042
+ "text": "string | undefined"
2915
3043
  },
2916
- "default": "'700px'",
3044
+ "default": "undefined",
2917
3045
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
2918
3046
  "attribute": "height"
2919
3047
  },
@@ -3025,9 +3153,9 @@
3025
3153
  {
3026
3154
  "name": "height",
3027
3155
  "type": {
3028
- "text": "string"
3156
+ "text": "string | undefined"
3029
3157
  },
3030
- "default": "'700px'",
3158
+ "default": "undefined",
3031
3159
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3032
3160
  "fieldName": "height"
3033
3161
  },
@@ -3113,7 +3241,15 @@
3113
3241
  "type": {
3114
3242
  "text": "StoryObj<Required<RelativeGrowthAdvantageProps>>"
3115
3243
  },
3116
- "default": "{ ...Template, args: { numeratorFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01', }, denominatorFilter: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01' }, generationTime: 7, views: ['line'], width: '100%', height: '700px', lapisDateField: 'date', yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorFilter', 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: numeratorFilter, }, }, { matcher: { name: 'denominatorFilter', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilter, }, }, ], }, }, }"
3244
+ "default": "{ ...Template, args: { numeratorFilter: { country: 'Switzerland', pangoLineage: 'B.1.1.7', dateFrom: '2020-12-01', dateTo: '2021-03-01', }, denominatorFilter: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01' }, generationTime: 7, views: ['line'], width: '100%', lapisDateField: 'date', yAxisMaxLinear: 1, yAxisMaxLogarithmic: 'limitTo1', }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'numeratorFilter', 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: numeratorFilter, }, }, { matcher: { name: 'denominatorFilter', url: AGGREGATED_ENDPOINT, body: { country: 'Switzerland', dateFrom: '2020-12-01', dateTo: '2021-03-01', fields: ['date'], }, }, response: { status: 200, body: denominatorFilter, }, }, ], }, }, }"
3245
+ },
3246
+ {
3247
+ "kind": "variable",
3248
+ "name": "WithFixedHeight",
3249
+ "type": {
3250
+ "text": "StoryObj<Required<RelativeGrowthAdvantageProps>>"
3251
+ },
3252
+ "default": "{ ...Default, args: { ...Default.args, height: '700px', }, }"
3117
3253
  }
3118
3254
  ],
3119
3255
  "exports": [
@@ -3132,6 +3268,14 @@
3132
3268
  "name": "Default",
3133
3269
  "module": "src/web-components/visualization/gs-relative-growth-advantage.stories.ts"
3134
3270
  }
3271
+ },
3272
+ {
3273
+ "kind": "js",
3274
+ "name": "WithFixedHeight",
3275
+ "declaration": {
3276
+ "name": "WithFixedHeight",
3277
+ "module": "src/web-components/visualization/gs-relative-growth-advantage.stories.ts"
3278
+ }
3135
3279
  }
3136
3280
  ]
3137
3281
  },
@@ -3198,9 +3342,9 @@
3198
3342
  "kind": "field",
3199
3343
  "name": "height",
3200
3344
  "type": {
3201
- "text": "string"
3345
+ "text": "string | undefined"
3202
3346
  },
3203
- "default": "'700px'",
3347
+ "default": "undefined",
3204
3348
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3205
3349
  "attribute": "height"
3206
3350
  },
@@ -3284,9 +3428,9 @@
3284
3428
  {
3285
3429
  "name": "height",
3286
3430
  "type": {
3287
- "text": "string"
3431
+ "text": "string | undefined"
3288
3432
  },
3289
- "default": "'700px'",
3433
+ "default": "undefined",
3290
3434
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3291
3435
  "fieldName": "height"
3292
3436
  },
@@ -3387,7 +3531,15 @@
3387
3531
  "type": {
3388
3532
  "text": "StoryObj<SequencesByLocationProps>"
3389
3533
  },
3390
- "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-sequences-by-location .lapisFilter=${args.lapisFilter} .lapisLocationField=${args.lapisLocationField} .width=${args.width} .height=${args.height} .views=${args.views} .pageSize=${args.pageSize} ></gs-sequences-by-location> </gs-app> `, args: { lapisFilter: { dateFrom: '2022-01-01', dateTo: '2022-04-01', country: 'Germany' }, lapisLocationField: 'division', width: '100%', height: '700px', views: ['table'], pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division'], dateFrom: '2022-01-01', dateTo: '2022-04-01', country: 'Germany', }, }, response: { status: 200, body: aggregatedGermany, }, }, ], }, }, }"
3534
+ "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-sequences-by-location .lapisFilter=${args.lapisFilter} .lapisLocationField=${args.lapisLocationField} .width=${args.width} .height=${args.height} .views=${args.views} .pageSize=${args.pageSize} ></gs-sequences-by-location> </gs-app> `, args: { lapisFilter: { dateFrom: '2022-01-01', dateTo: '2022-04-01', country: 'Germany' }, lapisLocationField: 'division', width: '100%', views: ['table'], pageSize: 10, }, parameters: { fetchMock: { mocks: [ { matcher: { name: 'aggregatedData', url: AGGREGATED_ENDPOINT, body: { fields: ['division'], dateFrom: '2022-01-01', dateTo: '2022-04-01', country: 'Germany', }, }, response: { status: 200, body: aggregatedGermany, }, }, ], }, }, }"
3535
+ },
3536
+ {
3537
+ "kind": "variable",
3538
+ "name": "WithFixedHeight",
3539
+ "type": {
3540
+ "text": "StoryObj<SequencesByLocationProps>"
3541
+ },
3542
+ "default": "{ ...WorldMap, args: { ...WorldMap.args, height: '700px', }, }"
3391
3543
  }
3392
3544
  ],
3393
3545
  "exports": [
@@ -3430,6 +3582,14 @@
3430
3582
  "name": "GermanyTableOnly",
3431
3583
  "module": "src/web-components/visualization/gs-sequences-by-location.stories.ts"
3432
3584
  }
3585
+ },
3586
+ {
3587
+ "kind": "js",
3588
+ "name": "WithFixedHeight",
3589
+ "declaration": {
3590
+ "name": "WithFixedHeight",
3591
+ "module": "src/web-components/visualization/gs-sequences-by-location.stories.ts"
3592
+ }
3433
3593
  }
3434
3594
  ]
3435
3595
  },
@@ -3496,9 +3656,9 @@
3496
3656
  "kind": "field",
3497
3657
  "name": "height",
3498
3658
  "type": {
3499
- "text": "string"
3659
+ "text": "string | undefined"
3500
3660
  },
3501
- "default": "'700px'",
3661
+ "default": "undefined",
3502
3662
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3503
3663
  "attribute": "height"
3504
3664
  },
@@ -3602,9 +3762,9 @@
3602
3762
  {
3603
3763
  "name": "height",
3604
3764
  "type": {
3605
- "text": "string"
3765
+ "text": "string | undefined"
3606
3766
  },
3607
- "default": "'700px'",
3767
+ "default": "undefined",
3608
3768
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3609
3769
  "fieldName": "height"
3610
3770
  },
@@ -3699,7 +3859,7 @@
3699
3859
  "type": {
3700
3860
  "text": "StoryObj<Required<StatisticsProps>>"
3701
3861
  },
3702
- "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-statistics .numeratorFilter=${args.numeratorFilter} .denominatorFilter=${args.denominatorFilter} .width=${args.width} .height=${args.height} ></gs-statistics> </gs-app> `, args: { denominatorFilter: { country: 'USA', }, numeratorFilter: { country: 'USA', division: 'Alabama', }, width: '100%', height: '700px', }, }"
3862
+ "default": "{ render: (args) => html` <gs-app lapis=\"${LAPIS_URL}\"> <gs-statistics .numeratorFilter=${args.numeratorFilter} .denominatorFilter=${args.denominatorFilter} .width=${args.width} .height=${args.height} ></gs-statistics> </gs-app> `, args: { denominatorFilter: { country: 'USA', }, numeratorFilter: { country: 'USA', division: 'Alabama', }, width: '100%', }, }"
3703
3863
  }
3704
3864
  ],
3705
3865
  "exports": [
@@ -3764,9 +3924,9 @@
3764
3924
  "kind": "field",
3765
3925
  "name": "height",
3766
3926
  "type": {
3767
- "text": "string"
3927
+ "text": "string | undefined"
3768
3928
  },
3769
- "default": "'100%'",
3929
+ "default": "undefined",
3770
3930
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3771
3931
  "attribute": "height"
3772
3932
  }
@@ -3802,9 +3962,9 @@
3802
3962
  {
3803
3963
  "name": "height",
3804
3964
  "type": {
3805
- "text": "string"
3965
+ "text": "string | undefined"
3806
3966
  },
3807
- "default": "'100%'",
3967
+ "default": "undefined",
3808
3968
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
3809
3969
  "fieldName": "height"
3810
3970
  }
@@ -3925,7 +4085,7 @@
3925
4085
  "type": {
3926
4086
  "text": "Meta<WastewaterMutationsOverTimeProps & { infoText: string }>"
3927
4087
  },
3928
- "default": "{ title: 'Wastewater visualization/Wastewater mutations over time', component: 'gs-wastewater-mutations-over-time', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, width: { control: 'text' }, height: { control: 'text' }, }, args: { lapisFilter: { versionStatus: 'LATEST_VERSION', isRevocation: false }, sequenceType: 'nucleotide', width: '100%', height: '700px', infoText: 'Some info text', maxNumberOfGridRows: 100, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
4088
+ "default": "{ title: 'Wastewater visualization/Wastewater mutations over time', component: 'gs-wastewater-mutations-over-time', argTypes: { lapisFilter: { control: 'object' }, sequenceType: { options: ['nucleotide', 'amino acid'], control: { type: 'radio' }, }, width: { control: 'text' }, height: { control: 'text' }, }, args: { lapisFilter: { versionStatus: 'LATEST_VERSION', isRevocation: false }, sequenceType: 'nucleotide', width: '100%', height: undefined, infoText: 'Some info text', maxNumberOfGridRows: 100, }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: {}, }), tags: ['autodocs'], }"
3929
4089
  },
3930
4090
  {
3931
4091
  "kind": "variable",
@@ -3934,6 +4094,14 @@
3934
4094
  "text": "StoryObj<WastewaterMutationsOverTimeProps & { infoText: string }>"
3935
4095
  },
3936
4096
  "default": "{ render: (args) => html` <gs-app lapis=\"${WISE_LAPIS_URL}\"> <gs-wastewater-mutations-over-time .lapisFilter=${args.lapisFilter} .sequenceType=${args.sequenceType} .width=${args.width} .height=${args.height} .maxNumberOfGridRows=${args.maxNumberOfGridRows} > <span slot=\"infoText\">${args.infoText}</span> </gs-wastewater-mutations-over-time> </gs-app> `, parameters: { fetchMock: { mocks: [ { matcher: { name: 'details', url: WISE_DETAILS_ENDPOINT, body: { fields: ['date', 'location', 'nucleotideMutationFrequency', 'aminoAcidMutationFrequency'], versionStatus: 'LATEST_VERSION', isRevocation: false, }, }, response: { status: 200, body: details, }, }, ], }, }, }"
4097
+ },
4098
+ {
4099
+ "kind": "variable",
4100
+ "name": "WithFixedHeight",
4101
+ "type": {
4102
+ "text": "StoryObj<WastewaterMutationsOverTimeProps & { infoText: string }>"
4103
+ },
4104
+ "default": "{ ...WastewaterMutationsOverTime, args: { ...WastewaterMutationsOverTime.args, height: '700px', }, }"
3937
4105
  }
3938
4106
  ],
3939
4107
  "exports": [
@@ -3952,6 +4120,14 @@
3952
4120
  "name": "WastewaterMutationsOverTime",
3953
4121
  "module": "src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts"
3954
4122
  }
4123
+ },
4124
+ {
4125
+ "kind": "js",
4126
+ "name": "WithFixedHeight",
4127
+ "declaration": {
4128
+ "name": "WithFixedHeight",
4129
+ "module": "src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.stories.ts"
4130
+ }
3955
4131
  }
3956
4132
  ]
3957
4133
  },
@@ -4004,9 +4180,9 @@
4004
4180
  "kind": "field",
4005
4181
  "name": "height",
4006
4182
  "type": {
4007
- "text": "string"
4183
+ "text": "string | undefined"
4008
4184
  },
4009
- "default": "'700px'",
4185
+ "default": "undefined",
4010
4186
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
4011
4187
  "attribute": "height"
4012
4188
  },
@@ -4052,9 +4228,9 @@
4052
4228
  {
4053
4229
  "name": "height",
4054
4230
  "type": {
4055
- "text": "string"
4231
+ "text": "string | undefined"
4056
4232
  },
4057
- "default": "'700px'",
4233
+ "default": "undefined",
4058
4234
  "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.",
4059
4235
  "fieldName": "height"
4060
4236
  },