@datagrok/helm 2.1.2 → 2.1.3
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/dist/package.js +7 -2
- package/package.json +2 -7
- package/src/package.ts +5 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/helm",
|
|
3
3
|
"friendlyName": "Helm",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.3",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Oleksandra Serhiienko",
|
|
7
7
|
"email": "oserhiienko@datagrok.ai"
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
],
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"path": "^0.12.7",
|
|
27
|
-
"puppeteer": "^13.7.0",
|
|
28
27
|
"ts-loader": "^9.2.6",
|
|
29
28
|
"typescript": "^4.4.4",
|
|
30
29
|
"webpack": "^5.59.1",
|
|
@@ -32,11 +31,7 @@
|
|
|
32
31
|
"@typescript-eslint/eslint-plugin": "^5.11.0",
|
|
33
32
|
"@typescript-eslint/parser": "^5.11.0",
|
|
34
33
|
"eslint": "^8.18.0",
|
|
35
|
-
"eslint-config-google": "^0.14.0"
|
|
36
|
-
"@types/js-yaml": "^4.0.5",
|
|
37
|
-
"js-yaml": "^4.1.0",
|
|
38
|
-
"@types/node-fetch": "^2.6.2",
|
|
39
|
-
"node-fetch": "^2.6.7"
|
|
34
|
+
"eslint-config-google": "^0.14.0"
|
|
40
35
|
},
|
|
41
36
|
"scripts": {
|
|
42
37
|
"link-all": "npm link datagrok-api @datagrok-libraries/utils @datagrok-libraries/bio",
|
package/src/package.ts
CHANGED
|
@@ -8,6 +8,7 @@ import {HelmWebEditor} from './helm-web-editor';
|
|
|
8
8
|
import {HelmCellRenderer} from './cell-renderer';
|
|
9
9
|
import {IMonomerLib, Monomer} from '@datagrok-libraries/bio/src/types';
|
|
10
10
|
import {NotationConverter} from '@datagrok-libraries/bio/src/utils/notation-converter';
|
|
11
|
+
import { findMonomers } from './utils';
|
|
11
12
|
|
|
12
13
|
export const _package = new DG.Package();
|
|
13
14
|
let monomerLib: IMonomerLib | null = null;
|
|
@@ -80,8 +81,11 @@ export function helmCellRenderer(): HelmCellRenderer {
|
|
|
80
81
|
//description: Macromolecule
|
|
81
82
|
//input: grid_cell cell
|
|
82
83
|
export function editMoleculeCell(cell: DG.GridCell): void {
|
|
83
|
-
|
|
84
|
+
const monomers = findMonomers(cell.cell.value);
|
|
85
|
+
if (cell.gridColumn.column.tags[DG.TAGS.UNITS] === 'helm' && monomers.size === 0)
|
|
84
86
|
webEditor(cell);
|
|
87
|
+
else
|
|
88
|
+
grok.shell.warning(`Monomers ${Array.from(monomers).join(', ')} are absent!`);
|
|
85
89
|
}
|
|
86
90
|
|
|
87
91
|
//name: Open Helm Web Editor
|