@genspectrum/dashboard-components 0.6.0 → 0.6.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 +189 -1
- package/dist/dashboard-components.js +252 -146
- package/dist/dashboard-components.js.map +1 -1
- package/dist/genspectrum-components.d.ts +57 -0
- package/package.json +1 -1
- package/src/preact/lineageFilter/__mockData__/aggregated.json +14510 -0
- package/src/preact/lineageFilter/fetchLineageAutocompleteList.spec.ts +14 -0
- package/src/preact/lineageFilter/fetchLineageAutocompleteList.ts +9 -0
- package/src/preact/lineageFilter/lineage-filter.stories.tsx +56 -0
- package/src/preact/lineageFilter/lineage-filter.tsx +100 -0
- package/src/preact/numberSequencesOverTime/__mockData__/twoVariantsEG.json +0 -8
- package/src/preact/textInput/text-input.tsx +1 -5
- package/src/web-components/input/gs-lineage-filter.stories.ts +137 -0
- package/src/web-components/input/gs-lineage-filter.tsx +79 -0
- package/src/web-components/input/index.ts +1 -0
- package/src/web-components/visualization/gs-number-sequences-over-time.stories.ts +1 -0
|
@@ -180,6 +180,53 @@ export declare class DateRangeSelectorComponent extends PreactLitAdapter {
|
|
|
180
180
|
|
|
181
181
|
declare type LapisFilter = Record<string, string | number | null | boolean>;
|
|
182
182
|
|
|
183
|
+
/**
|
|
184
|
+
*
|
|
185
|
+
* ## Context
|
|
186
|
+
*
|
|
187
|
+
* This component provides a text input field to filter by lineages.
|
|
188
|
+
* Currently, it is designed to work well with Pango Lineages,
|
|
189
|
+
* but it may also be used for other lineage types, if suitable.
|
|
190
|
+
*
|
|
191
|
+
* It fetches all available values of the `lapisField` from the LAPIS instance
|
|
192
|
+
* and provides an autocomplete list with the available values of the lineage and sublineage queries
|
|
193
|
+
* (a `*` appended to the lineage value).
|
|
194
|
+
*
|
|
195
|
+
* @fires {CustomEvent<Record<string, string>>} gs-lineage-filter-changed
|
|
196
|
+
* Fired when the input field is changed.
|
|
197
|
+
* The `details` of this event contain an object with the `lapisField` as key and the input value as value.
|
|
198
|
+
* Example:
|
|
199
|
+
* ```
|
|
200
|
+
* {
|
|
201
|
+
* "pangoLineage": "B.1.1.7"
|
|
202
|
+
* }
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
export declare class LineageFilterComponent extends PreactLitAdapter {
|
|
206
|
+
/**
|
|
207
|
+
* The initial value to use for this lineage filter.
|
|
208
|
+
*/
|
|
209
|
+
initialValue: string;
|
|
210
|
+
/**
|
|
211
|
+
* Required.
|
|
212
|
+
*
|
|
213
|
+
* The LAPIS field name to use for this lineage filter.
|
|
214
|
+
* The field must exist on this LAPIS instance.
|
|
215
|
+
*/
|
|
216
|
+
lapisField: string;
|
|
217
|
+
/**
|
|
218
|
+
* The placeholder text to display in the input field.
|
|
219
|
+
*/
|
|
220
|
+
placeholderText: string;
|
|
221
|
+
/**
|
|
222
|
+
* The width of the component.
|
|
223
|
+
*
|
|
224
|
+
* Visit https://genspectrum.github.io/dashboard-components/?path=/docs/components-size-of-components--docs for more information.
|
|
225
|
+
*/
|
|
226
|
+
width: string;
|
|
227
|
+
render(): JSX_2.Element;
|
|
228
|
+
}
|
|
229
|
+
|
|
183
230
|
/**
|
|
184
231
|
* ## Context
|
|
185
232
|
*
|
|
@@ -929,6 +976,16 @@ declare global {
|
|
|
929
976
|
}
|
|
930
977
|
|
|
931
978
|
|
|
979
|
+
declare global {
|
|
980
|
+
interface HTMLElementTagNameMap {
|
|
981
|
+
'gs-lineage-filter': LineageFilterComponent;
|
|
982
|
+
}
|
|
983
|
+
interface HTMLElementEventMap {
|
|
984
|
+
'gs-lineage-filter-changed': CustomEvent<Record<string, string>>;
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
|
|
932
989
|
declare module 'chart.js' {
|
|
933
990
|
interface CartesianScaleTypeRegistry {
|
|
934
991
|
logit: {
|