@algoux/standard-ranklist-renderer-component-angular 0.6.3 → 0.6.5

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.
@@ -1,2 +1,2 @@
1
1
  export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL3R5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSB7XG4gIFByb2JsZW1TdGF0aXN0aWNzRm9vdGVyLFxuICBSYW5rVmFsdWUsXG4gIFJhbmtsaXN0Q29sdW1uVGl0bGVzLFxuICBSYW5rbGlzdFN0YXR1c0NlbGxQcmVzZXQsXG4gIFJhbmtsaXN0VXNlckF2YXRhclBsYWNlbWVudCxcbiAgU29sdXRpb25DbGlja1BheWxvYWQsXG4gIFN0YXRpY1JhbmtsaXN0LFxuICBTdGF0aWNSYW5rbGlzdFJvdyxcbiAgVXNlckNsaWNrUGF5bG9hZCxcbn0gZnJvbSAnQGFsZ291eC9zdGFuZGFyZC1yYW5rbGlzdC1yZW5kZXJlci1jb21wb25lbnQtY29yZSc7XG4iXX0=
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL3R5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSB7XG4gIFByb2JsZW1TdGF0aXN0aWNzRm9vdGVyLFxuICBQcm9ibGVtQ2xpY2tQYXlsb2FkLFxuICBSYW5rVmFsdWUsXG4gIFJhbmtsaXN0Q29sdW1uVGl0bGVzLFxuICBSYW5rbGlzdFN0YXR1c0NlbGxQcmVzZXQsXG4gIFJhbmtsaXN0VXNlckF2YXRhclBsYWNlbWVudCxcbiAgU29sdXRpb25DbGlja1BheWxvYWQsXG4gIFN0YXRpY1JhbmtsaXN0LFxuICBTdGF0aWNSYW5rbGlzdFJvdyxcbiAgVXNlckNsaWNrUGF5bG9hZCxcbn0gZnJvbSAnQGFsZ291eC9zdGFuZGFyZC1yYW5rbGlzdC1yZW5kZXJlci1jb21wb25lbnQtY29yZSc7XG4iXX0=
@@ -2,7 +2,7 @@ import * as i1 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
4
  import { EventEmitter, ViewChild, Output, Input, Component, inject, TemplateRef, Directive, ContentChild, ChangeDetectionStrategy } from '@angular/core';
5
- import { ensureModalInteractionTracker, unlockModalBodyScroll, SRK_ANIMATED_MODAL_ROOT_CLASS, resolveModalTransformOrigin, MODAL_ANIMATION_DURATION_MS, lockModalBodyScroll, registerModalFocusScope, unregisterModalFocusScope, formatSolutionTimestamp, getSolutionModalTitle, getSolutionResultMeta, getMarkerPresentation, resolveSrkAssetUrl, formatTeamMemberName, getProgressDurationMinutes, getProgressMaxAvailableMinutes, isProgressEnded, getProgressMetrics, srkSupportedVersions, calculateProblemStatisticsFooter, caniuse, shouldShowTimeColumn, getProblemHeaderBackgroundImage, calculateDirtPercentage, calculateSEValue, getRankProblemStatusCellPresentation, captureModalTriggerPointFromMouseEvent, formatProblemStatisticsAcceptedMinute, formatProblemStatisticsAverageHardness, formatProblemStatisticsPercent } from '@algoux/standard-ranklist-renderer-component-core';
5
+ import { ensureModalInteractionTracker, unlockModalBodyScroll, SRK_ANIMATED_MODAL_ROOT_CLASS, resolveModalTransformOrigin, MODAL_ANIMATION_DURATION_MS, lockModalBodyScroll, registerModalFocusScope, unregisterModalFocusScope, formatSolutionTimestamp, getSolutionModalTitle, getSolutionResultMeta, getMarkerPresentation, resolveSrkAssetUrl, formatTeamMemberName, getProgressDurationMinutes, getProgressMaxAvailableMinutes, isProgressEnded, getProgressMetrics, srkSupportedVersions, calculateProblemStatisticsFooter, caniuse, shouldShowTimeColumn, getProblemHeaderBackgroundImageIfStyled, calculateDirtPercentage, calculateSEValue, getRankProblemStatusCellPresentation, getRankProblemStatusCellClassName, captureModalTriggerPointFromMouseEvent, formatProblemStatisticsAcceptedMinute, formatProblemStatisticsAverageHardness, formatProblemStatisticsPercent } from '@algoux/standard-ranklist-renderer-component-core';
6
6
  import { EnumTheme, resolveUserMarkers, resolveText, secToTimeStr, numberToAlphabet, formatTimeDuration, resolveStyle } from '@algoux/standard-ranklist-utils';
