tods-competition-factory 1.8.19 → 1.8.20

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.
@@ -1825,6 +1825,8 @@ declare function generateSeedingScaleItems({ scaleAttributes, scaledEntries, sta
1825
1825
  };
1826
1826
 
1827
1827
  type MatchUpActionsArgs$1 = TournamentRecordsArgs & {
1828
+ policyDefinitions?: PolicyDefinitions;
1829
+ enforceGender?: boolean;
1828
1830
  participantId: string;
1829
1831
  tournamentId: string;
1830
1832
  sideNumber?: number;
@@ -1948,13 +1950,14 @@ type MatchUpActionsArgs = {
1948
1950
  policyDefinitions?: PolicyDefinitions;
1949
1951
  drawDefinition?: DrawDefinition;
1950
1952
  tournamentRecord: Tournament;
1953
+ enforceGender?: boolean;
1951
1954
  participantId?: string;
1952
1955
  sideNumber?: number;
1953
1956
  matchUpId: string;
1954
1957
  drawId?: string;
1955
1958
  event?: Event;
1956
1959
  };
1957
- declare function matchUpActions({ policyDefinitions, tournamentRecord, drawDefinition, participantId, sideNumber, matchUpId, drawId, event, }: MatchUpActionsArgs): (ResultType & {
1960
+ declare function matchUpActions({ policyDefinitions, tournamentRecord, drawDefinition, enforceGender, participantId, sideNumber, matchUpId, drawId, event, }: MatchUpActionsArgs): (ResultType & {
1958
1961
  structureIsComplete?: boolean | undefined;
1959
1962
  isDoubleExit?: boolean | undefined;
1960
1963
  isByeMatchUp?: boolean | undefined;
@@ -2074,6 +2077,7 @@ declare function getParticipantScaleItem({ tournamentRecords, policyDefinitions,
2074
2077
  };
2075
2078
 
2076
2079
  type PositionActionsArgs = {
2080
+ restrictAdHocRoundParticipants?: boolean;
2077
2081
  policyDefinitions?: PolicyDefinitions;
2078
2082
  provisionalPositioning?: boolean;
2079
2083
  returnParticipants?: boolean;
@@ -9466,6 +9466,7 @@ function matchUpActions$2({
9466
9466
  inContextDrawMatchUps,
9467
9467
  tournamentRecord,
9468
9468
  drawDefinition,
9469
+ enforceGender,
9469
9470
  participantId,
9470
9471
  matchUpsMap,
9471
9472
  sideNumber,
@@ -9497,8 +9498,8 @@ function matchUpActions$2({
9497
9498
  event
9498
9499
  }).appliedPolicies ?? {};
9499
9500
  Object.assign(appliedPolicies, specifiedPolicyDefinitions ?? {});
9500
- const isAdHocMatchUp = isAdHoc({ drawDefinition, structure });
9501
9501
  const matchUpActionsPolicy = appliedPolicies?.[POLICY_TYPE_MATCHUP_ACTIONS] ?? POLICY_MATCHUP_ACTIONS_DEFAULT[POLICY_TYPE_MATCHUP_ACTIONS];
9502
+ const isAdHocMatchUp = isAdHoc({ drawDefinition, structure });
9502
9503
  const { enabledStructures } = getEnabledStructures({
9503
9504
  actionType: MATCHUP_ACTION,
9504
9505
  appliedPolicies,
@@ -9712,7 +9713,8 @@ function matchUpActions$2({
9712
9713
  );
9713
9714
  const assignedGender = inContextMatchUp.gender === MIXED && inContextMatchUp.sideNumber && inContextMatchUp.sides?.filter((side2) => side2.particiapntId).length === 1 && firstFoundSide?.participant?.person?.sex;
9714
9715
  const matchUpType = inContextMatchUp.matchUpType;
9715
- const gender = matchUpActionsPolicy?.participants?.enforceGender ? inContextMatchUp.gender : void 0;
9716
+ const genderEnforced = (enforceGender ?? matchUpActionsPolicy?.participants?.enforceGender) !== false;
9717
+ const gender = genderEnforced ? inContextMatchUp.gender : void 0;
9716
9718
  const allParticipants = inContextMatchUp.sides?.flatMap(
9717
9719
  (side2) => side2.participant?.individualParticipants || side2.participant
9718
9720
  ).filter(Boolean);
@@ -9842,6 +9844,7 @@ function matchUpActions$1({
9842
9844
  policyDefinitions,
9843
9845
  tournamentRecord,
9844
9846
  drawDefinition,
9847
+ enforceGender,
9845
9848
  participantId,
9846
9849
  sideNumber,
9847
9850
  matchUpId,
@@ -9876,6 +9879,7 @@ function matchUpActions$1({
9876
9879
  tournamentParticipants: tournamentRecord.participants,
9877
9880
  policyDefinitions,
9878
9881
  drawDefinition,
9882
+ enforceGender,
9879
9883
  participantId,
9880
9884
  sideNumber,
9881
9885
  matchUpId,
@@ -9889,6 +9893,8 @@ function matchUpActions$1({
9889
9893
  function matchUpActions(params) {
9890
9894
  const {
9891
9895
  tournamentRecords,
9896
+ policyDefinitions,
9897
+ enforceGender,
9892
9898
  participantId,
9893
9899
  tournamentId,
9894
9900
  sideNumber,
@@ -9910,7 +9916,9 @@ function matchUpActions(params) {
9910
9916
  return result;
9911
9917
  return matchUpActions$1({
9912
9918
  drawDefinition: result.drawDefinition,
9919
+ policyDefinitions,
9913
9920
  tournamentRecord,
9921
+ enforceGender,
9914
9922
  participantId,
9915
9923
  sideNumber,
9916
9924
  matchUpId,