@algoux/standard-ranklist-renderer-component-angular 0.6.2 → 0.6.4

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.
Files changed (26) hide show
  1. package/README.md +13 -0
  2. package/dist/README.md +13 -0
  3. package/dist/esm2022/lib/index.mjs +2 -1
  4. package/dist/esm2022/lib/modal/default-solution-modal.component.mjs +6 -3
  5. package/dist/esm2022/lib/modal/default-user-modal.component.mjs +23 -15
  6. package/dist/esm2022/lib/progress/progress-utils.mjs +2 -45
  7. package/dist/esm2022/lib/ranklist/problem-header-cell-template.directive.mjs +18 -0
  8. package/dist/esm2022/lib/ranklist/ranklist-utils.mjs +2 -110
  9. package/dist/esm2022/lib/ranklist/ranklist.component.mjs +161 -65
  10. package/dist/esm2022/lib/ranklist/status-cell-template.directive.mjs +1 -1
  11. package/dist/esm2022/lib/ranklist/user-cell-template.directive.mjs +1 -1
  12. package/dist/esm2022/lib/types.mjs +1 -1
  13. package/dist/fesm2022/algoux-standard-ranklist-renderer-component-angular.mjs +208 -238
  14. package/dist/fesm2022/algoux-standard-ranklist-renderer-component-angular.mjs.map +1 -1
  15. package/dist/lib/index.d.ts +2 -1
  16. package/dist/lib/modal/default-solution-modal.component.d.ts +2 -1
  17. package/dist/lib/modal/default-user-modal.component.d.ts +5 -3
  18. package/dist/lib/progress/progress-bar.component.d.ts +1 -1
  19. package/dist/lib/progress/progress-utils.d.ts +1 -15
  20. package/dist/lib/ranklist/problem-header-cell-template.directive.d.ts +20 -0
  21. package/dist/lib/ranklist/ranklist-utils.d.ts +1 -22
  22. package/dist/lib/ranklist/ranklist.component.d.ts +12 -2
  23. package/dist/lib/ranklist/status-cell-template.directive.d.ts +1 -0
  24. package/dist/lib/ranklist/user-cell-template.directive.d.ts +1 -0
  25. package/dist/lib/types.d.ts +1 -29
  26. package/package.json +3 -3
@@ -2,7 +2,8 @@ import type * as srk from '@algoux/standard-ranklist';
2
2
  import { EventEmitter } from '@angular/core';
3
3
  import { EnumTheme, formatTimeDuration, resolveText } from '@algoux/standard-ranklist-utils';
4
4
  import type { ProblemStatisticsFooter, RanklistColumnTitles, RanklistStatusCellPreset, RanklistUserAvatarPlacement } from '@algoux/standard-ranklist-renderer-component-core';
5
- import type { RankValue, SolutionClickPayload, StaticRanklist, StaticRanklistRow, UserClickPayload } from '../types';
5
+ import type { ProblemClickPayload, RankValue, SolutionClickPayload, StaticRanklist, StaticRanklistRow, UserClickPayload } from '../types';
6
+ import { SrkProblemHeaderCellTemplateDirective, type ProblemHeaderCellTemplateContext } from './problem-header-cell-template.directive';
6
7
  import { SrkStatusCellTemplateDirective, type StatusCellTemplateContext } from './status-cell-template.directive';
7
8
  import { SrkUserCellTemplateDirective, type UserCellTemplateContext } from './user-cell-template.directive';
8
9
  import * as i0 from "@angular/core";
