tods-competition-factory 1.7.18 → 1.7.19
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/index.mjs +22 -10
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +21 -12
- 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 +3 -3
package/dist/index.mjs
CHANGED
|
@@ -333,7 +333,7 @@ const matchUpFormatCode = {
|
|
|
333
333
|
};
|
|
334
334
|
|
|
335
335
|
function factoryVersion() {
|
|
336
|
-
return "1.7.
|
|
336
|
+
return "1.7.19";
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
function getObjectTieFormat(obj) {
|
|
@@ -28832,9 +28832,11 @@ function getParticipantEntries(params) {
|
|
|
28832
28832
|
if (withDraws || withRankingProfile || withSeeding) {
|
|
28833
28833
|
const getSeedingMap = (assignments) => assignments ? Object.assign(
|
|
28834
28834
|
{},
|
|
28835
|
-
...assignments.map(
|
|
28836
|
-
|
|
28837
|
-
|
|
28835
|
+
...assignments.map(
|
|
28836
|
+
({ participantId, seedValue, seedNumber }) => ({
|
|
28837
|
+
[participantId]: { seedValue, seedNumber }
|
|
28838
|
+
})
|
|
28839
|
+
)
|
|
28838
28840
|
) : void 0;
|
|
28839
28841
|
for (const drawDefinition of drawDefinitions) {
|
|
28840
28842
|
const {
|
|
@@ -28894,19 +28896,29 @@ function getParticipantEntries(params) {
|
|
|
28894
28896
|
const includeSeeding = withSeeding && seedingPublished;
|
|
28895
28897
|
const seedAssignments = includeSeeding ? {} : void 0;
|
|
28896
28898
|
const mainSeeding = includeSeeding ? mainSeedingMap?.[participantId]?.seedValue || mainSeedingMap?.[participantId]?.seedNumber : void 0;
|
|
28899
|
+
const mainSeedingAssignments = mainSeeding ? mainSeedingMap?.[participantId] : void 0;
|
|
28897
28900
|
const qualifyingSeeding = includeSeeding ? qualifyingSeedingMap?.[participantId]?.seedValue || qualifyingSeedingMap?.[participantId]?.seedNumber : void 0;
|
|
28901
|
+
const qualifyingSeedingAssignments = qualifyingSeeding ? qualifyingSeedingMap?.[participantId] : void 0;
|
|
28898
28902
|
if (seedAssignments && mainSeeding)
|
|
28899
|
-
seedAssignments[MAIN] =
|
|
28903
|
+
seedAssignments[MAIN] = mainSeedingAssignments;
|
|
28900
28904
|
if (seedAssignments && qualifyingSeeding)
|
|
28901
|
-
seedAssignments[QUALIFYING] =
|
|
28905
|
+
seedAssignments[QUALIFYING] = qualifyingSeedingAssignments;
|
|
28902
28906
|
const seedValue = mainSeeding || qualifyingSeeding;
|
|
28903
28907
|
if (seedValue) {
|
|
28904
28908
|
if (!participantMap[id].participant.seedings[eventType])
|
|
28905
28909
|
participantMap[id].participant.seedings[eventType] = [];
|
|
28906
|
-
|
|
28907
|
-
|
|
28908
|
-
|
|
28909
|
-
|
|
28910
|
+
if (mainSeedingAssignments) {
|
|
28911
|
+
participantMap[id].participant.seedings[eventType].push({
|
|
28912
|
+
...mainSeedingAssignments,
|
|
28913
|
+
scaleName: drawId
|
|
28914
|
+
});
|
|
28915
|
+
}
|
|
28916
|
+
if (qualifyingSeedingAssignments) {
|
|
28917
|
+
participantMap[id].participant.seedings[eventType].push({
|
|
28918
|
+
...qualifyingSeedingAssignments,
|
|
28919
|
+
scaleName: drawId
|
|
28920
|
+
});
|
|
28921
|
+
}
|
|
28910
28922
|
if (seedAssignments) {
|
|
28911
28923
|
if (!participantMap[id].events[eventId].seedAssignments)
|
|
28912
28924
|
participantMap[id].events[eventId].seedAssignments = {};
|