tods-competition-factory 2.1.8 → 2.1.9

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function factoryVersion() {
6
- return '2.1.8';
6
+ return '2.1.9';
7
7
  }
8
8
 
9
9
  function isFunction(obj) {
@@ -11100,8 +11100,7 @@ function removeDrawPosition$1({ inContextDrawMatchUps, positionAssignments, tour
11100
11100
  (targetMatchUp.matchUpStatus &&
11101
11101
  [DEFAULTED, WALKOVER$2].includes(targetMatchUp.matchUpStatus) &&
11102
11102
  targetMatchUp.matcHUpStatus) ||
11103
- (targetMatchUp.drawPositions?.length === 2 && TO_BE_PLAYED) ||
11104
- undefined;
11103
+ TO_BE_PLAYED;
11105
11104
  targetMatchUp.matchUpStatus = newMatchUpStatus;
11106
11105
  if (targetMatchUp.matchUpStatus && [WALKOVER$2, DEFAULTED].includes(targetMatchUp.matchUpStatus))
11107
11106
  targetMatchUp.winningSide = undefined;
@@ -11119,9 +11118,9 @@ function removeDrawPosition$1({ inContextDrawMatchUps, positionAssignments, tour
11119
11118
  }
11120
11119
  modifyMatchUpNotice({
11121
11120
  tournamentId: tournamentRecord?.tournamentId,
11121
+ context: `${stack}-${drawPosition}`,
11122
11122
  eventId: event?.eventId,
11123
11123
  matchUp: targetMatchUp,
11124
- context: `${stack}-${drawPosition}`,
11125
11124
  drawDefinition,
11126
11125
  });
11127
11126
  }
@@ -42480,8 +42479,8 @@ function removeDirectedBye({ inContextDrawMatchUps, tournamentRecord, drawDefini
42480
42479
  inContextDrawMatchUps,
42481
42480
  tournamentRecord,
42482
42481
  drawDefinition,
42483
- matchUpsMap,
42484
42482
  drawPosition,
42483
+ matchUpsMap,
42485
42484
  structureId,
42486
42485
  event,
42487
42486
  });
@@ -43165,11 +43164,11 @@ function removeDoubleExit(params) {
43165
43164
  if (byePropagatedToLoserMatchUp && isFMLC) {
43166
43165
  const roundMatchUps = inContextDrawMatchUps.filter(({ roundNumber, structureId }) => structureId === matchUp.structureId && roundNumber === 1);
43167
43166
  const roundPositions = roundMatchUps.map(({ roundPosition }) => roundPosition);
43168
- const pairedPosition = chunkArray(roundPositions.sort(), 2)
43169
- .find((chunk) => chunk.includes(matchUp.roundPosition))
43170
- .filter((position) => position !== matchUp.roundPosition)[0];
43171
- const pairedMatchUpStatus = roundMatchUps.find(({ roundPosition }) => roundPosition === pairedPosition)?.matchUpStatus;
43172
- const pairedMatchUpIsDoubleExit = [DOUBLE_DEFAULT, DOUBLE_WALKOVER].includes(pairedMatchUpStatus);
43167
+ const pairedPositions = chunkArray(roundPositions.sort(), 2).find((chunk) => chunk.includes(matchUp.roundPosition));
43168
+ const pairedMatchUpStatuses = roundMatchUps
43169
+ .filter(({ roundPosition }) => pairedPositions.includes(roundPosition))
43170
+ ?.map(({ matchUpStatus }) => matchUpStatus);
43171
+ const pairedMatchUpIsDoubleExit = pairedMatchUpStatuses.every((matchUpStatus) => [DOUBLE_DEFAULT, DOUBLE_WALKOVER].includes(matchUpStatus));
43173
43172
  if (pairedMatchUpIsDoubleExit) {
43174
43173
  return decorateResult({ result: { ...SUCCESS }, stack });
43175
43174
  }