react-mutation-mapper 0.8.75 → 0.8.77
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/component/column/Annotation.d.ts +2 -2
- package/dist/component/filter/BadgeLabel.d.ts +5 -1
- package/dist/component/filter/BadgeSelector.d.ts +19 -4
- package/dist/component/filter/ProteinImpactTypeBadgeSelector.d.ts +1 -1
- package/dist/index.es.js +61 -19
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +60 -18
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -737,9 +737,9 @@ function sortValue$4(annotation) {
|
|
|
737
737
|
]);
|
|
738
738
|
}
|
|
739
739
|
function GenericAnnotation(props) {
|
|
740
|
-
var annotation = props.annotation, enableCivic = props.enableCivic, enableHotspot = props.enableHotspot, enableMyCancerGenome = props.enableMyCancerGenome, enableOncoKb = props.enableOncoKb; props.pubMedCache; var
|
|
740
|
+
var annotation = props.annotation, enableCivic = props.enableCivic, enableHotspot = props.enableHotspot, enableMyCancerGenome = props.enableMyCancerGenome, enableOncoKb = props.enableOncoKb; props.pubMedCache; var userDisplayName = props.userDisplayName, mergeOncoKbIcons = props.mergeOncoKbIcons, oncoKbContentPadding = props.oncoKbContentPadding;
|
|
741
741
|
return (React__namespace.createElement("span", { style: { display: 'flex', minWidth: 100 } },
|
|
742
|
-
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,
|
|
742
|
+
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 })),
|
|
743
743
|
enableCivic && (React__namespace.createElement(Civic, { civicEntry: annotation.civicEntry, civicStatus: annotation.civicStatus, hasCivicVariants: annotation.hasCivicVariants })),
|
|
744
744
|
enableMyCancerGenome && (React__namespace.createElement(MyCancerGenome, { linksHTML: annotation.myCancerGenomeLinks })),
|
|
745
745
|
enableHotspot && (React__namespace.createElement(HotspotAnnotation, { isHotspot: annotation.isHotspot, is3dHotspot: annotation.is3dHotspot, status: annotation.hotspotStatus }))));
|
|
@@ -1888,30 +1888,62 @@ 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
|
+
});
|
|
1891
1909
|
Object.defineProperty(BadgeLabel.prototype, "badge", {
|
|
1892
1910
|
get: function () {
|
|
1893
1911
|
return (React__namespace.createElement("span", { style: this.props.badgeFirst
|
|
1894
|
-
?
|
|
1912
|
+
? this.props.isDriverAnnotated
|
|
1913
|
+
? {}
|
|
1914
|
+
: { marginRight: 5 }
|
|
1895
1915
|
: { marginLeft: 5 } },
|
|
1896
|
-
React__namespace.createElement("span", { className: this.props.badgeClassName, "data-test": "badge-" + this.props.value, style: tslib.__assign(tslib.__assign({}, DEFAULT_BADGE_STYLE), this.props.badgeStyleOverride)
|
|
1916
|
+
React__namespace.createElement("span", { className: this.props.badgeClassName, "data-test": "badge-" + this.props.value, style: tslib.__assign(tslib.__assign(tslib.__assign({}, DEFAULT_BADGE_STYLE), this.props.badgeStyleOverride), (this.props.isDriverAnnotated
|
|
1917
|
+
? { marginRight: 0, width: 'auto' }
|
|
1918
|
+
: {})) }, this.props.badgeContent)));
|
|
1897
1919
|
},
|
|
1898
1920
|
enumerable: false,
|
|
1899
1921
|
configurable: true
|
|
1900
1922
|
});
|
|
1901
1923
|
Object.defineProperty(BadgeLabel.prototype, "badgeFirst", {
|
|
1902
1924
|
get: function () {
|
|
1903
|
-
|
|
1904
|
-
this.badge
|
|
1905
|
-
|
|
1925
|
+
if (this.props.badgeLabelFormat) {
|
|
1926
|
+
return this.props.badgeLabelFormat(this.props.label, true, this.props.value, this.badge);
|
|
1927
|
+
}
|
|
1928
|
+
else {
|
|
1929
|
+
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1930
|
+
this.badge,
|
|
1931
|
+
this.props.label));
|
|
1932
|
+
}
|
|
1906
1933
|
},
|
|
1907
1934
|
enumerable: false,
|
|
1908
1935
|
configurable: true
|
|
1909
1936
|
});
|
|
1910
1937
|
Object.defineProperty(BadgeLabel.prototype, "badgeLast", {
|
|
1911
1938
|
get: function () {
|
|
1912
|
-
|
|
1913
|
-
this.props.label,
|
|
1914
|
-
|
|
1939
|
+
if (this.props.badgeLabelFormat) {
|
|
1940
|
+
return this.props.badgeLabelFormat(this.props.label, false, this.props.value, this.badge);
|
|
1941
|
+
}
|
|
1942
|
+
else {
|
|
1943
|
+
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
1944
|
+
this.props.label,
|
|
1945
|
+
this.badge));
|
|
1946
|
+
}
|
|
1915
1947
|
},
|
|
1916
1948
|
enumerable: false,
|
|
1917
1949
|
configurable: true
|
|
@@ -2042,8 +2074,8 @@ var BadgeSelector = /** @class */ (function (_super) {
|
|
|
2042
2074
|
enumerable: false,
|
|
2043
2075
|
configurable: true,
|
|
2044
2076
|
writable: true,
|
|
2045
|
-
value: function (option, selectedValues, badgeClassName, badgeAlignmentStyle) {
|
|
2046
|
-
return this.props.getBadgeLabel ? (this.props.getBadgeLabel(option, selectedValues, badgeClassName, badgeAlignmentStyle)) : (React__namespace.createElement(BadgeLabel, { label: option.label || option.value, badgeContent: option.badgeContent, badgeStyleOverride: getBadgeStyleOverride(option, selectedValues, badgeAlignmentStyle), badgeClassName: this.props.badgeClassName }));
|
|
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 }));
|
|
2047
2079
|
}
|
|
2048
2080
|
});
|
|
2049
2081
|
Object.defineProperty(BadgeSelector.prototype, "badgeAlignmentStyles", {
|
|
@@ -2061,7 +2093,7 @@ var BadgeSelector = /** @class */ (function (_super) {
|
|
|
2061
2093
|
return (this.props.options || []).map(function (option, index) { return ({
|
|
2062
2094
|
label: _this.getBadgeLabel(option, _this.selectedValuesMap, _this.props.badgeClassName, _this.badgeAlignmentStyles && _this.props.numberOfColumnsPerRow
|
|
2063
2095
|
? _this.badgeAlignmentStyles[index]
|
|
2064
|
-
: undefined),
|
|
2096
|
+
: undefined, _this.props.isDriverAnnotated, _this.props.badgeLabelFormat),
|
|
2065
2097
|
value: option.value,
|
|
2066
2098
|
}); });
|
|
2067
2099
|
},
|
|
@@ -2073,7 +2105,7 @@ var BadgeSelector = /** @class */ (function (_super) {
|
|
|
2073
2105
|
configurable: true,
|
|
2074
2106
|
writable: true,
|
|
2075
2107
|
value: function () {
|
|
2076
|
-
return (React__namespace.createElement(cbioportalFrontendCommons.
|
|
2108
|
+
return (React__namespace.createElement(cbioportalFrontendCommons.BadgeListSelector, { onChange: this.onChange, options: this.options, getOptionLabel: this.props.getOptionLabel, selectedValue: this.selectedValues, isDisabled: this.props.isDisabled, numberOfColumnsPerRow: this.props.numberOfColumnsPerRow, isDriverAnnotated: this.props.isDriverAnnotated, onOnlyDriverVsVusChange: this.onOnlyDriverVsVusChange, driverAnnotationIcon: this.props.driverAnnotationIcon, onBadgeSelect: this.props.onBadgeSelect, onOnlySelect: this.props.onOnlySelect, useOnlyFeature: this.props.useOnlyFeature }));
|
|
2077
2109
|
}
|
|
2078
2110
|
});
|
|
2079
2111
|
Object.defineProperty(BadgeSelector.prototype, "onChange", {
|
|
@@ -2084,6 +2116,14 @@ var BadgeSelector = /** @class */ (function (_super) {
|
|
|
2084
2116
|
handleOptionSelect(values, this.allValues, this.props.onSelect);
|
|
2085
2117
|
}
|
|
2086
2118
|
});
|
|
2119
|
+
Object.defineProperty(BadgeSelector.prototype, "onOnlyDriverVsVusChange", {
|
|
2120
|
+
enumerable: false,
|
|
2121
|
+
configurable: true,
|
|
2122
|
+
writable: true,
|
|
2123
|
+
value: function (values) {
|
|
2124
|
+
handleOptionSelect(values, this.allValues, this.props.onOnlyDriverVsVusSelect);
|
|
2125
|
+
}
|
|
2126
|
+
});
|
|
2087
2127
|
tslib.__decorate([
|
|
2088
2128
|
mobx.computed
|
|
2089
2129
|
], BadgeSelector.prototype, "allValues", null);
|
|
@@ -2102,6 +2142,9 @@ var BadgeSelector = /** @class */ (function (_super) {
|
|
|
2102
2142
|
tslib.__decorate([
|
|
2103
2143
|
mobx.action.bound
|
|
2104
2144
|
], BadgeSelector.prototype, "onChange", null);
|
|
2145
|
+
tslib.__decorate([
|
|
2146
|
+
mobx.action.bound
|
|
2147
|
+
], BadgeSelector.prototype, "onOnlyDriverVsVusChange", null);
|
|
2105
2148
|
BadgeSelector = tslib.__decorate([
|
|
2106
2149
|
mobxReact.observer
|
|
2107
2150
|
], BadgeSelector);
|
|
@@ -2323,8 +2366,8 @@ var VALUES = [
|
|
|
2323
2366
|
function getProteinImpactTypeOptionLabel(option) {
|
|
2324
2367
|
return React__namespace.createElement("span", null, option.label || option.value);
|
|
2325
2368
|
}
|
|
2326
|
-
function getProteinImpactTypeBadgeLabel(option, selectedValues, badgeClassName, badgeAlignmentStyle) {
|
|
2327
|
-
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 }));
|
|
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 }));
|
|
2328
2371
|
}
|
|
2329
2372
|
var ProteinImpactTypeBadgeSelector = /** @class */ (function (_super) {
|
|
2330
2373
|
tslib.__extends(ProteinImpactTypeBadgeSelector, _super);
|
|
@@ -2371,7 +2414,7 @@ var ProteinImpactTypeBadgeSelector = /** @class */ (function (_super) {
|
|
|
2371
2414
|
configurable: true,
|
|
2372
2415
|
writable: true,
|
|
2373
2416
|
value: function () {
|
|
2374
|
-
return (React__namespace.createElement(BadgeSelector, tslib.__assign({ options: this.options, getOptionLabel: getProteinImpactTypeOptionLabel, getBadgeLabel: getProteinImpactTypeBadgeLabel }, this.props)));
|
|
2417
|
+
return (React__namespace.createElement(BadgeSelector, tslib.__assign({ options: this.options, getOptionLabel: getProteinImpactTypeOptionLabel, getBadgeLabel: getProteinImpactTypeBadgeLabel, useOnlyFeature: true }, this.props)));
|
|
2375
2418
|
}
|
|
2376
2419
|
});
|
|
2377
2420
|
Object.defineProperty(ProteinImpactTypeBadgeSelector, "defaultProps", {
|
|
@@ -2381,7 +2424,6 @@ var ProteinImpactTypeBadgeSelector = /** @class */ (function (_super) {
|
|
|
2381
2424
|
value: {
|
|
2382
2425
|
colors: DEFAULT_PROTEIN_IMPACT_TYPE_COLORS,
|
|
2383
2426
|
alignColumns: true,
|
|
2384
|
-
unselectOthersWhenAllSelected: false,
|
|
2385
2427
|
numberOfColumnsPerRow: 2,
|
|
2386
2428
|
}
|
|
2387
2429
|
});
|