drugflow-molstar 0.4.7 → 0.4.9

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.
Files changed (54) hide show
  1. package/build/drugflow-molstar-0.4.9.css +1 -0
  2. package/build/drugflow-molstar-component-0.4.9.js +25 -0
  3. package/build/drugflow-molstar-plugin-0.4.9.js +2 -0
  4. package/build/drugflow-molstar-plugin-0.4.9.js.LICENSE.txt +39 -0
  5. package/lib/alphafold-transparency.js +157 -62
  6. package/lib/contact.d.ts +7 -14
  7. package/lib/contact.js +68 -72
  8. package/lib/custom-events.js +15 -15
  9. package/lib/domain-annotations/behavior.d.ts +1 -1
  10. package/lib/domain-annotations/behavior.js +24 -20
  11. package/lib/domain-annotations/color.js +22 -22
  12. package/lib/domain-annotations/prop.js +111 -62
  13. package/lib/drugflow-molstar-component-build-0.4.8.js +2 -0
  14. package/lib/drugflow-molstar-component-build-0.4.8.js.LICENSE.txt +24 -0
  15. package/lib/drugflow-molstar-component-build-0.4.9.js +2 -0
  16. package/lib/drugflow-molstar-component-build-0.4.9.js.LICENSE.txt +24 -0
  17. package/lib/helpers.d.ts +3 -3
  18. package/lib/helpers.js +94 -89
  19. package/lib/index.d.ts +902 -1
  20. package/lib/index.js +2814 -1875
  21. package/lib/labels.d.ts +1 -1
  22. package/lib/labels.js +34 -20
  23. package/lib/loci-details.js +46 -34
  24. package/lib/sifts-mapping.js +32 -28
  25. package/lib/sifts-mappings-behaviour.d.ts +1 -1
  26. package/lib/sifts-mappings-behaviour.js +30 -26
  27. package/lib/spec.js +40 -52
  28. package/lib/structure_contact3d.d.ts +14 -21
  29. package/lib/structure_contact3d.js +46 -25
  30. package/lib/subscribe-events.js +18 -19
  31. package/lib/superposition-export.js +178 -102
  32. package/lib/superposition-focus-representation.d.ts +2 -2
  33. package/lib/superposition-focus-representation.js +131 -73
  34. package/lib/superposition-sifts-mapping.js +150 -105
  35. package/lib/superposition.js +810 -495
  36. package/lib/ui/alphafold-superposition.d.ts +1 -1
  37. package/lib/ui/alphafold-superposition.js +118 -94
  38. package/lib/ui/alphafold-tranparency.js +43 -27
  39. package/lib/ui/annotation-controls.js +89 -83
  40. package/lib/ui/export-superposition.d.ts +0 -1
  41. package/lib/ui/export-superposition.js +50 -32
  42. package/lib/ui/pdbe-left-panel.d.ts +0 -1
  43. package/lib/ui/pdbe-left-panel.js +105 -82
  44. package/lib/ui/pdbe-screenshot-controls.js +83 -54
  45. package/lib/ui/pdbe-structure-controls.js +57 -34
  46. package/lib/ui/pdbe-viewport-controls.js +29 -23
  47. package/lib/ui/segment-tree.js +663 -440
  48. package/lib/ui/superposition-components.js +312 -208
  49. package/lib/ui/superposition-viewport.js +18 -11
  50. package/package.json +3 -3
  51. package/build/drugflow-molstar-0.4.7.css +0 -1
  52. package/build/drugflow-molstar-component-0.4.7.js +0 -25
  53. package/build/drugflow-molstar-plugin-0.4.7.js +0 -2
  54. package/build/drugflow-molstar-plugin-0.4.7.js.LICENSE.txt +0 -64
@@ -1,69 +1,77 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LeftPanelControls = exports.WavesIconSvg = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const canvas3d_1 = require("Molstar/mol-canvas3d/canvas3d");
6
- const commands_1 = require("Molstar/mol-plugin/commands");
7
- const mol_state_1 = require("Molstar/mol-state");
8
- const base_1 = require("Molstar/mol-plugin-ui/base");
9
- const common_1 = require("Molstar/mol-plugin-ui/controls/common");
10
- const parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
11
- const actions_1 = require("Molstar/mol-plugin-ui/state/actions");
12
- const snapshots_1 = require("Molstar/mol-plugin-ui/state/snapshots");
13
- const tree_1 = require("Molstar/mol-plugin-ui/state/tree");
14
- const help_1 = require("Molstar/mol-plugin-ui/viewport/help");
15
- const segment_tree_1 = require("./segment-tree");
16
- const icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
17
- const help_2 = require("Molstar/mol-plugin-ui/viewport/help");
18
- const _WavesIcon = (0, jsx_runtime_1.jsx)("svg", { width: '24px', height: '24px', viewBox: '0 0 24 24', children: (0, jsx_runtime_1.jsx)("path", { d: "M17 16.99c-1.35 0-2.2.42-2.95.8-.65.33-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.38-1.57-.8-2.95-.8s-2.2.42-2.95.8c-.65.33-1.17.6-2.05.6v1.95c1.35 0 2.2-.42 2.95-.8.65-.33 1.17-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.42 2.95-.8c.65-.33 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8v-1.95c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8zm0-4.45c-1.35 0-2.2.43-2.95.8-.65.32-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.38-1.57-.8-2.95-.8s-2.2.43-2.95.8c-.65.32-1.17.6-2.05.6v1.95c1.35 0 2.2-.43 2.95-.8.65-.35 1.15-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.35 1.15-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.58.8 2.95.8v-1.95c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8zm2.95-8.08c-.75-.38-1.58-.8-2.95-.8s-2.2.42-2.95.8c-.65.32-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.37-1.57-.8-2.95-.8s-2.2.42-2.95.8c-.65.33-1.17.6-2.05.6v1.93c1.35 0 2.2-.43 2.95-.8.65-.33 1.17-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.32 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8V5.04c-.9 0-1.4-.25-2.05-.58zM17 8.09c-1.35 0-2.2.43-2.95.8-.65.35-1.15.6-2.05.6s-1.4-.25-2.05-.6c-.75-.38-1.57-.8-2.95-.8s-2.2.43-2.95.8c-.65.35-1.15.6-2.05.6v1.95c1.35 0 2.2-.43 2.95-.8.65-.32 1.18-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.32 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8V9.49c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8z" }) });
19
- function WavesIconSvg() { return _WavesIcon; }
3
+ exports.LeftPanelControls = void 0;
20
4
  exports.WavesIconSvg = WavesIconSvg;
