@applicaster/quick-brick-core 13.0.0-alpha.8532113155 → 13.0.0-alpha.9103242840

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.
@@ -49,7 +49,6 @@ import { coreAppLogger } from "../logger";
49
49
  import {
50
50
  getPlatform,
51
51
  isTV,
52
- isVizioPlatform,
53
52
  } from "@applicaster/zapp-react-native-utils/reactUtils";
54
53
  import { useConnectionInfo } from "@applicaster/zapp-react-native-utils/reactHooks/connection";
55
54
  import {
@@ -68,9 +67,6 @@ import { useModalStore } from "@applicaster/zapp-react-native-utils/modalState";
68
67
  import { useSubscriberFor } from "@applicaster/zapp-react-native-utils/reactHooks/useSubscriberFor";
69
68
  import { QBUIComponentEvents } from "@applicaster/zapp-react-native-ui-components/events";
70
69
  import { Hook } from "@applicaster/zapp-react-native-utils/appUtils/HooksManager/Hook";
71
- import { URLSchemeContext } from "../DeepLinking/URLSchemeListener/URLSchemeContextProvider";
72
-
73
- import { loadingOverlayManager } from "../LoadingOverlay";
74
70
 
75
71
  const logger = coreAppLogger.addSubsystem("Navigator");
76
72
 
@@ -90,8 +86,6 @@ const navigationActions = {
90
86
  const platform = getPlatform();
91
87
 
92
88
  export function NavigationProvider({ children }: Props) {
93
- const { url: deepLinkURL } = React.useContext(URLSchemeContext);
94
-
95
89
  const {
96
90
  appData: { layoutVersion },
97
91
  rivers,
@@ -399,8 +393,6 @@ export function NavigationProvider({ children }: Props) {
399
393
  } else {
400
394
  dispatch(push(route, { entry: payload, screen: hookPlugin }));
401
395
  }
402
-
403
- closeLoadingOverlay();
404
396
  };
405
397
 
406
398
  const handleHookError = ({ error, hookPlugin, callback }, dispose) => {
@@ -419,8 +411,6 @@ export function NavigationProvider({ children }: Props) {
419
411
  if (callback && typeof callback === "function") {
420
412
  callback();
421
413
  }
422
-
423
- closeLoadingOverlay();
424
414
  };
425
415
 
426
416
  const handleHookCancel = ({ hookPlugin, callback }, dispose) => {
@@ -436,8 +426,6 @@ export function NavigationProvider({ children }: Props) {
436
426
  } else {
437
427
  goBack(true, true);
438
428
  }
439
-
440
- closeLoadingOverlay();
441
429
  };
442
430
 
443
431
  const handleHookSuccess = ({ hookPlugin, callback }) => {
@@ -448,10 +436,6 @@ export function NavigationProvider({ children }: Props) {
448
436
  }
449
437
  };
450
438
 
451
- const handleBackgroundHook = () => {
452
- openLoadingOverlay();
453
- };
454
-
455
439
  const checkStartUpHooks = React.useMemo(() => {
456
440
  if (!pluginConfigurations) return false;
457
441
 
@@ -521,8 +505,6 @@ export function NavigationProvider({ children }: Props) {
521
505
  );
522
506
 
523
507
  callback?.();
524
-
525
- closeLoadingOverlay();
526
508
  };
527
509
 
528
510
  const offlinePlugin = React.useMemo(() => {
@@ -637,7 +619,6 @@ export function NavigationProvider({ children }: Props) {
637
619
  .on(HOOKS_EVENTS.ERROR, handleHookError)
638
620
  .on(HOOKS_EVENTS.CANCEL, handleHookCancel)
639
621
  .on(HOOKS_EVENTS.SUCCESS, handleHookSuccess)
640
- .on(HOOKS_EVENTS.START_BACKGROUND_HOOK, handleBackgroundHook)
641
622
  .on(
642
623
  HOOKS_EVENTS.COMPLETE,
643
624
  handleHookComplete(navigationAction, targetRoute, {
@@ -653,14 +634,6 @@ export function NavigationProvider({ children }: Props) {
653
634
  },
654
635
  });
655
636
 
656
- const openLoadingOverlay = React.useCallback(() => {
657
- deepLinkURL && isVizioPlatform() && loadingOverlayManager.show();
658
- }, [deepLinkURL]);
659
-
660
- const closeLoadingOverlay = React.useCallback(() => {
661
- loadingOverlayManager.hide();
662
- }, []);
663
-
664
637
  const openPiP = React.useCallback(() => {
665
638
  dispatch(setVideoPiP());
666
639
  }, []);
@@ -131,8 +131,9 @@ export function appLifeCycleManager(appLoader, QuickBrickManager) {
131
131
  )
132
132
  .map((plugin: any) => plugin.module?.getLoginProtocol?.());
133
133
 
134
- const loginProtocols: LoginProtocol[] =
135
- await Promise.all(promiseProtocols);
134
+ const loginProtocols: LoginProtocol[] = await Promise.all(
135
+ promiseProtocols
136
+ );
136
137
 
137
138
  // Await all does not work here
138
139
  for (const protocol of loginProtocols) {
package/App/index.tsx CHANGED
@@ -29,7 +29,6 @@ import { appRemoteDataLoader } from "./appRemoteDataLoader";
29
29
  import { withActionExecutor } from "@applicaster/zapp-react-native-utils/actionsExecutor/ActionExecutorContext";
30
30
  import { withScreenDataContextProvider } from "@applicaster/zapp-react-native-ui-components/Contexts/ScreenDataContext";
31
31
  import { LogicAggregatorContainer } from "./LogicAggregatorContainer";
32
- import { LoadingOverlay } from "./LoadingOverlay";
33
32
 
34
33
  interface AppOptions {
35
34
  Layout: React.ComponentType;
@@ -75,7 +74,6 @@ const App = ({
75
74
  <LogicAggregatorContainer
76
75
  components={[InteractionManager, ApplyScreenHooks]}
77
76
  />
78
- <LoadingOverlay />
79
77
  </ErrorBoundary>
80
78
  </AppContainer>
81
79
  </SafeAreaProvider>
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.8532113155",
3
+ "version": "13.0.0-alpha.9103242840",
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.8532113155",
33
- "@applicaster/quick-brick-core-plugins": "13.0.0-alpha.8532113155",
34
- "@applicaster/zapp-pipes-v2-client": "13.0.0-alpha.8532113155",
35
- "@applicaster/zapp-react-native-bridge": "13.0.0-alpha.8532113155",
36
- "@applicaster/zapp-react-native-redux": "13.0.0-alpha.8532113155",
37
- "@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.8532113155",
38
- "@applicaster/zapp-react-native-utils": "13.0.0-alpha.8532113155",
32
+ "@applicaster/applicaster-types": "13.0.0-alpha.9103242840",
33
+ "@applicaster/quick-brick-core-plugins": "13.0.0-alpha.9103242840",
34
+ "@applicaster/zapp-pipes-v2-client": "13.0.0-alpha.9103242840",
35
+ "@applicaster/zapp-react-native-bridge": "13.0.0-alpha.9103242840",
36
+ "@applicaster/zapp-react-native-redux": "13.0.0-alpha.9103242840",
37
+ "@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.9103242840",
38
+ "@applicaster/zapp-react-native-utils": "13.0.0-alpha.9103242840",
39
39
  "atob": "^2.1.2",
40
40
  "axios": "^0.28.0",
41
41
  "btoa": "^1.2.1",
@@ -1,27 +0,0 @@
1
- import { BehaviorSubject } from "rxjs";
2
-
3
- class LoadingOverlayManager {
4
- visibilitySubject: BehaviorSubject<boolean>;
5
-
6
- constructor() {
7
- this.visibilitySubject = new BehaviorSubject(false);
8
- }
9
-
10
- show() {
11
- this.visibilitySubject.next(true);
12
- }
13
-
14
- hide() {
15
- this.visibilitySubject.next(false);
16
- }
17
-
18
- onVisibilityStateChange(cb: (value: boolean) => void) {
19
- return this.visibilitySubject.subscribe(cb);
20
- }
21
-
22
- get visibility(): boolean {
23
- return this.visibilitySubject.value;
24
- }
25
- }
26
-
27
- export const loadingOverlayManager = new LoadingOverlayManager();
@@ -1,49 +0,0 @@
1
- import * as React from "react";
2
- import { View, StyleSheet } from "react-native";
3
- import { focusManager } from "@applicaster/zapp-react-native-utils/appUtils/focusManager";
4
- import { isVizioPlatform } from "@applicaster/zapp-react-native-utils/reactUtils";
5
- import { Spinner } from "@applicaster/zapp-react-native-ui-components/Components/Spinner";
6
- import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
7
-
8
- import { useLoadingOverlayVisibility } from "./useLoadingOverlayVisibility";
9
-
10
- export { loadingOverlayManager } from "./LoadingOverlayManager";
11
-
12
- const styles = StyleSheet.create({
13
- container: {
14
- opacity: 0.5,
15
- alignItems: "center",
16
- justifyContent: "center",
17
- zIndex: 100,
18
- flex: 1,
19
- },
20
- });
21
-
22
- const LoadingOverlayComponent = () => {
23
- const visible = useLoadingOverlayVisibility();
24
- const theme = useTheme();
25
-
26
- const backgroundColor = React.useMemo(() => {
27
- return theme?.app_background_color || "black";
28
- }, [theme?.app_background_color]);
29
-
30
- React.useEffect(() => {
31
- if (visible) {
32
- focusManager.disableFocus();
33
- } else {
34
- focusManager.enableFocus();
35
- }
36
- }, [visible]);
37
-
38
- return visible ? (
39
- <View
40
- style={[StyleSheet.absoluteFill, styles.container, { backgroundColor }]}
41
- >
42
- <Spinner />
43
- </View>
44
- ) : null;
45
- };
46
-
47
- export const LoadingOverlay = isVizioPlatform()
48
- ? LoadingOverlayComponent
49
- : () => null;
@@ -1,18 +0,0 @@
1
- import * as React from "react";
2
- import { loadingOverlayManager } from "./LoadingOverlayManager";
3
-
4
- export const useLoadingOverlayVisibility = () => {
5
- const [visible, setVisible] = React.useState(
6
- loadingOverlayManager.visibility
7
- );
8
-
9
- React.useEffect(() => {
10
- const listener = loadingOverlayManager.onVisibilityStateChange(setVisible);
11
-
12
- return () => {
13
- listener.unsubscribe();
14
- };
15
- }, []);
16
-
17
- return visible;
18
- };