inversify-devtools
Version:
inversify-devtools
34 lines (33 loc) • 1.73 kB
JavaScript
;
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var React = require("react");
var panel_1 = require("./panel");
var react_json_tree_1 = require("react-json-tree");
var json_tree_theme_1 = require("../constants/json_tree_theme");
var tip_1 = require("./tip");
var utils_1 = require("../utils/utils");
var BindingPropsExplorer = (function (_super) {
__extends(BindingPropsExplorer, _super);
function BindingPropsExplorer(props) {
_super.call(this, props);
}
BindingPropsExplorer.prototype.render = function () {
return (React.createElement(panel_1.default, {title: "Implementations", subtitle: "Explorer", columnSize: this.props.columnSize, height: this.props.height}, this._render()));
};
BindingPropsExplorer.prototype._render = function () {
if (this.props.bindings.length > 0) {
var bindings = utils_1.formatBindings(this.props.bindings);
return (React.createElement("div", {className: "entryDetails"}, React.createElement("div", {style: { overflowX: "scroll" }}, React.createElement(react_json_tree_1.default, {data: bindings, theme: json_tree_theme_1.default, isLightTheme: true}))));
}
else {
return (React.createElement(tip_1.default, null, "Click on one of the services on the services panel (left) to see its binding!"));
}
};
return BindingPropsExplorer;
}(React.Component));
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = BindingPropsExplorer;