7
7
 
8
8
  class ModalComponent {
@@ -820,6 +820,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
820
820
  type: Output
821
821
  }] } });
822
822
 
823
+ class SrkProblemHeaderCellTemplateDirective {
824
+ templateRef = inject(TemplateRef);
825
+ static ngTemplateContextGuard(_directive, context) {
826
+ return true;
827
+ }
828
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SrkProblemHeaderCellTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
829
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: SrkProblemHeaderCellTemplateDirective, isStandalone: true, selector: "ng-template[srkProblemHeaderCell]", ngImport: i0 });
830
+ }
831
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SrkProblemHeaderCellTemplateDirective, decorators: [{
832
+ type: Directive,
833
+ args: [{
834
+ selector: 'ng-template[srkProblemHeaderCell]',
835
+ standalone: true,
836
+ }]
837
+ }] });
838
+
823
839
  class SrkStatusCellTemplateDirective {
824
840
  templateRef = inject(TemplateRef);
825
841
  static ngTemplateContextGuard(_directive, context) {
@@ -870,7 +886,9 @@ class RanklistComponent {
870
886
  userAvatarPlacement = 'user';
871
887
  languages;
872
888
  userClick = new EventEmitter();
889
+ problemClick = new EventEmitter();
873
890
  solutionClick = new EventEmitter();
891
+ problemHeaderCellTemplate;
874
892
  statusCellTemplate;
875
893
  userCellTemplate;
876
894
  supportedVersions = srkSupportedVersions;
@@ -967,7 +985,7 @@ class RanklistComponent {
967
985
  return `${statistics.accepted} / ${statistics.submitted} (${ratio}%)`;
968
986
  }
969
987
  problemHeaderBackgroundImage(problem, gradientDirection = 180) {
970
- return getProblemHeaderBackgroundImage(problem.style, this.theme, gradientDirection);
988
+ return getProblemHeaderBackgroundImageIfStyled(problem.style, this.theme, gradientDirection);
971
989
  }
972
990
  resolvedUserMarkers(user) {
973
991
  return resolveUserMarkers(user, this.data.markers).map((marker) => ({
@@ -1004,17 +1022,9 @@ class RanklistComponent {
1004
1022
  if (this.statusColorAsText) {
1005
1023
  classNames.push('srk-prest-status-block-color-text');
1006
1024
  }
1007
- if (status.result === 'FB') {
1008
- classNames.push('srk-prest-status-block-fb');
1009
- }
1010
- else if (status.result === 'AC') {
1011
- classNames.push('srk-prest-status-block-accepted');
1012
- }
1013
- else if (status.result === '?') {
1014
- classNames.push('srk-prest-status-block-frozen');
1015
- }
1016
- else if (status.result === 'RJ') {
1017
- classNames.push('srk-prest-status-block-failed');
1025
+ const resultClassName = getRankProblemStatusCellClassName(status, this.data);
1026
+ if (resultClassName) {
1027
+ classNames.push(resultClassName);
1018
1028
  }
1019
1029
  return classNames.join(' ');
1020
1030
  }
@@ -1027,6 +1037,27 @@ class RanklistComponent {
1027
1037
  statusCellTabIndex(status) {
1028
1038
  return this.isStatusClickable(status) ? 0 : null;
1029
1039
  }
1040
+ hasProblemClickListener() {
1041
+ const emitter = this.problemClick;
1042
+ return emitter.observed === true || Boolean(emitter.observers?.length);
1043
+ }
1044
+ problemHeaderRole() {
1045
+ return this.hasProblemClickListener() ? 'button' : null;
1046
+ }
1047
+ problemHeaderTabIndex() {
1048
+ return this.hasProblemClickListener() ? 0 : null;
1049
+ }
1050
+ buildProblemHeaderCellContext(problem, problemIndex) {
1051
+ return {
1052
+ $implicit: problem,
1053
+ problem,
1054
+ problemIndex,
1055
+ index: problemIndex,
1056
+ ranklist: this.data,
1057
+ languages: this.languages,
1058
+ onClick: (event) => this.emitProblemClick(event, problem, problemIndex),
1059
+ };
1060
+ }
1030
1061
  buildUserCellContext(row, rowIndex) {
1031
1062
  return {
1032
1063
  $implicit: row.user,
@@ -1063,6 +1094,13 @@ class RanklistComponent {
1063
1094
  event.preventDefault();
1064
1095
  this.emitUserClick(undefined, row, rowIndex);
1065
1096
  }
1097
+ activateProblemHeaderFromKeyboard(event, problem, problemIndex) {
1098
+ if (!this.hasProblemClickListener()) {
1099
+ return;
1100
+ }
1101
+ event.preventDefault();
1102
+ this.emitProblemClick(undefined, problem, problemIndex);
1103
+ }
1066
1104
  activateStatusCellFromKeyboard(event, row, rowIndex, status, problemIndex) {
1067
1105
  event.preventDefault();
1068
1106
  this.emitSolutionClick(undefined, row, rowIndex, status, problemIndex);
@@ -1085,6 +1123,27 @@ class RanklistComponent {
1085
1123
  ranklist: this.data,
1086
1124
  });
1087
1125
  }
1126
+ emitProblemClick(event, problem, problemIndex) {
1127
+ if (!this.hasProblemClickListener()) {
1128
+ return;
1129
+ }
1130
+ if (event) {
1131
+ event.preventDefault();
1132
+ captureModalTriggerPointFromMouseEvent(event, {
1133
+ source: 'problem-header',
1134
+ context: {
1135
+ problemIndex,
1136
+ problemAlias: problem.alias || null,
1137
+ problemTitle: this.resolveDisplayText(problem.title) || null,
1138
+ },
1139
+ });
1140
+ }
1141
+ this.problemClick.emit({
1142
+ problem,
1143
+ problemIndex,
1144
+ ranklist: this.data,
1145
+ });
1146
+ }
1088
1147
  emitSolutionClick(event, row, rowIndex, status, problemIndex) {
1089
1148
  const solutions = this.getStatusSolutions(status);
1090
1149
  if (!solutions.length) {
@@ -1174,7 +1233,7 @@ class RanklistComponent {
1174
1233
  }
1175
1234
  }
1176
1235
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RanklistComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1177
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RanklistComponent, isStandalone: true, selector: "srk-ranklist", inputs: { data: "data", theme: "theme", rowBordered: "rowBordered", columnBordered: "columnBordered", rowStriped: "rowStriped", formatSrkAssetUrl: "formatSrkAssetUrl", splitOrganization: "splitOrganization", columnTitles: "columnTitles", statusCellPreset: "statusCellPreset", statusColorAsText: "statusColorAsText", showProblemStatisticsFooter: "showProblemStatisticsFooter", showDirtColumn: "showDirtColumn", showSEColumn: "showSEColumn", emptyStatusPlaceholder: "emptyStatusPlaceholder", userAvatarPlacement: "userAvatarPlacement", languages: "languages" }, outputs: { userClick: "userClick", solutionClick: "solutionClick" }, queries: [{ propertyName: "statusCellTemplate", first: true, predicate: SrkStatusCellTemplateDirective, descendants: true }, { propertyName: "userCellTemplate", first: true, predicate: SrkUserCellTemplateDirective, descendants: true }], ngImport: i0, template: `
1236
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RanklistComponent, isStandalone: true, selector: "srk-ranklist", inputs: { data: "data", theme: "theme", rowBordered: "rowBordered", columnBordered: "columnBordered", rowStriped: "rowStriped", formatSrkAssetUrl: "formatSrkAssetUrl", splitOrganization: "splitOrganization", columnTitles: "columnTitles", statusCellPreset: "statusCellPreset", statusColorAsText: "statusColorAsText", showProblemStatisticsFooter: "showProblemStatisticsFooter", showDirtColumn: "showDirtColumn", showSEColumn: "showSEColumn", emptyStatusPlaceholder: "emptyStatusPlaceholder", userAvatarPlacement: "userAvatarPlacement", languages: "languages" }, outputs: { userClick: "userClick", problemClick: "problemClick", solutionClick: "solutionClick" }, queries: [{ propertyName: "problemHeaderCellTemplate", first: true, predicate: SrkProblemHeaderCellTemplateDirective, descendants: true }, { propertyName: "statusCellTemplate", first: true, predicate: SrkStatusCellTemplateDirective, descendants: true }, { propertyName: "userCellTemplate", first: true, predicate: SrkUserCellTemplateDirective, descendants: true }], ngImport: i0, template: `
1178
1237
  <div *ngIf="data.type !== 'general'; else versionState">
1179
1238
  srk type "{{ data.type }}" is not supported
1180
1239
  </div>
@@ -1212,38 +1271,55 @@ class RanklistComponent {
1212
1271
  <th *ngIf="showTimeColumn()" class="srk--text-right srk--nowrap">
1213
1272
  {{ resolveColumnTitle('time', 'Time') }}
1214
1273
  </th>
1215
- <th
1274
+ <ng-container
1216
1275
  *ngFor="let problem of data.problems; let problemIndex = index"
1217
- class="srk--nowrap srk-problem-header"
1218
- [style.background-image]="problemHeaderBackgroundImage(problem)"
1219
1276
  >
1220
- <a
1221
- *ngIf="problem.link; else unlinkedProblemHeader"
1222
- [href]="problem.link"
1223
- target="_blank"
1224
- rel="noopener noreferrer"
1225
- style="color: unset"
1226
- >
1227
- <span class="srk--display-block">{{ problemAlias(problem, problemIndex) }}</span>
1228
- <span
1229
- *ngIf="problem.statistics"
1230
- class="srk--display-block srk-problem-stats"
1231
- [title]="problemStatsTitle(problem.statistics)"
1232
- >
1233
- {{ problem.statistics.accepted }}
1234
- </span>
1235
- </a>
1236
- <ng-template #unlinkedProblemHeader>
1237
- <span class="srk--display-block">{{ problemAlias(problem, problemIndex) }}</span>
1238
- <span
1239
- *ngIf="problem.statistics"
1240
- class="srk--display-block srk-problem-stats"
1241
- [title]="problemStatsTitle(problem.statistics)"
1277
+ <ng-container *ngIf="problemHeaderCellTemplate; else defaultProblemHeader">
1278
+ <ng-container
1279
+ [ngTemplateOutlet]="problemHeaderCellTemplate.templateRef"
1280
+ [ngTemplateOutletContext]="buildProblemHeaderCellContext(problem, problemIndex)"
1281
+ />
1282
+ </ng-container>
1283
+ <ng-template #defaultProblemHeader>
1284
+ <th
1285
+ class="srk--nowrap srk-problem-header"
1286
+ [class.srk--cursor-pointer]="hasProblemClickListener()"
1287
+ [attr.role]="problemHeaderRole()"
1288
+ [attr.tabindex]="problemHeaderTabIndex()"
1289
+ [style.background-image]="problemHeaderBackgroundImage(problem)"
1290
+ (click)="emitProblemClick($event, problem, problemIndex)"
1291
+ (keydown.enter)="activateProblemHeaderFromKeyboard($event, problem, problemIndex)"
1292
+ (keydown.space)="activateProblemHeaderFromKeyboard($event, problem, problemIndex)"
1242
1293
  >
1243
- {{ problem.statistics.accepted }}
1244
- </span>
1294
+ <a
1295
+ *ngIf="problem.link && !hasProblemClickListener(); else unlinkedProblemHeader"
1296
+ [href]="problem.link"
1297
+ target="_blank"
1298
+ rel="noopener noreferrer"
1299
+ style="color: unset"
1300
+ >
1301
+ <span class="srk--display-block">{{ problemAlias(problem, problemIndex) }}</span>
1302
+ <span
1303
+ *ngIf="problem.statistics"
1304
+ class="srk--display-block srk-problem-stats"
1305
+ [title]="problemStatsTitle(problem.statistics)"
1306
+ >
1307
+ {{ problem.statistics.accepted }}
1308
+ </span>
1309
+ </a>
1310
+ <ng-template #unlinkedProblemHeader>
1311
+ <span class="srk--display-block">{{ problemAlias(problem, problemIndex) }}</span>
1312
+ <span
1313
+ *ngIf="problem.statistics"
1314
+ class="srk--display-block srk-problem-stats"
1315
+ [title]="problemStatsTitle(problem.statistics)"
1316
+ >
1317
+ {{ problem.statistics.accepted }}
1318
+ </span>
1319
+ </ng-template>
1320
+ </th>
1245
1321
  </ng-template>
1246
- </th>
1322
+ </ng-container>
1247
1323
  <th *ngIf="showDirtColumn" class="srk-dirt-header srk--text-right srk--nowrap">
1248
1324
  {{ resolveColumnTitle('dirt', 'Dirt') }}
1249
1325
  </th>
@@ -1366,9 +1442,13 @@ class RanklistComponent {
1366
1442
  <ng-container *ngIf="statusPresentation(status) as presentation">
1367
1443
  <ng-container *ngIf="isNumber(presentation.score); else statusText">
1368
1444
  <span class="srk-prest-status-block-score">{{ presentation.score }}</span>
1369
- <span class="srk-prest-status-block-score-details">
1370
- {{ presentation.scoreDetails }}
1371
- </span>
1445
+ <ng-container *ngIf="presentation.scoreDetails !== undefined">
1446
+ <span [textContent]="statusSeparator"></span>
1447
+ <span
1448
+ class="srk-prest-status-block-score-details"
1449
+ [textContent]="presentation.scoreDetails"
1450
+ ></span>
1451
+ </ng-container>
1372
1452
  </ng-container>
1373
1453
  <ng-template #statusText>
1374
1454
  <ng-container *ngIf="presentation.secondary !== undefined; else singleStatus">
@@ -1391,12 +1471,24 @@ class RanklistComponent {
1391
1471
  (keydown.space)="activateStatusCellFromKeyboard($event, row, rowIndex, status, problemIndex)"
1392
1472
  >
1393
1473
  <ng-container *ngIf="statusPresentation(status) as presentation">
1394
- <ng-container *ngIf="presentation.secondary !== undefined; else singleStatus">
1395
- <span class="srk-prest-status-block-primary">{{ presentation.primary || '' }}</span>
1396
- <span [textContent]="statusSeparator"></span>
1397
- <span class="srk-prest-status-block-secondary">{{ presentation.secondary }}</span>
1474
+ <ng-container *ngIf="isNumber(presentation.score); else failedStatusText">
1475
+ <span class="srk-prest-status-block-score">{{ presentation.score }}</span>
1476
+ <ng-container *ngIf="presentation.scoreDetails !== undefined">
1477
+ <span [textContent]="statusSeparator"></span>
1478
+ <span
1479
+ class="srk-prest-status-block-score-details"
1480
+ [textContent]="presentation.scoreDetails"
1481
+ ></span>
1482
+ </ng-container>
1398
1483
  </ng-container>
1399
- <ng-template #singleStatus>{{ presentation.primary }}</ng-template>
1484
+ <ng-template #failedStatusText>
1485
+ <ng-container *ngIf="presentation.secondary !== undefined; else singleStatus">
1486
+ <span class="srk-prest-status-block-primary">{{ presentation.primary || '' }}</span>
1487
+ <span [textContent]="statusSeparator"></span>
1488
+ <span class="srk-prest-status-block-secondary">{{ presentation.secondary }}</span>
1489
+ </ng-container>
1490
+ <ng-template #singleStatus>{{ presentation.primary }}</ng-template>
1491
+ </ng-template>
1400
1492
  </ng-container>
1401
1493
  </td>
1402
1494
  </ng-template>
@@ -1535,38 +1627,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1535
1627
  <th *ngIf="showTimeColumn()" class="srk--text-right srk--nowrap">
1536
1628
  {{ resolveColumnTitle('time', 'Time') }}
1537
1629
  </th>
1538
- <th
1630
+ <ng-container
1539
1631
  *ngFor="let problem of data.problems; let problemIndex = index"
1540
- class="srk--nowrap srk-problem-header"
1541
- [style.background-image]="problemHeaderBackgroundImage(problem)"
1542
1632
  >
1543
- <a
1544
- *ngIf="problem.link; else unlinkedProblemHeader"
1545
- [href]="problem.link"
1546
- target="_blank"
1547
- rel="noopener noreferrer"
1548
- style="color: unset"
1549
- >
1550
- <span class="srk--display-block">{{ problemAlias(problem, problemIndex) }}</span>
1551
- <span
1552
- *ngIf="problem.statistics"
1553
- class="srk--display-block srk-problem-stats"
1554
- [title]="problemStatsTitle(problem.statistics)"
1555
- >
1556
- {{ problem.statistics.accepted }}
1557
- </span>
1558
- </a>
1559
- <ng-template #unlinkedProblemHeader>
1560
- <span class="srk--display-block">{{ problemAlias(problem, problemIndex) }}</span>
1561
- <span
1562
- *ngIf="problem.statistics"
1563
- class="srk--display-block srk-problem-stats"
1564
- [title]="problemStatsTitle(problem.statistics)"
1633
+ <ng-container *ngIf="problemHeaderCellTemplate; else defaultProblemHeader">
1634
+ <ng-container
1635
+ [ngTemplateOutlet]="problemHeaderCellTemplate.templateRef"
1636
+ [ngTemplateOutletContext]="buildProblemHeaderCellContext(problem, problemIndex)"
1637
+ />
1638
+ </ng-container>
1639
+ <ng-template #defaultProblemHeader>
1640
+ <th
1641
+ class="srk--nowrap srk-problem-header"
1642
+ [class.srk--cursor-pointer]="hasProblemClickListener()"
1643
+ [attr.role]="problemHeaderRole()"
1644
+ [attr.tabindex]="problemHeaderTabIndex()"
1645
+ [style.background-image]="problemHeaderBackgroundImage(problem)"
1646
+ (click)="emitProblemClick($event, problem, problemIndex)"
1647
+ (keydown.enter)="activateProblemHeaderFromKeyboard($event, problem, problemIndex)"
1648
+ (keydown.space)="activateProblemHeaderFromKeyboard($event, problem, problemIndex)"
1565
1649
  >
1566
- {{ problem.statistics.accepted }}
1567
- </span>
1650
+ <a
1651
+ *ngIf="problem.link && !hasProblemClickListener(); else unlinkedProblemHeader"
1652
+ [href]="problem.link"
1653
+ target="_blank"
1654
+ rel="noopener noreferrer"
1655
+ style="color: unset"
1656
+ >
1657
+ <span class="srk--display-block">{{ problemAlias(problem, problemIndex) }}</span>
1658
+ <span
1659
+ *ngIf="problem.statistics"
1660
+ class="srk--display-block srk-problem-stats"
1661
+ [title]="problemStatsTitle(problem.statistics)"
1662
+ >
1663
+ {{ problem.statistics.accepted }}
1664
+ </span>
1665
+ </a>
1666
+ <ng-template #unlinkedProblemHeader>
1667
+ <span class="srk--display-block">{{ problemAlias(problem, problemIndex) }}</span>
1668
+ <span
1669
+ *ngIf="problem.statistics"
1670
+ class="srk--display-block srk-problem-stats"
1671
+ [title]="problemStatsTitle(problem.statistics)"
1672
+ >
1673
+ {{ problem.statistics.accepted }}
1674
+ </span>
1675
+ </ng-template>
1676
+ </th>
1568
1677
  </ng-template>
1569
- </th>
1678
+ </ng-container>
1570
1679
  <th *ngIf="showDirtColumn" class="srk-dirt-header srk--text-right srk--nowrap">
1571
1680
  {{ resolveColumnTitle('dirt', 'Dirt') }}
1572
1681
  </th>
@@ -1689,9 +1798,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1689
1798
  <ng-container *ngIf="statusPresentation(status) as presentation">
1690
1799
  <ng-container *ngIf="isNumber(presentation.score); else statusText">
1691
1800
  <span class="srk-prest-status-block-score">{{ presentation.score }}</span>
1692
- <span class="srk-prest-status-block-score-details">
1693
- {{ presentation.scoreDetails }}
1694
- </span>
1801
+ <ng-container *ngIf="presentation.scoreDetails !== undefined">
1802
+ <span [textContent]="statusSeparator"></span>
1803
+ <span
1804
+ class="srk-prest-status-block-score-details"
1805
+ [textContent]="presentation.scoreDetails"
1806
+ ></span>
1807
+ </ng-container>
1695
1808
  </ng-container>
1696
1809
  <ng-template #statusText>
1697
1810
  <ng-container *ngIf="presentation.secondary !== undefined; else singleStatus">
@@ -1714,12 +1827,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1714
1827
  (keydown.space)="activateStatusCellFromKeyboard($event, row, rowIndex, status, problemIndex)"
1715
1828
  >
1716
1829
  <ng-container *ngIf="statusPresentation(status) as presentation">
1717
- <ng-container *ngIf="presentation.secondary !== undefined; else singleStatus">
1718
- <span class="srk-prest-status-block-primary">{{ presentation.primary || '' }}</span>
1719
- <span [textContent]="statusSeparator"></span>
1720
- <span class="srk-prest-status-block-secondary">{{ presentation.secondary }}</span>
1830
+ <ng-container *ngIf="isNumber(presentation.score); else failedStatusText">
1831
+ <span class="srk-prest-status-block-score">{{ presentation.score }}</span>
1832
+ <ng-container *ngIf="presentation.scoreDetails !== undefined">
1833
+ <span [textContent]="statusSeparator"></span>
1834
+ <span
1835
+ class="srk-prest-status-block-score-details"
1836
+ [textContent]="presentation.scoreDetails"
1837
+ ></span>
1838
+ </ng-container>
1721
1839
  </ng-container>
1722
- <ng-template #singleStatus>{{ presentation.primary }}</ng-template>
1840
+ <ng-template #failedStatusText>
1841
+ <ng-container *ngIf="presentation.secondary !== undefined; else singleStatus">
1842
+ <span class="srk-prest-status-block-primary">{{ presentation.primary || '' }}</span>
1843
+ <span [textContent]="statusSeparator"></span>
1844
+ <span class="srk-prest-status-block-secondary">{{ presentation.secondary }}</span>
1845
+ </ng-container>
1846
+ <ng-template #singleStatus>{{ presentation.primary }}</ng-template>
1847
+ </ng-template>
1723
1848
  </ng-container>
1724
1849
  </td>
1725
1850
  </ng-template>
@@ -1848,8 +1973,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1848
1973
  type: Input
1849
1974
  }], userClick: [{
1850
1975
  type: Output
1976
+ }], problemClick: [{
1977
+ type: Output
1851
1978
  }], solutionClick: [{
1852
1979
  type: Output
1980
+ }], problemHeaderCellTemplate: [{
1981
+ type: ContentChild,
1982
+ args: [SrkProblemHeaderCellTemplateDirective]
1853
1983
  }], statusCellTemplate: [{
1854
1984
  type: ContentChild,
1855
1985
  args: [SrkStatusCellTemplateDirective]
@@ -1862,5 +1992,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
1862
1992
  * Generated bundle index. Do not edit.
1863
1993
  */
1864
1994
 
1865
- export { DefaultSolutionModalComponent, DefaultUserModalComponent, ModalComponent, ProgressBarComponent, RanklistComponent, SrkStatusCellTemplateDirective, SrkUserCellTemplateDirective };
1995
+ export { DefaultSolutionModalComponent, DefaultUserModalComponent, ModalComponent, ProgressBarComponent, RanklistComponent, SrkProblemHeaderCellTemplateDirective, SrkStatusCellTemplateDirective, SrkUserCellTemplateDirective };
1866
1996
  //# sourceMappingURL=algoux-standard-ranklist-renderer-component-angular.mjs.map