drugflow-molstar 0.2.1 → 0.2.2
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/LICENSE +201 -201
- package/README.md +15 -15
- package/build/{drugflow-molstar-component-0.2.1.js → drugflow-molstar-component-0.2.2.js} +4 -4
- package/build/drugflow-molstar-light.css +1 -1
- package/build/{drugflow-molstar-plugin-0.2.1.js → drugflow-molstar-plugin-0.2.2.js} +2 -2
- package/lib/alphafold-transparency.d.ts +6 -6
- package/lib/alphafold-transparency.js +153 -153
- package/lib/app/molstar/lib/apps/docking-viewer/index.html +37 -0
- package/lib/app/molstar/lib/apps/viewer/embedded.html +44 -0
- package/lib/app/molstar/lib/apps/viewer/favicon.ico +0 -0
- package/lib/app/molstar/lib/apps/viewer/index.html +110 -0
- package/lib/app/molstar/lib/examples/alpha-orbitals/index.html +73 -0
- package/lib/app/molstar/lib/examples/basic-wrapper/index.html +138 -0
- package/lib/app/molstar/lib/examples/lighting/index.html +89 -0
- package/lib/app/molstar/lib/examples/proteopedia-wrapper/index.html +237 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/base.scss +33 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/controls-base.scss +334 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/controls.scss +419 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/help.scss +27 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/line-graph.scss +68 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/log.scss +100 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/misc.scss +644 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/sequence.scss +126 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/slider.scss +166 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/tasks.scss +99 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/toast.scss +84 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/transformer.scss +164 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/components/viewport.scss +128 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/layout/common.scss +72 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/layout/controls-landscape.scss +90 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/layout/controls-outside.scss +99 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/layout/controls-portrait.scss +109 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/layout.scss +41 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/logo.scss +13 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/normalize.scss +210 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/ui.scss +41 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/base/variables.scss +86 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/blue.scss +2 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/colors/blue.scss +24 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/colors/dark.scss +24 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/colors/light.scss +30 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/dark.scss +2 -0
- package/lib/app/molstar/lib/mol-plugin-ui/skin/light.scss +2 -0
- package/lib/custom-events.d.ts +4 -4
- package/lib/custom-events.js +56 -56
- package/lib/domain-annotations/behavior.d.ts +5 -5
- package/lib/domain-annotations/behavior.js +49 -49
- package/lib/domain-annotations/color.d.ts +10 -10
- package/lib/domain-annotations/color.js +78 -78
- package/lib/domain-annotations/prop.d.ts +35 -35
- package/lib/domain-annotations/prop.js +160 -160
- package/lib/drugflow-molstar-component-build-0.1.2.js +4268 -0
- package/lib/drugflow-molstar-component-build-0.1.2.js.LICENSE.txt +24 -0
- package/lib/drugflow-molstar-component-build-0.1.2.js.map +1 -0
- package/lib/drugflow-molstar-component-build-0.1.3.js +2 -0
- package/lib/drugflow-molstar-component-build-0.1.3.js.LICENSE.txt +24 -0
- package/lib/drugflow-molstar-component-build-0.1.4.js +2 -0
- package/lib/drugflow-molstar-component-build-0.1.4.js.LICENSE.txt +24 -0
- package/lib/drugflow-molstar-component-build-0.1.6.js +2 -0
- package/lib/drugflow-molstar-component-build-0.1.6.js.LICENSE.txt +24 -0
- package/lib/drugflow-molstar-component-build-0.2.2.js +2 -0
- package/lib/drugflow-molstar-component-build-0.2.2.js.LICENSE.txt +24 -0
- package/lib/helpers.d.ts +82 -81
- package/lib/helpers.js +278 -278
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1274 -1239
- package/lib/labels.d.ts +2 -2
- package/lib/labels.js +42 -42
- package/lib/loci-details.d.ts +27 -27
- package/lib/loci-details.js +128 -128
- package/lib/pdbe-molstar-component-build-3.1.2.js +2 -0
- package/lib/pdbe-molstar-component-build-3.1.2.js.LICENSE.txt +24 -0
- package/lib/sifts-mapping.d.ts +16 -16
- package/lib/sifts-mapping.js +83 -83
- package/lib/sifts-mappings-behaviour.d.ts +5 -5
- package/lib/sifts-mappings-behaviour.js +64 -64
- package/lib/spec.d.ts +76 -76
- package/lib/spec.js +105 -105
- package/lib/subscribe-events.d.ts +1 -1
- package/lib/subscribe-events.js +194 -194
- package/lib/superposition-export.d.ts +4 -4
- package/lib/superposition-export.js +152 -152
- package/lib/superposition-focus-representation.d.ts +16 -16
- package/lib/superposition-focus-representation.js +153 -153
- package/lib/superposition-sifts-mapping.d.ts +22 -22
- package/lib/superposition-sifts-mapping.js +159 -159
- package/lib/superposition.d.ts +18 -18
- package/lib/superposition.js +794 -794
- package/lib/ui/alphafold-superposition.d.ts +56 -56
- package/lib/ui/alphafold-superposition.js +178 -178
- package/lib/ui/alphafold-tranparency.d.ts +22 -22
- package/lib/ui/alphafold-tranparency.js +65 -65
- package/lib/ui/annotation-controls.d.ts +24 -24
- package/lib/ui/annotation-controls.js +166 -166
- package/lib/ui/export-superposition.d.ts +6 -6
- package/lib/ui/export-superposition.js +71 -71
- package/lib/ui/pdbe-left-panel.d.ts +18 -18
- package/lib/ui/pdbe-left-panel.js +167 -167
- package/lib/ui/pdbe-screenshot-controls.d.ts +20 -20
- package/lib/ui/pdbe-screenshot-controls.js +101 -101
- package/lib/ui/pdbe-structure-controls.d.ts +17 -17
- package/lib/ui/pdbe-structure-controls.js +70 -70
- package/lib/ui/pdbe-viewport-controls.d.ts +6 -6
- package/lib/ui/pdbe-viewport-controls.js +56 -56
- package/lib/ui/segment-tree.d.ts +18 -18
- package/lib/ui/segment-tree.js +804 -804
- package/lib/ui/superposition-components.d.ts +10 -10
- package/lib/ui/superposition-components.js +435 -435
- package/lib/ui/superposition-viewport.d.ts +5 -5
- package/lib/ui/superposition-viewport.js +23 -23
- package/package.json +79 -79
- /package/build/{drugflow-molstar-0.2.1.css → drugflow-molstar-0.2.2.css} +0 -0
- /package/build/{drugflow-molstar-plugin-0.2.1.js.LICENSE.txt → drugflow-molstar-plugin-0.2.2.js.LICENSE.txt} +0 -0
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AlphafoldTransparencyControls = void 0;
|
|
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 icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
|
|
8
|
-
var param_definition_1 = require("Molstar/mol-util/param-definition");
|
|
9
|
-
var parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
|
|
10
|
-
var alphafold_transparency_1 = require("../alphafold-transparency");
|
|
11
|
-
var TransparencyParams = {
|
|
12
|
-
score: param_definition_1.ParamDefinition.Numeric(70, { min: 0, max: 100, step: 1 }, { label: 'pLDDT less than', description: 'pLDDT score value in the range of 0 to 100' }),
|
|
13
|
-
opacity: param_definition_1.ParamDefinition.Numeric(0.2, { min: 0, max: 1, step: 0.01 }, { description: 'Opacity value in the range 0 to 1' })
|
|
14
|
-
};
|
|
15
|
-
var AlphafoldTransparencyControls = /** @class */ (function (_super) {
|
|
16
|
-
tslib_1.__extends(AlphafoldTransparencyControls, _super);
|
|
17
|
-
function AlphafoldTransparencyControls() {
|
|
18
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
19
|
-
_this.updateTransparency = function (val) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
20
|
-
var superpositionState, afStr;
|
|
21
|
-
return tslib_1.__generator(this, function (_a) {
|
|
22
|
-
switch (_a.label) {
|
|
23
|
-
case 0:
|
|
24
|
-
this.setState({ transpareny: val });
|
|
25
|
-
superpositionState = this.plugin.customState.superpositionState;
|
|
26
|
-
afStr = this.plugin.managers.structure.hierarchy.current.refs.get(superpositionState.alphafold.ref);
|
|
27
|
-
return [4 /*yield*/, (0, alphafold_transparency_1.clearStructureTransparency)(this.plugin, afStr.components)];
|
|
28
|
-
case 1:
|
|
29
|
-
_a.sent();
|
|
30
|
-
return [4 /*yield*/, (0, alphafold_transparency_1.applyAFTransparency)(this.plugin, afStr, 1 - val.opacity, val.score)];
|
|
31
|
-
case 2:
|
|
32
|
-
_a.sent();
|
|
33
|
-
return [2 /*return*/];
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}); };
|
|
37
|
-
return _this;
|
|
38
|
-
}
|
|
39
|
-
AlphafoldTransparencyControls.prototype.defaultState = function () {
|
|
40
|
-
return {
|
|
41
|
-
isCollapsed: false,
|
|
42
|
-
header: 'AlphaFold Structure Opacity',
|
|
43
|
-
brand: { accent: 'gray', svg: icons_1.SuperpositionSvg },
|
|
44
|
-
isHidden: true,
|
|
45
|
-
transpareny: {
|
|
46
|
-
score: 70,
|
|
47
|
-
opacity: 0.2
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
AlphafoldTransparencyControls.prototype.componentDidMount = function () {
|
|
52
|
-
var _this = this;
|
|
53
|
-
this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, function (sel) {
|
|
54
|
-
var superpositionState = _this.plugin.customState.superpositionState;
|
|
55
|
-
if (superpositionState && superpositionState.alphafold.ref && superpositionState.alphafold.ref !== '') {
|
|
56
|
-
_this.setState({ isHidden: false });
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
AlphafoldTransparencyControls.prototype.renderControls = function () {
|
|
61
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: TransparencyParams, values: this.state.transpareny, onChangeValues: this.updateTransparency }) });
|
|
62
|
-
};
|
|
63
|
-
return AlphafoldTransparencyControls;
|
|
64
|
-
}(base_1.CollapsableControls));
|
|
65
|
-
exports.AlphafoldTransparencyControls = AlphafoldTransparencyControls;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AlphafoldTransparencyControls = void 0;
|
|
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 icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
|
|
8
|
+
var param_definition_1 = require("Molstar/mol-util/param-definition");
|
|
9
|
+
var parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
|
|
10
|
+
var alphafold_transparency_1 = require("../alphafold-transparency");
|
|
11
|
+
var TransparencyParams = {
|
|
12
|
+
score: param_definition_1.ParamDefinition.Numeric(70, { min: 0, max: 100, step: 1 }, { label: 'pLDDT less than', description: 'pLDDT score value in the range of 0 to 100' }),
|
|
13
|
+
opacity: param_definition_1.ParamDefinition.Numeric(0.2, { min: 0, max: 1, step: 0.01 }, { description: 'Opacity value in the range 0 to 1' })
|
|
14
|
+
};
|
|
15
|
+
var AlphafoldTransparencyControls = /** @class */ (function (_super) {
|
|
16
|
+
tslib_1.__extends(AlphafoldTransparencyControls, _super);
|
|
17
|
+
function AlphafoldTransparencyControls() {
|
|
18
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
19
|
+
_this.updateTransparency = function (val) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
20
|
+
var superpositionState, afStr;
|
|
21
|
+
return tslib_1.__generator(this, function (_a) {
|
|
22
|
+
switch (_a.label) {
|
|
23
|
+
case 0:
|
|
24
|
+
this.setState({ transpareny: val });
|
|
25
|
+
superpositionState = this.plugin.customState.superpositionState;
|
|
26
|
+
afStr = this.plugin.managers.structure.hierarchy.current.refs.get(superpositionState.alphafold.ref);
|
|
27
|
+
return [4 /*yield*/, (0, alphafold_transparency_1.clearStructureTransparency)(this.plugin, afStr.components)];
|
|
28
|
+
case 1:
|
|
29
|
+
_a.sent();
|
|
30
|
+
return [4 /*yield*/, (0, alphafold_transparency_1.applyAFTransparency)(this.plugin, afStr, 1 - val.opacity, val.score)];
|
|
31
|
+
case 2:
|
|
32
|
+
_a.sent();
|
|
33
|
+
return [2 /*return*/];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}); };
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
AlphafoldTransparencyControls.prototype.defaultState = function () {
|
|
40
|
+
return {
|
|
41
|
+
isCollapsed: false,
|
|
42
|
+
header: 'AlphaFold Structure Opacity',
|
|
43
|
+
brand: { accent: 'gray', svg: icons_1.SuperpositionSvg },
|
|
44
|
+
isHidden: true,
|
|
45
|
+
transpareny: {
|
|
46
|
+
score: 70,
|
|
47
|
+
opacity: 0.2
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
AlphafoldTransparencyControls.prototype.componentDidMount = function () {
|
|
52
|
+
var _this = this;
|
|
53
|
+
this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, function (sel) {
|
|
54
|
+
var superpositionState = _this.plugin.customState.superpositionState;
|
|
55
|
+
if (superpositionState && superpositionState.alphafold.ref && superpositionState.alphafold.ref !== '') {
|
|
56
|
+
_this.setState({ isHidden: false });
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
AlphafoldTransparencyControls.prototype.renderControls = function () {
|
|
61
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(parameters_1.ParameterControls, { params: TransparencyParams, values: this.state.transpareny, onChangeValues: this.updateTransparency }) });
|
|
62
|
+
};
|
|
63
|
+
return AlphafoldTransparencyControls;
|
|
64
|
+
}(base_1.CollapsableControls));
|
|
65
|
+
exports.AlphafoldTransparencyControls = AlphafoldTransparencyControls;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PurePluginUIComponent } from 'Molstar/mol-plugin-ui/base';
|
|
3
|
-
export declare function TextsmsOutlinedSvg(): JSX.Element;
|
|
4
|
-
export declare class AnnotationsComponentControls extends PurePluginUIComponent<{}, {
|
|
5
|
-
isCollapsed: boolean;
|
|
6
|
-
validationApplied: boolean;
|
|
7
|
-
domainAtnApplied: boolean;
|
|
8
|
-
validationParams: any;
|
|
9
|
-
domainAtnParams: any;
|
|
10
|
-
validationOptions: any;
|
|
11
|
-
domainAtnOptions: any;
|
|
12
|
-
description?: string;
|
|
13
|
-
}> {
|
|
14
|
-
state: any;
|
|
15
|
-
componentDidMount(): void;
|
|
16
|
-
getOptionParams: () => void;
|
|
17
|
-
toggleCollapsed: () => void;
|
|
18
|
-
toggleOptions: (type: number) => void;
|
|
19
|
-
applyAnnotation: (type: number, visibleState: boolean, params?: any) => void;
|
|
20
|
-
initApplyAnnotation: (type: number) => void;
|
|
21
|
-
updateValidationParams: (val: any) => void;
|
|
22
|
-
updateDomainAtnParams: (val: any) => void;
|
|
23
|
-
render(): JSX.Element;
|
|
24
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PurePluginUIComponent } from 'Molstar/mol-plugin-ui/base';
|
|
3
|
+
export declare function TextsmsOutlinedSvg(): JSX.Element;
|
|
4
|
+
export declare class AnnotationsComponentControls extends PurePluginUIComponent<{}, {
|
|
5
|
+
isCollapsed: boolean;
|
|
6
|
+
validationApplied: boolean;
|
|
7
|
+
domainAtnApplied: boolean;
|
|
8
|
+
validationParams: any;
|
|
9
|
+
domainAtnParams: any;
|
|
10
|
+
validationOptions: any;
|
|
11
|
+
domainAtnOptions: any;
|
|
12
|
+
description?: string;
|
|
13
|
+
}> {
|
|
14
|
+
state: any;
|
|
15
|
+
componentDidMount(): void;
|
|
16
|
+
getOptionParams: () => void;
|
|
17
|
+
toggleCollapsed: () => void;
|
|
18
|
+
toggleOptions: (type: number) => void;
|
|
19
|
+
applyAnnotation: (type: number, visibleState: boolean, params?: any) => void;
|
|
20
|
+
initApplyAnnotation: (type: number) => void;
|
|
21
|
+
updateValidationParams: (val: any) => void;
|
|
22
|
+
updateDomainAtnParams: (val: any) => void;
|
|
23
|
+
render(): JSX.Element;
|
|
24
|
+
}
|
|
@@ -1,166 +1,166 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnnotationsComponentControls = exports.TextsmsOutlinedSvg = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
var common_1 = require("Molstar/mol-plugin-ui/controls/common");
|
|
7
|
-
var base_1 = require("Molstar/mol-plugin-ui/base");
|
|
8
|
-
var color_1 = require("Molstar/extensions/pdbe/structure-quality-report/color");
|
|
9
|
-
var mol_state_1 = require("Molstar/mol-state");
|
|
10
|
-
var parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
|
|
11
|
-
var color_2 = require("../domain-annotations/color");
|
|
12
|
-
var behavior_1 = require("Molstar/extensions/pdbe/structure-quality-report/behavior");
|
|
13
|
-
var behavior_2 = require("../domain-annotations/behavior");
|
|
14
|
-
var icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
|
|
15
|
-
var hierarchy_1 = require("Molstar/mol-plugin-state/manager/structure/hierarchy");
|
|
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" })] })] }));
|
|
17
|
-
function TextsmsOutlinedSvg() { return _TextsmsOutlined; }
|
|
18
|
-
exports.TextsmsOutlinedSvg = TextsmsOutlinedSvg;
|
|
19
|
-
var AnnotationsComponentControls = /** @class */ (function (_super) {
|
|
20
|
-
tslib_1.__extends(AnnotationsComponentControls, _super);
|
|
21
|
-
function AnnotationsComponentControls() {
|
|
22
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
23
|
-
_this.state = {
|
|
24
|
-
isCollapsed: false,
|
|
25
|
-
validationApplied: false,
|
|
26
|
-
domainAtnApplied: false,
|
|
27
|
-
validationOptions: false,
|
|
28
|
-
domainAtnOptions: false
|
|
29
|
-
};
|
|
30
|
-
_this.getOptionParams = function () {
|
|
31
|
-
var validationAnnotationCtrl = false;
|
|
32
|
-
var domainAnnotationCtrl = false;
|
|
33
|
-
var customState = _this.plugin.customState;
|
|
34
|
-
if (customState && customState.initParams) {
|
|
35
|
-
if (customState.initParams.validationAnnotation)
|
|
36
|
-
validationAnnotationCtrl = true;
|
|
37
|
-
if (customState.initParams.domainAnnotation)
|
|
38
|
-
domainAnnotationCtrl = true;
|
|
39
|
-
}
|
|
40
|
-
if ((validationAnnotationCtrl && !_this.state.validationParams) || (domainAnnotationCtrl && !_this.state.domainAtnParams)) {
|
|
41
|
-
var groupRef = mol_state_1.StateSelection.findTagInSubtree(_this.plugin.state.data.tree, mol_state_1.StateTransform.RootRef, 'structure-component-static-polymer');
|
|
42
|
-
if (groupRef) {
|
|
43
|
-
var struct = _this.plugin.state.data.select(groupRef)[0].obj;
|
|
44
|
-
if (struct) {
|
|
45
|
-
var themeDataCtx = { structure: struct.data };
|
|
46
|
-
if (validationAnnotationCtrl && !_this.state.validationParams) {
|
|
47
|
-
var validationActionsParams = color_1.StructureQualityReportColorThemeProvider.getParams(themeDataCtx);
|
|
48
|
-
if (validationActionsParams) {
|
|
49
|
-
_this.setState({ validationParams: {
|
|
50
|
-
params: validationActionsParams,
|
|
51
|
-
values: { type: validationActionsParams.type.defaultValue }
|
|
52
|
-
} });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if (domainAnnotationCtrl && !_this.state.domainAtnParams) {
|
|
56
|
-
var domainActionsParams = color_2.DomainAnnotationsColorThemeProvider.getParams(themeDataCtx);
|
|
57
|
-
if (domainActionsParams) {
|
|
58
|
-
_this.setState({ domainAtnParams: {
|
|
59
|
-
params: domainActionsParams,
|
|
60
|
-
values: { type: domainActionsParams.type.defaultValue }
|
|
61
|
-
} });
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
_this.toggleCollapsed = function () {
|
|
69
|
-
_this.setState({ isCollapsed: !_this.state.isCollapsed });
|
|
70
|
-
};
|
|
71
|
-
_this.toggleOptions = function (type) {
|
|
72
|
-
if (type === 0)
|
|
73
|
-
_this.setState({ validationOptions: !_this.state.validationOptions });
|
|
74
|
-
if (type === 1)
|
|
75
|
-
_this.setState({ domainAtnOptions: !_this.state.domainAtnOptions });
|
|
76
|
-
};
|
|
77
|
-
_this.applyAnnotation = function (type, visibleState, params) {
|
|
78
|
-
// Defaults
|
|
79
|
-
var themeName = 'polymer-id';
|
|
80
|
-
var themePropsToAdd = behavior_1.PDBeStructureQualityReport;
|
|
81
|
-
var themePropsToRemove = _this.state.domainAtnParams ? behavior_2.PDBeDomainAnnotations : void 0;
|
|
82
|
-
// Set Theme Params
|
|
83
|
-
if (type === 0) {
|
|
84
|
-
if (visibleState) {
|
|
85
|
-
themeName = 'pdbe-structure-quality-report';
|
|
86
|
-
}
|
|
87
|
-
_this.setState({ validationApplied: visibleState });
|
|
88
|
-
_this.setState({ domainAtnApplied: false });
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
themePropsToAdd = behavior_2.PDBeDomainAnnotations;
|
|
92
|
-
themePropsToRemove = _this.state.validationParams ? behavior_1.PDBeStructureQualityReport : void 0;
|
|
93
|
-
if (visibleState)
|
|
94
|
-
themeName = 'pdbe-domain-annotations';
|
|
95
|
-
_this.setState({ domainAtnApplied: visibleState });
|
|
96
|
-
_this.setState({ validationApplied: false });
|
|
97
|
-
}
|
|
98
|
-
// Update Tooltip
|
|
99
|
-
if (visibleState && themeName !== 'polymer-id') {
|
|
100
|
-
var addTooltipUpdate = _this.plugin.state.behaviors.build().to(themePropsToAdd.id).update(themePropsToAdd, function (old) { old.showTooltip = true; });
|
|
101
|
-
_this.plugin.runTask(_this.plugin.state.behaviors.updateTree(addTooltipUpdate));
|
|
102
|
-
if (themePropsToRemove) {
|
|
103
|
-
var removeTooltipUpdate = _this.plugin.state.behaviors.build().to(themePropsToRemove.id).update(themePropsToRemove, function (old) { old.showTooltip = false; });
|
|
104
|
-
_this.plugin.runTask(_this.plugin.state.behaviors.updateTree(removeTooltipUpdate));
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
var polymerGroup;
|
|
108
|
-
var componentGroups = _this.plugin.managers.structure.hierarchy.currentComponentGroups;
|
|
109
|
-
componentGroups.forEach(function (compGrp) {
|
|
110
|
-
if (compGrp[0].key === 'structure-component-static-polymer')
|
|
111
|
-
polymerGroup = compGrp;
|
|
112
|
-
});
|
|
113
|
-
if (polymerGroup) {
|
|
114
|
-
_this.plugin.managers.structure.component.updateRepresentationsTheme(polymerGroup, { color: themeName, colorParams: params ? params : void 0 });
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
_this.initApplyAnnotation = function (type) {
|
|
118
|
-
if (type === 0)
|
|
119
|
-
_this.applyAnnotation(0, !_this.state.validationApplied, _this.state.validationParams.values);
|
|
120
|
-
if (type === 1)
|
|
121
|
-
_this.applyAnnotation(1, !_this.state.domainAtnApplied, _this.state.domainAtnParams.values);
|
|
122
|
-
};
|
|
123
|
-
_this.updateValidationParams = function (val) {
|
|
124
|
-
var updatedParams = tslib_1.__assign({}, _this.state.validationParams);
|
|
125
|
-
updatedParams.values = val;
|
|
126
|
-
_this.setState({ validationParams: updatedParams });
|
|
127
|
-
if (_this.state.validationApplied)
|
|
128
|
-
_this.applyAnnotation(0, _this.state.validationApplied, val);
|
|
129
|
-
};
|
|
130
|
-
_this.updateDomainAtnParams = function (val) {
|
|
131
|
-
var updatedParams = tslib_1.__assign({}, _this.state.domainAtnParams);
|
|
132
|
-
updatedParams.values = val;
|
|
133
|
-
_this.setState({ domainAtnParams: updatedParams });
|
|
134
|
-
if (_this.state.domainAtnApplied)
|
|
135
|
-
_this.applyAnnotation(1, _this.state.domainAtnApplied, val);
|
|
136
|
-
};
|
|
137
|
-
return _this;
|
|
138
|
-
}
|
|
139
|
-
AnnotationsComponentControls.prototype.componentDidMount = function () {
|
|
140
|
-
var _this = this;
|
|
141
|
-
this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, function () {
|
|
142
|
-
_this.getOptionParams();
|
|
143
|
-
_this.forceUpdate();
|
|
144
|
-
});
|
|
145
|
-
this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, function (c) { return _this.setState({
|
|
146
|
-
description: hierarchy_1.StructureHierarchyManager.getSelectedStructuresDescription(_this.plugin)
|
|
147
|
-
}); });
|
|
148
|
-
};
|
|
149
|
-
AnnotationsComponentControls.prototype.render = function () {
|
|
150
|
-
var _this = this;
|
|
151
|
-
if (!this.state.validationParams && !this.state.domainAtnParams)
|
|
152
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
153
|
-
var brand = {
|
|
154
|
-
accent: 'green',
|
|
155
|
-
svg: TextsmsOutlinedSvg
|
|
156
|
-
};
|
|
157
|
-
var wrapClass = this.state.isCollapsed
|
|
158
|
-
? 'msp-transform-wrapper msp-transform-wrapper-collapsed'
|
|
159
|
-
: 'msp-transform-wrapper';
|
|
160
|
-
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: wrapClass }, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-transform-header' }, { children: (0, jsx_runtime_1.jsxs)(common_1.Button, tslib_1.__assign({ 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-".concat(brand.accent) : void 0, title: "Click to ".concat(this.state.isCollapsed ? 'expand' : 'collapse') }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: brand === null || brand === void 0 ? void 0 : brand.svg, inline: true }), "Annotations", (0, jsx_runtime_1.jsx)("small", tslib_1.__assign({ style: { margin: '0 6px' } }, { children: this.state.isCollapsed ? '' : this.state.description }))] })) })), !this.state.isCollapsed && this.state.validationParams &&
|
|
161
|
-
(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)(common_1.Button, tslib_1.__assign({ 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: function () { return _this.initApplyAnnotation(0); }, toggleState: false, svg: !this.state.validationApplied ? icons_1.VisibilityOffOutlinedSvg : icons_1.VisibilityOutlinedSvg, title: "Click to ".concat(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: function () { return _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", tslib_1.__assign({ style: { marginBottom: '6px' } }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "msp-accent-offset" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ 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 &&
|
|
162
|
-
(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)(common_1.Button, tslib_1.__assign({ noOverflow: true, className: 'msp-control-button-label', title: "Domain Annotations.", style: { textAlign: 'left' } }, { children: "Domains" })), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: function () { return _this.initApplyAnnotation(1); }, toggleState: false, svg: !this.state.domainAtnApplied ? icons_1.VisibilityOffOutlinedSvg : icons_1.VisibilityOutlinedSvg, title: "Click to ".concat(this.state.domainAtnApplied ? 'Hide' : 'Show', " Domain Annotation"), small: true, className: 'msp-form-control', flex: true }), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: function () { return _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", tslib_1.__assign({ style: { marginBottom: '6px' } }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "msp-accent-offset" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ 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 }) })) })) }))] }));
|
|
163
|
-
};
|
|
164
|
-
return AnnotationsComponentControls;
|
|
165
|
-
}(base_1.PurePluginUIComponent));
|
|
166
|
-
exports.AnnotationsComponentControls = AnnotationsComponentControls;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnnotationsComponentControls = exports.TextsmsOutlinedSvg = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
var common_1 = require("Molstar/mol-plugin-ui/controls/common");
|
|
7
|
+
var base_1 = require("Molstar/mol-plugin-ui/base");
|
|
8
|
+
var color_1 = require("Molstar/extensions/pdbe/structure-quality-report/color");
|
|
9
|
+
var mol_state_1 = require("Molstar/mol-state");
|
|
10
|
+
var parameters_1 = require("Molstar/mol-plugin-ui/controls/parameters");
|
|
11
|
+
var color_2 = require("../domain-annotations/color");
|
|
12
|
+
var behavior_1 = require("Molstar/extensions/pdbe/structure-quality-report/behavior");
|
|
13
|
+
var behavior_2 = require("../domain-annotations/behavior");
|
|
14
|
+
var icons_1 = require("Molstar/mol-plugin-ui/controls/icons");
|
|
15
|
+
var hierarchy_1 = require("Molstar/mol-plugin-state/manager/structure/hierarchy");
|
|
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" })] })] }));
|
|
17
|
+
function TextsmsOutlinedSvg() { return _TextsmsOutlined; }
|
|
18
|
+
exports.TextsmsOutlinedSvg = TextsmsOutlinedSvg;
|
|
19
|
+
var AnnotationsComponentControls = /** @class */ (function (_super) {
|
|
20
|
+
tslib_1.__extends(AnnotationsComponentControls, _super);
|
|
21
|
+
function AnnotationsComponentControls() {
|
|
22
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
23
|
+
_this.state = {
|
|
24
|
+
isCollapsed: false,
|
|
25
|
+
validationApplied: false,
|
|
26
|
+
domainAtnApplied: false,
|
|
27
|
+
validationOptions: false,
|
|
28
|
+
domainAtnOptions: false
|
|
29
|
+
};
|
|
30
|
+
_this.getOptionParams = function () {
|
|
31
|
+
var validationAnnotationCtrl = false;
|
|
32
|
+
var domainAnnotationCtrl = false;
|
|
33
|
+
var customState = _this.plugin.customState;
|
|
34
|
+
if (customState && customState.initParams) {
|
|
35
|
+
if (customState.initParams.validationAnnotation)
|
|
36
|
+
validationAnnotationCtrl = true;
|
|
37
|
+
if (customState.initParams.domainAnnotation)
|
|
38
|
+
domainAnnotationCtrl = true;
|
|
39
|
+
}
|
|
40
|
+
if ((validationAnnotationCtrl && !_this.state.validationParams) || (domainAnnotationCtrl && !_this.state.domainAtnParams)) {
|
|
41
|
+
var groupRef = mol_state_1.StateSelection.findTagInSubtree(_this.plugin.state.data.tree, mol_state_1.StateTransform.RootRef, 'structure-component-static-polymer');
|
|
42
|
+
if (groupRef) {
|
|
43
|
+
var struct = _this.plugin.state.data.select(groupRef)[0].obj;
|
|
44
|
+
if (struct) {
|
|
45
|
+
var themeDataCtx = { structure: struct.data };
|
|
46
|
+
if (validationAnnotationCtrl && !_this.state.validationParams) {
|
|
47
|
+
var validationActionsParams = color_1.StructureQualityReportColorThemeProvider.getParams(themeDataCtx);
|
|
48
|
+
if (validationActionsParams) {
|
|
49
|
+
_this.setState({ validationParams: {
|
|
50
|
+
params: validationActionsParams,
|
|
51
|
+
values: { type: validationActionsParams.type.defaultValue }
|
|
52
|
+
} });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (domainAnnotationCtrl && !_this.state.domainAtnParams) {
|
|
56
|
+
var domainActionsParams = color_2.DomainAnnotationsColorThemeProvider.getParams(themeDataCtx);
|
|
57
|
+
if (domainActionsParams) {
|
|
58
|
+
_this.setState({ domainAtnParams: {
|
|
59
|
+
params: domainActionsParams,
|
|
60
|
+
values: { type: domainActionsParams.type.defaultValue }
|
|
61
|
+
} });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
_this.toggleCollapsed = function () {
|
|
69
|
+
_this.setState({ isCollapsed: !_this.state.isCollapsed });
|
|
70
|
+
};
|
|
71
|
+
_this.toggleOptions = function (type) {
|
|
72
|
+
if (type === 0)
|
|
73
|
+
_this.setState({ validationOptions: !_this.state.validationOptions });
|
|
74
|
+
if (type === 1)
|
|
75
|
+
_this.setState({ domainAtnOptions: !_this.state.domainAtnOptions });
|
|
76
|
+
};
|
|
77
|
+
_this.applyAnnotation = function (type, visibleState, params) {
|
|
78
|
+
// Defaults
|
|
79
|
+
var themeName = 'polymer-id';
|
|
80
|
+
var themePropsToAdd = behavior_1.PDBeStructureQualityReport;
|
|
81
|
+
var themePropsToRemove = _this.state.domainAtnParams ? behavior_2.PDBeDomainAnnotations : void 0;
|
|
82
|
+
// Set Theme Params
|
|
83
|
+
if (type === 0) {
|
|
84
|
+
if (visibleState) {
|
|
85
|
+
themeName = 'pdbe-structure-quality-report';
|
|
86
|
+
}
|
|
87
|
+
_this.setState({ validationApplied: visibleState });
|
|
88
|
+
_this.setState({ domainAtnApplied: false });
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
themePropsToAdd = behavior_2.PDBeDomainAnnotations;
|
|
92
|
+
themePropsToRemove = _this.state.validationParams ? behavior_1.PDBeStructureQualityReport : void 0;
|
|
93
|
+
if (visibleState)
|
|
94
|
+
themeName = 'pdbe-domain-annotations';
|
|
95
|
+
_this.setState({ domainAtnApplied: visibleState });
|
|
96
|
+
_this.setState({ validationApplied: false });
|
|
97
|
+
}
|
|
98
|
+
// Update Tooltip
|
|
99
|
+
if (visibleState && themeName !== 'polymer-id') {
|
|
100
|
+
var addTooltipUpdate = _this.plugin.state.behaviors.build().to(themePropsToAdd.id).update(themePropsToAdd, function (old) { old.showTooltip = true; });
|
|
101
|
+
_this.plugin.runTask(_this.plugin.state.behaviors.updateTree(addTooltipUpdate));
|
|
102
|
+
if (themePropsToRemove) {
|
|
103
|
+
var removeTooltipUpdate = _this.plugin.state.behaviors.build().to(themePropsToRemove.id).update(themePropsToRemove, function (old) { old.showTooltip = false; });
|
|
104
|
+
_this.plugin.runTask(_this.plugin.state.behaviors.updateTree(removeTooltipUpdate));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
var polymerGroup;
|
|
108
|
+
var componentGroups = _this.plugin.managers.structure.hierarchy.currentComponentGroups;
|
|
109
|
+
componentGroups.forEach(function (compGrp) {
|
|
110
|
+
if (compGrp[0].key === 'structure-component-static-polymer')
|
|
111
|
+
polymerGroup = compGrp;
|
|
112
|
+
});
|
|
113
|
+
if (polymerGroup) {
|
|
114
|
+
_this.plugin.managers.structure.component.updateRepresentationsTheme(polymerGroup, { color: themeName, colorParams: params ? params : void 0 });
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
_this.initApplyAnnotation = function (type) {
|
|
118
|
+
if (type === 0)
|
|
119
|
+
_this.applyAnnotation(0, !_this.state.validationApplied, _this.state.validationParams.values);
|
|
120
|
+
if (type === 1)
|
|
121
|
+
_this.applyAnnotation(1, !_this.state.domainAtnApplied, _this.state.domainAtnParams.values);
|
|
122
|
+
};
|
|
123
|
+
_this.updateValidationParams = function (val) {
|
|
124
|
+
var updatedParams = tslib_1.__assign({}, _this.state.validationParams);
|
|
125
|
+
updatedParams.values = val;
|
|
126
|
+
_this.setState({ validationParams: updatedParams });
|
|
127
|
+
if (_this.state.validationApplied)
|
|
128
|
+
_this.applyAnnotation(0, _this.state.validationApplied, val);
|
|
129
|
+
};
|
|
130
|
+
_this.updateDomainAtnParams = function (val) {
|
|
131
|
+
var updatedParams = tslib_1.__assign({}, _this.state.domainAtnParams);
|
|
132
|
+
updatedParams.values = val;
|
|
133
|
+
_this.setState({ domainAtnParams: updatedParams });
|
|
134
|
+
if (_this.state.domainAtnApplied)
|
|
135
|
+
_this.applyAnnotation(1, _this.state.domainAtnApplied, val);
|
|
136
|
+
};
|
|
137
|
+
return _this;
|
|
138
|
+
}
|
|
139
|
+
AnnotationsComponentControls.prototype.componentDidMount = function () {
|
|
140
|
+
var _this = this;
|
|
141
|
+
this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, function () {
|
|
142
|
+
_this.getOptionParams();
|
|
143
|
+
_this.forceUpdate();
|
|
144
|
+
});
|
|
145
|
+
this.subscribe(this.plugin.managers.structure.hierarchy.behaviors.selection, function (c) { return _this.setState({
|
|
146
|
+
description: hierarchy_1.StructureHierarchyManager.getSelectedStructuresDescription(_this.plugin)
|
|
147
|
+
}); });
|
|
148
|
+
};
|
|
149
|
+
AnnotationsComponentControls.prototype.render = function () {
|
|
150
|
+
var _this = this;
|
|
151
|
+
if (!this.state.validationParams && !this.state.domainAtnParams)
|
|
152
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
153
|
+
var brand = {
|
|
154
|
+
accent: 'green',
|
|
155
|
+
svg: TextsmsOutlinedSvg
|
|
156
|
+
};
|
|
157
|
+
var wrapClass = this.state.isCollapsed
|
|
158
|
+
? 'msp-transform-wrapper msp-transform-wrapper-collapsed'
|
|
159
|
+
: 'msp-transform-wrapper';
|
|
160
|
+
return (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: wrapClass }, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: 'msp-transform-header' }, { children: (0, jsx_runtime_1.jsxs)(common_1.Button, tslib_1.__assign({ 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-".concat(brand.accent) : void 0, title: "Click to ".concat(this.state.isCollapsed ? 'expand' : 'collapse') }, { children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { svg: brand === null || brand === void 0 ? void 0 : brand.svg, inline: true }), "Annotations", (0, jsx_runtime_1.jsx)("small", tslib_1.__assign({ style: { margin: '0 6px' } }, { children: this.state.isCollapsed ? '' : this.state.description }))] })) })), !this.state.isCollapsed && this.state.validationParams &&
|
|
161
|
+
(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)(common_1.Button, tslib_1.__assign({ 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: function () { return _this.initApplyAnnotation(0); }, toggleState: false, svg: !this.state.validationApplied ? icons_1.VisibilityOffOutlinedSvg : icons_1.VisibilityOutlinedSvg, title: "Click to ".concat(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: function () { return _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", tslib_1.__assign({ style: { marginBottom: '6px' } }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "msp-accent-offset" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ 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 &&
|
|
162
|
+
(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: 'msp-flex-row' }, { children: [(0, jsx_runtime_1.jsx)(common_1.Button, tslib_1.__assign({ noOverflow: true, className: 'msp-control-button-label', title: "Domain Annotations.", style: { textAlign: 'left' } }, { children: "Domains" })), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: function () { return _this.initApplyAnnotation(1); }, toggleState: false, svg: !this.state.domainAtnApplied ? icons_1.VisibilityOffOutlinedSvg : icons_1.VisibilityOutlinedSvg, title: "Click to ".concat(this.state.domainAtnApplied ? 'Hide' : 'Show', " Domain Annotation"), small: true, className: 'msp-form-control', flex: true }), (0, jsx_runtime_1.jsx)(common_1.IconButton, { onClick: function () { return _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", tslib_1.__assign({ style: { marginBottom: '6px' } }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "msp-accent-offset" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ 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 }) })) })) }))] }));
|
|
163
|
+
};
|
|
164
|
+
return AnnotationsComponentControls;
|
|
165
|
+
}(base_1.PurePluginUIComponent));
|
|
166
|
+
exports.AnnotationsComponentControls = AnnotationsComponentControls;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { CollapsableControls, CollapsableState } from 'Molstar/mol-plugin-ui/base';
|
|
3
|
-
export declare class SuperpositionModelExportUI extends CollapsableControls<{}, {}> {
|
|
4
|
-
protected defaultState(): CollapsableState;
|
|
5
|
-
protected renderControls(): JSX.Element | null;
|
|
6
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CollapsableControls, CollapsableState } from 'Molstar/mol-plugin-ui/base';
|
|
3
|
+
export declare class SuperpositionModelExportUI extends CollapsableControls<{}, {}> {
|
|
4
|
+
protected defaultState(): CollapsableState;
|
|
5
|
+
protected renderControls(): JSX.Element | null;
|
|
6
|
+
}
|