@applicaster/zapp-react-native-ui-components 15.0.0-rc.54 → 15.0.0-rc.55

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>
@@ -80,6 +80,7 @@ type Props = {
80
80
  componentsMapOffset: number;
81
81
  applyFocusableWrapper: boolean;
82
82
  hasFocusableInside: boolean;
83
+ skipFocusManagerRegistration?: boolean;
83
84
  };
84
85
 
85
86
  type State = {
@@ -266,6 +267,7 @@ class TvOSCell extends React.Component<Props, State> {
266
267
  behavior,
267
268
  applyFocusableWrapper,
268
269
  hasFocusableInside,
270
+ skipFocusManagerRegistration,
269
271
  } = this.props;
270
272
 
271
273
  const { id } = item;
@@ -291,6 +293,7 @@ class TvOSCell extends React.Component<Props, State> {
291
293
  onFocus={handleFocus}
292
294
  onBlur={onBlur || this.onBlur}
293
295
  applyWrapper={applyFocusableWrapper}
296
+ skipFocusManagerRegistration={skipFocusManagerRegistration}
294
297
  >
295
298
  {(focused) => (
296
299
  <CellWithFocusable
@@ -305,6 +308,7 @@ class TvOSCell extends React.Component<Props, State> {
305
308
  focused={focused || this.props.focused}
306
309
  behavior={behavior}
307
310
  isFocusable={isFocusable}
311
+ skipFocusManagerRegistration={skipFocusManagerRegistration}
308
312
  />
309
313
  )}
310
314
  </FocusableWrapper>
@@ -327,6 +331,7 @@ class TvOSCell extends React.Component<Props, State> {
327
331
  offsetUpdater={offsetUpdater}
328
332
  style={baseCellStyles}
329
333
  isFocusable={isFocusable}
334
+ skipFocusManagerRegistration={skipFocusManagerRegistration}
330
335
  >
331
336
  {(focused) => (
332
337
  <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,8 @@ type Props = {
34
34
  };
35
35
 
36
36
  export class FocusableGroup extends BaseFocusable<Props> {
37
+ public readonly isGroup: boolean = true;
38
+
37
39
  render() {
38
40
  const {
39
41
  children,
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.54",
3
+ "version": "15.0.0-rc.55",
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.54",
32
- "@applicaster/zapp-react-native-bridge": "15.0.0-rc.54",
33
- "@applicaster/zapp-react-native-redux": "15.0.0-rc.54",
34
- "@applicaster/zapp-react-native-utils": "15.0.0-rc.54",
31
+ "@applicaster/applicaster-types": "15.0.0-rc.55",
32
+ "@applicaster/zapp-react-native-bridge": "15.0.0-rc.55",
33
+ "@applicaster/zapp-react-native-redux": "15.0.0-rc.55",
34
+ "@applicaster/zapp-react-native-utils": "15.0.0-rc.55",
35
35
  "fast-json-stable-stringify": "^2.1.0",
36
36
  "promise": "^8.3.0",
37
37
  "url": "^0.11.0",