tods-competition-factory 1.8.14 → 1.8.15
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 +69 -58
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.d.ts +0 -2
- package/dist/forge/query.mjs +69 -58
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +17 -19
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +102 -71
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +140 -87
- 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
|
@@ -9872,6 +9872,21 @@ function addNationalityCode({
|
|
|
9872
9872
|
persons.forEach(annotatePerson);
|
|
9873
9873
|
}
|
|
9874
9874
|
|
|
9875
|
+
function addIndividualParticipants({ participantMap }) {
|
|
9876
|
+
const participantObjects = Object.values(participantMap);
|
|
9877
|
+
for (const participantObject of participantObjects) {
|
|
9878
|
+
const participant = participantObject.participant;
|
|
9879
|
+
if (participant.individualParticipantIds?.length) {
|
|
9880
|
+
participant.individualParticipants = [];
|
|
9881
|
+
for (const participantId of participant.individualParticipantIds) {
|
|
9882
|
+
participant.individualParticipants.push(
|
|
9883
|
+
participantMap[participantId].participant
|
|
9884
|
+
);
|
|
9885
|
+
}
|
|
9886
|
+
}
|
|
9887
|
+
}
|
|
9888
|
+
}
|
|
9889
|
+
|
|
9875
9890
|
function getTimeItem({
|
|
9876
9891
|
returnPreviousValues,
|
|
9877
9892
|
itemSubTypes,
|
|
@@ -9974,20 +9989,6 @@ function signedIn(participant) {
|
|
|
9974
9989
|
});
|
|
9975
9990
|
return timeItem?.itemValue === SIGNED_IN;
|
|
9976
9991
|
}
|
|
9977
|
-
function addIndividualParticipants({ participantMap }) {
|
|
9978
|
-
const participantObjects = Object.values(participantMap);
|
|
9979
|
-
for (const participantObject of participantObjects) {
|
|
9980
|
-
const participant = participantObject.participant;
|
|
9981
|
-
if (participant.individualParticipantIds?.length) {
|
|
9982
|
-
participant.individualParticipants = [];
|
|
9983
|
-
for (const participantId of participant.individualParticipantIds) {
|
|
9984
|
-
participant.individualParticipants.push(
|
|
9985
|
-
participantMap[participantId].participant
|
|
9986
|
-
);
|
|
9987
|
-
}
|
|
9988
|
-
}
|
|
9989
|
-
}
|
|
9990
|
-
}
|
|
9991
9992
|
function processIndividualParticipantIds({
|
|
9992
9993
|
individualParticipantIds,
|
|
9993
9994
|
participantCopy,
|
|
@@ -10266,7 +10267,6 @@ function allEventMatchUps(params) {
|
|
|
10266
10267
|
if (!event)
|
|
10267
10268
|
return { error: MISSING_EVENT };
|
|
10268
10269
|
const { eventId, eventName, endDate, category, gender, matchUpFormat } = event;
|
|
10269
|
-
const eventMatchUps2 = [];
|
|
10270
10270
|
const additionalContext = {
|
|
10271
10271
|
...context,
|
|
10272
10272
|
...definedAttributes({
|
|
@@ -10310,7 +10310,7 @@ function allEventMatchUps(params) {
|
|
|
10310
10310
|
}).scheduleTiming;
|
|
10311
10311
|
const matchUps = drawDefinitions.flatMap(
|
|
10312
10312
|
(drawDefinition) => {
|
|
10313
|
-
const { matchUps: matchUps2
|
|
10313
|
+
const { matchUps: matchUps2 } = getAllDrawMatchUps({
|
|
10314
10314
|
tournamentParticipants: participants,
|
|
10315
10315
|
tournamentAppliedPolicies,
|
|
10316
10316
|
scheduleVisibilityFilters,
|
|
@@ -10330,12 +10330,10 @@ function allEventMatchUps(params) {
|
|
|
10330
10330
|
inContext,
|
|
10331
10331
|
event
|
|
10332
10332
|
});
|
|
10333
|
-
if (matchUpsMap?.drawMatchUps)
|
|
10334
|
-
eventMatchUps2.push(...matchUpsMap.drawMatchUps);
|
|
10335
10333
|
return matchUps2 ?? [];
|
|
10336
10334
|
}
|
|
10337
10335
|
);
|
|
10338
|
-
return { matchUps
|
|
10336
|
+
return { matchUps };
|
|
10339
10337
|
}
|
|
10340
10338
|
|
|
10341
10339
|
function addFinishingRounds({
|