@datagrok/helm 2.5.10 → 2.6.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.
@@ -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,7 +1,7 @@
1
1
  {
2
2
  "name": "@datagrok/helm",
3
3
  "friendlyName": "Helm",
4
- "version": "2.5.10",
4
+ "version": "2.6.0",
5
5
  "author": {
6
6
  "name": "Aleksandr Tanas",
7
7
  "email": "atanas@datagrok.ai"
@@ -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
  }