tods-competition-factory 1.8.45 → 1.8.46
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 +23 -6
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.mjs +12 -1
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +5057 -5044
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +31 -7
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +61 -37
- 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/index.mjs
CHANGED
|
@@ -2404,7 +2404,7 @@ const matchUpFormatCode = {
|
|
|
2404
2404
|
};
|
|
2405
2405
|
|
|
2406
2406
|
function factoryVersion() {
|
|
2407
|
-
return "1.8.
|
|
2407
|
+
return "1.8.46";
|
|
2408
2408
|
}
|
|
2409
2409
|
|
|
2410
2410
|
function getObjectTieFormat(obj) {
|
|
@@ -9061,7 +9061,7 @@ function ensureSideLineUps({
|
|
|
9061
9061
|
dualMatchUp,
|
|
9062
9062
|
eventId
|
|
9063
9063
|
}) {
|
|
9064
|
-
if (dualMatchUp
|
|
9064
|
+
if (dualMatchUp) {
|
|
9065
9065
|
if (!inContextDualMatchUp) {
|
|
9066
9066
|
inContextDualMatchUp = findDrawMatchUp({
|
|
9067
9067
|
matchUpId: dualMatchUp.matchUpId,
|
|
@@ -9079,11 +9079,17 @@ function ensureSideLineUps({
|
|
|
9079
9079
|
drawPosition,
|
|
9080
9080
|
sideNumber
|
|
9081
9081
|
}) => ({ drawPosition, sideNumber, displaySideNumber });
|
|
9082
|
-
dualMatchUp.sides = inContextDualMatchUp?.sides?.map((
|
|
9083
|
-
const participantId =
|
|
9082
|
+
dualMatchUp.sides = inContextDualMatchUp?.sides?.map((contextSide) => {
|
|
9083
|
+
const participantId = contextSide.participantId;
|
|
9084
|
+
const referenceLineUp = participantId && lineUps[participantId] || void 0;
|
|
9085
|
+
const { lineUp: noContextLineUp, ...noContextSideDetail } = dualMatchUp.sides?.find(
|
|
9086
|
+
({ sideNumber }) => sideNumber === contextSide.sideNumber
|
|
9087
|
+
) ?? {};
|
|
9088
|
+
const lineUp = noContextLineUp?.length ? noContextLineUp : referenceLineUp;
|
|
9084
9089
|
return {
|
|
9085
|
-
...extractSideDetail(
|
|
9086
|
-
|
|
9090
|
+
...extractSideDetail(contextSide),
|
|
9091
|
+
...noContextSideDetail,
|
|
9092
|
+
lineUp
|
|
9087
9093
|
};
|
|
9088
9094
|
});
|
|
9089
9095
|
modifyMatchUpNotice({
|
|
@@ -23861,6 +23867,15 @@ function getParticipantEntries(params) {
|
|
|
23861
23867
|
individualParticipantIds?.forEach(addDrawEntry);
|
|
23862
23868
|
}
|
|
23863
23869
|
}
|
|
23870
|
+
const stages = (drawDefinition?.structures ?? []).reduce(
|
|
23871
|
+
(stages2, structure) => {
|
|
23872
|
+
if (!stages2.includes(structure.stage))
|
|
23873
|
+
stages2.push(structure.stage);
|
|
23874
|
+
return stages2;
|
|
23875
|
+
},
|
|
23876
|
+
[]
|
|
23877
|
+
);
|
|
23878
|
+
const linksCount = (drawDefinition?.links ?? []).length;
|
|
23864
23879
|
derivedDrawInfo[drawId] = {
|
|
23865
23880
|
qualifyingPositionAssignments,
|
|
23866
23881
|
qualifyingSeedAssignments,
|
|
@@ -23870,11 +23885,13 @@ function getParticipantEntries(params) {
|
|
|
23870
23885
|
orderedStructureIds,
|
|
23871
23886
|
mainSeedingMap,
|
|
23872
23887
|
flightNumber,
|
|
23888
|
+
linksCount,
|
|
23873
23889
|
drawOrder,
|
|
23874
23890
|
drawName,
|
|
23875
23891
|
drawType,
|
|
23876
23892
|
drawSize,
|
|
23877
|
-
drawId
|
|
23893
|
+
drawId,
|
|
23894
|
+
stages
|
|
23878
23895
|
// qualifyingDrawSize,
|
|
23879
23896
|
};
|
|
23880
23897
|
}
|
|
@@ -31563,6 +31580,13 @@ function setMatchUpStatus$2(params) {
|
|
|
31563
31580
|
score: score2
|
|
31564
31581
|
});
|
|
31565
31582
|
}
|
|
31583
|
+
ensureSideLineUps({
|
|
31584
|
+
tournamentId: tournamentRecord?.tournamentId,
|
|
31585
|
+
inContextDualMatchUp: inContextMatchUp,
|
|
31586
|
+
eventId: event?.eventId,
|
|
31587
|
+
drawDefinition,
|
|
31588
|
+
dualMatchUp: matchUp
|
|
31589
|
+
});
|
|
31566
31590
|
}
|
|
31567
31591
|
if (matchUp.matchUpType === TEAM$2 && matchUpStatus && [
|
|
31568
31592
|
AWAITING_RESULT
|