@applicaster/zapp-react-native-ui-components 13.0.0-alpha.7210171818 → 13.0.0-alpha.8263121071
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.
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { FocusableGroupContext } from "./FocusableGroupContext";
|
|
3
3
|
|
|
4
4
|
export const withFocusableContext = (Component) => {
|
|
5
5
|
// eslint-disable-next-line react/display-name
|
|
6
|
-
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
const WithFocusableContext = (
|
|
7
|
+
{ groupId, ...props }: Record<string, any>,
|
|
8
|
+
ref
|
|
9
|
+
) => {
|
|
10
|
+
return (
|
|
11
|
+
<FocusableGroupContext.Consumer>
|
|
12
|
+
{(groupIdContext: string) => {
|
|
13
|
+
// eslint-disable-next-line react/display-name
|
|
14
|
+
const propsGroupId = groupId || null;
|
|
15
|
+
const providedGroupId = propsGroupId || groupIdContext;
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
return <Component {...props} groupId={providedGroupId} ref={ref} />;
|
|
18
|
+
}}
|
|
19
|
+
</FocusableGroupContext.Consumer>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return React.forwardRef(WithFocusableContext);
|
|
17
24
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "13.0.0-alpha.
|
|
3
|
+
"version": "13.0.0-alpha.8263121071",
|
|
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",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"redux-mock-store": "^1.5.3"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@applicaster/applicaster-types": "13.0.0-alpha.
|
|
38
|
-
"@applicaster/zapp-react-native-bridge": "13.0.0-alpha.
|
|
39
|
-
"@applicaster/zapp-react-native-redux": "13.0.0-alpha.
|
|
40
|
-
"@applicaster/zapp-react-native-utils": "13.0.0-alpha.
|
|
37
|
+
"@applicaster/applicaster-types": "13.0.0-alpha.8263121071",
|
|
38
|
+
"@applicaster/zapp-react-native-bridge": "13.0.0-alpha.8263121071",
|
|
39
|
+
"@applicaster/zapp-react-native-redux": "13.0.0-alpha.8263121071",
|
|
40
|
+
"@applicaster/zapp-react-native-utils": "13.0.0-alpha.8263121071",
|
|
41
41
|
"promise": "^8.3.0",
|
|
42
42
|
"react-router-native": "^5.1.2",
|
|
43
43
|
"url": "^0.11.0",
|