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.
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/colors/view/ViewportController.mjs +15 -8
- package/apps/portal/index.html +1 -1
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/buildScripts/webpack/development/webpack.config.appworker.mjs +8 -0
- package/buildScripts/webpack/production/webpack.config.appworker.mjs +9 -0
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +2 -2
- package/src/DefaultConfig.mjs +2 -2
- package/src/grid/View.mjs +5 -1
- package/src/grid/column/Base.mjs +3 -2
- package/src/grid/column/Component.mjs +5 -0
- package/src/remotes/Api.mjs +2 -1
package/apps/ServiceWorker.mjs
CHANGED
@@ -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
|
|
package/apps/portal/index.html
CHANGED
@@ -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');
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "neo.mjs",
|
3
|
-
"version": "8.
|
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.
|
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",
|
package/src/DefaultConfig.mjs
CHANGED
@@ -263,12 +263,12 @@ const DefaultConfig = {
|
|
263
263
|
useVdomWorker: true,
|
264
264
|
/**
|
265
265
|
* buildScripts/injectPackageVersion.mjs will update this value
|
266
|
-
* @default '8.
|
266
|
+
* @default '8.40.0'
|
267
267
|
* @memberOf! module:Neo
|
268
268
|
* @name config.version
|
269
269
|
* @type String
|
270
270
|
*/
|
271
|
-
version: '8.
|
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
|
-
|
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,
|
package/src/grid/column/Base.mjs
CHANGED
@@ -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
|
30
|
-
*
|
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
|
package/src/remotes/Api.mjs
CHANGED
@@ -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 =
|
49
|
+
path = `${path.join('/')}/${config.remotesApiUrl}`;
|
50
|
+
path = (config.environment === 'development' ? '../../' : './') + path
|
50
51
|
}
|
51
52
|
|
52
53
|
fetch(path)
|