@datagrok/helm 2.5.10 → 2.7.0
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/CHANGELOG.md +4 -0
- package/dist/package-dojo.js +1 -1
- package/dist/package-dojo.js.map +1 -1
- package/dist/package-test.js +1 -1
- package/dist/package-test.js.map +1 -1
- package/dist/package.js +1 -1
- package/dist/package.js.map +1 -1
- package/helm/dojo/package.ts +1 -1
- package/package.json +7 -7
- package/src/package-utils.ts +10 -3
- package/src/tests/renderers-tests.ts +3 -0
- package/src/global.d.ts +0 -13
package/helm/dojo/package.ts
CHANGED
|
@@ -32,7 +32,7 @@ async function loadModules(): Promise<void> {
|
|
|
32
32
|
// window.dojo$.ctx = require.context('../../vendor/dojo-1.10.10', true, /\.js\.uncompressed\.js$/);
|
|
33
33
|
|
|
34
34
|
window.dojo$.uncompressed = unc;
|
|
35
|
-
window.dojo$.ctx(`./dojo/dojo.js${unc}`);
|
|
35
|
+
await window.dojo$.ctx(`./dojo/dojo.js${unc}`);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datagrok/helm",
|
|
3
3
|
"friendlyName": "Helm",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.0",
|
|
5
5
|
"author": {
|
|
6
|
-
"name": "
|
|
7
|
-
"email": "
|
|
6
|
+
"name": "Maria Dolotova",
|
|
7
|
+
"email": "mdolotova@datagrok.ai"
|
|
8
8
|
},
|
|
9
9
|
"description": "Provides support for HELM notation (importing, detecting, rendering, conversion).",
|
|
10
10
|
"sources-backup": [
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@datagrok-libraries/bio": "^5.45.11",
|
|
20
20
|
"@datagrok-libraries/chem-meta": "^1.2.7",
|
|
21
|
-
"@datagrok-libraries/utils": "^4.3.7",
|
|
22
21
|
"cash-dom": "^8.1.1",
|
|
23
|
-
"datagrok-
|
|
22
|
+
"@datagrok-libraries/utils": "^4.4.0",
|
|
23
|
+
"datagrok-api": "^1.23.0",
|
|
24
24
|
"dayjs": "^1.10.6",
|
|
25
25
|
"lru-cache": "^10.4.3",
|
|
26
26
|
"rxjs": "^6.5.5",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@datagrok-libraries/helm-web-editor": "^1.1.13",
|
|
31
31
|
"@datagrok-libraries/js-draw-lite": "^0.0.10",
|
|
32
|
-
"@datagrok/bio": "
|
|
33
|
-
"@datagrok/chem": "^1.
|
|
32
|
+
"@datagrok/bio": "latest",
|
|
33
|
+
"@datagrok/chem": "^1.13.0",
|
|
34
34
|
"@types/node": "17.0.45",
|
|
35
35
|
"@types/webpack-env": "^1.18.5",
|
|
36
36
|
"@types/wu": "^2.1.44",
|
package/src/package-utils.ts
CHANGED
|
@@ -56,8 +56,10 @@ export async function initHelmLoadAndPatchDojo(): Promise<void> {
|
|
|
56
56
|
// patch window.dojox.gfx.svg.Text.prototype.getTextWidth hangs
|
|
57
57
|
/** get the text width in pixels */
|
|
58
58
|
const pi = DG.TaskBarProgressIndicator.create('Loading Helm Web Editor ...');
|
|
59
|
+
const requireBackup = window.require;
|
|
60
|
+
//@ts-ignore
|
|
61
|
+
const defineBackup = window['define'];
|
|
59
62
|
try {
|
|
60
|
-
const requireBackup = window.require;
|
|
61
63
|
|
|
62
64
|
// Dojo modules required by JDraw2 and HELMWebEditor
|
|
63
65
|
// 'dojo.window','dojo.io.script','dojo.io.iframe','dojo.dom',
|
|
@@ -88,7 +90,7 @@ export async function initHelmLoadAndPatchDojo(): Promise<void> {
|
|
|
88
90
|
|
|
89
91
|
try {
|
|
90
92
|
// Preliminary loading BiostructureViewer package because of NGL and dojo interference
|
|
91
|
-
await initNgl();
|
|
93
|
+
//await initNgl();
|
|
92
94
|
|
|
93
95
|
await timeout(async () => {
|
|
94
96
|
await new Promise<void>((resolve, reject) => {
|
|
@@ -112,7 +114,7 @@ export async function initHelmLoadAndPatchDojo(): Promise<void> {
|
|
|
112
114
|
},
|
|
113
115
|
},
|
|
114
116
|
};
|
|
115
|
-
// Load dojo without package/sources section for the settings dojoConfig to take effect
|
|
117
|
+
// Load dojo without package/sources section for the settings dojoConfig to take effect, calleback will be called and promise resolved
|
|
116
118
|
DG.Utils.loadJsCss([
|
|
117
119
|
// 'https://ajax.googleapis.com/ajax/libs/dojo/1.10.4/dojo/dojo.js.uncompressed.js',
|
|
118
120
|
// `${_package.webRoot}/vendor/dojo-1.10.10/dojo/dojo.js.uncompressed.js`,
|
|
@@ -141,6 +143,8 @@ export async function initHelmLoadAndPatchDojo(): Promise<void> {
|
|
|
141
143
|
_package.logger.debug(`${logPrefix}, window.require( ${JSON.stringify(args)} )`);
|
|
142
144
|
dojoRequire(...args);
|
|
143
145
|
};
|
|
146
|
+
|
|
147
|
+
|
|
144
148
|
}
|
|
145
149
|
|
|
146
150
|
/** List of dojo modules not ready yet */ let dojoNotReadyList: string[];
|
|
@@ -190,6 +194,9 @@ export async function initHelmLoadAndPatchDojo(): Promise<void> {
|
|
|
190
194
|
};
|
|
191
195
|
_package.logger.debug(`${logPrefix}, end`);
|
|
192
196
|
} finally {
|
|
197
|
+
window.require = requireBackup;
|
|
198
|
+
// @ts-ignore
|
|
199
|
+
window['define'] = defineBackup;
|
|
193
200
|
pi.close();
|
|
194
201
|
}
|
|
195
202
|
}
|
|
@@ -55,6 +55,8 @@ category('renderers', () => {
|
|
|
55
55
|
return $(tv.root).find('.d4-grid canvas').length > 0;
|
|
56
56
|
}, 'Table view canvas not found', 100);
|
|
57
57
|
|
|
58
|
+
await grok.data.detectSemanticTypes(df);
|
|
59
|
+
|
|
58
60
|
expect(helmCol.semType, DG.SEMTYPE.MACROMOLECULE);
|
|
59
61
|
expect(helmCol.meta.units, NOTATION.HELM);
|
|
60
62
|
expect(helmCol.getTag(DG.TAGS.CELL_RENDERER), 'helm');
|
|
@@ -78,6 +80,7 @@ RNA1{d(A)p.d(C)p.d(G)p.d(U)p}|PEPTIDE1{I.H.A.N.T.Thr_PO3H2}$$$$,0,1
|
|
|
78
80
|
const df = DG.DataFrame.fromCsv(helmCoordsCsv);
|
|
79
81
|
df.currentRowIdx = 0;
|
|
80
82
|
const view = grok.shell.addTableView(df);
|
|
83
|
+
await grok.data.detectSemanticTypes(df);
|
|
81
84
|
const sp: DG.ScatterPlotViewer = df.plot.scatter({x: 'x', y: 'y'});
|
|
82
85
|
view.dockManager.dock(sp, DG.DOCK_TYPE.RIGHT, null);
|
|
83
86
|
await Promise.all([
|
package/src/global.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as grokNamespace from 'datagrok-api/grok';
|
|
2
|
-
import * as uiNamespace from 'datagrok-api/ui';
|
|
3
|
-
import * as DGNamespace from 'datagrok-api/dg';
|
|
4
|
-
import * as rxjsNamespace from 'rxjs';
|
|
5
|
-
import $Namespace from 'cash-dom';
|
|
6
|
-
|
|
7
|
-
declare global {
|
|
8
|
-
const grok: typeof grokNamespace;
|
|
9
|
-
const ui: typeof uiNamespace;
|
|
10
|
-
const DG: typeof DGNamespace;
|
|
11
|
-
const rjxs: typeof rxjsNamespace;
|
|
12
|
-
const $: typeof $Namespace;
|
|
13
|
-
}
|