neo.mjs 8.39.0 → 8.40.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.
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='8.39.0'
23
+ * @member {String} version='8.40.0'
24
24
  */
25
- version: '8.39.0'
25
+ version: '8.40.0'
26
26
  }
27
27
 
28
28
  /**
@@ -274,22 +274,29 @@ class ViewportController extends Controller {
274
274
  /**
275
275
  *
276
276
  */
277
- updateWidgets() {
277
+ async updateWidgets() {
278
278
  let me = this,
279
- stateProvider = me.getStateProvider();
279
+ stateProvider = me.getStateProvider(),
280
+ response;
281
+
282
+ // Timing issue inside dist/development => the namespace might not be registered yet
283
+ if (!Colors.backend) {
284
+ await me.timeout(50);
285
+ me.updateWidgets()
286
+ } else {
287
+ response = await Colors.backend.ColorService.read({
288
+ amountColors : stateProvider.getData('amountColors'),
289
+ amountColumns: stateProvider.getData('amountColumns'),
290
+ amountRows : stateProvider.getData('amountRows')
291
+ });
280
292
 
281
- Colors.backend.ColorService.read({
282
- amountColors : stateProvider.getData('amountColors'),
283
- amountColumns: stateProvider.getData('amountColumns'),
284
- amountRows : stateProvider.getData('amountRows')
285
- }).then(response => {
286
293
  if (!me.isDestroyed) {
287
294
  let {data} = response;
288
295
 
289
296
  me.updateTable(data.tableData);
290
297
  me.updateCharts(data.summaryData)
291
298
  }
292
- })
299
+ }
293
300
  }
294
301
  }
295
302
 
@@ -16,7 +16,7 @@
16
16
  "@type": "Organization",
17
17
  "name": "Neo.mjs"
18
18
  },
19
- "datePublished": "2025-04-03",
19
+ "datePublished": "2025-04-05",
20
20
  "publisher": {
21
21
  "@type": "Organization",
22
22
  "name": "Neo.mjs"
@@ -107,7 +107,7 @@ class FooterContainer extends Container {
107
107
  }, {
108
108
  module: Component,
109
109
  cls : ['neo-version'],
110
- html : 'v8.39.0'
110
+ html : 'v8.40.0'
111
111
  }]
112
112
  }],
113
113
  /**
@@ -79,6 +79,14 @@ export default env => {
79
79
 
80
80
  fs.writeFileSync(outputPath, JSON.stringify(content, null, 4));
81
81
 
82
+ // remotes-api.json
83
+ if (content.remotesApiUrl) {
84
+ inputPath = path.resolve(cwd, folder, lAppName, content.remotesApiUrl);
85
+ outputPath = path.resolve(cwd, buildTarget.folder, folder, lAppName, content.remotesApiUrl);
86
+
87
+ fs.copySync(inputPath, outputPath);
88
+ }
89
+
82
90
  // index.html
83
91
  inputPath = path.resolve(cwd, folder, lAppName, 'index.html');
84
92
  outputPath = path.resolve(cwd, buildTarget.folder, folder, lAppName, 'index.html');
@@ -83,6 +83,15 @@ export default env => {
83
83
 
84
84
  fs.writeFileSync(outputPath, JSON.stringify(content));
85
85
 
86
+ // remotes-api.json
87
+ if (content.remotesApiUrl) {
88
+ inputPath = path.resolve(cwd, folder, lAppName, content.remotesApiUrl);
89
+ outputPath = path.resolve(cwd, buildTarget.folder, folder, lAppName, content.remotesApiUrl);
90
+ content = requireJson(inputPath);
91
+
92
+ fs.writeFileSync(outputPath, JSON.stringify(content));
93
+ }
94
+
86
95
  // index.html
87
96
  inputPath = path.resolve(cwd, folder, lAppName, 'index.html');
88
97
  outputPath = path.resolve(cwd, buildTarget.folder, folder, lAppName, 'index.html');
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='8.39.0'
23
+ * @member {String} version='8.40.0'
24
24
  */
25
- version: '8.39.0'
25
+ version: '8.40.0'
26
26
  }
27
27
 
28
28
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "8.39.0",
3
+ "version": "8.40.0",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -56,7 +56,7 @@
56
56
  "envinfo": "^7.14.0",
57
57
  "fs-extra": "^11.3.0",
58
58
  "highlightjs-line-numbers.js": "^2.9.0",
59
- "inquirer": "^12.5.0",
59
+ "inquirer": "^12.5.2",
60
60
  "marked": "^15.0.7",
61
61
  "monaco-editor": "0.50.0",
62
62
  "neo-jsdoc": "1.0.1",
@@ -263,12 +263,12 @@ const DefaultConfig = {
263
263
  useVdomWorker: true,
264
264
  /**
265
265
  * buildScripts/injectPackageVersion.mjs will update this value
266
- * @default '8.39.0'
266
+ * @default '8.40.0'
267
267
  * @memberOf! module:Neo
268
268
  * @name config.version
269
269
  * @type String
270
270
  */
271
- version: '8.39.0'
271
+ version: '8.40.0'
272
272
  };
273
273
 
274
274
  Object.assign(DefaultConfig, {
package/src/grid/View.mjs CHANGED
@@ -446,7 +446,11 @@ class GridView extends Component {
446
446
  fieldValue = ''
447
447
  }
448
448
 
449
- rendererOutput = column.renderer.call(column.rendererScope || column, {
449
+ if (column.rendererScope === 'me' || column.rendererScope === 'this') {
450
+ column.rendererScope = column;
451
+ }
452
+
453
+ rendererOutput = column.renderer.call(column.rendererScope || me, {
450
454
  column,
451
455
  columnIndex,
452
456
  dataField,
@@ -26,8 +26,9 @@ class Column extends Base {
26
26
  renderer_: 'cellRenderer',
27
27
  /**
28
28
  * Scope to execute the column renderer.
29
- * Defaults to the column instance
30
- * @member {Neo.core.Base|null} rendererScope=null
29
+ * Defaults to the grid.View.
30
+ * You can pass the strings 'this' or 'me'
31
+ * @member {Neo.core.Base|String|null} rendererScope=null
31
32
  */
32
33
  rendererScope: null,
33
34
  /**
@@ -29,6 +29,11 @@ class Component extends Column {
29
29
  * @member {String} recordProperty='record'
30
30
  */
31
31
  recordProperty: 'record',
32
+ /**
33
+ * @member {String} rendererScope='this'
34
+ * @protected
35
+ */
36
+ rendererScope: 'this',
32
37
  /**
33
38
  * @member {String} type='component'
34
39
  * @protected
@@ -46,7 +46,8 @@ class Api extends Base {
46
46
  if (!path.includes('http')) {
47
47
  path = config.appPath.split('/');
48
48
  path.pop();
49
- path = `../../${path.join('/')}/${config.remotesApiUrl}`;
49
+ path = `${path.join('/')}/${config.remotesApiUrl}`;
50
+ path = (config.environment === 'development' ? '../../' : './') + path
50
51
  }
51
52
 
52
53
  fetch(path)