@aemforms/af-core 0.22.100 → 0.22.101
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
CHANGED
|
@@ -2883,6 +2883,24 @@ class FunctionRuntimeImpl {
|
|
|
2883
2883
|
},
|
|
2884
2884
|
_signature: []
|
|
2885
2885
|
},
|
|
2886
|
+
awaitFn: {
|
|
2887
|
+
_func: async (args, data, interpreter) => {
|
|
2888
|
+
const success = args[1];
|
|
2889
|
+
const currentField = interpreter.globals.$field;
|
|
2890
|
+
try {
|
|
2891
|
+
const result = await args[0];
|
|
2892
|
+
defaultFunctions.dispatchEvent._func([currentField, success, result], data, interpreter);
|
|
2893
|
+
}
|
|
2894
|
+
catch (err) {
|
|
2895
|
+
const error = args[2];
|
|
2896
|
+
if (error) {
|
|
2897
|
+
defaultFunctions.dispatchEvent._func([currentField, error, err], data, interpreter);
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
return {};
|
|
2901
|
+
},
|
|
2902
|
+
_signature: []
|
|
2903
|
+
},
|
|
2886
2904
|
addInstance: {
|
|
2887
2905
|
_func: (args, data, interpreter) => {
|
|
2888
2906
|
const element = args[0];
|
|
@@ -48,6 +48,10 @@ declare class FunctionRuntimeImpl {
|
|
|
48
48
|
_func: (args: Array<unknown>, data: unknown, interpreter: any) => {};
|
|
49
49
|
_signature: never[];
|
|
50
50
|
};
|
|
51
|
+
awaitFn: {
|
|
52
|
+
_func: (args: Array<unknown>, data: unknown, interpreter: any) => Promise<{}>;
|
|
53
|
+
_signature: never[];
|
|
54
|
+
};
|
|
51
55
|
addInstance: {
|
|
52
56
|
_func: (args: Array<unknown>, data: unknown, interpreter: any) => void;
|
|
53
57
|
_signature: never[];
|
|
@@ -48,6 +48,10 @@ declare class FunctionRuntimeImpl {
|
|
|
48
48
|
_func: (args: Array<unknown>, data: unknown, interpreter: any) => {};
|
|
49
49
|
_signature: never[];
|
|
50
50
|
};
|
|
51
|
+
awaitFn: {
|
|
52
|
+
_func: (args: Array<unknown>, data: unknown, interpreter: any) => Promise<{}>;
|
|
53
|
+
_signature: never[];
|
|
54
|
+
};
|
|
51
55
|
addInstance: {
|
|
52
56
|
_func: (args: Array<unknown>, data: unknown, interpreter: any) => void;
|
|
53
57
|
_signature: never[];
|
|
@@ -446,6 +446,24 @@ class FunctionRuntimeImpl {
|
|
|
446
446
|
},
|
|
447
447
|
_signature: []
|
|
448
448
|
},
|
|
449
|
+
awaitFn: {
|
|
450
|
+
_func: (args, data, interpreter) => __awaiter(this, void 0, void 0, function* () {
|
|
451
|
+
const success = args[1];
|
|
452
|
+
const currentField = interpreter.globals.$field;
|
|
453
|
+
try {
|
|
454
|
+
const result = yield args[0];
|
|
455
|
+
defaultFunctions.dispatchEvent._func([currentField, success, result], data, interpreter);
|
|
456
|
+
}
|
|
457
|
+
catch (err) {
|
|
458
|
+
const error = args[2];
|
|
459
|
+
if (error) {
|
|
460
|
+
defaultFunctions.dispatchEvent._func([currentField, error, err], data, interpreter);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
return {};
|
|
464
|
+
}),
|
|
465
|
+
_signature: []
|
|
466
|
+
},
|
|
449
467
|
addInstance: {
|
|
450
468
|
_func: (args, data, interpreter) => {
|
|
451
469
|
const element = args[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.101",
|
|
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.101"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/preset-env": "^7.20.2",
|