21
- class LeftPanelControls extends base_1.PluginUIComponent {
22
- constructor() {
23
- super(...arguments);
24
- this.state = { tab: this.plugin.behaviors.layout.leftPanelTabName.value };
25
- this.set = (tab) => {
26
- if (this.state.tab === tab) {
27
- this.setState({ tab: 'none' }, () => this.plugin.behaviors.layout.leftPanelTabName.next('none'));
28
- commands_1.PluginCommands.Layout.Update(this.plugin, { state: { regionState: { ...this.plugin.layout.state.regionState, left: 'collapsed' } } });
5
+ var tslib_1 = require("tslib");
6
+ var jsx_runtime_1 = require("react/jsx-runtime");
7
+ var canvas3d_1 = require("Molstar/mol-canvas3d/canvas3d");
8
+ var commands_1 = require("Molstar/mol-plugin/commands");
9
+ var mol_state_1 = require("Molstar/mol-state");
10
+ var base_1 = require("Molstar/mol-plugin-ui/base");
11
+ var common_1 = require("Molstar/mol-plugin-ui/controls/common");
12
+ var parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
13
+ var actions_1 = require("Molstar/mol-plugin-ui/state/actions");
14
+ var snapshots_1 = require("Molstar/mol-plugin-ui/state/snapshots");
15
+ var tree_1 = require("Molstar/mol-plugin-ui/state/tree");
16
+ var help_1 = require("Molstar/mol-plugin-ui/viewport/help");
17
+ var segment_tree_1 = require("./segment-tree");
18
+ var icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
19
+ var help_2 = require("Molstar/mol-plugin-ui/viewport/help");
20
+ var _WavesIcon = (0, jsx_runtime_1.jsx)("svg", { width: '24px', height: '24px', viewBox: '0 0 24 24', children: (0, jsx_runtime_1.jsx)("path", { d: "M17 16.99c-1.35 0-2.2.42-2.95.8-.65.33-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.38-1.57-.8-2.95-.8s-2.2.42-2.95.8c-.65.33-1.17.6-2.05.6v1.95c1.35 0 2.2-.42 2.95-.8.65-.33 1.17-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.42 2.95-.8c.65-.33 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8v-1.95c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8zm0-4.45c-1.35 0-2.2.43-2.95.8-.65.32-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.38-1.57-.8-2.95-.8s-2.2.43-2.95.8c-.65.32-1.17.6-2.05.6v1.95c1.35 0 2.2-.43 2.95-.8.65-.35 1.15-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.35 1.15-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.58.8 2.95.8v-1.95c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8zm2.95-8.08c-.75-.38-1.58-.8-2.95-.8s-2.2.42-2.95.8c-.65.32-1.18.6-2.05.6-.9 0-1.4-.25-2.05-.6-.75-.37-1.57-.8-2.95-.8s-2.2.42-2.95.8c-.65.33-1.17.6-2.05.6v1.93c1.35 0 2.2-.43 2.95-.8.65-.33 1.17-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.32 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8V5.04c-.9 0-1.4-.25-2.05-.58zM17 8.09c-1.35 0-2.2.43-2.95.8-.65.35-1.15.6-2.05.6s-1.4-.25-2.05-.6c-.75-.38-1.57-.8-2.95-.8s-2.2.43-2.95.8c-.65.35-1.15.6-2.05.6v1.95c1.35 0 2.2-.43 2.95-.8.65-.32 1.18-.6 2.05-.6s1.4.25 2.05.6c.75.38 1.57.8 2.95.8s2.2-.43 2.95-.8c.65-.32 1.18-.6 2.05-.6.9 0 1.4.25 2.05.6.75.38 1.58.8 2.95.8V9.49c-.9 0-1.4-.25-2.05-.6-.75-.38-1.6-.8-2.95-.8z" }) });
21
+ function WavesIconSvg() { return _WavesIcon; }
22
+ var LeftPanelControls = /** @class */ (function (_super) {
23
+ tslib_1.__extends(LeftPanelControls, _super);
24
+ function LeftPanelControls() {
25
+ var _a;
26
+ var _this = _super.apply(this, tslib_1.__spreadArray([], tslib_1.__read(arguments), false)) || this;
27
+ _this.state = { tab: _this.plugin.behaviors.layout.leftPanelTabName.value };
28
+ _this.set = function (tab) {
29
+ if (_this.state.tab === tab) {
30
+ _this.setState({ tab: 'none' }, function () { return _this.plugin.behaviors.layout.leftPanelTabName.next('none'); });
31
+ commands_1.PluginCommands.Layout.Update(_this.plugin, { state: { regionState: tslib_1.__assign(tslib_1.__assign({}, _this.plugin.layout.state.regionState), { left: 'collapsed' }) } });
29
32
  return;
30
33
  }
31
- this.setState({ tab }, () => this.plugin.behaviors.layout.leftPanelTabName.next(tab));
32
- if (this.plugin.layout.state.regionState.left !== 'full') {
33
- commands_1.PluginCommands.Layout.Update(this.plugin, { state: { regionState: { ...this.plugin.layout.state.regionState, left: 'full' } } });
34
+ _this.setState({ tab: tab }, function () { return _this.plugin.behaviors.layout.leftPanelTabName.next(tab); });
35
+ if (_this.plugin.layout.state.regionState.left !== 'full') {
36
+ commands_1.PluginCommands.Layout.Update(_this.plugin, { state: { regionState: tslib_1.__assign(tslib_1.__assign({}, _this.plugin.layout.state.regionState), { left: 'full' }) } });
34
37
  }
35
38
  };
36
- this.tabs = {
39
+ _this.tabs = {
37
40
  'none': (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}),
38
- 'root': (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.SectionHeader, { icon: icons_1.HomeOutlinedSvg, title: 'Home' }), (0, jsx_runtime_1.jsx)(actions_1.StateObjectActions, { state: this.plugin.state.data, nodeRef: mol_state_1.StateTransform.RootRef, hideHeader: true, initiallyCollapsed: true, alwaysExpandFirst: true }), this.plugin.spec.components?.remoteState !== 'none' && (0, jsx_runtime_1.jsx)(snapshots_1.RemoteStateSnapshots, { listOnly: true })] }),
39
- 'data': (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.SectionHeader, { icon: icons_1.AccountTreeOutlinedSvg, title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RemoveAllButton, {}), " State Tree"] }) }), (0, jsx_runtime_1.jsx)(tree_1.StateTree, { state: this.plugin.state.data })] }),
41
+ 'root': (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.SectionHeader, { icon: icons_1.HomeOutlinedSvg, title: 'Home' }), (0, jsx_runtime_1.jsx)(actions_1.StateObjectActions, { state: _this.plugin.state.data, nodeRef: mol_state_1.StateTransform.RootRef, hideHeader: true, initiallyCollapsed: true, alwaysExpandFirst: true }), ((_a = _this.plugin.spec.components) === null || _a === void 0 ? void 0 : _a.remoteState) !== 'none' && (0, jsx_runtime_1.jsx)(snapshots_1.RemoteStateSnapshots, { listOnly: true })] }),
42
+ 'data': (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.SectionHeader, { icon: icons_1.AccountTreeOutlinedSvg, title: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RemoveAllButton, {}), " State Tree"] }) }), (0, jsx_runtime_1.jsx)(tree_1.StateTree, { state: _this.plugin.state.data })] }),
40
43
  'segments': (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(segment_tree_1.SegmentTree, {}) }),
