drugflow-molstar 0.3.77 → 0.4.1
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/build/drugflow-molstar-0.4.1.css +1 -0
- package/build/drugflow-molstar-component-0.4.1.js +25 -0
- package/build/drugflow-molstar-plugin-0.4.1.js +2 -0
- package/build/drugflow-molstar-plugin-0.4.1.js.LICENSE.txt +64 -0
- package/lib/alphafold-transparency.js +58 -125
- package/lib/contact.d.ts +15 -6
- package/lib/contact.js +71 -66
- package/lib/custom-events.js +16 -16
- package/lib/domain-annotations/behavior.js +20 -24
- package/lib/domain-annotations/color.d.ts +1 -1
- package/lib/domain-annotations/color.js +23 -22
- package/lib/domain-annotations/prop.d.ts +3 -3
- package/lib/domain-annotations/prop.js +54 -76
- package/lib/drugflow-molstar-component-build-0.3.78.js +2 -0
- package/lib/drugflow-molstar-component-build-0.4.1.js +2 -0
- package/lib/helpers.d.ts +4 -4
- package/lib/helpers.js +94 -99
- package/lib/index.js +1785 -2608
- package/lib/labels.d.ts +1 -1
- package/lib/labels.js +20 -23
- package/lib/loci-details.d.ts +2 -2
- package/lib/loci-details.js +26 -29
- package/lib/sifts-mapping.js +30 -34
- package/lib/sifts-mappings-behaviour.js +26 -30
- package/lib/spec.d.ts +1 -1
- package/lib/spec.js +50 -38
- package/lib/structure_contact3d.d.ts +13 -4
- package/lib/structure_contact3d.js +25 -46
- package/lib/subscribe-events.js +17 -17
- package/lib/superposition-export.js +100 -144
- package/lib/superposition-focus-representation.d.ts +1 -1
- package/lib/superposition-focus-representation.js +74 -112
- package/lib/superposition-sifts-mapping.d.ts +1 -1
- package/lib/superposition-sifts-mapping.js +56 -62
- package/lib/superposition.d.ts +2 -2
- package/lib/superposition.js +490 -726
- package/lib/ui/alphafold-superposition.d.ts +8 -9
- package/lib/ui/alphafold-superposition.js +96 -120
- package/lib/ui/alphafold-tranparency.d.ts +1 -2
- package/lib/ui/alphafold-tranparency.js +27 -43
- package/lib/ui/annotation-controls.d.ts +2 -3
- package/lib/ui/annotation-controls.js +81 -87
- package/lib/ui/export-superposition.js +33 -51
- package/lib/ui/pdbe-left-panel.d.ts +3 -3
- package/lib/ui/pdbe-left-panel.js +82 -106
- package/lib/ui/pdbe-screenshot-controls.d.ts +1 -1
- package/lib/ui/pdbe-screenshot-controls.js +54 -83
- package/lib/ui/pdbe-structure-controls.d.ts +4 -5
- package/lib/ui/pdbe-structure-controls.js +34 -57
- package/lib/ui/pdbe-viewport-controls.d.ts +1 -2
- package/lib/ui/pdbe-viewport-controls.js +23 -29
- package/lib/ui/segment-tree.d.ts +1 -2
- package/lib/ui/segment-tree.js +438 -590
- package/lib/ui/superposition-components.d.ts +1 -2
- package/lib/ui/superposition-components.js +196 -266
- package/lib/ui/superposition-viewport.d.ts +1 -2
- package/lib/ui/superposition-viewport.js +11 -18
- package/package.json +7 -4
- package/build/drugflow-molstar-0.3.62.css +0 -1
- package/build/drugflow-molstar-0.3.77.css +0 -1
- package/build/drugflow-molstar-component-0.3.62.js +0 -25
- package/build/drugflow-molstar-component-0.3.77.js +0 -25
- package/build/drugflow-molstar-light.css +0 -1
- package/build/drugflow-molstar-plugin-0.3.62.js +0 -2
- package/build/drugflow-molstar-plugin-0.3.62.js.LICENSE.txt +0 -39
- package/build/drugflow-molstar-plugin-0.3.77.js +0 -2
- package/build/drugflow-molstar-plugin-0.3.77.js.LICENSE.txt +0 -39
- package/lib/drugflow-molstar-component-build-0.1.2.js +0 -4268
- package/lib/drugflow-molstar-component-build-0.1.2.js.map +0 -1
- package/lib/drugflow-molstar-component-build-0.1.3.js +0 -2
- package/lib/drugflow-molstar-component-build-0.1.4.js +0 -2
- package/lib/drugflow-molstar-component-build-0.1.4.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.1.5.js +0 -2
- package/lib/drugflow-molstar-component-build-0.1.5.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.1.6.js +0 -2
- package/lib/drugflow-molstar-component-build-0.1.6.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.10.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.10.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.2.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.2.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.3.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.3.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.4.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.4.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.5.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.5.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.6.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.6.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.7.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.7.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.2.9.js +0 -2
- package/lib/drugflow-molstar-component-build-0.2.9.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.1.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.1.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.10.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.10.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.11.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.11.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.12.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.12.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.13.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.13.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.14.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.14.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.15.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.15.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.16.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.16.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.17.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.17.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.18.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.18.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.19.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.19.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.2.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.2.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.20.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.20.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.21.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.21.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.22.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.22.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.23.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.23.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.24.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.24.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.25.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.25.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.26.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.26.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.27.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.27.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.28.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.28.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.29.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.29.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.3.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.3.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.30.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.30.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.31.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.31.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.32.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.32.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.33.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.33.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.34.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.34.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.35.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.35.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.36.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.36.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.37.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.37.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.38.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.38.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.39.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.39.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.4.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.4.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.40.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.40.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.41.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.41.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.42.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.42.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.43.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.43.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.44.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.44.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.46.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.46.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.47.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.47.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.48.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.48.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.49.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.49.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.5.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.5.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.50.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.50.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.51.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.51.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.52.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.52.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.53.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.53.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.54.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.54.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.55.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.55.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.56.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.56.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.57.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.57.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.58.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.58.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.59.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.59.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.6.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.6.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.60.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.60.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.61.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.61.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.62.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.62.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.63.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.63.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.64.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.64.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.65.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.65.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.66.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.66.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.67.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.67.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.68.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.68.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.69.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.69.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.7.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.7.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.70.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.70.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.71.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.71.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.72.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.72.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.73.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.73.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.74.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.74.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.75.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.75.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.76.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.76.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.77.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.77.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.8.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.8.js.LICENSE.txt +0 -24
- package/lib/drugflow-molstar-component-build-0.3.9.js +0 -2
- package/lib/drugflow-molstar-component-build-0.3.9.js.LICENSE.txt +0 -24
- package/lib/index2.d.ts +0 -1
- package/lib/index2.js +0 -1369
- package/lib/pdbe-molstar-component-build-3.1.2.js +0 -2
- package/lib/pdbe-molstar-component-build-3.1.2.js.LICENSE.txt +0 -24
- /package/lib/{drugflow-molstar-component-build-0.1.2.js.LICENSE.txt → drugflow-molstar-component-build-0.3.78.js.LICENSE.txt} +0 -0
- /package/lib/{drugflow-molstar-component-build-0.1.3.js.LICENSE.txt → drugflow-molstar-component-build-0.4.1.js.LICENSE.txt} +0 -0
|
@@ -1,61 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AnnotationsComponentControls = exports.TextsmsOutlinedSvg = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var _TextsmsOutlined = (0, jsx_runtime_1.jsxs)("svg", tslib_1.__assign({ width: '24px', height: '24px', viewBox: '0 0 24 24' }, { children: [(0, jsx_runtime_1.jsx)("path", { fill: "none", d: "M0 0h24v24H0V0z" }), (0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("path", { d: "M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z" }), (0, jsx_runtime_1.jsx)("path", { d: "M7 9h2v2H7zM11 9h2v2h-2zM15 9h2v2h-2z" })] })] }));
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const common_1 = require("Molstar/mol-plugin-ui/controls/common");
|
|
6
|
+
const base_1 = require("Molstar/mol-plugin-ui/base");
|
|
7
|
+
const color_1 = require("Molstar/extensions/pdbe/structure-quality-report/color");
|
|
8
|
+
const mol_state_1 = require("Molstar/mol-state");
|
|
9
|
+
const parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
|
|
10
|
+
const color_2 = require("../domain-annotations/color");
|
|
11
|
+
const behavior_1 = require("Molstar/extensions/pdbe/structure-quality-report/behavior");
|
|
12
|
+
const behavior_2 = require("../domain-annotations/behavior");
|
|
13
|
+
const icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
|
|
14
|
+
const hierarchy_1 = require("Molstar/mol-plugin-state/manager/structure/hierarchy");
|
|
15
|
+
const _TextsmsOutlined = (0, jsx_runtime_1.jsxs)("svg", { width: '24px', height: '24px', viewBox: '0 0 24 24', children: [(0, jsx_runtime_1.jsx)("path", { fill: "none", d: "M0 0h24v24H0V0z" }), (0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("path", { d: "M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z" }), (0, jsx_runtime_1.jsx)("path", { d: "M7 9h2v2H7zM11 9h2v2h-2zM15 9h2v2h-2z" })] })] });
|
|
17
16
|
function TextsmsOutlinedSvg() { return _TextsmsOutlined; }
|
|
18
17
|
exports.TextsmsOutlinedSvg = TextsmsOutlinedSvg;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_this.state = {
|
|
18
|
+
class AnnotationsComponentControls extends base_1.PurePluginUIComponent {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.state = {
|
|
24
22
|
isCollapsed: false,
|
|
25
23
|
validationApplied: false,
|
|
26
24
|
domainAtnApplied: false,
|
|
27
25
|
validationOptions: false,
|
|
28
26
|
domainAtnOptions: false
|
|
29
27
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
this.getOptionParams = () => {
|
|
29
|
+
let validationAnnotationCtrl = false;
|
|
30
|
+
let domainAnnotationCtrl = false;
|
|
31
|
+
const customState = this.plugin.customState;
|
|
34
32
|
if (customState && customState.initParams) {
|
|
35
33
|
if (customState.initParams.validationAnnotation)
|
|
36
34
|
validationAnnotationCtrl = true;
|
|
37
35
|
if (customState.initParams.domainAnnotation)
|
|
38
36
|
domainAnnotationCtrl = true;
|
|
39
37
|
}
|
|
40
|
-
if ((validationAnnotationCtrl && !
|
|
41
|
-
|
|
38
|
+
if ((validationAnnotationCtrl && !this.state.validationParams) || (domainAnnotationCtrl && !this.state.domainAtnParams)) {
|
|
39
|
+
const groupRef = mol_state_1.StateSelection.findTagInSubtree(this.plugin.state.data.tree, mol_state_1.StateTransform.RootRef, 'structure-component-static-polymer');
|
|
42
40
|
if (groupRef) {
|
|
43
|
-
|
|
41
|
+
const struct = this.plugin.state.data.select(groupRef)[0].obj;
|
|
44
42
|
if (struct) {
|
|
45
|
-
|
|
46
|
-
if (validationAnnotationCtrl && !
|
|
47
|
-
|
|
43
|
+
const themeDataCtx = { structure: struct.data };
|
|
44
|
+
if (validationAnnotationCtrl && !this.state.validationParams) {
|
|
45
|
+
const validationActionsParams = color_1.StructureQualityReportColorThemeProvider.getParams(themeDataCtx);
|
|
48
46
|
if (validationActionsParams) {
|
|
49
|
-
|
|
47
|
+
this.setState({ validationParams: {
|
|
50
48
|
params: validationActionsParams,
|
|
51
49
|
values: { type: validationActionsParams.type.defaultValue }
|
|
52
50
|
} });
|
|
53
51
|
}
|
|
54
52
|
}
|
|
55
|
-
if (domainAnnotationCtrl && !
|
|
56
|
-
|
|
53
|
+
if (domainAnnotationCtrl && !this.state.domainAtnParams) {
|
|
54
|
+
const domainActionsParams = color_2.DomainAnnotationsColorThemeProvider.getParams(themeDataCtx);
|
|
57
55
|
if (domainActionsParams) {
|
|
58
|
-
|
|
56
|
+
this.setState({ domainAtnParams: {
|
|
59
57
|
params: domainActionsParams,
|
|
60
58
|
values: { type: domainActionsParams.type.defaultValue }
|
|
61
59
|
} });
|
|
@@ -65,102 +63,98 @@ var AnnotationsComponentControls = /** @class */ (function (_super) {
|
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
65
|
};
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
this.toggleCollapsed = () => {
|
|
67
|
+
this.setState({ isCollapsed: !this.state.isCollapsed });
|
|
70
68
|
};
|
|
71
|
-
|
|
69
|
+
this.toggleOptions = (type) => {
|
|
72
70
|
if (type === 0)
|
|
73
|
-
|
|
71
|
+
this.setState({ validationOptions: !this.state.validationOptions });
|
|
74
72
|
if (type === 1)
|
|
75
|
-
|
|
73
|
+
this.setState({ domainAtnOptions: !this.state.domainAtnOptions });
|
|
76
74
|
};
|
|
77
|
-
|
|
75
|
+
this.applyAnnotation = (type, visibleState, params) => {
|
|
78
76
|
// Defaults
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
let themeName = 'polymer-id';
|
|
78
|
+
let themePropsToAdd = behavior_1.PDBeStructureQualityReport;
|
|
79
|
+
let themePropsToRemove = this.state.domainAtnParams ? behavior_2.PDBeDomainAnnotations : void 0;
|
|
82
80
|
// Set Theme Params
|
|
83
81
|
if (type === 0) {
|
|
84
82
|
if (visibleState) {
|
|
85
83
|
themeName = 'pdbe-structure-quality-report';
|
|
86
84
|
}
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
this.setState({ validationApplied: visibleState });
|
|
86
|
+
this.setState({ domainAtnApplied: false });
|
|
89
87
|
}
|
|
90
88
|
else {
|
|
91
89
|
themePropsToAdd = behavior_2.PDBeDomainAnnotations;
|
|
92
|
-
themePropsToRemove =
|
|
90
|
+
themePropsToRemove = this.state.validationParams ? behavior_1.PDBeStructureQualityReport : void 0;
|
|
93
91
|
if (visibleState)
|
|
94
92
|
themeName = 'pdbe-domain-annotations';
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
this.setState({ domainAtnApplied: visibleState });
|
|
94
|
+
this.setState({ validationApplied: false });
|
|
97
95
|
}
|
|
98
96
|
// Update Tooltip
|
|
99
97
|
if (visibleState && themeName !== 'polymer-id') {
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
const addTooltipUpdate = this.plugin.state.behaviors.build().to(themePropsToAdd.id).update(themePropsToAdd, (old) => { old.showTooltip = true; });
|
|
99
|
+
this.plugin.runTask(this.plugin.state.behaviors.updateTree(addTooltipUpdate));
|
|
102
100
|
if (themePropsToRemove) {
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
const removeTooltipUpdate = this.plugin.state.behaviors.build().to(themePropsToRemove.id).update(themePropsToRemove, (old) => { old.showTooltip = false; });
|
|
102
|
+
this.plugin.runTask(this.plugin.state.behaviors.updateTree(removeTooltipUpdate));
|
|
105
103
|
}
|
|
106
104
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
componentGroups.forEach(
|
|
105
|
+
let polymerGroup;
|
|
106
|
+
const componentGroups = this.plugin.managers.structure.hierarchy.currentComponentGroups;
|
|
107
|
+
componentGroups.forEach((compGrp) => {
|
|
110
108
|
if (compGrp[0].key === 'structure-component-static-polymer')
|
|
111
109
|
polymerGroup = compGrp;
|
|
112
110
|
});
|
|
113
111
|
if (polymerGroup) {
|
|
114
|
-
|
|
112
|
+
this.plugin.managers.structure.component.updateRepresentationsTheme(polymerGroup, { color: themeName, colorParams: params ? params : void 0 });
|
|
115
113
|
}
|
|
116
114
|
};
|
|
117
|
-
|
|
115
|
+
this.initApplyAnnotation = (type) => {
|
|
118
116
|
if (type === 0)
|
|
119
|
-
|
|
117
|
+
this.applyAnnotation(0, !this.state.validationApplied, this.state.validationParams.values);
|
|
120
118
|
if (type === 1)
|
|
121
|
-
|
|
119
|
+
this.applyAnnotation(1, !this.state.domainAtnApplied, this.state.domainAtnParams.values);
|
|
122
120
|
};
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
this.updateValidationParams = (val) => {
|
|
122
|
+
const updatedParams = { ...this.state.validationParams };
|
|
125
123
|
updatedParams.values = val;
|
|
126
|
-
|
|
127
|
-
if (
|
|
128
|
-
|
|
124
|
+
this.setState({ validationParams: updatedParams });
|
|
125
|
+
if (this.state.validationApplied)
|
|
126
|
+
this.applyAnnotation(0, this.state.validationApplied, val);
|
|
129
127
|
};
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
this.updateDomainAtnParams = (val) => {
|
|
129
|
+
const updatedParams = { ...this.state.domainAtnParams };
|
|
132
130
|
updatedParams.values = val;
|
|
133
|
-
|
|
134
|
-
if (
|
|
135
|
-
|
|
131
|
+
this.setState({ domainAtnParams: updatedParams });
|
|
132
|
+
if (this.state.domainAtnApplied)
|
|
133
|
+
this.applyAnnotation(1, this.state.domainAtnApplied, val);
|
|
136
134
|
};
|
|
137
|
-
return _this;
|
|
138
135
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
_this.forceUpdate();
|
|
136
|
+
componentDidMount() {
|
|
137
|
+
this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, () => {
|
|
138
|
+
this.getOptionParams();
|
|
139
|
+
this.forceUpdate();
|
|
144
140
|
});
|
|
145
|
-
this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection,
|
|
146
|
-
description: hierarchy_1.StructureHierarchyManager.getSelectedStructuresDescription(
|
|
147
|
-
})
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
var _this = this;
|
|
141
|
+
this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, c => this.setState({
|
|
142
|
+
description: hierarchy_1.StructureHierarchyManager.getSelectedStructuresDescription(this.plugin)
|
|
143
|
+
}));
|
|
144
|
+
}
|
|
145
|
+
render() {
|
|
151
146
|
if (!this.state.validationParams && !this.state.domainAtnParams)
|
|
152
147
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
153
|
-
|
|
148
|
+
const brand = {
|
|
154
149
|
accent: 'green',
|
|
155
150
|
svg: TextsmsOutlinedSvg
|
|
156
151
|
};
|
|
157
|
-
|
|
152
|
+
const wrapClass = this.state.isCollapsed
|
|
158
153
|
? 'msp-transform-wrapper msp-transform-wrapper-collapsed'
|
|
159
154
|
: 'msp-transform-wrapper';
|
|
160
|
-
return (0, jsx_runtime_1.jsxs)("div",
|
|
161
|
-
(0, jsx_runtime_1.jsxs)("div",
|
|
162
|
-
(0, jsx_runtime_1.jsxs)("div",
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
}(base_1.PurePluginUIComponent));
|
|
155
|
+
return (0, jsx_runtime_1.jsxs)("div", { className: wrapClass, children: [(0, jsx_runtime_1.jsx)("div", { className: 'msp-transform-header', children: (0, jsx_runtime_1.jsxs)(common_1.Button, { icon: brand ? void 0 : this.state.isCollapsed ? icons_1.ArrowRightSvg : icons_1.ArrowDropDownSvg, noOverflow: true, onClick: this.toggleCollapsed, className: brand ? `msp-transform-header-brand msp-transform-header-brand-${brand.accent}` : void 0, title: `Click to ${this.state.isCollapsed ? 'expand' : 'collapse'}`, children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: brand?.svg, inline: true }), "Annotations", (0, jsx_runtime_1.jsx)("small", { style: { margin: '0 6px' }, children: this.state.isCollapsed ? '' : this.state.description })] }) }), !this.state.isCollapsed && this.state.validationParams &&
|
|
156
|
+
(0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [(0, jsx_runtime_1.jsx)(common_1.Button, { noOverflow: true, className: 'msp-control-button-label', title: `Validation Report Annotations.`, style: { textAlign: 'left' }, children: "Validation Report" }), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: () => this.initApplyAnnotation(0), toggleState: false, svg: !this.state.validationApplied ? icons_1.VisibilityOffOutlinedSvg : icons_1.VisibilityOutlinedSvg, title: `Click to ${this.state.validationApplied ? 'Hide' : 'Show'} Validation Report Annotation`, small: true, className: 'msp-form-control', flex: true }), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: () => this.toggleOptions(0), svg: icons_1.MoreHorizSvg, title: 'Actions', toggleState: this.state.validationOptions, className: 'msp-form-control', flex: true })] }), !this.state.isCollapsed && this.state.validationParams && this.state.validationOptions && (0, jsx_runtime_1.jsx)("div", { style: { marginBottom: '6px' }, children: (0, jsx_runtime_1.jsx)("div", { className: "msp-accent-offset", children: (0, jsx_runtime_1.jsx)("div", { className: 'msp-representation-entry', children: (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: this.state.validationParams.params, values: this.state.validationParams.values, onChangeValues: this.updateValidationParams }) }) }) }), !this.state.isCollapsed && this.state.domainAtnParams &&
|
|
157
|
+
(0, jsx_runtime_1.jsxs)("div", { className: 'msp-flex-row', children: [(0, jsx_runtime_1.jsx)(common_1.Button, { noOverflow: true, className: 'msp-control-button-label', title: `Domain Annotations.`, style: { textAlign: 'left' }, children: "Domains" }), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: () => this.initApplyAnnotation(1), toggleState: false, svg: !this.state.domainAtnApplied ? icons_1.VisibilityOffOutlinedSvg : icons_1.VisibilityOutlinedSvg, title: `Click to ${this.state.domainAtnApplied ? 'Hide' : 'Show'} Domain Annotation`, small: true, className: 'msp-form-control', flex: true }), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: () => this.toggleOptions(1), svg: icons_1.MoreHorizSvg, title: 'Actions', toggleState: this.state.domainAtnOptions, className: 'msp-form-control', flex: true })] }), !this.state.isCollapsed && this.state.domainAtnParams && this.state.domainAtnOptions && (0, jsx_runtime_1.jsx)("div", { style: { marginBottom: '6px' }, children: (0, jsx_runtime_1.jsx)("div", { className: "msp-accent-offset", children: (0, jsx_runtime_1.jsx)("div", { className: 'msp-representation-entry', children: (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: this.state.domainAtnParams.params, values: this.state.domainAtnParams.values, onChangeValues: this.updateDomainAtnParams }) }) }) })] });
|
|
158
|
+
}
|
|
159
|
+
}
|
|
166
160
|
exports.AnnotationsComponentControls = AnnotationsComponentControls;
|
|
@@ -1,71 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SuperpositionModelExportUI = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
tslib_1.__extends(SuperpositionModelExportUI, _super);
|
|
16
|
-
function SuperpositionModelExportUI() {
|
|
17
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
18
|
-
}
|
|
19
|
-
SuperpositionModelExportUI.prototype.defaultState = function () {
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const base_1 = require("Molstar/mol-plugin-ui/base");
|
|
7
|
+
const common_1 = require("Molstar/mol-plugin-ui/controls/common");
|
|
8
|
+
const icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
|
|
9
|
+
const parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
|
|
10
|
+
const use_behavior_1 = require("Molstar/mol-plugin-ui/hooks/use-behavior");
|
|
11
|
+
const param_definition_1 = require("Molstar/mol-util/param-definition");
|
|
12
|
+
const superposition_export_1 = require("../superposition-export");
|
|
13
|
+
class SuperpositionModelExportUI extends base_1.CollapsableControls {
|
|
14
|
+
defaultState() {
|
|
20
15
|
return {
|
|
21
16
|
header: 'Export Models',
|
|
22
17
|
isCollapsed: true,
|
|
23
18
|
brand: { accent: 'cyan', svg: icons_1.GetAppSvg }
|
|
24
19
|
};
|
|
25
|
-
}
|
|
26
|
-
|
|
20
|
+
}
|
|
21
|
+
renderControls() {
|
|
27
22
|
return (0, jsx_runtime_1.jsx)(SuperpositionExportControls, { plugin: this.plugin });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
}(base_1.CollapsableControls));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
31
25
|
exports.SuperpositionModelExportUI = SuperpositionModelExportUI;
|
|
32
|
-
|
|
26
|
+
const Params = {
|
|
33
27
|
format: param_definition_1.ParamDefinition.Select('cif', [['cif', 'mmCIF'], ['bcif', 'Binary mmCIF']])
|
|
34
28
|
};
|
|
35
|
-
|
|
36
|
-
function SuperpositionExportControls(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
var _b = (0, react_1.useState)(DefaultParams), params = _b[0], setParams = _b[1];
|
|
40
|
-
var _c = (0, react_1.useState)(false), exporting = _c[0], setExporting = _c[1];
|
|
29
|
+
const DefaultParams = param_definition_1.ParamDefinition.getDefaultValues(Params);
|
|
30
|
+
function SuperpositionExportControls({ plugin }) {
|
|
31
|
+
const [params, setParams] = (0, react_1.useState)(DefaultParams);
|
|
32
|
+
const [exporting, setExporting] = (0, react_1.useState)(false);
|
|
41
33
|
(0, use_behavior_1.useBehavior)(plugin.managers.structure.hierarchy.behaviors.selection); // triggers UI update
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
const isBusy = (0, use_behavior_1.useBehavior)(plugin.behaviors.state.isBusy);
|
|
35
|
+
const hierarchy = plugin.managers.structure.hierarchy.current;
|
|
36
|
+
let label = 'Nothing to Export';
|
|
45
37
|
if (hierarchy.structures.length === 1) {
|
|
46
38
|
label = 'Export';
|
|
47
39
|
}
|
|
48
40
|
if (hierarchy.structures.length > 1) {
|
|
49
41
|
label = 'Export (as ZIP)';
|
|
50
42
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
_a.sent();
|
|
62
|
-
return [3 /*break*/, 4];
|
|
63
|
-
case 3:
|
|
64
|
-
setExporting(false);
|
|
65
|
-
return [7 /*endfinally*/];
|
|
66
|
-
case 4: return [2 /*return*/];
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}); };
|
|
70
|
-
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: Params, values: params, onChangeValues: setParams, isDisabled: isBusy || exporting }), (0, jsx_runtime_1.jsx)(common_1.Button, tslib_1.__assign({ onClick: onExport, style: { marginTop: 1 }, disabled: isBusy || hierarchy.structures.length === 0 || exporting, commit: hierarchy.structures.length ? 'on' : 'off' }, { children: label }))] });
|
|
43
|
+
const onExport = async () => {
|
|
44
|
+
setExporting(true);
|
|
45
|
+
try {
|
|
46
|
+
await (0, superposition_export_1.superpositionExportHierarchy)(plugin, { format: params.format });
|
|
47
|
+
}
|
|
48
|
+
finally {
|
|
49
|
+
setExporting(false);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: Params, values: params, onChangeValues: setParams, isDisabled: isBusy || exporting }), (0, jsx_runtime_1.jsx)(common_1.Button, { onClick: onExport, style: { marginTop: 1 }, disabled: isBusy || hierarchy.structures.length === 0 || exporting, commit: hierarchy.structures.length ? 'on' : 'off', children: label })] });
|
|
71
53
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PluginUIComponent } from 'Molstar/mol-plugin-ui/base';
|
|
3
|
-
export declare function WavesIconSvg(): JSX.Element;
|
|
4
|
-
|
|
3
|
+
export declare function WavesIconSvg(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
type LeftPanelTabName = 'none' | 'root' | 'data' | 'states' | 'settings' | 'help' | 'segments';
|
|
5
5
|
export declare class LeftPanelControls extends PluginUIComponent<{}, {
|
|
6
6
|
tab: LeftPanelTabName;
|
|
7
7
|
}> {
|
|
@@ -13,6 +13,6 @@ export declare class LeftPanelControls extends PluginUIComponent<{}, {
|
|
|
13
13
|
tabs: {
|
|
14
14
|
[K in LeftPanelTabName]: JSX.Element;
|
|
15
15
|
};
|
|
16
|
-
render(): JSX.Element;
|
|
16
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
}
|
|
18
18
|
export {};
|