@datagrok/helm 2.0.6 → 2.0.7

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.6",
4
+ "version": "2.0.7",
5
5
  "author": {
6
6
  "name": "Oleksandra Serhiienko",
7
7
  "email": "oserhiienko@datagrok.ai"
@@ -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.editorView = ui.div();
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
- this.webEditor = new scil.helm.App(this.editorView, {
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 = this.webEditor.calculateSizes();
26
- this.webEditor.canvas.resize(sizes.rightwidth - 100, sizes.topheight - 210);
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(this.webEditor.sequence.style, s);
36
+ scil.apply(webEditor.sequence.style, s);
30
37
  //@ts-ignore
31
- scil.apply(this.webEditor.notation.style, s);
32
- s = {width: sizes.rightwidth + 'px', height: (sizes.bottomheight + this.webEditor.toolbarheight) + 'px'};
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(this.webEditor.properties.parent.style, s);
35
- this.webEditor.structureview.resize(sizes.rightwidth, sizes.bottomheight + this.webEditor.toolbarheight);
36
- this.webEditor.mex.resize(sizes.topheight - 80);
37
- this.host = ui.div([], {style: {width: `${this.w}px`, height: `${this.h}px`}});
38
- this.editor = new JSDraw2.Editor(this.host, {width: this.w, height: this.h, viewonly: true});
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
 
@@ -1,4 +1,4 @@
1
- <html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=49ff04f38f57. Commit 48c80158.</title><style type="text/css">html,
1
+ <html><head><meta charset="utf-8"/><title>Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=5e15f45ca638. Commit 10548f95.</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=49ff04f38f57. Commit 48c80158.</h1></header><div id="metadata-container"><div id="timestamp">Started: 2022-10-25 11:59:02</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">14.844s</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">5.034s</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.&lt;anonymous&gt; (/home/runner/work/public/public/packages/Helm/src/__jest__/test-node.ts:61:11)
232
+ </style></head><body><div id="jesthtml-content"><header><h1 id="title">Helm Test Report. Datagrok version datagrok/datagrok:latest SHA=5e15f45ca638. Commit 10548f95.</h1></header><div id="metadata-container"><div id="timestamp">Started: 2022-10-28 14:40:08</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">14.009s</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">4.849s</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.&lt;anonymous&gt; (/home/runner/work/public/public/packages/Helm/src/__jest__/test-node.ts:61:11)
233
233
  at Generator.next (&lt;anonymous&gt;)
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 (&lt;anonymous&gt;)</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 (&lt;anonymous&gt;)
244
244
  at fulfilled (/home/runner/work/public/public/packages/Helm/src/__jest__/remote.test.ts:31:58)
245
- at processTicksAndRejections (internal/process/task_queues.js:97:5)</pre><pre class="suite-consolelog-item-message">Test result : Success : 48 : Helm.Helm.manageFiles : OK
246
- Test result : Success : 839 : Helm.Helm.monomerManager : OK
247
- Test result : Success : 2 : Helm.Helm.parseHelm : OK
245
+ at runMicrotasks (&lt;anonymous&gt;)
246
+ at processTicksAndRejections (internal/process/task_queues.js:97:5)</pre><pre class="suite-consolelog-item-message">Test result : Success : 38 : Helm.Helm.manageFiles : OK
247
+ Test result : Success : 739 : Helm.Helm.monomerManager : OK
248
+ Test result : Success : 1 : Helm.Helm.parseHelm : OK
248
249
  </pre></div></div></div></div></body></html>