react-mutation-mapper 0.8.51 → 0.8.52

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/dist/index.es.js CHANGED
@@ -451,6 +451,15 @@ function getTumorTypeName(tumorType) {
451
451
  return '';
452
452
  }
453
453
  }
454
+ function getTumorTypeNameWithExclusionInfo(tumorType, excludedTumorTypes) {
455
+ var name = getTumorTypeName(tumorType);
456
+ if (!___default.isEmpty(excludedTumorTypes)) {
457
+ name = name + " (excluding " + excludedTumorTypes
458
+ .map(function (ett) { return getTumorTypeName(ett); })
459
+ .join(', ') + ")";
460
+ }
461
+ return name;
462
+ }
454
463
  function groupOncoKbIndicatorDataByMutations(mutationsByPosition, oncoKbData, getTumorType, getEntrezGeneId, filter) {
455
464
  var indicatorMap = {};
456
465
  ___default.keys(mutationsByPosition).forEach(function (key) {
@@ -1282,7 +1291,7 @@ var OncoKbTreatmentTable = /** @class */ (function (_super) {
1282
1291
  "cancer type(s)")),
1283
1292
  accessor: 'levelAssociatedCancerType',
1284
1293
  minWidth: 120,
1285
- Cell: function (props) { return (React.createElement("div", { style: { whiteSpace: 'normal', lineHeight: '1rem' } }, getTumorTypeName(props.original.levelAssociatedCancerType))); },
1294
+ Cell: function (props) { return (React.createElement("div", { style: { whiteSpace: 'normal', lineHeight: '1rem' } }, getTumorTypeNameWithExclusionInfo(props.original.levelAssociatedCancerType, props.original.levelExcludedCancerTypes))); },
1286
1295
  },
1287
1296
  {
1288
1297
  id: 'referenceList',
@@ -8300,7 +8309,7 @@ function generateLevelData(indicatorData) {
8300
8309
  var parts = treatment.level.split('_');
8301
8310
  var level = parts.length === 2 ? parts[1] : treatment.level;
8302
8311
  levels[level] = levels[level] || [];
8303
- levels[level].push(getTumorTypeName(treatment.levelAssociatedCancerType));
8312
+ levels[level].push(getTumorTypeNameWithExclusionInfo(treatment.levelAssociatedCancerType, treatment.levelExcludedCancerTypes));
8304
8313
  });
8305
8314
  });
8306
8315
  return ___default.keys(levels)