@xcpcio/core 0.79.1 → 0.79.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
@@ -1167,7 +1167,6 @@ class Contest {
1167
1167
  problems;
1168
1168
  problemsMap;
1169
1169
  statusTimeDisplay;
1170
- organization;
1171
1170
  medal;
1172
1171
  awards;
1173
1172
  group;
@@ -1329,7 +1328,6 @@ function createContest(contestJSON) {
1329
1328
  pending: Boolean(contestJSON.status_time_display.pending ?? false)
1330
1329
  };
1331
1330
  }
1332
- c.organization = contestJSON.organization;
1333
1331
  c.medal = contestJSON.medal;
1334
1332
  (() => {
1335
1333
  if (contestJSON.medal === void 0 || contestJSON.medal === null) {
@@ -1401,9 +1399,6 @@ function createContest(contestJSON) {
1401
1399
  if (contestJSON.options) {
1402
1400
  c.options = createContestOptions(contestJSON.options);
1403
1401
  }
1404
- if (c.organization) {
1405
- c.options.enableOrganization = true;
1406
- }
1407
1402
  if (contestJSON.organizations) {
1408
1403
  c.organizations = createOrganizations(contestJSON.organizations);
1409
1404
  }
@@ -1870,6 +1865,8 @@ class RankOptions {
1870
1865
  filterOrganizationMap;
1871
1866
  filterTeams;
1872
1867
  filterTeamMap;
1868
+ filterTeamIds;
1869
+ filterTeamIdMap;
1873
1870
  enableAnimatedSubmissions;
1874
1871
  battleOfGiants;
1875
1872
  constructor() {
@@ -1882,6 +1879,8 @@ class RankOptions {
1882
1879
  this.filterOrganizationMap = /* @__PURE__ */ new Map();
1883
1880
  this.filterTeams = [];
1884
1881
  this.filterTeamMap = /* @__PURE__ */ new Map();
1882
+ this.filterTeamIds = [];
1883
+ this.filterTeamIdMap = /* @__PURE__ */ new Map();
1885
1884
  this.enableAnimatedSubmissions = false;
1886
1885
  this.battleOfGiants = new BattleOfGiants();
1887
1886
  }
@@ -1895,6 +1894,8 @@ class RankOptions {
1895
1894
  this.filterOrganizationMap = self.filterOrganizationMap;
1896
1895
  this.filterTeams = self.filterTeams;
1897
1896
  this.filterTeamMap = self.filterTeamMap;
1897
+ this.filterTeamIds = self.filterTeamIds;
1898
+ this.filterTeamIdMap = self.filterTeamIdMap;
1898
1899
  this.enableAnimatedSubmissions = self.enableAnimatedSubmissions;
1899
1900
  this.battleOfGiants = self.battleOfGiants;
1900
1901
  }
@@ -1933,6 +1934,14 @@ class RankOptions {
1933
1934
  this.filterTeams = filterTeams;
1934
1935
  this.filterTeamMap = m;
1935
1936
  }
1937
+ setFilterTeamIds(filterTeamIds) {
1938
+ const m = /* @__PURE__ */ new Map();
1939
+ filterTeamIds.forEach((item) => {
1940
+ m.set(item.value, item);
1941
+ });
1942
+ this.filterTeamIds = filterTeamIds;
1943
+ this.filterTeamIdMap = m;
1944
+ }
1936
1945
  isNeedReBuildRank(nextRankOptions) {
1937
1946
  if (this.enableFilterSubmissionsByTimestamp !== nextRankOptions.enableFilterSubmissionsByTimestamp) {
1938
1947
  return true;
package/dist/index.d.cts CHANGED
@@ -172,7 +172,6 @@ declare class Contest {
172
172
  problems: Problems;
173
173
  problemsMap: Map<string, Problem>;
174
174
  statusTimeDisplay: StatusTimeDisplay;
175
- organization?: string;
176
175
  medal?: Record<string, Record<string, number>> | MedalPreset;
177
176
  awards?: Awards;
178
177
  group: Map<string, Group>;
@@ -372,6 +371,8 @@ declare class RankOptions {
372
371
  filterOrganizationMap: Map<string, SelectOptionItem>;
373
372
  filterTeams: Array<SelectOptionItem>;
374
373
  filterTeamMap: Map<string, SelectOptionItem>;
374
+ filterTeamIds: Array<SelectOptionItem>;
375
+ filterTeamIdMap: Map<string, SelectOptionItem>;
375
376
  enableAnimatedSubmissions: boolean;
376
377
  battleOfGiants: BattleOfGiants;
377
378
  constructor();
@@ -382,6 +383,7 @@ declare class RankOptions {
382
383
  disableFilterTeamsByGroup(): void;
383
384
  setFilterOrganizations(filterOrganizations: Array<SelectOptionItem>): void;
384
385
  setFilterTeams(filterTeams: Array<SelectOptionItem>): void;
386
+ setFilterTeamIds(filterTeamIds: Array<SelectOptionItem>): void;
385
387
  isNeedReBuildRank(nextRankOptions: RankOptions): boolean;
386
388
  }
387
389
  declare class Rank {
package/dist/index.d.mts CHANGED
@@ -172,7 +172,6 @@ declare class Contest {
172
172
  problems: Problems;
173
173
  problemsMap: Map<string, Problem>;
174
174
  statusTimeDisplay: StatusTimeDisplay;
175
- organization?: string;
176
175
  medal?: Record<string, Record<string, number>> | MedalPreset;
177
176
  awards?: Awards;
178
177
  group: Map<string, Group>;
@@ -372,6 +371,8 @@ declare class RankOptions {
372
371
  filterOrganizationMap: Map<string, SelectOptionItem>;
373
372
  filterTeams: Array<SelectOptionItem>;
374
373
  filterTeamMap: Map<string, SelectOptionItem>;
374
+ filterTeamIds: Array<SelectOptionItem>;
375
+ filterTeamIdMap: Map<string, SelectOptionItem>;
375
376
  enableAnimatedSubmissions: boolean;
376
377
  battleOfGiants: BattleOfGiants;
377
378
  constructor();
@@ -382,6 +383,7 @@ declare class RankOptions {
382
383
  disableFilterTeamsByGroup(): void;
383
384
  setFilterOrganizations(filterOrganizations: Array<SelectOptionItem>): void;
384
385
  setFilterTeams(filterTeams: Array<SelectOptionItem>): void;
386
+ setFilterTeamIds(filterTeamIds: Array<SelectOptionItem>): void;
385
387
  isNeedReBuildRank(nextRankOptions: RankOptions): boolean;
386
388
  }
387
389
  declare class Rank {
package/dist/index.d.ts CHANGED
@@ -172,7 +172,6 @@ declare class Contest {
172
172
  problems: Problems;
173
173
  problemsMap: Map<string, Problem>;
174
174
  statusTimeDisplay: StatusTimeDisplay;
175
- organization?: string;
176
175
  medal?: Record<string, Record<string, number>> | MedalPreset;
177
176
  awards?: Awards;
178
177
  group: Map<string, Group>;
@@ -372,6 +371,8 @@ declare class RankOptions {
372
371
  filterOrganizationMap: Map<string, SelectOptionItem>;
373
372
  filterTeams: Array<SelectOptionItem>;
374
373
  filterTeamMap: Map<string, SelectOptionItem>;
374
+ filterTeamIds: Array<SelectOptionItem>;
375
+ filterTeamIdMap: Map<string, SelectOptionItem>;
375
376
  enableAnimatedSubmissions: boolean;
376
377
  battleOfGiants: BattleOfGiants;
377
378
  constructor();
@@ -382,6 +383,7 @@ declare class RankOptions {
382
383
  disableFilterTeamsByGroup(): void;
383
384
  setFilterOrganizations(filterOrganizations: Array<SelectOptionItem>): void;
384
385
  setFilterTeams(filterTeams: Array<SelectOptionItem>): void;
386
+ setFilterTeamIds(filterTeamIds: Array<SelectOptionItem>): void;
385
387
  isNeedReBuildRank(nextRankOptions: RankOptions): boolean;
386
388
  }
387
389
  declare class Rank {
package/dist/index.mjs CHANGED
@@ -1136,7 +1136,6 @@ class Contest {
1136
1136
  problems;
1137
1137
  problemsMap;
1138
1138
  statusTimeDisplay;
1139
- organization;
1140
1139
  medal;
1141
1140
  awards;
1142
1141
  group;
@@ -1298,7 +1297,6 @@ function createContest(contestJSON) {
1298
1297
  pending: Boolean(contestJSON.status_time_display.pending ?? false)
1299
1298
  };
1300
1299
  }
1301
- c.organization = contestJSON.organization;
1302
1300
  c.medal = contestJSON.medal;
1303
1301
  (() => {
1304
1302
  if (contestJSON.medal === void 0 || contestJSON.medal === null) {
@@ -1370,9 +1368,6 @@ function createContest(contestJSON) {
1370
1368
  if (contestJSON.options) {
1371
1369
  c.options = createContestOptions(contestJSON.options);
1372
1370
  }
1373
- if (c.organization) {
1374
- c.options.enableOrganization = true;
1375
- }
1376
1371
  if (contestJSON.organizations) {
1377
1372
  c.organizations = createOrganizations(contestJSON.organizations);
1378
1373
  }
@@ -1839,6 +1834,8 @@ class RankOptions {
1839
1834
  filterOrganizationMap;
1840
1835
  filterTeams;
1841
1836
  filterTeamMap;
1837
+ filterTeamIds;
1838
+ filterTeamIdMap;
1842
1839
  enableAnimatedSubmissions;
1843
1840
  battleOfGiants;
1844
1841
  constructor() {
@@ -1851,6 +1848,8 @@ class RankOptions {
1851
1848
  this.filterOrganizationMap = /* @__PURE__ */ new Map();
1852
1849
  this.filterTeams = [];
1853
1850
  this.filterTeamMap = /* @__PURE__ */ new Map();
1851
+ this.filterTeamIds = [];
1852
+ this.filterTeamIdMap = /* @__PURE__ */ new Map();
1854
1853
  this.enableAnimatedSubmissions = false;
1855
1854
  this.battleOfGiants = new BattleOfGiants();
1856
1855
  }
@@ -1864,6 +1863,8 @@ class RankOptions {
1864
1863
  this.filterOrganizationMap = self.filterOrganizationMap;
1865
1864
  this.filterTeams = self.filterTeams;
1866
1865
  this.filterTeamMap = self.filterTeamMap;
1866
+ this.filterTeamIds = self.filterTeamIds;
1867
+ this.filterTeamIdMap = self.filterTeamIdMap;
1867
1868
  this.enableAnimatedSubmissions = self.enableAnimatedSubmissions;
1868
1869
  this.battleOfGiants = self.battleOfGiants;
1869
1870
  }
@@ -1902,6 +1903,14 @@ class RankOptions {
1902
1903
  this.filterTeams = filterTeams;
1903
1904
  this.filterTeamMap = m;
1904
1905
  }
1906
+ setFilterTeamIds(filterTeamIds) {
1907
+ const m = /* @__PURE__ */ new Map();
1908
+ filterTeamIds.forEach((item) => {
1909
+ m.set(item.value, item);
1910
+ });
1911
+ this.filterTeamIds = filterTeamIds;
1912
+ this.filterTeamIdMap = m;
1913
+ }
1905
1914
  isNeedReBuildRank(nextRankOptions) {
1906
1915
  if (this.enableFilterSubmissionsByTimestamp !== nextRankOptions.enableFilterSubmissionsByTimestamp) {
1907
1916
  return true;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xcpcio/core",
3
3
  "type": "module",
4
- "version": "0.79.1",
4
+ "version": "0.79.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.79.1"
45
+ "@xcpcio/types": "0.79.2"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@babel/types": "^7.28.6",