tods-competition-factory 2.2.32-beta.6 → 2.2.33
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 +7 -7
- package/dist/tods-competition-factory.d.ts +4 -2
- package/dist/tods-competition-factory.development.cjs.js +44 -8
- 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 +17 -17
|
@@ -2533,6 +2533,7 @@ type GenerateDrawDefinitionArgs = {
|
|
|
2533
2533
|
hydrateCollections?: boolean;
|
|
2534
2534
|
tournamentRecord: Tournament;
|
|
2535
2535
|
matchUpType?: EventTypeUnion;
|
|
2536
|
+
hydrateRoundNames?: boolean;
|
|
2536
2537
|
drawTypeCoercion?: boolean;
|
|
2537
2538
|
ignoreStageSpace?: boolean;
|
|
2538
2539
|
qualifyingProfiles?: any[];
|
|
@@ -4625,11 +4626,11 @@ declare function deleteFlightProfileAndFlightDraws({ autoPublish, tournamentReco
|
|
|
4625
4626
|
event: any;
|
|
4626
4627
|
force: any;
|
|
4627
4628
|
}): {
|
|
4629
|
+
error: any;
|
|
4630
|
+
} | {
|
|
4628
4631
|
success?: boolean;
|
|
4629
4632
|
error?: ErrorType;
|
|
4630
4633
|
info?: any;
|
|
4631
|
-
} | {
|
|
4632
|
-
error: any;
|
|
4633
4634
|
};
|
|
4634
4635
|
|
|
4635
4636
|
type ModifyEventMatchUpFormatTimingArgs = {
|
|
@@ -5738,6 +5739,7 @@ declare function bulkMatchUpStatusUpdate(params: any): ResultType | {
|
|
|
5738
5739
|
message: string;
|
|
5739
5740
|
code: string;
|
|
5740
5741
|
};
|
|
5742
|
+
info?: undefined;
|
|
5741
5743
|
} | {
|
|
5742
5744
|
error: {
|
|
5743
5745
|
message: string;
|
|
@@ -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.33';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const SINGLES_MATCHUP = 'SINGLES';
|
|
@@ -38436,10 +38436,13 @@ function getConsideredEntries({ considerEventEntries = true, drawEntries, eventE
|
|
|
38436
38436
|
}
|
|
38437
38437
|
function getPolicies(params) {
|
|
38438
38438
|
const { tournamentRecord, event } = params;
|
|
38439
|
-
const appliedPolicies =
|
|
38440
|
-
|
|
38441
|
-
|
|
38442
|
-
|
|
38439
|
+
const appliedPolicies = {
|
|
38440
|
+
...params?.appliedPolicies,
|
|
38441
|
+
...(getAppliedPolicies({
|
|
38442
|
+
tournamentRecord,
|
|
38443
|
+
event,
|
|
38444
|
+
}).appliedPolicies ?? {}),
|
|
38445
|
+
};
|
|
38443
38446
|
const policyDefinitions = makeDeepCopy(params.policyDefinitions ?? {}, false, true);
|
|
38444
38447
|
return { appliedPolicies, policyDefinitions };
|
|
38445
38448
|
}
|
|
@@ -38556,6 +38559,41 @@ function generateDrawDefinition(params) {
|
|
|
38556
38559
|
matchUpType,
|
|
38557
38560
|
});
|
|
38558
38561
|
}
|
|
38562
|
+
if (params.hydrateRoundNames) {
|
|
38563
|
+
const roundNamingPolicy = appliedPolicies?.[POLICY_TYPE_ROUND_NAMING];
|
|
38564
|
+
if (roundNamingPolicy) {
|
|
38565
|
+
const matchUpsMap = getMatchUpsMap({ drawDefinition });
|
|
38566
|
+
drawDefinition.structures?.forEach((structure) => {
|
|
38567
|
+
const matchUps = getMappedStructureMatchUps({
|
|
38568
|
+
structureId: structure.structureId,
|
|
38569
|
+
matchUpsMap,
|
|
38570
|
+
});
|
|
38571
|
+
const result = getRoundContextProfile({
|
|
38572
|
+
roundNamingPolicy,
|
|
38573
|
+
drawDefinition,
|
|
38574
|
+
structure,
|
|
38575
|
+
matchUps,
|
|
38576
|
+
});
|
|
38577
|
+
const { roundNamingProfile, roundProfile } = result;
|
|
38578
|
+
const structures = structure.structures || [structure];
|
|
38579
|
+
structures.forEach((itemStructure) => {
|
|
38580
|
+
(itemStructure.matchUps ?? []).forEach((matchUp) => {
|
|
38581
|
+
const roundNumber = matchUp?.roundNumber?.toString();
|
|
38582
|
+
if (roundNumber) {
|
|
38583
|
+
const roundName = roundNamingProfile?.[roundNumber]?.roundName;
|
|
38584
|
+
const abbreviatedRoundName = roundNamingProfile?.[roundNumber]?.abbreviatedRoundName;
|
|
38585
|
+
const feedRound = roundProfile?.[roundNumber]?.feedRound;
|
|
38586
|
+
Object.assign(matchUp, {
|
|
38587
|
+
abbreviatedRoundName,
|
|
38588
|
+
feedRound,
|
|
38589
|
+
roundName,
|
|
38590
|
+
});
|
|
38591
|
+
}
|
|
38592
|
+
});
|
|
38593
|
+
});
|
|
38594
|
+
});
|
|
38595
|
+
}
|
|
38596
|
+
}
|
|
38559
38597
|
return {
|
|
38560
38598
|
existingDrawDefinition: !!existingDrawDefinition,
|
|
38561
38599
|
qualifyingConflicts,
|
|
@@ -45354,9 +45392,7 @@ function setMatchUpState(params) {
|
|
|
45354
45392
|
const isClearScore = matchUpStatus === TO_BE_PLAYED && score?.scoreStringSide1 === '' && score?.scoreStringSide2 === '' && !winningSide;
|
|
45355
45393
|
const propagatedExitDownStream = hasPropagatedExitDownstream(params);
|
|
45356
45394
|
if (propagatedExitDownStream && isClearScore) {
|
|
45357
|
-
return {
|
|
45358
|
-
error: PROPAGATED_EXITS_DOWNSTREAM,
|
|
45359
|
-
};
|
|
45395
|
+
return { error: PROPAGATED_EXITS_DOWNSTREAM };
|
|
45360
45396
|
}
|
|
45361
45397
|
const activeDownstream = isActiveDownstream(params);
|
|
45362
45398
|
let dualWinningSideChange;
|