tods-competition-factory 1.8.3 → 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) {
@@ -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
  },