@applicaster/zapp-react-native-utils 13.0.0-alpha.8532113155 → 13.0.0-alpha.8620112557

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.
@@ -77,12 +77,6 @@ export class ClosedCaptioningManager {
77
77
 
78
78
  private constructor() {
79
79
  this.initialize();
80
-
81
- window["vizioDebug"] = {
82
- setCCEnabled: (isCCEnabled: boolean) => {
83
- this.ccState$.next(isCCEnabled);
84
- },
85
- };
86
80
  }
87
81
 
88
82
  static getInstance(): ClosedCaptioningManager {
@@ -227,7 +227,14 @@ class FocusManager {
227
227
 
228
228
  const nextNextFocus = FocusManager.getNextFocusable(direction, nextFocus);
229
229
 
230
- FocusManager.instance.setFocus(nextNextFocus, options);
230
+ if (!nextNextFocus) {
231
+ const nextNextFocusForParent =
232
+ FocusManager.instance.getNextFocusableForParent(direction, nextFocus);
233
+
234
+ FocusManager.instance.setFocus(nextNextFocusForParent, options);
235
+ } else {
236
+ FocusManager.instance.setFocus(nextNextFocus, options);
237
+ }
231
238
  } else {
232
239
  FocusManager.instance.setFocusLocal(nextFocus);
233
240
 
@@ -307,9 +314,26 @@ class FocusManager {
307
314
  return FocusManager.getNextFocusable(direction);
308
315
  }
309
316
 
310
- getNextFocusableForParent(direction) {
317
+ getNextFocusableForParent(
318
+ direction,
319
+ focusable?: FocusManager.TouchableReactRef
320
+ ) {
321
+ const focusableId = focusable
322
+ ? getFocusableId(focusable)
323
+ : FocusManager.instance.focusedId;
324
+
311
325
  const focusDirection = toFocusDirection(direction);
312
- const parentNode = this.tree.findParent(FocusManager.instance.focusedId);
326
+ const parentNode = this.tree.findParent(focusableId);
327
+
328
+ const parentNodeParent = this.tree.findParent(parentNode?.id);
329
+
330
+ const hasNextFocusable = this.tree.find(
331
+ parentNode?.component?.current?.props[focusDirection]
332
+ );
333
+
334
+ if (!hasNextFocusable) {
335
+ return parentNodeParent?.component?.current?.props[focusDirection];
336
+ }
313
337
 
314
338
  return parentNode?.component?.current?.props[focusDirection];
315
339
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "13.0.0-alpha.8532113155",
3
+ "version": "13.0.0-alpha.8620112557",
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.8532113155",
31
+ "@applicaster/applicaster-types": "13.0.0-alpha.8620112557",
32
32
  "buffer": "^5.2.1",
33
33
  "camelize": "^1.0.0",
34
34
  "create-react-context": "^0.2.3",