@genspectrum/dashboard-components 0.2.0 → 0.3.1

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 (59) hide show
  1. package/custom-elements.json +330 -179
  2. package/dist/dashboard-components.js +379 -187
  3. package/dist/dashboard-components.js.map +1 -1
  4. package/dist/genspectrum-components.d.ts +160 -114
  5. package/dist/style.css +171 -71
  6. package/package.json +1 -2
  7. package/src/constants.ts +1 -1
  8. package/src/lapisApi/lapisApi.ts +46 -2
  9. package/src/lapisApi/lapisTypes.ts +14 -0
  10. package/src/preact/aggregatedData/aggregate.stories.tsx +4 -2
  11. package/src/preact/aggregatedData/aggregate.tsx +8 -6
  12. package/src/preact/components/error-boundary.stories.tsx +6 -14
  13. package/src/preact/components/error-boundary.tsx +2 -11
  14. package/src/preact/components/error-display.stories.tsx +12 -5
  15. package/src/preact/components/error-display.tsx +37 -3
  16. package/src/preact/components/loading-display.stories.tsx +1 -1
  17. package/src/preact/components/resize-container.tsx +5 -14
  18. package/src/preact/dateRangeSelector/date-range-selector.stories.tsx +2 -0
  19. package/src/preact/dateRangeSelector/date-range-selector.tsx +11 -8
  20. package/src/preact/locationFilter/fetchAutocompletionList.ts +15 -1
  21. package/src/preact/locationFilter/location-filter.stories.tsx +1 -1
  22. package/src/preact/locationFilter/location-filter.tsx +16 -30
  23. package/src/preact/mutationComparison/mutation-comparison.stories.tsx +6 -3
  24. package/src/preact/mutationComparison/mutation-comparison.tsx +10 -13
  25. package/src/preact/mutationComparison/queryMutationData.ts +2 -3
  26. package/src/preact/mutationFilter/mutation-filter.stories.tsx +8 -8
  27. package/src/preact/mutationFilter/mutation-filter.tsx +7 -6
  28. package/src/preact/mutations/mutations.stories.tsx +6 -3
  29. package/src/preact/mutations/mutations.tsx +8 -6
  30. package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +14 -7
  31. package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +10 -8
  32. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +6 -3
  33. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +9 -7
  34. package/src/preact/textInput/text-input.stories.tsx +26 -0
  35. package/src/preact/textInput/text-input.tsx +4 -5
  36. package/src/query/queryPrevalenceOverTime.ts +4 -10
  37. package/src/types.ts +4 -1
  38. package/src/web-components/ResizeContainer.mdx +13 -0
  39. package/src/web-components/app.ts +3 -1
  40. package/src/web-components/input/gs-date-range-selector.stories.ts +10 -2
  41. package/src/web-components/input/gs-date-range-selector.tsx +26 -16
  42. package/src/web-components/input/gs-location-filter.stories.ts +5 -7
  43. package/src/web-components/input/gs-location-filter.tsx +6 -7
  44. package/src/web-components/input/gs-mutation-filter.stories.ts +11 -8
  45. package/src/web-components/input/gs-mutation-filter.tsx +38 -26
  46. package/src/web-components/input/gs-text-input.stories.ts +3 -3
  47. package/src/web-components/input/gs-text-input.tsx +10 -10
  48. package/src/web-components/input/introduction.mdx +11 -0
  49. package/src/web-components/introduction.mdx +15 -0
  50. package/src/web-components/visualization/gs-aggregate.stories.ts +19 -6
  51. package/src/web-components/visualization/gs-aggregate.tsx +31 -15
  52. package/src/web-components/visualization/gs-mutation-comparison.stories.ts +13 -7
  53. package/src/web-components/visualization/gs-mutation-comparison.tsx +26 -17
  54. package/src/web-components/visualization/gs-mutations.stories.ts +14 -8
  55. package/src/web-components/visualization/gs-mutations.tsx +18 -8
  56. package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +28 -18
  57. package/src/web-components/visualization/gs-prevalence-over-time.tsx +45 -22
  58. package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +11 -5
  59. package/src/web-components/visualization/gs-relative-growth-advantage.tsx +21 -9
