@aemforms/af-core 0.22.139 → 0.22.141
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/esm/afb-runtime.js +10 -4
- package/lib/Container.js +3 -0
- package/lib/rules/FunctionRuntime.js +7 -4
- package/package.json +2 -2
package/esm/afb-runtime.js
CHANGED
|
@@ -2476,6 +2476,9 @@ class Container extends Scriptable {
|
|
|
2476
2476
|
this.notifyDependents(propertyChange('items', null, item.getState()));
|
|
2477
2477
|
});
|
|
2478
2478
|
}
|
|
2479
|
+
else if (typeof this._data === 'undefined') {
|
|
2480
|
+
console.warn(`Data node is null, hence importData did not work for panel "${this.name}". Check if parent has a dataRef set to null.`);
|
|
2481
|
+
}
|
|
2479
2482
|
}
|
|
2480
2483
|
syncDataAndFormModel(contextualDataModel) {
|
|
2481
2484
|
const result = {
|
|
@@ -3047,9 +3050,12 @@ class FunctionRuntimeImpl {
|
|
|
3047
3050
|
event: interpreter.globals.$event,
|
|
3048
3051
|
functions: {
|
|
3049
3052
|
setProperty: (target, payload) => {
|
|
3050
|
-
const
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
+
const field = interpreter.globals.form.getElement(target.$id);
|
|
3054
|
+
Object.entries(payload).forEach(([key, value]) => {
|
|
3055
|
+
if (value !== null) {
|
|
3056
|
+
field[key] = value;
|
|
3057
|
+
}
|
|
3058
|
+
});
|
|
3053
3059
|
},
|
|
3054
3060
|
reset: (target) => {
|
|
3055
3061
|
const eventName = 'reset';
|
|
@@ -3288,7 +3294,7 @@ class FunctionRuntimeImpl {
|
|
|
3288
3294
|
const variableName = toString(args[0]);
|
|
3289
3295
|
let variableValue = args[1];
|
|
3290
3296
|
const normalFieldOrPanel = args[2] || interpreter.globals.form;
|
|
3291
|
-
if (variableValue && typeof variableValue === 'object' &&
|
|
3297
|
+
if (variableValue && typeof variableValue === 'object' && variableValue.$qualifiedName) {
|
|
3292
3298
|
const variableValueElement = interpreter.globals.form.getElement(variableValue.$id);
|
|
3293
3299
|
variableValue = variableValueElement._jsonModel.value;
|
|
3294
3300
|
}
|
package/lib/Container.js
CHANGED
|
@@ -380,6 +380,9 @@ class Container extends Scriptable_1.default {
|
|
|
380
380
|
this.notifyDependents((0, Events_1.propertyChange)('items', null, item.getState()));
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
|
+
else if (typeof this._data === 'undefined') {
|
|
384
|
+
console.warn(`Data node is null, hence importData did not work for panel "${this.name}". Check if parent has a dataRef set to null.`);
|
|
385
|
+
}
|
|
383
386
|
}
|
|
384
387
|
syncDataAndFormModel(contextualDataModel) {
|
|
385
388
|
const result = {
|
|
@@ -248,9 +248,12 @@ class FunctionRuntimeImpl {
|
|
|
248
248
|
event: interpreter.globals.$event,
|
|
249
249
|
functions: {
|
|
250
250
|
setProperty: (target, payload) => {
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
const field = interpreter.globals.form.getElement(target.$id);
|
|
252
|
+
Object.entries(payload).forEach(([key, value]) => {
|
|
253
|
+
if (value !== null) {
|
|
254
|
+
field[key] = value;
|
|
255
|
+
}
|
|
256
|
+
});
|
|
254
257
|
},
|
|
255
258
|
reset: (target) => {
|
|
256
259
|
const eventName = 'reset';
|
|
@@ -491,7 +494,7 @@ class FunctionRuntimeImpl {
|
|
|
491
494
|
const variableName = toString(args[0]);
|
|
492
495
|
let variableValue = args[1];
|
|
493
496
|
const normalFieldOrPanel = args[2] || interpreter.globals.form;
|
|
494
|
-
if (variableValue && typeof variableValue === 'object' &&
|
|
497
|
+
if (variableValue && typeof variableValue === 'object' && variableValue.$qualifiedName) {
|
|
495
498
|
const variableValueElement = interpreter.globals.form.getElement(variableValue.$id);
|
|
496
499
|
variableValue = variableValueElement._jsonModel.value;
|
|
497
500
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.141",
|
|
4
4
|
"description": "Core Module for Forms Runtime",
|
|
5
5
|
"author": "Adobe Systems",
|
|
6
6
|
"license": "Adobe Proprietary",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@adobe/json-formula": "0.1.50",
|
|
40
|
-
"@aemforms/af-formatters": "^0.22.
|
|
40
|
+
"@aemforms/af-formatters": "^0.22.141"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/preset-env": "^7.20.2",
|