41
44
  'states': (0, jsx_runtime_1.jsx)(snapshots_1.StateSnapshots, {}),
42
45
  'settings': (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.SectionHeader, { icon: icons_1.TuneSvg, title: 'Plugin Settings' }), (0, jsx_runtime_1.jsx)(FullSettings, {})] }),
43
46
  'help': (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.SectionHeader, { icon: icons_1.HelpOutlineSvg, title: 'Help' }), (0, jsx_runtime_1.jsx)(help_1.HelpContent, {}), (0, jsx_runtime_1.jsx)(SuperpositionHelpContent, {})] })
44
47
  };
48
+ return _this;
45
49
  }
46
- componentDidMount() {
47
- this.subscribe(this.plugin.behaviors.layout.leftPanelTabName, tab => {
48
- if (this.state.tab !== tab)
49
- this.setState({ tab });
50
- if (tab === 'none' && this.plugin.layout.state.regionState.left !== 'collapsed') {
51
- commands_1.PluginCommands.Layout.Update(this.plugin, { state: { regionState: { ...this.plugin.layout.state.regionState, left: 'collapsed' } } });
50
+ LeftPanelControls.prototype.componentDidMount = function () {
51
+ var _this = this;
52
+ this.subscribe(this.plugin.behaviors.layout.leftPanelTabName, function (tab) {
53
+ if (_this.state.tab !== tab)
54
+ _this.setState({ tab: tab });
55
+ if (tab === 'none' && _this.plugin.layout.state.regionState.left !== 'collapsed') {
56
+ commands_1.PluginCommands.Layout.Update(_this.plugin, { state: { regionState: tslib_1.__assign(tslib_1.__assign({}, _this.plugin.layout.state.regionState), { left: 'collapsed' }) } });
52
57
  }
53
58
  });
54
- this.subscribe(this.plugin.state.data.events.changed, ({ state }) => {
55
- if (this.state.tab !== 'data')
59
+ this.subscribe(this.plugin.state.data.events.changed, function (_a) {
60
+ var state = _a.state;
61
+ if (_this.state.tab !== 'data')
56
62
  return;
57
63
  if (state.cells.size === 1)
58
- this.set('root');
64
+ _this.set('root');
59
65
  });
60
- }
61
- render() {
62
- const tab = this.state.tab;
63
- const customState = this.plugin.customState;
64
- return (0, jsx_runtime_1.jsxs)("div", { className: 'msp-left-panel-controls', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'msp-left-panel-controls-buttons', children: [(0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.HelpOutlineSvg, toggleState: tab === 'help', transparent: true, onClick: () => this.set('help'), title: 'Help' }), customState && customState.initParams && customState.initParams.superposition && (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: WavesIconSvg, toggleState: tab === 'segments', transparent: true, onClick: () => this.set('segments'), title: 'Superpose segments' }), (0, jsx_runtime_1.jsx)("div", { className: 'msp-left-panel-controls-buttons-bottom', children: (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.TuneSvg, toggleState: tab === 'settings', transparent: true, onClick: () => this.set('settings'), title: 'Settings' }) })] }), (0, jsx_runtime_1.jsx)("div", { className: 'msp-scrollable-container', children: this.tabs[tab] })] });
65
- }
66
- }
66
+ };
67
+ LeftPanelControls.prototype.render = function () {
68
+ var _this = this;
69
+ var tab = this.state.tab;
70
+ var customState = this.plugin.customState;
71
+ return (0, jsx_runtime_1.jsxs)("div", { className: 'msp-left-panel-controls', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'msp-left-panel-controls-buttons', children: [(0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.HelpOutlineSvg, toggleState: tab === 'help', transparent: true, onClick: function () { return _this.set('help'); }, title: 'Help' }), customState && customState.initParams && customState.initParams.superposition && (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: WavesIconSvg, toggleState: tab === 'segments', transparent: true, onClick: function () { return _this.set('segments'); }, title: 'Superpose segments' }), (0, jsx_runtime_1.jsx)("div", { className: 'msp-left-panel-controls-buttons-bottom', children: (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.TuneSvg, toggleState: tab === 'settings', transparent: true, onClick: function () { return _this.set('settings'); }, title: 'Settings' }) })] }), (0, jsx_runtime_1.jsx)("div", { className: 'msp-scrollable-container', children: this.tabs[tab] })] });
72
+ };
73
+ return LeftPanelControls;
74
+ }(base_1.PluginUIComponent));
67
75
  exports.LeftPanelControls = LeftPanelControls;
