tods-competition-factory 2.2.9 → 2.2.10
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 +6 -6
- package/dist/tods-competition-factory.development.cjs.js +17 -18
- 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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function factoryVersion() {
|
|
6
|
-
return '2.2.
|
|
6
|
+
return '2.2.10';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const SINGLES_MATCHUP = 'SINGLES';
|
|
@@ -55841,7 +55841,7 @@ function removeCollectionGroup({ updateInProgressMatchUps = true, collectionGrou
|
|
|
55841
55841
|
|
|
55842
55842
|
function getOrderedTieFormat({ tieFormat, orderMap }) {
|
|
55843
55843
|
const orderedTieFormat = copyTieFormat(tieFormat);
|
|
55844
|
-
orderedTieFormat.collectionDefinitions
|
|
55844
|
+
orderedTieFormat.collectionDefinitions?.forEach((collectionDefinition) => {
|
|
55845
55845
|
const collectionOrder = orderMap[collectionDefinition.collectionId];
|
|
55846
55846
|
if (collectionOrder)
|
|
55847
55847
|
collectionDefinition.collectionOrder = collectionOrder;
|
|
@@ -55855,6 +55855,10 @@ function orderCollectionDefinitions({ tournamentRecord, drawDefinition, structur
|
|
|
55855
55855
|
result: { error: INVALID_VALUES },
|
|
55856
55856
|
context: { orderMap },
|
|
55857
55857
|
});
|
|
55858
|
+
const result = structureId ? findStructure({ drawDefinition, structureId }) : undefined;
|
|
55859
|
+
if (result?.error)
|
|
55860
|
+
return result;
|
|
55861
|
+
const structure = result?.structure;
|
|
55858
55862
|
if (eventId && event?.tieFormat) {
|
|
55859
55863
|
updateEventTieFormat({ tournamentRecord, event, orderMap });
|
|
55860
55864
|
}
|
|
@@ -55869,24 +55873,19 @@ function orderCollectionDefinitions({ tournamentRecord, drawDefinition, structur
|
|
|
55869
55873
|
matchUp = result.matchUp;
|
|
55870
55874
|
if (!matchUp)
|
|
55871
55875
|
return { error: MISSING_MATCHUP };
|
|
55872
|
-
|
|
55873
|
-
|
|
55874
|
-
|
|
55875
|
-
|
|
55876
|
-
|
|
55877
|
-
|
|
55878
|
-
|
|
55879
|
-
|
|
55880
|
-
|
|
55881
|
-
|
|
55882
|
-
|
|
55883
|
-
}
|
|
55876
|
+
const tieFormat = getTieFormat$1({ tournamentRecord, matchUpId, structure, drawDefinition, event })?.tieFormat;
|
|
55877
|
+
matchUp.tieFormat = getOrderedTieFormat({
|
|
55878
|
+
tieFormat,
|
|
55879
|
+
orderMap,
|
|
55880
|
+
});
|
|
55881
|
+
modifyMatchUpNotice({
|
|
55882
|
+
tournamentId: tournamentRecord?.tournamentId,
|
|
55883
|
+
eventId: event?.eventId,
|
|
55884
|
+
drawDefinition,
|
|
55885
|
+
matchUp,
|
|
55886
|
+
});
|
|
55884
55887
|
}
|
|
55885
55888
|
else if (structureId) {
|
|
55886
|
-
const result = findStructure({ drawDefinition, structureId });
|
|
55887
|
-
if (result.error)
|
|
55888
|
-
return result;
|
|
55889
|
-
const structure = result.structure;
|
|
55890
55889
|
if (structure?.tieFormat) {
|
|
55891
55890
|
structure.tieFormat = getOrderedTieFormat({
|
|
55892
55891
|
tieFormat: structure.tieFormat,
|