@applicaster/zapp-react-native-ui-components 13.0.12 → 13.0.13-alpha.8439062500
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.
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`<Screen Component /> when the navbar should be hidden renders correctly 1`] = `
|
|
4
4
|
<View
|
|
5
|
+
importantForAccessibility="yes"
|
|
5
6
|
style={
|
|
6
7
|
{
|
|
7
8
|
"backgroundColor": "blue",
|
|
@@ -34,6 +35,7 @@ exports[`<Screen Component /> when the navbar should be hidden renders correctly
|
|
|
34
35
|
|
|
35
36
|
exports[`<Screen Component /> when the navbar should show renders correctly 1`] = `
|
|
36
37
|
<View
|
|
38
|
+
importantForAccessibility="yes"
|
|
37
39
|
style={
|
|
38
40
|
{
|
|
39
41
|
"backgroundColor": "blue",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="@applicaster/applicaster-types" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { View } from "react-native";
|
|
3
|
+
import { AccessibilityInfo, findNodeHandle, View } from "react-native";
|
|
4
4
|
import { usePickFromState } from "@applicaster/zapp-react-native-redux/hooks";
|
|
5
5
|
|
|
6
6
|
import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
|
|
@@ -89,13 +89,29 @@ export function Screen(_props: Props) {
|
|
|
89
89
|
[theme.app_background_color, backgroundColor]
|
|
90
90
|
);
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
const isActive = navigation.currentRoute === pathname;
|
|
93
|
+
|
|
94
|
+
const ref = React.useRef(null);
|
|
93
95
|
const isReady = useWaitForValidOrientation();
|
|
94
96
|
|
|
97
|
+
React.useEffect(() => {
|
|
98
|
+
if (ref.current && isActive && isReady) {
|
|
99
|
+
AccessibilityInfo.setAccessibilityFocus(
|
|
100
|
+
findNodeHandle(ref.current) as number
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
}, [isActive]);
|
|
104
|
+
|
|
105
|
+
// Set ready state when screen is rotated to desired orientation
|
|
106
|
+
|
|
95
107
|
// We prevent rendering of the screen until UI is actually rotated to screen desired orientation.
|
|
96
108
|
// This saves unnecessary re-renders and user will not see distorted aspect screen.
|
|
97
109
|
return (
|
|
98
|
-
<View
|
|
110
|
+
<View
|
|
111
|
+
ref={ref}
|
|
112
|
+
style={style}
|
|
113
|
+
importantForAccessibility={!isActive ? "no-hide-descendants" : "yes"}
|
|
114
|
+
>
|
|
99
115
|
{isReady ? (
|
|
100
116
|
<>
|
|
101
117
|
{navBarProps ? <NavBar {...navBarProps} hasMenu={hasMenu} /> : null}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.13-alpha.8439062500",
|
|
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.
|
|
35
|
-
"@applicaster/zapp-react-native-bridge": "13.0.
|
|
36
|
-
"@applicaster/zapp-react-native-redux": "13.0.
|
|
37
|
-
"@applicaster/zapp-react-native-utils": "13.0.
|
|
34
|
+
"@applicaster/applicaster-types": "13.0.13-alpha.8439062500",
|
|
35
|
+
"@applicaster/zapp-react-native-bridge": "13.0.13-alpha.8439062500",
|
|
36
|
+
"@applicaster/zapp-react-native-redux": "13.0.13-alpha.8439062500",
|
|
37
|
+
"@applicaster/zapp-react-native-utils": "13.0.13-alpha.8439062500",
|
|
38
38
|
"promise": "^8.3.0",
|
|
39
39
|
"react-router-native": "^5.1.2",
|
|
40
40
|
"url": "^0.11.0",
|