68
76
  // class DataIcon extends PluginUIComponent<{ set: (tab: LeftPanelTabName) => void }, { changed: boolean }> {
69
77
  // state = { changed: false };
@@ -85,59 +93,74 @@ exports.LeftPanelControls = LeftPanelControls;
85
93
  // style={{ position: 'relative' }} extraContent={this.state.changed ? <div className='msp-left-panel-controls-button-data-dirty' /> : void 0} />;
86
94
  // }
87
95
  // }
88
- class FullSettings extends base_1.PluginUIComponent {
89
- constructor() {
90
- super(...arguments);
91
- this.setSettings = (p) => {
92
- commands_1.PluginCommands.Canvas3D.SetSettings(this.plugin, { settings: { [p.name]: p.value } });
96
+ var FullSettings = /** @class */ (function (_super) {
97
+ tslib_1.__extends(FullSettings, _super);
98
+ function FullSettings() {
99
+ var _this = _super.apply(this, tslib_1.__spreadArray([], tslib_1.__read(arguments), false)) || this;
100
+ _this.setSettings = function (p) {
101
+ var _a;
102
+ commands_1.PluginCommands.Canvas3D.SetSettings(_this.plugin, { settings: (_a = {}, _a[p.name] = p.value, _a) });
93
103
  };
104
+ return _this;
94
105
  }
95
- componentDidMount() {
96
- this.subscribe(this.plugin.events.canvas3d.settingsUpdated, () => this.forceUpdate());
97
- this.subscribe(this.plugin.layout.events.updated, () => this.forceUpdate());
98
- this.subscribe(this.plugin.canvas3d.camera.stateChanged, state => {
106
+ FullSettings.prototype.componentDidMount = function () {
107
+ var _this = this;
108
+ this.subscribe(this.plugin.events.canvas3d.settingsUpdated, function () { return _this.forceUpdate(); });
109
+ this.subscribe(this.plugin.layout.events.updated, function () { return _this.forceUpdate(); });
110
+ this.subscribe(this.plugin.canvas3d.camera.stateChanged, function (state) {
99
111
  if (state.radiusMax !== undefined || state.radius !== undefined) {
100
- this.forceUpdate();
112
+ _this.forceUpdate();
101
113
  }
102
114
  });
103
- }
104
- render() {
115
+ };
116
+ FullSettings.prototype.render = function () {
105
117
  return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: this.plugin.canvas3d && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(common_1.SectionHeader, { title: 'Viewport' }), (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: canvas3d_1.Canvas3DParams, values: this.plugin.canvas3d.props, onChange: this.setSettings })] }) });
106
- }
107
- }
108
- class RemoveAllButton extends base_1.PluginUIComponent {
109
- constructor() {
110
- super(...arguments);
111
- this.remove = (e) => {
118
+ };
119
+ return FullSettings;
120
+ }(base_1.PluginUIComponent));
121
+ var RemoveAllButton = /** @class */ (function (_super) {
122
+ tslib_1.__extends(RemoveAllButton, _super);
123
+ function RemoveAllButton() {
124
+ var _this = _super.apply(this, tslib_1.__spreadArray([], tslib_1.__read(arguments), false)) || this;
125
+ _this.remove = function (e) {
112
126
  e.preventDefault();
113
- commands_1.PluginCommands.State.RemoveObject(this.plugin, { state: this.plugin.state.data, ref: mol_state_1.StateTransform.RootRef });
127
+ commands_1.PluginCommands.State.RemoveObject(_this.plugin, { state: _this.plugin.state.data, ref: mol_state_1.StateTransform.RootRef });
114
128
  };
129
+ return _this;
115
130
  }
116
- componentDidMount() {
117
- this.subscribe(this.plugin.state.events.cell.created, e => {
131
+ RemoveAllButton.prototype.componentDidMount = function () {
132
+ var _this = this;
133
+ this.subscribe(this.plugin.state.events.cell.created, function (e) {
118
134
  if (e.cell.transform.parent === mol_state_1.StateTransform.RootRef)
119
- this.forceUpdate();
135
+ _this.forceUpdate();
120
136
  });
121
- this.subscribe(this.plugin.state.events.cell.removed, e => {
137
+ this.subscribe(this.plugin.state.events.cell.removed, function (e) {
122
138
  if (e.parent === mol_state_1.StateTransform.RootRef)
123
- this.forceUpdate();
139
+ _this.forceUpdate();
124
140
  });
125
- }
126
- render() {
127
- const count = this.plugin.state.data.tree.children.get(mol_state_1.StateTransform.RootRef).size;
141
+ };
142
+ RemoveAllButton.prototype.render = function () {
143
+ var count = this.plugin.state.data.tree.children.get(mol_state_1.StateTransform.RootRef).size;
128
144
  if (count === 0)
129
145
  return null;
130
146
  return (0, jsx_runtime_1.jsx)(common_1.IconButton, { svg: icons_1.DeleteOutlinedSvg, onClick: this.remove, title: 'Remove All', style: { display: 'inline-block' }, small: true, className: 'msp-no-hover-outline', transparent: true });
131
- }
132
- }
147
+ };
148
+ return RemoveAllButton;
149
+ }(base_1.PluginUIComponent));
133
150
  function HelpSection(props) {
134
151
  return (0, jsx_runtime_1.jsx)("div", { className: 'msp-simple-help-section', children: props.header });
135
152
  }
136
- class SuperpositionHelpContent extends base_1.PluginUIComponent {
137
- componentDidMount() {
138
- this.subscribe(this.plugin.events.canvas3d.settingsUpdated, () => this.forceUpdate());
153
+ var SuperpositionHelpContent = /** @class */ (function (_super) {
154
+ tslib_1.__extends(SuperpositionHelpContent, _super);
155
+ function SuperpositionHelpContent() {
156
+ return _super !== null && _super.apply(this, arguments) || this;
139
157
  }
140
- render() {
158
+ SuperpositionHelpContent.prototype.componentDidMount = function () {
159
+ var _this = this;
160
+ this.subscribe(this.plugin.events.canvas3d.settingsUpdated, function () { return _this.forceUpdate(); });
161
+ };
162
+ SuperpositionHelpContent.prototype.render = function () {
141
163
  return (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(HelpSection, { header: 'Superposition' }), (0, jsx_runtime_1.jsx)(help_2.HelpGroup, { header: 'Segment', children: (0, jsx_runtime_1.jsx)(help_2.HelpText, { children: (0, jsx_runtime_1.jsx)("p", { children: "Discrete UniProt sequence range mapped to the structure" }) }) }), (0, jsx_runtime_1.jsx)(help_2.HelpGroup, { header: 'Cluster', children: (0, jsx_runtime_1.jsx)(help_2.HelpText, { children: (0, jsx_runtime_1.jsx)("p", { children: "Structural chains that possess significantly close superposition Q-score" }) }) }), (0, jsx_runtime_1.jsx)(help_2.HelpGroup, { header: 'Representative chain', children: (0, jsx_runtime_1.jsx)(help_2.HelpText, { children: (0, jsx_runtime_1.jsx)("p", { children: "The best-ranked chain within a cluster chosen based on the model quality, resolution, observed residues ratio and UniProt sequence coverage" }) }) })] });
142
- }
143
- }
164
+ };
165
+ return SuperpositionHelpContent;
166
+ }(base_1.PluginUIComponent));
@@ -1,72 +1,101 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DownloadScreenshotControls = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
6
- const base_1 = require("Molstar/mol-plugin-ui/base");
7
- const screenshot_1 = require("Molstar/mol-plugin-ui/controls/screenshot");
8
- const common_1 = require("Molstar/mol-plugin-ui/controls/common");
9
- const commands_1 = require("Molstar/mol-plugin/commands");
10
- const use_behavior_1 = require("Molstar/mol-plugin-ui/hooks/use-behavior");
11
- const icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
12
- class DownloadScreenshotControls extends base_1.PluginUIComponent {
13
- constructor() {
14
- super(...arguments);
15
- this.state = {
4
+ var tslib_1 = require("tslib");
5
+ var jsx_runtime_1 = require("react/jsx-runtime");
6
+ var parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
7
+ var base_1 = require("Molstar/mol-plugin-ui/base");
8
+ var screenshot_1 = require("Molstar/mol-plugin-ui/controls/screenshot");
9
+ var common_1 = require("Molstar/mol-plugin-ui/controls/common");
10
+ var commands_1 = require("Molstar/mol-plugin/commands");
11
+ var use_behavior_1 = require("Molstar/mol-plugin-ui/hooks/use-behavior");
12
+ var icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
13
+ var DownloadScreenshotControls = /** @class */ (function (_super) {
14
+ tslib_1.__extends(DownloadScreenshotControls, _super);
15
+ function DownloadScreenshotControls() {
16
+ var _this = _super.apply(this, tslib_1.__spreadArray([], tslib_1.__read(arguments), false)) || this;
17
+ _this.state = {
16
18
  showPreview: true,
17
19
  isDisabled: false
18
20
  };
19
- this.download = () => {
20
- this.plugin.helpers.viewportScreenshot?.download();
21
- this.props.close();
21
+ _this.download = function () {
22
+ var _a;
23
+ (_a = _this.plugin.helpers.viewportScreenshot) === null || _a === void 0 ? void 0 : _a.download();
24
+ _this.props.close();
22
25
  };
23
- this.copy = async () => {
24
- try {
25
- await this.plugin.helpers.viewportScreenshot?.copyToClipboard();
26
- commands_1.PluginCommands.Toast.Show(this.plugin, {
27
- message: 'Copied to clipboard.',
28
- title: 'Screenshot',
29
- timeoutMs: 1500
30
- });
31
- }
32
- catch {
33
- return this.copyImg();
34
- }
35
- };
36
- this.copyImg = async () => {
37
- const src = await this.plugin.helpers.viewportScreenshot?.getImageDataUri();
38
- this.setState({ imageData: src });
39
- };
40
- this.open = (e) => {
26
+ _this.copy = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
27
+ var _a;
28
+ var _b;
29
+ return tslib_1.__generator(this, function (_c) {
30
+ switch (_c.label) {
31
+ case 0:
32
+ _c.trys.push([0, 2, , 3]);
33
+ return [4 /*yield*/, ((_b = this.plugin.helpers.viewportScreenshot) === null || _b === void 0 ? void 0 : _b.copyToClipboard())];
34
+ case 1:
35
+ _c.sent();
36
+ commands_1.PluginCommands.Toast.Show(this.plugin, {
37
+ message: 'Copied to clipboard.',
38
+ title: 'Screenshot',
39
+ timeoutMs: 1500
40
+ });
41
+ return [3 /*break*/, 3];
42
+ case 2:
43
+ _a = _c.sent();
44
+ return [2 /*return*/, this.copyImg()];
45
+ case 3: return [2 /*return*/];
46
+ }
47
+ });
48
+ }); };
49
+ _this.copyImg = function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
50
+ var src;
51
+ var _a;
52
+ return tslib_1.__generator(this, function (_b) {
53
+ switch (_b.label) {
54
+ case 0: return [4 /*yield*/, ((_a = this.plugin.helpers.viewportScreenshot) === null || _a === void 0 ? void 0 : _a.getImageDataUri())];
55
+ case 1:
56
+ src = _b.sent();
57
+ this.setState({ imageData: src });
58
+ return [2 /*return*/];
59
+ }
60
+ });
61
+ }); };
62
+ _this.open = function (e) {
41
63
  if (!e.target.files || !e.target.files[0])
42
64
  return;
43
- commands_1.PluginCommands.State.Snapshots.OpenFile(this.plugin, { file: e.target.files[0] });
65
+ commands_1.PluginCommands.State.Snapshots.OpenFile(_this.plugin, { file: e.target.files[0] });
44
66
  };
67
+ return _this;
45
68
  }
46
- componentDidMount() {
47
- this.subscribe(this.plugin.state.data.behaviors.isUpdating, v => {
48
- this.setState({ isDisabled: v });
69
+ DownloadScreenshotControls.prototype.componentDidMount = function () {
70
+ var _this = this;
71
+ this.subscribe(this.plugin.state.data.behaviors.isUpdating, function (v) {
72
+ _this.setState({ isDisabled: v });
49
73
  });
50
- }
51
- componentWillUnmount() {
74
+ };
75
+ DownloadScreenshotControls.prototype.componentWillUnmount = function () {
52
76
  this.setState({ imageData: void 0 });
53
- }
54
- render() {
55
- const hasClipboardApi = !!navigator.clipboard?.write;
56
- return (0, jsx_runtime_1.jsxs)("div", { children: [this.state.showPreview && (0, jsx_runtime_1.jsxs)("div", { className: 'msp-image-preview', children: [(0, jsx_runtime_1.jsx)(screenshot_1.ScreenshotPreview, { plugin: this.plugin }), (0, jsx_runtime_1.jsx)(CropControls, { plugin: this.plugin })] }), (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [!this.state.imageData && (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.CopySvg, onClick: hasClipboardApi ? this.copy : this.copyImg, disabled: this.state.isDisabled, children: "Copy" }), this.state.imageData && (0, jsx_runtime_1.jsx)(common_1.Button, { onClick: () => this.setState({ imageData: void 0 }), disabled: this.state.isDisabled, children: "Clear" }), (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.GetAppSvg, onClick: this.download, disabled: this.state.isDisabled, children: "Download" })] }), this.state.imageData && (0, jsx_runtime_1.jsxs)("div", { className: 'msp-row msp-copy-image-wrapper', children: [(0, jsx_runtime_1.jsx)("div", { children: "Right click below + Copy Image" }), (0, jsx_runtime_1.jsx)("img", { src: this.state.imageData, style: { width: '100%', height: 32, display: 'block' } })] }), (0, jsx_runtime_1.jsx)(ScreenshotParams, { plugin: this.plugin, isDisabled: this.state.isDisabled })] });
57
- }
58
- }
77
+ };
78
+ DownloadScreenshotControls.prototype.render = function () {
79
+ var _this = this;
80
+ var _a;
81
+ var hasClipboardApi = !!((_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.write);
82
+ return (0, jsx_runtime_1.jsxs)("div", { children: [this.state.showPreview && (0, jsx_runtime_1.jsxs)("div", { className: 'msp-image-preview', children: [(0, jsx_runtime_1.jsx)(screenshot_1.ScreenshotPreview, { plugin: this.plugin }), (0, jsx_runtime_1.jsx)(CropControls, { plugin: this.plugin })] }), (0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [!this.state.imageData && (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.CopySvg, onClick: hasClipboardApi ? this.copy : this.copyImg, disabled: this.state.isDisabled, children: "Copy" }), this.state.imageData && (0, jsx_runtime_1.jsx)(common_1.Button, { onClick: function () { return _this.setState({ imageData: void 0 }); }, disabled: this.state.isDisabled, children: "Clear" }), (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.GetAppSvg, onClick: this.download, disabled: this.state.isDisabled, children: "Download" })] }), this.state.imageData && (0, jsx_runtime_1.jsxs)("div", { className: 'msp-row msp-copy-image-wrapper', children: [(0, jsx_runtime_1.jsx)("div", { children: "Right click below + Copy Image" }), (0, jsx_runtime_1.jsx)("img", { src: this.state.imageData, style: { width: '100%', height: 32, display: 'block' } })] }), (0, jsx_runtime_1.jsx)(ScreenshotParams, { plugin: this.plugin, isDisabled: this.state.isDisabled })] });
83
+ };
84
+ return DownloadScreenshotControls;
85
+ }(base_1.PluginUIComponent));
59
86
  exports.DownloadScreenshotControls = DownloadScreenshotControls;
