@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.
- package/custom-elements.json +54 -3
- package/dist/assets/{mutationOverTimeWorker-Cr-NmYEs.js.map → mutationOverTimeWorker-CWneD7i5.js.map} +1 -1
- package/dist/components.d.ts +29 -15
- package/dist/components.js +184 -55
- package/dist/components.js.map +1 -1
- package/dist/style.css +5 -5
- package/dist/util.d.ts +21 -18
- package/package.json +1 -1
- package/src/preact/aggregatedData/__mockData__/aggregatedWith1Field.json +399 -0
- package/src/preact/aggregatedData/__mockData__/aggregatedWith2Fields.json +1771 -0
- package/src/preact/aggregatedData/aggregate-bar-chart.tsx +177 -0
- package/src/preact/aggregatedData/aggregate-table.tsx +24 -2
- package/src/preact/aggregatedData/aggregate.stories.tsx +61 -2
- package/src/preact/aggregatedData/aggregate.tsx +18 -6
- package/src/preact/components/tabs.tsx +19 -39
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +1 -1
- package/src/preact/shared/charts/colors.ts +1 -1
- package/src/query/queryAggregateData.spec.ts +16 -109
- package/src/query/queryAggregateData.ts +2 -12
- package/src/query/queryGeneralStatistics.ts +2 -2
- package/src/utils/temporal.spec.ts +62 -8
- package/src/utils/temporalClass.ts +1 -8
- package/src/web-components/visualization/gs-aggregate.stories.ts +90 -20
- package/src/web-components/visualization/gs-aggregate.tsx +20 -0
- package/standalone-bundle/assets/{mutationOverTimeWorker-DIQRmxvC.js.map → mutationOverTimeWorker-x1ipPFL0.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +3771 -3651
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
package/dist/components.d.ts
CHANGED
|
@@ -22,6 +22,16 @@ import { TemplateResult } from 'lit-html';
|
|
|
22
22
|
* along with the aggregated value and its proportion.
|
|
23
23
|
* The proportion represents the ratio of the aggregated value to the total count of the data
|
|
24
24
|
* (considering the applied filter).
|
|
25
|
+
*
|
|
26
|
+
* ### Bar Chart View
|
|
27
|
+
*
|
|
28
|
+
* In the bar chart view, the data is presented in vertical bars.
|
|
29
|
+
* The bar chart is supported when `fields` contains one or two entries.
|
|
30
|
+
* The first field will be used as the y-axis.
|
|
31
|
+
* If a second field is provided, it's values will be stacked along the x-axis for each key on the y-axis.
|
|
32
|
+
*
|
|
33
|
+
* The chart shows the bars with the highest aggregated `count`.
|
|
34
|
+
* The number of bars can be adjusted with the `maxNumberOfBars` property.
|
|
25
35
|
*/
|
|
26
36
|
export declare class AggregateComponent extends PreactLitAdapterWithGridJsStyles {
|
|
27
37
|
/**
|
|
@@ -72,12 +82,16 @@ export declare class AggregateComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
72
82
|
* Set to `false` to disable pagination. Set to `true` to enable pagination with a default limit (10).
|
|
73
83
|
*/
|
|
74
84
|
pageSize: boolean | number;
|
|
85
|
+
/**
|
|
86
|
+
* The maximum number of bars to display in the bar chart view.
|
|
87
|
+
*/
|
|
88
|
+
maxNumberOfBars: number;
|
|
75
89
|
render(): JSX_2.Element;
|
|
76
90
|
}
|
|
77
91
|
|
|
78
92
|
declare type AggregateView = default_2.infer<typeof aggregateViewSchema>;
|
|
79
93
|
|
|
80
|
-
declare const aggregateViewSchema: default_2.ZodLiteral<"table">;
|
|
94
|
+
declare const aggregateViewSchema: default_2.ZodUnion<[default_2.ZodLiteral<"table">, default_2.ZodLiteral<"bar">]>;
|
|
81
95
|
|
|
82
96
|
/**
|
|
83
97
|
* ## Context
|
|
@@ -1221,7 +1235,7 @@ declare global {
|
|
|
1221
1235
|
|
|
1222
1236
|
declare global {
|
|
1223
1237
|
interface HTMLElementTagNameMap {
|
|
1224
|
-
'gs-
|
|
1238
|
+
'gs-mutation-comparison-component': MutationComparisonComponent;
|
|
1225
1239
|
}
|
|
1226
1240
|
}
|
|
1227
1241
|
|
|
@@ -1229,7 +1243,7 @@ declare global {
|
|
|
1229
1243
|
declare global {
|
|
1230
1244
|
namespace JSX {
|
|
1231
1245
|
interface IntrinsicElements {
|
|
1232
|
-
'gs-
|
|
1246
|
+
'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1233
1247
|
}
|
|
1234
1248
|
}
|
|
1235
1249
|
}
|
|
@@ -1237,7 +1251,7 @@ declare global {
|
|
|
1237
1251
|
|
|
1238
1252
|
declare global {
|
|
1239
1253
|
interface HTMLElementTagNameMap {
|
|
1240
|
-
'gs-
|
|
1254
|
+
'gs-mutations-component': MutationsComponent;
|
|
1241
1255
|
}
|
|
1242
1256
|
}
|
|
1243
1257
|
|
|
@@ -1245,7 +1259,7 @@ declare global {
|
|
|
1245
1259
|
declare global {
|
|
1246
1260
|
namespace JSX {
|
|
1247
1261
|
interface IntrinsicElements {
|
|
1248
|
-
'gs-
|
|
1262
|
+
'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1249
1263
|
}
|
|
1250
1264
|
}
|
|
1251
1265
|
}
|
|
@@ -1253,7 +1267,7 @@ declare global {
|
|
|
1253
1267
|
|
|
1254
1268
|
declare global {
|
|
1255
1269
|
interface HTMLElementTagNameMap {
|
|
1256
|
-
'gs-
|
|
1270
|
+
'gs-prevalence-over-time': PrevalenceOverTimeComponent;
|
|
1257
1271
|
}
|
|
1258
1272
|
}
|
|
1259
1273
|
|
|
@@ -1261,7 +1275,7 @@ declare global {
|
|
|
1261
1275
|
declare global {
|
|
1262
1276
|
namespace JSX {
|
|
1263
1277
|
interface IntrinsicElements {
|
|
1264
|
-
'gs-
|
|
1278
|
+
'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1265
1279
|
}
|
|
1266
1280
|
}
|
|
1267
1281
|
}
|
|
@@ -1269,7 +1283,7 @@ declare global {
|
|
|
1269
1283
|
|
|
1270
1284
|
declare global {
|
|
1271
1285
|
interface HTMLElementTagNameMap {
|
|
1272
|
-
'gs-
|
|
1286
|
+
'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
|
|
1273
1287
|
}
|
|
1274
1288
|
}
|
|
1275
1289
|
|
|
@@ -1277,7 +1291,7 @@ declare global {
|
|
|
1277
1291
|
declare global {
|
|
1278
1292
|
namespace JSX {
|
|
1279
1293
|
interface IntrinsicElements {
|
|
1280
|
-
'gs-
|
|
1294
|
+
'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1281
1295
|
}
|
|
1282
1296
|
}
|
|
1283
1297
|
}
|
|
@@ -1285,7 +1299,7 @@ declare global {
|
|
|
1285
1299
|
|
|
1286
1300
|
declare global {
|
|
1287
1301
|
interface HTMLElementTagNameMap {
|
|
1288
|
-
'gs-
|
|
1302
|
+
'gs-aggregate': AggregateComponent;
|
|
1289
1303
|
}
|
|
1290
1304
|
}
|
|
1291
1305
|
|
|
@@ -1293,7 +1307,7 @@ declare global {
|
|
|
1293
1307
|
declare global {
|
|
1294
1308
|
namespace JSX {
|
|
1295
1309
|
interface IntrinsicElements {
|
|
1296
|
-
'gs-
|
|
1310
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1297
1311
|
}
|
|
1298
1312
|
}
|
|
1299
1313
|
}
|
|
@@ -1317,7 +1331,7 @@ declare global {
|
|
|
1317
1331
|
|
|
1318
1332
|
declare global {
|
|
1319
1333
|
interface HTMLElementTagNameMap {
|
|
1320
|
-
'gs-
|
|
1334
|
+
'gs-mutations-over-time': MutationsOverTimeComponent;
|
|
1321
1335
|
}
|
|
1322
1336
|
}
|
|
1323
1337
|
|
|
@@ -1325,7 +1339,7 @@ declare global {
|
|
|
1325
1339
|
declare global {
|
|
1326
1340
|
namespace JSX {
|
|
1327
1341
|
interface IntrinsicElements {
|
|
1328
|
-
'gs-
|
|
1342
|
+
'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1329
1343
|
}
|
|
1330
1344
|
}
|
|
1331
1345
|
}
|
|
@@ -1333,7 +1347,7 @@ declare global {
|
|
|
1333
1347
|
|
|
1334
1348
|
declare global {
|
|
1335
1349
|
interface HTMLElementTagNameMap {
|
|
1336
|
-
'gs-
|
|
1350
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
1337
1351
|
}
|
|
1338
1352
|
}
|
|
1339
1353
|
|
|
@@ -1341,7 +1355,7 @@ declare global {
|
|
|
1341
1355
|
declare global {
|
|
1342
1356
|
namespace JSX {
|
|
1343
1357
|
interface IntrinsicElements {
|
|
1344
|
-
'gs-
|
|
1358
|
+
'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1345
1359
|
}
|
|
1346
1360
|
}
|
|
1347
1361
|
}
|