@applicaster/zapp-react-native-ui-components 14.0.0-alpha.8387612031 → 14.0.0-alpha.9119252693

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.
Files changed (38) hide show
  1. package/Components/AudioPlayer/AudioPlayerLayout.tsx +202 -0
  2. package/Components/AudioPlayer/mobile/Layout.tsx +6 -3
  3. package/Components/AudioPlayer/mobile/__tests__/__snapshots__/audioPlayerMobileLayout.test.js.snap +7 -1
  4. package/Components/AudioPlayer/mobile/__tests__/audioPlayerMobileLayout.test.js +1 -1
  5. package/Components/AudioPlayer/mobile/index.tsx +7 -12
  6. package/Components/AudioPlayer/tv/Artwork.tsx +3 -2
  7. package/Components/AudioPlayer/tv/Channel.tsx +7 -7
  8. package/Components/AudioPlayer/tv/Layout.tsx +100 -93
  9. package/Components/AudioPlayer/tv/Runtime.tsx +7 -1
  10. package/Components/AudioPlayer/tv/Summary.tsx +6 -2
  11. package/Components/AudioPlayer/tv/Title.tsx +6 -2
  12. package/Components/AudioPlayer/tv/__tests__/__snapshots__/Runtime.test.js.snap +2 -2
  13. package/Components/AudioPlayer/tv/__tests__/__snapshots__/audioPlayer.test.js.snap +21 -27
  14. package/Components/AudioPlayer/tv/__tests__/__snapshots__/channel.test.js.snap +8 -17
  15. package/Components/AudioPlayer/tv/__tests__/__snapshots__/summary.test.js.snap +1 -2
  16. package/Components/AudioPlayer/tv/__tests__/__snapshots__/title.test.js.snap +1 -2
  17. package/Components/AudioPlayer/tv/__tests__/audioPlayer.test.js +4 -0
  18. package/Components/AudioPlayer/tv/index.tsx +9 -11
  19. package/Components/Cell/index.js +6 -2
  20. package/Components/Focusable/__tests__/index.android.test.tsx +3 -0
  21. package/Components/Focusable/index.android.tsx +12 -8
  22. package/Components/HandlePlayable/HandlePlayable.tsx +11 -1
  23. package/Components/MasterCell/DefaultComponents/FocusableView/index.tsx +4 -27
  24. package/Components/MasterCell/index.tsx +1 -1
  25. package/Components/PlayerContainer/PlayerContainer.tsx +15 -6
  26. package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +9 -1
  27. package/Components/VideoModal/PlayerDetails.tsx +24 -2
  28. package/Components/VideoModal/PlayerWrapper.tsx +26 -142
  29. package/Components/VideoModal/VideoModal.tsx +3 -17
  30. package/Components/VideoModal/__tests__/PlayerWrapper.test.tsx +1 -7
  31. package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +44 -240
  32. package/Components/VideoModal/hooks/index.ts +0 -2
  33. package/Components/VideoModal/hooks/useModalSize.ts +16 -2
  34. package/Components/VideoModal/utils.ts +6 -0
  35. package/Components/Viewport/VisibilitySensor/VisibilitySensor.tsx +3 -3
  36. package/Components/default-cell-renderer/viewTrees/tv/DefaultCell/index.ts +3 -3
  37. package/package.json +5 -8
  38. package/Components/VideoModal/hooks/useBackgroundColor.ts +0 -10
