tods-competition-factory 1.8.2 → 1.8.4

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.
@@ -498,6 +498,9 @@ function addNotice(notice) {
498
498
  function getTournamentId() {
499
499
  return _globalStateProvider.getTournamentId();
500
500
  }
501
+ function getProvider() {
502
+ return _globalStateProvider;
503
+ }
501
504
 
502
505
  const validDateString = /^[\d]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][\d]|3[0-1])$/;
503
506
  const validTimeString = /^((0[\d]|1[\d]|2[0-3]):[0-5][\d](:[0-5][\d])?)([.,][0-9]{3})?$/;
@@ -629,6 +632,13 @@ function sameDay(date1, date2) {
629
632
  }
630
633
 
631
634
  function makeDeepCopy(sourceObject, convertExtensions, internalUse, removeExtensions, iteration = 0) {
635
+ if (getProvider().makeDeepCopy)
636
+ return getProvider().makeDeepCopy(
637
+ sourceObject,
638
+ convertExtensions,
639
+ internalUse,
640
+ removeExtensions
641
+ );
632
642
  const deepCopy = deepCopyEnabled();
633
643
  const { stringify, toJSON, ignore, modulate } = deepCopy || {};
634
644
  if (!deepCopy?.enabled && !internalUse || typeof sourceObject !== "object" || typeof sourceObject === "function" || sourceObject === null || typeof deepCopy?.threshold === "number" && iteration >= deepCopy.threshold) {
@@ -1363,20 +1373,20 @@ const ROUND_ROBIN_WITH_PLAYOFF = "ROUND_ROBIN_WITH_PLAYOFF";
1363
1373
  const DECIDER = "DECIDER";
1364
1374
  const BACKDRAW = "BACKDRAW";
1365
1375
  const COMPASS_ATTRIBUTES = {
1366
- 0: { name: "EAST", abbreviation: "E" },
1367
- "0-1": { name: "WEST", abbreviation: "W" },
1368
- "0-2": { name: "NORTH", abbreviation: "N" },
1369
- "0-3": { name: "NORTHEAST", abbreviation: "NE" },
1370
- "0-1-1": { name: "SOUTH", abbreviation: "S" },
1371
- "0-1-2": { name: "SOUTHWEST", abbreviation: "SW" },
1372
- "0-2-1": { name: "NORTHWEST", abbreviation: "NW" },
1373
- "0-1-1-1": { name: "SOUTHEAST", abbreviation: "SE" }
1376
+ 0: { name: "East", abbreviation: "E" },
1377
+ "0-1": { name: "West", abbreviation: "W" },
1378
+ "0-2": { name: "North", abbreviation: "N" },
1379
+ "0-3": { name: "Northeast", abbreviation: "NE" },
1380
+ "0-1-1": { name: "South", abbreviation: "S" },
1381
+ "0-1-2": { name: "Southwest", abbreviation: "SW" },
1382
+ "0-2-1": { name: "Northwest", abbreviation: "NW" },
1383
+ "0-1-1-1": { name: "Southeast", abbreviation: "SE" }
1374
1384
  };
1375
1385
  const OLYMPIC_ATTRIBUTES = {
1376
- 0: { name: "EAST", abbreviation: "E" },
1377
- "0-1": { name: "WEST", abbreviation: "W" },
1378
- "0-2": { name: "NORTH", abbreviation: "N" },
1379
- "0-1-1": { name: "SOUTH", abbreviation: "S" }
1386
+ 0: { name: "East", abbreviation: "E" },
1387
+ "0-1": { name: "West", abbreviation: "W" },
1388
+ "0-2": { name: "North", abbreviation: "N" },
1389
+ "0-1-1": { name: "South", abbreviation: "S" }
1380
1390
  };
1381
1391
  const WIN_RATIO$1 = "WIN_RATIO";
1382
1392
  const ROUND_OUTCOME = "ROUND_OUTCOME";
@@ -9205,6 +9215,8 @@ const POLICY_MATCHUP_ACTIONS_DEFAULT = {
9205
9215
  }
9206
9216
  ],
9207
9217
  participants: {
9218
+ enforceCategory: true,
9219
+ // validate collectionDefinition.category against event.category
9208
9220
  enforceGender: true
9209
9221
  // disallow placing FEMALEs in MALE events and vice versa
9210
9222
  },