@zezosoft/zezo-ott-react-native-ui-kit 1.0.4 → 1.0.5
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/assets/animations/Failed.json +2103 -0
- package/lib/module/assets/animations/Pending.json +522 -0
- package/lib/module/assets/animations/Successful.json +2289 -0
- package/lib/module/components/Alert/AlertDialog.js +208 -0
- package/lib/module/components/Alert/AlertDialog.js.map +1 -0
- package/lib/module/components/Alert/index.js +1 -0
- package/lib/module/components/Alert/index.js.map +1 -1
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js +270 -0
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -0
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js +63 -65
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js +82 -41
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -1
- package/lib/module/components/Auth/index.js +2 -0
- package/lib/module/components/Auth/index.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +3 -3
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
- package/lib/module/components/Button/SecondaryBtn.js +91 -0
- package/lib/module/components/Button/SecondaryBtn.js.map +1 -0
- package/lib/module/components/Button/index.js +2 -0
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js +6 -3
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +4 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +4 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Five.js +1 -0
- package/lib/module/components/Content/Card/Styles/Five.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Four.js +1 -0
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/One.js +7 -3
- package/lib/module/components/Content/Card/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +1 -0
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Six.js +4 -1
- package/lib/module/components/Content/Card/Styles/Six.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Three.js +1 -0
- package/lib/module/components/Content/Card/Styles/Three.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/TopTen.js +1 -0
- package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Two.js +1 -0
- package/lib/module/components/Content/Card/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/components/CardPoster.js +12 -28
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js +116 -0
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js.map +1 -0
- package/lib/module/components/Content/Card/components/ThumbnailCard.js +1 -2
- package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +1 -0
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/MoreContentList.js +1 -0
- package/lib/module/components/ContentView/MoreContentList.js.map +1 -1
- package/lib/module/components/ContentView/components/EpisodeCard.js +6 -10
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
- package/lib/module/components/ContentView/components/HeroBanner.js +17 -5
- package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +5 -5
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js +0 -4
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js.map +1 -1
- package/lib/module/components/Subscription/SubOne.js +2 -2
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js +11 -14
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js.map +1 -1
- package/lib/module/components/User/WatchHistory/WatchHistory.js +1 -0
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
- package/lib/module/components/User/WatchLater/WatchLater.js +1 -0
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
- package/lib/module/components/User/components/UserAvatar.js +35 -8
- package/lib/module/components/User/components/UserAvatar.js.map +1 -1
- package/lib/module/hooks/useSplashCache.js +117 -0
- package/lib/module/hooks/useSplashCache.js.map +1 -0
- package/lib/module/store/RecentSearchesStore.js +0 -1
- package/lib/module/store/RecentSearchesStore.js.map +1 -1
- package/lib/typescript/src/components/Alert/AlertDialog.d.ts +18 -0
- package/lib/typescript/src/components/Alert/AlertDialog.d.ts.map +1 -0
- package/lib/typescript/src/components/Alert/index.d.ts +1 -0
- package/lib/typescript/src/components/Alert/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts +35 -0
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -0
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts +4 -3
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/index.d.ts +2 -0
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts +21 -0
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/index.d.ts +11 -0
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/NowWatching/NowWatching.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Five.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Six.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +4 -2
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts +14 -0
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts.map +1 -0
- package/lib/typescript/src/components/ContentView/ContentView.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/MoreContentList.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts +2 -2
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts +4 -0
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useSplashCache.d.ts +22 -0
- package/lib/typescript/src/hooks/useSplashCache.d.ts.map +1 -0
- package/lib/typescript/src/store/RecentSearchesStore.d.ts.map +1 -1
- package/lib/typescript/src/types/content/content-view.types.d.ts +1 -0
- package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/animations/Failed.json +2103 -0
- package/src/assets/animations/Pending.json +522 -0
- package/src/assets/animations/Successful.json +2289 -0
- package/src/components/Alert/AlertDialog.tsx +247 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +344 -0
- package/src/components/Auth/SplashScreen/SplashScreen.tsx +89 -80
- package/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.tsx +90 -40
- package/src/components/Auth/index.ts +2 -0
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +3 -3
- package/src/components/Button/SecondaryBtn.tsx +116 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +4 -0
- package/src/components/Content/Card/Sliders/Styles/One.tsx +2 -0
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +2 -0
- package/src/components/Content/Card/Styles/Five.tsx +1 -0
- package/src/components/Content/Card/Styles/Four.tsx +1 -0
- package/src/components/Content/Card/Styles/One.tsx +7 -1
- package/src/components/Content/Card/Styles/RotateInOut.tsx +1 -0
- package/src/components/Content/Card/Styles/Six.tsx +2 -0
- package/src/components/Content/Card/Styles/Three.tsx +1 -0
- package/src/components/Content/Card/Styles/TopTen.tsx +1 -0
- package/src/components/Content/Card/Styles/Two.tsx +1 -0
- package/src/components/Content/Card/components/CardPoster.tsx +23 -51
- package/src/components/Content/Card/components/RentOrBuyIcon.tsx +109 -0
- package/src/components/Content/Card/components/ThumbnailCard.tsx +1 -2
- package/src/components/ContentView/ContentView.tsx +1 -0
- package/src/components/ContentView/MoreContentList.tsx +1 -0
- package/src/components/ContentView/components/EpisodeCard.tsx +4 -9
- package/src/components/ContentView/components/HeroBanner.tsx +16 -0
- package/src/components/Logo/Logo.tsx +5 -7
- package/src/components/Reels/ReelsSeries/Model/Synopsis.tsx +1 -8
- package/src/components/Subscription/SubOne.tsx +4 -2
- package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +13 -15
- package/src/components/User/WatchHistory/WatchHistory.tsx +1 -0
- package/src/components/User/WatchLater/WatchLater.tsx +1 -0
- package/src/components/User/components/UserAvatar.tsx +36 -3
- package/src/hooks/useSplashCache.ts +166 -0
- package/src/store/RecentSearchesStore.ts +0 -1
- package/src/types/content/content-view.types.ts +1 -0
- package/lib/module/hooks/useInitSplashCacheSync.js +0 -116
- package/lib/module/hooks/useInitSplashCacheSync.js.map +0 -1
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts +0 -22
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts.map +0 -1
- package/src/hooks/useInitSplashCacheSync.ts +0 -174
|
@@ -130,6 +130,7 @@ const MovieCard: React.FC<MovieCardProps> = ({
|
|
|
130
130
|
({ item, index }: ListRenderItemInfo<IContentData>) => {
|
|
131
131
|
return (
|
|
132
132
|
<TouchableOpacity
|
|
133
|
+
key={item._id}
|
|
133
134
|
style={[styles.item, itemStyle]}
|
|
134
135
|
onPress={() => handleItemPress(item)}
|
|
135
136
|
activeOpacity={0.8}
|
|
@@ -138,6 +139,8 @@ const MovieCard: React.FC<MovieCardProps> = ({
|
|
|
138
139
|
renderItemImage({ item, index })
|
|
139
140
|
) : (
|
|
140
141
|
<CardPoster
|
|
142
|
+
key={item._id}
|
|
143
|
+
content_offering_type={item.content_offering_type}
|
|
141
144
|
posterUri={item.poster}
|
|
142
145
|
theme={appliedTheme}
|
|
143
146
|
borderRadius={borderRadius}
|
|
@@ -233,7 +236,7 @@ const MovieCard: React.FC<MovieCardProps> = ({
|
|
|
233
236
|
ref={flatListRef}
|
|
234
237
|
data={data}
|
|
235
238
|
horizontal
|
|
236
|
-
keyExtractor={(item, index) =>
|
|
239
|
+
keyExtractor={(item, index) => (item._id ? item._id : `item-${index}`)}
|
|
237
240
|
renderItem={renderItem}
|
|
238
241
|
showsHorizontalScrollIndicator={false}
|
|
239
242
|
contentContainerStyle={styles.listContent}
|
|
@@ -273,6 +276,9 @@ const getStyles = (
|
|
|
273
276
|
borderRadius: radius,
|
|
274
277
|
backgroundColor: theme.colors.surfaceVariant,
|
|
275
278
|
},
|
|
279
|
+
imageWrapper: {
|
|
280
|
+
position: 'relative',
|
|
281
|
+
},
|
|
276
282
|
navigateToMoreContainer: {
|
|
277
283
|
paddingHorizontal: moderateScale(10),
|
|
278
284
|
marginBottom: verticalScale(8),
|
|
@@ -33,6 +33,7 @@ import type {
|
|
|
33
33
|
MoreFetchData,
|
|
34
34
|
} from '../../../../types';
|
|
35
35
|
import { RFValue } from 'react-native-responsive-fontsize';
|
|
36
|
+
import RentOrBuyIcon from '../components/RentOrBuyIcon';
|
|
36
37
|
const DEFAULT_ITEM_WIDTH = moderateScale(160);
|
|
37
38
|
const DEFAULT_BORDER_RADIUS = moderateScale(5);
|
|
38
39
|
const DEFAULT_SKELETON_COUNT = 3;
|
|
@@ -123,6 +124,7 @@ const MovieCardSix: React.FC<MovieCardSixProps> = ({
|
|
|
123
124
|
onPress={() => handleItemPress(item)}
|
|
124
125
|
activeOpacity={0.8}
|
|
125
126
|
>
|
|
127
|
+
<RentOrBuyIcon content_offering_type={item.content_offering_type} />
|
|
126
128
|
<ThumbnailCard
|
|
127
129
|
thumbnailUri={item.thumbnail}
|
|
128
130
|
theme={appliedTheme}
|
|
@@ -144,6 +144,7 @@ const MovieCardTwo: React.FC<MovieCardTwoProps> = ({
|
|
|
144
144
|
renderItemImage({ item, index })
|
|
145
145
|
) : (
|
|
146
146
|
<CardPoster
|
|
147
|
+
content_offering_type={item.content_offering_type}
|
|
147
148
|
posterUri={item.poster}
|
|
148
149
|
theme={appliedTheme}
|
|
149
150
|
borderRadius={borderRadius}
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import React, { useState, useEffect, useMemo } from 'react';
|
|
2
2
|
import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
ImageStyle,
|
|
6
|
-
ResizeMode,
|
|
3
|
+
import FastImage, {
|
|
4
|
+
type ResizeMode,
|
|
5
|
+
type ImageStyle,
|
|
7
6
|
} from 'react-native-fast-image';
|
|
8
|
-
import FastImage from 'react-native-fast-image';
|
|
9
7
|
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
|
|
10
8
|
import { scale } from 'react-native-size-matters';
|
|
11
9
|
import { Text } from '../../../Text';
|
|
12
10
|
import { ImageOff } from 'lucide-react-native';
|
|
13
11
|
import type { ITheme } from '../../../../theme/themes';
|
|
14
|
-
import {
|
|
12
|
+
import type { IContentData } from '../../../../types';
|
|
13
|
+
import RentOrBuyIcon from './RentOrBuyIcon';
|
|
15
14
|
|
|
16
15
|
export type CardPosterProps = {
|
|
16
|
+
content_offering_type?: IContentData['content_offering_type'];
|
|
17
17
|
posterUri: string;
|
|
18
18
|
theme: ITheme;
|
|
19
19
|
isLoading?: boolean;
|
|
20
20
|
borderRadius?: number;
|
|
21
21
|
posterWrapperStyle?: StyleProp<ViewStyle>;
|
|
22
|
-
imageStyle?:
|
|
22
|
+
imageStyle?: ImageStyle;
|
|
23
23
|
resizeMode?: ResizeMode;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
const CardPoster: React.FC<CardPosterProps> = ({
|
|
27
|
+
content_offering_type,
|
|
27
28
|
posterUri,
|
|
28
29
|
theme,
|
|
29
30
|
isLoading = false,
|
|
@@ -37,7 +38,6 @@ const CardPoster: React.FC<CardPosterProps> = ({
|
|
|
37
38
|
|
|
38
39
|
const hasValidPoster = useMemo(() => {
|
|
39
40
|
if (!posterUri || typeof posterUri !== 'string') return false;
|
|
40
|
-
|
|
41
41
|
const cleaned = posterUri.trim();
|
|
42
42
|
return (
|
|
43
43
|
(cleaned.startsWith('http://') || cleaned.startsWith('https://')) &&
|
|
@@ -75,21 +75,21 @@ const CardPoster: React.FC<CardPosterProps> = ({
|
|
|
75
75
|
<View
|
|
76
76
|
style={[
|
|
77
77
|
styles.posterWrapper,
|
|
78
|
-
|
|
79
|
-
{
|
|
80
|
-
borderRadius,
|
|
81
|
-
backgroundColor: theme.colors.background,
|
|
82
|
-
shadowColor: theme.colors.shadow,
|
|
83
|
-
},
|
|
78
|
+
{ borderRadius, backgroundColor: theme.colors.background },
|
|
84
79
|
posterWrapperStyle,
|
|
85
80
|
]}
|
|
86
81
|
>
|
|
82
|
+
{!showSkeleton && content_offering_type && (
|
|
83
|
+
<RentOrBuyIcon
|
|
84
|
+
key={posterUri}
|
|
85
|
+
content_offering_type={content_offering_type}
|
|
86
|
+
/>
|
|
87
|
+
)}
|
|
87
88
|
{showSkeleton && (
|
|
88
89
|
<View style={[styles.skeletonWrapper, { borderRadius }]}>
|
|
89
90
|
<SkeletonPlaceholder
|
|
90
91
|
backgroundColor={theme.colors.skeletonBaseColor}
|
|
91
92
|
highlightColor={theme.colors.skeletonHighlightColor}
|
|
92
|
-
speed={1000}
|
|
93
93
|
>
|
|
94
94
|
<SkeletonPlaceholder.Item
|
|
95
95
|
style={[styles.skeleton, { borderRadius }]}
|
|
@@ -97,7 +97,6 @@ const CardPoster: React.FC<CardPosterProps> = ({
|
|
|
97
97
|
</SkeletonPlaceholder>
|
|
98
98
|
</View>
|
|
99
99
|
)}
|
|
100
|
-
|
|
101
100
|
{hasValidPoster && (
|
|
102
101
|
<FastImage
|
|
103
102
|
source={{
|
|
@@ -112,24 +111,16 @@ const CardPoster: React.FC<CardPosterProps> = ({
|
|
|
112
111
|
]}
|
|
113
112
|
resizeMode={resizeMode}
|
|
114
113
|
onLoadStart={() => {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
setImageError(false);
|
|
118
|
-
} else {
|
|
119
|
-
setImageLoading(false);
|
|
120
|
-
setImageError(true);
|
|
121
|
-
}
|
|
122
|
-
}}
|
|
123
|
-
onLoad={() => {
|
|
124
|
-
setImageLoading(false);
|
|
114
|
+
setImageLoading(true);
|
|
115
|
+
setImageError(false);
|
|
125
116
|
}}
|
|
117
|
+
onLoad={() => setImageLoading(false)}
|
|
126
118
|
onError={() => {
|
|
127
119
|
setImageLoading(false);
|
|
128
120
|
setImageError(true);
|
|
129
121
|
}}
|
|
130
122
|
/>
|
|
131
123
|
)}
|
|
132
|
-
|
|
133
124
|
{!showSkeleton && (!hasValidPoster || imageError) && (
|
|
134
125
|
<View
|
|
135
126
|
style={[
|
|
@@ -144,9 +135,7 @@ const CardPoster: React.FC<CardPosterProps> = ({
|
|
|
144
135
|
<View
|
|
145
136
|
style={[
|
|
146
137
|
styles.fallback,
|
|
147
|
-
{
|
|
148
|
-
backgroundColor: theme.colors.errorContainer,
|
|
149
|
-
},
|
|
138
|
+
{ backgroundColor: theme.colors.errorContainer },
|
|
150
139
|
]}
|
|
151
140
|
>
|
|
152
141
|
<ImageOff size={scale(18)} color={theme.colors.error} />
|
|
@@ -169,30 +158,16 @@ const styles = StyleSheet.create({
|
|
|
169
158
|
overflow: 'hidden',
|
|
170
159
|
position: 'relative',
|
|
171
160
|
},
|
|
172
|
-
defaultPosterWrapper: {
|
|
173
|
-
shadowOffset: { width: 0, height: 2 },
|
|
174
|
-
shadowOpacity: 0.1,
|
|
175
|
-
shadowRadius: 3,
|
|
176
|
-
elevation: 2,
|
|
177
|
-
},
|
|
178
161
|
skeletonWrapper: {
|
|
179
162
|
position: 'absolute',
|
|
180
163
|
top: 0,
|
|
181
164
|
left: 0,
|
|
182
165
|
width: '100%',
|
|
183
166
|
aspectRatio: 2 / 3,
|
|
184
|
-
overflow: 'hidden',
|
|
185
|
-
},
|
|
186
|
-
skeleton: {
|
|
187
|
-
width: '100%',
|
|
188
|
-
aspectRatio: 2 / 3,
|
|
189
|
-
},
|
|
190
|
-
visible: {
|
|
191
|
-
opacity: 1,
|
|
192
|
-
},
|
|
193
|
-
hidden: {
|
|
194
|
-
opacity: 0,
|
|
195
167
|
},
|
|
168
|
+
skeleton: { width: '100%', aspectRatio: 2 / 3 },
|
|
169
|
+
visible: { opacity: 1 },
|
|
170
|
+
hidden: { opacity: 0 },
|
|
196
171
|
fallbackWrapper: {
|
|
197
172
|
position: 'absolute',
|
|
198
173
|
top: 0,
|
|
@@ -212,8 +187,5 @@ const styles = StyleSheet.create({
|
|
|
212
187
|
alignItems: 'center',
|
|
213
188
|
justifyContent: 'center',
|
|
214
189
|
},
|
|
215
|
-
fallbackText: {
|
|
216
|
-
marginTop: scale(4),
|
|
217
|
-
fontSize: RFValue(9),
|
|
218
|
-
},
|
|
190
|
+
fallbackText: { marginTop: scale(4), fontSize: 10 },
|
|
219
191
|
});
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
+
import Svg, { Path } from 'react-native-svg';
|
|
4
|
+
import { scale } from 'react-native-size-matters';
|
|
5
|
+
import type { IContentData } from '../../../../types';
|
|
6
|
+
import type { ITheme } from '../../../../theme/themes';
|
|
7
|
+
|
|
8
|
+
interface RentOrBuyIconProps {
|
|
9
|
+
theme?: ITheme;
|
|
10
|
+
content_offering_type: IContentData['content_offering_type'];
|
|
11
|
+
position?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
12
|
+
style?: StyleProp<ViewStyle>;
|
|
13
|
+
size?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const PremiumIcon: React.FC<{ fillColor: string }> = ({ fillColor }) => (
|
|
17
|
+
<Svg viewBox="0 0 1024 1024" width="100%" height="100%">
|
|
18
|
+
<Path
|
|
19
|
+
transform="translate(507,81)"
|
|
20
|
+
d="M0 0l19 1 15 3 15 6 11 6 13 10 11 11 9 13 8 15 5 17 2 14v15l-3 17-5 15-7 14-9 12-9 10-15 11-16 8-10 4h-3l13 49 12 36 9 24 14 30 9 17 13 21 10 13 11 13 7 8 11 9 10 8 12 7 16 7 21 5h28l16-4 15-5 22-12 12-9 10-8 10-9 9-9 2-3h2l2-4 8-9 13-18 7-10 9-15 11-19 13-27 5-13-5-2-13-12-7-8-7-11-6-15-2-11v-22l5-19 8-15 11-13 10-9 14-8 15-5 14-2h10l14 2 15 5 12 7 11 9 9 10 8 13 5 12 3 7v37l-2 2-4 11-7 13-9 11-7 7-16 10-16 6-10 2-4 16-10 53-11 57-22 115-14 73-11 56-7 37-3 4h-719l-3-9-14-72-23-120-17-88-23-120-1-2-14-3-12-5-10-6-11-9-11-13-9-17-4-12v-35h2l2-9 8-16 4-6 9-10 10-9 15-8 17-5 19-1 15 2 15 5 15 9 13 12 10 14 5 11 4 13 1 6v18l-3 16-7 16-6 9-11 13-13 9 4 10 17 35 10 17 12 19 13 17 8 10 14 15 11 11 14 11 13 9 21 11 19 6 10 2h27l25-6 17-9 9-5 13-11 8-7 5-5 9-10 13-17 13-22 9-16 13-28 8-21 12-35 11-41 3-13-19-8-12-7-10-8-13-13-10-15-7-16-4-15-1-8v-18l3-18 6-16 8-15 9-11 7-8 13-10 12-7 16-6 15-3z"
|
|
21
|
+
fill={fillColor}
|
|
22
|
+
/>
|
|
23
|
+
<Path
|
|
24
|
+
transform="translate(785,818)"
|
|
25
|
+
d="M0 0l64 1 15 4 13 8 9 8 9 13 5 13 2 15-2 16-5 12-6 10-9 10-11 7-12 5-10 2h-672l-15-4-12-7-10-9-9-13-5-13-2-11v-9l3-15 8-16 11-12 10-7 11-5 10-2z"
|
|
26
|
+
fill={fillColor}
|
|
27
|
+
/>
|
|
28
|
+
</Svg>
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const BuyOrRentIcon: React.FC<{ fillColor: string }> = ({ fillColor }) => (
|
|
32
|
+
<Svg fill="none" viewBox="5 5 18 18" width="100%" height="100%">
|
|
33
|
+
<Path
|
|
34
|
+
fill={fillColor}
|
|
35
|
+
fillRule="evenodd"
|
|
36
|
+
clipRule="evenodd"
|
|
37
|
+
d="M9.834 9.835H11.2c0-.108-.002-.215-.003-.319-.014-1.424-.024-2.412 2.734-2.412 2.504 0 2.732.453 2.732 2.73l1.365.001c0-3.871-.91-4.099-4.097-4.099h-.21c-3.225-.002-3.709-.002-3.887 4.1zm-.153-.001H7.712a1.976 1.976 0 00-1.976 1.976v6.064a4.252 4.252 0 004.252 4.252h7.886a4.252 4.252 0 004.252-4.252V11.81a1.976 1.976 0 00-1.976-1.976H18.18a.153.153 0 00-.153.153v3.716a.683.683 0 01-1.365 0V9.987a.153.153 0 00-.153-.153h-5.158a.153.153 0 00-.152.153v3.716a.683.683 0 01-1.366 0V9.987a.153.153 0 00-.153-.153z"
|
|
38
|
+
/>
|
|
39
|
+
</Svg>
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const RentOrBuyIcon: React.FC<RentOrBuyIconProps> = ({
|
|
43
|
+
theme,
|
|
44
|
+
content_offering_type,
|
|
45
|
+
style,
|
|
46
|
+
position = 'topLeft',
|
|
47
|
+
size = 22,
|
|
48
|
+
}) => {
|
|
49
|
+
if (!content_offering_type) return null;
|
|
50
|
+
|
|
51
|
+
const typeUpper = content_offering_type.toUpperCase();
|
|
52
|
+
if (!['PREMIUM', 'BUY_OR_RENT'].includes(typeUpper)) return null;
|
|
53
|
+
|
|
54
|
+
const fillColor = theme?.colors.primary || '#CA091E';
|
|
55
|
+
|
|
56
|
+
const positionStyle: ViewStyle = (() => {
|
|
57
|
+
switch (position) {
|
|
58
|
+
case 'topLeft':
|
|
59
|
+
return { top: 6, left: 6 };
|
|
60
|
+
case 'topRight':
|
|
61
|
+
return { top: 6, right: 6 };
|
|
62
|
+
case 'bottomLeft':
|
|
63
|
+
return { bottom: 6, left: 6 };
|
|
64
|
+
case 'bottomRight':
|
|
65
|
+
return { bottom: 6, right: 6 };
|
|
66
|
+
default:
|
|
67
|
+
return { top: 6, left: 6 };
|
|
68
|
+
}
|
|
69
|
+
})();
|
|
70
|
+
|
|
71
|
+
const IconComponent = typeUpper === 'PREMIUM' ? PremiumIcon : BuyOrRentIcon;
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<View
|
|
75
|
+
style={[
|
|
76
|
+
styles.container,
|
|
77
|
+
{ width: size, height: size },
|
|
78
|
+
style || positionStyle,
|
|
79
|
+
]}
|
|
80
|
+
>
|
|
81
|
+
<View style={styles.iconWrapper}>
|
|
82
|
+
<IconComponent fillColor={fillColor} />
|
|
83
|
+
</View>
|
|
84
|
+
</View>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export default RentOrBuyIcon;
|
|
89
|
+
|
|
90
|
+
const styles = StyleSheet.create({
|
|
91
|
+
container: {
|
|
92
|
+
position: 'absolute',
|
|
93
|
+
zIndex: 10,
|
|
94
|
+
},
|
|
95
|
+
iconWrapper: {
|
|
96
|
+
flex: 1,
|
|
97
|
+
justifyContent: 'center',
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
backgroundColor: 'white',
|
|
100
|
+
padding: scale(3),
|
|
101
|
+
borderRadius: 40,
|
|
102
|
+
shadowColor: '#000',
|
|
103
|
+
shadowOffset: { width: 0, height: 1 },
|
|
104
|
+
shadowOpacity: 0.2,
|
|
105
|
+
shadowRadius: 2,
|
|
106
|
+
overflow: 'hidden',
|
|
107
|
+
elevation: 3,
|
|
108
|
+
},
|
|
109
|
+
});
|
|
@@ -31,7 +31,7 @@ export const ThumbnailCard: React.FC<ThumbnailCardProps> = ({
|
|
|
31
31
|
thumbnailUri = '',
|
|
32
32
|
theme,
|
|
33
33
|
isLoading = false,
|
|
34
|
-
borderRadius =
|
|
34
|
+
borderRadius = 0,
|
|
35
35
|
wrapperStyle,
|
|
36
36
|
imageStyle,
|
|
37
37
|
resizeMode = FastImage.resizeMode.cover,
|
|
@@ -149,7 +149,6 @@ const styles = StyleSheet.create({
|
|
|
149
149
|
left: 0,
|
|
150
150
|
width: '100%',
|
|
151
151
|
aspectRatio: 16 / 9,
|
|
152
|
-
borderWidth: scale(1),
|
|
153
152
|
alignItems: 'center',
|
|
154
153
|
justifyContent: 'center',
|
|
155
154
|
},
|
|
@@ -14,6 +14,7 @@ import type { IContentEpisodes, IContentSeasons } from '../../../types';
|
|
|
14
14
|
import type { ITheme } from '../../../theme/themes';
|
|
15
15
|
import { ThumbnailCard } from '../../Content/Card/components/ThumbnailCard';
|
|
16
16
|
import { RFValue } from 'react-native-responsive-fontsize';
|
|
17
|
+
import RentOrBuyIcon from '../../Content/Card/components/RentOrBuyIcon';
|
|
17
18
|
|
|
18
19
|
// Constants
|
|
19
20
|
const SKELETON_COUNT = 3;
|
|
@@ -200,19 +201,13 @@ const EpisodeCardItem = memo(
|
|
|
200
201
|
>
|
|
201
202
|
<View style={[styles.cardContent, isVerticalMode && styles.cardGrid]}>
|
|
202
203
|
<View style={thumbnailStyle}>
|
|
203
|
-
<
|
|
204
|
-
|
|
205
|
-
uri: episode.thumbnail,
|
|
206
|
-
priority: FastImage.priority.high,
|
|
207
|
-
}}
|
|
208
|
-
style={styles.thumbnail}
|
|
209
|
-
resizeMode={FastImage.resizeMode.cover}
|
|
210
|
-
fallback
|
|
204
|
+
<RentOrBuyIcon
|
|
205
|
+
content_offering_type={episode.content_offering_type}
|
|
211
206
|
/>
|
|
212
207
|
<ThumbnailCard
|
|
213
208
|
thumbnailUri={episode.thumbnail}
|
|
214
209
|
theme={theme}
|
|
215
|
-
wrapperStyle={styles.thumbnail}
|
|
210
|
+
// wrapperStyle={styles.thumbnail}
|
|
216
211
|
resizeMode={FastImage.resizeMode.cover}
|
|
217
212
|
/>
|
|
218
213
|
</View>
|
|
@@ -16,6 +16,7 @@ import BackBtn from '../../Button/BackBtn';
|
|
|
16
16
|
import MenuBtn from '../../Button/MenuBtn';
|
|
17
17
|
import type { HeroBannerProps } from '../../../types/content/content-view.types';
|
|
18
18
|
import { RFValue } from 'react-native-responsive-fontsize';
|
|
19
|
+
import RentOrBuyIcon from '../../Content/Card/components/RentOrBuyIcon';
|
|
19
20
|
|
|
20
21
|
const SKELETON_CIRCLE_SIZE = scale(50);
|
|
21
22
|
const BANNER_HEIGHT = verticalScale(200);
|
|
@@ -33,6 +34,7 @@ export const HeroBanner = ({
|
|
|
33
34
|
renderButtons,
|
|
34
35
|
renderSkeletons,
|
|
35
36
|
menuActions,
|
|
37
|
+
content_offering_type,
|
|
36
38
|
}: HeroBannerProps) => {
|
|
37
39
|
const [hasImageLoaded, setHasImageLoaded] = useState(false);
|
|
38
40
|
const [imageLoadError, setImageLoadError] = useState(false);
|
|
@@ -56,6 +58,12 @@ export const HeroBanner = ({
|
|
|
56
58
|
position: 'relative',
|
|
57
59
|
backgroundColor: theme.colors.backgroundDisabled,
|
|
58
60
|
},
|
|
61
|
+
rentOrBuyIcon: {
|
|
62
|
+
position: 'absolute',
|
|
63
|
+
bottom: verticalScale(20),
|
|
64
|
+
zIndex: 4,
|
|
65
|
+
left: scale(10),
|
|
66
|
+
},
|
|
59
67
|
centeredContent: {
|
|
60
68
|
...StyleSheet.absoluteFillObject,
|
|
61
69
|
justifyContent: 'center',
|
|
@@ -189,6 +197,14 @@ export const HeroBanner = ({
|
|
|
189
197
|
{/* Background Image */}
|
|
190
198
|
{!isLoading && (
|
|
191
199
|
<View style={styles.imageContainer}>
|
|
200
|
+
{content_offering_type && (
|
|
201
|
+
<RentOrBuyIcon
|
|
202
|
+
size={30}
|
|
203
|
+
style={styles.rentOrBuyIcon}
|
|
204
|
+
content_offering_type={content_offering_type}
|
|
205
|
+
/>
|
|
206
|
+
)}
|
|
207
|
+
|
|
192
208
|
<FastImage
|
|
193
209
|
style={StyleSheet.absoluteFillObject}
|
|
194
210
|
source={{
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from 'react-native';
|
|
13
13
|
import { moderateScale } from 'react-native-size-matters';
|
|
14
14
|
import SkeletonPlaceholder from 'react-native-skeleton-placeholder';
|
|
15
|
-
import {
|
|
15
|
+
import { useSplashCache } from '../../hooks/useSplashCache';
|
|
16
16
|
import { useTheme } from '../../theme/hook/useTheme';
|
|
17
17
|
import type { AppTheme } from '../../theme/themes';
|
|
18
18
|
|
|
@@ -44,16 +44,14 @@ export const Logo: React.FC<ILogoProps> = ({
|
|
|
44
44
|
const { theme: appliedTheme } = useTheme(theme);
|
|
45
45
|
|
|
46
46
|
const {
|
|
47
|
-
data: {
|
|
47
|
+
data: { logoPath },
|
|
48
48
|
isLoading: isSplashLoading,
|
|
49
|
-
} =
|
|
49
|
+
} = useSplashCache({
|
|
50
50
|
logoUrl: logoUri,
|
|
51
51
|
});
|
|
52
|
-
const finalSource =
|
|
52
|
+
const finalSource = logoPath
|
|
53
53
|
? {
|
|
54
|
-
uri:
|
|
55
|
-
? localPathLogo
|
|
56
|
-
: `file://${localPathLogo}`,
|
|
54
|
+
uri: logoPath.startsWith('file://') ? logoPath : `file://${logoPath}`,
|
|
57
55
|
}
|
|
58
56
|
: logoUri
|
|
59
57
|
? { uri: logoUri }
|
|
@@ -76,14 +76,7 @@ const Synopsis: React.FC<SynopsisProps> = ({ data }) => {
|
|
|
76
76
|
|
|
77
77
|
const renderItem = useCallback(
|
|
78
78
|
({ item }: { item: ILikeMoreData; index: number }) => (
|
|
79
|
-
<TouchableOpacity
|
|
80
|
-
style={[styles.card]}
|
|
81
|
-
activeOpacity={0.8}
|
|
82
|
-
onPress={() => {
|
|
83
|
-
// Handle item press if needed
|
|
84
|
-
console.log('Pressed item:', item.name);
|
|
85
|
-
}}
|
|
86
|
-
>
|
|
79
|
+
<TouchableOpacity style={[styles.card]} activeOpacity={0.8}>
|
|
87
80
|
<Image
|
|
88
81
|
source={{
|
|
89
82
|
uri:
|
|
@@ -90,7 +90,7 @@ const SubscriptionSliderOne = ({
|
|
|
90
90
|
});
|
|
91
91
|
}, [plans]);
|
|
92
92
|
const placeholderData = useMemo(
|
|
93
|
-
() => new Array(plans.length ||
|
|
93
|
+
() => new Array(plans.length || 3).fill({}),
|
|
94
94
|
[plans]
|
|
95
95
|
);
|
|
96
96
|
|
|
@@ -212,7 +212,9 @@ const SubscriptionSliderOne = ({
|
|
|
212
212
|
height={CAROUSEL_HEIGHT}
|
|
213
213
|
data={isLoading ? placeholderData : sortedPlans}
|
|
214
214
|
renderItem={isLoading ? renderSkeleton : renderPlan}
|
|
215
|
-
loop
|
|
215
|
+
loop={
|
|
216
|
+
((isLoading ? sortedPlans.length : sortedPlans.length) || 0) > 1
|
|
217
|
+
}
|
|
216
218
|
autoPlay={false}
|
|
217
219
|
scrollAnimationDuration={500}
|
|
218
220
|
mode="parallax"
|
|
@@ -27,7 +27,7 @@ import ImageCropPicker, { type Image } from 'react-native-image-crop-picker';
|
|
|
27
27
|
|
|
28
28
|
export type ProfileUpdateFormValues = {
|
|
29
29
|
fullName: string;
|
|
30
|
-
avatarFile
|
|
30
|
+
avatarFile?: Image;
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export type ProfileUpdateProps = {
|
|
@@ -35,7 +35,7 @@ export type ProfileUpdateProps = {
|
|
|
35
35
|
name?: string;
|
|
36
36
|
avatarUri?: string;
|
|
37
37
|
onBackPress?: () => void;
|
|
38
|
-
onSubmit?: (val: { fullName: string; avatarFile
|
|
38
|
+
onSubmit?: (val: { fullName: string; avatarFile?: Image }) => void;
|
|
39
39
|
theme?: AppTheme;
|
|
40
40
|
loading?: boolean;
|
|
41
41
|
onError?: (error: { message: string }) => void;
|
|
@@ -64,9 +64,7 @@ export const ProfileUpdate = ({
|
|
|
64
64
|
} = useForm<ProfileUpdateFormValues>({
|
|
65
65
|
defaultValues: {
|
|
66
66
|
fullName: name,
|
|
67
|
-
avatarFile: {
|
|
68
|
-
path: avatarUri,
|
|
69
|
-
},
|
|
67
|
+
avatarFile: avatarUri ? ({ path: avatarUri } as Image) : undefined,
|
|
70
68
|
},
|
|
71
69
|
mode: 'onChange',
|
|
72
70
|
reValidateMode: 'onBlur',
|
|
@@ -104,16 +102,16 @@ export const ProfileUpdate = ({
|
|
|
104
102
|
const handleFormSubmit = useCallback(
|
|
105
103
|
(data: ProfileUpdateFormValues) => {
|
|
106
104
|
Keyboard.dismiss();
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
105
|
+
|
|
106
|
+
const hasNewAvatar =
|
|
107
|
+
data.avatarFile?.path && data.avatarFile.path !== avatarUri;
|
|
108
|
+
|
|
109
|
+
onSubmit?.({
|
|
110
|
+
fullName: data.fullName,
|
|
111
|
+
...(hasNewAvatar ? { avatarFile: data.avatarFile } : {}),
|
|
112
|
+
});
|
|
115
113
|
},
|
|
116
|
-
[avatarUri,
|
|
114
|
+
[avatarUri, onSubmit]
|
|
117
115
|
);
|
|
118
116
|
|
|
119
117
|
return (
|
|
@@ -133,7 +131,7 @@ export const ProfileUpdate = ({
|
|
|
133
131
|
<View style={styles.content}>
|
|
134
132
|
<View style={styles.avatarBox}>
|
|
135
133
|
<UserAvatar
|
|
136
|
-
avatarUri={avatar
|
|
134
|
+
avatarUri={avatar?.path}
|
|
137
135
|
theme={appliedTheme}
|
|
138
136
|
size={100}
|
|
139
137
|
/>
|
|
@@ -116,6 +116,7 @@ export const WatchHistory: React.FC<WatchHistoryProps> = ({
|
|
|
116
116
|
activeOpacity={0.8}
|
|
117
117
|
>
|
|
118
118
|
<CardPoster
|
|
119
|
+
content_offering_type={item?.content?.content_offering_type}
|
|
119
120
|
theme={appliedTheme}
|
|
120
121
|
isLoading={isLoading}
|
|
121
122
|
posterUri={item?.content?.poster}
|
|
@@ -216,6 +216,7 @@ export const WatchLater: React.FC<WatchLaterProps> = ({
|
|
|
216
216
|
activeOpacity={0.8}
|
|
217
217
|
>
|
|
218
218
|
<CardPoster
|
|
219
|
+
content_offering_type={item?.content?.content_offering_type}
|
|
219
220
|
theme={appliedTheme}
|
|
220
221
|
isLoading={isLoading}
|
|
221
222
|
posterUri={item?.content?.poster}
|