@genspectrum/dashboard-components 1.6.0 → 1.8.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 +82 -1
- package/dist/{NumberRangeFilterChangedEvent-CQ32Qy8D.js → NumberRangeFilterChangedEvent-BnPI-Asz.js} +17 -3
- package/dist/NumberRangeFilterChangedEvent-BnPI-Asz.js.map +1 -0
- package/dist/assets/{mutationOverTimeWorker-BmB6BvVM.js.map → mutationOverTimeWorker-DPS3tmOd.js.map} +1 -1
- package/dist/components.d.ts +52 -25
- package/dist/components.js +209 -75
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +48 -24
- package/dist/util.js +2 -1
- package/package.json +1 -1
- package/src/preact/MutationLinkTemplateContext.tsx +56 -0
- package/src/preact/components/annotated-mutation.stories.tsx +69 -17
- package/src/preact/components/annotated-mutation.tsx +45 -19
- package/src/preact/genomeViewer/CDSPlot.tsx +13 -2
- package/src/preact/genomeViewer/loadGff3.ts +6 -0
- package/src/preact/mutationComparison/mutation-comparison-table.tsx +3 -0
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +2 -1
- package/src/preact/mutationFilter/mutation-filter.tsx +24 -27
- package/src/preact/mutationFilter/parseAndValidateMutation.ts +11 -11
- package/src/preact/mutationFilter/parseMutation.spec.ts +32 -22
- package/src/preact/mutations/mutations-table.tsx +3 -0
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +7 -4
- package/src/preact/shared/stories/expectMutationAnnotation.ts +3 -1
- package/src/types.ts +17 -1
- package/src/utilEntrypoint.ts +4 -0
- package/src/utils/mutations.spec.ts +19 -0
- package/src/utils/mutations.ts +57 -10
- package/src/web-components/gs-app.spec-d.ts +7 -0
- package/src/web-components/gs-app.stories.ts +32 -2
- package/src/web-components/gs-app.ts +17 -0
- package/src/web-components/input/gs-mutation-filter.stories.ts +2 -1
- package/src/web-components/input/gs-mutation-filter.tsx +2 -6
- package/src/web-components/mutation-link-template-context.ts +13 -0
- package/src/web-components/mutationLinks.mdx +27 -0
- package/src/web-components/visualization/gs-mutation-comparison.tsx +18 -8
- package/src/web-components/visualization/gs-mutations-over-time.stories.ts +12 -1
- package/src/web-components/visualization/gs-mutations-over-time.tsx +24 -14
- package/src/web-components/visualization/gs-mutations.tsx +19 -9
- package/src/web-components/wastewaterVisualization/gs-wastewater-mutations-over-time.tsx +17 -7
- package/standalone-bundle/assets/{mutationOverTimeWorker-B_xP8pIC.js.map → mutationOverTimeWorker-Dp-A14AP.js.map} +1 -1
- package/standalone-bundle/dashboard-components.js +7295 -7193
- 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
|
@@ -110,6 +110,14 @@
|
|
|
110
110
|
},
|
|
111
111
|
"default": "{ ...Template, args: { lapis: 'https://url.to.lapis-definitely-not-a-valid-url', }, play: async ({ canvasElement }) => { const canvas = within(canvasElement); await waitFor(async () => { await expect( canvas.getByText('Error in gs-app: Cannot fetch reference genome.', { exact: false }), ).toBeVisible(); }); }, }"
|
|
112
112
|
},
|
|
113
|
+
{
|
|
114
|
+
"kind": "variable",
|
|
115
|
+
"name": "ProvidesMutationLinkTemplateToChildren",
|
|
116
|
+
"type": {
|
|
117
|
+
"text": "StoryObj<StoryProps>"
|
|
118
|
+
},
|
|
119
|
+
"default": "{ ...Template, play: async ({ canvasElement }) => { const canvas = within(canvasElement); await waitFor(async () => { await expect(canvas.getByText('http://foo.com/query?nucMut={{mutation}}', { exact: false })).toBeVisible(); await expect(canvas.getByText('http://foo.com/query?aaMut={{mutation}}', { exact: false })).toBeVisible(); }); }, }"
|
|
120
|
+
},
|
|
113
121
|
{
|
|
114
122
|
"kind": "class",
|
|
115
123
|
"description": "",
|
|
@@ -138,6 +146,14 @@
|
|
|
138
146
|
"text": "MutationAnnotations"
|
|
139
147
|
},
|
|
140
148
|
"default": "[]"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"kind": "field",
|
|
152
|
+
"name": "mutationLinkTemplate",
|
|
153
|
+
"type": {
|
|
154
|
+
"text": "MutationLinkTemplate"
|
|
155
|
+
},
|
|
156
|
+
"default": "{}"
|
|
141
157
|
}
|
|
142
158
|
],
|
|
143
159
|
"superclass": {
|
|
@@ -189,6 +205,14 @@
|
|
|
189
205
|
"module": "src/web-components/gs-app.stories.ts"
|
|
190
206
|
}
|
|
191
207
|
},
|
|
208
|
+
{
|
|
209
|
+
"kind": "js",
|
|
210
|
+
"name": "ProvidesMutationLinkTemplateToChildren",
|
|
211
|
+
"declaration": {
|
|
212
|
+
"name": "ProvidesMutationLinkTemplateToChildren",
|
|
213
|
+
"module": "src/web-components/gs-app.stories.ts"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
192
216
|
{
|
|
193
217
|
"kind": "custom-element-definition",
|
|
194
218
|
"name": "gs-app-display",
|
|
@@ -227,6 +251,16 @@
|
|
|
227
251
|
"default": "[]",
|
|
228
252
|
"description": "Supply lists of mutations that are especially relevant for the current organism.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-mutation-annotations--docs for more information.",
|
|
229
253
|
"attribute": "mutationAnnotations"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"kind": "field",
|
|
257
|
+
"name": "mutationLinkTemplate",
|
|
258
|
+
"type": {
|
|
259
|
+
"text": "{\n nucleotideMutation?: string;\n aminoAcidMutation?: string;\n }"
|
|
260
|
+
},
|
|
261
|
+
"default": "{ nucleotideMutation: undefined, aminoAcidMutation: undefined, }",
|
|
262
|
+
"description": "Supply a link template for nucleotide and amino acid mutations.\nThe template should include '{{mutation}}' where the mutation code will be inserted, for example:\n\n https://my-site.org/query?nucleotideMutation={{mutation}}",
|
|
263
|
+
"attribute": "mutationLinkTemplate"
|
|
230
264
|
}
|
|
231
265
|
],
|
|
232
266
|
"attributes": [
|
|
@@ -247,6 +281,15 @@
|
|
|
247
281
|
"default": "[]",
|
|
248
282
|
"description": "Supply lists of mutations that are especially relevant for the current organism.\n\nVisit https://genspectrum.github.io/dashboard-components/?path=/docs/concepts-mutation-annotations--docs for more information.",
|
|
249
283
|
"fieldName": "mutationAnnotations"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "mutationLinkTemplate",
|
|
287
|
+
"type": {
|
|
288
|
+
"text": "{\n nucleotideMutation?: string;\n aminoAcidMutation?: string;\n }"
|
|
289
|
+
},
|
|
290
|
+
"default": "{ nucleotideMutation: undefined, aminoAcidMutation: undefined, }",
|
|
291
|
+
"description": "Supply a link template for nucleotide and amino acid mutations.\nThe template should include '{{mutation}}' where the mutation code will be inserted, for example:\n\n https://my-site.org/query?nucleotideMutation={{mutation}}",
|
|
292
|
+
"fieldName": "mutationLinkTemplate"
|
|
250
293
|
}
|
|
251
294
|
],
|
|
252
295
|
"superclass": {
|
|
@@ -1087,7 +1130,7 @@
|
|
|
1087
1130
|
"type": {
|
|
1088
1131
|
"text": "StoryObj<MutationFilterProps>"
|
|
1089
1132
|
},
|
|
1090
|
-
"default": "{ ...Template, args: { ...Template.args, enabledMutationTypes: [
|
|
1133
|
+
"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
1134
|
},
|
|
1092
1135
|
{
|
|
1093
1136
|
"kind": "variable",
|
|
@@ -1798,12 +1841,50 @@
|
|
|
1798
1841
|
}
|
|
1799
1842
|
]
|
|
1800
1843
|
},
|
|
1844
|
+
{
|
|
1845
|
+
"kind": "javascript-module",
|
|
1846
|
+
"path": "src/web-components/mutation-link-template-context.ts",
|
|
1847
|
+
"declarations": [
|
|
1848
|
+
{
|
|
1849
|
+
"kind": "variable",
|
|
1850
|
+
"name": "mutationLinkTemplateSchema"
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
"kind": "variable",
|
|
1854
|
+
"name": "mutationLinkTemplateContext"
|
|
1855
|
+
}
|
|
1856
|
+
],
|
|
1857
|
+
"exports": [
|
|
1858
|
+
{
|
|
1859
|
+
"kind": "js",
|
|
1860
|
+
"name": "mutationLinkTemplateSchema",
|
|
1861
|
+
"declaration": {
|
|
1862
|
+
"name": "mutationLinkTemplateSchema",
|
|
1863
|
+
"module": "src/web-components/mutation-link-template-context.ts"
|
|
1864
|
+
}
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
"kind": "js",
|
|
1868
|
+
"name": "mutationLinkTemplateContext",
|
|
1869
|
+
"declaration": {
|
|
1870
|
+
"name": "mutationLinkTemplateContext",
|
|
1871
|
+
"module": "src/web-components/mutation-link-template-context.ts"
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
]
|
|
1875
|
+
},
|
|
1801
1876
|
{
|
|
1802
1877
|
"kind": "javascript-module",
|
|
1803
1878
|
"path": "src/web-components/mutationAnnotations.mdx",
|
|
1804
1879
|
"declarations": [],
|
|
1805
1880
|
"exports": []
|
|
1806
1881
|
},
|
|
1882
|
+
{
|
|
1883
|
+
"kind": "javascript-module",
|
|
1884
|
+
"path": "src/web-components/mutationLinks.mdx",
|
|
1885
|
+
"declarations": [],
|
|
1886
|
+
"exports": []
|
|
1887
|
+
},
|
|
1807
1888
|
{
|
|
1808
1889
|
"kind": "javascript-module",
|
|
1809
1890
|
"path": "src/web-components/reference-genome-context.ts",
|
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;AAAA,EACxC,qBAAqB,EAAE,MAAM,EAAE,OAAQ,CAAA;AAC3C,CAAC;AAGM,MAAM,oBAAoB,EAC5B,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAQ,CAAA,GAAG,EAAE,OAAO,GAAG,EAAE,QAAQ,EAAE,QAAW,GAAA,EAAE,UAAW,CAAA,CAAC,CAAC,EACnG,IAAI,sBAAsB,QAAS,CAAA;AAG3B,MAAA,yBAAyB,EAAE,OAAO;AAAA,EAC3C,aA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