@genspectrum/dashboard-components 0.11.4 → 0.11.6

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 (28) hide show
  1. package/custom-elements.json +54 -3
  2. package/dist/assets/{mutationOverTimeWorker-Cr-NmYEs.js.map → mutationOverTimeWorker-CWneD7i5.js.map} +1 -1
  3. package/dist/components.d.ts +29 -15
  4. package/dist/components.js +184 -55
  5. package/dist/components.js.map +1 -1
  6. package/dist/style.css +5 -5
  7. package/dist/util.d.ts +21 -18
  8. package/package.json +1 -1
  9. package/src/preact/aggregatedData/__mockData__/aggregatedWith1Field.json +399 -0
  10. package/src/preact/aggregatedData/__mockData__/aggregatedWith2Fields.json +1771 -0
  11. package/src/preact/aggregatedData/aggregate-bar-chart.tsx +177 -0
  12. package/src/preact/aggregatedData/aggregate-table.tsx +24 -2
  13. package/src/preact/aggregatedData/aggregate.stories.tsx +61 -2
  14. package/src/preact/aggregatedData/aggregate.tsx +18 -6
  15. package/src/preact/components/tabs.tsx +19 -39
  16. package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +1 -1
  17. package/src/preact/shared/charts/colors.ts +1 -1
  18. package/src/query/queryAggregateData.spec.ts +16 -109
  19. package/src/query/queryAggregateData.ts +2 -12
  20. package/src/query/queryGeneralStatistics.ts +2 -2
  21. package/src/utils/temporal.spec.ts +62 -8
  22. package/src/utils/temporalClass.ts +1 -8
  23. package/src/web-components/visualization/gs-aggregate.stories.ts +90 -20
  24. package/src/web-components/visualization/gs-aggregate.tsx +20 -0
  25. package/standalone-bundle/assets/{mutationOverTimeWorker-DIQRmxvC.js.map → mutationOverTimeWorker-x1ipPFL0.js.map} +1 -1
  26. package/standalone-bundle/dashboard-components.js +3771 -3651
  27. package/standalone-bundle/dashboard-components.js.map +1 -1
  28. package/standalone-bundle/style.css +1 -1
package/dist/style.css CHANGED
@@ -2946,6 +2946,9 @@ input.tab:checked + .tab-content,
2946
2946
  .static {
2947
2947
  position: static;
2948
2948
  }
2949
+ .fixed {
2950
+ position: fixed;
2951
+ }
2949
2952
  .absolute {
2950
2953
  position: absolute;
2951
2954
  }
@@ -3155,9 +3158,6 @@ input.tab:checked + .tab-content,
3155
3158
  .cursor-pointer {
3156
3159
  cursor: pointer;
3157
3160
  }
3158
- .resize {
3159
- resize: both;
3160
- }
3161
3161
  .list-inside {
3162
3162
  list-style-position: inside;
3163
3163
  }
@@ -3194,8 +3194,8 @@ input.tab:checked + .tab-content,
3194
3194
  .gap-y-1 {
3195
3195
  row-gap: 0.25rem;
3196
3196
  }
