@genspectrum/dashboard-components 0.19.9 → 0.20.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.
@@ -325,7 +325,7 @@
325
325
  "type": {
326
326
  "text": "Meta<Required<DateRangeFilterProps>>"
327
327
  },
328
- "default": "{ title: 'Input/DateRangeFilter', component: 'gs-date-range-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.dateRangeFilterChanged, gsEventNames.dateRangeOptionChanged, ...previewHandles], }, fetchMock: {}, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { value: { control: { type: 'object' }, }, lapisDateField: { control: { type: 'text' } }, dateRangeOptions: { control: { type: 'object' }, }, earliestDate: { control: { type: 'text' }, }, width: { control: { type: 'text' }, }, placeholder: { control: { type: 'text' }, }, }, args: { dateRangeOptions: [ dateRangeOptionPresets.lastMonth, dateRangeOptionPresets.last3Months, dateRangeOptionPresets.allTimes, { label: '2021', dateFrom: '2021-01-01', dateTo: '2021-12-31' }, customDateRange, ], earliestDate: '1970-01-01', value: dateRangeOptionPresets.lastMonth.label, lapisDateField: 'aDateColumn', width: '100%', placeholder: 'Date range', }, tags: ['autodocs'], }"
328
+ "default": "{ title: 'Input/DateRangeFilter', component: 'gs-date-range-filter', parameters: withComponentDocs({ actions: { handles: [gsEventNames.dateRangeFilterChanged, gsEventNames.dateRangeOptionChanged, ...previewHandles], }, fetchMock: {}, componentDocs: { opensShadowDom: true, expectsChildren: false, codeExample, }, }), argTypes: { value: { control: { type: 'object' }, }, lapisDateField: { control: { type: 'text' } }, dateRangeOptions: { control: { type: 'object' }, }, earliestDate: { control: { type: 'text' }, }, width: { control: { type: 'text' }, }, placeholder: { control: { type: 'text' }, }, }, args: { dateRangeOptions: [ dateRangeOptionPresets().lastMonth, dateRangeOptionPresets().last3Months, dateRangeOptionPresets().allTimes, { label: '2021', dateFrom: '2021-01-01', dateTo: '2021-12-31' }, customDateRange, ], earliestDate: '1970-01-01', value: dateRangeOptionPresets().lastMonth.label, lapisDateField: 'aDateColumn', width: '100%', placeholder: 'Date range', }, tags: ['autodocs'], }"
329
329
  },
330
330
  {
331
331
  "kind": "variable",
@@ -74,47 +74,56 @@ class DateRangeOptionChangedEvent extends CustomEvent {
74
74
  });
75
75
  }
76
76
  }
