react-mutation-mapper 0.8.88 → 0.8.89

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
@@ -775,9 +775,9 @@ function sortValue$4(annotation) {
775
775
  ]);
776
776
  }
777
777
  function GenericAnnotation(props) {
778
- var annotation = props.annotation, enableCivic = props.enableCivic, enableHotspot = props.enableHotspot, enableMyCancerGenome = props.enableMyCancerGenome, enableOncoKb = props.enableOncoKb, enableRevue = props.enableRevue; props.pubMedCache; var userDisplayName = props.userDisplayName, mergeOncoKbIcons = props.mergeOncoKbIcons, oncoKbContentPadding = props.oncoKbContentPadding;
778
+ var annotation = props.annotation, enableCivic = props.enableCivic, enableHotspot = props.enableHotspot, enableMyCancerGenome = props.enableMyCancerGenome, enableOncoKb = props.enableOncoKb, enableRevue = props.enableRevue; props.pubMedCache; var userDisplayName = props.userDisplayName, mergeOncoKbIcons = props.mergeOncoKbIcons, oncoKbContentPadding = props.oncoKbContentPadding, hasMultipleCancerTypes = props.hasMultipleCancerTypes;
779
779
  return (React__namespace.createElement("span", { style: { display: 'flex', minWidth: 100 } },
780
- enableOncoKb && (React__namespace.createElement(oncokbFrontendCommons.OncoKB, { usingPublicOncoKbInstance: annotation.usingPublicOncoKbInstance, hugoGeneSymbol: annotation.hugoGeneSymbol, geneNotExist: !annotation.oncoKbGeneExist, isCancerGene: annotation.isOncoKbCancerGene, status: annotation.oncoKbStatus, indicator: annotation.oncoKbIndicator, availableDataTypes: annotation.oncoKbAvailableDataTypes, mergeAnnotationIcons: mergeOncoKbIcons, userDisplayName: userDisplayName, contentPadding: oncoKbContentPadding })),
780
+ enableOncoKb && (React__namespace.createElement(oncokbFrontendCommons.OncoKB, { usingPublicOncoKbInstance: annotation.usingPublicOncoKbInstance, hugoGeneSymbol: annotation.hugoGeneSymbol, geneNotExist: !annotation.oncoKbGeneExist, isCancerGene: annotation.isOncoKbCancerGene, status: annotation.oncoKbStatus, indicator: annotation.oncoKbIndicator, availableDataTypes: annotation.oncoKbAvailableDataTypes, mergeAnnotationIcons: mergeOncoKbIcons, userDisplayName: userDisplayName, contentPadding: oncoKbContentPadding, hasMultipleCancerTypes: hasMultipleCancerTypes })),
781
781
  enableRevue ? (annotation.vue ? (React__namespace.createElement(RevueCell, { vue: annotation.vue })) : (React__namespace.createElement("span", { className: "" + annotationStyles['annotation-item'] }))) : (React__namespace.createElement(React__namespace.Fragment, null)),
782
782
  enableCivic && (React__namespace.createElement(Civic, { civicEntry: annotation.civicEntry, civicStatus: annotation.civicStatus, hasCivicVariants: annotation.hasCivicVariants })),
783
783
  enableMyCancerGenome && (React__namespace.createElement(MyCancerGenome, { linksHTML: annotation.myCancerGenomeLinks })),
@@ -2618,8 +2618,10 @@ var FilterResetPanel = /** @class */ (function (_super) {
2618
2618
  value: function () {
2619
2619
  return (React__namespace.createElement("div", { className: this.props.className, "data-test": "filter-reset-panel" },
2620
2620
  React__namespace.createElement("span", { style: { verticalAlign: 'middle' } },
2621
- this.props.filterInfo,
2622
- React__namespace.createElement("button", { className: this.props.buttonClass, style: { cursor: 'pointer', marginLeft: 6 }, onClick: this.props.resetFilters }, this.props.buttonText))));
2621
+ React__namespace.createElement("strong", null, this.props.filterInfo),
2622
+ React__namespace.createElement("button", { className: this.props.buttonClass, style: { cursor: 'pointer', marginLeft: 6 }, onClick: this.props.resetFilters }, this.props.buttonText),
2623
+ React__namespace.createElement("br", null),
2624
+ this.props.additionalInfo)));
2623
2625
  }
2624
2626
  });
2625
2627
  Object.defineProperty(FilterResetPanel, "defaultProps", {
@@ -2647,6 +2649,7 @@ exports.DataFilterType = void 0;
2647
2649
  DataFilterType["CANCER_TYPE"] = "cancerType";
2648
2650
  DataFilterType["PROTEIN_IMPACT_TYPE"] = "proteinImpactType";
2649
2651
  DataFilterType["MUTATION_STATUS"] = "mutationStatus";
2652
+ DataFilterType["PROTEIN_CHANGE"] = "proteinChange";
2650
2653
  })(exports.DataFilterType || (exports.DataFilterType = {}));
2651
2654
 
