@datagrok/helm 2.0.6 → 2.0.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.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/helm",
|
|
3
3
|
"friendlyName": "Helm",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.9",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Oleksandra Serhiienko",
|
|
7
7
|
"email": "oserhiienko@datagrok.ai"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"description": "",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@datagrok-libraries/utils": "^1.11.1",
|
|
12
|
-
"@datagrok-libraries/bio": "^5.
|
|
12
|
+
"@datagrok-libraries/bio": "^5.9.2",
|
|
13
13
|
"cash-dom": "^8.1.1",
|
|
14
14
|
"datagrok-api": "^1.7.2",
|
|
15
15
|
"dayjs": "^1.10.6",
|
package/src/helm-web-editor.ts
CHANGED
|
@@ -3,16 +3,23 @@ import * as ui from 'datagrok-api/ui';
|
|
|
3
3
|
import * as DG from 'datagrok-api/dg';
|
|
4
4
|
|
|
5
5
|
export class HelmWebEditor {
|
|
6
|
-
editorView: any;
|
|
7
|
-
webEditor: any;
|
|
8
6
|
host: any;
|
|
9
7
|
editor: any;
|
|
10
8
|
w = 200;
|
|
11
9
|
h = 100;
|
|
12
10
|
constructor() {
|
|
13
|
-
this.
|
|
11
|
+
this.host = ui.div([], {style: {width: `${this.w}px`, height: `${this.h}px`}});
|
|
12
|
+
this.editor = new JSDraw2.Editor(this.host, {width: this.w, height: this.h, viewonly: true});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
resizeEditor(w: number, h: number) {
|
|
16
|
+
this.editor.setSize(w, h);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
createWebEditor(value: string) {
|
|
20
|
+
const editorView = ui.div();
|
|
14
21
|
org.helm.webeditor.MolViewer.molscale = 0.8;
|
|
15
|
-
|
|
22
|
+
const webEditor = new scil.helm.App(editorView, {
|
|
16
23
|
showabout: false,
|
|
17
24
|
mexfontsize: '90%',
|
|
18
25
|
mexrnapinontab: true,
|
|
@@ -22,24 +29,22 @@ export class HelmWebEditor {
|
|
|
22
29
|
mexfavoritefirst: true,
|
|
23
30
|
mexfilter: true
|
|
24
31
|
});
|
|
25
|
-
const sizes =
|
|
26
|
-
|
|
32
|
+
const sizes = webEditor.calculateSizes();
|
|
33
|
+
webEditor.canvas.resize(sizes.rightwidth - 100, sizes.topheight - 210);
|
|
27
34
|
let s = {width: sizes.rightwidth - 100 + 'px', height: sizes.bottomheight + 'px'};
|
|
28
35
|
//@ts-ignore
|
|
29
|
-
scil.apply(
|
|
36
|
+
scil.apply(webEditor.sequence.style, s);
|
|
30
37
|
//@ts-ignore
|
|
31
|
-
scil.apply(
|
|
32
|
-
s = {width: sizes.rightwidth + 'px', height: (sizes.bottomheight +
|
|
38
|
+
scil.apply(webEditor.notation.style, s);
|
|
39
|
+
s = {width: sizes.rightwidth + 'px', height: (sizes.bottomheight + webEditor.toolbarheight) + 'px'};
|
|
33
40
|
//@ts-ignore
|
|
34
|
-
scil.apply(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
resizeEditor(w: number, h: number) {
|
|
42
|
-
this.editor.setSize(w, h);
|
|
41
|
+
scil.apply(webEditor.properties.parent.style, s);
|
|
42
|
+
webEditor.structureview.resize(sizes.rightwidth, sizes.bottomheight + webEditor.toolbarheight);
|
|
43
|
+
webEditor.mex.resize(sizes.topheight - 80);
|
|
44
|
+
setTimeout(function() {
|
|
45
|
+
webEditor.canvas.helm.setSequence(value, 'HELM');
|
|
46
|
+
}, 200);
|
|
47
|
+
return {editorDiv: editorView, webEditor: webEditor};
|
|
43
48
|
}
|
|
44
49
|
}
|
|
45
50
|
|
package/src/package.ts
CHANGED
|
@@ -464,6 +464,10 @@ class MonomerLib implements bio.IMonomerLib {
|
|
|
464
464
|
return this._onChanged;
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
+
get types(): bio.MonomerType[] {
|
|
468
|
+
return Object.keys(this._monomers) as bio.MonomerType[];
|
|
469
|
+
}
|
|
470
|
+
|
|
467
471
|
public update(monomers: { [type: string]: { [name: string]: bio.Monomer } }): void {
|
|
468
472
|
this._monomers = monomers;
|
|
469
473
|
this._onChanged.next();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=
|
|
1
|
+
<html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=3afbd4014fa1. Commit 19878b63.</title><style type="text/css">html,
|
|
2
2
|
body {
|
|
3
3
|
font-family: Arial, Helvetica, sans-serif;
|
|
4
4
|
font-size: 1rem;
|
|
@@ -229,7 +229,7 @@ header {
|
|
|
229
229
|
font-size: 1rem;
|
|
230
230
|
padding: 0 0.5rem;
|
|
231
231
|
}
|
|
232
|
-
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=
|
|
232
|
+
</style></head><body><div id="jesthtml-content"><header><h1 id="title">Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=3afbd4014fa1. Commit 19878b63.</h1></header><div id="metadata-container"><div id="timestamp">Started: 2022-11-03 15:23:00</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (1)</div><div class="summary-passed">1 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (1)</div><div class="summary-passed">1 passed</div><div class="summary-failed summary-empty">0 failed</div><div class="summary-pending summary-empty">0 pending</div></div></div></div><div id="suite-1" class="suite-container"><div class="suite-info"><div class="suite-path">/home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts</div><div class="suite-time warn">16.66s</div></div><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename"> </div><div class="test-title">TEST</div><div class="test-status">passed</div><div class="test-duration">6.021s</div></div></div></div><div class="suite-consolelog"><div class="suite-consolelog-header">Console Log</div><div class="suite-consolelog-item"><pre class="suite-consolelog-item-origin"> at Object.<anonymous> (/home/runner/work/public/public/packages/Helm/src/__jest__/test-node.ts:61:11)
|
|
233
233
|
at Generator.next (<anonymous>)
|
|
234
234
|
at fulfilled (/home/runner/work/public/public/packages/Helm/src/__jest__/test-node.ts:28:58)
|
|
235
235
|
at processTicksAndRejections (internal/process/task_queues.js:97:5)</pre><pre class="suite-consolelog-item-message">Using web root: http://localhost:8080</pre></div><div class="suite-consolelog-item"><pre class="suite-consolelog-item-origin"> at /home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts:40:11
|
|
@@ -242,7 +242,8 @@ header {
|
|
|
242
242
|
at new Promise (<anonymous>)</pre><pre class="suite-consolelog-item-message">Testing Helm package</pre></div><div class="suite-consolelog-item"><pre class="suite-consolelog-item-origin"> at /home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts:66:11
|
|
243
243
|
at Generator.next (<anonymous>)
|
|
244
244
|
at fulfilled (/home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts:31:58)
|
|
245
|
-
at
|
|
246
|
-
Test result : Success :
|
|
245
|
+
at runMicrotasks (<anonymous>)
|
|
246
|
+
at processTicksAndRejections (internal/process/task_queues.js:97:5)</pre><pre class="suite-consolelog-item-message">Test result : Success : 43 : Helm.Helm.manageFiles : OK
|
|
247
|
+
Test result : Success : 1169 : Helm.Helm.monomerManager : OK
|
|
247
248
|
Test result : Success : 2 : Helm.Helm.parseHelm : OK
|
|
248
249
|
</pre></div></div></div></div></body></html>
|
package/tsconfig.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
// "incremental": true, /* Enable incremental compilation */
|
|
7
7
|
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
|
8
8
|
"module": "es2020", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
9
|
-
"lib": ["es2020", "dom"],
|
|
10
|
-
"allowJs": true,
|
|
9
|
+
"lib": ["es2020", "dom", "ES2021.String"], /* Specify library files to be included in the compilation. */
|
|
10
|
+
"allowJs": true, /* Allow javascript files to be compiled. */
|
|
11
11
|
// "checkJs": true, /* Report errors in .js files. */
|
|
12
12
|
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
|
|
13
13
|
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|