tods-competition-factory 1.7.19 → 1.8.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.d.ts +1 -0
- package/dist/forge/generate.mjs +1067 -1124
- package/dist/forge/generate.mjs.map +1 -1
- package/dist/forge/query.d.ts +2 -2
- package/dist/forge/query.mjs +2016 -905
- package/dist/forge/query.mjs.map +1 -1
- package/dist/forge/transform.mjs +7 -19
- package/dist/forge/transform.mjs.map +1 -1
- package/dist/forge/utilities.mjs +1 -1
- package/dist/forge/utilities.mjs.map +1 -1
- package/dist/index.mjs +2724 -2680
- package/dist/index.mjs.map +1 -1
- package/dist/tods-competition-factory.development.cjs.js +3078 -3032
- 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 +1 -1
package/dist/forge/transform.mjs
CHANGED
|
@@ -9674,7 +9674,6 @@ const membershipMap = {
|
|
|
9674
9674
|
function getParticipantMap({
|
|
9675
9675
|
withIndividualParticipants,
|
|
9676
9676
|
convertExtensions,
|
|
9677
|
-
policyDefinitions,
|
|
9678
9677
|
tournamentRecord,
|
|
9679
9678
|
withSignInStatus,
|
|
9680
9679
|
withScaleValues,
|
|
@@ -9682,32 +9681,23 @@ function getParticipantMap({
|
|
|
9682
9681
|
withISO2,
|
|
9683
9682
|
withIOC
|
|
9684
9683
|
}) {
|
|
9685
|
-
const participantAttributes = policyDefinitions?.[POLICY_TYPE_PARTICIPANT];
|
|
9686
|
-
const filterAttributes = participantAttributes?.participant;
|
|
9687
9684
|
const participantMap = {};
|
|
9688
|
-
for (const participant of tournamentRecord.participants
|
|
9685
|
+
for (const participant of tournamentRecord.participants ?? []) {
|
|
9689
9686
|
const participantId = participant?.participantId;
|
|
9690
9687
|
participantId && initializeParticipantId({ participantMap, participantId });
|
|
9691
9688
|
}
|
|
9692
|
-
for (const participant of tournamentRecord.participants
|
|
9689
|
+
for (const participant of tournamentRecord.participants ?? []) {
|
|
9693
9690
|
const participantCopy = makeDeepCopy(
|
|
9694
9691
|
participant,
|
|
9695
9692
|
convertExtensions,
|
|
9696
9693
|
internalUse
|
|
9697
9694
|
);
|
|
9698
|
-
const
|
|
9699
|
-
|
|
9700
|
-
source: participantCopy
|
|
9701
|
-
}) : participantCopy;
|
|
9702
|
-
const { participantId, individualParticipantIds, participantType } = filteredParticipant;
|
|
9703
|
-
Object.assign(
|
|
9704
|
-
participantMap[participantId].participant,
|
|
9705
|
-
filteredParticipant
|
|
9706
|
-
);
|
|
9695
|
+
const { participantId, individualParticipantIds, participantType } = participantCopy;
|
|
9696
|
+
Object.assign(participantMap[participantId].participant, participantCopy);
|
|
9707
9697
|
if (individualParticipantIds) {
|
|
9708
9698
|
processIndividualParticipantIds({
|
|
9709
9699
|
individualParticipantIds,
|
|
9710
|
-
|
|
9700
|
+
participantCopy,
|
|
9711
9701
|
participantMap,
|
|
9712
9702
|
participantType,
|
|
9713
9703
|
participantId
|
|
@@ -9758,7 +9748,7 @@ function addIndividualParticipants({ participantMap }) {
|
|
|
9758
9748
|
}
|
|
9759
9749
|
function processIndividualParticipantIds({
|
|
9760
9750
|
individualParticipantIds,
|
|
9761
|
-
|
|
9751
|
+
participantCopy,
|
|
9762
9752
|
participantMap,
|
|
9763
9753
|
participantType,
|
|
9764
9754
|
participantId
|
|
@@ -9773,7 +9763,7 @@ function processIndividualParticipantIds({
|
|
|
9773
9763
|
participantName,
|
|
9774
9764
|
participantId: participantId2,
|
|
9775
9765
|
teamId
|
|
9776
|
-
} =
|
|
9766
|
+
} = participantCopy;
|
|
9777
9767
|
const membership = membershipMap[participantType];
|
|
9778
9768
|
individualParticipant[membership].push({
|
|
9779
9769
|
participantRoleResponsibilities,
|
|
@@ -9836,7 +9826,6 @@ function initializeParticipantId({ participantMap, participantId }) {
|
|
|
9836
9826
|
function hydrateParticipants({
|
|
9837
9827
|
participantsProfile,
|
|
9838
9828
|
useParticipantMap,
|
|
9839
|
-
policyDefinitions,
|
|
9840
9829
|
tournamentRecord,
|
|
9841
9830
|
contextProfile,
|
|
9842
9831
|
inContext
|
|
@@ -9845,7 +9834,6 @@ function hydrateParticipants({
|
|
|
9845
9834
|
const participantMap = getParticipantMap({
|
|
9846
9835
|
...participantsProfile,
|
|
9847
9836
|
...contextProfile,
|
|
9848
|
-
policyDefinitions,
|
|
9849
9837
|
tournamentRecord
|
|
9850
9838
|
})?.participantMap;
|
|
9851
9839
|
return { participantMap };
|