@@ -10,43 +10,53 @@ import { TemplateResult } from 'lit-html';
10
10
  /**
11
11
  * ## Context
12
12
  *
13
- * This component displays aggregated data, which can provide an overview of the underlying data.
13
+ * This component displays aggregated data in a table, which can provide an overview of the underlying data.
14
14
  *
15
- * It expects a list of fields to aggregate by and a filter to apply to the data.
15
+ * It expects a list of `fields` to aggregate by and a `filter` to apply to the data.
16
+ *
17
+ * ## Views
18
+ *
19
+ * ### Table View
20
+ *
21
+ * In the table view, the data is presented in a table format where each field is a column,
22
+ * along with the aggregated value and its proportion.
23
+ * The proportion represents the ratio of the aggregated value to the total count of the data
24
+ * (considering the applied filter).
16
25
  */
17
26
  export declare class AggregateComponent extends PreactLitAdapterWithGridJsStyles {
18
27
  /**
19
28
  * The fields to aggregate by.
29
+ * Every field will be a table column.
30
+ * Every field must exist in the backing LAPIS instance.
31
+ *
32
+ * If left empty, the component will only show the absolute count of the provided `filter` and proportion `100%`.
20
33
  */
21
34
  fields: string[];
22
35
  /**
23
- * The views are used to display the aggregated data.
24
- * In the table view, the data is presented in a table format where each field is a column,
25
- * along with the aggregated value and its proportion.
26
- * The proportion represents the ratio of the aggregated value to the total count of the data
27
- * (considering the applied filter).
36
+ * A list of tabs with views that this component should provide.
28
37
  */
29
38
  views: View[];
30
39
  /**
31
40
  * The filter to apply to the data.
41
+ * It must be a valid LAPIS filter object.
32
42
  */
33
43
  filter: LapisFilter;
34
44
  /**
35
- * The size of the component.
45
+ * The width of the component.
36
46
  *
37
- * If not set, the component will take the full width of its container with height 700px.
47
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
48
+ */
49
+ width: string;
50
+ /**
51
+ * The height of the component.
38
52
  *
39
- * The width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.
40
- * If the unit is %, the size will be relative to the container of the component.
53
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
41
54
  */
42
- size: {
43
- width?: string;
44
- height?: string;
45
- } | undefined;
55
+ height: string;
46
56
  /**
47
57
  * The headline of the component. Set to an empty string to hide the headline.
48
58
  */
49
- headline: string | undefined;
59
+ headline: string;
50
60
  render(): JSX_2.Element;
51
61
  }
52
62
 
@@ -68,6 +78,8 @@ export declare class AggregateComponent extends PreactLitAdapterWithGridJsStyles
68
78
  */
