@applicaster/quick-brick-core 12.0.0-alpha.5786305091 → 12.0.0-alpha.9151207838

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.
@@ -13,6 +13,7 @@ import {
13
13
  useNavigation,
14
14
  } from "@applicaster/zapp-react-native-utils/reactHooks";
15
15
  import { useDimensions } from "@applicaster/zapp-react-native-utils/reactHooks/layout";
16
+ import { ModalComponent } from "@applicaster/zapp-react-native-ui-components/Components";
16
17
 
17
18
  const styles = StyleSheet.create({
18
19
  container: {
@@ -55,7 +56,10 @@ export function ModalBottomSheet(props: Props) {
55
56
  modal_bottom_sheet_tablet_max_width: sheetTabletMaxWidth,
56
57
  } = theme;
57
58
 
58
- const { ModalBottomSheetContent, modalBottomSheetContentProps } = props;
59
+ const {
60
+ ModalBottomSheetContent = ModalComponent,
61
+ modalBottomSheetContentProps,
62
+ } = props;
59
63
 
60
64
  const onLayout = useCallback(({ nativeEvent }) => {
61
65
  const calculatedHeight = nativeEvent?.layout?.height;
@@ -17,7 +17,7 @@ const styles = StyleSheet.create({
17
17
  export function ModalContent(props: Props) {
18
18
  const { modalScreenProps } = props;
19
19
 
20
- if (modalScreenProps?.screenData?.ModalBottomSheetContent) {
20
+ if (modalScreenProps?.screenData?.modalBottomSheetContentProps) {
21
21
  const { ModalBottomSheetContent, modalBottomSheetContentProps } =
22
22
  modalScreenProps?.screenData || {};
23
23
 
@@ -63,6 +63,7 @@ import { findParent } from "@applicaster/zapp-react-native-ui-components/Context
63
63
  import { ZappPipesEntryContext } from "@applicaster/zapp-react-native-ui-components/Contexts";
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
+ import { useModalStore } from "@applicaster/zapp-react-native-utils/modalState";
66
67
 
67
68
  const logger = coreAppLogger.addSubsystem("Navigator");
68
69
 
@@ -130,8 +131,7 @@ export function NavigationProvider({ children }: Props) {
130
131
  ZappPipesEntryContext.Context
131
132
  );
132
133
 
133
- const [modalState, setModalState] =
134
- React.useState<ModalState>(initialModalState);
134
+ const { openModal, dismissModal, modalState } = useModalStore();
135
135
 
136
136
  const playNextOverlayState = React.useRef();
137
137
 
@@ -615,31 +615,6 @@ export function NavigationProvider({ children }: Props) {
615
615
  },
616
616
  });
617
617
 
618
- const openModal = React.useCallback(
619
- ({ item, options = {}, props = {} }: OpenModalArg) => {
620
- setModalState({
621
- visible: true,
622
- screen: item as ZappRiver,
623
- options: {
624
- animated: true,
625
- animationType: "slide",
626
- onShow: () => {},
627
- presentationStyle: "overFullScreen",
628
- transparent: true,
629
- ...options,
630
- onDismiss: () => {
631
- setModalState(initialModalState);
632
- },
633
- onRequestClose: () => {
634
- dismissModal();
635
- },
636
- },
637
- props,
638
- });
639
- },
640
- []
641
- );
642
-
643
618
  const openPiP = React.useCallback(() => {
644
619
  dispatch(setVideoPiP());
645
620
  }, []);
@@ -660,10 +635,6 @@ export function NavigationProvider({ children }: Props) {
660
635
  }
661
636
  }, [state?.options?.videoModal?.previousMode]);
662
637
 
663
- const dismissModal = React.useCallback(() => {
664
- setModalState(() => ({ ...initialModalState }));
665
- }, []);
666
-
667
638
  const openModalBottomSheet = React.useCallback(
668
639
  ({
669
640
  ModalBottomSheetContent,
@@ -11,7 +11,9 @@ Object {
11
11
  "presentationStyle": "overFullScreen",
12
12
  "transparent": true,
13
13
  },
14
- "props": Object {},
14
+ "props": Object {
15
+ "screenData": Object {},
16
+ },
15
17
  "screen": Object {
16
18
  "id": "A1234",
17
19
  "navigations": Array [],
@@ -41,7 +43,9 @@ Object {
41
43
  "presentationStyle": "overFullScreen",
42
44
  "transparent": true,
43
45
  },
44
- "props": Object {},
46
+ "props": Object {
47
+ "screenData": Object {},
48
+ },
45
49
  "screen": Object {
46
50
  "id": "A1234",
47
51
  "navigations": Array [],
@@ -27,6 +27,7 @@ Object {
27
27
  "AppContainer": [Function],
28
28
  "ContentScreen": [Function],
29
29
  "HookRenderer": [Function],
30
+ "ModalComponent": [Function],
30
31
  "PlayerContainer": Object {
31
32
  "$$typeof": Symbol(react.memo),
32
33
  "WrappedComponent": Object {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-core",
3
- "version": "12.0.0-alpha.5786305091",
3
+ "version": "12.0.0-alpha.9151207838",
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.5786305091",
34
- "@applicaster/quick-brick-core-plugins": "12.0.0-alpha.5786305091",
35
- "@applicaster/zapp-pipes-v2-client": "12.0.0-alpha.5786305091",
36
- "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.5786305091",
37
- "@applicaster/zapp-react-native-redux": "12.0.0-alpha.5786305091",
38
- "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.5786305091",
39
- "@applicaster/zapp-react-native-utils": "12.0.0-alpha.5786305091",
33
+ "@applicaster/applicaster-types": "12.0.0-alpha.9151207838",
34
+ "@applicaster/quick-brick-core-plugins": "12.0.0-alpha.9151207838",
35
+ "@applicaster/zapp-pipes-v2-client": "12.0.0-alpha.9151207838",
36
+ "@applicaster/zapp-react-native-bridge": "12.0.0-alpha.9151207838",
37
+ "@applicaster/zapp-react-native-redux": "12.0.0-alpha.9151207838",
38
+ "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.9151207838",
39
+ "@applicaster/zapp-react-native-utils": "12.0.0-alpha.9151207838",
40
40
  "atob": "^2.1.2",
41
41
  "axios": "^0.21.2",
42
42
  "btoa": "^1.2.1",