react-mutation-mapper 0.8.25 → 0.8.29

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
@@ -14,10 +14,10 @@ var cbioportalFrontendCommons = require('cbioportal-frontend-commons');
14
14
  var cbioportalUtils = require('cbioportal-utils');
15
15
  var classnames = _interopDefault(require('classnames'));
16
16
  var autobind = _interopDefault(require('autobind-decorator'));
17
- var reactCollapse = require('react-collapse');
18
17
  var reactBootstrap = require('react-bootstrap');
19
- var reactIf = require('react-if');
18
+ var reactCollapse = require('react-collapse');
20
19
  var ReactTable = _interopDefault(require('react-table'));
20
+ var reactIf = require('react-if');
21
21
  var genomeNexusTsApiClient = require('genome-nexus-ts-api-client');
22
22
  var oncokbTsApiClient = require('oncokb-ts-api-client');
23
23
  var Select = require('react-select');
@@ -413,6 +413,12 @@ function normalizeLevel(level) {
413
413
  return null;
414
414
  }
415
415
  }
416
+ function normalizeOncogenicity(oncogenicity) {
417
+ return (oncogenicity || 'unknown')
418
+ .trim()
419
+ .toLowerCase()
420
+ .replace(/\s/, '-');
421
+ }
416
422
  function levelIconClassNames(level) {
417
423
  if (level) {
418
424
  return "oncokb icon level-" + level;
@@ -420,13 +426,32 @@ function levelIconClassNames(level) {
420
426
  return '';
421
427
  }
422
428
  function oncogenicityIconClassNames(oncogenicity) {
423
- if (!oncogenicity) {
424
- oncogenicity = 'unknown';
429
+ return "oncokb icon " + normalizeOncogenicity(oncogenicity);
430
+ }
431
+ function annotationIconClassNames(type, highestLevel, indicator) {
432
+ return type === cbioportalUtils.OncoKbCardDataType.BIOLOGICAL
433
+ ? oncogenicityIconClassNames((indicator === null || indicator === void 0 ? void 0 : indicator.oncogenic) || '')
434
+ : levelIconClassNames(normalizeLevel(highestLevel) || '');
435
+ }
436
+ function calcHighestIndicatorLevel(type, indicator) {
437
+ var highestLevel = '';
438
+ if (indicator) {
439
+ switch (type) {
440
+ case cbioportalUtils.OncoKbCardDataType.TXS:
441
+ highestLevel = indicator.highestSensitiveLevel;
442
+ break;
443
+ case cbioportalUtils.OncoKbCardDataType.TXR:
444
+ highestLevel = indicator.highestResistanceLevel;
445
+ break;
446
+ case cbioportalUtils.OncoKbCardDataType.DX:
447
+ highestLevel = indicator.highestDiagnosticImplicationLevel;
448
+ break;
449
+ case cbioportalUtils.OncoKbCardDataType.PX:
450
+ highestLevel = indicator.highestPrognosticImplicationLevel;
451
+ break;
452
+ }
425
453
  }
426
- return "oncokb icon " + oncogenicity
427
- .trim()
428
- .toLowerCase()
429
- .replace(/\s/, '-');
454
+ return highestLevel;
430
455
  }
431
456
  function calcOncogenicScore(oncogenic) {
432
457
  return ONCOGENIC_SCORE[oncogenic] || 0;
@@ -616,6 +641,125 @@ var MyCancerGenome = /** @class */ (function (_super) {
616
641
  return MyCancerGenome;
617
642
  }(React.Component));
618
643
 
644
+ function hideArrow$1(tooltipEl) {
645
+ var arrowEl = tooltipEl.querySelector('.rc-tooltip-arrow');
646
+ arrowEl.style.display = 'none';
647
+ }
648
+ var AnnotationIcon = function (props) {
649
+ if (props.availableDataTypes !== undefined &&
650
+ !props.availableDataTypes.includes(props.type)) {
651
+ return null;
652
+ }
653
+ var highestLevel = calcHighestIndicatorLevel(props.type, props.indicator);
654
+ return (React__default.createElement(AnnotationIconWithTooltip, { tooltipOverlay: props.tooltipOverlay, icon: React__default.createElement("i", { className: annotationIconClassNames(props.type, highestLevel, props.indicator), "data-test": "oncogenic-icon-image" }) }));
655
+ };
656
+ var AnnotationIconWithTooltip = function (props) {
657
+ if (props.icon) {
658
+ return (React__default.createElement(cbioportalFrontendCommons.DefaultTooltip, { overlayClassName: "oncokb-tooltip", overlay: function () {
659
+ return props.tooltipOverlay ? props.tooltipOverlay : null;
660
+ }, placement: "right", trigger: ['hover', 'focus'], onPopupAlign: hideArrow$1, destroyTooltipOnHide: true },
661
+ React__default.createElement("span", { className: "" + annotationStyles['annotation-item'] }, props.icon)));
662
+ }
663
+ else {
664
+ return null;
665
+ }
666
+ };
667
+
668
+ var BIOLOGICAL_COLOR_MAP = {
669
+ oncogenic: '#0968C3',
670
+ 'likely-oncogenic': '#0968C3',
671
+ 'predicted-oncogenic': '#0968C3',
672
+ resistance: '#0968C3',
673
+ neutral: '#696969',
674
+ 'likely-neutral': '#696969',
675
+ inconclusive: '#AAAAAA',
676
+ vus: '#696969',
677
+ unknown: '#CCCCCC',
678
+ };
679
+ var LEVEL_COLOR_MAP = {
680
+ '1': '#33A02C',
681
+ '2': '#1F78B4',
682
+ '3': '#984EA3',
683
+ '3A': '#984EA3',
684
+ '3B': '#BE98CE',
685
+ '4': '#424242',
686
+ R1: '#EE3424',
687
+ R2: '#F79A92',
688
+ R3: '#FCD6D3',
689
+ Dx1: '#33A02C',
690
+ Dx2: '#1F78B4',
691
+ Dx3: '#984EA3',
692
+ Px1: '#33A02C',
693
+ Px2: '#1F78B4',
694
+ Px3: '#984EA3',
695
+ };
696
+ function getLevelColor(highestLevel, defaultColor) {
697
+ if (defaultColor === void 0) { defaultColor = '#CCCCCC'; }
698
+ var level = normalizeLevel(highestLevel || null) || '';
699
+ return LEVEL_COLOR_MAP[level] || defaultColor;
700
+ }
701
+ function shouldDrawShape(type, level, availableDataTypes) {
702
+ return (level &&
703
+ availableDataTypes !== undefined &&
704
+ availableDataTypes.includes(type));
705
+ }
706
+ function getOncogenicShape(indicator) {
707
+ var oncogenicity = normalizeOncogenicity((indicator === null || indicator === void 0 ? void 0 : indicator.oncogenic) || '');
708
+ var color = BIOLOGICAL_COLOR_MAP[oncogenicity] || '#CCCCCC';
709
+ return (React__default.createElement("g", { transform: "translate(9, 9)" },
710
+ React__default.createElement("circle", { r: "6", fill: "none", strokeWidth: "2", stroke: color }),
711
+ oncogenicity !== 'vus' && oncogenicity !== 'unknown' && (React__default.createElement("g", null,
712
+ React__default.createElement("circle", { r: "3", fill: "none", strokeWidth: "2", stroke: color }),
713
+ React__default.createElement("circle", { r: "1.5", fill: color, stroke: "none" })))));
714
+ }
715
+ function getTherapeuticSensitivityShape(indicator, availableDataTypes) {
716
+ var highestLevel = indicator === null || indicator === void 0 ? void 0 : indicator.highestSensitiveLevel;
717
+ if (!shouldDrawShape(cbioportalUtils.OncoKbCardDataType.TXS, highestLevel, availableDataTypes)) {
718
+ return null;
719
+ }
720
+ var fillColor = getLevelColor(highestLevel, '#33A02C');
721
+ return (React__default.createElement("g", { transform: "translate(14.5, 3.5)" },
722
+ React__default.createElement("circle", { r: "4", fill: fillColor, stroke: "#ffffff", strokeWidth: "1" })));
723
+ }
724
+ function getTherapeuticResistanceShape(indicator, availableDataTypes) {
725
+ var highestLevel = indicator === null || indicator === void 0 ? void 0 : indicator.highestResistanceLevel;
726
+ if (!shouldDrawShape(cbioportalUtils.OncoKbCardDataType.TXR, highestLevel, availableDataTypes)) {
727
+ return null;
728
+ }
729
+ var fillColor = getLevelColor(highestLevel, '#EE3424');
730
+ return (React__default.createElement("g", { transform: "translate(14.5, 14.5)" },
731
+ React__default.createElement("circle", { r: "4", fill: fillColor, stroke: "#ffffff", strokeWidth: "1" })));
732
+ }
733
+ function getDiagnosticShape(indicator, availableDataTypes) {
734
+ var highestLevel = indicator === null || indicator === void 0 ? void 0 : indicator.highestDiagnosticImplicationLevel;
735
+ if (!shouldDrawShape(cbioportalUtils.OncoKbCardDataType.DX, highestLevel, availableDataTypes)) {
736
+ return null;
737
+ }
738
+ var fillColor = getLevelColor(highestLevel, '#33A02C');
739
+ return (React__default.createElement("g", { transform: "translate(-0.5, -0.5)" },
740
+ React__default.createElement("rect", { width: "7", height: "7", fill: fillColor, stroke: "#ffffff", strokeWidth: "1" })));
741
+ }
742
+ function getPrognosticShape(indicator, availableDataTypes) {
743
+ var highestLevel = indicator === null || indicator === void 0 ? void 0 : indicator.highestPrognosticImplicationLevel;
744
+ if (!shouldDrawShape(cbioportalUtils.OncoKbCardDataType.PX, highestLevel, availableDataTypes)) {
745
+ return null;
746
+ }
747
+ var fillColor = getLevelColor(highestLevel, '#33A02C');
748
+ return (React__default.createElement("g", { transform: "translate(0, 10.5)" },
749
+ React__default.createElement("polygon", { points: "3.5 0, 8 8, -1 8", fill: fillColor, stroke: "#ffffff", strokeWidth: "1" })));
750
+ }
751
+ var CompactAnnotationIcon = function (props) {
752
+ var indicatorForLevelIcons = props.usingPublicOncoKbInstance
753
+ ? undefined
754
+ : props.indicator;
755
+ return (React__default.createElement("svg", { version: "1.1", width: "18", height: "18", "data-test": "oncogenic-icon-image" },
756
+ getOncogenicShape(props.indicator),
757
+ getTherapeuticSensitivityShape(indicatorForLevelIcons, props.availableDataTypes),
758
+ getTherapeuticResistanceShape(indicatorForLevelIcons, props.availableDataTypes),
759
+ getDiagnosticShape(indicatorForLevelIcons, props.availableDataTypes),
760
+ getPrognosticShape(indicatorForLevelIcons, props.availableDataTypes)));
761
+ };
762
+
619
763
  var oncoKbLogoImgSrc = "data:image/svg+xml,%3Csvg%20width%3D%22138%22%20height%3D%2226%22%20viewBox%3D%220%200%20138%2026%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%20%3Cpath%20d%3D%22M13.3232%2026C21.0801%2026%2026.7182%2020.1464%2026.7182%2013V12.9282C26.7182%205.78177%2021.1519%200%2013.395%200C5.63812%200%200%205.85359%200%2013V13.0718C0%2020.2182%205.5663%2026%2013.3232%2026ZM13.395%2020.9006C8.94199%2020.9006%205.78177%2017.3094%205.78177%2013V12.9282C5.78177%208.61878%208.87016%205.09945%2013.3232%205.09945C17.7762%205.09945%2020.9365%208.69061%2020.9365%2013V13.0718C20.9365%2017.3812%2017.8481%2020.9006%2013.395%2020.9006Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20d%3D%22M29.9722%2025.5691H35.4307V14.8315C35.4307%2012.2459%2036.7594%2010.9171%2038.8423%2010.9171C40.9252%2010.9171%2042.1462%2012.2459%2042.1462%2014.8315V25.5691H47.6048V13.1077C47.6048%208.69061%2045.1987%205.96133%2041.0688%205.96133C38.3036%205.96133%2036.6876%207.4337%2035.4307%209.04972V6.32044H29.9722V25.5691Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20d%3D%22M60.3551%2026C64.1976%2026%2066.3523%2024.5276%2068.2197%2022.4807L65.0236%2019.2486C63.6948%2020.5055%2062.4379%2021.2956%2060.6064%2021.2956C57.6258%2021.2956%2055.7225%2018.9254%2055.7225%2015.9807V15.9088C55.7225%2013.0718%2057.6617%2010.6657%2060.391%2010.6657C62.3302%2010.6657%2063.5512%2011.4917%2064.7722%2012.7845L68.112%209.19337C66.3164%207.18232%2064.054%205.96133%2060.4269%205.96133C54.5374%205.96133%2050.3357%2010.4862%2050.3357%2015.9807V16.0525C50.3357%2021.547%2054.5733%2026%2060.3551%2026Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20d%3D%22M91.3584%2025.5691H96.8888V17.884L99.7977%2014.8674L107.59%2025.5691H114.234L103.532%2011.0967L113.803%200.430938H107.016L96.8888%2011.4199V0.430938H91.3584V25.5691Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20d%3D%22M116.182%2025.5691H128.14C133.814%2025.5691%20137.549%2023.2707%20137.549%2018.674V18.6022C137.549%2015.2265%20135.754%2013.5387%20132.845%2012.4254C134.64%2011.4199%20136.149%209.83978%20136.149%207.00276V6.93094C136.149%205.20718%20135.574%203.80663%20134.425%202.65746C132.989%201.22099%20130.726%200.430938%20127.853%200.430938H116.182V25.5691ZM130.654%207.93646C130.654%209.80387%20129.11%2010.5939%20126.668%2010.5939H121.569V5.27901H127.027C129.361%205.27901%20130.654%206.21271%20130.654%207.86464V7.93646ZM132.055%2017.9199V17.9917C132.055%2019.8591%20130.582%2020.721%20128.14%2020.721H121.569V15.1906H127.961C130.798%2015.1906%20132.055%2016.232%20132.055%2017.9199Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M78.8032%2023.5C82.9454%2023.5%2086.3032%2020.1421%2086.3032%2016C86.3032%2011.8579%2082.9454%208.5%2078.8032%208.5C74.6611%208.5%2071.3032%2011.8579%2071.3032%2016C71.3032%2020.1421%2074.6611%2023.5%2078.8032%2023.5ZM78.8032%2026C84.3261%2026%2088.8032%2021.5228%2088.8032%2016C88.8032%2010.4772%2084.3261%206%2078.8032%206C73.2804%206%2068.8032%2010.4772%2068.8032%2016C68.8032%2021.5228%2073.2804%2026%2078.8032%2026Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M78.8032%2019.5C80.7362%2019.5%2082.3032%2017.933%2082.3032%2016C82.3032%2014.067%2080.7362%2012.5%2078.8032%2012.5C76.8702%2012.5%2075.3032%2014.067%2075.3032%2016C75.3032%2017.933%2076.8702%2019.5%2078.8032%2019.5ZM78.8032%2022C82.1169%2022%2084.8032%2019.3137%2084.8032%2016C84.8032%2012.6863%2082.1169%2010%2078.8032%2010C75.4895%2010%2072.8032%2012.6863%2072.8032%2016C72.8032%2019.3137%2075.4895%2022%2078.8032%2022Z%22%20fill%3D%22%230968C3%22%2F%3E%20%20%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M78.8032%2018C79.9078%2018%2080.8032%2017.1046%2080.8032%2016C80.8032%2014.8954%2079.9078%2014%2078.8032%2014C77.6987%2014%2076.8032%2014.8954%2076.8032%2016C76.8032%2017.1046%2077.6987%2018%2078.8032%2018Z%22%20fill%3D%22%230968C3%22%2F%3E%3C%2Fsvg%3E";
620
764
 
621
765
  var mainStyles = {"oncokb-card":"main-module_oncokb-card__32DzD","tab-content":"main-module_tab-content__8nUyf","tooltip-refs":"main-module_tooltip-refs__SpA4W","disclaimer":"main-module_disclaimer__3CLlM","blue-icon":"main-module_blue-icon__2Hs-v","footer":"main-module_footer__2dc-8","oncokb-logo":"main-module_oncokb-logo__3RVg7","title":"main-module_title__2kT-n","additional-info":"main-module_additional-info__1nXTm","biological-info":"main-module_biological-info__2efDC","ellipsis-text-wrapper":"main-module_ellipsis-text-wrapper__18dny"};
@@ -1179,35 +1323,6 @@ var EvidenceReferenceContent = function (props) {
1179
1323
  : 'Information is not available.')))));