@@ -9,6 +9,11 @@ import {
9
9
 
10
10
  import { getXray } from "@applicaster/zapp-react-native-utils/logger";
11
11
  import { useSafeAreaFrame } from "react-native-safe-area-context";
12
+ import {
13
+ isAndroidPlatform,
14
+ isAndroidVersionAtLeast,
15
+ } from "@applicaster/zapp-react-native-utils/reactUtils";
16
+ import { StatusBar } from "react-native";
12
17
 
13
18
  const { Logger } = getXray();
14
19
 
@@ -27,12 +32,16 @@ const MODAL_SIZE_FOR_LANDSCAPE: Size = {
27
32
  height: "100%",
28
33
  };
29
34
 
35
+ const isOldAndroidDevice = !isAndroidVersionAtLeast(35) && isAndroidPlatform();
36
+
30
37
  export const useModalSize = (): Size => {
31
38
  const frame = useSafeAreaFrame();
32
39
 
33
40
  const [modalSize, setModalSize] = React.useState<Size>({
34
41
  width: frame.width,
35
- height: frame.height,
42
+ height: isOldAndroidDevice
43
+ ? frame.height + StatusBar.currentHeight
44
+ : frame.height,
36
45
  });
37
46
 
38
47
  const setNewModalSize = React.useCallback((newSize, log) => {
@@ -44,7 +53,12 @@ export const useModalSize = (): Size => {
44
53
  return oldSize;
45
54
  }
46
55
 
47
- return newSize;
56
+ return {
57
+ width: newSize.width,
58
+ height: isOldAndroidDevice
59
+ ? newSize.height + StatusBar.currentHeight
60
+ : newSize.height,
61
+ };
48
62
  });
49
63
 
50
64
  logger.debug({
@@ -34,6 +34,9 @@ export const useConfiguration = () => {
34
34
  minimised_height = 0,
35
35
  minimised_height_tablet = 0,
36
36
  modal_background_color,
37
+ tablet_landscape_player_container_background_color,
38
+ screen_background_color,
39
+ audio_player_background_color,
37
40
  } = config;
38
41
 
39
42
  const minimisedHeight = useIsTablet()
@@ -43,6 +46,9 @@ export const useConfiguration = () => {
43
46
  return {
44
47
  minimised_height: Number(minimisedHeight),
45
48
  modal_background_color,
49
+ tablet_landscape_player_container_background_color,
50
+ audio_player_background_color,
51
+ screen_background_color,
46
52
  };
47
53
  };
48
54
 
@@ -4,8 +4,8 @@ which helps in detecting whether a given component is visible within the viewpor
4
4
  It is useful for implementing lazy loading or triggering specific actions when a component comes into view.
5
5
  */
6
6
 
7
- import React, { useEffect, useState, useRef, ReactNode, FC } from "react";
8
- import { View, Dimensions } from "react-native";
7
+ import React, { FC, ReactNode, useEffect, useRef, useState } from "react";
8
+ import { Dimensions, View } from "react-native";
9
9
  import { useIsRTL } from "@applicaster/zapp-react-native-utils/localizationUtils";
10
10
  import { isTV } from "@applicaster/zapp-react-native-utils/reactUtils";
11
11
 
@@ -78,7 +78,7 @@ const VisibilitySensorComponent: FC<Props> = ({
78
78
  };
79
79
 
80
80
  const stopWatching = () => {
81
- interval = clearInterval(interval);
81
+ clearInterval(interval);
82
82
  };
83
83
 
84
84
  const isInViewPort = () => {
@@ -1,10 +1,10 @@
1
1
  import {
2
- getColor,
3
2
  ACTIVE_COLOR,
4
3
  BACKGROUND_COLOR,
5
- MAIN_TEXT_COLOR,
6
4
  FOCUSED_TEXT_COLOR,
7
- } from "../../../colors/index";
5
+ getColor,
6
+ MAIN_TEXT_COLOR,
7
+ } from "../../../colors";
8
8
 
9
9
  const Image = "Image";
10
10
  const View = "View";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-ui-components",
3
- "version": "14.0.0-alpha.8387612031",
3
+ "version": "14.0.0-alpha.9119252693",
4
4
  "description": "Applicaster Zapp React Native ui components for the Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -27,14 +27,11 @@
27
27
  "url": "https://github.com/applicaster/quickbrick/issues"
28
28
  },
29
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
30
- "devDependencies": {
31
- "redux-mock-store": "^1.5.3"
32
- },
33
30
  "dependencies": {
34
- "@applicaster/applicaster-types": "14.0.0-alpha.8387612031",
35
- "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.8387612031",
36
- "@applicaster/zapp-react-native-redux": "14.0.0-alpha.8387612031",
37
- "@applicaster/zapp-react-native-utils": "14.0.0-alpha.8387612031",
31
+ "@applicaster/applicaster-types": "14.0.0-alpha.9119252693",
32
+ "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.9119252693",
33
+ "@applicaster/zapp-react-native-redux": "14.0.0-alpha.9119252693",
34
+ "@applicaster/zapp-react-native-utils": "14.0.0-alpha.9119252693",
38
35
  "promise": "^8.3.0",
39
36
  "url": "^0.11.0",
40
37
  "uuid": "^3.3.2"
@@ -1,10 +0,0 @@
1
- import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
2
- import { useConfiguration } from "../utils";
3
-
4
- export const useBackgroundColor = (): string => {
5
- const { modal_background_color: modalBackgroundColor } = useConfiguration();
6
-
7
- const theme = useTheme<BaseThemePropertiesMobile>();
8
-
9
- return modalBackgroundColor || theme?.status_background_color;
10
- };