tods-competition-factory 1.2.2 → 1.2.4
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 +33 -26
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +44 -25
- 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/index.mjs
CHANGED
|
@@ -320,7 +320,7 @@ const matchUpFormatCode = {
|
|
|
320
320
|
};
|
|
321
321
|
|
|
322
322
|
function factoryVersion() {
|
|
323
|
-
return "1.2.
|
|
323
|
+
return "1.2.4";
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
function unique(arr) {
|
|
@@ -50872,8 +50872,8 @@ function updateTieFormat({
|
|
|
50872
50872
|
}) {
|
|
50873
50873
|
var _a;
|
|
50874
50874
|
const stack = "updateTieFormat";
|
|
50875
|
-
let modifiedCount = 0;
|
|
50876
50875
|
let modifiedStructuresCount = 0;
|
|
50876
|
+
let modifiedCount = 0;
|
|
50877
50877
|
const collectionMap = tieFormat == null ? void 0 : tieFormat.collectionDefinitions.reduce(
|
|
50878
50878
|
(instanceMap, def) => {
|
|
50879
50879
|
instanceMap[def.collectionId] = (instanceMap[def.collectionId] || 0) + def.matchUpCount;
|
|
@@ -51031,9 +51031,10 @@ function modifyCollectionDefinition({
|
|
|
51031
51031
|
collectionName,
|
|
51032
51032
|
drawDefinition,
|
|
51033
51033
|
matchUpFormat,
|
|
51034
|
-
matchUpCount,
|
|
51035
51034
|
tieFormatName,
|
|
51035
|
+
matchUpCount,
|
|
51036
51036
|
collectionId,
|
|
51037
|
+
matchUpType,
|
|
51037
51038
|
structureId,
|
|
51038
51039
|
matchUpId,
|
|
51039
51040
|
category,
|
|
@@ -51138,20 +51139,18 @@ function modifyCollectionDefinition({
|
|
|
51138
51139
|
const originalValueGoal = existingTieFormat.winCriteria.valueGoal;
|
|
51139
51140
|
const wasAggregateValue = existingTieFormat.winCriteria.aggregateValue;
|
|
51140
51141
|
if (originalValueGoal && originalValueGoal !== valueGoal || aggregateValue && !wasAggregateValue) {
|
|
51141
|
-
|
|
51142
|
-
tieFormat.tieFormatName = tieFormatName;
|
|
51143
|
-
} else {
|
|
51144
|
-
delete tieFormat.tieFormatName;
|
|
51145
|
-
}
|
|
51142
|
+
delete tieFormat.tieFormatName;
|
|
51146
51143
|
}
|
|
51144
|
+
if (tieFormatName)
|
|
51145
|
+
tieFormat.tieFormatName = tieFormatName;
|
|
51147
51146
|
if (collectionOrder)
|
|
51148
51147
|
collectionDefinition.collectionOrder = collectionOrder;
|
|
51149
51148
|
if (collectionName)
|
|
51150
51149
|
collectionDefinition.collectionName = collectionName;
|
|
51151
51150
|
if (matchUpFormat)
|
|
51152
51151
|
collectionDefinition.matchUpFormat = matchUpFormat;
|
|
51153
|
-
if (
|
|
51154
|
-
collectionDefinition.
|
|
51152
|
+
if (matchUpType)
|
|
51153
|
+
collectionDefinition.matchUpType = matchUpType;
|
|
51155
51154
|
if (category)
|
|
51156
51155
|
collectionDefinition.category = category;
|
|
51157
51156
|
if (gender)
|
|
@@ -51873,6 +51872,24 @@ function modifyTieFormat({
|
|
|
51873
51872
|
(collectionId) => !updatedCollectionIds.includes(collectionId)
|
|
51874
51873
|
);
|
|
51875
51874
|
const tieFormatName = modifiedTieFormat.tieFormatName;
|
|
51875
|
+
let processedTieFormat;
|
|
51876
|
+
for (const collectionDefinition of modifiedCollectionDefinitions) {
|
|
51877
|
+
const result2 = modifyCollectionDefinition(__spreadProps$R(__spreadValues$1E({
|
|
51878
|
+
updateInProgressMatchUps
|
|
51879
|
+
}, collectionDefinition), {
|
|
51880
|
+
tournamentRecord,
|
|
51881
|
+
drawDefinition,
|
|
51882
|
+
tieFormatName,
|
|
51883
|
+
structureId,
|
|
51884
|
+
matchUpId,
|
|
51885
|
+
eventId,
|
|
51886
|
+
event
|
|
51887
|
+
}));
|
|
51888
|
+
if (result2.error)
|
|
51889
|
+
return decorateResult({ result: result2, stack });
|
|
51890
|
+
if (result2.tieFormat)
|
|
51891
|
+
processedTieFormat = result2.tieFormat;
|
|
51892
|
+
}
|
|
51876
51893
|
for (const collectionDefinition of addedCollectionDefinitions) {
|
|
51877
51894
|
const result2 = addCollectionDefinition({
|
|
51878
51895
|
updateInProgressMatchUps,
|
|
@@ -51889,6 +51906,8 @@ function modifyTieFormat({
|
|
|
51889
51906
|
});
|
|
51890
51907
|
if (result2.error)
|
|
51891
51908
|
return decorateResult({ result: result2, stack });
|
|
51909
|
+
if (result2.tieFormat)
|
|
51910
|
+
processedTieFormat = result2.tieFormat;
|
|
51892
51911
|
}
|
|
51893
51912
|
for (const collectionId of removedCollectionIds) {
|
|
51894
51913
|
const result2 = removeCollectionDefinition({
|
|
@@ -51906,23 +51925,10 @@ function modifyTieFormat({
|
|
|
51906
51925
|
});
|
|
51907
51926
|
if (result2.error)
|
|
51908
51927
|
return decorateResult({ result: result2, stack });
|
|
51928
|
+
if (result2.tieFormat)
|
|
51929
|
+
processedTieFormat = result2.tieFormat;
|
|
51909
51930
|
}
|
|
51910
|
-
|
|
51911
|
-
const result2 = modifyCollectionDefinition(__spreadProps$R(__spreadValues$1E({
|
|
51912
|
-
updateInProgressMatchUps
|
|
51913
|
-
}, collectionDefinition), {
|
|
51914
|
-
tournamentRecord,
|
|
51915
|
-
drawDefinition,
|
|
51916
|
-
tieFormatName,
|
|
51917
|
-
structureId,
|
|
51918
|
-
matchUpId,
|
|
51919
|
-
eventId,
|
|
51920
|
-
event
|
|
51921
|
-
}));
|
|
51922
|
-
if (result2.error)
|
|
51923
|
-
return decorateResult({ result: result2, stack });
|
|
51924
|
-
}
|
|
51925
|
-
return __spreadValues$1E({}, SUCCESS);
|
|
51931
|
+
return __spreadProps$R(__spreadValues$1E({}, SUCCESS), { processedTieFormat });
|
|
51926
51932
|
}
|
|
51927
51933
|
|
|
51928
51934
|
const tieFormatGovernor = {
|
|
@@ -61096,6 +61102,7 @@ const eventGovernor = {
|
|
|
61096
61102
|
addCollectionDefinition,
|
|
61097
61103
|
removeCollectionGroup,
|
|
61098
61104
|
addCollectionGroup,
|
|
61105
|
+
modifyTieFormat,
|
|
61099
61106
|
resetScorecard,
|
|
61100
61107
|
resetTieFormat,
|
|
61101
61108
|
addEvent,
|