@applicaster/quick-brick-core 12.0.0-alpha.5350212300 → 12.0.0-alpha.5400461972
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.
|
@@ -64,6 +64,8 @@ import { ZappPipesEntryContext } from "@applicaster/zapp-react-native-ui-compone
|
|
|
64
64
|
import { PlayNextState } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/OverlayObserver/OverlaysObserver";
|
|
65
65
|
import { inflateUrl } from "@applicaster/zapp-react-native-ui-components/Components/LinkHandler/LinkHandler";
|
|
66
66
|
import { useModalStore } from "@applicaster/zapp-react-native-utils/modalState";
|
|
67
|
+
import { useSubscriberFor } from "@applicaster/zapp-react-native-utils/reactHooks/useSubscriberFor";
|
|
68
|
+
import { QBUIComponentEvents } from "@applicaster/zapp-react-native-ui-components/events";
|
|
67
69
|
|
|
68
70
|
const logger = coreAppLogger.addSubsystem("Navigator");
|
|
69
71
|
|
|
@@ -130,6 +132,10 @@ export function NavigationProvider({ children }: Props) {
|
|
|
130
132
|
|
|
131
133
|
const online = useConnectionInfo(true);
|
|
132
134
|
|
|
135
|
+
const replaceEvent = useSubscriberFor(
|
|
136
|
+
QBUIComponentEvents.navigatorReplaceItem
|
|
137
|
+
);
|
|
138
|
+
|
|
133
139
|
React.useEffect(() => {
|
|
134
140
|
stateRef.current = state;
|
|
135
141
|
pathnameRef.current = pathname;
|
|
@@ -259,6 +265,7 @@ export function NavigationProvider({ children }: Props) {
|
|
|
259
265
|
item?.id !==
|
|
260
266
|
legacyScreenData(state?.location?.state as NavigationScreenData)?.id
|
|
261
267
|
) {
|
|
268
|
+
replaceEvent();
|
|
262
269
|
navigateTo(item, ACTIONS.REPLACE, options);
|
|
263
270
|
}
|
|
264
271
|
};
|
|
@@ -665,15 +672,15 @@ export function NavigationProvider({ children }: Props) {
|
|
|
665
672
|
|
|
666
673
|
// It will only work for the regular stack and pathname, It won't work for modals
|
|
667
674
|
// TODO: integrate video/hook and regular modal into stack.
|
|
668
|
-
const getStackForPathname = (
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
const stack = [...
|
|
675
|
+
const getStackForPathname = React.useCallback((pathname: string):
|
|
676
|
+
| NavigationScreenState
|
|
677
|
+
| undefined => {
|
|
678
|
+
const stack = [...stateRef?.current?.stack?.mainStack];
|
|
672
679
|
|
|
673
680
|
const currentStack = stack.find(({ route }) => route === pathname);
|
|
674
681
|
|
|
675
682
|
return currentStack;
|
|
676
|
-
};
|
|
683
|
+
}, []);
|
|
677
684
|
|
|
678
685
|
const navigator: QuickBrickAppNavigator = React.useMemo(
|
|
679
686
|
() => ({
|
|
@@ -717,7 +724,7 @@ export function NavigationProvider({ children }: Props) {
|
|
|
717
724
|
replaceTop,
|
|
718
725
|
getStack,
|
|
719
726
|
getStackForPathname,
|
|
720
|
-
mainStack: state
|
|
727
|
+
mainStack: state?.stack?.mainStack,
|
|
721
728
|
}),
|
|
722
729
|
[rivers, plugins, JSON.stringify(state), appLaunched, startUpHooks]
|
|
723
730
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-core",
|
|
3
|
-
"version": "12.0.0-alpha.
|
|
3
|
+
"version": "12.0.0-alpha.5400461972",
|
|
4
4
|
"description": "Core package for Applicaster's Quick Brick App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
},
|
|
31
31
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@applicaster/applicaster-types": "12.0.0-alpha.
|
|
34
|
-
"@applicaster/quick-brick-core-plugins": "12.0.0-alpha.
|
|
35
|
-
"@applicaster/zapp-pipes-v2-client": "12.0.0-alpha.
|
|
36
|
-
"@applicaster/zapp-react-native-bridge": "12.0.0-alpha.
|
|
37
|
-
"@applicaster/zapp-react-native-redux": "12.0.0-alpha.
|
|
38
|
-
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.
|
|
39
|
-
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.
|
|
33
|
+
"@applicaster/applicaster-types": "12.0.0-alpha.5400461972",
|
|
34
|
+
"@applicaster/quick-brick-core-plugins": "12.0.0-alpha.5400461972",
|
|
35
|
+
"@applicaster/zapp-pipes-v2-client": "12.0.0-alpha.5400461972",
|
|
36
|
+
"@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5400461972",
|
|
37
|
+
"@applicaster/zapp-react-native-redux": "12.0.0-alpha.5400461972",
|
|
38
|
+
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5400461972",
|
|
39
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.5400461972",
|
|
40
40
|
"atob": "^2.1.2",
|
|
41
41
|
"axios": "^0.28.0",
|
|
42
42
|
"btoa": "^1.2.1",
|