77
- const today = /* @__PURE__ */ new Date();
78
- const twoWeeksAgo = /* @__PURE__ */ new Date();
79
- twoWeeksAgo.setDate(today.getDate() - 14);
80
- const lastMonth = new Date(today);
81
- lastMonth.setMonth(today.getMonth() - 1);
82
- const last2Months = new Date(today);
83
- last2Months.setMonth(today.getMonth() - 2);
84
- const last3Months = new Date(today);
85
- last3Months.setMonth(today.getMonth() - 3);
86
- const last6Months = new Date(today);
87
- last6Months.setMonth(today.getMonth() - 6);
88
- const lastYear = new Date(today);
89
- lastYear.setFullYear(today.getFullYear() - 1);
90
- const dateRangeOptionPresets = {
91
- last2Weeks: {
92
- label: "Last 2 weeks",
93
- dateFrom: toYYYYMMDD(twoWeeksAgo)
94
- },
95
- lastMonth: {
96
- label: "Last month",
97
- dateFrom: toYYYYMMDD(lastMonth)
98
- },
99
- last2Months: {
100
- label: "Last 2 months",
101
- dateFrom: toYYYYMMDD(last2Months)
102
- },
103
- last3Months: {
104
- label: "Last 3 months",
105
- dateFrom: toYYYYMMDD(last3Months)
106
- },
107
- last6Months: {
108
- label: "Last 6 months",
109
- dateFrom: toYYYYMMDD(last6Months)
110
- },
111
- lastYear: {
112
- label: "Last year",
113
- dateFrom: toYYYYMMDD(lastYear)
114
- },
115
- allTimes: {
116
- label: "All times"
77
+ let dateRangeOptionsPresetsCacheDate = null;
78
+ let dateRangeOptionPresetsCache = null;
79
+ const dateRangeOptionPresets = () => {
80
+ const today = /* @__PURE__ */ new Date();
81
+ const todayString = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
82
+ if (dateRangeOptionPresetsCache === null || dateRangeOptionsPresetsCacheDate === null || dateRangeOptionsPresetsCacheDate !== todayString) {
83
+ dateRangeOptionsPresetsCacheDate = todayString;
84
+ const twoWeeksAgo = /* @__PURE__ */ new Date();
85
+ twoWeeksAgo.setDate(today.getDate() - 14);
86
+ const lastMonth = new Date(today);
87
+ lastMonth.setMonth(today.getMonth() - 1);
88
+ const last2Months = new Date(today);
89
+ last2Months.setMonth(today.getMonth() - 2);
90
+ const last3Months = new Date(today);
91
+ last3Months.setMonth(today.getMonth() - 3);
92
+ const last6Months = new Date(today);
93
+ last6Months.setMonth(today.getMonth() - 6);
94
+ const lastYear = new Date(today);
95
+ lastYear.setFullYear(today.getFullYear() - 1);
96
+ dateRangeOptionPresetsCache = {
97
+ last2Weeks: {
98
+ label: "Last 2 weeks",
99
+ dateFrom: toYYYYMMDD(twoWeeksAgo)
100
+ },
101
+ lastMonth: {
102
+ label: "Last month",
103
+ dateFrom: toYYYYMMDD(lastMonth)
104
+ },
105
+ last2Months: {
106
+ label: "Last 2 months",
107
+ dateFrom: toYYYYMMDD(last2Months)
108
+ },
109
+ last3Months: {
110
+ label: "Last 3 months",
111
+ dateFrom: toYYYYMMDD(last3Months)
112
+ },
113
+ last6Months: {
114
+ label: "Last 6 months",
115
+ dateFrom: toYYYYMMDD(last6Months)
116
+ },
117
+ lastYear: {
118
+ label: "Last year",
119
+ dateFrom: toYYYYMMDD(lastYear)
120
+ },
121
+ allTimes: {
122
+ label: "All times"
123
+ }
124
+ };
117
125
  }
126
+ return dateRangeOptionPresetsCache;
118
127
  };
119
128
  class LocationChangedEvent extends CustomEvent {
120
129
  constructor(detail) {
@@ -186,4 +195,4 @@ export {
186
195
  temporalGranularitySchema as t,
187
196
  views as v
188
197
  };
189
- //# sourceMappingURL=NumberRangeFilterChangedEvent-RZ8haPHq.js.map
198
+ //# sourceMappingURL=NumberRangeFilterChangedEvent-RqWinxhE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumberRangeFilterChangedEvent-RqWinxhE.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()]));\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 MutationType = 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","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 * If not set, the date range selector will default to the `earliestDate` property.\n */\n dateFrom: z.string().date().optional(),\n /**\n * The end date of the date range in the format `YYYY-MM-DD`.\n * If not set, the date range selector will default to the current date.\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 allTimes: 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 allTimes: {\n label: 'All times',\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 }\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AM,aAAa,sBAAsB;AAAA,MACrC;AAAA,MACA,SAAS;AAAA,MACT,UAAU;AAAA,IAAA,CACb;AAAA,EAAA;AAET;ACNa,MAAA,oBAAoB,EAAE,OAAO;AAAA,EACtC,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA,EACzB,KAAK,EAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;AAGM,MAAM,qCAAqC,YAAyB;AAAA,EACvE,YAAY,QAAqB;AAC7B,UAAM,aAAa,yBAAyB;AAAA,MACxC;AAAA,MACA,SAAS;AAAA,MACT,UAAU;AAAA,IAAA,CACb;AAAA,EAAA;AAET;AAEO,MAAM,sCAAsC,YAA+B;AAAA,EAC9E,YAAY,QAA2B;AACnC,UAAM,aAAa,0BAA0B;AAAA,MACzC;AAAA,MACA,SAAS;AAAA,MACT,UAAU;AAAA,IAAA,CACb;AAAA,EAAA;AAET;"}
@@ -1583,7 +1583,7 @@ declare global {
1583
1583
 
1584
1584
  declare global {
1585
1585
  interface HTMLElementTagNameMap {
1586
- 'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
1586
+ 'gs-genome-data-viewer': GenomeDataViewerComponent;
1587
1587
  }
1588
1588
  }
1589
1589
 
@@ -1591,7 +1591,7 @@ declare global {
1591
1591
  declare global {
1592
1592
  namespace JSX {
1593
1593
  interface IntrinsicElements {
1594
- 'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1594
+ 'gs-genome-data-viewer': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1595
1595
  }
1596
1596
  }
1597
1597
  }
@@ -1599,7 +1599,7 @@ declare global {
1599
1599
 
1600
1600
  declare global {
1601
1601
  interface HTMLElementTagNameMap {
1602
- 'gs-genome-data-viewer': GenomeDataViewerComponent;
1602
+ 'gs-mutation-comparison-component': MutationComparisonComponent;
1603
1603
  }
1604
1604
  }
1605
1605
 
@@ -1607,7 +1607,7 @@ declare global {
1607
1607
  declare global {
1608
1608
  namespace JSX {
1609
1609
  interface IntrinsicElements {
1610
- 'gs-genome-data-viewer': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1610
+ 'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1611
1611
  }
1612
1612
  }
1613
1613
  }
@@ -1615,7 +1615,7 @@ declare global {
1615
1615
 
1616
1616
  declare global {
1617
1617
  interface HTMLElementTagNameMap {
1618
- 'gs-mutation-comparison-component': MutationComparisonComponent;
1618
+ 'gs-mutations': MutationsComponent;
1619
1619
  }
1620
1620
  }
1621
1621
 
@@ -1623,7 +1623,7 @@ declare global {
1623
1623
  declare global {
1624
1624
  namespace JSX {
1625
1625
  interface IntrinsicElements {
1626
- 'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1626
+ 'gs-mutations': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1627
1627
  }
1628
1628
  }
1629
1629
  }
@@ -1631,7 +1631,7 @@ declare global {
1631
1631
 
1632
1632
  declare global {
1633
1633
  interface HTMLElementTagNameMap {
1634
- 'gs-mutations': MutationsComponent;
1634
+ 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
1635
1635
  }
1636
1636
  }
1637
1637
 
@@ -1639,7 +1639,7 @@ declare global {
1639
1639
  declare global {
1640
1640
  namespace JSX {
1641
1641
  interface IntrinsicElements {
1642
- 'gs-mutations': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1642
+ 'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1643
1643
  }
1644
1644
  }
1645
1645
  }
@@ -1647,7 +1647,7 @@ declare global {
1647
1647
 
1648
1648
  declare global {
1649
1649
  interface HTMLElementTagNameMap {
1650
- 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
1650
+ 'gs-aggregate': AggregateComponent;
1651
1651
  }
1652
1652
  }
1653
1653
 
@@ -1655,7 +1655,7 @@ declare global {
1655
1655
  declare global {
1656
1656
  namespace JSX {
1657
1657
  interface IntrinsicElements {
1658
- 'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1658
+ 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1659
1659
  }
1660
1660
  }
1661
1661
  }
@@ -1663,7 +1663,7 @@ declare global {
1663
1663
 
1664
1664
  declare global {
1665
1665
  interface HTMLElementTagNameMap {
1666
- 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
1666
+ 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
1667
1667
  }
1668
1668
  }
1669
1669
 
@@ -1671,7 +1671,7 @@ declare global {
1671
1671
  declare global {
1672
1672
  namespace JSX {
1673
1673
  interface IntrinsicElements {
1674
- 'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1674
+ 'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1675
1675
  }
1676
1676
  }
1677
1677
  }
@@ -1679,7 +1679,7 @@ declare global {
1679
1679
 
1680
1680
  declare global {
1681
1681
  interface HTMLElementTagNameMap {
1682
- 'gs-aggregate': AggregateComponent;
1682
+ 'gs-mutations-over-time': MutationsOverTimeComponent;
1683
1683
  }
1684
1684
  }
1685
1685
 
@@ -1687,7 +1687,7 @@ declare global {
1687
1687
  declare global {
1688
1688
  namespace JSX {
1689
1689
  interface IntrinsicElements {
1690
- 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1690
+ 'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1691
1691
  }
1692
1692
  }
1693
1693
  }
@@ -1711,7 +1711,7 @@ declare global {
1711
1711
 
1712
1712
  declare global {
1713
1713
  interface HTMLElementTagNameMap {
1714
- 'gs-mutations-over-time': MutationsOverTimeComponent;
1714
+ 'gs-sequences-by-location': SequencesByLocationComponent;
1715
1715
  }
1716
1716
  }
1717
1717
 
@@ -1719,7 +1719,7 @@ declare global {
1719
1719
  declare global {
1720
1720
  namespace JSX {
1721
1721
  interface IntrinsicElements {
1722
- 'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1722
+ 'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1723
1723
  }
1724
1724
  }
1725
1725
  }
@@ -1727,7 +1727,7 @@ declare global {
1727
1727
 
1728
1728
  declare global {
1729
1729
  interface HTMLElementTagNameMap {
1730
- 'gs-sequences-by-location': SequencesByLocationComponent;
1730
+ 'gs-statistics': StatisticsComponent;
1731
1731
  }
1732
1732
  }
1733
1733
 
@@ -1735,7 +1735,7 @@ declare global {
1735
1735
  declare global {
1736
1736
  namespace JSX {
1737
1737
  interface IntrinsicElements {
1738
- 'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1738
+ 'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1739
1739
  }
1740
1740
  }
1741
1741
  }
@@ -1743,11 +1743,7 @@ declare global {
1743
1743
 
1744
1744
  declare global {
1745
1745
  interface HTMLElementTagNameMap {
1746
- 'gs-date-range-filter': DateRangeFilterComponent;
1747
- }
1748
- interface HTMLElementEventMap {
1749
- [gsEventNames.dateRangeFilterChanged]: CustomEvent<Record<string, string>>;
1750
- [gsEventNames.dateRangeOptionChanged]: DateRangeOptionChangedEvent;
1746
+ 'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
1751
1747
  }
1752
1748
  }
1753
1749
 
@@ -1755,7 +1751,7 @@ declare global {
1755
1751
  declare global {
1756
1752
  namespace JSX {
1757
1753
  interface IntrinsicElements {
1758
- 'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1754
+ 'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1759
1755
  }
1760
1756
  }
1761
1757
  }
@@ -1763,7 +1759,11 @@ declare global {
1763
1759
 
1764
1760
  declare global {
1765
1761
  interface HTMLElementTagNameMap {
1766
- 'gs-statistics': StatisticsComponent;
1762
+ 'gs-date-range-filter': DateRangeFilterComponent;
1763
+ }
1764
+ interface HTMLElementEventMap {
1765
+ [gsEventNames.dateRangeFilterChanged]: CustomEvent<Record<string, string>>;
1766
+ [gsEventNames.dateRangeOptionChanged]: DateRangeOptionChangedEvent;
1767
1767
  }
1768
1768
  }
1769
1769
 
@@ -1771,7 +1771,7 @@ declare global {
1771
1771
  declare global {
1772
1772
  namespace JSX {
1773
1773
  interface IntrinsicElements {
1774
- 'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1774
+ 'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1775
1775
  }
1776
1776
  }
1777
1777
  }
@@ -3,7 +3,7 @@ import { Task } from "@lit/task";
3
3
  import { LitElement, html, unsafeCSS } from "lit";
4
4
  import z$2 from "zod";
5
5
  import { createContext as createContext$1, options, Fragment, Component, createElement, toChildArray, createRef, cloneElement, render, hydrate } from "preact";
6
- import { g as gsEventNames, v as views, s as sequenceTypeSchema, n as namedLapisFilterSchema, l as lapisFilterSchema, t as temporalGranularitySchema, c as dateRangeValueSchema, e as dateRangeOptionSchema, f as toYYYYMMDD, D as DateRangeOptionChangedEvent, h as lapisLocationFilterSchema, L as LocationChangedEvent, T as TextFilterChangedEvent, m as mutationsFilterSchema, a as LineageFilterChangedEvent, i as numberRangeSchema, b as NumberRangeValueChangedEvent, N as NumberRangeFilterChangedEvent } from "./NumberRangeFilterChangedEvent-RZ8haPHq.js";
6
+ import { g as gsEventNames, v as views, s as sequenceTypeSchema, n as namedLapisFilterSchema, l as lapisFilterSchema, t as temporalGranularitySchema, c as dateRangeValueSchema, e as dateRangeOptionSchema, f as toYYYYMMDD, D as DateRangeOptionChangedEvent, h as lapisLocationFilterSchema, L as LocationChangedEvent, T as TextFilterChangedEvent, m as mutationsFilterSchema, a as LineageFilterChangedEvent, i as numberRangeSchema, b as NumberRangeValueChangedEvent, N as NumberRangeFilterChangedEvent } from "./NumberRangeFilterChangedEvent-RqWinxhE.js";
7
7
  import { ReactiveElement } from "@lit/reactive-element";
8
8
  import DOMPurify from "dompurify";
9
9
  import { useRef, Grid } from "gridjs";
package/dist/util.d.ts CHANGED
@@ -77,38 +77,20 @@ export declare class DateRangeOptionChangedEvent extends CustomEvent<DateRangeVa
77
77
  constructor(detail: DateRangeValue);
78
78
  }
79
79
 
80
+ declare type DateRangeOptionPresets = {
81
+ last2Weeks: DateRangeOption;
82
+ lastMonth: DateRangeOption;
83
+ last2Months: DateRangeOption;
84
+ last3Months: DateRangeOption;
85
+ last6Months: DateRangeOption;
86
+ lastYear: DateRangeOption;
87
+ allTimes: DateRangeOption;
88
+ };
89
+
80
90
  /**
81
91
  * Presets for the `gs-date-range-filter` component that can be used as `dateRangeOptions`.
82
92
  */
83
- export declare const dateRangeOptionPresets: {
84
- last2Weeks: {
85
- label: string;
86
- dateFrom: string;
87
- };
88
- lastMonth: {
89
- label: string;
90
- dateFrom: string;
91
- };
92
- last2Months: {
93
- label: string;
94
- dateFrom: string;
95
- };
96
- last3Months: {
97
- label: string;
98
- dateFrom: string;
99
- };
100
- last6Months: {
101
- label: string;
102
- dateFrom: string;
103
- };
104
- lastYear: {
105
- label: string;
106
- dateFrom: string;
107
- };
108
- allTimes: {
109
- label: string;
110
- };
111
- };
93
+ export declare const dateRangeOptionPresets: () => DateRangeOptionPresets;
112
94
 
113
95
  /**
114
96
  * A date range option that can be used in the `gs-date-range-filter` component.
@@ -938,7 +920,7 @@ declare global {
938
920
 
939
921
  declare global {
940
922
  interface HTMLElementTagNameMap {
941
- 'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
923
+ 'gs-genome-data-viewer': GenomeDataViewerComponent;
942
924
  }
943
925
  }
944
926
 
@@ -946,7 +928,7 @@ declare global {
946
928
  declare global {
947
929
  namespace JSX {
948
930
  interface IntrinsicElements {
949
- 'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
931
+ 'gs-genome-data-viewer': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
950
932
  }
951
933
  }
952
934
  }
@@ -954,7 +936,7 @@ declare global {
954
936
 
955
937
  declare global {
956
938
  interface HTMLElementTagNameMap {
957
- 'gs-genome-data-viewer': GenomeDataViewerComponent;
939
+ 'gs-mutation-comparison-component': MutationComparisonComponent;
958
940
  }
959
941
  }
960
942
 
@@ -962,7 +944,7 @@ declare global {
962
944
  declare global {
963
945
  namespace JSX {
964
946
  interface IntrinsicElements {
965
- 'gs-genome-data-viewer': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
947
+ 'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
966
948
  }
967
949
  }
968
950
  }
@@ -970,7 +952,7 @@ declare global {
970
952
 
971
953
  declare global {
972
954
  interface HTMLElementTagNameMap {
973
- 'gs-mutation-comparison-component': MutationComparisonComponent;
955
+ 'gs-mutations': MutationsComponent;
974
956
  }
975
957
  }
976
958
 
@@ -978,7 +960,7 @@ declare global {
978
960
  declare global {
979
961
  namespace JSX {
980
962
  interface IntrinsicElements {
981
- 'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
963
+ 'gs-mutations': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
982
964
  }
983
965
  }
984
966
  }
@@ -986,7 +968,7 @@ declare global {
986
968
 
987
969
  declare global {
988
970
  interface HTMLElementTagNameMap {
989
- 'gs-mutations': MutationsComponent;
971
+ 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
990
972
  }
991
973
  }
992
974
 
@@ -994,7 +976,7 @@ declare global {
994
976
  declare global {
995
977
  namespace JSX {
996
978
  interface IntrinsicElements {
997
- 'gs-mutations': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
979
+ 'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
998
980
  }
999
981
  }
1000
982
  }
@@ -1002,7 +984,7 @@ declare global {
1002
984
 
1003
985
  declare global {
1004
986
  interface HTMLElementTagNameMap {
1005
- 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
987
+ 'gs-aggregate': AggregateComponent;
1006
988
  }
1007
989
  }
1008
990
 
@@ -1010,7 +992,7 @@ declare global {
1010
992
  declare global {
1011
993
  namespace JSX {
1012
994
  interface IntrinsicElements {
1013
- 'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
995
+ 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1014
996
  }
1015
997
  }
1016
998
  }
@@ -1018,7 +1000,7 @@ declare global {
1018
1000
 
1019
1001
  declare global {
1020
1002
  interface HTMLElementTagNameMap {
1021
- 'gs-prevalence-over-time': PrevalenceOverTimeComponent;
1003
+ 'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
1022
1004
  }
1023
1005
  }
1024
1006
 
@@ -1026,7 +1008,7 @@ declare global {
1026
1008
  declare global {
1027
1009
  namespace JSX {
1028
1010
  interface IntrinsicElements {
1029
- 'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1011
+ 'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1030
1012
  }
1031
1013
  }
1032
1014
  }
@@ -1034,7 +1016,7 @@ declare global {
1034
1016
 
1035
1017
  declare global {
1036
1018
  interface HTMLElementTagNameMap {
1037
- 'gs-aggregate': AggregateComponent;
1019
+ 'gs-mutations-over-time': MutationsOverTimeComponent;
1038
1020
  }
1039
1021
  }
1040
1022
 
@@ -1042,7 +1024,7 @@ declare global {
1042
1024
  declare global {
1043
1025
  namespace JSX {
1044
1026
  interface IntrinsicElements {
1045
- 'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1027
+ 'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1046
1028
  }
1047
1029
  }
1048
1030
  }
@@ -1066,7 +1048,7 @@ declare global {
1066
1048
 
1067
1049
  declare global {
1068
1050
  interface HTMLElementTagNameMap {
1069
- 'gs-mutations-over-time': MutationsOverTimeComponent;
1051
+ 'gs-sequences-by-location': SequencesByLocationComponent;
1070
1052
  }
1071
1053
  }
1072
1054
 
@@ -1074,7 +1056,7 @@ declare global {
1074
1056
  declare global {
1075
1057
  namespace JSX {
1076
1058
  interface IntrinsicElements {
1077
- 'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1059
+ 'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1078
1060
  }
1079
1061
  }
1080
1062
  }
@@ -1082,7 +1064,7 @@ declare global {
1082
1064
 
1083
1065
  declare global {
1084
1066
  interface HTMLElementTagNameMap {
1085
- 'gs-sequences-by-location': SequencesByLocationComponent;
1067
+ 'gs-statistics': StatisticsComponent;
1086
1068
  }
1087
1069
  }
1088
1070
 
@@ -1090,7 +1072,7 @@ declare global {
1090
1072
  declare global {
1091
1073
  namespace JSX {
1092
1074
  interface IntrinsicElements {
1093
- 'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1075
+ 'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1094
1076
  }
1095
1077
  }
1096
1078
  }
@@ -1098,11 +1080,7 @@ declare global {
1098
1080
 
1099
1081
  declare global {
1100
1082
  interface HTMLElementTagNameMap {
1101
- 'gs-date-range-filter': DateRangeFilterComponent;
1102
- }
1103
- interface HTMLElementEventMap {
1104
- [gsEventNames.dateRangeFilterChanged]: CustomEvent<Record<string, string>>;
1105
- [gsEventNames.dateRangeOptionChanged]: DateRangeOptionChangedEvent;
1083
+ 'gs-wastewater-mutations-over-time': WastewaterMutationsOverTimeComponent;
1106
1084
  }
1107
1085
  }
1108
1086
 
@@ -1110,7 +1088,7 @@ declare global {
1110
1088
  declare global {
1111
1089
  namespace JSX {
1112
1090
  interface IntrinsicElements {
1113
- 'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1091
+ 'gs-wastewater-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1114
1092
  }
1115
1093
  }
1116
1094
  }
@@ -1118,7 +1096,11 @@ declare global {
1118
1096
 
1119
1097
  declare global {
1120
1098
  interface HTMLElementTagNameMap {
1121
- 'gs-statistics': StatisticsComponent;
1099
+ 'gs-date-range-filter': DateRangeFilterComponent;
1100
+ }
1101
+ interface HTMLElementEventMap {
1102
+ [gsEventNames.dateRangeFilterChanged]: CustomEvent<Record<string, string>>;
1103
+ [gsEventNames.dateRangeOptionChanged]: DateRangeOptionChangedEvent;
1122
1104
  }
1123
1105
  }
1124
1106
 
@@ -1126,7 +1108,7 @@ declare global {
1126
1108
  declare global {
1127
1109
  namespace JSX {
1128
1110
  interface IntrinsicElements {
1129
- 'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1111
+ 'gs-date-range-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
1130
1112
  }
1131
1113
  }
1132
1114
  }
package/dist/util.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D, a, L, N, b, T, d, g, v } from "./NumberRangeFilterChangedEvent-RZ8haPHq.js";
1
+ import { D, a, L, N, b, T, d, g, v } from "./NumberRangeFilterChangedEvent-RqWinxhE.js";
2
2
  export {
3
3
  D as DateRangeOptionChangedEvent,
4
4
  a as LineageFilterChangedEvent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genspectrum/dashboard-components",
3
- "version": "0.19.9",
3
+ "version": "0.20.0",
4
4
  "description": "GenSpectrum web components for building dashboards",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -55,7 +55,7 @@ const meta: Meta<DateRangeFilterProps> = {
55
55
  },
56
56
  },
57
57
  args: {
58
- dateRangeOptions: [dateRangeOptionPresets.lastMonth, dateRangeOptionPresets.allTimes, customDateRange],
58
+ dateRangeOptions: [dateRangeOptionPresets().lastMonth, dateRangeOptionPresets().allTimes, customDateRange],
59
59
  earliestDate,
60
60
  value: null,
61
61
  lapisDateField: 'aDateColumn',
@@ -150,7 +150,7 @@ export const SetsValueOnBlur: StoryObj<DateRangeFilterProps> = {
150
150
  ...Primary,
151
151
  args: {
152
152
  ...Primary.args,
153
- value: dateRangeOptionPresets.lastMonth.label,
153
+ value: dateRangeOptionPresets().lastMonth.label,
154
154
  },
155
155
  play: async ({ canvasElement, step }) => {
156
156
  const { canvas, filterChangedListenerMock, optionChangedListenerMock } = await prepare(canvasElement, step);
@@ -211,7 +211,7 @@ export const ChangingTheValueProgrammatically: StoryObj<DateRangeFilterProps> =
211
211
  <button className='btn' onClick={() => setValue(customDateRange.label)}>
212
212
  Set to Custom
213
213
  </button>
214
- <button className='btn' onClick={() => setValue(dateRangeOptionPresets.lastMonth.label)}>
214
+ <button className='btn' onClick={() => setValue(dateRangeOptionPresets().lastMonth.label)}>
215
215
  Set to Last month
216
216
  </button>
217
217
  </div>