@genspectrum/dashboard-components 1.15.0 → 1.17.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 (60) hide show
  1. package/custom-elements.json +5 -5
  2. package/dist/components.d.ts +66 -67
  3. package/dist/components.js +457 -256
  4. package/dist/components.js.map +1 -1
  5. package/dist/util.d.ts +69 -66
  6. package/package.json +2 -9
  7. package/src/preact/MutationAnnotationsContext.tsx +1 -1
  8. package/src/preact/components/csv-download-button.tsx +22 -14
  9. package/src/preact/components/features-over-time-grid.tsx +189 -43
  10. package/src/preact/components/mutations-over-time-mutations-filter.stories.tsx +1 -1
  11. package/src/preact/components/mutations-over-time-mutations-filter.tsx +1 -1
  12. package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutationsByDay/aminoAcidMutationsOverTimePage1.json +52 -0
  13. package/src/preact/mutationsOverTime/__mockData__/byWeek/mutationsOverTimePage1.json +76 -0
  14. package/src/preact/mutationsOverTime/__mockData__/defaultMockData/mockDefaultMutationsOverTimeWithFilter.json +43 -0
  15. package/src/preact/mutationsOverTime/__mockData__/defaultMockData/mutationsOverTimePage1.json +126 -0
  16. package/src/preact/mutationsOverTime/__mockData__/defaultMockData/mutationsOverTimePage2.json +116 -0
  17. package/src/preact/mutationsOverTime/__mockData__/defaultMockData/mutationsOverTimePageSize20.json +216 -0
  18. package/src/preact/mutationsOverTime/getFilteredMutationCodes.spec.ts +236 -0
  19. package/src/preact/mutationsOverTime/{getFilteredMutationsOverTimeData.ts → getFilteredMutationCodes.ts} +32 -45
  20. package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +128 -23
  21. package/src/preact/mutationsOverTime/mutations-over-time.tsx +139 -74
  22. package/src/preact/mutationsOverTime/useMutationsOverTimePageData.ts +111 -0
  23. package/src/preact/queriesOverTime/queries-over-time-row-label-tooltip.stories.tsx +8 -10
  24. package/src/preact/queriesOverTime/queries-over-time-row-label-tooltip.tsx +7 -17
  25. package/src/preact/queriesOverTime/queries-over-time.tsx +1 -1
  26. package/src/preact/shared/tanstackTable/pagination-context.tsx +5 -2
  27. package/src/preact/shared/tanstackTable/pagination.tsx +11 -9
  28. package/src/preact/shared/tanstackTable/tanstackTable.tsx +7 -4
  29. package/src/preact/wastewater/mutationsOverTime/wastewater-mutations-over-time.tsx +1 -1
  30. package/src/query/queryMutationsOverTime.spec.ts +187 -662
  31. package/src/query/queryMutationsOverTime.ts +46 -33
  32. package/src/utilEntrypoint.ts +1 -1
  33. package/src/utils/useControlledState.ts +15 -0
  34. package/src/web-components/gs-app.ts +2 -3
  35. package/src/web-components/input/gs-date-range-filter.tsx +2 -3
  36. package/src/web-components/input/gs-lineage-filter.tsx +2 -3
  37. package/src/web-components/input/gs-location-filter.tsx +2 -3
  38. package/src/web-components/input/gs-mutation-filter.tsx +3 -4
  39. package/src/web-components/input/gs-number-range-filter.tsx +2 -3
  40. package/src/web-components/input/gs-text-filter.tsx +2 -3
  41. package/src/web-components/mutation-annotations-context.ts +3 -1
  42. package/src/web-components/visualization/gs-aggregate.tsx +2 -3
  43. package/src/web-components/visualization/gs-genome-data-viewer.tsx +2 -3
  44. package/src/web-components/visualization/gs-mutation-comparison.tsx +2 -3
  45. package/src/web-components/visualization/gs-mutations-over-time.stories.ts +78 -22
  46. package/src/web-components/visualization/gs-mutations-over-time.tsx +2 -3
  47. package/src/web-components/visualization/gs-mutations.tsx +7 -8
  48. package/src/web-components/visualization/gs-number-sequences-over-time.tsx +2 -3
  49. package/src/web-components/visualization/gs-prevalence-over-time.tsx +2 -3
  50. package/src/web-components/visualization/gs-queries-over-time.tsx +2 -3
  51. package/src/web-components/visualization/gs-relative-growth-advantage.tsx +2 -3
  52. package/src/web-components/visualization/gs-sequences-by-location.tsx +2 -3
  53. package/src/web-components/visualization/gs-statistics.tsx +2 -3
  54. package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +2 -3
  55. package/standalone-bundle/dashboard-components.js +6877 -6697
  56. package/standalone-bundle/dashboard-components.js.map +1 -1
  57. package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutationsByDay/aminoAcidMutationsOverTime.json +0 -5496
  58. package/src/preact/mutationsOverTime/__mockData__/byWeek/mutationsOverTime.json +0 -7100
  59. package/src/preact/mutationsOverTime/__mockData__/defaultMockData/mutationsOverTime.json +0 -12646
  60. package/src/preact/mutationsOverTime/getFilteredMutationsOverTime.spec.ts +0 -417
