@genspectrum/dashboard-components 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/custom-elements.json +2 -2
  2. package/dist/{NumberRangeFilterChangedEvent-B64OQZjX.js → NumberRangeFilterChangedEvent-CQ32Qy8D.js} +2 -2
  3. package/dist/NumberRangeFilterChangedEvent-CQ32Qy8D.js.map +1 -0
  4. package/dist/assets/mutationOverTimeWorker-DpW4YOGl.js.map +1 -0
  5. package/dist/components.d.ts +29 -29
  6. package/dist/components.js +186 -145
  7. package/dist/components.js.map +1 -1
  8. package/dist/util.d.ts +29 -29
  9. package/dist/util.js +1 -1
  10. package/package.json +7 -3
  11. package/src/lapisApi/lapisApi.ts +2 -2
  12. package/src/operator/DivisionOperator.ts +4 -2
  13. package/src/operator/FetchDetailsOperator.ts +1 -1
  14. package/src/operator/RenameFieldOperator.ts +3 -3
  15. package/src/preact/MutationAnnotationsContext.tsx +15 -7
  16. package/src/preact/aggregatedData/aggregate.tsx +0 -5
  17. package/src/preact/components/annotated-mutation.tsx +0 -1
  18. package/src/preact/components/clearable-select.stories.tsx +1 -1
  19. package/src/preact/components/confidence-interval-selector.tsx +1 -1
  20. package/src/preact/components/error-boundary.tsx +1 -5
  21. package/src/preact/components/error-display.tsx +1 -1
  22. package/src/preact/components/fullscreen.tsx +2 -5
  23. package/src/preact/components/info.stories.tsx +1 -1
  24. package/src/preact/components/min-max-range-slider.tsx +1 -1
  25. package/src/preact/components/mutations-over-time-mutations-filter.stories.tsx +109 -0
  26. package/src/preact/components/mutations-over-time-mutations-filter.tsx +139 -0
  27. package/src/preact/components/proportion-selector.tsx +4 -4
  28. package/src/preact/components/select.tsx +1 -1
  29. package/src/preact/components/table.tsx +1 -1
  30. package/src/preact/components/tabs.tsx +1 -1
  31. package/src/preact/components/tooltip.stories.tsx +1 -1
  32. package/src/preact/components/tooltip.tsx +1 -1
  33. package/src/preact/genomeViewer/CDSPlot.tsx +3 -3
  34. package/src/preact/genomeViewer/loadGff3.ts +5 -8
  35. package/src/preact/lineageFilter/lineage-filter.tsx +1 -1
  36. package/src/preact/locationFilter/location-filter.tsx +4 -4
  37. package/src/preact/mutationComparison/getMutationComparisonTableData.ts +1 -3
  38. package/src/preact/mutationComparison/mutation-comparison-venn.tsx +1 -1
  39. package/src/preact/mutationComparison/mutation-comparison.tsx +0 -5
  40. package/src/preact/mutationFilter/mutation-filter-info.tsx +2 -2
  41. package/src/preact/mutationFilter/mutation-filter.tsx +1 -1
  42. package/src/preact/mutations/getMutationsGridData.ts +2 -6
  43. package/src/preact/mutations/getMutationsTableData.ts +1 -1
  44. package/src/preact/mutations/mutations-grid.tsx +1 -1
  45. package/src/preact/mutations/mutations.tsx +0 -5
  46. package/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts +27 -16
  47. package/src/preact/mutationsOverTime/getFilteredMutationsOverTimeData.ts +45 -11
  48. package/src/preact/mutationsOverTime/mutations-over-time.tsx +16 -15
  49. package/src/preact/numberRangeFilter/number-range-filter.tsx +4 -4
  50. package/src/preact/numberSequencesOverTime/getNumberOfSequencesOverTimeTableData.ts +1 -4
  51. package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +0 -5
  52. package/src/preact/prevalenceOverTime/prevalence-over-time-bar-chart.tsx +1 -1
  53. package/src/preact/prevalenceOverTime/prevalence-over-time-bubble-chart.tsx +1 -1
  54. package/src/preact/prevalenceOverTime/prevalence-over-time-line-chart.tsx +1 -1
  55. package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +1 -1
  56. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage-chart.tsx +5 -5
  57. package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +1 -4
  58. package/src/preact/sequencesByLocation/loadMapSource.tsx +5 -2
  59. package/src/preact/shared/aspectRatio/AspectRatio.tsx +1 -1
  60. package/src/preact/shared/floating-ui/hooks.ts +2 -2
  61. package/src/preact/shared/sort/sortMutationPositions.ts +2 -2
  62. package/src/preact/shared/tanstackTable/pagination.tsx +2 -2
  63. package/src/preact/shared/tanstackTable/tanstackTable.tsx +1 -1
  64. package/src/preact/statistic/statistics.tsx +0 -5
  65. package/src/preact/textFilter/fetchStringAutocompleteList.ts +1 -10
  66. package/src/preact/textFilter/text-filter.tsx +1 -6
  67. package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +14 -8
  68. package/src/preact/webWorkers/useWebWorker.ts +2 -1
  69. package/src/preact/webWorkers/workerFunction.ts +2 -2
  70. package/src/query/computeMapLocationData.ts +1 -1
  71. package/src/query/queryAggregatedDataOverTime.ts +3 -3
  72. package/src/query/queryMutationsOverTime.spec.ts +9 -9
  73. package/src/query/queryMutationsOverTime.ts +22 -16
  74. package/src/query/queryRelativeGrowthAdvantage.ts +5 -9
  75. package/src/query/queryWastewaterMutationsOverTime.ts +1 -1
  76. package/src/types.ts +1 -1
  77. package/src/utils/mutations.ts +10 -10
  78. package/src/utils/type-utils.ts +1 -1
  79. package/src/utils/typeAssertions.spec.ts +1 -1
  80. package/src/web-components/gs-app.spec-d.ts +1 -1
  81. package/src/web-components/gs-app.stories.ts +1 -1
  82. package/src/web-components/input/gs-date-range-filter.tsx +2 -2
  83. package/src/web-components/input/gs-lineage-filter.tsx +2 -2
  84. package/src/web-components/input/gs-location-filter.tsx +3 -3
  85. package/src/web-components/input/gs-mutation-filter.tsx +2 -2
  86. package/src/web-components/input/gs-number-range-filter.spec.ts +1 -1
  87. package/src/web-components/input/gs-text-filter.tsx +2 -2
  88. package/src/web-components/visualization/gs-aggregate.tsx +2 -2
  89. package/src/web-components/visualization/gs-genome-data-viewer.spec-d.ts +1 -1
  90. package/src/web-components/visualization/gs-mutation-comparison.tsx +2 -2
  91. package/src/web-components/visualization/gs-mutations.tsx +2 -2
  92. package/src/web-components/visualization/gs-number-sequences-over-time.tsx +2 -2
  93. package/src/web-components/visualization/gs-prevalence-over-time.tsx +2 -2
  94. package/src/web-components/visualization/gs-relative-growth-advantage.tsx +2 -2
  95. package/src/web-components/visualization/gs-sequences-by-location.tsx +2 -2
  96. package/src/web-components/visualization/gs-statistics.tsx +2 -2
  97. package/standalone-bundle/assets/mutationOverTimeWorker-CZVvQBze.js.map +1 -0
  98. package/standalone-bundle/dashboard-components.js +3989 -3923
  99. package/standalone-bundle/dashboard-components.js.map +1 -1
  100. package/dist/NumberRangeFilterChangedEvent-B64OQZjX.js.map +0 -1
  101. package/dist/assets/mutationOverTimeWorker-DjH04AQB.js.map +0 -1
  102. package/src/preact/components/mutations-over-time-text-filter.stories.tsx +0 -57
  103. package/src/preact/components/mutations-over-time-text-filter.tsx +0 -63
  104. package/standalone-bundle/assets/mutationOverTimeWorker-B6bf3R3j.js.map +0 -1
