tods-competition-factory 1.8.37 → 1.8.39

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.
@@ -18360,7 +18360,7 @@ function getEventSeedAssignments({
18360
18360
  }
18361
18361
 
18362
18362
  function processEventEntry({
18363
- extensionConversions,
18363
+ convertExtensions,
18364
18364
  seedAssignments,
18365
18365
  participant,
18366
18366
  withSeeding,
@@ -18370,10 +18370,8 @@ function processEventEntry({
18370
18370
  entry
18371
18371
  }) {
18372
18372
  const { entryStatus, entryStage, entryPosition, extensions } = entry;
18373
- const entryExtensions = extensions?.length ? Object.assign({}, ...extensionsToAttributes(extensions)) : {};
18373
+ const entryExtensions = extensions?.length && convertExtensions ? Object.assign({}, ...extensionsToAttributes(extensions)) : {};
18374
18374
  const attributes = Object.assign(entryExtensions, {
18375
- ...extensionConversions,
18376
- // this should be deprecated and clients should use derivedEventInfo
18377
18375
  entryPosition,
18378
18376
  entryStatus,
18379
18377
  entryStage,
@@ -18839,7 +18837,7 @@ function getParticipantEntries(params) {
18839
18837
  return;
18840
18838
  const participant = participantMap[id];
18841
18839
  processEventEntry({
18842
- extensionConversions,
18840
+ convertExtensions,
18843
18841
  seedAssignments,
18844
18842
  participant,
18845
18843
  withSeeding,
@@ -23615,7 +23613,11 @@ function generateDrawDefinition(params) {
23615
23613
  tournamentRecord,
23616
23614
  event
23617
23615
  }).appliedPolicies ?? {};
23618
- const policyDefinitions = params.policyDefinitions ?? {};
23616
+ const policyDefinitions = makeDeepCopy(
23617
+ params.policyDefinitions ?? {},
23618
+ false,
23619
+ true
23620
+ );
23619
23621
  const drawTypeCoercion = params.drawTypeCoercion ?? policyDefinitions?.[POLICY_TYPE_DRAWS]?.drawTypeCoercion ?? appliedPolicies?.[POLICY_TYPE_DRAWS]?.drawTypeCoercion ?? true;
23620
23622
  const drawType = drawTypeCoercion && params.drawSize === 2 && DrawTypeEnum.SingleElimination || params.drawType || DrawTypeEnum.SingleElimination;
23621
23623
  const seedingPolicy = policyDefinitions?.[POLICY_TYPE_SEEDING] ?? appliedPolicies?.[POLICY_TYPE_SEEDING];