tods-competition-factory 1.7.17 → 1.7.18
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 +157 -116
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.mjs +3 -0
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +3 -0
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/index.mjs +113 -54
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +115 -55
- 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
package/dist/index.mjs
CHANGED
|
@@ -333,7 +333,7 @@ const matchUpFormatCode = {
|
|
|
333
333
|
};
|
|
334
334
|
|
|
335
335
|
function factoryVersion() {
|
|
336
|
-
return "1.7.
|
|
336
|
+
return "1.7.18";
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
function getObjectTieFormat(obj) {
|
|
@@ -13480,7 +13480,7 @@ const ratingsParameters = {
|
|
|
13480
13480
|
}
|
|
13481
13481
|
};
|
|
13482
13482
|
|
|
13483
|
-
var collectionDefinitions$
|
|
13483
|
+
var collectionDefinitions$j = [
|
|
13484
13484
|
{
|
|
13485
13485
|
collectionName: "Doubles",
|
|
13486
13486
|
matchUpCount: 3,
|
|
@@ -13496,17 +13496,17 @@ var collectionDefinitions$i = [
|
|
|
13496
13496
|
matchUpValue: 1
|
|
13497
13497
|
}
|
|
13498
13498
|
];
|
|
13499
|
-
var tieFormatName$
|
|
13500
|
-
var winCriteria$
|
|
13499
|
+
var tieFormatName$j = "COLLEGE_D3";
|
|
13500
|
+
var winCriteria$j = {
|
|
13501
13501
|
valueGoal: 5
|
|
13502
13502
|
};
|
|
13503
13503
|
var COLLEGE_D3$1 = {
|
|
13504
|
-
collectionDefinitions: collectionDefinitions$
|
|
13505
|
-
tieFormatName: tieFormatName$
|
|
13506
|
-
winCriteria: winCriteria$
|
|
13504
|
+
collectionDefinitions: collectionDefinitions$j,
|
|
13505
|
+
tieFormatName: tieFormatName$j,
|
|
13506
|
+
winCriteria: winCriteria$j
|
|
13507
13507
|
};
|
|
13508
13508
|
|
|
13509
|
-
var collectionDefinitions$
|
|
13509
|
+
var collectionDefinitions$i = [
|
|
13510
13510
|
{
|
|
13511
13511
|
collectionName: "Doubles",
|
|
13512
13512
|
collectionValue: 1,
|
|
@@ -13522,17 +13522,17 @@ var collectionDefinitions$h = [
|
|
|
13522
13522
|
matchUpValue: 1
|
|
13523
13523
|
}
|
|
13524
13524
|
];
|
|
13525
|
-
var tieFormatName$
|
|
13526
|
-
var winCriteria$
|
|
13525
|
+
var tieFormatName$i = "COLLEGE_DEFAULT";
|
|
13526
|
+
var winCriteria$i = {
|
|
13527
13527
|
valueGoal: 5
|
|
13528
13528
|
};
|
|
13529
13529
|
var COLLEGE_DEFAULT$1 = {
|
|
13530
|
-
collectionDefinitions: collectionDefinitions$
|
|
13531
|
-
tieFormatName: tieFormatName$
|
|
13532
|
-
winCriteria: winCriteria$
|
|
13530
|
+
collectionDefinitions: collectionDefinitions$i,
|
|
13531
|
+
tieFormatName: tieFormatName$i,
|
|
13532
|
+
winCriteria: winCriteria$i
|
|
13533
13533
|
};
|
|
13534
13534
|
|
|
13535
|
-
var collectionDefinitions$
|
|
13535
|
+
var collectionDefinitions$h = [
|
|
13536
13536
|
{
|
|
13537
13537
|
collectionName: "Doubles",
|
|
13538
13538
|
matchUpCount: 3,
|
|
@@ -13548,17 +13548,17 @@ var collectionDefinitions$g = [
|
|
|
13548
13548
|
matchUpValue: 1
|
|
13549
13549
|
}
|
|
13550
13550
|
];
|
|
13551
|
-
var tieFormatName$
|
|
13552
|
-
var winCriteria$
|
|
13551
|
+
var tieFormatName$h = "COLLEGE_JUCO";
|
|
13552
|
+
var winCriteria$h = {
|
|
13553
13553
|
valueGoal: 5
|
|
13554
13554
|
};
|
|
13555
13555
|
var COLLEGE_JUCO$1 = {
|
|
13556
|
-
collectionDefinitions: collectionDefinitions$
|
|
13557
|
-
tieFormatName: tieFormatName$
|
|
13558
|
-
winCriteria: winCriteria$
|
|
13556
|
+
collectionDefinitions: collectionDefinitions$h,
|
|
13557
|
+
tieFormatName: tieFormatName$h,
|
|
13558
|
+
winCriteria: winCriteria$h
|
|
13559
13559
|
};
|
|
13560
13560
|
|
|
13561
|
-
var collectionDefinitions$
|
|
13561
|
+
var collectionDefinitions$g = [
|
|
13562
13562
|
{
|
|
13563
13563
|
collectionName: "Doubles",
|
|
13564
13564
|
matchUpCount: 1,
|
|
@@ -13574,17 +13574,17 @@ var collectionDefinitions$f = [
|
|
|
13574
13574
|
matchUpValue: 1
|
|
13575
13575
|
}
|
|
13576
13576
|
];
|
|
13577
|
-
var tieFormatName$
|
|
13578
|
-
var winCriteria$
|
|
13577
|
+
var tieFormatName$g = "DOMINANT_DUO";
|
|
13578
|
+
var winCriteria$g = {
|
|
13579
13579
|
valueGoal: 2
|
|
13580
13580
|
};
|
|
13581
13581
|
var DOMINANT_DUO_TIE_FORMAT = {
|
|
13582
|
-
collectionDefinitions: collectionDefinitions$
|
|
13583
|
-
tieFormatName: tieFormatName$
|
|
13584
|
-
winCriteria: winCriteria$
|
|
13582
|
+
collectionDefinitions: collectionDefinitions$g,
|
|
13583
|
+
tieFormatName: tieFormatName$g,
|
|
13584
|
+
winCriteria: winCriteria$g
|
|
13585
13585
|
};
|
|
13586
13586
|
|
|
13587
|
-
var collectionDefinitions$
|
|
13587
|
+
var collectionDefinitions$f = [
|
|
13588
13588
|
{
|
|
13589
13589
|
collectionName: "Mixed Doubles",
|
|
13590
13590
|
gender: "MIXED",
|
|
@@ -13610,17 +13610,17 @@ var collectionDefinitions$e = [
|
|
|
13610
13610
|
matchUpValue: 1
|
|
13611
13611
|
}
|
|
13612
13612
|
];
|
|
13613
|
-
var tieFormatName$
|
|
13614
|
-
var winCriteria$
|
|
13613
|
+
var tieFormatName$f = "DOMINANT_DUO_MIXED";
|
|
13614
|
+
var winCriteria$f = {
|
|
13615
13615
|
valueGoal: 2
|
|
13616
13616
|
};
|
|
13617
13617
|
var DOMINANT_DUO_MIXED_TIE_FORMAT = {
|
|
13618
|
-
collectionDefinitions: collectionDefinitions$
|
|
13619
|
-
tieFormatName: tieFormatName$
|
|
13620
|
-
winCriteria: winCriteria$
|
|
13618
|
+
collectionDefinitions: collectionDefinitions$f,
|
|
13619
|
+
tieFormatName: tieFormatName$f,
|
|
13620
|
+
winCriteria: winCriteria$f
|
|
13621
13621
|
};
|
|
13622
13622
|
|
|
13623
|
-
var collectionDefinitions$
|
|
13623
|
+
var collectionDefinitions$e = [
|
|
13624
13624
|
{
|
|
13625
13625
|
collectionGroupNumber: 1,
|
|
13626
13626
|
matchUpType: "DOUBLES",
|
|
@@ -13678,18 +13678,18 @@ var collectionGroups$1 = [
|
|
|
13678
13678
|
groupName: "Day 3"
|
|
13679
13679
|
}
|
|
13680
13680
|
];
|
|
13681
|
-
var tieFormatName$
|
|
13682
|
-
var winCriteria$
|
|
13681
|
+
var tieFormatName$e = "LAVER_CUP";
|
|
13682
|
+
var winCriteria$e = {
|
|
13683
13683
|
valueGoal: 13
|
|
13684
13684
|
};
|
|
13685
13685
|
var LAVER_CUP_TIE_FORMAT = {
|
|
13686
|
-
collectionDefinitions: collectionDefinitions$
|
|
13686
|
+
collectionDefinitions: collectionDefinitions$e,
|
|
13687
13687
|
collectionGroups: collectionGroups$1,
|
|
13688
|
-
tieFormatName: tieFormatName$
|
|
13689
|
-
winCriteria: winCriteria$
|
|
13688
|
+
tieFormatName: tieFormatName$e,
|
|
13689
|
+
winCriteria: winCriteria$e
|
|
13690
13690
|
};
|
|
13691
13691
|
|
|
13692
|
-
var collectionDefinitions$
|
|
13692
|
+
var collectionDefinitions$d = [
|
|
13693
13693
|
{
|
|
13694
13694
|
collectionName: "Round 1",
|
|
13695
13695
|
matchUpCount: 3,
|
|
@@ -13712,19 +13712,19 @@ var collectionDefinitions$c = [
|
|
|
13712
13712
|
scoreValue: 1
|
|
13713
13713
|
}
|
|
13714
13714
|
];
|
|
13715
|
-
var tieFormatName$
|
|
13715
|
+
var tieFormatName$d = "Doubles Shuffle";
|
|
13716
13716
|
var unrestrictedSelections = true;
|
|
13717
|
-
var winCriteria$
|
|
13717
|
+
var winCriteria$d = {
|
|
13718
13718
|
aggregateValue: true
|
|
13719
13719
|
};
|
|
13720
13720
|
var TEAM_AGGREGATION_TIE_FORMAT = {
|
|
13721
|
-
collectionDefinitions: collectionDefinitions$
|
|
13722
|
-
tieFormatName: tieFormatName$
|
|
13721
|
+
collectionDefinitions: collectionDefinitions$d,
|
|
13722
|
+
tieFormatName: tieFormatName$d,
|
|
13723
13723
|
unrestrictedSelections: unrestrictedSelections,
|
|
13724
|
-
winCriteria: winCriteria$
|
|
13724
|
+
winCriteria: winCriteria$d
|
|
13725
13725
|
};
|
|
13726
13726
|
|
|
13727
|
-
var collectionDefinitions$
|
|
13727
|
+
var collectionDefinitions$c = [
|
|
13728
13728
|
{
|
|
13729
13729
|
scoreValue: 1,
|
|
13730
13730
|
matchUpType: "SINGLES",
|
|
@@ -13766,11 +13766,47 @@ var collectionDefinitions$b = [
|
|
|
13766
13766
|
matchUpCount: 1
|
|
13767
13767
|
}
|
|
13768
13768
|
];
|
|
13769
|
-
var tieFormatName$
|
|
13769
|
+
var tieFormatName$c = "Time Tennis Dual";
|
|
13770
|
+
var winCriteria$c = {
|
|
13771
|
+
aggregateValue: true
|
|
13772
|
+
};
|
|
13773
|
+
var TIME_TENNIS_DUAL_TIE_FORMAT = {
|
|
13774
|
+
collectionDefinitions: collectionDefinitions$c,
|
|
13775
|
+
tieFormatName: tieFormatName$c,
|
|
13776
|
+
winCriteria: winCriteria$c
|
|
13777
|
+
};
|
|
13778
|
+
|
|
13779
|
+
var collectionDefinitions$b = [
|
|
13780
|
+
{
|
|
13781
|
+
scoreValue: 1,
|
|
13782
|
+
matchUpType: "SINGLES",
|
|
13783
|
+
collectionName: "Men's Singles",
|
|
13784
|
+
matchUpFormat: "SET1-S:T60",
|
|
13785
|
+
gender: "MALE",
|
|
13786
|
+
matchUpCount: 1
|
|
13787
|
+
},
|
|
13788
|
+
{
|
|
13789
|
+
scoreValue: 1,
|
|
13790
|
+
matchUpType: "SINGLES",
|
|
13791
|
+
collectionName: "Women's Singles",
|
|
13792
|
+
matchUpFormat: "SET1-S:T60",
|
|
13793
|
+
gender: "FEMALE",
|
|
13794
|
+
matchUpCount: 1
|
|
13795
|
+
},
|
|
13796
|
+
{
|
|
13797
|
+
matchUpValue: 1,
|
|
13798
|
+
matchUpType: "DOUBLES",
|
|
13799
|
+
collectionName: "Mixed Doubles",
|
|
13800
|
+
matchUpFormat: "SET1-S:T60",
|
|
13801
|
+
gender: "MIXED",
|
|
13802
|
+
matchUpCount: 1
|
|
13803
|
+
}
|
|
13804
|
+
];
|
|
13805
|
+
var tieFormatName$b = "Time Tennis Pro Circuit";
|
|
13770
13806
|
var winCriteria$b = {
|
|
13771
13807
|
aggregateValue: true
|
|
13772
13808
|
};
|
|
13773
|
-
var
|
|
13809
|
+
var TIME_TENNIS_PRO_TIE_FORMAT = {
|
|
13774
13810
|
collectionDefinitions: collectionDefinitions$b,
|
|
13775
13811
|
tieFormatName: tieFormatName$b,
|
|
13776
13812
|
winCriteria: winCriteria$b
|
|
@@ -14550,7 +14586,8 @@ const tieFormats = {
|
|
|
14550
14586
|
DOMINANT_DUO_MIXED: DOMINANT_DUO_MIXED_TIE_FORMAT,
|
|
14551
14587
|
LAVER_CUP: LAVER_CUP_TIE_FORMAT,
|
|
14552
14588
|
TEAM_DOUBLES_3_AGGREGATION: TEAM_AGGREGATION_TIE_FORMAT,
|
|
14553
|
-
|
|
14589
|
+
TIME_TENNIS_DUAL: TIME_TENNIS_DUAL_TIE_FORMAT,
|
|
14590
|
+
TIME_TENNIS_PRO_CIRCUIT: TIME_TENNIS_PRO_TIE_FORMAT,
|
|
14554
14591
|
USTA_BREWER_CUP: USTA_BREWER_CUP_TIE_FORMAT,
|
|
14555
14592
|
USTA_OZAKI_CUP: USTA_OZAKI_CUP_TIE_FORMAT,
|
|
14556
14593
|
USTA_COLLEGE: USTA_COLLEGE_TIE_FORMAT,
|
|
@@ -15470,6 +15507,9 @@ function initializeParticipantId({ participantMap, participantId }) {
|
|
|
15470
15507
|
groupParticipantIds: [],
|
|
15471
15508
|
pairParticipantIds: [],
|
|
15472
15509
|
teamParticipantIds: [],
|
|
15510
|
+
seedings: {},
|
|
15511
|
+
rankings: {},
|
|
15512
|
+
ratings: {},
|
|
15473
15513
|
groups: [],
|
|
15474
15514
|
teams: []
|
|
15475
15515
|
},
|
|
@@ -28859,11 +28899,27 @@ function getParticipantEntries(params) {
|
|
|
28859
28899
|
seedAssignments[MAIN] = mainSeeding;
|
|
28860
28900
|
if (seedAssignments && qualifyingSeeding)
|
|
28861
28901
|
seedAssignments[QUALIFYING] = mainSeeding;
|
|
28902
|
+
const seedValue = mainSeeding || qualifyingSeeding;
|
|
28903
|
+
if (seedValue) {
|
|
28904
|
+
if (!participantMap[id].participant.seedings[eventType])
|
|
28905
|
+
participantMap[id].participant.seedings[eventType] = [];
|
|
28906
|
+
participantMap[id].participant.seedings[eventType].push({
|
|
28907
|
+
scaleValue: seedValue,
|
|
28908
|
+
scaleName: drawId
|
|
28909
|
+
});
|
|
28910
|
+
if (seedAssignments) {
|
|
28911
|
+
if (!participantMap[id].events[eventId].seedAssignments)
|
|
28912
|
+
participantMap[id].events[eventId].seedAssignments = {};
|
|
28913
|
+
Object.keys(seedAssignments).forEach(
|
|
28914
|
+
(stage) => participantMap[id].events[eventId].seedAssignments[stage] = seedAssignments[stage]
|
|
28915
|
+
);
|
|
28916
|
+
}
|
|
28917
|
+
}
|
|
28862
28918
|
if ((withEvents || withRankingProfile) && participantMap[id] && eventId) {
|
|
28863
28919
|
if (!participantMap[id].events[eventId])
|
|
28864
28920
|
participantMap[id].events[eventId] = {};
|
|
28865
28921
|
if (includeSeeding) {
|
|
28866
|
-
participantMap[id].events[eventId].seedValue =
|
|
28922
|
+
participantMap[id].events[eventId].seedValue = seedValue;
|
|
28867
28923
|
} else if (participantMap[id].events[eventId].seedValue) {
|
|
28868
28924
|
participantMap[id].events[eventId].seedValue = void 0;
|
|
28869
28925
|
}
|
|
@@ -55520,7 +55576,8 @@ const DOMINANT_DUO = "DOMINANT_DUO";
|
|
|
55520
55576
|
const DOMINANT_DUO_MIXED = "DOMINANT_DUO_MIXED";
|
|
55521
55577
|
const LAVER_CUP = "LAVER_CUP";
|
|
55522
55578
|
const TEAM_DOUBLES_3_AGGREGATION = "TEAM_DOUBLES_3_AGGREGATION";
|
|
55523
|
-
const
|
|
55579
|
+
const TIME_TENNIS_DUAL = "TIME_TENNIS_DUAL";
|
|
55580
|
+
const TIME_TENNIS_PRO_CIRCUIT = "TIME_TENNIS_PRO_CIRCUIT";
|
|
55524
55581
|
const USTA_BREWER_CUP = "USTA_BREWER_CUP";
|
|
55525
55582
|
const USTA_OZAKI_CUP = "USTA_OZAKI_CUP";
|
|
55526
55583
|
const USTA_COLLEGE = "USTA_COLLEGE";
|
|
@@ -55540,7 +55597,8 @@ const tieFormatConstants = {
|
|
|
55540
55597
|
DOMINANT_DUO_MIXED,
|
|
55541
55598
|
LAVER_CUP,
|
|
55542
55599
|
TEAM_DOUBLES_3_AGGREGATION,
|
|
55543
|
-
|
|
55600
|
+
TIME_TENNIS_DUAL,
|
|
55601
|
+
TIME_TENNIS_PRO_CIRCUIT,
|
|
55544
55602
|
USTA_BREWER_CUP,
|
|
55545
55603
|
USTA_OZAKI_CUP,
|
|
55546
55604
|
USTA_COLLEGE,
|
|
@@ -55611,7 +55669,8 @@ const namedFormats = {
|
|
|
55611
55669
|
[DOMINANT_DUO]: DOMINANT_DUO_TIE_FORMAT,
|
|
55612
55670
|
[DOMINANT_DUO_MIXED]: DOMINANT_DUO_MIXED_TIE_FORMAT,
|
|
55613
55671
|
[TEAM_DOUBLES_3_AGGREGATION]: TEAM_AGGREGATION_TIE_FORMAT,
|
|
55614
|
-
[
|
|
55672
|
+
[TIME_TENNIS_DUAL]: TIME_TENNIS_DUAL_TIE_FORMAT,
|
|
55673
|
+
[TIME_TENNIS_PRO_CIRCUIT]: TIME_TENNIS_PRO_TIE_FORMAT,
|
|
55615
55674
|
[USTA_BREWER_CUP]: USTA_BREWER_CUP_TIE_FORMAT,
|
|
55616
55675
|
[USTA_OZAKI_CUP]: USTA_OZAKI_CUP_TIE_FORMAT,
|
|
55617
55676
|
[USTA_COLLEGE]: USTA_COLLEGE_TIE_FORMAT,
|
|
@@ -55628,7 +55687,7 @@ const tieFormatDefaults = (params) => {
|
|
|
55628
55687
|
const namedFormat = params?.namedFormat && Object.keys(namedFormats).includes(params.namedFormat) ? params.namedFormat : STANDARD;
|
|
55629
55688
|
const uuids = Array.isArray(params?.uuids) ? params?.uuids : [];
|
|
55630
55689
|
let tieFormat;
|
|
55631
|
-
const { category, gender } = params?.event
|
|
55690
|
+
const { category, gender } = params?.event ?? {};
|
|
55632
55691
|
const template = makeDeepCopy(namedFormats[namedFormat], false, true);
|
|
55633
55692
|
if (!template.hydrate) {
|
|
55634
55693
|
template.collectionDefinitions.forEach(
|
|
@@ -55642,14 +55701,14 @@ const tieFormatDefaults = (params) => {
|
|
|
55642
55701
|
},
|
|
55643
55702
|
collectionDefinitions: [
|
|
55644
55703
|
{
|
|
55645
|
-
collectionId: uuids?.pop()
|
|
55704
|
+
collectionId: uuids?.pop() ?? UUID(),
|
|
55646
55705
|
matchUpFormat: FORMAT_ATP_DOUBLES,
|
|
55647
55706
|
matchUpType: TypeEnum.Doubles,
|
|
55648
55707
|
collectionName: "Doubles",
|
|
55649
55708
|
...template.doubles
|
|
55650
55709
|
},
|
|
55651
55710
|
{
|
|
55652
|
-
collectionId: uuids?.pop()
|
|
55711
|
+
collectionId: uuids?.pop() ?? UUID(),
|
|
55653
55712
|
matchUpType: TypeEnum.Singles,
|
|
55654
55713
|
matchUpFormat: FORMAT_STANDARD,
|
|
55655
55714
|
collectionName: "Singles",
|