69
79
  export declare class App extends LitElement {
70
80
  /**
81
+ * Required.
82
+ *
71
83
  * The URL of the LAPIS instance that all children of this component will use.
72
84
  */
73
85
  lapis: string;
@@ -79,7 +91,8 @@ export declare class App extends LitElement {
79
91
 
80
92
  /**
81
93
  * ## Context
82
- * This component is a group of input fields designed to specify a date range. It consists of 3 fields:
94
+ * This component is a group of input fields designed to specify date range filters
95
+ * for a given date column of this Lapis instance. It consists of 3 fields:
83
96
  *
84
97
  * - a select field to choose a predefined date range,
85
98
  * - an input field with an attached date picker for the start date,
@@ -89,12 +102,21 @@ export declare class App extends LitElement {
89
102
  * Setting a value in either of the date pickers will set the select field to "custom",
90
103
  * which represents an arbitrary date range.
91
104
  *
92
- * @fires {CustomEvent<{ dateFrom: string; dateTo: string; }>} gs-date-range-changed
105
+ * @fires {CustomEvent<{ `${dateColumn}From`: string; `${dateColumn}To`: string; }>} gs-date-range-changed
93
106
  * Fired when:
94
107
  * - The select field is changed,
95
108
  * - A date is selected in either of the date pickers,
96
109
  * - A date was typed into either of the date input fields, and the input field loses focus ("on blur").
97
110
  * Contains the dates in the format `YYYY-MM-DD`.
111
+ *
112
+ * Example: For `dateColumn = yourDate`, an event with `detail` containing
113
+ * ```
114
+ * {
115
+ * yourDataFrom: "2021-01-01",
116
+ * yourDataTo: "2021-12-31"
117
+ * }
118
+ * ```
119
+ * will be fired.
98
120
  */
99
121
  export declare class DateRangeSelectorComponent extends PreactLitAdapter {
100
122
  /**
@@ -111,23 +133,24 @@ export declare class DateRangeSelectorComponent extends PreactLitAdapter {
111
133
  /**
112
134
  * The `dateFrom` value to use in the `allTimes` preset in the format `YYYY-MM-DD`.
113
135
  */
114
- earliestDate: string | undefined;
136
+ earliestDate: string;
115
137
  /**
116
138
  * The initial value to use for this date range selector.
117
139
  * Must be a valid label from the preset labels or a `label` given in the `customSelectOptions`.
118
140
  *
119
141
  * If the value is invalid, the component will default to `'last6Months'`.
120
142
  */
121
- initialValue: 'custom' | 'allTimes' | 'last2Weeks' | 'lastMonth' | 'last2Months' | 'last3Months' | 'last6Months' | string | undefined;
143
+ initialValue: 'custom' | 'allTimes' | 'last2Weeks' | 'lastMonth' | 'last2Months' | 'last3Months' | 'last6Months' | string;
122
144
  /**
123
145
  * The width of the component.
124
146
  *
125
- * If not set, the component will take the full width of its container.
126
- *
127
- * The width should be a string with a unit in css style, e.g. '100%', '500px' or '50vw'.
128
- * If the unit is %, the size will be relative to the container of the component.
147
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
129
148
  */
130
- width: string | undefined;
149
+ width: string;
150
+ /**
151
+ * The name of the column in LAPIS that contains the date information.
152
+ */
153
+ dateColumn: string;
131
154
  render(): JSX_2.Element;
132
155
  }
133
156
 
@@ -148,7 +171,7 @@ declare type LapisFilter = Record<string, string | number | null | boolean>;
148
171
  * Values for the fields `i > K` are considered `undefined`.
149
172
  *
150
173
  * @fires {CustomEvent<Record<string, string>>} gs-location-changed
151
- * Fired when the field is submitted with a valid location value.
174
+ * Fired when a value from the datalist is selected or when a valid value is typed into the field.
152
175
  * The `details` of this event contain an object with all `fields` as keys
153
176
  * and the corresponding values as values, if they are not `undefined`.
154
177
  * Example:
@@ -167,6 +190,8 @@ export declare class LocationFilterComponent extends PreactLitAdapter {
167
190
  */
168
191
  initialValue: string;
169
192
  /**
193
+ * Required.
194
+ *
170
195
  * The fields to display in the location filter, in hierarchical order.
171
196
  * The top-level field should be the first entry in the array.
172
197
  * This component assumes that the values for each field form a strict hierarchy
@@ -176,16 +201,15 @@ export declare class LocationFilterComponent extends PreactLitAdapter {
176
201
  /**
177
202
  * The width of the component.
178
203
  *
179
- * If not set, the component will take the full width of its container.
180
- *
181
- * The width should be a string with a unit in css style, e.g. '100%', '500px' or '50vw'.
182
- * If the unit is %, the size will be relative to the container of the component.
204
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
183
205
  */
184
- width: string | undefined;
206
+ width: string;
185
207
  render(): JSX_2.Element;
186
208
  }
187
209
 
188
210
  /**
211
+ * ## Context
212
+ *
189
213
  * This component allows to compare mutations between different variants.
190
214
  * A variant is defined by its LAPIS filter.
191
215
  *
@@ -210,6 +234,8 @@ export declare class LocationFilterComponent extends PreactLitAdapter {
210
234
  */
211
235
  export declare class MutationComparisonComponent extends PreactLitAdapterWithGridJsStyles {
212
236
  /**
237
+ * Required.
238
+ *
213
239
  * An array of variants to compare.
214
240
  *
215
241
  * The `lapisFilter` will be sent as is to LAPIS to filter the mutation data.
@@ -231,21 +257,21 @@ export declare class MutationComparisonComponent extends PreactLitAdapterWithGri
231
257
  */
232
258
  views: ('table' | 'venn')[];
233
259
  /**
234
- * The size of the component.
260
+ * The width of the component.
235
261
  *
236
- * If not set, the component will take the full width of its container with height 700px.
262
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
263
+ */
264
+ width: string;
265
+ /**
266
+ * The height of the component.
237
267
  *
238
- * The width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.
239
- * If the unit is %, the size will be relative to the container of the component.
268
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
240
269
  */
241
- size: {
242
- width?: string;
243
- height?: string;
244
- } | undefined;
270
+ height: string;
245
271
  /**
246
272
  * The headline of the component. Set to an empty string to hide the headline.
247
273
  */
248
- headline: string | undefined;
274
+ headline: string;
249
275
  render(): JSX_2.Element;
250
276
  }
251
277
 
@@ -258,22 +284,30 @@ export declare class MutationComparisonComponent extends PreactLitAdapterWithGri
258
284
  * All previously selected mutations are displayed at the input field and added to the event.
259
285
  * Users can remove a mutation by clicking the 'x' button next to the mutation.
260
286
  *
287
+ * ## Input Validation
288
+ *
261
289
  * Validation of the input is performed according to the following rules:
262
290
  *
291
+ * ### Mutations
292
+ *
263
293
  * Mutations have to conform to the following format: `<gene/segment>:<symbol at reference><position><Substituted symbol/Deletion>`
264
- * - Gene/segment: The gene or segment where the mutation occurs. Must be contained in the reference genome
265
- * (Optional for elements with only one gene/segment)
266
- * - Symbol at reference: The symbol at the reference position. (Optional)
267
- * - Position: The position of the mutation. (Required)
268
- * - Substituted symbol/Deletion: The substituted symbol or '-' for a deletion. (Required)
269
- * Example: S:614G, 614G, 614- or 614G
294
+ * - Gene/segment: The gene or segment where the mutation occurs. Must be contained in the reference genome.
295
+ * (Optional for elements with only one gene/segment)
296
+ * - Symbol at reference: The symbol at the reference position. (Optional)
297
+ * - Position: The position of the mutation. (Required)
298
+ * - Substituted symbol/Deletion: The substituted symbol or '-' for a deletion. (Required)
299
+ *
300
+ * Examples: `S:614G`, `614G`, `614-`, `614G`
301
+ *
302
+ * ### Insertions
270
303
  *
271
304
  * Insertions have to conform to the following format: `ins_<gene/segment>:<position>:<Inserted symbols>`
272
- * - Gene/segment: The gene or segment where the insertion occurs. Must be contained in the reference genome
273
- * (Optional for elements with only one gene/segment)
274
- * - Position: The position of the insertion. (Required)
275
- * - Inserted symbols: The symbols that are inserted. (Required)
276
- * Example: ins_S:614:G, ins_614:G
305
+ * - Gene/segment: The gene or segment where the insertion occurs. Must be contained in the reference genome.
306
+ * (Optional for elements with only one gene/segment)
307
+ * - Position: The position of the insertion. (Required)
308
+ * - Inserted symbols: The symbols that are inserted. (Required)
309
+ *
310
+ * Examples: `ins_S:614:G`, `ins_614:G`
277
311
  *
278
312
  * @fires {CustomEvent<{
279
313
  * nucleotideMutations: string[],
@@ -298,9 +332,8 @@ export declare class MutationComparisonComponent extends PreactLitAdapterWithGri
298
332
  export declare class MutationFilterComponent extends PreactLitAdapter {
299
333
  /**
300
334
  * The initial value to use for this mutation filter.
301
- * Must be either
302
- * - an array of strings of valid mutations.
303
- * - an object with the keys `nucleotideMutations`, `aminoAcidMutations`, `nucleotideInsertions` and `aminoAcidInsertions` and corresponding string arrays.
335
+ * All values provided must be valid mutations or insertions.
336
+ * Invalid values will be ignored.
304
337
  */
305
338
  initialValue: {
306
339
  nucleotideMutations: string[];
@@ -309,21 +342,23 @@ export declare class MutationFilterComponent extends PreactLitAdapter {
309
342
  aminoAcidInsertions: string[];
310
343
  } | string[] | undefined;
311
344
  /**
312
- * The size of the component.
345
+ * The width of the component.
313
346
  *
314
- * If not set, the component will take the full width of its container with height 700px.
347
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
348
+ */
349
+ width: string;
350
+ /**
351
+ * The height of the component.
315
352
  *
316
- * The width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.
317
- * If the unit is %, the size will be relative to the container of the component.
353
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
318
354
  */
319
- size: {
320
- width?: string;
321
- height?: string;
322
- } | undefined;
355
+ height: string;
323
356
  render(): JSX_2.Element;
324
357
  }
325
358
 
326
359
  /**
360
+ * ## Context
361
+ *
327
362
  * This component displays mutations (substitutions, deletions and insertions) for a given variant.
328
363
  *
329
364
  * ## Views
@@ -350,6 +385,8 @@ export declare class MutationFilterComponent extends PreactLitAdapter {
350
385
  */
351
386
  export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles {
352
387
  /**
388
+ * Required.
389
+ *
353
390
  * The `variant` will be sent as is to LAPIS to filter the mutation data.
354
391
  * It must be a valid LAPIS filter object.
355
392
  */
@@ -363,21 +400,21 @@ export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles
363
400
  */
364
401
  views: ('table' | 'grid' | 'insertions')[];
365
402
  /**
366
- * The size of the component.
403
+ * The width of the component.
367
404
  *
368
- * If not set, the component will take the full width of its container with height 700px.
405
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
406
+ */
407
+ width: string;
408
+ /**
409
+ * The height of the component.
369
410
  *
370
- * The width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.
371
- * If the unit is %, the size will be relative to the container of the component.
411
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
372
412
  */
373
- size: {
374
- width?: string;
375
- height?: string;
376
- } | undefined;
413
+ height: string;
377
414
  /**
378
415
  * The headline of the component. Set to an empty string to hide the headline.
379
416
  */
380
- headline: string | undefined;
417
+ headline: string;
381
418
  render(): JSX_2.Element;
382
419
  }
383
420
 
@@ -394,6 +431,8 @@ declare abstract class PreactLitAdapterWithGridJsStyles extends PreactLitAdapter
394
431
  }
395
432
 
396
433
  /**
434
+ * ## Context
435
+ *
397
436
  * This component displays the prevalence over time of one or more variants.
398
437
  * The prevalence is calculated as the ratio of the number of cases of each variant given as `numerator`
399
438
  * to the number of cases of the variant given as `denominator`.
@@ -430,22 +469,26 @@ declare abstract class PreactLitAdapterWithGridJsStyles extends PreactLitAdapter
430
469
  */
431
470
  export declare class PrevalenceOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
432
471
  /**
472
+ * Required.
473
+ *
433
474
  * Either a single variant or an array of variants to compare.
434
475
  * This must be a valid LAPIS filter object with an additional `displayName` property
435
476
  * which will be used as the label for the variant in the views,
436
477
  * or an array of such objects.
437
478
  */
438
- numerator: (Record<string, string | number | null | boolean> & {
479
+ numerator: {
480
+ lapisFilter: Record<string, string | number | null | boolean>;
439
481
  displayName: string;
440
- }) | (Record<string, string | number | null | boolean> & {
482
+ } | {
483
+ lapisFilter: Record<string, string | number | null | boolean>;
441
484
  displayName: string;
442
- })[];
485
+ }[];
443
486
  /**
487
+ * Required.
488
+ *
444
489
  * The variant that the variants in `numerator` are compared to.
445
490
  */
446
- denominator: Record<string, string | number | null | boolean> & {
447
- displayName: string;
448
- };
491
+ denominator: Record<string, string | number | null | boolean>;
449
492
  /**
450
493
  * The granularity of the time axis.
451
494
  */
@@ -473,19 +516,19 @@ export declare class PrevalenceOverTimeComponent extends PreactLitAdapterWithGri
473
516
  /**
474
517
  * The headline of the component. Set to an empty string to hide the headline.
475
518
  */
476
- headline: string | undefined;
519
+ headline: string;
477
520
  /**
478
- * The size of the component.
521
+ * The width of the component.
479
522
  *
480
- * If not set, the component will take the full width of its container with height 700px.
523
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
524
+ */
525
+ width: string;
526
+ /**
527
+ * The height of the component.
481
528
  *
482
- * The width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.
483
- * If the unit is %, the size will be relative to the container of the component.
529
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
484
530
  */
485
- size: {
486
- width?: string;
487
- height?: string;
488
- } | undefined;
531
+ height: string;
489
532
  render(): JSX_2.Element;
490
533
  }
491
534
 
@@ -533,7 +576,9 @@ declare const referenceGenomeResponse: default_2.ZodObject<{
533
576
  }>;
534
577
 
535
578
  /**
536
- * We assume a discrete time model, where new infections happen exactly every `generationTime` days.
579
+ * ## Context
580
+ *
581
+ * For this component, we assume a discrete time model, where new infections happen exactly every `generationTime` days.
537
582
  * This is what we call a "generation".
538
583
  *
539
584
  * This component estimates the relative growth advantage of a variant by performing a logistic regression.
@@ -558,10 +603,14 @@ declare const referenceGenomeResponse: default_2.ZodObject<{
558
603
  */
559
604
  export declare class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
560
605
  /**
606
+ * Required.
607
+ *
561
608
  * The LAPIS filter for the focal variant.
562
609
  */
563
610
  numerator: Record<string, string | number | null | boolean>;
564
611
  /**
612
+ * Required.
613
+ *
565
614
  * The LAPIS filter for the variant that the focal variant (`numerator`) should be compared to.
566
615
  */
567
616
  denominator: Record<string, string | number | null | boolean>;
@@ -577,19 +626,19 @@ export declare class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
577
626
  /**
578
627
  * The headline of the component. Set to an empty string to hide the headline.
579
628
  */
580
- headline: string | undefined;
629
+ headline: string;
581
630
  /**
582
- * The size of the component.
631
+ * The width of the component.
583
632
  *
584
- * If not set, the component will take the full width of its container with height 700px.
633
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
634
+ */
635
+ width: string;
636
+ /**
637
+ * The height of the component.
585
638
  *
586
- * The width and height should be a string with a unit in css style, e.g. '100%', '500px' or '50vh'.
587
- * If the unit is %, the size will be relative to the container of the component.
639
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
588
640
  */
589
- size: {
590
- width?: string;
591
- height?: string;
592
- } | undefined;
641
+ height: string;
593
642
  render(): JSX_2.Element;
594
643
  }
595
644
 
@@ -597,7 +646,7 @@ export declare class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
597
646
  *
598
647
  * ## Context
599
648
  *
600
- * This component provides a text input field to specify filters for arbitrary fields of this Lapis instance.
649
+ * This component provides a text input field to specify filters for arbitrary fields of this LAPIS instance.
601
650
  *
602
651
  * @fires {CustomEvent<Record<string, string>>} gs-text-input-changed
603
652
  * Fired when the input field is changed.
@@ -613,24 +662,24 @@ export declare class TextInputComponent extends PreactLitAdapter {
613
662
  /**
614
663
  * The initial value to use for this text input.
615
664
  */
616
- initialValue: string | undefined;
665
+ initialValue: string;
617
666
  /**
618
- * The Lapis field name to use for this text input.
667
+ * Required.
668
+ *
669
+ * The LAPIS field name to use for this text input.
670
+ * The field must exist on this LAPIS instance.
619
671
  */
620
672
  lapisField: string;
621
673
  /**
622
674
  * The placeholder text to display in the input field.
623
675
  */
624
- placeholderText: string | undefined;
676
+ placeholderText: string;
625
677
  /**
626
678
  * The width of the component.
627
679
  *
628
- * If not set, the component will take the full width of its container.
629
- *
630
- * The width should be a string with a unit in css style, e.g. '100%', '500px' or '50vw'.
631
- * If the unit is %, the size will be relative to the container of the component.
680
+ * Visit https://genspectrum.github.io/dashboards/?path=/docs/components-size-of-components--docs for more information.
632
681
  */
633
- width: string | undefined;
682
+ width: string;
634
683
  render(): JSX_2.Element;
635
684
  }
636
685
 
@@ -669,37 +718,34 @@ declare global {
669
718
 
670
719
  declare global {
671
720
  interface HTMLElementTagNameMap {
672
- 'gs-aggregate-component': AggregateComponent;
721
+ 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
673
722
  }
674
723
  }
675
724
 
676
725
 
677
726
  declare global {
678
727
  interface HTMLElementTagNameMap {
679
- 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
728
+ 'gs-aggregate-component': AggregateComponent;
680
729
  }
681
730
  }
682
731
 
683
732
 
684
733
  declare global {
685
734
  interface HTMLElementTagNameMap {
686
- 'gs-date-range-selector': DateRangeSelectorComponent;
735
+ 'gs-location-filter': LocationFilterComponent;
687
736
  }
688
737
  interface HTMLElementEventMap {
689
- 'gs-date-range-changed': CustomEvent<{
690
- dateFrom: string;
691
- dateTo: string;
692
- }>;
738
+ 'gs-location-changed': CustomEvent<Record<string, string>>;
693
739
  }
694
740
  }
695
741
 
696
742
 
697
743
  declare global {
698
744
  interface HTMLElementTagNameMap {
699
- 'gs-location-filter': LocationFilterComponent;
745
+ 'gs-date-range-selector': DateRangeSelectorComponent;
700
746
  }
701
747
  interface HTMLElementEventMap {
702
- 'gs-location-changed': CustomEvent<Record<string, string>>;
748
+ 'gs-date-range-changed': CustomEvent<Record<string, string>>;
703
749
  }
704
750
  }
705
751