Skip to content

Commit 47015e9

Browse files
committed
:chore: Fix order (#2402)
1 parent 8b1f8cd commit 47015e9

File tree

2 files changed

+185
-185
lines changed

2 files changed

+185
-185
lines changed

src/lib/utils/contest_table_provider.ts

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,39 @@ function parseContestRound(contestId: string, prefix: string): number {
210210
return parseInt(withoutPrefix, 10);
211211
}
212212

213+
export class Typical90Provider extends ContestTableProviderBase {
214+
protected setFilterCondition(): (taskResult: TaskResult) => boolean {
215+
return (taskResult: TaskResult) => {
216+
if (classifyContest(taskResult.contest_id) !== this.contestType) {
217+
return false;
218+
}
219+
220+
return taskResult.contest_id === 'typical90';
221+
};
222+
}
223+
224+
getMetadata(): ContestTableMetaData {
225+
return {
226+
title: '競プロ典型 90 問',
227+
abbreviationName: 'typical90',
228+
};
229+
}
230+
231+
getDisplayConfig(): ContestTableDisplayConfig {
232+
return {
233+
isShownHeader: false,
234+
isShownRoundLabel: false,
235+
roundLabelWidth: '', // No specific width for the round label in Typical90
236+
tableBodyCellsWidth: 'w-1/2 xl:w-1/3 px-1 py-2',
237+
isShownTaskIndex: true,
238+
};
239+
}
240+
241+
getContestRoundLabel(contestId: string): string {
242+
return '';
243+
}
244+
}
245+
213246
export class EDPCProvider extends ContestTableProviderBase {
214247
protected setFilterCondition(): (taskResult: TaskResult) => boolean {
215248
return (taskResult: TaskResult) => {
@@ -312,39 +345,6 @@ export class JOIFirstQualRoundProvider extends ContestTableProviderBase {
312345
}
313346
}
314347

315-
export class Typical90Provider extends ContestTableProviderBase {
316-
protected setFilterCondition(): (taskResult: TaskResult) => boolean {
317-
return (taskResult: TaskResult) => {
318-
if (classifyContest(taskResult.contest_id) !== this.contestType) {
319-
return false;
320-
}
321-
322-
return taskResult.contest_id === 'typical90';
323-
};
324-
}
325-
326-
getMetadata(): ContestTableMetaData {
327-
return {
328-
title: '競プロ典型 90 問',
329-
abbreviationName: 'typical90',
330-
};
331-
}
332-
333-
getDisplayConfig(): ContestTableDisplayConfig {
334-
return {
335-
isShownHeader: false,
336-
isShownRoundLabel: false,
337-
roundLabelWidth: '', // No specific width for the round label in Typical90
338-
tableBodyCellsWidth: 'w-1/2 xl:w-1/3 px-1 py-2',
339-
isShownTaskIndex: true,
340-
};
341-
}
342-
343-
getContestRoundLabel(contestId: string): string {
344-
return '';
345-
}
346-
}
347-
348348
/**
349349
* A class that manages individual provider groups
350350
* Manages multiple ContestTableProviders as a single group,
@@ -479,6 +479,15 @@ export const prepareContestProviderPresets = () => {
479479
ariaLabel: 'Filter contests from ABC 212 to ABC 318',
480480
}).addProvider(ContestType.ABC, new ABC212ToABC318Provider(ContestType.ABC)),
481481

482+
/**
483+
* Single group for Typical 90 Problems
484+
*/
485+
Typical90: () =>
486+
new ContestTableProviderGroup(`競プロ典型 90 問`, {
487+
buttonLabel: '競プロ典型 90 問',
488+
ariaLabel: 'Filter Typical 90 Problems',
489+
}).addProvider(ContestType.TYPICAL90, new Typical90Provider(ContestType.TYPICAL90)),
490+
482491
/**
483492
* DP group (EDPC and TDPC)
484493
*/
@@ -496,25 +505,16 @@ export const prepareContestProviderPresets = () => {
496505
buttonLabel: 'JOI 一次予選',
497506
ariaLabel: 'Filter JOI First Qualifying Round',
498507
}).addProvider(ContestType.JOI, new JOIFirstQualRoundProvider(ContestType.JOI)),
499-
500-
/**
501-
* Single group for Typical 90 Problems
502-
*/
503-
Typical90: () =>
504-
new ContestTableProviderGroup(`競プロ典型 90 問`, {
505-
buttonLabel: '競プロ典型 90 問',
506-
ariaLabel: 'Filter Typical 90 Problems',
507-
}).addProvider(ContestType.TYPICAL90, new Typical90Provider(ContestType.TYPICAL90)),
508508
};
509509
};
510510

511511
export const contestTableProviderGroups = {
512512
abcLatest20Rounds: prepareContestProviderPresets().ABCLatest20Rounds(),
513513
abc319Onwards: prepareContestProviderPresets().ABC319Onwards(),
514514
fromAbc212ToAbc318: prepareContestProviderPresets().ABC212ToABC318(),
515+
typical90: prepareContestProviderPresets().Typical90(),
515516
dps: prepareContestProviderPresets().dps(), // Dynamic Programming (DP) Contests
516517
joiFirstQualRound: prepareContestProviderPresets().JOIFirstQualRound(),
517-
typical90: prepareContestProviderPresets().Typical90(),
518518
};
519519

520520
export type ContestTableProviderGroups = keyof typeof contestTableProviderGroups;

0 commit comments

Comments
 (0)