@genspectrum/dashboard-components 1.13.0 → 1.14.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 (26) hide show
  1. package/custom-elements.json +393 -2
  2. package/dist/components.d.ts +126 -9
  3. package/dist/components.js +701 -163
  4. package/dist/components.js.map +1 -1
  5. package/dist/util.d.ts +146 -11
  6. package/package.json +1 -1
  7. package/src/lapisApi/lapisTypes.ts +1 -1
  8. package/src/preact/queriesOverTime/__mockData__/defaultMockData/queriesOverTime.json +32 -0
  9. package/src/preact/queriesOverTime/__mockData__/manyQueries.json +128 -0
  10. package/src/preact/queriesOverTime/__mockData__/request1800s.json +16 -0
  11. package/src/preact/queriesOverTime/__mockData__/withGaps.json +52 -0
  12. package/src/preact/queriesOverTime/getFilteredQueriesOverTimeData.ts +85 -0
  13. package/src/preact/queriesOverTime/queries-over-time-filter.tsx +25 -0
  14. package/src/preact/queriesOverTime/queries-over-time-grid-tooltip.stories.tsx +134 -0
  15. package/src/preact/queriesOverTime/queries-over-time-grid-tooltip.tsx +123 -0
  16. package/src/preact/queriesOverTime/queries-over-time.stories.tsx +481 -0
  17. package/src/preact/queriesOverTime/queries-over-time.tsx +304 -0
  18. package/src/utilEntrypoint.ts +1 -0
  19. package/src/web-components/visualization/gs-mutations-over-time.spec-d.ts +3 -0
  20. package/src/web-components/visualization/gs-mutations-over-time.tsx +1 -1
  21. package/src/web-components/visualization/gs-queries-over-time.spec-d.ts +38 -0
  22. package/src/web-components/visualization/gs-queries-over-time.stories.ts +288 -0
  23. package/src/web-components/visualization/gs-queries-over-time.tsx +154 -0
  24. package/src/web-components/visualization/index.ts +1 -0
  25. package/standalone-bundle/dashboard-components.js +8509 -8068
  26. package/standalone-bundle/dashboard-components.js.map +1 -1
@@ -2962,7 +2962,7 @@
2962
2962
  "kind": "field",
2963
2963
  "name": "hideGaps",
2964
2964
  "type": {
2965
- "text": "boolean"
2965
+ "text": "boolean | undefined"
2966
2966
  },
2967
2967
  "default": "false",
2968
2968
  "description": "If true, date ranges with no data will be hidden initially; if false, not.\nCan be switched with a button in the toolbar.",
@@ -3083,7 +3083,7 @@
3083
3083
  {
3084
3084
  "name": "hideGaps",
3085
3085
  "type": {
3086
- "text": "boolean"
3086
+ "text": "boolean | undefined"
3087
3087
  },
3088
3088
  "default": "false",
3089
3089
  "description": "If true, date ranges with no data will be hidden initially; if false, not.\nCan be switched with a button in the toolbar.",
@@ -4136,6 +4136,389 @@
4136
4136
  }
4137
4137
  ]
4138
4138
  },