60
- function ScreenshotParams({ plugin, isDisabled }) {
61
- const helper = plugin.helpers.viewportScreenshot;
62
- const values = (0, use_behavior_1.useBehavior)(helper.behaviors.values);
63
- return (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: helper.params, values: values, onChangeValues: v => helper.behaviors.values.next(v), isDisabled: isDisabled });
87
+ function ScreenshotParams(_a) {
88
+ var plugin = _a.plugin, isDisabled = _a.isDisabled;
89
+ var helper = plugin.helpers.viewportScreenshot;
90
+ var values = (0, use_behavior_1.useBehavior)(helper.behaviors.values);
91
+ return (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: helper.params, values: values, onChangeValues: function (v) { return helper.behaviors.values.next(v); }, isDisabled: isDisabled });
64
92
  }
65
- function CropControls({ plugin }) {
66
- const helper = plugin.helpers.viewportScreenshot;
67
- const cropParams = (0, use_behavior_1.useBehavior)(helper?.behaviors.cropParams);
68
- (0, use_behavior_1.useBehavior)(helper?.behaviors.relativeCrop);
93
+ function CropControls(_a) {
94
+ var plugin = _a.plugin;
95
+ var helper = plugin.helpers.viewportScreenshot;
96
+ var cropParams = (0, use_behavior_1.useBehavior)(helper === null || helper === void 0 ? void 0 : helper.behaviors.cropParams);
97
+ (0, use_behavior_1.useBehavior)(helper === null || helper === void 0 ? void 0 : helper.behaviors.relativeCrop);
69
98
  if (!helper)
70
99
  return null;
71
- return (0, jsx_runtime_1.jsxs)("div", { style: { width: '100%', height: '24px', marginTop: '8px' }, children: [(0, jsx_runtime_1.jsx)(common_1.ToggleButton, { icon: icons_1.CropOrginalSvg, title: 'Auto-crop', inline: true, isSelected: cropParams.auto, style: { background: 'transparent', float: 'left', width: 'auto', height: '24px', lineHeight: '24px' }, toggle: () => helper.toggleAutocrop(), label: 'Auto-crop ' + (cropParams.auto ? 'On' : 'Off') }), !cropParams.auto && (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.CropSvg, title: 'Crop', style: { background: 'transparent', float: 'right', height: '24px', lineHeight: '24px', width: '24px', padding: '0' }, onClick: () => helper.autocrop() }), !cropParams.auto && !helper.isFullFrame && (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.CropFreeSvg, title: 'Reset Crop', style: { background: 'transparent', float: 'right', height: '24px', lineHeight: '24px', width: '24px', padding: '0' }, onClick: () => helper.resetCrop() })] });
100
+ return (0, jsx_runtime_1.jsxs)("div", { style: { width: '100%', height: '24px', marginTop: '8px' }, children: [(0, jsx_runtime_1.jsx)(common_1.ToggleButton, { icon: icons_1.CropOrginalSvg, title: 'Auto-crop', inline: true, isSelected: cropParams.auto, style: { background: 'transparent', float: 'left', width: 'auto', height: '24px', lineHeight: '24px' }, toggle: function () { return helper.toggleAutocrop(); }, label: 'Auto-crop ' + (cropParams.auto ? 'On' : 'Off') }), !cropParams.auto && (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.CropSvg, title: 'Crop', style: { background: 'transparent', float: 'right', height: '24px', lineHeight: '24px', width: '24px', padding: '0' }, onClick: function () { return helper.autocrop(); } }), !cropParams.auto && !helper.isFullFrame && (0, jsx_runtime_1.jsx)(common_1.Button, { icon: icons_1.CropFreeSvg, title: 'Reset Crop', style: { background: 'transparent', float: 'right', height: '24px', lineHeight: '24px', width: '24px', padding: '0' }, onClick: function () { return helper.resetCrop(); } })] });
72
101
  }
