@genspectrum/dashboard-components 0.1.4 → 0.2.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 +1021 -804
- package/dist/dashboard-components.js +647 -218
- package/dist/dashboard-components.js.map +1 -1
- package/dist/genspectrum-components.d.ts +336 -126
- package/dist/style.css +214 -36
- package/package.json +4 -4
- package/src/preact/aggregatedData/aggregate.stories.tsx +2 -0
- package/src/preact/aggregatedData/aggregate.tsx +33 -28
- package/src/preact/components/error-boundary.stories.tsx +62 -0
- package/src/preact/components/error-boundary.tsx +31 -0
- package/src/preact/components/error-display.stories.tsx +24 -3
- package/src/preact/components/error-display.tsx +14 -1
- package/src/preact/components/headline.stories.tsx +19 -1
- package/src/preact/components/headline.tsx +9 -1
- package/src/preact/components/info.stories.tsx +24 -3
- package/src/preact/components/info.tsx +49 -5
- package/src/preact/components/loading-display.stories.tsx +6 -6
- package/src/preact/components/loading-display.tsx +1 -1
- package/src/preact/components/no-data-display.tsx +5 -1
- package/src/preact/dateRangeSelector/date-range-selector.stories.tsx +17 -0
- package/src/preact/dateRangeSelector/date-range-selector.tsx +43 -15
- package/src/preact/locationFilter/location-filter.stories.tsx +23 -6
- package/src/preact/locationFilter/location-filter.tsx +29 -18
- package/src/preact/mutationComparison/mutation-comparison.stories.tsx +3 -0
- package/src/preact/mutationComparison/mutation-comparison.tsx +31 -27
- package/src/preact/mutationFilter/mutation-filter.stories.tsx +17 -2
- package/src/preact/mutationFilter/mutation-filter.tsx +26 -8
- package/src/preact/mutations/mutations.stories.tsx +3 -0
- package/src/preact/mutations/mutations.tsx +32 -26
- package/src/preact/prevalenceOverTime/prevalence-over-time.stories.tsx +4 -0
- package/src/preact/prevalenceOverTime/prevalence-over-time.tsx +57 -31
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx +3 -0
- package/src/preact/relativeGrowthAdvantage/relative-growth-advantage.tsx +89 -32
- package/src/preact/textInput/text-input.tsx +26 -3
- package/src/web-components/app.stories.ts +1 -2
- package/src/web-components/app.ts +4 -2
- package/src/web-components/index.ts +1 -1
- package/src/web-components/input/{date-range-selector-component.stories.ts → gs-date-range-selector.stories.ts} +35 -3
- package/src/web-components/input/gs-date-range-selector.tsx +110 -0
- package/src/web-components/input/{location-filter-component.stories.ts → gs-location-filter.stories.ts} +29 -4
- package/src/web-components/input/{location-filter-component.tsx → gs-location-filter.tsx} +12 -1
- package/src/web-components/input/{mutation-filter-component.stories.ts → gs-mutation-filter.stories.ts} +30 -4
- package/src/web-components/input/gs-mutation-filter.tsx +114 -0
- package/src/web-components/input/{text-input-component.stories.ts → gs-text-input.stories.ts} +42 -3
- package/src/web-components/input/gs-text-input.tsx +73 -0
- package/src/web-components/input/index.ts +4 -4
- package/src/web-components/visualization/data_visualization_statistical_analysis.mdx +26 -0
- package/src/web-components/{display/aggregate-component.stories.ts → visualization/gs-aggregate.stories.ts} +8 -6
- package/src/web-components/{display/aggregate-component.tsx → visualization/gs-aggregate.tsx} +16 -2
- package/src/web-components/{display/mutation-comparison-component.stories.ts → visualization/gs-mutation-comparison.stories.ts} +11 -9
- package/src/web-components/{display/mutation-comparison-component.tsx → visualization/gs-mutation-comparison.tsx} +8 -1
- package/src/web-components/{display/mutations-component.stories.ts → visualization/gs-mutations.stories.ts} +30 -11
- package/src/web-components/visualization/gs-mutations.tsx +94 -0
- package/src/web-components/{display/prevalence-over-time-component.stories.ts → visualization/gs-prevalence-over-time.stories.ts} +24 -1
- package/src/web-components/visualization/gs-prevalence-over-time.tsx +148 -0
- package/src/web-components/{display/relative-growth-advantage-component.stories.ts → visualization/gs-relative-growth-advantage.stories.ts} +21 -1
- package/src/web-components/visualization/gs-relative-growth-advantage.tsx +100 -0
- package/src/web-components/visualization/index.ts +5 -0
- package/src/web-components/display/index.ts +0 -5
- package/src/web-components/display/mutations-component.tsx +0 -40
- package/src/web-components/display/prevalence-over-time-component.tsx +0 -58
- package/src/web-components/display/relative-growth-advantage-component.tsx +0 -49
- package/src/web-components/input/date-range-selector-component.tsx +0 -46
- package/src/web-components/input/mutation-filter-component.tsx +0 -35
- package/src/web-components/input/text-input-component.tsx +0 -39
|
@@ -93,7 +93,7 @@ const { is: i$1, defineProperty: e$1, getOwnPropertyDescriptor: r$2, getOwnPrope
|
|
|
93
93
|
return i2;
|
|
94
94
|
} }, f$2 = (t2, s2) => !i$1(t2, s2), y$1 = { attribute: true, type: String, converter: u$2, reflect: false, hasChanged: f$2 };
|
|
95
95
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), a$1.litPropertyMetadata ?? (a$1.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
96
|
-
class b extends HTMLElement {
|
|
96
|
+
let b$1 = class b extends HTMLElement {
|
|
97
97
|
static addInitializer(t2) {
|
|
98
98
|
this._$Ei(), (this.l ?? (this.l = [])).push(t2);
|
|
99
99
|
}
|
|
@@ -303,8 +303,8 @@ class b extends HTMLElement {
|
|
|
303
303
|
}
|
|
304
304
|
firstUpdated(t2) {
|
|
305
305
|
}
|
|
306
|
-
}
|
|
307
|
-
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[d$1("elementProperties")] = /* @__PURE__ */ new Map(), b[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1 == null ? void 0 : p$1({ ReactiveElement: b }), (a$1.reactiveElementVersions ?? (a$1.reactiveElementVersions = [])).push("2.0.4");
|
|
306
|
+
};
|
|
307
|
+
b$1.elementStyles = [], b$1.shadowRootOptions = { mode: "open" }, b$1[d$1("elementProperties")] = /* @__PURE__ */ new Map(), b$1[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1 == null ? void 0 : p$1({ ReactiveElement: b$1 }), (a$1.reactiveElementVersions ?? (a$1.reactiveElementVersions = [])).push("2.0.4");
|
|
308
308
|
/**
|
|
309
309
|
* @license
|
|
310
310
|
* Copyright 2017 Google LLC
|
|
@@ -492,9 +492,9 @@ let App = class extends LitElement {
|
|
|
492
492
|
render() {
|
|
493
493
|
return this.updateReferenceGenome.render({
|
|
494
494
|
complete: () => html` <slot></slot>`,
|
|
495
|
-
error: () => html
|
|
496
|
-
|
|
497
|
-
|
|
495
|
+
error: () => html` <div class="m-2 w-full alert alert-error">
|
|
496
|
+
Error: Cannot fetch reference genome. Is LAPIS available?
|
|
497
|
+
</div>`
|
|
498
498
|
});
|
|
499
499
|
}
|
|
500
500
|
createRenderRoot() {
|
|
@@ -586,6 +586,14 @@ function P(n3) {
|
|
|
586
586
|
var u2 = r.context[n3.__c], i2 = h(t++, 9);
|
|
587
587
|
return i2.c = n3, u2 ? (null == i2.__ && (i2.__ = true, u2.sub(r)), u2.props.value) : n3.__;
|
|
588
588
|
}
|
|
589
|
+
function b2(n3) {
|
|
590
|
+
var u2 = h(t++, 10), i2 = p();
|
|
591
|
+
return u2.__ = n3, r.componentDidCatch || (r.componentDidCatch = function(n4, t2) {
|
|
592
|
+
u2.__ && u2.__(n4, t2), i2[1](n4);
|
|
593
|
+
}), [i2[0], function() {
|
|
594
|
+
i2[1](void 0);
|
|
595
|
+
}];
|
|
596
|
+
}
|
|
589
597
|
function j() {
|
|
590
598
|
for (var n3; n3 = f.shift(); )
|
|
591
599
|
if (n3.__P && n3.__H)
|
|
@@ -850,45 +858,45 @@ const bases = {
|
|
|
850
858
|
"-"
|
|
851
859
|
]
|
|
852
860
|
};
|
|
853
|
-
const sortSubstitutionsAndDeletions = (a2,
|
|
854
|
-
if (a2.segment !==
|
|
855
|
-
compareSegments(a2.segment,
|
|
861
|
+
const sortSubstitutionsAndDeletions = (a2, b3) => {
|
|
862
|
+
if (a2.segment !== b3.segment) {
|
|
863
|
+
compareSegments(a2.segment, b3.segment);
|
|
856
864
|
}
|
|
857
|
-
if (a2.position !==
|
|
858
|
-
return comparePositions(a2.position,
|
|
865
|
+
if (a2.position !== b3.position) {
|
|
866
|
+
return comparePositions(a2.position, b3.position);
|
|
859
867
|
}
|
|
860
868
|
const aIsDeletion = a2 instanceof Deletion;
|
|
861
|
-
const bIsDeletion =
|
|
869
|
+
const bIsDeletion = b3 instanceof Deletion;
|
|
862
870
|
if (aIsDeletion !== bIsDeletion) {
|
|
863
871
|
return aIsDeletion ? 1 : -1;
|
|
864
872
|
}
|
|
865
873
|
if (!aIsDeletion && !bIsDeletion) {
|
|
866
|
-
if (a2.substitutionValue !==
|
|
867
|
-
return compareSubstitutionValues(a2.substitutionValue,
|
|
874
|
+
if (a2.substitutionValue !== b3.substitutionValue) {
|
|
875
|
+
return compareSubstitutionValues(a2.substitutionValue, b3.substitutionValue);
|
|
868
876
|
}
|
|
869
877
|
}
|
|
870
878
|
return 0;
|
|
871
879
|
};
|
|
872
|
-
const compareSegments = (a2,
|
|
880
|
+
const compareSegments = (a2, b3) => {
|
|
873
881
|
if (a2 === void 0) {
|
|
874
882
|
return -1;
|
|
875
883
|
}
|
|
876
|
-
if (
|
|
884
|
+
if (b3 === void 0) {
|
|
877
885
|
return 1;
|
|
878
886
|
}
|
|
879
|
-
return a2.localeCompare(
|
|
887
|
+
return a2.localeCompare(b3);
|
|
880
888
|
};
|
|
881
|
-
const comparePositions = (a2,
|
|
882
|
-
return a2 -
|
|
889
|
+
const comparePositions = (a2, b3) => {
|
|
890
|
+
return a2 - b3;
|
|
883
891
|
};
|
|
884
|
-
const compareSubstitutionValues = (a2,
|
|
892
|
+
const compareSubstitutionValues = (a2, b3) => {
|
|
885
893
|
if (a2 === void 0) {
|
|
886
894
|
return -1;
|
|
887
895
|
}
|
|
888
|
-
if (
|
|
896
|
+
if (b3 === void 0) {
|
|
889
897
|
return 1;
|
|
890
898
|
}
|
|
891
|
-
return a2.localeCompare(
|
|
899
|
+
return a2.localeCompare(b3);
|
|
892
900
|
};
|
|
893
901
|
const formatProportion = (proportion) => {
|
|
894
902
|
return `${(proportion * 100).toFixed(2)}%`;
|
|
@@ -1081,11 +1089,11 @@ class SortOperator {
|
|
|
1081
1089
|
}
|
|
1082
1090
|
function querySubstitutionsOrDeletions(variant, sequenceType, lapis, signal) {
|
|
1083
1091
|
const fetchData = new FetchSubstitutionsOrDeletionsOperator(variant, sequenceType, 0);
|
|
1084
|
-
const sortData = new SortOperator(fetchData, (a2,
|
|
1085
|
-
if (a2.mutation.segment !==
|
|
1086
|
-
return (a2.mutation.segment ?? "").localeCompare(
|
|
1092
|
+
const sortData = new SortOperator(fetchData, (a2, b3) => {
|
|
1093
|
+
if (a2.mutation.segment !== b3.mutation.segment) {
|
|
1094
|
+
return (a2.mutation.segment ?? "").localeCompare(b3.mutation.segment ?? "");
|
|
1087
1095
|
}
|
|
1088
|
-
return a2.mutation.position -
|
|
1096
|
+
return a2.mutation.position - b3.mutation.position;
|
|
1089
1097
|
});
|
|
1090
1098
|
return sortData.evaluate(lapis, signal);
|
|
1091
1099
|
}
|
|
@@ -1218,13 +1226,35 @@ const CsvDownloadButton = ({
|
|
|
1218
1226
|
};
|
|
1219
1227
|
return /* @__PURE__ */ u$1("button", { className, onClick: download, children: label });
|
|
1220
1228
|
};
|
|
1229
|
+
class UserFacingError extends Error {
|
|
1230
|
+
constructor(message) {
|
|
1231
|
+
super(message);
|
|
1232
|
+
this.name = "UserFacingError";
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1221
1235
|
const ErrorDisplay = ({ error }) => {
|
|
1222
|
-
return /* @__PURE__ */ u$1("div", { children: [
|
|
1223
|
-
"
|
|
1224
|
-
|
|
1236
|
+
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
|
+
/* @__PURE__ */ u$1("div", { className: "text-red-700 font-bold", children: "Error" }),
|
|
1238
|
+
/* @__PURE__ */ u$1("div", { children: "Oops! Something went wrong." }),
|
|
1239
|
+
error instanceof UserFacingError && /* @__PURE__ */ u$1("div", { className: "text-sm text-gray-600", children: error.message })
|
|
1225
1240
|
] });
|
|
1226
1241
|
};
|
|
1242
|
+
const ResizeContainer = ({ children, size, defaultSize }) => {
|
|
1243
|
+
return /* @__PURE__ */ u$1("div", { style: extendByDefault(size, defaultSize), children });
|
|
1244
|
+
};
|
|
1245
|
+
const extendByDefault = (size, defaultSize) => {
|
|
1246
|
+
if (size === void 0) {
|
|
1247
|
+
return defaultSize;
|
|
1248
|
+
}
|
|
1249
|
+
return { ...defaultSize, ...size };
|
|
1250
|
+
};
|
|
1227
1251
|
const Headline = ({ heading, children }) => {
|
|
1252
|
+
if (!heading) {
|
|
1253
|
+
return /* @__PURE__ */ u$1(Fragment, { children });
|
|
1254
|
+
}
|
|
1255
|
+
return /* @__PURE__ */ u$1(ResizingHeadline, { heading, children });
|
|
1256
|
+
};
|
|
1257
|
+
const ResizingHeadline = ({ heading, children }) => {
|
|
1228
1258
|
const ref = F(null);
|
|
1229
1259
|
const [h1Height, setH1Height] = p("2rem");
|
|
1230
1260
|
_(() => {
|
|
@@ -1238,11 +1268,55 @@ const Headline = ({ heading, children }) => {
|
|
|
1238
1268
|
/* @__PURE__ */ u$1("div", { style: { height: `calc(100% - ${h1Height})` }, children })
|
|
1239
1269
|
] });
|
|
1240
1270
|
};
|
|
1241
|
-
const
|
|
1242
|
-
|
|
1271
|
+
const ErrorBoundary = ({
|
|
1272
|
+
size,
|
|
1273
|
+
defaultSize,
|
|
1274
|
+
headline,
|
|
1275
|
+
children
|
|
1276
|
+
}) => {
|
|
1277
|
+
const [internalError] = b2();
|
|
1278
|
+
if (internalError) {
|
|
1279
|
+
console.error(internalError);
|
|
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 }) }) });
|
|
1283
|
+
}
|
|
1284
|
+
return /* @__PURE__ */ u$1(Fragment, { children });
|
|
1285
|
+
};
|
|
1286
|
+
const Info = ({ children, size }) => {
|
|
1287
|
+
const [showHelp, setShowHelp] = p(false);
|
|
1288
|
+
const toggleHelp = () => {
|
|
1289
|
+
setShowHelp(!showHelp);
|
|
1290
|
+
};
|
|
1291
|
+
return /* @__PURE__ */ u$1("div", { className: "relative", children: [
|
|
1292
|
+
/* @__PURE__ */ u$1("button", { className: "btn btn-xs", onClick: toggleHelp, children: "?" }),
|
|
1293
|
+
showHelp && /* @__PURE__ */ u$1(
|
|
1294
|
+
"div",
|
|
1295
|
+
{
|
|
1296
|
+
className: "absolute top-8 right-6 bg-white p-2 border border-black flex flex-col overflow-auto shadow-lg rounded z-50",
|
|
1297
|
+
style: size,
|
|
1298
|
+
children: [
|
|
1299
|
+
/* @__PURE__ */ u$1("div", { className: "flex flex-col", children }),
|
|
1300
|
+
/* @__PURE__ */ u$1("div", { className: "flex justify-end", children: /* @__PURE__ */ u$1("button", { className: "text-sm underline mt-2", onClick: toggleHelp, children: "Close" }) })
|
|
1301
|
+
]
|
|
1302
|
+
}
|
|
1303
|
+
)
|
|
1304
|
+
] });
|
|
1305
|
+
};
|
|
1306
|
+
const InfoHeadline1 = ({ children }) => {
|
|
1307
|
+
return /* @__PURE__ */ u$1("h1", { className: "text-lg font-bold", children });
|
|
1308
|
+
};
|
|
1309
|
+
const InfoHeadline2 = ({ children }) => {
|
|
1310
|
+
return /* @__PURE__ */ u$1("h2", { className: "text-base font-bold mt-4", children });
|
|
1311
|
+
};
|
|
1312
|
+
const InfoParagraph = ({ children }) => {
|
|
1313
|
+
return /* @__PURE__ */ u$1("p", { className: "text-justify my-1", children });
|
|
1314
|
+
};
|
|
1315
|
+
const InfoLink = ({ children, href }) => {
|
|
1316
|
+
return /* @__PURE__ */ u$1("a", { className: "text-blue-600 hover:text-blue-800", href, target: "_blank", rel: "noopener noreferrer", children });
|
|
1243
1317
|
};
|
|
1244
1318
|
const LoadingDisplay = () => {
|
|
1245
|
-
return /* @__PURE__ */ u$1("div", {
|
|
1319
|
+
return /* @__PURE__ */ u$1("div", { "aria-label": "Loading", className: "h-full w-full skeleton" });
|
|
1246
1320
|
};
|
|
1247
1321
|
const MutationTypeSelector = ({
|
|
1248
1322
|
displayedMutationTypes,
|
|
@@ -1261,7 +1335,7 @@ const MutationTypeSelector = ({
|
|
|
1261
1335
|
);
|
|
1262
1336
|
};
|
|
1263
1337
|
const NoDataDisplay = () => {
|
|
1264
|
-
return /* @__PURE__ */ u$1("div", { children: "No data available." });
|
|
1338
|
+
return /* @__PURE__ */ u$1("div", { className: "h-full w-full rounded-md border-2 border-gray-100 p-2 flex items-center justify-center", children: /* @__PURE__ */ u$1("div", { children: "No data available." }) });
|
|
1265
1339
|
};
|
|
1266
1340
|
const MinMaxRangeSlider = ({
|
|
1267
1341
|
min,
|
|
@@ -1431,15 +1505,6 @@ const ProportionSelectorDropdown = ({
|
|
|
1431
1505
|
) }) })
|
|
1432
1506
|
] });
|
|
1433
1507
|
};
|
|
1434
|
-
const ResizeContainer = ({ children, size, defaultSize }) => {
|
|
1435
|
-
return /* @__PURE__ */ u$1("div", { style: extendByDefault(size, defaultSize), children });
|
|
1436
|
-
};
|
|
1437
|
-
const extendByDefault = (size, defaultSize) => {
|
|
1438
|
-
if (size === void 0) {
|
|
1439
|
-
return defaultSize;
|
|
1440
|
-
}
|
|
1441
|
-
return { ...defaultSize, ...size };
|
|
1442
|
-
};
|
|
1443
1508
|
const Tabs = ({ tabs, toolbar }) => {
|
|
1444
1509
|
const [activeTab, setActiveTab] = p(tabs[0].title);
|
|
1445
1510
|
const [heightOfTabs, setHeightOfTabs] = p("3rem");
|
|
@@ -1503,23 +1568,31 @@ const MutationComparison = ({
|
|
|
1503
1568
|
variants,
|
|
1504
1569
|
sequenceType,
|
|
1505
1570
|
views,
|
|
1506
|
-
size
|
|
1571
|
+
size,
|
|
1572
|
+
headline = "Mutation comparison"
|
|
1573
|
+
}) => {
|
|
1574
|
+
const defaultSize = { height: "600px", width: "100%" };
|
|
1575
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, defaultSize, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, defaultSize, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(MutationComparisonInner, { variants, sequenceType, views }) }) }) });
|
|
1576
|
+
};
|
|
1577
|
+
const MutationComparisonInner = ({
|
|
1578
|
+
variants,
|
|
1579
|
+
sequenceType,
|
|
1580
|
+
views
|
|
1507
1581
|
}) => {
|
|
1508
1582
|
const lapis = P(LapisUrlContext);
|
|
1509
1583
|
const { data, error, isLoading } = useQuery(async () => {
|
|
1510
1584
|
return queryMutationData(variants, sequenceType, lapis);
|
|
1511
1585
|
}, [variants, sequenceType, lapis]);
|
|
1512
|
-
const headline = "Mutation comparison";
|
|
1513
1586
|
if (isLoading) {
|
|
1514
|
-
return /* @__PURE__ */ u$1(
|
|
1587
|
+
return /* @__PURE__ */ u$1(LoadingDisplay, {});
|
|
1515
1588
|
}
|
|
1516
1589
|
if (error !== null) {
|
|
1517
|
-
return /* @__PURE__ */ u$1(
|
|
1590
|
+
return /* @__PURE__ */ u$1(ErrorDisplay, { error });
|
|
1518
1591
|
}
|
|
1519
1592
|
if (data === null) {
|
|
1520
|
-
return /* @__PURE__ */ u$1(
|
|
1593
|
+
return /* @__PURE__ */ u$1(NoDataDisplay, {});
|
|
1521
1594
|
}
|
|
1522
|
-
return /* @__PURE__ */ u$1(
|
|
1595
|
+
return /* @__PURE__ */ u$1(MutationComparisonTabs, { data: data.mutationData, sequenceType, views });
|
|
1523
1596
|
};
|
|
1524
1597
|
const MutationComparisonTabs = ({ data, views, sequenceType }) => {
|
|
1525
1598
|
const [proportionInterval, setProportionInterval] = p({ min: 0.5, max: 1 });
|
|
@@ -1612,7 +1685,7 @@ const Toolbar$3 = ({
|
|
|
1612
1685
|
filename: "mutation_comparison.csv"
|
|
1613
1686
|
}
|
|
1614
1687
|
),
|
|
1615
|
-
/* @__PURE__ */ u$1(Info, {
|
|
1688
|
+
/* @__PURE__ */ u$1(Info, { children: "Info for mutation comparison" })
|
|
1616
1689
|
] });
|
|
1617
1690
|
};
|
|
1618
1691
|
const gridJsStyle = '.gridjs-head button, .gridjs-footer button {\n cursor: pointer;\n background-color: transparent;\n background-image: none;\n padding: 0;\n margin: 0;\n border: none;\n outline: none;\n}\n\n.gridjs-temp {\n position: relative;\n}\n\n.gridjs-head {\n width: 100%;\n margin-bottom: 5px;\n padding: 5px 1px;\n}\n.gridjs-head::after {\n content: "";\n display: block;\n clear: both;\n}\n.gridjs-head:empty {\n padding: 0;\n border: none;\n}\n\n.gridjs-container {\n overflow: hidden;\n display: inline-block;\n padding: 2px;\n color: #000;\n position: relative;\n z-index: 0;\n}\n\n.gridjs-footer {\n display: block;\n position: relative;\n width: 100%;\n z-index: 5;\n padding: 12px 24px;\n border-top: 1px solid #e5e7eb;\n background-color: #fff;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.26);\n border-radius: 0 0 8px 8px;\n border-bottom-width: 1px;\n border-color: #e5e7eb;\n}\n.gridjs-footer:empty {\n padding: 0;\n border: none;\n}\n\ninput.gridjs-input {\n outline: none;\n background-color: #fff;\n border: 1px solid #d2d6dc;\n border-radius: 5px;\n padding: 10px 13px;\n font-size: 14px;\n line-height: 1.45;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\ninput.gridjs-input:focus {\n box-shadow: 0 0 0 3px rgba(149, 189, 243, 0.5);\n border-color: #9bc2f7;\n}\n\n.gridjs-pagination {\n color: #3d4044;\n}\n.gridjs-pagination::after {\n content: "";\n display: block;\n clear: both;\n}\n.gridjs-pagination .gridjs-summary {\n float: left;\n margin-top: 5px;\n}\n.gridjs-pagination .gridjs-pages {\n float: right;\n}\n.gridjs-pagination .gridjs-pages button {\n padding: 5px 14px;\n border: 1px solid #d2d6dc;\n background-color: #fff;\n border-right: none;\n outline: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.gridjs-pagination .gridjs-pages button:focus {\n box-shadow: 0 0 0 2px rgba(149, 189, 243, 0.5);\n position: relative;\n margin-right: -1px;\n border-right: 1px solid #d2d6dc;\n}\n.gridjs-pagination .gridjs-pages button:hover {\n background-color: #f7f7f7;\n color: rgb(60, 66, 87);\n outline: none;\n}\n.gridjs-pagination .gridjs-pages button:disabled,\n.gridjs-pagination .gridjs-pages button[disabled],\n.gridjs-pagination .gridjs-pages button:hover:disabled {\n cursor: default;\n background-color: #fff;\n color: #6b7280;\n}\n.gridjs-pagination .gridjs-pages button.gridjs-spread {\n cursor: default;\n box-shadow: none;\n background-color: #fff;\n}\n.gridjs-pagination .gridjs-pages button.gridjs-currentPage {\n background-color: #f7f7f7;\n font-weight: bold;\n}\n.gridjs-pagination .gridjs-pages button:last-child {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n border-right: 1px solid #d2d6dc;\n}\n.gridjs-pagination .gridjs-pages button:first-child {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.gridjs-pagination .gridjs-pages button:last-child:focus {\n margin-right: 0;\n}\n\nbutton.gridjs-sort {\n float: right;\n height: 24px;\n width: 13px;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position-x: center;\n cursor: pointer;\n padding: 0;\n margin: 0;\n border: none;\n outline: none;\n background-size: contain;\n}\nbutton.gridjs-sort-neutral {\n opacity: 0.3;\n background-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSI0MDEuOTk4cHgiIGhlaWdodD0iNDAxLjk5OHB4IiB2aWV3Qm94PSIwIDAgNDAxLjk5OCA0MDEuOTk4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0MDEuOTk4IDQwMS45OTg7IgoJIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxnPgoJCTxwYXRoIGQ9Ik03My4wOTIsMTY0LjQ1MmgyNTUuODEzYzQuOTQ5LDAsOS4yMzMtMS44MDcsMTIuODQ4LTUuNDI0YzMuNjEzLTMuNjE2LDUuNDI3LTcuODk4LDUuNDI3LTEyLjg0NwoJCQljMC00Ljk0OS0xLjgxMy05LjIyOS01LjQyNy0xMi44NUwyMTMuODQ2LDUuNDI0QzIxMC4yMzIsMS44MTIsMjA1Ljk1MSwwLDIwMC45OTksMHMtOS4yMzMsMS44MTItMTIuODUsNS40MjRMNjAuMjQyLDEzMy4zMzEKCQkJYy0zLjYxNywzLjYxNy01LjQyNCw3LjkwMS01LjQyNCwxMi44NWMwLDQuOTQ4LDEuODA3LDkuMjMxLDUuNDI0LDEyLjg0N0M2My44NjMsMTYyLjY0NSw2OC4xNDQsMTY0LjQ1Miw3My4wOTIsMTY0LjQ1MnoiLz4KCQk8cGF0aCBkPSJNMzI4LjkwNSwyMzcuNTQ5SDczLjA5MmMtNC45NTIsMC05LjIzMywxLjgwOC0xMi44NSw1LjQyMWMtMy42MTcsMy42MTctNS40MjQsNy44OTgtNS40MjQsMTIuODQ3CgkJCWMwLDQuOTQ5LDEuODA3LDkuMjMzLDUuNDI0LDEyLjg0OEwxODguMTQ5LDM5Ni41N2MzLjYyMSwzLjYxNyw3LjkwMiw1LjQyOCwxMi44NSw1LjQyOHM5LjIzMy0xLjgxMSwxMi44NDctNS40MjhsMTI3LjkwNy0xMjcuOTA2CgkJCWMzLjYxMy0zLjYxNCw1LjQyNy03Ljg5OCw1LjQyNy0xMi44NDhjMC00Ljk0OC0xLjgxMy05LjIyOS01LjQyNy0xMi44NDdDMzM4LjEzOSwyMzkuMzUzLDMzMy44NTQsMjM3LjU0OSwzMjguOTA1LDIzNy41NDl6Ii8+Cgk8L2c+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+");\n background-position-y: center;\n}\nbutton.gridjs-sort-asc {\n background-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyOTIuMzYycHgiIGhlaWdodD0iMjkyLjM2MXB4IiB2aWV3Qm94PSIwIDAgMjkyLjM2MiAyOTIuMzYxIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyOTIuMzYyIDI5Mi4zNjE7IgoJIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIGQ9Ik0yODYuOTM1LDE5Ny4yODdMMTU5LjAyOCw2OS4zODFjLTMuNjEzLTMuNjE3LTcuODk1LTUuNDI0LTEyLjg0Ny01LjQyNHMtOS4yMzMsMS44MDctMTIuODUsNS40MjRMNS40MjQsMTk3LjI4NwoJCUMxLjgwNywyMDAuOTA0LDAsMjA1LjE4NiwwLDIxMC4xMzRzMS44MDcsOS4yMzMsNS40MjQsMTIuODQ3YzMuNjIxLDMuNjE3LDcuOTAyLDUuNDI1LDEyLjg1LDUuNDI1aDI1NS44MTMKCQljNC45NDksMCw5LjIzMy0xLjgwOCwxMi44NDgtNS40MjVjMy42MTMtMy42MTMsNS40MjctNy44OTgsNS40MjctMTIuODQ3UzI5MC41NDgsMjAwLjkwNCwyODYuOTM1LDE5Ny4yODd6Ii8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+");\n background-position-y: 35%;\n background-size: 10px;\n}\nbutton.gridjs-sort-desc {\n background-image: url("data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyOTIuMzYycHgiIGhlaWdodD0iMjkyLjM2MnB4IiB2aWV3Qm94PSIwIDAgMjkyLjM2MiAyOTIuMzYyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyOTIuMzYyIDI5Mi4zNjI7IgoJIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIGQ9Ik0yODYuOTM1LDY5LjM3N2MtMy42MTQtMy42MTctNy44OTgtNS40MjQtMTIuODQ4LTUuNDI0SDE4LjI3NGMtNC45NTIsMC05LjIzMywxLjgwNy0xMi44NSw1LjQyNAoJCUMxLjgwNyw3Mi45OTgsMCw3Ny4yNzksMCw4Mi4yMjhjMCw0Ljk0OCwxLjgwNyw5LjIyOSw1LjQyNCwxMi44NDdsMTI3LjkwNywxMjcuOTA3YzMuNjIxLDMuNjE3LDcuOTAyLDUuNDI4LDEyLjg1LDUuNDI4CgkJczkuMjMzLTEuODExLDEyLjg0Ny01LjQyOEwyODYuOTM1LDk1LjA3NGMzLjYxMy0zLjYxNyw1LjQyNy03Ljg5OCw1LjQyNy0xMi44NDdDMjkyLjM2Miw3Ny4yNzksMjkwLjU0OCw3Mi45OTgsMjg2LjkzNSw2OS4zNzd6Ii8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+");\n background-position-y: 65%;\n background-size: 10px;\n}\nbutton.gridjs-sort:focus {\n outline: none;\n}\n\ntable.gridjs-table {\n width: 100%;\n max-width: 100%;\n border-collapse: collapse;\n text-align: left;\n display: table;\n margin: 0;\n padding: 0;\n overflow: auto;\n table-layout: fixed;\n}\n\n.gridjs-tbody {\n background-color: #fff;\n}\n\ntd.gridjs-td {\n border: 1px solid #e5e7eb;\n padding: 12px 24px;\n background-color: #fff;\n box-sizing: content-box;\n}\ntd.gridjs-td:first-child {\n border-left: none;\n}\ntd.gridjs-td:last-child {\n border-right: none;\n}\ntd.gridjs-message {\n text-align: center;\n}\n\nth.gridjs-th {\n position: relative;\n color: #6b7280;\n background-color: #f9fafb;\n border: 1px solid #e5e7eb;\n border-top: none;\n padding: 14px 24px;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n box-sizing: border-box;\n white-space: nowrap;\n outline: none;\n vertical-align: middle;\n}\nth.gridjs-th .gridjs-th-content {\n text-overflow: ellipsis;\n overflow: hidden;\n width: 100%;\n float: left;\n}\nth.gridjs-th-sort {\n cursor: pointer;\n}\nth.gridjs-th-sort .gridjs-th-content {\n width: calc(100% - 15px);\n}\nth.gridjs-th-sort:hover {\n background-color: #e5e7eb;\n}\nth.gridjs-th-sort:focus {\n background-color: #e5e7eb;\n}\nth.gridjs-th-fixed {\n position: sticky;\n box-shadow: 0 1px 0 0 #e5e7eb;\n}\n@supports (-moz-appearance: none) {\n th.gridjs-th-fixed {\n box-shadow: 0 0 0 1px #e5e7eb;\n }\n}\nth.gridjs-th:first-child {\n border-left: none;\n}\nth.gridjs-th:last-child {\n border-right: none;\n}\n\n.gridjs-tr {\n border: none;\n}\n.gridjs-tr-selected td {\n background-color: #ebf5ff;\n}\n.gridjs-tr:last-child td {\n border-bottom: 0;\n}\n\n.gridjs *,\n.gridjs :after,\n.gridjs :before {\n box-sizing: border-box;\n}\n\n.gridjs-wrapper {\n position: relative;\n z-index: 1;\n overflow: auto;\n width: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.26);\n border-radius: 8px 8px 0 0;\n display: block;\n border-top-width: 1px;\n border-color: #e5e7eb;\n}\n.gridjs-wrapper:nth-last-of-type(2) {\n border-radius: 8px;\n border-bottom-width: 1px;\n}\n\n.gridjs-search {\n float: left;\n}\n.gridjs-search-input {\n width: 250px;\n}\n\n.gridjs-loading-bar {\n z-index: 10;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background-color: #fff;\n opacity: 0.5;\n}\n.gridjs-loading-bar::after {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transform: translateX(-100%);\n background-image: linear-gradient(90deg, rgba(204, 204, 204, 0) 0, rgba(204, 204, 204, 0.2) 20%, rgba(204, 204, 204, 0.5) 60%, rgba(204, 204, 204, 0));\n animation: shimmer 2s infinite;\n content: "";\n}\n@keyframes shimmer {\n 100% {\n transform: translateX(100%);\n }\n}\n\n.gridjs-td .gridjs-checkbox {\n display: block;\n margin: auto;\n cursor: pointer;\n}\n\n.gridjs-resizable {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 5px;\n}\n.gridjs-resizable:hover {\n cursor: ew-resize;\n background-color: #9bc2f7;\n}\n/*# sourceMappingURL=mermaid.css?inline.map */';
|
|
@@ -2250,6 +2323,35 @@ html {
|
|
|
2250
2323
|
max-width: 1536px;
|
|
2251
2324
|
}
|
|
2252
2325
|
}
|
|
2326
|
+
.alert {
|
|
2327
|
+
display: grid;
|
|
2328
|
+
width: 100%;
|
|
2329
|
+
grid-auto-flow: row;
|
|
2330
|
+
align-content: flex-start;
|
|
2331
|
+
align-items: center;
|
|
2332
|
+
justify-items: center;
|
|
2333
|
+
gap: 1rem;
|
|
2334
|
+
text-align: center;
|
|
2335
|
+
border-radius: var(--rounded-box, 1rem);
|
|
2336
|
+
border-width: 1px;
|
|
2337
|
+
--tw-border-opacity: 1;
|
|
2338
|
+
border-color: var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));
|
|
2339
|
+
padding: 1rem;
|
|
2340
|
+
--tw-text-opacity: 1;
|
|
2341
|
+
color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));
|
|
2342
|
+
--alert-bg: var(--fallback-b2,oklch(var(--b2)/1));
|
|
2343
|
+
--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1));
|
|
2344
|
+
background-color: var(--alert-bg);
|
|
2345
|
+
}
|
|
2346
|
+
@media (min-width: 640px) {
|
|
2347
|
+
|
|
2348
|
+
.alert {
|
|
2349
|
+
grid-auto-flow: column;
|
|
2350
|
+
grid-template-columns: auto minmax(auto,1fr);
|
|
2351
|
+
justify-items: start;
|
|
2352
|
+
text-align: start;
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2253
2355
|
.avatar.placeholder > div {
|
|
2254
2356
|
display: flex;
|
|
2255
2357
|
align-items: center;
|
|
@@ -2307,7 +2409,6 @@ html {
|
|
|
2307
2409
|
transition-duration: 200ms;
|
|
2308
2410
|
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
2309
2411
|
border-width: var(--border-btn, 1px);
|
|
2310
|
-
animation: button-pop var(--animation-btn, 0.25s) ease-out;
|
|
2311
2412
|
transition-property: color, background-color, border-color, opacity, box-shadow, transform;
|
|
2312
2413
|
--tw-text-opacity: 1;
|
|
2313
2414
|
color: var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));
|
|
@@ -2759,28 +2860,13 @@ html {
|
|
|
2759
2860
|
.select[multiple] {
|
|
2760
2861
|
height: auto;
|
|
2761
2862
|
}
|
|
2762
|
-
.
|
|
2863
|
+
.steps {
|
|
2763
2864
|
display: inline-grid;
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
grid-
|
|
2769
|
-
grid-row-start: 1;
|
|
2770
|
-
transform: translateY(10%) scale(0.9);
|
|
2771
|
-
z-index: 1;
|
|
2772
|
-
width: 100%;
|
|
2773
|
-
opacity: 0.6;
|
|
2774
|
-
}
|
|
2775
|
-
.stack > *:nth-child(2) {
|
|
2776
|
-
transform: translateY(5%) scale(0.95);
|
|
2777
|
-
z-index: 2;
|
|
2778
|
-
opacity: 0.8;
|
|
2779
|
-
}
|
|
2780
|
-
.stack > *:nth-child(1) {
|
|
2781
|
-
transform: translateY(0) scale(1);
|
|
2782
|
-
z-index: 3;
|
|
2783
|
-
opacity: 1;
|
|
2865
|
+
grid-auto-flow: column;
|
|
2866
|
+
overflow: hidden;
|
|
2867
|
+
overflow-x: auto;
|
|
2868
|
+
counter-reset: step;
|
|
2869
|
+
grid-auto-columns: 1fr;
|
|
2784
2870
|
}
|
|
2785
2871
|
.steps .step {
|
|
2786
2872
|
display: grid;
|
|
@@ -2796,8 +2882,7 @@ html {
|
|
|
2796
2882
|
display: grid;
|
|
2797
2883
|
align-items: flex-end;
|
|
2798
2884
|
}
|
|
2799
|
-
.tabs-lifted:has(.tab-content[class^="rounded-"]) .tab:first-child:not(.tab-active),
|
|
2800
|
-
.tabs-lifted:has(.tab-content[class*=" rounded-"]) .tab:first-child:not(.tab-active) {
|
|
2885
|
+
.tabs-lifted:has(.tab-content[class^="rounded-"]) .tab:first-child:not(:is(.tab-active, [aria-selected="true"])), .tabs-lifted:has(.tab-content[class*=" rounded-"]) .tab:first-child:not(:is(.tab-active, [aria-selected="true"])) {
|
|
2801
2886
|
border-bottom-color: transparent;
|
|
2802
2887
|
}
|
|
2803
2888
|
.tab {
|
|
@@ -2842,7 +2927,7 @@ html {
|
|
|
2842
2927
|
grid-column-start: span 9999;
|
|
2843
2928
|
}
|
|
2844
2929
|
input.tab:checked + .tab-content,
|
|
2845
|
-
.tab-active + .tab-content {
|
|
2930
|
+
:is(.tab-active, [aria-selected="true"]) + .tab-content {
|
|
2846
2931
|
display: block;
|
|
2847
2932
|
}
|
|
2848
2933
|
.table {
|
|
@@ -2874,6 +2959,13 @@ input.tab:checked + .tab-content,
|
|
|
2874
2959
|
--tw-bg-opacity: 1;
|
|
2875
2960
|
background-color: var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));
|
|
2876
2961
|
}
|
|
2962
|
+
.alert-error {
|
|
2963
|
+
border-color: var(--fallback-er,oklch(var(--er)/0.2));
|
|
2964
|
+
--tw-text-opacity: 1;
|
|
2965
|
+
color: var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));
|
|
2966
|
+
--alert-bg: var(--fallback-er,oklch(var(--er)/1));
|
|
2967
|
+
--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1));
|
|
2968
|
+
}
|
|
2877
2969
|
.btm-nav > *.disabled,
|
|
2878
2970
|
.btm-nav > *[disabled] {
|
|
2879
2971
|
pointer-events: none;
|
|
@@ -2887,6 +2979,12 @@ input.tab:checked + .tab-content,
|
|
|
2887
2979
|
font-size: 1rem;
|
|
2888
2980
|
line-height: 1.5rem;
|
|
2889
2981
|
}
|
|
2982
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
2983
|
+
|
|
2984
|
+
.btn {
|
|
2985
|
+
animation: button-pop var(--animation-btn, 0.25s) ease-out;
|
|
2986
|
+
}
|
|
2987
|
+
}
|
|
2890
2988
|
.btn:active:hover,
|
|
2891
2989
|
.btn:active:focus {
|
|
2892
2990
|
animation: button-pop 0s ease-out;
|
|
@@ -3416,6 +3514,30 @@ input.tab:checked + .tab-content,
|
|
|
3416
3514
|
background-position: calc(0% + 12px) calc(1px + 50%),
|
|
3417
3515
|
calc(0% + 16px) calc(1px + 50%);
|
|
3418
3516
|
}
|
|
3517
|
+
.skeleton {
|
|
3518
|
+
border-radius: var(--rounded-box, 1rem);
|
|
3519
|
+
--tw-bg-opacity: 1;
|
|
3520
|
+
background-color: var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));
|
|
3521
|
+
will-change: background-position;
|
|
3522
|
+
animation: skeleton 1.8s ease-in-out infinite;
|
|
3523
|
+
background-image: linear-gradient(
|
|
3524
|
+
105deg,
|
|
3525
|
+
transparent 0%,
|
|
3526
|
+
transparent 40%,
|
|
3527
|
+
var(--fallback-b1,oklch(var(--b1)/1)) 50%,
|
|
3528
|
+
transparent 60%,
|
|
3529
|
+
transparent 100%
|
|
3530
|
+
);
|
|
3531
|
+
background-size: 200% auto;
|
|
3532
|
+
background-repeat: no-repeat;
|
|
3533
|
+
background-position-x: -50%;
|
|
3534
|
+
}
|
|
3535
|
+
@media (prefers-reduced-motion) {
|
|
3536
|
+
|
|
3537
|
+
.skeleton {
|
|
3538
|
+
animation-duration: 15s;
|
|
3539
|
+
}
|
|
3540
|
+
}
|
|
3419
3541
|
@keyframes skeleton {
|
|
3420
3542
|
|
|
3421
3543
|
from {
|
|
@@ -3464,12 +3586,79 @@ input.tab:checked + .tab-content,
|
|
|
3464
3586
|
.steps .step[data-content]:after {
|
|
3465
3587
|
content: attr(data-content);
|
|
3466
3588
|
}
|
|
3589
|
+
.steps .step-neutral + .step-neutral:before,
|
|
3590
|
+
.steps .step-neutral:after {
|
|
3591
|
+
--tw-bg-opacity: 1;
|
|
3592
|
+
background-color: var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));
|
|
3593
|
+
--tw-text-opacity: 1;
|
|
3594
|
+
color: var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));
|
|
3595
|
+
}
|
|
3596
|
+
.steps .step-primary + .step-primary:before,
|
|
3597
|
+
.steps .step-primary:after {
|
|
3598
|
+
--tw-bg-opacity: 1;
|
|
3599
|
+
background-color: var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));
|
|
3600
|
+
--tw-text-opacity: 1;
|
|
3601
|
+
color: var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));
|
|
3602
|
+
}
|
|
3603
|
+
.steps .step-secondary + .step-secondary:before,
|
|
3604
|
+
.steps .step-secondary:after {
|
|
3605
|
+
--tw-bg-opacity: 1;
|
|
3606
|
+
background-color: var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));
|
|
3607
|
+
--tw-text-opacity: 1;
|
|
3608
|
+
color: var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)));
|
|
3609
|
+
}
|
|
3610
|
+
.steps .step-accent + .step-accent:before,
|
|
3611
|
+
.steps .step-accent:after {
|
|
3612
|
+
--tw-bg-opacity: 1;
|
|
3613
|
+
background-color: var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));
|
|
3614
|
+
--tw-text-opacity: 1;
|
|
3615
|
+
color: var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)));
|
|
3616
|
+
}
|
|
3617
|
+
.steps .step-info + .step-info:before {
|
|
3618
|
+
--tw-bg-opacity: 1;
|
|
3619
|
+
background-color: var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));
|
|
3620
|
+
}
|
|
3621
|
+
.steps .step-info:after {
|
|
3622
|
+
--tw-bg-opacity: 1;
|
|
3623
|
+
background-color: var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));
|
|
3624
|
+
--tw-text-opacity: 1;
|
|
3625
|
+
color: var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));
|
|
3626
|
+
}
|
|
3627
|
+
.steps .step-success + .step-success:before {
|
|
3628
|
+
--tw-bg-opacity: 1;
|
|
3629
|
+
background-color: var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));
|
|
3630
|
+
}
|
|
3631
|
+
.steps .step-success:after {
|
|
3632
|
+
--tw-bg-opacity: 1;
|
|
3633
|
+
background-color: var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));
|
|
3634
|
+
--tw-text-opacity: 1;
|
|
3635
|
+
color: var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));
|
|
3636
|
+
}
|
|
3637
|
+
.steps .step-warning + .step-warning:before {
|
|
3638
|
+
--tw-bg-opacity: 1;
|
|
3639
|
+
background-color: var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));
|
|
3640
|
+
}
|
|
3641
|
+
.steps .step-warning:after {
|
|
3642
|
+
--tw-bg-opacity: 1;
|
|
3643
|
+
background-color: var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));
|
|
3644
|
+
--tw-text-opacity: 1;
|
|
3645
|
+
color: var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));
|
|
3646
|
+
}
|
|
3647
|
+
.steps .step-error + .step-error:before {
|
|
3648
|
+
--tw-bg-opacity: 1;
|
|
3649
|
+
background-color: var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));
|
|
3650
|
+
}
|
|
3651
|
+
.steps .step-error:after {
|
|
3652
|
+
--tw-bg-opacity: 1;
|
|
3653
|
+
background-color: var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));
|
|
3654
|
+
--tw-text-opacity: 1;
|
|
3655
|
+
color: var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));
|
|
3656
|
+
}
|
|
3467
3657
|
.tabs-lifted > .tab:focus-visible {
|
|
3468
3658
|
border-end-end-radius: 0;
|
|
3469
3659
|
border-end-start-radius: 0;
|
|
3470
3660
|
}
|
|
3471
|
-
.tab.tab-active:not(.tab-disabled):not([disabled]),
|
|
3472
|
-
.tab:is(input:checked) {
|
|
3661
|
+
.tab:is(.tab-active, [aria-selected="true"]):not(.tab-disabled):not([disabled]), .tab:is(input:checked) {
|
|
3473
3662
|
border-color: var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));
|
|
3474
3663
|
--tw-border-opacity: 1;
|
|
3475
3664
|
--tw-text-opacity: 1;
|
|
@@ -3504,8 +3693,7 @@ input.tab:checked + .tab-content,
|
|
|
3504
3693
|
padding-inline-end: var(--tab-padding, 1rem);
|
|
3505
3694
|
padding-top: var(--tab-border, 1px);
|
|
3506
3695
|
}
|
|
3507
|
-
.tabs-lifted > .tab.tab-active:not(.tab-disabled):not([disabled]),
|
|
3508
|
-
.tabs-lifted > .tab:is(input:checked) {
|
|
3696
|
+
.tabs-lifted > .tab:is(.tab-active, [aria-selected="true"]):not(.tab-disabled):not([disabled]), .tabs-lifted > .tab:is(input:checked) {
|
|
3509
3697
|
background-color: var(--tab-bg);
|
|
3510
3698
|
border-width: var(--tab-border, 1px) var(--tab-border, 1px) 0 var(--tab-border, 1px);
|
|
3511
3699
|
border-inline-start-color: var(--tab-border-color);
|
|
@@ -3516,7 +3704,7 @@ input.tab:checked + .tab-content,
|
|
|
3516
3704
|
padding-bottom: var(--tab-border, 1px);
|
|
3517
3705
|
padding-top: 0;
|
|
3518
3706
|
}
|
|
3519
|
-
.tabs-lifted > .tab.tab-active:not(.tab-disabled):not([disabled]):before, .tabs-lifted > .tab:is(input:checked):before {
|
|
3707
|
+
.tabs-lifted > .tab:is(.tab-active, [aria-selected="true"]):not(.tab-disabled):not([disabled]):before, .tabs-lifted > .tab:is(input:checked):before {
|
|
3520
3708
|
z-index: 1;
|
|
3521
3709
|
content: "";
|
|
3522
3710
|
display: block;
|
|
@@ -3545,26 +3733,26 @@ input.tab:checked + .tab-content,
|
|
|
3545
3733
|
);
|
|
3546
3734
|
background-image: var(--radius-start), var(--radius-end);
|
|
3547
3735
|
}
|
|
3548
|
-
.tabs-lifted > .tab.tab-active:not(.tab-disabled):not([disabled]):first-child:before, .tabs-lifted > .tab:is(input:checked):first-child:before {
|
|
3736
|
+
.tabs-lifted > .tab:is(.tab-active, [aria-selected="true"]):not(.tab-disabled):not([disabled]):first-child:before, .tabs-lifted > .tab:is(input:checked):first-child:before {
|
|
3549
3737
|
background-image: var(--radius-end);
|
|
3550
3738
|
background-position: top right;
|
|
3551
3739
|
}
|
|
3552
|
-
[dir="rtl"] .tabs-lifted > .tab.tab-active:not(.tab-disabled):not([disabled]):first-child:before, [dir="rtl"] .tabs-lifted > .tab:is(input:checked):first-child:before {
|
|
3740
|
+
[dir="rtl"] .tabs-lifted > .tab:is(.tab-active, [aria-selected="true"]):not(.tab-disabled):not([disabled]):first-child:before, [dir="rtl"] .tabs-lifted > .tab:is(input:checked):first-child:before {
|
|
3553
3741
|
background-image: var(--radius-start);
|
|
3554
3742
|
background-position: top left;
|
|
3555
3743
|
}
|
|
3556
|
-
.tabs-lifted > .tab.tab-active:not(.tab-disabled):not([disabled]):last-child:before, .tabs-lifted > .tab:is(input:checked):last-child:before {
|
|
3744
|
+
.tabs-lifted > .tab:is(.tab-active, [aria-selected="true"]):not(.tab-disabled):not([disabled]):last-child:before, .tabs-lifted > .tab:is(input:checked):last-child:before {
|
|
3557
3745
|
background-image: var(--radius-start);
|
|
3558
3746
|
background-position: top left;
|
|
3559
3747
|
}
|
|
3560
|
-
[dir="rtl"] .tabs-lifted > .tab.tab-active:not(.tab-disabled):not([disabled]):last-child:before, [dir="rtl"] .tabs-lifted > .tab:is(input:checked):last-child:before {
|
|
3748
|
+
[dir="rtl"] .tabs-lifted > .tab:is(.tab-active, [aria-selected="true"]):not(.tab-disabled):not([disabled]):last-child:before, [dir="rtl"] .tabs-lifted > .tab:is(input:checked):last-child:before {
|
|
3561
3749
|
background-image: var(--radius-end);
|
|
3562
3750
|
background-position: top right;
|
|
3563
3751
|
}
|
|
3564
3752
|
.tabs-lifted
|
|
3565
|
-
> .tab-active:not(.tab-disabled):not([disabled])
|
|
3753
|
+
> :is(.tab-active, [aria-selected="true"]):not(.tab-disabled):not([disabled])
|
|
3566
3754
|
+ .tabs-lifted
|
|
3567
|
-
.tab-active:not(.tab-disabled):not([disabled]):before, .tabs-lifted > .tab:is(input:checked) + .tabs-lifted .tab:is(input:checked):before {
|
|
3755
|
+
:is(.tab-active, [aria-selected="true"]):not(.tab-disabled):not([disabled]):before, .tabs-lifted > .tab:is(input:checked) + .tabs-lifted .tab:is(input:checked):before {
|
|
3568
3756
|
background-image: var(--radius-end);
|
|
3569
3757
|
background-position: top right;
|
|
3570
3758
|
}
|
|
@@ -3885,9 +4073,21 @@ input.tab:checked + .tab-content,
|
|
|
3885
4073
|
.static {
|
|
3886
4074
|
position: static;
|
|
3887
4075
|
}
|
|
4076
|
+
.absolute {
|
|
4077
|
+
position: absolute;
|
|
4078
|
+
}
|
|
3888
4079
|
.relative {
|
|
3889
4080
|
position: relative;
|
|
3890
4081
|
}
|
|
4082
|
+
.right-6 {
|
|
4083
|
+
right: 1.5rem;
|
|
4084
|
+
}
|
|
4085
|
+
.top-8 {
|
|
4086
|
+
top: 2rem;
|
|
4087
|
+
}
|
|
4088
|
+
.z-50 {
|
|
4089
|
+
z-index: 50;
|
|
4090
|
+
}
|
|
3891
4091
|
.z-\\[1\\] {
|
|
3892
4092
|
z-index: 1;
|
|
3893
4093
|
}
|
|
@@ -3924,6 +4124,9 @@ input.tab:checked + .tab-content,
|
|
|
3924
4124
|
.mt-2 {
|
|
3925
4125
|
margin-top: 0.5rem;
|
|
3926
4126
|
}
|
|
4127
|
+
.mt-4 {
|
|
4128
|
+
margin-top: 1rem;
|
|
4129
|
+
}
|
|
3927
4130
|
.inline {
|
|
3928
4131
|
display: inline;
|
|
3929
4132
|
}
|
|
@@ -3960,6 +4163,10 @@ input.tab:checked + .tab-content,
|
|
|
3960
4163
|
.min-w-0 {
|
|
3961
4164
|
min-width: 0px;
|
|
3962
4165
|
}
|
|
4166
|
+
.min-w-max {
|
|
4167
|
+
min-width: -moz-max-content;
|
|
4168
|
+
min-width: max-content;
|
|
4169
|
+
}
|
|
3963
4170
|
.max-w-screen-lg {
|
|
3964
4171
|
max-width: 1024px;
|
|
3965
4172
|
}
|
|
@@ -3984,6 +4191,9 @@ input.tab:checked + .tab-content,
|
|
|
3984
4191
|
.items-center {
|
|
3985
4192
|
align-items: center;
|
|
3986
4193
|
}
|
|
4194
|
+
.justify-end {
|
|
4195
|
+
justify-content: flex-end;
|
|
4196
|
+
}
|
|
3987
4197
|
.justify-center {
|
|
3988
4198
|
justify-content: center;
|
|
3989
4199
|
}
|
|
@@ -3999,6 +4209,9 @@ input.tab:checked + .tab-content,
|
|
|
3999
4209
|
.overflow-auto {
|
|
4000
4210
|
overflow: auto;
|
|
4001
4211
|
}
|
|
4212
|
+
.overflow-scroll {
|
|
4213
|
+
overflow: scroll;
|
|
4214
|
+
}
|
|
4002
4215
|
.whitespace-nowrap {
|
|
4003
4216
|
white-space: nowrap;
|
|
4004
4217
|
}
|
|
@@ -4017,6 +4230,9 @@ input.tab:checked + .tab-content,
|
|
|
4017
4230
|
.rounded-lg {
|
|
4018
4231
|
border-radius: 0.5rem;
|
|
4019
4232
|
}
|
|
4233
|
+
.rounded-md {
|
|
4234
|
+
border-radius: 0.375rem;
|
|
4235
|
+
}
|
|
4020
4236
|
.rounded-none {
|
|
4021
4237
|
border-radius: 0px;
|
|
4022
4238
|
}
|
|
@@ -4039,6 +4255,10 @@ input.tab:checked + .tab-content,
|
|
|
4039
4255
|
.border-b-2 {
|
|
4040
4256
|
border-bottom-width: 2px;
|
|
4041
4257
|
}
|
|
4258
|
+
.border-black {
|
|
4259
|
+
--tw-border-opacity: 1;
|
|
4260
|
+
border-color: rgb(0 0 0 / var(--tw-border-opacity));
|
|
4261
|
+
}
|
|
4042
4262
|
.border-error {
|
|
4043
4263
|
--tw-border-opacity: 1;
|
|
4044
4264
|
border-color: var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)));
|
|
@@ -4098,6 +4318,13 @@ input.tab:checked + .tab-content,
|
|
|
4098
4318
|
padding-top: 0.5rem;
|
|
4099
4319
|
padding-bottom: 0.5rem;
|
|
4100
4320
|
}
|
|
4321
|
+
.text-justify {
|
|
4322
|
+
text-align: justify;
|
|
4323
|
+
}
|
|
4324
|
+
.text-base {
|
|
4325
|
+
font-size: 1rem;
|
|
4326
|
+
line-height: 1.5rem;
|
|
4327
|
+
}
|
|
4101
4328
|
.text-lg {
|
|
4102
4329
|
font-size: 1.125rem;
|
|
4103
4330
|
line-height: 1.75rem;
|
|
@@ -4123,15 +4350,35 @@ input.tab:checked + .tab-content,
|
|
|
4123
4350
|
.leading-5 {
|
|
4124
4351
|
line-height: 1.25rem;
|
|
4125
4352
|
}
|
|
4353
|
+
.text-blue-600 {
|
|
4354
|
+
--tw-text-opacity: 1;
|
|
4355
|
+
color: rgb(37 99 235 / var(--tw-text-opacity));
|
|
4356
|
+
}
|
|
4126
4357
|
.text-gray-600 {
|
|
4127
4358
|
--tw-text-opacity: 1;
|
|
4128
4359
|
color: rgb(75 85 99 / var(--tw-text-opacity));
|
|
4129
4360
|
}
|
|
4361
|
+
.text-red-700 {
|
|
4362
|
+
--tw-text-opacity: 1;
|
|
4363
|
+
color: rgb(185 28 28 / var(--tw-text-opacity));
|
|
4364
|
+
}
|
|
4365
|
+
.underline {
|
|
4366
|
+
text-decoration-line: underline;
|
|
4367
|
+
}
|
|
4130
4368
|
.shadow {
|
|
4131
4369
|
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
4132
4370
|
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
4133
4371
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
4134
4372
|
}
|
|
4373
|
+
.shadow-lg {
|
|
4374
|
+
--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
4375
|
+
--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
|
|
4376
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
4377
|
+
}
|
|
4378
|
+
.blur {
|
|
4379
|
+
--tw-blur: blur(8px);
|
|
4380
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
4381
|
+
}
|
|
4135
4382
|
.filter {
|
|
4136
4383
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
4137
4384
|
}
|
|
@@ -4147,6 +4394,10 @@ input.tab:checked + .tab-content,
|
|
|
4147
4394
|
--tw-bg-opacity: 1;
|
|
4148
4395
|
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
|
4149
4396
|
}
|
|
4397
|
+
.hover\\:text-blue-800:hover {
|
|
4398
|
+
--tw-text-opacity: 1;
|
|
4399
|
+
color: rgb(30 64 175 / var(--tw-text-opacity));
|
|
4400
|
+
}
|
|
4150
4401
|
.hover\\:text-gray-700:hover {
|
|
4151
4402
|
--tw-text-opacity: 1;
|
|
4152
4403
|
color: rgb(55 65 81 / var(--tw-text-opacity));
|
|
@@ -4210,6 +4461,7 @@ let MutationComparisonComponent = class extends PreactLitAdapterWithGridJsStyles
|
|
|
4210
4461
|
this.sequenceType = "nucleotide";
|
|
4211
4462
|
this.views = ["table"];
|
|
4212
4463
|
this.size = void 0;
|
|
4464
|
+
this.headline = "Mutation comparison";
|
|
4213
4465
|
}
|
|
4214
4466
|
render() {
|
|
4215
4467
|
return /* @__PURE__ */ u$1(
|
|
@@ -4218,7 +4470,8 @@ let MutationComparisonComponent = class extends PreactLitAdapterWithGridJsStyles
|
|
|
4218
4470
|
variants: this.variants,
|
|
4219
4471
|
sequenceType: this.sequenceType,
|
|
4220
4472
|
views: this.views,
|
|
4221
|
-
size: this.size
|
|
4473
|
+
size: this.size,
|
|
4474
|
+
headline: this.headline
|
|
4222
4475
|
}
|
|
4223
4476
|
);
|
|
4224
4477
|
}
|
|
@@ -4235,8 +4488,11 @@ __decorateClass$8([
|
|
|
4235
4488
|
__decorateClass$8([
|
|
4236
4489
|
n2({ type: Object })
|
|
4237
4490
|
], MutationComparisonComponent.prototype, "size", 2);
|
|
4491
|
+
__decorateClass$8([
|
|
4492
|
+
n2({ type: String })
|
|
4493
|
+
], MutationComparisonComponent.prototype, "headline", 2);
|
|
4238
4494
|
MutationComparisonComponent = __decorateClass$8([
|
|
4239
|
-
t$2("gs-mutation-comparison
|
|
4495
|
+
t$2("gs-mutation-comparison")
|
|
4240
4496
|
], MutationComparisonComponent);
|
|
4241
4497
|
function getInsertionsTableData(data) {
|
|
4242
4498
|
return data.map((mutationEntry) => {
|
|
@@ -4260,16 +4516,16 @@ function getMutationsTableData(data, proportionInterval) {
|
|
|
4260
4516
|
});
|
|
4261
4517
|
}
|
|
4262
4518
|
const pattern = /(?:([A-Za-z0-9]+):)?(\d+)$/;
|
|
4263
|
-
const sortMutationPositions = (a2,
|
|
4519
|
+
const sortMutationPositions = (a2, b3) => {
|
|
4264
4520
|
const aMatch = a2.match(pattern);
|
|
4265
|
-
const bMatch =
|
|
4521
|
+
const bMatch = b3.match(pattern);
|
|
4266
4522
|
if (aMatch && bMatch) {
|
|
4267
4523
|
if (aMatch[1] !== bMatch[1]) {
|
|
4268
4524
|
return aMatch[1].localeCompare(bMatch[1]);
|
|
4269
4525
|
}
|
|
4270
4526
|
return parseInt(aMatch[2], 10) - parseInt(bMatch[2], 10);
|
|
4271
4527
|
}
|
|
4272
|
-
throw new Error(`Invalid mutation position: ${a2} or ${
|
|
4528
|
+
throw new Error(`Invalid mutation position: ${a2} or ${b3}`);
|
|
4273
4529
|
};
|
|
4274
4530
|
const getMutationsGridData = (data, sequenceType, proportionInterval) => {
|
|
4275
4531
|
return accumulateByPosition(data, sequenceType).filter((row) => byProportion(row, proportionInterval));
|
|
@@ -4301,8 +4557,8 @@ const accumulateByPosition = (data, sequenceType) => {
|
|
|
4301
4557
|
};
|
|
4302
4558
|
subtractSubstitutionValue();
|
|
4303
4559
|
}
|
|
4304
|
-
const orderedPositionsToProportionAtBase = [...positionsToProportionAtBase.entries()].map(([position, proportionsAtBase]) => ({ position, proportions: proportionsAtBase })).sort((a2,
|
|
4305
|
-
return sortMutationPositions(a2.position,
|
|
4560
|
+
const orderedPositionsToProportionAtBase = [...positionsToProportionAtBase.entries()].map(([position, proportionsAtBase]) => ({ position, proportions: proportionsAtBase })).sort((a2, b3) => {
|
|
4561
|
+
return sortMutationPositions(a2.position, b3.position);
|
|
4306
4562
|
});
|
|
4307
4563
|
return orderedPositionsToProportionAtBase.map((proportionsForBaseAtPosition) => {
|
|
4308
4564
|
const proportions = bases[sequenceType].map((base) => {
|
|
@@ -4333,8 +4589,8 @@ const MutationsGrid = ({ data, sequenceType, proportionInterval }) => {
|
|
|
4333
4589
|
{
|
|
4334
4590
|
name: "Position",
|
|
4335
4591
|
sort: {
|
|
4336
|
-
compare: (a2,
|
|
4337
|
-
return sortMutationPositions(a2,
|
|
4592
|
+
compare: (a2, b3) => {
|
|
4593
|
+
return sortMutationPositions(a2, b3);
|
|
4338
4594
|
}
|
|
4339
4595
|
}
|
|
4340
4596
|
},
|
|
@@ -4346,9 +4602,9 @@ const MutationsGrid = ({ data, sequenceType, proportionInterval }) => {
|
|
|
4346
4602
|
return {
|
|
4347
4603
|
name: base,
|
|
4348
4604
|
sort: {
|
|
4349
|
-
compare: (a2,
|
|
4605
|
+
compare: (a2, b3) => {
|
|
4350
4606
|
const aProportion = a2.proportion;
|
|
4351
|
-
const bProportion =
|
|
4607
|
+
const bProportion = b3.proportion;
|
|
4352
4608
|
if (aProportion < bProportion) {
|
|
4353
4609
|
return -1;
|
|
4354
4610
|
}
|
|
@@ -4382,14 +4638,14 @@ const MutationsGrid = ({ data, sequenceType, proportionInterval }) => {
|
|
|
4382
4638
|
const tableData = getMutationsGridData(data, sequenceType, proportionInterval).map((row) => Object.values(row));
|
|
4383
4639
|
return /* @__PURE__ */ u$1(Table, { data: tableData, columns: getHeaders(), pagination: true });
|
|
4384
4640
|
};
|
|
4385
|
-
const sortInsertions = (a2,
|
|
4386
|
-
if (a2.segment !==
|
|
4387
|
-
return compareSegments(a2.segment,
|
|
4641
|
+
const sortInsertions = (a2, b3) => {
|
|
4642
|
+
if (a2.segment !== b3.segment) {
|
|
4643
|
+
return compareSegments(a2.segment, b3.segment);
|
|
4388
4644
|
}
|
|
4389
|
-
if (a2.position !==
|
|
4390
|
-
return comparePositions(a2.position,
|
|
4645
|
+
if (a2.position !== b3.position) {
|
|
4646
|
+
return comparePositions(a2.position, b3.position);
|
|
4391
4647
|
}
|
|
4392
|
-
return a2.insertedSymbols.localeCompare(
|
|
4648
|
+
return a2.insertedSymbols.localeCompare(b3.insertedSymbols);
|
|
4393
4649
|
};
|
|
4394
4650
|
const InsertionsTable = ({ data }) => {
|
|
4395
4651
|
const getHeaders = () => {
|
|
@@ -4397,8 +4653,8 @@ const InsertionsTable = ({ data }) => {
|
|
|
4397
4653
|
{
|
|
4398
4654
|
name: "Insertion",
|
|
4399
4655
|
sort: {
|
|
4400
|
-
compare: (a2,
|
|
4401
|
-
return sortInsertions(a2,
|
|
4656
|
+
compare: (a2, b3) => {
|
|
4657
|
+
return sortInsertions(a2, b3);
|
|
4402
4658
|
}
|
|
4403
4659
|
},
|
|
4404
4660
|
formatter: (cell) => cell.toString()
|
|
@@ -4418,8 +4674,8 @@ const MutationsTable = ({ data, proportionInterval }) => {
|
|
|
4418
4674
|
{
|
|
4419
4675
|
name: "Mutation",
|
|
4420
4676
|
sort: {
|
|
4421
|
-
compare: (a2,
|
|
4422
|
-
return sortSubstitutionsAndDeletions(a2,
|
|
4677
|
+
compare: (a2, b3) => {
|
|
4678
|
+
return sortSubstitutionsAndDeletions(a2, b3);
|
|
4423
4679
|
}
|
|
4424
4680
|
},
|
|
4425
4681
|
formatter: (cell) => cell.toString()
|
|
@@ -4459,11 +4715,11 @@ class FetchInsertionsOperator {
|
|
|
4459
4715
|
}
|
|
4460
4716
|
function queryInsertions(variant, sequenceType, lapis, signal) {
|
|
4461
4717
|
const fetchData = new FetchInsertionsOperator(variant, sequenceType);
|
|
4462
|
-
const sortData = new SortOperator(fetchData, (a2,
|
|
4463
|
-
if (a2.mutation.segment !==
|
|
4464
|
-
return (a2.mutation.segment ?? "").localeCompare(
|
|
4718
|
+
const sortData = new SortOperator(fetchData, (a2, b3) => {
|
|
4719
|
+
if (a2.mutation.segment !== b3.mutation.segment) {
|
|
4720
|
+
return (a2.mutation.segment ?? "").localeCompare(b3.mutation.segment ?? "");
|
|
4465
4721
|
}
|
|
4466
|
-
return a2.mutation.position -
|
|
4722
|
+
return a2.mutation.position - b3.mutation.position;
|
|
4467
4723
|
});
|
|
4468
4724
|
return sortData.evaluate(lapis, signal);
|
|
4469
4725
|
}
|
|
@@ -4496,22 +4752,31 @@ function filterMutationsData(data, displayedSegments, displayedMutationTypes) {
|
|
|
4496
4752
|
gridData: filteredSubstitutionsOrDeletions
|
|
4497
4753
|
};
|
|
4498
4754
|
}
|
|
4499
|
-
const Mutations = ({
|
|
4755
|
+
const Mutations = ({
|
|
4756
|
+
variant,
|
|
4757
|
+
sequenceType,
|
|
4758
|
+
views,
|
|
4759
|
+
size,
|
|
4760
|
+
headline = "Mutations"
|
|
4761
|
+
}) => {
|
|
4762
|
+
const defaultSize = { height: "600px", width: "100%" };
|
|
4763
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, defaultSize, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, defaultSize, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(MutationsInner, { variant, sequenceType, views }) }) }) });
|
|
4764
|
+
};
|
|
4765
|
+
const MutationsInner = ({ variant, sequenceType, views }) => {
|
|
4500
4766
|
const lapis = P(LapisUrlContext);
|
|
4501
4767
|
const { data, error, isLoading } = useQuery(async () => {
|
|
4502
4768
|
return queryMutationsData(variant, sequenceType, lapis);
|
|
4503
4769
|
}, [variant, sequenceType, lapis]);
|
|
4504
|
-
const headline = "Mutations";
|
|
4505
4770
|
if (isLoading) {
|
|
4506
|
-
return /* @__PURE__ */ u$1(
|
|
4771
|
+
return /* @__PURE__ */ u$1(LoadingDisplay, {});
|
|
4507
4772
|
}
|
|
4508
4773
|
if (error !== null) {
|
|
4509
|
-
return /* @__PURE__ */ u$1(
|
|
4774
|
+
return /* @__PURE__ */ u$1(ErrorDisplay, { error });
|
|
4510
4775
|
}
|
|
4511
4776
|
if (data === null) {
|
|
4512
|
-
return /* @__PURE__ */ u$1(
|
|
4777
|
+
return /* @__PURE__ */ u$1(NoDataDisplay, {});
|
|
4513
4778
|
}
|
|
4514
|
-
return /* @__PURE__ */ u$1(
|
|
4779
|
+
return /* @__PURE__ */ u$1(MutationsTabs, { mutationsData: data, sequenceType, views });
|
|
4515
4780
|
};
|
|
4516
4781
|
const MutationsTabs = ({ mutationsData, sequenceType, views }) => {
|
|
4517
4782
|
const [proportionInterval, setProportionInterval] = p({ min: 0.05, max: 1 });
|
|
@@ -4614,7 +4879,7 @@ const Toolbar$2 = ({
|
|
|
4614
4879
|
filename: "insertions.csv"
|
|
4615
4880
|
}
|
|
4616
4881
|
),
|
|
4617
|
-
/* @__PURE__ */ u$1(Info, {
|
|
4882
|
+
/* @__PURE__ */ u$1(Info, { children: "Info for mutations" })
|
|
4618
4883
|
] });
|
|
4619
4884
|
};
|
|
4620
4885
|
var __defProp$7 = Object.defineProperty;
|
|
@@ -4631,13 +4896,23 @@ var __decorateClass$7 = (decorators, target, key, kind) => {
|
|
|
4631
4896
|
let MutationsComponent = class extends PreactLitAdapterWithGridJsStyles {
|
|
4632
4897
|
constructor() {
|
|
4633
4898
|
super(...arguments);
|
|
4634
|
-
this.variant = {
|
|
4899
|
+
this.variant = {};
|
|
4635
4900
|
this.sequenceType = "nucleotide";
|
|
4636
4901
|
this.views = ["table", "grid"];
|
|
4637
4902
|
this.size = void 0;
|
|
4903
|
+
this.headline = "Mutations";
|
|
4638
4904
|
}
|
|
4639
4905
|
render() {
|
|
4640
|
-
return /* @__PURE__ */ u$1(
|
|
4906
|
+
return /* @__PURE__ */ u$1(
|
|
4907
|
+
Mutations,
|
|
4908
|
+
{
|
|
4909
|
+
variant: this.variant,
|
|
4910
|
+
sequenceType: this.sequenceType,
|
|
4911
|
+
views: this.views,
|
|
4912
|
+
size: this.size,
|
|
4913
|
+
headline: this.headline
|
|
4914
|
+
}
|
|
4915
|
+
);
|
|
4641
4916
|
}
|
|
4642
4917
|
};
|
|
4643
4918
|
__decorateClass$7([
|
|
@@ -4652,8 +4927,11 @@ __decorateClass$7([
|
|
|
4652
4927
|
__decorateClass$7([
|
|
4653
4928
|
n2({ type: Object })
|
|
4654
4929
|
], MutationsComponent.prototype, "size", 2);
|
|
4930
|
+
__decorateClass$7([
|
|
4931
|
+
n2({ type: String })
|
|
4932
|
+
], MutationsComponent.prototype, "headline", 2);
|
|
4655
4933
|
MutationsComponent = __decorateClass$7([
|
|
4656
|
-
t$2("gs-mutations
|
|
4934
|
+
t$2("gs-mutations")
|
|
4657
4935
|
], MutationsComponent);
|
|
4658
4936
|
function getPrevalenceOverTimeTableData(data, granularity) {
|
|
4659
4937
|
return data[0].content.map((row, rowNumber) => {
|
|
@@ -4870,14 +5148,14 @@ var padZoneStr = function padZoneStr2(instance) {
|
|
|
4870
5148
|
var minuteOffset = minutes % 60;
|
|
4871
5149
|
return (negMinutes <= 0 ? "+" : "-") + padStart(hourOffset, 2, "0") + ":" + padStart(minuteOffset, 2, "0");
|
|
4872
5150
|
};
|
|
4873
|
-
var monthDiff = function monthDiff2(a2,
|
|
4874
|
-
if (a2.date() <
|
|
4875
|
-
return -monthDiff2(
|
|
4876
|
-
var wholeMonthDiff = (
|
|
5151
|
+
var monthDiff = function monthDiff2(a2, b3) {
|
|
5152
|
+
if (a2.date() < b3.date())
|
|
5153
|
+
return -monthDiff2(b3, a2);
|
|
5154
|
+
var wholeMonthDiff = (b3.year() - a2.year()) * 12 + (b3.month() - a2.month());
|
|
4877
5155
|
var anchor = a2.clone().add(wholeMonthDiff, M);
|
|
4878
|
-
var c2 =
|
|
5156
|
+
var c2 = b3 - anchor < 0;
|
|
4879
5157
|
var anchor2 = a2.clone().add(wholeMonthDiff + (c2 ? -1 : 1), M);
|
|
4880
|
-
return +(-(wholeMonthDiff + (
|
|
5158
|
+
return +(-(wholeMonthDiff + (b3 - anchor) / (c2 ? anchor - anchor2 : anchor2 - anchor)) || 0);
|
|
4881
5159
|
};
|
|
4882
5160
|
var absFloor = function absFloor2(n3) {
|
|
4883
5161
|
return n3 < 0 ? Math.ceil(n3) || 0 : Math.floor(n3);
|
|
@@ -5611,29 +5889,29 @@ function generateAllInRange(start, end) {
|
|
|
5611
5889
|
}
|
|
5612
5890
|
throw new Error(`Invalid arguments: start and end must be of the same type: ${start}, ${end}`);
|
|
5613
5891
|
}
|
|
5614
|
-
function minusTemporal(a2,
|
|
5615
|
-
if (a2 instanceof YearMonthDay &&
|
|
5616
|
-
return a2.minus(
|
|
5892
|
+
function minusTemporal(a2, b3) {
|
|
5893
|
+
if (a2 instanceof YearMonthDay && b3 instanceof YearMonthDay) {
|
|
5894
|
+
return a2.minus(b3);
|
|
5617
5895
|
}
|
|
5618
|
-
if (a2 instanceof YearWeek &&
|
|
5619
|
-
return a2.minus(
|
|
5896
|
+
if (a2 instanceof YearWeek && b3 instanceof YearWeek) {
|
|
5897
|
+
return a2.minus(b3);
|
|
5620
5898
|
}
|
|
5621
|
-
if (a2 instanceof YearMonth &&
|
|
5622
|
-
return a2.minus(
|
|
5899
|
+
if (a2 instanceof YearMonth && b3 instanceof YearMonth) {
|
|
5900
|
+
return a2.minus(b3);
|
|
5623
5901
|
}
|
|
5624
|
-
if (a2 instanceof Year &&
|
|
5625
|
-
return a2.minus(
|
|
5902
|
+
if (a2 instanceof Year && b3 instanceof Year) {
|
|
5903
|
+
return a2.minus(b3);
|
|
5626
5904
|
}
|
|
5627
|
-
throw new Error(`Cannot compare ${a2} and ${
|
|
5905
|
+
throw new Error(`Cannot compare ${a2} and ${b3}`);
|
|
5628
5906
|
}
|
|
5629
|
-
function compareTemporal(a2,
|
|
5907
|
+
function compareTemporal(a2, b3) {
|
|
5630
5908
|
if (a2 === null) {
|
|
5631
5909
|
return 1;
|
|
5632
5910
|
}
|
|
5633
|
-
if (
|
|
5911
|
+
if (b3 === null) {
|
|
5634
5912
|
return -1;
|
|
5635
5913
|
}
|
|
5636
|
-
const diff = minusTemporal(a2,
|
|
5914
|
+
const diff = minusTemporal(a2, b3);
|
|
5637
5915
|
if (diff < 0) {
|
|
5638
5916
|
return -1;
|
|
5639
5917
|
}
|
|
@@ -6112,14 +6390,14 @@ function mapDateToGranularityRange(d2, granularity) {
|
|
|
6112
6390
|
count: d2.count
|
|
6113
6391
|
};
|
|
6114
6392
|
}
|
|
6115
|
-
function dateRangeCompare(a2,
|
|
6393
|
+
function dateRangeCompare(a2, b3) {
|
|
6116
6394
|
if (a2.dateRange === null) {
|
|
6117
6395
|
return 1;
|
|
6118
6396
|
}
|
|
6119
|
-
if (
|
|
6397
|
+
if (b3.dateRange === null) {
|
|
6120
6398
|
return -1;
|
|
6121
6399
|
}
|
|
6122
|
-
return compareTemporal(a2.dateRange,
|
|
6400
|
+
return compareTemporal(a2.dateRange, b3.dateRange);
|
|
6123
6401
|
}
|
|
6124
6402
|
function averageSmoothing(slidingWindow) {
|
|
6125
6403
|
const average = slidingWindow.reduce((acc, curr) => acc + curr.count, 0) / slidingWindow.length;
|
|
@@ -6194,24 +6472,45 @@ const PrevalenceOverTime = ({
|
|
|
6194
6472
|
smoothingWindow,
|
|
6195
6473
|
views,
|
|
6196
6474
|
confidenceIntervalMethods,
|
|
6197
|
-
size
|
|
6475
|
+
size,
|
|
6476
|
+
headline = "Prevalence over time"
|
|
6477
|
+
}) => {
|
|
6478
|
+
const defaultSize = { height: "600px", width: "100%" };
|
|
6479
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, defaultSize, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, defaultSize, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
|
|
6480
|
+
PrevalenceOverTimeInner,
|
|
6481
|
+
{
|
|
6482
|
+
numerator,
|
|
6483
|
+
denominator,
|
|
6484
|
+
granularity,
|
|
6485
|
+
smoothingWindow,
|
|
6486
|
+
views,
|
|
6487
|
+
confidenceIntervalMethods
|
|
6488
|
+
}
|
|
6489
|
+
) }) }) });
|
|
6490
|
+
};
|
|
6491
|
+
const PrevalenceOverTimeInner = ({
|
|
6492
|
+
numerator,
|
|
6493
|
+
denominator,
|
|
6494
|
+
granularity,
|
|
6495
|
+
smoothingWindow,
|
|
6496
|
+
views,
|
|
6497
|
+
confidenceIntervalMethods
|
|
6198
6498
|
}) => {
|
|
6199
6499
|
const lapis = P(LapisUrlContext);
|
|
6200
6500
|
const { data, error, isLoading } = useQuery(
|
|
6201
6501
|
() => queryPrevalenceOverTime(numerator, denominator, granularity, smoothingWindow, lapis),
|
|
6202
6502
|
[lapis, numerator, denominator, granularity, smoothingWindow]
|
|
6203
6503
|
);
|
|
6204
|
-
const headline = "Prevalence over time";
|
|
6205
6504
|
if (isLoading) {
|
|
6206
|
-
return /* @__PURE__ */ u$1(
|
|
6505
|
+
return /* @__PURE__ */ u$1(LoadingDisplay, {});
|
|
6207
6506
|
}
|
|
6208
6507
|
if (error !== null) {
|
|
6209
|
-
return /* @__PURE__ */ u$1(
|
|
6508
|
+
return /* @__PURE__ */ u$1(ErrorDisplay, { error });
|
|
6210
6509
|
}
|
|
6211
6510
|
if (data === null) {
|
|
6212
|
-
return /* @__PURE__ */ u$1(
|
|
6511
|
+
return /* @__PURE__ */ u$1(NoDataDisplay, {});
|
|
6213
6512
|
}
|
|
6214
|
-
return /* @__PURE__ */ u$1(
|
|
6513
|
+
return /* @__PURE__ */ u$1(
|
|
6215
6514
|
PrevalenceOverTimeTabs,
|
|
6216
6515
|
{
|
|
6217
6516
|
views,
|
|
@@ -6219,7 +6518,7 @@ const PrevalenceOverTime = ({
|
|
|
6219
6518
|
granularity,
|
|
6220
6519
|
confidenceIntervalMethods
|
|
6221
6520
|
}
|
|
6222
|
-
)
|
|
6521
|
+
);
|
|
6223
6522
|
};
|
|
6224
6523
|
const PrevalenceOverTimeTabs = ({
|
|
6225
6524
|
views,
|
|
@@ -6313,7 +6612,13 @@ const Toolbar$1 = ({
|
|
|
6313
6612
|
filename: "prevalence-over-time.csv"
|
|
6314
6613
|
}
|
|
6315
6614
|
),
|
|
6316
|
-
/* @__PURE__ */ u$1(
|
|
6615
|
+
/* @__PURE__ */ u$1(PrevalenceOverTimeInfo, {})
|
|
6616
|
+
] });
|
|
6617
|
+
};
|
|
6618
|
+
const PrevalenceOverTimeInfo = () => {
|
|
6619
|
+
return /* @__PURE__ */ u$1(Info, { size: { width: "600px", height: "30vh" }, children: [
|
|
6620
|
+
/* @__PURE__ */ u$1(InfoHeadline1, { children: "Prevalence over time" }),
|
|
6621
|
+
/* @__PURE__ */ u$1(InfoParagraph, { children: "Prevalence over time info." })
|
|
6317
6622
|
] });
|
|
6318
6623
|
};
|
|
6319
6624
|
var __defProp$6 = Object.defineProperty;
|
|
@@ -6336,6 +6641,7 @@ let PrevalenceOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles
|
|
|
6336
6641
|
this.smoothingWindow = 0;
|
|
6337
6642
|
this.views = ["bar", "line", "bubble", "table"];
|
|
6338
6643
|
this.confidenceIntervalMethods = ["wilson"];
|
|
6644
|
+
this.headline = "Prevalence over time";
|
|
6339
6645
|
this.size = void 0;
|
|
6340
6646
|
}
|
|
6341
6647
|
render() {
|
|
@@ -6348,7 +6654,8 @@ let PrevalenceOverTimeComponent = class extends PreactLitAdapterWithGridJsStyles
|
|
|
6348
6654
|
smoothingWindow: this.smoothingWindow,
|
|
6349
6655
|
views: this.views,
|
|
6350
6656
|
confidenceIntervalMethods: this.confidenceIntervalMethods,
|
|
6351
|
-
size: this.size
|
|
6657
|
+
size: this.size,
|
|
6658
|
+
headline: this.headline
|
|
6352
6659
|
}
|
|
6353
6660
|
);
|
|
6354
6661
|
}
|
|
@@ -6371,6 +6678,9 @@ __decorateClass$6([
|
|
|
6371
6678
|
__decorateClass$6([
|
|
6372
6679
|
n2({ type: Array })
|
|
6373
6680
|
], PrevalenceOverTimeComponent.prototype, "confidenceIntervalMethods", 2);
|
|
6681
|
+
__decorateClass$6([
|
|
6682
|
+
n2({ type: String })
|
|
6683
|
+
], PrevalenceOverTimeComponent.prototype, "headline", 2);
|
|
6374
6684
|
__decorateClass$6([
|
|
6375
6685
|
n2({ type: Object })
|
|
6376
6686
|
], PrevalenceOverTimeComponent.prototype, "size", 2);
|
|
@@ -6563,11 +6873,29 @@ function toYearMonthDay(d2) {
|
|
|
6563
6873
|
};
|
|
6564
6874
|
}
|
|
6565
6875
|
const RelativeGrowthAdvantage = ({
|
|
6876
|
+
views,
|
|
6877
|
+
size,
|
|
6566
6878
|
numerator,
|
|
6567
6879
|
denominator,
|
|
6568
6880
|
generationTime,
|
|
6569
|
-
|
|
6570
|
-
|
|
6881
|
+
headline = "Relative growth advantage"
|
|
6882
|
+
}) => {
|
|
6883
|
+
const defaultSize = { height: "600px", width: "100%" };
|
|
6884
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, defaultSize, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, defaultSize, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(
|
|
6885
|
+
RelativeGrowthAdvantageInner,
|
|
6886
|
+
{
|
|
6887
|
+
views,
|
|
6888
|
+
numerator,
|
|
6889
|
+
denominator,
|
|
6890
|
+
generationTime
|
|
6891
|
+
}
|
|
6892
|
+
) }) }) });
|
|
6893
|
+
};
|
|
6894
|
+
const RelativeGrowthAdvantageInner = ({
|
|
6895
|
+
numerator,
|
|
6896
|
+
denominator,
|
|
6897
|
+
generationTime,
|
|
6898
|
+
views
|
|
6571
6899
|
}) => {
|
|
6572
6900
|
const lapis = P(LapisUrlContext);
|
|
6573
6901
|
const [yAxisScaleType, setYAxisScaleType] = p("linear");
|
|
@@ -6575,31 +6903,32 @@ const RelativeGrowthAdvantage = ({
|
|
|
6575
6903
|
() => queryRelativeGrowthAdvantage(numerator, denominator, generationTime, lapis),
|
|
6576
6904
|
[lapis, numerator, denominator, generationTime, views]
|
|
6577
6905
|
);
|
|
6578
|
-
const headline = "Relative growth advantage";
|
|
6579
6906
|
if (isLoading) {
|
|
6580
|
-
return /* @__PURE__ */ u$1(
|
|
6907
|
+
return /* @__PURE__ */ u$1(LoadingDisplay, {});
|
|
6581
6908
|
}
|
|
6582
6909
|
if (error !== null) {
|
|
6583
|
-
return /* @__PURE__ */ u$1(
|
|
6910
|
+
return /* @__PURE__ */ u$1(ErrorDisplay, { error });
|
|
6584
6911
|
}
|
|
6585
6912
|
if (data === null) {
|
|
6586
|
-
return /* @__PURE__ */ u$1(
|
|
6913
|
+
return /* @__PURE__ */ u$1(NoDataDisplay, {});
|
|
6587
6914
|
}
|
|
6588
|
-
return /* @__PURE__ */ u$1(
|
|
6915
|
+
return /* @__PURE__ */ u$1(
|
|
6589
6916
|
RelativeGrowthAdvantageTabs,
|
|
6590
6917
|
{
|
|
6591
6918
|
data,
|
|
6592
6919
|
yAxisScaleType,
|
|
6593
6920
|
setYAxisScaleType,
|
|
6594
|
-
views
|
|
6921
|
+
views,
|
|
6922
|
+
generationTime
|
|
6595
6923
|
}
|
|
6596
|
-
)
|
|
6924
|
+
);
|
|
6597
6925
|
};
|
|
6598
6926
|
const RelativeGrowthAdvantageTabs = ({
|
|
6599
6927
|
data,
|
|
6600
6928
|
yAxisScaleType,
|
|
6601
6929
|
setYAxisScaleType,
|
|
6602
|
-
views
|
|
6930
|
+
views,
|
|
6931
|
+
generationTime
|
|
6603
6932
|
}) => {
|
|
6604
6933
|
const getTab = (view) => {
|
|
6605
6934
|
switch (view) {
|
|
@@ -6621,16 +6950,45 @@ const RelativeGrowthAdvantageTabs = ({
|
|
|
6621
6950
|
}
|
|
6622
6951
|
};
|
|
6623
6952
|
const tabs = views.map((view) => getTab(view));
|
|
6624
|
-
const toolbar = () => /* @__PURE__ */ u$1(
|
|
6953
|
+
const toolbar = () => /* @__PURE__ */ u$1(
|
|
6954
|
+
RelativeGrowthAdvantageToolbar,
|
|
6955
|
+
{
|
|
6956
|
+
generationTime,
|
|
6957
|
+
yAxisScaleType,
|
|
6958
|
+
setYAxisScaleType
|
|
6959
|
+
}
|
|
6960
|
+
);
|
|
6625
6961
|
return /* @__PURE__ */ u$1(Tabs, { tabs, toolbar });
|
|
6626
6962
|
};
|
|
6627
6963
|
const RelativeGrowthAdvantageToolbar = ({
|
|
6628
6964
|
yAxisScaleType,
|
|
6629
|
-
setYAxisScaleType
|
|
6965
|
+
setYAxisScaleType,
|
|
6966
|
+
generationTime
|
|
6630
6967
|
}) => {
|
|
6631
6968
|
return /* @__PURE__ */ u$1("div", { class: "flex", children: [
|
|
6632
6969
|
/* @__PURE__ */ u$1(ScalingSelector, { yAxisScaleType, setYAxisScaleType }),
|
|
6633
|
-
/* @__PURE__ */ u$1(
|
|
6970
|
+
/* @__PURE__ */ u$1(RelativeGrowthAdvantageInfo, { generationTime })
|
|
6971
|
+
] });
|
|
6972
|
+
};
|
|
6973
|
+
const RelativeGrowthAdvantageInfo = ({ generationTime }) => {
|
|
6974
|
+
return /* @__PURE__ */ u$1(Info, { size: { width: "600px", height: "30vh" }, children: [
|
|
6975
|
+
/* @__PURE__ */ u$1(InfoHeadline1, { children: "Relative growth advantage" }),
|
|
6976
|
+
/* @__PURE__ */ u$1(InfoParagraph, { children: [
|
|
6977
|
+
"If variants spread pre-dominantly by local transmission across demographic groups, this estimate reflects the relative viral intrinsic growth advantage of the focal variant in the selected country and time frame. We report the relative growth advantage per ",
|
|
6978
|
+
generationTime,
|
|
6979
|
+
" days (in percentage; 0% means equal growth). Importantly, the relative growth advantage estimate reflects the advantage compared to the co-circulating variants. Thus, as new variants spread, the advantage of the focal variant may decrease. Different mechanisms can alter the intrinsic growth rate, including an intrinsic transmission advantage, immune evasion, and a prolonged infectious period. When absolute numbers of a variant are low, the growth advantage may merely reflect the current importance of introductions from abroad or the variant spreading in a particular demographic group. In this case, the estimate does not provide information on any intrinsic fitness advantages."
|
|
6980
|
+
] }),
|
|
6981
|
+
/* @__PURE__ */ u$1(InfoParagraph, { children: [
|
|
6982
|
+
"Example: Assume that 10 infections from the focal variant and 100 infections from the co-circulating variants occur today and that the focal variant has a relative growth advantage of 50%. Then, if the number of new infections from the co-circulating variants remains at 100 in ",
|
|
6983
|
+
generationTime,
|
|
6984
|
+
" days from today, we expect the number of new infections from the focal variant to be 15."
|
|
6985
|
+
] }),
|
|
6986
|
+
/* @__PURE__ */ u$1(InfoHeadline2, { children: "Reference" }),
|
|
6987
|
+
/* @__PURE__ */ u$1(InfoParagraph, { children: [
|
|
6988
|
+
'Chen, Chaoran, et al. "Quantification of the spread of SARS-CoV-2 variant B.1.1.7 in Switzerland." Epidemics (2021); doi:',
|
|
6989
|
+
" ",
|
|
6990
|
+
/* @__PURE__ */ u$1(InfoLink, { href: "https://www.sciencedirect.com/science/article/pii/S1755436521000335?via=ihub", children: "10.1016/j.epidem.2021.100480" })
|
|
6991
|
+
] })
|
|
6634
6992
|
] });
|
|
6635
6993
|
};
|
|
6636
6994
|
var __defProp$5 = Object.defineProperty;
|
|
@@ -6651,6 +7009,7 @@ let RelativeGrowthAdvantageComponent = class extends PreactLitAdapter {
|
|
|
6651
7009
|
this.denominator = {};
|
|
6652
7010
|
this.generationTime = 7;
|
|
6653
7011
|
this.views = ["line"];
|
|
7012
|
+
this.headline = "Relative growth advantage";
|
|
6654
7013
|
this.size = void 0;
|
|
6655
7014
|
}
|
|
6656
7015
|
render() {
|
|
@@ -6661,7 +7020,8 @@ let RelativeGrowthAdvantageComponent = class extends PreactLitAdapter {
|
|
|
6661
7020
|
denominator: this.denominator,
|
|
6662
7021
|
generationTime: this.generationTime,
|
|
6663
7022
|
views: this.views,
|
|
6664
|
-
size: this.size
|
|
7023
|
+
size: this.size,
|
|
7024
|
+
headline: this.headline
|
|
6665
7025
|
}
|
|
6666
7026
|
);
|
|
6667
7027
|
}
|
|
@@ -6678,6 +7038,9 @@ __decorateClass$5([
|
|
|
6678
7038
|
__decorateClass$5([
|
|
6679
7039
|
n2({ type: Array })
|
|
6680
7040
|
], RelativeGrowthAdvantageComponent.prototype, "views", 2);
|
|
7041
|
+
__decorateClass$5([
|
|
7042
|
+
n2({ type: String })
|
|
7043
|
+
], RelativeGrowthAdvantageComponent.prototype, "headline", 2);
|
|
6681
7044
|
__decorateClass$5([
|
|
6682
7045
|
n2({ type: Object })
|
|
6683
7046
|
], RelativeGrowthAdvantageComponent.prototype, "size", 2);
|
|
@@ -6715,22 +7078,31 @@ async function queryAggregateData(variant, fields, lapis, signal) {
|
|
|
6715
7078
|
})
|
|
6716
7079
|
);
|
|
6717
7080
|
}
|
|
6718
|
-
const Aggregate = ({
|
|
7081
|
+
const Aggregate = ({
|
|
7082
|
+
views,
|
|
7083
|
+
size,
|
|
7084
|
+
headline = "Mutations",
|
|
7085
|
+
filter,
|
|
7086
|
+
fields
|
|
7087
|
+
}) => {
|
|
7088
|
+
const defaultSize = { height: "600px", width: "100%" };
|
|
7089
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, defaultSize, headline, children: /* @__PURE__ */ u$1(ResizeContainer, { size, defaultSize, children: /* @__PURE__ */ u$1(Headline, { heading: headline, children: /* @__PURE__ */ u$1(AggregateInner, { fields, filter, views }) }) }) });
|
|
7090
|
+
};
|
|
7091
|
+
const AggregateInner = ({ fields, views, filter }) => {
|
|
6719
7092
|
const lapis = P(LapisUrlContext);
|
|
6720
7093
|
const { data, error, isLoading } = useQuery(async () => {
|
|
6721
7094
|
return queryAggregateData(filter, fields, lapis);
|
|
6722
7095
|
}, [filter, fields, lapis]);
|
|
6723
|
-
const headline = "Aggregate";
|
|
6724
7096
|
if (isLoading) {
|
|
6725
|
-
return /* @__PURE__ */ u$1(
|
|
7097
|
+
return /* @__PURE__ */ u$1(LoadingDisplay, {});
|
|
6726
7098
|
}
|
|
6727
7099
|
if (error !== null) {
|
|
6728
|
-
return /* @__PURE__ */ u$1(
|
|
7100
|
+
return /* @__PURE__ */ u$1(ErrorDisplay, { error });
|
|
6729
7101
|
}
|
|
6730
7102
|
if (data === null) {
|
|
6731
|
-
return /* @__PURE__ */ u$1(
|
|
7103
|
+
return /* @__PURE__ */ u$1(NoDataDisplay, {});
|
|
6732
7104
|
}
|
|
6733
|
-
return /* @__PURE__ */ u$1(
|
|
7105
|
+
return /* @__PURE__ */ u$1(AggregatedDataTabs, { data, views, fields });
|
|
6734
7106
|
};
|
|
6735
7107
|
const AggregatedDataTabs = ({ data, views, fields }) => {
|
|
6736
7108
|
const getTab = (view) => {
|
|
@@ -6748,7 +7120,7 @@ const AggregatedDataTabs = ({ data, views, fields }) => {
|
|
|
6748
7120
|
const Toolbar = ({ data }) => {
|
|
6749
7121
|
return /* @__PURE__ */ u$1("div", { class: "flex flex-row", children: [
|
|
6750
7122
|
/* @__PURE__ */ u$1(CsvDownloadButton, { className: "mx-1 btn btn-xs", getData: () => data, filename: "aggregate.csv" }),
|
|
6751
|
-
/* @__PURE__ */ u$1(Info, {
|
|
7123
|
+
/* @__PURE__ */ u$1(Info, { children: "Info for aggregate" })
|
|
6752
7124
|
] });
|
|
6753
7125
|
};
|
|
6754
7126
|
var __defProp$4 = Object.defineProperty;
|
|
@@ -6769,9 +7141,19 @@ let AggregateComponent = class extends PreactLitAdapterWithGridJsStyles {
|
|
|
6769
7141
|
this.views = ["table"];
|
|
6770
7142
|
this.filter = {};
|
|
6771
7143
|
this.size = void 0;
|
|
7144
|
+
this.headline = "Aggregate";
|
|
6772
7145
|
}
|
|
6773
7146
|
render() {
|
|
6774
|
-
return /* @__PURE__ */ u$1(
|
|
7147
|
+
return /* @__PURE__ */ u$1(
|
|
7148
|
+
Aggregate,
|
|
7149
|
+
{
|
|
7150
|
+
fields: this.fields,
|
|
7151
|
+
views: this.views,
|
|
7152
|
+
filter: this.filter,
|
|
7153
|
+
size: this.size,
|
|
7154
|
+
headline: this.headline
|
|
7155
|
+
}
|
|
7156
|
+
);
|
|
6775
7157
|
}
|
|
6776
7158
|
};
|
|
6777
7159
|
__decorateClass$4([
|
|
@@ -6786,8 +7168,11 @@ __decorateClass$4([
|
|
|
6786
7168
|
__decorateClass$4([
|
|
6787
7169
|
n2({ type: Object })
|
|
6788
7170
|
], AggregateComponent.prototype, "size", 2);
|
|
7171
|
+
__decorateClass$4([
|
|
7172
|
+
n2({ type: String })
|
|
7173
|
+
], AggregateComponent.prototype, "headline", 2);
|
|
6789
7174
|
AggregateComponent = __decorateClass$4([
|
|
6790
|
-
t$2("gs-aggregate
|
|
7175
|
+
t$2("gs-aggregate")
|
|
6791
7176
|
], AggregateComponent);
|
|
6792
7177
|
const toYYYYMMDD = (date) => {
|
|
6793
7178
|
if (!date) {
|
|
@@ -6813,12 +7198,29 @@ const presets = {
|
|
|
6813
7198
|
[PRESET_VALUE_LAST_6_MONTHS]: { label: "Last 6 months" }
|
|
6814
7199
|
};
|
|
6815
7200
|
const DateRangeSelector = ({
|
|
7201
|
+
customSelectOptions,
|
|
7202
|
+
earliestDate = "1900-01-01",
|
|
7203
|
+
initialValue,
|
|
7204
|
+
width
|
|
7205
|
+
}) => {
|
|
7206
|
+
const defaultSize = { width: "100%", height: "3rem" };
|
|
7207
|
+
const size = width === void 0 ? void 0 : { width, height: defaultSize.height };
|
|
7208
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { defaultSize, size, children: /* @__PURE__ */ u$1(ResizeContainer, { defaultSize, size, children: /* @__PURE__ */ u$1(
|
|
7209
|
+
DateRangeSelectorInner,
|
|
7210
|
+
{
|
|
7211
|
+
customSelectOptions,
|
|
7212
|
+
earliestDate,
|
|
7213
|
+
initialValue
|
|
7214
|
+
}
|
|
7215
|
+
) }) });
|
|
7216
|
+
};
|
|
7217
|
+
const DateRangeSelectorInner = ({
|
|
6816
7218
|
customSelectOptions,
|
|
6817
7219
|
earliestDate = "1900-01-01",
|
|
6818
7220
|
initialValue
|
|
6819
7221
|
}) => {
|
|
6820
|
-
const
|
|
6821
|
-
const
|
|
7222
|
+
const fromDatePickerRef = F(null);
|
|
7223
|
+
const toDatePickerRef = F(null);
|
|
6822
7224
|
const divRef = F(null);
|
|
6823
7225
|
const [dateFromPicker, setDateFromPicker] = p(null);
|
|
6824
7226
|
const [dateToPicker, setDateToPicker] = p(null);
|
|
@@ -6835,17 +7237,17 @@ const DateRangeSelector = ({
|
|
|
6835
7237
|
allowInput: true,
|
|
6836
7238
|
dateFormat: "Y-m-d"
|
|
6837
7239
|
};
|
|
6838
|
-
if (
|
|
7240
|
+
if (fromDatePickerRef.current) {
|
|
6839
7241
|
setDateFromPicker(
|
|
6840
|
-
flatpickr(
|
|
7242
|
+
flatpickr(fromDatePickerRef.current, {
|
|
6841
7243
|
...commonConfig,
|
|
6842
7244
|
defaultDate: selectedDates.dateFrom
|
|
6843
7245
|
})
|
|
6844
7246
|
);
|
|
6845
7247
|
}
|
|
6846
|
-
if (
|
|
7248
|
+
if (toDatePickerRef.current) {
|
|
6847
7249
|
setDateToPicker(
|
|
6848
|
-
flatpickr(
|
|
7250
|
+
flatpickr(toDatePickerRef.current, {
|
|
6849
7251
|
...commonConfig,
|
|
6850
7252
|
defaultDate: selectedDates.dateTo
|
|
6851
7253
|
})
|
|
@@ -6855,7 +7257,7 @@ const DateRangeSelector = ({
|
|
|
6855
7257
|
dateFromPicker == null ? void 0 : dateFromPicker.destroy();
|
|
6856
7258
|
dateToPicker == null ? void 0 : dateToPicker.destroy();
|
|
6857
7259
|
};
|
|
6858
|
-
}, [
|
|
7260
|
+
}, [fromDatePickerRef, toDatePickerRef]);
|
|
6859
7261
|
const onSelectChange = (value) => {
|
|
6860
7262
|
setSelectedDateRange(value);
|
|
6861
7263
|
const dateRange = getDatesForSelectorValue(value, customSelectOptions, earliestDate);
|
|
@@ -6903,13 +7305,13 @@ const DateRangeSelector = ({
|
|
|
6903
7305
|
})
|
|
6904
7306
|
);
|
|
6905
7307
|
};
|
|
6906
|
-
return /* @__PURE__ */ u$1("div", { class: "join", ref: divRef, children: [
|
|
7308
|
+
return /* @__PURE__ */ u$1("div", { class: "join w-full", ref: divRef, children: [
|
|
6907
7309
|
/* @__PURE__ */ u$1(
|
|
6908
7310
|
Select,
|
|
6909
7311
|
{
|
|
6910
7312
|
items: selectableOptions,
|
|
6911
7313
|
selected: selectedDateRange,
|
|
6912
|
-
selectStyle: "select-bordered rounded-none join-item",
|
|
7314
|
+
selectStyle: "select-bordered rounded-none join-item grow",
|
|
6913
7315
|
onChange: (event) => {
|
|
6914
7316
|
event.preventDefault();
|
|
6915
7317
|
const select = event.target;
|
|
@@ -6921,10 +7323,10 @@ const DateRangeSelector = ({
|
|
|
6921
7323
|
/* @__PURE__ */ u$1(
|
|
6922
7324
|
"input",
|
|
6923
7325
|
{
|
|
6924
|
-
class: "input input-bordered rounded-none join-item",
|
|
7326
|
+
class: "input input-bordered rounded-none join-item grow",
|
|
6925
7327
|
type: "text",
|
|
6926
7328
|
placeholder: "Date from",
|
|
6927
|
-
ref:
|
|
7329
|
+
ref: fromDatePickerRef,
|
|
6928
7330
|
onChange: onChangeDateFrom,
|
|
6929
7331
|
onBlur: onChangeDateFrom
|
|
6930
7332
|
}
|
|
@@ -6932,12 +7334,12 @@ const DateRangeSelector = ({
|
|
|
6932
7334
|
/* @__PURE__ */ u$1(
|
|
6933
7335
|
"input",
|
|
6934
7336
|
{
|
|
6935
|
-
class: "input input-bordered rounded-none join-item",
|
|
7337
|
+
class: "input input-bordered rounded-none join-item grow",
|
|
6936
7338
|
type: "text",
|
|
6937
7339
|
placeholder: "Date to",
|
|
6938
|
-
ref:
|
|
7340
|
+
ref: toDatePickerRef,
|
|
6939
7341
|
onChange: onChangeDateTo,
|
|
6940
|
-
onBlur:
|
|
7342
|
+
onBlur: onChangeDateTo
|
|
6941
7343
|
}
|
|
6942
7344
|
)
|
|
6943
7345
|
] });
|
|
@@ -7006,7 +7408,8 @@ let DateRangeSelectorComponent = class extends PreactLitAdapter {
|
|
|
7006
7408
|
super(...arguments);
|
|
7007
7409
|
this.customSelectOptions = [];
|
|
7008
7410
|
this.earliestDate = "1900-01-01";
|
|
7009
|
-
this.initialValue = "";
|
|
7411
|
+
this.initialValue = "last6Months";
|
|
7412
|
+
this.width = void 0;
|
|
7010
7413
|
}
|
|
7011
7414
|
render() {
|
|
7012
7415
|
return /* @__PURE__ */ u$1(
|
|
@@ -7014,7 +7417,8 @@ let DateRangeSelectorComponent = class extends PreactLitAdapter {
|
|
|
7014
7417
|
{
|
|
7015
7418
|
customSelectOptions: this.customSelectOptions,
|
|
7016
7419
|
earliestDate: this.earliestDate,
|
|
7017
|
-
initialValue: this.initialValue
|
|
7420
|
+
initialValue: this.initialValue,
|
|
7421
|
+
width: this.width
|
|
7018
7422
|
}
|
|
7019
7423
|
);
|
|
7020
7424
|
}
|
|
@@ -7028,6 +7432,9 @@ __decorateClass$3([
|
|
|
7028
7432
|
__decorateClass$3([
|
|
7029
7433
|
n2()
|
|
7030
7434
|
], DateRangeSelectorComponent.prototype, "initialValue", 2);
|
|
7435
|
+
__decorateClass$3([
|
|
7436
|
+
n2({ type: Object })
|
|
7437
|
+
], DateRangeSelectorComponent.prototype, "width", 2);
|
|
7031
7438
|
DateRangeSelectorComponent = __decorateClass$3([
|
|
7032
7439
|
t$2("gs-date-range-selector")
|
|
7033
7440
|
], DateRangeSelectorComponent);
|
|
@@ -7045,10 +7452,10 @@ async function fetchAutocompletionList(fields, lapis, signal) {
|
|
|
7045
7452
|
return [...locationValues].map((json) => JSON.parse(json)).sort(compareLocationEntries(fields));
|
|
7046
7453
|
}
|
|
7047
7454
|
function compareLocationEntries(fields) {
|
|
7048
|
-
return (a2,
|
|
7455
|
+
return (a2, b3) => {
|
|
7049
7456
|
for (const field of fields) {
|
|
7050
7457
|
const valueA = a2[field];
|
|
7051
|
-
const valueB =
|
|
7458
|
+
const valueB = b3[field];
|
|
7052
7459
|
if (valueA === valueB) {
|
|
7053
7460
|
continue;
|
|
7054
7461
|
}
|
|
@@ -7063,26 +7470,22 @@ function compareLocationEntries(fields) {
|
|
|
7063
7470
|
return 0;
|
|
7064
7471
|
};
|
|
7065
7472
|
}
|
|
7066
|
-
const LocationFilter = ({ initialValue, fields }) => {
|
|
7473
|
+
const LocationFilter = ({ width, initialValue, fields }) => {
|
|
7474
|
+
const defaultSize = { width: "100%", height: "3rem" };
|
|
7475
|
+
const size = width === void 0 ? void 0 : { width, height: defaultSize.height };
|
|
7476
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { defaultSize, size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, defaultSize, children: /* @__PURE__ */ u$1(LocationFilterInner, { initialValue, fields }) }) });
|
|
7477
|
+
};
|
|
7478
|
+
const LocationFilterInner = ({ initialValue, fields }) => {
|
|
7067
7479
|
const lapis = P(LapisUrlContext);
|
|
7068
7480
|
const [value, setValue] = p(initialValue ?? "");
|
|
7069
7481
|
const [unknownLocation, setUnknownLocation] = p(false);
|
|
7070
7482
|
const formRef = F(null);
|
|
7071
7483
|
const { data, error, isLoading } = useQuery(() => fetchAutocompletionList(fields, lapis), [fields, lapis]);
|
|
7072
|
-
if (isLoading)
|
|
7073
|
-
return /* @__PURE__ */ u$1(
|
|
7074
|
-
|
|
7075
|
-
/* @__PURE__ */ u$1("button", { class: "btn ml-1", disabled: true, type: "submit", children: "Loading..." })
|
|
7076
|
-
] });
|
|
7484
|
+
if (isLoading) {
|
|
7485
|
+
return /* @__PURE__ */ u$1(LoadingDisplay, {});
|
|
7486
|
+
}
|
|
7077
7487
|
if (error) {
|
|
7078
|
-
return /* @__PURE__ */ u$1(
|
|
7079
|
-
"Error: ",
|
|
7080
|
-
error.name,
|
|
7081
|
-
" ",
|
|
7082
|
-
error.message,
|
|
7083
|
-
" ",
|
|
7084
|
-
error.stack
|
|
7085
|
-
] });
|
|
7488
|
+
return /* @__PURE__ */ u$1(ErrorDisplay, { error });
|
|
7086
7489
|
}
|
|
7087
7490
|
const onInput = (event) => {
|
|
7088
7491
|
if (event.target instanceof HTMLInputElement) {
|
|
@@ -7113,7 +7516,7 @@ const LocationFilter = ({ initialValue, fields }) => {
|
|
|
7113
7516
|
setUnknownLocation(true);
|
|
7114
7517
|
}
|
|
7115
7518
|
};
|
|
7116
|
-
return /* @__PURE__ */ u$1("form", { class: "flex", onSubmit: submit, ref: formRef, children: [
|
|
7519
|
+
return /* @__PURE__ */ u$1("form", { class: "flex w-full", onSubmit: submit, ref: formRef, children: [
|
|
7117
7520
|
/* @__PURE__ */ u$1(
|
|
7118
7521
|
"input",
|
|
7119
7522
|
{
|
|
@@ -7158,9 +7561,10 @@ let LocationFilterComponent = class extends PreactLitAdapter {
|
|
|
7158
7561
|
super(...arguments);
|
|
7159
7562
|
this.initialValue = "";
|
|
7160
7563
|
this.fields = [];
|
|
7564
|
+
this.width = void 0;
|
|
7161
7565
|
}
|
|
7162
7566
|
render() {
|
|
7163
|
-
return /* @__PURE__ */ u$1(LocationFilter, { initialValue: this.initialValue, fields: this.fields });
|
|
7567
|
+
return /* @__PURE__ */ u$1(LocationFilter, { initialValue: this.initialValue, fields: this.fields, width: this.width });
|
|
7164
7568
|
}
|
|
7165
7569
|
};
|
|
7166
7570
|
__decorateClass$2([
|
|
@@ -7169,6 +7573,9 @@ __decorateClass$2([
|
|
|
7169
7573
|
__decorateClass$2([
|
|
7170
7574
|
n2({ type: Array })
|
|
7171
7575
|
], LocationFilterComponent.prototype, "fields", 2);
|
|
7576
|
+
__decorateClass$2([
|
|
7577
|
+
n2({ type: Object })
|
|
7578
|
+
], LocationFilterComponent.prototype, "width", 2);
|
|
7172
7579
|
LocationFilterComponent = __decorateClass$2([
|
|
7173
7580
|
t$2("gs-location-filter")
|
|
7174
7581
|
], LocationFilterComponent);
|
|
@@ -7177,7 +7584,16 @@ async function fetchAutocompleteList(lapis, field, signal) {
|
|
|
7177
7584
|
const data = (await fetchAggregatedOperator.evaluate(lapis, signal)).content;
|
|
7178
7585
|
return data.map((item) => item[field]);
|
|
7179
7586
|
}
|
|
7180
|
-
const TextInput = ({ lapisField, placeholderText, initialValue }) => {
|
|
7587
|
+
const TextInput = ({ width, lapisField, placeholderText, initialValue }) => {
|
|
7588
|
+
const defaultSize = { width: "100%", height: "3rem" };
|
|
7589
|
+
const size = width === void 0 ? void 0 : { width, height: defaultSize.height };
|
|
7590
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { defaultSize, size, children: /* @__PURE__ */ u$1(ResizeContainer, { size, defaultSize, children: /* @__PURE__ */ u$1(TextInputInner, { lapisField, placeholderText, initialValue }) }) });
|
|
7591
|
+
};
|
|
7592
|
+
const TextInputInner = ({
|
|
7593
|
+
lapisField,
|
|
7594
|
+
placeholderText,
|
|
7595
|
+
initialValue
|
|
7596
|
+
}) => {
|
|
7181
7597
|
const lapis = P(LapisUrlContext);
|
|
7182
7598
|
const inputRef = F(null);
|
|
7183
7599
|
const { data, error, isLoading } = useQuery(() => fetchAutocompleteList(lapis, lapisField), [lapisField, lapis]);
|
|
@@ -7214,7 +7630,7 @@ const TextInput = ({ lapisField, placeholderText, initialValue }) => {
|
|
|
7214
7630
|
"input",
|
|
7215
7631
|
{
|
|
7216
7632
|
type: "text",
|
|
7217
|
-
class: "input input-bordered",
|
|
7633
|
+
class: "input input-bordered w-full",
|
|
7218
7634
|
placeholder: placeholderText !== void 0 ? placeholderText : lapisField,
|
|
7219
7635
|
onInput,
|
|
7220
7636
|
ref: inputRef,
|
|
@@ -7242,6 +7658,7 @@ let TextInputComponent = class extends PreactLitAdapter {
|
|
|
7242
7658
|
this.initialValue = "";
|
|
7243
7659
|
this.lapisField = "";
|
|
7244
7660
|
this.placeholderText = "";
|
|
7661
|
+
this.width = void 0;
|
|
7245
7662
|
}
|
|
7246
7663
|
render() {
|
|
7247
7664
|
return /* @__PURE__ */ u$1(
|
|
@@ -7249,7 +7666,8 @@ let TextInputComponent = class extends PreactLitAdapter {
|
|
|
7249
7666
|
{
|
|
7250
7667
|
lapisField: this.lapisField,
|
|
7251
7668
|
placeholderText: this.placeholderText,
|
|
7252
|
-
initialValue: this.initialValue
|
|
7669
|
+
initialValue: this.initialValue,
|
|
7670
|
+
width: this.width
|
|
7253
7671
|
}
|
|
7254
7672
|
);
|
|
7255
7673
|
}
|
|
@@ -7263,6 +7681,9 @@ __decorateClass$1([
|
|
|
7263
7681
|
__decorateClass$1([
|
|
7264
7682
|
n2()
|
|
7265
7683
|
], TextInputComponent.prototype, "placeholderText", 2);
|
|
7684
|
+
__decorateClass$1([
|
|
7685
|
+
n2({ type: Object })
|
|
7686
|
+
], TextInputComponent.prototype, "width", 2);
|
|
7266
7687
|
TextInputComponent = __decorateClass$1([
|
|
7267
7688
|
t$2("gs-text-input")
|
|
7268
7689
|
], TextInputComponent);
|
|
@@ -7342,7 +7763,11 @@ const DeleteIcon = () => {
|
|
|
7342
7763
|
}
|
|
7343
7764
|
);
|
|
7344
7765
|
};
|
|
7345
|
-
const MutationFilter = ({ initialValue }) => {
|
|
7766
|
+
const MutationFilter = ({ initialValue, size }) => {
|
|
7767
|
+
const defaultSize = { width: "100%", height: "6.5rem" };
|
|
7768
|
+
return /* @__PURE__ */ u$1(ErrorBoundary, { size, defaultSize, children: /* @__PURE__ */ u$1(ResizeContainer, { size, defaultSize, children: /* @__PURE__ */ u$1(MutationFilterInner, { initialValue }) }) });
|
|
7769
|
+
};
|
|
7770
|
+
const MutationFilterInner = ({ initialValue }) => {
|
|
7346
7771
|
const referenceGenome = P(ReferenceGenomeContext);
|
|
7347
7772
|
const [selectedFilters, setSelectedFilters] = p(
|
|
7348
7773
|
getInitialState(initialValue, referenceGenome)
|
|
@@ -7391,7 +7816,7 @@ const MutationFilter = ({ initialValue }) => {
|
|
|
7391
7816
|
setInputValue(event.target.value);
|
|
7392
7817
|
setIsError(false);
|
|
7393
7818
|
};
|
|
7394
|
-
return /* @__PURE__ */ u$1("div", { class: `rounded-lg border border-gray-300 bg-white p-2`, children: [
|
|
7819
|
+
return /* @__PURE__ */ u$1("div", { class: `h-full w-full rounded-lg border border-gray-300 bg-white p-2 overflow-scroll`, children: [
|
|
7395
7820
|
/* @__PURE__ */ u$1("div", { class: "flex justify-between", children: [
|
|
7396
7821
|
/* @__PURE__ */ u$1(
|
|
7397
7822
|
SelectedMutationDisplay,
|
|
@@ -7401,7 +7826,7 @@ const MutationFilter = ({ initialValue }) => {
|
|
|
7401
7826
|
fireChangeEvent
|
|
7402
7827
|
}
|
|
7403
7828
|
),
|
|
7404
|
-
/* @__PURE__ */ u$1(Info, {
|
|
7829
|
+
/* @__PURE__ */ u$1(Info, { children: "Info for mutation filter" })
|
|
7405
7830
|
] }),
|
|
7406
7831
|
/* @__PURE__ */ u$1("form", { className: "mt-2 w-full", onSubmit: handleSubmit, ref: formRef, children: /* @__PURE__ */ u$1("label", { className: `input flex items-center gap-2 ${isError ? "input-error" : "input-bordered"}`, children: [
|
|
7407
7832
|
/* @__PURE__ */ u$1(
|
|
@@ -7554,11 +7979,11 @@ const SelectedFilter = ({
|
|
|
7554
7979
|
return /* @__PURE__ */ u$1(
|
|
7555
7980
|
"div",
|
|
7556
7981
|
{
|
|
7557
|
-
class: "flex items-center flex-nowrap gap-1 rounded me-1 px-2.5 py-0.5 font-medium text-xs mb-1",
|
|
7982
|
+
class: "flex items-center flex-nowrap gap-1 rounded me-1 px-2.5 py-0.5 font-medium text-xs mb-1 min-w-max",
|
|
7558
7983
|
style: { backgroundColor, color: textColor },
|
|
7559
7984
|
children: [
|
|
7560
|
-
/* @__PURE__ */ u$1("div", { children: mutation.toString() }),
|
|
7561
|
-
/* @__PURE__ */ u$1("button", { onClick: () => onDelete(mutation), children: /* @__PURE__ */ u$1(DeleteIcon, {}) })
|
|
7985
|
+
/* @__PURE__ */ u$1("div", { className: "whitespace-nowrap min-w-max", children: mutation.toString() }),
|
|
7986
|
+
/* @__PURE__ */ u$1("button", { type: "button", onClick: () => onDelete(mutation), children: /* @__PURE__ */ u$1(DeleteIcon, {}) })
|
|
7562
7987
|
]
|
|
7563
7988
|
}
|
|
7564
7989
|
);
|
|
@@ -7586,14 +8011,18 @@ let MutationFilterComponent = class extends PreactLitAdapter {
|
|
|
7586
8011
|
constructor() {
|
|
7587
8012
|
super(...arguments);
|
|
7588
8013
|
this.initialValue = void 0;
|
|
8014
|
+
this.size = void 0;
|
|
7589
8015
|
}
|
|
7590
8016
|
render() {
|
|
7591
|
-
return /* @__PURE__ */ u$1(ReferenceGenomesAwaiter, { children: /* @__PURE__ */ u$1(MutationFilter, { initialValue: this.initialValue }) });
|
|
8017
|
+
return /* @__PURE__ */ u$1(ReferenceGenomesAwaiter, { children: /* @__PURE__ */ u$1(MutationFilter, { initialValue: this.initialValue, size: this.size }) });
|
|
7592
8018
|
}
|
|
7593
8019
|
};
|
|
7594
8020
|
__decorateClass([
|
|
7595
8021
|
n2()
|
|
7596
8022
|
], MutationFilterComponent.prototype, "initialValue", 2);
|
|
8023
|
+
__decorateClass([
|
|
8024
|
+
n2({ type: Object })
|
|
8025
|
+
], MutationFilterComponent.prototype, "size", 2);
|
|
7597
8026
|
MutationFilterComponent = __decorateClass([
|
|
7598
8027
|
t$2("gs-mutation-filter")
|
|
7599
8028
|
], MutationFilterComponent);
|