tods-competition-factory 0.65.2 → 0.66.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.
@@ -249,7 +249,7 @@ const matchUpFormatCode = {
249
249
  };
250
250
 
251
251
  function factoryVersion() {
252
- return '0.65.2';
252
+ return '0.66.0';
253
253
  }
254
254
 
255
255
  const FORMAT_STANDARD = 'SET3-S:6/TB7'; // Best of 3 Tiebreak Sets to 6
@@ -9455,7 +9455,9 @@ function getRoundMatchUps$1({
9455
9455
  const currentRoundMatchUps = roundMatchUps[roundNumber].sort((a, b) => a.roundPosition - b.roundPosition);
9456
9456
  const currentRoundDrawPositions = currentRoundMatchUps.map(matchUp => (matchUp === null || matchUp === void 0 ? void 0 : matchUp.drawPositions) || []).flat();
9457
9457
  roundProfile[roundNumber].roundNumber = roundNumber; // convenience
9458
+ // convenience for display calculations
9458
9459
 
9460
+ roundProfile[roundNumber].roundFactor = roundProfile[roundNumber].matchUpsCount ? maxMatchUpsCount / roundProfile[roundNumber].matchUpsCount : 1;
9459
9461
  roundProfile[roundNumber].finishingRound = finishingRoundMap[roundNumber].finishingRound;
9460
9462
  roundProfile[roundNumber].roundName = finishingRoundMap[roundNumber].roundName;
9461
9463
  roundProfile[roundNumber].abbreviatedRoundName = finishingRoundMap[roundNumber].abbreviatedRoundName;
@@ -11379,7 +11381,7 @@ function getAllStructureMatchUps({
11379
11381
  matchUp,
11380
11382
  event
11381
11383
  }) {
11382
- var _roundNamingProfile$r, _roundNamingProfile$r2, _roundProfile$roundNu, _roundProfile$roundNu2;
11384
+ var _roundNamingProfile$r, _roundNamingProfile$r2, _roundProfile$roundNu, _roundProfile$roundNu2, _roundProfile$roundNu3;
11383
11385
 
11384
11386
  const tieFormat = matchUp.tieFormat || structure.tieFormat || (drawDefinition === null || drawDefinition === void 0 ? void 0 : drawDefinition.tieFormat) || (event === null || event === void 0 ? void 0 : event.tieFormat);
11385
11387
  const collectionDefinitions = tieFormat === null || tieFormat === void 0 ? void 0 : tieFormat.collectionDefinitions;
@@ -11421,6 +11423,7 @@ function getAllStructureMatchUps({
11421
11423
  const abbreviatedRoundName = roundNamingProfile && ((_roundNamingProfile$r2 = roundNamingProfile[roundNumber]) === null || _roundNamingProfile$r2 === void 0 ? void 0 : _roundNamingProfile$r2.abbreviatedRoundName) || additionalContext.abbreviatedRoundName;
11422
11424
  const feedRound = roundProfile === null || roundProfile === void 0 ? void 0 : (_roundProfile$roundNu = roundProfile[roundNumber]) === null || _roundProfile$roundNu === void 0 ? void 0 : _roundProfile$roundNu.feedRound;
11423
11425
  const preFeedRound = roundProfile === null || roundProfile === void 0 ? void 0 : (_roundProfile$roundNu2 = roundProfile[roundNumber]) === null || _roundProfile$roundNu2 === void 0 ? void 0 : _roundProfile$roundNu2.preFeedRound;
11426
+ const roundFactor = roundProfile === null || roundProfile === void 0 ? void 0 : (_roundProfile$roundNu3 = roundProfile[roundNumber]) === null || _roundProfile$roundNu3 === void 0 ? void 0 : _roundProfile$roundNu3.roundFactor;
11424
11427
  const drawPositionsRoundRanges = drawPositionsRanges && drawPositionsRanges[roundNumber];
11425
11428
  const drawPositionsRange = drawPositionsRoundRanges && drawPositionsRoundRanges[roundPosition];
11426
11429
  const sourceDrawPositionRoundRanges = sourceDrawPositionRanges && sourceDrawPositionRanges[roundNumber]; // order is important here as Round Robin matchUps already have inContext structureId
@@ -11439,6 +11442,7 @@ function getAllStructureMatchUps({
11439
11442
  matchUpStatus,
11440
11443
  matchUpTieId,
11441
11444
  preFeedRound,
11445
+ roundFactor,
11442
11446
  matchUpType,
11443
11447
  exitProfile,
11444
11448
  structureId,
@@ -13038,7 +13042,7 @@ function addUpcomingMatchUps({
13038
13042
  }
13039
13043
 
13040
13044
  if ((_loserTo = loserTo) !== null && _loserTo !== void 0 && (_loserTo$schedule = _loserTo.schedule) !== null && _loserTo$schedule !== void 0 && _loserTo$schedule.scheduledTime) {
13041
- const scheduleConflict = timeStringMinutes(winnerTo.schedule.scheduledTime) < timeStringMinutes(timeAfterRecovery);
13045
+ const scheduleConflict = timeStringMinutes(loserTo.schedule.scheduledTime) < timeStringMinutes(timeAfterRecovery);
13042
13046
 
13043
13047
  if (scheduleConflict) {
13044
13048
  scheduleConflictMatchUpIds[loserTo.matchUpId] = inContextMatchUp.matchUpId;