1180
1324
  };
1181
1325
 
1182
- var BiologicalContent = function (props) {
1183
- return (React__default.createElement(EvidenceReferenceContent, { description: props.biologicalSummary, citations: props.mutationEffectCitations, pmidData: props.pmidData, noInfoDisclaimer: 'Mutation effect information is not available.' }));
1184
- };
1185
-
1186
- var ImplicationContent = function (props) {
1187
- var columns = [
1188
- __assign(__assign({}, OncoKbHelper.getDefaultColumnDefinition('level')), { accessor: 'levelOfEvidence', maxWidth: 100 }),
1189
- __assign(__assign({}, OncoKbHelper.getDefaultColumnDefinition('alterations')), { Cell: function (cellProps) {
1190
- return OncoKbHelper.getAlterationsColumnCell(cellProps.value, props.variant);
1191
- } }),
1192
- {
1193
- id: 'referenceList',
1194
- Header: React.createElement("span", null),
1195
- sortable: false,
1196
- maxWidth: 50,
1197
- Cell: function (cellProps) { return (React.createElement(cbioportalFrontendCommons.DefaultTooltip, { overlay: function () { return (React.createElement("div", { className: mainStyles['tooltip-refs'] },
1198
- React.createElement(EvidenceReferenceContent, { description: cellProps.original.description, citations: {
1199
- pmids: cellProps.original.pmids,
1200
- abstracts: cellProps.original.abstracts,
1201
- }, pmidData: props.pmidData, noInfoDisclaimer: 'Mutation effect information is not available.' }))); }, placement: "right", trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
1202
- React.createElement("i", { className: "fa fa-book" }))); },
1203
- },
1204
- ];
1205
- return (React.createElement("div", null,
1206
- React.createElement("p", null, props.summary),
1207
- React.createElement("div", null,
1208
- React.createElement(ReactTable, { data: props.implications, columns: columns, showPagination: false, pageSize: props.implications.length, className: "-striped -highlight" }))));
1209
- };
1210
-
1211
1326
  var OncoKbTreatmentTable = /** @class */ (function (_super) {
1212
1327
  __extends(OncoKbTreatmentTable, _super);
1213
1328
  function OncoKbTreatmentTable() {
@@ -1289,8 +1404,38 @@ var OncoKbTreatmentTable = /** @class */ (function (_super) {
1289
1404
  return OncoKbTreatmentTable;
1290
1405
  }(React.Component));
1291
1406
 
1407
+ var BiologicalContent = function (props) {
1408
+ return (React__default.createElement(EvidenceReferenceContent, { description: props.biologicalSummary, citations: props.mutationEffectCitations, pmidData: props.pmidData, noInfoDisclaimer: 'Mutation effect information is not available.' }));
1409
+ };
1410
+
1411
+ var ImplicationContent = function (props) {
1412
+ var columns = [
1413
+ __assign(__assign({}, OncoKbHelper.getDefaultColumnDefinition('level')), { accessor: 'levelOfEvidence', maxWidth: 100 }),
1414
+ __assign(__assign({}, OncoKbHelper.getDefaultColumnDefinition('alterations')), { Cell: function (cellProps) {
1415
+ return OncoKbHelper.getAlterationsColumnCell(cellProps.value, props.variant);
1416
+ } }),
1417
+ {
1418
+ id: 'referenceList',
1419
+ Header: React.createElement("span", null),
1420
+ sortable: false,
1421
+ maxWidth: 50,
1422
+ Cell: function (cellProps) { return (React.createElement(cbioportalFrontendCommons.DefaultTooltip, { overlay: function () { return (React.createElement("div", { className: mainStyles['tooltip-refs'] },
1423
+ React.createElement(EvidenceReferenceContent, { description: cellProps.original.description, citations: {
1424
+ pmids: cellProps.original.pmids,
1425
+ abstracts: cellProps.original.abstracts,
1426
+ }, pmidData: props.pmidData, noInfoDisclaimer: 'Mutation effect information is not available.' }))); }, placement: "right", trigger: ['hover', 'focus'], destroyTooltipOnHide: true },
1427
+ React.createElement("i", { className: "fa fa-book" }))); },
1428
+ },
1429
+ ];
1430
+ return (React.createElement("div", null,
1431
+ React.createElement("p", null, props.summary),
1432
+ React.createElement("div", null,
1433
+ React.createElement(ReactTable, { data: props.implications, columns: columns, showPagination: false, pageSize: props.implications.length, className: "-striped -highlight" }))));
1434
+ };
1435
+
1292
1436
  var tabsStyles = {"tabs-wrapper":"tabs-module_tabs-wrapper__XKjzo","tabs":"tabs-module_tabs__2I3mz","tab":"tabs-module_tab__3MoDA","tab-pane":"tabs-module_tab-pane__sGd85","tab-title-a":"tabs-module_tab-title-a__2WTNA","tab-title":"tabs-module_tab-title__2z9-D","tab-subtitle":"tabs-module_tab-subtitle__1P8B_"};
1293
1437
 
1438
+ var _a$1;
1294
1439
  var OncoKbMedicalDisclaimer = (React__default.createElement("p", { className: mainStyles.disclaimer }, "The information above is intended for research purposes only and should not be used as a substitute for professional diagnosis and treatment."));
1295
1440
  var ONCOKB_DATA_ACCESS_PAGE_LINK = 'https://docs.cbioportal.org/2.4-integration-with-other-webservices/oncokb-data-access';
1296
1441
  var publicInstanceDisclaimerOverLay = (React__default.createElement("div", null,
@@ -1300,9 +1445,24 @@ var publicInstanceDisclaimerOverLay = (React__default.createElement("div", null,
1300
1445
  React__default.createElement("a", { href: ONCOKB_DATA_ACCESS_PAGE_LINK, target: '_blank' }, "these instructions"),
1301
1446
  "."),
1302
1447
  OncoKbMedicalDisclaimer));
1448
+ var DATA_TYPE_TO_TITLE = (_a$1 = {},
1449
+ _a$1[cbioportalUtils.OncoKbCardDataType.BIOLOGICAL] = 'Biological Effect',
1450
+ _a$1[cbioportalUtils.OncoKbCardDataType.TXS] = 'Therapeutic Implications',
1451
+ _a$1[cbioportalUtils.OncoKbCardDataType.TXR] = 'Therapeutic Implications',
1452
+ _a$1[cbioportalUtils.OncoKbCardDataType.DX] = 'Diagnostic Implications',
1453
+ _a$1[cbioportalUtils.OncoKbCardDataType.PX] = 'Prognostic Implications',
1454
+ _a$1);
1303
1455
  var TabContentWrapper = function (props) {
1304
1456
  return React__default.createElement("div", { className: mainStyles['tab-content'] }, props.children);
1305
1457
  };
1458
+ var TabTitle = function (props) {
1459
+ var title = DATA_TYPE_TO_TITLE[props.type];
1460
+ var icon = props.displayHighestLevelInTabTitle ? (React__default.createElement("i", { className: annotationIconClassNames(props.type, calcHighestIndicatorLevel(props.type, props.indicator), props.indicator) })) : null;
1461
+ return icon ? (React__default.createElement("span", { style: { display: 'flex' } },
1462
+ icon,
1463
+ " ",
1464
+ title)) : (React__default.createElement("span", null, title));
1465
+ };
1306
1466
  var OncoKbCardBody = function (props) {
1307
1467
  var defaultTabActiveKey;
1308
1468
  // Do not assign a default key if the data type specified through the property does not have any content
@@ -1346,13 +1506,13 @@ var OncoKbCardBody = function (props) {
1346
1506
  function getBody(type, indicator) {
1347
1507
  var tabs = [];
1348
1508
  if (dataTypeHasContent(cbioportalUtils.OncoKbCardDataType.BIOLOGICAL)) {
1349
- tabs.push(React__default.createElement(reactBootstrap.Tab, { eventKey: cbioportalUtils.OncoKbCardDataType.BIOLOGICAL, title: "Biological Effect" },
1509
+ tabs.push(React__default.createElement(reactBootstrap.Tab, { eventKey: cbioportalUtils.OncoKbCardDataType.BIOLOGICAL, title: React__default.createElement(TabTitle, { type: cbioportalUtils.OncoKbCardDataType.BIOLOGICAL, indicator: props.indicator, displayHighestLevelInTabTitle: props.displayHighestLevelInTabTitle }) },
1350
1510
  React__default.createElement(TabContentWrapper, null,
1351
1511
  React__default.createElement(BiologicalContent, { mutationEffectCitations: indicator.mutationEffect.citations, biologicalSummary: indicator.mutationEffect.description, pmidData: props.pmidData }))));
1352
1512
  }
1353
1513
  if (!props.usingPublicOncoKbInstance &&
1354
1514
  dataTypeHasContent(cbioportalUtils.OncoKbCardDataType.TXS)) {
1355
- tabs.push(React__default.createElement(reactBootstrap.Tab, { eventKey: cbioportalUtils.OncoKbCardDataType.TXS, title: "Therapeutic Implications" },
1515
+ tabs.push(React__default.createElement(reactBootstrap.Tab, { eventKey: cbioportalUtils.OncoKbCardDataType.TXS, title: React__default.createElement(TabTitle, { type: cbioportalUtils.OncoKbCardDataType.TXS, indicator: props.indicator, displayHighestLevelInTabTitle: props.displayHighestLevelInTabTitle }) },
1356
1516
  React__default.createElement(TabContentWrapper, null,
1357
1517
  React__default.createElement("div", { style: {
1358
1518
  marginTop: 10,
@@ -1361,13 +1521,13 @@ var OncoKbCardBody = function (props) {
1361
1521
  }
1362
1522
  if (!props.usingPublicOncoKbInstance &&
1363
1523
  dataTypeHasContent(cbioportalUtils.OncoKbCardDataType.DX)) {
1364
- tabs.push(React__default.createElement(reactBootstrap.Tab, { eventKey: cbioportalUtils.OncoKbCardDataType.DX, title: "Diagnostic Implications" },
1524
+ tabs.push(React__default.createElement(reactBootstrap.Tab, { eventKey: cbioportalUtils.OncoKbCardDataType.DX, title: React__default.createElement(TabTitle, { type: cbioportalUtils.OncoKbCardDataType.DX, indicator: props.indicator, displayHighestLevelInTabTitle: props.displayHighestLevelInTabTitle }) },
1365
1525
  React__default.createElement(TabContentWrapper, null,
1366
1526
  React__default.createElement(ImplicationContent, { variant: indicator.query.alteration, summary: indicator.diagnosticSummary, implications: indicator.diagnosticImplications, pmidData: props.pmidData }))));
1367
1527
  }
1368
1528
  if (!props.usingPublicOncoKbInstance &&
1369
1529
  dataTypeHasContent(cbioportalUtils.OncoKbCardDataType.PX)) {
1370
- tabs.push(React__default.createElement(reactBootstrap.Tab, { eventKey: cbioportalUtils.OncoKbCardDataType.PX, title: "Prognostic Implications" },
1530
+ tabs.push(React__default.createElement(reactBootstrap.Tab, { eventKey: cbioportalUtils.OncoKbCardDataType.PX, title: React__default.createElement(TabTitle, { type: cbioportalUtils.OncoKbCardDataType.PX, indicator: props.indicator, displayHighestLevelInTabTitle: props.displayHighestLevelInTabTitle }) },
1371
1531
  React__default.createElement(TabContentWrapper, null,
1372
1532
  React__default.createElement(ImplicationContent, { variant: indicator.query.alteration, summary: indicator.prognosticSummary, implications: indicator.prognosticImplications, pmidData: props.pmidData }))));
1373
1533
  }
@@ -1464,7 +1624,6 @@ var OncoKbCard = /** @class */ (function (_super) {
1464
1624
  enumerable: false,
1465
1625
  configurable: true
1466
1626
  });
1467
- // TODO we should replace the tabs with an actual ReactBootstrap Tab,
1468
1627
  Object.defineProperty(OncoKbCard.prototype, "render", {
1469
1628
  enumerable: false,
1470
1629
  configurable: true,
@@ -1476,7 +1635,7 @@ var OncoKbCard = /** @class */ (function (_super) {
1476
1635
  !this.props.geneNotExist && this.props.indicator && (React.createElement(OncoKbCardTitle, { hugoSymbol: this.props.indicator.query.hugoSymbol, variant: this.props.indicator.query.alteration, tumorType: this.props.indicator
1477
1636
  ? this.props.indicator.query.tumorType
1478
1637
  : '' })),
1479
- React.createElement(OncoKbCardBody, { type: this.props.type, indicator: this.props.indicator, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, hugoSymbol: this.props.hugoSymbol, pmidData: this.props.pmidData, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance }),
1638
+ React.createElement(OncoKbCardBody, { type: this.props.type, indicator: this.props.indicator, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, hugoSymbol: this.props.hugoSymbol, pmidData: this.props.pmidData, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance, displayHighestLevelInTabTitle: this.props.displayHighestLevelInTabTitle }),
1480
1639
  React.createElement("div", { className: mainStyles.footer },
1481
1640
  this.oncokbLinkOut === undefined ? ({ oncokbLogo: oncokbLogo }) : (React.createElement("a", { href: "" + this.oncokbLinkOut, target: "_blank", className: mainStyles['oncokb-logo'] }, oncokbLogo)),
1482
1641
  this.props.handleFeedbackOpen && (React.createElement("span", null,
@@ -1535,14 +1694,14 @@ var OncoKbTooltip = /** @class */ (function (_super) {
1535
1694
  value: function () {
1536
1695
  var tooltipContent = React.createElement("span", null);
1537
1696
  if (this.props.geneNotExist) {
1538
- tooltipContent = (React.createElement(OncoKbCard, { type: this.props.type, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance, hugoSymbol: this.props.hugoSymbol, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, pmidData: {}, handleFeedbackOpen: this.props.handleFeedbackOpen }));
1697
+ tooltipContent = (React.createElement(OncoKbCard, { type: this.props.type, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance, hugoSymbol: this.props.hugoSymbol, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, pmidData: {}, handleFeedbackOpen: this.props.handleFeedbackOpen, displayHighestLevelInTabTitle: true }));
1539
1698
  }
1540
1699
  if (!this.props.indicator) {
1541
1700
  return tooltipContent;
1542
1701
  }
1543
1702
  if (!this.props.geneNotExist) {
1544
1703
  var pmidData = this.pmidData;
1545
- tooltipContent = (React.createElement(OncoKbCard, { type: this.props.type, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, hugoSymbol: this.props.hugoSymbol, indicator: this.props.indicator, pmidData: pmidData, handleFeedbackOpen: this.props.handleFeedbackOpen }));
1704
+ tooltipContent = (React.createElement(OncoKbCard, { type: this.props.type, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance, geneNotExist: this.props.geneNotExist, isCancerGene: this.props.isCancerGene, hugoSymbol: this.props.hugoSymbol, indicator: this.props.indicator, pmidData: pmidData, handleFeedbackOpen: this.props.handleFeedbackOpen, displayHighestLevelInTabTitle: true }));
1546
1705
  }
1547
1706
  return tooltipContent;
1548
1707
  }
@@ -1586,44 +1745,6 @@ var OncoKbFeedback = /** @class */ (function (_super) {
1586
1745
  return OncoKbFeedback;
1587
1746
  }(React.Component));
1588
1747
 
1589
- function hideArrow$1(tooltipEl) {
1590
- var arrowEl = tooltipEl.querySelector('.rc-tooltip-arrow');
1591
- arrowEl.style.display = 'none';
1592
- }
1593
- var AnnotationIcon = function (props) {
1594
- var _a;
1595
- if (props.availableDataTypes !== undefined &&
1596
- !props.availableDataTypes.includes(props.type)) {
1597
- return null;
1598
- }
1599
- var highestLevel = '';
1600
- if (props.indicator) {
1601
- switch (props.type) {
1602
- case cbioportalUtils.OncoKbCardDataType.TXS:
1603
- highestLevel = props.indicator.highestSensitiveLevel;
1604
- break;
1605
- case cbioportalUtils.OncoKbCardDataType.TXR:
1606
- highestLevel = props.indicator.highestResistanceLevel;
1607
- break;
1608
- case cbioportalUtils.OncoKbCardDataType.DX:
1609
- highestLevel =
1610
- props.indicator.highestDiagnosticImplicationLevel;
1611
- break;
1612
- case cbioportalUtils.OncoKbCardDataType.PX:
1613
- highestLevel =
1614
- props.indicator.highestPrognosticImplicationLevel;
1615
- break;
1616
- }
1617
- }
1618
- return (React__default.createElement("span", { className: "" + annotationStyles['annotation-item'] },
1619
- React__default.createElement(cbioportalFrontendCommons.DefaultTooltip, { overlayClassName: "oncokb-tooltip", overlay: function () {
1620
- return props.tooltipOverlay ? props.tooltipOverlay : null;
1621
- }, placement: "right", trigger: ['hover', 'focus'], onPopupAlign: hideArrow$1, destroyTooltipOnHide: true },
1622
- React__default.createElement("i", { className: props.type === cbioportalUtils.OncoKbCardDataType.BIOLOGICAL
1623
- ? oncogenicityIconClassNames(((_a = props.indicator) === null || _a === void 0 ? void 0 : _a.oncogenic) || '')
1624
- : levelIconClassNames(normalizeLevel(highestLevel) || ''), "data-test": "oncogenic-icon-image" }))));
1625
- };
1626
-
1627
1748
  function sortValue$2(indicator) {
1628
1749
  var values = [0, 0, 0];
1629
1750
  if (indicator) {
@@ -1645,6 +1766,33 @@ function download$2(indicator) {
1645
1766
  var resistanceLevel = ((_b = indicator.highestResistanceLevel) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || 'resistance NA';
1646
1767
  return oncogenic + ", " + sensitivityLevel + ", " + resistanceLevel;
1647
1768
  }
1769
+ function findDefaultDataTypeForTooltip(usingPublicOncoKbInstance, indicator, availableDataTypes) {
1770
+ if (usingPublicOncoKbInstance || !indicator) {
1771
+ return cbioportalUtils.OncoKbCardDataType.BIOLOGICAL;
1772
+ }
1773
+ // priority is in this order: Tx > Dx > Px > Biological
1774
+ if (indicator.highestSensitiveLevel &&
1775
+ availableDataTypes &&
1776
+ availableDataTypes.includes(cbioportalUtils.OncoKbCardDataType.TXS)) {
1777
+ return cbioportalUtils.OncoKbCardDataType.TXS;
1778
+ }
1779
+ else if (indicator.highestResistanceLevel &&
1780
+ availableDataTypes &&
1781
+ availableDataTypes.includes(cbioportalUtils.OncoKbCardDataType.TXR)) {
1782
+ return cbioportalUtils.OncoKbCardDataType.TXR;
1783
+ }
1784
+ else if (indicator.highestDiagnosticImplicationLevel &&
1785
+ availableDataTypes &&
1786
+ availableDataTypes.includes(cbioportalUtils.OncoKbCardDataType.DX)) {
1787
+ return cbioportalUtils.OncoKbCardDataType.DX;
1788
+ }
1789
+ else if (indicator.highestPrognosticImplicationLevel &&
1790
+ availableDataTypes &&
1791
+ availableDataTypes.includes(cbioportalUtils.OncoKbCardDataType.PX)) {
1792
+ return cbioportalUtils.OncoKbCardDataType.PX;
1793
+ }
1794
+ return cbioportalUtils.OncoKbCardDataType.BIOLOGICAL;
1795
+ }
1648
1796
  var OncoKB = /** @class */ (function (_super) {
1649
1797
  __extends(OncoKB, _super);
1650
1798
  function OncoKB(props) {
@@ -1669,8 +1817,7 @@ var OncoKB = /** @class */ (function (_super) {
1669
1817
  configurable: true,
1670
1818
  writable: true,
1671
1819
  value: function () {
1672
- var _this = this;
1673
- var oncoKbContent = (React.createElement("span", { className: "" + annotationStyles['annotation-item'] }));
1820
+ var oncoKbContent;
1674
1821
  if (this.props.status === 'error') {
1675
1822
  oncoKbContent = errorIcon('Error fetching OncoKB data');
1676
1823
  }
@@ -1678,15 +1825,9 @@ var OncoKB = /** @class */ (function (_super) {
1678
1825
  oncoKbContent = loaderIcon('pull-left');
1679
1826
  }
1680
1827
  else {
1681
- oncoKbContent = (React.createElement("span", { className: "oncokb-content", style: { display: 'inline-flex' } },
1682
- React.createElement(AnnotationIcon, { type: cbioportalUtils.OncoKbCardDataType.BIOLOGICAL, tooltipOverlay: this.tooltipContent(cbioportalUtils.OncoKbCardDataType.BIOLOGICAL), indicator: this.props.indicator, availableDataTypes: this.props.availableDataTypes }),
1683
- !this.props.usingPublicOncoKbInstance &&
1684
- this.props.indicator && (React.createElement(React.Fragment, null, [
1685
- cbioportalUtils.OncoKbCardDataType.TXS,
1686
- cbioportalUtils.OncoKbCardDataType.TXR,
1687
- cbioportalUtils.OncoKbCardDataType.DX,
1688
- cbioportalUtils.OncoKbCardDataType.PX,
1689
- ].map(function (dataType) { return (React.createElement(AnnotationIcon, { type: dataType, tooltipOverlay: _this.tooltipContent(dataType), indicator: _this.props.indicator, availableDataTypes: _this.props.availableDataTypes })); })))));
1828
+ oncoKbContent = this.props.mergeAnnotationIcons
1829
+ ? this.singleAnnotationIcon()
1830
+ : this.multiAnnotationIcon();
1690
1831
  if (!this.props.disableFeedback && this.showFeedback) {
1691
1832
  oncoKbContent = (React.createElement("span", null,
1692
1833
  oncoKbContent,
@@ -1698,6 +1839,57 @@ var OncoKB = /** @class */ (function (_super) {
1698
1839
  return oncoKbContent;
1699
1840
  }
1700
1841
  });
1842
+ Object.defineProperty(OncoKB.prototype, "multiAnnotationIcon", {
1843
+ enumerable: false,
1844
+ configurable: true,
1845
+ writable: true,
1846
+ value: function () {
1847
+ return (React.createElement("span", { className: "oncokb-content", style: { display: 'inline-flex' } },
1848
+ React.createElement(AnnotationIcon, { type: cbioportalUtils.OncoKbCardDataType.BIOLOGICAL, tooltipOverlay: this.tooltipContent(cbioportalUtils.OncoKbCardDataType.BIOLOGICAL), indicator: this.props.indicator, availableDataTypes: this.props.availableDataTypes }),
1849
+ this.levelIcons()));
1850
+ }
1851
+ });
1852
+ Object.defineProperty(OncoKB.prototype, "levelIcons", {
1853
+ enumerable: false,
1854
+ configurable: true,
1855
+ writable: true,
1856
+ value: function () {
1857
+ var _this = this;
1858
+ if (this.props.usingPublicOncoKbInstance) {
1859
+ return null;
1860
+ }
1861
+ if (this.props.indicator) {
1862
+ return (React.createElement(React.Fragment, null, [
1863
+ cbioportalUtils.OncoKbCardDataType.TXS,
1864
+ cbioportalUtils.OncoKbCardDataType.TXR,
1865
+ cbioportalUtils.OncoKbCardDataType.DX,
1866
+ cbioportalUtils.OncoKbCardDataType.PX,
1867
+ ].map(function (dataType) { return (React.createElement(AnnotationIcon, { type: dataType, tooltipOverlay: _this.tooltipContent(dataType), indicator: _this.props.indicator, availableDataTypes: _this.props.availableDataTypes })); })));
1868
+ }
1869
+ else {
1870
+ // TODO This doesn't always work, in some cases it adds unnecessary empty icons, we need a better solution.
1871
+ // we still need to draw empty icons even if there is no indicator data.
1872
+ // this is to keep the icon alignment consistent with the rest of the column
1873
+ // return (
1874
+ // <>
1875
+ // {this.props.availableDataTypes?.map(() => (
1876
+ // <AnnotationIconWithTooltip icon={<i />} />
1877
+ // ))}
1878
+ // </>
1879
+ // );
1880
+ return null;
1881
+ }
1882
+ }
1883
+ });
1884
+ Object.defineProperty(OncoKB.prototype, "singleAnnotationIcon", {
1885
+ enumerable: false,
1886
+ configurable: true,
1887
+ writable: true,
1888
+ value: function () {
1889
+ return (React.createElement("span", { className: "oncokb-content", style: { display: 'inline-flex' } },
1890
+ React.createElement(AnnotationIconWithTooltip, { tooltipOverlay: this.tooltipContent(findDefaultDataTypeForTooltip(this.props.usingPublicOncoKbInstance, this.props.indicator, this.props.availableDataTypes)), icon: React.createElement(CompactAnnotationIcon, { indicator: this.props.indicator, availableDataTypes: this.props.availableDataTypes, usingPublicOncoKbInstance: this.props.usingPublicOncoKbInstance }) })));
1891
+ }
1892
+ });
1701
1893
  Object.defineProperty(OncoKB.prototype, "tooltipContent", {
1702
1894
  enumerable: false,
1703
1895
  configurable: true,
@@ -2113,9 +2305,9 @@ function sortValue$4(annotation) {
2113
2305
  ]);
2114
2306
  }
2115
2307
  function GenericAnnotation(props) {
2116
- var annotation = props.annotation, enableCivic = props.enableCivic, enableHotspot = props.enableHotspot, enableMyCancerGenome = props.enableMyCancerGenome, enableOncoKb = props.enableOncoKb, pubMedCache = props.pubMedCache, userEmailAddress = props.userEmailAddress;
2308
+ var annotation = props.annotation, enableCivic = props.enableCivic, enableHotspot = props.enableHotspot, enableMyCancerGenome = props.enableMyCancerGenome, enableOncoKb = props.enableOncoKb, pubMedCache = props.pubMedCache, userEmailAddress = props.userEmailAddress, mergeOncoKbIcons = props.mergeOncoKbIcons;
2117
2309
  return (React.createElement("span", { style: { display: 'flex', minWidth: 100 } },
2118
- enableOncoKb && (React.createElement(OncoKB, { usingPublicOncoKbInstance: annotation.usingPublicOncoKbInstance, hugoGeneSymbol: annotation.hugoGeneSymbol, geneNotExist: !annotation.oncoKbGeneExist, isCancerGene: annotation.isOncoKbCancerGene, status: annotation.oncoKbStatus, indicator: annotation.oncoKbIndicator, availableDataTypes: annotation.oncoKbAvailableDataTypes, pubMedCache: pubMedCache, userEmailAddress: userEmailAddress })),
2310
+ enableOncoKb && (React.createElement(OncoKB, { usingPublicOncoKbInstance: annotation.usingPublicOncoKbInstance, hugoGeneSymbol: annotation.hugoGeneSymbol, geneNotExist: !annotation.oncoKbGeneExist, isCancerGene: annotation.isOncoKbCancerGene, status: annotation.oncoKbStatus, indicator: annotation.oncoKbIndicator, availableDataTypes: annotation.oncoKbAvailableDataTypes, mergeAnnotationIcons: mergeOncoKbIcons, pubMedCache: pubMedCache, userEmailAddress: userEmailAddress })),
2119
2311
  enableCivic && (React.createElement(Civic, { civicEntry: annotation.civicEntry, civicStatus: annotation.civicStatus, hasCivicVariants: annotation.hasCivicVariants })),
2120
2312
  enableMyCancerGenome && (React.createElement(MyCancerGenome, { linksHTML: annotation.myCancerGenomeLinks })),
2121
2313
  enableHotspot && (React.createElement(HotspotAnnotation, { isHotspot: annotation.isHotspot, is3dHotspot: annotation.is3dHotspot, status: annotation.hotspotStatus }))));
@@ -2497,7 +2689,7 @@ function generateGnomadUrl(chromosome, position, reference, variant) {
2497
2689
  }
2498
2690
  }
2499
2691
 
2500
- var _a$1;
2692
+ var _a$2;
2501
2693
  function frequencyOutput(frequency) {
2502
2694
  if (frequency === 0) {
2503
2695
  return React.createElement("span", null, "0");
@@ -2511,13 +2703,13 @@ function frequencyOutput(frequency) {
2511
2703
  }
2512
2704
  }
2513
2705
  var headerClassName = 'text-wrap font-weight-bold';
2514
- var HEADERS = (_a$1 = {},
2515
- _a$1[GnomadTableColumnName.population] = (React.createElement(ColumnHeader, { className: headerClassName, headerContent: React.createElement("span", null, "Population") })),
2516
- _a$1[GnomadTableColumnName.alleleCount] = (React.createElement(ColumnHeader, { className: headerClassName, headerContent: React.createElement("span", null, "Allele Count"), overlay: React.createElement("span", null, "Number of individuals with this allele") })),
2517
- _a$1[GnomadTableColumnName.alleleNumber] = (React.createElement(ColumnHeader, { className: headerClassName, headerContent: React.createElement("span", null, "Allele Number"), overlay: React.createElement("span", null, "Number of times any allele has been observed at this position in the population") })),
2518
- _a$1[GnomadTableColumnName.homozygotes] = (React.createElement(ColumnHeader, { className: headerClassName, headerContent: React.createElement("span", null, "Number of Homozygotes"), overlay: React.createElement("span", null, "Number of individuals carrying this allele in both copies") })),
2519
- _a$1[GnomadTableColumnName.alleleFrequency] = (React.createElement(ColumnHeader, { className: headerClassName, headerContent: React.createElement("span", null, "Allele Frequency"), overlay: React.createElement("span", null, "Proportion of the population with this allele") })),
2520
- _a$1);
2706
+ var HEADERS = (_a$2 = {},
2707
+ _a$2[GnomadTableColumnName.population] = (React.createElement(ColumnHeader, { className: headerClassName, headerContent: React.createElement("span", null, "Population") })),
2708
+ _a$2[GnomadTableColumnName.alleleCount] = (React.createElement(ColumnHeader, { className: headerClassName, headerContent: React.createElement("span", null, "Allele Count"), overlay: React.createElement("span", null, "Number of individuals with this allele") })),
2709
+ _a$2[GnomadTableColumnName.alleleNumber] = (React.createElement(ColumnHeader, { className: headerClassName, headerContent: React.createElement("span", null, "Allele Number"), overlay: React.createElement("span", null, "Number of times any allele has been observed at this position in the population") })),
2710
+ _a$2[GnomadTableColumnName.homozygotes] = (React.createElement(ColumnHeader, { className: headerClassName, headerContent: React.createElement("span", null, "Number of Homozygotes"), overlay: React.createElement("span", null, "Number of individuals carrying this allele in both copies") })),
2711
+ _a$2[GnomadTableColumnName.alleleFrequency] = (React.createElement(ColumnHeader, { className: headerClassName, headerContent: React.createElement("span", null, "Allele Frequency"), overlay: React.createElement("span", null, "Proportion of the population with this allele") })),
2712
+ _a$2);
2521
2713
  function renderNumericalValue(column) {
2522
2714
  return React.createElement("span", { className: "pull-right mr-1" }, column.value);
2523
2715
  }
@@ -4669,7 +4861,7 @@ var MutationType = /** @class */ (function (_super) {
4669
4861
  return MutationType;
4670
4862
  }(React.Component));
4671
4863
 
4672
- var _a$2, _b;
4864
+ var _a$3, _b;
4673
4865
  (function (MutationColumn) {
4674
4866
  MutationColumn["PROTEIN_CHANGE"] = "proteinChange";
4675
4867
  MutationColumn["ANNOTATION"] = "annotation";
@@ -4707,33 +4899,33 @@ var _a$2, _b;
4707
4899
  function rightAlignedCell(cellProps) {
4708
4900
  return React.createElement("span", { className: "pull-right mr-3" }, cellProps.value);
4709
4901
  }
4710
- var MUTATION_COLUMN_HEADERS = (_a$2 = {},
4711
- _a$2[exports.MutationColumn.PROTEIN_CHANGE] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.PROTEIN_CHANGE) })),
4712
- _a$2[exports.MutationColumn.ANNOTATION] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.ANNOTATION) })),
4713
- _a$2[exports.MutationColumn.MUTATION_STATUS] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.MUTATION_STATUS) })),
4714
- _a$2[exports.MutationColumn.MUTATION_TYPE] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.MUTATION_TYPE) })),
4715
- _a$2[exports.MutationColumn.CHROMOSOME] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" }, exports.MutationColumnName.CHROMOSOME) })),
4716
- _a$2[exports.MutationColumn.START_POSITION] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" }, exports.MutationColumnName.START_POSITION) })),
4717
- _a$2[exports.MutationColumn.END_POSITION] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" }, exports.MutationColumnName.END_POSITION) })),
4718
- _a$2[exports.MutationColumn.REFERENCE_ALLELE] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.REFERENCE_ALLELE), overlay: React.createElement("span", null, "Reference Allele") })),
4719
- _a$2[exports.MutationColumn.VARIANT_ALLELE] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.VARIANT_ALLELE), overlay: React.createElement("span", null, "Variant Allele") })),
4720
- _a$2[exports.MutationColumn.HGVSG] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.HGVSG) })),
4721
- _a$2[exports.MutationColumn.HGVSC] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.HGVSC) })),
4722
- _a$2[exports.MutationColumn.GNOMAD] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" },
4902
+ var MUTATION_COLUMN_HEADERS = (_a$3 = {},
4903
+ _a$3[exports.MutationColumn.PROTEIN_CHANGE] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.PROTEIN_CHANGE) })),
4904
+ _a$3[exports.MutationColumn.ANNOTATION] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.ANNOTATION) })),
4905
+ _a$3[exports.MutationColumn.MUTATION_STATUS] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.MUTATION_STATUS) })),
4906
+ _a$3[exports.MutationColumn.MUTATION_TYPE] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.MUTATION_TYPE) })),
4907
+ _a$3[exports.MutationColumn.CHROMOSOME] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" }, exports.MutationColumnName.CHROMOSOME) })),
4908
+ _a$3[exports.MutationColumn.START_POSITION] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" }, exports.MutationColumnName.START_POSITION) })),
4909
+ _a$3[exports.MutationColumn.END_POSITION] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" }, exports.MutationColumnName.END_POSITION) })),
4910
+ _a$3[exports.MutationColumn.REFERENCE_ALLELE] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.REFERENCE_ALLELE), overlay: React.createElement("span", null, "Reference Allele") })),
4911
+ _a$3[exports.MutationColumn.VARIANT_ALLELE] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.VARIANT_ALLELE), overlay: React.createElement("span", null, "Variant Allele") })),
4912
+ _a$3[exports.MutationColumn.HGVSG] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.HGVSG) })),
4913
+ _a$3[exports.MutationColumn.HGVSC] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" }, exports.MutationColumnName.HGVSC) })),
4914
+ _a$3[exports.MutationColumn.GNOMAD] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" },
4723
4915
  exports.MutationColumnName.GNOMAD,
