@xcpcio/core 0.13.0 → 0.14.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 +371 -223
- package/dist/index.d.ts +52 -38
- package/dist/index.mjs +356 -223
- package/package.json +4 -2
- package/src/export/cf.ts +120 -0
- package/src/export/general-excel.ts +153 -0
- package/src/export/index.ts +2 -0
- package/src/index.ts +1 -1
- package/src/problem.ts +8 -0
- package/src/export.ts +0 -116
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
|
+
import { SubmissionStatus, Submission as Submission$1, Submissions as Submissions$1, BalloonColor, Problem as Problem$1, Problems as Problems$1, Lang, StatusTimeDisplay, Image, ContestState, Contest as Contest$1, Team as Team$1, Teams as Teams$1, ContestIndex as ContestIndex$1 } from '@xcpcio/types';
|
|
1
2
|
import dayjs from 'dayjs';
|
|
2
3
|
export { default as dayjs } from 'dayjs';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
declare enum MedalType {
|
|
6
|
-
UNKNOWN = 0,
|
|
7
|
-
GOLD = 1,
|
|
8
|
-
SILVER = 2,
|
|
9
|
-
BRONZE = 3,
|
|
10
|
-
HONORABLE = 4
|
|
11
|
-
}
|
|
12
|
-
declare class Award {
|
|
13
|
-
medalType: MedalType;
|
|
14
|
-
minRank: number;
|
|
15
|
-
maxRank: number;
|
|
16
|
-
constructor();
|
|
17
|
-
}
|
|
18
|
-
type Awards = Map<string, Award[]>;
|
|
4
|
+
import * as XLSX from 'xlsx-js-style';
|
|
19
5
|
|
|
20
6
|
declare class Submission {
|
|
21
7
|
id: string;
|
|
@@ -84,6 +70,8 @@ declare class TeamProblemStatistics {
|
|
|
84
70
|
get isPending(): boolean;
|
|
85
71
|
get isUnSubmitted(): boolean;
|
|
86
72
|
get penalty(): number;
|
|
73
|
+
get penaltyToMinute(): number;
|
|
74
|
+
get solvedTimestampToMinute(): number;
|
|
87
75
|
}
|
|
88
76
|
|
|
89
77
|
declare function calcDict(attemptedNum: number, solvedNum: number): number;
|
|
@@ -99,6 +87,21 @@ declare class Group {
|
|
|
99
87
|
constructor();
|
|
100
88
|
}
|
|
101
89
|
|
|
90
|
+
declare enum MedalType {
|
|
91
|
+
UNKNOWN = 0,
|
|
92
|
+
GOLD = 1,
|
|
93
|
+
SILVER = 2,
|
|
94
|
+
BRONZE = 3,
|
|
95
|
+
HONORABLE = 4
|
|
96
|
+
}
|
|
97
|
+
declare class Award {
|
|
98
|
+
medalType: MedalType;
|
|
99
|
+
minRank: number;
|
|
100
|
+
maxRank: number;
|
|
101
|
+
constructor();
|
|
102
|
+
}
|
|
103
|
+
type Awards = Map<string, Award[]>;
|
|
104
|
+
|
|
102
105
|
declare class Contest {
|
|
103
106
|
name: string;
|
|
104
107
|
startTime: dayjs.Dayjs;
|
|
@@ -130,26 +133,6 @@ declare class Contest {
|
|
|
130
133
|
}
|
|
131
134
|
declare function createContest(contestJSON: Contest$1): Contest;
|
|
132
135
|
|
|
133
|
-
declare class ContestIndexConfig {
|
|
134
|
-
contestName: string;
|
|
135
|
-
startTime: dayjs.Dayjs;
|
|
136
|
-
endTime: dayjs.Dayjs;
|
|
137
|
-
freezeTime: dayjs.Dayjs;
|
|
138
|
-
totalDurationTimestamp: number;
|
|
139
|
-
freezeDurationTimestamp: number;
|
|
140
|
-
unFreezeDurationTimestamp: number;
|
|
141
|
-
logo?: Image;
|
|
142
|
-
constructor();
|
|
143
|
-
}
|
|
144
|
-
declare class ContestIndex {
|
|
145
|
-
contest: Contest;
|
|
146
|
-
boardLink: string;
|
|
147
|
-
constructor();
|
|
148
|
-
}
|
|
149
|
-
type ContestIndexList = Array<ContestIndex>;
|
|
150
|
-
declare function createContestIndex(contestIndexJSON: ContestIndex$1): ContestIndex;
|
|
151
|
-
declare function createContestIndexList(contestListJSON: any): ContestIndexList;
|
|
152
|
-
|
|
153
136
|
declare class PlaceChartPointData {
|
|
154
137
|
timePoint: number;
|
|
155
138
|
rank: number;
|
|
@@ -242,7 +225,38 @@ declare class Rank {
|
|
|
242
225
|
getSubmissions(): Submissions;
|
|
243
226
|
}
|
|
244
227
|
|
|
245
|
-
declare
|
|
228
|
+
declare class CodeforcesGymGhostDATConverter {
|
|
229
|
+
constructor();
|
|
230
|
+
convert(rank: Rank): string;
|
|
231
|
+
private submissionStatusToCodeforcesGymDatStatus;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
declare class GeneralExcelConverter {
|
|
235
|
+
constructor();
|
|
236
|
+
convert(rank: Rank): XLSX.WorkBook;
|
|
237
|
+
convertAndWrite(rank: Rank, filename: string): any;
|
|
238
|
+
private convertToAoa;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
declare class ContestIndexConfig {
|
|
242
|
+
contestName: string;
|
|
243
|
+
startTime: dayjs.Dayjs;
|
|
244
|
+
endTime: dayjs.Dayjs;
|
|
245
|
+
freezeTime: dayjs.Dayjs;
|
|
246
|
+
totalDurationTimestamp: number;
|
|
247
|
+
freezeDurationTimestamp: number;
|
|
248
|
+
unFreezeDurationTimestamp: number;
|
|
249
|
+
logo?: Image;
|
|
250
|
+
constructor();
|
|
251
|
+
}
|
|
252
|
+
declare class ContestIndex {
|
|
253
|
+
contest: Contest;
|
|
254
|
+
boardLink: string;
|
|
255
|
+
constructor();
|
|
256
|
+
}
|
|
257
|
+
type ContestIndexList = Array<ContestIndex>;
|
|
258
|
+
declare function createContestIndex(contestIndexJSON: ContestIndex$1): ContestIndex;
|
|
259
|
+
declare function createContestIndexList(contestListJSON: any): ContestIndexList;
|
|
246
260
|
|
|
247
261
|
declare function getImageSource(image: Image): string;
|
|
248
262
|
|
|
@@ -270,4 +284,4 @@ declare function isRejected(status: SubmissionStatus): boolean;
|
|
|
270
284
|
declare function isPending(status: SubmissionStatus): boolean;
|
|
271
285
|
declare function isNotCalculatedPenaltyStatus(status: SubmissionStatus): boolean;
|
|
272
286
|
|
|
273
|
-
export { Award, Awards, Contest, ContestIndex, ContestIndexConfig, ContestIndexList, MedalType, PlaceChartPointData, Problem, ProblemStatistics, Problems, Rank, RankOptions, RankStatistics, Resolver, SelectOptionItem, Submission, Submissions, Team, TeamProblemStatistics, Teams, calcDict, createContest, createContestIndex, createContestIndexList, createDayJS, createProblem, createProblems, createProblemsByProblemIds, createSubmission, createSubmissions, createTeam, createTeams, getImageSource, getTimeDiff, getTimestamp, isAccepted, isNotCalculatedPenaltyStatus, isPending, isRejected,
|
|
287
|
+
export { Award, Awards, CodeforcesGymGhostDATConverter, Contest, ContestIndex, ContestIndexConfig, ContestIndexList, GeneralExcelConverter, MedalType, PlaceChartPointData, Problem, ProblemStatistics, Problems, Rank, RankOptions, RankStatistics, Resolver, SelectOptionItem, Submission, Submissions, Team, TeamProblemStatistics, Teams, calcDict, createContest, createContestIndex, createContestIndexList, createDayJS, createProblem, createProblems, createProblemsByProblemIds, createSubmission, createSubmissions, createTeam, createTeams, getImageSource, getTimeDiff, getTimestamp, isAccepted, isNotCalculatedPenaltyStatus, isPending, isRejected, stringToSubmissionStatus };
|