@aemforms/af-core 0.22.65 → 0.22.66
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/lib/Form.js +5 -7
- package/lib/rules/FunctionRuntime.js +1 -1
- package/package.json +2 -2
package/lib/Form.js
CHANGED
|
@@ -82,14 +82,13 @@ class Form extends Container_1.default {
|
|
|
82
82
|
return submitMetaInstance;
|
|
83
83
|
}
|
|
84
84
|
setFocus(field, focusOption) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if (focusOption && parent !== null) {
|
|
85
|
+
if (focusOption) {
|
|
86
|
+
const parent = ((field === null || field === void 0 ? void 0 : field.isContainer) ? field : field.parent);
|
|
88
87
|
const navigableChidren = __classPrivateFieldGet(this, _Form_instances, "m", _Form_getNavigableChildren).call(this, parent.items);
|
|
89
88
|
let activeChild = parent.activeChild;
|
|
90
89
|
let currActiveChildIndex = activeChild !== null ? navigableChidren.indexOf(activeChild) : -1;
|
|
91
90
|
if (parent.activeChild === null) {
|
|
92
|
-
|
|
91
|
+
__classPrivateFieldGet(this, _Form_instances, "m", _Form_setActiveFirstDeepChild).call(this, navigableChidren[0]);
|
|
93
92
|
currActiveChildIndex = 0;
|
|
94
93
|
return;
|
|
95
94
|
}
|
|
@@ -104,9 +103,8 @@ class Form extends Container_1.default {
|
|
|
104
103
|
}
|
|
105
104
|
}
|
|
106
105
|
else {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
106
|
+
const parent = field.parent;
|
|
107
|
+
const currentField = field;
|
|
110
108
|
while (parent != null && parent.activeChild != currentField) {
|
|
111
109
|
parent.activeChild = currentField;
|
|
112
110
|
}
|
|
@@ -253,7 +253,7 @@ class FunctionRuntimeImpl {
|
|
|
253
253
|
interpreter.globals.form.setFocus(field, flag);
|
|
254
254
|
}
|
|
255
255
|
catch (e) {
|
|
256
|
-
interpreter.globals.form.logger.error('
|
|
256
|
+
interpreter.globals.form.logger.error('An error has occurred within the setFocus API.');
|
|
257
257
|
}
|
|
258
258
|
},
|
|
259
259
|
_signature: []
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.66",
|
|
4
4
|
"description": "Core Module for Forms Runtime",
|
|
5
5
|
"author": "Adobe Systems",
|
|
6
6
|
"license": "Adobe Proprietary",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@adobe/json-formula": "0.1.50",
|
|
38
|
-
"@aemforms/af-formatters": "^0.22.
|
|
38
|
+
"@aemforms/af-formatters": "^0.22.66"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/preset-env": "^7.20.2",
|