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.js CHANGED
@@ -488,6 +488,15 @@ function getTumorTypeName(tumorType) {
488
488
  return '';
489
489
  }
490
490
  }
491
+ function getTumorTypeNameWithExclusionInfo(tumorType, excludedTumorTypes) {
492
+ var name = getTumorTypeName(tumorType);
493
+ if (!___default["default"].isEmpty(excludedTumorTypes)) {
494
+ name = name + " (excluding " + excludedTumorTypes
495
+ .map(function (ett) { return getTumorTypeName(ett); })
496
+ .join(', ') + ")";
497
+ }
498
+ return name;
499
+ }
491
500
  function groupOncoKbIndicatorDataByMutations(mutationsByPosition, oncoKbData, getTumorType, getEntrezGeneId, filter) {
492
501
  var indicatorMap = {};
493
502
  ___default["default"].keys(mutationsByPosition).forEach(function (key) {
@@ -1319,7 +1328,7 @@ var OncoKbTreatmentTable = /** @class */ (function (_super) {
1319
1328
  "cancer type(s)")),
1320
1329
  accessor: 'levelAssociatedCancerType',
1321
1330
  minWidth: 120,
1322
- Cell: function (props) { return (React__namespace.createElement("div", { style: { whiteSpace: 'normal', lineHeight: '1rem' } }, getTumorTypeName(props.original.levelAssociatedCancerType))); },
1331
+ Cell: function (props) { return (React__namespace.createElement("div", { style: { whiteSpace: 'normal', lineHeight: '1rem' } }, getTumorTypeNameWithExclusionInfo(props.original.levelAssociatedCancerType, props.original.levelExcludedCancerTypes))); },
1323
1332
  },
1324
1333
  {
1325
1334
  id: 'referenceList',
@@ -8337,7 +8346,7 @@ function generateLevelData(indicatorData) {
8337
8346
  var parts = treatment.level.split('_');
8338
8347
  var level = parts.length === 2 ? parts[1] : treatment.level;
8339
8348
  levels[level] = levels[level] || [];
8340
- levels[level].push(getTumorTypeName(treatment.levelAssociatedCancerType));
8349
+ levels[level].push(getTumorTypeNameWithExclusionInfo(treatment.levelAssociatedCancerType, treatment.levelExcludedCancerTypes));
8341
8350
  });
8342
8351
  });
8343
8352
  return ___default["default"].keys(levels)