tods-competition-factory 2.2.20 → 2.2.24
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/index.mjs +6 -6
- package/dist/tods-competition-factory.development.cjs.js +17 -9
- 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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function factoryVersion() {
|
|
6
|
-
return '2.2.
|
|
6
|
+
return '2.2.24';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
const SINGLES_MATCHUP = 'SINGLES';
|
|
@@ -22679,7 +22679,7 @@ function processAttribute({ disableHeadToHead, participantIds, matchUpFormat, gr
|
|
|
22679
22679
|
participantIds,
|
|
22680
22680
|
attribute,
|
|
22681
22681
|
});
|
|
22682
|
-
const report = [{ attribute, reversed, groups, idsFilter }];
|
|
22682
|
+
const report = [{ attribute, reversed, groups, idsFilter, groupTotals }];
|
|
22683
22683
|
let order;
|
|
22684
22684
|
if (Object.keys(groups).length > 1 && participantIds.length) {
|
|
22685
22685
|
const sortedTallyGroups = Object.keys(groups)
|
|
@@ -35046,14 +35046,17 @@ function getDrawData(params) {
|
|
|
35046
35046
|
}))(drawDefinition);
|
|
35047
35047
|
drawInfo.display = findExtension({ element: drawDefinition, name: DISPLAY }).extension?.value;
|
|
35048
35048
|
const qualificationStageSeedAssignments = {};
|
|
35049
|
-
let mainStageSeedAssignments;
|
|
35049
|
+
let mainStageSeedAssignments, report;
|
|
35050
35050
|
const { allStructuresLinked, sourceStructureIds, hasDrawFeedProfile, structureGroups } = getStructureGroups({
|
|
35051
35051
|
drawDefinition,
|
|
35052
35052
|
});
|
|
35053
35053
|
if (!allStructuresLinked)
|
|
35054
35054
|
return { error: UNLINKED_STRUCTURES };
|
|
35055
|
+
const eventPublishState = params?.eventPublishState ?? getPublishState({ event }).publishState;
|
|
35055
35056
|
const publishStatus = params?.publishStatus ?? getEventPublishStatus({ event, status });
|
|
35056
|
-
const
|
|
35057
|
+
const drawDetails = eventPublishState?.status?.drawDetails?.[drawDefinition.drawId];
|
|
35058
|
+
const eventPublished = !!eventPublishState?.status?.published;
|
|
35059
|
+
const structureDetails = drawDetails?.structureDetails;
|
|
35057
35060
|
let drawActive = false;
|
|
35058
35061
|
let participantPlacements = false;
|
|
35059
35062
|
const groupedStructures = structureGroups.map((structureIds) => {
|
|
@@ -35127,6 +35130,7 @@ function getDrawData(params) {
|
|
|
35127
35130
|
pressureRating,
|
|
35128
35131
|
subOrderMap,
|
|
35129
35132
|
});
|
|
35133
|
+
report = result?.report;
|
|
35130
35134
|
participantResults = positionAssignments?.filter(xa(PARTICIPANT_ID)).map((assignment) => {
|
|
35131
35135
|
const { drawPosition, participantId } = assignment;
|
|
35132
35136
|
participantPlacements = true;
|
|
@@ -35178,6 +35182,7 @@ function getDrawData(params) {
|
|
|
35178
35182
|
roundMatchUps,
|
|
35179
35183
|
roundProfile,
|
|
35180
35184
|
structureId,
|
|
35185
|
+
report,
|
|
35181
35186
|
};
|
|
35182
35187
|
});
|
|
35183
35188
|
structures.forEach((structure) => {
|
|
@@ -35187,7 +35192,9 @@ function getDrawData(params) {
|
|
|
35187
35192
|
});
|
|
35188
35193
|
return structures;
|
|
35189
35194
|
});
|
|
35190
|
-
const structures = groupedStructures
|
|
35195
|
+
const structures = groupedStructures
|
|
35196
|
+
.flat()
|
|
35197
|
+
.filter((structure) => !usePublishState || structureDetails?.[structure?.structureId]?.published || true);
|
|
35191
35198
|
drawInfo.drawActive = drawActive;
|
|
35192
35199
|
drawInfo.participantPlacements = participantPlacements;
|
|
35193
35200
|
drawInfo.drawGenerated = structures?.reduce((generated, structure) => {
|
|
@@ -35224,8 +35231,8 @@ function getEventData(params) {
|
|
|
35224
35231
|
const { eventId } = event;
|
|
35225
35232
|
const { tournamentId, endDate } = tournamentRecord;
|
|
35226
35233
|
const publishStatus = getEventPublishStatus({ event, status });
|
|
35227
|
-
const
|
|
35228
|
-
const eventPublished = !!
|
|
35234
|
+
const eventPublishState = getPublishState({ event }).publishState ?? {};
|
|
35235
|
+
const eventPublished = !!eventPublishState?.status?.published;
|
|
35229
35236
|
const { participants: tournamentParticipants } = getParticipants({
|
|
35230
35237
|
withGroupings: true,
|
|
35231
35238
|
withEvents: false,
|
|
@@ -35285,6 +35292,7 @@ function getEventData(params) {
|
|
|
35285
35292
|
refreshResults: params.refreshResults,
|
|
35286
35293
|
includePositionAssignments,
|
|
35287
35294
|
tournamentParticipants,
|
|
35295
|
+
eventPublishState,
|
|
35288
35296
|
noDeepCopy: true,
|
|
35289
35297
|
policyDefinitions,
|
|
35290
35298
|
tournamentRecord,
|
|
@@ -35339,8 +35347,8 @@ function getEventData(params) {
|
|
|
35339
35347
|
eventInfo,
|
|
35340
35348
|
drawsData,
|
|
35341
35349
|
};
|
|
35342
|
-
eventData.eventInfo.publishState =
|
|
35343
|
-
eventData.eventInfo.published =
|
|
35350
|
+
eventData.eventInfo.publishState = eventPublishState;
|
|
35351
|
+
eventData.eventInfo.published = eventPublishState?.status?.published;
|
|
35344
35352
|
return { ...SUCCESS, eventData, participants: tournamentParticipants };
|
|
35345
35353
|
}
|
|
35346
35354
|
|