@genspectrum/dashboard-components 0.6.7 → 0.6.8

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.
@@ -884,7 +884,7 @@ const bases = {
884
884
  };
885
885
  const sortSubstitutionsAndDeletions = (a2, b3) => {
886
886
  if (a2.segment !== b3.segment) {
887
- compareSegments(a2.segment, b3.segment);
887
+ return compareSegments(a2.segment, b3.segment);
888
888
  }
889
889
  if (a2.position !== b3.position) {
890
890
  return comparePositions(a2.position, b3.position);
@@ -8069,7 +8069,7 @@ const Tooltip = ({ children, content, position = "bottom" }) => {
8069
8069
  const MAX_NUMBER_OF_GRID_ROWS = 100;
8070
8070
  const MUTATION_CELL_WIDTH_REM = 8;
8071
8071
  const MutationsOverTimeGrid = ({ data, colorScale }) => {
8072
- const allMutations = data.getFirstAxisKeys();
8072
+ const allMutations = data.getFirstAxisKeys().sort(sortSubstitutionsAndDeletions);
8073
8073
  const shownMutations = allMutations.slice(0, MAX_NUMBER_OF_GRID_ROWS);
8074
8074
  const dates = data.getSecondAxisKeys().sort((a2, b3) => compareTemporal(a2, b3));
8075
8075
  const [showProportionText, setShowProportionText] = h(false);
@@ -8475,7 +8475,7 @@ const Toolbar = ({
8475
8475
  };
8476
8476
  function getDownloadData(filteredData) {
8477
8477
  const dates = filteredData.getSecondAxisKeys().sort((a2, b3) => compareTemporal(a2, b3));
8478
- return filteredData.getFirstAxisKeys().map((mutation) => {
8478
+ return filteredData.getFirstAxisKeys().sort(sortSubstitutionsAndDeletions).map((mutation) => {
8479
8479
  return dates.reduce(
8480
8480
  (accumulated, date) => {
8481
8481
  var _a;