@applicaster/zapp-react-native-utils 15.0.0-rc.106 → 15.0.0-rc.108

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.
@@ -106,9 +106,8 @@ const focusableNativeViewRegistration = ({ focusableView, focusableGroup }) => {
106
106
  );
107
107
  };
108
108
 
109
- export const firstFocusableViewRegistrationFactory = () =>
109
+ export const firstFocusableViewInContentRegistrationFactory = () =>
110
110
  focusableViewRegistrationSubject$.pipe(
111
- take(1), // we care about only first FocusableView registration
112
111
  switchMap((focusableView) =>
113
112
  // start waiting registration of its parent FocusableGroup
114
113
  focusableGroupRegistrationSubject$.pipe(
@@ -126,7 +125,11 @@ export const firstFocusableViewRegistrationFactory = () =>
126
125
  focusableView,
127
126
  focusableGroup,
128
127
  })
129
- )
128
+ ),
129
+ filter(({ focusableView }) =>
130
+ isPartOfContent(focusManager.focusableTree, focusableView.id)
131
+ ),
132
+ take(1) // we care about only first FocusableView registration
130
133
  );
131
134
 
132
135
  // registration on RN level(into RN focusManager)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "15.0.0-rc.106",
3
+ "version": "15.0.0-rc.108",
4
4
  "description": "Applicaster Zapp React Native utilities package",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/applicaster/quickbrick#readme",
29
29
  "dependencies": {
30
- "@applicaster/applicaster-types": "15.0.0-rc.106",
30
+ "@applicaster/applicaster-types": "15.0.0-rc.108",
31
31
  "buffer": "^5.2.1",
32
32
  "camelize": "^1.0.0",
33
33
  "dayjs": "^1.11.10",
@@ -31,3 +31,10 @@ test("example 4", () => {
31
31
 
32
32
  expect(path(route, xs)).toBeUndefined();
33
33
  });
34
+
35
+ test("example 5", () => {
36
+ const route = ["a", "b", 0];
37
+ const xs = { a: { b: [1, 2, 3] } };
38
+
39
+ expect(path(route, xs)).toBe(1);
40
+ });