@xcpcio/core 0.31.0 → 0.32.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 CHANGED
@@ -826,7 +826,13 @@ class Submission {
826
826
  return 1;
827
827
  }
828
828
  }
829
- return 0;
829
+ if (lhs.id < rhs.id) {
830
+ return -1;
831
+ } else if (lhs.id === rhs.id) {
832
+ return 0;
833
+ } else {
834
+ return 1;
835
+ }
830
836
  }
831
837
  }
832
838
  function createSubmission(submissionJSON) {
@@ -1184,6 +1190,7 @@ class RankOptions {
1184
1190
  this.filterOrganizationMap = /* @__PURE__ */ new Map();
1185
1191
  this.filterTeams = [];
1186
1192
  this.filterTeamMap = /* @__PURE__ */ new Map();
1193
+ this.enableDynamicSubmissions = false;
1187
1194
  }
1188
1195
  setWidth(width, contest) {
1189
1196
  this.width = width;
package/dist/index.d.ts CHANGED
@@ -227,6 +227,7 @@ declare class RankOptions {
227
227
  filterOrganizationMap: Map<string, SelectOptionItem>;
228
228
  filterTeams: Array<SelectOptionItem>;
229
229
  filterTeamMap: Map<string, SelectOptionItem>;
230
+ enableDynamicSubmissions: boolean;
230
231
  constructor();
231
232
  setWidth(width: number, contest: Contest): void;
232
233
  disableFilterSubmissionByTimestamp(): void;
package/dist/index.mjs CHANGED
@@ -796,7 +796,13 @@ class Submission {
796
796
  return 1;
797
797
  }
798
798
  }
799
- return 0;
799
+ if (lhs.id < rhs.id) {
800
+ return -1;
801
+ } else if (lhs.id === rhs.id) {
802
+ return 0;
803
+ } else {
804
+ return 1;
805
+ }
800
806
  }
801
807
  }
802
808
  function createSubmission(submissionJSON) {
@@ -1154,6 +1160,7 @@ class RankOptions {
1154
1160
  this.filterOrganizationMap = /* @__PURE__ */ new Map();
1155
1161
  this.filterTeams = [];
1156
1162
  this.filterTeamMap = /* @__PURE__ */ new Map();
1163
+ this.enableDynamicSubmissions = false;
1157
1164
  }
1158
1165
  setWidth(width, contest) {
1159
1166
  this.width = width;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcpcio/core",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "description": "XCPCIO Core",
5
5
  "author": "Dup4 <lyuzhi.pan@gmail.com>",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "lodash": "^4.17.21",
45
45
  "string-width": "^6.1.0",
46
46
  "xlsx-js-style": "^1.2.0",
47
- "@xcpcio/types": "0.31.0"
47
+ "@xcpcio/types": "0.32.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@babel/types": "^7.22.4",
package/src/rank.ts CHANGED
@@ -29,6 +29,8 @@ export class RankOptions {
29
29
  filterTeams: Array<SelectOptionItem>;
30
30
  filterTeamMap: Map<string, SelectOptionItem>;
31
31
 
32
+ enableDynamicSubmissions: boolean;
33
+
32
34
  constructor() {
33
35
  this.enableFilterSubmissionsByTimestamp = false;
34
36
  this.width = 0;
@@ -42,6 +44,8 @@ export class RankOptions {
42
44
 
43
45
  this.filterTeams = [];
44
46
  this.filterTeamMap = new Map<string, SelectOptionItem>();
47
+
48
+ this.enableDynamicSubmissions = false;
45
49
  }
46
50
 
47
51
  setWidth(width: number, contest: Contest) {
package/src/submission.ts CHANGED
@@ -118,7 +118,13 @@ export class Submission {
118
118
  }
119
119
  }
120
120
 
121
- return 0;
121
+ if (lhs.id < rhs.id) {
122
+ return -1;
123
+ } else if (lhs.id === rhs.id) {
124
+ return 0;
125
+ } else {
126
+ return 1;
127
+ }
122
128
  }
123
129
  }
124
130