@genspectrum/dashboard-components 0.2.0 → 0.3.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/custom-elements.json +328 -177
- package/dist/dashboard-components.js +376 -129
- package/dist/dashboard-components.js.map +1 -1
- package/dist/genspectrum-components.d.ts +156 -110
- package/dist/style.css +179 -33
- package/package.json +1 -2
- package/src/constants.ts +1 -1
- package/src/lapisApi/lapisApi.ts +46 -2
- package/src/lapisApi/lapisTypes.ts +14 -0
- package/src/preact/aggregatedData/aggregate.stories.tsx +4 -2
- package/src/preact/aggregatedData/aggregate.tsx +8 -6
- package/src/preact/components/error-boundary.stories.tsx +6 -14
- package/src/preact/components/error-boundary.tsx +2 -11
- package/src/preact/components/error-display.stories.tsx +12 -5
- package/src/preact/components/error-display.tsx +37 -3
- package/src/preact/components/loading-display.stories.tsx +1 -1
- package/src/preact/components/resize-container.tsx +5 -14
- package/src/preact/dateRangeSelector/date-range-selector.stories.tsx +2 -0
- package/src/preact/dateRangeSelector/date-range-selector.tsx +11 -8
- package/src/preact/locationFilter/fetchAutocompletionList.ts +15 -1
- package/src/preact/locationFilter/location-filter.tsx +4 -5
- package/src/preact/mutationComparison/mutation-comparison.stories.tsx +6 -3
- package/src/preact/mutationComparison/mutation-comparison.tsx +10 -13
- package/src/preact/mutationComparison/queryMutationData.ts +2 -3
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +8 -8
- package/src/preact/mutationFilter/mutation-filter.tsx +7 -6
- package/src/preact/mutations/mutations.stories.tsx +6 -3
- package/src/preact/mutations/mutations.tsx +8 -6
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +14 -7
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +10 -8
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +6 -3
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +9 -7
- package/src/preact/textInput/text-input.stories.tsx +26 -0
- package/src/preact/textInput/text-input.tsx +4 -5
- package/src/query/queryPrevalenceOverTime.ts +4 -10
- package/src/types.ts +4 -1
- package/src/web-components/ResizeContainer.mdx +13 -0
- package/src/web-components/app.ts +3 -1
- package/src/web-components/input/gs-date-range-selector.stories.ts +10 -2
- package/src/web-components/input/gs-date-range-selector.tsx +26 -16
- package/src/web-components/input/gs-location-filter.stories.ts +5 -3
- package/src/web-components/input/gs-location-filter.tsx +5 -6
- package/src/web-components/input/gs-mutation-filter.stories.ts +11 -8
- package/src/web-components/input/gs-mutation-filter.tsx +38 -26
- package/src/web-components/input/gs-text-input.stories.ts +3 -3
- package/src/web-components/input/gs-text-input.tsx +10 -10
- package/src/web-components/input/introduction.mdx +11 -0
- package/src/web-components/introduction.mdx +15 -0
- package/src/web-components/visualization/gs-aggregate.stories.ts +19 -6
- package/src/web-components/visualization/gs-aggregate.tsx +31 -15
- package/src/web-components/visualization/gs-mutation-comparison.stories.ts +13 -7
- package/src/web-components/visualization/gs-mutation-comparison.tsx +26 -17
- package/src/web-components/visualization/gs-mutations.stories.ts +14 -8
- package/src/web-components/visualization/gs-mutations.tsx +18 -8
- package/src/web-components/visualization/gs-prevalence-over-time.stories.ts +28 -18
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +45 -22
- package/src/web-components/visualization/gs-relative-growth-advantage.stories.ts +11 -5
- package/src/web-components/visualization/gs-relative-growth-advantage.tsx +21 -9
|
@@ -400,6 +400,31 @@ function makeLapisResponse(data) {
|
|
|
400
400
|
data
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
|
+
const problemDetail = z$1.object({
|
|
404
|
+
title: z$1.string().optional(),
|
|
405
|
+
status: z$1.number(),
|
|
406
|
+
detail: z$1.string().optional(),
|
|
407
|
+
type: z$1.string(),
|
|
408
|
+
instance: z$1.string().optional()
|
|
409
|
+
});
|
|
410
|
+
const lapisError = z$1.object({
|
|
411
|
+
error: problemDetail
|
|
412
|
+
});
|
|
413
|
+
class UnknownLapisError extends Error {
|
|
414
|
+
constructor(message, status) {
|
|
415
|
+
super(message);
|
|
416
|
+
this.status = status;
|
|
417
|
+
this.name = "UnknownLapisError";
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
class LapisError extends Error {
|
|
421
|
+
constructor(message, status, problemDetail2) {
|
|
422
|
+
super(message);
|
|
423
|
+
this.status = status;
|
|
424
|
+
this.problemDetail = problemDetail2;
|
|
425
|
+
this.name = "LapisError";
|
|
426
|
+
}
|
|
427
|
+
}
|
|
403
428
|
async function fetchAggregated(lapisUrl, body, signal) {
|
|
404
429
|
const response = await fetch(aggregatedEndpoint(lapisUrl), {
|
|
405
430
|
method: "POST",
|
|
@@ -450,9 +475,26 @@ async function fetchReferenceGenome(lapisUrl, signal) {
|
|
|
450
475
|
const handleErrors = async (response) => {
|
|
451
476
|
if (!response.ok) {
|
|
452
477
|
if (response.status >= 400 && response.status < 500) {
|
|
453
|
-
|
|
478
|
+
const json = await response.json();
|
|
479
|
+
const lapisErrorResult = lapisError.safeParse(json);
|
|
480
|
+
if (lapisErrorResult.success) {
|
|
481
|
+
throw new LapisError(
|
|
482
|
+
response.statusText + lapisErrorResult.data.error.detail,
|
|
483
|
+
response.status,
|
|
484
|
+
lapisErrorResult.data.error
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
const problemDetailResult = problemDetail.safeParse(json);
|
|
488
|
+
if (problemDetailResult.success) {
|
|
489
|
+
throw new LapisError(
|
|
490
|
+
response.statusText + problemDetailResult.data.detail,
|
|
491
|
+
response.status,
|
|
492
|
+
problemDetailResult.data
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
throw new UnknownLapisError(`${response.statusText}: ${JSON.stringify(json)}`, response.status);
|
|
454
496
|
}
|
|
455
|
-
throw new
|
|
497
|
+
throw new UnknownLapisError(`${response.statusText}: ${response.status}`, response.status);
|
|
456
498
|
}
|
|
457
499
|
};
|
|
458
500
|
const aggregatedEndpoint = (lapisUrl) => `${lapisUrl}/sample/aggregated`;
|
|
@@ -491,7 +533,8 @@ let App = class extends LitElement {
|
|
|
491
533
|
}
|
|
492
534
|
render() {
|
|
493
535
|
return this.updateReferenceGenome.render({
|
|
494
|
-
complete: () => html
|
|
536
|
+
complete: () => html``,
|
|
537
|
+
// Children will be rendered in the light DOM anyway. We can't use slots without a shadow DOM.
|
|
495
538
|
error: () => html` <div class="m-2 w-full alert alert-error">
|
|
496
539
|
Error: Cannot fetch reference genome. Is LAPIS available?
|
|
497
540
|
</div>`
|
|
@@ -1227,26 +1270,46 @@ const CsvDownloadButton = ({
|
|
|
1227
1270
|
return /* @__PURE__ */ u$1("button", { className, onClick: download, children: label });
|
|
1228
1271
|
};
|
|
1229
1272
|
class UserFacingError extends Error {
|
|
1230
|
-
constructor(message) {
|
|
1273
|
+
constructor(headline, message) {
|
|
1231
1274
|
super(message);
|
|
1275
|
+
this.headline = headline;
|
|
1232
1276
|
this.name = "UserFacingError";
|
|
1233
1277
|
}
|
|
1234
1278
|
}
|
|
1235
1279
|
const ErrorDisplay = ({ error }) => {
|
|
1280
|
+
console.error(error);
|
|
1281
|
+
const ref = F(null);
|
|
1236
1282
|
return /* @__PURE__ */ u$1("div", { className: "h-full w-full rounded-md border-2 border-gray-100 p-2 flex items-center justify-center flex-col", children: [
|
|
1237
1283
|
/* @__PURE__ */ u$1("div", { className: "text-red-700 font-bold", children: "Error" }),
|
|
1238
|
-
/* @__PURE__ */ u$1("div", { children:
|
|
1239
|
-
|
|
1284
|
+
/* @__PURE__ */ u$1("div", { children: [
|
|
1285
|
+
"Oops! Something went wrong.",
|
|
1286
|
+
error instanceof UserFacingError && /* @__PURE__ */ u$1(Fragment, { children: [
|
|
1287
|
+
" ",
|
|
1288
|
+
/* @__PURE__ */ u$1(
|
|
1289
|
+
"button",
|
|
1290
|
+
{
|
|
1291
|
+
className: "text-sm text-gray-600 hover:text-gray-300",
|
|
1292
|
+
onClick: () => {
|
|
1293
|
+
var _a;
|
|
1294
|
+
return (_a = ref.current) == null ? void 0 : _a.showModal();
|
|
1295
|
+
},
|
|
1296
|
+
children: "Show details."
|
|
1297
|
+
}
|
|
1298
|
+
),
|
|
1299
|
+
/* @__PURE__ */ u$1("dialog", { ref, class: "modal", children: [
|
|
1300
|
+
/* @__PURE__ */ u$1("div", { class: "modal-box", children: [
|
|
1301
|
+
/* @__PURE__ */ u$1("form", { method: "dialog", children: /* @__PURE__ */ u$1("button", { className: "btn btn-sm btn-circle btn-ghost absolute right-2 top-2", children: "✕" }) }),
|
|
1302
|
+
/* @__PURE__ */ u$1("h1", { class: "text-lg", children: error.headline }),
|
|
1303
|
+
/* @__PURE__ */ u$1("p", { class: "py-4", children: error.message })
|
|
1304
|
+
] }),
|
|
1305
|
+
/* @__PURE__ */ u$1("form", { method: "dialog", class: "modal-backdrop", children: /* @__PURE__ */ u$1("button", { children: "close" }) })
|
|
1306
|
+
] })
|
|
1307
|
+
] })
|
|
1308
|
+
] })
|
|
1240
1309
|
] });
|
|
1241
1310
|
};
|
|
1242
|
-
const ResizeContainer = ({ children, size
|
|
1243
|
-
return /* @__PURE__ */ u$1("div", { style:
|
|
1244
|
-
};
|
|
1245
|
-
const extendByDefault = (size, defaultSize) => {
|
|
1246
|
-
if (size === void 0) {
|
|
1247
|
-
return defaultSize;
|
|
1248
|
-
}
|
|
1249
|
-
return { ...defaultSize, ...size };
|
|
1311
|
+
const ResizeContainer = ({ children, size }) => {
|
|
1312
|
+
return /* @__PURE__ */ u$1("div", { style: size, children });
|
|
1250
1313
|
};
|
|
1251
1314
|
const Headline = ({ heading, children }) => {
|
|
1252
1315
|
if (!heading) {
|
|
@@ -1268,18 +1331,10 @@ const ResizingHeadline = ({ heading, children }) => {
|
|
|
1268
1331
|
/* @__PURE__ */ u$1("div", { style: { height: `calc(100% - ${h1Height})` }, children })
|
|
1269
1332
|
] });
|
|
1270
1333
|
};
|
|
1271
|
-
const ErrorBoundary = ({
|
|
1272
|
-
size,
|
|
1273
|
-
defaultSize,
|
|
1274
|
-
headline,
|
|
1275
|
-
children
|
|
1276
|
-
}) => {
|
|
1334
|
+
const ErrorBoundary = ({ size, headline, children }) => {
|
|
1277
1335
|
const [internalError] = b2();
|
|
1278
1336
|
if (internalError) {
|
|
1279
|
-
|
|
1280
|
-
}
|
|
1281
|
-
if (internalError) {
|
|
1282
|
-
return /* @__PURE__ */ u$1(ResizeContainer, { defaultSize, size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(ErrorDisplay, { error: internalError }) }) });
|
|
1337
|
+
return /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(ErrorDisplay, { error: internalError }) }) });
|
|
1283
1338
|
}
|
|
1284
1339
|
return /* @__PURE__ */ u$1(Fragment, { children });
|
|
1285
1340
|
};
|
|
@@ -1568,11 +1623,12 @@ const MutationComparison = ({
|
|
|
1568
1623
|
variants,
|
|
1569
1624
|
sequenceType,
|
|
1570
1625
|
views,
|
|
1571
|
-
|
|
1626
|
+
width,
|
|
1627
|
+
height,
|
|
1572
1628
|
headline = "Mutation comparison"
|
|
1573
1629
|
}) => {
|
|
1574
|
-
const
|
|
1575
|
-
return /* @__PURE__ */ u$1(ErrorBoundary, { size,
|
|
1630
|
+
const size = { height, width };
|
|
1631
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(MutationComparisonInner, { variants, sequenceType, views }) }) }) });
|
|
1576
1632
|
};
|
|
1577
1633
|
const MutationComparisonInner = ({
|
|
1578
1634
|
variants,
|
|
@@ -2290,39 +2346,6 @@ html {
|
|
|
2290
2346
|
--tw-contain-paint: ;
|
|
2291
2347
|
--tw-contain-style: ;
|
|
2292
2348
|
}
|
|
2293
|
-
.container {
|
|
2294
|
-
width: 100%;
|
|
2295
|
-
}
|
|
2296
|
-
@media (min-width: 640px) {
|
|
2297
|
-
|
|
2298
|
-
.container {
|
|
2299
|
-
max-width: 640px;
|
|
2300
|
-
}
|
|
2301
|
-
}
|
|
2302
|
-
@media (min-width: 768px) {
|
|
2303
|
-
|
|
2304
|
-
.container {
|
|
2305
|
-
max-width: 768px;
|
|
2306
|
-
}
|
|
2307
|
-
}
|
|
2308
|
-
@media (min-width: 1024px) {
|
|
2309
|
-
|
|
2310
|
-
.container {
|
|
2311
|
-
max-width: 1024px;
|
|
2312
|
-
}
|
|
2313
|
-
}
|
|
2314
|
-
@media (min-width: 1280px) {
|
|
2315
|
-
|
|
2316
|
-
.container {
|
|
2317
|
-
max-width: 1280px;
|
|
2318
|
-
}
|
|
2319
|
-
}
|
|
2320
|
-
@media (min-width: 1536px) {
|
|
2321
|
-
|
|
2322
|
-
.container {
|
|
2323
|
-
max-width: 1536px;
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
2349
|
.alert {
|
|
2327
2350
|
display: grid;
|
|
2328
2351
|
width: 100%;
|
|
@@ -2425,6 +2448,12 @@ html {
|
|
|
2425
2448
|
.btn:disabled {
|
|
2426
2449
|
pointer-events: none;
|
|
2427
2450
|
}
|
|
2451
|
+
.btn-circle {
|
|
2452
|
+
height: 3rem;
|
|
2453
|
+
width: 3rem;
|
|
2454
|
+
border-radius: 9999px;
|
|
2455
|
+
padding: 0px;
|
|
2456
|
+
}
|
|
2428
2457
|
:where(.btn:is(input[type="checkbox"])),
|
|
2429
2458
|
:where(.btn:is(input[type="radio"])) {
|
|
2430
2459
|
width: auto;
|
|
@@ -2577,6 +2606,17 @@ html {
|
|
|
2577
2606
|
--glass-border-opacity: 15%;
|
|
2578
2607
|
}
|
|
2579
2608
|
|
|
2609
|
+
.btn-ghost:hover {
|
|
2610
|
+
border-color: transparent;
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
@supports (color: oklch(0% 0 0)) {
|
|
2614
|
+
|
|
2615
|
+
.btn-ghost:hover {
|
|
2616
|
+
background-color: var(--fallback-bc,oklch(var(--bc)/0.2));
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2580
2620
|
.btn-outline.btn-primary:hover {
|
|
2581
2621
|
--tw-text-opacity: 1;
|
|
2582
2622
|
color: var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));
|
|
@@ -2799,6 +2839,69 @@ html {
|
|
|
2799
2839
|
:where(.menu li) .badge {
|
|
2800
2840
|
justify-self: end;
|
|
2801
2841
|
}
|
|
2842
|
+
.modal {
|
|
2843
|
+
pointer-events: none;
|
|
2844
|
+
position: fixed;
|
|
2845
|
+
inset: 0px;
|
|
2846
|
+
margin: 0px;
|
|
2847
|
+
display: grid;
|
|
2848
|
+
height: 100%;
|
|
2849
|
+
max-height: none;
|
|
2850
|
+
width: 100%;
|
|
2851
|
+
max-width: none;
|
|
2852
|
+
justify-items: center;
|
|
2853
|
+
padding: 0px;
|
|
2854
|
+
opacity: 0;
|
|
2855
|
+
overscroll-behavior: contain;
|
|
2856
|
+
z-index: 999;
|
|
2857
|
+
background-color: transparent;
|
|
2858
|
+
color: inherit;
|
|
2859
|
+
transition-duration: 200ms;
|
|
2860
|
+
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
2861
|
+
transition-property: transform, opacity, visibility;
|
|
2862
|
+
overflow-y: hidden;
|
|
2863
|
+
}
|
|
2864
|
+
:where(.modal) {
|
|
2865
|
+
align-items: center;
|
|
2866
|
+
}
|
|
2867
|
+
.modal-box {
|
|
2868
|
+
max-height: calc(100vh - 5em);
|
|
2869
|
+
grid-column-start: 1;
|
|
2870
|
+
grid-row-start: 1;
|
|
2871
|
+
width: 91.666667%;
|
|
2872
|
+
max-width: 32rem;
|
|
2873
|
+
--tw-scale-x: .9;
|
|
2874
|
+
--tw-scale-y: .9;
|
|
2875
|
+
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));
|
|
2876
|
+
border-bottom-right-radius: var(--rounded-box, 1rem);
|
|
2877
|
+
border-bottom-left-radius: var(--rounded-box, 1rem);
|
|
2878
|
+
border-top-left-radius: var(--rounded-box, 1rem);
|
|
2879
|
+
border-top-right-radius: var(--rounded-box, 1rem);
|
|
2880
|
+
--tw-bg-opacity: 1;
|
|
2881
|
+
background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));
|
|
2882
|
+
padding: 1.5rem;
|
|
2883
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
|
|
2884
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
|
|
2885
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
|
|
2886
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
2887
|
+
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
2888
|
+
transition-duration: 200ms;
|
|
2889
|
+
box-shadow: rgba(0, 0, 0, 0.25) 0px 25px 50px -12px;
|
|
2890
|
+
overflow-y: auto;
|
|
2891
|
+
overscroll-behavior: contain;
|
|
2892
|
+
}
|
|
2893
|
+
.modal-open,
|
|
2894
|
+
.modal:target,
|
|
2895
|
+
.modal-toggle:checked + .modal,
|
|
2896
|
+
.modal[open] {
|
|
2897
|
+
pointer-events: auto;
|
|
2898
|
+
visibility: visible;
|
|
2899
|
+
opacity: 1;
|
|
2900
|
+
}
|
|
2901
|
+
:root:has(:is(.modal-open, .modal:target, .modal-toggle:checked + .modal, .modal[open])) {
|
|
2902
|
+
overflow: hidden;
|
|
2903
|
+
scrollbar-gutter: stable;
|
|
2904
|
+
}
|
|
2802
2905
|
.radio {
|
|
2803
2906
|
flex-shrink: 0;
|
|
2804
2907
|
--chkbg: var(--bc);
|
|
@@ -3034,6 +3137,20 @@ input.tab:checked + .tab-content,
|
|
|
3034
3137
|
--glass-opacity: 25%;
|
|
3035
3138
|
--glass-border-opacity: 15%;
|
|
3036
3139
|
}
|
|
3140
|
+
.btn-ghost {
|
|
3141
|
+
border-width: 1px;
|
|
3142
|
+
border-color: transparent;
|
|
3143
|
+
background-color: transparent;
|
|
3144
|
+
color: currentColor;
|
|
3145
|
+
--tw-shadow: 0 0 #0000;
|
|
3146
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
3147
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
3148
|
+
outline-color: currentColor;
|
|
3149
|
+
}
|
|
3150
|
+
.btn-ghost.btn-active {
|
|
3151
|
+
border-color: transparent;
|
|
3152
|
+
background-color: var(--fallback-bc,oklch(var(--bc)/0.2));
|
|
3153
|
+
}
|
|
3037
3154
|
.btn-outline.btn-primary {
|
|
3038
3155
|
--tw-text-opacity: 1;
|
|
3039
3156
|
color: var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)));
|
|
@@ -3355,6 +3472,29 @@ input.tab:checked + .tab-content,
|
|
|
3355
3472
|
border-color: currentColor;
|
|
3356
3473
|
opacity: 0.6;
|
|
3357
3474
|
}
|
|
3475
|
+
.modal:not(dialog:not(.modal-open)),
|
|
3476
|
+
.modal::backdrop {
|
|
3477
|
+
background-color: #0006;
|
|
3478
|
+
animation: modal-pop 0.2s ease-out;
|
|
3479
|
+
}
|
|
3480
|
+
.modal-backdrop {
|
|
3481
|
+
z-index: -1;
|
|
3482
|
+
grid-column-start: 1;
|
|
3483
|
+
grid-row-start: 1;
|
|
3484
|
+
display: grid;
|
|
3485
|
+
align-self: stretch;
|
|
3486
|
+
justify-self: stretch;
|
|
3487
|
+
color: transparent;
|
|
3488
|
+
}
|
|
3489
|
+
.modal-open .modal-box,
|
|
3490
|
+
.modal-toggle:checked + .modal .modal-box,
|
|
3491
|
+
.modal:target .modal-box,
|
|
3492
|
+
.modal[open] .modal-box {
|
|
3493
|
+
--tw-translate-y: 0px;
|
|
3494
|
+
--tw-scale-x: 1;
|
|
3495
|
+
--tw-scale-y: 1;
|
|
3496
|
+
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));
|
|
3497
|
+
}
|
|
3358
3498
|
@keyframes modal-pop {
|
|
3359
3499
|
|
|
3360
3500
|
0% {
|
|
@@ -3840,6 +3980,18 @@ input.tab:checked + .tab-content,
|
|
|
3840
3980
|
border-radius: 9999px;
|
|
3841
3981
|
padding: 0px;
|
|
3842
3982
|
}
|
|
3983
|
+
.btn-circle:where(.btn-md) {
|
|
3984
|
+
height: 3rem;
|
|
3985
|
+
width: 3rem;
|
|
3986
|
+
border-radius: 9999px;
|
|
3987
|
+
padding: 0px;
|
|
3988
|
+
}
|
|
3989
|
+
.btn-circle:where(.btn-lg) {
|
|
3990
|
+
height: 4rem;
|
|
3991
|
+
width: 4rem;
|
|
3992
|
+
border-radius: 9999px;
|
|
3993
|
+
padding: 0px;
|
|
3994
|
+
}
|
|
3843
3995
|
.join.join-vertical {
|
|
3844
3996
|
flex-direction: column;
|
|
3845
3997
|
}
|
|
@@ -3954,6 +4106,42 @@ input.tab:checked + .tab-content,
|
|
|
3954
4106
|
margin-bottom: 0px;
|
|
3955
4107
|
margin-inline-start: -1px;
|
|
3956
4108
|
}
|
|
4109
|
+
.modal-top :where(.modal-box) {
|
|
4110
|
+
width: 100%;
|
|
4111
|
+
max-width: none;
|
|
4112
|
+
--tw-translate-y: -2.5rem;
|
|
4113
|
+
--tw-scale-x: 1;
|
|
4114
|
+
--tw-scale-y: 1;
|
|
4115
|
+
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));
|
|
4116
|
+
border-bottom-right-radius: var(--rounded-box, 1rem);
|
|
4117
|
+
border-bottom-left-radius: var(--rounded-box, 1rem);
|
|
4118
|
+
border-top-left-radius: 0px;
|
|
4119
|
+
border-top-right-radius: 0px;
|
|
4120
|
+
}
|
|
4121
|
+
.modal-middle :where(.modal-box) {
|
|
4122
|
+
width: 91.666667%;
|
|
4123
|
+
max-width: 32rem;
|
|
4124
|
+
--tw-translate-y: 0px;
|
|
4125
|
+
--tw-scale-x: .9;
|
|
4126
|
+
--tw-scale-y: .9;
|
|
4127
|
+
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));
|
|
4128
|
+
border-top-left-radius: var(--rounded-box, 1rem);
|
|
4129
|
+
border-top-right-radius: var(--rounded-box, 1rem);
|
|
4130
|
+
border-bottom-right-radius: var(--rounded-box, 1rem);
|
|
4131
|
+
border-bottom-left-radius: var(--rounded-box, 1rem);
|
|
4132
|
+
}
|
|
4133
|
+
.modal-bottom :where(.modal-box) {
|
|
4134
|
+
width: 100%;
|
|
4135
|
+
max-width: none;
|
|
4136
|
+
--tw-translate-y: 2.5rem;
|
|
4137
|
+
--tw-scale-x: 1;
|
|
4138
|
+
--tw-scale-y: 1;
|
|
4139
|
+
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));
|
|
4140
|
+
border-top-left-radius: var(--rounded-box, 1rem);
|
|
4141
|
+
border-top-right-radius: var(--rounded-box, 1rem);
|
|
4142
|
+
border-bottom-right-radius: 0px;
|
|
4143
|
+
border-bottom-left-radius: 0px;
|
|
4144
|
+
}
|
|
3957
4145
|
.steps-horizontal .step {
|
|
3958
4146
|
grid-template-rows: 40px 1fr;
|
|
3959
4147
|
grid-template-columns: auto;
|
|
@@ -4079,9 +4267,15 @@ input.tab:checked + .tab-content,
|
|
|
4079
4267
|
.relative {
|
|
4080
4268
|
position: relative;
|
|
4081
4269
|
}
|
|
4270
|
+
.right-2 {
|
|
4271
|
+
right: 0.5rem;
|
|
4272
|
+
}
|
|
4082
4273
|
.right-6 {
|
|
4083
4274
|
right: 1.5rem;
|
|
4084
4275
|
}
|
|
4276
|
+
.top-2 {
|
|
4277
|
+
top: 0.5rem;
|
|
4278
|
+
}
|
|
4085
4279
|
.top-8 {
|
|
4086
4280
|
top: 2rem;
|
|
4087
4281
|
}
|
|
@@ -4318,6 +4512,10 @@ input.tab:checked + .tab-content,
|
|
|
4318
4512
|
padding-top: 0.5rem;
|
|
4319
4513
|
padding-bottom: 0.5rem;
|
|
4320
4514
|
}
|
|
4515
|
+
.py-4 {
|
|
4516
|
+
padding-top: 1rem;
|
|
4517
|
+
padding-bottom: 1rem;
|
|
4518
|
+
}
|
|
4321
4519
|
.text-justify {
|
|
4322
4520
|
text-align: justify;
|
|
4323
4521
|
}
|
|
@@ -4398,6 +4596,10 @@ input.tab:checked + .tab-content,
|
|
|
4398
4596
|
--tw-text-opacity: 1;
|
|
4399
4597
|
color: rgb(30 64 175 / var(--tw-text-opacity));
|
|
4400
4598
|
}
|
|
4599
|
+
.hover\\:text-gray-300:hover {
|
|
4600
|
+
--tw-text-opacity: 1;
|
|
4601
|
+
color: rgb(209 213 219 / var(--tw-text-opacity));
|
|
4602
|
+
}
|
|
4401
4603
|
.hover\\:text-gray-700:hover {
|
|
4402
4604
|
--tw-text-opacity: 1;
|
|
4403
4605
|
color: rgb(55 65 81 / var(--tw-text-opacity));
|
|
@@ -4460,7 +4662,8 @@ let MutationComparisonComponent = class extends PreactLitAdapterWithGridJsStyles
|
|
|
4460
4662
|
this.variants = [];
|
|
4461
4663
|
this.sequenceType = "nucleotide";
|
|
4462
4664
|
this.views = ["table"];
|
|
4463
|
-
this.
|
|
4665
|
+
this.width = "100%";
|
|
4666
|
+
this.height = "700px";
|
|
4464
4667
|
this.headline = "Mutation comparison";
|
|
4465
4668
|
}
|
|
4466
4669
|
render() {
|
|
@@ -4470,7 +4673,8 @@ let MutationComparisonComponent = class extends PreactLitAdapterWithGridJsStyles
|
|
|
4470
4673
|
variants: this.variants,
|
|
4471
4674
|
sequenceType: this.sequenceType,
|
|
4472
4675
|
views: this.views,
|
|
4473
|
-
|
|
4676
|
+
width: this.width,
|
|
4677
|
+
height: this.height,
|
|
4474
4678
|
headline: this.headline
|
|
4475
4679
|
}
|
|
4476
4680
|
);
|
|
@@ -4486,8 +4690,11 @@ __decorateClass$8([
|
|
|
4486
4690
|
n2({ type: Array })
|
|
4487
4691
|
], MutationComparisonComponent.prototype, "views", 2);
|
|
4488
4692
|
__decorateClass$8([
|
|
4489
|
-
n2({ type:
|
|
4490
|
-
], MutationComparisonComponent.prototype, "
|
|
4693
|
+
n2({ type: String })
|
|
4694
|
+
], MutationComparisonComponent.prototype, "width", 2);
|
|
4695
|
+
__decorateClass$8([
|
|
4696
|
+
n2({ type: String })
|
|
4697
|
+
], MutationComparisonComponent.prototype, "height", 2);
|
|
4491
4698
|
__decorateClass$8([
|
|
4492
4699
|
n2({ type: String })
|
|
4493
4700
|
], MutationComparisonComponent.prototype, "headline", 2);
|
|
@@ -4756,11 +4963,12 @@ const Mutations = ({
|
|
|
4756
4963
|
variant,
|
|
4757
4964
|
sequenceType,
|
|
4758
4965
|
views,
|
|
4759
|
-
|
|
4966
|
+
width,
|
|
4967
|
+
height,
|
|
4760
4968
|
headline = "Mutations"
|
|
4761
4969
|
}) => {
|
|
4762
|
-
const
|
|
4763
|
-
return /* @__PURE__ */ u$1(ErrorBoundary, { size,
|
|
4970
|
+
const size = { height, width };
|
|
4971
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(MutationsInner, { variant, sequenceType, views }) }) }) });
|
|
4764
4972
|
};
|
|
4765
4973
|
const MutationsInner = ({ variant, sequenceType, views }) => {
|
|
4766
4974
|
const lapis = P(LapisUrlContext);
|
|
@@ -4899,7 +5107,8 @@ let MutationsComponent = class extends PreactLitAdapterWithGridJsStyles {
|
|
|
4899
5107
|
this.variant = {};
|
|
4900
5108
|
this.sequenceType = "nucleotide";
|
|
4901
5109
|
this.views = ["table", "grid"];
|
|
4902
|
-
this.
|
|
5110
|
+
this.width = "100%";
|
|
5111
|
+
this.height = "700px";
|
|
4903
5112
|
this.headline = "Mutations";
|
|
4904
5113
|
}
|
|
4905
5114
|
render() {
|
|
@@ -4909,7 +5118,8 @@ let MutationsComponent = class extends PreactLitAdapterWithGridJsStyles {
|
|
|
4909
5118
|
variant: this.variant,
|
|
4910
5119
|
sequenceType: this.sequenceType,
|
|
4911
5120
|
views: this.views,
|
|
4912
|
-
|
|
5121
|
+
width: this.width,
|
|
5122
|
+
height: this.height,
|
|
4913
5123
|
headline: this.headline
|
|
4914
5124
|
}
|
|
4915
5125
|
);
|
|
@@ -4925,8 +5135,11 @@ __decorateClass$7([
|
|
|
4925
5135
|
n2({ type: Array })
|
|
4926
5136
|
], MutationsComponent.prototype, "views", 2);
|
|
4927
5137
|
__decorateClass$7([
|
|
4928
|
-
n2({ type:
|
|
4929
|
-
], MutationsComponent.prototype, "
|
|
5138
|
+
n2({ type: String })
|
|
5139
|
+
], MutationsComponent.prototype, "width", 2);
|
|
5140
|
+
__decorateClass$7([
|
|
5141
|
+
n2({ type: String })
|
|
5142
|
+
], MutationsComponent.prototype, "height", 2);
|
|
4930
5143
|
__decorateClass$7([
|
|
4931
5144
|
n2({ type: String })
|
|
4932
5145
|
], MutationsComponent.prototype, "headline", 2);
|
|
@@ -6321,10 +6534,10 @@ class SlidingOperator {
|
|
|
6321
6534
|
}
|
|
6322
6535
|
function queryPrevalenceOverTime(numeratorFilter, denominatorFilter, granularity, smoothingWindow, lapis, signal) {
|
|
6323
6536
|
const numeratorFilters = makeArray(numeratorFilter);
|
|
6324
|
-
const denominatorData = fetchAndPrepare(
|
|
6537
|
+
const denominatorData = fetchAndPrepare(denominatorFilter, granularity, smoothingWindow);
|
|
6325
6538
|
const subQueries = numeratorFilters.map(async (namedLapisFilter) => {
|
|
6326
|
-
const { displayName,
|
|
6327
|
-
const numeratorData = fetchAndPrepare(
|
|
6539
|
+
const { displayName, lapisFilter } = namedLapisFilter;
|
|
6540
|
+
const numeratorData = fetchAndPrepare(lapisFilter, granularity, smoothingWindow);
|
|
6328
6541
|
const divide = new DivisionOperator(
|
|
6329
6542
|
numeratorData,
|
|
6330
6543
|
denominatorData,
|
|
@@ -6342,10 +6555,6 @@ function queryPrevalenceOverTime(numeratorFilter, denominatorFilter, granularity
|
|
|
6342
6555
|
});
|
|
6343
6556
|
return Promise.all(subQueries);
|
|
6344
6557
|
}
|
|
6345
|
-
function getFilter(filter) {
|
|
6346
|
-
const { displayName, ...filterWithoutDisplayName } = filter;
|
|
6347
|
-
return filterWithoutDisplayName;
|
|
6348
|
-
}
|
|
6349
6558
|
function makeArray(arrayOrSingleItem) {
|
|
6350
6559
|
if (Array.isArray(arrayOrSingleItem)) {
|
|
6351
6560
|
return arrayOrSingleItem;
|
|
@@ -6472,11 +6681,12 @@ const PrevalenceOverTime = ({
|
|
|
6472
6681
|
smoothingWindow,
|
|
6473
6682
|
views,
|
|
6474
6683
|
confidenceIntervalMethods,
|
|
6475
|
-
|
|
6684
|
+
width,
|
|
6685
|
+
height,
|
|
6476
6686
|
headline = "Prevalence over time"
|
|
6477
6687
|
}) => {
|
|
6478
|
-
const
|
|
6479
|
-
return /* @__PURE__ */ u$1(ErrorBoundary, { size,
|
|
6688
|
+
const size = { height, width };
|
|
6689
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
|
|
6480
6690
|
PrevalenceOverTimeInner,
|
|
6481
6691
|
{
|
|
6482
6692
|
numerator,
|
|
@@ -6635,14 +6845,15 @@ var __decorateClass$6 = (decorators, target, key, kind) => {
|
|
|
6635
6845
|
let PrevalenceOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles {
|
|
6636
6846
|
constructor() {
|
|
6637
6847
|
super(...arguments);
|
|
6638
|
-
this.numerator = { displayName: "" };
|
|
6639
|
-
this.denominator = {
|
|
6848
|
+
this.numerator = { displayName: "", lapisFilter: {} };
|
|
6849
|
+
this.denominator = {};
|
|
6640
6850
|
this.granularity = "day";
|
|
6641
6851
|
this.smoothingWindow = 0;
|
|
6642
6852
|
this.views = ["bar", "line", "bubble", "table"];
|
|
6643
6853
|
this.confidenceIntervalMethods = ["wilson"];
|
|
6644
6854
|
this.headline = "Prevalence over time";
|
|
6645
|
-
this.
|
|
6855
|
+
this.width = "100%";
|
|
6856
|
+
this.height = "700px";
|
|
6646
6857
|
}
|
|
6647
6858
|
render() {
|
|
6648
6859
|
return /* @__PURE__ */ u$1(
|
|
@@ -6654,7 +6865,8 @@ let PrevalenceOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles
|
|
|
6654
6865
|
smoothingWindow: this.smoothingWindow,
|
|
6655
6866
|
views: this.views,
|
|
6656
6867
|
confidenceIntervalMethods: this.confidenceIntervalMethods,
|
|
6657
|
-
|
|
6868
|
+
width: this.width,
|
|
6869
|
+
height: this.height,
|
|
6658
6870
|
headline: this.headline
|
|
6659
6871
|
}
|
|
6660
6872
|
);
|
|
@@ -6682,8 +6894,11 @@ __decorateClass$6([
|
|
|
6682
6894
|
n2({ type: String })
|
|
6683
6895
|
], PrevalenceOverTimeComponent.prototype, "headline", 2);
|
|
6684
6896
|
__decorateClass$6([
|
|
6685
|
-
n2({ type:
|
|
6686
|
-
], PrevalenceOverTimeComponent.prototype, "
|
|
6897
|
+
n2({ type: String })
|
|
6898
|
+
], PrevalenceOverTimeComponent.prototype, "width", 2);
|
|
6899
|
+
__decorateClass$6([
|
|
6900
|
+
n2({ type: String })
|
|
6901
|
+
], PrevalenceOverTimeComponent.prototype, "height", 2);
|
|
6687
6902
|
PrevalenceOverTimeComponent = __decorateClass$6([
|
|
6688
6903
|
t$2("gs-prevalence-over-time")
|
|
6689
6904
|
], PrevalenceOverTimeComponent);
|
|
@@ -6874,14 +7089,15 @@ function toYearMonthDay(d2) {
|
|
|
6874
7089
|
}
|
|
6875
7090
|
const RelativeGrowthAdvantage = ({
|
|
6876
7091
|
views,
|
|
6877
|
-
|
|
7092
|
+
width,
|
|
7093
|
+
height,
|
|
6878
7094
|
numerator,
|
|
6879
7095
|
denominator,
|
|
6880
7096
|
generationTime,
|
|
6881
7097
|
headline = "Relative growth advantage"
|
|
6882
7098
|
}) => {
|
|
6883
|
-
const
|
|
6884
|
-
return /* @__PURE__ */ u$1(ErrorBoundary, { size,
|
|
7099
|
+
const size = { height, width };
|
|
7100
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
|
|
6885
7101
|
RelativeGrowthAdvantageInner,
|
|
6886
7102
|
{
|
|
6887
7103
|
views,
|
|
@@ -7010,7 +7226,8 @@ let RelativeGrowthAdvantageComponent = class extends PreactLitAdapter {
|
|
|
7010
7226
|
this.generationTime = 7;
|
|
7011
7227
|
this.views = ["line"];
|
|
7012
7228
|
this.headline = "Relative growth advantage";
|
|
7013
|
-
this.
|
|
7229
|
+
this.width = "100%";
|
|
7230
|
+
this.height = "700px";
|
|
7014
7231
|
}
|
|
7015
7232
|
render() {
|
|
7016
7233
|
return /* @__PURE__ */ u$1(
|
|
@@ -7020,7 +7237,8 @@ let RelativeGrowthAdvantageComponent = class extends PreactLitAdapter {
|
|
|
7020
7237
|
denominator: this.denominator,
|
|
7021
7238
|
generationTime: this.generationTime,
|
|
7022
7239
|
views: this.views,
|
|
7023
|
-
|
|
7240
|
+
width: this.width,
|
|
7241
|
+
height: this.height,
|
|
7024
7242
|
headline: this.headline
|
|
7025
7243
|
}
|
|
7026
7244
|
);
|
|
@@ -7042,8 +7260,11 @@ __decorateClass$5([
|
|
|
7042
7260
|
n2({ type: String })
|
|
7043
7261
|
], RelativeGrowthAdvantageComponent.prototype, "headline", 2);
|
|
7044
7262
|
__decorateClass$5([
|
|
7045
|
-
n2({ type:
|
|
7046
|
-
], RelativeGrowthAdvantageComponent.prototype, "
|
|
7263
|
+
n2({ type: String })
|
|
7264
|
+
], RelativeGrowthAdvantageComponent.prototype, "width", 2);
|
|
7265
|
+
__decorateClass$5([
|
|
7266
|
+
n2({ type: String })
|
|
7267
|
+
], RelativeGrowthAdvantageComponent.prototype, "height", 2);
|
|
7047
7268
|
RelativeGrowthAdvantageComponent = __decorateClass$5([
|
|
7048
7269
|
t$2("gs-relative-growth-advantage")
|
|
7049
7270
|
], RelativeGrowthAdvantageComponent);
|
|
@@ -7080,13 +7301,14 @@ async function queryAggregateData(variant, fields, lapis, signal) {
|
|
|
7080
7301
|
}
|
|
7081
7302
|
const Aggregate = ({
|
|
7082
7303
|
views,
|
|
7083
|
-
|
|
7304
|
+
width,
|
|
7305
|
+
height,
|
|
7084
7306
|
headline = "Mutations",
|
|
7085
7307
|
filter,
|
|
7086
7308
|
fields
|
|
7087
7309
|
}) => {
|
|
7088
|
-
const
|
|
7089
|
-
return /* @__PURE__ */ u$1(ErrorBoundary, { size,
|
|
7310
|
+
const size = { height, width };
|
|
7311
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(AggregateInner, { fields, filter, views }) }) }) });
|
|
7090
7312
|
};
|
|
7091
7313
|
const AggregateInner = ({ fields, views, filter }) => {
|
|
7092
7314
|
const lapis = P(LapisUrlContext);
|
|
@@ -7140,7 +7362,8 @@ let AggregateComponent = class extends PreactLitAdapterWithGridJsStyles {
|
|
|
7140
7362
|
this.fields = [];
|
|
7141
7363
|
this.views = ["table"];
|
|
7142
7364
|
this.filter = {};
|
|
7143
|
-
this.
|
|
7365
|
+
this.width = "100%";
|
|
7366
|
+
this.height = "700px";
|
|
7144
7367
|
this.headline = "Aggregate";
|
|
7145
7368
|
}
|
|
7146
7369
|
render() {
|
|
@@ -7150,7 +7373,8 @@ let AggregateComponent = class extends PreactLitAdapterWithGridJsStyles {
|
|
|
7150
7373
|
fields: this.fields,
|
|
7151
7374
|
views: this.views,
|
|
7152
7375
|
filter: this.filter,
|
|
7153
|
-
|
|
7376
|
+
width: this.width,
|
|
7377
|
+
height: this.height,
|
|
7154
7378
|
headline: this.headline
|
|
7155
7379
|
}
|
|
7156
7380
|
);
|
|
@@ -7166,8 +7390,11 @@ __decorateClass$4([
|
|
|
7166
7390
|
n2({ type: Object })
|
|
7167
7391
|
], AggregateComponent.prototype, "filter", 2);
|
|
7168
7392
|
__decorateClass$4([
|
|
7169
|
-
n2({ type:
|
|
7170
|
-
], AggregateComponent.prototype, "
|
|
7393
|
+
n2({ type: String })
|
|
7394
|
+
], AggregateComponent.prototype, "width", 2);
|
|
7395
|
+
__decorateClass$4([
|
|
7396
|
+
n2({ type: String })
|
|
7397
|
+
], AggregateComponent.prototype, "height", 2);
|
|
7171
7398
|
__decorateClass$4([
|
|
7172
7399
|
n2({ type: String })
|
|
7173
7400
|
], AggregateComponent.prototype, "headline", 2);
|
|
@@ -7201,23 +7428,25 @@ const DateRangeSelector = ({
|
|
|
7201
7428
|
customSelectOptions,
|
|
7202
7429
|
earliestDate = "1900-01-01",
|
|
7203
7430
|
initialValue,
|
|
7204
|
-
width
|
|
7431
|
+
width,
|
|
7432
|
+
dateColumn
|
|
7205
7433
|
}) => {
|
|
7206
|
-
const
|
|
7207
|
-
|
|
7208
|
-
return /* @__PURE__ */ u$1(ErrorBoundary, { defaultSize, size, children: /* @__PURE__ */ u$1(ResizeContainer, { defaultSize, size, children: /* @__PURE__ */ u$1(
|
|
7434
|
+
const size = { width, height: "3rem" };
|
|
7435
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(
|
|
7209
7436
|
DateRangeSelectorInner,
|
|
7210
7437
|
{
|
|
7211
7438
|
customSelectOptions,
|
|
7212
7439
|
earliestDate,
|
|
7213
|
-
initialValue
|
|
7440
|
+
initialValue,
|
|
7441
|
+
dateColumn
|
|
7214
7442
|
}
|
|
7215
7443
|
) }) });
|
|
7216
7444
|
};
|
|
7217
7445
|
const DateRangeSelectorInner = ({
|
|
7218
7446
|
customSelectOptions,
|
|
7219
7447
|
earliestDate = "1900-01-01",
|
|
7220
|
-
initialValue
|
|
7448
|
+
initialValue,
|
|
7449
|
+
dateColumn
|
|
7221
7450
|
}) => {
|
|
7222
7451
|
const fromDatePickerRef = F(null);
|
|
7223
7452
|
const toDatePickerRef = F(null);
|
|
@@ -7294,8 +7523,8 @@ const DateRangeSelectorInner = ({
|
|
|
7294
7523
|
const dateFrom = toYYYYMMDD(dateFromPicker == null ? void 0 : dateFromPicker.selectedDates[0]);
|
|
7295
7524
|
const dateTo = toYYYYMMDD(dateToPicker == null ? void 0 : dateToPicker.selectedDates[0]);
|
|
7296
7525
|
const detail = {
|
|
7297
|
-
...dateFrom !== void 0 && { dateFrom },
|
|
7298
|
-
...dateTo !== void 0 && { dateTo }
|
|
7526
|
+
...dateFrom !== void 0 && { [`${dateColumn}From`]: dateFrom },
|
|
7527
|
+
...dateTo !== void 0 && { [`${dateColumn}To`]: dateTo }
|
|
7299
7528
|
};
|
|
7300
7529
|
(_a = divRef.current) == null ? void 0 : _a.dispatchEvent(
|
|
7301
7530
|
new CustomEvent("gs-date-range-changed", {
|
|
@@ -7409,7 +7638,8 @@ let DateRangeSelectorComponent = class extends PreactLitAdapter {
|
|
|
7409
7638
|
this.customSelectOptions = [];
|
|
7410
7639
|
this.earliestDate = "1900-01-01";
|
|
7411
7640
|
this.initialValue = "last6Months";
|
|
7412
|
-
this.width =
|
|
7641
|
+
this.width = "100%";
|
|
7642
|
+
this.dateColumn = "date";
|
|
7413
7643
|
}
|
|
7414
7644
|
render() {
|
|
7415
7645
|
return /* @__PURE__ */ u$1(
|
|
@@ -7418,6 +7648,7 @@ let DateRangeSelectorComponent = class extends PreactLitAdapter {
|
|
|
7418
7648
|
customSelectOptions: this.customSelectOptions,
|
|
7419
7649
|
earliestDate: this.earliestDate,
|
|
7420
7650
|
initialValue: this.initialValue,
|
|
7651
|
+
dateColumn: this.dateColumn,
|
|
7421
7652
|
width: this.width
|
|
7422
7653
|
}
|
|
7423
7654
|
);
|
|
@@ -7433,15 +7664,29 @@ __decorateClass$3([
|
|
|
7433
7664
|
n2()
|
|
7434
7665
|
], DateRangeSelectorComponent.prototype, "initialValue", 2);
|
|
7435
7666
|
__decorateClass$3([
|
|
7436
|
-
n2({ type:
|
|
7667
|
+
n2({ type: String })
|
|
7437
7668
|
], DateRangeSelectorComponent.prototype, "width", 2);
|
|
7669
|
+
__decorateClass$3([
|
|
7670
|
+
n2({ type: String })
|
|
7671
|
+
], DateRangeSelectorComponent.prototype, "dateColumn", 2);
|
|
7438
7672
|
DateRangeSelectorComponent = __decorateClass$3([
|
|
7439
7673
|
t$2("gs-date-range-selector")
|
|
7440
7674
|
], DateRangeSelectorComponent);
|
|
7441
7675
|
async function fetchAutocompletionList(fields, lapis, signal) {
|
|
7442
7676
|
const toAncestorInHierarchyOverwriteValues = Array(fields.length - 1).fill(0).map((_2, i2) => i2 + 1).map((i2) => fields.slice(i2).reduce((acc, field) => ({ ...acc, [field]: null }), {}));
|
|
7443
7677
|
const fetchAggregatedOperator = new FetchAggregatedOperator({}, fields);
|
|
7444
|
-
|
|
7678
|
+
let data;
|
|
7679
|
+
try {
|
|
7680
|
+
data = (await fetchAggregatedOperator.evaluate(lapis, signal)).content;
|
|
7681
|
+
} catch (error) {
|
|
7682
|
+
if (error instanceof LapisError) {
|
|
7683
|
+
throw new UserFacingError(
|
|
7684
|
+
`Failed to fetch autocomplete list from LAPIS: ${error.problemDetail.status} ${error.problemDetail.title ?? ""}`,
|
|
7685
|
+
error.problemDetail.detail ?? error.message
|
|
7686
|
+
);
|
|
7687
|
+
}
|
|
7688
|
+
throw error;
|
|
7689
|
+
}
|
|
7445
7690
|
const locationValues = data.map((entry) => fields.reduce((acc, field) => ({ ...acc, [field]: entry[field] }), {})).reduce((setOfAllHierarchies, entry) => {
|
|
7446
7691
|
setOfAllHierarchies.add(JSON.stringify(entry));
|
|
7447
7692
|
toAncestorInHierarchyOverwriteValues.forEach((overwriteValues) => {
|
|
@@ -7471,9 +7716,8 @@ function compareLocationEntries(fields) {
|
|
|
7471
7716
|
};
|
|
7472
7717
|
}
|
|
7473
7718
|
const LocationFilter = ({ width, initialValue, fields }) => {
|
|
7474
|
-
const
|
|
7475
|
-
|
|
7476
|
-
return /* @__PURE__ */ u$1(ErrorBoundary, { defaultSize, size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, defaultSize, children: /* @__PURE__ */ u$1(LocationFilterInner, { initialValue, fields }) }) });
|
|
7719
|
+
const size = { width, height: "3rem" };
|
|
7720
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(LocationFilterInner, { initialValue, fields }) }) });
|
|
7477
7721
|
};
|
|
7478
7722
|
const LocationFilterInner = ({ initialValue, fields }) => {
|
|
7479
7723
|
const lapis = P(LapisUrlContext);
|
|
@@ -7561,7 +7805,7 @@ let LocationFilterComponent = class extends PreactLitAdapter {
|
|
|
7561
7805
|
super(...arguments);
|
|
7562
7806
|
this.initialValue = "";
|
|
7563
7807
|
this.fields = [];
|
|
7564
|
-
this.width =
|
|
7808
|
+
this.width = "100%";
|
|
7565
7809
|
}
|
|
7566
7810
|
render() {
|
|
7567
7811
|
return /* @__PURE__ */ u$1(LocationFilter, { initialValue: this.initialValue, fields: this.fields, width: this.width });
|
|
@@ -7574,7 +7818,7 @@ __decorateClass$2([
|
|
|
7574
7818
|
n2({ type: Array })
|
|
7575
7819
|
], LocationFilterComponent.prototype, "fields", 2);
|
|
7576
7820
|
__decorateClass$2([
|
|
7577
|
-
n2({ type:
|
|
7821
|
+
n2({ type: String })
|
|
7578
7822
|
], LocationFilterComponent.prototype, "width", 2);
|
|
7579
7823
|
LocationFilterComponent = __decorateClass$2([
|
|
7580
7824
|
t$2("gs-location-filter")
|
|
@@ -7585,9 +7829,8 @@ async function fetchAutocompleteList(lapis, field, signal) {
|
|
|
7585
7829
|
return data.map((item) => item[field]);
|
|
7586
7830
|
}
|
|
7587
7831
|
const TextInput = ({ width, lapisField, placeholderText, initialValue }) => {
|
|
7588
|
-
const
|
|
7589
|
-
|
|
7590
|
-
return /* @__PURE__ */ u$1(ErrorBoundary, { defaultSize, size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, defaultSize, children: /* @__PURE__ */ u$1(TextInputInner, { lapisField, placeholderText, initialValue }) }) });
|
|
7832
|
+
const size = { width, height: "3rem" };
|
|
7833
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(TextInputInner, { lapisField, placeholderText, initialValue }) }) });
|
|
7591
7834
|
};
|
|
7592
7835
|
const TextInputInner = ({
|
|
7593
7836
|
lapisField,
|
|
@@ -7658,7 +7901,7 @@ let TextInputComponent = class extends PreactLitAdapter {
|
|
|
7658
7901
|
this.initialValue = "";
|
|
7659
7902
|
this.lapisField = "";
|
|
7660
7903
|
this.placeholderText = "";
|
|
7661
|
-
this.width =
|
|
7904
|
+
this.width = "100%";
|
|
7662
7905
|
}
|
|
7663
7906
|
render() {
|
|
7664
7907
|
return /* @__PURE__ */ u$1(
|
|
@@ -7682,7 +7925,7 @@ __decorateClass$1([
|
|
|
7682
7925
|
n2()
|
|
7683
7926
|
], TextInputComponent.prototype, "placeholderText", 2);
|
|
7684
7927
|
__decorateClass$1([
|
|
7685
|
-
n2({ type:
|
|
7928
|
+
n2({ type: String })
|
|
7686
7929
|
], TextInputComponent.prototype, "width", 2);
|
|
7687
7930
|
TextInputComponent = __decorateClass$1([
|
|
7688
7931
|
t$2("gs-text-input")
|
|
@@ -7763,9 +8006,9 @@ const DeleteIcon = () => {
|
|
|
7763
8006
|
}
|
|
7764
8007
|
);
|
|
7765
8008
|
};
|
|
7766
|
-
const MutationFilter = ({ initialValue,
|
|
7767
|
-
const
|
|
7768
|
-
return /* @__PURE__ */ u$1(ErrorBoundary, { size,
|
|
8009
|
+
const MutationFilter = ({ initialValue, width, height }) => {
|
|
8010
|
+
const size = { height, width };
|
|
8011
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, children: /* @__PURE__ */ u$1(MutationFilterInner, { initialValue }) }) });
|
|
7769
8012
|
};
|
|
7770
8013
|
const MutationFilterInner = ({ initialValue }) => {
|
|
7771
8014
|
const referenceGenome = P(ReferenceGenomeContext);
|
|
@@ -8011,18 +8254,22 @@ let MutationFilterComponent = class extends PreactLitAdapter {
|
|
|
8011
8254
|
constructor() {
|
|
8012
8255
|
super(...arguments);
|
|
8013
8256
|
this.initialValue = void 0;
|
|
8014
|
-
this.
|
|
8257
|
+
this.width = "100%";
|
|
8258
|
+
this.height = "6.5rem";
|
|
8015
8259
|
}
|
|
8016
8260
|
render() {
|
|
8017
|
-
return /* @__PURE__ */ u$1(ReferenceGenomesAwaiter, { children: /* @__PURE__ */ u$1(MutationFilter, { initialValue: this.initialValue,
|
|
8261
|
+
return /* @__PURE__ */ u$1(ReferenceGenomesAwaiter, { children: /* @__PURE__ */ u$1(MutationFilter, { initialValue: this.initialValue, width: this.width, height: this.height }) });
|
|
8018
8262
|
}
|
|
8019
8263
|
};
|
|
8020
8264
|
__decorateClass([
|
|
8021
8265
|
n2()
|
|
8022
8266
|
], MutationFilterComponent.prototype, "initialValue", 2);
|
|
8023
8267
|
__decorateClass([
|
|
8024
|
-
n2({ type:
|
|
8025
|
-
], MutationFilterComponent.prototype, "
|
|
8268
|
+
n2({ type: String })
|
|
8269
|
+
], MutationFilterComponent.prototype, "width", 2);
|
|
8270
|
+
__decorateClass([
|
|
8271
|
+
n2({ type: String })
|
|
8272
|
+
], MutationFilterComponent.prototype, "height", 2);
|
|
8026
8273
|
MutationFilterComponent = __decorateClass([
|
|
8027
8274
|
t$2("gs-mutation-filter")
|
|
8028
8275
|
], MutationFilterComponent);
|