@aemforms/af-core 0.22.139 → 0.22.140

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.
@@ -3047,9 +3047,12 @@ class FunctionRuntimeImpl {
3047
3047
  event: interpreter.globals.$event,
3048
3048
  functions: {
3049
3049
  setProperty: (target, payload) => {
3050
- const eventName = 'custom:setProperty';
3051
- const args = [target, eventName, payload];
3052
- return FunctionRuntimeImpl.getInstance().getFunctions().dispatchEvent._func.call(undefined, args, data, interpreter);
3050
+ const field = interpreter.globals.form.getElement(target.$id);
3051
+ Object.entries(payload).forEach(([key, value]) => {
3052
+ if (value !== null) {
3053
+ field[key] = value;
3054
+ }
3055
+ });
3053
3056
  },
3054
3057
  reset: (target) => {
3055
3058
  const eventName = 'reset';
@@ -248,9 +248,12 @@ class FunctionRuntimeImpl {
248
248
  event: interpreter.globals.$event,
249
249
  functions: {
250
250
  setProperty: (target, payload) => {
251
- const eventName = 'custom:setProperty';
252
- const args = [target, eventName, payload];
253
- return FunctionRuntimeImpl.getInstance().getFunctions().dispatchEvent._func.call(undefined, args, data, interpreter);
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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aemforms/af-core",
3
- "version": "0.22.139",
3
+ "version": "0.22.140",
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.139"
40
+ "@aemforms/af-formatters": "^0.22.140"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@babel/preset-env": "^7.20.2",