neo.mjs 10.3.3 → 10.3.4
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/ServiceWorker.mjs +2 -2
- package/apps/portal/index.html +1 -1
- package/apps/portal/resources/data/blog.json +1 -1
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/buildScripts/buildAll.mjs +1 -1
- package/buildScripts/webpack/development/webpack.config.appworker.mjs +1 -1
- package/buildScripts/webpack/production/webpack.config.appworker.mjs +1 -1
- package/examples/functional/nestedTemplateComponent/Component.mjs +2 -1
- package/learn/blog/v10-deep-dive-vdom-revolution.md +1 -1
- package/package.json +1 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/grid/Body.mjs +26 -24
package/ServiceWorker.mjs
CHANGED
package/apps/portal/index.html
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"date" : "Jul 28, 2025",
|
|
17
17
|
"id" : 67,
|
|
18
18
|
"image" : "DesigningFunctionalComponents.png",
|
|
19
|
-
"name" : "Designing Functional Components for a Multi-Threaded
|
|
19
|
+
"name" : "Designing Functional Components for a Multi-Threaded World",
|
|
20
20
|
"provider" : "Medium",
|
|
21
21
|
"publisher" : "ITNEXT",
|
|
22
22
|
"selectedInto": [],
|
|
@@ -150,7 +150,7 @@ if (programOpts.info) {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
if (parsedocs === 'yes') {
|
|
153
|
+
if (parsedocs === 'yes' && fs.existsSync(path.join(cwd, 'docs/app'))) {
|
|
154
154
|
childProcess = spawnSync(npmCmd, ['run', 'generate-docs-json'], cpOpts);
|
|
155
155
|
childProcess.status && process.exit(childProcess.status);
|
|
156
156
|
}
|
|
@@ -133,7 +133,7 @@ export default async function(env) {
|
|
|
133
133
|
await createStartingPoint(key.substr(1), 'apps');
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
if (fs.existsSync(path.join(cwd, 'docs'))) {
|
|
136
|
+
if (fs.existsSync(path.join(cwd, 'docs/app'))) {
|
|
137
137
|
await createStartingPoint('Docs', '');
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -36,10 +36,11 @@ export default defineComponent({
|
|
|
36
36
|
|
|
37
37
|
// This event listener is for the main container to toggle the active state
|
|
38
38
|
useEvent('click', (event) => {
|
|
39
|
+
console.log(event.component);
|
|
39
40
|
// Stop the event from bubbling up to avoid toggling the active state
|
|
40
41
|
// when the button is clicked. The button has its own handler.
|
|
41
42
|
if (event.target.id === 'details-button') {
|
|
42
|
-
|
|
43
|
+
return false
|
|
43
44
|
} else {
|
|
44
45
|
setIsActive(prev => !prev)
|
|
45
46
|
}
|
|
@@ -84,7 +84,7 @@ Any run-time value change is reactive and will update the UI.
|
|
|
84
84
|
For functional components, or when you need to dynamically generate UI structures, you can drop down a level of
|
|
85
85
|
abstraction and work directly with **JSON Blueprints**. This is the "native language" of the Neo.mjs rendering engine.
|
|
86
86
|
|
|
87
|
-
The component's `
|
|
87
|
+
The component's `createVdom()` method returns a structured JSON object that describes the VDOM tree.
|
|
88
88
|
|
|
89
89
|
We've seen this movie before. In the world of APIs, the verbose, heavyweight, and human-readable XML standard was
|
|
90
90
|
inevitably supplanted by the lighter, simpler, and more machine-friendly JSON. We believe the same evolution is happening
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "neo.mjs",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.4",
|
|
4
4
|
"description": "Neo.mjs: The multi-threaded UI framework for building ultra-fast, desktop-like web applications with uncompromised responsiveness, inherent security, and a transpilation-free dev mode.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/DefaultConfig.mjs
CHANGED
|
@@ -299,12 +299,12 @@ const DefaultConfig = {
|
|
|
299
299
|
useVdomWorker: true,
|
|
300
300
|
/**
|
|
301
301
|
* buildScripts/injectPackageVersion.mjs will update this value
|
|
302
|
-
* @default '10.3.
|
|
302
|
+
* @default '10.3.4'
|
|
303
303
|
* @memberOf! module:Neo
|
|
304
304
|
* @name config.version
|
|
305
305
|
* @type String
|
|
306
306
|
*/
|
|
307
|
-
version: '10.3.
|
|
307
|
+
version: '10.3.4'
|
|
308
308
|
};
|
|
309
309
|
|
|
310
310
|
Object.assign(DefaultConfig, {
|
package/src/grid/Body.mjs
CHANGED
|
@@ -958,40 +958,42 @@ class GridBody extends Component {
|
|
|
958
958
|
* @param {Object} data.record
|
|
959
959
|
*/
|
|
960
960
|
onStoreRecordChange({fields, record}) {
|
|
961
|
-
let me
|
|
962
|
-
fieldNames
|
|
963
|
-
needsUpdate
|
|
964
|
-
rowIndex
|
|
965
|
-
{selectionModel} = me,
|
|
961
|
+
let me = this,
|
|
962
|
+
fieldNames = fields.map(field => field.name),
|
|
963
|
+
needsUpdate = false,
|
|
964
|
+
rowIndex = me.store.indexOf(record),
|
|
965
|
+
{mountedRows, selectionModel} = me,
|
|
966
966
|
column, needsCellUpdate, recordId;
|
|
967
967
|
|
|
968
968
|
if (fieldNames.includes(me.colspanField)) {
|
|
969
969
|
me.vdom.cn[rowIndex] = me.createRow({record, rowIndex});
|
|
970
970
|
me.update()
|
|
971
971
|
} else {
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
972
|
+
if (rowIndex >= mountedRows[0] && rowIndex <= mountedRows[1]) {
|
|
973
|
+
for (column of me.parent.columns.items) {
|
|
974
|
+
if (
|
|
975
|
+
column instanceof Neo.grid.column.Component &&
|
|
976
|
+
Neo.typeOf(column.component === 'Function') &&
|
|
977
|
+
!fieldNames.includes(column.dataField)
|
|
978
|
+
) {
|
|
979
|
+
needsCellUpdate = me.updateCellNode(record, column.dataField);
|
|
980
|
+
needsUpdate = needsUpdate || needsCellUpdate
|
|
981
|
+
}
|
|
980
982
|
}
|
|
981
|
-
}
|
|
982
983
|
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
984
|
+
fields.forEach(field => {
|
|
985
|
+
if (field.name === me.selectedRecordField) {
|
|
986
|
+
if (selectionModel.ntype === 'selection-grid-rowmodel') {
|
|
987
|
+
recordId = record[me.store.getKeyProperty()];
|
|
987
988
|
|
|
988
|
-
|
|
989
|
+
selectionModel[field.value ? 'selectRow' : 'deselectRow'](recordId)
|
|
990
|
+
}
|
|
991
|
+
} else {
|
|
992
|
+
needsCellUpdate = me.updateCellNode(record, field.name);
|
|
993
|
+
needsUpdate = needsUpdate || needsCellUpdate
|
|
989
994
|
}
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
needsUpdate = needsUpdate || needsCellUpdate
|
|
993
|
-
}
|
|
994
|
-
})
|
|
995
|
+
})
|
|
996
|
+
}
|
|
995
997
|
}
|
|
996
998
|
|
|
997
999
|
needsUpdate && me.update()
|