tods-competition-factory 1.6.20 → 1.6.21
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 +7 -8
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.mjs +7 -8
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +7 -8
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +21 -17
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +20 -16
- 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
|
@@ -329,7 +329,7 @@ const matchUpFormatCode = {
|
|
|
329
329
|
};
|
|
330
330
|
|
|
331
331
|
function factoryVersion() {
|
|
332
|
-
return "1.6.
|
|
332
|
+
return "1.6.21";
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
function getObjectTieFormat(obj) {
|
|
@@ -7543,10 +7543,9 @@ function isLucky({
|
|
|
7543
7543
|
function isAdHoc({ drawDefinition, structure }) {
|
|
7544
7544
|
if (!structure)
|
|
7545
7545
|
return false;
|
|
7546
|
-
const
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
const hasDrawPosition = structure?.matchUps?.find(
|
|
7546
|
+
const matchUps = structure.matchUps || structure.roundMatchUps && Object.values(structure.roundMatchUps).flat();
|
|
7547
|
+
const hasRoundPosition = matchUps?.find((matchUp) => matchUp?.roundPosition);
|
|
7548
|
+
const hasDrawPosition = matchUps?.find(
|
|
7550
7549
|
(matchUp) => matchUp?.drawPositions?.length
|
|
7551
7550
|
);
|
|
7552
7551
|
return !structure?.structures && !(drawDefinition?.drawType && drawDefinition.drawType !== AD_HOC) && !hasRoundPosition && !hasDrawPosition;
|
|
@@ -7832,8 +7831,8 @@ function getAllStructureMatchUps({
|
|
|
7832
7831
|
matchUpsMap,
|
|
7833
7832
|
structureId
|
|
7834
7833
|
}).drawPositionsRanges : void 0;
|
|
7835
|
-
matchUps = matchUps.map(
|
|
7836
|
-
|
|
7834
|
+
matchUps = matchUps.map((matchUp) => {
|
|
7835
|
+
return addMatchUpContext({
|
|
7837
7836
|
scheduleVisibilityFilters,
|
|
7838
7837
|
sourceDrawPositionRanges,
|
|
7839
7838
|
drawPositionsRanges,
|
|
@@ -7844,8 +7843,8 @@ function getAllStructureMatchUps({
|
|
|
7844
7843
|
roundProfile,
|
|
7845
7844
|
matchUp,
|
|
7846
7845
|
event
|
|
7847
|
-
})
|
|
7848
|
-
);
|
|
7846
|
+
});
|
|
7847
|
+
});
|
|
7849
7848
|
const matchUpTies = matchUps?.filter(
|
|
7850
7849
|
(matchUp) => Array.isArray(matchUp.tieMatchUps)
|
|
7851
7850
|
);
|
|
@@ -44687,16 +44686,20 @@ function resetMatchUpLineUps$1({
|
|
|
44687
44686
|
})?.matchUp;
|
|
44688
44687
|
if (!matchUp?.tieMatchUps)
|
|
44689
44688
|
return { error: INVALID_MATCHUP };
|
|
44689
|
+
const inContextMatchUp = findMatchUp$1({
|
|
44690
|
+
inContext: true,
|
|
44691
|
+
drawDefinition,
|
|
44692
|
+
matchUpId,
|
|
44693
|
+
event
|
|
44694
|
+
})?.matchUp;
|
|
44690
44695
|
let modificationsCount = 0;
|
|
44691
|
-
(matchUp
|
|
44696
|
+
(matchUp?.sides || []).forEach((side) => {
|
|
44697
|
+
if (side.lineUp)
|
|
44698
|
+
delete side.lineUp;
|
|
44699
|
+
});
|
|
44700
|
+
(inContextMatchUp?.sides || []).forEach((side) => {
|
|
44692
44701
|
modificationsCount += 1;
|
|
44693
|
-
delete side.lineUp;
|
|
44694
44702
|
if (inheritance === false) {
|
|
44695
|
-
const inContextMatchUp = findMatchUp$1({
|
|
44696
|
-
inContext: true,
|
|
44697
|
-
drawDefinition,
|
|
44698
|
-
matchUpId
|
|
44699
|
-
})?.matchUp;
|
|
44700
44703
|
const tieFormat = inContextMatchUp?.tieFormat;
|
|
44701
44704
|
const participantId = side.participantId;
|
|
44702
44705
|
if (tieFormat && participantId) {
|
|
@@ -44710,7 +44713,7 @@ function resetMatchUpLineUps$1({
|
|
|
44710
44713
|
}
|
|
44711
44714
|
modifyMatchUpNotice({
|
|
44712
44715
|
tournamentId: tournamentRecord?.tournamentId,
|
|
44713
|
-
context: "
|
|
44716
|
+
context: "resetMatchUpLineUps",
|
|
44714
44717
|
eventId: event?.eventId,
|
|
44715
44718
|
drawDefinition,
|
|
44716
44719
|
matchUp
|
|
@@ -59552,6 +59555,7 @@ var lastNames = [
|
|
|
59552
59555
|
"Catton",
|
|
59553
59556
|
"Calvino",
|
|
59554
59557
|
"Carson",
|
|
59558
|
+
"Chip",
|
|
59555
59559
|
"Constant",
|
|
59556
59560
|
"Crane",
|
|
59557
59561
|
"Crowne",
|