@applicaster/zapp-react-native-app 12.0.0-alpha.5035843303 → 12.0.0-alpha.5053228432
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.
- package/App/InteractionManager/index.js +2 -2
- package/App/Layout/index.tsx +28 -46
- package/package.json +8 -8
- package/tsconfig.json +11 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "@applicaster/zapp-react-native-bridge/QuickBrick";
|
|
9
9
|
import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/navigation";
|
|
10
10
|
import { useAnalytics } from "@applicaster/zapp-react-native-utils/analyticsUtils";
|
|
11
|
-
import {
|
|
11
|
+
import { useRivers } from "@applicaster/zapp-react-native-utils/reactHooks/state";
|
|
12
12
|
|
|
13
13
|
type Props = {
|
|
14
14
|
children: React.CElement,
|
|
@@ -19,7 +19,7 @@ const getHome = R.compose(R.find(R.propEq("home", true)), R.values);
|
|
|
19
19
|
const InteractionManagerComponent = (props: Props) => {
|
|
20
20
|
const { children } = props;
|
|
21
21
|
const { sendHardwareBackButtonClickEvent } = useAnalytics();
|
|
22
|
-
const
|
|
22
|
+
const rivers = useRivers();
|
|
23
23
|
const navigator = useNavigation();
|
|
24
24
|
|
|
25
25
|
const isHomeScreen = () => {
|
package/App/Layout/index.tsx
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
useGetBottomTabBarHeight,
|
|
9
9
|
useNavigation,
|
|
10
10
|
useDimensions,
|
|
11
|
-
|
|
11
|
+
useNavbarState,
|
|
12
12
|
} from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
13
13
|
import { Transitioner } from "@applicaster/zapp-react-native-ui-components/Components/Transitioner";
|
|
14
14
|
import { transitionConfig } from "@applicaster/zapp-react-native-ui-components/Components/Transitioner/config";
|
|
@@ -25,9 +25,12 @@ import { VideoModal } from "@applicaster/zapp-react-native-ui-components/Compone
|
|
|
25
25
|
import { withDimensionsProvider } from "@applicaster/zapp-react-native-utils/dimensionsProvider";
|
|
26
26
|
|
|
27
27
|
import { ZappHooksModal } from "@applicaster/zapp-react-dom-ui-components/Components/ZappHooksModal";
|
|
28
|
-
import { useNavbarState } from "@applicaster/zapp-react-native-utils/reactHooks/screen/useScreenContext";
|
|
29
28
|
import { useListenEventBusEvent } from "@applicaster/zapp-react-native-utils/reactHooks/useListenEventBusEvent";
|
|
30
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
PushTopicManager,
|
|
31
|
+
PushTopicManagerConsts,
|
|
32
|
+
PushTopicManagerEvents,
|
|
33
|
+
} from "@applicaster/zapp-react-native-bridge/PushNotifications/PushTopicManager";
|
|
31
34
|
|
|
32
35
|
type Props = {
|
|
33
36
|
children: React.ReactNode;
|
|
@@ -61,29 +64,19 @@ const LayoutWithMenu = (props: Props) => {
|
|
|
61
64
|
|
|
62
65
|
const dimensions = useDimensions("screen", { fullDimensions: true });
|
|
63
66
|
const isRTL = useIsRTL();
|
|
64
|
-
|
|
65
67
|
const navigator = useNavigation();
|
|
66
68
|
const bottomTabBarHeight = useGetBottomTabBarHeight();
|
|
67
|
-
|
|
68
|
-
const {
|
|
69
|
-
activeRiver,
|
|
70
|
-
currentRoute,
|
|
71
|
-
screenData,
|
|
72
|
-
videoModalState,
|
|
73
|
-
isVideoModalDocked,
|
|
74
|
-
videoModalState: { visible },
|
|
75
|
-
} = navigator;
|
|
76
|
-
|
|
77
|
-
const isNavBarVisible = useIsNavBarVisible();
|
|
78
69
|
const { title } = useNavbarState();
|
|
79
70
|
|
|
80
|
-
const
|
|
81
|
-
() => getNavigationPluginModule("nav_bar", activeRiver, plugins),
|
|
82
|
-
[]
|
|
83
|
-
);
|
|
71
|
+
const { activeRiver, videoModalState, isVideoModalDocked } = navigator;
|
|
84
72
|
|
|
85
73
|
const Menu = React.useMemo(
|
|
86
|
-
() =>
|
|
74
|
+
() =>
|
|
75
|
+
getNavigationPluginModule(
|
|
76
|
+
"menu",
|
|
77
|
+
activeRiver,
|
|
78
|
+
plugins
|
|
79
|
+
) as React.ComponentType<MobileNavBarPluginProps>,
|
|
87
80
|
[]
|
|
88
81
|
);
|
|
89
82
|
|
|
@@ -96,8 +89,8 @@ const LayoutWithMenu = (props: Props) => {
|
|
|
96
89
|
() => ({
|
|
97
90
|
...(showMenu
|
|
98
91
|
? {
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
paddingBottom: bottomTabBarHeight,
|
|
93
|
+
}
|
|
101
94
|
: {}),
|
|
102
95
|
...containerStyle,
|
|
103
96
|
opacity: videoModalState.visible && !isVideoModalDocked ? 0 : 1,
|
|
@@ -105,20 +98,6 @@ const LayoutWithMenu = (props: Props) => {
|
|
|
105
98
|
[bottomTabBarHeight, videoModalState.visible, isVideoModalDocked, showMenu]
|
|
106
99
|
);
|
|
107
100
|
|
|
108
|
-
const navBarProps = React.useMemo(
|
|
109
|
-
() => ({
|
|
110
|
-
setToggleMenu,
|
|
111
|
-
toggleMenu,
|
|
112
|
-
openMenu,
|
|
113
|
-
setOpenMenu,
|
|
114
|
-
closeMenu,
|
|
115
|
-
setCloseMenu,
|
|
116
|
-
navigator,
|
|
117
|
-
...getNavigationProps({ navigator, title, category: "nav_bar" }),
|
|
118
|
-
}),
|
|
119
|
-
[navigator.currentRoute]
|
|
120
|
-
);
|
|
121
|
-
|
|
122
101
|
const menuProps = {
|
|
123
102
|
setToggleMenu: setToggleMenu,
|
|
124
103
|
toggleMenu: toggleMenu,
|
|
@@ -127,7 +106,7 @@ const LayoutWithMenu = (props: Props) => {
|
|
|
127
106
|
closeMenu: closeMenu,
|
|
128
107
|
setCloseMenu: setCloseMenu,
|
|
129
108
|
dimensions: { window: dimensions },
|
|
130
|
-
navigator
|
|
109
|
+
navigator,
|
|
131
110
|
...getNavigationProps({
|
|
132
111
|
navigator,
|
|
133
112
|
title,
|
|
@@ -144,6 +123,11 @@ const LayoutWithMenu = (props: Props) => {
|
|
|
144
123
|
PushTopicManager.getInstance().routeEvent
|
|
145
124
|
);
|
|
146
125
|
|
|
126
|
+
React.useEffect(() => {
|
|
127
|
+
// getting tags right after subscription
|
|
128
|
+
PushTopicManager.getInstance().prepareTags();
|
|
129
|
+
}, []);
|
|
130
|
+
|
|
147
131
|
return (
|
|
148
132
|
<>
|
|
149
133
|
{appReady ? (
|
|
@@ -153,22 +137,20 @@ const LayoutWithMenu = (props: Props) => {
|
|
|
153
137
|
contentStyle={showMenu ? contentStyle : {}}
|
|
154
138
|
isRTL={isRTL}
|
|
155
139
|
>
|
|
140
|
+
{/* has pathname context */}
|
|
156
141
|
<Screen
|
|
157
142
|
key={navigator.currentRoute}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
pathname={currentRoute}
|
|
163
|
-
screenData={screenData}
|
|
164
|
-
isNavBarVisible={isNavBarVisible}
|
|
143
|
+
pathname={navigator.currentRoute} // required by TransitionerComponent
|
|
144
|
+
screenData={navigator.screenData} // required by TransitionerComponent
|
|
145
|
+
setToggleMenu={setToggleMenu}
|
|
146
|
+
setCloseMenu={setCloseMenu}
|
|
165
147
|
/>
|
|
166
148
|
</Transitioner>
|
|
167
149
|
</View>
|
|
168
150
|
) : null}
|
|
169
151
|
{showMenu && <Menu {...menuProps} />}
|
|
170
|
-
{
|
|
171
|
-
|
|
152
|
+
{/* depends on active river. @TODO move below screen context */}
|
|
153
|
+
{VideoModal && videoModalState.visible && <VideoModal />}
|
|
172
154
|
<ZappHooksModal />
|
|
173
155
|
</>
|
|
174
156
|
);
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-app",
|
|
3
|
-
"version": "12.0.0-alpha.
|
|
3
|
+
"version": "12.0.0-alpha.5053228432",
|
|
4
4
|
"description": "Zapp App Component for Applicaster's Quick Brick React Native App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "jest -w=2",
|
|
8
|
+
"build": "echo 'skipping ts build for core packages'",
|
|
8
9
|
"flow-types": "node_modules/.bin/flow-copy-source -v -i '**/__tests__**' . ."
|
|
9
10
|
},
|
|
10
11
|
"repository": {
|
|
@@ -28,12 +29,12 @@
|
|
|
28
29
|
},
|
|
29
30
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"@applicaster/quick-brick-core": "12.0.0-alpha.
|
|
32
|
-
"@applicaster/zapp-react-native-bridge": "12.0.0-alpha.
|
|
33
|
-
"@applicaster/zapp-react-native-redux": "12.0.0-alpha.
|
|
34
|
-
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.
|
|
35
|
-
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.
|
|
36
|
-
"axios": "^0.
|
|
32
|
+
"@applicaster/quick-brick-core": "12.0.0-alpha.5053228432",
|
|
33
|
+
"@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5053228432",
|
|
34
|
+
"@applicaster/zapp-react-native-redux": "12.0.0-alpha.5053228432",
|
|
35
|
+
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5053228432",
|
|
36
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.5053228432",
|
|
37
|
+
"axios": "^0.28.0",
|
|
37
38
|
"camelize": "^1.0.0",
|
|
38
39
|
"query-string": "7.1.3",
|
|
39
40
|
"react-router-native": "5.1.2",
|
|
@@ -44,7 +45,6 @@
|
|
|
44
45
|
"react-native": "0.68.6"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@applicaster/zapp-react-native-flow-types": "1.5.0",
|
|
48
48
|
"nock": "^10.0.0",
|
|
49
49
|
"redux-mock-store": "^1.5.3"
|
|
50
50
|
},
|