@applicaster/quick-brick-core 13.0.0-alpha.9433330286 → 13.0.0-rc.11
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.
|
@@ -66,7 +66,6 @@ import { inflateUrl } from "@applicaster/zapp-react-native-ui-components/Compone
|
|
|
66
66
|
import { useModalStore } from "@applicaster/zapp-react-native-utils/modalState";
|
|
67
67
|
import { useSubscriberFor } from "@applicaster/zapp-react-native-utils/reactHooks/useSubscriberFor";
|
|
68
68
|
import { QBUIComponentEvents } from "@applicaster/zapp-react-native-ui-components/events";
|
|
69
|
-
import { Hook } from "@applicaster/zapp-react-native-utils/appUtils/HooksManager/Hook";
|
|
70
69
|
|
|
71
70
|
const logger = coreAppLogger.addSubsystem("Navigator");
|
|
72
71
|
|
|
@@ -76,6 +75,17 @@ type Props = {
|
|
|
76
75
|
plugins?: QuickBrickPlugin[];
|
|
77
76
|
};
|
|
78
77
|
|
|
78
|
+
type EntryWithParent = ZappEntry & { parent?: EntryWithParent };
|
|
79
|
+
|
|
80
|
+
type SingleEntry = {
|
|
81
|
+
data: EntryWithParent;
|
|
82
|
+
route: string;
|
|
83
|
+
id: string;
|
|
84
|
+
parentId?: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
type EntryContextType = { [K in string]: SingleEntry };
|
|
88
|
+
|
|
79
89
|
const navigationActions = {
|
|
80
90
|
[ACTIONS.PUSH]: push,
|
|
81
91
|
[ACTIONS.REPLACE]: replace,
|
|
@@ -112,7 +122,9 @@ export function NavigationProvider({ children }: Props) {
|
|
|
112
122
|
const pathname = state?.location?.pathname;
|
|
113
123
|
const pathnameRef = React.useRef(pathname);
|
|
114
124
|
|
|
115
|
-
const { context } = React.useContext(
|
|
125
|
+
const { context }: EntryContextType = React.useContext(
|
|
126
|
+
ZappPipesEntryContext.Context
|
|
127
|
+
);
|
|
116
128
|
|
|
117
129
|
const { openModal, dismissModal } = useModalStore();
|
|
118
130
|
|
|
@@ -368,18 +380,7 @@ export function NavigationProvider({ children }: Props) {
|
|
|
368
380
|
}
|
|
369
381
|
};
|
|
370
382
|
|
|
371
|
-
const handleHookPresent = (
|
|
372
|
-
{
|
|
373
|
-
hookPlugin,
|
|
374
|
-
route,
|
|
375
|
-
payload,
|
|
376
|
-
}: {
|
|
377
|
-
hookPlugin: Hook;
|
|
378
|
-
route: string;
|
|
379
|
-
payload: object;
|
|
380
|
-
},
|
|
381
|
-
dispose
|
|
382
|
-
) => {
|
|
383
|
+
const handleHookPresent = ({ hookPlugin, route, payload }, dispose) => {
|
|
383
384
|
if (hookPlugin?.lastHook) {
|
|
384
385
|
dispose();
|
|
385
386
|
}
|
|
@@ -613,9 +614,7 @@ export function NavigationProvider({ children }: Props) {
|
|
|
613
614
|
},
|
|
614
615
|
};
|
|
615
616
|
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
hooksManager.subscriber
|
|
617
|
+
HooksManager(hooksOptions)
|
|
619
618
|
.on(HOOKS_EVENTS.PRESENT_SCREEN_HOOK, handleHookPresent)
|
|
620
619
|
.on(HOOKS_EVENTS.ERROR, handleHookError)
|
|
621
620
|
.on(HOOKS_EVENTS.CANCEL, handleHookCancel)
|
|
@@ -626,9 +625,8 @@ export function NavigationProvider({ children }: Props) {
|
|
|
626
625
|
screen,
|
|
627
626
|
options,
|
|
628
627
|
})
|
|
629
|
-
)
|
|
630
|
-
|
|
631
|
-
hooksManager.handleHooks(legacyScreenData({ entry, screen }));
|
|
628
|
+
)
|
|
629
|
+
.handleHooks(legacyScreenData({ entry, screen }));
|
|
632
630
|
} else {
|
|
633
631
|
dispatch(navigationAction(targetRoute, { screen, entry, options }));
|
|
634
632
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-core",
|
|
3
|
-
"version": "13.0.0-
|
|
3
|
+
"version": "13.0.0-rc.11",
|
|
4
4
|
"description": "Core package for Applicaster's Quick Brick App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@applicaster/applicaster-types": "13.0.0-
|
|
33
|
-
"@applicaster/quick-brick-core-plugins": "13.0.0-
|
|
34
|
-
"@applicaster/zapp-pipes-v2-client": "13.0.0-
|
|
35
|
-
"@applicaster/zapp-react-native-bridge": "13.0.0-
|
|
36
|
-
"@applicaster/zapp-react-native-redux": "13.0.0-
|
|
37
|
-
"@applicaster/zapp-react-native-ui-components": "13.0.0-
|
|
38
|
-
"@applicaster/zapp-react-native-utils": "13.0.0-
|
|
32
|
+
"@applicaster/applicaster-types": "13.0.0-rc.11",
|
|
33
|
+
"@applicaster/quick-brick-core-plugins": "13.0.0-rc.11",
|
|
34
|
+
"@applicaster/zapp-pipes-v2-client": "13.0.0-rc.11",
|
|
35
|
+
"@applicaster/zapp-react-native-bridge": "13.0.0-rc.11",
|
|
36
|
+
"@applicaster/zapp-react-native-redux": "13.0.0-rc.11",
|
|
37
|
+
"@applicaster/zapp-react-native-ui-components": "13.0.0-rc.11",
|
|
38
|
+
"@applicaster/zapp-react-native-utils": "13.0.0-rc.11",
|
|
39
39
|
"atob": "^2.1.2",
|
|
40
40
|
"axios": "^0.28.0",
|
|
41
41
|
"btoa": "^1.2.1",
|