@algoux/standard-ranklist-renderer-component-react 0.5.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/LICENSE +21 -0
- package/README.md +77 -0
- package/dist/DefaultSolutionModal.d.ts +12 -0
- package/dist/DefaultUserModal.d.ts +13 -0
- package/dist/MarkerLabel.d.ts +9 -0
- package/dist/Modal.d.ts +16 -0
- package/dist/ProgressBar.d.ts +48 -0
- package/dist/Ranklist.d.ts +51 -0
- package/dist/index.cjs +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1014 -0
- package/dist/internal/ProblemHeaderCell.d.ts +8 -0
- package/dist/internal/SolutionResultLabel.d.ts +5 -0
- package/dist/internal/SolutionTable.d.ts +5 -0
- package/dist/internal/StatusCell.d.ts +13 -0
- package/dist/internal/UserCell.d.ts +14 -0
- package/dist/internal/UserModalContent.d.ts +9 -0
- package/dist/main.d.ts +9 -0
- package/package.json +40 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type * as srk from '@algoux/standard-ranklist';
|
|
2
|
+
import { EnumTheme } from '@algoux/standard-ranklist-utils';
|
|
3
|
+
export interface ProblemHeaderCellProps {
|
|
4
|
+
problem: srk.Problem;
|
|
5
|
+
index: number;
|
|
6
|
+
theme: EnumTheme;
|
|
7
|
+
}
|
|
8
|
+
export declare function ProblemHeaderCell({ problem, index, theme }: ProblemHeaderCellProps): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as srk from '@algoux/standard-ranklist';
|
|
2
|
+
import type { SolutionClickPayload, StaticRanklist, StaticRanklistRow } from '@algoux/standard-ranklist-renderer-component-core';
|
|
3
|
+
export interface StatusCellProps {
|
|
4
|
+
status: srk.RankProblemStatus;
|
|
5
|
+
problem: srk.Problem | undefined;
|
|
6
|
+
problemIndex: number;
|
|
7
|
+
user: srk.User;
|
|
8
|
+
row: StaticRanklistRow;
|
|
9
|
+
rowIndex: number;
|
|
10
|
+
ranklist: StaticRanklist;
|
|
11
|
+
onSolutionClick?: (payload: SolutionClickPayload) => void | Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export declare function StatusCell({ status, problem, problemIndex, user, row, rowIndex, ranklist, onSolutionClick, }: StatusCellProps): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as srk from '@algoux/standard-ranklist';
|
|
2
|
+
import { EnumTheme } from '@algoux/standard-ranklist-utils';
|
|
3
|
+
import type { StaticRanklist, StaticRanklistRow, UserClickPayload } from '@algoux/standard-ranklist-renderer-component-core';
|
|
4
|
+
export interface UserCellProps {
|
|
5
|
+
user: srk.User;
|
|
6
|
+
row: StaticRanklistRow;
|
|
7
|
+
rowIndex: number;
|
|
8
|
+
ranklist: StaticRanklist;
|
|
9
|
+
markers?: srk.Marker[];
|
|
10
|
+
theme: EnumTheme;
|
|
11
|
+
formatSrkAssetUrl: (url: string, field: string) => string;
|
|
12
|
+
onUserClick?: (payload: UserClickPayload) => void | Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export declare function UserCell({ user, row, rowIndex, ranklist, markers, theme, formatSrkAssetUrl, onUserClick, }: UserCellProps): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as srk from '@algoux/standard-ranklist';
|
|
2
|
+
import { EnumTheme } from '@algoux/standard-ranklist-utils';
|
|
3
|
+
export interface UserModalContentProps {
|
|
4
|
+
user: srk.User;
|
|
5
|
+
userMarkers: srk.Marker[];
|
|
6
|
+
theme: EnumTheme;
|
|
7
|
+
formatSrkAssetUrl: (url: string, field: string) => string;
|
|
8
|
+
}
|
|
9
|
+
export declare function UserModalContent({ user, userMarkers, theme, formatSrkAssetUrl }: UserModalContentProps): JSX.Element;
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './Ranklist';
|
|
2
|
+
export * from './ProgressBar';
|
|
3
|
+
export * from './MarkerLabel';
|
|
4
|
+
export * from './Modal';
|
|
5
|
+
export * from './DefaultUserModal';
|
|
6
|
+
export * from './DefaultSolutionModal';
|
|
7
|
+
export { caniuse, srkSupportedVersions } from '@algoux/standard-ranklist-renderer-component-core';
|
|
8
|
+
export type { SolutionClickPayload, UserClickPayload } from '@algoux/standard-ranklist-renderer-component-core';
|
|
9
|
+
export { convertToStaticRanklist } from '@algoux/standard-ranklist-utils';
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@algoux/standard-ranklist-renderer-component-react",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "React components for Standard Ranklist Renderer Component",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"main": "./dist/index.cjs",
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"require": "./dist/index.cjs",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public",
|
|
22
|
+
"registry": "https://registry.npmjs.org/"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@algoux/standard-ranklist-utils": "^0.2.11",
|
|
26
|
+
"classnames": "^2.3.1",
|
|
27
|
+
"@algoux/standard-ranklist-renderer-component-core": "0.5.0",
|
|
28
|
+
"@algoux/standard-ranklist-renderer-component-styles": "0.5.0"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@algoux/standard-ranklist": "*",
|
|
32
|
+
"react": ">=16.9.0",
|
|
33
|
+
"react-dom": ">=16.9.0"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "vite build --config vite.config.ts",
|
|
37
|
+
"dev": "vite --config vite.config.ts",
|
|
38
|
+
"preview": "vite preview --config vite.config.ts"
|
|
39
|
+
}
|
|
40
|
+
}
|