tods-competition-factory 1.8.21 → 1.8.23
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 +34 -23
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.mjs +21 -17
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +11 -6
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +217 -208
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +482 -465
- 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 +5 -5
package/dist/forge/transform.mjs
CHANGED
|
@@ -3902,7 +3902,7 @@ function findVenue({
|
|
|
3902
3902
|
if (!venue && tournamentRecords) {
|
|
3903
3903
|
const linkedTournamentIds = getLinkedTournamentIds({
|
|
3904
3904
|
tournamentRecords
|
|
3905
|
-
}).linkedTournamentIds
|
|
3905
|
+
}).linkedTournamentIds ?? [];
|
|
3906
3906
|
const relevantIds = linkedTournamentIds[tournamentRecord.tournamentId];
|
|
3907
3907
|
for (const tournamentId of relevantIds) {
|
|
3908
3908
|
const record = tournamentRecords[tournamentId];
|
|
@@ -4460,7 +4460,7 @@ function getPairedParticipant({
|
|
|
4460
4460
|
result: { error: MISSING_PARTICIPANT_IDS },
|
|
4461
4461
|
stack
|
|
4462
4462
|
});
|
|
4463
|
-
tournamentParticipants = tournamentParticipants
|
|
4463
|
+
tournamentParticipants = tournamentParticipants ?? tournamentRecord?.participants ?? [];
|
|
4464
4464
|
const existingPairedParticipants = tournamentParticipants.filter(
|
|
4465
4465
|
(participant) => participant.participantType === PAIR && intersection(participantIds, participant.individualParticipantIds).length === participantIds.length && participant.individualParticipantIds.length === participantIds.length
|
|
4466
4466
|
);
|
|
@@ -5803,7 +5803,7 @@ function getRoundContextProfile({
|
|
|
5803
5803
|
...(drawDefinition?.structures ?? []).filter((structure2) => structure2.stage === QUALIFYING).map(({ stageSequence }) => stageSequence ?? 1),
|
|
5804
5804
|
0
|
|
5805
5805
|
) : 0;
|
|
5806
|
-
const preQualifyingSequence = qualifyingStageSequences ? qualifyingStageSequences - (structure.stageSequence
|
|
5806
|
+
const preQualifyingSequence = qualifyingStageSequences ? qualifyingStageSequences - (structure.stageSequence ?? 1) || "" : "";
|
|
5807
5807
|
const preQualifyingAffix = preQualifyingSequence ? roundNamingPolicy?.affixes?.preQualifying || defaultRoundNamingPolicy.affixes.preQualifying || "" : "";
|
|
5808
5808
|
const roundNamingMap = roundNamingPolicy?.roundNamingMap || defaultRoundNamingPolicy.roundNamingMap || {};
|
|
5809
5809
|
const abbreviatedRoundNamingMap = roundNamingPolicy?.abbreviatedRoundNamingMap || defaultRoundNamingPolicy.abbreviatedRoundNamingMap || {};
|
|
@@ -6101,7 +6101,13 @@ function getAllStructureMatchUps({
|
|
|
6101
6101
|
matchUps
|
|
6102
6102
|
}));
|
|
6103
6103
|
}
|
|
6104
|
-
return {
|
|
6104
|
+
return {
|
|
6105
|
+
collectionPositionMatchUps,
|
|
6106
|
+
roundMatchUps,
|
|
6107
|
+
roundProfile,
|
|
6108
|
+
matchUpsMap,
|
|
6109
|
+
matchUps
|
|
6110
|
+
};
|
|
6105
6111
|
function addMatchUpContext({
|
|
6106
6112
|
scheduleVisibilityFilters: scheduleVisibilityFilters2,
|
|
6107
6113
|
sourceDrawPositionRanges,
|
|
@@ -10761,7 +10767,7 @@ function getContainedStructures({
|
|
|
10761
10767
|
const containerStructures = {};
|
|
10762
10768
|
const structureContainers = drawDefinitions.map((dd) => dd?.structures?.filter((structure) => structure?.structures)).flat().filter(Boolean);
|
|
10763
10769
|
for (const structureContainer of structureContainers) {
|
|
10764
|
-
const { structures, structureId } = structureContainer
|
|
10770
|
+
const { structures, structureId } = structureContainer ?? {};
|
|
10765
10771
|
structures && structureId && (containedStructures[structureId] = structures?.map(
|
|
10766
10772
|
(structure) => structure.structureId
|
|
10767
10773
|
)) && structures.forEach(
|
|
@@ -15319,7 +15325,6 @@ function getVenuesAndCourts({
|
|
|
15319
15325
|
tournamentIds.forEach((tournamentId) => {
|
|
15320
15326
|
const tournamentRecord = tournamentRecords[tournamentId];
|
|
15321
15327
|
for (const venue of tournamentRecord.venues || []) {
|
|
15322
|
-
tournamentRecord.venues;
|
|
15323
15328
|
if (venueIds.length && !venueIds.includes(venue.venueId))
|
|
15324
15329
|
continue;
|
|
15325
15330
|
if (ignoreDisabled) {
|