mapa-library-ui 2.8.0 → 2.9.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.
@@ -9311,8 +9311,11 @@ class MapaReportRankingTableContentComponent {
9311
9311
  return this.cell(row, key)?.classification;
9312
9312
  }
9313
9313
  value(row, key) {
9314
- const value = this.cell(row, key)?.value;
9315
- return value === undefined || value === null ? '-' : `${value}`;
9314
+ const cell = this.cell(row, key);
9315
+ const value = cell?.value;
9316
+ return value === undefined || value === null
9317
+ ? '-'
9318
+ : `${value}${cell?.unit ?? ''}`;
9316
9319
  }
9317
9320
  hasClassification(row, key) {
9318
9321
  return !!this.classification(row, key);
@@ -9359,13 +9362,17 @@ class MapaReportRankingTableContentComponent {
9359
9362
  }
9360
9363
  /**
9361
9364
  * Dimensions sort by classification rank so the columns order by severity,
9362
- * not by the label that happens to be printed in the chip.
9365
+ * not by the label that happens to be printed in the chip. Cells without a
9366
+ * classification sort by their value — numeric or, for plain text columns,
9367
+ * the text itself.
9363
9368
  */
9364
9369
  sortValue(row, key) {
9365
9370
  const cell = this.cell(row, key);
9366
9371
  if (cell) {
9367
9372
  return (cell.classification?.classificationId ??
9368
- (typeof cell.value === 'number' ? cell.value : 0));
9373
+ (typeof cell.value === 'number' || typeof cell.value === 'string'
9374
+ ? cell.value
9375
+ : 0));
9369
9376
  }
9370
9377
  const value = row[key];
9371
9378
  return typeof value === 'number' || typeof value === 'string' ? value : '';