@genspectrum/dashboard-components 0.10.1 → 0.10.2
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 +23 -23
- package/dist/assets/{mutationOverTimeWorker-CvZg52rf.js.map → mutationOverTimeWorker-Di6yP1e6.js.map} +1 -1
- package/dist/components.d.ts +50 -48
- package/dist/components.js +151 -62
- package/dist/components.js.map +1 -1
- package/dist/{utilEntrypoint-g4DsyhU7.js → dateRangeOption-du8H7LWu.js} +33 -2
- package/dist/dateRangeOption-du8H7LWu.js.map +1 -0
- package/dist/util.d.ts +101 -59
- package/dist/util.js +3 -2
- package/package.json +1 -1
- package/src/preact/components/color-scale-selector.tsx +7 -3
- package/src/preact/components/error-boundary.tsx +39 -5
- package/src/preact/components/error-display.tsx +40 -5
- 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/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.tsx +1 -3
- package/src/preact/shared/stories/expectInvalidAttributesErrorMessage.ts +13 -0
- package/src/preact/webWorkers/useWebWorker.ts +8 -4
- package/src/query/queryMutationsOverTime.spec.ts +12 -27
- package/src/query/queryMutationsOverTime.ts +2 -6
- package/src/types.ts +19 -6
- package/src/utilEntrypoint.ts +8 -0
- package/src/utils/map2d.spec.ts +10 -10
- package/src/utils/map2d.ts +10 -10
- 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/visualization/gs-aggregate.tsx +2 -2
- package/standalone-bundle/assets/{mutationOverTimeWorker-CypX_PYM.js.map → mutationOverTimeWorker-cIyshfj_.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +6668 -6580
- package/standalone-bundle/dashboard-components.js.map +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
|
|
|
@@ -1027,7 +1029,11 @@ declare global {
|
|
|
1027
1029
|
|
|
1028
1030
|
declare global {
|
|
1029
1031
|
interface HTMLElementTagNameMap {
|
|
1030
|
-
'gs-
|
|
1032
|
+
'gs-date-range-selector': DateRangeSelectorComponent;
|
|
1033
|
+
}
|
|
1034
|
+
interface HTMLElementEventMap {
|
|
1035
|
+
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
1036
|
+
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
1031
1037
|
}
|
|
1032
1038
|
}
|
|
1033
1039
|
|
|
@@ -1035,7 +1041,7 @@ declare global {
|
|
|
1035
1041
|
declare global {
|
|
1036
1042
|
namespace JSX {
|
|
1037
1043
|
interface IntrinsicElements {
|
|
1038
|
-
'gs-
|
|
1044
|
+
'gs-date-range-selector': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1039
1045
|
}
|
|
1040
1046
|
}
|
|
1041
1047
|
}
|
|
@@ -1043,7 +1049,10 @@ declare global {
|
|
|
1043
1049
|
|
|
1044
1050
|
declare global {
|
|
1045
1051
|
interface HTMLElementTagNameMap {
|
|
1046
|
-
'gs-
|
|
1052
|
+
'gs-location-filter': LocationFilterComponent;
|
|
1053
|
+
}
|
|
1054
|
+
interface HTMLElementEventMap {
|
|
1055
|
+
'gs-location-changed': CustomEvent<Record<string, string>>;
|
|
1047
1056
|
}
|
|
1048
1057
|
}
|
|
1049
1058
|
|
|
@@ -1051,7 +1060,7 @@ declare global {
|
|
|
1051
1060
|
declare global {
|
|
1052
1061
|
namespace JSX {
|
|
1053
1062
|
interface IntrinsicElements {
|
|
1054
|
-
'gs-
|
|
1063
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1055
1064
|
}
|
|
1056
1065
|
}
|
|
1057
1066
|
}
|
|
@@ -1059,7 +1068,10 @@ declare global {
|
|
|
1059
1068
|
|
|
1060
1069
|
declare global {
|
|
1061
1070
|
interface HTMLElementTagNameMap {
|
|
1062
|
-
'gs-
|
|
1071
|
+
'gs-text-input': TextInputComponent;
|
|
1072
|
+
}
|
|
1073
|
+
interface HTMLElementEventMap {
|
|
1074
|
+
'gs-text-input-changed': CustomEvent<Record<string, string>>;
|
|
1063
1075
|
}
|
|
1064
1076
|
}
|
|
1065
1077
|
|
|
@@ -1067,7 +1079,7 @@ declare global {
|
|
|
1067
1079
|
declare global {
|
|
1068
1080
|
namespace JSX {
|
|
1069
1081
|
interface IntrinsicElements {
|
|
1070
|
-
'gs-
|
|
1082
|
+
'gs-text-input': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1071
1083
|
}
|
|
1072
1084
|
}
|
|
1073
1085
|
}
|
|
@@ -1075,7 +1087,10 @@ declare global {
|
|
|
1075
1087
|
|
|
1076
1088
|
declare global {
|
|
1077
1089
|
interface HTMLElementTagNameMap {
|
|
1078
|
-
'gs-
|
|
1090
|
+
'gs-mutation-filter': MutationFilterComponent;
|
|
1091
|
+
}
|
|
1092
|
+
interface HTMLElementEventMap {
|
|
1093
|
+
'gs-mutation-filter-changed': CustomEvent<SelectedMutationFilterStrings>;
|
|
1079
1094
|
}
|
|
1080
1095
|
}
|
|
1081
1096
|
|
|
@@ -1083,7 +1098,7 @@ declare global {
|
|
|
1083
1098
|
declare global {
|
|
1084
1099
|
namespace JSX {
|
|
1085
1100
|
interface IntrinsicElements {
|
|
1086
|
-
'gs-
|
|
1101
|
+
'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1087
1102
|
}
|
|
1088
1103
|
}
|
|
1089
1104
|
}
|
|
@@ -1091,7 +1106,10 @@ declare global {
|
|
|
1091
1106
|
|
|
1092
1107
|
declare global {
|
|
1093
1108
|
interface HTMLElementTagNameMap {
|
|
1094
|
-
'gs-
|
|
1109
|
+
'gs-lineage-filter': LineageFilterComponent;
|
|
1110
|
+
}
|
|
1111
|
+
interface HTMLElementEventMap {
|
|
1112
|
+
'gs-lineage-filter-changed': CustomEvent<Record<string, string>>;
|
|
1095
1113
|
}
|
|
1096
1114
|
}
|
|
1097
1115
|
|
|
@@ -1099,7 +1117,7 @@ declare global {
|
|
|
1099
1117
|
declare global {
|
|
1100
1118
|
namespace JSX {
|
|
1101
1119
|
interface IntrinsicElements {
|
|
1102
|
-
'gs-
|
|
1120
|
+
'gs-lineage-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1103
1121
|
}
|
|
1104
1122
|
}
|
|
1105
1123
|
}
|
|
@@ -1107,7 +1125,7 @@ declare global {
|
|
|
1107
1125
|
|
|
1108
1126
|
declare global {
|
|
1109
1127
|
interface HTMLElementTagNameMap {
|
|
1110
|
-
'gs-
|
|
1128
|
+
'gs-mutation-comparison-component': MutationComparisonComponent;
|
|
1111
1129
|
}
|
|
1112
1130
|
}
|
|
1113
1131
|
|
|
@@ -1115,7 +1133,7 @@ declare global {
|
|
|
1115
1133
|
declare global {
|
|
1116
1134
|
namespace JSX {
|
|
1117
1135
|
interface IntrinsicElements {
|
|
1118
|
-
'gs-
|
|
1136
|
+
'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1119
1137
|
}
|
|
1120
1138
|
}
|
|
1121
1139
|
}
|
|
@@ -1123,7 +1141,7 @@ declare global {
|
|
|
1123
1141
|
|
|
1124
1142
|
declare global {
|
|
1125
1143
|
interface HTMLElementTagNameMap {
|
|
1126
|
-
'gs-mutations-
|
|
1144
|
+
'gs-mutations-component': MutationsComponent;
|
|
1127
1145
|
}
|
|
1128
1146
|
}
|
|
1129
1147
|
|
|
@@ -1131,7 +1149,7 @@ declare global {
|
|
|
1131
1149
|
declare global {
|
|
1132
1150
|
namespace JSX {
|
|
1133
1151
|
interface IntrinsicElements {
|
|
1134
|
-
'gs-mutations-
|
|
1152
|
+
'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1135
1153
|
}
|
|
1136
1154
|
}
|
|
1137
1155
|
}
|
|
@@ -1139,7 +1157,7 @@ declare global {
|
|
|
1139
1157
|
|
|
1140
1158
|
declare global {
|
|
1141
1159
|
interface HTMLElementTagNameMap {
|
|
1142
|
-
'gs-
|
|
1160
|
+
'gs-prevalence-over-time': PrevalenceOverTimeComponent;
|
|
1143
1161
|
}
|
|
1144
1162
|
}
|
|
1145
1163
|
|
|
@@ -1147,7 +1165,7 @@ declare global {
|
|
|
1147
1165
|
declare global {
|
|
1148
1166
|
namespace JSX {
|
|
1149
1167
|
interface IntrinsicElements {
|
|
1150
|
-
'gs-
|
|
1168
|
+
'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1151
1169
|
}
|
|
1152
1170
|
}
|
|
1153
1171
|
}
|
|
@@ -1155,11 +1173,7 @@ declare global {
|
|
|
1155
1173
|
|
|
1156
1174
|
declare global {
|
|
1157
1175
|
interface HTMLElementTagNameMap {
|
|
1158
|
-
'gs-
|
|
1159
|
-
}
|
|
1160
|
-
interface HTMLElementEventMap {
|
|
1161
|
-
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
1162
|
-
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
1176
|
+
'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
|
|
1163
1177
|
}
|
|
1164
1178
|
}
|
|
1165
1179
|
|
|
@@ -1167,7 +1181,7 @@ declare global {
|
|
|
1167
1181
|
declare global {
|
|
1168
1182
|
namespace JSX {
|
|
1169
1183
|
interface IntrinsicElements {
|
|
1170
|
-
'gs-
|
|
1184
|
+
'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1171
1185
|
}
|
|
1172
1186
|
}
|
|
1173
1187
|
}
|
|
@@ -1175,10 +1189,7 @@ declare global {
|
|
|
1175
1189
|
|
|
1176
1190
|
declare global {
|
|
1177
1191
|
interface HTMLElementTagNameMap {
|
|
1178
|
-
'gs-
|
|
1179
|
-
}
|
|
1180
|
-
interface HTMLElementEventMap {
|
|
1181
|
-
'gs-location-changed': CustomEvent<Record<string, string>>;
|
|
1192
|
+
'gs-aggregate': AggregateComponent;
|
|
1182
1193
|
}
|
|
1183
1194
|
}
|
|
1184
1195
|
|
|
@@ -1186,7 +1197,7 @@ declare global {
|
|
|
1186
1197
|
declare global {
|
|
1187
1198
|
namespace JSX {
|
|
1188
1199
|
interface IntrinsicElements {
|
|
1189
|
-
'gs-
|
|
1200
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1190
1201
|
}
|
|
1191
1202
|
}
|
|
1192
1203
|
}
|
|
@@ -1194,10 +1205,7 @@ declare global {
|
|
|
1194
1205
|
|
|
1195
1206
|
declare global {
|
|
1196
1207
|
interface HTMLElementTagNameMap {
|
|
1197
|
-
'gs-
|
|
1198
|
-
}
|
|
1199
|
-
interface HTMLElementEventMap {
|
|
1200
|
-
'gs-text-input-changed': CustomEvent<Record<string, string>>;
|
|
1208
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
1201
1209
|
}
|
|
1202
1210
|
}
|
|
1203
1211
|
|
|
@@ -1205,7 +1213,7 @@ declare global {
|
|
|
1205
1213
|
declare global {
|
|
1206
1214
|
namespace JSX {
|
|
1207
1215
|
interface IntrinsicElements {
|
|
1208
|
-
'gs-
|
|
1216
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1209
1217
|
}
|
|
1210
1218
|
}
|
|
1211
1219
|
}
|
|
@@ -1213,10 +1221,7 @@ declare global {
|
|
|
1213
1221
|
|
|
1214
1222
|
declare global {
|
|
1215
1223
|
interface HTMLElementTagNameMap {
|
|
1216
|
-
'gs-
|
|
1217
|
-
}
|
|
1218
|
-
interface HTMLElementEventMap {
|
|
1219
|
-
'gs-mutation-filter-changed': CustomEvent<SelectedMutationFilterStrings>;
|
|
1224
|
+
'gs-mutations-over-time': MutationsOverTimeComponent;
|
|
1220
1225
|
}
|
|
1221
1226
|
}
|
|
1222
1227
|
|
|
@@ -1224,7 +1229,7 @@ declare global {
|
|
|
1224
1229
|
declare global {
|
|
1225
1230
|
namespace JSX {
|
|
1226
1231
|
interface IntrinsicElements {
|
|
1227
|
-
'gs-
|
|
1232
|
+
'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1228
1233
|
}
|
|
1229
1234
|
}
|
|
1230
1235
|
}
|
|
@@ -1232,10 +1237,7 @@ declare global {
|
|
|
1232
1237
|
|
|
1233
1238
|
declare global {
|
|
1234
1239
|
interface HTMLElementTagNameMap {
|
|
1235
|
-
'gs-
|
|
1236
|
-
}
|
|
1237
|
-
interface HTMLElementEventMap {
|
|
1238
|
-
'gs-lineage-filter-changed': CustomEvent<Record<string, string>>;
|
|
1240
|
+
'gs-statistics': StatisticsComponent;
|
|
1239
1241
|
}
|
|
1240
1242
|
}
|
|
1241
1243
|
|
|
@@ -1243,7 +1245,7 @@ declare global {
|
|
|
1243
1245
|
declare global {
|
|
1244
1246
|
namespace JSX {
|
|
1245
1247
|
interface IntrinsicElements {
|
|
1246
|
-
'gs-
|
|
1248
|
+
'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
1247
1249
|
}
|
|
1248
1250
|
}
|
|
1249
1251
|
}
|