tods-competition-factory 1.8.12 → 1.8.14
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 +8 -8
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.d.ts +21 -13
- package/dist/forge/query.mjs +28 -23
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +42 -27
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/forge/utilities.mjs +4 -4
- package/dist/forge/utilities.mjs.map +1 -1
- package/dist/index.mjs +318 -162
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +582 -314
- 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 +4 -4
package/dist/forge/generate.mjs
CHANGED
|
@@ -217,6 +217,10 @@ function matchUpIsComplete({ matchUp }) {
|
|
|
217
217
|
return completedMatchUpStatuses.includes(matchUp?.matchUpStatus) || matchUp?.winningSide;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
+
function numericSort(a, b) {
|
|
221
|
+
return a - b;
|
|
222
|
+
}
|
|
223
|
+
|
|
220
224
|
function ensureInt(val) {
|
|
221
225
|
if (typeof val === "number")
|
|
222
226
|
return parseInt(val.toString());
|
|
@@ -1288,10 +1292,6 @@ function attributeFilter(params) {
|
|
|
1288
1292
|
}
|
|
1289
1293
|
}
|
|
1290
1294
|
|
|
1291
|
-
function numericSort(a, b) {
|
|
1292
|
-
return a - b;
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
1295
|
function UUID() {
|
|
1296
1296
|
const lut = [];
|
|
1297
1297
|
for (let i = 0; i < 256; i++) {
|
|
@@ -9019,7 +9019,7 @@ function getMatchUpDependencies(params) {
|
|
|
9019
9019
|
const allTournamentRecords = Object.values(tournamentRecords);
|
|
9020
9020
|
const allLinks = allTournamentRecords.reduce(
|
|
9021
9021
|
(allLinks2, tournamentRecord2) => {
|
|
9022
|
-
return allLinks2.concat(tournamentRecord2.events
|
|
9022
|
+
return allLinks2.concat(tournamentRecord2.events ?? []).map(
|
|
9023
9023
|
(event) => (event.drawDefinitions || []).map(
|
|
9024
9024
|
(drawDefinition2) => drawDefinition2.links || []
|
|
9025
9025
|
)
|
|
@@ -9051,7 +9051,7 @@ function getMatchUpDependencies(params) {
|
|
|
9051
9051
|
for (const sourceStructureId of sourceStructureIds) {
|
|
9052
9052
|
positionDependencies[sourceStructureId] = [];
|
|
9053
9053
|
}
|
|
9054
|
-
for (const matchUp of matchUps
|
|
9054
|
+
for (const matchUp of matchUps ?? []) {
|
|
9055
9055
|
const sourceStructureId = matchUp.containerStructureId || matchUp.structureId;
|
|
9056
9056
|
if (sourceStructureIds.includes(sourceStructureId)) {
|
|
9057
9057
|
positionDependencies[sourceStructureId].push(matchUp.matchUpId);
|
|
@@ -10243,8 +10243,8 @@ function organizeDrawPositionOptions({
|
|
|
10243
10243
|
}
|
|
10244
10244
|
|
|
10245
10245
|
function getUnplacedParticipantIds({
|
|
10246
|
-
|
|
10247
|
-
|
|
10246
|
+
positionAssignments,
|
|
10247
|
+
participantIds
|
|
10248
10248
|
}) {
|
|
10249
10249
|
const assignedParticipantIds = positionAssignments.map(
|
|
10250
10250
|
(assignment) => assignment.participantId
|