react-mutation-mapper 0.8.78 → 0.8.80

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
@@ -1888,24 +1888,6 @@ var BadgeLabel = /** @class */ (function (_super) {
1888
1888
  function BadgeLabel() {
1889
1889
  return _super !== null && _super.apply(this, arguments) || this;
1890
1890
  }
1891
- Object.defineProperty(BadgeLabel.prototype, "isDriverVusBadge", {
1892
- enumerable: false,
1893
- configurable: true,
1894
- writable: true,
1895
- value: function (value) {
1896
- return (!!value &&
1897
- Object.values(cbioportalFrontendCommons.DriverVsVusType).includes(value));
1898
- }
1899
- });
1900
- Object.defineProperty(BadgeLabel.prototype, "isNotDriverVusProteinBadge", {
1901
- enumerable: false,
1902
- configurable: true,
1903
- writable: true,
1904
- value: function (value) {
1905
- return (!!value &&
1906
- Object.values(cbioportalFrontendCommons.CanonicalMutationType).includes(value));
1907
- }
1908
- });
1909
1891
  Object.defineProperty(BadgeLabel.prototype, "badge", {
1910
1892
  get: function () {
1911
1893
  return (React__namespace.createElement("span", { style: this.props.badgeFirst
@@ -2074,8 +2056,8 @@ var BadgeSelector = /** @class */ (function (_super) {
2074
2056
  enumerable: false,
2075
2057
  configurable: true,
2076
2058
  writable: true,
2077
- value: function (option, selectedValues, badgeClassName, badgeAlignmentStyle, isDriverAnnotated, badgeLabelFormat) {
2078
- return this.props.getBadgeLabel ? (this.props.getBadgeLabel(option, selectedValues, badgeClassName, badgeAlignmentStyle, isDriverAnnotated, badgeLabelFormat)) : (React__namespace.createElement(BadgeLabel, { label: option.label || option.value, badgeContent: option.badgeContent, badgeStyleOverride: getBadgeStyleOverride(option, selectedValues, badgeAlignmentStyle), badgeClassName: this.props.badgeClassName, isDriverAnnotated: this.props.isDriverAnnotated, badgeLabelFormat: this.props.badgeLabelFormat }));
2059
+ value: function (option, selectedValues, badgeClassName, badgeAlignmentStyle, isDriverAnnotated, badgeLabelFormat, badgeFirst) {
2060
+ return this.props.getBadgeLabel ? (this.props.getBadgeLabel(option, selectedValues, badgeClassName, badgeAlignmentStyle, isDriverAnnotated, badgeLabelFormat, badgeFirst)) : (React__namespace.createElement(BadgeLabel, { label: option.label || option.value, badgeContent: option.badgeContent, badgeStyleOverride: getBadgeStyleOverride(option, selectedValues, badgeAlignmentStyle), badgeClassName: this.props.badgeClassName, isDriverAnnotated: this.props.isDriverAnnotated, badgeLabelFormat: this.props.badgeLabelFormat, badgeFirst: this.props.badgeFirst }));
2079
2061
  }
2080
2062
  });
2081
2063
  Object.defineProperty(BadgeSelector.prototype, "badgeAlignmentStyles", {
@@ -2093,7 +2075,7 @@ var BadgeSelector = /** @class */ (function (_super) {
2093
2075
  return (this.props.options || []).map(function (option, index) { return ({
2094
2076
  label: _this.getBadgeLabel(option, _this.selectedValuesMap, _this.props.badgeClassName, _this.badgeAlignmentStyles && _this.props.numberOfColumnsPerRow
2095
2077
  ? _this.badgeAlignmentStyles[index]
2096
- : undefined, _this.props.isDriverAnnotated, _this.props.badgeLabelFormat),
2078
+ : undefined, _this.props.isDriverAnnotated, _this.props.badgeLabelFormat, _this.props.badgeFirst),
2097
2079
  value: option.value,
2098
2080
  }); });
2099
2081
  },
@@ -2163,6 +2145,7 @@ var DEFAULT_PROTEIN_IMPACT_TYPE_COLORS = {
2163
2145
  fusionColor: cbioportalFrontendCommons.STRUCTURAL_VARIANT_COLOR,
2164
2146
  fusionVusColor: cbioportalFrontendCommons.STRUCTURAL_VARIANT_PASSENGER_COLOR,
2165
2147
  otherColor: cbioportalFrontendCommons.MUT_COLOR_OTHER,
2148
+ otherVusColor: cbioportalFrontendCommons.MUT_COLOR_OTHER_PASSENGER,
2166
2149
  };
2167
2150
  var MUTATION_TYPE_PRIORITY = {
2168
2151
  missense: 1,
@@ -2248,6 +2231,10 @@ function getColorForProteinImpactType(mutations, colors, getMutationCount, isPut
2248
2231
  return chosenMutation.isPutativeDriver
2249
2232
  ? colors.spliceColor
2250
2233
  : colors.spliceVusColor;
2234
+ case cbioportalFrontendCommons.ProteinImpactType.OTHER:
2235
+ return chosenMutation.isPutativeDriver
2236
+ ? colors.otherColor
2237
+ : colors.otherVusColor;
2251
2238
  default:
2252
2239
  return colors.otherColor;
2253
2240
  }
@@ -2366,8 +2353,8 @@ var VALUES = [
2366
2353
  function getProteinImpactTypeOptionLabel(option) {
2367
2354
  return React__namespace.createElement("span", null, option.label || option.value);
2368
2355
  }
2369
- function getProteinImpactTypeBadgeLabel(option, selectedValues, badgeClassName, badgeAlignmentStyle, isDriverAnnotated, badgeLabelFormat) {
2370
- return (React__namespace.createElement(BadgeLabel, { label: option.label || option.value, badgeContent: option.badgeContent, badgeStyleOverride: getBadgeStyleOverride(option, selectedValues, badgeAlignmentStyle), badgeClassName: badgeClassName, badgeFirst: true, value: option.value, isDriverAnnotated: isDriverAnnotated, badgeLabelFormat: badgeLabelFormat }));
2356
+ function getProteinImpactTypeBadgeLabel(option, selectedValues, badgeClassName, badgeAlignmentStyle, isDriverAnnotated, badgeLabelFormat, badgeFirst) {
2357
+ return (React__namespace.createElement(BadgeLabel, { label: option.label || option.value, badgeContent: option.badgeContent, badgeStyleOverride: getBadgeStyleOverride(option, selectedValues, badgeAlignmentStyle), badgeClassName: badgeClassName, badgeFirst: badgeFirst, value: option.value, isDriverAnnotated: isDriverAnnotated, badgeLabelFormat: badgeLabelFormat }));
2371
2358
  }
2372
2359
  var ProteinImpactTypeBadgeSelector = /** @class */ (function (_super) {
2373
2360
  tslib.__extends(ProteinImpactTypeBadgeSelector, _super);
@@ -2416,8 +2403,17 @@ var ProteinImpactTypeBadgeSelector = /** @class */ (function (_super) {
2416
2403
  configurable: true,
2417
2404
  writable: true,
2418
2405
  value: function () {
2419
- return (React__namespace.createElement("table", null,
2420
- React__namespace.createElement(BadgeSelector, tslib.__assign({ options: this.options, getOptionLabel: getProteinImpactTypeOptionLabel, getBadgeLabel: getProteinImpactTypeBadgeLabel, useOnlyFeature: true }, this.props))));
2406
+ return (React__namespace.createElement("div", { style: { display: 'inline-flex' } },
2407
+ React__namespace.createElement("div", null,
2408
+ React__namespace.createElement("table", { style: { height: this.props.height } },
2409
+ React__namespace.createElement(BadgeSelector, tslib.__assign({ options: this.options, getOptionLabel: getProteinImpactTypeOptionLabel, getBadgeLabel: getProteinImpactTypeBadgeLabel, useOnlyFeature: true, badgeFirst: true }, this.props)))),
2410
+ this.props.groupNameWithOrdinal && (React__namespace.createElement("div", { style: {
2411
+ fontSize: 12,
2412
+ fontWeight: 'bold',
2413
+ textAlign: 'center',
2414
+ writingMode: 'vertical-lr',
2415
+ transform: 'rotate(180deg)',
2416
+ } }, this.props.groupNameWithOrdinal))));
2421
2417
  }
2422
2418
  });
2423
2419
  Object.defineProperty(ProteinImpactTypeBadgeSelector, "defaultProps", {