@applicaster/zapp-react-native-ui-components 15.0.0-rc.56 → 15.0.0-rc.58

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.
@@ -10,8 +10,8 @@ import {
10
10
  forceFocusableFocus,
11
11
  } from "@applicaster/zapp-react-native-utils/appUtils/focusManager/index.ios";
12
12
  import { findNodeHandle, ViewStyle } from "react-native";
13
-
14
- function noop() {}
13
+ import { emitNativeRegistered } from "@applicaster/zapp-react-native-utils/appUtils/focusManagerAux/utils/utils.ios";
14
+ import { noop } from "@applicaster/zapp-react-native-utils/functionUtils";
15
15
 
16
16
  type Props = {
17
17
  id: string;
@@ -54,6 +54,7 @@ export class Focusable extends BaseFocusable<Props> {
54
54
  this.nextFocusableReactTags = {};
55
55
  this.preferredFocus = this.preferredFocus.bind(this);
56
56
  this.measureView = this.measureView.bind(this);
57
+ this.onRegistered = this.onRegistered.bind(this);
57
58
  }
58
59
 
59
60
  /**
@@ -170,6 +171,13 @@ export class Focusable extends BaseFocusable<Props> {
170
171
  });
171
172
  }
172
173
 
174
+ onRegistered({ nativeEvent }) {
175
+ const groupId = nativeEvent?.groupId;
176
+ const id = nativeEvent?.itemId;
177
+
178
+ emitNativeRegistered({ id, groupId, isGroup: false });
179
+ }
180
+
173
181
  render() {
174
182
  const {
175
183
  children,
@@ -204,6 +212,7 @@ export class Focusable extends BaseFocusable<Props> {
204
212
  focusable={isFocusable}
205
213
  {...this.nextFocusableReactTags}
206
214
  {...otherProps}
215
+ onRegistered={this.onRegistered}
207
216
  >
208
217
  {typeof children === "function" ? children(focused) : children}
209
218
  </FocusableItemNative>
@@ -5,6 +5,7 @@ exports[`FocusableTvOS should render correctly 1`] = `
5
5
  groupId={null}
6
6
  itemId={null}
7
7
  onLayout={[Function]}
8
+ onRegistered={[Function]}
8
9
  onViewBlur={[Function]}
9
10
  onViewFocus={[Function]}
10
11
  onViewPress={[Function]}
@@ -2,6 +2,7 @@ import * as React from "react";
2
2
  import { FocusableGroupNative } from "@applicaster/zapp-react-native-ui-components/Components/NativeFocusables";
3
3
  import { BaseFocusable } from "@applicaster/zapp-react-native-ui-components/Components/BaseFocusable";
4
4
  import { createLogger } from "@applicaster/zapp-react-native-utils/logger";
5
+ import { emitNativeRegistered } from "@applicaster/zapp-react-native-utils/appUtils/focusManagerAux/utils/utils.ios";
5
6
 
6
7
  const { log_verbose } = createLogger({
7
8
  subsystem: "General",
@@ -36,6 +37,13 @@ type Props = {
36
37
  export class FocusableGroup extends BaseFocusable<Props> {
37
38
  public readonly isGroup: boolean = true;
38
39
 
40
+ onRegistered = ({ nativeEvent }) => {
41
+ const groupId = nativeEvent?.groupId;
42
+ const id = nativeEvent?.itemId;
43
+
44
+ emitNativeRegistered({ id, groupId, isGroup: true });
45
+ };
46
+
39
47
  render() {
40
48
  const {
41
49
  children,
@@ -68,6 +76,7 @@ export class FocusableGroup extends BaseFocusable<Props> {
68
76
  onGroupBlur={onGroupBlur}
69
77
  style={style}
70
78
  {...otherProps}
79
+ onRegistered={this.onRegistered}
71
80
  >
72
81
  {children}
73
82
  </FocusableGroupNative>
@@ -35,6 +35,7 @@ type Feeds = Record<string, ZappPipesData>;
35
35
 
36
36
  type LayoutPresets = PresetsMapping["presets_mappings"];
37
37
 
38
+ const TABS_SCREEN_TYPE = "tabs_screen";
38
39
  const SMART_COMPONENT_TYPE = "quick-brick-smart-component";
39
40
  const SOURCE_PATH = ["data", "source"];
40
41
  const MAPPING_PATH = ["data", "mapping"];
@@ -131,10 +132,16 @@ export const useCurationAPI = (
131
132
  );
132
133
 
133
134
  const { pathname } = useRoute();
134
- const [entryContext] = ZappPipesEntryContext.useZappPipesContext(pathname);
135
135
  const [searchContext] = ZappPipesSearchContext.useZappPipesContext();
136
136
  const [screenContext] = ZappPipesScreenContext.useZappPipesContext();
137
137
 
138
+ const isNestedScreen = screenContext?.type === TABS_SCREEN_TYPE;
139
+
140
+ const [entryContext] = ZappPipesEntryContext.useZappPipesContext(
141
+ pathname,
142
+ isNestedScreen
143
+ );
144
+
138
145
  const urlsMap = useMemo<{ [key: string]: string }>(() => {
139
146
  const map = {};
140
147
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "15.0.0-rc.56",
3
+ "version": "15.0.0-rc.58",
4
4
  "description": "Applicaster Zapp React Native ui components for the Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
30
30
  "dependencies": {
31
- "@applicaster/applicaster-types": "15.0.0-rc.56",
32
- "@applicaster/zapp-react-native-bridge": "15.0.0-rc.56",
33
- "@applicaster/zapp-react-native-redux": "15.0.0-rc.56",
34
- "@applicaster/zapp-react-native-utils": "15.0.0-rc.56",
31
+ "@applicaster/applicaster-types": "15.0.0-rc.58",
32
+ "@applicaster/zapp-react-native-bridge": "15.0.0-rc.58",
33
+ "@applicaster/zapp-react-native-redux": "15.0.0-rc.58",
34
+ "@applicaster/zapp-react-native-utils": "15.0.0-rc.58",
35
35
  "fast-json-stable-stringify": "^2.1.0",
36
36
  "promise": "^8.3.0",
37
37
  "url": "^0.11.0",