@genspectrum/dashboard-components 0.5.0 → 0.5.2

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.
@@ -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 = [], e = options, a = e.__b, v = e.__r, l = e.diffed, m = e.__c, s = e.unmount, d = e.__;
550
- function h(n3, t2) {
551
- e.__h && e.__h(r, n3, o || t2), o = 0;
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({ __V: c }), u2.__[n3];
553
+ return n3 >= u2.__.length && u2.__.push({}), u2.__[n3];
554
554
  }
555
- function p(n3) {
556
- return o = 1, y(D$1, n3);
555
+ function h(n3) {
556
+ return o = 1, p(D$1, n3);
557
557
  }
558
- function y(n3, u2, i2) {
559
- var o2 = h(t++, 2);
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 _(n3, u2) {
593
- var i2 = h(t++, 3);
594
- !e.__s && C(i2.__H, u2) && (i2.__ = n3, i2.i = u2, r.__H.__h.push(i2));
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 F(n3) {
597
- return o = 5, q(function() {
596
+ function A(n3) {
597
+ return o = 5, T(function() {
598
598
  return { current: n3 };
599
599
  }, []);
600
600
  }
601
- function q(n3, r2) {
602
- var u2 = h(t++, 7);
603
- return C(u2.__H, r2) ? (u2.__V = n3(), u2.i = r2, u2.__h = n3, u2.__V) : u2.__;
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 P(n3) {
606
- var u2 = r.context[n3.__c], i2 = h(t++, 9);
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 = h(t++, 10), i2 = p();
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 = [], e.__e(t2, n3.__v);
621
+ n3.__H.__h = [], c.__e(t2, n3.__v);
622
622
  }
623
623
  }
624
- e.__b = function(n3) {
625
- r = null, a && a(n3);
626
- }, e.__ = function(n3, t2) {
627
- n3 && t2.__k && t2.__k.__m && (n3.__m = t2.__k.__m), d && d(n3, t2);
628
- }, e.__r = function(n3) {
629
- v && v(n3), t = 0;
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.__V = c, n4.__N = n4.i = void 0;
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
- }, e.diffed = function(n3) {
635
- l && l(n3);
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 === e.requestAnimationFrame || ((i = e.requestAnimationFrame) || w)(j)), t2.__H.__.forEach(function(n4) {
638
- n4.i && (n4.__H = n4.i), n4.__V !== c && (n4.__ = n4.__V), n4.i = void 0, n4.__V = c;
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
- }, e.__c = function(n3, t2) {
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 = [], e.__e(r2, n4.__v);
649
+ }), t2 = [], c.__e(r2, n4.__v);
650
650
  }
651
- }), m && m(n3, t2);
652
- }, e.unmount = function(n3) {
653
- s && s(n3);
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 && e.__e(t2, r2.__v));
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 = F(null);
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 = F(null);
952
- const chartRef = F(null);
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 = F(null);
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] = p(null);
977
- const sets = q(
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 = q(
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(_2, elements) {
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 = F(null);
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 = `${x}px`;
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] = p(false);
1210
- const referenceRef = F(null);
1211
- const floatingRef = F(null);
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 = P(ReferenceGenomeContext);
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 p(displayedSegments);
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 = F(null);
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 = F(null);
1367
- const [h1Height, setH1Height] = p("2rem");
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] = p(false);
1388
- const referenceRef = F(null);
1389
- const floatingRef = F(null);
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] = p(0);
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] = p(percentage);
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] = p(tabs[0].title);
1626
- const [heightOfTabs, setHeightOfTabs] = p("3rem");
1627
- const tabRef = F(null);
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] = p(null);
1671
- const [error, setError] = p(null);
1672
- const [isLoading, setIsLoading] = p(true);
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 = P(LapisUrlContext);
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] = p({ min: 0.5, max: 1 });
1746
- const [displayedMutationTypes, setDisplayedMutationTypes] = p([
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 = q(
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-40 {
4334
- min-width: 10rem;
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 = P(LapisUrlContext);
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] = p({ min: 0.05, max: 1 });
5023
+ const [proportionInterval, setProportionInterval] = h({ min: 0.05, max: 1 });
5011
5024
  const [displayedSegments, setDisplayedSegments] = useDisplayedSegments(sequenceType);
5012
- const [displayedMutationTypes, setDisplayedMutationTypes] = p([
5025
+ const [displayedMutationTypes, setDisplayedMutationTypes] = h([
5013
5026
  { label: "Substitutions", checked: true, type: "substitution" },
5014
5027
  { label: "Deletions", checked: true, type: "deletion" }
5015
5028
  ]);
@@ -5323,34 +5336,33 @@ function sortNullToBeginningThenByDate(a2, b3) {
5323
5336
  return a2.dateRange === null ? -1 : b3.dateRange === null ? 1 : a2.dateRange.toString().localeCompare(b3.dateRange.toString());
5324
5337
  }
5325
5338
  const getDataset$1 = (prevalenceOverTimeVariant, index, confidenceIntervalMethod) => {
5326
- const generalConfig = {
5339
+ return {
5327
5340
  borderWidth: 1,
5328
5341
  pointRadius: 0,
5329
5342
  label: prevalenceOverTimeVariant.displayName,
5330
5343
  backgroundColor: singleGraphColorRGBAById(index, 0.3),
5331
- borderColor: singleGraphColorRGBAById(index)
5344
+ borderColor: singleGraphColorRGBAById(index),
5345
+ data: prevalenceOverTimeVariant.content.map(mapDataPoint(confidenceIntervalMethod))
5332
5346
  };
5347
+ };
5348
+ const mapDataPoint = (confidenceIntervalMethod) => {
5349
+ return (dataPoint) => {
5350
+ var _a;
5351
+ const confidenceInterval = getConfidenceInterval(dataPoint, confidenceIntervalMethod);
5352
+ return {
5353
+ y: dataPoint.prevalence,
5354
+ yMin: confidenceInterval.lowerLimit,
5355
+ yMax: confidenceInterval.upperLimit,
5356
+ x: ((_a = dataPoint.dateRange) == null ? void 0 : _a.toString()) ?? "Unknown"
5357
+ };
5358
+ };
5359
+ };
5360
+ const getConfidenceInterval = (dataPoint, confidenceIntervalMethod) => {
5333
5361
  switch (confidenceIntervalMethod) {
5334
5362
  case "wilson":
5335
- return {
5336
- ...generalConfig,
5337
- data: prevalenceOverTimeVariant.content.map((dataPoint) => {
5338
- var _a;
5339
- return {
5340
- y: dataPoint.prevalence,
5341
- yMin: wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total).lowerLimit,
5342
- yMax: wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total).upperLimit,
5343
- x: ((_a = dataPoint.dateRange) == null ? void 0 : _a.toString()) ?? "Unknown"
5344
- };
5345
- })
5346
- };
5363
+ return wilson95PercentConfidenceInterval(dataPoint.count, dataPoint.total);
5347
5364
  default:
5348
- return {
5349
- ...generalConfig,
5350
- data: prevalenceOverTimeVariant.content.map((dataPoint) => {
5351
- return { y: dataPoint.prevalence, x: dataPoint.dateRange };
5352
- })
5353
- };
5365
+ return { lowerLimit: void 0, upperLimit: void 0 };
5354
5366
  }
5355
5367
  };
5356
5368
  const tooltip$2 = (confidenceIntervalMethod) => {
@@ -6803,7 +6815,7 @@ const PrevalenceOverTimeInner = ({
6803
6815
  pageSize,
6804
6816
  yAxisMaxConfig
6805
6817
  }) => {
6806
- const lapis = P(LapisUrlContext);
6818
+ const lapis = x(LapisUrlContext);
6807
6819
  const { data, error, isLoading } = useQuery(
6808
6820
  () => queryPrevalenceOverTime(
6809
6821
  numeratorFilter,
@@ -6844,8 +6856,8 @@ const PrevalenceOverTimeTabs = ({
6844
6856
  pageSize,
6845
6857
  yAxisMaxConfig
6846
6858
  }) => {
6847
- const [yAxisScaleType, setYAxisScaleType] = p("linear");
6848
- const [confidenceIntervalMethod, setConfidenceIntervalMethod] = p(
6859
+ const [yAxisScaleType, setYAxisScaleType] = h("linear");
6860
+ const [confidenceIntervalMethod, setConfidenceIntervalMethod] = h(
6849
6861
  confidenceIntervalMethods.length > 0 ? confidenceIntervalMethods[0] : "none"
6850
6862
  );
6851
6863
  const getTab = (view) => {
@@ -7282,8 +7294,8 @@ const RelativeGrowthAdvantageInner = ({
7282
7294
  lapisDateField,
7283
7295
  yAxisMaxConfig
7284
7296
  }) => {
7285
- const lapis = P(LapisUrlContext);
7286
- const [yAxisScaleType, setYAxisScaleType] = p("linear");
7297
+ const lapis = x(LapisUrlContext);
7298
+ const [yAxisScaleType, setYAxisScaleType] = h("linear");
7287
7299
  const { data, error, isLoading } = useQuery(
7288
7300
  () => queryRelativeGrowthAdvantage(numeratorFilter, denominatorFilter, generationTime, lapis, lapisDateField),
7289
7301
  [lapis, numeratorFilter, denominatorFilter, generationTime, views]
@@ -7456,26 +7468,6 @@ __decorateClass$5([
7456
7468
  RelativeGrowthAdvantageComponent = __decorateClass$5([
7457
7469
  t$2("gs-relative-growth-advantage")
7458
7470
  ], 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
7471
  const compareAscending = (a2, b3) => {
7480
7472
  if (typeof a2 === "number" && typeof b3 === "number") {
7481
7473
  return a2 - b3;
@@ -7502,6 +7494,28 @@ async function queryAggregateData(lapisFilter, fields, lapis, initialSort = { fi
7502
7494
  })
7503
7495
  );
7504
7496
  }
7497
+ const AggregateTable = ({ data, fields, pageSize }) => {
7498
+ const headers = [
7499
+ ...fields.map((field) => {
7500
+ return {
7501
+ name: field,
7502
+ sort: {
7503
+ compare: compareAscending
7504
+ }
7505
+ };
7506
+ }),
7507
+ {
7508
+ name: "count",
7509
+ sort: true
7510
+ },
7511
+ {
7512
+ name: "proportion",
7513
+ sort: true,
7514
+ formatter: (cell) => formatProportion(cell)
7515
+ }
7516
+ ];
7517
+ return /* @__PURE__ */ u$1(Table, { data, columns: headers, pageSize });
7518
+ };
7505
7519
  const Aggregate = ({
7506
7520
  views,
7507
7521
  width,
@@ -7534,7 +7548,7 @@ const AggregateInner = ({
7534
7548
  initialSortDirection,
7535
7549
  pageSize
7536
7550
  }) => {
7537
- const lapis = P(LapisUrlContext);
7551
+ const lapis = x(LapisUrlContext);
7538
7552
  const { data, error, isLoading } = useQuery(async () => {
7539
7553
  return queryAggregateData(filter, fields, lapis, { field: initialSortField, direction: initialSortDirection });
7540
7554
  }, [filter, fields, lapis]);
@@ -7787,19 +7801,19 @@ const DateRangeSelectorInner = ({
7787
7801
  earliestDate,
7788
7802
  customSelectOptions
7789
7803
  );
7790
- const fromDatePickerRef = F(null);
7791
- const toDatePickerRef = F(null);
7792
- const divRef = F(null);
7793
- const [dateFromPicker, setDateFromPicker] = p(null);
7794
- const [dateToPicker, setDateToPicker] = p(null);
7795
- const [selectedDateRange, setSelectedDateRange] = p(
7804
+ const fromDatePickerRef = A(null);
7805
+ const toDatePickerRef = A(null);
7806
+ const divRef = A(null);
7807
+ const [dateFromPicker, setDateFromPicker] = h(null);
7808
+ const [dateToPicker, setDateToPicker] = h(null);
7809
+ const [selectedDateRange, setSelectedDateRange] = h(
7796
7810
  initialValues.initialSelectedDateRange
7797
7811
  );
7798
- const [selectedDates, setSelectedDates] = p({
7812
+ const [selectedDates, setSelectedDates] = h({
7799
7813
  dateFrom: initialValues.initialSelectedDateFrom,
7800
7814
  dateTo: initialValues.initialSelectedDateTo
7801
7815
  });
7802
- _(() => {
7816
+ y(() => {
7803
7817
  const commonConfig = {
7804
7818
  allowInput: true,
7805
7819
  dateFormat: "Y-m-d"
@@ -7878,7 +7892,7 @@ const DateRangeSelectorInner = ({
7878
7892
  {
7879
7893
  items: getSelectableOptions(customSelectOptions),
7880
7894
  selected: selectedDateRange,
7881
- selectStyle: "select-bordered rounded-none flex-grow w-40",
7895
+ selectStyle: "select-bordered rounded-none flex-grow min-w-[7.5rem]",
7882
7896
  onChange: (event) => {
7883
7897
  event.preventDefault();
7884
7898
  const select = event.target;
@@ -7891,9 +7905,8 @@ const DateRangeSelectorInner = ({
7891
7905
  /* @__PURE__ */ u$1(
7892
7906
  "input",
7893
7907
  {
7894
- class: "input input-bordered rounded-none flex-grow min-w-40",
7908
+ class: "input input-bordered rounded-none flex-grow w-[7.5rem]",
7895
7909
  type: "text",
7896
- size: 10,
7897
7910
  placeholder: "Date from",
7898
7911
  ref: fromDatePickerRef,
7899
7912
  onChange: onChangeDateFrom,
@@ -7903,9 +7916,8 @@ const DateRangeSelectorInner = ({
7903
7916
  /* @__PURE__ */ u$1(
7904
7917
  "input",
7905
7918
  {
7906
- class: "input input-bordered rounded-none flex-grow min-w-40",
7919
+ class: "input input-bordered rounded-none flex-grow w-[7.5rem]",
7907
7920
  type: "text",
7908
- size: 10,
7909
7921
  placeholder: "Date to",
7910
7922
  ref: toDatePickerRef,
7911
7923
  onChange: onChangeDateTo,
@@ -7976,7 +7988,7 @@ DateRangeSelectorComponent = __decorateClass$3([
7976
7988
  t$2("gs-date-range-selector")
7977
7989
  ], DateRangeSelectorComponent);
7978
7990
  async function fetchAutocompletionList(fields, lapis, signal) {
7979
- const toAncestorInHierarchyOverwriteValues = Array(fields.length - 1).fill(0).map((_2, i2) => i2 + 1).map((i2) => fields.slice(i2).reduce((acc, field) => ({ ...acc, [field]: null }), {}));
7991
+ const toAncestorInHierarchyOverwriteValues = Array(fields.length - 1).fill(0).map((_, i2) => i2 + 1).map((i2) => fields.slice(i2).reduce((acc, field) => ({ ...acc, [field]: null }), {}));
7980
7992
  const fetchAggregatedOperator = new FetchAggregatedOperator({}, fields);
7981
7993
  let data;
7982
7994
  try {
@@ -8028,10 +8040,10 @@ const LocationFilter = ({
8028
8040
  return /* @__PURE__ */ u$1(ErrorBoundary, { size: size2, children: /* @__PURE__ */ u$1(ResizeContainer, { size: size2, children: /* @__PURE__ */ u$1(LocationFilterInner, { initialValue, fields, placeholderText }) }) });
8029
8041
  };
8030
8042
  const LocationFilterInner = ({ initialValue, fields, placeholderText }) => {
8031
- const lapis = P(LapisUrlContext);
8032
- const [value, setValue] = p(initialValue ?? "");
8033
- const [unknownLocation, setUnknownLocation] = p(false);
8034
- const divRef = F(null);
8043
+ const lapis = x(LapisUrlContext);
8044
+ const [value, setValue] = h(initialValue ?? "");
8045
+ const [unknownLocation, setUnknownLocation] = h(false);
8046
+ const divRef = A(null);
8035
8047
  const { data, error, isLoading } = useQuery(() => fetchAutocompletionList(fields, lapis), [fields, lapis]);
8036
8048
  if (isLoading) {
8037
8049
  return /* @__PURE__ */ u$1(LoadingDisplay, {});
@@ -8152,8 +8164,8 @@ const TextInputInner = ({
8152
8164
  placeholderText,
8153
8165
  initialValue
8154
8166
  }) => {
8155
- const lapis = P(LapisUrlContext);
8156
- const inputRef = F(null);
8167
+ const lapis = x(LapisUrlContext);
8168
+ const inputRef = A(null);
8157
8169
  const { data, error, isLoading } = useQuery(() => fetchAutocompleteList(lapis, lapisField), [lapisField, lapis]);
8158
8170
  if (isLoading) {
8159
8171
  return /* @__PURE__ */ u$1(LoadingDisplay, {});
@@ -8245,7 +8257,7 @@ TextInputComponent = __decorateClass$1([
8245
8257
  t$2("gs-text-input")
8246
8258
  ], TextInputComponent);
8247
8259
  const ReferenceGenomesAwaiter = ({ children }) => {
8248
- const referenceGenome = P(ReferenceGenomeContext);
8260
+ const referenceGenome = x(ReferenceGenomeContext);
8249
8261
  if (isNotInitialized(referenceGenome)) {
8250
8262
  return /* @__PURE__ */ u$1("div", { className: "laoding loading-spinner loading-md", children: "Loading..." });
8251
8263
  }
@@ -8324,13 +8336,13 @@ const MutationFilter = ({ initialValue, width }) => {
8324
8336
  return /* @__PURE__ */ u$1(ErrorBoundary, { size: { height: "3.375rem", width }, children: /* @__PURE__ */ u$1("div", { style: width, children: /* @__PURE__ */ u$1(MutationFilterInner, { initialValue }) }) });
8325
8337
  };
8326
8338
  const MutationFilterInner = ({ initialValue }) => {
8327
- const referenceGenome = P(ReferenceGenomeContext);
8328
- const [selectedFilters, setSelectedFilters] = p(
8339
+ const referenceGenome = x(ReferenceGenomeContext);
8340
+ const [selectedFilters, setSelectedFilters] = h(
8329
8341
  getInitialState(initialValue, referenceGenome)
8330
8342
  );
8331
- const [inputValue, setInputValue] = p("");
8332
- const [isError, setIsError] = p(false);
8333
- const formRef = F(null);
8343
+ const [inputValue, setInputValue] = h("");
8344
+ const [isError, setIsError] = h(false);
8345
+ const formRef = A(null);
8334
8346
  const handleSubmit = (event) => {
8335
8347
  event.preventDefault();
8336
8348
  if (inputValue === "") {