@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,238 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Sun 08 Jun 2025
|
|
4
|
-
*/
|
|
5
|
-
import React, { useMemo } from 'react';
|
|
6
|
-
import Sliders from './Card/Sliders';
|
|
7
|
-
import Cards from './Card';
|
|
8
|
-
import type { IGetSectionData } from '../../types';
|
|
9
|
-
import type { IProps } from './types';
|
|
10
|
-
const createCommonProps = (
|
|
11
|
-
type: IGetSectionData['type'],
|
|
12
|
-
props: Omit<IProps, 'customComponents' | 'type'>
|
|
13
|
-
) => {
|
|
14
|
-
const effectiveIsLoading =
|
|
15
|
-
props.isLoading?.section || props.section_id === `dummy-${type}`;
|
|
16
|
-
|
|
17
|
-
const onPressMoreHandler = props.events?.onPressMore
|
|
18
|
-
? (params: { section_id: string; name: string; type: string }) => {
|
|
19
|
-
props.events?.onPressMore?.({
|
|
20
|
-
section_id: params.section_id,
|
|
21
|
-
name: params.name,
|
|
22
|
-
type,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
: undefined;
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
theme: props.theme,
|
|
29
|
-
title: props.name,
|
|
30
|
-
section_id: props.section_id,
|
|
31
|
-
type,
|
|
32
|
-
data: props.data?.sectionData || null,
|
|
33
|
-
index: props.index,
|
|
34
|
-
onPressItem: props.events?.onPressItem,
|
|
35
|
-
onPressMore: onPressMoreHandler,
|
|
36
|
-
onAdVisible: props.events?.onAdVisible,
|
|
37
|
-
isLoading: effectiveIsLoading,
|
|
38
|
-
moreFetchDataHistory: props.moreFetchDataHistory,
|
|
39
|
-
moreFetchData: props.moreFetchData,
|
|
40
|
-
onDisplayAds: props.onDisplayAds || props.events?.onDisplayAds,
|
|
41
|
-
screenDimensions: props.screenDimensions,
|
|
42
|
-
viewportOffsets: props.viewportOffsets,
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const renderDefaultComponent = (
|
|
47
|
-
type: IGetSectionData['type'],
|
|
48
|
-
props: Omit<IProps, 'customComponents' | 'type'>
|
|
49
|
-
): React.ReactNode => {
|
|
50
|
-
const commonProps = createCommonProps(type, props);
|
|
51
|
-
switch (type) {
|
|
52
|
-
case 'slider':
|
|
53
|
-
return (
|
|
54
|
-
<Sliders.Styles.One
|
|
55
|
-
{...commonProps}
|
|
56
|
-
showPlayIcon={props.sectionProps?.showPlayBtn}
|
|
57
|
-
/>
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
case 'slider_style_2':
|
|
61
|
-
return <Sliders.Styles.Two {...commonProps} />;
|
|
62
|
-
case 'slider_style_3':
|
|
63
|
-
return (
|
|
64
|
-
<Sliders.Styles.Three
|
|
65
|
-
{...commonProps}
|
|
66
|
-
checkWatchlistStatus={props.checkWatchlistStatus}
|
|
67
|
-
onToggleWatchlist={props.events?.onToggleWatchlist}
|
|
68
|
-
/>
|
|
69
|
-
);
|
|
70
|
-
case 'normal':
|
|
71
|
-
return <Cards.Styles.One {...commonProps} />;
|
|
72
|
-
case 'new_releases':
|
|
73
|
-
return <Cards.Styles.One {...commonProps} />;
|
|
74
|
-
case 'card_style_2':
|
|
75
|
-
return <Cards.Styles.Two {...commonProps} />;
|
|
76
|
-
case 'card_style_3':
|
|
77
|
-
return <Cards.Styles.Three {...commonProps} />;
|
|
78
|
-
case 'card_style_4':
|
|
79
|
-
return <Cards.Styles.Four {...commonProps} />;
|
|
80
|
-
case 'card_style_5':
|
|
81
|
-
return <Cards.Styles.Five {...commonProps} />;
|
|
82
|
-
case 'card_style_6':
|
|
83
|
-
return <Cards.Styles.Six {...commonProps} />;
|
|
84
|
-
case 'continue_watching':
|
|
85
|
-
return (
|
|
86
|
-
<Cards.Styles.NowWatching
|
|
87
|
-
{...commonProps}
|
|
88
|
-
historyData={props.data.historyData}
|
|
89
|
-
isLoadingHistory={props.isLoading?.history}
|
|
90
|
-
/>
|
|
91
|
-
);
|
|
92
|
-
case 'card_rotate_in_out':
|
|
93
|
-
return <Cards.Styles.RotateCarousel {...commonProps} />;
|
|
94
|
-
case 'top_10':
|
|
95
|
-
return <Cards.Styles.TopTen {...commonProps} />;
|
|
96
|
-
default:
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
// ----------------------------------------
|
|
102
|
-
// Sections Component
|
|
103
|
-
// ----------------------------------------
|
|
104
|
-
const Sections: React.FC<IProps> = ({
|
|
105
|
-
type,
|
|
106
|
-
data,
|
|
107
|
-
name,
|
|
108
|
-
customComponents = [],
|
|
109
|
-
theme,
|
|
110
|
-
index,
|
|
111
|
-
section_id,
|
|
112
|
-
events,
|
|
113
|
-
sectionProps,
|
|
114
|
-
isLoading,
|
|
115
|
-
moreFetchData,
|
|
116
|
-
moreFetchDataHistory,
|
|
117
|
-
onDisplayAds,
|
|
118
|
-
screenDimensions,
|
|
119
|
-
checkWatchlistStatus,
|
|
120
|
-
viewportOffsets,
|
|
121
|
-
}) => {
|
|
122
|
-
const commonProps = useMemo(
|
|
123
|
-
() => ({ data: data.sectionData, title: name }),
|
|
124
|
-
[data.sectionData, name]
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
const customComponent = useMemo(
|
|
128
|
-
() => customComponents.find((c) => c.type === type),
|
|
129
|
-
[customComponents, type]
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
const defaultRendered = useMemo(
|
|
133
|
-
() =>
|
|
134
|
-
renderDefaultComponent(type, {
|
|
135
|
-
data,
|
|
136
|
-
name,
|
|
137
|
-
section_id,
|
|
138
|
-
index,
|
|
139
|
-
theme,
|
|
140
|
-
events,
|
|
141
|
-
checkWatchlistStatus,
|
|
142
|
-
sectionProps,
|
|
143
|
-
isLoading,
|
|
144
|
-
moreFetchData,
|
|
145
|
-
moreFetchDataHistory,
|
|
146
|
-
onDisplayAds,
|
|
147
|
-
screenDimensions,
|
|
148
|
-
viewportOffsets,
|
|
149
|
-
}),
|
|
150
|
-
[
|
|
151
|
-
type,
|
|
152
|
-
data,
|
|
153
|
-
name,
|
|
154
|
-
section_id,
|
|
155
|
-
index,
|
|
156
|
-
theme,
|
|
157
|
-
events,
|
|
158
|
-
checkWatchlistStatus,
|
|
159
|
-
sectionProps,
|
|
160
|
-
isLoading,
|
|
161
|
-
moreFetchData,
|
|
162
|
-
moreFetchDataHistory,
|
|
163
|
-
onDisplayAds,
|
|
164
|
-
screenDimensions,
|
|
165
|
-
viewportOffsets,
|
|
166
|
-
]
|
|
167
|
-
);
|
|
168
|
-
|
|
169
|
-
const filterProps = useMemo(
|
|
170
|
-
() => ({
|
|
171
|
-
data,
|
|
172
|
-
name,
|
|
173
|
-
section_id,
|
|
174
|
-
index,
|
|
175
|
-
theme,
|
|
176
|
-
events,
|
|
177
|
-
checkWatchlistStatus,
|
|
178
|
-
sectionProps,
|
|
179
|
-
isLoading,
|
|
180
|
-
moreFetchData,
|
|
181
|
-
moreFetchDataHistory,
|
|
182
|
-
onDisplayAds,
|
|
183
|
-
screenDimensions,
|
|
184
|
-
viewportOffsets,
|
|
185
|
-
}),
|
|
186
|
-
[
|
|
187
|
-
data,
|
|
188
|
-
name,
|
|
189
|
-
section_id,
|
|
190
|
-
index,
|
|
191
|
-
theme,
|
|
192
|
-
events,
|
|
193
|
-
checkWatchlistStatus,
|
|
194
|
-
sectionProps,
|
|
195
|
-
isLoading,
|
|
196
|
-
moreFetchData,
|
|
197
|
-
moreFetchDataHistory,
|
|
198
|
-
onDisplayAds,
|
|
199
|
-
screenDimensions,
|
|
200
|
-
viewportOffsets,
|
|
201
|
-
]
|
|
202
|
-
);
|
|
203
|
-
|
|
204
|
-
const fallbackComponents = useMemo(
|
|
205
|
-
() =>
|
|
206
|
-
customComponents.filter(
|
|
207
|
-
({ type: customType }) =>
|
|
208
|
-
renderDefaultComponent(
|
|
209
|
-
customType as IGetSectionData['type'],
|
|
210
|
-
filterProps
|
|
211
|
-
) === null
|
|
212
|
-
),
|
|
213
|
-
[customComponents, filterProps]
|
|
214
|
-
);
|
|
215
|
-
|
|
216
|
-
if (customComponent) {
|
|
217
|
-
return React.cloneElement(customComponent.component, {
|
|
218
|
-
...(customComponent.component?.props ?? {}),
|
|
219
|
-
...commonProps,
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
if (defaultRendered) return defaultRendered;
|
|
224
|
-
|
|
225
|
-
return (
|
|
226
|
-
<>
|
|
227
|
-
{fallbackComponents.map(({ component, type: key }) =>
|
|
228
|
-
React.cloneElement(component, {
|
|
229
|
-
...(component?.props ?? {}),
|
|
230
|
-
key,
|
|
231
|
-
...commonProps,
|
|
232
|
-
})
|
|
233
|
-
)}
|
|
234
|
-
</>
|
|
235
|
-
);
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
export default React.memo(Sections);
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Naresh Dhamu
|
|
3
|
-
* @lastModified Sun 08 Jun 2025
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type {
|
|
7
|
-
NativeScrollEvent,
|
|
8
|
-
NativeSyntheticEvent,
|
|
9
|
-
StyleProp,
|
|
10
|
-
ViewStyle,
|
|
11
|
-
} from 'react-native';
|
|
12
|
-
import type { AnimatedStyle, SharedValue } from 'react-native-reanimated';
|
|
13
|
-
import type { IGetSectionData, IAdItem, MoreFetchData } from '../../types';
|
|
14
|
-
import type { IContentData, IServeAd } from '@zezosoft/zezo-ott-api-client';
|
|
15
|
-
import type { ICategory } from './Card/Category/Category';
|
|
16
|
-
import type { IHistoryItem } from './Card/NowWatching/NowWatching';
|
|
17
|
-
import type { ThemeOverride } from '../../theme/themes';
|
|
18
|
-
import type { NoContentFallbackProps } from '../Fallbacks';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Custom component configuration for sections and content
|
|
22
|
-
*/
|
|
23
|
-
export interface ICustomComponent {
|
|
24
|
-
type: string;
|
|
25
|
-
component: React.ReactElement;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Loading states for content sections
|
|
30
|
-
*/
|
|
31
|
-
export type IContentLoading = {
|
|
32
|
-
category?: boolean;
|
|
33
|
-
history?: boolean;
|
|
34
|
-
section?: boolean;
|
|
35
|
-
InfiniteScrollIsLoading?: boolean;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Section-specific props
|
|
40
|
-
*/
|
|
41
|
-
export interface ISectionProps {
|
|
42
|
-
showPlayBtn?: boolean;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Viewport offsets for screen calculations
|
|
47
|
-
*/
|
|
48
|
-
export interface IViewportOffsets {
|
|
49
|
-
top: number;
|
|
50
|
-
bottom: number;
|
|
51
|
-
left: number;
|
|
52
|
-
right: number;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Screen dimensions
|
|
57
|
-
*/
|
|
58
|
-
export interface IScreenDimensions {
|
|
59
|
-
width: number;
|
|
60
|
-
height: number;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Watchlist status checker function type
|
|
65
|
-
*/
|
|
66
|
-
export type ICheckWatchlistStatus = (
|
|
67
|
-
itemIds: string[]
|
|
68
|
-
) => Record<string, boolean> | Promise<Record<string, boolean>>;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Parameters for onPressMore event
|
|
72
|
-
*/
|
|
73
|
-
export interface IOnPressMoreParams {
|
|
74
|
-
section_id: string;
|
|
75
|
-
name: string;
|
|
76
|
-
type: IGetSectionData['type'];
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Events object for content and sections
|
|
81
|
-
*/
|
|
82
|
-
export interface IContentEvents {
|
|
83
|
-
onPressItem?: (item: IContentData | IAdItem) => void;
|
|
84
|
-
onPressMore?: (params: IOnPressMoreParams) => void;
|
|
85
|
-
activeCategory?: ICategory;
|
|
86
|
-
onPressCategory?: (category: ICategory) => void;
|
|
87
|
-
onAdVisible?: (ad: IServeAd, percent: number) => void;
|
|
88
|
-
onDisplayAds?: (ad: IServeAd) => void;
|
|
89
|
-
onToggleWatchlist?: (
|
|
90
|
-
item: IContentData,
|
|
91
|
-
{ isFavorite }: { isFavorite: boolean }
|
|
92
|
-
) => void;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Props for the Content component
|
|
97
|
-
*/
|
|
98
|
-
export interface IContentProps {
|
|
99
|
-
headerStyle?: 'one' | 'two' | 'three';
|
|
100
|
-
contentData: {
|
|
101
|
-
category?: ICategory[];
|
|
102
|
-
sectionData: IGetSectionData[] | null;
|
|
103
|
-
historyData?: IHistoryItem[];
|
|
104
|
-
};
|
|
105
|
-
customHeaderComponent?: React.ReactNode;
|
|
106
|
-
customComponents?: ICustomComponent[];
|
|
107
|
-
LoaderComponent?: React.ReactNode;
|
|
108
|
-
ErrorComponent?: React.ReactNode;
|
|
109
|
-
InfiniteScrollLoaderComponent?: React.ReactNode;
|
|
110
|
-
onScroll?:
|
|
111
|
-
| ((event: NativeSyntheticEvent<NativeScrollEvent>) => void)
|
|
112
|
-
| SharedValue<
|
|
113
|
-
((event: NativeSyntheticEvent<NativeScrollEvent>) => void) | undefined
|
|
114
|
-
>;
|
|
115
|
-
contentContainerStyle?:
|
|
116
|
-
| StyleProp<ViewStyle>
|
|
117
|
-
| AnimatedStyle<StyleProp<ViewStyle>>;
|
|
118
|
-
onEndReached?: () => void;
|
|
119
|
-
theme?: ThemeOverride;
|
|
120
|
-
autoSwitchTheme?: boolean;
|
|
121
|
-
events?: IContentEvents & {
|
|
122
|
-
onPressMore?: (params: {
|
|
123
|
-
section_id: IGetSectionData['_id'];
|
|
124
|
-
name: IGetSectionData['name'];
|
|
125
|
-
type: IGetSectionData['type'];
|
|
126
|
-
}) => void;
|
|
127
|
-
};
|
|
128
|
-
checkWatchlistStatus?: ICheckWatchlistStatus;
|
|
129
|
-
sectionProps?: ISectionProps;
|
|
130
|
-
moreFetchData?: MoreFetchData<IContentData>;
|
|
131
|
-
moreFetchDataHistory?: MoreFetchData<IHistoryItem>;
|
|
132
|
-
isLoading?: IContentLoading;
|
|
133
|
-
|
|
134
|
-
noContentFallbackProps?: NoContentFallbackProps;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Props for the ContentFooter component (internal use)
|
|
139
|
-
*/
|
|
140
|
-
export interface FooterProps {
|
|
141
|
-
isEmpty: boolean;
|
|
142
|
-
ErrorComponent?: React.ReactNode;
|
|
143
|
-
InfiniteScrollIsLoading?: boolean;
|
|
144
|
-
InfiniteScrollLoaderComponent?: React.ReactNode;
|
|
145
|
-
theme?: ThemeOverride;
|
|
146
|
-
noContentFallbackProps?: NoContentFallbackProps;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Props for the Sections component
|
|
151
|
-
*/
|
|
152
|
-
export interface IProps {
|
|
153
|
-
type: IGetSectionData['type'];
|
|
154
|
-
ads?: IServeAd[];
|
|
155
|
-
data: {
|
|
156
|
-
sectionData: IGetSectionData['content'] | null;
|
|
157
|
-
historyData?: IHistoryItem[];
|
|
158
|
-
category?: ICategory[];
|
|
159
|
-
};
|
|
160
|
-
name: string;
|
|
161
|
-
|
|
162
|
-
customComponents?: ICustomComponent[];
|
|
163
|
-
theme?: ThemeOverride;
|
|
164
|
-
index: number;
|
|
165
|
-
section_id: string;
|
|
166
|
-
events?: IContentEvents;
|
|
167
|
-
sectionProps?: ISectionProps;
|
|
168
|
-
|
|
169
|
-
checkWatchlistStatus?: ICheckWatchlistStatus;
|
|
170
|
-
isLoading?: IContentLoading;
|
|
171
|
-
moreFetchData?: MoreFetchData<IContentData>;
|
|
172
|
-
moreFetchDataHistory?: MoreFetchData<IHistoryItem>;
|
|
173
|
-
onDisplayAds?: (ad: IServeAd) => void;
|
|
174
|
-
screenDimensions?: IScreenDimensions;
|
|
175
|
-
viewportOffsets?: IViewportOffsets;
|
|
176
|
-
}
|