4724
4916
  ' ',
4725
4917
  React.createElement("i", { className: "fa fa-info-circle" })), overlay: React.createElement("span", null,
4726
4918
  React.createElement("a", { href: "https://gnomad.broadinstitute.org/", target: "_blank" }, "gnomAD"),
4727
4919
  ' ',
4728
4920
  "population allele frequencies. Overall population allele frequency is shown. Hover over a frequency to see the frequency for each specific population.") })),
4729
- _a$2[exports.MutationColumn.CLINVAR] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" },
4921
+ _a$3[exports.MutationColumn.CLINVAR] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-left" },
4730
4922
  exports.MutationColumnName.CLINVAR,
4731
4923
  ' ',
4732
4924
  React.createElement("i", { className: "fa fa-info-circle" })), overlay: React.createElement("span", null,
4733
4925
  React.createElement("a", { href: "https://www.ncbi.nlm.nih.gov/clinvar/", target: "_blank" }, "ClinVar"),
4734
4926
  ' ',
4735
4927
  "aggregates information about genomic variation and its relationship to human health.") })),
4736
- _a$2[exports.MutationColumn.DBSNP] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" },
4928
+ _a$3[exports.MutationColumn.DBSNP] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" },
4737
4929
  exports.MutationColumnName.DBSNP,
