@applicaster/zapp-react-native-ui-components 13.0.0-rc.65 → 13.0.0-rc.67
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.
- package/Components/AudioPlayer/AudioPlayer.tsx +7 -0
- package/Components/AudioPlayer/helpers.tsx +1 -0
- package/Components/FocusableGroup/FocusableTvOS.tsx +3 -6
- package/Components/FocusableGroup/index.tsx +0 -1
- package/Components/PlayerImageBackground/index.tsx +1 -1
- package/Components/Screen/hooks.ts +3 -6
- package/Components/VideoModal/ModalAnimation/AnimatedPlayerModalWrapper.tsx +1 -1
- package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.tsx +5 -5
- package/Components/VideoModal/ModalAnimation/AnimatedVideoPlayerComponent.tsx +3 -3
- package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +2 -2
- package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +2 -2
- package/package.json +5 -5
|
@@ -24,6 +24,7 @@ type Props = {
|
|
|
24
24
|
audio_player_rtl?: boolean;
|
|
25
25
|
magic_background?: boolean;
|
|
26
26
|
audio_player_background_image_query?: string;
|
|
27
|
+
audio_player_background_image_default_color?: string;
|
|
27
28
|
start_time?: string;
|
|
28
29
|
end_time?: string;
|
|
29
30
|
};
|
|
@@ -35,6 +36,7 @@ type Props = {
|
|
|
35
36
|
audio_player_rtl?: string;
|
|
36
37
|
magic_background?: string;
|
|
37
38
|
audio_player_background_image_query?: string;
|
|
39
|
+
audio_player_background_image_default_color?: string;
|
|
38
40
|
audio_player_background_image?: string;
|
|
39
41
|
audio_player_artwork_aspect_ratio?: string;
|
|
40
42
|
lg_tv_audio_player_title_font_family?: string;
|
|
@@ -80,6 +82,10 @@ export function AudioPlayer(props: Props) {
|
|
|
80
82
|
"audio_player_background_image_query"
|
|
81
83
|
);
|
|
82
84
|
|
|
85
|
+
const audioPlayerBackgroundImageDefaultColor = getProp(
|
|
86
|
+
"audio_player_background_image_default_color"
|
|
87
|
+
);
|
|
88
|
+
|
|
83
89
|
const isRTL = rtlFlag === "1" || rtlFlag === "true" || rtlFlag === true;
|
|
84
90
|
|
|
85
91
|
const titleFontFamily = getProp(
|
|
@@ -158,6 +164,7 @@ export function AudioPlayer(props: Props) {
|
|
|
158
164
|
channelIcon,
|
|
159
165
|
magicBackground,
|
|
160
166
|
audioPlayerBackgroundImageQuery,
|
|
167
|
+
audioPlayerBackgroundImageDefaultColor,
|
|
161
168
|
};
|
|
162
169
|
}, [getProp]);
|
|
163
170
|
|
|
@@ -24,8 +24,7 @@ type Props = {
|
|
|
24
24
|
id: string;
|
|
25
25
|
children: (arg1: boolean) => React.ComponentType<any>;
|
|
26
26
|
isFocusDisabled: boolean;
|
|
27
|
-
|
|
28
|
-
isPreferredFocusDisabled: boolean;
|
|
27
|
+
isWithMemory: boolean;
|
|
29
28
|
focusGroupRef: React.Component;
|
|
30
29
|
shouldUsePreferredFocus: boolean;
|
|
31
30
|
groupId: string;
|
|
@@ -40,8 +39,7 @@ export class FocusableGroup extends BaseFocusable<Props> {
|
|
|
40
39
|
children,
|
|
41
40
|
id,
|
|
42
41
|
isFocusDisabled,
|
|
43
|
-
|
|
44
|
-
isPreferredFocusDisabled,
|
|
42
|
+
isWithMemory,
|
|
45
43
|
style = {},
|
|
46
44
|
groupId,
|
|
47
45
|
...otherProps
|
|
@@ -63,8 +61,7 @@ export class FocusableGroup extends BaseFocusable<Props> {
|
|
|
63
61
|
itemId={id}
|
|
64
62
|
ref={this.ref}
|
|
65
63
|
isFocusDisabled={isFocusDisabled}
|
|
66
|
-
|
|
67
|
-
isPreferredFocusDisabled={isPreferredFocusDisabled}
|
|
64
|
+
isWithMemory={isWithMemory}
|
|
68
65
|
onGroupFocus={onGroupFocus}
|
|
69
66
|
onGroupBlur={onGroupBlur}
|
|
70
67
|
style={style}
|
|
@@ -7,15 +7,12 @@ import {
|
|
|
7
7
|
useCurrentScreenData,
|
|
8
8
|
useDimensions,
|
|
9
9
|
useRoute,
|
|
10
|
+
useIsTablet,
|
|
10
11
|
} from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
11
12
|
import { useMemo, useEffect, useState } from "react";
|
|
12
13
|
|
|
13
14
|
export const useWaitForValidOrientation = () => {
|
|
14
|
-
const {
|
|
15
|
-
width: screenWidth,
|
|
16
|
-
height,
|
|
17
|
-
deviceInfo,
|
|
18
|
-
} = useDimensions("screen", {
|
|
15
|
+
const { width: screenWidth, height } = useDimensions("screen", {
|
|
19
16
|
fullDimensions: true,
|
|
20
17
|
updateForInactiveScreens: false,
|
|
21
18
|
});
|
|
@@ -26,7 +23,7 @@ export const useWaitForValidOrientation = () => {
|
|
|
26
23
|
|
|
27
24
|
const [readyState, setReadyState] = useState(false);
|
|
28
25
|
|
|
29
|
-
const isTablet =
|
|
26
|
+
const isTablet = useIsTablet();
|
|
30
27
|
|
|
31
28
|
const { appData } = usePickFromState(["appData"]);
|
|
32
29
|
const isTabletPortrait = appData?.isTabletPortrait;
|
|
@@ -46,7 +46,7 @@ export const AnimatedPlayerModalWrapper = (props: Props) => {
|
|
|
46
46
|
|
|
47
47
|
React.useEffect(() => {
|
|
48
48
|
(playerAnimationState === PlayerAnimationStateEnum.minimize ||
|
|
49
|
-
playerAnimationState === PlayerAnimationStateEnum.
|
|
49
|
+
playerAnimationState === PlayerAnimationStateEnum.maximize) &&
|
|
50
50
|
setStartComponentsAnimation(true);
|
|
51
51
|
}, [playerAnimationState]);
|
|
52
52
|
|
|
@@ -77,7 +77,7 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
77
77
|
|
|
78
78
|
const isNotMinimizeMaximazeAnimation =
|
|
79
79
|
playerAnimationState !== PlayerAnimationStateEnum.minimize &&
|
|
80
|
-
playerAnimationState !== PlayerAnimationStateEnum.
|
|
80
|
+
playerAnimationState !== PlayerAnimationStateEnum.maximize;
|
|
81
81
|
|
|
82
82
|
const isEnablePanGesture =
|
|
83
83
|
enableGesture &&
|
|
@@ -143,7 +143,7 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
143
143
|
translateYOffset.flattenOffset();
|
|
144
144
|
dragScrollY.setValue(0);
|
|
145
145
|
|
|
146
|
-
setPlayerAnimationState(PlayerAnimationStateEnum.
|
|
146
|
+
setPlayerAnimationState(PlayerAnimationStateEnum.maximize);
|
|
147
147
|
} else {
|
|
148
148
|
setPlayerAnimationState(PlayerAnimationStateEnum.minimize);
|
|
149
149
|
}
|
|
@@ -158,7 +158,7 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
158
158
|
|
|
159
159
|
dragScrollY.setValue(0);
|
|
160
160
|
|
|
161
|
-
setPlayerAnimationState(PlayerAnimationStateEnum.
|
|
161
|
+
setPlayerAnimationState(PlayerAnimationStateEnum.maximize);
|
|
162
162
|
} else {
|
|
163
163
|
resetPlayerAnimationState();
|
|
164
164
|
}
|
|
@@ -252,7 +252,7 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
252
252
|
(previousMode === "MINIMIZED" || previousMode === "MAXIMIZED")) ||
|
|
253
253
|
(previousItemId !== item?.id && mode !== "FULLSCREEN"))
|
|
254
254
|
) {
|
|
255
|
-
setPlayerAnimationState(PlayerAnimationStateEnum.
|
|
255
|
+
setPlayerAnimationState(PlayerAnimationStateEnum.maximize);
|
|
256
256
|
}
|
|
257
257
|
}, [videoModalState]);
|
|
258
258
|
|
|
@@ -296,7 +296,7 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
296
296
|
|
|
297
297
|
resetPlayerAnimationState();
|
|
298
298
|
});
|
|
299
|
-
} else if (playerAnimationState === PlayerAnimationStateEnum.
|
|
299
|
+
} else if (playerAnimationState === PlayerAnimationStateEnum.maximize) {
|
|
300
300
|
Animated.timing(translateYOffset, getAnimatedConfig(0)).start(() => {
|
|
301
301
|
maximiseVideoModal();
|
|
302
302
|
setScrollModalAnimatedValue(translateYOffset, 0, setLastSnap);
|
|
@@ -50,7 +50,7 @@ export const AnimatedVideoPlayer = ({ children }: Props) => {
|
|
|
50
50
|
|
|
51
51
|
const isNotMinimizeMaximazeAnimation =
|
|
52
52
|
playerAnimationState !== PlayerAnimationStateEnum.minimize &&
|
|
53
|
-
playerAnimationState !== PlayerAnimationStateEnum.
|
|
53
|
+
playerAnimationState !== PlayerAnimationStateEnum.maximize;
|
|
54
54
|
|
|
55
55
|
const isEnablePanGesture =
|
|
56
56
|
!isLanguageOverlayVisible &&
|
|
@@ -89,7 +89,7 @@ export const AnimatedVideoPlayer = ({ children }: Props) => {
|
|
|
89
89
|
setLastSnap(destSnapPoint);
|
|
90
90
|
|
|
91
91
|
if (destSnapPoint === modalSnapPoints[0]) {
|
|
92
|
-
setPlayerAnimationState(PlayerAnimationStateEnum.
|
|
92
|
+
setPlayerAnimationState(PlayerAnimationStateEnum.maximize);
|
|
93
93
|
} else {
|
|
94
94
|
lastScrollY.setValue(0);
|
|
95
95
|
lastScrollYValue.current = 0;
|
|
@@ -105,7 +105,7 @@ export const AnimatedVideoPlayer = ({ children }: Props) => {
|
|
|
105
105
|
modalSnapPoints[1] - preparedTranslationY
|
|
106
106
|
);
|
|
107
107
|
|
|
108
|
-
setPlayerAnimationState(PlayerAnimationStateEnum.
|
|
108
|
+
setPlayerAnimationState(PlayerAnimationStateEnum.maximize);
|
|
109
109
|
} else {
|
|
110
110
|
resetPlayerAnimationState();
|
|
111
111
|
}
|
|
@@ -246,7 +246,7 @@ export const AnimationView = ({
|
|
|
246
246
|
default:
|
|
247
247
|
return getAnimationValue(
|
|
248
248
|
animationType,
|
|
249
|
-
PlayerAnimationStateEnum.
|
|
249
|
+
PlayerAnimationStateEnum.maximize
|
|
250
250
|
).toValue;
|
|
251
251
|
}
|
|
252
252
|
}, [defaultValue, videoModalState]);
|
|
@@ -344,7 +344,7 @@ export const AnimationView = ({
|
|
|
344
344
|
animatedValue,
|
|
345
345
|
getAnimationValue(animationType, playerAnimationState)
|
|
346
346
|
).start();
|
|
347
|
-
} else if (playerAnimationState === PlayerAnimationStateEnum.
|
|
347
|
+
} else if (playerAnimationState === PlayerAnimationStateEnum.maximize) {
|
|
348
348
|
animatedValue.setValue(defaultValue);
|
|
349
349
|
}
|
|
350
350
|
}, [playerAnimationState, startComponentsAnimation, defaultValue]);
|
|
@@ -14,12 +14,12 @@ import { useConfiguration } from "../utils";
|
|
|
14
14
|
|
|
15
15
|
export enum PlayerAnimationStateEnum {
|
|
16
16
|
minimize = "minimize",
|
|
17
|
-
|
|
17
|
+
maximize = "maximize",
|
|
18
18
|
drag_player = "drag_player",
|
|
19
19
|
drag_scroll = "drag_scroll",
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
type PlayerAnimationStateT = number | PlayerAnimationStateEnum | null;
|
|
22
|
+
export type PlayerAnimationStateT = number | PlayerAnimationStateEnum | null;
|
|
23
23
|
|
|
24
24
|
export type ModalAnimationContextT = {
|
|
25
25
|
isActiveGesture: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "13.0.0-rc.
|
|
3
|
+
"version": "13.0.0-rc.67",
|
|
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",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"redux-mock-store": "^1.5.3"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@applicaster/applicaster-types": "13.0.0-rc.
|
|
36
|
-
"@applicaster/zapp-react-native-bridge": "13.0.0-rc.
|
|
37
|
-
"@applicaster/zapp-react-native-redux": "13.0.0-rc.
|
|
38
|
-
"@applicaster/zapp-react-native-utils": "13.0.0-rc.
|
|
35
|
+
"@applicaster/applicaster-types": "13.0.0-rc.67",
|
|
36
|
+
"@applicaster/zapp-react-native-bridge": "13.0.0-rc.67",
|
|
37
|
+
"@applicaster/zapp-react-native-redux": "13.0.0-rc.67",
|
|
38
|
+
"@applicaster/zapp-react-native-utils": "13.0.0-rc.67",
|
|
39
39
|
"promise": "^8.3.0",
|
|
40
40
|
"react-router-native": "^5.1.2",
|
|
41
41
|
"url": "^0.11.0",
|