@applicaster/zapp-react-native-ui-components 13.0.21-rc.0 → 13.0.21

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.
@@ -22,6 +22,7 @@ type Props = {
22
22
  onFocus?: FocusManager.FocusEventCB;
23
23
  onBlur?: FocusManager.FocusEventCB;
24
24
  selected?: boolean;
25
+ skipFocusManagerRegistration?: boolean;
25
26
  };
26
27
 
27
28
  export class BaseFocusable<
@@ -61,10 +62,14 @@ export class BaseFocusable<
61
62
  }
62
63
 
63
64
  componentDidMount() {
64
- const { id } = this.props;
65
+ const { id, skipFocusManagerRegistration } = this.props;
65
66
  const component = this;
66
67
  this.node = this.ref.current;
67
68
 
69
+ if (skipFocusManagerRegistration) {
70
+ return;
71
+ }
72
+
68
73
  focusManager.register({
69
74
  id,
70
75
  component: component,
@@ -118,7 +123,12 @@ export class BaseFocusable<
118
123
 
119
124
  componentWillUnmount() {
120
125
  this._isMounted = false;
121
- const { id } = this.props;
126
+ const { id, skipFocusManagerRegistration } = this.props;
127
+
128
+ if (skipFocusManagerRegistration) {
129
+ return;
130
+ }
131
+
122
132
  focusManager.unregister(id, { group: this.isGroup || false });
123
133
  }
124
134
 
@@ -10,6 +10,7 @@ type Props = {
10
10
  children: (focused: boolean) => React.ReactNode;
11
11
  onFocus: (arg1: any, index?: number) => void;
12
12
  onBlur: Callback;
13
+ skipFocusManagerRegistration?: boolean;
13
14
  };
14
15
 
15
16
  export const FocusableWrapper = ({
@@ -20,6 +21,7 @@ export const FocusableWrapper = ({
20
21
  applyWrapper,
21
22
  onFocus,
22
23
  onBlur,
24
+ skipFocusManagerRegistration,
23
25
  }: Props) => {
24
26
  if (applyWrapper) {
25
27
  return (
@@ -34,6 +36,7 @@ export const FocusableWrapper = ({
34
36
  // @ts-ignore
35
37
  offsetUpdater={noop}
36
38
  isFocusable
39
+ skipFocusManagerRegistration={skipFocusManagerRegistration}
37
40
  >
38
41
  {(focused) => children(focused)}
39
42
  </Focusable>
@@ -75,6 +75,7 @@ type Props = {
75
75
  componentsMapOffset: number;
76
76
  applyFocusableWrapper: boolean;
77
77
  hasFocusableInside: boolean;
78
+ skipFocusManagerRegistration?: boolean;
78
79
  };
79
80
 
80
81
  type State = {
@@ -250,6 +251,7 @@ class TvOSCell extends React.Component<Props, State> {
250
251
  behavior,
251
252
  applyFocusableWrapper,
252
253
  hasFocusableInside,
254
+ skipFocusManagerRegistration,
253
255
  } = this.props;
254
256
 
255
257
  const { id } = item;
@@ -275,6 +277,7 @@ class TvOSCell extends React.Component<Props, State> {
275
277
  onFocus={handleFocus}
276
278
  onBlur={onBlur || this.onBlur}
277
279
  applyWrapper={applyFocusableWrapper}
280
+ skipFocusManagerRegistration={skipFocusManagerRegistration}
278
281
  >
279
282
  {(focused) => (
280
283
  <CellWithFocusable
@@ -289,6 +292,7 @@ class TvOSCell extends React.Component<Props, State> {
289
292
  focused={focused || this.props.focused}
290
293
  behavior={behavior}
291
294
  isFocusable={isFocusable}
295
+ skipFocusManagerRegistration={skipFocusManagerRegistration}
292
296
  />
293
297
  )}
294
298
  </FocusableWrapper>
@@ -311,6 +315,7 @@ class TvOSCell extends React.Component<Props, State> {
311
315
  offsetUpdater={offsetUpdater}
312
316
  style={baseCellStyles}
313
317
  isFocusable={isFocusable}
318
+ skipFocusManagerRegistration={skipFocusManagerRegistration}
314
319
  >
315
320
  {(focused) => (
316
321
  <FocusableCell
@@ -39,6 +39,7 @@ type Props = {
39
39
  hasReceivedFocus: () => void;
40
40
  offsetUpdater: (arg1: string, arg2: number) => number;
41
41
  style: ViewStyle;
42
+ skipFocusManagerRegistration?: boolean;
42
43
  };
43
44
 
44
45
  export class Focusable extends BaseFocusable<Props> {
@@ -34,6 +34,11 @@ type Props = {
34
34
  };
35
35
 
36
36
  export class FocusableGroup extends BaseFocusable<Props> {
37
+ constructor(props: Props) {
38
+ super(props);
39
+ this.isGroup = true;
40
+ }
41
+
37
42
  render() {
38
43
  const {
39
44
  children,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "13.0.21-rc.0",
3
+ "version": "13.0.21",
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",
@@ -31,10 +31,10 @@
31
31
  "redux-mock-store": "^1.5.3"
32
32
  },
33
33
  "dependencies": {
34
- "@applicaster/applicaster-types": "13.0.21-rc.0",
35
- "@applicaster/zapp-react-native-bridge": "13.0.21-rc.0",
36
- "@applicaster/zapp-react-native-redux": "13.0.21-rc.0",
37
- "@applicaster/zapp-react-native-utils": "13.0.21-rc.0",
34
+ "@applicaster/applicaster-types": "13.0.21",
35
+ "@applicaster/zapp-react-native-bridge": "13.0.21",
36
+ "@applicaster/zapp-react-native-redux": "13.0.21",
37
+ "@applicaster/zapp-react-native-utils": "13.0.21",
38
38
  "promise": "^8.3.0",
39
39
  "react-router-native": "^5.1.2",
40
40
  "url": "^0.11.0",