tods-competition-factory 0.53.1 → 0.53.2
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/tods-competition-factory.cjs.development.js +66 -36
- package/dist/tods-competition-factory.cjs.development.js.map +1 -1
- package/dist/tods-competition-factory.esm.js +66 -36
- package/dist/tods-competition-factory.esm.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
|
@@ -27483,7 +27483,7 @@ const scheduleGovernor$1 = {
|
|
|
27483
27483
|
};
|
|
27484
27484
|
|
|
27485
27485
|
function factoryVersion() {
|
|
27486
|
-
return '0.53.
|
|
27486
|
+
return '0.53.2';
|
|
27487
27487
|
}
|
|
27488
27488
|
|
|
27489
27489
|
function attachPolicies$2({
|
|
@@ -31291,6 +31291,11 @@ function addEvent({
|
|
|
31291
31291
|
endDate,
|
|
31292
31292
|
eventType: SINGLES
|
|
31293
31293
|
}, event);
|
|
31294
|
+
|
|
31295
|
+
if (event.tieFormatName && tieFormats[event.tieFormatName]) {
|
|
31296
|
+
eventRecord.tieFormat = tieFormats[event.tieFormatName];
|
|
31297
|
+
}
|
|
31298
|
+
|
|
31294
31299
|
if (!eventRecord.eventId) eventRecord.eventId = UUID();
|
|
31295
31300
|
const eventExists = tournamentRecord.events.reduce((exists, event) => {
|
|
31296
31301
|
return exists || event.eventId === eventRecord.eventId;
|
|
@@ -37903,6 +37908,13 @@ const COLLEGE_JUCO = 'COLLEGE_JUCO';
|
|
|
37903
37908
|
const COLLEGE_D3 = 'COLLEGE_D3';
|
|
37904
37909
|
const DOMINANT_DUO = 'DOMINANT_DUO';
|
|
37905
37910
|
const LAVER_CUP = 'LAVER_CUP';
|
|
37911
|
+
const tieFormatConstants = {
|
|
37912
|
+
COLLEGE_D3,
|
|
37913
|
+
COLLEGE_DEFAULT,
|
|
37914
|
+
COLLEGE_JUCO,
|
|
37915
|
+
DOMINANT_DUO,
|
|
37916
|
+
LAVER_CUP
|
|
37917
|
+
};
|
|
37906
37918
|
|
|
37907
37919
|
const namedFormats = {
|
|
37908
37920
|
STANDARD: {
|
|
@@ -38073,9 +38085,9 @@ function generateDrawDefinition(params) {
|
|
|
38073
38085
|
matchUpType = matchUpType || eventType;
|
|
38074
38086
|
|
|
38075
38087
|
if (matchUpType === TEAM$3 && eventType === TEAM$3) {
|
|
38076
|
-
tieFormat = (tieFormat || tieFormatName) && (typeof tieFormat === 'object' ? tieFormat : tieFormatDefaults({
|
|
38088
|
+
tieFormat = (tieFormat || (event === null || event === void 0 ? void 0 : event.tieFormat) || tieFormatName) && (typeof tieFormat === 'object' ? tieFormat : tieFormatName ? tieFormatDefaults({
|
|
38077
38089
|
namedFormat: tieFormatName
|
|
38078
|
-
}));
|
|
38090
|
+
}) : typeof (event === null || event === void 0 ? void 0 : event.tieFormat) === 'object' ? event.tieFormat : tieFormatDefaults());
|
|
38079
38091
|
matchUpFormat = undefined;
|
|
38080
38092
|
} else if (!matchUpFormat) {
|
|
38081
38093
|
tieFormat = undefined;
|
|
@@ -47976,54 +47988,68 @@ function personMocks({
|
|
|
47976
47988
|
}
|
|
47977
47989
|
|
|
47978
47990
|
var teamsData = [
|
|
47991
|
+
"Ace Academy",
|
|
47979
47992
|
"Avengers",
|
|
47980
|
-
"
|
|
47981
|
-
"
|
|
47982
|
-
"Warriors",
|
|
47993
|
+
"Ball Bouncers",
|
|
47994
|
+
"Baseliners",
|
|
47983
47995
|
"Captivators",
|
|
47984
|
-
"
|
|
47985
|
-
"
|
|
47986
|
-
"
|
|
47996
|
+
"Civil Disobedients",
|
|
47997
|
+
"Continentals",
|
|
47998
|
+
"Court Royal",
|
|
47999
|
+
"Court Sharks",
|
|
48000
|
+
"Diamond Dogs",
|
|
48001
|
+
"Danger Zone",
|
|
48002
|
+
"Doubles Dominators",
|
|
48003
|
+
"Double Faults",
|
|
48004
|
+
"Tricksters",
|
|
48005
|
+
"Eliminators",
|
|
48006
|
+
"Court Crusaders",
|
|
48007
|
+
"Fuzz Busters",
|
|
48008
|
+
"Game Changers",
|
|
48009
|
+
"Goal Gurus",
|
|
48010
|
+
"Good Volley",
|
|
48011
|
+
"Green Machine",
|
|
47987
48012
|
"Hawk Eyes",
|
|
48013
|
+
"Inside Outers",
|
|
47988
48014
|
"Killer Instinct",
|
|
48015
|
+
"Line Toers",
|
|
47989
48016
|
"Masters of Mayhem",
|
|
47990
48017
|
"Matter Catchers",
|
|
48018
|
+
"Cheap Shot",
|
|
48019
|
+
"Mean Machines",
|
|
47991
48020
|
"Mindspace Invaders",
|
|
47992
|
-
"
|
|
47993
|
-
"
|
|
47994
|
-
"
|
|
48021
|
+
"Net Centric",
|
|
48022
|
+
"Net Positive",
|
|
48023
|
+
"Over Your Head",
|
|
48024
|
+
"Spin Meisters",
|
|
48025
|
+
"Aggressors",
|
|
48026
|
+
"Racket Machine",
|
|
48027
|
+
"Slice Happy",
|
|
48028
|
+
"Refs Nightmare",
|
|
48029
|
+
"Sandeaters",
|
|
48030
|
+
"Sun Seekers",
|
|
48031
|
+
"Slicer Dicers",
|
|
47995
48032
|
"Sparkle Soul Tribe",
|
|
47996
|
-
"
|
|
47997
|
-
"
|
|
47998
|
-
"The
|
|
47999
|
-
"The Bruisers",
|
|
48000
|
-
"The Civil Disobedients",
|
|
48001
|
-
"The Eliminators",
|
|
48002
|
-
"The Mavericks",
|
|
48003
|
-
"The Mean Machines",
|
|
48004
|
-
"The Punters",
|
|
48005
|
-
"The Sandeaters",
|
|
48006
|
-
"The Visual Spectacle",
|
|
48033
|
+
"Stacked Deck",
|
|
48034
|
+
"Cross Stringers",
|
|
48035
|
+
"The Emergence",
|
|
48007
48036
|
"Total Demolition",
|
|
48008
48037
|
"Touch and Go",
|
|
48038
|
+
"Upside Downers",
|
|
48009
48039
|
"Vertically Challenged",
|
|
48010
|
-
"
|
|
48011
|
-
"Wind Chasers",
|
|
48012
|
-
"Worker Bees",
|
|
48013
|
-
"Razorbacks",
|
|
48014
|
-
"Rebels",
|
|
48015
|
-
"Fighting Crusaders",
|
|
48016
|
-
"Comets",
|
|
48017
|
-
"Commodores",
|
|
48018
|
-
"Green Machine",
|
|
48019
|
-
"Continentals"
|
|
48040
|
+
"Visual Spectacle"
|
|
48020
48041
|
];
|
|
48021
48042
|
|
|
48022
48043
|
function teamMocks({
|
|
48023
48044
|
count = 1
|
|
48024
48045
|
} = {}) {
|
|
48025
|
-
const
|
|
48026
|
-
const teams =
|
|
48046
|
+
const shuffledTeamNames = shuffleArray(teamsData);
|
|
48047
|
+
const teams = shuffledTeamNames.slice(0, count);
|
|
48048
|
+
|
|
48049
|
+
if (teams.length < count) {
|
|
48050
|
+
generateRange(0, count - teams.length).forEach(i => teams.push(`Team ${i + 1}`));
|
|
48051
|
+
}
|
|
48052
|
+
|
|
48027
48053
|
return {
|
|
48028
48054
|
teams
|
|
48029
48055
|
};
|
|
@@ -48118,6 +48144,9 @@ function generateParticipants({
|
|
|
48118
48144
|
const isoMin = getMin(nationalityCodesCount);
|
|
48119
48145
|
const isoList = isoMin ? shuffleArray(isoCountries).slice(0, nationalityCodesCount) : nationalityCodes ? isoCountries.filter(isoCountry => nationalityCodes.includes(isoCountry.key)) : isoCountries;
|
|
48120
48146
|
const countriesList = shuffleArray(generateRange(0, Math.ceil(individualParticipantsCount / (isoMin || 1))).map(() => isoList).flat(Infinity));
|
|
48147
|
+
const teamNames = teamMocks({
|
|
48148
|
+
count: participantsCount
|
|
48149
|
+
}).teams;
|
|
48121
48150
|
const participants = generateRange(0, participantsCount).map(i => {
|
|
48122
48151
|
const sideParticipantsCount = doubles ? 2 : team ? 8 : 1;
|
|
48123
48152
|
const individualParticipants = generateRange(0, sideParticipantsCount).map(j => {
|
|
@@ -48130,7 +48159,7 @@ function generateParticipants({
|
|
|
48130
48159
|
participantId: (uuids === null || uuids === void 0 ? void 0 : uuids.pop()) || UUID(),
|
|
48131
48160
|
participantType: doubles ? PAIR$1 : TEAM$1,
|
|
48132
48161
|
participantRole: COMPETITOR,
|
|
48133
|
-
participantName: doubles ? pairName :
|
|
48162
|
+
participantName: doubles ? pairName : teamNames[i],
|
|
48134
48163
|
individualParticipantIds
|
|
48135
48164
|
};
|
|
48136
48165
|
if (inContext) groupParticipant.individualParticipants = individualParticipants;
|
|
@@ -49854,6 +49883,7 @@ const factoryConstants = {
|
|
|
49854
49883
|
scaleConstants,
|
|
49855
49884
|
scheduleConstants,
|
|
49856
49885
|
surfaceConstants,
|
|
49886
|
+
tieFormatConstants,
|
|
49857
49887
|
timeItemConstants,
|
|
49858
49888
|
topicConstants,
|
|
49859
49889
|
venueConstants
|