4139
+ {
4140
+ "kind": "javascript-module",
4141
+ "path": "src/web-components/visualization/gs-queries-over-time.spec-d.ts",
4142
+ "declarations": [],
4143
+ "exports": []
4144
+ },
4145
+ {
4146
+ "kind": "javascript-module",
4147
+ "path": "src/web-components/visualization/gs-queries-over-time.stories.ts",
4148
+ "declarations": [
4149
+ {
4150
+ "kind": "variable",
4151
+ "name": "meta",
4152
+ "type": {
4153
+ "text": "Meta<Required<QueriesOverTimeProps>>"
4154
+ },
4155
+ "default": "{ title: 'Visualization/Queries over time', component: 'gs-queries-over-time', argTypes: { lapisFilter: { control: 'object' }, queries: { control: 'object' }, views: { options: ['grid'], control: { type: 'check' }, }, width: { control: 'text' }, height: { control: 'text' }, granularity: { options: ['day', 'week', 'month', 'year'], control: { type: 'radio' }, }, lapisDateField: { control: 'text' }, initialMeanProportionInterval: { control: 'object' }, hideGaps: { control: 'boolean' }, pageSizes: { control: 'object' }, customColumns: { control: 'object' }, }, args: { lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-04-30' }, queries: [ { displayLabel: 'S:F456L (single mutation)', countQuery: 'S:456L', coverageQuery: '!S:456N', }, { displayLabel: 'R346T + F456L (combination)', countQuery: 'S:346T & S:456L', coverageQuery: '!S:346N & !S:456N', }, { displayLabel: 'C22916T or T22917G (nucleotide OR)', countQuery: 'C22916T | T22917G', coverageQuery: '!22916N & !22917N', }, ], views: ['grid'], width: '100%', granularity: 'month', lapisDateField: 'date', initialMeanProportionInterval: { min: 0, max: 1 }, hideGaps: false, pageSizes: [10, 20, 30, 40, 50], }, parameters: withComponentDocs({ componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, fetchMock: { mocks: [ { matcher: { url: `${LAPIS_URL}/component/queriesOverTime`, body: { filters: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-04-30', }, queries: [ { displayLabel: 'S:F456L (single mutation)', countQuery: 'S:456L', coverageQuery: '!S:456N', }, { displayLabel: 'R346T + F456L (combination)', countQuery: 'S:346T & S:456L', coverageQuery: '!S:346N & !S:456N', }, { displayLabel: 'C22916T or T22917G (nucleotide OR)', countQuery: 'C22916T | T22917G', coverageQuery: '!22916N & !22917N', }, ], dateRanges: [ { dateFrom: '2024-01-01', dateTo: '2024-01-31' }, { dateFrom: '2024-02-01', dateTo: '2024-02-29' }, { dateFrom: '2024-03-01', dateTo: '2024-03-31' }, { dateFrom: '2024-04-01', dateTo: '2024-04-30' }, ], dateField: 'date', }, matchPartialBody: true, response: { status: 200, body: mockDefaultQueriesOverTime, }, }, }, ], }, }), tags: ['autodocs'], }"
4156
+ },
4157
+ {
4158
+ "kind": "variable",
4159
+ "name": "Default",
4160
+ "type": {
4161
+ "text": "StoryObj<Required<QueriesOverTimeProps>>"
4162
+ },
4163
+ "default": "{ ...Template, }"
4164
+ },
4165
+ {
4166
+ "kind": "variable",
4167
+ "name": "WithFixedHeight",
4168
+ "type": {
4169
+ "text": "StoryObj<Required<QueriesOverTimeProps>>"
4170
+ },
4171
+ "default": "{ ...Template, args: { ...Template.args, height: '700px', }, }"
4172
+ },
4173
+ {
4174
+ "kind": "variable",
4175
+ "name": "ByWeek",
4176
+ "type": {
4177
+ "text": "StoryObj<Required<QueriesOverTimeProps>>"
4178
+ },
4179
+ "default": "{ ...Template, args: { ...Template.args, lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-02-11' }, granularity: 'week', }, parameters: { fetchMock: { mocks: [ { matcher: { url: `${LAPIS_URL}/component/queriesOverTime`, body: { filters: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-02-11', }, dateRanges: [ { dateFrom: '2024-01-15', dateTo: '2024-01-21' }, { dateFrom: '2024-01-22', dateTo: '2024-01-28' }, { dateFrom: '2024-01-29', dateTo: '2024-02-04' }, { dateFrom: '2024-02-05', dateTo: '2024-02-11' }, ], }, matchPartialBody: true, response: { status: 200, body: mockDefaultQueriesOverTime, }, }, }, ], }, }, }"
4180
+ },
4181
+ {
4182
+ "kind": "variable",
4183
+ "name": "WithCustomColumns",
4184
+ "type": {
4185
+ "text": "StoryObj<Required<QueriesOverTimeProps>>"
4186
+ },
4187
+ "default": "{ ...Template, args: { ...Template.args, customColumns: [ { header: 'Jaccard Index', values: { 'S:F456L (single mutation)': 0.75, 'R346T + F456L (combination)': 0.92, 'C22916T or T22917G (nucleotide OR)': 0.58, }, }, ], }, }"
4188
+ },
4189
+ {
4190
+ "kind": "variable",
4191
+ "name": "HideGaps",
4192
+ "type": {
4193
+ "text": "StoryObj<Required<QueriesOverTimeProps>>"
4194
+ },
4195
+ "default": "{ ...Template, args: { ...Template.args, lapisFilter: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-07-10' }, queries: [ { displayLabel: 'S:F456L', countQuery: 'S:456L', coverageQuery: '!S:456N', }, { displayLabel: 'S:R346T', countQuery: 'S:346T', coverageQuery: '!S:346N', }, { displayLabel: 'S:Q493E', countQuery: 'S:493E', coverageQuery: '!S:493N', }, ], hideGaps: true, }, parameters: { fetchMock: { mocks: [ { matcher: { url: `${LAPIS_URL}/component/queriesOverTime`, body: { filters: { pangoLineage: 'JN.1*', dateFrom: '2024-01-15', dateTo: '2024-07-10' }, dateRanges: [ { dateFrom: '2024-01-01', dateTo: '2024-01-31' }, { dateFrom: '2024-02-01', dateTo: '2024-02-29' }, { dateFrom: '2024-03-01', dateTo: '2024-03-31' }, { dateFrom: '2024-04-01', dateTo: '2024-04-30' }, { dateFrom: '2024-05-01', dateTo: '2024-05-31' }, { dateFrom: '2024-06-01', dateTo: '2024-06-30' }, { dateFrom: '2024-07-01', dateTo: '2024-07-31' }, ], }, matchPartialBody: true, response: { status: 200, body: mockWithGapsQueriesOverTime, }, }, }, ], }, }, }"
4196
+ },
4197
+ {
4198
+ "kind": "variable",
4199
+ "name": "SmallWidth",
4200
+ "type": {
4201
+ "text": "StoryObj<Required<QueriesOverTimeProps>>"
4202
+ },
4203
+ "default": "{ ...Template, args: { ...Template.args, width: '300px', }, }"
4204
+ }
4205
+ ],
4206
+ "exports": [
4207
+ {
4208
+ "kind": "js",
4209
+ "name": "default",
4210
+ "declaration": {
4211
+ "name": "meta",
4212
+ "module": "src/web-components/visualization/gs-queries-over-time.stories.ts"
4213
+ }
4214
+ },
4215
+ {
4216
+ "kind": "js",
4217
+ "name": "Default",
4218
+ "declaration": {
4219
+ "name": "Default",
4220
+ "module": "src/web-components/visualization/gs-queries-over-time.stories.ts"
4221
+ }
4222
+ },
4223
+ {
4224
+ "kind": "js",
4225
+ "name": "WithFixedHeight",
4226
+ "declaration": {
4227
+ "name": "WithFixedHeight",
4228
+ "module": "src/web-components/visualization/gs-queries-over-time.stories.ts"
4229
+ }
4230
+ },
4231
+ {
4232
+ "kind": "js",
4233
+ "name": "ByWeek",
4234
+ "declaration": {
4235
+ "name": "ByWeek",
4236
+ "module": "src/web-components/visualization/gs-queries-over-time.stories.ts"
4237
+ }
4238
+ },
4239
+ {
4240
+ "kind": "js",
4241
+ "name": "WithCustomColumns",
4242
+ "declaration": {
4243
+ "name": "WithCustomColumns",
4244
+ "module": "src/web-components/visualization/gs-queries-over-time.stories.ts"
4245
+ }
4246
+ },
4247
+ {
4248
+ "kind": "js",
4249
+ "name": "HideGaps",
4250
+ "declaration": {
4251
+ "name": "HideGaps",
4252
+ "module": "src/web-components/visualization/gs-queries-over-time.stories.ts"
4253
+ }
4254
+ },
4255
+ {
4256
+ "kind": "js",
4257
+ "name": "SmallWidth",
4258
+ "declaration": {
4259
+ "name": "SmallWidth",
4260
+ "module": "src/web-components/visualization/gs-queries-over-time.stories.ts"
4261
+ }
4262
+ }
4263
+ ]
4264
+ },
4265
+ {
4266
+ "kind": "javascript-module",
4267
+ "path": "src/web-components/visualization/gs-queries-over-time.tsx",
4268
+ "declarations": [
4269
+ {
4270
+ "kind": "class",
4271
+ "description": "## Context\n\nThis component displays arbitrary LAPIS queries over time for a dataset.\nEach query consists of a displayLabel (optional), countQuery (string for counting matches),\nand coverageQuery (string for determining the coverage/denominator).\nThe shown date range is determined by the available dates in the dataset.\n\n## Views\n\n### Grid View\n\nThe grid view shows the proportion for each query over date ranges.\nProportions are calculated as count/coverage for each time period.\n\nUsers can filter the displayed rows by mean proportion via a slider in the toolbar.\nThe mean proportion of each row is calculated over the whole data range that the component displays.",
4272
+ "name": "QueriesOverTimeComponent",
4273
+ "members": [
4274
+ {
4275
+ "kind": "field",
4276
+ "name": "lapisFilter",
4277
+ "type": {
4278
+ "text": "Record<string, string | string[] | number | null | boolean | undefined> & {\n nucleotideMutations?: string[];\n aminoAcidMutations?: string[];\n nucleotideInsertions?: string[];\n aminoAcidInsertions?: string[];\n }"
4279
+ },
4280
+ "default": "{}",
4281
+ "description": "LAPIS filter to apply to all queries. This is used to determine the date range and total counts.",
4282
+ "attribute": "lapisFilter"
4283
+ },
4284
+ {
4285
+ "kind": "field",
4286
+ "name": "queries",
4287
+ "type": {
4288
+ "text": "{\n displayLabel: string;\n countQuery: string;\n coverageQuery: string;\n }[]"
4289
+ },
4290
+ "default": "[]",
4291
+ "description": "Required.\n\nArray of queries to display. Each query has:\n- displayLabel: string - The name to show in the grid row label\n- countQuery: string - Query string to count matches\n- coverageQuery: string - Query string to determine coverage/denominator\n\nBoth queries (count and coverage) are 'advanced queries' as they are defined in LAPIS.",
4292
+ "attribute": "queries"
4293
+ },
4294
+ {
4295
+ "kind": "field",
4296
+ "name": "views",
4297
+ "type": {
4298
+ "text": "'grid'[]"
4299
+ },
4300
+ "default": "['grid']",
4301
+ "description": "A list of tabs with views that this component should provide.",
4302
+ "attribute": "views"
4303
+ },
4304
+ {
4305
+ "kind": "field",
4306
+ "name": "width",
4307
+ "type": {
4308
+ "text": "string"
4309
+ },
4310
+ "default": "'100%'",
4311
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.",
4312
+ "attribute": "width"
4313
+ },
4314
+ {
4315
+ "kind": "field",
4316
+ "name": "height",
4317
+ "type": {
4318
+ "text": "string | undefined"
4319
+ },
4320
+ "default": "undefined",
4321
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.",
4322
+ "attribute": "height"
4323
+ },
4324
+ {
4325
+ "kind": "field",
4326
+ "name": "granularity",
4327
+ "type": {
4328
+ "text": "'day' | 'week' | 'month' | 'year'"
4329
+ },
4330
+ "default": "'week'",
4331
+ "description": "The granularity of the time axis.",
4332
+ "attribute": "granularity"
4333
+ },
4334
+ {
4335
+ "kind": "field",
4336
+ "name": "lapisDateField",
4337
+ "type": {
4338
+ "text": "string"
4339
+ },
4340
+ "default": "'date'",
4341
+ "description": "Required.\n\nThe LAPIS field that the data should be aggregated by.\nMust be a field of type `date` in LAPIS.",
4342
+ "attribute": "lapisDateField"
4343
+ },
4344
+ {
4345
+ "kind": "field",
4346
+ "name": "initialMeanProportionInterval",
4347
+ "type": {
4348
+ "text": "{ min: number; max: number }"
4349
+ },
4350
+ "default": "{ min: 0, max: 1 }",
4351
+ "description": "The initial proportion interval for the grid view.\nThe values must be between 0 and 1, inclusive.",
4352
+ "attribute": "initialMeanProportionInterval"
4353
+ },
4354
+ {
4355
+ "kind": "field",
4356
+ "name": "hideGaps",
4357
+ "type": {
4358
+ "text": "boolean | undefined"
4359
+ },
4360
+ "default": "false",
4361
+ "description": "If true, date ranges with no data will be hidden initially; if false, not.\nCan be switched with a button in the toolbar.",
4362
+ "attribute": "hideGaps"
4363
+ },
4364
+ {
4365
+ "kind": "field",
4366
+ "name": "pageSizes",
4367
+ "type": {
4368
+ "text": "number[] | number"
4369
+ },
4370
+ "default": "[10, 20, 30, 40, 50]",
4371
+ "description": "The number of rows per page, which can be selected by the user.",
4372
+ "attribute": "pageSizes"
4373
+ },
4374
+ {
4375
+ "kind": "field",
4376
+ "name": "customColumns",
4377
+ "type": {
4378
+ "text": "{ header: string; values: Record<string, string | number> }[] | undefined"
4379
+ },
4380
+ "default": "undefined",
4381
+ "description": "Custom columns to add to the grid.\nEach column has a header and a map of query displayLabels to values.",
4382
+ "attribute": "customColumns"
4383
+ }
4384
+ ],
4385
+ "events": [
4386
+ {
4387
+ "type": {
4388
+ "text": "CustomEvent<undefined>"
4389
+ },
4390
+ "description": "Fired when the component has finished loading the required data from LAPIS.",
4391
+ "name": "gs-component-finished-loading"
4392
+ }
4393
+ ],
4394
+ "attributes": [
4395
+ {
4396
+ "name": "lapisFilter",
4397
+ "type": {
4398
+ "text": "Record<string, string | string[] | number | null | boolean | undefined> & {\n nucleotideMutations?: string[];\n aminoAcidMutations?: string[];\n nucleotideInsertions?: string[];\n aminoAcidInsertions?: string[];\n }"
4399
+ },
4400
+ "default": "{}",
4401
+ "description": "LAPIS filter to apply to all queries. This is used to determine the date range and total counts.",
4402
+ "fieldName": "lapisFilter"
4403
+ },
4404
+ {
4405
+ "name": "queries",
4406
+ "type": {
4407
+ "text": "{\n displayLabel: string;\n countQuery: string;\n coverageQuery: string;\n }[]"
4408
+ },
4409
+ "default": "[]",
4410
+ "description": "Required.\n\nArray of queries to display. Each query has:\n- displayLabel: string - The name to show in the grid row label\n- countQuery: string - Query string to count matches\n- coverageQuery: string - Query string to determine coverage/denominator\n\nBoth queries (count and coverage) are 'advanced queries' as they are defined in LAPIS.",
4411
+ "fieldName": "queries"
4412
+ },
4413
+ {
4414
+ "name": "views",
4415
+ "type": {
4416
+ "text": "'grid'[]"
4417
+ },
4418
+ "default": "['grid']",
4419
+ "description": "A list of tabs with views that this component should provide.",
4420
+ "fieldName": "views"
4421
+ },
4422
+ {
4423
+ "name": "width",
4424
+ "type": {
4425
+ "text": "string"
4426
+ },
4427
+ "default": "'100%'",
4428
+ "description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.",
4429
+ "fieldName": "width"
4430
+ },
4431
+ {
4432
+ "name": "height",
4433
+ "type": {
4434
+ "text": "string | undefined"
4435
+ },
4436
+ "default": "undefined",
4437
+ "description": "The height of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.",
4438
+ "fieldName": "height"
4439
+ },
4440
+ {
4441
+ "name": "granularity",
4442
+ "type": {
4443
+ "text": "'day' | 'week' | 'month' | 'year'"
4444
+ },
4445
+ "default": "'week'",
4446
+ "description": "The granularity of the time axis.",
4447
+ "fieldName": "granularity"
4448
+ },
4449
+ {
4450
+ "name": "lapisDateField",
4451
+ "type": {
4452
+ "text": "string"
4453
+ },
4454
+ "default": "'date'",
4455
+ "description": "Required.\n\nThe LAPIS field that the data should be aggregated by.\nMust be a field of type `date` in LAPIS.",
4456
+ "fieldName": "lapisDateField"
4457
+ },
4458
+ {
4459
+ "name": "initialMeanProportionInterval",
4460
+ "type": {
4461
+ "text": "{ min: number; max: number }"
4462
+ },
4463
+ "default": "{ min: 0, max: 1 }",
4464
+ "description": "The initial proportion interval for the grid view.\nThe values must be between 0 and 1, inclusive.",
4465
+ "fieldName": "initialMeanProportionInterval"
4466
+ },
4467
+ {
4468
+ "name": "hideGaps",
4469
+ "type": {
4470
+ "text": "boolean | undefined"
4471
+ },
4472
+ "default": "false",
4473
+ "description": "If true, date ranges with no data will be hidden initially; if false, not.\nCan be switched with a button in the toolbar.",
4474
+ "fieldName": "hideGaps"
4475
+ },
4476
+ {
4477
+ "name": "pageSizes",
4478
+ "type": {
4479
+ "text": "number[] | number"
4480
+ },
4481
+ "default": "[10, 20, 30, 40, 50]",
4482
+ "description": "The number of rows per page, which can be selected by the user.",
4483
+ "fieldName": "pageSizes"
4484
+ },
4485
+ {
4486
+ "name": "customColumns",
4487
+ "type": {
4488
+ "text": "{ header: string; values: Record<string, string | number> }[] | undefined"
4489
+ },
4490
+ "default": "undefined",
4491
+ "description": "Custom columns to add to the grid.\nEach column has a header and a map of query displayLabels to values.",
4492
+ "fieldName": "customColumns"
4493
+ }
4494
+ ],
4495
+ "superclass": {
4496
+ "name": "PreactLitAdapterWithGridJsStyles",
4497
+ "module": "/src/web-components/PreactLitAdapterWithGridJsStyles"
4498
+ },
4499
+ "tagName": "gs-queries-over-time",
4500
+ "customElement": true
4501
+ }
4502
+ ],
4503
+ "exports": [
4504
+ {
4505
+ "kind": "js",
4506
+ "name": "QueriesOverTimeComponent",
4507
+ "declaration": {
4508
+ "name": "QueriesOverTimeComponent",
4509
+ "module": "src/web-components/visualization/gs-queries-over-time.tsx"
4510
+ }
4511
+ },
4512
+ {
4513
+ "kind": "custom-element-definition",
4514
+ "name": "gs-queries-over-time",
4515
+ "declaration": {
4516
+ "name": "QueriesOverTimeComponent",
4517
+ "module": "src/web-components/visualization/gs-queries-over-time.tsx"
4518
+ }
4519
+ }
4520
+ ]
4521
+ },
4139
4522
  {
4140
4523
  "kind": "javascript-module",
4141
4524
  "path": "src/web-components/visualization/gs-relative-growth-advantage.stories.ts",
@@ -5005,6 +5388,14 @@
5005
5388
  "module": "./gs-mutations-over-time"
5006
5389
  }
