@xcpcio/core 0.66.1 → 0.67.0
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.cjs +14 -3
- package/dist/index.d.cts +5 -2
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.mjs +14 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -660,7 +660,6 @@ class Team {
|
|
|
660
660
|
id;
|
|
661
661
|
name;
|
|
662
662
|
organization;
|
|
663
|
-
badge;
|
|
664
663
|
group;
|
|
665
664
|
tag;
|
|
666
665
|
coaches;
|
|
@@ -678,6 +677,9 @@ class Team {
|
|
|
678
677
|
submissions;
|
|
679
678
|
placeChartPoints;
|
|
680
679
|
awards;
|
|
680
|
+
badge;
|
|
681
|
+
missingPhoto;
|
|
682
|
+
photo;
|
|
681
683
|
location;
|
|
682
684
|
icpcID;
|
|
683
685
|
se;
|
|
@@ -702,6 +704,7 @@ class Team {
|
|
|
702
704
|
this.submissions = [];
|
|
703
705
|
this.placeChartPoints = [];
|
|
704
706
|
this.awards = [];
|
|
707
|
+
this.missingPhoto = false;
|
|
705
708
|
this.se = 0;
|
|
706
709
|
}
|
|
707
710
|
reset() {
|
|
@@ -832,7 +835,6 @@ function createTeam(teamJSON) {
|
|
|
832
835
|
t.id = teamJSON.id ?? teamJSON.team_id ?? "";
|
|
833
836
|
t.name = I18nText.fromIText(teamJSON.name ?? teamJSON.team_name ?? "");
|
|
834
837
|
t.organization = teamJSON.organization ?? "";
|
|
835
|
-
t.badge = teamJSON.badge;
|
|
836
838
|
t.group = ___default.cloneDeep(teamJSON.group ?? []);
|
|
837
839
|
t.tag = ___default.cloneDeep(teamJSON.tag ?? []);
|
|
838
840
|
t.coaches = createPersons(teamJSON.coach);
|
|
@@ -849,6 +851,9 @@ function createTeam(teamJSON) {
|
|
|
849
851
|
{
|
|
850
852
|
const tt = teamJSON;
|
|
851
853
|
for (const key of Object.keys(tt)) {
|
|
854
|
+
if (key === "missing_photo") {
|
|
855
|
+
continue;
|
|
856
|
+
}
|
|
852
857
|
if (tt[key] === 1 || tt[key] === true) {
|
|
853
858
|
t.group.push(key);
|
|
854
859
|
}
|
|
@@ -856,6 +861,11 @@ function createTeam(teamJSON) {
|
|
|
856
861
|
}
|
|
857
862
|
t.group = [...new Set(t.group)];
|
|
858
863
|
t.group.sort();
|
|
864
|
+
t.badge = teamJSON.badge;
|
|
865
|
+
if (teamJSON.missing_photo) {
|
|
866
|
+
t.missingPhoto = true;
|
|
867
|
+
}
|
|
868
|
+
t.photo = teamJSON.photo;
|
|
859
869
|
if (teamJSON.location) {
|
|
860
870
|
t.location = teamJSON.location;
|
|
861
871
|
}
|
|
@@ -1022,6 +1032,7 @@ class ContestOptions {
|
|
|
1022
1032
|
submissionEnableActionField;
|
|
1023
1033
|
submissionHasReactionField;
|
|
1024
1034
|
reactionVideoUrlTemplate;
|
|
1035
|
+
teamPhotoTemplate;
|
|
1025
1036
|
constructor() {
|
|
1026
1037
|
this.calculationOfPenalty = "in_minutes";
|
|
1027
1038
|
this.submissionTimestampUnit = "second";
|
|
@@ -1029,7 +1040,6 @@ class ContestOptions {
|
|
|
1029
1040
|
this.submissionHasLanguageField = false;
|
|
1030
1041
|
this.submissionEnableActionField = false;
|
|
1031
1042
|
this.submissionHasReactionField = false;
|
|
1032
|
-
this.reactionVideoUrlTemplate = void 0;
|
|
1033
1043
|
}
|
|
1034
1044
|
}
|
|
1035
1045
|
function createContestOptions(contestOptionsJSON = {}) {
|
|
@@ -1046,6 +1056,7 @@ function createContestOptions(contestOptionsJSON = {}) {
|
|
|
1046
1056
|
}
|
|
1047
1057
|
o.submissionEnableActionField = o.submissionHasReactionField;
|
|
1048
1058
|
o.reactionVideoUrlTemplate = j.reaction_video_url_template;
|
|
1059
|
+
o.teamPhotoTemplate = j.team_photo_url_template;
|
|
1049
1060
|
return o;
|
|
1050
1061
|
}
|
|
1051
1062
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Lang, I18NStringSet, Text, CalculationOfPenalty, TimeUnit, StatusTimeDisplay, MedalPreset,
|
|
1
|
+
import { Lang, I18NStringSet, Text, CalculationOfPenalty, TimeUnit, Image, StatusTimeDisplay, MedalPreset, BannerMode, ContestState, Contest as Contest$1, SubmissionReaction, SubmissionStatus, Submission as Submission$1, Submissions as Submissions$1, BalloonColor, Problem as Problem$1, Problems as Problems$1, Person as Person$1, Persons as Persons$1, Team as Team$1, Teams as Teams$1, ContestIndex as ContestIndex$1, IRatingHistory, IRatingUser, IRating } from '@xcpcio/types';
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
3
|
export { default as dayjs } from 'dayjs';
|
|
4
4
|
import * as XLSX from 'xlsx-js-style';
|
|
@@ -45,6 +45,7 @@ declare class ContestOptions {
|
|
|
45
45
|
submissionEnableActionField: boolean;
|
|
46
46
|
submissionHasReactionField: boolean;
|
|
47
47
|
reactionVideoUrlTemplate?: string;
|
|
48
|
+
teamPhotoTemplate?: Image;
|
|
48
49
|
constructor();
|
|
49
50
|
}
|
|
50
51
|
|
|
@@ -212,7 +213,6 @@ declare class Team {
|
|
|
212
213
|
id: string;
|
|
213
214
|
name: I18nText;
|
|
214
215
|
organization: string;
|
|
215
|
-
badge?: Image;
|
|
216
216
|
group: Array<string>;
|
|
217
217
|
tag: Array<string>;
|
|
218
218
|
coaches: Persons;
|
|
@@ -230,6 +230,9 @@ declare class Team {
|
|
|
230
230
|
submissions: Submissions;
|
|
231
231
|
placeChartPoints: Array<PlaceChartPointData>;
|
|
232
232
|
awards: MedalType[];
|
|
233
|
+
badge?: Image;
|
|
234
|
+
missingPhoto: boolean;
|
|
235
|
+
photo?: Image;
|
|
233
236
|
location?: string;
|
|
234
237
|
icpcID?: string;
|
|
235
238
|
se: number;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Lang, I18NStringSet, Text, CalculationOfPenalty, TimeUnit, StatusTimeDisplay, MedalPreset,
|
|
1
|
+
import { Lang, I18NStringSet, Text, CalculationOfPenalty, TimeUnit, Image, StatusTimeDisplay, MedalPreset, BannerMode, ContestState, Contest as Contest$1, SubmissionReaction, SubmissionStatus, Submission as Submission$1, Submissions as Submissions$1, BalloonColor, Problem as Problem$1, Problems as Problems$1, Person as Person$1, Persons as Persons$1, Team as Team$1, Teams as Teams$1, ContestIndex as ContestIndex$1, IRatingHistory, IRatingUser, IRating } from '@xcpcio/types';
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
3
|
export { default as dayjs } from 'dayjs';
|
|
4
4
|
import * as XLSX from 'xlsx-js-style';
|
|
@@ -45,6 +45,7 @@ declare class ContestOptions {
|
|
|
45
45
|
submissionEnableActionField: boolean;
|
|
46
46
|
submissionHasReactionField: boolean;
|
|
47
47
|
reactionVideoUrlTemplate?: string;
|
|
48
|
+
teamPhotoTemplate?: Image;
|
|
48
49
|
constructor();
|
|
49
50
|
}
|
|
50
51
|
|
|
@@ -212,7 +213,6 @@ declare class Team {
|
|
|
212
213
|
id: string;
|
|
213
214
|
name: I18nText;
|
|
214
215
|
organization: string;
|
|
215
|
-
badge?: Image;
|
|
216
216
|
group: Array<string>;
|
|
217
217
|
tag: Array<string>;
|
|
218
218
|
coaches: Persons;
|
|
@@ -230,6 +230,9 @@ declare class Team {
|
|
|
230
230
|
submissions: Submissions;
|
|
231
231
|
placeChartPoints: Array<PlaceChartPointData>;
|
|
232
232
|
awards: MedalType[];
|
|
233
|
+
badge?: Image;
|
|
234
|
+
missingPhoto: boolean;
|
|
235
|
+
photo?: Image;
|
|
233
236
|
location?: string;
|
|
234
237
|
icpcID?: string;
|
|
235
238
|
se: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Lang, I18NStringSet, Text, CalculationOfPenalty, TimeUnit, StatusTimeDisplay, MedalPreset,
|
|
1
|
+
import { Lang, I18NStringSet, Text, CalculationOfPenalty, TimeUnit, Image, StatusTimeDisplay, MedalPreset, BannerMode, ContestState, Contest as Contest$1, SubmissionReaction, SubmissionStatus, Submission as Submission$1, Submissions as Submissions$1, BalloonColor, Problem as Problem$1, Problems as Problems$1, Person as Person$1, Persons as Persons$1, Team as Team$1, Teams as Teams$1, ContestIndex as ContestIndex$1, IRatingHistory, IRatingUser, IRating } from '@xcpcio/types';
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
3
|
export { default as dayjs } from 'dayjs';
|
|
4
4
|
import * as XLSX from 'xlsx-js-style';
|
|
@@ -45,6 +45,7 @@ declare class ContestOptions {
|
|
|
45
45
|
submissionEnableActionField: boolean;
|
|
46
46
|
submissionHasReactionField: boolean;
|
|
47
47
|
reactionVideoUrlTemplate?: string;
|
|
48
|
+
teamPhotoTemplate?: Image;
|
|
48
49
|
constructor();
|
|
49
50
|
}
|
|
50
51
|
|
|
@@ -212,7 +213,6 @@ declare class Team {
|
|
|
212
213
|
id: string;
|
|
213
214
|
name: I18nText;
|
|
214
215
|
organization: string;
|
|
215
|
-
badge?: Image;
|
|
216
216
|
group: Array<string>;
|
|
217
217
|
tag: Array<string>;
|
|
218
218
|
coaches: Persons;
|
|
@@ -230,6 +230,9 @@ declare class Team {
|
|
|
230
230
|
submissions: Submissions;
|
|
231
231
|
placeChartPoints: Array<PlaceChartPointData>;
|
|
232
232
|
awards: MedalType[];
|
|
233
|
+
badge?: Image;
|
|
234
|
+
missingPhoto: boolean;
|
|
235
|
+
photo?: Image;
|
|
233
236
|
location?: string;
|
|
234
237
|
icpcID?: string;
|
|
235
238
|
se: number;
|
package/dist/index.mjs
CHANGED
|
@@ -629,7 +629,6 @@ class Team {
|
|
|
629
629
|
id;
|
|
630
630
|
name;
|
|
631
631
|
organization;
|
|
632
|
-
badge;
|
|
633
632
|
group;
|
|
634
633
|
tag;
|
|
635
634
|
coaches;
|
|
@@ -647,6 +646,9 @@ class Team {
|
|
|
647
646
|
submissions;
|
|
648
647
|
placeChartPoints;
|
|
649
648
|
awards;
|
|
649
|
+
badge;
|
|
650
|
+
missingPhoto;
|
|
651
|
+
photo;
|
|
650
652
|
location;
|
|
651
653
|
icpcID;
|
|
652
654
|
se;
|
|
@@ -671,6 +673,7 @@ class Team {
|
|
|
671
673
|
this.submissions = [];
|
|
672
674
|
this.placeChartPoints = [];
|
|
673
675
|
this.awards = [];
|
|
676
|
+
this.missingPhoto = false;
|
|
674
677
|
this.se = 0;
|
|
675
678
|
}
|
|
676
679
|
reset() {
|
|
@@ -801,7 +804,6 @@ function createTeam(teamJSON) {
|
|
|
801
804
|
t.id = teamJSON.id ?? teamJSON.team_id ?? "";
|
|
802
805
|
t.name = I18nText.fromIText(teamJSON.name ?? teamJSON.team_name ?? "");
|
|
803
806
|
t.organization = teamJSON.organization ?? "";
|
|
804
|
-
t.badge = teamJSON.badge;
|
|
805
807
|
t.group = _.cloneDeep(teamJSON.group ?? []);
|
|
806
808
|
t.tag = _.cloneDeep(teamJSON.tag ?? []);
|
|
807
809
|
t.coaches = createPersons(teamJSON.coach);
|
|
@@ -818,6 +820,9 @@ function createTeam(teamJSON) {
|
|
|
818
820
|
{
|
|
819
821
|
const tt = teamJSON;
|
|
820
822
|
for (const key of Object.keys(tt)) {
|
|
823
|
+
if (key === "missing_photo") {
|
|
824
|
+
continue;
|
|
825
|
+
}
|
|
821
826
|
if (tt[key] === 1 || tt[key] === true) {
|
|
822
827
|
t.group.push(key);
|
|
823
828
|
}
|
|
@@ -825,6 +830,11 @@ function createTeam(teamJSON) {
|
|
|
825
830
|
}
|
|
826
831
|
t.group = [...new Set(t.group)];
|
|
827
832
|
t.group.sort();
|
|
833
|
+
t.badge = teamJSON.badge;
|
|
834
|
+
if (teamJSON.missing_photo) {
|
|
835
|
+
t.missingPhoto = true;
|
|
836
|
+
}
|
|
837
|
+
t.photo = teamJSON.photo;
|
|
828
838
|
if (teamJSON.location) {
|
|
829
839
|
t.location = teamJSON.location;
|
|
830
840
|
}
|
|
@@ -991,6 +1001,7 @@ class ContestOptions {
|
|
|
991
1001
|
submissionEnableActionField;
|
|
992
1002
|
submissionHasReactionField;
|
|
993
1003
|
reactionVideoUrlTemplate;
|
|
1004
|
+
teamPhotoTemplate;
|
|
994
1005
|
constructor() {
|
|
995
1006
|
this.calculationOfPenalty = "in_minutes";
|
|
996
1007
|
this.submissionTimestampUnit = "second";
|
|
@@ -998,7 +1009,6 @@ class ContestOptions {
|
|
|
998
1009
|
this.submissionHasLanguageField = false;
|
|
999
1010
|
this.submissionEnableActionField = false;
|
|
1000
1011
|
this.submissionHasReactionField = false;
|
|
1001
|
-
this.reactionVideoUrlTemplate = void 0;
|
|
1002
1012
|
}
|
|
1003
1013
|
}
|
|
1004
1014
|
function createContestOptions(contestOptionsJSON = {}) {
|
|
@@ -1015,6 +1025,7 @@ function createContestOptions(contestOptionsJSON = {}) {
|
|
|
1015
1025
|
}
|
|
1016
1026
|
o.submissionEnableActionField = o.submissionHasReactionField;
|
|
1017
1027
|
o.reactionVideoUrlTemplate = j.reaction_video_url_template;
|
|
1028
|
+
o.teamPhotoTemplate = j.team_photo_url_template;
|
|
1018
1029
|
return o;
|
|
1019
1030
|
}
|
|
1020
1031
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcpcio/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.67.0",
|
|
5
5
|
"description": "The core library for XCPCIO",
|
|
6
6
|
"author": "Dup4 <hi@dup4.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"papaparse": "^5.5.3",
|
|
43
43
|
"string-width": "^8.1.0",
|
|
44
44
|
"xlsx-js-style": "^1.2.0",
|
|
45
|
-
"@xcpcio/types": "0.
|
|
45
|
+
"@xcpcio/types": "0.67.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@babel/types": "^7.28.4",
|