tods-competition-factory 2.1.23 → 2.1.25
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 +18 -9
- 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 +9 -9
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function factoryVersion() {
|
|
6
|
-
return '2.1.
|
|
6
|
+
return '2.1.25';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const SINGLES_MATCHUP = 'SINGLES';
|
|
@@ -13488,16 +13488,24 @@ function getPubStatus({ event }) {
|
|
|
13488
13488
|
};
|
|
13489
13489
|
}
|
|
13490
13490
|
}
|
|
13491
|
-
const
|
|
13491
|
+
const drawDetailPublishedIds = drawDetails &&
|
|
13492
13492
|
Object.keys(drawDetails).length &&
|
|
13493
|
-
Object.keys(drawDetails).filter((drawId) => getDrawPublishStatus({ drawDetails, drawId }))
|
|
13494
|
-
|
|
13493
|
+
Object.keys(drawDetails).filter((drawId) => getDrawPublishStatus({ drawDetails, drawId }));
|
|
13494
|
+
const publishedDrawIds = drawDetailPublishedIds?.length ? drawDetailPublishedIds : eventPubStatus.drawIds ?? [];
|
|
13495
|
+
if (publishedDrawIds?.length && !drawDetailPublishedIds?.length) {
|
|
13496
|
+
for (const drawId of publishedDrawIds) {
|
|
13497
|
+
drawDetails[drawId] = {
|
|
13498
|
+
publishingDetail: { published: true },
|
|
13499
|
+
};
|
|
13500
|
+
}
|
|
13501
|
+
}
|
|
13502
|
+
const published = publishedDrawIds?.length > 0;
|
|
13495
13503
|
return {
|
|
13496
13504
|
status: {
|
|
13497
|
-
published: publishedDrawIds && publishedDrawIds.length > 0,
|
|
13498
13505
|
publishedDrawIds,
|
|
13499
13506
|
publishedSeeding,
|
|
13500
13507
|
drawDetails,
|
|
13508
|
+
published,
|
|
13501
13509
|
},
|
|
13502
13510
|
};
|
|
13503
13511
|
}
|
|
@@ -38105,7 +38113,6 @@ function generateDrawDefinition(params) {
|
|
|
38105
38113
|
return decorateResult({ result: { error: INVALID_VALUES }, stack });
|
|
38106
38114
|
const genResult = generateOrGetExisting({
|
|
38107
38115
|
...params,
|
|
38108
|
-
isMock: params.isMock ?? true,
|
|
38109
38116
|
policyDefinitions,
|
|
38110
38117
|
tournamentRecord,
|
|
38111
38118
|
appliedPolicies,
|
|
@@ -45108,9 +45115,9 @@ function setMatchUpState(params) {
|
|
|
45108
45115
|
method: stack,
|
|
45109
45116
|
winningSide,
|
|
45110
45117
|
});
|
|
45111
|
-
const result = (
|
|
45118
|
+
const result = (!activeDownstream && noDownstreamDependencies(params)) ||
|
|
45112
45119
|
(matchUpWinner && winningSideWithDownstreamDependencies(params)) ||
|
|
45113
|
-
(directingMatchUpStatus && applyMatchUpValues(params)) || {
|
|
45120
|
+
((directingMatchUpStatus || params.autoCalcDisabled) && applyMatchUpValues(params)) || {
|
|
45114
45121
|
error: NO_VALID_ACTIONS,
|
|
45115
45122
|
};
|
|
45116
45123
|
return decorateResult({ result, stack });
|
|
@@ -45135,7 +45142,7 @@ function applyMatchUpValues(params) {
|
|
|
45135
45142
|
!params.winningSide &&
|
|
45136
45143
|
!checkScoreHasValue({ score: params.score });
|
|
45137
45144
|
const newMatchUpStatus = params.isCollectionMatchUp
|
|
45138
|
-
? params.matchUpStatus || (removeWinningSide && TO_BE_PLAYED) || COMPLETED$1
|
|
45145
|
+
? params.matchUpStatus || (removeWinningSide && TO_BE_PLAYED) || (params.winningSide && COMPLETED$1) || INCOMPLETE
|
|
45139
45146
|
: params.matchUpStatus || COMPLETED$1;
|
|
45140
45147
|
const removeScore = params.removeScore ||
|
|
45141
45148
|
([CANCELLED$1, WALKOVER$2].includes(newMatchUpStatus) && ![INCOMPLETE, ABANDONED$1].includes(newMatchUpStatus));
|
|
@@ -48325,6 +48332,7 @@ var lastNames = [
|
|
|
48325
48332
|
"Eisenstein",
|
|
48326
48333
|
"Eldritch",
|
|
48327
48334
|
"Elliot",
|
|
48335
|
+
"Ellul",
|
|
48328
48336
|
"Escher",
|
|
48329
48337
|
"Eyre",
|
|
48330
48338
|
"Faulkner",
|
|
@@ -48498,6 +48506,7 @@ var firstMale = [
|
|
|
48498
48506
|
"Inigo",
|
|
48499
48507
|
"Italo",
|
|
48500
48508
|
"Ivan",
|
|
48509
|
+
"Jacques",
|
|
48501
48510
|
"James",
|
|
48502
48511
|
"Jared",
|
|
48503
48512
|
"Jerry",
|