@genspectrum/dashboard-components 0.10.2 → 0.10.4
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 +19 -19
- package/custom-elements.json +377 -33
- package/dist/assets/mutationOverTimeWorker-BjjkMGzd.js.map +1 -0
- package/dist/components.d.ts +217 -59
- package/dist/components.js +1365 -177
- package/dist/components.js.map +1 -1
- package/dist/{dateRangeOption-du8H7LWu.js → dateRangeOption-Doo6WHKu.js} +17 -3
- package/dist/dateRangeOption-Doo6WHKu.js.map +1 -0
- package/dist/style.css +16 -6
- package/dist/util.d.ts +107 -41
- package/dist/util.js +1 -1
- package/package.json +10 -4
- package/src/preact/aggregatedData/aggregate.stories.tsx +14 -0
- package/src/preact/aggregatedData/aggregate.tsx +17 -15
- package/src/preact/components/error-boundary.stories.tsx +24 -3
- package/src/preact/components/error-boundary.tsx +3 -4
- package/src/preact/components/error-display.tsx +38 -17
- package/src/preact/components/tabs.tsx +2 -2
- package/src/preact/dateRangeSelector/date-range-selector.stories.tsx +1 -1
- package/src/preact/lineageFilter/lineage-filter.stories.tsx +1 -1
- package/src/preact/locationFilter/location-filter.stories.tsx +1 -1
- package/src/preact/map/__mockData__/aggregatedGermany.json +83 -0
- package/src/preact/map/__mockData__/aggregatedWorld.json +259 -0
- package/src/preact/map/__mockData__/germanyMap.json +9083 -0
- package/src/preact/map/__mockData__/howToGenerateWorldMap.md +9 -0
- package/src/preact/map/__mockData__/worldAtlas.json +497127 -0
- package/src/preact/map/leafletStyleModifications.css +3 -0
- package/src/preact/map/sequences-by-location-map.tsx +202 -0
- package/src/preact/map/sequences-by-location-table.tsx +18 -0
- package/src/preact/map/sequences-by-location.stories.tsx +144 -0
- package/src/preact/map/sequences-by-location.tsx +151 -0
- package/src/preact/map/useGeoJsonMap.tsx +62 -0
- package/src/preact/mutationComparison/mutation-comparison.tsx +1 -1
- package/src/preact/mutationFilter/mutation-filter.tsx +26 -13
- package/src/preact/mutations/mutations.tsx +16 -12
- package/src/preact/mutationsOverTime/mutations-over-time.stories.tsx +14 -0
- package/src/preact/mutationsOverTime/mutations-over-time.tsx +18 -14
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.stories.tsx +14 -0
- package/src/preact/numberSequencesOverTime/number-sequences-over-time.tsx +22 -14
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +14 -0
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +28 -19
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +14 -0
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +18 -15
- package/src/preact/shared/charts/confideceInterval.ts +10 -8
- package/src/preact/shared/charts/getYAxisMax.ts +10 -5
- package/src/preact/shared/stories/expectErrorMessage.ts +21 -0
- package/src/preact/statistic/statistics.tsx +10 -8
- package/src/preact/textInput/text-input.stories.tsx +14 -0
- package/src/preact/textInput/text-input.tsx +16 -11
- package/src/preact/useQuery.ts +9 -1
- package/src/query/queryAggregateData.ts +2 -1
- package/src/styles/tailwind.css +1 -1
- package/src/types.ts +13 -1
- package/src/utilEntrypoint.ts +7 -0
- package/src/web-components/app.stories.ts +17 -2
- package/src/web-components/app.ts +17 -5
- package/src/web-components/input/gs-mutation-filter.stories.ts +2 -0
- package/src/web-components/input/gs-text-input.tsx +2 -2
- package/src/web-components/introduction.mdx +4 -4
- package/src/web-components/visualization/data_visualization_statistical_analysis.mdx +3 -3
- package/src/web-components/visualization/gs-mutations-over-time.tsx +1 -3
- package/src/web-components/visualization/gs-mutations.tsx +1 -3
- package/src/web-components/visualization/gs-number-sequences-over-time.tsx +1 -3
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +3 -6
- package/src/web-components/visualization/gs-relative-growth-advantage.tsx +1 -5
- package/src/web-components/visualization/gs-sequences-by-location.stories.ts +234 -0
- package/src/web-components/visualization/gs-sequences-by-location.tsx +253 -0
- package/src/web-components/visualization/index.ts +1 -0
- package/standalone-bundle/assets/mutationOverTimeWorker-DoUBht2e.js.map +1 -0
- package/standalone-bundle/dashboard-components.js +16223 -9292
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/standalone-bundle/style.css +1 -1
- package/dist/assets/mutationOverTimeWorker-Di6yP1e6.js.map +0 -1
- package/dist/dateRangeOption-du8H7LWu.js.map +0 -1
- package/src/preact/shared/stories/expectInvalidAttributesErrorMessage.ts +0 -13
- package/standalone-bundle/assets/mutationOverTimeWorker-cIyshfj_.js.map +0 -1
|
@@ -4,10 +4,22 @@ const namedLapisFilterSchema = z.object({
|
|
|
4
4
|
lapisFilter: lapisFilterSchema,
|
|
5
5
|
displayName: z.string()
|
|
6
6
|
});
|
|
7
|
+
const temporalGranularitySchema = z.union([
|
|
8
|
+
z.literal("day"),
|
|
9
|
+
z.literal("week"),
|
|
10
|
+
z.literal("month"),
|
|
11
|
+
z.literal("year")
|
|
12
|
+
]);
|
|
7
13
|
const sequenceTypeSchema = z.union([z.literal("nucleotide"), z.literal("amino acid")]);
|
|
8
14
|
const views = {
|
|
9
15
|
table: "table",
|
|
10
|
-
venn: "venn"
|
|
16
|
+
venn: "venn",
|
|
17
|
+
grid: "grid",
|
|
18
|
+
insertions: "insertions",
|
|
19
|
+
bar: "bar",
|
|
20
|
+
line: "line",
|
|
21
|
+
bubble: "bubble",
|
|
22
|
+
map: "map"
|
|
11
23
|
};
|
|
12
24
|
const mutationComparisonViewSchema = z.union([z.literal(views.table), z.literal(views.venn)]);
|
|
13
25
|
const toYYYYMMDD = (date) => {
|
|
@@ -82,11 +94,13 @@ const dateRangeOptionPresets = {
|
|
|
82
94
|
export {
|
|
83
95
|
DateRangeOptionChangedEvent as D,
|
|
84
96
|
dateRangeOptionSchema as a,
|
|
97
|
+
toYYYYMMDD as b,
|
|
85
98
|
dateRangeOptionPresets as d,
|
|
99
|
+
lapisFilterSchema as l,
|
|
86
100
|
mutationComparisonViewSchema as m,
|
|
87
101
|
namedLapisFilterSchema as n,
|
|
88
102
|
sequenceTypeSchema as s,
|
|
89
|
-
|
|
103
|
+
temporalGranularitySchema as t,
|
|
90
104
|
views as v
|
|
91
105
|
};
|
|
92
|
-
//# sourceMappingURL=dateRangeOption-
|
|
106
|
+
//# sourceMappingURL=dateRangeOption-Doo6WHKu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateRangeOption-Doo6WHKu.js","sources":["../src/types.ts","../src/preact/dateRangeSelector/dateConversion.ts","../src/preact/dateRangeSelector/dateRangeOption.ts"],"sourcesContent":["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 lapisFilterSchema = z.record(z.union([z.string(), z.number(), z.null(), z.boolean()]));\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 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\nexport const mutationComparisonViewSchema = z.union([z.literal(views.table), z.literal(views.venn)]);\nexport type MutationComparisonView = z.infer<typeof mutationComparisonViewSchema>;\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';\n\n/**\n * A date range option that can be used in the `gs-date-range-selector` 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 type DateRangeSelectOption = string | { dateFrom: string; dateTo: string };\n\nexport class DateRangeOptionChangedEvent extends CustomEvent<DateRangeSelectOption> {\n constructor(detail: DateRangeSelectOption) {\n super('gs-date-range-option-changed', {\n detail,\n bubbles: true,\n composed: true,\n });\n }\n}\n\nconst today = new Date();\n\nconst twoWeeksAgo = new Date();\ntwoWeeksAgo.setDate(today.getDate() - 14);\n\nconst lastMonth = new Date(today);\nlastMonth.setMonth(today.getMonth() - 1);\n\nconst last2Months = new Date(today);\nlast2Months.setMonth(today.getMonth() - 2);\n\nconst last3Months = new Date(today);\nlast3Months.setMonth(today.getMonth() - 3);\n\nconst last6Months = new Date(today);\nlast6Months.setMonth(today.getMonth() - 6);\n\nconst lastYear = new Date(today);\nlastYear.setFullYear(today.getFullYear() - 1);\n\n/**\n * Presets for the `gs-date-range-selector` component that can be used as `dateRangeOptions`.\n */\nexport const dateRangeOptionPresets = {\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} satisfies Record<string, DateRangeOption>;\n"],"names":[],"mappings":";AAWO,MAAM,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,GAAG,EAAE,KAAK,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGrF,MAAA,yBAAyB,EAAE,OAAO;AAAA,EAC3C,aAAa;AAAA,EACb,aAAa,EAAE,OAAO;AAC1B,CAAC;AAGY,MAAA,4BAA4B,EAAE,MAAM;AAAA,EAC7C,EAAE,QAAQ,KAAK;AAAA,EACf,EAAE,QAAQ,MAAM;AAAA,EAChB,EAAE,QAAQ,OAAO;AAAA,EACjB,EAAE,QAAQ,MAAM;AACpB,CAAC;AAGM,MAAM,qBAAqB,EAAE,MAAM,CAAC,EAAE,QAAQ,YAAY,GAAG,EAAE,QAAQ,YAAY,CAAC,CAAC;AA8BrF,MAAM,QAAQ;AAAA,EACjB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,KAAK;AACT;AAEO,MAAM,+BAA+B,EAAE,MAAM,CAAC,EAAE,QAAQ,MAAM,KAAK,GAAG,EAAE,QAAQ,MAAM,IAAI,CAAC,CAAC;ACrEtF,MAAA,aAAa,CAAC,SAAe;AACtC,QAAM,UAAsC,EAAE,MAAM,WAAW,OAAO,WAAW,KAAK,UAAU;AACzF,SAAA,KAAK,mBAAmB,SAAS,OAAO;AACnD;ACIa,MAAA,wBAAwB,EAAE,OAAO;AAAA;AAAA,EAE1C,OAAO,EAAE,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhB,UAAU,EAAE,OAAS,EAAA,KAAA,EAAO,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAKrC,QAAQ,EAAE,SAAS,OAAO,SAAS;AACvC,CAAC;AAMM,MAAM,oCAAoC,YAAmC;AAAA,EAChF,YAAY,QAA+B;AACvC,UAAM,gCAAgC;AAAA,MAClC;AAAA,MACA,SAAS;AAAA,MACT,UAAU;AAAA,IAAA,CACb;AAAA,EAAA;AAET;AAEA,MAAM,4BAAY,KAAK;AAEvB,MAAM,kCAAkB,KAAK;AAC7B,YAAY,QAAQ,MAAM,QAAQ,IAAI,EAAE;AAExC,MAAM,YAAY,IAAI,KAAK,KAAK;AAChC,UAAU,SAAS,MAAM,SAAS,IAAI,CAAC;AAEvC,MAAM,cAAc,IAAI,KAAK,KAAK;AAClC,YAAY,SAAS,MAAM,SAAS,IAAI,CAAC;AAEzC,MAAM,cAAc,IAAI,KAAK,KAAK;AAClC,YAAY,SAAS,MAAM,SAAS,IAAI,CAAC;AAEzC,MAAM,cAAc,IAAI,KAAK,KAAK;AAClC,YAAY,SAAS,MAAM,SAAS,IAAI,CAAC;AAEzC,MAAM,WAAW,IAAI,KAAK,KAAK;AAC/B,SAAS,YAAY,MAAM,YAAY,IAAI,CAAC;AAKrC,MAAM,yBAAyB;AAAA,EAClC,YAAY;AAAA,IACR,OAAO;AAAA,IACP,UAAU,WAAW,WAAW;AAAA,EACpC;AAAA,EACA,WAAW;AAAA,IACP,OAAO;AAAA,IACP,UAAU,WAAW,SAAS;AAAA,EAClC;AAAA,EACA,aAAa;AAAA,IACT,OAAO;AAAA,IACP,UAAU,WAAW,WAAW;AAAA,EACpC;AAAA,EACA,aAAa;AAAA,IACT,OAAO;AAAA,IACP,UAAU,WAAW,WAAW;AAAA,EACpC;AAAA,EACA,aAAa;AAAA,IACT,OAAO;AAAA,IACP,UAAU,WAAW,WAAW;AAAA,EACpC;AAAA,EACA,UAAU;AAAA,IACN,OAAO;AAAA,IACP,UAAU,WAAW,QAAQ;AAAA,EACjC;AAAA,EACA,UAAU;AAAA,IACN,OAAO;AAAA,EAAA;AAEf;"}
|
package/dist/style.css
CHANGED
|
@@ -482,7 +482,7 @@ input[type="range"] {
|
|
|
482
482
|
--tw-contain-paint: ;
|
|
483
483
|
--tw-contain-style: ;
|
|
484
484
|
}/*
|
|
485
|
-
! tailwindcss v3.4.
|
|
485
|
+
! tailwindcss v3.4.16 | MIT License | https://tailwindcss.com
|
|
486
486
|
*//*
|
|
487
487
|
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
488
488
|
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
@@ -1981,12 +1981,12 @@ input.tab:checked + .tab-content,
|
|
|
1981
1981
|
mask-repeat: no-repeat;
|
|
1982
1982
|
-webkit-mask-position: center;
|
|
1983
1983
|
mask-position: center;
|
|
1984
|
-
-webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='
|
|
1985
|
-
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='
|
|
1984
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
|
|
1985
|
+
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
|
|
1986
1986
|
}
|
|
1987
1987
|
.loading-spinner {
|
|
1988
|
-
-webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='
|
|
1989
|
-
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='
|
|
1988
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
|
|
1989
|
+
mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
|
|
1990
1990
|
}
|
|
1991
1991
|
.loading-md {
|
|
1992
1992
|
width: 1.5rem;
|
|
@@ -2083,6 +2083,9 @@ input.tab:checked + .tab-content,
|
|
|
2083
2083
|
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
2084
2084
|
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
2085
2085
|
}
|
|
2086
|
+
.modal-action:where([dir="rtl"], [dir="rtl"] *) > :not([hidden]) ~ :not([hidden]) {
|
|
2087
|
+
--tw-space-x-reverse: 1;
|
|
2088
|
+
}
|
|
2086
2089
|
@keyframes modal-pop {
|
|
2087
2090
|
|
|
2088
2091
|
0% {
|
|
@@ -3139,6 +3142,9 @@ input.tab:checked + .tab-content,
|
|
|
3139
3142
|
--tw-translate-y: -50%;
|
|
3140
3143
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
3141
3144
|
}
|
|
3145
|
+
.transform {
|
|
3146
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
3147
|
+
}
|
|
3142
3148
|
.cursor-pointer {
|
|
3143
3149
|
cursor: pointer;
|
|
3144
3150
|
}
|
|
@@ -3148,6 +3154,9 @@ input.tab:checked + .tab-content,
|
|
|
3148
3154
|
.list-inside {
|
|
3149
3155
|
list-style-position: inside;
|
|
3150
3156
|
}
|
|
3157
|
+
.list-outside {
|
|
3158
|
+
list-style-position: outside;
|
|
3159
|
+
}
|
|
3151
3160
|
.list-disc {
|
|
3152
3161
|
list-style-type: disc;
|
|
3153
3162
|
}
|
|
@@ -3468,7 +3477,8 @@ input.tab:checked + .tab-content,
|
|
|
3468
3477
|
font-size: 2.25rem;
|
|
3469
3478
|
line-height: 2.5rem;
|
|
3470
3479
|
}
|
|
3471
|
-
}
|
|
3480
|
+
}
|
|
3481
|
+
.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{/*
|
|
3472
3482
|
/*rtl:begin:ignore*/left:0/*
|
|
3473
3483
|
/*rtl:end:ignore*/}/*
|
|
3474
3484
|
/*rtl:begin:ignore*/
|
package/dist/util.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { default as default_2 } from 'zod';
|
|
2
2
|
|
|
3
|
+
export declare type AxisMax = default_2.infer<typeof axisMaxSchema>;
|
|
4
|
+
|
|
5
|
+
declare const axisMaxSchema: default_2.ZodUnion<[default_2.ZodLiteral<"maxInData">, default_2.ZodLiteral<"limitTo1">, default_2.ZodNumber]>;
|
|
6
|
+
|
|
7
|
+
export declare type ConfidenceIntervalMethod = default_2.infer<typeof confidenceIntervalMethodSchema>;
|
|
8
|
+
|
|
9
|
+
declare const confidenceIntervalMethodSchema: default_2.ZodUnion<[default_2.ZodLiteral<"wilson">, default_2.ZodLiteral<"none">]>;
|
|
10
|
+
|
|
3
11
|
export declare type DateRangeOption = default_2.infer<typeof dateRangeOptionSchema>;
|
|
4
12
|
|
|
5
13
|
export declare class DateRangeOptionChangedEvent extends CustomEvent<DateRangeSelectOption> {
|
|
@@ -91,15 +99,57 @@ declare const namedLapisFilterSchema: default_2.ZodObject<{
|
|
|
91
99
|
displayName: string;
|
|
92
100
|
}>;
|
|
93
101
|
|
|
102
|
+
export declare type SelectedMutationFilterStrings = default_2.infer<typeof selectedMutationFilterStringsSchema>;
|
|
103
|
+
|
|
104
|
+
declare const selectedMutationFilterStringsSchema: default_2.ZodObject<{
|
|
105
|
+
nucleotideMutations: default_2.ZodArray<default_2.ZodString, "many">;
|
|
106
|
+
aminoAcidMutations: default_2.ZodArray<default_2.ZodString, "many">;
|
|
107
|
+
nucleotideInsertions: default_2.ZodArray<default_2.ZodString, "many">;
|
|
108
|
+
aminoAcidInsertions: default_2.ZodArray<default_2.ZodString, "many">;
|
|
109
|
+
}, "strip", default_2.ZodTypeAny, {
|
|
110
|
+
nucleotideMutations: string[];
|
|
111
|
+
aminoAcidMutations: string[];
|
|
112
|
+
nucleotideInsertions: string[];
|
|
113
|
+
aminoAcidInsertions: string[];
|
|
114
|
+
}, {
|
|
115
|
+
nucleotideMutations: string[];
|
|
116
|
+
aminoAcidMutations: string[];
|
|
117
|
+
nucleotideInsertions: string[];
|
|
118
|
+
aminoAcidInsertions: string[];
|
|
119
|
+
}>;
|
|
120
|
+
|
|
94
121
|
export declare type SequenceType = default_2.infer<typeof sequenceTypeSchema>;
|
|
95
122
|
|
|
96
123
|
declare const sequenceTypeSchema: default_2.ZodUnion<[default_2.ZodLiteral<"nucleotide">, default_2.ZodLiteral<"amino acid">]>;
|
|
97
124
|
|
|
125
|
+
export declare type TemporalGranularity = default_2.infer<typeof temporalGranularitySchema>;
|
|
126
|
+
|
|
127
|
+
declare const temporalGranularitySchema: default_2.ZodUnion<[default_2.ZodLiteral<"day">, default_2.ZodLiteral<"week">, default_2.ZodLiteral<"month">, default_2.ZodLiteral<"year">]>;
|
|
128
|
+
|
|
98
129
|
export declare const views: {
|
|
99
130
|
readonly table: "table";
|
|
100
131
|
readonly venn: "venn";
|
|
132
|
+
readonly grid: "grid";
|
|
133
|
+
readonly insertions: "insertions";
|
|
134
|
+
readonly bar: "bar";
|
|
135
|
+
readonly line: "line";
|
|
136
|
+
readonly bubble: "bubble";
|
|
137
|
+
readonly map: "map";
|
|
101
138
|
};
|
|
102
139
|
|
|
140
|
+
export declare type YAxisMaxConfig = default_2.infer<typeof yAxisMaxConfigSchema>;
|
|
141
|
+
|
|
142
|
+
declare const yAxisMaxConfigSchema: default_2.ZodObject<{
|
|
143
|
+
linear: default_2.ZodOptional<default_2.ZodUnion<[default_2.ZodLiteral<"maxInData">, default_2.ZodLiteral<"limitTo1">, default_2.ZodNumber]>>;
|
|
144
|
+
logarithmic: default_2.ZodOptional<default_2.ZodUnion<[default_2.ZodLiteral<"maxInData">, default_2.ZodLiteral<"limitTo1">, default_2.ZodNumber]>>;
|
|
145
|
+
}, "strip", default_2.ZodTypeAny, {
|
|
146
|
+
linear?: number | "maxInData" | "limitTo1" | undefined;
|
|
147
|
+
logarithmic?: number | "maxInData" | "limitTo1" | undefined;
|
|
148
|
+
}, {
|
|
149
|
+
linear?: number | "maxInData" | "limitTo1" | undefined;
|
|
150
|
+
logarithmic?: number | "maxInData" | "limitTo1" | undefined;
|
|
151
|
+
}>;
|
|
152
|
+
|
|
103
153
|
export { }
|
|
104
154
|
|
|
105
155
|
|
|
@@ -128,11 +178,7 @@ declare global {
|
|
|
128
178
|
|
|
129
179
|
declare global {
|
|
130
180
|
interface HTMLElementTagNameMap {
|
|
131
|
-
'gs-
|
|
132
|
-
}
|
|
133
|
-
interface HTMLElementEventMap {
|
|
134
|
-
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
135
|
-
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
181
|
+
'gs-mutation-comparison-component': MutationComparisonComponent;
|
|
136
182
|
}
|
|
137
183
|
}
|
|
138
184
|
|
|
@@ -140,7 +186,7 @@ declare global {
|
|
|
140
186
|
declare global {
|
|
141
187
|
namespace JSX {
|
|
142
188
|
interface IntrinsicElements {
|
|
143
|
-
'gs-
|
|
189
|
+
'gs-mutation-comparison-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
144
190
|
}
|
|
145
191
|
}
|
|
146
192
|
}
|
|
@@ -148,10 +194,7 @@ declare global {
|
|
|
148
194
|
|
|
149
195
|
declare global {
|
|
150
196
|
interface HTMLElementTagNameMap {
|
|
151
|
-
'gs-
|
|
152
|
-
}
|
|
153
|
-
interface HTMLElementEventMap {
|
|
154
|
-
'gs-location-changed': CustomEvent<Record<string, string>>;
|
|
197
|
+
'gs-mutations-component': MutationsComponent;
|
|
155
198
|
}
|
|
156
199
|
}
|
|
157
200
|
|
|
@@ -159,7 +202,7 @@ declare global {
|
|
|
159
202
|
declare global {
|
|
160
203
|
namespace JSX {
|
|
161
204
|
interface IntrinsicElements {
|
|
162
|
-
'gs-
|
|
205
|
+
'gs-mutations-component': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
163
206
|
}
|
|
164
207
|
}
|
|
165
208
|
}
|
|
@@ -167,10 +210,7 @@ declare global {
|
|
|
167
210
|
|
|
168
211
|
declare global {
|
|
169
212
|
interface HTMLElementTagNameMap {
|
|
170
|
-
'gs-
|
|
171
|
-
}
|
|
172
|
-
interface HTMLElementEventMap {
|
|
173
|
-
'gs-text-input-changed': CustomEvent<Record<string, string>>;
|
|
213
|
+
'gs-prevalence-over-time': PrevalenceOverTimeComponent;
|
|
174
214
|
}
|
|
175
215
|
}
|
|
176
216
|
|
|
@@ -178,7 +218,7 @@ declare global {
|
|
|
178
218
|
declare global {
|
|
179
219
|
namespace JSX {
|
|
180
220
|
interface IntrinsicElements {
|
|
181
|
-
'gs-
|
|
221
|
+
'gs-prevalence-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
182
222
|
}
|
|
183
223
|
}
|
|
184
224
|
}
|
|
@@ -186,10 +226,7 @@ declare global {
|
|
|
186
226
|
|
|
187
227
|
declare global {
|
|
188
228
|
interface HTMLElementTagNameMap {
|
|
189
|
-
'gs-
|
|
190
|
-
}
|
|
191
|
-
interface HTMLElementEventMap {
|
|
192
|
-
'gs-mutation-filter-changed': CustomEvent<SelectedMutationFilterStrings>;
|
|
229
|
+
'gs-relative-growth-advantage': RelativeGrowthAdvantageComponent;
|
|
193
230
|
}
|
|
194
231
|
}
|
|
195
232
|
|
|
@@ -197,7 +234,7 @@ declare global {
|
|
|
197
234
|
declare global {
|
|
198
235
|
namespace JSX {
|
|
199
236
|
interface IntrinsicElements {
|
|
200
|
-
'gs-
|
|
237
|
+
'gs-relative-growth-advantage': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
201
238
|
}
|
|
202
239
|
}
|
|
203
240
|
}
|
|
@@ -205,10 +242,23 @@ declare global {
|
|
|
205
242
|
|
|
206
243
|
declare global {
|
|
207
244
|
interface HTMLElementTagNameMap {
|
|
208
|
-
'gs-
|
|
245
|
+
'gs-aggregate': AggregateComponent;
|
|
209
246
|
}
|
|
210
|
-
|
|
211
|
-
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
declare global {
|
|
251
|
+
namespace JSX {
|
|
252
|
+
interface IntrinsicElements {
|
|
253
|
+
'gs-aggregate': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
declare global {
|
|
260
|
+
interface HTMLElementTagNameMap {
|
|
261
|
+
'gs-number-sequences-over-time': NumberSequencesOverTimeComponent;
|
|
212
262
|
}
|
|
213
263
|
}
|
|
214
264
|
|
|
@@ -216,7 +266,7 @@ declare global {
|
|
|
216
266
|
declare global {
|
|
217
267
|
namespace JSX {
|
|
218
268
|
interface IntrinsicElements {
|
|
219
|
-
'gs-
|
|
269
|
+
'gs-number-sequences-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
220
270
|
}
|
|
221
271
|
}
|
|
222
272
|
}
|
|
@@ -224,7 +274,7 @@ declare global {
|
|
|
224
274
|
|
|
225
275
|
declare global {
|
|
226
276
|
interface HTMLElementTagNameMap {
|
|
227
|
-
'gs-
|
|
277
|
+
'gs-sequences-by-location': SequencesByLocationComponent;
|
|
228
278
|
}
|
|
229
279
|
}
|
|
230
280
|
|
|
@@ -232,7 +282,7 @@ declare global {
|
|
|
232
282
|
declare global {
|
|
233
283
|
namespace JSX {
|
|
234
284
|
interface IntrinsicElements {
|
|
235
|
-
'gs-
|
|
285
|
+
'gs-sequences-by-location': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
236
286
|
}
|
|
237
287
|
}
|
|
238
288
|
}
|
|
@@ -240,7 +290,7 @@ declare global {
|
|
|
240
290
|
|
|
241
291
|
declare global {
|
|
242
292
|
interface HTMLElementTagNameMap {
|
|
243
|
-
'gs-mutations-
|
|
293
|
+
'gs-mutations-over-time': MutationsOverTimeComponent;
|
|
244
294
|
}
|
|
245
295
|
}
|
|
246
296
|
|
|
@@ -248,7 +298,7 @@ declare global {
|
|
|
248
298
|
declare global {
|
|
249
299
|
namespace JSX {
|
|
250
300
|
interface IntrinsicElements {
|
|
251
|
-
'gs-mutations-
|
|
301
|
+
'gs-mutations-over-time': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
252
302
|
}
|
|
253
303
|
}
|
|
254
304
|
}
|
|
@@ -256,7 +306,7 @@ declare global {
|
|
|
256
306
|
|
|
257
307
|
declare global {
|
|
258
308
|
interface HTMLElementTagNameMap {
|
|
259
|
-
'gs-
|
|
309
|
+
'gs-statistics': StatisticsComponent;
|
|
260
310
|
}
|
|
261
311
|
}
|
|
262
312
|
|
|
@@ -264,7 +314,7 @@ declare global {
|
|
|
264
314
|
declare global {
|
|
265
315
|
namespace JSX {
|
|
266
316
|
interface IntrinsicElements {
|
|
267
|
-
'gs-
|
|
317
|
+
'gs-statistics': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
268
318
|
}
|
|
269
319
|
}
|
|
270
320
|
}
|
|
@@ -272,7 +322,10 @@ declare global {
|
|
|
272
322
|
|
|
273
323
|
declare global {
|
|
274
324
|
interface HTMLElementTagNameMap {
|
|
275
|
-
'gs-
|
|
325
|
+
'gs-location-filter': LocationFilterComponent;
|
|
326
|
+
}
|
|
327
|
+
interface HTMLElementEventMap {
|
|
328
|
+
'gs-location-changed': CustomEvent<Record<string, string>>;
|
|
276
329
|
}
|
|
277
330
|
}
|
|
278
331
|
|
|
@@ -280,7 +333,7 @@ declare global {
|
|
|
280
333
|
declare global {
|
|
281
334
|
namespace JSX {
|
|
282
335
|
interface IntrinsicElements {
|
|
283
|
-
'gs-
|
|
336
|
+
'gs-location-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
284
337
|
}
|
|
285
338
|
}
|
|
286
339
|
}
|
|
@@ -288,7 +341,11 @@ declare global {
|
|
|
288
341
|
|
|
289
342
|
declare global {
|
|
290
343
|
interface HTMLElementTagNameMap {
|
|
291
|
-
'gs-
|
|
344
|
+
'gs-date-range-selector': DateRangeSelectorComponent;
|
|
345
|
+
}
|
|
346
|
+
interface HTMLElementEventMap {
|
|
347
|
+
'gs-date-range-filter-changed': CustomEvent<Record<string, string>>;
|
|
348
|
+
'gs-date-range-option-changed': DateRangeOptionChangedEvent;
|
|
292
349
|
}
|
|
293
350
|
}
|
|
294
351
|
|
|
@@ -296,7 +353,7 @@ declare global {
|
|
|
296
353
|
declare global {
|
|
297
354
|
namespace JSX {
|
|
298
355
|
interface IntrinsicElements {
|
|
299
|
-
'gs-
|
|
356
|
+
'gs-date-range-selector': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
300
357
|
}
|
|
301
358
|
}
|
|
302
359
|
}
|
|
@@ -304,7 +361,10 @@ declare global {
|
|
|
304
361
|
|
|
305
362
|
declare global {
|
|
306
363
|
interface HTMLElementTagNameMap {
|
|
307
|
-
'gs-
|
|
364
|
+
'gs-text-input': TextInputComponent;
|
|
365
|
+
}
|
|
366
|
+
interface HTMLElementEventMap {
|
|
367
|
+
'gs-text-input-changed': CustomEvent<Record<string, string>>;
|
|
308
368
|
}
|
|
309
369
|
}
|
|
310
370
|
|
|
@@ -312,7 +372,7 @@ declare global {
|
|
|
312
372
|
declare global {
|
|
313
373
|
namespace JSX {
|
|
314
374
|
interface IntrinsicElements {
|
|
315
|
-
'gs-
|
|
375
|
+
'gs-text-input': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
316
376
|
}
|
|
317
377
|
}
|
|
318
378
|
}
|
|
@@ -320,7 +380,10 @@ declare global {
|
|
|
320
380
|
|
|
321
381
|
declare global {
|
|
322
382
|
interface HTMLElementTagNameMap {
|
|
323
|
-
'gs-
|
|
383
|
+
'gs-mutation-filter': MutationFilterComponent;
|
|
384
|
+
}
|
|
385
|
+
interface HTMLElementEventMap {
|
|
386
|
+
'gs-mutation-filter-changed': CustomEvent<SelectedMutationFilterStrings>;
|
|
324
387
|
}
|
|
325
388
|
}
|
|
326
389
|
|
|
@@ -328,7 +391,7 @@ declare global {
|
|
|
328
391
|
declare global {
|
|
329
392
|
namespace JSX {
|
|
330
393
|
interface IntrinsicElements {
|
|
331
|
-
'gs-
|
|
394
|
+
'gs-mutation-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
332
395
|
}
|
|
333
396
|
}
|
|
334
397
|
}
|
|
@@ -336,7 +399,10 @@ declare global {
|
|
|
336
399
|
|
|
337
400
|
declare global {
|
|
338
401
|
interface HTMLElementTagNameMap {
|
|
339
|
-
'gs-
|
|
402
|
+
'gs-lineage-filter': LineageFilterComponent;
|
|
403
|
+
}
|
|
404
|
+
interface HTMLElementEventMap {
|
|
405
|
+
'gs-lineage-filter-changed': CustomEvent<Record<string, string>>;
|
|
340
406
|
}
|
|
341
407
|
}
|
|
342
408
|
|
|
@@ -344,7 +410,7 @@ declare global {
|
|
|
344
410
|
declare global {
|
|
345
411
|
namespace JSX {
|
|
346
412
|
interface IntrinsicElements {
|
|
347
|
-
'gs-
|
|
413
|
+
'gs-lineage-filter': DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
348
414
|
}
|
|
349
415
|
}
|
|
350
416
|
}
|
package/dist/util.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genspectrum/dashboard-components",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"description": "GenSpectrum web components for building dashboards",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -83,14 +83,16 @@
|
|
|
83
83
|
"@lit/context": "^1.1.1",
|
|
84
84
|
"@lit/reactive-element": "^2.0.4",
|
|
85
85
|
"@lit/task": "^1.0.0",
|
|
86
|
-
"chart.js": "^4.4.
|
|
86
|
+
"chart.js": "^4.4.6",
|
|
87
87
|
"chartjs-chart-error-bars": "^4.4.0",
|
|
88
88
|
"chartjs-chart-venn": "^4.3.0",
|
|
89
89
|
"dayjs": "^1.11.10",
|
|
90
90
|
"flatpickr": "^4.6.13",
|
|
91
91
|
"gridjs": "^6.2.0",
|
|
92
|
+
"leaflet": "^1.9.4",
|
|
92
93
|
"lit": "^3.1.3",
|
|
93
94
|
"preact": "^10.20.1",
|
|
95
|
+
"topojson-client": "^3.1.0",
|
|
94
96
|
"zod": "^3.23.0"
|
|
95
97
|
},
|
|
96
98
|
"devDependencies": {
|
|
@@ -107,12 +109,16 @@
|
|
|
107
109
|
"@storybook/preact": "^8.0.9",
|
|
108
110
|
"@storybook/preact-vite": "^8.0.9",
|
|
109
111
|
"@storybook/test": "^8.0.0",
|
|
110
|
-
"@storybook/test-runner": "^0.
|
|
112
|
+
"@storybook/test-runner": "^0.20.1",
|
|
111
113
|
"@storybook/types": "^8.0.9",
|
|
112
114
|
"@storybook/web-components": "^8.0.9",
|
|
113
115
|
"@storybook/web-components-vite": "^8.0.9",
|
|
114
116
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
117
|
+
"@types/geojson": "^7946.0.15",
|
|
118
|
+
"@types/leaflet": "^1.9.15",
|
|
115
119
|
"@types/node": "^22.0.0",
|
|
120
|
+
"@types/topojson-client": "^3.1.5",
|
|
121
|
+
"@types/topojson-specification": "^1.0.5",
|
|
116
122
|
"@typescript-eslint/eslint-plugin": "^8.2.0",
|
|
117
123
|
"@typescript-eslint/parser": "^8.2.0",
|
|
118
124
|
"autoprefixer": "^10.4.19",
|
|
@@ -133,7 +139,7 @@
|
|
|
133
139
|
"storybook-addon-fetch-mock": "^2.0.0",
|
|
134
140
|
"tailwindcss": "^3.4.3",
|
|
135
141
|
"typescript": "~5.7.2",
|
|
136
|
-
"vite": "^
|
|
142
|
+
"vite": "^6.0.3",
|
|
137
143
|
"vite-plugin-dts": "^4.0.3",
|
|
138
144
|
"vitest": "^2.0.1"
|
|
139
145
|
}
|
|
@@ -5,6 +5,7 @@ import aggregatedData from './__mockData__/aggregated.json';
|
|
|
5
5
|
import { Aggregate, type AggregateProps } from './aggregate';
|
|
6
6
|
import { AGGREGATED_ENDPOINT, LAPIS_URL } from '../../constants';
|
|
7
7
|
import { LapisUrlContext } from '../LapisUrlContext';
|
|
8
|
+
import { expectInvalidAttributesErrorMessage } from '../shared/stories/expectErrorMessage';
|
|
8
9
|
|
|
9
10
|
const meta: Meta<AggregateProps> = {
|
|
10
11
|
title: 'Visualization/Aggregate',
|
|
@@ -94,3 +95,16 @@ export const FailsLoadingData: StoryObj<AggregateProps> = {
|
|
|
94
95
|
});
|
|
95
96
|
},
|
|
96
97
|
};
|
|
98
|
+
|
|
99
|
+
export const WithEmptyFieldString: StoryObj<AggregateProps> = {
|
|
100
|
+
...Default,
|
|
101
|
+
args: {
|
|
102
|
+
...Default.args,
|
|
103
|
+
fields: [''],
|
|
104
|
+
},
|
|
105
|
+
play: async ({ canvasElement, step }) => {
|
|
106
|
+
step('expect error message', async () => {
|
|
107
|
+
await expectInvalidAttributesErrorMessage(canvasElement, 'String must contain at least 1 character(s)');
|
|
108
|
+
});
|
|
109
|
+
},
|
|
110
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type FunctionComponent } from 'preact';
|
|
2
2
|
import { useContext } from 'preact/hooks';
|
|
3
|
+
import z from 'zod';
|
|
3
4
|
|
|
4
5
|
import { AggregateTable } from './aggregate-table';
|
|
5
6
|
import { type AggregateData, queryAggregateData } from '../../query/queryAggregateData';
|
|
6
|
-
import {
|
|
7
|
+
import { lapisFilterSchema, views } from '../../types';
|
|
7
8
|
import { LapisUrlContext } from '../LapisUrlContext';
|
|
8
9
|
import { CsvDownloadButton } from '../components/csv-download-button';
|
|
9
10
|
import { ErrorBoundary } from '../components/error-boundary';
|
|
@@ -15,26 +16,27 @@ import { ResizeContainer } from '../components/resize-container';
|
|
|
15
16
|
import Tabs from '../components/tabs';
|
|
16
17
|
import { useQuery } from '../useQuery';
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
export type
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
19
|
+
const viewSchema = z.literal(views.table);
|
|
20
|
+
export type View = z.infer<typeof viewSchema>;
|
|
21
|
+
|
|
22
|
+
const aggregatePropsSchema = z.object({
|
|
23
|
+
filter: lapisFilterSchema,
|
|
24
|
+
fields: z.array(z.string().min(1)),
|
|
25
|
+
views: z.array(viewSchema),
|
|
26
|
+
initialSortField: z.string(),
|
|
27
|
+
initialSortDirection: z.union([z.literal('ascending'), z.literal('descending')]),
|
|
28
|
+
pageSize: z.union([z.boolean(), z.number()]),
|
|
29
|
+
width: z.string(),
|
|
30
|
+
height: z.string(),
|
|
31
|
+
});
|
|
32
|
+
export type AggregateProps = z.infer<typeof aggregatePropsSchema>;
|
|
31
33
|
|
|
32
34
|
export const Aggregate: FunctionComponent<AggregateProps> = (componentProps) => {
|
|
33
35
|
const { width, height } = componentProps;
|
|
34
36
|
const size = { height, width };
|
|
35
37
|
|
|
36
38
|
return (
|
|
37
|
-
<ErrorBoundary size={size}>
|
|
39
|
+
<ErrorBoundary size={size} schema={aggregatePropsSchema} componentProps={componentProps}>
|
|
38
40
|
<ResizeContainer size={size}>
|
|
39
41
|
<AggregateInner {...componentProps} />
|
|
40
42
|
</ResizeContainer>
|