UNPKG

pdbe-molstar

Version:
57 lines (56 loc) 4.85 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PDBeSuperpositionStructureTools = exports.PDBeLigandViewStructureTools = exports.CustomStructureControls = exports.PDBeStructureTools = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const base_1 = require("molstar/lib/mol-plugin-ui/base"); const components_1 = require("molstar/lib/mol-plugin-ui/structure/components"); const measurements_1 = require("molstar/lib/mol-plugin-ui/structure/measurements"); const source_1 = require("molstar/lib/mol-plugin-ui/structure/source"); const volume_1 = require("molstar/lib/mol-plugin-ui/structure/volume"); const annotation_controls_1 = require("./annotation-controls"); const icons_1 = require("molstar/lib/mol-plugin-ui/controls/icons"); const superposition_components_1 = require("./superposition-components"); const quick_styles_1 = require("molstar/lib/mol-plugin-ui/structure/quick-styles"); const alphafold_superposition_1 = require("./alphafold-superposition"); const export_superposition_1 = require("./export-superposition"); const alphafold_tranparency_1 = require("./alphafold-tranparency"); const prop_1 = require("molstar/lib/extensions/assembly-symmetry/prop"); class PDBeStructureTools extends base_1.PluginUIComponent { render() { const AssemblySymmetryKey = prop_1.AssemblySymmetryData.Tag.Representation; return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { 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, { skipKeys: [AssemblySymmetryKey] })] }); } } exports.PDBeStructureTools = PDBeStructureTools; class CustomStructureControls extends base_1.PluginUIComponent { componentDidMount() { this.subscribe(this.plugin.state.behaviors.events.changed, () => this.forceUpdate()); } render() { var _a, _b; const takeKeys = (_a = this.props.takeKeys) !== null && _a !== void 0 ? _a : Array.from(this.plugin.customStructureControls.keys()); const result = []; for (const key of takeKeys) { if ((_b = this.props.skipKeys) === null || _b === void 0 ? void 0 : _b.includes(key)) continue; const Controls = this.plugin.customStructureControls.get(key); if (!Controls) continue; result.push((0, jsx_runtime_1.jsx)(Controls, { initiallyCollapsed: this.props.initiallyCollapsed }, key)); } return result.length > 0 ? (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: result }) : null; } } exports.CustomStructureControls = CustomStructureControls; class PDBeLigandViewStructureTools extends base_1.PluginUIComponent { render() { return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { 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, {})] }); } } exports.PDBeLigandViewStructureTools = PDBeLigandViewStructureTools; class PDBeSuperpositionStructureTools extends base_1.PluginUIComponent { render() { return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { 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, {})] }); } } exports.PDBeSuperpositionStructureTools = PDBeSuperpositionStructureTools;