@applicaster/quick-brick-core 12.0.3-rc.2 → 12.0.3

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
  );
@@ -498,8 +498,7 @@ export function NavigationProvider({ children }: Props) {
498
498
  ({ hookPlugin, payload, callback }, dispose) => {
499
499
  if (hookPlugin?.lastHook) {
500
500
  dispose({ disposeAll: true });
501
-
502
- startUpHooks.current && setStartUpHooks(false);
501
+ currentStartUpHooks.current && setStartUpHooks(false);
503
502
  }
504
503
 
505
504
  dispatch(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-core",
3
- "version": "12.0.3-rc.2",
3
+ "version": "12.0.3",
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.3-rc.2",
34
- "@applicaster/quick-brick-core-plugins": "12.0.3-rc.2",
35
- "@applicaster/zapp-pipes-v2-client": "12.0.3-rc.2",
36
- "@applicaster/zapp-react-native-bridge": "12.0.3-rc.2",
37
- "@applicaster/zapp-react-native-redux": "12.0.3-rc.2",
38
- "@applicaster/zapp-react-native-ui-components": "12.0.3-rc.2",
39
- "@applicaster/zapp-react-native-utils": "12.0.3-rc.2",
33
+ "@applicaster/applicaster-types": "12.0.3",
34
+ "@applicaster/quick-brick-core-plugins": "12.0.3",
35
+ "@applicaster/zapp-pipes-v2-client": "12.0.3",
36
+ "@applicaster/zapp-react-native-bridge": "12.0.3",
37
+ "@applicaster/zapp-react-native-redux": "12.0.3",
38
+ "@applicaster/zapp-react-native-ui-components": "12.0.3",
39
+ "@applicaster/zapp-react-native-utils": "12.0.3",
40
40
  "atob": "^2.1.2",
41
41
  "axios": "^0.28.0",
42
42
  "btoa": "^1.2.1",