@zezosoft/zezo-ott-react-native-ui-kit 1.1.5 → 1.1.7
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/lib/module/components/Content/Card/Sliders/Styles/Three.js +5 -4
- package/lib/module/components/Content/Card/Sliders/Styles/Three.js.map +1 -1
- package/lib/module/components/Headers/Four.js +1 -1
- package/lib/module/components/Headers/Three.js +2 -1
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Three.d.ts.map +1 -1
- package/package.json +2 -14
- package/src/Styles/globalStyles.ts +0 -70
- package/src/assets/animations/135037-payment-processing-error.json +0 -1347
- package/src/assets/animations/7227-vui-animation.json +0 -3377
- package/src/assets/animations/Failed.json +0 -2103
- package/src/assets/animations/Pending.json +0 -522
- package/src/assets/animations/Successful.json +0 -2289
- package/src/assets/animations/heart.json +0 -788
- package/src/assets/animations/succesfull-payment.json +0 -2379
- package/src/assets/animations/voice-icon.json +0 -542
- package/src/assets/img/back.png +0 -0
- package/src/assets/img/bottom-panel.png +0 -0
- package/src/assets/img/camera.png +0 -0
- package/src/assets/img/camera2.png +0 -0
- package/src/assets/img/home.png +0 -0
- package/src/assets/img/lock.png +0 -0
- package/src/assets/img/play.png +0 -0
- package/src/assets/img/profile.jpg +0 -0
- package/src/assets/img/qr-code.png +0 -0
- package/src/assets/img/shadow.png +0 -0
- package/src/assets/img/shadow2.png +0 -0
- package/src/assets/img/user.png +0 -0
- package/src/assets/svg/Account.svg +0 -4
- package/src/assets/svg/Favourite.svg +0 -14
- package/src/assets/svg/Upcoming.svg +0 -4
- package/src/assets/svg/content-error.svg +0 -28
- package/src/assets/svg/download.svg +0 -3
- package/src/assets/svg/eye-off.svg +0 -10
- package/src/assets/svg/favorites.svg +0 -3
- package/src/assets/svg/h.svg +0 -4
- package/src/assets/svg/home.svg +0 -5
- package/src/assets/svg/home1.svg +0 -3
- package/src/assets/svg/menu-bar.svg +0 -4
- package/src/assets/svg/my-space.svg +0 -14
- package/src/assets/svg/play-icon-with-bg.svg +0 -5
- package/src/assets/svg/profile.svg +0 -4
- package/src/assets/svg/search.svg +0 -5
- package/src/assets/svg/search1.svg +0 -4
- package/src/assets/svg/server-error.svg +0 -139
- package/src/components/Account/Account.tsx +0 -367
- package/src/components/Account/index.ts +0 -1
- package/src/components/Alert/AlertDialog.tsx +0 -247
- package/src/components/Alert/UAAlert.tsx +0 -170
- package/src/components/Alert/index.ts +0 -2
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +0 -419
- package/src/components/Auth/One/ForgotPassword/ForgotPassword.tsx +0 -324
- package/src/components/Auth/One/Login/LoginWithEmail.tsx +0 -455
- package/src/components/Auth/One/Login/LoginWithPhone.tsx +0 -306
- package/src/components/Auth/One/OTP/OTP.tsx +0 -465
- package/src/components/Auth/One/QrLogin/QrLogin.tsx +0 -602
- package/src/components/Auth/One/QrLogin/components/QrViewArea.tsx +0 -423
- package/src/components/Auth/One/SignUp/SignUp.tsx +0 -479
- package/src/components/Auth/One/SplashScreen/SplashScreen.tsx +0 -249
- package/src/components/Auth/One/SplashScreen/components/SplashImage/SplashImage.tsx +0 -103
- package/src/components/Auth/One/SplashScreen/components/SplashLottie/SplashLottie.tsx +0 -77
- package/src/components/Auth/One/SplashScreen/components/SplashVideo/SplashVideo.tsx +0 -174
- package/src/components/Auth/One/index.ts +0 -24
- package/src/components/Auth/Two/AuthHeader/AuthHeader.tsx +0 -108
- package/src/components/Auth/Two/ForgotPassword/ForgotPassword.tsx +0 -335
- package/src/components/Auth/Two/Login/AuthLoginShell.tsx +0 -173
- package/src/components/Auth/Two/Login/LoginWithEmail.tsx +0 -279
- package/src/components/Auth/Two/Login/LoginWithPhone.tsx +0 -188
- package/src/components/Auth/Two/OTP/OTP.tsx +0 -465
- package/src/components/Auth/Two/QrLogin/QrLogin.tsx +0 -602
- package/src/components/Auth/Two/QrLogin/components/QrViewArea.tsx +0 -423
- package/src/components/Auth/Two/SignUp/SignUp.tsx +0 -472
- package/src/components/Auth/Two/SplashScreen/SplashScreen.tsx +0 -248
- package/src/components/Auth/Two/SplashScreen/components/SplashImage/SplashImage.tsx +0 -92
- package/src/components/Auth/Two/SplashScreen/components/SplashLottie/SplashLottie.tsx +0 -77
- package/src/components/Auth/Two/SplashScreen/components/SplashVideo/SplashVideo.tsx +0 -178
- package/src/components/Auth/Two/index.ts +0 -28
- package/src/components/Auth/index.ts +0 -11
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +0 -174
- package/src/components/BackgroundLayout/BackgroundLayoutOne.tsx +0 -56
- package/src/components/BlogView/BlogView.tsx +0 -276
- package/src/components/BlogView/index.ts +0 -8
- package/src/components/BlurView/BlurView.tsx +0 -199
- package/src/components/BlurView/index.ts +0 -7
- package/src/components/BottomSheet/BottomSheet.tsx +0 -200
- package/src/components/BottomSheet/BottomSheetOne.tsx +0 -220
- package/src/components/BottomSheet/index.ts +0 -4
- package/src/components/Button/BackBtn.tsx +0 -168
- package/src/components/Button/MenuBtn.tsx +0 -229
- package/src/components/Button/PrimaryBtn.tsx +0 -134
- package/src/components/Button/SecondaryBtn.tsx +0 -132
- package/src/components/Button/TextButton.tsx +0 -145
- package/src/components/Button/index.ts +0 -18
- package/src/components/Content/Card/Category/Category.tsx +0 -436
- package/src/components/Content/Card/Category/CategroyTwo.tsx +0 -429
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +0 -624
- package/src/components/Content/Card/Sliders/Styles/One.tsx +0 -490
- package/src/components/Content/Card/Sliders/Styles/Three.tsx +0 -935
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +0 -391
- package/src/components/Content/Card/Sliders/index.ts +0 -17
- package/src/components/Content/Card/Styles/Five.tsx +0 -385
- package/src/components/Content/Card/Styles/Four.tsx +0 -379
- package/src/components/Content/Card/Styles/One.tsx +0 -386
- package/src/components/Content/Card/Styles/RotateInOut.tsx +0 -413
- package/src/components/Content/Card/Styles/Six.tsx +0 -392
- package/src/components/Content/Card/Styles/Three.tsx +0 -314
- package/src/components/Content/Card/Styles/TopTen.tsx +0 -412
- package/src/components/Content/Card/Styles/Two.tsx +0 -416
- package/src/components/Content/Card/components/AdsPoster.tsx +0 -202
- package/src/components/Content/Card/components/CardPoster.tsx +0 -377
- package/src/components/Content/Card/components/NavigateToMore.tsx +0 -97
- package/src/components/Content/Card/components/RentOrBuyIcon.tsx +0 -129
- package/src/components/Content/Card/components/ShowAllButton.tsx +0 -92
- package/src/components/Content/Card/components/ThumbnailCard.tsx +0 -234
- package/src/components/Content/Card/components/index.ts +0 -1
- package/src/components/Content/Card/index.ts +0 -30
- package/src/components/Content/Content.tsx +0 -315
- package/src/components/Content/Sections.tsx +0 -238
- package/src/components/Content/types.ts +0 -176
- package/src/components/ContentView/MoreContentList.tsx +0 -327
- package/src/components/ContentView/One/ContentViewOne.tsx +0 -243
- package/src/components/ContentView/One/components/AboutSection.tsx +0 -216
- package/src/components/ContentView/One/components/CastCard.tsx +0 -265
- package/src/components/ContentView/One/components/EpisodeCard.tsx +0 -535
- package/src/components/ContentView/One/components/GenreTags.tsx +0 -132
- package/src/components/ContentView/One/components/HeroBanner.tsx +0 -357
- package/src/components/ContentView/One/components/MiniInfo.tsx +0 -356
- package/src/components/ContentView/One/components/PlayButton.tsx +0 -56
- package/src/components/ContentView/One/components/Title.tsx +0 -149
- package/src/components/ContentView/One/components/TrailerButton.tsx +0 -76
- package/src/components/ContentView/Two/ContentViewTwo.tsx +0 -343
- package/src/components/ContentView/Two/components/AboutSection.tsx +0 -216
- package/src/components/ContentView/Two/components/Details.tsx +0 -193
- package/src/components/ContentView/Two/components/EpisodeCard.tsx +0 -602
- package/src/components/ContentView/Two/components/GenreTags.tsx +0 -123
- package/src/components/ContentView/Two/components/HeroBanner.tsx +0 -402
- package/src/components/ContentView/Two/components/LikeShareActions.tsx +0 -125
- package/src/components/ContentView/Two/components/MoreLikeThisContentList .tsx +0 -305
- package/src/components/ContentView/Two/components/PlayOrTrailer.tsx +0 -133
- package/src/components/ContentView/Two/components/SectionTabs.tsx +0 -177
- package/src/components/ContentView/Two/components/Title.tsx +0 -226
- package/src/components/ContentView/Two/components/index.ts +0 -15
- package/src/components/ContentView/index.ts +0 -13
- package/src/components/Fallbacks/NoContentFallback.tsx +0 -176
- package/src/components/Fallbacks/NotFoundFallback.tsx +0 -94
- package/src/components/Fallbacks/index.ts +0 -2
- package/src/components/Headers/AppHeader.tsx +0 -150
- package/src/components/Headers/Four.tsx +0 -83
- package/src/components/Headers/One.tsx +0 -115
- package/src/components/Headers/Three.tsx +0 -135
- package/src/components/Headers/Two.tsx +0 -100
- package/src/components/Headers/index.ts +0 -18
- package/src/components/Input/Input.ts +0 -20
- package/src/components/Input/InputOne.tsx +0 -259
- package/src/components/Input/InputThree.tsx +0 -212
- package/src/components/Input/InputTwo.tsx +0 -212
- package/src/components/Input/PhoneNumberInput.tsx +0 -431
- package/src/components/Input/PhoneNumberInputTwo.tsx +0 -418
- package/src/components/Keyboard/HideKeyboard.tsx +0 -88
- package/src/components/Loader/Loader.tsx +0 -44
- package/src/components/Logo/Logo.tsx +0 -145
- package/src/components/NewRelease/NewReleaseSheet.tsx +0 -250
- package/src/components/NewRelease/index.ts +0 -1
- package/src/components/Reels/ReelsSeries/MediaControls/BottomControls.tsx +0 -221
- package/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.tsx +0 -314
- package/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.tsx +0 -196
- package/src/components/Reels/ReelsSeries/MediaControls/RightControls.tsx +0 -95
- package/src/components/Reels/ReelsSeries/MediaControls/TopControls.tsx +0 -163
- package/src/components/Reels/ReelsSeries/Model/DetailsModal.tsx +0 -210
- package/src/components/Reels/ReelsSeries/Model/SettingModal.tsx +0 -146
- package/src/components/Reels/ReelsSeries/Model/UnlockModal.tsx +0 -154
- package/src/components/Reels/ReelsSeries/ReelsSeries.tsx +0 -264
- package/src/components/Reels/ReelsSeries/ReelsSeriesItem.tsx +0 -494
- package/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.tsx +0 -184
- package/src/components/Reels/ReelsSeries/components/Episodes.tsx +0 -154
- package/src/components/Reels/ReelsSeries/components/GradientOverlay.tsx +0 -41
- package/src/components/Reels/ReelsSeries/components/Like.tsx +0 -40
- package/src/components/Reels/ReelsSeries/components/RotatingLoader.tsx +0 -79
- package/src/components/Reels/ReelsSeries/components/Synopsis.tsx +0 -332
- package/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.tsx +0 -187
- package/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.tsx +0 -80
- package/src/components/Reels/ReelsSeries/components/VideoControls/index.ts +0 -2
- package/src/components/Reels/ReelsSeries/types.ts +0 -54
- package/src/components/Reels/ReelsSeries/useReelsWatchProgress.ts +0 -85
- package/src/components/Reels/ReelsSeries/utils/quality.ts +0 -48
- package/src/components/Reels/index.ts +0 -9
- package/src/components/Reels/utils/Controls/gestureUtils.ts +0 -42
- package/src/components/Reels/utils/Controls/index.ts +0 -4
- package/src/components/Reels/utils/Controls/overlayUtils.ts +0 -35
- package/src/components/Reels/utils/Controls/videoControlsConstants.ts +0 -25
- package/src/components/Reels/utils/Controls/videoRef.ts +0 -4
- package/src/components/Reels/utils/index.ts +0 -1
- package/src/components/Reels/utils/timeoutUtils.ts +0 -29
- package/src/components/Search/One.tsx +0 -256
- package/src/components/Search/components/RecentSearchesSection.tsx +0 -181
- package/src/components/Search/components/SearchCard.tsx +0 -275
- package/src/components/Search/index.ts +0 -16
- package/src/components/Settings/AppSettings.tsx +0 -428
- package/src/components/Settings/index.ts +0 -1
- package/src/components/Subscription/SubOne.tsx +0 -874
- package/src/components/Subscription/index.ts +0 -12
- package/src/components/TabBar/One.tsx +0 -148
- package/src/components/TabBar/Three.tsx +0 -169
- package/src/components/TabBar/Two.tsx +0 -189
- package/src/components/TabBar/index.ts +0 -20
- package/src/components/Text/Text.tsx +0 -85
- package/src/components/Text/index.ts +0 -5
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +0 -468
- package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +0 -278
- package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +0 -494
- package/src/components/User/WatchHistory/WatchHistory.tsx +0 -227
- package/src/components/User/WatchLater/WatchLater.tsx +0 -397
- package/src/components/User/components/UserAvatar.tsx +0 -120
- package/src/components/User/components/UserSection.tsx +0 -228
- package/src/components/User/index.ts +0 -18
- package/src/components/View/View.tsx +0 -37
- package/src/components/View/index.ts +0 -5
- package/src/components/common/AppStatusBar.tsx +0 -57
- package/src/components/index.ts +0 -29
- package/src/components/layout/SafeAreaWrapper.tsx +0 -45
- package/src/components/layout/index.ts +0 -1
- package/src/constants/dummySections.ts +0 -98
- package/src/hooks/Images/index.ts +0 -2
- package/src/hooks/Images/useImageLoader.ts +0 -206
- package/src/hooks/Images/useImageValidation.ts +0 -36
- package/src/hooks/index.ts +0 -17
- package/src/hooks/useAdTracking.ts +0 -349
- package/src/hooks/useCards.ts +0 -228
- package/src/hooks/useDebounce.ts +0 -35
- package/src/hooks/useKeyboard.ts +0 -43
- package/src/hooks/useNavigationMode.ts +0 -46
- package/src/hooks/usePaginatedSection.ts +0 -101
- package/src/hooks/usePrevious.ts +0 -28
- package/src/hooks/useSafeCallback.ts +0 -43
- package/src/hooks/useSkeletonItems.ts +0 -30
- package/src/hooks/useSplashCache.ts +0 -186
- package/src/hooks/useThemeColors.ts +0 -51
- package/src/index.tsx +0 -8
- package/src/store/RecentSearchesStore.ts +0 -78
- package/src/store/splashStore.ts +0 -91
- package/src/store/themeStore.ts +0 -43
- package/src/theme/ThemeProvider.tsx +0 -112
- package/src/theme/hook/index.ts +0 -1
- package/src/theme/hook/useInternalTheme.ts +0 -98
- package/src/theme/index.ts +0 -7
- package/src/theme/themes.ts +0 -336
- package/src/theme/utils/validateColor.ts +0 -127
- package/src/types/content/content-view.types.ts +0 -206
- package/src/types/hook/index.ts +0 -5
- package/src/types/hook/usePaginatedSetion.ts +0 -19
- package/src/types/index.ts +0 -7
- package/src/types/sections/index.ts +0 -84
- package/src/utils/Display.ts +0 -14
- package/src/utils/Formater.ts +0 -14
- package/src/utils/PlatformSelector.ts +0 -29
- package/src/utils/SizeMatters.ts +0 -7
- package/src/utils/Spacing.ts +0 -27
- package/src/utils/colorUtils.ts +0 -70
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Wed 02 Jul 2025 at 03:38 PM
|
|
4
|
-
* */
|
|
5
|
-
|
|
6
|
-
import React, { useMemo } from 'react';
|
|
7
|
-
import {
|
|
8
|
-
TouchableOpacity,
|
|
9
|
-
StyleSheet,
|
|
10
|
-
type GestureResponderEvent,
|
|
11
|
-
} from 'react-native';
|
|
12
|
-
import { PlayCircleIcon } from 'lucide-react-native';
|
|
13
|
-
import { moderateScale, scale, verticalScale } from 'react-native-size-matters';
|
|
14
|
-
import { useSafePressHandler } from '../../../../hooks/useSafeCallback';
|
|
15
|
-
|
|
16
|
-
interface Props {
|
|
17
|
-
onPress?: (event: GestureResponderEvent) => void;
|
|
18
|
-
size?: number;
|
|
19
|
-
color?: string;
|
|
20
|
-
backgroundColor?: string;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const PlayButton = React.memo(
|
|
24
|
-
({
|
|
25
|
-
onPress,
|
|
26
|
-
size = scale(40),
|
|
27
|
-
color = 'black',
|
|
28
|
-
backgroundColor = '#FFD700',
|
|
29
|
-
}: Props) => {
|
|
30
|
-
const buttonStyle = useMemo(
|
|
31
|
-
() => [styles.button, { backgroundColor, borderRadius: size }],
|
|
32
|
-
[backgroundColor, size]
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
const handlePress = useSafePressHandler(onPress);
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<TouchableOpacity
|
|
39
|
-
activeOpacity={0.8}
|
|
40
|
-
onPress={handlePress}
|
|
41
|
-
style={buttonStyle}
|
|
42
|
-
>
|
|
43
|
-
<PlayCircleIcon size={size} color={color} />
|
|
44
|
-
</TouchableOpacity>
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
const styles = StyleSheet.create({
|
|
50
|
-
button: {
|
|
51
|
-
padding: moderateScale(6),
|
|
52
|
-
marginBottom: verticalScale(10),
|
|
53
|
-
alignItems: 'center',
|
|
54
|
-
justifyContent: 'center',
|
|
55
|
-
},
|
|
56
|
-
});
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Tue 01 Jul 2025 at 02:28 PM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { useMemo } from 'react';
|
|
7
|
-
import {
|
|
8
|
-
View,
|
|
9
|
-
StyleSheet,
|
|
10
|
-
type StyleProp,
|
|
11
|
-
type ViewStyle,
|
|
12
|
-
type TextStyle,
|
|
13
|
-
} from 'react-native';
|
|
14
|
-
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
|
|
15
|
-
import { scale } from 'react-native-size-matters';
|
|
16
|
-
import { Text } from '../../../Text';
|
|
17
|
-
import type { ITheme } from '../../../../theme/themes';
|
|
18
|
-
import { RFValue } from 'react-native-responsive-fontsize';
|
|
19
|
-
import type { IContentData } from '@zezosoft/zezo-ott-api-client';
|
|
20
|
-
|
|
21
|
-
type Props = {
|
|
22
|
-
title: IContentData['name'];
|
|
23
|
-
subtitle: string;
|
|
24
|
-
rating: IContentData['rating'];
|
|
25
|
-
theme: ITheme;
|
|
26
|
-
isLoading?: boolean;
|
|
27
|
-
style?: {
|
|
28
|
-
container?: StyleProp<ViewStyle>;
|
|
29
|
-
title?: StyleProp<TextStyle>;
|
|
30
|
-
subTitle?: StyleProp<TextStyle>;
|
|
31
|
-
rating?: StyleProp<TextStyle>;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const Title = React.memo(
|
|
36
|
-
({
|
|
37
|
-
title,
|
|
38
|
-
subtitle,
|
|
39
|
-
rating,
|
|
40
|
-
theme,
|
|
41
|
-
isLoading = false,
|
|
42
|
-
style,
|
|
43
|
-
}: Props): React.ReactElement => {
|
|
44
|
-
const containerStyle = useMemo(
|
|
45
|
-
() => StyleSheet.flatten([styles.container, style?.container]),
|
|
46
|
-
[style?.container]
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
const titleStyle = useMemo(
|
|
50
|
-
() => StyleSheet.flatten([styles.title, style?.title]),
|
|
51
|
-
[style?.title]
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
const subTitleStyle = useMemo(
|
|
55
|
-
() => StyleSheet.flatten([styles.subTitle, style?.subTitle]),
|
|
56
|
-
[style?.subTitle]
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
const ratingStyle = useMemo(
|
|
60
|
-
() => StyleSheet.flatten([styles.rating, style?.rating]),
|
|
61
|
-
[style?.rating]
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
if (isLoading) {
|
|
65
|
-
return (
|
|
66
|
-
<View style={containerStyle}>
|
|
67
|
-
<SkeletonPlaceholder
|
|
68
|
-
backgroundColor={theme.colors.skeletonBaseColor}
|
|
69
|
-
highlightColor={theme.colors.skeletonHighlightColor}
|
|
70
|
-
>
|
|
71
|
-
<SkeletonPlaceholder.Item>
|
|
72
|
-
{/* Title & Subtitle */}
|
|
73
|
-
<SkeletonPlaceholder.Item flexDirection="row" alignItems="center">
|
|
74
|
-
<SkeletonPlaceholder.Item
|
|
75
|
-
width={scale(160)}
|
|
76
|
-
height={scale(22)}
|
|
77
|
-
borderRadius={scale(4)}
|
|
78
|
-
/>
|
|
79
|
-
<SkeletonPlaceholder.Item
|
|
80
|
-
width={scale(60)}
|
|
81
|
-
height={scale(22)}
|
|
82
|
-
borderRadius={scale(4)}
|
|
83
|
-
marginLeft={scale(6)}
|
|
84
|
-
/>
|
|
85
|
-
</SkeletonPlaceholder.Item>
|
|
86
|
-
|
|
87
|
-
{/* Rating */}
|
|
88
|
-
<SkeletonPlaceholder.Item
|
|
89
|
-
width={scale(36)}
|
|
90
|
-
height={scale(16)}
|
|
91
|
-
borderRadius={scale(4)}
|
|
92
|
-
marginTop={scale(6)}
|
|
93
|
-
/>
|
|
94
|
-
</SkeletonPlaceholder.Item>
|
|
95
|
-
</SkeletonPlaceholder>
|
|
96
|
-
</View>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return (
|
|
101
|
-
<View style={containerStyle}>
|
|
102
|
-
<View>
|
|
103
|
-
<Text
|
|
104
|
-
color={theme.colors.textPrimary}
|
|
105
|
-
style={titleStyle}
|
|
106
|
-
ellipsizeMode="tail"
|
|
107
|
-
>
|
|
108
|
-
{title}
|
|
109
|
-
{!!subtitle && (
|
|
110
|
-
<Text
|
|
111
|
-
color={theme.colors.textSecondary}
|
|
112
|
-
style={subTitleStyle}
|
|
113
|
-
ellipsizeMode="tail"
|
|
114
|
-
>
|
|
115
|
-
{' '}
|
|
116
|
-
{`: ${subtitle}`}
|
|
117
|
-
</Text>
|
|
118
|
-
)}
|
|
119
|
-
</Text>
|
|
120
|
-
</View>
|
|
121
|
-
|
|
122
|
-
{!!rating && (
|
|
123
|
-
<Text color={theme.colors.textSecondary} style={ratingStyle}>
|
|
124
|
-
⭐ {rating}
|
|
125
|
-
</Text>
|
|
126
|
-
)}
|
|
127
|
-
</View>
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
const styles = StyleSheet.create({
|
|
133
|
-
container: {
|
|
134
|
-
paddingHorizontal: scale(12),
|
|
135
|
-
marginTop: scale(5),
|
|
136
|
-
},
|
|
137
|
-
title: {
|
|
138
|
-
fontSize: RFValue(15),
|
|
139
|
-
fontWeight: 'bold',
|
|
140
|
-
},
|
|
141
|
-
subTitle: {
|
|
142
|
-
fontSize: RFValue(15),
|
|
143
|
-
marginLeft: scale(6),
|
|
144
|
-
},
|
|
145
|
-
rating: {
|
|
146
|
-
fontSize: RFValue(12),
|
|
147
|
-
marginTop: scale(4),
|
|
148
|
-
},
|
|
149
|
-
});
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Wed 02 Jul 2025 at 03:39 PM
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { useMemo } from 'react';
|
|
7
|
-
import { PlayCircle } from 'lucide-react-native';
|
|
8
|
-
import {
|
|
9
|
-
TouchableOpacity,
|
|
10
|
-
StyleSheet,
|
|
11
|
-
type GestureResponderEvent,
|
|
12
|
-
type TextStyle,
|
|
13
|
-
type ViewStyle,
|
|
14
|
-
} from 'react-native';
|
|
15
|
-
import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
|
|
16
|
-
import { Text } from '../../../Text';
|
|
17
|
-
import { useSafePressHandler } from '../../../../hooks/useSafeCallback';
|
|
18
|
-
|
|
19
|
-
interface Props {
|
|
20
|
-
onPress?: (event: GestureResponderEvent) => void;
|
|
21
|
-
label?: string;
|
|
22
|
-
iconSize?: number;
|
|
23
|
-
color?: string;
|
|
24
|
-
backgroundColor?: string;
|
|
25
|
-
textStyle?: TextStyle;
|
|
26
|
-
style?: ViewStyle;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const TrailerButton = React.memo(
|
|
30
|
-
({
|
|
31
|
-
onPress,
|
|
32
|
-
label = 'Watch Trailer',
|
|
33
|
-
iconSize = scale(18),
|
|
34
|
-
color = '#000',
|
|
35
|
-
backgroundColor = '#FFD700',
|
|
36
|
-
textStyle,
|
|
37
|
-
style,
|
|
38
|
-
}: Props) => {
|
|
39
|
-
const buttonStyle = useMemo(
|
|
40
|
-
() => [styles.button, { backgroundColor }, style],
|
|
41
|
-
[backgroundColor, style]
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
const textStyleMemo = useMemo(() => [styles.text, textStyle], [textStyle]);
|
|
45
|
-
|
|
46
|
-
const handlePress = useSafePressHandler(onPress);
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<TouchableOpacity
|
|
50
|
-
onPress={handlePress}
|
|
51
|
-
activeOpacity={0.8}
|
|
52
|
-
style={buttonStyle}
|
|
53
|
-
>
|
|
54
|
-
<PlayCircle size={iconSize} color={color} />
|
|
55
|
-
<Text style={textStyleMemo} color={color}>
|
|
56
|
-
{label}
|
|
57
|
-
</Text>
|
|
58
|
-
</TouchableOpacity>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
const styles = StyleSheet.create({
|
|
64
|
-
button: {
|
|
65
|
-
flexDirection: 'row',
|
|
66
|
-
paddingVertical: verticalScale(3),
|
|
67
|
-
paddingHorizontal: scale(6),
|
|
68
|
-
borderRadius: moderateScale(20),
|
|
69
|
-
alignItems: 'center',
|
|
70
|
-
},
|
|
71
|
-
text: {
|
|
72
|
-
fontWeight: '600',
|
|
73
|
-
fontSize: scale(12),
|
|
74
|
-
marginLeft: scale(2),
|
|
75
|
-
},
|
|
76
|
-
});
|
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Tue 01 Jul 2025 at 02:28 PM
|
|
4
|
-
*/
|
|
5
|
-
import React, { useMemo, useCallback, useState } from 'react';
|
|
6
|
-
import { ScrollView, StyleSheet } from 'react-native';
|
|
7
|
-
import { useInternalTheme } from '../../../theme/hook/useInternalTheme';
|
|
8
|
-
import { CastCard } from '../One/components/CastCard';
|
|
9
|
-
import { scale } from 'react-native-size-matters';
|
|
10
|
-
import type {
|
|
11
|
-
ComponentProps,
|
|
12
|
-
LikeShareEventArgs,
|
|
13
|
-
} from '../../../types/content/content-view.types';
|
|
14
|
-
import { NotFoundFallback } from '../../Fallbacks';
|
|
15
|
-
import {
|
|
16
|
-
AboutSection,
|
|
17
|
-
Details,
|
|
18
|
-
GenreTags,
|
|
19
|
-
HeroBanner,
|
|
20
|
-
PlayOrTrailer,
|
|
21
|
-
SectionTabs,
|
|
22
|
-
Title,
|
|
23
|
-
type playButtonConfig,
|
|
24
|
-
} from './components';
|
|
25
|
-
import type { IContentData } from '@zezosoft/zezo-ott-api-client';
|
|
26
|
-
import MoreLikeThisContentList from './components/MoreLikeThisContentList ';
|
|
27
|
-
import { EpisodeCard } from './components/EpisodeCard';
|
|
28
|
-
|
|
29
|
-
export const ContentViewTwo = React.memo(
|
|
30
|
-
({
|
|
31
|
-
content,
|
|
32
|
-
seasons,
|
|
33
|
-
isLoading = false,
|
|
34
|
-
seasonsIsLoading = false,
|
|
35
|
-
theme,
|
|
36
|
-
text,
|
|
37
|
-
recommendedContent,
|
|
38
|
-
isLiked = false,
|
|
39
|
-
events,
|
|
40
|
-
titleStyles,
|
|
41
|
-
genreTagsStyles,
|
|
42
|
-
aboutSectionStyles,
|
|
43
|
-
castStyles,
|
|
44
|
-
history,
|
|
45
|
-
episodeCardMode,
|
|
46
|
-
playButtonConfig,
|
|
47
|
-
// pricingAndExpiryInfo,
|
|
48
|
-
}: Omit<ComponentProps, 'heroBannerProps'> & {
|
|
49
|
-
playButtonConfig?: playButtonConfig;
|
|
50
|
-
}) => {
|
|
51
|
-
const { theme: appliedTheme } = useInternalTheme(theme);
|
|
52
|
-
const hasFetchedOnce = !!recommendedContent?.content;
|
|
53
|
-
|
|
54
|
-
const seekTime = useMemo(
|
|
55
|
-
() => history?.currentTime || 0,
|
|
56
|
-
[history?.currentTime]
|
|
57
|
-
);
|
|
58
|
-
const isComplete = useMemo(
|
|
59
|
-
() => history?.completed || false,
|
|
60
|
-
[history?.completed]
|
|
61
|
-
);
|
|
62
|
-
const currentEpisode = useMemo(
|
|
63
|
-
() => history?.current_episode,
|
|
64
|
-
[history?.current_episode]
|
|
65
|
-
);
|
|
66
|
-
const isNotFound = useMemo(
|
|
67
|
-
() => !isLoading && !content,
|
|
68
|
-
[isLoading, content]
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
// Memoize play handler
|
|
72
|
-
const handlePlayPress = useCallback(
|
|
73
|
-
({ is_trailer }: { is_trailer?: boolean }) => {
|
|
74
|
-
if (!content) return;
|
|
75
|
-
events?.onPlay?.({
|
|
76
|
-
id: content._id,
|
|
77
|
-
slug: content.slug,
|
|
78
|
-
type: content.type,
|
|
79
|
-
current_episode: currentEpisode,
|
|
80
|
-
mode: 'fullscreen',
|
|
81
|
-
is_trailer,
|
|
82
|
-
seekTime: isComplete ? 0 : seekTime,
|
|
83
|
-
});
|
|
84
|
-
},
|
|
85
|
-
[content, currentEpisode, isComplete, seekTime, events]
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
const handleLikePress = useCallback(
|
|
89
|
-
async (args: LikeShareEventArgs) => {
|
|
90
|
-
await events?.onLikeContent?.(args);
|
|
91
|
-
},
|
|
92
|
-
[events]
|
|
93
|
-
);
|
|
94
|
-
|
|
95
|
-
const handleSharePress = useCallback(
|
|
96
|
-
async (args: LikeShareEventArgs) => {
|
|
97
|
-
const { id, source } = args;
|
|
98
|
-
|
|
99
|
-
if (!events?.onShareContent) {
|
|
100
|
-
console.error('Share API not provided');
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
try {
|
|
105
|
-
await events.onShareContent({ id, source });
|
|
106
|
-
} catch (error) {
|
|
107
|
-
console.error('Share API failed', error);
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
[events]
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
const handleEpisodePress = useCallback(
|
|
114
|
-
({
|
|
115
|
-
season_id,
|
|
116
|
-
episode_id,
|
|
117
|
-
episode_number,
|
|
118
|
-
}: {
|
|
119
|
-
season_id: string;
|
|
120
|
-
episode_id: string;
|
|
121
|
-
episode_number: number;
|
|
122
|
-
}) => {
|
|
123
|
-
if (!content || seasonsIsLoading) return;
|
|
124
|
-
events?.onPlay?.({
|
|
125
|
-
id: content._id,
|
|
126
|
-
slug: content.slug,
|
|
127
|
-
type: content.type,
|
|
128
|
-
current_episode: episode_id,
|
|
129
|
-
current_season: season_id,
|
|
130
|
-
episode_number,
|
|
131
|
-
});
|
|
132
|
-
},
|
|
133
|
-
[content, seasonsIsLoading, events]
|
|
134
|
-
);
|
|
135
|
-
|
|
136
|
-
const handleRecommendedItemPress = useCallback(
|
|
137
|
-
(item: any) => {
|
|
138
|
-
events?.onPressRecommendedItem?.({ item });
|
|
139
|
-
},
|
|
140
|
-
[events]
|
|
141
|
-
);
|
|
142
|
-
|
|
143
|
-
const notFoundText = useMemo(
|
|
144
|
-
() => ({
|
|
145
|
-
title: text?.notFound?.title || 'Oops! Content Not Found',
|
|
146
|
-
subtitle:
|
|
147
|
-
text?.notFound?.subtitle ||
|
|
148
|
-
"We couldn't find anything to show here. Please check back later.",
|
|
149
|
-
buttonText: text?.notFound?.buttonText || 'Go Back',
|
|
150
|
-
}),
|
|
151
|
-
[text?.notFound]
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
const showEpisodes = useMemo(
|
|
155
|
-
() =>
|
|
156
|
-
content?.type === 'series' &&
|
|
157
|
-
(seasonsIsLoading || (seasons && seasons.length > 0)),
|
|
158
|
-
[content?.type, seasonsIsLoading, seasons]
|
|
159
|
-
);
|
|
160
|
-
|
|
161
|
-
// Memoize show recommended condition
|
|
162
|
-
// const showRecommended = useMemo(
|
|
163
|
-
// () => recommendedContent && recommendedContent?.content,
|
|
164
|
-
// [recommendedContent]
|
|
165
|
-
// );
|
|
166
|
-
|
|
167
|
-
const [activeTab, setActiveTab] = useState<'more' | 'details'>('more');
|
|
168
|
-
|
|
169
|
-
// const playButtonConfig = useMemo(() => {
|
|
170
|
-
// if (!content) return { title: 'Watch Now', mode: 'WATCH NOW' as const };
|
|
171
|
-
|
|
172
|
-
// switch (content.content_offering_type) {
|
|
173
|
-
// case 'BUY_OR_RENT':
|
|
174
|
-
// return { title: 'Rent Now', mode: 'RENT NOW' as const };
|
|
175
|
-
|
|
176
|
-
// case 'PREMIUM':
|
|
177
|
-
// return { title: 'Subscribe', mode: 'SUBSCRIBE' as const };
|
|
178
|
-
|
|
179
|
-
// default:
|
|
180
|
-
// return { title: 'Watch Now', mode: 'WATCH NOW' as const };
|
|
181
|
-
// }
|
|
182
|
-
// }, [content]);
|
|
183
|
-
|
|
184
|
-
return (
|
|
185
|
-
<>
|
|
186
|
-
{isNotFound ? (
|
|
187
|
-
<NotFoundFallback
|
|
188
|
-
title={notFoundText.title}
|
|
189
|
-
subtitle={notFoundText.subtitle}
|
|
190
|
-
backButtonText={notFoundText.buttonText}
|
|
191
|
-
onPressBack={events?.onBackPress}
|
|
192
|
-
theme={theme}
|
|
193
|
-
/>
|
|
194
|
-
) : (
|
|
195
|
-
<ScrollView
|
|
196
|
-
showsVerticalScrollIndicator={false}
|
|
197
|
-
keyboardShouldPersistTaps="handled"
|
|
198
|
-
bounces={false}
|
|
199
|
-
contentContainerStyle={[
|
|
200
|
-
styles.scrollContent,
|
|
201
|
-
{ flexGrow: 1 }, // 🔥 IMPORTANT
|
|
202
|
-
]}
|
|
203
|
-
>
|
|
204
|
-
<HeroBanner
|
|
205
|
-
backgroundImage={content?.thumbnail}
|
|
206
|
-
title={content?.name}
|
|
207
|
-
theme={theme}
|
|
208
|
-
isLoading={isLoading}
|
|
209
|
-
onBackPress={events?.onBackPress}
|
|
210
|
-
titleImage={content?.title_image}
|
|
211
|
-
/>
|
|
212
|
-
<Title
|
|
213
|
-
contentId={content?._id}
|
|
214
|
-
subtitle={content?.u_age}
|
|
215
|
-
rating={content?.rating}
|
|
216
|
-
releaseYear={content?.release_year}
|
|
217
|
-
duration={content?.duration}
|
|
218
|
-
language={
|
|
219
|
-
typeof content?.language === 'string'
|
|
220
|
-
? content.language
|
|
221
|
-
: (content?.language?.name ?? null)
|
|
222
|
-
}
|
|
223
|
-
theme={appliedTheme}
|
|
224
|
-
isLoading={isLoading}
|
|
225
|
-
isLiked={isLiked}
|
|
226
|
-
onPressLike={handleLikePress}
|
|
227
|
-
onPressShare={handleSharePress}
|
|
228
|
-
style={titleStyles}
|
|
229
|
-
/>
|
|
230
|
-
|
|
231
|
-
{/* <MiniInfo
|
|
232
|
-
content={content}
|
|
233
|
-
theme={theme}
|
|
234
|
-
isLoading={isLoading}
|
|
235
|
-
{...pricingAndExpiryInfo}
|
|
236
|
-
/> */}
|
|
237
|
-
|
|
238
|
-
<PlayOrTrailer
|
|
239
|
-
onPressPlay={handlePlayPress}
|
|
240
|
-
theme={theme}
|
|
241
|
-
isLoading={isLoading}
|
|
242
|
-
playButtonConfig={playButtonConfig}
|
|
243
|
-
/>
|
|
244
|
-
|
|
245
|
-
<GenreTags
|
|
246
|
-
genres={content?.genres}
|
|
247
|
-
theme={appliedTheme}
|
|
248
|
-
isLoading={isLoading}
|
|
249
|
-
style={genreTagsStyles}
|
|
250
|
-
/>
|
|
251
|
-
<AboutSection
|
|
252
|
-
theme={appliedTheme}
|
|
253
|
-
description={content?.description}
|
|
254
|
-
release_year={content?.release_year}
|
|
255
|
-
isLoading={isLoading}
|
|
256
|
-
style={aboutSectionStyles}
|
|
257
|
-
/>
|
|
258
|
-
{showEpisodes && (
|
|
259
|
-
<EpisodeCard
|
|
260
|
-
isLoading={seasonsIsLoading}
|
|
261
|
-
seasons={seasonsIsLoading ? [] : (seasons ?? [])}
|
|
262
|
-
onPress={handleEpisodePress}
|
|
263
|
-
theme={theme}
|
|
264
|
-
mode={
|
|
265
|
-
episodeCardMode ?? ('horizontal' as 'horizontal' | 'vertical')
|
|
266
|
-
}
|
|
267
|
-
content_offering_type={content?.content_offering_type}
|
|
268
|
-
/>
|
|
269
|
-
)}
|
|
270
|
-
<CastCard
|
|
271
|
-
theme={appliedTheme}
|
|
272
|
-
data={content?.cast || null}
|
|
273
|
-
isLoading={isLoading}
|
|
274
|
-
onItemPress={() => {}}
|
|
275
|
-
style={castStyles}
|
|
276
|
-
/>
|
|
277
|
-
<SectionTabs
|
|
278
|
-
theme={appliedTheme}
|
|
279
|
-
isLoading={isLoading}
|
|
280
|
-
activeTab={activeTab}
|
|
281
|
-
onTabChange={setActiveTab}
|
|
282
|
-
/>
|
|
283
|
-
|
|
284
|
-
{activeTab === 'more' && (
|
|
285
|
-
<MoreLikeThisContentList
|
|
286
|
-
contentList={
|
|
287
|
-
recommendedContent?.content?.data?.filter(
|
|
288
|
-
(item): item is IContentData =>
|
|
289
|
-
'name' in item && '_id' in item
|
|
290
|
-
) ?? []
|
|
291
|
-
}
|
|
292
|
-
isLoading={isLoading}
|
|
293
|
-
hasFetchedOnce={hasFetchedOnce}
|
|
294
|
-
theme={theme}
|
|
295
|
-
onItemPress={handleRecommendedItemPress}
|
|
296
|
-
moreDataIsLoading={false}
|
|
297
|
-
/>
|
|
298
|
-
)}
|
|
299
|
-
|
|
300
|
-
{activeTab === 'details' && (
|
|
301
|
-
<Details
|
|
302
|
-
theme={appliedTheme}
|
|
303
|
-
isLoading={isLoading}
|
|
304
|
-
content={content}
|
|
305
|
-
/>
|
|
306
|
-
)}
|
|
307
|
-
|
|
308
|
-
{/* {showRecommended && recommendedContent && (
|
|
309
|
-
<Cards.Styles.Four
|
|
310
|
-
section_id={recommendedContent._id}
|
|
311
|
-
title={recommendedContent.name}
|
|
312
|
-
type={recommendedContent.type}
|
|
313
|
-
data={recommendedContent.content}
|
|
314
|
-
isLoading={isLoading}
|
|
315
|
-
theme={theme}
|
|
316
|
-
onPressItem={handleRecommendedItemPress}
|
|
317
|
-
onPressMore={events?.onPressRecommendedMore}
|
|
318
|
-
moreFetchData={events?.moreFetchDataRecommended}
|
|
319
|
-
{...recommendedContentCardStyles}
|
|
320
|
-
/>
|
|
321
|
-
)} */}
|
|
322
|
-
</ScrollView>
|
|
323
|
-
)}
|
|
324
|
-
</>
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
);
|
|
328
|
-
|
|
329
|
-
const styles = StyleSheet.create({
|
|
330
|
-
scrollContent: {
|
|
331
|
-
paddingBottom: scale(30),
|
|
332
|
-
},
|
|
333
|
-
});
|
|
334
|
-
|
|
335
|
-
export namespace ContentViewTwo {
|
|
336
|
-
export type Props = ComponentProps;
|
|
337
|
-
export type RecommendedContent = Props['recommendedContent'];
|
|
338
|
-
export type HeroBannerProps = Props['heroBannerProps'];
|
|
339
|
-
export type MenuAction = NonNullable<
|
|
340
|
-
NonNullable<ComponentProps['heroBannerProps']>['menuActions']
|
|
341
|
-
>[number];
|
|
342
|
-
export type History = NonNullable<ComponentProps['history']>;
|
|
343
|
-
}
|