@genspectrum/dashboard-components 0.10.1 → 0.10.3
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/README.md +19 -19
- package/custom-elements.json +72 -56
- package/dist/assets/{mutationOverTimeWorker-CvZg52rf.js.map → mutationOverTimeWorker-CNg_ztNp.js.map} +1 -1
- package/dist/components.d.ts +19 -28
- package/dist/components.js +343 -96
- package/dist/components.js.map +1 -1
- package/dist/{utilEntrypoint-g4DsyhU7.js → dateRangeOption-DjtcAEWq.js} +46 -2
- package/dist/dateRangeOption-DjtcAEWq.js.map +1 -0
- package/dist/style.css +11 -5
- package/dist/util.d.ts +112 -21
- package/dist/util.js +3 -2
- package/package.json +2 -2
- package/src/preact/aggregatedData/aggregate.stories.tsx +14 -0
- package/src/preact/aggregatedData/aggregate.tsx +17 -15
- package/src/preact/components/color-scale-selector.tsx +7 -3
- package/src/preact/components/error-boundary.stories.tsx +24 -3
- package/src/preact/components/error-boundary.tsx +38 -5
- package/src/preact/components/error-display.tsx +62 -6
- package/src/preact/components/tabs.tsx +2 -2
- package/src/preact/dateRangeSelector/computeInitialValues.spec.ts +8 -2
- package/src/preact/dateRangeSelector/computeInitialValues.ts +6 -0
- package/src/preact/dateRangeSelector/date-range-selector.stories.tsx +16 -2
- package/src/preact/dateRangeSelector/date-range-selector.tsx +20 -15
- package/src/preact/dateRangeSelector/dateRangeOption.ts +10 -5
- package/src/preact/lineageFilter/lineage-filter.stories.tsx +18 -4
- package/src/preact/lineageFilter/lineage-filter.tsx +15 -10
- package/src/preact/locationFilter/location-filter.stories.tsx +14 -0
- package/src/preact/locationFilter/location-filter.tsx +15 -10
- package/src/preact/mutationComparison/mutation-comparison-venn.tsx +17 -18
- package/src/preact/mutationComparison/mutation-comparison.tsx +18 -12
- package/src/preact/mutationFilter/mutation-filter.tsx +26 -13
- package/src/preact/mutations/mutations.tsx +16 -12
- package/src/preact/mutationsOverTime/__mockData__/aminoAcidMutationsByDay.ts +1326 -9341
- package/src/preact/mutationsOverTime/__mockData__/byWeek.ts +615 -4920
- package/src/preact/mutationsOverTime/__mockData__/defaultMockData.ts +2203 -17624
- package/src/preact/mutationsOverTime/mutations-over-time-grid.tsx +16 -8
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +14 -0
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +19 -17
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +14 -0
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +22 -14
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +14 -0
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +28 -19
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +14 -0
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +18 -15
- package/src/preact/shared/charts/confideceInterval.ts +10 -8
- package/src/preact/shared/charts/getYAxisMax.ts +10 -5
- package/src/preact/shared/stories/expectInvalidAttributesErrorMessage.ts +13 -0
- package/src/preact/statistic/statistics.tsx +10 -8
- package/src/preact/textInput/text-input.stories.tsx +14 -0
- package/src/preact/textInput/text-input.tsx +16 -11
- package/src/preact/webWorkers/useWebWorker.ts +8 -4
- package/src/query/queryAggregateData.ts +2 -1
- package/src/query/queryMutationsOverTime.spec.ts +12 -27
- package/src/query/queryMutationsOverTime.ts +2 -6
- package/src/types.ts +31 -7
- package/src/utilEntrypoint.ts +15 -0
- package/src/utils/map2d.spec.ts +10 -10
- package/src/utils/map2d.ts +10 -10
- package/src/web-components/app.stories.ts +17 -2
- package/src/web-components/app.ts +17 -5
- package/src/web-components/input/gs-date-range-selector.stories.ts +2 -2
- package/src/web-components/input/gs-date-range-selector.tsx +3 -3
- package/src/web-components/input/gs-lineage-filter.tsx +1 -1
- package/src/web-components/input/gs-location-filter.tsx +2 -2
- package/src/web-components/input/gs-mutation-filter.stories.ts +2 -0
- package/src/web-components/input/gs-text-input.tsx +2 -2
- package/src/web-components/introduction.mdx +4 -4
- package/src/web-components/visualization/data_visualization_statistical_analysis.mdx +3 -3
- package/src/web-components/visualization/gs-aggregate.tsx +2 -2
- package/src/web-components/visualization/gs-mutations-over-time.tsx +1 -3
- package/src/web-components/visualization/gs-mutations.tsx +1 -3
- package/src/web-components/visualization/gs-number-sequences-over-time.tsx +1 -3
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +3 -6
- package/src/web-components/visualization/gs-relative-growth-advantage.tsx +1 -5
- package/standalone-bundle/assets/{mutationOverTimeWorker-CypX_PYM.js.map → mutationOverTimeWorker-cIyshfj_.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +8800 -8577
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/dist/utilEntrypoint-g4DsyhU7.js.map +0 -1
package/dist/components.d.ts
CHANGED
|
@@ -173,13 +173,13 @@ export declare class DateRangeSelectorComponent extends PreactLitAdapter {
|
|
|
173
173
|
* If set, the date range selector will be initialized with the given date (overwriting `initialValue` to `custom`).
|
|
174
174
|
* If `initialDateTo` is set, but this is unset, it will default to `earliestDate`.
|
|
175
175
|
*/
|
|
176
|
-
initialDateFrom: string;
|
|
176
|
+
initialDateFrom: string | undefined;
|
|
177
177
|
/**
|
|
178
178
|
* A date string in the format `YYYY-MM-DD`.
|
|
179
179
|
* If set, the date range selector will be initialized with the given date (overwriting `initialValue` to `custom`).
|
|
180
180
|
* If `initialDateFrom` is set, but this is unset, it will default to the current date.
|
|
181
181
|
*/
|
|
182
|
-
initialDateTo: string;
|
|
182
|
+
initialDateTo: string | undefined;
|
|
183
183
|
/**
|
|
184
184
|
* The width of the component.
|
|
185
185
|
*
|
|
@@ -199,7 +199,9 @@ declare class ErrorEvent_2 extends Event {
|
|
|
199
199
|
}
|
|
200
200
|
export { ErrorEvent_2 as ErrorEvent }
|
|
201
201
|
|
|
202
|
-
declare type LapisFilter =
|
|
202
|
+
declare type LapisFilter = default_2.infer<typeof lapisFilterSchema>;
|
|
203
|
+
|
|
204
|
+
declare const lapisFilterSchema: default_2.ZodRecord<default_2.ZodString, default_2.ZodUnion<[default_2.ZodString, default_2.ZodNumber, default_2.ZodNull, default_2.ZodBoolean]>>;
|
|
203
205
|
|
|
204
206
|
/**
|
|
205
207
|
*
|
|
@@ -238,7 +240,7 @@ export declare class LineageFilterComponent extends PreactLitAdapter {
|
|
|
238
240
|
/**
|
|
239
241
|
* The placeholder text to display in the input field.
|
|
240
242
|
*/
|
|
241
|
-
placeholderText: string;
|
|
243
|
+
placeholderText: string | undefined;
|
|
242
244
|
/**
|
|
243
245
|
* The width of the component.
|
|
244
246
|
*
|
|
@@ -281,7 +283,7 @@ export declare class LocationFilterComponent extends PreactLitAdapter {
|
|
|
281
283
|
* The initial value to use for this location filter.
|
|
282
284
|
* Must be of the form `valueForField1 / valueForField2 / ... / valueForFieldN`.
|
|
283
285
|
*/
|
|
284
|
-
initialValue: string;
|
|
286
|
+
initialValue: string | undefined;
|
|
285
287
|
/**
|
|
286
288
|
* Required.
|
|
287
289
|
*
|
|
@@ -300,7 +302,7 @@ export declare class LocationFilterComponent extends PreactLitAdapter {
|
|
|
300
302
|
/**
|
|
301
303
|
* The placeholder text to display in the input field, if it is empty.
|
|
302
304
|
*/
|
|
303
|
-
placeholderText: string;
|
|
305
|
+
placeholderText: string | undefined;
|
|
304
306
|
render(): JSX_2.Element;
|
|
305
307
|
}
|
|
306
308
|
|
|
@@ -467,9 +469,7 @@ export declare class MutationFilterComponent extends PreactLitAdapter {
|
|
|
467
469
|
*/
|
|
468
470
|
export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles {
|
|
469
471
|
/**
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
* LAPIS filter to select the displayed data.
|
|
472
|
+
* LAPIS filter to select the displayed data. If not provided, all data is displayed.
|
|
473
473
|
*/
|
|
474
474
|
lapisFilter: Record<string, string | number | null | boolean>;
|
|
475
475
|
/**
|
|
@@ -527,9 +527,7 @@ export declare class MutationsComponent extends PreactLitAdapterWithGridJsStyles
|
|
|
527
527
|
*/
|
|
528
528
|
export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
|
|
529
529
|
/**
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
* LAPIS filter to select the displayed data.
|
|
530
|
+
* LAPIS filter to select the displayed data. If not provided, all data is displayed.
|
|
533
531
|
*/
|
|
534
532
|
lapisFilter: Record<string, string | number | null | boolean>;
|
|
535
533
|
/**
|
|
@@ -581,8 +579,6 @@ export declare class MutationsOverTimeComponent extends PreactLitAdapterWithGrid
|
|
|
581
579
|
*/
|
|
582
580
|
export declare class NumberSequencesOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
|
|
583
581
|
/**
|
|
584
|
-
* Required.
|
|
585
|
-
*
|
|
586
582
|
* Either a LAPIS filter or an array of LAPIS filters to fetch the number of sequences for.
|
|
587
583
|
*
|
|
588
584
|
* The `lapisFilter` will be sent as is to LAPIS to select the data.
|
|
@@ -695,7 +691,6 @@ declare abstract class PreactLitAdapterWithGridJsStyles extends PreactLitAdapter
|
|
|
695
691
|
*/
|
|
696
692
|
export declare class PrevalenceOverTimeComponent extends PreactLitAdapterWithGridJsStyles {
|
|
697
693
|
/**
|
|
698
|
-
* Required.
|
|
699
694
|
* Either a LAPIS filter or an array of LAPIS filters to calculate the prevalence for.
|
|
700
695
|
*
|
|
701
696
|
* The `lapisFilter` will be sent as is to LAPIS to select the data.
|
|
@@ -713,8 +708,6 @@ export declare class PrevalenceOverTimeComponent extends PreactLitAdapterWithGri
|
|
|
713
708
|
displayName: string;
|
|
714
709
|
}[];
|
|
715
710
|
/**
|
|
716
|
-
* Required.
|
|
717
|
-
*
|
|
718
711
|
* The LAPIS filter, to select the data of the reference.
|
|
719
712
|
* It must be a valid LAPIS filter object.
|
|
720
713
|
*/
|
|
@@ -858,15 +851,11 @@ declare const referenceGenomeResponse: default_2.ZodObject<{
|
|
|
858
851
|
*/
|
|
859
852
|
export declare class RelativeGrowthAdvantageComponent extends PreactLitAdapter {
|
|
860
853
|
/**
|
|
861
|
-
* Required.
|
|
862
|
-
*
|
|
863
854
|
* LAPIS filter to select the data of the focal variant.
|
|
864
855
|
* It must be a valid LAPIS filter object.
|
|
865
856
|
*/
|
|
866
857
|
numeratorFilter: Record<string, string | number | null | boolean>;
|
|
867
858
|
/**
|
|
868
|
-
* Required.
|
|
869
|
-
*
|
|
870
859
|
* LAPIS filter to select the data of the baseline variant.
|
|
871
860
|
* It must be a valid LAPIS filter object.
|
|
872
861
|
*/
|
|
@@ -971,7 +960,7 @@ export declare class TextInputComponent extends PreactLitAdapter {
|
|
|
971
960
|
/**
|
|
972
961
|
* The initial value to use for this text input.
|
|
973
962
|
*/
|
|
974
|
-
initialValue: string;
|
|
963
|
+
initialValue: string | undefined;
|
|
975
964
|
/**
|
|
976
965
|
* Required.
|
|
977
966
|
*
|
|
@@ -982,7 +971,7 @@ export declare class TextInputComponent extends PreactLitAdapter {
|
|
|
982
971
|
/**
|
|
983
972
|
* The placeholder text to display in the input field.
|
|
984
973
|
*/
|
|
985
|
-
placeholderText: string;
|
|
974
|
+
placeholderText: string | undefined;
|
|
986
975
|
/**
|
|
987
976
|
* The width of the component.
|
|
988
977
|
*
|
|
@@ -997,7 +986,9 @@ export declare class UserFacingError extends Error {
|
|
|
997
986
|
constructor(headline: string, message: string);
|
|
998
987
|
}
|
|
999
988
|
|
|
1000
|
-
declare type View =
|
|
989
|
+
declare type View = default_2.infer<typeof viewSchema>;
|
|
990
|
+
|
|
991
|
+
declare const viewSchema: default_2.ZodLiteral<"table">;
|
|
1001
992
|
|
|
1002
993
|
export { }
|
|
1003
994
|
|
|
@@ -1091,7 +1082,7 @@ declare global {
|
|
|
1091
1082
|
|
|
1092
1083
|
declare global {
|
|
1093
1084
|
interface HTMLElementTagNameMap {
|
|
1094
|
-
'gs-
|
|
1085
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
1095
1086
|
}
|
|
1096
1087
|
}
|
|
1097
1088
|
|
|
@@ -1099,7 +1090,7 @@ declare global {
|
|
|
1099
1090
|
declare global {
|
|
1100
1091
|
namespace JSX {
|
|
1101
1092
|
interface IntrinsicElements {
|
|
1102
|
-
'gs-
|
|
1093
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1103
1094
|
}
|
|
1104
1095
|
}
|
|
1105
1096
|
}
|
|
@@ -1107,7 +1098,7 @@ declare global {
|
|
|
1107
1098
|
|
|
1108
1099
|
declare global {
|
|
1109
1100
|
interface HTMLElementTagNameMap {
|
|
1110
|
-
'gs-
|
|
1101
|
+
'gs-aggregate': AggregateComponent;
|
|
1111
1102
|
}
|
|
1112
1103
|
}
|
|
1113
1104
|
|
|
@@ -1115,7 +1106,7 @@ declare global {
|
|
|
1115
1106
|
declare global {
|
|
1116
1107
|
namespace JSX {
|
|
1117
1108
|
interface IntrinsicElements {
|
|
1118
|
-
'gs-
|
|
1109
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1119
1110
|
}
|
|
1120
1111
|
}
|
|
1121
1112
|
}
|