@applicaster/zapp-react-native-ui-components 12.0.9-alpha.1145213293 → 12.0.9-rc.0
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,4 +1,4 @@
|
|
|
1
|
-
import React, { PropsWithChildren
|
|
1
|
+
import React, { PropsWithChildren } from "react";
|
|
2
2
|
import { ImageBackground, View } from "react-native";
|
|
3
3
|
|
|
4
4
|
import { imageSrcFromMediaItem } from "@applicaster/zapp-react-native-utils/configurationUtils";
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
type Props = PropsWithChildren<{
|
|
13
13
|
entry: ZappEntry;
|
|
14
14
|
style?: { [K: string]: any };
|
|
15
|
-
docked?: boolean;
|
|
16
15
|
imageStyle?: { [K: string]: any };
|
|
17
16
|
imageKey?: string;
|
|
18
17
|
defaultImageDimensions?: { [K: string]: any };
|
|
@@ -24,7 +23,6 @@ const PlayerImageBackgroundComponent = ({
|
|
|
24
23
|
entry,
|
|
25
24
|
children,
|
|
26
25
|
style,
|
|
27
|
-
docked,
|
|
28
26
|
imageStyle,
|
|
29
27
|
imageKey,
|
|
30
28
|
defaultImageDimensions,
|
|
@@ -36,22 +34,8 @@ const PlayerImageBackgroundComponent = ({
|
|
|
36
34
|
|
|
37
35
|
const { playerAnimationState } = useModalAnimationContext();
|
|
38
36
|
|
|
39
|
-
const [lastNonNullAnimationState, setLastNonNullAnimationState] =
|
|
40
|
-
useState(playerAnimationState);
|
|
41
|
-
|
|
42
|
-
useEffect(() => {
|
|
43
|
-
if (playerAnimationState !== null) {
|
|
44
|
-
setLastNonNullAnimationState(playerAnimationState);
|
|
45
|
-
}
|
|
46
|
-
}, [playerAnimationState]);
|
|
47
|
-
|
|
48
37
|
if (!source) return <>{children}</>;
|
|
49
38
|
|
|
50
|
-
const imageBackgroundStyle =
|
|
51
|
-
lastNonNullAnimationState !== PlayerAnimationStateEnum.minimize && !docked
|
|
52
|
-
? defaultImageDimensions
|
|
53
|
-
: imageSize;
|
|
54
|
-
|
|
55
39
|
return (
|
|
56
40
|
<View
|
|
57
41
|
style={
|
|
@@ -61,17 +45,13 @@ const PlayerImageBackgroundComponent = ({
|
|
|
61
45
|
}
|
|
62
46
|
>
|
|
63
47
|
<AnimationComponent
|
|
64
|
-
style={
|
|
65
|
-
playerAnimationState === PlayerAnimationStateEnum.maximaze
|
|
66
|
-
? defaultImageDimensions
|
|
67
|
-
: style
|
|
68
|
-
}
|
|
48
|
+
style={style}
|
|
69
49
|
animationType={ComponentAnimationType.player}
|
|
70
50
|
additionalData={defaultImageDimensions}
|
|
71
51
|
>
|
|
72
52
|
<ImageBackground
|
|
73
53
|
resizeMode="cover"
|
|
74
|
-
style={
|
|
54
|
+
style={imageSize}
|
|
75
55
|
imageStyle={imageStyle}
|
|
76
56
|
source={source}
|
|
77
57
|
>
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
Animated,
|
|
6
6
|
Easing,
|
|
7
7
|
Dimensions,
|
|
8
|
-
StyleSheet,
|
|
9
8
|
} from "react-native";
|
|
10
9
|
import { useTargetScreenData } from "@applicaster/zapp-react-native-utils/reactHooks/screen";
|
|
11
10
|
import { ComponentsMap } from "@applicaster/zapp-react-native-ui-components/Components/River/ComponentsMap";
|
|
@@ -24,7 +23,7 @@ type Props = {
|
|
|
24
23
|
configuration: Configuration;
|
|
25
24
|
isTabletLandscape: boolean;
|
|
26
25
|
isAudioPlayer?: boolean;
|
|
27
|
-
isTablet
|
|
26
|
+
isTablet: boolean;
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
const containerStyle = ({
|
|
@@ -91,19 +90,17 @@ export const PlayerDetails = ({
|
|
|
91
90
|
{
|
|
92
91
|
// workaround for avoid wrong text-height after going back to portrait rotation
|
|
93
92
|
// we don't see this view in landscape mode, so we are able to use fixed width from portrait mode
|
|
94
|
-
width: isTablet
|
|
95
|
-
? undefined
|
|
96
|
-
: (StyleSheet.flatten(style)?.width ?? SCREEN_WIDTH),
|
|
93
|
+
width: isTablet ? undefined : SCREEN_WIDTH,
|
|
97
94
|
},
|
|
98
95
|
]}
|
|
99
96
|
>
|
|
100
|
-
{screenData
|
|
97
|
+
{screenData && (
|
|
101
98
|
<ComponentsMap
|
|
102
99
|
riverId={screenData.id}
|
|
103
100
|
feed={screenData?.data?.source}
|
|
104
101
|
riverComponents={screenData.ui_components}
|
|
105
102
|
/>
|
|
106
|
-
)
|
|
103
|
+
)}
|
|
107
104
|
</Animated.View>
|
|
108
105
|
);
|
|
109
106
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "12.0.9-
|
|
3
|
+
"version": "12.0.9-rc.0",
|
|
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",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"redux-mock-store": "^1.5.3"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@applicaster/applicaster-types": "12.0.9-
|
|
38
|
-
"@applicaster/zapp-react-native-bridge": "12.0.9-
|
|
39
|
-
"@applicaster/zapp-react-native-redux": "12.0.9-
|
|
40
|
-
"@applicaster/zapp-react-native-utils": "12.0.9-
|
|
37
|
+
"@applicaster/applicaster-types": "12.0.9-rc.0",
|
|
38
|
+
"@applicaster/zapp-react-native-bridge": "12.0.9-rc.0",
|
|
39
|
+
"@applicaster/zapp-react-native-redux": "12.0.9-rc.0",
|
|
40
|
+
"@applicaster/zapp-react-native-utils": "12.0.9-rc.0",
|
|
41
41
|
"promise": "^8.3.0",
|
|
42
42
|
"react-router-native": "^5.1.2",
|
|
43
43
|
"url": "^0.11.0",
|