@genspectrum/dashboard-components 0.6.1 → 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.
@@ -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,15 +976,6 @@ declare global {
929
976
  }
930
977
 
931
978
 
932
- declare module 'chart.js' {
933
- interface CartesianScaleTypeRegistry {
934
- logit: {
935
- options: CoreScaleOptions;
936
- };
937
- }
938
- }
939
-
940
-
941
979
  declare global {
942
980
  interface HTMLElementTagNameMap {
943
981
  'gs-lineage-filter': LineageFilterComponent;
@@ -947,3 +985,12 @@ declare global {
947
985
  }
948
986
  }
949
987
 
988
+
989
+ declare module 'chart.js' {
990
+ interface CartesianScaleTypeRegistry {
991
+ logit: {
992
+ options: CoreScaleOptions;
993
+ };
994
+ }
995
+ }
996
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genspectrum/dashboard-components",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "GenSpectrum web components for building dashboards",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -2,3 +2,4 @@ export { DateRangeSelectorComponent } from './gs-date-range-selector';
2
2
  export { LocationFilterComponent } from './gs-location-filter';
3
3
  export { TextInputComponent } from './gs-text-input';
4
4
  export { MutationFilterComponent } from './gs-mutation-filter';
5
+ export { LineageFilterComponent } from './gs-lineage-filter';