@@ -1,47 +1,70 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PDBeSuperpositionStructureTools = exports.PDBeLigandViewStructureTools = exports.CustomStructureControls = exports.PDBeStructureTools = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const base_1 = require("Molstar/mol-plugin-ui/base");
6
- const components_1 = require("Molstar/mol-plugin-ui/structure/components");
7
- const measurements_1 = require("Molstar/mol-plugin-ui/structure/measurements");
8
- const source_1 = require("Molstar/mol-plugin-ui/structure/source");
9
- const volume_1 = require("Molstar/mol-plugin-ui/structure/volume");
10
- const annotation_controls_1 = require("./annotation-controls");
11
- const icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
12
- const superposition_components_1 = require("./superposition-components");
13
- const quick_styles_1 = require("Molstar/mol-plugin-ui/structure/quick-styles");
14
- const alphafold_superposition_1 = require("./alphafold-superposition");
15
- const export_superposition_1 = require("./export-superposition");
16
- const alphafold_tranparency_1 = require("./alphafold-tranparency");
17
- class PDBeStructureTools extends base_1.PluginUIComponent {
18
- render() {
19
- 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, {})] });
4
+ var tslib_1 = require("tslib");
5
+ var jsx_runtime_1 = require("react/jsx-runtime");
6
+ var base_1 = require("Molstar/mol-plugin-ui/base");
7
+ var components_1 = require("Molstar/mol-plugin-ui/structure/components");
8
+ var measurements_1 = require("Molstar/mol-plugin-ui/structure/measurements");
9
+ var source_1 = require("Molstar/mol-plugin-ui/structure/source");
10
+ var volume_1 = require("Molstar/mol-plugin-ui/structure/volume");
11
+ var annotation_controls_1 = require("./annotation-controls");
12
+ var icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
13
+ var superposition_components_1 = require("./superposition-components");
14
+ var quick_styles_1 = require("Molstar/mol-plugin-ui/structure/quick-styles");
15
+ var alphafold_superposition_1 = require("./alphafold-superposition");
16
+ var export_superposition_1 = require("./export-superposition");
17
+ var alphafold_tranparency_1 = require("./alphafold-tranparency");
18
+ var PDBeStructureTools = /** @class */ (function (_super) {
19
+ tslib_1.__extends(PDBeStructureTools, _super);
20
+ function PDBeStructureTools() {
21
+ return _super !== null && _super.apply(this, arguments) || this;
20
22
  }
21
- }
23
+ PDBeStructureTools.prototype.render = function () {
24
+ 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, {})] });
25
+ };
26
+ return PDBeStructureTools;
27
+ }(base_1.PluginUIComponent));
22
28
  exports.PDBeStructureTools = PDBeStructureTools;
