@applicaster/quick-brick-core 13.0.0-alpha.7120331332 → 13.0.0-alpha.7122212380
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.
|
@@ -10,7 +10,11 @@ import * as ReactNative from "react-native";
|
|
|
10
10
|
|
|
11
11
|
import { isWeb } from "@applicaster/zapp-react-native-utils/reactUtils";
|
|
12
12
|
import { log_debug, log_error, log_info } from "../logger";
|
|
13
|
-
|
|
13
|
+
import { getAppUrlScheme } from "@applicaster/zapp-react-native-utils/appDataUtils";
|
|
14
|
+
import {
|
|
15
|
+
getZappPlatform,
|
|
16
|
+
ZappPlatform,
|
|
17
|
+
} from "@applicaster/zapp-react-native-utils/appUtils/platform";
|
|
14
18
|
type Props = {
|
|
15
19
|
listenerSpy?: (...any) => void;
|
|
16
20
|
children: ReactChild;
|
|
@@ -34,6 +38,15 @@ const initialState = { url: null, done: () => {} };
|
|
|
34
38
|
|
|
35
39
|
export const URLSchemeContext = createContext<State>(initialState);
|
|
36
40
|
|
|
41
|
+
const getWebDeepLink = (initialURL: string) => {
|
|
42
|
+
if (!initialURL) return null;
|
|
43
|
+
|
|
44
|
+
const index = initialURL.indexOf("?");
|
|
45
|
+
if (index === -1) return;
|
|
46
|
+
|
|
47
|
+
return getAppUrlScheme() + "://open" + initialURL.slice(index);
|
|
48
|
+
};
|
|
49
|
+
|
|
37
50
|
function URLSchemeContextProvider(props: Props) {
|
|
38
51
|
const [state, setState] = useState<string | null>(initialState.url);
|
|
39
52
|
|
|
@@ -51,10 +64,24 @@ function URLSchemeContextProvider(props: Props) {
|
|
|
51
64
|
props?.listenerSpy?.("getInitialURL");
|
|
52
65
|
|
|
53
66
|
try {
|
|
54
|
-
if (isWeb()) return;
|
|
55
|
-
|
|
56
67
|
const url = await Linking.getInitialURL();
|
|
57
68
|
|
|
69
|
+
if (isWeb()) {
|
|
70
|
+
if (getZappPlatform() === ZappPlatform.Vizio) {
|
|
71
|
+
const deepLink = getWebDeepLink(url);
|
|
72
|
+
|
|
73
|
+
if (deepLink) {
|
|
74
|
+
log_info(
|
|
75
|
+
`URLSchemeContextProvider: Retrieved initial deep link: ${deepLink}`
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
return setState(deepLink);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
58
85
|
log_info(
|
|
59
86
|
`URLSchemeContextProvider: Retrieved initial url: ${url || "not exist"}`
|
|
60
87
|
);
|
|
@@ -497,8 +497,7 @@ export function NavigationProvider({ children }: Props) {
|
|
|
497
497
|
({ hookPlugin, payload, callback }, dispose) => {
|
|
498
498
|
if (hookPlugin?.lastHook) {
|
|
499
499
|
dispose({ disposeAll: true });
|
|
500
|
-
|
|
501
|
-
startUpHooks.current && setStartUpHooks(false);
|
|
500
|
+
currentStartUpHooks.current && setStartUpHooks(false);
|
|
502
501
|
}
|
|
503
502
|
|
|
504
503
|
dispatch(
|
|
@@ -131,9 +131,8 @@ export function appLifeCycleManager(appLoader, QuickBrickManager) {
|
|
|
131
131
|
)
|
|
132
132
|
.map((plugin: any) => plugin.module?.getLoginProtocol?.());
|
|
133
133
|
|
|
134
|
-
const loginProtocols: LoginProtocol[] =
|
|
135
|
-
promiseProtocols
|
|
136
|
-
);
|
|
134
|
+
const loginProtocols: LoginProtocol[] =
|
|
135
|
+
await Promise.all(promiseProtocols);
|
|
137
136
|
|
|
138
137
|
// Await all does not work here
|
|
139
138
|
for (const protocol of loginProtocols) {
|
package/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ type AnyValue = void | string | number | boolean | AnyArray | AnyRecord;
|
|
|
24
24
|
declare type ReducerAction<
|
|
25
25
|
T extends string = string,
|
|
26
26
|
P extends AnyValue = AnyValue,
|
|
27
|
-
M extends AnyRecord = AnyRecord
|
|
27
|
+
M extends AnyRecord = AnyRecord,
|
|
28
28
|
> = {
|
|
29
29
|
type: T;
|
|
30
30
|
payload?: P;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-core",
|
|
3
|
-
"version": "13.0.0-alpha.
|
|
3
|
+
"version": "13.0.0-alpha.7122212380",
|
|
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-alpha.
|
|
33
|
-
"@applicaster/quick-brick-core-plugins": "13.0.0-alpha.
|
|
34
|
-
"@applicaster/zapp-pipes-v2-client": "13.0.0-alpha.
|
|
35
|
-
"@applicaster/zapp-react-native-bridge": "13.0.0-alpha.
|
|
36
|
-
"@applicaster/zapp-react-native-redux": "13.0.0-alpha.
|
|
37
|
-
"@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.
|
|
38
|
-
"@applicaster/zapp-react-native-utils": "13.0.0-alpha.
|
|
32
|
+
"@applicaster/applicaster-types": "13.0.0-alpha.7122212380",
|
|
33
|
+
"@applicaster/quick-brick-core-plugins": "13.0.0-alpha.7122212380",
|
|
34
|
+
"@applicaster/zapp-pipes-v2-client": "13.0.0-alpha.7122212380",
|
|
35
|
+
"@applicaster/zapp-react-native-bridge": "13.0.0-alpha.7122212380",
|
|
36
|
+
"@applicaster/zapp-react-native-redux": "13.0.0-alpha.7122212380",
|
|
37
|
+
"@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.7122212380",
|
|
38
|
+
"@applicaster/zapp-react-native-utils": "13.0.0-alpha.7122212380",
|
|
39
39
|
"atob": "^2.1.2",
|
|
40
40
|
"axios": "^0.28.0",
|
|
41
41
|
"btoa": "^1.2.1",
|
|
@@ -50,11 +50,27 @@
|
|
|
50
50
|
"uuid": "3.3.2"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
+
"@applicaster/blur": "*",
|
|
54
|
+
"@applicaster/quick-brick-xray": "*",
|
|
55
|
+
"@applicaster/zapp-react-dom-ui-components": "*",
|
|
56
|
+
"@applicaster/zapp-react-native-tvos-app": "*",
|
|
57
|
+
"@applicaster/zapp-react-native-tvos-ui-components": "*",
|
|
58
|
+
"@babel/runtime": "*",
|
|
53
59
|
"@react-native-community/netinfo": "*",
|
|
60
|
+
"@types/node": "*",
|
|
61
|
+
"immer": "*",
|
|
54
62
|
"react": "17.0.2",
|
|
55
63
|
"react-native": "0.68.6",
|
|
64
|
+
"react-native-fs": "*",
|
|
56
65
|
"react-native-gesture-handler": "*",
|
|
57
|
-
"react-native-
|
|
66
|
+
"react-native-linear-gradient": "*",
|
|
67
|
+
"react-native-safe-area-context": "*",
|
|
68
|
+
"react-native-svg": "*",
|
|
69
|
+
"react-native-web": "*",
|
|
70
|
+
"react-native-webview": "*",
|
|
71
|
+
"uglify-js": "*",
|
|
72
|
+
"validate-color": "*",
|
|
73
|
+
"zustand": "*"
|
|
58
74
|
},
|
|
59
75
|
"devDependencies": {
|
|
60
76
|
"@types/react-native": "0.69.6",
|