3197
- .overflow-auto {
3198
- overflow: auto;
3197
+ .overflow-scroll {
3198
+ overflow: scroll;
3199
3199
  }
3200
3200
  .overflow-x-auto {
3201
3201
  overflow-x: auto;
package/dist/util.d.ts CHANGED
@@ -20,12 +20,13 @@ declare const aggregatePropsSchema: default_2.ZodObject<{
20
20
  aminoAcidInsertions?: string[] | undefined;
21
21
  }>>;
22
22
  fields: default_2.ZodArray<default_2.ZodString, "many">;
23
- views: default_2.ZodArray<default_2.ZodLiteral<"table">, "many">;
23
+ views: default_2.ZodArray<default_2.ZodUnion<[default_2.ZodLiteral<"table">, default_2.ZodLiteral<"bar">]>, "many">;
24
24
  initialSortField: default_2.ZodString;
25
25
  initialSortDirection: default_2.ZodUnion<[default_2.ZodLiteral<"ascending">, default_2.ZodLiteral<"descending">]>;
26
26
  pageSize: default_2.ZodUnion<[default_2.ZodBoolean, default_2.ZodNumber]>;
27
27
  width: default_2.ZodString;
28
28
  height: default_2.ZodString;
29
+ maxNumberOfBars: default_2.ZodNumber;
29
30
  }, "strip", default_2.ZodTypeAny, {
30
31
  lapisFilter: Record<string, string | number | boolean | string[] | null | undefined> & {
31
32
  nucleotideMutations?: string[] | undefined;
@@ -37,9 +38,10 @@ declare const aggregatePropsSchema: default_2.ZodObject<{
37
38
  height: string;
38
39
  width: string;
39
40
  pageSize: number | boolean;
40
- views: "table"[];
41
+ views: ("table" | "bar")[];
41
42
  initialSortField: string;
42
43
  initialSortDirection: "ascending" | "descending";
44
+ maxNumberOfBars: number;
43
45
  }, {
44
46
  lapisFilter: Record<string, string | number | boolean | string[] | null | undefined> & {
45
47
  nucleotideMutations?: string[] | undefined;
@@ -51,14 +53,15 @@ declare const aggregatePropsSchema: default_2.ZodObject<{
51
53
  height: string;
52
54
  width: string;
53
55
  pageSize: number | boolean;
54
- views: "table"[];
56
+ views: ("table" | "bar")[];
55
57
  initialSortField: string;
56
58
  initialSortDirection: "ascending" | "descending";
59
+ maxNumberOfBars: number;
57
60
  }>;
58
61
 
59
62
  export declare type AggregateView = default_2.infer<typeof aggregateViewSchema>;
60
63
 
61
- declare const aggregateViewSchema: default_2.ZodLiteral<"table">;
64
+ declare const aggregateViewSchema: default_2.ZodUnion<[default_2.ZodLiteral<"table">, default_2.ZodLiteral<"bar">]>;
62
65
 
63
66
  export declare type AxisMax = default_2.infer<typeof axisMaxSchema>;
64
67
 
@@ -787,7 +790,7 @@ declare global {
787
790
 
788
791
  declare global {
789
792
  interface HTMLElementTagNameMap {
790
- 'gs-mutations-component': MutationsComponent;
793
+ 'gs-mutation-comparison-component': MutationComparisonComponent;
791
794
  }
792
795
  }
793
796
 
@@ -795,7 +798,7 @@ declare global {
795
798
  declare global {
796
799
  namespace JSX {
797
800
  interface IntrinsicElements {
798
- 'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
801
+ 'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
799
802
  }
800
803
  }
801
804
  }
@@ -803,7 +806,7 @@ declare global {
803
806
 
804
807
  declare global {
805
808
  interface HTMLElementTagNameMap {
806
- 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
809
+ 'gs-mutations-component': MutationsComponent;
807
810
  }
808
811
  }
809
812
 
@@ -811,7 +814,7 @@ declare global {
811
814
  declare global {
812
815
  namespace JSX {
813
816
  interface IntrinsicElements {
814
- 'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
817
+ 'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
815
818
  }
816
819
  }
817
820
  }
@@ -819,7 +822,7 @@ declare global {
819
822
 
820
823
  declare global {
821
824
  interface HTMLElementTagNameMap {
822
- 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
825
+ 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
823
826
  }
824
827
  }
825
828
 
@@ -827,7 +830,7 @@ declare global {
827
830
  declare global {
828
831
  namespace JSX {
829
832
  interface IntrinsicElements {
830
- 'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
833
+ 'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
831
834
  }
832
835
  }
833
836
  }
@@ -835,7 +838,7 @@ declare global {
835
838
 
836
839
  declare global {
837
840
  interface HTMLElementTagNameMap {
838
- 'gs-aggregate': AggregateComponent;
841
+ 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
839
842
  }
840
843
  }
841
844
 
@@ -843,7 +846,7 @@ declare global {
843
846
  declare global {
844
847
  namespace JSX {
845
848
  interface IntrinsicElements {
846
- 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
849
+ 'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
847
850
  }
848
851
  }
849
852
  }
@@ -851,7 +854,7 @@ declare global {
851
854
 
852
855
  declare global {
853
856
  interface HTMLElementTagNameMap {
854
- 'gs-mutation-comparison-component': MutationComparisonComponent;
857
+ 'gs-aggregate': AggregateComponent;
855
858
  }
856
859
  }
857
860
 
@@ -859,7 +862,7 @@ declare global {
859
862
  declare global {
860
863
  namespace JSX {
861
864
  interface IntrinsicElements {
862
- 'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
865
+ 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
863
866
  }
864
867
  }
865
868
  }
@@ -883,7 +886,7 @@ declare global {
883
886
 
884
887
  declare global {
885
888
  interface HTMLElementTagNameMap {
886
- 'gs-sequences-by-location': SequencesByLocationComponent;
889
+ 'gs-mutations-over-time': MutationsOverTimeComponent;
887
890
  }
888
891
  }
889
892
 
@@ -891,7 +894,7 @@ declare global {
891
894
  declare global {
892
895
  namespace JSX {
893
896
  interface IntrinsicElements {
894
- 'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
897
+ 'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
895
898
  }
896
899
  }
897
900
  }
@@ -899,7 +902,7 @@ declare global {
899
902
 
900
903
  declare global {
901
904
  interface HTMLElementTagNameMap {
902
- 'gs-mutations-over-time': MutationsOverTimeComponent;
905
+ 'gs-sequences-by-location': SequencesByLocationComponent;
903
906
  }
904
907
  }
905
908
 
@@ -907,7 +910,7 @@ declare global {
907
910
  declare global {
908
911
  namespace JSX {
909
912
  interface IntrinsicElements {
910
- 'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
913
+ 'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
911
914
  }
912
915
  }
913
916
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genspectrum/dashboard-components",
3
- "version": "0.11.4",
3
+ "version": "0.11.6",
4
4
  "description": "GenSpectrum web components for building dashboards",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -0,0 +1,399 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "count": 1793,
5
+ "division": "Virgin Islands"
6
+ },
7
+ {
8
+ "count": 80581,
9
+ "division": "Colorado"
10
+ },
11
+ {
12
+ "count": 5,
13
+ "division": "American Samoa"
14
+ },
15
+ {
16
+ "count": 3462,
17
+ "division": "Northern Mariana Islands"
18
+ },
19
+ {
20
+ "count": 29845,
21
+ "division": "Oklahoma"
22
+ },
23
+ {
24
+ "count": 2582,
25
+ "division": "Wyoming"
26
+ },
27
+ {
28
+ "count": 18733,
29
+ "division": "Kentucky"
30
+ },
31
+ {
32
+ "count": 88,
33
+ "division": "New York City"
34
+ },
35
+ {
36
+ "count": 30814,
37
+ "division": "Arkansas"
38
+ },
39
+ {
40
+ "count": 8932,
41
+ "division": "Maine"
42
+ },
43
+ {
44
+ "count": 10710,
45
+ "division": "Puerto Rico"
46
+ },
47
+ {
48
+ "count": 11354,
49
+ "division": "Kansas"
50
+ },
51
+ {
52
+ "count": 15336,
53
+ "division": "Alaska"
54
+ },
55
+ {
56
+ "count": 1,
57
+ "division": "Sp"
58
+ },
59
+ {
60
+ "count": 12017,
61
+ "division": "Washington DC"
62
+ },
63
+ {
64
+ "count": 27043,
65
+ "division": "Vermont"
66
+ },
67
+ {
68
+ "count": 30166,
69
+ "division": "Nevada"
70
+ },
71
+ {
72
+ "count": 22443,
73
+ "division": "Utah"
74
+ },
75
+ {
76
+ "count": 85817,
77
+ "division": "Pennsylvania"
78
+ },
79
+ {
80
+ "count": 892,
81
+ "division": "Guam"
82
+ },
83
+ {
84
+ "count": 2,
85
+ "division": "Virginia Beach"
86
+ },
87
+ {
88
+ "count": 13808,
89
+ "division": "New Hampshire"
90
+ },
91
+ {
92
+ "count": 9,
93
+ "division": "Fairfax"
94
+ },
95
+ {
96
+ "count": 22914,
97
+ "division": "Rhode Island"
98
+ },
99
+ {
100
+ "count": 78889,
101
+ "division": "Illinois"
102
+ },
103
+ {
104
+ "count": 23674,
105
+ "division": "Nebraska"
106
+ },
107
+ {
108
+ "count": 1,
109
+ "division": "Beltsville"
110
+ },
111
+ {
112
+ "count": 141180,
113
+ "division": "Minnesota"
114
+ },
115
+ {
116
+ "count": 35292,
117
+ "division": "Indiana"
118
+ },
119
+ {
120
+ "count": 8949,
121
+ "division": "Montana"
122
+ },
123
+ {
124
+ "count": 88026,
125
+ "division": "Virginia"
126
+ },
127
+ {
128
+ "count": 199883,
129
+ "division": "Florida"
130
+ },
131
+ {
132
+ "count": 9733,
133
+ "division": "Delaware"
134
+ },
135
+ {
136
+ "count": 1,
137
+ "division": "Fishersville"
138
+ },
139
+ {
140
+ "count": 22250,
141
+ "division": "Louisiana"
142
+ },
143
+ {
144
+ "count": 6,
145
+ "division": "Springfield"
146
+ },
147
+ {
148
+ "count": 2,
149
+ "division": "Afton"
150
+ },
151
+ {
152
+ "count": 1,
153
+ "division": "Mt Solon"
154
+ },
155
+ {
156
+ "count": 27784,
157
+ "division": "Iowa"
158
+ },
159
+ {
160
+ "count": 30026,
161
+ "division": "Connecticut"
162
+ },
163
+ {
164
+ "count": 9255,
165
+ "division": "South Dakota"
166
+ },
167
+ {
168
+ "count": 14,
169
+ "division": "Annandale"
170
+ },
171
+ {
172
+ "count": 2,
173
+ "division": "Burke"
174
+ },
175
+ {
176
+ "count": 124361,
177
+ "division": "New York"
178
+ },
179
+ {
180
+ "count": 36230,
181
+ "division": "West Virginia"
182
+ },
183
+ {
184
+ "count": 11,
185
+ "division": "Falls Church"
186
+ },
187
+ {
188
+ "count": 3,
189
+ "division": "Arlington"
190
+ },
191
+ {
192
+ "count": 3,
193
+ "division": "Louisana"
194
+ },
195
+ {
196
+ "count": 13,
197
+ "division": "Temple"
198
+ },
199
+ {
200
+ "count": 10,
201
+ "division": "Louisiana/Caddo Parish"
202
+ },
203
+ {
204
+ "count": 6,
205
+ "division": "Alexandria"
206
+ },
207
+ {
208
+ "count": 1,
209
+ "division": "Louisiana/Bossier Parish"
210
+ },
211
+ {
212
+ "count": 45448,
213
+ "division": "Wisconsin"
214
+ },
215
+ {
216
+ "count": 2,
217
+ "division": "Un"
218
+ },
219
+ {
220
+ "count": 3,
221
+ "division": "Mclean"
222
+ },
223
+ {
224
+ "count": 6192,
225
+ "division": "Hawaii"
226
+ },
227
+ {
228
+ "count": 142321,
229
+ "division": "Washington"
230
+ },
231
+ {
232
+ "count": 1,
233
+ "division": "Chantilly"
234
+ },
235
+ {
236
+ "count": 2,
237
+ "division": "Crozet"
238
+ },
239
+ {
240
+ "count": 51468,
241
+ "division": "Tennessee"
242
+ },
243
+ {
244
+ "count": 1,
245
+ "division": "Chilhowie"
246
+ },
247
+ {
248
+ "count": 10,
249
+ "division": "Saipan"
250
+ },
251
+ {
252
+ "count": 176243,
253
+ "division": "Massachusetts"
254
+ },
255
+ {
256
+ "count": 1,
257
+ "division": "Fairfax Station"
258
+ },
259
+ {
260
+ "count": 1,
261
+ "division": "Paeonian Springs"
262
+ },
263
+ {
264
+ "count": 7,
265
+ "division": "Waynesboro"
266
+ },
267
+ {
268
+ "count": 765924,
269
+ "division": "USA"
270
+ },
271
+ {
272
+ "count": 5,
273
+ "division": "Louisiana/Webster Parish"
274
+ },
275
+ {
276
+ "count": 1,
277
+ "division": "Harrisonburg"
278
+ },
279
+ {
280
+ "count": 1,
281
+ "division": "Stafford"
282
+ },
283
+ {
284
+ "count": 1,
285
+ "division": "Grottoes"
286
+ },
287
+ {
288
+ "count": 144151,
289
+ "division": "Texas"
290
+ },
291
+ {
292
+ "count": 92995,
293
+ "division": "North Carolina"
294
+ },
295
+ {
296
+ "count": 1,
297
+ "division": "Severn"
298
+ },
299
+ {
300
+ "count": 1,
301
+ "division": "Great Falls"
302
+ },
303
+ {
304
+ "count": 1,
305
+ "division": "Temple Hills"
306
+ },
307
+ {
308
+ "count": 98998,
309
+ "division": "Michigan"
310
+ },
311
+ {
312
+ "count": 1,
313
+ "division": "Chesapeake"
314
+ },
315
+ {
316
+ "count": 386575,
317
+ "division": "California"
318
+ },
319
+ {
320
+ "count": 1,
321
+ "division": "Yap"
322
+ },
323
+ {
324
+ "count": 12380,
325
+ "division": "Mississippi"
326
+ },
327
+ {
328
+ "count": 17575,
329
+ "division": "Alabama"
330
+ },
331
+ {
332
+ "count": 48541,
333
+ "division": "Maryland"
334
+ },
335
+ {
336
+ "count": 1,
337
+ "division": "North America"
338
+ },
339
+ {
340
+ "count": 16034,
341
+ "division": "Idaho"
342
+ },
343
+ {
344
+ "count": 50896,
345
+ "division": "Ohio"
346
+ },
347
+ {
348
+ "count": 75921,
349
+ "division": "Arizona"
350
+ },
351
+ {
352
+ "count": 2394,
353
+ "division": "North Dakota"
354
+ },
355
+ {
356
+ "count": 2,
357
+ "division": "Deleware"
358
+ },
359
+ {
360
+ "count": 47723,
361
+ "division": "New Mexico"
362
+ },
363
+ {
364
+ "count": 35425,
365
+ "division": "South Carolina"
366
+ },
367
+ {
368
+ "count": 26192,
369
+ "division": "Missouri"
370
+ },
371
+ {
372
+ "count": 5,
373
+ "division": "Vienna"
374
+ },
375
+ {
376
+ "count": 1,
377
+ "division": "Woodbridge"
378
+ },
379
+ {
380
+ "count": 104569,
381
+ "division": "New Jersey"
382
+ },
383
+ {
384
+ "count": 70288,
385
+ "division": "Georgia"
386
+ },
387
+ {
388
+ "count": 27269,
389
+ "division": "Oregon"
390
+ }
391
+ ],
392
+ "info": {
393
+ "dataVersion": "1736095391",
394
+ "requestId": "dd98582e-c486-4a0f-9341-d9c4ce78bc9d",
395
+ "requestInfo": "sars_cov-2_nextstrain_open on lapis.cov-spectrum.org at 2025-01-08T10:56:47.562437009",
396
+ "reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report.",
397
+ "lapisVersion": "0.3.10"
398
+ }
399
+ }