23
- class CustomStructureControls extends base_1.PluginUIComponent {
24
- componentDidMount() {
25
- this.subscribe(this.plugin.state.behaviors.events.changed, () => this.forceUpdate());
29
+ var CustomStructureControls = /** @class */ (function (_super) {
30
+ tslib_1.__extends(CustomStructureControls, _super);
31
+ function CustomStructureControls() {
32
+ return _super !== null && _super.apply(this, arguments) || this;
26
33
  }
27
- render() {
28
- const controls = [];
29
- this.plugin.customStructureControls.forEach((Controls, key) => {
30
- controls.push((0, jsx_runtime_1.jsx)(Controls, { initiallyCollapsed: this.props.initiallyCollapsed }, key));
34
+ CustomStructureControls.prototype.componentDidMount = function () {
35
+ var _this = this;
36
+ this.subscribe(this.plugin.state.behaviors.events.changed, function () { return _this.forceUpdate(); });
37
+ };
38
+ CustomStructureControls.prototype.render = function () {
39
+ var _this = this;
40
+ var controls = [];
41
+ this.plugin.customStructureControls.forEach(function (Controls, key) {
42
+ controls.push((0, jsx_runtime_1.jsx)(Controls, { initiallyCollapsed: _this.props.initiallyCollapsed }, key));
31
43
  });
32
44
  return controls.length > 0 ? (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: controls }) : null;
33
- }
34
- }
45
+ };
46
+ return CustomStructureControls;
47
+ }(base_1.PluginUIComponent));
35
48
  exports.CustomStructureControls = CustomStructureControls;
36
- class PDBeLigandViewStructureTools extends base_1.PluginUIComponent {
37
- render() {
38
- 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, {})] });
49
+ var PDBeLigandViewStructureTools = /** @class */ (function (_super) {
50
+ tslib_1.__extends(PDBeLigandViewStructureTools, _super);
51
+ function PDBeLigandViewStructureTools() {
52
+ return _super !== null && _super.apply(this, arguments) || this;
39
53
  }
40
- }
54
+ PDBeLigandViewStructureTools.prototype.render = function () {
55
+ 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, {})] });
56
+ };
57
+ return PDBeLigandViewStructureTools;
58
+ }(base_1.PluginUIComponent));
41
59
  exports.PDBeLigandViewStructureTools = PDBeLigandViewStructureTools;
42
- class PDBeSuperpositionStructureTools extends base_1.PluginUIComponent {
43
- render() {
44
- 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, {})] });
60
+ var PDBeSuperpositionStructureTools = /** @class */ (function (_super) {
61
+ tslib_1.__extends(PDBeSuperpositionStructureTools, _super);
62
+ function PDBeSuperpositionStructureTools() {
63
+ return _super !== null && _super.apply(this, arguments) || this;
45
64
  }
46
- }
65
+ PDBeSuperpositionStructureTools.prototype.render = function () {
66
+ 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, {})] });
67
+ };
68
+ return PDBeSuperpositionStructureTools;
69
+ }(base_1.PluginUIComponent));
47
70
  exports.PDBeSuperpositionStructureTools = PDBeSuperpositionStructureTools;