@@ -22,8 +23,11 @@ export declare class RanklistComponent {
22
23
  showSEColumn: boolean;
23
24
  emptyStatusPlaceholder: string | null;
24
25
  userAvatarPlacement: RanklistUserAvatarPlacement;
26
+ languages?: readonly string[];
25
27
  userClick: EventEmitter<UserClickPayload>;
28
+ problemClick: EventEmitter<ProblemClickPayload>;
26
29
  solutionClick: EventEmitter<SolutionClickPayload>;
30
+ problemHeaderCellTemplate?: SrkProblemHeaderCellTemplateDirective;
27
31
  statusCellTemplate?: SrkStatusCellTemplateDirective;
28
32
  userCellTemplate?: SrkUserCellTemplateDirective;
29
33
  readonly supportedVersions: any;
@@ -64,11 +68,17 @@ export declare class RanklistComponent {
64
68
  isStatusClickable(status: srk.RankProblemStatus): boolean;
65
69
  statusCellRole(status: srk.RankProblemStatus): string;
66
70
  statusCellTabIndex(status: srk.RankProblemStatus): number;
71
+ hasProblemClickListener(): boolean;
72
+ problemHeaderRole(): string;
73
+ problemHeaderTabIndex(): number;
74
+ buildProblemHeaderCellContext(problem: srk.Problem, problemIndex: number): ProblemHeaderCellTemplateContext;
67
75
  buildUserCellContext(row: StaticRanklistRow, rowIndex: number): UserCellTemplateContext;
68
76
  buildStatusCellContext(row: StaticRanklistRow, rowIndex: number, status: srk.RankProblemStatus, problemIndex: number): StatusCellTemplateContext;
69
77
  activateUserCellFromKeyboard(event: Event, row: StaticRanklistRow, rowIndex: number): void;
78
+ activateProblemHeaderFromKeyboard(event: Event, problem: srk.Problem, problemIndex: number): void;
70
79
  activateStatusCellFromKeyboard(event: Event, row: StaticRanklistRow, rowIndex: number, status: srk.RankProblemStatus, problemIndex: number): void;
71
80
  emitUserClick(event: MouseEvent | undefined, row: StaticRanklistRow, rowIndex: number): void;
81
+ emitProblemClick(event: MouseEvent | undefined, problem: srk.Problem, problemIndex: number): void;
72
82
  emitSolutionClick(event: MouseEvent | undefined, row: StaticRanklistRow, rowIndex: number, status: srk.RankProblemStatus, problemIndex: number): void;
73
83
  private resolveSeriesSegment;
74
84
  isSeriesSegmentedColumn(series: srk.RankSeries | undefined): boolean;
@@ -83,5 +93,5 @@ export declare class RanklistComponent {
83
93
  getProblemStatisticsFooterCellPrimary(key: string, stat: ProblemStatisticsFooter): string | number;
84
94
  getProblemStatisticsFooterCellSecondary(key: string, stat: ProblemStatisticsFooter): string;
85
95
  static ɵfac: i0.ɵɵFactoryDeclaration<RanklistComponent, never>;
86
- static ɵcmp: i0.ɵɵComponentDeclaration<RanklistComponent, "srk-ranklist", never, { "data": { "alias": "data"; "required": true; }; "theme": { "alias": "theme"; "required": false; }; "rowBordered": { "alias": "rowBordered"; "required": false; }; "columnBordered": { "alias": "columnBordered"; "required": false; }; "rowStriped": { "alias": "rowStriped"; "required": false; }; "formatSrkAssetUrl": { "alias": "formatSrkAssetUrl"; "required": false; }; "splitOrganization": { "alias": "splitOrganization"; "required": false; }; "columnTitles": { "alias": "columnTitles"; "required": false; }; "statusCellPreset": { "alias": "statusCellPreset"; "required": false; }; "statusColorAsText": { "alias": "statusColorAsText"; "required": false; }; "showProblemStatisticsFooter": { "alias": "showProblemStatisticsFooter"; "required": false; }; "showDirtColumn": { "alias": "showDirtColumn"; "required": false; }; "showSEColumn": { "alias": "showSEColumn"; "required": false; }; "emptyStatusPlaceholder": { "alias": "emptyStatusPlaceholder"; "required": false; }; "userAvatarPlacement": { "alias": "userAvatarPlacement"; "required": false; }; }, { "userClick": "userClick"; "solutionClick": "solutionClick"; }, ["statusCellTemplate", "userCellTemplate"], never, true, never>;
96
+ static ɵcmp: i0.ɵɵComponentDeclaration<RanklistComponent, "srk-ranklist", never, { "data": { "alias": "data"; "required": true; }; "theme": { "alias": "theme"; "required": false; }; "rowBordered": { "alias": "rowBordered"; "required": false; }; "columnBordered": { "alias": "columnBordered"; "required": false; }; "rowStriped": { "alias": "rowStriped"; "required": false; }; "formatSrkAssetUrl": { "alias": "formatSrkAssetUrl"; "required": false; }; "splitOrganization": { "alias": "splitOrganization"; "required": false; }; "columnTitles": { "alias": "columnTitles"; "required": false; }; "statusCellPreset": { "alias": "statusCellPreset"; "required": false; }; "statusColorAsText": { "alias": "statusColorAsText"; "required": false; }; "showProblemStatisticsFooter": { "alias": "showProblemStatisticsFooter"; "required": false; }; "showDirtColumn": { "alias": "showDirtColumn"; "required": false; }; "showSEColumn": { "alias": "showSEColumn"; "required": false; }; "emptyStatusPlaceholder": { "alias": "emptyStatusPlaceholder"; "required": false; }; "userAvatarPlacement": { "alias": "userAvatarPlacement"; "required": false; }; "languages": { "alias": "languages"; "required": false; }; }, { "userClick": "userClick"; "problemClick": "problemClick"; "solutionClick": "solutionClick"; }, ["problemHeaderCellTemplate", "statusCellTemplate", "userCellTemplate"], never, true, never>;
87
97
  }
@@ -15,6 +15,7 @@ export interface StatusCellTemplateContext {
15
15
  statusCellPreset?: RanklistStatusCellPreset;
16
16
  statusColorAsText?: boolean;
17
17
  emptyStatusPlaceholder?: string | null;
18
+ languages?: readonly string[];
18
19
  onClick: (event?: MouseEvent) => void;
19
20
  }
20
21
  export declare class SrkStatusCellTemplateDirective {
@@ -11,6 +11,7 @@ export interface UserCellTemplateContext {
11
11
  markers: srk.Marker[];
12
12
  hideOrganization?: boolean;
13
13
  hideAvatar?: boolean;
14
+ languages?: readonly string[];
14
15
  onClick: (event?: MouseEvent) => void;
15
16
  }
16
17
  export declare class SrkUserCellTemplateDirective {
@@ -1,29 +1 @@
1
- import type * as srk from '@algoux/standard-ranklist';
2
- import type { ProblemStatisticsFooter, RanklistColumnTitles, RanklistStatusCellPreset, RanklistUserAvatarPlacement } from '@algoux/standard-ranklist-renderer-component-core';
3
- export interface RankValue {
4
- rank: number | null;
5
- segmentIndex?: number | null;
6
- }
7
- export type StaticRanklist = Omit<srk.Ranklist, 'rows'> & {
8
- rows: Array<srk.RanklistRow & {
9
- rankValues: RankValue[];
10
- }>;
11
- };
12
- export type StaticRanklistRow = StaticRanklist['rows'][number];
13
- export interface UserClickPayload {
14
- user: srk.User;
15
- row: StaticRanklistRow;
16
- rowIndex: number;
17
- ranklist: StaticRanklist;
18
- }
19
- export interface SolutionClickPayload {
20
- user: srk.User;
21
- row: StaticRanklistRow;
22
- rowIndex: number;
23
- problemIndex: number;
24
- problem: srk.Problem | undefined;
25
- status: srk.RankProblemStatus;
26
- solutions: srk.Solution[];
27
- ranklist: StaticRanklist;
28
- }
29
- export type { ProblemStatisticsFooter, RanklistColumnTitles, RanklistStatusCellPreset, RanklistUserAvatarPlacement, };
1
+ export type { ProblemStatisticsFooter, ProblemClickPayload, RankValue, RanklistColumnTitles, RanklistStatusCellPreset, RanklistUserAvatarPlacement, SolutionClickPayload, StaticRanklist, StaticRanklistRow, UserClickPayload, } from '@algoux/standard-ranklist-renderer-component-core';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algoux/standard-ranklist-renderer-component-angular",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "Angular components for Standard Ranklist Renderer Component",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/algoux/standard-ranklist-renderer-component",
@@ -32,9 +32,9 @@
32
32
  "registry": "https://registry.npmjs.org/"
33
33
  },
34
34
  "dependencies": {
35
- "@algoux/standard-ranklist-utils": "^0.2.11",
35
+ "@algoux/standard-ranklist-utils": "^0.3.1",
36
36
  "tslib": "^2.3.0",
37
- "@algoux/standard-ranklist-renderer-component-core": "0.6.1"
37
+ "@algoux/standard-ranklist-renderer-component-core": "0.6.3"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@algoux/standard-ranklist": "*",