structured-fw 0.9.9 → 1.0.1
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/build/system/Util.js
CHANGED
|
@@ -230,7 +230,7 @@ export function attributeValueFromString(attributeValue) {
|
|
|
230
230
|
return attributeValue;
|
|
231
231
|
}
|
|
232
232
|
const valObj = JSON.parse(decoded);
|
|
233
|
-
if (!('
|
|
233
|
+
if (!('key' in valObj)) {
|
|
234
234
|
return decoded;
|
|
235
235
|
}
|
|
236
236
|
return valObj;
|
|
@@ -89,17 +89,19 @@ export class Component extends EventEmitter {
|
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
const importedParentData = this.parent ? this.importedParentData(this.parent.data) : {};
|
|
92
|
+
const dataServerSidePart = (this.entry && this.entry.module ?
|
|
93
|
+
await this.entry.module.getData(Object.assign(importedParentData, this.attributes, data || {}), this.document.ctx, this.document.application, this) : {}) || {};
|
|
92
94
|
if (data === undefined) {
|
|
93
95
|
if (this.entry && this.entry.module) {
|
|
94
|
-
this.data = Object.assign(this.data,
|
|
96
|
+
this.data = Object.assign(this.data, dataServerSidePart);
|
|
95
97
|
}
|
|
96
98
|
else {
|
|
97
99
|
this.attributes = Object.assign(importedParentData, this.attributes);
|
|
98
|
-
this.data = Object.assign(
|
|
100
|
+
this.data = Object.assign(this.data, this.attributes);
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
else {
|
|
102
|
-
this.data = Object.assign(
|
|
104
|
+
this.data = Object.assign(this.data, Object.assign(importedParentData, data), this.attributes, dataServerSidePart);
|
|
103
105
|
}
|
|
104
106
|
this.fillData(this.data);
|
|
105
107
|
if (this.entry === null || this.entry.exportData) {
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"main": "build/index",
|
|
22
|
-
"version": "0.
|
|
22
|
+
"version": "1.0.1",
|
|
23
23
|
"scripts": {
|
|
24
24
|
"develop": "tsc --watch",
|
|
25
25
|
"startDev": "cd build && nodemon --watch '../app/**/*' --watch '../build/**/*' -e js,html,css index.js",
|
|
@@ -36,8 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"handlebars": "^4.7.8",
|
|
39
|
-
"mime-types": "^3.0.0"
|
|
40
|
-
"ts-md5": "^1.3.1"
|
|
39
|
+
"mime-types": "^3.0.0"
|
|
41
40
|
},
|
|
42
41
|
"files": [
|
|
43
42
|
"build/system/*",
|