@xcpcio/core 0.66.1 → 0.66.2

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 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);
@@ -856,6 +858,11 @@ function createTeam(teamJSON) {
856
858
  }
857
859
  t.group = [...new Set(t.group)];
858
860
  t.group.sort();
861
+ t.badge = teamJSON.badge;
862
+ if (teamJSON.missing_photo) {
863
+ t.missingPhoto = true;
864
+ }
865
+ t.photo = teamJSON.photo;
859
866
  if (teamJSON.location) {
860
867
  t.location = teamJSON.location;
861
868
  }
@@ -1022,6 +1029,7 @@ class ContestOptions {
1022
1029
  submissionEnableActionField;
1023
1030
  submissionHasReactionField;
1024
1031
  reactionVideoUrlTemplate;
1032
+ teamPhotoTemplate;
1025
1033
  constructor() {
1026
1034
  this.calculationOfPenalty = "in_minutes";
1027
1035
  this.submissionTimestampUnit = "second";
@@ -1029,7 +1037,6 @@ class ContestOptions {
1029
1037
  this.submissionHasLanguageField = false;
1030
1038
  this.submissionEnableActionField = false;
1031
1039
  this.submissionHasReactionField = false;
1032
- this.reactionVideoUrlTemplate = void 0;
1033
1040
  }
1034
1041
  }
1035
1042
  function createContestOptions(contestOptionsJSON = {}) {
@@ -1046,6 +1053,7 @@ function createContestOptions(contestOptionsJSON = {}) {
1046
1053
  }
1047
1054
  o.submissionEnableActionField = o.submissionHasReactionField;
1048
1055
  o.reactionVideoUrlTemplate = j.reaction_video_url_template;
1056
+ o.teamPhotoTemplate = j.team_photo_url_template;
1049
1057
  return o;
1050
1058
  }
1051
1059
 
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { Lang, I18NStringSet, Text, CalculationOfPenalty, TimeUnit, StatusTimeDisplay, MedalPreset, Image, 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';
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, Image, 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';
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, Image, 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';
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);
@@ -825,6 +827,11 @@ function createTeam(teamJSON) {
825
827
  }
826
828
  t.group = [...new Set(t.group)];
827
829
  t.group.sort();
830
+ t.badge = teamJSON.badge;
831
+ if (teamJSON.missing_photo) {
832
+ t.missingPhoto = true;
833
+ }
834
+ t.photo = teamJSON.photo;
828
835
  if (teamJSON.location) {
829
836
  t.location = teamJSON.location;
830
837
  }
@@ -991,6 +998,7 @@ class ContestOptions {
991
998
  submissionEnableActionField;
992
999
  submissionHasReactionField;
993
1000
  reactionVideoUrlTemplate;
1001
+ teamPhotoTemplate;
994
1002
  constructor() {
995
1003
  this.calculationOfPenalty = "in_minutes";
996
1004
  this.submissionTimestampUnit = "second";
@@ -998,7 +1006,6 @@ class ContestOptions {
998
1006
  this.submissionHasLanguageField = false;
999
1007
  this.submissionEnableActionField = false;
1000
1008
  this.submissionHasReactionField = false;
1001
- this.reactionVideoUrlTemplate = void 0;
1002
1009
  }
1003
1010
  }
1004
1011
  function createContestOptions(contestOptionsJSON = {}) {
@@ -1015,6 +1022,7 @@ function createContestOptions(contestOptionsJSON = {}) {
1015
1022
  }
1016
1023
  o.submissionEnableActionField = o.submissionHasReactionField;
1017
1024
  o.reactionVideoUrlTemplate = j.reaction_video_url_template;
1025
+ o.teamPhotoTemplate = j.team_photo_url_template;
1018
1026
  return o;
1019
1027
  }
1020
1028
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xcpcio/core",
3
3
  "type": "module",
4
- "version": "0.66.1",
4
+ "version": "0.66.2",
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.66.1"
45
+ "@xcpcio/types": "0.66.2"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@babel/types": "^7.28.4",