4738
4930
  ' ',
4739
4931
  React.createElement("i", { className: "fa fa-info-circle" })), overlay: React.createElement("span", null,
@@ -4742,14 +4934,14 @@ var MUTATION_COLUMN_HEADERS = (_a$2 = {},
4742
4934
  ") is a free public archive for genetic variation within and across different species.",
4743
4935
  React.createElement("br", null),
4744
4936
  "NOTE: Currently only SNPs, single base deletions and insertions are supported.") })),
4745
- _a$2[exports.MutationColumn.SIGNAL] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" },
4937
+ _a$3[exports.MutationColumn.SIGNAL] = (React.createElement(ColumnHeader, { headerContent: React.createElement("span", { className: "pull-right mr-3" },
4746
4938
  exports.MutationColumnName.SIGNAL,
4747
4939
  ' ',
4748
4940
  React.createElement("i", { className: "fa fa-info-circle" })), overlay: React.createElement("span", null,
4749
4941
  "Prevalence of germline mutations in cancer patients from",
4750
4942
  ' ',
4751
4943
  React.createElement("a", { href: "https://www.signaldb.org/", target: "_blank" }, "SIGNAL")) })),
4752
- _a$2);
4944
+ _a$3);
4753
4945
  /**
4754
4946
  * These default columns only include static props.
4755
4947
  * So, for some columns, like Annotation, no default accessor or Cell (render) properties included.
@@ -8371,7 +8563,7 @@ var PtmReferenceList = /** @class */ (function (_super) {
8371
8563
  return PtmReferenceList;
8372
8564
  }(React.Component));
