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.
- package/dist/forge/generate.mjs +19 -5
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.mjs +9 -6
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +12 -13
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/forge/utilities.mjs +6 -3
- package/dist/forge/utilities.mjs.map +1 -1
- package/dist/index.mjs +29 -19
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +38 -23
- package/dist/tods-competition-factory.development.cjs.js.map +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js +1 -1
- package/dist/tods-competition-factory.production.cjs.min.js.map +1 -1
- package/package.json +4 -4
package/dist/forge/transform.mjs
CHANGED
|
@@ -918,6 +918,11 @@ const extractAttributes = (accessor) => (element) => !accessor || typeof element
|
|
|
918
918
|
})) || typeof accessor === "object" && Object.keys(accessor).map((key) => ({
|
|
919
919
|
[key]: getAccessorValue({ element, accessor: key })?.value
|
|
920
920
|
})) || (typeof accessor === "string" && getAccessorValue({ element, accessor }))?.value;
|
|
921
|
+
function getDefinedKeys(obj, ignoreValues, ignoreEmptyArrays) {
|
|
922
|
+
return Object.keys(obj).filter(
|
|
923
|
+
(key) => !ignoreValues.includes(obj[key]) && (!ignoreEmptyArrays || (Array.isArray(obj[key]) ? obj[key].length : true))
|
|
924
|
+
);
|
|
925
|
+
}
|
|
921
926
|
function definedAttributes(obj, ignoreFalse, ignoreEmptyArrays, shallow) {
|
|
922
927
|
if (typeof obj !== "object" || obj === null)
|
|
923
928
|
return obj;
|
|
@@ -927,9 +932,7 @@ function definedAttributes(obj, ignoreFalse, ignoreEmptyArrays, shallow) {
|
|
|
927
932
|
const ignoreValues = ["", void 0, null];
|
|
928
933
|
if (ignoreFalse)
|
|
929
934
|
ignoreValues.push(false);
|
|
930
|
-
const definedKeys =
|
|
931
|
-
(key) => !ignoreValues.includes(obj[key]) && (!ignoreEmptyArrays || (Array.isArray(obj[key]) ? obj[key].length : true))
|
|
932
|
-
);
|
|
935
|
+
const definedKeys = getDefinedKeys(obj, ignoreValues, ignoreEmptyArrays);
|
|
933
936
|
return Object.assign(
|
|
934
937
|
{},
|
|
935
938
|
...definedKeys.map((key) => {
|
|
@@ -13049,18 +13052,14 @@ function conditionallyAdvanceDrawPosition(params) {
|
|
|
13049
13052
|
} else {
|
|
13050
13053
|
sourceSideNumber = 2;
|
|
13051
13054
|
}
|
|
13052
|
-
} else {
|
|
13053
|
-
if (targetMatchUp.
|
|
13054
|
-
|
|
13055
|
-
sourceSideNumber = 2;
|
|
13056
|
-
} else {
|
|
13057
|
-
sourceSideNumber = 1;
|
|
13058
|
-
}
|
|
13055
|
+
} else if (targetMatchUp.feedRound) {
|
|
13056
|
+
if (sourceMatchUp.structureId === targetMatchUp.structureId) {
|
|
13057
|
+
sourceSideNumber = 2;
|
|
13059
13058
|
} else {
|
|
13060
|
-
|
|
13061
|
-
sourceSideNumber = 3 - walkoverWinningSide;
|
|
13059
|
+
sourceSideNumber = 1;
|
|
13062
13060
|
}
|
|
13063
|
-
}
|
|
13061
|
+
} else if (walkoverWinningSide)
|
|
13062
|
+
sourceSideNumber = 3 - walkoverWinningSide;
|
|
13064
13063
|
}
|
|
13065
13064
|
const sourceMatchUpStatus = params.matchUpStatus;
|
|
13066
13065
|
const pairedMatchUpStatus = pairedPreviousMatchUp?.matchUpStatus;
|