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.
@@ -362,7 +362,7 @@ var matchUpFormatCode = {
362
362
  };
363
363
 
364
364
  function factoryVersion() {
365
- return '1.7.17';
365
+ return '1.7.18';
366
366
  }
367
367
 
368
368
  /******************************************************************************
@@ -15075,7 +15075,7 @@ var ratingsParameters = (_a$g = {},
15075
15075
  },
15076
15076
  _a$g);
15077
15077
 
15078
- var collectionDefinitions$i = [
15078
+ var collectionDefinitions$j = [
15079
15079
  {
15080
15080
  collectionName: "Doubles",
15081
15081
  matchUpCount: 3,
@@ -15091,17 +15091,17 @@ var collectionDefinitions$i = [
15091
15091
  matchUpValue: 1
15092
15092
  }
15093
15093
  ];
15094
- var tieFormatName$i = "COLLEGE_D3";
15095
- var winCriteria$i = {
15094
+ var tieFormatName$j = "COLLEGE_D3";
15095
+ var winCriteria$j = {
15096
15096
  valueGoal: 5
15097
15097
  };
15098
15098
  var COLLEGE_D3$1 = {
15099
- collectionDefinitions: collectionDefinitions$i,
15100
- tieFormatName: tieFormatName$i,
15101
- winCriteria: winCriteria$i
15099
+ collectionDefinitions: collectionDefinitions$j,
15100
+ tieFormatName: tieFormatName$j,
15101
+ winCriteria: winCriteria$j
15102
15102
  };
15103
15103
 
15104
- var collectionDefinitions$h = [
15104
+ var collectionDefinitions$i = [
15105
15105
  {
15106
15106
  collectionName: "Doubles",
15107
15107
  collectionValue: 1,
@@ -15117,17 +15117,17 @@ var collectionDefinitions$h = [
15117
15117
  matchUpValue: 1
15118
15118
  }
15119
15119
  ];
15120
- var tieFormatName$h = "COLLEGE_DEFAULT";
15121
- var winCriteria$h = {
15120
+ var tieFormatName$i = "COLLEGE_DEFAULT";
15121
+ var winCriteria$i = {
15122
15122
  valueGoal: 5
15123
15123
  };
15124
15124
  var COLLEGE_DEFAULT$1 = {
15125
- collectionDefinitions: collectionDefinitions$h,
15126
- tieFormatName: tieFormatName$h,
15127
- winCriteria: winCriteria$h
15125
+ collectionDefinitions: collectionDefinitions$i,
15126
+ tieFormatName: tieFormatName$i,
15127
+ winCriteria: winCriteria$i
15128
15128
  };
15129
15129
 
15130
- var collectionDefinitions$g = [
15130
+ var collectionDefinitions$h = [
15131
15131
  {
15132
15132
  collectionName: "Doubles",
15133
15133
  matchUpCount: 3,
@@ -15143,17 +15143,17 @@ var collectionDefinitions$g = [
15143
15143
  matchUpValue: 1
15144
15144
  }
15145
15145
  ];
15146
- var tieFormatName$g = "COLLEGE_JUCO";
15147
- var winCriteria$g = {
15146
+ var tieFormatName$h = "COLLEGE_JUCO";
15147
+ var winCriteria$h = {
15148
15148
  valueGoal: 5
15149
15149
  };
15150
15150
  var COLLEGE_JUCO$1 = {
15151
- collectionDefinitions: collectionDefinitions$g,
15152
- tieFormatName: tieFormatName$g,
15153
- winCriteria: winCriteria$g
15151
+ collectionDefinitions: collectionDefinitions$h,
15152
+ tieFormatName: tieFormatName$h,
15153
+ winCriteria: winCriteria$h
15154
15154
  };
15155
15155
 
15156
- var collectionDefinitions$f = [
15156
+ var collectionDefinitions$g = [
15157
15157
  {
15158
15158
  collectionName: "Doubles",
15159
15159
  matchUpCount: 1,
@@ -15169,17 +15169,17 @@ var collectionDefinitions$f = [
15169
15169
  matchUpValue: 1
15170
15170
  }
15171
15171
  ];
15172
- var tieFormatName$f = "DOMINANT_DUO";
15173
- var winCriteria$f = {
15172
+ var tieFormatName$g = "DOMINANT_DUO";
15173
+ var winCriteria$g = {
15174
15174
  valueGoal: 2
15175
15175
  };
15176
15176
  var DOMINANT_DUO_TIE_FORMAT = {
15177
- collectionDefinitions: collectionDefinitions$f,
15178
- tieFormatName: tieFormatName$f,
15179
- winCriteria: winCriteria$f
15177
+ collectionDefinitions: collectionDefinitions$g,
15178
+ tieFormatName: tieFormatName$g,
15179
+ winCriteria: winCriteria$g
15180
15180
  };
15181
15181
 
15182
- var collectionDefinitions$e = [
15182
+ var collectionDefinitions$f = [
15183
15183
  {
15184
15184
  collectionName: "Mixed Doubles",
15185
15185
  gender: "MIXED",
@@ -15205,17 +15205,17 @@ var collectionDefinitions$e = [
15205
15205
  matchUpValue: 1
15206
15206
  }
15207
15207
  ];
15208
- var tieFormatName$e = "DOMINANT_DUO_MIXED";
15209
- var winCriteria$e = {
15208
+ var tieFormatName$f = "DOMINANT_DUO_MIXED";
15209
+ var winCriteria$f = {
15210
15210
  valueGoal: 2
15211
15211
  };
15212
15212
  var DOMINANT_DUO_MIXED_TIE_FORMAT = {
15213
- collectionDefinitions: collectionDefinitions$e,
15214
- tieFormatName: tieFormatName$e,
15215
- winCriteria: winCriteria$e
15213
+ collectionDefinitions: collectionDefinitions$f,
15214
+ tieFormatName: tieFormatName$f,
15215
+ winCriteria: winCriteria$f
15216
15216
  };
15217
15217
 
15218
- var collectionDefinitions$d = [
15218
+ var collectionDefinitions$e = [
15219
15219
  {
15220
15220
  collectionGroupNumber: 1,
15221
15221
  matchUpType: "DOUBLES",
@@ -15273,18 +15273,18 @@ var collectionGroups$1 = [
15273
15273
  groupName: "Day 3"
15274
15274
  }
15275
15275
  ];
15276
- var tieFormatName$d = "LAVER_CUP";
15277
- var winCriteria$d = {
15276
+ var tieFormatName$e = "LAVER_CUP";
15277
+ var winCriteria$e = {
15278
15278
  valueGoal: 13
15279
15279
  };
15280
15280
  var LAVER_CUP_TIE_FORMAT = {
15281
- collectionDefinitions: collectionDefinitions$d,
15281
+ collectionDefinitions: collectionDefinitions$e,
15282
15282
  collectionGroups: collectionGroups$1,
15283
- tieFormatName: tieFormatName$d,
15284
- winCriteria: winCriteria$d
15283
+ tieFormatName: tieFormatName$e,
15284
+ winCriteria: winCriteria$e
15285
15285
  };
15286
15286
 
15287
- var collectionDefinitions$c = [
15287
+ var collectionDefinitions$d = [
15288
15288
  {
15289
15289
  collectionName: "Round 1",
15290
15290
  matchUpCount: 3,
@@ -15307,19 +15307,19 @@ var collectionDefinitions$c = [
15307
15307
  scoreValue: 1
15308
15308
  }
15309
15309
  ];
15310
- var tieFormatName$c = "Doubles Shuffle";
15310
+ var tieFormatName$d = "Doubles Shuffle";
15311
15311
  var unrestrictedSelections = true;
15312
- var winCriteria$c = {
15312
+ var winCriteria$d = {
15313
15313
  aggregateValue: true
15314
15314
  };
15315
15315
  var TEAM_AGGREGATION_TIE_FORMAT = {
15316
- collectionDefinitions: collectionDefinitions$c,
15317
- tieFormatName: tieFormatName$c,
15316
+ collectionDefinitions: collectionDefinitions$d,
15317
+ tieFormatName: tieFormatName$d,
15318
15318
  unrestrictedSelections: unrestrictedSelections,
15319
- winCriteria: winCriteria$c
15319
+ winCriteria: winCriteria$d
15320
15320
  };
15321
15321
 
15322
- var collectionDefinitions$b = [
15322
+ var collectionDefinitions$c = [
15323
15323
  {
15324
15324
  scoreValue: 1,
15325
15325
  matchUpType: "SINGLES",
@@ -15361,11 +15361,47 @@ var collectionDefinitions$b = [
15361
15361
  matchUpCount: 1
15362
15362
  }
15363
15363
  ];
15364
- var tieFormatName$b = "Time Tennis";
15364
+ var tieFormatName$c = "Time Tennis Dual";
15365
+ var winCriteria$c = {
15366
+ aggregateValue: true
15367
+ };
15368
+ var TIME_TENNIS_DUAL_TIE_FORMAT = {
15369
+ collectionDefinitions: collectionDefinitions$c,
15370
+ tieFormatName: tieFormatName$c,
15371
+ winCriteria: winCriteria$c
15372
+ };
15373
+
15374
+ var collectionDefinitions$b = [
15375
+ {
15376
+ scoreValue: 1,
15377
+ matchUpType: "SINGLES",
15378
+ collectionName: "Men's Singles",
15379
+ matchUpFormat: "SET1-S:T60",
15380
+ gender: "MALE",
15381
+ matchUpCount: 1
15382
+ },
15383
+ {
15384
+ scoreValue: 1,
15385
+ matchUpType: "SINGLES",
15386
+ collectionName: "Women's Singles",
15387
+ matchUpFormat: "SET1-S:T60",
15388
+ gender: "FEMALE",
15389
+ matchUpCount: 1
15390
+ },
15391
+ {
15392
+ matchUpValue: 1,
15393
+ matchUpType: "DOUBLES",
15394
+ collectionName: "Mixed Doubles",
15395
+ matchUpFormat: "SET1-S:T60",
15396
+ gender: "MIXED",
15397
+ matchUpCount: 1
15398
+ }
15399
+ ];
15400
+ var tieFormatName$b = "Time Tennis Pro Circuit";
15365
15401
  var winCriteria$b = {
15366
15402
  aggregateValue: true
15367
15403
  };
15368
- var TIME_TENNIS_TIE_FORMAT = {
15404
+ var TIME_TENNIS_PRO_TIE_FORMAT = {
15369
15405
  collectionDefinitions: collectionDefinitions$b,
15370
15406
  tieFormatName: tieFormatName$b,
15371
15407
  winCriteria: winCriteria$b
@@ -16145,7 +16181,8 @@ var tieFormats = {
16145
16181
  DOMINANT_DUO_MIXED: DOMINANT_DUO_MIXED_TIE_FORMAT,
16146
16182
  LAVER_CUP: LAVER_CUP_TIE_FORMAT,
16147
16183
  TEAM_DOUBLES_3_AGGREGATION: TEAM_AGGREGATION_TIE_FORMAT,
16148
- TIME_TENNIS: TIME_TENNIS_TIE_FORMAT,
16184
+ TIME_TENNIS_DUAL: TIME_TENNIS_DUAL_TIE_FORMAT,
16185
+ TIME_TENNIS_PRO_CIRCUIT: TIME_TENNIS_PRO_TIE_FORMAT,
16149
16186
  USTA_BREWER_CUP: USTA_BREWER_CUP_TIE_FORMAT,
16150
16187
  USTA_OZAKI_CUP: USTA_OZAKI_CUP_TIE_FORMAT,
16151
16188
  USTA_COLLEGE: USTA_COLLEGE_TIE_FORMAT,
@@ -17113,6 +17150,9 @@ function initializeParticipantId(_a) {
17113
17150
  groupParticipantIds: [],
17114
17151
  pairParticipantIds: [],
17115
17152
  teamParticipantIds: [],
17153
+ seedings: {},
17154
+ rankings: {},
17155
+ ratings: {},
17116
17156
  groups: [],
17117
17157
  teams: [],
17118
17158
  },
@@ -31169,6 +31209,23 @@ function getParticipantEntries(params) {
31169
31209
  seedAssignments[MAIN] = mainSeeding;
31170
31210
  if (seedAssignments && qualifyingSeeding)
31171
31211
  seedAssignments[QUALIFYING] = mainSeeding;
31212
+ var seedValue = mainSeeding || qualifyingSeeding;
31213
+ if (seedValue) {
31214
+ if (!participantMap[id].participant.seedings[eventType])
31215
+ participantMap[id].participant.seedings[eventType] = [];
31216
+ participantMap[id].participant.seedings[eventType].push({
31217
+ scaleValue: seedValue,
31218
+ scaleName: drawId,
31219
+ });
31220
+ if (seedAssignments) {
31221
+ if (!participantMap[id].events[eventId].seedAssignments)
31222
+ participantMap[id].events[eventId].seedAssignments = {};
31223
+ Object.keys(seedAssignments).forEach(function (stage) {
31224
+ return (participantMap[id].events[eventId].seedAssignments[stage] =
31225
+ seedAssignments[stage]);
31226
+ });
31227
+ }
31228
+ }
31172
31229
  if ((withEvents || withRankingProfile) &&
31173
31230
  participantMap[id] &&
31174
31231
  eventId) {
@@ -31176,8 +31233,7 @@ function getParticipantEntries(params) {
31176
31233
  participantMap[id].events[eventId] = {};
31177
31234
  if (includeSeeding) {
31178
31235
  // overwrite any event seeding with actual draw seeding (which may differ)
31179
- participantMap[id].events[eventId].seedValue =
31180
- mainSeeding || qualifyingSeeding;
31236
+ participantMap[id].events[eventId].seedValue = seedValue;
31181
31237
  }
31182
31238
  else if (participantMap[id].events[eventId].seedValue) {
31183
31239
  // if seeding for specific drawIds is NOT published, remove from event
@@ -60161,7 +60217,8 @@ var DOMINANT_DUO = 'DOMINANT_DUO';
60161
60217
  var DOMINANT_DUO_MIXED = 'DOMINANT_DUO_MIXED';
60162
60218
  var LAVER_CUP = 'LAVER_CUP';
60163
60219
  var TEAM_DOUBLES_3_AGGREGATION = 'TEAM_DOUBLES_3_AGGREGATION';
60164
- var TIME_TENNIS = 'TIME_TENNIS';
60220
+ var TIME_TENNIS_DUAL = 'TIME_TENNIS_DUAL';
60221
+ var TIME_TENNIS_PRO_CIRCUIT = 'TIME_TENNIS_PRO_CIRCUIT';
60165
60222
  var USTA_BREWER_CUP = 'USTA_BREWER_CUP';
60166
60223
  var USTA_OZAKI_CUP = 'USTA_OZAKI_CUP';
60167
60224
  var USTA_COLLEGE = 'USTA_COLLEGE';
@@ -60181,7 +60238,8 @@ var tieFormatConstants = {
60181
60238
  DOMINANT_DUO_MIXED: DOMINANT_DUO_MIXED,
60182
60239
  LAVER_CUP: LAVER_CUP,
60183
60240
  TEAM_DOUBLES_3_AGGREGATION: TEAM_DOUBLES_3_AGGREGATION,
60184
- TIME_TENNIS: TIME_TENNIS,
60241
+ TIME_TENNIS_DUAL: TIME_TENNIS_DUAL,
60242
+ TIME_TENNIS_PRO_CIRCUIT: TIME_TENNIS_PRO_CIRCUIT,
60185
60243
  USTA_BREWER_CUP: USTA_BREWER_CUP,
60186
60244
  USTA_OZAKI_CUP: USTA_OZAKI_CUP,
60187
60245
  USTA_COLLEGE: USTA_COLLEGE,
@@ -60253,7 +60311,8 @@ var namedFormats = (_a = {},
60253
60311
  _a[DOMINANT_DUO] = DOMINANT_DUO_TIE_FORMAT,
60254
60312
  _a[DOMINANT_DUO_MIXED] = DOMINANT_DUO_MIXED_TIE_FORMAT,
60255
60313
  _a[TEAM_DOUBLES_3_AGGREGATION] = TEAM_AGGREGATION_TIE_FORMAT,
60256
- _a[TIME_TENNIS] = TIME_TENNIS_TIE_FORMAT,
60314
+ _a[TIME_TENNIS_DUAL] = TIME_TENNIS_DUAL_TIE_FORMAT,
60315
+ _a[TIME_TENNIS_PRO_CIRCUIT] = TIME_TENNIS_PRO_TIE_FORMAT,
60257
60316
  _a[USTA_BREWER_CUP] = USTA_BREWER_CUP_TIE_FORMAT,
60258
60317
  _a[USTA_OZAKI_CUP] = USTA_OZAKI_CUP_TIE_FORMAT,
60259
60318
  _a[USTA_COLLEGE] = USTA_COLLEGE_TIE_FORMAT,
@@ -60267,13 +60326,14 @@ var namedFormats = (_a = {},
60267
60326
  _a[USTA_ZONAL] = USTA_ZONAL_TIE_FORMAT,
60268
60327
  _a);
60269
60328
  var tieFormatDefaults = function (params) {
60329
+ var _a, _b, _c;
60270
60330
  var namedFormat = (params === null || params === void 0 ? void 0 : params.namedFormat) &&
60271
60331
  Object.keys(namedFormats).includes(params.namedFormat)
60272
60332
  ? params.namedFormat
60273
60333
  : STANDARD;
60274
60334
  var uuids = Array.isArray(params === null || params === void 0 ? void 0 : params.uuids) ? params === null || params === void 0 ? void 0 : params.uuids : [];
60275
60335
  var tieFormat;
60276
- var _a = (params === null || params === void 0 ? void 0 : params.event) || {}, category = _a.category, gender = _a.gender;
60336
+ var _d = (_a = params === null || params === void 0 ? void 0 : params.event) !== null && _a !== void 0 ? _a : {}, category = _d.category, gender = _d.gender;
60277
60337
  var template = makeDeepCopy(namedFormats[namedFormat], false, true);
60278
60338
  if (!template.hydrate) {
60279
60339
  template.collectionDefinitions.forEach(function (collectionDefinition) { return (collectionDefinition.collectionId = UUID()); });
@@ -60285,8 +60345,8 @@ var tieFormatDefaults = function (params) {
60285
60345
  valueGoal: template.valueGoal,
60286
60346
  },
60287
60347
  collectionDefinitions: [
60288
- __assign({ collectionId: (uuids === null || uuids === void 0 ? void 0 : uuids.pop()) || UUID(), matchUpFormat: FORMAT_ATP_DOUBLES, matchUpType: TypeEnum.Doubles, collectionName: 'Doubles' }, template.doubles),
60289
- __assign({ collectionId: (uuids === null || uuids === void 0 ? void 0 : uuids.pop()) || UUID(), matchUpType: TypeEnum.Singles, matchUpFormat: FORMAT_STANDARD, collectionName: 'Singles' }, template.singles),
60348
+ __assign({ collectionId: (_b = uuids === null || uuids === void 0 ? void 0 : uuids.pop()) !== null && _b !== void 0 ? _b : UUID(), matchUpFormat: FORMAT_ATP_DOUBLES, matchUpType: TypeEnum.Doubles, collectionName: 'Doubles' }, template.doubles),
60349
+ __assign({ collectionId: (_c = uuids === null || uuids === void 0 ? void 0 : uuids.pop()) !== null && _c !== void 0 ? _c : UUID(), matchUpType: TypeEnum.Singles, matchUpFormat: FORMAT_STANDARD, collectionName: 'Singles' }, template.singles),
60290
60350
  ],
60291
60351
  };
60292
60352
  if (template.tieFormatName)