8373
8565
 
8374
- var _a$3;
8566
+ var _a$4;
8375
8567
  var PtmAnnotationTableColumnId;
8376
8568
  (function (PtmAnnotationTableColumnId) {
8377
8569
  PtmAnnotationTableColumnId["POSITION"] = "position";
@@ -8379,33 +8571,33 @@ var PtmAnnotationTableColumnId;
8379
8571
  PtmAnnotationTableColumnId["DESCRIPTION"] = "description";
8380
8572
  PtmAnnotationTableColumnId["PUBMED_IDS"] = "pubmedIds";
8381
8573
  })(PtmAnnotationTableColumnId || (PtmAnnotationTableColumnId = {}));
8382
- var PTM_ANNOTATION_DEFAULT_COLUMNS = (_a$3 = {},
8383
- _a$3[PtmAnnotationTableColumnId.POSITION] = {
8574
+ var PTM_ANNOTATION_DEFAULT_COLUMNS = (_a$4 = {},
8575
+ _a$4[PtmAnnotationTableColumnId.POSITION] = {
8384
8576
  id: PtmAnnotationTableColumnId.POSITION,
8385
8577
  accessor: function (ptm) { return ptm.residue.start; },
8386
8578
  Header: 'Residue',
8387
8579
  Cell: function (props) { return (React.createElement("div", { style: { textAlign: 'right' } }, getResidue(props.original))); },
8388
8580
  maxWidth: 64,
8389
8581
  },
8390
- _a$3[PtmAnnotationTableColumnId.TYPE] = {
8582
+ _a$4[PtmAnnotationTableColumnId.TYPE] = {
8391
8583
  id: PtmAnnotationTableColumnId.TYPE,
8392
8584
  accessor: function (ptm) { return ptm.type; },
8393
8585
  Header: 'Type',
8394
8586
  minWidth: 100,
8395
8587
  },
8396
- _a$3[PtmAnnotationTableColumnId.DESCRIPTION] = {
8588
+ _a$4[PtmAnnotationTableColumnId.DESCRIPTION] = {
8397
8589
  id: PtmAnnotationTableColumnId.DESCRIPTION,
8398
8590
  accessor: function (ptm) { return ptm.description; },
8399
8591
  Header: 'Description',
8400
8592
  minWidth: 180,
8401
8593
  },
8402
- _a$3[PtmAnnotationTableColumnId.PUBMED_IDS] = {
8594
+ _a$4[PtmAnnotationTableColumnId.PUBMED_IDS] = {
8403
8595
  id: PtmAnnotationTableColumnId.PUBMED_IDS,
8404
8596
  Header: '',
8405
8597
  sortable: false,
8406
8598
  maxWidth: 32,
8407
8599
  },
8408
- _a$3);
8600
+ _a$4);
8409
8601
  function getResidue(ptm) {
8410
8602
  if (ptm.residue.end && ptm.residue.end > ptm.residue.start) {
8411
8603
  return ptm.residue.start + "-" + ptm.residue.end;