5007
5390
  },
5391
+ {
5392
+ "kind": "js",
5393
+ "name": "QueriesOverTimeComponent",
5394
+ "declaration": {
5395
+ "name": "QueriesOverTimeComponent",
5396
+ "module": "./gs-queries-over-time"
5397
+ }
5398
+ },
5008
5399
  {
5009
5400
  "kind": "js",
5010
5401
  "name": "SequencesByLocationComponent",
@@ -828,7 +828,7 @@ export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGrid
828
828
  * If true, date ranges with no data will be hidden initially; if false, not.
829
829
  * Can be switched with a button in the toolbar.
830
830
  */
831
- hideGaps: boolean;
831
+ hideGaps: boolean | undefined;
832
832
  /**
833
833
  * The number of rows per page, which can be selected by the user.
834
834
  */
@@ -1177,6 +1177,107 @@ export declare class PrevalenceOverTimeComponent extends PreactLitAdapterWithGri
1177
1177
  render(): JSX_2.Element;
1178
1178
  }
1179
1179
 
1180
+ /**
1181
+ * ## Context
1182
+ *
1183
+ * This component displays arbitrary LAPIS queries over time for a dataset.
1184
+ * Each query consists of a displayLabel (optional), countQuery (string for counting matches),
1185
+ * and coverageQuery (string for determining the coverage/denominator).
1186
+ * The shown date range is determined by the available dates in the dataset.
1187
+ *
1188
+ * ## Views
1189
+ *
1190
+ * ### Grid View
1191
+ *
1192
+ * The grid view shows the proportion for each query over date ranges.
1193
+ * Proportions are calculated as count/coverage for each time period.
1194
+ *
1195
+ * Users can filter the displayed rows by mean proportion via a slider in the toolbar.
1196
+ * The mean proportion of each row is calculated over the whole data range that the component displays.
1197
+ *
1198
+ * @fires {CustomEvent<undefined>} gs-component-finished-loading
1199
+ * Fired when the component has finished loading the required data from LAPIS.
1200
+ */
1201
+ export declare class QueriesOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
1202
+ /**
1203
+ * LAPIS filter to apply to all queries. This is used to determine the date range and total counts.
1204
+ */
1205
+ lapisFilter: Record<string, string | string[] | number | null | boolean | undefined> & {
1206
+ nucleotideMutations?: string[];
1207
+ aminoAcidMutations?: string[];
1208
+ nucleotideInsertions?: string[];
1209
+ aminoAcidInsertions?: string[];
1210
+ };
1211
+ /**
1212
+ * Required.
1213
+ *
1214
+ * Array of queries to display. Each query has:
1215
+ * - displayLabel: string - The name to show in the grid row label
1216
+ * - countQuery: string - Query string to count matches
1217
+ * - coverageQuery: string - Query string to determine coverage/denominator
1218
+ *
1219
+ * Both queries (count and coverage) are 'advanced queries' as they are defined in LAPIS.
1220
+ */
1221
+ queries: {
1222
+ displayLabel: string;
1223
+ countQuery: string;
1224
+ coverageQuery: string;
1225
+ }[];
1226
+ /**
1227
+ * A list of tabs with views that this component should provide.
1228
+ */
1229
+ views: 'grid'[];
1230
+ /**
1231
+ * The width of the component.
1232
+ *
1233
+ * Visit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.
1234
+ */
1235
+ width: string;
1236
+ /**
1237
+ * The height of the component.
1238
+ *
1239
+ * Visit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.
1240
+ */
1241
+ height: string | undefined;
1242
+ /**
1243
+ * The granularity of the time axis.
1244
+ */
1245
+ granularity: 'day' | 'week' | 'month' | 'year';
1246
+ /**
1247
+ * Required.
1248
+ *
1249
+ * The LAPIS field that the data should be aggregated by.
1250
+ * Must be a field of type `date` in LAPIS.
1251
+ */
1252
+ lapisDateField: string;
1253
+ /**
1254
+ * The initial proportion interval for the grid view.
1255
+ * The values must be between 0 and 1, inclusive.
1256
+ */
1257
+ initialMeanProportionInterval: {
1258
+ min: number;
1259
+ max: number;
1260
+ };
1261
+ /**
1262
+ * If true, date ranges with no data will be hidden initially; if false, not.
1263
+ * Can be switched with a button in the toolbar.
1264
+ */
1265
+ hideGaps: boolean | undefined;
1266
+ /**
1267
+ * The number of rows per page, which can be selected by the user.
1268
+ */
1269
+ pageSizes: number[] | number;
1270
+ /**
1271
+ * Custom columns to add to the grid.
1272
+ * Each column has a header and a map of query displayLabels to values.
1273
+ */
1274
+ customColumns?: {
1275
+ header: string;
1276
+ values: Record<string, string | number>;
1277
+ }[];
1278
+ render(): JSX_2.Element;
1279
+ }
1280
+
1180
1281
  declare type ReferenceGenome = default_2.infer<typeof referenceGenomeResponse>;
