drugflow-molstar
Version:
Molstar implementation for DrugFlow
71 lines (70 loc) • 5.64 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PDBeSuperpositionStructureTools = exports.PDBeLigandViewStructureTools = exports.CustomStructureControls = exports.PDBeStructureTools = void 0;
var tslib_1 = require("tslib");
var jsx_runtime_1 = require("react/jsx-runtime");
var base_1 = require("Molstar/mol-plugin-ui/base");
var components_1 = require("Molstar/mol-plugin-ui/structure/components");
var measurements_1 = require("Molstar/mol-plugin-ui/structure/measurements");
var source_1 = require("Molstar/mol-plugin-ui/structure/source");
var volume_1 = require("Molstar/mol-plugin-ui/structure/volume");
var annotation_controls_1 = require("./annotation-controls");
var icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
var superposition_components_1 = require("./superposition-components");
var quick_styles_1 = require("Molstar/mol-plugin-ui/structure/quick-styles");
var alphafold_superposition_1 = require("./alphafold-superposition");
var export_superposition_1 = require("./export-superposition");
var alphafold_tranparency_1 = require("./alphafold-tranparency");
var PDBeStructureTools = /** @class */ (function (_super) {
tslib_1.__extends(PDBeStructureTools, _super);
function PDBeStructureTools() {
return _super !== null && _super.apply(this, arguments) || this;
}
PDBeStructureTools.prototype.render = function () {
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-section-header' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }), "Structure Tools"] })), (0, jsx_runtime_1.jsx)(source_1.StructureSourceControls, {}), (0, jsx_runtime_1.jsx)(annotation_controls_1.AnnotationsComponentControls, {}), (0, jsx_runtime_1.jsx)(quick_styles_1.StructureQuickStylesControls, {}), (0, jsx_runtime_1.jsx)(components_1.StructureComponentControls, {}), (0, jsx_runtime_1.jsx)(volume_1.VolumeStreamingControls, {}), (0, jsx_runtime_1.jsx)(volume_1.VolumeSourceControls, {}), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}), (0, jsx_runtime_1.jsx)(CustomStructureControls, {})] });
};
return PDBeStructureTools;
}(base_1.PluginUIComponent));
exports.PDBeStructureTools = PDBeStructureTools;
var CustomStructureControls = /** @class */ (function (_super) {
tslib_1.__extends(CustomStructureControls, _super);
function CustomStructureControls() {
return _super !== null && _super.apply(this, arguments) || this;
}
CustomStructureControls.prototype.componentDidMount = function () {
var _this = this;
this.subscribe(this.plugin.state.behaviors.events.changed, function () { return _this.forceUpdate(); });
};
CustomStructureControls.prototype.render = function () {
var _this = this;
var controls = [];
this.plugin.customStructureControls.forEach(function (Controls, key) {
controls.push((0, jsx_runtime_1.jsx)(Controls, { initiallyCollapsed: _this.props.initiallyCollapsed }, key));
});
return controls.length > 0 ? (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: controls }) : null;
};
return CustomStructureControls;
}(base_1.PluginUIComponent));
exports.CustomStructureControls = CustomStructureControls;
var PDBeLigandViewStructureTools = /** @class */ (function (_super) {
tslib_1.__extends(PDBeLigandViewStructureTools, _super);
function PDBeLigandViewStructureTools() {
return _super !== null && _super.apply(this, arguments) || this;
}
PDBeLigandViewStructureTools.prototype.render = function () {
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-section-header' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }), "Structure Tools"] })), (0, jsx_runtime_1.jsx)(components_1.StructureComponentControls, {}), (0, jsx_runtime_1.jsx)(volume_1.VolumeStreamingControls, {}), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}), (0, jsx_runtime_1.jsx)(CustomStructureControls, {})] });
};
return PDBeLigandViewStructureTools;
}(base_1.PluginUIComponent));
exports.PDBeLigandViewStructureTools = PDBeLigandViewStructureTools;
var PDBeSuperpositionStructureTools = /** @class */ (function (_super) {
tslib_1.__extends(PDBeSuperpositionStructureTools, _super);
function PDBeSuperpositionStructureTools() {
return _super !== null && _super.apply(this, arguments) || this;
}
PDBeSuperpositionStructureTools.prototype.render = function () {
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-section-header' }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: icons_1.BuildSvg }), "Structure Tools"] })), (0, jsx_runtime_1.jsx)(superposition_components_1.SuperpositionComponentControls, {}), (0, jsx_runtime_1.jsx)(alphafold_tranparency_1.AlphafoldTransparencyControls, {}), (0, jsx_runtime_1.jsx)(alphafold_superposition_1.AlphafoldPaeControls, {}), (0, jsx_runtime_1.jsx)(alphafold_superposition_1.AlphafoldSuperpositionControls, {}), (0, jsx_runtime_1.jsx)(measurements_1.StructureMeasurementsControls, {}), (0, jsx_runtime_1.jsx)(export_superposition_1.SuperpositionModelExportUI, {}), (0, jsx_runtime_1.jsx)(CustomStructureControls, {})] });
};
return PDBeSuperpositionStructureTools;
}(base_1.PluginUIComponent));
exports.PDBeSuperpositionStructureTools = PDBeSuperpositionStructureTools;