tods-competition-factory 2.0.27 → 2.0.28
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 +5 -5
- package/dist/tods-competition-factory.d.ts +2 -1
- package/dist/tods-competition-factory.development.cjs.js +21 -14
- 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 +6 -6
|
@@ -7044,8 +7044,9 @@ type DrawPublishingDetails = {
|
|
|
7044
7044
|
type PublishEventType = {
|
|
7045
7045
|
includePositionAssignments?: boolean;
|
|
7046
7046
|
policyDefinitions?: PolicyDefinitions;
|
|
7047
|
-
removePriorValues?: boolean;
|
|
7048
7047
|
tournamentRecord: Tournament;
|
|
7048
|
+
removePriorValues?: boolean;
|
|
7049
|
+
returnEventData?: boolean;
|
|
7049
7050
|
drawIds?: string[];
|
|
7050
7051
|
status?: string;
|
|
7051
7052
|
event?: Event$1;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function factoryVersion() {
|
|
6
|
-
return '2.0.
|
|
6
|
+
return '2.0.28';
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
function isFunction(obj) {
|
|
@@ -11434,7 +11434,7 @@ function getEventSeedAssignments({ publishedSeeding, usePublishState, withSeedin
|
|
|
11434
11434
|
|
|
11435
11435
|
function processEventEntry({ convertExtensions, seedAssignments, participant, withSeeding, seedValue, eventId, ranking, entry, }) {
|
|
11436
11436
|
const { entryStatus, entryStage, entryPosition, extensions } = entry;
|
|
11437
|
-
const entryExtensions = extensions?.length && convertExtensions ? Object.assign({}, ...extensionsToAttributes(extensions)) : {};
|
|
11437
|
+
const entryExtensions = extensions?.length && convertExtensions ? Object.assign({}, ...extensionsToAttributes(extensions ?? [])) : {};
|
|
11438
11438
|
const attributes = Object.assign(entryExtensions, {
|
|
11439
11439
|
entryPosition,
|
|
11440
11440
|
entryStatus,
|
|
@@ -11878,7 +11878,9 @@ function getParticipantEntries(params) {
|
|
|
11878
11878
|
eventsPublishStatuses[eventId] = publishStatuses;
|
|
11879
11879
|
const publishedSeeding = publishStatuses?.status?.publishedSeeding;
|
|
11880
11880
|
if (withEvents || withSeeding || withRankingProfile) {
|
|
11881
|
-
const extensionConversions = convertExtensions
|
|
11881
|
+
const extensionConversions = convertExtensions
|
|
11882
|
+
? Object.assign({}, ...extensionsToAttributes(extensions ?? []))
|
|
11883
|
+
: {};
|
|
11882
11884
|
derivedEventInfo[eventId] = {
|
|
11883
11885
|
...extensionConversions,
|
|
11884
11886
|
eventName,
|
|
@@ -37983,17 +37985,22 @@ function publishEvent(params) {
|
|
|
37983
37985
|
status,
|
|
37984
37986
|
event,
|
|
37985
37987
|
});
|
|
37986
|
-
const {
|
|
37987
|
-
|
|
37988
|
-
|
|
37989
|
-
|
|
37990
|
-
|
|
37991
|
-
|
|
37992
|
-
|
|
37993
|
-
|
|
37994
|
-
|
|
37995
|
-
|
|
37996
|
-
|
|
37988
|
+
const { topics } = getTopics();
|
|
37989
|
+
const notify = topics.includes(PUBLISH_EVENT);
|
|
37990
|
+
const eventData = notify || params.returnEventData
|
|
37991
|
+
? getEventData({
|
|
37992
|
+
includePositionAssignments,
|
|
37993
|
+
usePublishState: true,
|
|
37994
|
+
tournamentRecord,
|
|
37995
|
+
policyDefinitions,
|
|
37996
|
+
event,
|
|
37997
|
+
})?.eventData
|
|
37998
|
+
: undefined;
|
|
37999
|
+
notify &&
|
|
38000
|
+
addNotice({
|
|
38001
|
+
payload: { eventData, tournamentId: tournamentRecord.tournamentId },
|
|
38002
|
+
topic: PUBLISH_EVENT,
|
|
38003
|
+
});
|
|
37997
38004
|
return { ...SUCCESS, eventData };
|
|
37998
38005
|
}
|
|
37999
38006
|
|