@applicaster/zapp-react-native-utils 13.0.0-alpha.1839726411 → 13.0.0-alpha.2178537102

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.
@@ -9,3 +9,5 @@ export const WILL_LOSE_FOCUS = "willLoseFocus";
9
9
  export const BLUR = "blur";
10
10
 
11
11
  export const HAS_LOST_FOCUS = "hasLostFocus";
12
+
13
+ export const GROUP_FOCUS_CHANGED = "onGroupFocusChanged";
@@ -264,6 +264,10 @@ export const focusManager = (function () {
264
264
  focusableItem.willReceiveFocus(focusableItem, null);
265
265
  focusableItem && setFocus(focusCandidate.id, null);
266
266
 
267
+ currentFocusNode?.parent?.component?.onGroupFocusChanged(
268
+ currentFocusNode?.component
269
+ );
270
+
267
271
  return { success: true };
268
272
  }
269
273
 
@@ -459,6 +463,12 @@ export const focusManager = (function () {
459
463
  nextFocusable.component.props.groupId !==
460
464
  currentFocusNode?.component?.props?.groupId;
461
465
 
466
+ if (groupChanged) {
467
+ nextFocusable?.parent?.component?.onGroupFocusChanged(
468
+ nextFocusable.component
469
+ );
470
+ }
471
+
462
472
  setFocus(nextFocusable.id, direction, {
463
473
  groupFocusedChanged: groupChanged,
464
474
  });
@@ -509,6 +519,13 @@ export const focusManager = (function () {
509
519
  }
510
520
  });
511
521
 
522
+ on(FOCUS_EVENTS.GROUP_FOCUS_CHANGED, (focusable) => {
523
+ if (focusable.props.groupId) {
524
+ const parent = focusableTree.findInTree(focusable.props.groupId);
525
+ parent?.component?.onGroupFocusChanged(focusable);
526
+ }
527
+ });
528
+
512
529
  /**
513
530
  * this is the list of the functions available externally
514
531
  * when importing the focus manager
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "13.0.0-alpha.1839726411",
3
+ "version": "13.0.0-alpha.2178537102",
4
4
  "description": "Applicaster Zapp React Native utilities package",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
30
30
  "dependencies": {
31
- "@applicaster/applicaster-types": "13.0.0-alpha.1839726411",
31
+ "@applicaster/applicaster-types": "13.0.0-alpha.2178537102",
32
32
  "buffer": "^5.2.1",
33
33
  "camelize": "^1.0.0",
34
34
  "create-react-context": "^0.2.3",