2652
2655
  var TEXT_INPUT_FILTER_ID = '_mutationTableTextInputFilter_';
@@ -2729,6 +2732,12 @@ function applyDefaultPositionFilter(filter, mutation) {
2729
2732
  function applyDefaultProteinImpactTypeFilter(filter, mutation) {
2730
2733
  return filter.values.includes(cbioportalFrontendCommons.getProteinImpactType(mutation.mutationType || 'other'));
2731
2734
  }
2735
+ function applyDefaultProteinChangeFilter(filter, mutation) {
2736
+ return (mutation.proteinChange !== undefined &&
2737
+ ___default["default"].some(filter.values, function (value) {
2738
+ return value.toLowerCase() === mutation.proteinChange.toLowerCase();
2739
+ }));
2740
+ }
2732
2741
  function applyDefaultMutationStatusFilter(filter, mutation) {
2733
2742
  return (mutation.mutationStatus !== undefined &&
2734
2743
  ___default["default"].some(filter.values, function (value) {
@@ -6002,7 +6011,6 @@ var PercentToggle = /** @class */ (function (_super) {
6002
6011
  } },
6003
6012
  React__namespace.createElement("div", { style: {
6004
6013
  marginLeft: 10,
6005
- marginRight: 10,
6006
6014
  } },
6007
6015
  React__namespace.createElement("div", { style: { textAlign: 'center' } }, "Y-Axis:"),
6008
6016
  React__namespace.createElement(AxisScaleSwitch, { selectedScale: this.props.axisMode, onChange: this.props.onScaleToggle }))));
@@ -9577,7 +9585,7 @@ var DefaultMutationMapperFilterApplier = /** @class */ (function () {
9577
9585
  get: function () {
9578
9586
  var _a;
9579
9587
  return tslib.__assign((_a = {}, _a[exports.DataFilterType.POSITION] = this.applyPositionFilter, _a[exports.DataFilterType.ONCOKB] = this.applyOncoKbFilter, _a[exports.DataFilterType.HOTSPOT] = this.applyHostpotFilter, _a[exports.DataFilterType.MUTATION] = this.applyMutationFilter, _a[exports.DataFilterType.PROTEIN_IMPACT_TYPE] = this
9580
- .applyProteinImpactTypeFilter, _a[exports.DataFilterType.MUTATION_STATUS] = this.applyMutationStatusFilter, _a), this.filterAppliersOverride);
9588
+ .applyProteinImpactTypeFilter, _a[exports.DataFilterType.MUTATION_STATUS] = this.applyMutationStatusFilter, _a[exports.DataFilterType.PROTEIN_CHANGE] = this.applyProteinChangeFilter, _a), this.filterAppliersOverride);
9581
9589
  },
9582
9590
  enumerable: false,
9583
9591
  configurable: true
@@ -9646,6 +9654,14 @@ var DefaultMutationMapperFilterApplier = /** @class */ (function () {
9646
9654
  return applyDefaultMutationStatusFilter(filter, mutation);
9647
9655
  }
9648
9656
  });
9657
+ Object.defineProperty(DefaultMutationMapperFilterApplier.prototype, "applyProteinChangeFilter", {
9658
+ enumerable: false,
9659
+ configurable: true,
9660
+ writable: true,
9661
+ value: function (filter, mutation) {
9662
+ return applyDefaultProteinChangeFilter(filter, mutation);
9663
+ }
9664
+ });
9649
9665
  tslib.__decorate([
9650
9666
  autobind__default["default"]
9651
9667
  ], DefaultMutationMapperFilterApplier.prototype, "applyFilter", null);
@@ -9667,6 +9683,9 @@ var DefaultMutationMapperFilterApplier = /** @class */ (function () {
9667
9683
  tslib.__decorate([
9668
9684
  autobind__default["default"]
9669
9685
  ], DefaultMutationMapperFilterApplier.prototype, "applyMutationStatusFilter", null);
9686
+ tslib.__decorate([
9687
+ autobind__default["default"]
9688
+ ], DefaultMutationMapperFilterApplier.prototype, "applyProteinChangeFilter", null);
9670
9689
  return DefaultMutationMapperFilterApplier;
9671
9690
  }());
9672
9691
 
@@ -11575,6 +11594,7 @@ exports.applyDataFiltersOnDatum = applyDataFiltersOnDatum;
11575
11594
  exports.applyDefaultMutationFilter = applyDefaultMutationFilter;
11576
11595
  exports.applyDefaultMutationStatusFilter = applyDefaultMutationStatusFilter;
11577
11596
  exports.applyDefaultPositionFilter = applyDefaultPositionFilter;
11597
+ exports.applyDefaultProteinChangeFilter = applyDefaultProteinChangeFilter;
11578
11598
  exports.applyDefaultProteinImpactTypeFilter = applyDefaultProteinImpactTypeFilter;
11579
11599
  exports.calculateGnomadAlleleFrequency = calculateGnomadAlleleFrequency;
11580
11600
  exports.civicDownload = download$6;