tods-competition-factory 2.0.41 → 2.0.43
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 +4 -4
- package/dist/tods-competition-factory.d.ts +8 -3
- package/dist/tods-competition-factory.development.cjs.js +66 -11
- 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 +3 -3
|
@@ -10446,6 +10446,8 @@ declare const fixtures: {
|
|
|
10446
10446
|
participantRole: boolean;
|
|
10447
10447
|
participantStatus: boolean;
|
|
10448
10448
|
penalties: boolean;
|
|
10449
|
+
rankings: boolean;
|
|
10450
|
+
ratings: boolean;
|
|
10449
10451
|
representing: boolean;
|
|
10450
10452
|
participantRoleResponsibilities: boolean;
|
|
10451
10453
|
participantType: boolean;
|
|
@@ -10481,6 +10483,8 @@ declare const fixtures: {
|
|
|
10481
10483
|
participantRole: boolean;
|
|
10482
10484
|
participantStatus: boolean;
|
|
10483
10485
|
penalties: boolean;
|
|
10486
|
+
rankings: boolean;
|
|
10487
|
+
ratings: boolean;
|
|
10484
10488
|
representing: boolean;
|
|
10485
10489
|
participantRoleResponsibilities: boolean;
|
|
10486
10490
|
participantType: boolean;
|
|
@@ -10615,15 +10619,16 @@ declare const fixtures: {
|
|
|
10615
10619
|
};
|
|
10616
10620
|
POLICY_SCORING_DEFAULT: {
|
|
10617
10621
|
scoring: {
|
|
10622
|
+
processCodes: {
|
|
10623
|
+
incompleteAssignmentsOnDefault: string[];
|
|
10624
|
+
};
|
|
10618
10625
|
defaultMatchUpFormat: string;
|
|
10619
10626
|
allowDeletionWithScoresPresent: {
|
|
10620
10627
|
drawDefinitions: boolean;
|
|
10621
10628
|
structures: boolean;
|
|
10622
10629
|
};
|
|
10623
10630
|
requireAllPositionsAssigned: boolean;
|
|
10624
|
-
|
|
10625
|
-
incompleteAssignmentsOnDefault: string[];
|
|
10626
|
-
};
|
|
10631
|
+
allowChangePropagation: boolean;
|
|
10627
10632
|
stage: {
|
|
10628
10633
|
MAIN: {
|
|
10629
10634
|
stageSequence: {
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var namesData$1 = require('@Fixtures/data/teams.json');
|
|
6
|
-
|
|
7
5
|
function factoryVersion() {
|
|
8
|
-
return '2.0.
|
|
6
|
+
return '2.0.43';
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
function isFunction(obj) {
|
|
@@ -19822,7 +19820,7 @@ function calculatePressureRatings({ participantResults, sides, score }) {
|
|
|
19822
19820
|
const side2 = sides.find(({ sideNumber }) => sideNumber === 2);
|
|
19823
19821
|
const side1ratings = side1?.participant?.ratings;
|
|
19824
19822
|
const side2ratings = side2?.participant?.ratings;
|
|
19825
|
-
if (side1ratings[SINGLES] && side2ratings[SINGLES]) {
|
|
19823
|
+
if (side1ratings?.[SINGLES] && side2ratings?.[SINGLES]) {
|
|
19826
19824
|
const targetRatingType = ELO;
|
|
19827
19825
|
const { convertedRating: side1ConvertedRating } = getConvertedRating({ ratings: side1ratings, targetRatingType });
|
|
19828
19826
|
const { convertedRating: side2ConvertedRating } = getConvertedRating({ ratings: side2ratings, targetRatingType });
|
|
@@ -34203,7 +34201,7 @@ function getDrawData(params) {
|
|
|
34203
34201
|
const { drawPosition, participantId } = assignment;
|
|
34204
34202
|
participantPlacements = true;
|
|
34205
34203
|
return {
|
|
34206
|
-
participantResult: participantId && result
|
|
34204
|
+
participantResult: participantId && result?.participantResults?.[participantId],
|
|
34207
34205
|
participantId,
|
|
34208
34206
|
drawPosition,
|
|
34209
34207
|
};
|
|
@@ -47292,7 +47290,7 @@ var firstMale = [
|
|
|
47292
47290
|
"Winston",
|
|
47293
47291
|
"Zoran"
|
|
47294
47292
|
];
|
|
47295
|
-
var namesData = {
|
|
47293
|
+
var namesData$1 = {
|
|
47296
47294
|
lastNames: lastNames,
|
|
47297
47295
|
firstFemale: firstFemale,
|
|
47298
47296
|
firstMale: firstMale
|
|
@@ -47303,7 +47301,7 @@ function generatePersonData(params) {
|
|
|
47303
47301
|
if (!count || (sex && ![MALE, FEMALE].includes(sex)))
|
|
47304
47302
|
return { personData: [], error: INVALID_VALUES };
|
|
47305
47303
|
const buffer = Math.ceil(count * 1.3);
|
|
47306
|
-
const { lastNames, firstFemale, firstMale } = namesData;
|
|
47304
|
+
const { lastNames, firstFemale, firstMale } = namesData$1;
|
|
47307
47305
|
const ISOs = countries.map(({ iso }) => iso).filter(Boolean);
|
|
47308
47306
|
const lastNameDupeCount = Math.ceil(buffer / lastNames.length);
|
|
47309
47307
|
const femaleDupeCount = Math.ceil(buffer / firstFemale.length);
|
|
@@ -47457,8 +47455,62 @@ function generatePersons(params) {
|
|
|
47457
47455
|
};
|
|
47458
47456
|
}
|
|
47459
47457
|
|
|
47458
|
+
var namesData = [
|
|
47459
|
+
"Ace Academy",
|
|
47460
|
+
"Avengers",
|
|
47461
|
+
"Ball Bouncers",
|
|
47462
|
+
"Baseliners",
|
|
47463
|
+
"Captivators",
|
|
47464
|
+
"Civil Disobedients",
|
|
47465
|
+
"Continentals",
|
|
47466
|
+
"Court Royal",
|
|
47467
|
+
"Court Sharks",
|
|
47468
|
+
"Diamond Dogs",
|
|
47469
|
+
"Danger Zone",
|
|
47470
|
+
"Doubles Dominators",
|
|
47471
|
+
"Double Faults",
|
|
47472
|
+
"Tricksters",
|
|
47473
|
+
"Eliminators",
|
|
47474
|
+
"Court Crusaders",
|
|
47475
|
+
"Fuzz Busters",
|
|
47476
|
+
"Game Changers",
|
|
47477
|
+
"Goal Gurus",
|
|
47478
|
+
"Good Volley",
|
|
47479
|
+
"Green Machine",
|
|
47480
|
+
"Hawk Eyes",
|
|
47481
|
+
"Inside Outers",
|
|
47482
|
+
"Killer Instinct",
|
|
47483
|
+
"Line Toers",
|
|
47484
|
+
"Masters of Mayhem",
|
|
47485
|
+
"Matter Catchers",
|
|
47486
|
+
"Cheap Shot",
|
|
47487
|
+
"Mean Machines",
|
|
47488
|
+
"Mindspace Invaders",
|
|
47489
|
+
"Net Centric",
|
|
47490
|
+
"Net Positive",
|
|
47491
|
+
"Smash Mullet",
|
|
47492
|
+
"Over Your Head",
|
|
47493
|
+
"Spin Meisters",
|
|
47494
|
+
"Aggressors",
|
|
47495
|
+
"Racket Machine",
|
|
47496
|
+
"Slice Happy",
|
|
47497
|
+
"Refs Nightmare",
|
|
47498
|
+
"Sandeaters",
|
|
47499
|
+
"Sun Seekers",
|
|
47500
|
+
"Slicer Dicers",
|
|
47501
|
+
"Stacked Deck",
|
|
47502
|
+
"Cross Stringers",
|
|
47503
|
+
"The Emergence",
|
|
47504
|
+
"Total Demolition",
|
|
47505
|
+
"Touch and Go",
|
|
47506
|
+
"Unreturnables",
|
|
47507
|
+
"Upside Downers",
|
|
47508
|
+
"Vertically Challenged",
|
|
47509
|
+
"Visual Spectacle"
|
|
47510
|
+
];
|
|
47511
|
+
|
|
47460
47512
|
function nameMocks({ nameRoot = 'TEAM', count = 1 } = {}) {
|
|
47461
|
-
const shuffledTeamNames = shuffleArray(namesData
|
|
47513
|
+
const shuffledTeamNames = shuffleArray(namesData);
|
|
47462
47514
|
const names = shuffledTeamNames.slice(0, count);
|
|
47463
47515
|
if (names.length < count) {
|
|
47464
47516
|
generateRange(0, count - names.length).forEach((i) => names.push(`${nameRoot} ${i + 1}`));
|
|
@@ -57618,6 +57670,8 @@ const POLICY_PRIVACY_DEFAULT = {
|
|
|
57618
57670
|
participantRole: true,
|
|
57619
57671
|
participantStatus: true,
|
|
57620
57672
|
penalties: false,
|
|
57673
|
+
rankings: true,
|
|
57674
|
+
ratings: true,
|
|
57621
57675
|
representing: true,
|
|
57622
57676
|
participantRoleResponsibilities: false,
|
|
57623
57677
|
participantType: true,
|
|
@@ -57653,6 +57707,8 @@ const POLICY_PRIVACY_DEFAULT = {
|
|
|
57653
57707
|
participantRole: true,
|
|
57654
57708
|
participantStatus: true,
|
|
57655
57709
|
penalties: false,
|
|
57710
|
+
rankings: true,
|
|
57711
|
+
ratings: true,
|
|
57656
57712
|
representing: true,
|
|
57657
57713
|
participantRoleResponsibilities: false,
|
|
57658
57714
|
participantType: true,
|
|
@@ -57685,15 +57741,14 @@ const POLICY_PRIVACY_DEFAULT = {
|
|
|
57685
57741
|
|
|
57686
57742
|
const POLICY_SCORING_DEFAULT = {
|
|
57687
57743
|
[POLICY_TYPE_SCORING]: {
|
|
57744
|
+
processCodes: { incompleteAssignmentsOnDefault: ['RANKING.IGNORE'] },
|
|
57688
57745
|
defaultMatchUpFormat: FORMAT_STANDARD,
|
|
57689
57746
|
allowDeletionWithScoresPresent: {
|
|
57690
57747
|
drawDefinitions: false,
|
|
57691
57748
|
structures: false,
|
|
57692
57749
|
},
|
|
57693
57750
|
requireAllPositionsAssigned: false,
|
|
57694
|
-
|
|
57695
|
-
incompleteAssignmentsOnDefault: ['RANKING.IGNORE'],
|
|
57696
|
-
},
|
|
57751
|
+
allowChangePropagation: false,
|
|
57697
57752
|
stage: {
|
|
57698
57753
|
[MAIN]: {
|
|
57699
57754
|
stageSequence: {
|