@zezosoft/zezo-ott-react-native-ui-kit 1.1.1 → 1.1.3
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/Styles/globalStyles.js +0 -5
- package/lib/module/Styles/globalStyles.js.map +1 -1
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js +64 -40
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -1
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js +5 -2
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithEmail.js +17 -11
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithPhone.js +12 -6
- package/lib/module/components/Auth/Login/LoginWithPhone.js.map +1 -1
- package/lib/module/components/Auth/OTP/OTP.js +7 -4
- package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/QrLogin/QrLogin.js +357 -144
- package/lib/module/components/Auth/QrLogin/QrLogin.js.map +1 -1
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js +227 -110
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js.map +1 -1
- package/lib/module/components/Auth/SignUp/SignUp.js +19 -13
- package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js +54 -36
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js +29 -11
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js +13 -7
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js +33 -21
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +26 -20
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
- package/lib/module/components/BlogView/BlogView.js +36 -20
- package/lib/module/components/BlogView/BlogView.js.map +1 -1
- package/lib/module/components/Button/BackBtn.js +24 -20
- package/lib/module/components/Button/BackBtn.js.map +1 -1
- package/lib/module/components/Button/PrimaryBtn.js +19 -13
- package/lib/module/components/Button/PrimaryBtn.js.map +1 -1
- package/lib/module/components/Button/SecondaryBtn.js +19 -13
- package/lib/module/components/Button/SecondaryBtn.js.map +1 -1
- package/lib/module/components/Button/TextButton.js +19 -13
- package/lib/module/components/Button/TextButton.js.map +1 -1
- package/lib/module/components/Content/Card/Category/Category.js +151 -46
- package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js +237 -108
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +200 -133
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +192 -84
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Five.js +131 -48
- package/lib/module/components/Content/Card/Styles/Five.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Four.js +126 -59
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/One.js +125 -50
- package/lib/module/components/Content/Card/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +143 -65
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Six.js +207 -115
- package/lib/module/components/Content/Card/Styles/Six.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Three.js +134 -79
- package/lib/module/components/Content/Card/Styles/Three.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/TopTen.js +186 -171
- package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Two.js +144 -64
- package/lib/module/components/Content/Card/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/components/AdsPoster.js +162 -0
- package/lib/module/components/Content/Card/components/AdsPoster.js.map +1 -0
- package/lib/module/components/Content/Card/components/CardPoster.js +139 -93
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js +18 -17
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js.map +1 -1
- package/lib/module/components/Content/Card/components/ThumbnailCard.js +78 -28
- package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
- package/lib/module/components/Content/Card/components/index.js +4 -0
- package/lib/module/components/Content/Card/components/index.js.map +1 -0
- package/lib/module/components/Content/Content.js +99 -40
- package/lib/module/components/Content/Content.js.map +1 -1
- package/lib/module/components/Content/Sections.js +63 -34
- package/lib/module/components/Content/Sections.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +70 -41
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/MoreContentList.js +74 -40
- package/lib/module/components/ContentView/MoreContentList.js.map +1 -1
- package/lib/module/components/ContentView/components/AboutSection.js +40 -19
- package/lib/module/components/ContentView/components/AboutSection.js.map +1 -1
- package/lib/module/components/ContentView/components/CastCard.js +6 -7
- package/lib/module/components/ContentView/components/CastCard.js.map +1 -1
- package/lib/module/components/ContentView/components/EpisodeCard.js +2 -2
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
- package/lib/module/components/ContentView/components/GenreTags.js +25 -13
- package/lib/module/components/ContentView/components/GenreTags.js.map +1 -1
- package/lib/module/components/ContentView/components/HeroBanner.js +39 -11
- package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
- package/lib/module/components/ContentView/components/MiniInfo.js +84 -77
- package/lib/module/components/ContentView/components/MiniInfo.js.map +1 -1
- package/lib/module/components/ContentView/components/PlayButton.js +11 -7
- package/lib/module/components/ContentView/components/PlayButton.js.map +1 -1
- package/lib/module/components/ContentView/components/Title.js +12 -12
- package/lib/module/components/ContentView/components/Title.js.map +1 -1
- package/lib/module/components/ContentView/components/TrailerButton.js +12 -7
- package/lib/module/components/ContentView/components/TrailerButton.js.map +1 -1
- package/lib/module/components/Fallbacks/NoContentFallback.js +27 -22
- package/lib/module/components/Fallbacks/NoContentFallback.js.map +1 -1
- package/lib/module/components/Fallbacks/NotFoundFallback.js +6 -4
- package/lib/module/components/Fallbacks/NotFoundFallback.js.map +1 -1
- package/lib/module/components/Headers/AppHeader.js +22 -13
- package/lib/module/components/Headers/AppHeader.js.map +1 -1
- package/lib/module/components/Headers/Three.js +6 -5
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/module/components/Headers/Two.js +19 -14
- package/lib/module/components/Headers/Two.js.map +1 -1
- package/lib/module/components/Input/InputOne.js +46 -31
- package/lib/module/components/Input/InputOne.js.map +1 -1
- package/lib/module/components/Loader/Loader.js +2 -2
- package/lib/module/components/Loader/Loader.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +17 -14
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/Search/One.js +2 -1
- package/lib/module/components/Search/One.js.map +1 -1
- package/lib/module/components/Search/components/SearchCard.js +15 -19
- package/lib/module/components/Search/components/SearchCard.js.map +1 -1
- package/lib/module/components/Settings/AppSettings.js +97 -62
- package/lib/module/components/Settings/AppSettings.js.map +1 -1
- package/lib/module/components/Subscription/SubOne.js +313 -254
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/Text/Text.js +15 -12
- package/lib/module/components/Text/Text.js.map +1 -1
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js +25 -23
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js +23 -18
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js.map +1 -1
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js +38 -24
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js.map +1 -1
- package/lib/module/components/User/WatchHistory/WatchHistory.js +21 -14
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
- package/lib/module/components/User/WatchLater/WatchLater.js +30 -21
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
- package/lib/module/components/User/components/UserAvatar.js +38 -19
- package/lib/module/components/User/components/UserAvatar.js.map +1 -1
- package/lib/module/components/User/components/UserSection.js +37 -17
- package/lib/module/components/User/components/UserSection.js.map +1 -1
- package/lib/module/components/View/View.js +7 -4
- package/lib/module/components/View/View.js.map +1 -1
- package/lib/module/components/index.js +0 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/constants/dummySections.js +44 -4
- package/lib/module/constants/dummySections.js.map +1 -1
- package/lib/module/hooks/Images/index.js +5 -0
- package/lib/module/hooks/Images/index.js.map +1 -0
- package/lib/module/hooks/Images/useImageLoader.js +168 -0
- package/lib/module/hooks/Images/useImageLoader.js.map +1 -0
- package/lib/module/hooks/Images/useImageValidation.js +36 -0
- package/lib/module/hooks/Images/useImageValidation.js.map +1 -0
- package/lib/module/hooks/index.js +20 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useAdTracking.js +270 -0
- package/lib/module/hooks/useAdTracking.js.map +1 -0
- package/lib/module/hooks/useCards.js +164 -0
- package/lib/module/hooks/useCards.js.map +1 -0
- package/lib/module/hooks/useDebounce.js +25 -6
- package/lib/module/hooks/useDebounce.js.map +1 -1
- package/lib/module/hooks/useKeyboard.js +7 -4
- package/lib/module/hooks/useKeyboard.js.map +1 -1
- package/lib/module/hooks/useNavigationMode.js +10 -4
- package/lib/module/hooks/useNavigationMode.js.map +1 -1
- package/lib/module/hooks/usePaginatedSection.js +12 -7
- package/lib/module/hooks/usePaginatedSection.js.map +1 -1
- package/lib/module/hooks/usePrevious.js +30 -0
- package/lib/module/hooks/usePrevious.js.map +1 -0
- package/lib/module/hooks/useSafeCallback.js +33 -0
- package/lib/module/hooks/useSafeCallback.js.map +1 -0
- package/lib/module/hooks/useSkeletonItems.js +33 -0
- package/lib/module/hooks/useSkeletonItems.js.map +1 -0
- package/lib/module/hooks/useSplashCache.js +2 -1
- package/lib/module/hooks/useSplashCache.js.map +1 -1
- package/lib/module/hooks/useThemeColors.js +33 -0
- package/lib/module/hooks/useThemeColors.js.map +1 -0
- package/lib/module/theme/ThemeProvider.js +17 -11
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/hook/useInternalTheme.js +18 -11
- package/lib/module/theme/hook/useInternalTheme.js.map +1 -1
- package/lib/module/theme/hook/useThemeStatusBar.js +10 -4
- package/lib/module/theme/hook/useThemeStatusBar.js.map +1 -1
- package/lib/typescript/src/Styles/globalStyles.d.ts +0 -5
- package/lib/typescript/src/Styles/globalStyles.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts +2 -15
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts +0 -1
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +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.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts +2 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/BackBtn.d.ts +2 -2
- package/lib/typescript/src/components/Button/BackBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts +2 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts +2 -1
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/TextButton.d.ts +2 -2
- package/lib/typescript/src/components/Button/TextButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/index.d.ts +2 -2
- package/lib/typescript/src/components/Content/Card/Category/Category.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 +13 -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 +13 -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 +15 -3
- 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 +13 -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 +1 -0
- 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 +13 -5
- 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 +1 -0
- 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 +13 -1
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/AdsPoster.d.ts +26 -0
- package/lib/typescript/src/components/Content/Card/components/AdsPoster.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +3 -1
- 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 +2 -2
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts +2 -0
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/index.d.ts +2 -0
- package/lib/typescript/src/components/Content/Card/components/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Content/Card/index.d.ts +76 -6
- package/lib/typescript/src/components/Content/Card/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Content.d.ts +6 -3
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Sections.d.ts +22 -8
- package/lib/typescript/src/components/Content/Sections.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts +6 -1
- 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/AboutSection.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts +6 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/Title.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/Title.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Fallbacks/NoContentFallback.d.ts +2 -1
- package/lib/typescript/src/components/Fallbacks/NoContentFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Fallbacks/NotFoundFallback.d.ts +1 -1
- package/lib/typescript/src/components/Fallbacks/NotFoundFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/AppHeader.d.ts +2 -2
- package/lib/typescript/src/components/Headers/AppHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Three.d.ts +2 -2
- package/lib/typescript/src/components/Headers/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Two.d.ts +2 -2
- package/lib/typescript/src/components/Headers/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/index.d.ts +2 -2
- package/lib/typescript/src/components/Input/Input.d.ts +1 -1
- package/lib/typescript/src/components/Input/InputOne.d.ts +2 -2
- package/lib/typescript/src/components/Input/InputOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Loader/Loader.d.ts.map +1 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts +2 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts +2 -5
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/index.d.ts +1 -1
- package/lib/typescript/src/components/Settings/AppSettings.d.ts +2 -2
- package/lib/typescript/src/components/Settings/AppSettings.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Text/Text.d.ts +2 -2
- package/lib/typescript/src/components/Text/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -1
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts +1 -1
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts.map +1 -1
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts +1 -1
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts +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 +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 +1 -1
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
- package/lib/typescript/src/components/View/View.d.ts +2 -0
- package/lib/typescript/src/components/View/View.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +0 -1
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/constants/dummySections.d.ts +5 -0
- package/lib/typescript/src/constants/dummySections.d.ts.map +1 -1
- package/lib/typescript/src/hooks/Images/index.d.ts +3 -0
- package/lib/typescript/src/hooks/Images/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/Images/useImageLoader.d.ts +36 -0
- package/lib/typescript/src/hooks/Images/useImageLoader.d.ts.map +1 -0
- package/lib/typescript/src/hooks/Images/useImageValidation.d.ts +17 -0
- package/lib/typescript/src/hooks/Images/useImageValidation.d.ts.map +1 -0
- package/lib/typescript/src/hooks/index.d.ts +17 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useAdTracking.d.ts +39 -0
- package/lib/typescript/src/hooks/useAdTracking.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useCards.d.ts +36 -0
- package/lib/typescript/src/hooks/useCards.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useDebounce.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useKeyboard.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useNavigationMode.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts +12 -2
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePrevious.d.ts +12 -0
- package/lib/typescript/src/hooks/usePrevious.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSafeCallback.d.ts +15 -0
- package/lib/typescript/src/hooks/useSafeCallback.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSkeletonItems.d.ts +11 -0
- package/lib/typescript/src/hooks/useSkeletonItems.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSplashCache.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useThemeColors.d.ts +27 -0
- package/lib/typescript/src/hooks/useThemeColors.d.ts.map +1 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useInternalTheme.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useThemeStatusBar.d.ts.map +1 -1
- package/lib/typescript/src/types/sections/index.d.ts +7 -4
- package/lib/typescript/src/types/sections/index.d.ts.map +1 -1
- package/package.json +6 -3
- package/src/Styles/globalStyles.ts +0 -5
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +288 -212
- package/src/components/Auth/ForgotPassword/ForgotPassword.tsx +11 -4
- package/src/components/Auth/Login/LoginWithEmail.tsx +266 -238
- package/src/components/Auth/Login/LoginWithPhone.tsx +18 -6
- package/src/components/Auth/OTP/OTP.tsx +21 -5
- package/src/components/Auth/QrLogin/QrLogin.tsx +477 -177
- package/src/components/Auth/QrLogin/components/QrViewArea.tsx +349 -139
- package/src/components/Auth/SignUp/SignUp.tsx +312 -293
- package/src/components/Auth/SplashScreen/SplashScreen.tsx +186 -131
- package/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.tsx +32 -15
- package/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.tsx +11 -5
- package/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.tsx +34 -18
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +43 -37
- package/src/components/BlogView/BlogView.tsx +66 -30
- package/src/components/Button/BackBtn.tsx +64 -34
- package/src/components/Button/PrimaryBtn.tsx +42 -25
- package/src/components/Button/SecondaryBtn.tsx +41 -25
- package/src/components/Button/TextButton.tsx +54 -32
- package/src/components/Content/Card/Category/Category.tsx +189 -64
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +281 -136
- package/src/components/Content/Card/Sliders/Styles/One.tsx +270 -158
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +239 -90
- package/src/components/Content/Card/Styles/Five.tsx +161 -62
- package/src/components/Content/Card/Styles/Four.tsx +164 -85
- package/src/components/Content/Card/Styles/One.tsx +161 -71
- package/src/components/Content/Card/Styles/RotateInOut.tsx +162 -67
- package/src/components/Content/Card/Styles/Six.tsx +242 -142
- package/src/components/Content/Card/Styles/Three.tsx +166 -133
- package/src/components/Content/Card/Styles/TopTen.tsx +230 -191
- package/src/components/Content/Card/Styles/Two.tsx +182 -79
- package/src/components/Content/Card/components/AdsPoster.tsx +202 -0
- package/src/components/Content/Card/components/CardPoster.tsx +166 -105
- package/src/components/Content/Card/components/RentOrBuyIcon.tsx +58 -38
- package/src/components/Content/Card/components/ThumbnailCard.tsx +122 -47
- package/src/components/Content/Card/components/index.ts +1 -0
- package/src/components/Content/Content.tsx +211 -106
- package/src/components/Content/Sections.tsx +148 -51
- package/src/components/ContentView/ContentView.tsx +194 -128
- package/src/components/ContentView/MoreContentList.tsx +215 -151
- package/src/components/ContentView/components/AboutSection.tsx +132 -93
- package/src/components/ContentView/components/CastCard.tsx +148 -138
- package/src/components/ContentView/components/EpisodeCard.tsx +160 -155
- package/src/components/ContentView/components/GenreTags.tsx +68 -53
- package/src/components/ContentView/components/HeroBanner.tsx +326 -284
- package/src/components/ContentView/components/MiniInfo.tsx +181 -159
- package/src/components/ContentView/components/PlayButton.tsx +27 -16
- package/src/components/ContentView/components/Title.tsx +89 -72
- package/src/components/ContentView/components/TrailerButton.tsx +35 -22
- package/src/components/Fallbacks/NoContentFallback.tsx +107 -103
- package/src/components/Fallbacks/NotFoundFallback.tsx +12 -4
- package/src/components/Headers/AppHeader.tsx +42 -26
- package/src/components/Headers/Three.tsx +12 -8
- package/src/components/Headers/Two.tsx +31 -10
- package/src/components/Input/InputOne.tsx +136 -108
- package/src/components/Loader/Loader.tsx +2 -2
- package/src/components/Logo/Logo.tsx +43 -27
- package/src/components/Search/One.tsx +2 -4
- package/src/components/Search/components/SearchCard.tsx +19 -13
- package/src/components/Settings/AppSettings.tsx +217 -128
- package/src/components/Subscription/SubOne.tsx +394 -317
- package/src/components/Text/Text.tsx +33 -22
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +129 -102
- package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +36 -17
- package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +194 -140
- package/src/components/User/WatchHistory/WatchHistory.tsx +63 -36
- package/src/components/User/WatchLater/WatchLater.tsx +119 -81
- package/src/components/User/components/UserAvatar.tsx +49 -15
- package/src/components/User/components/UserSection.tsx +71 -37
- package/src/components/View/View.tsx +10 -2
- package/src/components/index.ts +0 -1
- package/src/constants/dummySections.ts +48 -1
- package/src/hooks/Images/index.ts +2 -0
- package/src/hooks/Images/useImageLoader.ts +206 -0
- package/src/hooks/Images/useImageValidation.ts +36 -0
- package/src/hooks/index.ts +17 -0
- package/src/hooks/useAdTracking.ts +349 -0
- package/src/hooks/useCards.ts +228 -0
- package/src/hooks/useDebounce.ts +25 -6
- package/src/hooks/useKeyboard.ts +12 -5
- package/src/hooks/useNavigationMode.ts +16 -5
- package/src/hooks/usePaginatedSection.ts +27 -8
- package/src/hooks/usePrevious.ts +28 -0
- package/src/hooks/useSafeCallback.ts +43 -0
- package/src/hooks/useSkeletonItems.ts +30 -0
- package/src/hooks/useSplashCache.ts +2 -1
- package/src/hooks/useThemeColors.ts +51 -0
- package/src/theme/ThemeProvider.tsx +25 -9
- package/src/theme/hook/useInternalTheme.ts +19 -13
- package/src/theme/hook/useThemeStatusBar.ts +14 -5
- package/src/types/sections/index.ts +7 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","View","StyleSheet","FastImage","SkeletonPlaceholder","scale","Text","ImageOff","RFValue","jsx","_jsx","jsxs","_jsxs","ThumbnailCard","thumbnailUri","theme","isLoading","borderRadius","wrapperStyle","imageStyle","resizeMode","cover","imageLoading","setImageLoading","imageError","setImageError","hasValidThumbnail","startsWith","showSkeleton","fallbackImageStyle","width","aspectRatio","position","top","left","
|
|
1
|
+
{"version":3,"names":["React","useState","useEffect","useMemo","useCallback","View","StyleSheet","FastImage","SkeletonPlaceholder","scale","Text","ImageOff","RFValue","jsx","_jsx","jsxs","_jsxs","loadedImageCache","Set","ThumbnailCard","thumbnailUri","theme","isLoading","borderRadius","wrapperStyle","imageStyle","resizeMode","cover","imageLoading","setImageLoading","imageError","setImageError","hasValidThumbnail","startsWith","isAlreadyLoaded","has","preload","uri","showSkeleton","fallbackImageStyle","width","aspectRatio","position","top","left","wrapperStyleMemo","styles","thumbnailWrapper","backgroundColor","colors","background","shadowColor","shadow","skeletonWrapperStyle","skeletonWrapper","imageStyleMemo","hidden","visible","fallbackStyle","fallback","errorContainer","borderColor","error","handleLoadStart","handleLoadEnd","add","handleError","style","children","skeletonBaseColor","highlightColor","skeletonHighlightColor","Item","skeleton","source","onLoadStart","onLoadEnd","onError","size","color","fallbackText","memo","create","overflow","opacity","alignItems","justifyContent","marginTop","fontSize"],"sourceRoot":"../../../../../../src","sources":["components/Content/Card/components/ThumbnailCard.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,SAAS,EAAEC,OAAO,EAAEC,WAAW,QAAQ,OAAO;AACxE,SAASC,IAAI,EAAEC,UAAU,QAAwC,cAAc;AAK/E,OAAOC,SAAS,MAAM,yBAAyB;AAC/C,OAAOC,mBAAmB,MAAM,mCAAmC;AACnE,SAASC,KAAK,QAAQ,2BAA2B;AACjD,SAASC,IAAI,QAAQ,wBAAe;AACpC,SAASC,QAAQ,QAAQ,qBAAqB;AAE9C,SAASC,OAAO,QAAQ,kCAAkC;;AAE1D;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;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EACDV,QAAQ,EAAE;IACRjC,KAAK,EAAE,MAAM;IACbC,WAAW,EAAE,EAAE,GAAG;EACpB,CAAC;EACDgB,OAAO,EAAE;IACP2B,OAAO,EAAE;EACX,CAAC;EACD5B,MAAM,EAAE;IACN4B,OAAO,EAAE;EACX,CAAC;EACDzB,QAAQ,EAAE;IACRjB,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPJ,KAAK,EAAE,MAAM;IACbC,WAAW,EAAE,EAAE,GAAG,CAAC;IACnB4C,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDN,YAAY,EAAE;IACZO,SAAS,EAAE9E,KAAK,CAAC,CAAC,CAAC;IACnB+E,QAAQ,EAAE5E,OAAO,CAAC,CAAC;EACrB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["components/Content/Card/components/index.ts"],"mappings":";;AAAA,cAAc,gBAAa","ignoreList":[]}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @author Naresh Dhamu
|
|
5
5
|
* @lastModified Sun 08 Jun 2025 at 03:50 PM
|
|
6
6
|
*/
|
|
7
|
-
import React, { useMemo } from 'react';
|
|
8
|
-
import { ActivityIndicator, FlatList } from 'react-native';
|
|
7
|
+
import React, { useMemo, useCallback } from 'react';
|
|
8
|
+
import { ActivityIndicator, Dimensions, FlatList } from 'react-native';
|
|
9
9
|
import { scale, verticalScale } from 'react-native-size-matters';
|
|
10
10
|
import Animated from 'react-native-reanimated';
|
|
11
11
|
import SectionType from "./Sections.js";
|
|
@@ -15,8 +15,28 @@ import { NoContentFallback } from "../Fallbacks/index.js";
|
|
|
15
15
|
import { useInternalTheme } from "../../theme/hook/index.js";
|
|
16
16
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
17
17
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
|
+
// Constants
|
|
19
|
+
const VIEWPORT_OFFSETS = {
|
|
20
|
+
top: 140,
|
|
21
|
+
bottom: 140,
|
|
22
|
+
left: 20,
|
|
23
|
+
right: 20
|
|
24
|
+
};
|
|
25
|
+
const INITIAL_NUM_TO_RENDER = 5;
|
|
26
|
+
const SCROLL_EVENT_THROTTLE = 16;
|
|
27
|
+
const END_REACHED_THRESHOLD = 0.7;
|
|
28
|
+
const LOADER_PADDING_VERTICAL = 30;
|
|
29
|
+
const CONTENT_PADDING_BOTTOM = 100;
|
|
30
|
+
|
|
31
|
+
// Types
|
|
32
|
+
|
|
33
|
+
// Animated Components
|
|
18
34
|
const AnimatedFlatList = Animated.createAnimatedComponent(FlatList);
|
|
19
|
-
|
|
35
|
+
|
|
36
|
+
// Footer Component Types
|
|
37
|
+
|
|
38
|
+
// Footer Component
|
|
39
|
+
const ContentFooter = /*#__PURE__*/React.memo(({
|
|
20
40
|
isEmpty,
|
|
21
41
|
ErrorComponent,
|
|
22
42
|
InfiniteScrollIsLoading,
|
|
@@ -27,14 +47,15 @@ const ContentFooter = ({
|
|
|
27
47
|
const {
|
|
28
48
|
theme: appliedTheme
|
|
29
49
|
} = useInternalTheme(theme);
|
|
50
|
+
const loaderStyle = useMemo(() => ({
|
|
51
|
+
paddingVertical: scale(LOADER_PADDING_VERTICAL),
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
justifyContent: 'center',
|
|
54
|
+
backgroundColor: 'transparent'
|
|
55
|
+
}), []);
|
|
30
56
|
if (InfiniteScrollIsLoading) {
|
|
31
57
|
return InfiniteScrollLoaderComponent ?? /*#__PURE__*/_jsx(Animated.View, {
|
|
32
|
-
style:
|
|
33
|
-
paddingVertical: scale(30),
|
|
34
|
-
alignItems: 'center',
|
|
35
|
-
justifyContent: 'center',
|
|
36
|
-
backgroundColor: 'transparent'
|
|
37
|
-
},
|
|
58
|
+
style: loaderStyle,
|
|
38
59
|
children: /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
39
60
|
size: "large",
|
|
40
61
|
color: appliedTheme.colors.primary
|
|
@@ -51,7 +72,9 @@ const ContentFooter = ({
|
|
|
51
72
|
});
|
|
52
73
|
}
|
|
53
74
|
return null;
|
|
54
|
-
};
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// Main Content Component
|
|
55
78
|
export const Content = ({
|
|
56
79
|
customComponents,
|
|
57
80
|
InfiniteScrollLoaderComponent,
|
|
@@ -69,10 +92,29 @@ export const Content = ({
|
|
|
69
92
|
isLoading,
|
|
70
93
|
noContentFallbackProps
|
|
71
94
|
}) => {
|
|
95
|
+
// Hooks
|
|
72
96
|
const insets = useSafeAreaInsets();
|
|
97
|
+
|
|
98
|
+
// Memoized Data
|
|
73
99
|
const sectionData = useMemo(() => contentData?.sectionData ?? [], [contentData?.sectionData]);
|
|
100
|
+
const sectionDataMemo = useMemo(() => ({
|
|
101
|
+
historyData: contentData.historyData,
|
|
102
|
+
category: contentData.category
|
|
103
|
+
}), [contentData.historyData, contentData.category]);
|
|
104
|
+
const loadingStateMemo = useMemo(() => ({
|
|
105
|
+
section: isLoading?.section ?? false,
|
|
106
|
+
history: isLoading?.history ?? false,
|
|
107
|
+
category: isLoading?.category ?? false
|
|
108
|
+
}), [isLoading?.section, isLoading?.history, isLoading?.category]);
|
|
109
|
+
const screenDimensions = useMemo(() => Dimensions.get('window'), []);
|
|
110
|
+
const listData = useMemo(() => isLoading?.section ? dummySections : sectionData, [isLoading?.section, sectionData]);
|
|
111
|
+
const isEmpty = useMemo(() => !isLoading?.section && (!sectionData || sectionData.length === 0), [isLoading?.section, sectionData]);
|
|
112
|
+
|
|
113
|
+
// Header Component
|
|
74
114
|
const headerComponent = useMemo(() => {
|
|
75
|
-
if (!contentData?.category || contentData.category.length === 0)
|
|
115
|
+
if (!contentData?.category || contentData.category.length === 0) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
76
118
|
return /*#__PURE__*/_jsx(CategoryCard, {
|
|
77
119
|
category: contentData.category,
|
|
78
120
|
onPressCategory: events?.onPressCategory,
|
|
@@ -80,9 +122,11 @@ export const Content = ({
|
|
|
80
122
|
isLoading: isLoading?.category,
|
|
81
123
|
mode: "filled",
|
|
82
124
|
theme: theme
|
|
83
|
-
},
|
|
125
|
+
}, "category");
|
|
84
126
|
}, [contentData?.category, events?.onPressCategory, events?.activeCategory, isLoading?.category, theme]);
|
|
85
|
-
|
|
127
|
+
|
|
128
|
+
// Render Item Callback
|
|
129
|
+
const renderItem = useCallback(({
|
|
86
130
|
item,
|
|
87
131
|
index
|
|
88
132
|
}) => {
|
|
@@ -97,8 +141,7 @@ export const Content = ({
|
|
|
97
141
|
type: item?.type || 'normal',
|
|
98
142
|
data: {
|
|
99
143
|
sectionData: item.content || null,
|
|
100
|
-
|
|
101
|
-
category: contentData.category
|
|
144
|
+
...sectionDataMemo
|
|
102
145
|
},
|
|
103
146
|
name: item?.name || `Section ${index}`,
|
|
104
147
|
theme: theme,
|
|
@@ -106,39 +149,55 @@ export const Content = ({
|
|
|
106
149
|
section_id: item?._id || index.toString(),
|
|
107
150
|
events: events,
|
|
108
151
|
isLoading: {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
category: isLoading?.category
|
|
152
|
+
...loadingStateMemo,
|
|
153
|
+
section: isLoadingItem
|
|
112
154
|
},
|
|
113
155
|
sectionProps: sectionProps,
|
|
114
156
|
moreFetchDataHistory: moreFetchDataHistory,
|
|
115
|
-
moreFetchData: moreFetchData
|
|
157
|
+
moreFetchData: moreFetchData,
|
|
158
|
+
onDisplayAds: events?.onDisplayAds,
|
|
159
|
+
screenDimensions: screenDimensions,
|
|
160
|
+
viewportOffsets: VIEWPORT_OFFSETS
|
|
116
161
|
}, index);
|
|
117
|
-
};
|
|
118
|
-
|
|
162
|
+
}, [isLoading?.section, LoaderComponent, sectionDataMemo, theme, customComponents, events, loadingStateMemo, sectionProps, moreFetchDataHistory, moreFetchData, screenDimensions]);
|
|
163
|
+
|
|
164
|
+
// Key Extractor
|
|
165
|
+
const keyExtractor = useCallback((_item, index) => index.toString(), []);
|
|
166
|
+
|
|
167
|
+
// Handlers
|
|
168
|
+
const handleEndReached = useCallback(() => {
|
|
169
|
+
onEndReached?.();
|
|
170
|
+
}, [onEndReached]);
|
|
171
|
+
|
|
172
|
+
// Styles
|
|
173
|
+
const contentContainerStyleMemo = useMemo(() => [{
|
|
174
|
+
paddingBottom: verticalScale(CONTENT_PADDING_BOTTOM) + insets.bottom
|
|
175
|
+
}, contentContainerStyle], [insets.bottom, contentContainerStyle]);
|
|
176
|
+
|
|
177
|
+
// Footer Component
|
|
178
|
+
const footerComponent = useMemo(() => /*#__PURE__*/_jsx(ContentFooter, {
|
|
179
|
+
InfiniteScrollLoaderComponent: InfiniteScrollLoaderComponent,
|
|
180
|
+
InfiniteScrollIsLoading: isLoading?.InfiniteScrollIsLoading,
|
|
181
|
+
isEmpty: isEmpty,
|
|
182
|
+
ErrorComponent: ErrorComponent,
|
|
183
|
+
theme: theme,
|
|
184
|
+
noContentFallbackProps: noContentFallbackProps
|
|
185
|
+
}), [InfiniteScrollLoaderComponent, isLoading?.InfiniteScrollIsLoading, isEmpty, ErrorComponent, theme, noContentFallbackProps]);
|
|
119
186
|
return /*#__PURE__*/_jsx(AnimatedFlatList, {
|
|
120
|
-
|
|
187
|
+
data: listData,
|
|
188
|
+
renderItem: renderItem,
|
|
189
|
+
keyExtractor: keyExtractor,
|
|
190
|
+
onScroll: onScroll,
|
|
191
|
+
onEndReached: handleEndReached,
|
|
192
|
+
onEndReachedThreshold: END_REACHED_THRESHOLD,
|
|
193
|
+
scrollEventThrottle: SCROLL_EVENT_THROTTLE,
|
|
194
|
+
initialNumToRender: INITIAL_NUM_TO_RENDER,
|
|
121
195
|
showsVerticalScrollIndicator: false,
|
|
122
196
|
removeClippedSubviews: true,
|
|
123
|
-
onScroll: onScroll,
|
|
124
|
-
scrollEventThrottle: 16,
|
|
125
|
-
data: isLoading?.section ? dummySections : sectionData,
|
|
126
|
-
renderItem: renderItem,
|
|
127
|
-
keyExtractor: (_item, index) => index.toString(),
|
|
128
|
-
onEndReached: () => onEndReached?.(),
|
|
129
197
|
ListHeaderComponent: headerComponent,
|
|
130
|
-
ListFooterComponent:
|
|
131
|
-
|
|
132
|
-
InfiniteScrollIsLoading: isLoading?.InfiniteScrollIsLoading,
|
|
133
|
-
isEmpty: isEmpty,
|
|
134
|
-
ErrorComponent: ErrorComponent,
|
|
135
|
-
theme: theme,
|
|
136
|
-
noContentFallbackProps: noContentFallbackProps
|
|
137
|
-
}),
|
|
138
|
-
onEndReachedThreshold: 0.7,
|
|
139
|
-
contentContainerStyle: [{
|
|
140
|
-
paddingBottom: verticalScale(100) + insets.bottom
|
|
141
|
-
}, contentContainerStyle]
|
|
198
|
+
ListFooterComponent: footerComponent,
|
|
199
|
+
contentContainerStyle: contentContainerStyleMemo
|
|
142
200
|
});
|
|
143
201
|
};
|
|
202
|
+
export default /*#__PURE__*/React.memo(Content);
|
|
144
203
|
//# sourceMappingURL=Content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","ActivityIndicator","FlatList","scale","verticalScale","Animated","SectionType","dummySections","CategoryCard","NoContentFallback","useInternalTheme","useSafeAreaInsets","jsx","_jsx","Fragment","_Fragment","AnimatedFlatList","createAnimatedComponent","ContentFooter","isEmpty","ErrorComponent","InfiniteScrollIsLoading","InfiniteScrollLoaderComponent","theme","noContentFallbackProps","appliedTheme","
|
|
1
|
+
{"version":3,"names":["React","useMemo","useCallback","ActivityIndicator","Dimensions","FlatList","scale","verticalScale","Animated","SectionType","dummySections","CategoryCard","NoContentFallback","useInternalTheme","useSafeAreaInsets","jsx","_jsx","Fragment","_Fragment","VIEWPORT_OFFSETS","top","bottom","left","right","INITIAL_NUM_TO_RENDER","SCROLL_EVENT_THROTTLE","END_REACHED_THRESHOLD","LOADER_PADDING_VERTICAL","CONTENT_PADDING_BOTTOM","AnimatedFlatList","createAnimatedComponent","ContentFooter","memo","isEmpty","ErrorComponent","InfiniteScrollIsLoading","InfiniteScrollLoaderComponent","theme","noContentFallbackProps","appliedTheme","loaderStyle","paddingVertical","alignItems","justifyContent","backgroundColor","View","style","children","size","color","colors","primary","isLoading","Content","customComponents","LoaderComponent","onScroll","contentContainerStyle","contentData","onEndReached","events","sectionProps","moreFetchData","moreFetchDataHistory","insets","sectionData","sectionDataMemo","historyData","category","loadingStateMemo","section","history","screenDimensions","get","listData","length","headerComponent","onPressCategory","activeCategory","mode","renderItem","item","index","isDummy","_id","startsWith","isLoadingItem","type","data","content","name","section_id","toString","onDisplayAds","viewportOffsets","keyExtractor","_item","handleEndReached","contentContainerStyleMemo","paddingBottom","footerComponent","onEndReachedThreshold","scrollEventThrottle","initialNumToRender","showsVerticalScrollIndicator","removeClippedSubviews","ListHeaderComponent","ListFooterComponent"],"sourceRoot":"../../../../src","sources":["components/Content/Content.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,OAAO,EAAEC,WAAW,QAAQ,OAAO;AACnD,SACEC,iBAAiB,EACjBC,UAAU,EACVC,QAAQ,QAMH,cAAc;AACrB,SAASC,KAAK,EAAEC,aAAa,QAAQ,2BAA2B;AAChE,OAAOC,QAAQ,MAGR,yBAAyB;AAEhC,OAAOC,WAAW,MAAM,eAAY;AAEpC,SAASC,aAAa,QAAQ,kCAA+B;AAC7D,OAAOC,YAAY,MAA0B,6BAA0B;AAGvE,SAASC,iBAAiB,QAAqC,uBAAc;AAC7E,SAASC,gBAAgB,QAAQ,2BAAkB;AACnD,SAASC,iBAAiB,QAAQ,gCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA;AAGnE;AACA,MAAMC,gBAAgB,GAAG;EACvBC,GAAG,EAAE,GAAG;EACRC,MAAM,EAAE,GAAG;EACXC,IAAI,EAAE,EAAE;EACRC,KAAK,EAAE;AACT,CAAU;AAEV,MAAMC,qBAAqB,GAAG,C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CAAC,GAAGoC,MAAM,CAAC3C;EAAO,CAAC,EACxEoC,qBAAqB,CACtB,EACD,CAACO,MAAM,CAAC3C,MAAM,EAAEoC,qBAAqB,CACvC,CAAC;;EAED;EACA,MAAM2C,eAAe,GAAGnG,OAAO,CAC7B,mBACEe,IAAA,CAACe,aAAa;IACZK,6BAA6B,EAAEA,6BAA8B;IAC7DD,uBAAuB,EAAEiB,SAAS,EAAEjB,uBAAwB;IAC5DF,OAAO,EAAEA,OAAQ;IACjBC,cAAc,EAAEA,cAAe;IAC/BG,KAAK,EAAEA,KAAM;IACbC,sBAAsB,EAAEA;EAAuB,CAChD,CACF,EACD,CACEF,6BAA6B,EAC7BgB,SAAS,EAAEjB,uBAAuB,EAClCF,OAAO,EACPC,cAAc,EACdG,KAAK,EACLC,sBAAsB,CAE1B,CAAC;EAED,oBACEtB,IAAA,CAACa,gBAAgB;IACf2D,IAAI,EAAEd,QAAS;IACfM,UAAU,EAAEA,UAAkB;IAC9Be,YAAY,EAAEA,YAAa;IAC3BvC,QAAQ,EAAEA,QAAgB;IAC1BG,YAAY,EAAEsC,gBAAiB;IAC/BI,qBAAqB,EAAE3E,qBAAsB;IAC7C4E,mBAAmB,EAAE7E,qBAAsB;IAC3C8E,kBAAkB,EAAE/E,qBAAsB;IAC1CgF,4BAA4B,EAAE,KAAM;IACpCC,qBAAqB;IACrBC,mBAAmB,EAAE9B,eAAgB;IACrC+B,mBAAmB,EAAEP,eAAgB;IACrC3C,qBAAqB,EAAEyC;EAA0B,CAClD,CAAC;AAEN,CAAC;AAED,4BAAelG,KAAK,CAACgC,IAAI,CAACqB,OAAO,CAAC","ignoreList":[]}
|
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @author Naresh Dhamu
|
|
5
|
-
* @lastModified Sun 08 Jun 2025
|
|
5
|
+
* @lastModified Sun 08 Jun 2025
|
|
6
6
|
*/
|
|
7
|
-
import React from 'react';
|
|
7
|
+
import React, { useMemo } from 'react';
|
|
8
8
|
import Sliders from "./Card/Sliders/index.js";
|
|
9
9
|
import Cards from "./Card/index.js";
|
|
10
10
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
-
const
|
|
11
|
+
const createCommonProps = (type, props) => {
|
|
12
12
|
const effectiveIsLoading = props.isLoading?.section || props.section_id === `dummy-${type}`;
|
|
13
|
-
const
|
|
13
|
+
const onPressMoreHandler = props.events?.onPressMore ? params => {
|
|
14
|
+
props.events?.onPressMore?.({
|
|
15
|
+
section_id: params.section_id,
|
|
16
|
+
name: params.name,
|
|
17
|
+
type
|
|
18
|
+
});
|
|
19
|
+
} : undefined;
|
|
20
|
+
return {
|
|
14
21
|
theme: props.theme,
|
|
15
22
|
title: props.name,
|
|
16
23
|
section_id: props.section_id,
|
|
@@ -18,11 +25,18 @@ const renderDefaultComponent = (type, props) => {
|
|
|
18
25
|
data: props.data?.sectionData || null,
|
|
19
26
|
index: props.index,
|
|
20
27
|
onPressItem: props.events?.onPressItem,
|
|
21
|
-
onPressMore:
|
|
28
|
+
onPressMore: onPressMoreHandler,
|
|
29
|
+
onAdVisible: props.events?.onAdVisible,
|
|
22
30
|
isLoading: effectiveIsLoading,
|
|
23
31
|
moreFetchDataHistory: props.moreFetchDataHistory,
|
|
24
|
-
moreFetchData: props.moreFetchData
|
|
32
|
+
moreFetchData: props.moreFetchData,
|
|
33
|
+
onDisplayAds: props.onDisplayAds || props.events?.onDisplayAds,
|
|
34
|
+
screenDimensions: props.screenDimensions,
|
|
35
|
+
viewportOffsets: props.viewportOffsets
|
|
25
36
|
};
|
|
37
|
+
};
|
|
38
|
+
const renderDefaultComponent = (type, props) => {
|
|
39
|
+
const commonProps = createCommonProps(type, props);
|
|
26
40
|
switch (type) {
|
|
27
41
|
case 'slider':
|
|
28
42
|
return /*#__PURE__*/_jsx(Sliders.Styles.One, {
|
|
@@ -79,6 +93,10 @@ const renderDefaultComponent = (type, props) => {
|
|
|
79
93
|
return null;
|
|
80
94
|
}
|
|
81
95
|
};
|
|
96
|
+
|
|
97
|
+
// ----------------------------------------
|
|
98
|
+
// Sections Component
|
|
99
|
+
// ----------------------------------------
|
|
82
100
|
const Sections = ({
|
|
83
101
|
type,
|
|
84
102
|
data,
|
|
@@ -91,20 +109,17 @@ const Sections = ({
|
|
|
91
109
|
sectionProps,
|
|
92
110
|
isLoading,
|
|
93
111
|
moreFetchData,
|
|
94
|
-
moreFetchDataHistory
|
|
112
|
+
moreFetchDataHistory,
|
|
113
|
+
onDisplayAds,
|
|
114
|
+
screenDimensions,
|
|
115
|
+
viewportOffsets
|
|
95
116
|
}) => {
|
|
96
|
-
const commonProps = {
|
|
117
|
+
const commonProps = useMemo(() => ({
|
|
97
118
|
data: data.sectionData,
|
|
98
119
|
title: name
|
|
99
|
-
};
|
|
100
|
-
const customComponent = customComponents.find(c => c.type === type);
|
|
101
|
-
|
|
102
|
-
return /*#__PURE__*/React.cloneElement(customComponent.component, {
|
|
103
|
-
...(customComponent.component?.props ?? {}),
|
|
104
|
-
...commonProps
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
const defaultRendered = renderDefaultComponent(type, {
|
|
120
|
+
}), [data.sectionData, name]);
|
|
121
|
+
const customComponent = useMemo(() => customComponents.find(c => c.type === type), [customComponents, type]);
|
|
122
|
+
const defaultRendered = useMemo(() => renderDefaultComponent(type, {
|
|
108
123
|
data,
|
|
109
124
|
name,
|
|
110
125
|
section_id,
|
|
@@ -114,24 +129,38 @@ const Sections = ({
|
|
|
114
129
|
sectionProps,
|
|
115
130
|
isLoading,
|
|
116
131
|
moreFetchData,
|
|
117
|
-
moreFetchDataHistory
|
|
118
|
-
|
|
132
|
+
moreFetchDataHistory,
|
|
133
|
+
onDisplayAds,
|
|
134
|
+
screenDimensions,
|
|
135
|
+
viewportOffsets
|
|
136
|
+
}), [type, data, name, section_id, index, theme, events, sectionProps, isLoading, moreFetchData, moreFetchDataHistory, onDisplayAds, screenDimensions, viewportOffsets]);
|
|
137
|
+
const filterProps = useMemo(() => ({
|
|
138
|
+
data,
|
|
139
|
+
name,
|
|
140
|
+
section_id,
|
|
141
|
+
index,
|
|
142
|
+
theme,
|
|
143
|
+
events,
|
|
144
|
+
sectionProps,
|
|
145
|
+
isLoading,
|
|
146
|
+
moreFetchData,
|
|
147
|
+
moreFetchDataHistory,
|
|
148
|
+
onDisplayAds,
|
|
149
|
+
screenDimensions,
|
|
150
|
+
viewportOffsets
|
|
151
|
+
}), [data, name, section_id, index, theme, events, sectionProps, isLoading, moreFetchData, moreFetchDataHistory, onDisplayAds, screenDimensions, viewportOffsets]);
|
|
152
|
+
const fallbackComponents = useMemo(() => customComponents.filter(({
|
|
153
|
+
type: customType
|
|
154
|
+
}) => renderDefaultComponent(customType, filterProps) === null), [customComponents, filterProps]);
|
|
155
|
+
if (customComponent) {
|
|
156
|
+
return /*#__PURE__*/React.cloneElement(customComponent.component, {
|
|
157
|
+
...(customComponent.component?.props ?? {}),
|
|
158
|
+
...commonProps
|
|
159
|
+
});
|
|
160
|
+
}
|
|
119
161
|
if (defaultRendered) return defaultRendered;
|
|
120
162
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
121
|
-
children:
|
|
122
|
-
type: customType
|
|
123
|
-
}) => renderDefaultComponent(customType, {
|
|
124
|
-
data,
|
|
125
|
-
name,
|
|
126
|
-
section_id,
|
|
127
|
-
index,
|
|
128
|
-
theme,
|
|
129
|
-
events,
|
|
130
|
-
sectionProps,
|
|
131
|
-
isLoading,
|
|
132
|
-
moreFetchData,
|
|
133
|
-
moreFetchDataHistory
|
|
134
|
-
}) === null).map(({
|
|
163
|
+
children: fallbackComponents.map(({
|
|
135
164
|
component,
|
|
136
165
|
type: key
|
|
137
166
|
}) => /*#__PURE__*/React.cloneElement(component, {
|
|
@@ -141,5 +170,5 @@ const Sections = ({
|
|
|
141
170
|
}))
|
|
142
171
|
});
|
|
143
172
|
};
|
|
144
|
-
export default Sections;
|
|
173
|
+
export default /*#__PURE__*/React.memo(Sections);
|
|
145
174
|
//# sourceMappingURL=Sections.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Sliders","Cards","jsx","_jsx","Fragment","_Fragment","
|
|
1
|
+
{"version":3,"names":["React","useMemo","Sliders","Cards","jsx","_jsx","Fragment","_Fragment","createCommonProps","type","props","effectiveIsLoading","isLoading","section","section_id","onPressMoreHandler","events","onPressMore","params","name","undefined","theme","title","data","sectionData","index","onPressItem","onAdVisible","moreFetchDataHistory","moreFetchData","onDisplayAds","screenDimensions","viewportOffsets","renderDefaultComponent","commonProps","Styles","One","showPlayIcon","sectionProps","showPlayBtn","Two","Three","Four","Five","Six","NowWatching","historyData","isLoadingHistory","history","RotateCarousel","TopTen","Sections","customComponents","customComponent","find","c","defaultRendered","filterProps","fallbackComponents","filter","customType","cloneElement","component","children","map","key","memo"],"sourceRoot":"../../../../src","sources":["components/Content/Sections.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,OAAOC,OAAO,MAAM,yBAAgB;AACpC,OAAOC,KAAK,MAAM,iBAAQ;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA;AAoD3B,MAAMC,iBAAiB,GAAGA,CACxBC,IAA6B,EAC7BC,KAAgD,KAC7C;EACH,MAAMC,kBAAkB,GACtBD,KAAK,CAACE,SAAS,EAAEC,OAAO,IAAIH,KAAK,CAACI,UAAU,KAAK,SAASL,IAAI,EAAE;EAElE,MAAMM,kBAAkB,GAAGL,KAAK,CAACM,MAAM,EAAEC,WAAW,GAC/CC,MAA0D,IAAK;IAC9DR,KAAK,CAACM,MAAM,EAAEC,WAAW,GAAG;MAC1BH,UAAU,EAAEI,MAAM,CAACJ,UAAU;MAC7BK,IAAI,EAAED,MAAM,CAACC,IAAI;MACjBV;IACF,CAAC,CAAC;EACJ,CAAC,GACDW,SAAS;EAEb,OAAO;IACLC,KAAK,EAAEX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K,EACLJ,KAAK,EACLL,MAAM,EACNsB,YAAY,EACZ1B,SAAS,EACTiB,aAAa,EACbD,oBAAoB,EACpBE,YAAY,EACZC,gBAAgB,EAChBC,eAAe,CAEnB,CAAC;EAED,MAAM0B,kBAAkB,GAAGzD,OAAO,CAChC,MACEmD,gBAAgB,CAACO,MAAM,CACrB,CAAC;IAAElD,IAAI,EAAEmD;EAAW,CAAC,KACnB3B,sBAAsB,CACpB2B,UAAU,EACVH,WACF,CAAC,KAAK,IACV,CAAC,EACH,CAACL,gBAAgB,EAAEK,WAAW,CAChC,CAAC;EAED,IAAIJ,eAAe,EAAE;IACnB,oBAAOrD,KAAK,CAAC6D,YAAY,CAACR,eAAe,CAACS,SAAS,EAAE;MACnD,IAAIT,eAAe,CAACS,SAAS,EAAEpD,KAAK,IAAI,CAAC,CAAC,CAAC;MAC3C,GAAGwB;IACL,CAAC,CAAC;EACJ;EAEA,IAAIsB,eAAe,EAAE,OAAOA,eAAe;EAE3C,oBACEnD,IAAA,CAAAE,SAAA;IAAAwD,QAAA,EACGL,kBAAkB,CAACM,GAAG,CAAC,CAAC;MAAEF,SAAS;MAAErD,IAAI,EAAEwD;IAAI,CAAC,kBAC/CjE,KAAK,CAAC6D,YAAY,CAACC,SAAS,EAAE;MAC5B,IAAIA,SAAS,EAAEpD,KAAK,IAAI,CAAC,CAAC,CAAC;MAC3BuD,GAAG;MACH,GAAG/B;IACL,CAAC,CACH;EAAC,CACD,CAAC;AAEP,CAAC;AAED,4BAAelC,KAAK,CAACkE,IAAI,CAACf,QAAQ,CAAC","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @author Naresh Dhamu
|
|
5
5
|
* @lastModified Tue 01 Jul 2025 at 02:28 PM
|
|
6
6
|
*/
|
|
7
|
+
import React, { useMemo, useCallback } from 'react';
|
|
7
8
|
import { ScrollView, StyleSheet } from 'react-native';
|
|
8
9
|
import { HeroBanner } from "./components/HeroBanner.js";
|
|
9
10
|
import { GenreTags } from "./components/GenreTags.js";
|
|
@@ -17,7 +18,7 @@ import { EpisodeCard } from "./components/EpisodeCard.js";
|
|
|
17
18
|
import { NotFoundFallback } from "../Fallbacks/index.js";
|
|
18
19
|
import { MiniInfo } from "./components/MiniInfo.js";
|
|
19
20
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
|
-
export const ContentView = ({
|
|
21
|
+
export const ContentView = /*#__PURE__*/React.memo(({
|
|
21
22
|
content,
|
|
22
23
|
seasons,
|
|
23
24
|
isLoading = false,
|
|
@@ -39,15 +40,70 @@ export const ContentView = ({
|
|
|
39
40
|
const {
|
|
40
41
|
theme: appliedTheme
|
|
41
42
|
} = useInternalTheme(theme);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
const
|
|
43
|
+
|
|
44
|
+
// Memoize computed values
|
|
45
|
+
const seekTime = useMemo(() => history?.currentTime || 0, [history?.currentTime]);
|
|
46
|
+
const isComplete = useMemo(() => history?.completed || false, [history?.completed]);
|
|
47
|
+
const currentEpisode = useMemo(() => history?.current_episode, [history?.current_episode]);
|
|
48
|
+
const isNotFound = useMemo(() => !isLoading && !content, [isLoading, content]);
|
|
49
|
+
|
|
50
|
+
// Memoize play handler
|
|
51
|
+
const handlePlayPress = useCallback(({
|
|
52
|
+
is_trailer
|
|
53
|
+
}) => {
|
|
54
|
+
if (!content) return;
|
|
55
|
+
events?.onPlay?.({
|
|
56
|
+
id: content._id,
|
|
57
|
+
slug: content.slug,
|
|
58
|
+
type: content.type,
|
|
59
|
+
current_episode: currentEpisode,
|
|
60
|
+
mode: 'fullscreen',
|
|
61
|
+
is_trailer,
|
|
62
|
+
seekTime: isComplete ? 0 : seekTime
|
|
63
|
+
});
|
|
64
|
+
}, [content, currentEpisode, isComplete, seekTime, events]);
|
|
65
|
+
|
|
66
|
+
// Memoize episode press handler
|
|
67
|
+
const handleEpisodePress = useCallback(({
|
|
68
|
+
season_id,
|
|
69
|
+
episode_id,
|
|
70
|
+
episode_number
|
|
71
|
+
}) => {
|
|
72
|
+
if (!content || seasonsIsLoading) return;
|
|
73
|
+
events?.onPlay?.({
|
|
74
|
+
id: content._id,
|
|
75
|
+
slug: content.slug,
|
|
76
|
+
type: content.type,
|
|
77
|
+
current_episode: episode_id,
|
|
78
|
+
current_season: season_id,
|
|
79
|
+
episode_number
|
|
80
|
+
});
|
|
81
|
+
}, [content, seasonsIsLoading, events]);
|
|
82
|
+
|
|
83
|
+
// Memoize recommended item press handler
|
|
84
|
+
const handleRecommendedItemPress = useCallback(item => {
|
|
85
|
+
events?.onPressRecommendedItem?.({
|
|
86
|
+
item
|
|
87
|
+
});
|
|
88
|
+
}, [events]);
|
|
89
|
+
|
|
90
|
+
// Memoize not found text
|
|
91
|
+
const notFoundText = useMemo(() => ({
|
|
92
|
+
title: text?.notFound?.title || 'Oops! Content Not Found',
|
|
93
|
+
subtitle: text?.notFound?.subtitle || "We couldn't find anything to show here. Please check back later.",
|
|
94
|
+
buttonText: text?.notFound?.buttonText || 'Go Back'
|
|
95
|
+
}), [text?.notFound]);
|
|
96
|
+
|
|
97
|
+
// Memoize show episodes condition
|
|
98
|
+
const showEpisodes = useMemo(() => content?.type === 'series' && (seasonsIsLoading || seasons && seasons.length > 0), [content?.type, seasonsIsLoading, seasons]);
|
|
99
|
+
|
|
100
|
+
// Memoize show recommended condition
|
|
101
|
+
const showRecommended = useMemo(() => recommendedContent && recommendedContent?.content, [recommendedContent]);
|
|
46
102
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
47
103
|
children: isNotFound ? /*#__PURE__*/_jsx(NotFoundFallback, {
|
|
48
|
-
title:
|
|
49
|
-
subtitle:
|
|
50
|
-
backButtonText:
|
|
104
|
+
title: notFoundText.title,
|
|
105
|
+
subtitle: notFoundText.subtitle,
|
|
106
|
+
backButtonText: notFoundText.buttonText,
|
|
51
107
|
onPressBack: events?.onBackPress,
|
|
52
108
|
theme: theme
|
|
53
109
|
}) : /*#__PURE__*/_jsxs(ScrollView, {
|
|
@@ -60,17 +116,7 @@ export const ContentView = ({
|
|
|
60
116
|
theme: theme,
|
|
61
117
|
isLoading: isLoading,
|
|
62
118
|
content_offering_type: content?.content_offering_type,
|
|
63
|
-
onPressPlay:
|
|
64
|
-
is_trailer
|
|
65
|
-
}) => events?.onPlay?.({
|
|
66
|
-
id: content._id,
|
|
67
|
-
slug: content.slug,
|
|
68
|
-
type: content.type,
|
|
69
|
-
current_episode: currentEpisode,
|
|
70
|
-
mode: 'fullscreen',
|
|
71
|
-
is_trailer,
|
|
72
|
-
seekTime: isComplete ? 0 : seekTime
|
|
73
|
-
}),
|
|
119
|
+
onPressPlay: handlePlayPress,
|
|
74
120
|
onBackPress: events?.onBackPress,
|
|
75
121
|
...heroBannerProps
|
|
76
122
|
}), /*#__PURE__*/_jsx(Title, {
|
|
@@ -102,44 +148,27 @@ export const ContentView = ({
|
|
|
102
148
|
isLoading: isLoading,
|
|
103
149
|
onItemPress: () => {},
|
|
104
150
|
style: castStyles
|
|
105
|
-
}),
|
|
151
|
+
}), showEpisodes && /*#__PURE__*/_jsx(EpisodeCard, {
|
|
106
152
|
isLoading: seasonsIsLoading,
|
|
107
153
|
seasons: seasonsIsLoading ? [] : seasons ?? [],
|
|
108
|
-
onPress:
|
|
109
|
-
season_id,
|
|
110
|
-
episode_id,
|
|
111
|
-
episode_number
|
|
112
|
-
}) => {
|
|
113
|
-
if (!seasonsIsLoading) {
|
|
114
|
-
events?.onPlay?.({
|
|
115
|
-
id: content._id,
|
|
116
|
-
slug: content.slug,
|
|
117
|
-
type: content.type,
|
|
118
|
-
current_episode: episode_id,
|
|
119
|
-
current_season: season_id,
|
|
120
|
-
episode_number
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
},
|
|
154
|
+
onPress: handleEpisodePress,
|
|
124
155
|
theme: theme,
|
|
125
156
|
mode: episodeCardMode ?? 'horizontal'
|
|
126
|
-
}),
|
|
157
|
+
}), showRecommended && recommendedContent && /*#__PURE__*/_jsx(Cards.Styles.Four, {
|
|
127
158
|
section_id: recommendedContent._id,
|
|
128
159
|
title: recommendedContent.name,
|
|
129
160
|
type: recommendedContent.type,
|
|
130
161
|
data: recommendedContent.content,
|
|
131
162
|
isLoading: isLoading,
|
|
132
163
|
theme: theme,
|
|
133
|
-
onPressItem:
|
|
134
|
-
item
|
|
135
|
-
}),
|
|
164
|
+
onPressItem: handleRecommendedItemPress,
|
|
136
165
|
onPressMore: events?.onPressRecommendedMore,
|
|
137
166
|
moreFetchData: events?.moreFetchDataRecommended,
|
|
138
167
|
...recommendedContentCardStyles
|
|
139
168
|
})]
|
|
140
169
|
})
|
|
141
170
|
});
|
|
142
|
-
};
|
|
171
|
+
});
|
|
143
172
|
const styles = StyleSheet.create({
|
|
144
173
|
scrollContent: {
|
|
145
174
|
paddingBottom: scale(80)
|