@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
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
import React, {
|
|
7
7
|
useRef,
|
|
8
8
|
useLayoutEffect,
|
|
9
|
+
useEffect,
|
|
9
10
|
useCallback,
|
|
10
11
|
useMemo,
|
|
11
12
|
useState,
|
|
12
|
-
useEffect,
|
|
13
13
|
} from 'react';
|
|
14
14
|
import {
|
|
15
15
|
View,
|
|
@@ -18,6 +18,8 @@ import {
|
|
|
18
18
|
StyleSheet,
|
|
19
19
|
Dimensions,
|
|
20
20
|
InteractionManager,
|
|
21
|
+
Platform,
|
|
22
|
+
Vibration,
|
|
21
23
|
type LayoutChangeEvent,
|
|
22
24
|
type ListRenderItemInfo,
|
|
23
25
|
} from 'react-native';
|
|
@@ -51,13 +53,9 @@ const ITEM_WIDTH = scale(80);
|
|
|
51
53
|
const CONTAINER_PADDING = scale(14);
|
|
52
54
|
const { width: SCREEN_WIDTH } = Dimensions.get('window');
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
ref.current = value;
|
|
58
|
-
}, [value]);
|
|
59
|
-
return ref.current;
|
|
60
|
-
}
|
|
56
|
+
import { usePrevious } from '../../../../hooks/usePrevious';
|
|
57
|
+
import { useSkeletonItems } from '../../../../hooks/useSkeletonItems';
|
|
58
|
+
import { debounce } from 'lodash';
|
|
61
59
|
|
|
62
60
|
const CategoryCard = React.memo(
|
|
63
61
|
({
|
|
@@ -71,6 +69,21 @@ const CategoryCard = React.memo(
|
|
|
71
69
|
const { theme: appliedTheme } = useInternalTheme(theme);
|
|
72
70
|
const flatListRef = useRef<FlatList<ICategory>>(null);
|
|
73
71
|
const [itemWidths, setItemWidths] = useState<number[]>([]);
|
|
72
|
+
const isScrollingRef = useRef(false);
|
|
73
|
+
const lastPressedIndexRef = useRef<number | null>(null);
|
|
74
|
+
|
|
75
|
+
// Memoize theme colors
|
|
76
|
+
const themeColors = useMemo(
|
|
77
|
+
() => ({
|
|
78
|
+
primary: appliedTheme.colors.primary,
|
|
79
|
+
outline: appliedTheme.colors.outline,
|
|
80
|
+
buttonText: appliedTheme.colors.buttonText,
|
|
81
|
+
textPrimary: appliedTheme.colors.textPrimary,
|
|
82
|
+
skeletonBaseColor: appliedTheme.colors.skeletonBaseColor,
|
|
83
|
+
skeletonHighlightColor: appliedTheme.colors.skeletonHighlightColor,
|
|
84
|
+
}),
|
|
85
|
+
[appliedTheme.colors]
|
|
86
|
+
);
|
|
74
87
|
|
|
75
88
|
const selectedCategory = useMemo(
|
|
76
89
|
() => activeCategory || category?.[0] || null,
|
|
@@ -79,11 +92,48 @@ const CategoryCard = React.memo(
|
|
|
79
92
|
|
|
80
93
|
const prevCategoryId = usePrevious(selectedCategory?._id);
|
|
81
94
|
|
|
95
|
+
// Memoize skeleton items
|
|
96
|
+
const skeletonItems = useSkeletonItems(5);
|
|
97
|
+
|
|
98
|
+
// Memoize skeleton item style
|
|
99
|
+
const skeletonItemStyle = useMemo(
|
|
100
|
+
() => ({
|
|
101
|
+
width: ITEM_WIDTH - scale(20),
|
|
102
|
+
height: verticalScale(26),
|
|
103
|
+
borderRadius: scale(8),
|
|
104
|
+
marginRight: scale(8),
|
|
105
|
+
}),
|
|
106
|
+
[]
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
// Memoize list container style with flexDirection
|
|
110
|
+
const listContainerStyle = useMemo(
|
|
111
|
+
() => [styles.listContainer, { flexDirection: 'row' as const }],
|
|
112
|
+
[]
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
// Haptic feedback utility
|
|
116
|
+
const triggerHapticFeedback = useCallback(() => {
|
|
117
|
+
if (Platform.OS === 'ios') {
|
|
118
|
+
// iOS haptic feedback (light impact)
|
|
119
|
+
Vibration.vibrate(1);
|
|
120
|
+
} else if (Platform.OS === 'android') {
|
|
121
|
+
// Android haptic feedback (short vibration)
|
|
122
|
+
Vibration.vibrate(10);
|
|
123
|
+
}
|
|
124
|
+
}, []);
|
|
125
|
+
|
|
82
126
|
const scrollToCategory = useCallback(
|
|
83
127
|
(index: number, animated: boolean) => {
|
|
84
|
-
if (
|
|
128
|
+
if (
|
|
129
|
+
!flatListRef.current ||
|
|
130
|
+
index < 0 ||
|
|
131
|
+
index >= category.length ||
|
|
132
|
+
isScrollingRef.current
|
|
133
|
+
)
|
|
85
134
|
return;
|
|
86
135
|
|
|
136
|
+
isScrollingRef.current = true;
|
|
87
137
|
const RIGHT_SCROLL_BIAS = scale(40);
|
|
88
138
|
const offset = itemWidths.length
|
|
89
139
|
? itemWidths.slice(0, index).reduce((sum, w) => sum + w, 0) +
|
|
@@ -100,11 +150,35 @@ const CategoryCard = React.memo(
|
|
|
100
150
|
offset: Math.max(0, offset),
|
|
101
151
|
animated,
|
|
102
152
|
});
|
|
153
|
+
// Reset scrolling flag after animation completes
|
|
154
|
+
if (animated) {
|
|
155
|
+
setTimeout(() => {
|
|
156
|
+
isScrollingRef.current = false;
|
|
157
|
+
}, 300);
|
|
158
|
+
} else {
|
|
159
|
+
isScrollingRef.current = false;
|
|
160
|
+
}
|
|
103
161
|
});
|
|
104
162
|
},
|
|
105
163
|
[category, itemWidths]
|
|
106
164
|
);
|
|
107
165
|
|
|
166
|
+
// Debounced scroll function to prevent rapid scrolling
|
|
167
|
+
const debouncedScrollToCategory = useMemo(
|
|
168
|
+
() =>
|
|
169
|
+
debounce((index: number, animated: boolean) => {
|
|
170
|
+
scrollToCategory(index, animated);
|
|
171
|
+
}, 100),
|
|
172
|
+
[scrollToCategory]
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
// Cleanup debounced function on unmount
|
|
176
|
+
useEffect(() => {
|
|
177
|
+
return () => {
|
|
178
|
+
debouncedScrollToCategory.cancel();
|
|
179
|
+
};
|
|
180
|
+
}, [debouncedScrollToCategory]);
|
|
181
|
+
|
|
108
182
|
const onItemLayout = useCallback(
|
|
109
183
|
(event: LayoutChangeEvent, index: number) => {
|
|
110
184
|
const { width } = event.nativeEvent.layout;
|
|
@@ -126,19 +200,66 @@ const CategoryCard = React.memo(
|
|
|
126
200
|
const index = category.findIndex(
|
|
127
201
|
(cat) => cat._id === selectedCategory._id
|
|
128
202
|
);
|
|
129
|
-
if (index >= 0
|
|
203
|
+
if (index >= 0 && index !== lastPressedIndexRef.current) {
|
|
204
|
+
// Use debounced scroll for external category changes
|
|
205
|
+
debouncedScrollToCategory(index, true);
|
|
206
|
+
}
|
|
130
207
|
}
|
|
131
|
-
}, [selectedCategory, category,
|
|
208
|
+
}, [selectedCategory, category, debouncedScrollToCategory, prevCategoryId]);
|
|
132
209
|
|
|
133
210
|
const handlePress = useCallback(
|
|
134
211
|
(item: ICategory) => {
|
|
135
|
-
|
|
212
|
+
// Prevent rapid successive taps on the same item
|
|
136
213
|
const index = category.findIndex((cat) => cat._id === item._id);
|
|
137
|
-
if (index
|
|
138
|
-
|
|
214
|
+
if (index < 0) return;
|
|
215
|
+
|
|
216
|
+
// Check if same item is being pressed rapidly
|
|
217
|
+
if (lastPressedIndexRef.current === index && isScrollingRef.current) {
|
|
218
|
+
return;
|
|
139
219
|
}
|
|
220
|
+
|
|
221
|
+
lastPressedIndexRef.current = index;
|
|
222
|
+
|
|
223
|
+
// Trigger haptic feedback for better UX
|
|
224
|
+
triggerHapticFeedback();
|
|
225
|
+
|
|
226
|
+
// Call the callback
|
|
227
|
+
onPressCategory?.(item);
|
|
228
|
+
|
|
229
|
+
// Scroll to category with slight delay for smoother UX
|
|
230
|
+
requestAnimationFrame(() => {
|
|
231
|
+
scrollToCategory(index, true);
|
|
232
|
+
});
|
|
140
233
|
},
|
|
141
|
-
[category, onPressCategory, scrollToCategory]
|
|
234
|
+
[category, onPressCategory, scrollToCategory, triggerHapticFeedback]
|
|
235
|
+
);
|
|
236
|
+
|
|
237
|
+
// Memoize filled mode selected style
|
|
238
|
+
const filledSelectedStyle = useMemo(
|
|
239
|
+
() => ({
|
|
240
|
+
borderRadius: scale(8),
|
|
241
|
+
borderWidth: scale(1),
|
|
242
|
+
borderColor: themeColors.primary,
|
|
243
|
+
backgroundColor: themeColors.primary,
|
|
244
|
+
}),
|
|
245
|
+
[themeColors.primary]
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
// Memoize filled mode unselected style
|
|
249
|
+
const filledUnselectedStyle = useMemo(
|
|
250
|
+
() => ({
|
|
251
|
+
borderRadius: scale(8),
|
|
252
|
+
borderWidth: scale(1),
|
|
253
|
+
borderColor: themeColors.outline,
|
|
254
|
+
backgroundColor: 'transparent',
|
|
255
|
+
}),
|
|
256
|
+
[themeColors.outline]
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
// Memoize underline style
|
|
260
|
+
const underlineStyle = useMemo(
|
|
261
|
+
() => [styles.underline, { backgroundColor: themeColors.primary }],
|
|
262
|
+
[themeColors.primary]
|
|
142
263
|
);
|
|
143
264
|
|
|
144
265
|
const renderItem = useCallback(
|
|
@@ -148,80 +269,66 @@ const CategoryCard = React.memo(
|
|
|
148
269
|
|
|
149
270
|
const containerStyle = [
|
|
150
271
|
styles.tabContainer,
|
|
151
|
-
isFilledMode &&
|
|
152
|
-
|
|
153
|
-
borderWidth: scale(1),
|
|
154
|
-
borderColor: isSelected
|
|
155
|
-
? appliedTheme.colors.primary
|
|
156
|
-
: appliedTheme.colors.outline,
|
|
157
|
-
backgroundColor: isSelected
|
|
158
|
-
? appliedTheme.colors.primary
|
|
159
|
-
: 'transparent',
|
|
160
|
-
},
|
|
272
|
+
isFilledMode &&
|
|
273
|
+
(isSelected ? filledSelectedStyle : filledUnselectedStyle),
|
|
161
274
|
];
|
|
162
275
|
|
|
163
276
|
const textColor = isFilledMode
|
|
164
277
|
? isSelected
|
|
165
|
-
?
|
|
166
|
-
:
|
|
278
|
+
? themeColors.buttonText
|
|
279
|
+
: themeColors.textPrimary
|
|
167
280
|
: isSelected
|
|
168
|
-
?
|
|
169
|
-
:
|
|
281
|
+
? themeColors.primary
|
|
282
|
+
: themeColors.textPrimary;
|
|
283
|
+
|
|
284
|
+
const textStyle = [styles.tabText, { color: textColor }];
|
|
170
285
|
|
|
171
286
|
return (
|
|
172
287
|
<TouchableOpacity
|
|
173
|
-
activeOpacity={0.
|
|
288
|
+
activeOpacity={0.7}
|
|
174
289
|
onPress={() => handlePress(item)}
|
|
175
290
|
style={containerStyle}
|
|
176
291
|
onLayout={(event) => onItemLayout(event, index)}
|
|
177
292
|
accessibilityLabel={`Select category ${item.name}`}
|
|
293
|
+
accessibilityRole="button"
|
|
294
|
+
accessibilityState={{ selected: isSelected }}
|
|
295
|
+
accessibilityHint={
|
|
296
|
+
isSelected
|
|
297
|
+
? `${item.name} is currently selected`
|
|
298
|
+
: `Double tap to select ${item.name} category`
|
|
299
|
+
}
|
|
178
300
|
>
|
|
179
|
-
<Text
|
|
180
|
-
|
|
181
|
-
styles.tabText,
|
|
182
|
-
{
|
|
183
|
-
color: textColor,
|
|
184
|
-
},
|
|
185
|
-
]}
|
|
186
|
-
>
|
|
187
|
-
{item.name}
|
|
188
|
-
</Text>
|
|
189
|
-
{mode === 'text' && isSelected && (
|
|
190
|
-
<View
|
|
191
|
-
style={[
|
|
192
|
-
styles.underline,
|
|
193
|
-
{ backgroundColor: appliedTheme.colors.primary },
|
|
194
|
-
]}
|
|
195
|
-
/>
|
|
196
|
-
)}
|
|
301
|
+
<Text style={textStyle}>{item.name}</Text>
|
|
302
|
+
{mode === 'text' && isSelected && <View style={underlineStyle} />}
|
|
197
303
|
</TouchableOpacity>
|
|
198
304
|
);
|
|
199
305
|
},
|
|
200
|
-
[
|
|
306
|
+
[
|
|
307
|
+
selectedCategory,
|
|
308
|
+
mode,
|
|
309
|
+
themeColors,
|
|
310
|
+
handlePress,
|
|
311
|
+
onItemLayout,
|
|
312
|
+
filledSelectedStyle,
|
|
313
|
+
filledUnselectedStyle,
|
|
314
|
+
underlineStyle,
|
|
315
|
+
]
|
|
201
316
|
);
|
|
202
317
|
|
|
203
318
|
const renderSkeleton = useCallback(
|
|
204
319
|
() => (
|
|
205
320
|
<SkeletonPlaceholder
|
|
206
|
-
backgroundColor={
|
|
207
|
-
highlightColor={
|
|
321
|
+
backgroundColor={themeColors.skeletonBaseColor}
|
|
322
|
+
highlightColor={themeColors.skeletonHighlightColor}
|
|
208
323
|
>
|
|
209
|
-
<View style={
|
|
210
|
-
{
|
|
211
|
-
<View
|
|
212
|
-
key={index}
|
|
213
|
-
style={{
|
|
214
|
-
width: ITEM_WIDTH - scale(20),
|
|
215
|
-
height: verticalScale(26),
|
|
216
|
-
borderRadius: scale(8),
|
|
217
|
-
marginRight: scale(8),
|
|
218
|
-
}}
|
|
219
|
-
/>
|
|
324
|
+
<View style={listContainerStyle}>
|
|
325
|
+
{skeletonItems.map((_, index) => (
|
|
326
|
+
<View key={index} style={skeletonItemStyle} />
|
|
220
327
|
))}
|
|
221
328
|
</View>
|
|
222
329
|
</SkeletonPlaceholder>
|
|
223
330
|
),
|
|
224
|
-
[
|
|
331
|
+
[themeColors, listContainerStyle, skeletonItems, skeletonItemStyle]
|
|
225
332
|
);
|
|
226
333
|
|
|
227
334
|
const getItemLayout = useCallback(
|
|
@@ -235,6 +342,9 @@ const CategoryCard = React.memo(
|
|
|
235
342
|
[itemWidths]
|
|
236
343
|
);
|
|
237
344
|
|
|
345
|
+
// Memoize keyExtractor
|
|
346
|
+
const keyExtractor = useCallback((item: ICategory) => item._id, []);
|
|
347
|
+
|
|
238
348
|
return (
|
|
239
349
|
<View style={styles.container}>
|
|
240
350
|
{isLoading ? (
|
|
@@ -243,7 +353,7 @@ const CategoryCard = React.memo(
|
|
|
243
353
|
<FlatList
|
|
244
354
|
ref={flatListRef}
|
|
245
355
|
data={category}
|
|
246
|
-
keyExtractor={
|
|
356
|
+
keyExtractor={keyExtractor}
|
|
247
357
|
horizontal
|
|
248
358
|
showsHorizontalScrollIndicator={false}
|
|
249
359
|
contentContainerStyle={styles.listContainer}
|
|
@@ -256,6 +366,21 @@ const CategoryCard = React.memo(
|
|
|
256
366
|
initialNumToRender={10}
|
|
257
367
|
maxToRenderPerBatch={12}
|
|
258
368
|
windowSize={5}
|
|
369
|
+
removeClippedSubviews
|
|
370
|
+
onScrollBeginDrag={() => {
|
|
371
|
+
isScrollingRef.current = true;
|
|
372
|
+
}}
|
|
373
|
+
onScrollEndDrag={() => {
|
|
374
|
+
// Reset after a short delay to allow momentum scrolling
|
|
375
|
+
setTimeout(() => {
|
|
376
|
+
isScrollingRef.current = false;
|
|
377
|
+
}, 200);
|
|
378
|
+
}}
|
|
379
|
+
onMomentumScrollEnd={() => {
|
|
380
|
+
isScrollingRef.current = false;
|
|
381
|
+
}}
|
|
382
|
+
accessibilityLabel="Category selection list"
|
|
383
|
+
accessibilityRole="list"
|
|
259
384
|
/>
|
|
260
385
|
)}
|
|
261
386
|
</View>
|