@genspectrum/dashboard-components 0.5.0 → 0.5.1
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/dist/dashboard-components.js +155 -142
- package/dist/dashboard-components.js.map +1 -1
- package/dist/genspectrum-components.d.ts +2 -2
- package/dist/style.css +19 -6
- package/package.json +1 -1
- package/src/preact/aggregatedData/aggregate-table.tsx +4 -2
- package/src/preact/dateRangeSelector/date-range-selector.tsx +3 -5
- package/src/query/queryAggregateData.ts +1 -1
|
@@ -546,17 +546,17 @@ function u$1(e2, t2, n3, o2, i2, u2) {
|
|
|
546
546
|
if ("function" == typeof e2 && (a2 = e2.defaultProps)) for (c2 in a2) void 0 === p2[c2] && (p2[c2] = a2[c2]);
|
|
547
547
|
return options.vnode && options.vnode(l2), l2;
|
|
548
548
|
}
|
|
549
|
-
var t, r, u, i, o = 0, f = [], c =
|
|
550
|
-
function
|
|
551
|
-
|
|
549
|
+
var t, r, u, i, o = 0, f = [], c = options, e = c.__b, a = c.__r, v = c.diffed, l = c.__c, m = c.unmount, s = c.__;
|
|
550
|
+
function d(n3, t2) {
|
|
551
|
+
c.__h && c.__h(r, n3, o || t2), o = 0;
|
|
552
552
|
var u2 = r.__H || (r.__H = { __: [], __h: [] });
|
|
553
|
-
return n3 >= u2.__.length && u2.__.push({
|
|
553
|
+
return n3 >= u2.__.length && u2.__.push({}), u2.__[n3];
|
|
554
554
|
}
|
|
555
|
-
function
|
|
556
|
-
return o = 1,
|
|
555
|
+
function h(n3) {
|
|
556
|
+
return o = 1, p(D$1, n3);
|
|
557
557
|
}
|
|
558
|
-
function
|
|
559
|
-
var o2 =
|
|
558
|
+
function p(n3, u2, i2) {
|
|
559
|
+
var o2 = d(t++, 2);
|
|
560
560
|
if (o2.t = n3, !o2.__c && (o2.__ = [i2 ? i2(u2) : D$1(void 0, u2), function(n4) {
|
|
561
561
|
var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n4);
|
|
562
562
|
t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({}));
|
|
@@ -589,25 +589,25 @@ function y(n3, u2, i2) {
|
|
|
589
589
|
}
|
|
590
590
|
return o2.__N || o2.__;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
var i2 =
|
|
594
|
-
!
|
|
592
|
+
function y(n3, u2) {
|
|
593
|
+
var i2 = d(t++, 3);
|
|
594
|
+
!c.__s && C(i2.__H, u2) && (i2.__ = n3, i2.i = u2, r.__H.__h.push(i2));
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
return o = 5,
|
|
596
|
+
function A(n3) {
|
|
597
|
+
return o = 5, T(function() {
|
|
598
598
|
return { current: n3 };
|
|
599
599
|
}, []);
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
var u2 =
|
|
603
|
-
return C(u2.__H, r2)
|
|
601
|
+
function T(n3, r2) {
|
|
602
|
+
var u2 = d(t++, 7);
|
|
603
|
+
return C(u2.__H, r2) && (u2.__ = n3(), u2.__H = r2, u2.__h = n3), u2.__;
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
var u2 = r.context[n3.__c], i2 =
|
|
605
|
+
function x(n3) {
|
|
606
|
+
var u2 = r.context[n3.__c], i2 = d(t++, 9);
|
|
607
607
|
return i2.c = n3, u2 ? (null == i2.__ && (i2.__ = true, u2.sub(r)), u2.props.value) : n3.__;
|
|
608
608
|
}
|
|
609
609
|
function b2(n3) {
|
|
610
|
-
var u2 =
|
|
610
|
+
var u2 = d(t++, 10), i2 = h();
|
|
611
611
|
return u2.__ = n3, r.componentDidCatch || (r.componentDidCatch = function(n4, t2) {
|
|
612
612
|
u2.__ && u2.__(n4, t2), i2[1](n4);
|
|
613
613
|
}), [i2[0], function() {
|
|
@@ -618,26 +618,26 @@ function j() {
|
|
|
618
618
|
for (var n3; n3 = f.shift(); ) if (n3.__P && n3.__H) try {
|
|
619
619
|
n3.__H.__h.forEach(z), n3.__H.__h.forEach(B), n3.__H.__h = [];
|
|
620
620
|
} catch (t2) {
|
|
621
|
-
n3.__H.__h = [],
|
|
621
|
+
n3.__H.__h = [], c.__e(t2, n3.__v);
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
|
|
625
|
-
r = null,
|
|
626
|
-
},
|
|
627
|
-
n3 && t2.__k && t2.__k.__m && (n3.__m = t2.__k.__m),
|
|
628
|
-
},
|
|
629
|
-
|
|
624
|
+
c.__b = function(n3) {
|
|
625
|
+
r = null, e && e(n3);
|
|
626
|
+
}, c.__ = function(n3, t2) {
|
|
627
|
+
n3 && t2.__k && t2.__k.__m && (n3.__m = t2.__k.__m), s && s(n3, t2);
|
|
628
|
+
}, c.__r = function(n3) {
|
|
629
|
+
a && a(n3), t = 0;
|
|
630
630
|
var i2 = (r = n3.__c).__H;
|
|
631
631
|
i2 && (u === r ? (i2.__h = [], r.__h = [], i2.__.forEach(function(n4) {
|
|
632
|
-
n4.__N && (n4.__ = n4.__N), n4.
|
|
632
|
+
n4.__N && (n4.__ = n4.__N), n4.i = n4.__N = void 0;
|
|
633
633
|
})) : (i2.__h.forEach(z), i2.__h.forEach(B), i2.__h = [], t = 0)), u = r;
|
|
634
|
-
},
|
|
635
|
-
|
|
634
|
+
}, c.diffed = function(n3) {
|
|
635
|
+
v && v(n3);
|
|
636
636
|
var t2 = n3.__c;
|
|
637
|
-
t2 && t2.__H && (t2.__H.__h.length && (1 !== f.push(t2) && i ===
|
|
638
|
-
n4.i && (n4.__H = n4.i), n4.
|
|
637
|
+
t2 && t2.__H && (t2.__H.__h.length && (1 !== f.push(t2) && i === c.requestAnimationFrame || ((i = c.requestAnimationFrame) || w)(j)), t2.__H.__.forEach(function(n4) {
|
|
638
|
+
n4.i && (n4.__H = n4.i), n4.i = void 0;
|
|
639
639
|
})), u = r = null;
|
|
640
|
-
},
|
|
640
|
+
}, c.__c = function(n3, t2) {
|
|
641
641
|
t2.some(function(n4) {
|
|
642
642
|
try {
|
|
643
643
|
n4.__h.forEach(z), n4.__h = n4.__h.filter(function(n5) {
|
|
@@ -646,11 +646,11 @@ e.__b = function(n3) {
|
|
|
646
646
|
} catch (r2) {
|
|
647
647
|
t2.some(function(n5) {
|
|
648
648
|
n5.__h && (n5.__h = []);
|
|
649
|
-
}), t2 = [],
|
|
649
|
+
}), t2 = [], c.__e(r2, n4.__v);
|
|
650
650
|
}
|
|
651
|
-
}),
|
|
652
|
-
},
|
|
653
|
-
|
|
651
|
+
}), l && l(n3, t2);
|
|
652
|
+
}, c.unmount = function(n3) {
|
|
653
|
+
m && m(n3);
|
|
654
654
|
var t2, r2 = n3.__c;
|
|
655
655
|
r2 && r2.__H && (r2.__H.__.forEach(function(n4) {
|
|
656
656
|
try {
|
|
@@ -658,7 +658,7 @@ e.__b = function(n3) {
|
|
|
658
658
|
} catch (n5) {
|
|
659
659
|
t2 = n5;
|
|
660
660
|
}
|
|
661
|
-
}), r2.__H = void 0, t2 &&
|
|
661
|
+
}), r2.__H = void 0, t2 && c.__e(t2, r2.__v));
|
|
662
662
|
};
|
|
663
663
|
var k = "function" == typeof requestAnimationFrame;
|
|
664
664
|
function w(n3) {
|
|
@@ -748,8 +748,8 @@ const tableStyle = {
|
|
|
748
748
|
};
|
|
749
749
|
const Table = ({ data, columns, pageSize }) => {
|
|
750
750
|
const pagination = typeof pageSize === "number" ? { limit: pageSize } : pageSize;
|
|
751
|
-
const wrapper3 =
|
|
752
|
-
|
|
751
|
+
const wrapper3 = A(null);
|
|
752
|
+
y(() => {
|
|
753
753
|
if (wrapper3.current === null) {
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
@@ -948,9 +948,9 @@ const MutationComparisonTable = ({
|
|
|
948
948
|
return /* @__PURE__ */ u$1(Table, { data: tableData, columns: headers, pageSize });
|
|
949
949
|
};
|
|
950
950
|
const GsChart = ({ configuration }) => {
|
|
951
|
-
const canvasRef =
|
|
952
|
-
const chartRef =
|
|
953
|
-
|
|
951
|
+
const canvasRef = A(null);
|
|
952
|
+
const chartRef = A(null);
|
|
953
|
+
y(() => {
|
|
954
954
|
if (canvasRef.current === null) {
|
|
955
955
|
return;
|
|
956
956
|
}
|
|
@@ -971,10 +971,10 @@ const MutationComparisonVenn = ({
|
|
|
971
971
|
data,
|
|
972
972
|
proportionInterval
|
|
973
973
|
}) => {
|
|
974
|
-
const divRef =
|
|
974
|
+
const divRef = A(null);
|
|
975
975
|
const noElementSelectedMessage = "You have no elements selected. Click in the venn diagram to select.";
|
|
976
|
-
const [selectedDatasetIndex, setSelectedDatasetIndex] =
|
|
977
|
-
const sets =
|
|
976
|
+
const [selectedDatasetIndex, setSelectedDatasetIndex] = h(null);
|
|
977
|
+
const sets = T(
|
|
978
978
|
() => extractSets(
|
|
979
979
|
data.content.map((mutationData) => ({
|
|
980
980
|
displayName: mutationData.displayName,
|
|
@@ -990,7 +990,7 @@ const MutationComparisonVenn = ({
|
|
|
990
990
|
),
|
|
991
991
|
[data, proportionInterval]
|
|
992
992
|
);
|
|
993
|
-
|
|
993
|
+
y(() => {
|
|
994
994
|
if (divRef.current === null) {
|
|
995
995
|
return;
|
|
996
996
|
}
|
|
@@ -1002,7 +1002,7 @@ const MutationComparisonVenn = ({
|
|
|
1002
1002
|
const label = sets.datasets[0].data[selectedDatasetIndex].label;
|
|
1003
1003
|
divRef.current.innerText = `${label}: ${values.join(", ")}` || "";
|
|
1004
1004
|
}, [divRef, selectedDatasetIndex, sets]);
|
|
1005
|
-
const config =
|
|
1005
|
+
const config = T(
|
|
1006
1006
|
() => ({
|
|
1007
1007
|
type: "venn",
|
|
1008
1008
|
data: sets,
|
|
@@ -1027,7 +1027,7 @@ const MutationComparisonVenn = ({
|
|
|
1027
1027
|
}
|
|
1028
1028
|
},
|
|
1029
1029
|
events: ["click"],
|
|
1030
|
-
onClick(
|
|
1030
|
+
onClick(_, elements) {
|
|
1031
1031
|
if (elements.length === 0) {
|
|
1032
1032
|
setSelectedDatasetIndex(null);
|
|
1033
1033
|
}
|
|
@@ -1152,8 +1152,8 @@ function filterMutationData(data, displayedSegments, displayedMutationTypes) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
const LapisUrlContext = createContext$1("");
|
|
1154
1154
|
function useFloatingUi(referenceRef, floatingRef, middleware, placement) {
|
|
1155
|
-
const cleanupRef =
|
|
1156
|
-
|
|
1155
|
+
const cleanupRef = A(null);
|
|
1156
|
+
y(() => {
|
|
1157
1157
|
if (!referenceRef.current || !floatingRef.current) {
|
|
1158
1158
|
return;
|
|
1159
1159
|
}
|
|
@@ -1163,8 +1163,8 @@ function useFloatingUi(referenceRef, floatingRef, middleware, placement) {
|
|
|
1163
1163
|
computePosition(reference, floating, {
|
|
1164
1164
|
placement,
|
|
1165
1165
|
middleware
|
|
1166
|
-
}).then(({ x, y: y2 }) => {
|
|
1167
|
-
floating.style.left = `${
|
|
1166
|
+
}).then(({ x: x2, y: y2 }) => {
|
|
1167
|
+
floating.style.left = `${x2}px`;
|
|
1168
1168
|
floating.style.top = `${y2}px`;
|
|
1169
1169
|
});
|
|
1170
1170
|
};
|
|
@@ -1178,7 +1178,7 @@ function useFloatingUi(referenceRef, floatingRef, middleware, placement) {
|
|
|
1178
1178
|
}, [placement, middleware, referenceRef, floatingRef]);
|
|
1179
1179
|
}
|
|
1180
1180
|
function useCloseOnClickOutside(floatingRef, referenceRef, setShowContent) {
|
|
1181
|
-
|
|
1181
|
+
y(() => {
|
|
1182
1182
|
const handleClickOutside = (event) => {
|
|
1183
1183
|
const path = event.composedPath();
|
|
1184
1184
|
if (floatingRef.current && !path.includes(floatingRef.current) && referenceRef.current && !path.includes(referenceRef.current)) {
|
|
@@ -1192,7 +1192,7 @@ function useCloseOnClickOutside(floatingRef, referenceRef, setShowContent) {
|
|
|
1192
1192
|
}, [floatingRef, referenceRef, setShowContent]);
|
|
1193
1193
|
}
|
|
1194
1194
|
function useCloseOnEsc(setShowHelp) {
|
|
1195
|
-
|
|
1195
|
+
y(() => {
|
|
1196
1196
|
const handleKeyDown = (event) => {
|
|
1197
1197
|
if (event.key === "Escape") {
|
|
1198
1198
|
setShowHelp(false);
|
|
@@ -1206,9 +1206,9 @@ function useCloseOnEsc(setShowHelp) {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
const dropdownClass = "z-10 absolute w-max top-0 left-0 bg-white p-4 border border-gray-200 shadow-lg rounded-md";
|
|
1208
1208
|
const Dropdown = ({ children, buttonTitle, placement }) => {
|
|
1209
|
-
const [showContent, setShowContent] =
|
|
1210
|
-
const referenceRef =
|
|
1211
|
-
const floatingRef =
|
|
1209
|
+
const [showContent, setShowContent] = h(false);
|
|
1210
|
+
const referenceRef = A(null);
|
|
1211
|
+
const floatingRef = A(null);
|
|
1212
1212
|
useFloatingUi(referenceRef, floatingRef, [offset(4), shift(), flip()], placement);
|
|
1213
1213
|
useCloseOnClickOutside(floatingRef, referenceRef, setShowContent);
|
|
1214
1214
|
useCloseOnEsc(setShowContent);
|
|
@@ -1273,13 +1273,13 @@ const SegmentSelector = ({
|
|
|
1273
1273
|
);
|
|
1274
1274
|
};
|
|
1275
1275
|
function useDisplayedSegments(sequenceType) {
|
|
1276
|
-
const referenceGenome =
|
|
1276
|
+
const referenceGenome = x(ReferenceGenomeContext);
|
|
1277
1277
|
const displayedSegments = getSegmentNames(referenceGenome, sequenceType).map((segment) => ({
|
|
1278
1278
|
segment,
|
|
1279
1279
|
label: segment,
|
|
1280
1280
|
checked: true
|
|
1281
1281
|
}));
|
|
1282
|
-
return
|
|
1282
|
+
return h(displayedSegments);
|
|
1283
1283
|
}
|
|
1284
1284
|
const CsvDownloadButton = ({
|
|
1285
1285
|
label = "Download",
|
|
@@ -1323,7 +1323,7 @@ class UserFacingError extends Error {
|
|
|
1323
1323
|
}
|
|
1324
1324
|
const ErrorDisplay = ({ error }) => {
|
|
1325
1325
|
console.error(error);
|
|
1326
|
-
const ref =
|
|
1326
|
+
const ref = A(null);
|
|
1327
1327
|
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: [
|
|
1328
1328
|
/* @__PURE__ */ u$1("div", { className: "text-red-700 font-bold", children: "Error" }),
|
|
1329
1329
|
/* @__PURE__ */ u$1("div", { children: [
|
|
@@ -1363,9 +1363,9 @@ const Headline = ({ heading, children }) => {
|
|
|
1363
1363
|
return /* @__PURE__ */ u$1(ResizingHeadline, { heading, children });
|
|
1364
1364
|
};
|
|
1365
1365
|
const ResizingHeadline = ({ heading, children }) => {
|
|
1366
|
-
const ref =
|
|
1367
|
-
const [h1Height, setH1Height] =
|
|
1368
|
-
|
|
1366
|
+
const ref = A(null);
|
|
1367
|
+
const [h1Height, setH1Height] = h("2rem");
|
|
1368
|
+
y(() => {
|
|
1369
1369
|
if (ref.current) {
|
|
1370
1370
|
const h1Height2 = ref.current.getBoundingClientRect().height;
|
|
1371
1371
|
setH1Height(`${h1Height2}px`);
|
|
@@ -1384,9 +1384,9 @@ const ErrorBoundary = ({ size: size2, headline, children }) => {
|
|
|
1384
1384
|
return /* @__PURE__ */ u$1(Fragment, { children });
|
|
1385
1385
|
};
|
|
1386
1386
|
const Info = ({ children, height }) => {
|
|
1387
|
-
const [showHelp, setShowHelp] =
|
|
1388
|
-
const referenceRef =
|
|
1389
|
-
const floatingRef =
|
|
1387
|
+
const [showHelp, setShowHelp] = h(false);
|
|
1388
|
+
const referenceRef = A(null);
|
|
1389
|
+
const floatingRef = A(null);
|
|
1390
1390
|
useFloatingUi(referenceRef, floatingRef, [
|
|
1391
1391
|
offset(10),
|
|
1392
1392
|
shift(),
|
|
@@ -1471,7 +1471,7 @@ const MinMaxRangeSlider = ({
|
|
|
1471
1471
|
}) => {
|
|
1472
1472
|
const sliderColor = "#C6C6C6";
|
|
1473
1473
|
const rangeColor = "#387bbe";
|
|
1474
|
-
const [zIndexTo, setZIndexTo] =
|
|
1474
|
+
const [zIndexTo, setZIndexTo] = h(0);
|
|
1475
1475
|
const onMinChange = (event) => {
|
|
1476
1476
|
const input = event.target;
|
|
1477
1477
|
const minValue = Number(input.value);
|
|
@@ -1540,8 +1540,8 @@ const percentageInRange = (percentage) => {
|
|
|
1540
1540
|
return percentage <= 100 && percentage >= 0;
|
|
1541
1541
|
};
|
|
1542
1542
|
const PercentInput = ({ percentage, setPercentage }) => {
|
|
1543
|
-
const [internalPercentage, setInternalPercentage] =
|
|
1544
|
-
|
|
1543
|
+
const [internalPercentage, setInternalPercentage] = h(percentage);
|
|
1544
|
+
y(() => {
|
|
1545
1545
|
setInternalPercentage(percentage);
|
|
1546
1546
|
}, [percentage]);
|
|
1547
1547
|
const handleInputChange = (event) => {
|
|
@@ -1622,16 +1622,16 @@ const ProportionSelectorDropdown = ({
|
|
|
1622
1622
|
) });
|
|
1623
1623
|
};
|
|
1624
1624
|
const Tabs = ({ tabs, toolbar }) => {
|
|
1625
|
-
const [activeTab, setActiveTab] =
|
|
1626
|
-
const [heightOfTabs, setHeightOfTabs] =
|
|
1627
|
-
const tabRef =
|
|
1625
|
+
const [activeTab, setActiveTab] = h(tabs[0].title);
|
|
1626
|
+
const [heightOfTabs, setHeightOfTabs] = h("3rem");
|
|
1627
|
+
const tabRef = A(null);
|
|
1628
1628
|
const updateHeightOfTabs = () => {
|
|
1629
1629
|
if (tabRef.current) {
|
|
1630
1630
|
const heightOfTabs2 = tabRef.current.getBoundingClientRect().height;
|
|
1631
1631
|
setHeightOfTabs(`${heightOfTabs2}px`);
|
|
1632
1632
|
}
|
|
1633
1633
|
};
|
|
1634
|
-
|
|
1634
|
+
y(() => {
|
|
1635
1635
|
updateHeightOfTabs();
|
|
1636
1636
|
window.addEventListener("resize", updateHeightOfTabs);
|
|
1637
1637
|
return () => {
|
|
@@ -1667,10 +1667,10 @@ const Tabs = ({ tabs, toolbar }) => {
|
|
|
1667
1667
|
] });
|
|
1668
1668
|
};
|
|
1669
1669
|
function useQuery(fetchDataCallback, dependencies = []) {
|
|
1670
|
-
const [data, setData] =
|
|
1671
|
-
const [error, setError] =
|
|
1672
|
-
const [isLoading, setIsLoading] =
|
|
1673
|
-
|
|
1670
|
+
const [data, setData] = h(null);
|
|
1671
|
+
const [error, setError] = h(null);
|
|
1672
|
+
const [isLoading, setIsLoading] = h(true);
|
|
1673
|
+
y(() => {
|
|
1674
1674
|
const fetchData = async () => {
|
|
1675
1675
|
setIsLoading(true);
|
|
1676
1676
|
try {
|
|
@@ -1713,7 +1713,7 @@ const MutationComparisonInner = ({
|
|
|
1713
1713
|
views,
|
|
1714
1714
|
pageSize
|
|
1715
1715
|
}) => {
|
|
1716
|
-
const lapis =
|
|
1716
|
+
const lapis = x(LapisUrlContext);
|
|
1717
1717
|
const { data, error, isLoading } = useQuery(async () => {
|
|
1718
1718
|
return queryMutationData(lapisFilters, sequenceType, lapis);
|
|
1719
1719
|
}, [lapisFilters, sequenceType, lapis]);
|
|
@@ -1742,13 +1742,13 @@ const MutationComparisonTabs = ({
|
|
|
1742
1742
|
sequenceType,
|
|
1743
1743
|
pageSize
|
|
1744
1744
|
}) => {
|
|
1745
|
-
const [proportionInterval, setProportionInterval] =
|
|
1746
|
-
const [displayedMutationTypes, setDisplayedMutationTypes] =
|
|
1745
|
+
const [proportionInterval, setProportionInterval] = h({ min: 0.5, max: 1 });
|
|
1746
|
+
const [displayedMutationTypes, setDisplayedMutationTypes] = h([
|
|
1747
1747
|
{ label: "Substitutions", checked: true, type: "substitution" },
|
|
1748
1748
|
{ label: "Deletions", checked: true, type: "deletion" }
|
|
1749
1749
|
]);
|
|
1750
1750
|
const [displayedSegments, setDisplayedSegments] = useDisplayedSegments(sequenceType);
|
|
1751
|
-
const filteredData =
|
|
1751
|
+
const filteredData = T(
|
|
1752
1752
|
() => filterMutationData(data, displayedSegments, displayedMutationTypes),
|
|
1753
1753
|
[data, displayedSegments, displayedMutationTypes]
|
|
1754
1754
|
);
|
|
@@ -2299,7 +2299,11 @@ html {
|
|
|
2299
2299
|
}
|
|
2300
2300
|
|
|
2301
2301
|
* {
|
|
2302
|
-
scrollbar-color: currentColor transparent;
|
|
2302
|
+
scrollbar-color: color-mix(in oklch, currentColor 35%, transparent) transparent;
|
|
2303
|
+
}
|
|
2304
|
+
|
|
2305
|
+
*:hover {
|
|
2306
|
+
scrollbar-color: color-mix(in oklch, currentColor 60%, transparent) transparent;
|
|
2303
2307
|
}
|
|
2304
2308
|
|
|
2305
2309
|
:root {
|
|
@@ -3309,6 +3313,9 @@ input.tab:checked + .tab-content,
|
|
|
3309
3313
|
margin-bottom: 0px;
|
|
3310
3314
|
margin-inline-start: -1px;
|
|
3311
3315
|
}
|
|
3316
|
+
.join > :where(*:not(:first-child)):is(.btn) {
|
|
3317
|
+
margin-inline-start: calc(var(--border-btn) * -1);
|
|
3318
|
+
}
|
|
3312
3319
|
.loading {
|
|
3313
3320
|
pointer-events: none;
|
|
3314
3321
|
display: inline-block;
|
|
@@ -4059,11 +4066,17 @@ input.tab:checked + .tab-content,
|
|
|
4059
4066
|
margin-right: 0px;
|
|
4060
4067
|
margin-top: -1px;
|
|
4061
4068
|
}
|
|
4069
|
+
.join.join-vertical > :where(*:not(:first-child)):is(.btn) {
|
|
4070
|
+
margin-top: calc(var(--border-btn) * -1);
|
|
4071
|
+
}
|
|
4062
4072
|
.join.join-horizontal > :where(*:not(:first-child)) {
|
|
4063
4073
|
margin-top: 0px;
|
|
4064
4074
|
margin-bottom: 0px;
|
|
4065
4075
|
margin-inline-start: -1px;
|
|
4066
4076
|
}
|
|
4077
|
+
.join.join-horizontal > :where(*:not(:first-child)):is(.btn) {
|
|
4078
|
+
margin-inline-start: calc(var(--border-btn) * -1);
|
|
4079
|
+
}
|
|
4067
4080
|
.modal-top :where(.modal-box) {
|
|
4068
4081
|
width: 100%;
|
|
4069
4082
|
max-width: none;
|
|
@@ -4317,12 +4330,12 @@ input.tab:checked + .tab-content,
|
|
|
4317
4330
|
.w-32 {
|
|
4318
4331
|
width: 8rem;
|
|
4319
4332
|
}
|
|
4320
|
-
.w-40 {
|
|
4321
|
-
width: 10rem;
|
|
4322
|
-
}
|
|
4323
4333
|
.w-64 {
|
|
4324
4334
|
width: 16rem;
|
|
4325
4335
|
}
|
|
4336
|
+
.w-\\[7\\.5rem\\] {
|
|
4337
|
+
width: 7.5rem;
|
|
4338
|
+
}
|
|
4326
4339
|
.w-full {
|
|
4327
4340
|
width: 100%;
|
|
4328
4341
|
}
|
|
@@ -4330,8 +4343,8 @@ input.tab:checked + .tab-content,
|
|
|
4330
4343
|
width: -moz-max-content;
|
|
4331
4344
|
width: max-content;
|
|
4332
4345
|
}
|
|
4333
|
-
.min-w
|
|
4334
|
-
min-width:
|
|
4346
|
+
.min-w-\\[7\\.5rem\\] {
|
|
4347
|
+
min-width: 7.5rem;
|
|
4335
4348
|
}
|
|
4336
4349
|
.max-w-screen-lg {
|
|
4337
4350
|
max-width: 1024px;
|
|
@@ -4991,7 +5004,7 @@ const MutationsInner = ({
|
|
|
4991
5004
|
views,
|
|
4992
5005
|
pageSize
|
|
4993
5006
|
}) => {
|
|
4994
|
-
const lapis =
|
|
5007
|
+
const lapis = x(LapisUrlContext);
|
|
4995
5008
|
const { data, error, isLoading } = useQuery(async () => {
|
|
4996
5009
|
return queryMutationsData(lapisFilter, sequenceType, lapis);
|
|
4997
5010
|
}, [lapisFilter, sequenceType, lapis]);
|
|
@@ -5007,9 +5020,9 @@ const MutationsInner = ({
|
|
|
5007
5020
|
return /* @__PURE__ */ u$1(MutationsTabs, { mutationsData: data, sequenceType, views, pageSize });
|
|
5008
5021
|
};
|
|
5009
5022
|
const MutationsTabs = ({ mutationsData, sequenceType, views, pageSize }) => {
|
|
5010
|
-
const [proportionInterval, setProportionInterval] =
|
|
5023
|
+
const [proportionInterval, setProportionInterval] = h({ min: 0.05, max: 1 });
|
|
5011
5024
|
const [displayedSegments, setDisplayedSegments] = useDisplayedSegments(sequenceType);
|
|
5012
|
-
const [displayedMutationTypes, setDisplayedMutationTypes] =
|
|
5025
|
+
const [displayedMutationTypes, setDisplayedMutationTypes] = h([
|
|
5013
5026
|
{ label: "Substitutions", checked: true, type: "substitution" },
|
|
5014
5027
|
{ label: "Deletions", checked: true, type: "deletion" }
|
|
5015
5028
|
]);
|
|
@@ -6803,7 +6816,7 @@ const PrevalenceOverTimeInner = ({
|
|
|
6803
6816
|
pageSize,
|
|
6804
6817
|
yAxisMaxConfig
|
|
6805
6818
|
}) => {
|
|
6806
|
-
const lapis =
|
|
6819
|
+
const lapis = x(LapisUrlContext);
|
|
6807
6820
|
const { data, error, isLoading } = useQuery(
|
|
6808
6821
|
() => queryPrevalenceOverTime(
|
|
6809
6822
|
numeratorFilter,
|
|
@@ -6844,8 +6857,8 @@ const PrevalenceOverTimeTabs = ({
|
|
|
6844
6857
|
pageSize,
|
|
6845
6858
|
yAxisMaxConfig
|
|
6846
6859
|
}) => {
|
|
6847
|
-
const [yAxisScaleType, setYAxisScaleType] =
|
|
6848
|
-
const [confidenceIntervalMethod, setConfidenceIntervalMethod] =
|
|
6860
|
+
const [yAxisScaleType, setYAxisScaleType] = h("linear");
|
|
6861
|
+
const [confidenceIntervalMethod, setConfidenceIntervalMethod] = h(
|
|
6849
6862
|
confidenceIntervalMethods.length > 0 ? confidenceIntervalMethods[0] : "none"
|
|
6850
6863
|
);
|
|
6851
6864
|
const getTab = (view) => {
|
|
@@ -7282,8 +7295,8 @@ const RelativeGrowthAdvantageInner = ({
|
|
|
7282
7295
|
lapisDateField,
|
|
7283
7296
|
yAxisMaxConfig
|
|
7284
7297
|
}) => {
|
|
7285
|
-
const lapis =
|
|
7286
|
-
const [yAxisScaleType, setYAxisScaleType] =
|
|
7298
|
+
const lapis = x(LapisUrlContext);
|
|
7299
|
+
const [yAxisScaleType, setYAxisScaleType] = h("linear");
|
|
7287
7300
|
const { data, error, isLoading } = useQuery(
|
|
7288
7301
|
() => queryRelativeGrowthAdvantage(numeratorFilter, denominatorFilter, generationTime, lapis, lapisDateField),
|
|
7289
7302
|
[lapis, numeratorFilter, denominatorFilter, generationTime, views]
|
|
@@ -7456,26 +7469,6 @@ __decorateClass$5([
|
|
|
7456
7469
|
RelativeGrowthAdvantageComponent = __decorateClass$5([
|
|
7457
7470
|
t$2("gs-relative-growth-advantage")
|
|
7458
7471
|
], RelativeGrowthAdvantageComponent);
|
|
7459
|
-
const AggregateTable = ({ data, fields, pageSize }) => {
|
|
7460
|
-
const headers = [
|
|
7461
|
-
...fields.map((field) => {
|
|
7462
|
-
return {
|
|
7463
|
-
name: field,
|
|
7464
|
-
sort: true
|
|
7465
|
-
};
|
|
7466
|
-
}),
|
|
7467
|
-
{
|
|
7468
|
-
name: "count",
|
|
7469
|
-
sort: true
|
|
7470
|
-
},
|
|
7471
|
-
{
|
|
7472
|
-
name: "proportion",
|
|
7473
|
-
sort: true,
|
|
7474
|
-
formatter: (cell) => formatProportion(cell)
|
|
7475
|
-
}
|
|
7476
|
-
];
|
|
7477
|
-
return /* @__PURE__ */ u$1(Table, { data, columns: headers, pageSize });
|
|
7478
|
-
};
|
|
7479
7472
|
const compareAscending = (a2, b3) => {
|
|
7480
7473
|
if (typeof a2 === "number" && typeof b3 === "number") {
|
|
7481
7474
|
return a2 - b3;
|
|
@@ -7502,6 +7495,28 @@ async function queryAggregateData(lapisFilter, fields, lapis, initialSort = { fi
|
|
|
7502
7495
|
})
|
|
7503
7496
|
);
|
|
7504
7497
|
}
|
|
7498
|
+
const AggregateTable = ({ data, fields, pageSize }) => {
|
|
7499
|
+
const headers = [
|
|
7500
|
+
...fields.map((field) => {
|
|
7501
|
+
return {
|
|
7502
|
+
name: field,
|
|
7503
|
+
sort: {
|
|
7504
|
+
compare: compareAscending
|
|
7505
|
+
}
|
|
7506
|
+
};
|
|
7507
|
+
}),
|
|
7508
|
+
{
|
|
7509
|
+
name: "count",
|
|
7510
|
+
sort: true
|
|
7511
|
+
},
|
|
7512
|
+
{
|
|
7513
|
+
name: "proportion",
|
|
7514
|
+
sort: true,
|
|
7515
|
+
formatter: (cell) => formatProportion(cell)
|
|
7516
|
+
}
|
|
7517
|
+
];
|
|
7518
|
+
return /* @__PURE__ */ u$1(Table, { data, columns: headers, pageSize });
|
|
7519
|
+
};
|
|
7505
7520
|
const Aggregate = ({
|
|
7506
7521
|
views,
|
|
7507
7522
|
width,
|
|
@@ -7534,7 +7549,7 @@ const AggregateInner = ({
|
|
|
7534
7549
|
initialSortDirection,
|
|
7535
7550
|
pageSize
|
|
7536
7551
|
}) => {
|
|
7537
|
-
const lapis =
|
|
7552
|
+
const lapis = x(LapisUrlContext);
|
|
7538
7553
|
const { data, error, isLoading } = useQuery(async () => {
|
|
7539
7554
|
return queryAggregateData(filter, fields, lapis, { field: initialSortField, direction: initialSortDirection });
|
|
7540
7555
|
}, [filter, fields, lapis]);
|
|
@@ -7787,19 +7802,19 @@ const DateRangeSelectorInner = ({
|
|
|
7787
7802
|
earliestDate,
|
|
7788
7803
|
customSelectOptions
|
|
7789
7804
|
);
|
|
7790
|
-
const fromDatePickerRef =
|
|
7791
|
-
const toDatePickerRef =
|
|
7792
|
-
const divRef =
|
|
7793
|
-
const [dateFromPicker, setDateFromPicker] =
|
|
7794
|
-
const [dateToPicker, setDateToPicker] =
|
|
7795
|
-
const [selectedDateRange, setSelectedDateRange] =
|
|
7805
|
+
const fromDatePickerRef = A(null);
|
|
7806
|
+
const toDatePickerRef = A(null);
|
|
7807
|
+
const divRef = A(null);
|
|
7808
|
+
const [dateFromPicker, setDateFromPicker] = h(null);
|
|
7809
|
+
const [dateToPicker, setDateToPicker] = h(null);
|
|
7810
|
+
const [selectedDateRange, setSelectedDateRange] = h(
|
|
7796
7811
|
initialValues.initialSelectedDateRange
|
|
7797
7812
|
);
|
|
7798
|
-
const [selectedDates, setSelectedDates] =
|
|
7813
|
+
const [selectedDates, setSelectedDates] = h({
|
|
7799
7814
|
dateFrom: initialValues.initialSelectedDateFrom,
|
|
7800
7815
|
dateTo: initialValues.initialSelectedDateTo
|
|
7801
7816
|
});
|
|
7802
|
-
|
|
7817
|
+
y(() => {
|
|
7803
7818
|
const commonConfig = {
|
|
7804
7819
|
allowInput: true,
|
|
7805
7820
|
dateFormat: "Y-m-d"
|
|
@@ -7878,7 +7893,7 @@ const DateRangeSelectorInner = ({
|
|
|
7878
7893
|
{
|
|
7879
7894
|
items: getSelectableOptions(customSelectOptions),
|
|
7880
7895
|
selected: selectedDateRange,
|
|
7881
|
-
selectStyle: "select-bordered rounded-none flex-grow w-
|
|
7896
|
+
selectStyle: "select-bordered rounded-none flex-grow min-w-[7.5rem]",
|
|
7882
7897
|
onChange: (event) => {
|
|
7883
7898
|
event.preventDefault();
|
|
7884
7899
|
const select = event.target;
|
|
@@ -7891,9 +7906,8 @@ const DateRangeSelectorInner = ({
|
|
|
7891
7906
|
/* @__PURE__ */ u$1(
|
|
7892
7907
|
"input",
|
|
7893
7908
|
{
|
|
7894
|
-
class: "input input-bordered rounded-none flex-grow
|
|
7909
|
+
class: "input input-bordered rounded-none flex-grow w-[7.5rem]",
|
|
7895
7910
|
type: "text",
|
|
7896
|
-
size: 10,
|
|
7897
7911
|
placeholder: "Date from",
|
|
7898
7912
|
ref: fromDatePickerRef,
|
|
7899
7913
|
onChange: onChangeDateFrom,
|
|
@@ -7903,9 +7917,8 @@ const DateRangeSelectorInner = ({
|
|
|
7903
7917
|
/* @__PURE__ */ u$1(
|
|
7904
7918
|
"input",
|
|
7905
7919
|
{
|
|
7906
|
-
class: "input input-bordered rounded-none flex-grow
|
|
7920
|
+
class: "input input-bordered rounded-none flex-grow w-[7.5rem]",
|
|
7907
7921
|
type: "text",
|
|
7908
|
-
size: 10,
|
|
7909
7922
|
placeholder: "Date to",
|
|
7910
7923
|
ref: toDatePickerRef,
|
|
7911
7924
|
onChange: onChangeDateTo,
|
|
@@ -7976,7 +7989,7 @@ DateRangeSelectorComponent = __decorateClass$3([
|
|
|
7976
7989
|
t$2("gs-date-range-selector")
|
|
7977
7990
|
], DateRangeSelectorComponent);
|
|
7978
7991
|
async function fetchAutocompletionList(fields, lapis, signal) {
|
|
7979
|
-
const toAncestorInHierarchyOverwriteValues = Array(fields.length - 1).fill(0).map((
|
|
7992
|
+
const toAncestorInHierarchyOverwriteValues = Array(fields.length - 1).fill(0).map((_, i2) => i2 + 1).map((i2) => fields.slice(i2).reduce((acc, field) => ({ ...acc, [field]: null }), {}));
|
|
7980
7993
|
const fetchAggregatedOperator = new FetchAggregatedOperator({}, fields);
|
|
7981
7994
|
let data;
|
|
7982
7995
|
try {
|
|
@@ -8028,10 +8041,10 @@ const LocationFilter = ({
|
|
|
8028
8041
|
return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(LocationFilterInner, { initialValue, fields, placeholderText }) }) });
|
|
8029
8042
|
};
|
|
8030
8043
|
const LocationFilterInner = ({ initialValue, fields, placeholderText }) => {
|
|
8031
|
-
const lapis =
|
|
8032
|
-
const [value, setValue] =
|
|
8033
|
-
const [unknownLocation, setUnknownLocation] =
|
|
8034
|
-
const divRef =
|
|
8044
|
+
const lapis = x(LapisUrlContext);
|
|
8045
|
+
const [value, setValue] = h(initialValue ?? "");
|
|
8046
|
+
const [unknownLocation, setUnknownLocation] = h(false);
|
|
8047
|
+
const divRef = A(null);
|
|
8035
8048
|
const { data, error, isLoading } = useQuery(() => fetchAutocompletionList(fields, lapis), [fields, lapis]);
|
|
8036
8049
|
if (isLoading) {
|
|
8037
8050
|
return /* @__PURE__ */ u$1(LoadingDisplay, {});
|
|
@@ -8152,8 +8165,8 @@ const TextInputInner = ({
|
|
|
8152
8165
|
placeholderText,
|
|
8153
8166
|
initialValue
|
|
8154
8167
|
}) => {
|
|
8155
|
-
const lapis =
|
|
8156
|
-
const inputRef =
|
|
8168
|
+
const lapis = x(LapisUrlContext);
|
|
8169
|
+
const inputRef = A(null);
|
|
8157
8170
|
const { data, error, isLoading } = useQuery(() => fetchAutocompleteList(lapis, lapisField), [lapisField, lapis]);
|
|
8158
8171
|
if (isLoading) {
|
|
8159
8172
|
return /* @__PURE__ */ u$1(LoadingDisplay, {});
|
|
@@ -8245,7 +8258,7 @@ TextInputComponent = __decorateClass$1([
|
|
|
8245
8258
|
t$2("gs-text-input")
|
|
8246
8259
|
], TextInputComponent);
|
|
8247
8260
|
const ReferenceGenomesAwaiter = ({ children }) => {
|
|
8248
|
-
const referenceGenome =
|
|
8261
|
+
const referenceGenome = x(ReferenceGenomeContext);
|
|
8249
8262
|
if (isNotInitialized(referenceGenome)) {
|
|
8250
8263
|
return /* @__PURE__ */ u$1("div", { className: "laoding loading-spinner loading-md", children: "Loading..." });
|
|
8251
8264
|
}
|
|
@@ -8324,13 +8337,13 @@ const MutationFilter = ({ initialValue, width }) => {
|
|
|
8324
8337
|
return /* @__PURE__ */ u$1(ErrorBoundary, { size: { height: "3.375rem", width }, children: /* @__PURE__ */ u$1("div", { style: width, children: /* @__PURE__ */ u$1(MutationFilterInner, { initialValue }) }) });
|
|
8325
8338
|
};
|
|
8326
8339
|
const MutationFilterInner = ({ initialValue }) => {
|
|
8327
|
-
const referenceGenome =
|
|
8328
|
-
const [selectedFilters, setSelectedFilters] =
|
|
8340
|
+
const referenceGenome = x(ReferenceGenomeContext);
|
|
8341
|
+
const [selectedFilters, setSelectedFilters] = h(
|
|
8329
8342
|
getInitialState(initialValue, referenceGenome)
|
|
8330
8343
|
);
|
|
8331
|
-
const [inputValue, setInputValue] =
|
|
8332
|
-
const [isError, setIsError] =
|
|
8333
|
-
const formRef =
|
|
8344
|
+
const [inputValue, setInputValue] = h("");
|
|
8345
|
+
const [isError, setIsError] = h(false);
|
|
8346
|
+
const formRef = A(null);
|
|
8334
8347
|
const handleSubmit = (event) => {
|
|
8335
8348
|
event.preventDefault();
|
|
8336
8349
|
if (inputValue === "") {
|