1181
1282
 
1182
1283
  declare const referenceGenomeResponse: default_2.ZodObject<{
@@ -1722,7 +1823,7 @@ declare global {
1722
1823
 
1723
1824
  declare global {
1724
1825
  interface HTMLElementTagNameMap {
1725
- 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
1826
+ 'gs-mutation-comparison': MutationComparisonComponent;
1726
1827
  }
1727
1828
  }
1728
1829
 
@@ -1730,7 +1831,7 @@ declare global {
1730
1831
  declare global {
1731
1832
  namespace JSX {
1732
1833
  interface IntrinsicElements {
1733
- 'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1834
+ 'gs-mutation-comparison': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1734
1835
  }
1735
1836
  }
1736
1837
  }
@@ -1738,7 +1839,7 @@ declare global {
1738
1839
 
1739
1840
  declare global {
1740
1841
  interface HTMLElementTagNameMap {
1741
- 'gs-mutation-comparison': MutationComparisonComponent;
1842
+ 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
1742
1843
  }
1743
1844
  }
1744
1845
 
@@ -1746,7 +1847,7 @@ declare global {
1746
1847
  declare global {
1747
1848
  namespace JSX {
1748
1849
  interface IntrinsicElements {
1749
- 'gs-mutation-comparison': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1850
+ 'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1750
1851
  }
1751
1852
  }
1752
1853
  }
@@ -1770,7 +1871,7 @@ declare global {
1770
1871
 
1771
1872
  declare global {
1772
1873
  interface HTMLElementTagNameMap {
1773
- 'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
1874
+ 'gs-aggregate': AggregateComponent;
1774
1875
  }
1775
1876
  }
1776
1877
 
@@ -1778,7 +1879,7 @@ declare global {
1778
1879
  declare global {
1779
1880
  namespace JSX {
1780
1881
  interface IntrinsicElements {
1781
- 'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1882
+ 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1782
1883
  }
1783
1884
  }
1784
1885
  }
@@ -1786,7 +1887,7 @@ declare global {
1786
1887
 
1787
1888
  declare global {
1788
1889
  interface HTMLElementTagNameMap {
1789
- 'gs-aggregate': AggregateComponent;
1890
+ 'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
1790
1891
  }
1791
1892
  }
1792
1893
 
@@ -1794,7 +1895,7 @@ declare global {
1794
1895
  declare global {
1795
1896
  namespace JSX {
1796
1897
  interface IntrinsicElements {
1797
- 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1898
+ 'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1798
1899
  }
1799
1900
  }
1800
1901
  }
@@ -1816,6 +1917,22 @@ declare global {
1816
1917
  }
1817
1918
 
1818
1919
 
1920
+ declare global {
1921
+ interface HTMLElementTagNameMap {
1922
+ 'gs-queries-over-time': QueriesOverTimeComponent;
1923
+ }
1924
+ }
1925
+
1926
+
1927
+ declare global {
1928
+ namespace JSX {
1929
+ interface IntrinsicElements {
1930
+ 'gs-queries-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1931
+ }
1932
+ }
1933
+ }
1934
+
1935
+
1819
1936
  declare global {
1820
1937
  interface HTMLElementTagNameMap {
1821
1938
  'gs-sequences-by-location': SequencesByLocationComponent;