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/forge/generate.mjs
CHANGED
|
@@ -16444,7 +16444,7 @@ function ensureSideLineUps({
|
|
|
16444
16444
|
dualMatchUp,
|
|
16445
16445
|
eventId
|
|
16446
16446
|
}) {
|
|
16447
|
-
if (dualMatchUp
|
|
16447
|
+
if (dualMatchUp) {
|
|
16448
16448
|
if (!inContextDualMatchUp) {
|
|
16449
16449
|
inContextDualMatchUp = findDrawMatchUp({
|
|
16450
16450
|
matchUpId: dualMatchUp.matchUpId,
|
|
@@ -16462,11 +16462,17 @@ function ensureSideLineUps({
|
|
|
16462
16462
|
drawPosition,
|
|
16463
16463
|
sideNumber
|
|
16464
16464
|
}) => ({ drawPosition, sideNumber, displaySideNumber });
|
|
16465
|
-
dualMatchUp.sides = inContextDualMatchUp?.sides?.map((
|
|
16466
|
-
const participantId =
|
|
16465
|
+
dualMatchUp.sides = inContextDualMatchUp?.sides?.map((contextSide) => {
|
|
16466
|
+
const participantId = contextSide.participantId;
|
|
16467
|
+
const referenceLineUp = participantId && lineUps[participantId] || void 0;
|
|
16468
|
+
const { lineUp: noContextLineUp, ...noContextSideDetail } = dualMatchUp.sides?.find(
|
|
16469
|
+
({ sideNumber }) => sideNumber === contextSide.sideNumber
|
|
16470
|
+
) ?? {};
|
|
16471
|
+
const lineUp = noContextLineUp?.length ? noContextLineUp : referenceLineUp;
|
|
16467
16472
|
return {
|
|
16468
|
-
...extractSideDetail(
|
|
16469
|
-
|
|
16473
|
+
...extractSideDetail(contextSide),
|
|
16474
|
+
...noContextSideDetail,
|
|
16475
|
+
lineUp
|
|
16470
16476
|
};
|
|
16471
16477
|
});
|
|
16472
16478
|
modifyMatchUpNotice({
|
|
@@ -19010,6 +19016,15 @@ function getParticipantEntries(params) {
|
|
|
19010
19016
|
individualParticipantIds?.forEach(addDrawEntry);
|
|
19011
19017
|
}
|
|
19012
19018
|
}
|
|
19019
|
+
const stages = (drawDefinition?.structures ?? []).reduce(
|
|
19020
|
+
(stages2, structure) => {
|
|
19021
|
+
if (!stages2.includes(structure.stage))
|
|
19022
|
+
stages2.push(structure.stage);
|
|
19023
|
+
return stages2;
|
|
19024
|
+
},
|
|
19025
|
+
[]
|
|
19026
|
+
);
|
|
19027
|
+
const linksCount = (drawDefinition?.links ?? []).length;
|
|
19013
19028
|
derivedDrawInfo[drawId] = {
|
|
19014
19029
|
qualifyingPositionAssignments,
|
|
19015
19030
|
qualifyingSeedAssignments,
|
|
@@ -19019,11 +19034,13 @@ function getParticipantEntries(params) {
|
|
|
19019
19034
|
orderedStructureIds,
|
|
19020
19035
|
mainSeedingMap,
|
|
19021
19036
|
flightNumber,
|
|
19037
|
+
linksCount,
|
|
19022
19038
|
drawOrder,
|
|
19023
19039
|
drawName,
|
|
19024
19040
|
drawType,
|
|
19025
19041
|
drawSize,
|
|
19026
|
-
drawId
|
|
19042
|
+
drawId,
|
|
19043
|
+
stages
|
|
19027
19044
|
// qualifyingDrawSize,
|
|
19028
19045
|
};
|
|
19029
19046
|
}
|