@@ -231,18 +231,14 @@ describe('queryMutationsOverTime', () => {
231
231
  minProportion: 0.001,
232
232
  },
233
233
  response: {
234
- data: [
235
- getSomeTestMutation(0.1, 1),
236
- getSomeTestMutation(0.3, 3),
237
- getSomeOtherTestMutation(0.4, 4),
238
- ],
234
+ data: [getSomeTestMutation(0.2, 4), getSomeOtherTestMutation(0.4, 4)],
239
235
  },
240
236
  },
241
237
  ],
242
238
  'nucleotide',
243
239
  );
244
240
 
245
- const { mutationOverTimeData } = await queryMutationsOverTimeData({
241
+ const { mutationOverTimeData, overallMutationData } = await queryMutationsOverTimeData({
246
242
  lapisFilter,
247
243
  sequenceType: 'nucleotide',
248
244
  lapis: DUMMY_LAPIS_URL,
@@ -263,6 +259,8 @@ describe('queryMutationsOverTime', () => {
263
259
  ],
264
260
  ]);
265
261
 
262
+ expect(overallMutationData.length).toBe(2);
263
+
266
264
  const sequences = mutationOverTimeData.getFirstAxisKeys();
267
265
  expect(sequences[0].code).toBe('otherSequenceName:G234C');
268
266
  expect(sequences[1].code).toBe('sequenceName:A123T');
@@ -435,14 +433,14 @@ describe('queryMutationsOverTime', () => {
435
433
  minProportion: 0.001,
436
434
  },
437
435
  response: {
438
- data: [getSomeTestMutation(0.2, 2), getSomeTestMutation(0.3, 3)],
436
+ data: [getSomeTestMutation(0.25, 5)],
439
437
  },
440
438
  },
441
439
  ],
442
440
  'nucleotide',
443
441
  );
444
442
 
445
- const { mutationOverTimeData } = await queryMutationsOverTimeData({
443
+ const { mutationOverTimeData, overallMutationData } = await queryMutationsOverTimeData({
446
444
  lapisFilter,
447
445
  sequenceType: 'nucleotide',
448
446
  lapis: DUMMY_LAPIS_URL,
@@ -450,6 +448,8 @@ describe('queryMutationsOverTime', () => {
450
448
  granularity: 'day',
451
449
  });
452
450
 
451
+ expect(overallMutationData.length).toBe(1);
452
+
453
453
  expect(mutationOverTimeData.getAsArray()).to.deep.equal([
454
454
  [
455
455
  { type: 'value', proportion: 0.2, count: 2, totalCount: 11 },
@@ -527,7 +527,7 @@ describe('queryMutationsOverTime', () => {
527
527
  minProportion: 0.001,
528
528
  },
529
529
  response: {
530
- data: [getSomeTestMutation(0.1, 1), getSomeTestMutation(0.2, 2)],
530
+ data: [getSomeTestMutation(0.15, 3)],
531
531
  },
532
532
  },
533
533
  ],
@@ -54,7 +54,7 @@ export type MutationOverTimeMutationValue =
54
54
  const MAX_NUMBER_OF_GRID_COLUMNS = 200;
55
55
  export const MUTATIONS_OVER_TIME_MIN_PROPORTION = 0.001;
56
56
 
57
- export async function queryOverallMutationData({
57
+ async function queryOverallMutationData({
58
58
  lapisFilter,
59
59
  sequenceType,
60
60
  lapis,
@@ -69,9 +69,9 @@ export async function queryOverallMutationData({
69
69
  lapisDateField: string;
70
70
  signal?: AbortSignal;
71
71
  }) {
72
- const allDates = await getDatesInDataset(lapisFilter, lapis, granularity, lapisDateField, signal);
72
+ const requestedDateRanges = await getDatesInDataset(lapisFilter, lapis, granularity, lapisDateField, signal);
73
73
 
74
- if (allDates.length === 0) {
74
+ if (requestedDateRanges.length === 0) {
75
75
  return {
76
76
  content: [],
77
77
  };
@@ -79,8 +79,8 @@ export async function queryOverallMutationData({
79
79
 
80
80
  const filter = {
81
81
  ...lapisFilter,
82
- [`${lapisDateField}From`]: allDates[0].firstDay.toString(),
83
- [`${lapisDateField}To`]: allDates[allDates.length - 1].lastDay.toString(),
82
+ [`${lapisDateField}From`]: requestedDateRanges[0].firstDay.toString(),
83
+ [`${lapisDateField}To`]: requestedDateRanges[requestedDateRanges.length - 1].lastDay.toString(),
84
84
  };
85
85
 
86
86
  return fetchAndPrepareSubstitutionsOrDeletions(filter, sequenceType).evaluate(lapis, signal);
@@ -103,18 +103,18 @@ export async function queryMutationsOverTimeData({
103
103
  granularity,
104
104
  signal,
105
105
  }: MutationOverTimeQuery) {
106
- const allDates = await getDatesInDataset(lapisFilter, lapis, granularity, lapisDateField, signal);
106
+ const requestedDateRanges = await getDatesInDataset(lapisFilter, lapis, granularity, lapisDateField, signal);
107
107
 
108
- if (allDates.length > MAX_NUMBER_OF_GRID_COLUMNS) {
108
+ if (requestedDateRanges.length > MAX_NUMBER_OF_GRID_COLUMNS) {
109
109
  throw new UserFacingError(
110
110
  'Too many dates',
111
- `The dataset would contain ${allDates.length} date intervals. ` +
111
+ `The dataset would contain ${requestedDateRanges.length} date intervals. ` +
112
112
  `Please reduce the number to below ${MAX_NUMBER_OF_GRID_COLUMNS} to display the data. ` +
113
113
  'You can achieve this by either narrowing the date range in the provided LAPIS filter or by selecting a larger granularity.',
114
114
  );
115
115
  }
116
116
 
117
- const subQueries = allDates.map(async (date) => {
117
+ const subQueries = requestedDateRanges.map(async (date) => {
118
118
  const dateFrom = date.firstDay.toString();
119
119
  const dateTo = date.lastDay.toString();
120
120
 
@@ -152,6 +152,12 @@ export async function queryMutationsOverTimeData({
152
152
  };
153
153
  }
154
154
 
155
+ /**
156
+ * Returns a list of date ranges as TemporalClass.
157
+ * Respects date range filters given in the lapisFilter as <lapisDateField>From and <lapisDateField>To.
158
+ * If either side (or both sides) of the range are not given, the min and max are determined from
159
+ * the available data.
160
+ */
155
161
  async function getDatesInDataset(
156
162
  lapisFilter: LapisFilter,
157
163
  lapis: string,
@@ -159,6 +165,11 @@ async function getDatesInDataset(
159
165
  lapisDateField: string,
160
166
  signal: AbortSignal | undefined,
161
167
  ) {
168
+ const { dateFrom, dateTo } = getDateRangeFromFilter(lapisFilter, lapisDateField, granularity);
169
+ if (dateFrom !== null && dateTo !== null) {
170
+ return generateAllInRange(dateFrom, dateTo);
171
+ }
172
+
162
173
  const { content: availableDates } = await queryAvailableDates(
163
174
  lapisFilter,
164
175
  lapis,
@@ -167,7 +178,6 @@ async function getDatesInDataset(
167
178
  signal,
168
179
  );
169
180
 
170
- const { dateFrom, dateTo } = getDateRangeFromFilter(lapisFilter, lapisDateField, granularity);
171
181
  const { min, max } = getMinMaxTemporal(availableDates);
172
182
 
173
183
  return generateAllInRange(dateFrom ?? min, dateTo ?? max);
@@ -202,12 +212,8 @@ function queryAvailableDates(
202
212
  return fetchAndPrepareDates(lapisFilter, granularity, lapisDateField).evaluate(lapis, signal);
203
213
  }
204
214
 
205
- function fetchAndPrepareDates<LapisDateField extends string>(
206
- filter: LapisFilter,
207
- granularity: TemporalGranularity,
208
- lapisDateField: LapisDateField,
209
- ) {
210
- const fetchData = new FetchAggregatedOperator<{ [key in LapisDateField]: string | null }>(filter, [lapisDateField]);
215
+ function fetchAndPrepareDates(filter: LapisFilter, granularity: TemporalGranularity, lapisDateField: string) {
216
+ const fetchData = new FetchAggregatedOperator<Record<string, string | null>>(filter, [lapisDateField]);
211
217
  const dataWithFixedDateKey = new RenameFieldOperator(fetchData, lapisDateField, 'date');
212
218
  const mapData = new MapOperator(dataWithFixedDateKey, (data) => mapDateToGranularityRange(data, granularity));
213
219
  const groupByData = new GroupByAndSumOperator(mapData, 'dateRange', 'count');
@@ -13,20 +13,16 @@ export class NotEnoughDataToComputeFitError extends Error {
13
13
  }
14
14
  }
15
15
 
16
- export async function queryRelativeGrowthAdvantage<LapisDateField extends string>(
16
+ export async function queryRelativeGrowthAdvantage(
17
17
  numerator: LapisFilter,
18
18
  denominator: LapisFilter,
19
19
  generationTime: number,
20
20
  lapis: string,
21
- lapisDateField: LapisDateField,
21
+ lapisDateField: string,
22
22
  signal?: AbortSignal,
23
23
  ) {
24
- const fetchNumerator = new FetchAggregatedOperator<{
25
- [key in LapisDateField]: string | null;
26
- }>(numerator, [lapisDateField]);
27
- const fetchDenominator = new FetchAggregatedOperator<{
28
- [key in LapisDateField]: string | null;
29
- }>(denominator, [lapisDateField]);
24
+ const fetchNumerator = new FetchAggregatedOperator<Record<string, string | null>>(numerator, [lapisDateField]);
25
+ const fetchDenominator = new FetchAggregatedOperator<Record<string, string | null>>(denominator, [lapisDateField]);
30
26
  const mapToFixedDateKeyNumerator = new RenameFieldOperator(fetchNumerator, lapisDateField, 'date');
31
27
  const mapToFixedDateKeyDenominator = new RenameFieldOperator(fetchDenominator, lapisDateField, 'date');
32
28
  const mapNumerator = new MapOperator(mapToFixedDateKeyNumerator, toYearMonthDay);
@@ -36,7 +32,7 @@ export async function queryRelativeGrowthAdvantage<LapisDateField extends string
36
32
  mapDenominator.evaluate(lapis, signal),
37
33
  ]);
38
34
  const { min: minDate, max: maxDate } = getMinMaxTemporal(denominatorData.content.map((d) => d.date));
39
- if (!minDate && !maxDate) {
35
+ if (!minDate) {
40
36
  return null;
41
37
  }
42
38
 
@@ -41,7 +41,7 @@ export async function queryWastewaterMutationsOverTime(
41
41
  };
42
42
  } catch (e) {
43
43
  throw new Error(
44
- `Failed to parse row of wastewater data: ${JSON.stringify(row)}: ${(e as Error)?.message ?? 'Unknown error'}`,
44
+ `Failed to parse row of wastewater data: ${JSON.stringify(row)}: ${(e as Error | null)?.message ?? 'Unknown error'}`,
45
45
  );
46
46
  }
47
47
  });
package/src/types.ts CHANGED
@@ -28,7 +28,7 @@ export const namedLapisFilterSchema = z.object({
28
28
  });
29
29
  export type NamedLapisFilter = z.infer<typeof namedLapisFilterSchema>;
30
30
 
31
- export const lapisLocationFilterSchema = z.record(z.union([z.string(), z.undefined()]));
31
+ export const lapisLocationFilterSchema = z.record(z.union([z.string(), z.undefined(), z.null()]));
32
32
  export type LapisLocationFilter = z.infer<typeof lapisLocationFilterSchema>;
33
33
 
34
34
  export const temporalGranularitySchema = z.union([
@@ -33,8 +33,8 @@ export class SubstitutionClass implements MutationClass, Substitution {
33
33
  readonly position: number,
34
34
  ) {
35
35
  const segmentString = this.segment ? `${this.segment}:` : '';
36
- const valueAtReferenceString = this.valueAtReference ? `${this.valueAtReference}` : '';
37
- const substitutionValueString = this.substitutionValue ? `${this.substitutionValue}` : '';
36
+ const valueAtReferenceString = this.valueAtReference ?? '';
37
+ const substitutionValueString = this.substitutionValue ?? '';
38
38
  this.code = `${segmentString}${valueAtReferenceString}${this.position}${substitutionValueString}`;
39
39
  }
40
40
 
@@ -55,8 +55,8 @@ export class SubstitutionClass implements MutationClass, Substitution {
55
55
  }
56
56
 
57
57
  static parse(mutationStr: string): SubstitutionClass | null {
58
- const match = mutationStr.match(substitutionRegex);
59
- if (match === null || match.groups === undefined) {
58
+ const match = substitutionRegex.exec(mutationStr);
59
+ if (match?.groups === undefined) {
60
60
  return null;
61
61
  }
62
62
  return new SubstitutionClass(
@@ -85,7 +85,7 @@ export class DeletionClass implements MutationClass, Deletion {
85
85
  readonly position: number,
86
86
  ) {
87
87
  const segmentString = this.segment ? `${this.segment}:` : '';
88
- const valueAtReferenceString = this.valueAtReference ? `${this.valueAtReference}` : '';
88
+ const valueAtReferenceString = this.valueAtReference ?? '';
89
89
  this.code = `${segmentString}${valueAtReferenceString}${this.position}-`;
90
90
  }
91
91
 
@@ -105,8 +105,8 @@ export class DeletionClass implements MutationClass, Deletion {
105
105
  }
106
106
 
107
107
  static parse(mutationStr: string): DeletionClass | null {
108
- const match = mutationStr.match(deletionRegex);
109
- if (match === null || match.groups === undefined) {
108
+ const match = deletionRegex.exec(mutationStr);
109
+ if (match?.groups === undefined) {
110
110
  return null;
111
111
  }
112
112
 
@@ -154,8 +154,8 @@ export class InsertionClass implements MutationClass {
154
154
  }
155
155
 
156
156
  static parse(mutationStr: string): InsertionClass | null {
157
- const match = mutationStr.match(insertionRegexp);
158
- if (match === null || match.groups === undefined) {
157
+ const match = insertionRegexp.exec(mutationStr);
158
+ if (match?.groups === undefined) {
159
159
  return null;
160
160
  }
161
161
 
@@ -204,7 +204,7 @@ export function toSubstitutionOrDeletion(mutation: SubstitutionClass | DeletionC
204
204
  }
205
205
  }
206
206
 
207
- export const bases: { [P in SequenceType]: string[] } = {
207
+ export const bases: Record<SequenceType, string[]> = {
208
208
  nucleotide: ['A', 'C', 'G', 'T', '-'],
209
209
  'amino acid': [
210
210
  'I',
@@ -7,7 +7,7 @@ export type NumberFields<S> = keyof S & { [P in keyof S]: S[P] extends number ?
7
7
  /**
8
8
  * MappedType<K, T> is a type that represents an object with keys of type K and values of type T.
9
9
  */
10
- export type MappedType<K extends string | number | symbol, T> = { [P in K]: T };
10
+ export type MappedType<K extends string | number | symbol, T> = Record<K, T>;
11
11
 
12
12
  /**
13
13
  * MappedNumber<K> is a type that represents an object with keys of type K and values of type number.
@@ -2,7 +2,7 @@ import { describe, it } from 'vitest';
2
2
 
3
3
  import { type Equals, type Expect } from './typeAssertions';
4
4
 
5
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
5
+ /* eslint-disable @typescript-eslint/no-unused-vars */
6
6
  describe('Expect', () => {
7
7
  it('should only accept true', () => {
8
8
  type ShouldBeTrue = Expect<true>;
@@ -4,7 +4,7 @@ import { AppComponent } from './gs-app';
4
4
  import { type MutationAnnotations } from './mutation-annotations-context';
5
5
 
6
6
  describe('gs-app types', () => {
7
- test('mutationAnnotations type should match', ({}) => {
7
+ test('mutationAnnotations type should match', () => {
8
8
  expectTypeOf(AppComponent.prototype).toHaveProperty('mutationAnnotations').toEqualTypeOf<MutationAnnotations>();
9
9
  });
10
10
  });
@@ -129,7 +129,7 @@ export const FailsToFetchReferenceGenome: StoryObj<StoryProps> = {
129
129
  };
130
130
 
131
131
  @customElement('gs-app-display')
132
- // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars -- it is used in the story above
132
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- it is used in the story above
133
133
  class AppDisplay extends LitElement {
134
134
  @consume({ context: lapisContext })
135
135
  lapis: string = '';
@@ -151,7 +151,7 @@ declare global {
151
151
  }
152
152
  }
153
153
 
154
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
154
+ /* eslint-disable @typescript-eslint/no-unused-vars */
155
155
  type CustomSelectOptionsMatches = Expect<
156
156
  Equals<typeof DateRangeFilterComponent.prototype.dateRangeOptions, DateRangeFilterProps['dateRangeOptions']>
157
157
  >;
@@ -160,4 +160,4 @@ type WidthMatches = Expect<Equals<typeof DateRangeFilterComponent.prototype.widt
160
160
  type DateColumnMatches = Expect<
161
161
  Equals<typeof DateRangeFilterComponent.prototype.lapisDateField, DateRangeFilterProps['lapisDateField']>
162
162
  >;
163
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
163
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -105,7 +105,7 @@ declare global {
105
105
  }
106
106
  }
107
107
 
108
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
108
+ /* eslint-disable @typescript-eslint/no-unused-vars */
109
109
  type InitialValueMatches = Expect<Equals<typeof LineageFilterComponent.prototype.value, LineageFilterProps['value']>>;
110
110
  type LapisFieldMatches = Expect<
111
111
  Equals<typeof LineageFilterComponent.prototype.lapisField, LineageFilterProps['lapisField']>
@@ -117,4 +117,4 @@ type PlaceholderTextMatches = Expect<
117
117
  Equals<typeof LineageFilterComponent.prototype.placeholderText, LineageFilterProps['placeholderText']>
118
118
  >;
119
119
  type WidthMatches = Expect<Equals<typeof LineageFilterComponent.prototype.width, LineageFilterProps['width']>>;
120
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
120
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -37,7 +37,7 @@ export class LocationFilterComponent extends PreactLitAdapter {
37
37
  * The initial value to use for this location filter.
38
38
  */
39
39
  @property({ type: Object })
40
- value: Record<string, string | undefined> | undefined = undefined;
40
+ value: Record<string, string | null | undefined> | undefined = undefined;
41
41
 
42
42
  /**
43
43
  * Required.
@@ -109,7 +109,7 @@ declare global {
109
109
  }
110
110
  }
111
111
 
112
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
112
+ /* eslint-disable @typescript-eslint/no-unused-vars */
113
113
  type InitialValueMatches = Expect<Equals<typeof LocationFilterComponent.prototype.value, LocationFilterProps['value']>>;
114
114
  type FieldsMatches = Expect<Equals<typeof LocationFilterComponent.prototype.fields, LocationFilterProps['fields']>>;
115
115
  type LapisFilterMatches = Expect<
@@ -119,4 +119,4 @@ type PlaceholderTextMatches = Expect<
119
119
  Equals<typeof LocationFilterComponent.prototype.placeholderText, LocationFilterProps['placeholderText']>
120
120
  >;
121
121
  type WidthMatches = Expect<Equals<typeof LocationFilterComponent.prototype.width, LocationFilterProps['width']>>;
122
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
122
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -109,9 +109,9 @@ declare global {
109
109
  }
110
110
  }
111
111
 
112
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
112
+ /* eslint-disable @typescript-eslint/no-unused-vars */
113
113
  type InitialValueMatches = Expect<
114
114
  Equals<typeof MutationFilterComponent.prototype.initialValue, MutationFilterProps['initialValue']>
115
115
  >;
116
116
  type WidthMatches = Expect<Equals<typeof MutationFilterComponent.prototype.width, MutationFilterProps['width']>>;
117
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
117
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -4,7 +4,7 @@ import { NumberRangeFilterComponent } from './gs-number-range-filter';
4
4
  import { type NumberRangeFilterProps } from '../../preact/numberRangeFilter/number-range-filter';
5
5
 
6
6
  describe('gs-number-range-filter types', () => {
7
- test('should match', ({}) => {
7
+ test('should match', () => {
8
8
  expectTypeOf(NumberRangeFilterComponent.prototype)
9
9
  .toHaveProperty('value')
10
10
  .toEqualTypeOf<NumberRangeFilterProps['value']>();
@@ -99,7 +99,7 @@ declare global {
99
99
  }
100
100
  }
101
101
 
102
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
102
+ /* eslint-disable @typescript-eslint/no-unused-vars */
103
103
  type InitialValueMatches = Expect<Equals<typeof TextFilterComponent.prototype.value, TextFilterProps['value']>>;
104
104
  type LapisFieldMatches = Expect<Equals<typeof TextFilterComponent.prototype.lapisField, TextFilterProps['lapisField']>>;
105
105
  type LapisFilterMatches = Expect<
@@ -109,4 +109,4 @@ type PlaceholderTextMatches = Expect<
109
109
  Equals<typeof TextFilterComponent.prototype.placeholderText, TextFilterProps['placeholderText']>
110
110
  >;
111
111
  type WidthMatches = Expect<Equals<typeof TextFilterComponent.prototype.width, TextFilterProps['width']>>;
112
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
112
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -138,7 +138,7 @@ declare global {
138
138
  }
139
139
  }
140
140
 
141
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
141
+ /* eslint-disable @typescript-eslint/no-unused-vars */
142
142
  type FieldsMatches = Expect<Equals<typeof AggregateComponent.prototype.fields, AggregateProps['fields']>>;
143
143
  type ViewsMatches = Expect<Equals<typeof AggregateComponent.prototype.views, AggregateProps['views']>>;
144
144
  type FilterMatches = Expect<Equals<typeof AggregateComponent.prototype.lapisFilter, AggregateProps['lapisFilter']>>;
@@ -154,4 +154,4 @@ type PageSizeMatches = Expect<Equals<typeof AggregateComponent.prototype.pageSiz
154
154
  type MaxNumberOfBarsMatches = Expect<
155
155
  Equals<typeof AggregateComponent.prototype.maxNumberOfBars, AggregateProps['maxNumberOfBars']>
156
156
  >;
157
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
157
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -4,7 +4,7 @@ import { GenomeDataViewerComponent } from './gs-genome-data-viewer';
4
4
  import type { GenomeDataViewerProps } from '../../preact/genomeViewer/genome-data-viewer';
5
5
 
6
6
  describe('gs-app types', () => {
7
- test('mutationAnnotations type should match', ({}) => {
7
+ test('mutationAnnotations type should match', () => {
8
8
  expectTypeOf(GenomeDataViewerComponent.prototype)
9
9
  .toHaveProperty('gff3Source')
10
10
  .toEqualTypeOf<GenomeDataViewerProps['gff3Source']>();
@@ -134,7 +134,7 @@ declare global {
134
134
  }
135
135
  }
136
136
 
137
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
137
+ /* eslint-disable @typescript-eslint/no-unused-vars */
138
138
  type LapisFiltersMatches = Expect<
139
139
  Equals<typeof MutationComparisonComponent.prototype.lapisFilters, MutationComparisonProps['lapisFilters']>
140
140
  >;
@@ -153,4 +153,4 @@ type HeightMatches = Expect<
153
153
  type PageSizeMatches = Expect<
154
154
  Equals<typeof MutationComparisonComponent.prototype.pageSize, MutationComparisonProps['pageSize']>
155
155
  >;
156
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
156
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -166,7 +166,7 @@ declare global {
166
166
  }
167
167
  }
168
168
 
169
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
169
+ /* eslint-disable @typescript-eslint/no-unused-vars */
170
170
  type LapisFilterMatches = Expect<
171
171
  Equals<typeof MutationsComponent.prototype.lapisFilter, MutationsProps['lapisFilter']>
172
172
  >;
@@ -180,4 +180,4 @@ type ViewsMatches = Expect<Equals<typeof MutationsComponent.prototype.views, Mut
180
180
  type WidthMatches = Expect<Equals<typeof MutationsComponent.prototype.width, MutationsProps['width']>>;
181
181
  type HeightMatches = Expect<Equals<typeof MutationsComponent.prototype.height, MutationsProps['height']>>;
182
182
  type PageSizeMatches = Expect<Equals<typeof MutationsComponent.prototype.pageSize, MutationsProps['pageSize']>>;
183
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
183
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -133,7 +133,7 @@ declare global {
133
133
  }
134
134
  }
135
135
 
136
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
136
+ /* eslint-disable @typescript-eslint/no-unused-vars */
137
137
  type LapisFilterMatches = Expect<
138
138
  Equals<typeof NumberSequencesOverTimeComponent.prototype.lapisFilters, NumberSequencesOverTimeProps['lapisFilters']>
139
139
  >;
@@ -164,4 +164,4 @@ type SmoothingWindowMatches = Expect<
164
164
  type PageSizeMatches = Expect<
165
165
  Equals<typeof NumberSequencesOverTimeComponent.prototype.pageSize, NumberSequencesOverTimeProps['pageSize']>
166
166
  >;
167
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
167
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -200,7 +200,7 @@ declare global {
200
200
  }
201
201
  }
202
202
 
203
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
203
+ /* eslint-disable @typescript-eslint/no-unused-vars */
204
204
  type NumeratorMatches = Expect<
205
205
  Equals<typeof PrevalenceOverTimeComponent.prototype.numeratorFilters, PrevalenceOverTimeProps['numeratorFilters']>
206
206
  >;
@@ -243,4 +243,4 @@ type YAxisMaxLogarithmicMatches = Expect<
243
243
  PrevalenceOverTimeProps['yAxisMaxLogarithmic']
244
244
  >
245
245
  >;
246
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
246
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -154,7 +154,7 @@ declare global {
154
154
  }
155
155
  }
156
156
 
157
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
157
+ /* eslint-disable @typescript-eslint/no-unused-vars */
158
158
  type NumeratorMatches = Expect<
159
159
  Equals<
160
160
  typeof RelativeGrowthAdvantageComponent.prototype.numeratorFilter,
@@ -200,4 +200,4 @@ type YAxisMaxLogarithmicMatches = Expect<
200
200
  RelativeGrowthAdvantageProps['yAxisMaxLogarithmic']
201
201
  >
202
202
  >;
203
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
203
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -226,7 +226,7 @@ declare global {
226
226
  }
227
227
  }
228
228
 
229
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
229
+ /* eslint-disable @typescript-eslint/no-unused-vars */
230
230
  type LapisFilterMatches = Expect<
231
231
  Equals<typeof SequencesByLocationComponent.prototype.lapisFilter, SequencesByLocationProps['lapisFilter']>
232
232
  >;
@@ -261,4 +261,4 @@ type OffsetXMatches = Expect<
261
261
  type OffsetYMatches = Expect<
262
262
  Equals<typeof SequencesByLocationComponent.prototype.offsetY, SequencesByLocationProps['offsetY']>
263
263
  >;
264
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
264
+ /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -83,7 +83,7 @@ declare global {
83
83
  }
84
84
  }
85
85
 
86
- /* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */
86
+ /* eslint-disable @typescript-eslint/no-unused-vars */
87
87
  type WidthMatches = Expect<Equals<typeof StatisticsComponent.prototype.width, StatisticsProps['width']>>;
88
88
  type HeightMatches = Expect<Equals<typeof StatisticsComponent.prototype.height, StatisticsProps['height']>>;
89
89
  type DenominatorFilterMatches = Expect<
@@ -92,4 +92,4 @@ type DenominatorFilterMatches = Expect<
92
92
  type NumeratorFilterMatches = Expect<
93
93
  Equals<typeof StatisticsComponent.prototype.numeratorFilter, StatisticsProps['numeratorFilter']>
94
94
  >;
95
- /* eslint-enable @typescript-eslint/no-unused-vars, no-unused-vars */
95
+ /* eslint-enable @typescript-eslint/no-unused-vars */