tods-competition-factory 1.6.17 → 1.6.18
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/forge/generate.mjs +11 -4
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/transform.mjs +11 -4
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +1532 -1482
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +6130 -6088
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +1 -1
package/dist/forge/transform.mjs
CHANGED
|
@@ -13453,8 +13453,9 @@ function getTargetMatchUps({
|
|
|
13453
13453
|
return { drawPositions, matchUps, targetMatchUps };
|
|
13454
13454
|
}
|
|
13455
13455
|
|
|
13456
|
-
function
|
|
13456
|
+
function resetLineUps({
|
|
13457
13457
|
inContextDrawMatchUps,
|
|
13458
|
+
inheritance = true,
|
|
13458
13459
|
tournamentRecord,
|
|
13459
13460
|
drawDefinition,
|
|
13460
13461
|
matchUpsMap,
|
|
@@ -13462,6 +13463,8 @@ function cleanupLineUps({
|
|
|
13462
13463
|
structure,
|
|
13463
13464
|
event
|
|
13464
13465
|
}) {
|
|
13466
|
+
if (!drawDefinition)
|
|
13467
|
+
return { error: MISSING_DRAW_DEFINITION };
|
|
13465
13468
|
const { drawPositions, matchUps, targetMatchUps } = getTargetMatchUps({
|
|
13466
13469
|
inContextDrawMatchUps,
|
|
13467
13470
|
matchUpsMap,
|
|
@@ -13477,10 +13480,14 @@ function cleanupLineUps({
|
|
|
13477
13480
|
({ matchUpId }) => matchUpId === inContextMatchUp.matchUpId
|
|
13478
13481
|
);
|
|
13479
13482
|
if (matchUp?.sides?.[sideIndex]) {
|
|
13480
|
-
|
|
13483
|
+
if (inheritance) {
|
|
13484
|
+
delete matchUp.sides[sideIndex].lineUp;
|
|
13485
|
+
} else {
|
|
13486
|
+
matchUp.sides[sideIndex].lineUp = [];
|
|
13487
|
+
}
|
|
13481
13488
|
modifyMatchUpNotice({
|
|
13482
13489
|
tournamentId: tournamentRecord?.tournamentId,
|
|
13483
|
-
context: "
|
|
13490
|
+
context: "resetLineUps",
|
|
13484
13491
|
eventId: event?.eventId,
|
|
13485
13492
|
drawDefinition,
|
|
13486
13493
|
matchUp
|
|
@@ -13600,7 +13607,7 @@ function assignDrawPosition({
|
|
|
13600
13607
|
if (drawPositionIsActive) {
|
|
13601
13608
|
return decorateResult({ result: { error: DRAW_POSITION_ACTIVE }, stack });
|
|
13602
13609
|
}
|
|
13603
|
-
|
|
13610
|
+
resetLineUps({
|
|
13604
13611
|
assignments: [positionAssignment],
|
|
13605
13612
|
inContextDrawMatchUps,
|
|
13606
13613
|
tournamentRecord,
|