@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
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* @author Naresh Dhamu
|
|
3
3
|
* @LastModified Mon 30 Jun 2025 at 11:30 PM
|
|
4
4
|
*/
|
|
5
|
-
import React, { memo, useCallback, useMemo, useState } from 'react';
|
|
5
|
+
import React, { memo, useCallback, useMemo, useState, useRef } from 'react';
|
|
6
|
+
import { InteractionManager } from 'react-native';
|
|
7
|
+
import { useSkeletonItems } from '../../../../../hooks/useSkeletonItems';
|
|
6
8
|
import {
|
|
7
9
|
View,
|
|
8
10
|
TouchableOpacity,
|
|
@@ -24,8 +26,45 @@ import RentOrBuyIcon from '../../components/RentOrBuyIcon';
|
|
|
24
26
|
import type { ThemeOverride } from '../../../../../theme/themes';
|
|
25
27
|
import type { IContentData } from '@zezosoft/zezo-ott-api-client';
|
|
26
28
|
|
|
29
|
+
// ============================================================================
|
|
30
|
+
// Constants
|
|
31
|
+
// ============================================================================
|
|
27
32
|
const FULL_WIDTH = Display.fullWidth;
|
|
28
|
-
const
|
|
33
|
+
const ASPECT_RATIO = 9 / 16;
|
|
34
|
+
const FULL_HEIGHT = FULL_WIDTH * ASPECT_RATIO;
|
|
35
|
+
const DEFAULT_SKELETON_COUNT = 3;
|
|
36
|
+
const SCROLL_ANIMATION_DURATION = 300;
|
|
37
|
+
const AUTO_PLAY_INTERVAL = 3000;
|
|
38
|
+
const CAROUSEL_WINDOW_SIZE = 2;
|
|
39
|
+
const SNAP_DEBOUNCE_DELAY = 50;
|
|
40
|
+
const SKELETON_SPEED = 2000;
|
|
41
|
+
const PAN_GESTURE_ACTIVE_OFFSET_X = [-10, 10];
|
|
42
|
+
const PAN_GESTURE_FAIL_OFFSET_Y = [-5, 5];
|
|
43
|
+
const GRADIENT_OVERLAY_COLORS = ['transparent', 'rgba(0,0,0,0.7)'] as [
|
|
44
|
+
string,
|
|
45
|
+
string,
|
|
46
|
+
];
|
|
47
|
+
const GRADIENT_START = { x: 0.5, y: 0 };
|
|
48
|
+
const GRADIENT_END = { x: 0.5, y: 1 };
|
|
49
|
+
const INDICATOR_WIDTH_ACTIVE = scale(18);
|
|
50
|
+
const INDICATOR_WIDTH_INACTIVE = scale(8);
|
|
51
|
+
const INDICATOR_HEIGHT = scale(8);
|
|
52
|
+
const INDICATOR_BORDER_RADIUS = scale(50);
|
|
53
|
+
const TOUCH_OPACITY = 0.85;
|
|
54
|
+
|
|
55
|
+
// ============================================================================
|
|
56
|
+
// Types
|
|
57
|
+
// ============================================================================
|
|
58
|
+
type CarouselItemProps = {
|
|
59
|
+
item: IContentData;
|
|
60
|
+
onPressItem?: (item: IContentData) => void;
|
|
61
|
+
appliedTheme: any;
|
|
62
|
+
gradientConfig: {
|
|
63
|
+
colors: [string, string];
|
|
64
|
+
start: { x: number; y: number };
|
|
65
|
+
end: { x: number; y: number };
|
|
66
|
+
};
|
|
67
|
+
};
|
|
29
68
|
|
|
30
69
|
type SliderTwoProps = {
|
|
31
70
|
data: ISectionContent | null;
|
|
@@ -35,112 +74,225 @@ type SliderTwoProps = {
|
|
|
35
74
|
theme?: ThemeOverride;
|
|
36
75
|
} & AccessibilityProps;
|
|
37
76
|
|
|
77
|
+
// ============================================================================
|
|
78
|
+
// Helper Components
|
|
79
|
+
// ============================================================================
|
|
80
|
+
const CarouselItem = memo<CarouselItemProps>(
|
|
81
|
+
({ item, onPressItem, appliedTheme, gradientConfig }) => (
|
|
82
|
+
<TouchableOpacity
|
|
83
|
+
activeOpacity={TOUCH_OPACITY}
|
|
84
|
+
onPress={() => onPressItem?.(item)}
|
|
85
|
+
style={styles.itemWrapper}
|
|
86
|
+
accessibilityRole="button"
|
|
87
|
+
accessibilityLabel={`View ${item.name}`}
|
|
88
|
+
>
|
|
89
|
+
<RentOrBuyIcon
|
|
90
|
+
theme={appliedTheme}
|
|
91
|
+
content_offering_type={item.content_offering_type}
|
|
92
|
+
/>
|
|
93
|
+
<ThumbnailCard
|
|
94
|
+
thumbnailUri={item.thumbnail}
|
|
95
|
+
theme={appliedTheme}
|
|
96
|
+
isLoading={false}
|
|
97
|
+
wrapperStyle={styles.image}
|
|
98
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
99
|
+
/>
|
|
100
|
+
<LinearGradient
|
|
101
|
+
colors={gradientConfig.colors}
|
|
102
|
+
start={gradientConfig.start}
|
|
103
|
+
end={gradientConfig.end}
|
|
104
|
+
style={styles.gradientBottomOverlay}
|
|
105
|
+
/>
|
|
106
|
+
</TouchableOpacity>
|
|
107
|
+
)
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
CarouselItem.displayName = 'CarouselItem';
|
|
111
|
+
|
|
112
|
+
// ============================================================================
|
|
113
|
+
// Main Component
|
|
114
|
+
// ============================================================================
|
|
38
115
|
const SliderTwo: React.FC<SliderTwoProps> = ({
|
|
39
116
|
data,
|
|
40
117
|
onPressItem,
|
|
41
118
|
isLoading = true,
|
|
42
|
-
skeletonCount =
|
|
119
|
+
skeletonCount = DEFAULT_SKELETON_COUNT,
|
|
43
120
|
accessibilityLabel = 'Full Width Slider',
|
|
44
121
|
accessibilityHint = 'Swipe to view content',
|
|
45
122
|
theme,
|
|
46
123
|
}) => {
|
|
124
|
+
// ========================================================================
|
|
125
|
+
// Hooks & State
|
|
126
|
+
// ========================================================================
|
|
47
127
|
const { theme: appliedTheme } = useInternalTheme(theme);
|
|
48
|
-
const contentData = useMemo(() => data?.data ?? [], [data]);
|
|
49
128
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
129
|
+
const snapTimeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
130
|
+
|
|
131
|
+
// ========================================================================
|
|
132
|
+
// Data Processing
|
|
133
|
+
// ========================================================================
|
|
134
|
+
const contentData = useMemo(() => data?.data ?? [], [data]);
|
|
135
|
+
const skeletonItems = useSkeletonItems(skeletonCount);
|
|
136
|
+
|
|
137
|
+
const indicatorArray = useMemo(
|
|
138
|
+
() =>
|
|
139
|
+
Array.from(
|
|
140
|
+
{ length: isLoading ? skeletonItems.length : contentData.length },
|
|
141
|
+
(_, i) => i
|
|
142
|
+
),
|
|
143
|
+
[isLoading, skeletonItems.length, contentData.length]
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
const carouselData = useMemo(
|
|
147
|
+
() => (isLoading ? skeletonItems : contentData),
|
|
148
|
+
[isLoading, skeletonItems, contentData]
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
// ========================================================================
|
|
152
|
+
// Memoized Values
|
|
153
|
+
// ========================================================================
|
|
50
154
|
const gradientColors = useMemo(
|
|
51
155
|
() => [appliedTheme.colors.primary, appliedTheme.colors.primary],
|
|
52
156
|
[appliedTheme.colors.primary]
|
|
53
157
|
);
|
|
54
|
-
const handleSnapToItem = useCallback((i: number) => setActiveIndex(i), []);
|
|
55
158
|
|
|
159
|
+
const gradientConfig = useMemo(
|
|
160
|
+
() => ({
|
|
161
|
+
colors: GRADIENT_OVERLAY_COLORS,
|
|
162
|
+
start: GRADIENT_START,
|
|
163
|
+
end: GRADIENT_END,
|
|
164
|
+
}),
|
|
165
|
+
[]
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
const carouselProps = useMemo(
|
|
169
|
+
() => ({
|
|
170
|
+
width: FULL_WIDTH,
|
|
171
|
+
height: FULL_HEIGHT,
|
|
172
|
+
autoPlay: !isLoading && contentData.length > 1,
|
|
173
|
+
loop: !isLoading && contentData.length > 1,
|
|
174
|
+
scrollAnimationDuration: SCROLL_ANIMATION_DURATION,
|
|
175
|
+
autoPlayInterval: AUTO_PLAY_INTERVAL,
|
|
176
|
+
windowSize: CAROUSEL_WINDOW_SIZE,
|
|
177
|
+
enabled: true,
|
|
178
|
+
}),
|
|
179
|
+
[isLoading, contentData.length]
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
const inactiveIndicatorStyle = useMemo(
|
|
183
|
+
() => [
|
|
184
|
+
styles.inactiveIndicator,
|
|
185
|
+
{ backgroundColor: appliedTheme.colors.onSurface },
|
|
186
|
+
],
|
|
187
|
+
[appliedTheme.colors.onSurface]
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
// ========================================================================
|
|
191
|
+
// Event Handlers
|
|
192
|
+
// ========================================================================
|
|
193
|
+
const handleSnapToItem = useCallback((i: number) => {
|
|
194
|
+
if (snapTimeoutRef.current) {
|
|
195
|
+
clearTimeout(snapTimeoutRef.current);
|
|
196
|
+
}
|
|
197
|
+
snapTimeoutRef.current = setTimeout(() => {
|
|
198
|
+
InteractionManager.runAfterInteractions(() => {
|
|
199
|
+
setActiveIndex(i);
|
|
200
|
+
});
|
|
201
|
+
}, SNAP_DEBOUNCE_DELAY);
|
|
202
|
+
}, []);
|
|
203
|
+
|
|
204
|
+
const configurePanGesture = useCallback(
|
|
205
|
+
(gesture: any) =>
|
|
206
|
+
gesture
|
|
207
|
+
.activeOffsetX(PAN_GESTURE_ACTIVE_OFFSET_X)
|
|
208
|
+
.failOffsetY(PAN_GESTURE_FAIL_OFFSET_Y),
|
|
209
|
+
[]
|
|
210
|
+
);
|
|
211
|
+
|
|
212
|
+
// ========================================================================
|
|
213
|
+
// Render Functions
|
|
214
|
+
// ========================================================================
|
|
56
215
|
const renderSkeletonItem = useCallback(
|
|
57
|
-
() => (
|
|
216
|
+
({ item: _item }: { item: any }) => (
|
|
58
217
|
<View style={styles.itemWrapper}>
|
|
59
218
|
<SkeletonPlaceholder
|
|
60
219
|
backgroundColor={appliedTheme.colors.skeletonBaseColor}
|
|
61
220
|
highlightColor={appliedTheme.colors.skeletonHighlightColor}
|
|
221
|
+
speed={SKELETON_SPEED}
|
|
62
222
|
>
|
|
63
223
|
<SkeletonPlaceholder.Item width={FULL_WIDTH} height={FULL_HEIGHT} />
|
|
64
224
|
</SkeletonPlaceholder>
|
|
65
225
|
</View>
|
|
66
226
|
),
|
|
67
|
-
[
|
|
227
|
+
[
|
|
228
|
+
appliedTheme.colors.skeletonBaseColor,
|
|
229
|
+
appliedTheme.colors.skeletonHighlightColor,
|
|
230
|
+
]
|
|
68
231
|
);
|
|
69
232
|
|
|
70
233
|
const renderCarouselItem = useCallback(
|
|
71
234
|
({ item }: { item: IContentData }) => (
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
>
|
|
79
|
-
<RentOrBuyIcon
|
|
80
|
-
theme={appliedTheme}
|
|
81
|
-
content_offering_type={item.content_offering_type}
|
|
82
|
-
/>
|
|
83
|
-
<ThumbnailCard
|
|
84
|
-
thumbnailUri={item.thumbnail}
|
|
85
|
-
theme={appliedTheme}
|
|
86
|
-
isLoading={isLoading}
|
|
87
|
-
wrapperStyle={styles.image}
|
|
88
|
-
resizeMode={FastImage.resizeMode.cover}
|
|
89
|
-
/>
|
|
90
|
-
<LinearGradient
|
|
91
|
-
colors={['transparent', 'rgba(0,0,0,0.7)']}
|
|
92
|
-
start={{ x: 0.5, y: 0 }}
|
|
93
|
-
end={{ x: 0.5, y: 1 }}
|
|
94
|
-
style={styles.gradientBottomOverlay}
|
|
95
|
-
/>
|
|
96
|
-
</TouchableOpacity>
|
|
235
|
+
<CarouselItem
|
|
236
|
+
item={item}
|
|
237
|
+
onPressItem={onPressItem}
|
|
238
|
+
appliedTheme={appliedTheme}
|
|
239
|
+
gradientConfig={gradientConfig}
|
|
240
|
+
/>
|
|
97
241
|
),
|
|
98
|
-
[appliedTheme,
|
|
242
|
+
[appliedTheme, onPressItem, gradientConfig]
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
const renderItem = useMemo(
|
|
246
|
+
() => (isLoading ? renderSkeletonItem : renderCarouselItem),
|
|
247
|
+
[isLoading, renderSkeletonItem, renderCarouselItem]
|
|
99
248
|
);
|
|
100
249
|
|
|
101
250
|
const renderIndicator = useCallback(
|
|
102
|
-
(_: number, i: number) =>
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
251
|
+
(_: number, i: number) => {
|
|
252
|
+
const isActive = i === activeIndex;
|
|
253
|
+
|
|
254
|
+
return (
|
|
255
|
+
<View key={i} style={styles.indicatorWrapper}>
|
|
256
|
+
{isLoading ? (
|
|
257
|
+
<SkeletonPlaceholder
|
|
258
|
+
backgroundColor={appliedTheme.colors.skeletonBaseColor}
|
|
259
|
+
highlightColor={appliedTheme.colors.skeletonHighlightColor}
|
|
260
|
+
speed={SKELETON_SPEED}
|
|
261
|
+
>
|
|
262
|
+
<SkeletonPlaceholder.Item
|
|
263
|
+
width={INDICATOR_WIDTH_ACTIVE}
|
|
264
|
+
height={INDICATOR_HEIGHT}
|
|
265
|
+
borderRadius={INDICATOR_BORDER_RADIUS}
|
|
266
|
+
/>
|
|
267
|
+
</SkeletonPlaceholder>
|
|
268
|
+
) : isActive ? (
|
|
269
|
+
<LinearGradient
|
|
270
|
+
start={{ x: 0, y: 0 }}
|
|
271
|
+
end={{ x: 1, y: 0 }}
|
|
272
|
+
colors={gradientColors}
|
|
273
|
+
style={styles.activeIndicator}
|
|
114
274
|
/>
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
style={styles.activeIndicator}
|
|
122
|
-
/>
|
|
123
|
-
) : (
|
|
124
|
-
<View
|
|
125
|
-
style={[
|
|
126
|
-
styles.inactiveIndicator,
|
|
127
|
-
{ backgroundColor: appliedTheme.colors.onSurface },
|
|
128
|
-
]}
|
|
129
|
-
/>
|
|
130
|
-
)}
|
|
131
|
-
</View>
|
|
132
|
-
),
|
|
275
|
+
) : (
|
|
276
|
+
<View style={inactiveIndicatorStyle} />
|
|
277
|
+
)}
|
|
278
|
+
</View>
|
|
279
|
+
);
|
|
280
|
+
},
|
|
133
281
|
[
|
|
134
282
|
isLoading,
|
|
135
283
|
appliedTheme.colors.skeletonBaseColor,
|
|
136
284
|
appliedTheme.colors.skeletonHighlightColor,
|
|
137
|
-
|
|
285
|
+
inactiveIndicatorStyle,
|
|
138
286
|
activeIndex,
|
|
139
287
|
gradientColors,
|
|
140
288
|
]
|
|
141
289
|
);
|
|
142
290
|
|
|
143
|
-
|
|
291
|
+
// ========================================================================
|
|
292
|
+
// Early Returns
|
|
293
|
+
// ========================================================================
|
|
294
|
+
// Don't return early if loading - we need to show skeleton
|
|
295
|
+
if (!isLoading && (!data || contentData.length === 0)) {
|
|
144
296
|
return (
|
|
145
297
|
<View style={[styles.container, styles.emptyState]}>
|
|
146
298
|
<Text style={styles.emptyText}>No content available</Text>
|
|
@@ -148,6 +300,9 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
|
|
|
148
300
|
);
|
|
149
301
|
}
|
|
150
302
|
|
|
303
|
+
// ========================================================================
|
|
304
|
+
// Render Main Content
|
|
305
|
+
// ========================================================================
|
|
151
306
|
return (
|
|
152
307
|
<View
|
|
153
308
|
style={styles.container}
|
|
@@ -155,32 +310,26 @@ const SliderTwo: React.FC<SliderTwoProps> = ({
|
|
|
155
310
|
accessibilityHint={accessibilityHint}
|
|
156
311
|
>
|
|
157
312
|
<Carousel
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
loop={!isLoading && contentData.length > 1}
|
|
162
|
-
scrollAnimationDuration={1000}
|
|
163
|
-
autoPlayInterval={3000}
|
|
164
|
-
data={
|
|
165
|
-
isLoading
|
|
166
|
-
? (Array.from({ length: skeletonCount }) as IContentData[])
|
|
167
|
-
: contentData
|
|
168
|
-
}
|
|
169
|
-
renderItem={isLoading ? renderSkeletonItem : renderCarouselItem}
|
|
313
|
+
{...carouselProps}
|
|
314
|
+
data={carouselData}
|
|
315
|
+
renderItem={renderItem}
|
|
170
316
|
onSnapToItem={handleSnapToItem}
|
|
171
|
-
onConfigurePanGesture={
|
|
172
|
-
gesture.activeOffsetX([-10, 10]).failOffsetY([-5, 5])
|
|
173
|
-
}
|
|
317
|
+
onConfigurePanGesture={configurePanGesture}
|
|
174
318
|
/>
|
|
175
|
-
|
|
176
|
-
<View style={styles.
|
|
177
|
-
{
|
|
319
|
+
{indicatorArray.length > 0 && (
|
|
320
|
+
<View style={styles.indicatorContainer}>
|
|
321
|
+
<View style={styles.indicator}>
|
|
322
|
+
{indicatorArray.map((i) => renderIndicator(0, i))}
|
|
323
|
+
</View>
|
|
178
324
|
</View>
|
|
179
|
-
|
|
325
|
+
)}
|
|
180
326
|
</View>
|
|
181
327
|
);
|
|
182
328
|
};
|
|
183
329
|
|
|
330
|
+
// ============================================================================
|
|
331
|
+
// Styles
|
|
332
|
+
// ============================================================================
|
|
184
333
|
const styles = StyleSheet.create({
|
|
185
334
|
container: {
|
|
186
335
|
flex: 1,
|
|
@@ -217,14 +366,14 @@ const styles = StyleSheet.create({
|
|
|
217
366
|
justifyContent: 'center',
|
|
218
367
|
},
|
|
219
368
|
activeIndicator: {
|
|
220
|
-
width:
|
|
221
|
-
height:
|
|
222
|
-
borderRadius:
|
|
369
|
+
width: INDICATOR_WIDTH_ACTIVE,
|
|
370
|
+
height: INDICATOR_HEIGHT,
|
|
371
|
+
borderRadius: INDICATOR_BORDER_RADIUS,
|
|
223
372
|
},
|
|
224
373
|
inactiveIndicator: {
|
|
225
|
-
width:
|
|
226
|
-
height:
|
|
227
|
-
borderRadius:
|
|
374
|
+
width: INDICATOR_WIDTH_INACTIVE,
|
|
375
|
+
height: INDICATOR_HEIGHT,
|
|
376
|
+
borderRadius: INDICATOR_BORDER_RADIUS,
|
|
228
377
|
},
|
|
229
378
|
emptyState: {
|
|
230
379
|
padding: scale(12),
|