@genspectrum/dashboard-components 1.5.0 → 1.7.0
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 +4 -0
- package/custom-elements.json +37 -2
- package/dist/{NumberRangeFilterChangedEvent-CQ32Qy8D.js → NumberRangeFilterChangedEvent-BnPI-Asz.js} +17 -3
- package/dist/NumberRangeFilterChangedEvent-BnPI-Asz.js.map +1 -0
- package/dist/assets/{mutationOverTimeWorker-BJ_P2T8Y.js.map → mutationOverTimeWorker-DPS3tmOd.js.map} +1 -1
- package/dist/components.d.ts +50 -29
- package/dist/components.js +155 -61
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +53 -29
- package/dist/util.js +2 -1
- package/package.json +1 -1
- package/src/preact/genomeViewer/CDSPlot.tsx +13 -2
- package/src/preact/genomeViewer/loadGff3.ts +6 -0
- package/src/preact/mutationFilter/mutation-filter-info.tsx +2 -2
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +72 -1
- package/src/preact/mutationFilter/mutation-filter.tsx +75 -37
- package/src/preact/mutationFilter/parseAndValidateMutation.ts +11 -11
- package/src/preact/mutationFilter/parseMutation.spec.ts +32 -22
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +7 -4
- package/src/query/queryMutationsOverTime.ts +1 -1
- package/src/types.ts +17 -1
- package/src/utilEntrypoint.ts +4 -0
- package/src/utils/mutations.spec.ts +32 -0
- package/src/utils/mutations.ts +57 -10
- package/src/web-components/input/gs-mutation-filter.stories.ts +30 -1
- package/src/web-components/input/gs-mutation-filter.tsx +25 -2
- package/standalone-bundle/assets/{mutationOverTimeWorker-CkeGpKWp.js.map → mutationOverTimeWorker-Dp-A14AP.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +8187 -8116
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/dist/NumberRangeFilterChangedEvent-CQ32Qy8D.js.map +0 -1
package/README.md
CHANGED
|
@@ -178,3 +178,7 @@ workers that return mocked data. The mock workers are enabled in the package.jso
|
|
|
178
178
|
Node.js [subpath imports](https://nodejs.org/api/packages.html#subpath-imports), following the guide
|
|
179
179
|
from [storybook](https://storybook.js.org/docs/writing-stories/mocking-data-and-modules/mocking-modules). This ensures
|
|
180
180
|
that when importing the worker in the component, the mock worker is used inside Storybook instead of the real worker.
|
|
181
|
+
|
|
182
|
+
### Exporting types into the final build
|
|
183
|
+
|
|
184
|
+
This project uses `vite build`. The release config is `vite.release.config.ts`. In there, the lib export entrypoints are defined. If you want to export a utility type for your component, re-export it inside of `utilEntrypoint.ts`.
|
package/custom-elements.json
CHANGED
|
@@ -1063,7 +1063,7 @@
|
|
|
1063
1063
|
"type": {
|
|
1064
1064
|
"text": "Meta<MutationFilterProps>"
|
|
1065
1065
|
},
|
|
1066
|
-
"default": "{ title: 'Input/Mutation filter', component: 'gs-mutation-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.mutationFilterChanged, ...previewHandles], }, fetchMock: {}, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { initialValue: { control: { type: 'object', }, }, width: { control: 'text' }, }, tags: ['autodocs'], }"
|
|
1066
|
+
"default": "{ title: 'Input/Mutation filter', component: 'gs-mutation-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.mutationFilterChanged, ...previewHandles], }, fetchMock: {}, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { initialValue: { control: { type: 'object', }, }, width: { control: 'text' }, enabledMutationTypes: { control: { type: 'object', }, }, }, tags: ['autodocs'], }"
|
|
1067
1067
|
},
|
|
1068
1068
|
{
|
|
1069
1069
|
"kind": "variable",
|
|
@@ -1081,6 +1081,14 @@
|
|
|
1081
1081
|
},
|
|
1082
1082
|
"default": "{ ...Template, play: async ({ canvasElement, step }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-filter'); const inputField = () => canvas.getByPlaceholderText('Enter a mutation', { exact: false }); const listenerMock = fn(); await step('Setup event listener mock', () => { canvasElement.addEventListener(gsEventNames.mutationFilterChanged, listenerMock); }); await step('wait until data is loaded', async () => { await waitFor(() => { return expect(inputField()).toBeEnabled(); }); }); await step('Enter a valid mutation', async () => { await userEvent.type(inputField(), 'A123T'); const option = await canvas.findByRole('option'); await userEvent.click(option); await waitFor(() => expect(listenerMock).toHaveBeenCalledWith( expect.objectContaining({ detail: { nucleotideMutations: ['A123T'], aminoAcidMutations: [], nucleotideInsertions: [], aminoAcidInsertions: [], }, }), ), ); }); }, }"
|
|
1083
1083
|
},
|
|
1084
|
+
{
|
|
1085
|
+
"kind": "variable",
|
|
1086
|
+
"name": "RestrictEnabledMutationTypes",
|
|
1087
|
+
"type": {
|
|
1088
|
+
"text": "StoryObj<MutationFilterProps>"
|
|
1089
|
+
},
|
|
1090
|
+
"default": "{ ...Template, args: { ...Template.args, enabledMutationTypes: [mutationType.nucleotideMutations, mutationType.aminoAcidMutations], }, play: async ({ canvasElement }) => { const canvas = await withinShadowRoot(canvasElement, 'gs-mutation-filter'); const inputField = () => canvas.getByPlaceholderText('Enter a mutation', { exact: false }); await waitFor(async () => { const placeholderText = inputField().getAttribute('placeholder'); await expect(placeholderText).toEqual('Enter a mutation (e.g. 23T, E:57Q)'); }); }, }"
|
|
1091
|
+
},
|
|
1084
1092
|
{
|
|
1085
1093
|
"kind": "variable",
|
|
1086
1094
|
"name": "MultiSegmentedReferenceGenomes",
|
|
@@ -1115,6 +1123,14 @@
|
|
|
1115
1123
|
"module": "src/web-components/input/gs-mutation-filter.stories.ts"
|
|
1116
1124
|
}
|
|
1117
1125
|
},
|
|
1126
|
+
{
|
|
1127
|
+
"kind": "js",
|
|
1128
|
+
"name": "RestrictEnabledMutationTypes",
|
|
1129
|
+
"declaration": {
|
|
1130
|
+
"name": "RestrictEnabledMutationTypes",
|
|
1131
|
+
"module": "src/web-components/input/gs-mutation-filter.stories.ts"
|
|
1132
|
+
}
|
|
1133
|
+
},
|
|
1118
1134
|
{
|
|
1119
1135
|
"kind": "js",
|
|
1120
1136
|
"name": "MultiSegmentedReferenceGenomes",
|
|
@@ -1131,7 +1147,7 @@
|
|
|
1131
1147
|
"declarations": [
|
|
1132
1148
|
{
|
|
1133
1149
|
"kind": "class",
|
|
1134
|
-
"description": "## Context\nThis component provides an input field to specify filters for nucleotide and amino acid mutations and insertions.\n\nInput values have to be provided one at a time and submitted by pressing the Enter key or by selecting an option from the dropdown.\nAlternatively, they can be provided as a string of comma-separated values, which will be directly parsed and validated.\nAfter submission (after pressing Enter or pasting a comma-separated string) an event is fired with the selected mutations.\nAll previously selected mutations are displayed at the input field and added to the event.\nUsers can remove a mutation by clicking the 'x' button next to the mutation.\n\n## Input Validation\n\nValidation of the input is performed according to the following rules:\n\n### Mutations\n\nMutations have to conform to the following format: `<gene/segment>:<symbol at reference><position><Substituted symbol/Deletion>`\n- Gene/segment: The gene or segment where the mutation occurs. Must be contained in the reference genome.\n (Optional for elements with only one gene/segment)\n- Symbol at reference: The symbol at the reference position. (Optional)\n- Position: The position of the mutation. (Required)\n- Substituted symbol/Deletion: The substituted symbol or '-' for a deletion. (Required)\n\nExamples: `S:614G`, `614G`, `614-`, `614G`\n\n### Insertions\n\nInsertions have to conform to the following format: `ins_<gene/segment>:<position>:<Inserted symbols>`\n- Gene/segment: The gene or segment where the insertion occurs. Must be contained in the reference genome.\n (Optional for elements with only one gene/segment)\n- Position: The position of the insertion. (Required)\n- Inserted symbols: The symbols that are inserted. (Required)\n\nExamples: `ins_S:614:G`, `ins_614:G`",
|
|
1150
|
+
"description": "## Context\nThis component provides an input field to specify filters for nucleotide and amino acid mutations and insertions.\n\nInput values have to be provided one at a time and submitted by pressing the Enter key or by selecting an option from the dropdown.\nAlternatively, they can be provided as a string of comma-separated values, which will be directly parsed and validated.\nAfter submission (after pressing Enter or pasting a comma-separated string) an event is fired with the selected mutations.\nAll previously selected mutations are displayed at the input field and added to the event.\nUsers can remove a mutation by clicking the 'x' button next to the mutation.\n\n## Input Validation\n\nValidation of the input is performed according to the following rules:\n\n### Mutations\n\nMutations have to conform to the following format: `<gene/segment>:<symbol at reference><position><Substituted symbol/Deletion>`\n- Gene/segment: The gene or segment where the mutation occurs. Must be contained in the reference genome.\n (Optional for elements with only one gene/segment)\n- Symbol at reference: The symbol at the reference position. (Optional)\n- Position: The position of the mutation. (Required)\n- Substituted symbol/Deletion: The substituted symbol or '-' for a deletion. (Required)\n\nExamples: `S:614G`, `614G`, `614-`, `614G`\n\n### Insertions\n\nInsertions have to conform to the following format: `ins_<gene/segment>:<position>:<Inserted symbols>`\n- Gene/segment: The gene or segment where the insertion occurs. Must be contained in the reference genome.\n (Optional for elements with only one gene/segment)\n- Position: The position of the insertion. (Required)\n- Inserted symbols: The symbols that are inserted. (Required)\n\nExamples: `ins_S:614:G`, `ins_614:G`\n\n### Enabled mutation types\n\nAfter parsing, the entered mutation/insertion also has to match the enabled mutation types,\nwhich are configured with the `enabledMutationTypes` attribute.",
|
|
1135
1151
|
"name": "MutationFilterComponent",
|
|
1136
1152
|
"members": [
|
|
1137
1153
|
{
|
|
@@ -1153,6 +1169,16 @@
|
|
|
1153
1169
|
"default": "'100%'",
|
|
1154
1170
|
"description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.",
|
|
1155
1171
|
"attribute": "width"
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
"kind": "field",
|
|
1175
|
+
"name": "enabledMutationTypes",
|
|
1176
|
+
"type": {
|
|
1177
|
+
"text": "MutationType[] | undefined"
|
|
1178
|
+
},
|
|
1179
|
+
"default": "undefined",
|
|
1180
|
+
"description": "Which mutation types this input will accept.\nAny (or all) of the following can be given in a list:\n\n- `nucleotideMutations`\n- `nucleotideInsertions`\n- `aminoAcidMutations`\n- `aminoAcidInsertions`\n\nBy default or if none are given, all types are accepted.",
|
|
1181
|
+
"attribute": "enabledMutationTypes"
|
|
1156
1182
|
}
|
|
1157
1183
|
],
|
|
1158
1184
|
"events": [
|
|
@@ -1182,6 +1208,15 @@
|
|
|
1182
1208
|
"default": "'100%'",
|
|
1183
1209
|
"description": "The width of the component.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-size-of-components--docs for more information.",
|
|
1184
1210
|
"fieldName": "width"
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
"name": "enabledMutationTypes",
|
|
1214
|
+
"type": {
|
|
1215
|
+
"text": "MutationType[] | undefined"
|
|
1216
|
+
},
|
|
1217
|
+
"default": "undefined",
|
|
1218
|
+
"description": "Which mutation types this input will accept.\nAny (or all) of the following can be given in a list:\n\n- `nucleotideMutations`\n- `nucleotideInsertions`\n- `aminoAcidMutations`\n- `aminoAcidInsertions`\n\nBy default or if none are given, all types are accepted.",
|
|
1219
|
+
"fieldName": "enabledMutationTypes"
|
|
1185
1220
|
}
|
|
1186
1221
|
],
|
|
1187
1222
|
"superclass": {
|
package/dist/{NumberRangeFilterChangedEvent-CQ32Qy8D.js → NumberRangeFilterChangedEvent-BnPI-Asz.js}
RENAMED
|
@@ -40,6 +40,18 @@ const views = {
|
|
|
40
40
|
bubble: "bubble",
|
|
41
41
|
map: "map"
|
|
42
42
|
};
|
|
43
|
+
const mutationType = {
|
|
44
|
+
nucleotideMutations: "nucleotideMutations",
|
|
45
|
+
nucleotideInsertions: "nucleotideInsertions",
|
|
46
|
+
aminoAcidMutations: "aminoAcidMutations",
|
|
47
|
+
aminoAcidInsertions: "aminoAcidInsertions"
|
|
48
|
+
};
|
|
49
|
+
const mutationTypeSchema = z.enum([
|
|
50
|
+
mutationType.nucleotideMutations,
|
|
51
|
+
mutationType.nucleotideInsertions,
|
|
52
|
+
mutationType.aminoAcidMutations,
|
|
53
|
+
mutationType.aminoAcidInsertions
|
|
54
|
+
]);
|
|
43
55
|
const toYYYYMMDD = (date) => {
|
|
44
56
|
const options = { year: "numeric", month: "2-digit", day: "2-digit" };
|
|
45
57
|
return date.toLocaleDateString("en-CA", options);
|
|
@@ -182,12 +194,14 @@ export {
|
|
|
182
194
|
toYYYYMMDD as f,
|
|
183
195
|
gsEventNames as g,
|
|
184
196
|
lapisLocationFilterSchema as h,
|
|
185
|
-
|
|
197
|
+
mutationTypeSchema as i,
|
|
198
|
+
mutationsFilterSchema as j,
|
|
199
|
+
numberRangeSchema as k,
|
|
186
200
|
lapisFilterSchema as l,
|
|
187
|
-
|
|
201
|
+
mutationType as m,
|
|
188
202
|
namedLapisFilterSchema as n,
|
|
189
203
|
sequenceTypeSchema as s,
|
|
190
204
|
temporalGranularitySchema as t,
|
|
191
205
|
views as v
|
|
192
206
|
};
|
|
193
|
-
//# sourceMappingURL=NumberRangeFilterChangedEvent-
|
|
207
|
+
//# sourceMappingURL=NumberRangeFilterChangedEvent-BnPI-Asz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberRangeFilterChangedEvent-BnPI-Asz.js","sources":["../src/utils/gsEventNames.ts","../src/types.ts","../src/preact/dateRangeFilter/dateConversion.ts","../src/preact/dateRangeFilter/dateRangeOption.ts","../src/preact/locationFilter/LocationChangedEvent.ts","../src/preact/textFilter/TextFilterChangedEvent.ts","../src/preact/lineageFilter/LineageFilterChangedEvent.ts","../src/preact/numberRangeFilter/NumberRangeFilterChangedEvent.ts"],"sourcesContent":["export const gsEventNames = {\n error: 'gs-error',\n componentFinishedLoading: 'gs-component-finished-loading',\n dateRangeFilterChanged: 'gs-date-range-filter-changed',\n dateRangeOptionChanged: 'gs-date-range-option-changed',\n mutationFilterChanged: 'gs-mutation-filter-changed',\n lineageFilterChanged: 'gs-lineage-filter-changed',\n locationChanged: 'gs-location-changed',\n textFilterChanged: 'gs-text-filter-changed',\n numberRangeFilterChanged: 'gs-number-range-filter-changed',\n numberRangeValueChanged: 'gs-number-range-value-changed',\n} as const;\n","import z from 'zod';\n\nimport {\n type Deletion,\n type DeletionClass,\n type Insertion,\n type InsertionClass,\n type Substitution,\n type SubstitutionClass,\n} from './utils/mutations';\n\nexport const mutationsFilterSchema = z.object({\n nucleotideMutations: z.array(z.string()),\n aminoAcidMutations: z.array(z.string()),\n nucleotideInsertions: z.array(z.string()),\n aminoAcidInsertions: z.array(z.string()),\n});\nexport type MutationsFilter = z.infer<typeof mutationsFilterSchema>;\n\nexport const lapisFilterSchema = z\n .record(z.union([z.string(), z.array(z.string()), z.number(), z.null(), z.boolean(), z.undefined()]))\n .and(mutationsFilterSchema.partial());\nexport type LapisFilter = z.infer<typeof lapisFilterSchema>;\n\nexport const namedLapisFilterSchema = z.object({\n lapisFilter: lapisFilterSchema,\n displayName: z.string(),\n});\nexport type NamedLapisFilter = z.infer<typeof namedLapisFilterSchema>;\n\nexport const lapisLocationFilterSchema = z.record(z.union([z.string(), z.undefined(), z.null()]));\nexport type LapisLocationFilter = z.infer<typeof lapisLocationFilterSchema>;\n\nexport const temporalGranularitySchema = z.union([\n z.literal('day'),\n z.literal('week'),\n z.literal('month'),\n z.literal('year'),\n]);\nexport type TemporalGranularity = z.infer<typeof temporalGranularitySchema>;\n\nexport const sequenceTypeSchema = z.union([z.literal('nucleotide'), z.literal('amino acid')]);\nexport type SequenceType = z.infer<typeof sequenceTypeSchema>;\n\nexport type SubstitutionOrDeletion = 'substitution' | 'deletion';\n\nexport type SubstitutionOrDeletionOrInsertion = SubstitutionOrDeletion | 'insertion';\n\nexport type SubstitutionEntry<T extends Substitution = SubstitutionClass> = {\n type: 'substitution';\n mutation: T;\n count: number;\n proportion: number;\n};\n\nexport type DeletionEntry<T extends Deletion = DeletionClass> = {\n type: 'deletion';\n mutation: T;\n count: number;\n proportion: number;\n};\n\nexport type InsertionEntry<T extends Insertion = InsertionClass> = { type: 'insertion'; mutation: T; count: number };\n\nexport type SubstitutionOrDeletionEntry<\n S extends Substitution = SubstitutionClass,\n D extends Deletion = DeletionClass,\n> = SubstitutionEntry<S> | DeletionEntry<D>;\n\nexport type MutationEntry = SubstitutionEntry | DeletionEntry | InsertionEntry;\n\nexport const views = {\n table: 'table',\n venn: 'venn',\n grid: 'grid',\n insertions: 'insertions',\n bar: 'bar',\n line: 'line',\n bubble: 'bubble',\n map: 'map',\n} as const;\n\nexport const mutationType = {\n nucleotideMutations: 'nucleotideMutations',\n nucleotideInsertions: 'nucleotideInsertions',\n aminoAcidMutations: 'aminoAcidMutations',\n aminoAcidInsertions: 'aminoAcidInsertions',\n} as const;\n\nexport const mutationTypeSchema = z.enum([\n mutationType.nucleotideMutations,\n mutationType.nucleotideInsertions,\n mutationType.aminoAcidMutations,\n mutationType.aminoAcidInsertions,\n]);\n\nexport type MutationType = z.infer<typeof mutationTypeSchema>;\n","export const toYYYYMMDD = (date: Date) => {\n const options: Intl.DateTimeFormatOptions = { year: 'numeric', month: '2-digit', day: '2-digit' };\n return date.toLocaleDateString('en-CA', options);\n};\n","import z from 'zod';\n\nimport { toYYYYMMDD } from './dateConversion';\nimport { gsEventNames } from '../../utils/gsEventNames';\n\n/**\n * A date range option that can be used in the `gs-date-range-filter` component.\n */\nexport const dateRangeOptionSchema = z.object({\n /** The label of the date range option that will be shown to the user */\n label: z.string(),\n /**\n * The start date of the date range in the format `YYYY-MM-DD`.\n */\n dateFrom: z.string().date().optional(),\n /**\n * The end date of the date range in the format `YYYY-MM-DD`.\n */\n dateTo: z.string().date().optional(),\n});\n\nexport type DateRangeOption = z.infer<typeof dateRangeOptionSchema>;\n\nexport const dateRangeValueSchema = z\n .union([\n z.string(),\n z.object({\n dateFrom: z.string().date().optional(),\n dateTo: z.string().date().optional(),\n }),\n ])\n .nullable();\n\nexport type DateRangeValue = z.infer<typeof dateRangeValueSchema>;\n\nexport class DateRangeOptionChangedEvent extends CustomEvent<DateRangeValue> {\n constructor(detail: DateRangeValue) {\n super(gsEventNames.dateRangeOptionChanged, {\n detail,\n bubbles: true,\n composed: true,\n });\n }\n}\n\ntype DateRangeOptionPresets = {\n last2Weeks: DateRangeOption;\n lastMonth: DateRangeOption;\n last2Months: DateRangeOption;\n last3Months: DateRangeOption;\n last6Months: DateRangeOption;\n lastYear: DateRangeOption;\n};\n\nlet dateRangeOptionsPresetsCacheDate: string | null = null;\nlet dateRangeOptionPresetsCache: DateRangeOptionPresets | null = null;\n\n/**\n * Presets for the `gs-date-range-filter` component that can be used as `dateRangeOptions`.\n */\nexport const dateRangeOptionPresets = (): DateRangeOptionPresets => {\n const today = new Date();\n const todayString = new Date().toISOString().slice(0, 10);\n\n if (\n dateRangeOptionPresetsCache === null ||\n dateRangeOptionsPresetsCacheDate === null ||\n dateRangeOptionsPresetsCacheDate !== todayString\n ) {\n dateRangeOptionsPresetsCacheDate = todayString;\n\n const twoWeeksAgo = new Date();\n twoWeeksAgo.setDate(today.getDate() - 14);\n\n const lastMonth = new Date(today);\n lastMonth.setMonth(today.getMonth() - 1);\n\n const last2Months = new Date(today);\n last2Months.setMonth(today.getMonth() - 2);\n\n const last3Months = new Date(today);\n last3Months.setMonth(today.getMonth() - 3);\n\n const last6Months = new Date(today);\n last6Months.setMonth(today.getMonth() - 6);\n\n const lastYear = new Date(today);\n lastYear.setFullYear(today.getFullYear() - 1);\n\n dateRangeOptionPresetsCache = {\n last2Weeks: {\n label: 'Last 2 weeks',\n dateFrom: toYYYYMMDD(twoWeeksAgo),\n },\n lastMonth: {\n label: 'Last month',\n dateFrom: toYYYYMMDD(lastMonth),\n },\n last2Months: {\n label: 'Last 2 months',\n dateFrom: toYYYYMMDD(last2Months),\n },\n last3Months: {\n label: 'Last 3 months',\n dateFrom: toYYYYMMDD(last3Months),\n },\n last6Months: {\n label: 'Last 6 months',\n dateFrom: toYYYYMMDD(last6Months),\n },\n lastYear: {\n label: 'Last year',\n dateFrom: toYYYYMMDD(lastYear),\n },\n };\n }\n\n return dateRangeOptionPresetsCache;\n};\n","import { type LapisLocationFilter } from '../../types';\nimport { gsEventNames } from '../../utils/gsEventNames';\n\nexport class LocationChangedEvent extends CustomEvent<LapisLocationFilter> {\n constructor(detail: LapisLocationFilter) {\n super(gsEventNames.locationChanged, {\n detail,\n bubbles: true,\n composed: true,\n });\n }\n}\n","import { gsEventNames } from '../../utils/gsEventNames';\n\ntype LapisTextFilter = Record<string, string | undefined>;\n\nexport class TextFilterChangedEvent extends CustomEvent<LapisTextFilter> {\n constructor(detail: LapisTextFilter) {\n super(gsEventNames.textFilterChanged, {\n detail,\n bubbles: true,\n composed: true,\n });\n }\n}\n","import { gsEventNames } from '../../utils/gsEventNames';\n\ntype LapisLineageFilter = Record<string, string | undefined>;\n\nexport class LineageFilterChangedEvent extends CustomEvent<LapisLineageFilter> {\n constructor(detail: LapisLineageFilter) {\n super(gsEventNames.lineageFilterChanged, {\n detail,\n bubbles: true,\n composed: true,\n });\n }\n}\n","import z from 'zod';\n\nimport { gsEventNames } from '../../utils/gsEventNames';\n\nexport type LapisNumberFilter = Record<string, number | undefined>;\n\nexport const numberRangeSchema = z.object({\n min: z.number().optional(),\n max: z.number().optional(),\n});\nexport type NumberRange = z.infer<typeof numberRangeSchema>;\n\nexport class NumberRangeValueChangedEvent extends CustomEvent<NumberRange> {\n constructor(detail: NumberRange) {\n super(gsEventNames.numberRangeValueChanged, {\n detail,\n bubbles: true,\n composed: true,\n });\n }\n}\n\nexport class NumberRangeFilterChangedEvent extends CustomEvent<LapisNumberFilter> {\n constructor(detail: LapisNumberFilter) {\n super(gsEventNames.numberRangeFilterChanged, {\n detail,\n bubbles: true,\n composed: true,\n });\n }\n}\n"],"names":[],"mappings":";AAAO,MAAM,eAAe;AAAA,EACxB,OAAO;AAAA,EACP,0BAA0B;AAAA,EAC1B,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,uBAAuB;AAAA,EACvB,sBAAsB;AAAA,EACtB,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,0BAA0B;AAAA,EAC1B,yBAAyB;AAC7B;ACAa,MAAA,wBAAwB,EAAE,OAAO;AAAA,EAC1C,qBAAqB,EAAE,MAAM,EAAE,QAAQ;AAAA,EACvC,oBAAoB,EAAE,MAAM,EAAE,QAAQ;AAAA,EACtC,sBAAsB,EAAE,MAAM,EAAE,QAAQ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