@aemforms/af-core 0.22.134 → 0.22.135
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 -8
- package/lib/Form.js +10 -8
- package/package.json +2 -2
package/esm/afb-runtime.js
CHANGED
|
@@ -3638,22 +3638,24 @@ class Form extends Container {
|
|
|
3638
3638
|
return children.filter(child => child.visible === true);
|
|
3639
3639
|
}
|
|
3640
3640
|
#getFirstNavigableChild(container) {
|
|
3641
|
-
const
|
|
3642
|
-
if (
|
|
3643
|
-
return
|
|
3641
|
+
const navigableChildren = this.#getNavigableChildren(container.items);
|
|
3642
|
+
if (navigableChildren && navigableChildren.length > 0) {
|
|
3643
|
+
return navigableChildren[0];
|
|
3644
3644
|
}
|
|
3645
3645
|
return null;
|
|
3646
3646
|
}
|
|
3647
3647
|
#setActiveFirstDeepChild(currentField) {
|
|
3648
3648
|
if (!currentField.isContainer) {
|
|
3649
|
-
|
|
3650
|
-
parent.activeChild = currentField;
|
|
3649
|
+
currentField.parent.activeChild = currentField;
|
|
3651
3650
|
return;
|
|
3652
3651
|
}
|
|
3653
3652
|
this.#clearCurrentFocus(currentField);
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3653
|
+
const activeChild = currentField.activeChild || this.#getFirstNavigableChild(currentField);
|
|
3654
|
+
if (activeChild === null) {
|
|
3655
|
+
currentField.parent.activeChild = currentField;
|
|
3656
|
+
return;
|
|
3657
|
+
}
|
|
3658
|
+
this.#setActiveFirstDeepChild(activeChild);
|
|
3657
3659
|
}
|
|
3658
3660
|
#getNextItem(currIndex, navigableChidren) {
|
|
3659
3661
|
if (currIndex < (navigableChidren.length - 1)) {
|
package/lib/Form.js
CHANGED
|
@@ -401,21 +401,23 @@ class Form extends Container_1.default {
|
|
|
401
401
|
_Form_instances = new WeakSet(), _Form_getNavigableChildren = function _Form_getNavigableChildren(children) {
|
|
402
402
|
return children.filter(child => child.visible === true);
|
|
403
403
|
}, _Form_getFirstNavigableChild = function _Form_getFirstNavigableChild(container) {
|
|
404
|
-
const
|
|
405
|
-
if (
|
|
406
|
-
return
|
|
404
|
+
const navigableChildren = __classPrivateFieldGet(this, _Form_instances, "m", _Form_getNavigableChildren).call(this, container.items);
|
|
405
|
+
if (navigableChildren && navigableChildren.length > 0) {
|
|
406
|
+
return navigableChildren[0];
|
|
407
407
|
}
|
|
408
408
|
return null;
|
|
409
409
|
}, _Form_setActiveFirstDeepChild = function _Form_setActiveFirstDeepChild(currentField) {
|
|
410
410
|
if (!currentField.isContainer) {
|
|
411
|
-
|
|
412
|
-
parent.activeChild = currentField;
|
|
411
|
+
currentField.parent.activeChild = currentField;
|
|
413
412
|
return;
|
|
414
413
|
}
|
|
415
414
|
__classPrivateFieldGet(this, _Form_instances, "m", _Form_clearCurrentFocus).call(this, currentField);
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
415
|
+
const activeChild = currentField.activeChild || __classPrivateFieldGet(this, _Form_instances, "m", _Form_getFirstNavigableChild).call(this, currentField);
|
|
416
|
+
if (activeChild === null) {
|
|
417
|
+
currentField.parent.activeChild = currentField;
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
__classPrivateFieldGet(this, _Form_instances, "m", _Form_setActiveFirstDeepChild).call(this, activeChild);
|
|
419
421
|
}, _Form_getNextItem = function _Form_getNextItem(currIndex, navigableChidren) {
|
|
420
422
|
if (currIndex < (navigableChidren.length - 1)) {
|
|
421
423
|
return navigableChidren[currIndex + 1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.135",
|
|
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.135"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/preset-env": "^7.20.2",
|