@@ -1,5 +1,4 @@
1
1
  import { customElement, property } from 'lit/decorators.js';
2
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
3
2
 
4
3
  import {
5
4
  RelativeGrowthAdvantage,
@@ -147,9 +146,9 @@ declare global {
147
146
 
148
147
  declare global {
149
148
  // eslint-disable-next-line @typescript-eslint/no-namespace
150
- namespace JSX {
149
+ namespace React.JSX {
151
150
  interface IntrinsicElements {
152
- 'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
151
+ 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
153
152
  }
154
153
  }
155
154
  }
@@ -1,7 +1,6 @@
1
1
  import leafletStyle from 'leaflet/dist/leaflet.css?inline';
2
2
  import { unsafeCSS } from 'lit';
3
3
  import { customElement, property } from 'lit/decorators.js';
4
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
5
4
 
6
5
  import leafletStyleModifications from '../../preact/sequencesByLocation/leafletStyleModifications.css?inline';
7
6
  import {
@@ -219,9 +218,9 @@ declare global {
219
218
 
220
219
  declare global {
221
220
  // eslint-disable-next-line @typescript-eslint/no-namespace
222
- namespace JSX {
221
+ namespace React.JSX {
223
222
  interface IntrinsicElements {
224
- 'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
223
+ 'gs-sequences-by-location': SequencesByLocationComponent;
225
224
  }
226
225
  }
227
226
  }
@@ -1,5 +1,4 @@
1
1
  import { customElement, property } from 'lit/decorators.js';
2
- import type { DetailedHTMLProps, HTMLAttributes } from 'react';
3
2
 
4
3
  import { Statistics, type StatisticsProps } from '../../preact/statistic/statistics';
5
4
  import type { Equals, Expect } from '../../utils/typeAssertions';
@@ -76,9 +75,9 @@ declare global {
76
75
 
77
76
  declare global {
78
77
  // eslint-disable-next-line @typescript-eslint/no-namespace
79
- namespace JSX {
78
+ namespace React.JSX {
80
79
  interface IntrinsicElements {
81
- 'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
80
+ 'gs-statistics': StatisticsComponent;
82
81
  }
83
82
  }
84
83
  }
@@ -1,6 +1,5 @@
1
1
  import { consume } from '@lit/context';
2
2
  import { customElement, property } from 'lit/decorators.js';
3
- import { type DetailedHTMLProps, type HTMLAttributes } from 'react';
4
3
 
5
4
  import { MutationAnnotationsContextProvider } from '../../preact/MutationAnnotationsContext';
6
5
  import { MutationLinkTemplateContextProvider } from '../../preact/MutationLinkTemplateContext';
@@ -112,9 +111,9 @@ declare global {
112
111
 
113
112
  declare global {
114
113
  // eslint-disable-next-line @typescript-eslint/no-namespace
115
- namespace JSX {
114
+ namespace React.JSX {
116
115
  interface IntrinsicElements {
117
- 'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
116
+ 'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
118
117
  }
119
118
  }
120
119
  }