@applicaster/zapp-react-native-ui-components 14.0.0-alpha.2847632144 → 14.0.0-alpha.5521273514

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.
@@ -1,16 +1,5 @@
1
1
  import React from "react";
2
- import { View, Image, StyleSheet } from "react-native";
3
- import { toNumberWithDefaultZero } from "@applicaster/zapp-react-native-utils/numberUtils";
4
-
5
- const styles = StyleSheet.create({
6
- container: {
7
- marginHorizontal: 24,
8
- },
9
- image: {
10
- width: 400,
11
- height: 400,
12
- },
13
- });
2
+ import { View, Image } from "react-native";
14
3
 
15
4
  type Props = {
16
5
  srcImage: string;
@@ -20,19 +9,25 @@ type Props = {
20
9
  backgroundColor: string;
21
10
  backgroundImage: string;
22
11
  isRTL: boolean;
23
- artworkBorderRadius: Option<number>;
24
12
  };
25
13
  };
26
14
 
27
- export function Artwork({ srcImage, config }: Props) {
28
- const borderRadius = toNumberWithDefaultZero(config.artworkBorderRadius);
15
+ const containerStyles = {
16
+ marginHorizontal: 24,
17
+ };
18
+
19
+ const imageStyles = {
20
+ width: 400,
21
+ height: 400,
22
+ };
29
23
 
24
+ export function Artwork({ srcImage }: Props) {
30
25
  return (
31
- <View style={styles.container}>
26
+ <View style={containerStyles}>
32
27
  <Image
33
28
  fadeDuration={0}
34
29
  source={{ uri: srcImage }}
35
- style={[styles.image, { borderRadius }]}
30
+ style={imageStyles}
36
31
  resizeMode="cover"
37
32
  />
38
33
  </View>
@@ -72,7 +72,6 @@ export function AudioPlayer(props: Props) {
72
72
  const artworkAspectRatio = getProp("audio_player_artwork_aspect_ratio");
73
73
  const channelIcon = getProp("audio_player_channel_icon");
74
74
  const rtlFlag = getProp("audio_player_rtl");
75
- const artworkBorderRadius = getProp("audio_player_artwork_border_radius");
76
75
 
77
76
  const audioPlayerBackgroundImageDefaultColor = getProp(
78
77
  "audio_player_background_image_default_color"
@@ -155,7 +154,6 @@ export function AudioPlayer(props: Props) {
155
154
  artworkAspectRatio,
156
155
  channelIcon,
157
156
  audioPlayerBackgroundImageDefaultColor,
158
- artworkBorderRadius,
159
157
  };
160
158
  }, [getProp]);
161
159
 
@@ -14,7 +14,6 @@ type Props = {
14
14
  backgroundColor: string;
15
15
  backgroundImage: string;
16
16
  isRTL: boolean;
17
- artworkBorderRadius: Option<number>;
18
17
  };
19
18
  children: React.ReactNode;
20
19
  style: ViewStyle;
@@ -17,15 +17,10 @@ exports[`<Artwork /> renders correctly 1`] = `
17
17
  }
18
18
  }
19
19
  style={
20
- [
21
- {
22
- "height": 400,
23
- "width": 400,
24
- },
25
- {
26
- "borderRadius": 0,
27
- },
28
- ]
20
+ {
21
+ "height": 400,
22
+ "width": 400,
23
+ }
29
24
  }
30
25
  />
31
26
  </View>
@@ -3,11 +3,15 @@ import * as R from "ramda";
3
3
  import { connectToStore } from "@applicaster/zapp-react-native-redux";
4
4
  import { platformSelect } from "@applicaster/zapp-react-native-utils/reactUtils";
5
5
 
6
- import { HorizontalScrollContext, RiverOffsetContext } from "../../Contexts";
6
+ import {
7
+ HorizontalScrollContext,
8
+ RiverOffsetContext,
9
+ ScreenScrollingContext,
10
+ } from "../../Contexts";
11
+
7
12
  import { CellComponent } from "./Cell";
8
13
  import { TvOSCellComponent } from "./TvOSCellComponent";
9
14
  import { withConsumer } from "../../Contexts/HeaderOffsetContext";
10
- import { ScreenScrollingContext } from "../../Contexts/ScreenScrollingContext";
11
15
 
12
16
  import { ScreenLayoutContextConsumer } from "../../Contexts/ScreenLayoutContext";
13
17
  import { createContext } from "@applicaster/zapp-react-native-utils/reactUtils/createContext";
@@ -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.2847632144",
3
+ "version": "14.0.0-alpha.5521273514",
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",
@@ -31,10 +31,10 @@
31
31
  "redux-mock-store": "^1.5.3"
32
32
  },
33
33
  "dependencies": {
34
- "@applicaster/applicaster-types": "14.0.0-alpha.2847632144",
35
- "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.2847632144",
36
- "@applicaster/zapp-react-native-redux": "14.0.0-alpha.2847632144",
37
- "@applicaster/zapp-react-native-utils": "14.0.0-alpha.2847632144",
34
+ "@applicaster/applicaster-types": "14.0.0-alpha.5521273514",
35
+ "@applicaster/zapp-react-native-bridge": "14.0.0-alpha.5521273514",
36
+ "@applicaster/zapp-react-native-redux": "14.0.0-alpha.5521273514",
37
+ "@applicaster/zapp-react-native-utils": "14.0.0-alpha.5521273514",
38
38
  "promise": "^8.3.0",
39
39
  "url": "^0.11.0",
40
40
  "uuid": "^3.3.2"