tods-competition-factory 1.9.0 → 1.9.1

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.
@@ -750,6 +750,11 @@ const extractAttributes = (accessor) => (element) => !accessor || typeof element
750
750
  })) || typeof accessor === "object" && Object.keys(accessor).map((key) => ({
751
751
  [key]: getAccessorValue({ element, accessor: key })?.value
752
752
  })) || (typeof accessor === "string" && getAccessorValue({ element, accessor }))?.value;
753
+ function getDefinedKeys(obj, ignoreValues, ignoreEmptyArrays) {
754
+ return Object.keys(obj).filter(
755
+ (key) => !ignoreValues.includes(obj[key]) && (!ignoreEmptyArrays || (Array.isArray(obj[key]) ? obj[key].length : true))
756
+ );
757
+ }
753
758
  function definedAttributes(obj, ignoreFalse, ignoreEmptyArrays, shallow) {
754
759
  if (typeof obj !== "object" || obj === null)
755
760
  return obj;
@@ -759,9 +764,7 @@ function definedAttributes(obj, ignoreFalse, ignoreEmptyArrays, shallow) {
759
764
  const ignoreValues = ["", void 0, null];
760
765
  if (ignoreFalse)
761
766
  ignoreValues.push(false);
762
- const definedKeys = Object.keys(obj).filter(
763
- (key) => !ignoreValues.includes(obj[key]) && (!ignoreEmptyArrays || (Array.isArray(obj[key]) ? obj[key].length : true))
764
- );
767
+ const definedKeys = getDefinedKeys(obj, ignoreValues, ignoreEmptyArrays);
765
768
  return Object.assign(
766
769
  {},
767
770
  ...definedKeys.map((key) => {
@@ -14646,12 +14649,12 @@ function positionActions$1(params) {
14646
14649
  const isActiveDrawPosition = activeDrawPositions.includes(drawPosition);
14647
14650
  if (actionsDisabled)
14648
14651
  return {
14652
+ hasPositionAssigned: !!positionAssignment,
14649
14653
  info: "Actions Disabled for structure",
14650
- isByePosition,
14651
14654
  isActiveDrawPosition,
14652
14655
  isDrawPosition: true,
14653
- hasPositionAssigned: !!positionAssignment,
14654
- validActions: []
14656
+ validActions: [],
14657
+ isByePosition
14655
14658
  };
14656
14659
  if (isAvailableAction({ policyActions, action: ASSIGN_PARTICIPANT }) && !isActiveDrawPosition && positionAssignments && !disablePlacementActions && (!positionAssignment || isByePosition)) {
14657
14660
  const { validAssignmentActions } = getValidAssignmentActions({