@algoux/standard-ranklist-renderer-component-angular 0.5.1 → 0.6.1
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/README.md +48 -0
- package/dist/README.md +48 -0
- package/dist/esm2022/lib/index.mjs +1 -1
- package/dist/esm2022/lib/ranklist/ranklist.component.mjs +464 -44
- package/dist/esm2022/lib/ranklist/status-cell-template.directive.mjs +1 -1
- package/dist/esm2022/lib/ranklist/user-cell-template.directive.mjs +1 -1
- package/dist/esm2022/lib/types.mjs +1 -1
- package/dist/fesm2022/algoux-standard-ranklist-renderer-component-angular.mjs +466 -46
- package/dist/fesm2022/algoux-standard-ranklist-renderer-component-angular.mjs.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/ranklist/ranklist.component.d.ts +35 -4
- package/dist/lib/ranklist/status-cell-template.directive.d.ts +4 -1
- package/dist/lib/ranklist/user-cell-template.directive.d.ts +2 -0
- package/dist/lib/types.d.ts +2 -0
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -98,3 +98,51 @@ export class BoardComponent {
|
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
Use `ModalComponent` directly when you want custom modal content. `SrkUserCellTemplateDirective` and `SrkStatusCellTemplateDirective` let you replace selected ranklist table cells with Angular templates.
|
|
101
|
+
|
|
102
|
+
## Ranklist Render Options
|
|
103
|
+
|
|
104
|
+
`RanklistComponent` includes optional render inputs for changing the table structure and status presentation while keeping the default behavior unchanged:
|
|
105
|
+
|
|
106
|
+
- `splitOrganization`: moves user organization into its own column before the user column.
|
|
107
|
+
- `columnTitles`: overrides text labels for series, organization, user, score, time, Dirt, and SE columns.
|
|
108
|
+
- `statusCellPreset`: uses `classic`, `detailed`, `minimal`, or `compact` status cell content.
|
|
109
|
+
- `statusColorAsText`: uses bold status-colored text instead of colored cell backgrounds.
|
|
110
|
+
- `showProblemStatisticsFooter`: appends a DOMjudge-style per-problem statistics footer.
|
|
111
|
+
- `showDirtColumn`: appends a Dirt percentage column after problem columns.
|
|
112
|
+
- `showSEColumn`: appends a contestant SE column after problem columns, placed after Dirt when both are enabled.
|
|
113
|
+
- `rowBordered`: adds row separators controlled by CSS variables.
|
|
114
|
+
- `columnBordered`: adds column separators controlled by CSS variables.
|
|
115
|
+
- `emptyStatusPlaceholder`: renders a custom string in no-submission status cells.
|
|
116
|
+
- `userAvatarPlacement`: chooses whether the default user avatar renders in the user column or, when `splitOrganization` is enabled, in the organization column.
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import type { RanklistColumnTitles } from '@algoux/standard-ranklist-renderer-component-angular';
|
|
120
|
+
|
|
121
|
+
export class BoardComponent {
|
|
122
|
+
readonly columnTitles: RanklistColumnTitles = {
|
|
123
|
+
organization: 'Org',
|
|
124
|
+
user: 'Team',
|
|
125
|
+
score: 'Solved',
|
|
126
|
+
time: 'Penalty',
|
|
127
|
+
dirt: 'Dirt',
|
|
128
|
+
se: 'SE',
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<srk-ranklist
|
|
135
|
+
[data]="staticRanklist"
|
|
136
|
+
[splitOrganization]="true"
|
|
137
|
+
[showProblemStatisticsFooter]="true"
|
|
138
|
+
[showDirtColumn]="true"
|
|
139
|
+
[showSEColumn]="true"
|
|
140
|
+
[statusCellPreset]="'compact'"
|
|
141
|
+
[statusColorAsText]="true"
|
|
142
|
+
[rowBordered]="true"
|
|
143
|
+
[columnBordered]="true"
|
|
144
|
+
[emptyStatusPlaceholder]="'·'"
|
|
145
|
+
[userAvatarPlacement]="'organization'"
|
|
146
|
+
[columnTitles]="columnTitles"
|
|
147
|
+
></srk-ranklist>
|
|
148
|
+
```
|
package/dist/README.md
CHANGED
|
@@ -98,3 +98,51 @@ export class BoardComponent {
|
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
Use `ModalComponent` directly when you want custom modal content. `SrkUserCellTemplateDirective` and `SrkStatusCellTemplateDirective` let you replace selected ranklist table cells with Angular templates.
|
|
101
|
+
|
|
102
|
+
## Ranklist Render Options
|
|
103
|
+
|
|
104
|
+
`RanklistComponent` includes optional render inputs for changing the table structure and status presentation while keeping the default behavior unchanged:
|
|
105
|
+
|
|
106
|
+
- `splitOrganization`: moves user organization into its own column before the user column.
|
|
107
|
+
- `columnTitles`: overrides text labels for series, organization, user, score, time, Dirt, and SE columns.
|
|
108
|
+
- `statusCellPreset`: uses `classic`, `detailed`, `minimal`, or `compact` status cell content.
|
|
109
|
+
- `statusColorAsText`: uses bold status-colored text instead of colored cell backgrounds.
|
|
110
|
+
- `showProblemStatisticsFooter`: appends a DOMjudge-style per-problem statistics footer.
|
|
111
|
+
- `showDirtColumn`: appends a Dirt percentage column after problem columns.
|
|
112
|
+
- `showSEColumn`: appends a contestant SE column after problem columns, placed after Dirt when both are enabled.
|
|
113
|
+
- `rowBordered`: adds row separators controlled by CSS variables.
|
|
114
|
+
- `columnBordered`: adds column separators controlled by CSS variables.
|
|
115
|
+
- `emptyStatusPlaceholder`: renders a custom string in no-submission status cells.
|
|
116
|
+
- `userAvatarPlacement`: chooses whether the default user avatar renders in the user column or, when `splitOrganization` is enabled, in the organization column.
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import type { RanklistColumnTitles } from '@algoux/standard-ranklist-renderer-component-angular';
|
|
120
|
+
|
|
121
|
+
export class BoardComponent {
|
|
122
|
+
readonly columnTitles: RanklistColumnTitles = {
|
|
123
|
+
organization: 'Org',
|
|
124
|
+
user: 'Team',
|
|
125
|
+
score: 'Solved',
|
|
126
|
+
time: 'Penalty',
|
|
127
|
+
dirt: 'Dirt',
|
|
128
|
+
se: 'SE',
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<srk-ranklist
|
|
135
|
+
[data]="staticRanklist"
|
|
136
|
+
[splitOrganization]="true"
|
|
137
|
+
[showProblemStatisticsFooter]="true"
|
|
138
|
+
[showDirtColumn]="true"
|
|
139
|
+
[showSEColumn]="true"
|
|
140
|
+
[statusCellPreset]="'compact'"
|
|
141
|
+
[statusColorAsText]="true"
|
|
142
|
+
[rowBordered]="true"
|
|
143
|
+
[columnBordered]="true"
|
|
144
|
+
[emptyStatusPlaceholder]="'·'"
|
|
145
|
+
[userAvatarPlacement]="'organization'"
|
|
146
|
+
[columnTitles]="columnTitles"
|
|
147
|
+
></srk-ranklist>
|
|
148
|
+
```
|
|
@@ -5,4 +5,4 @@ export { ProgressBarComponent } from './progress/progress-bar.component';
|
|
|
5
5
|
export { RanklistComponent } from './ranklist/ranklist.component';
|
|
6
6
|
export { SrkStatusCellTemplateDirective, } from './ranklist/status-cell-template.directive';
|
|
7
7
|
export { SrkUserCellTemplateDirective, } from './ranklist/user-cell-template.directive';
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCw2QkFBNkIsR0FDOUIsTUFBTSwwQ0FBMEMsQ0FBQztBQUNsRCxPQUFPLEVBQ0wseUJBQXlCLEdBQzFCLE1BQU0sc0NBQXNDLENBQUM7QUFDOUMsT0FBTyxFQUNMLGNBQWMsR0FFZixNQUFNLHlCQUF5QixDQUFDO0FBQ2pDLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLG1DQUFtQyxDQUFDO0FBQ3pFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQ2xFLE9BQU8sRUFDTCw4QkFBOEIsR0FFL0IsTUFBTSwyQ0FBMkMsQ0FBQztBQUNuRCxPQUFPLEVBQ0wsNEJBQT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