@zezosoft/zezo-ott-react-native-ui-kit 1.0.2 → 1.0.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/LICENSE +0 -0
- package/README.md +6 -0
- package/lib/module/assets/animations/135037-payment-processing-error.json +1347 -1
- package/lib/module/assets/animations/7227-vui-animation.json +3377 -1
- package/lib/module/assets/animations/succesfull-payment.json +2379 -1
- package/lib/module/assets/animations/voice-icon.json +542 -1
- package/lib/module/components/Account/Account.js +6 -6
- package/lib/module/components/Account/Account.js.map +1 -1
- package/lib/module/components/Account/index.js +1 -1
- package/lib/module/components/Account/index.js.map +1 -1
- package/lib/module/components/Alert/UAAlert.js +138 -0
- package/lib/module/components/Alert/UAAlert.js.map +1 -0
- package/lib/module/components/Alert/index.js +4 -0
- package/lib/module/components/Alert/index.js.map +1 -0
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js +9 -9
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithEmail.js +10 -10
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithPhone.js +10 -10
- package/lib/module/components/Auth/Login/LoginWithPhone.js.map +1 -1
- package/lib/module/components/Auth/OTP/OTP.js +9 -9
- package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/SignUp/SignUp.js +10 -10
- package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js +6 -6
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js +1 -6
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -1
- package/lib/module/components/Auth/index.js +6 -6
- package/lib/module/components/Auth/index.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
- package/lib/module/components/BlogView/BlogView.js +4 -10
- package/lib/module/components/BlogView/BlogView.js.map +1 -1
- package/lib/module/components/BlogView/index.js +1 -1
- package/lib/module/components/BlogView/index.js.map +1 -1
- package/lib/module/components/Button/BackBtn.js +1 -1
- package/lib/module/components/Button/BackBtn.js.map +1 -1
- package/lib/module/components/Button/MenuBtn.js +1 -1
- package/lib/module/components/Button/MenuBtn.js.map +1 -1
- package/lib/module/components/Button/PrimaryBtn.js +2 -2
- package/lib/module/components/Button/PrimaryBtn.js.map +1 -1
- package/lib/module/components/Button/TextButton.js +2 -2
- package/lib/module/components/Button/TextButton.js.map +1 -1
- package/lib/module/components/Button/index.js +3 -3
- package/lib/module/components/Button/index.js.map +1 -1
- package/lib/module/components/Content/Card/Category/Category.js +2 -2
- package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js +6 -6
- package/lib/module/components/Content/Card/NowWatching/NowWatching.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +3 -3
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +4 -4
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/index.js +2 -2
- package/lib/module/components/Content/Card/Sliders/index.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Five.js +4 -4
- package/lib/module/components/Content/Card/Styles/Five.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Four.js +4 -4
- package/lib/module/components/Content/Card/Styles/Four.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/One.js +4 -4
- package/lib/module/components/Content/Card/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +4 -4
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Six.js +5 -5
- package/lib/module/components/Content/Card/Styles/Six.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Three.js +4 -4
- package/lib/module/components/Content/Card/Styles/Three.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/TopTen.js +5 -5
- package/lib/module/components/Content/Card/Styles/TopTen.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/Two.js +4 -4
- package/lib/module/components/Content/Card/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/components/CardPoster.js +1 -10
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/NavigateToMore.js +2 -2
- package/lib/module/components/Content/Card/components/NavigateToMore.js.map +1 -1
- package/lib/module/components/Content/Card/components/NoContentFallback.js +3 -3
- package/lib/module/components/Content/Card/components/NoContentFallback.js.map +1 -1
- package/lib/module/components/Content/Card/components/ShowAllButton.js +1 -1
- package/lib/module/components/Content/Card/components/ShowAllButton.js.map +1 -1
- package/lib/module/components/Content/Card/components/ThumbnailCard.js +1 -1
- package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
- package/lib/module/components/Content/Card/index.js +10 -10
- package/lib/module/components/Content/Card/index.js.map +1 -1
- package/lib/module/components/Content/Content.js +4 -4
- package/lib/module/components/Content/Content.js.map +1 -1
- package/lib/module/components/Content/Sections.js +2 -2
- package/lib/module/components/Content/Sections.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +8 -9
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/MoreContentList.js +6 -6
- package/lib/module/components/ContentView/MoreContentList.js.map +1 -1
- package/lib/module/components/ContentView/components/AboutSection.js +2 -2
- package/lib/module/components/ContentView/components/AboutSection.js.map +1 -1
- package/lib/module/components/ContentView/components/CastCard.js +2 -2
- package/lib/module/components/ContentView/components/CastCard.js.map +1 -1
- package/lib/module/components/ContentView/components/EpisodeCard.js +3 -3
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
- package/lib/module/components/ContentView/components/GenreTags.js +1 -1
- package/lib/module/components/ContentView/components/GenreTags.js.map +1 -1
- package/lib/module/components/ContentView/components/HeroBanner.js +5 -5
- package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
- package/lib/module/components/ContentView/components/PlayButton.js +0 -1
- package/lib/module/components/ContentView/components/PlayButton.js.map +1 -1
- package/lib/module/components/ContentView/components/Title.js +1 -1
- package/lib/module/components/ContentView/components/Title.js.map +1 -1
- package/lib/module/components/ContentView/components/TrailerButton.js +1 -2
- package/lib/module/components/ContentView/components/TrailerButton.js.map +1 -1
- package/lib/module/components/ContentView/index.js +2 -2
- package/lib/module/components/ContentView/index.js.map +1 -1
- package/lib/module/components/Headers/AppHeader.js +2 -2
- package/lib/module/components/Headers/AppHeader.js.map +1 -1
- package/lib/module/components/Headers/One.js +2 -2
- package/lib/module/components/Headers/One.js.map +1 -1
- package/lib/module/components/Headers/Three.js +2 -2
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/module/components/Headers/Two.js +5 -6
- package/lib/module/components/Headers/Two.js.map +1 -1
- package/lib/module/components/Headers/index.js +3 -3
- package/lib/module/components/Headers/index.js.map +1 -1
- package/lib/module/components/Input/Input.js +3 -3
- package/lib/module/components/Input/Input.js.map +1 -1
- package/lib/module/components/Input/InputOne.js +1 -1
- package/lib/module/components/Input/InputOne.js.map +1 -1
- package/lib/module/components/Input/InputTwo.js +1 -1
- package/lib/module/components/Input/InputTwo.js.map +1 -1
- package/lib/module/components/Input/PhoneNumberInput.js +1 -1
- package/lib/module/components/Input/PhoneNumberInput.js.map +1 -1
- package/lib/module/components/Keyboard/HideKeyboard.js.map +1 -1
- package/lib/module/components/Loader/Loader.js +1 -6
- package/lib/module/components/Loader/Loader.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +2 -2
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/Search/One.js +9 -9
- package/lib/module/components/Search/One.js.map +1 -1
- package/lib/module/components/Search/components/RecentSearchesSection.js +1 -1
- package/lib/module/components/Search/components/RecentSearchesSection.js.map +1 -1
- package/lib/module/components/Search/components/SearchCard.js +3 -3
- package/lib/module/components/Search/components/SearchCard.js.map +1 -1
- package/lib/module/components/Search/index.js +2 -2
- package/lib/module/components/Search/index.js.map +1 -1
- package/lib/module/components/Settings/AppSettings.js +4 -4
- package/lib/module/components/Settings/AppSettings.js.map +1 -1
- package/lib/module/components/Settings/index.js +1 -1
- package/lib/module/components/Settings/index.js.map +1 -1
- package/lib/module/components/Subscription/SubOne.js +4 -4
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/Subscription/index.js +1 -1
- package/lib/module/components/Subscription/index.js.map +1 -1
- package/lib/module/components/TabBar/One.js +2 -2
- package/lib/module/components/TabBar/One.js.map +1 -1
- package/lib/module/components/TabBar/Three.js +1 -1
- package/lib/module/components/TabBar/Three.js.map +1 -1
- package/lib/module/components/TabBar/Two.js +2 -2
- package/lib/module/components/TabBar/Two.js.map +1 -1
- package/lib/module/components/TabBar/index.js +3 -3
- package/lib/module/components/TabBar/index.js.map +1 -1
- package/lib/module/components/Text/Text.js +1 -1
- package/lib/module/components/Text/Text.js.map +1 -1
- package/lib/module/components/Text/index.js +1 -1
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js +3 -3
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
- package/lib/module/components/User/WatchHistory/WatchHistory.js +4 -4
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
- package/lib/module/components/User/WatchLater/WatchLater.js +5 -5
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
- package/lib/module/components/User/components/UserAvatar.js +1 -1
- package/lib/module/components/User/components/UserAvatar.js.map +1 -1
- package/lib/module/components/User/components/UserSection.js +3 -3
- package/lib/module/components/User/components/UserSection.js.map +1 -1
- package/lib/module/components/User/index.js +3 -3
- package/lib/module/components/User/index.js.map +1 -1
- package/lib/module/components/View/View.js.map +1 -1
- package/lib/module/components/View/index.js +1 -1
- package/lib/module/components/View/index.js.map +1 -1
- package/lib/module/components/index.js +19 -18
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/layout/SafeAreaWrapper.js +1 -1
- package/lib/module/components/layout/SafeAreaWrapper.js.map +1 -1
- package/lib/module/components/layout/index.js +1 -1
- package/lib/module/components/layout/index.js.map +1 -1
- package/lib/module/constants/dummySections.js.map +1 -1
- package/lib/module/hooks/useDebounce.js.map +1 -1
- package/lib/module/hooks/useInitSplashCacheSync.js +7 -7
- package/lib/module/hooks/useInitSplashCacheSync.js.map +1 -1
- package/lib/module/hooks/useKeyboard.js.map +1 -1
- package/lib/module/hooks/usePaginatedSection.js.map +1 -1
- package/lib/module/index.js +3 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/store/RecentSearchesStore.js.map +1 -1
- package/lib/module/store/splashStore.js.map +1 -1
- package/lib/module/theme/ThemeProvider.js +11 -8
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/hook/useTheme.js +2 -2
- package/lib/module/theme/hook/useTheme.js.map +1 -1
- package/lib/module/theme/index.js +3 -2
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/themes.js +0 -13
- package/lib/module/theme/themes.js.map +1 -1
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/Account/Account.d.ts +0 -1
- package/lib/typescript/src/components/Account/Account.d.ts.map +1 -1
- package/lib/typescript/src/components/Alert/UAAlert.d.ts +16 -0
- package/lib/typescript/src/components/Alert/UAAlert.d.ts.map +1 -0
- package/lib/typescript/src/components/Alert/index.d.ts +2 -0
- package/lib/typescript/src/components/Alert/index.d.ts.map +1 -0
- 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/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 +0 -4
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.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 +1 -1
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts +0 -4
- package/lib/typescript/src/components/BlogView/BlogView.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/BackBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/MenuBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/TextButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Category/Category.d.ts +1 -1
- 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.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Four.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Six.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/TopTen.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts +0 -8
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/NavigateToMore.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/NoContentFallback.d.ts +1 -2
- package/lib/typescript/src/components/Content/Card/components/NoContentFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/ShowAllButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/index.d.ts +2 -2
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Sections.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts +1 -2
- 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 +1 -2
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts +1 -6
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts +1 -2
- 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 +1 -2
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts +1 -2
- 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 +1 -2
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/AppHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/InputOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/InputTwo.d.ts.map +1 -1
- package/lib/typescript/src/components/Input/PhoneNumberInput.d.ts.map +1 -1
- package/lib/typescript/src/components/Keyboard/HideKeyboard.d.ts.map +1 -1
- package/lib/typescript/src/components/Loader/Loader.d.ts +0 -4
- package/lib/typescript/src/components/Loader/Loader.d.ts.map +1 -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/RecentSearchesSection.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Settings/AppSettings.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/SubOne.d.ts +1 -1
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/index.d.ts +2 -2
- package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/One.d.ts +2 -2
- package/lib/typescript/src/components/TabBar/One.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/Two.d.ts +1 -1
- package/lib/typescript/src/components/TabBar/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/TabBar/index.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/WatchHistory/WatchHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
- package/lib/typescript/src/components/View/View.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/components/layout/SafeAreaWrapper.d.ts.map +1 -1
- package/lib/typescript/src/constants/dummySections.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useDebounce.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts +1 -1
- package/lib/typescript/src/hooks/useInitSplashCacheSync.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useKeyboard.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePaginatedSection.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/store/RecentSearchesStore.d.ts +5 -3
- package/lib/typescript/src/store/RecentSearchesStore.d.ts.map +1 -1
- package/lib/typescript/src/store/splashStore.d.ts +5 -3
- package/lib/typescript/src/store/splashStore.d.ts.map +1 -1
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useTheme.d.ts.map +1 -1
- package/lib/typescript/src/theme/index.d.ts +5 -0
- package/lib/typescript/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/src/theme/themes.d.ts +11 -4
- package/lib/typescript/src/theme/themes.d.ts.map +1 -1
- package/lib/typescript/src/types/content/content-view.types.d.ts.map +1 -1
- package/lib/typescript/src/types/hook/usePaginatedSetion.d.ts +1 -1
- package/lib/typescript/src/types/hook/usePaginatedSetion.d.ts.map +1 -1
- package/package.json +167 -70
- package/src/Styles/globalStyles.ts +18 -18
- package/src/assets/animations/135037-payment-processing-error.json +1347 -1
- package/src/assets/animations/7227-vui-animation.json +3377 -1
- package/src/assets/animations/succesfull-payment.json +2379 -1
- package/src/assets/animations/voice-icon.json +542 -1
- package/src/components/Account/Account.tsx +139 -61
- package/src/components/Alert/UAAlert.tsx +168 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Auth/ForgotPassword/ForgotPassword.tsx +53 -23
- package/src/components/Auth/Login/LoginWithEmail.tsx +62 -32
- package/src/components/Auth/Login/LoginWithPhone.tsx +55 -24
- package/src/components/Auth/OTP/OTP.tsx +77 -32
- package/src/components/Auth/SignUp/SignUp.tsx +67 -32
- package/src/components/Auth/SplashScreen/SplashScreen.tsx +44 -16
- package/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.tsx +21 -12
- package/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.tsx +5 -5
- package/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.tsx +15 -5
- package/src/components/Auth/index.ts +1 -1
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +45 -17
- package/src/components/BlogView/BlogView.tsx +51 -31
- package/src/components/Button/BackBtn.tsx +31 -9
- package/src/components/Button/MenuBtn.tsx +61 -22
- package/src/components/Button/PrimaryBtn.tsx +30 -10
- package/src/components/Button/TextButton.tsx +30 -15
- package/src/components/Button/index.ts +1 -1
- package/src/components/Content/Card/Category/Category.tsx +73 -32
- package/src/components/Content/Card/NowWatching/NowWatching.tsx +102 -44
- package/src/components/Content/Card/Sliders/Styles/One.tsx +89 -38
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +47 -21
- package/src/components/Content/Card/Sliders/index.ts +2 -2
- package/src/components/Content/Card/Styles/Five.tsx +65 -22
- package/src/components/Content/Card/Styles/Four.tsx +73 -23
- package/src/components/Content/Card/Styles/One.tsx +68 -21
- package/src/components/Content/Card/Styles/RotateInOut.tsx +59 -23
- package/src/components/Content/Card/Styles/Six.tsx +57 -19
- package/src/components/Content/Card/Styles/Three.tsx +59 -23
- package/src/components/Content/Card/Styles/TopTen.tsx +59 -26
- package/src/components/Content/Card/Styles/Two.tsx +39 -18
- package/src/components/Content/Card/components/CardPoster.tsx +34 -32
- package/src/components/Content/Card/components/NavigateToMore.tsx +17 -7
- package/src/components/Content/Card/components/NoContentFallback.tsx +36 -19
- package/src/components/Content/Card/components/ShowAllButton.tsx +12 -8
- package/src/components/Content/Card/components/ThumbnailCard.tsx +26 -17
- package/src/components/Content/Card/index.ts +2 -2
- package/src/components/Content/Content.tsx +41 -17
- package/src/components/Content/Sections.tsx +14 -8
- package/src/components/ContentView/ContentView.tsx +34 -27
- package/src/components/ContentView/MoreContentList.tsx +40 -18
- package/src/components/ContentView/components/AboutSection.tsx +30 -12
- package/src/components/ContentView/components/CastCard.tsx +65 -24
- package/src/components/ContentView/components/EpisodeCard.tsx +109 -44
- package/src/components/ContentView/components/GenreTags.tsx +35 -11
- package/src/components/ContentView/components/HeroBanner.tsx +52 -21
- package/src/components/ContentView/components/PlayButton.tsx +13 -5
- package/src/components/ContentView/components/Title.tsx +30 -10
- package/src/components/ContentView/components/TrailerButton.tsx +16 -7
- package/src/components/Headers/AppHeader.tsx +40 -14
- package/src/components/Headers/One.tsx +18 -9
- package/src/components/Headers/Three.tsx +22 -7
- package/src/components/Headers/Two.tsx +24 -13
- package/src/components/Headers/index.ts +1 -1
- package/src/components/Input/Input.ts +1 -1
- package/src/components/Input/InputOne.tsx +69 -23
- package/src/components/Input/InputTwo.tsx +41 -18
- package/src/components/Input/PhoneNumberInput.tsx +94 -48
- package/src/components/Keyboard/HideKeyboard.tsx +16 -10
- package/src/components/Loader/Loader.tsx +3 -8
- package/src/components/Logo/Logo.tsx +17 -9
- package/src/components/Search/One.tsx +46 -17
- package/src/components/Search/components/RecentSearchesSection.tsx +48 -21
- package/src/components/Search/components/SearchCard.tsx +34 -16
- package/src/components/Search/index.ts +1 -1
- package/src/components/Settings/AppSettings.tsx +80 -29
- package/src/components/Subscription/SubOne.tsx +84 -39
- package/src/components/Subscription/index.ts +1 -1
- package/src/components/TabBar/One.tsx +22 -18
- package/src/components/TabBar/Three.tsx +55 -19
- package/src/components/TabBar/Two.tsx +16 -12
- package/src/components/TabBar/index.ts +1 -1
- package/src/components/Text/Text.tsx +7 -3
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +93 -38
- package/src/components/User/WatchHistory/WatchHistory.tsx +37 -12
- package/src/components/User/WatchLater/WatchLater.tsx +94 -31
- package/src/components/User/components/UserAvatar.tsx +8 -4
- package/src/components/User/components/UserSection.tsx +34 -19
- package/src/components/View/View.tsx +11 -2
- package/src/components/index.ts +1 -0
- package/src/components/layout/SafeAreaWrapper.tsx +10 -4
- package/src/constants/dummySections.ts +9 -7
- package/src/hooks/useDebounce.ts +4 -1
- package/src/hooks/useInitSplashCacheSync.ts +46 -18
- package/src/hooks/useKeyboard.ts +5 -3
- package/src/hooks/usePaginatedSection.ts +11 -7
- package/src/store/RecentSearchesStore.ts +12 -7
- package/src/store/splashStore.ts +16 -16
- package/src/theme/ThemeProvider.tsx +50 -20
- package/src/theme/hook/useTheme.ts +7 -3
- package/src/theme/index.ts +6 -0
- package/src/theme/themes.ts +42 -31
- package/src/types/content/content-view.types.ts +4 -1
- package/src/types/hook/usePaginatedSetion.ts +1 -1
- package/lib/module/components/Icons/AlertIcon.js +0 -33
- package/lib/module/components/Icons/AlertIcon.js.map +0 -1
- package/lib/module/components/Icons/DeviceIcon.js +0 -25
- package/lib/module/components/Icons/DeviceIcon.js.map +0 -1
- package/lib/module/components/Icons/DoneIcon/DoneIcon.js +0 -23
- package/lib/module/components/Icons/DoneIcon/DoneIcon.js.map +0 -1
- package/lib/module/components/Icons/ForgotPasswordMessageIcon.js +0 -65
- package/lib/module/components/Icons/ForgotPasswordMessageIcon.js.map +0 -1
- package/lib/module/components/Icons/ForgotPasswordMessageIconTwo.js +0 -56
- package/lib/module/components/Icons/ForgotPasswordMessageIconTwo.js.map +0 -1
- package/lib/module/components/Icons/NewIndex.js +0 -36
- package/lib/module/components/Icons/NewIndex.js.map +0 -1
- package/lib/module/components/Icons/ResendOTP.js +0 -21
- package/lib/module/components/Icons/ResendOTP.js.map +0 -1
- package/lib/typescript/src/components/Icons/AlertIcon.d.ts +0 -7
- package/lib/typescript/src/components/Icons/AlertIcon.d.ts.map +0 -1
- package/lib/typescript/src/components/Icons/DeviceIcon.d.ts +0 -7
- package/lib/typescript/src/components/Icons/DeviceIcon.d.ts.map +0 -1
- package/lib/typescript/src/components/Icons/DoneIcon/DoneIcon.d.ts +0 -6
- package/lib/typescript/src/components/Icons/DoneIcon/DoneIcon.d.ts.map +0 -1
- package/lib/typescript/src/components/Icons/ForgotPasswordMessageIcon.d.ts +0 -3
- package/lib/typescript/src/components/Icons/ForgotPasswordMessageIcon.d.ts.map +0 -1
- package/lib/typescript/src/components/Icons/ForgotPasswordMessageIconTwo.d.ts +0 -3
- package/lib/typescript/src/components/Icons/ForgotPasswordMessageIconTwo.d.ts.map +0 -1
- package/lib/typescript/src/components/Icons/NewIndex.d.ts +0 -19
- package/lib/typescript/src/components/Icons/NewIndex.d.ts.map +0 -1
- package/lib/typescript/src/components/Icons/ResendOTP.d.ts +0 -7
- package/lib/typescript/src/components/Icons/ResendOTP.d.ts.map +0 -1
- package/src/components/Icons/AlertIcon.tsx +0 -18
- package/src/components/Icons/DeviceIcon.tsx +0 -18
- package/src/components/Icons/DoneIcon/DoneIcon.tsx +0 -17
- package/src/components/Icons/ForgotPasswordMessageIcon.tsx +0 -34
- package/src/components/Icons/ForgotPasswordMessageIconTwo.tsx +0 -32
- package/src/components/Icons/NewIndex.ts +0 -35
- package/src/components/Icons/ResendOTP.tsx +0 -13
- /package/src/{index.ts → index.tsx} +0 -0
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
* @lastModified Mon 16 Jun 2025 at 03:05 PM
|
|
4
4
|
*/
|
|
5
5
|
import React, { useCallback } from 'react';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
StyleSheet,
|
|
8
|
+
View,
|
|
9
|
+
Keyboard,
|
|
10
|
+
type ViewStyle,
|
|
11
|
+
type TextStyle,
|
|
12
|
+
} from 'react-native';
|
|
7
13
|
import { useForm, Controller } from 'react-hook-form';
|
|
8
14
|
import { scale, verticalScale } from 'react-native-size-matters';
|
|
9
15
|
import { Input } from '../../Input/Input';
|
|
@@ -66,8 +72,14 @@ type LoginWithEmailProps = {
|
|
|
66
72
|
renderForgotPassword?: () => React.ReactNode;
|
|
67
73
|
renderEmailHeader?: () => React.ReactNode;
|
|
68
74
|
renderSignupPrompt?: (props: { onPress: () => void }) => React.ReactNode;
|
|
69
|
-
renderSubmitButton?: (props: {
|
|
70
|
-
|
|
75
|
+
renderSubmitButton?: (props: {
|
|
76
|
+
onPress: () => void;
|
|
77
|
+
disabled: boolean;
|
|
78
|
+
loading: boolean;
|
|
79
|
+
}) => React.ReactNode;
|
|
80
|
+
renderSwitchToPhoneLogin?: (props: {
|
|
81
|
+
onPress: () => void;
|
|
82
|
+
}) => React.ReactNode;
|
|
71
83
|
renderTopBackBtn?: (props: { onPress: () => void }) => React.ReactNode;
|
|
72
84
|
};
|
|
73
85
|
|
|
@@ -98,7 +110,7 @@ const LoginWithEmail: React.FC<LoginWithEmailProps> = ({
|
|
|
98
110
|
renderSignupPrompt,
|
|
99
111
|
renderSubmitButton,
|
|
100
112
|
renderSwitchToPhoneLogin,
|
|
101
|
-
renderTopBackBtn
|
|
113
|
+
renderTopBackBtn,
|
|
102
114
|
}) => {
|
|
103
115
|
const { isKeyboardOpen } = useKeyboard();
|
|
104
116
|
const { theme: resolvedTheme } = useTheme(overrideTheme);
|
|
@@ -106,10 +118,10 @@ const LoginWithEmail: React.FC<LoginWithEmailProps> = ({
|
|
|
106
118
|
const {
|
|
107
119
|
control,
|
|
108
120
|
handleSubmit,
|
|
109
|
-
formState: { errors, isValid, touchedFields }
|
|
121
|
+
formState: { errors, isValid, touchedFields },
|
|
110
122
|
} = useForm<FormValues>({
|
|
111
123
|
defaultValues: { email: '', password: '' },
|
|
112
|
-
mode: 'onChange'
|
|
124
|
+
mode: 'onChange',
|
|
113
125
|
});
|
|
114
126
|
|
|
115
127
|
const handleFormSubmit = useCallback(
|
|
@@ -132,7 +144,8 @@ const LoginWithEmail: React.FC<LoginWithEmailProps> = ({
|
|
|
132
144
|
requestAnimationFrame(() => callback?.());
|
|
133
145
|
};
|
|
134
146
|
|
|
135
|
-
const shouldRender = (condition?: boolean | unknown): boolean =>
|
|
147
|
+
const shouldRender = (condition?: boolean | unknown): boolean =>
|
|
148
|
+
typeof condition === 'function' || !!condition;
|
|
136
149
|
|
|
137
150
|
return (
|
|
138
151
|
<BackgroundLayout
|
|
@@ -145,18 +158,30 @@ const LoginWithEmail: React.FC<LoginWithEmailProps> = ({
|
|
|
145
158
|
<View style={styles.topBackBtnWrapper}>
|
|
146
159
|
{renderTopBackBtn ? (
|
|
147
160
|
renderTopBackBtn({
|
|
148
|
-
onPress: onTopBackBtnPress ?? (() => {})
|
|
161
|
+
onPress: onTopBackBtnPress ?? (() => {}),
|
|
149
162
|
})
|
|
150
163
|
) : (
|
|
151
|
-
<BackBtn
|
|
164
|
+
<BackBtn
|
|
165
|
+
theme={resolvedTheme}
|
|
166
|
+
style={topBackBtnStyle}
|
|
167
|
+
onPress={onTopBackBtnPress}
|
|
168
|
+
/>
|
|
152
169
|
)}
|
|
153
170
|
</View>
|
|
154
171
|
)}
|
|
155
172
|
<HideKeyboard>
|
|
156
173
|
<View style={styles.centerContent}>
|
|
157
|
-
{renderLogo ?
|
|
174
|
+
{renderLogo ? (
|
|
175
|
+
renderLogo()
|
|
176
|
+
) : logoUri ? (
|
|
177
|
+
<Logo logoUri={logoUri} />
|
|
178
|
+
) : null}
|
|
158
179
|
|
|
159
|
-
{renderEmailHeader ?
|
|
180
|
+
{renderEmailHeader ? (
|
|
181
|
+
renderEmailHeader()
|
|
182
|
+
) : (
|
|
183
|
+
<Text style={[styles.title, titleStyle]}>{title}</Text>
|
|
184
|
+
)}
|
|
160
185
|
|
|
161
186
|
<View style={[styles.form, formStyle]}>
|
|
162
187
|
<Controller
|
|
@@ -166,8 +191,8 @@ const LoginWithEmail: React.FC<LoginWithEmailProps> = ({
|
|
|
166
191
|
required: 'Email is required',
|
|
167
192
|
pattern: {
|
|
168
193
|
value: /^\S+@\S+\.\S+$/,
|
|
169
|
-
message: 'Enter a valid email address'
|
|
170
|
-
}
|
|
194
|
+
message: 'Enter a valid email address',
|
|
195
|
+
},
|
|
171
196
|
}}
|
|
172
197
|
render={({ field: { onChange, onBlur, value } }) => (
|
|
173
198
|
<Input.One
|
|
@@ -200,8 +225,8 @@ const LoginWithEmail: React.FC<LoginWithEmailProps> = ({
|
|
|
200
225
|
required: 'Password is required',
|
|
201
226
|
minLength: {
|
|
202
227
|
value: minPasswordLength,
|
|
203
|
-
message: `Password must be at least ${minPasswordLength} characters
|
|
204
|
-
}
|
|
228
|
+
message: `Password must be at least ${minPasswordLength} characters`,
|
|
229
|
+
},
|
|
205
230
|
}}
|
|
206
231
|
render={({ field: { onChange, onBlur, value } }) => (
|
|
207
232
|
<>
|
|
@@ -234,7 +259,9 @@ const LoginWithEmail: React.FC<LoginWithEmailProps> = ({
|
|
|
234
259
|
) : (
|
|
235
260
|
<TextButton
|
|
236
261
|
title={text?.forgotPassword || 'Forgot password?'}
|
|
237
|
-
onPress={() =>
|
|
262
|
+
onPress={() =>
|
|
263
|
+
handleKeyboardDismiss(onForgotPassword)
|
|
264
|
+
}
|
|
238
265
|
color={resolvedTheme.colors.button}
|
|
239
266
|
align="right"
|
|
240
267
|
style={styles.forgotPasswordText}
|
|
@@ -249,7 +276,7 @@ const LoginWithEmail: React.FC<LoginWithEmailProps> = ({
|
|
|
249
276
|
renderSubmitButton({
|
|
250
277
|
onPress: handleSubmit(handleFormSubmit),
|
|
251
278
|
disabled: loadingSubmitBtn || !isValid || isLoading,
|
|
252
|
-
loading: loadingSubmitBtn || isLoading
|
|
279
|
+
loading: loadingSubmitBtn || isLoading,
|
|
253
280
|
})
|
|
254
281
|
) : (
|
|
255
282
|
<Button.Primary
|
|
@@ -258,7 +285,7 @@ const LoginWithEmail: React.FC<LoginWithEmailProps> = ({
|
|
|
258
285
|
disabled={loadingSubmitBtn || !isValid || isLoading}
|
|
259
286
|
theme={resolvedTheme}
|
|
260
287
|
titleStyle={{
|
|
261
|
-
fontSize: RFValue(14)
|
|
288
|
+
fontSize: RFValue(14),
|
|
262
289
|
}}
|
|
263
290
|
loadingText={text?.loadingSubmitBtnText || 'Logging in...'}
|
|
264
291
|
loading={loadingSubmitBtn || isLoading}
|
|
@@ -270,7 +297,7 @@ const LoginWithEmail: React.FC<LoginWithEmailProps> = ({
|
|
|
270
297
|
shouldRender(onSwitchToPhoneLogin || renderSwitchToPhoneLogin) &&
|
|
271
298
|
(renderSwitchToPhoneLogin ? (
|
|
272
299
|
renderSwitchToPhoneLogin({
|
|
273
|
-
onPress: () => handleKeyboardDismiss(onSwitchToPhoneLogin)
|
|
300
|
+
onPress: () => handleKeyboardDismiss(onSwitchToPhoneLogin),
|
|
274
301
|
})
|
|
275
302
|
) : (
|
|
276
303
|
<TextButton
|
|
@@ -289,11 +316,14 @@ const LoginWithEmail: React.FC<LoginWithEmailProps> = ({
|
|
|
289
316
|
<View style={styles.signupContainer}>
|
|
290
317
|
{renderSignupPrompt ? (
|
|
291
318
|
renderSignupPrompt({
|
|
292
|
-
onPress: () => handleKeyboardDismiss(onSignup)
|
|
319
|
+
onPress: () => handleKeyboardDismiss(onSignup),
|
|
293
320
|
})
|
|
294
321
|
) : (
|
|
295
322
|
<View style={styles.loginRow}>
|
|
296
|
-
<Text
|
|
323
|
+
<Text
|
|
324
|
+
style={[styles.loginPrompt, signupTextProps]}
|
|
325
|
+
color={resolvedTheme.colors.textPrimary}
|
|
326
|
+
>
|
|
297
327
|
{text?.signupPrompt || `Don't have an account?`}
|
|
298
328
|
</Text>
|
|
299
329
|
<TextButton
|
|
@@ -323,54 +353,54 @@ const styles = StyleSheet.create({
|
|
|
323
353
|
width: '100%',
|
|
324
354
|
paddingHorizontal: scale(16),
|
|
325
355
|
justifyContent: 'center',
|
|
326
|
-
alignItems: 'center'
|
|
356
|
+
alignItems: 'center',
|
|
327
357
|
},
|
|
328
358
|
topBackBtnWrapper: {
|
|
329
359
|
position: 'absolute',
|
|
330
360
|
top: verticalScale(6),
|
|
331
361
|
left: 0,
|
|
332
|
-
zIndex: 10
|
|
362
|
+
zIndex: 10,
|
|
333
363
|
},
|
|
334
364
|
centerContent: {
|
|
335
365
|
flex: 1,
|
|
336
366
|
width: '100%',
|
|
337
367
|
alignItems: 'center',
|
|
338
|
-
justifyContent: 'center'
|
|
368
|
+
justifyContent: 'center',
|
|
339
369
|
},
|
|
340
370
|
title: {
|
|
341
371
|
fontSize: RFValue(21),
|
|
342
372
|
fontWeight: '700',
|
|
343
373
|
marginTop: verticalScale(5),
|
|
344
|
-
marginBottom: verticalScale(20)
|
|
374
|
+
marginBottom: verticalScale(20),
|
|
345
375
|
},
|
|
346
376
|
form: {
|
|
347
377
|
width: '100%',
|
|
348
|
-
gap: verticalScale(10)
|
|
378
|
+
gap: verticalScale(10),
|
|
349
379
|
},
|
|
350
380
|
forgotPasswordText: {
|
|
351
381
|
textAlign: 'right',
|
|
352
382
|
marginRight: scale(4),
|
|
353
383
|
marginTop: -verticalScale(10),
|
|
354
|
-
marginBottom: verticalScale(8)
|
|
384
|
+
marginBottom: verticalScale(8),
|
|
355
385
|
},
|
|
356
386
|
switchPhoneText: {
|
|
357
|
-
marginTop: verticalScale(10)
|
|
387
|
+
marginTop: verticalScale(10),
|
|
358
388
|
},
|
|
359
389
|
signupContainer: {
|
|
360
390
|
position: 'absolute',
|
|
361
391
|
bottom: verticalScale(30),
|
|
362
392
|
left: 0,
|
|
363
393
|
right: 0,
|
|
364
|
-
alignItems: 'center'
|
|
394
|
+
alignItems: 'center',
|
|
365
395
|
},
|
|
366
396
|
loginRow: {
|
|
367
397
|
flexDirection: 'row',
|
|
368
398
|
justifyContent: 'center',
|
|
369
399
|
alignItems: 'center',
|
|
370
|
-
flexWrap: 'wrap'
|
|
400
|
+
flexWrap: 'wrap',
|
|
371
401
|
},
|
|
372
402
|
loginPrompt: {
|
|
373
403
|
textAlign: 'center',
|
|
374
|
-
marginRight: 4
|
|
375
|
-
}
|
|
404
|
+
marginRight: 4,
|
|
405
|
+
},
|
|
376
406
|
});
|
|
@@ -59,7 +59,11 @@ type LoginWithPhoneProps = {
|
|
|
59
59
|
};
|
|
60
60
|
renderLogo?: () => React.ReactNode;
|
|
61
61
|
renderPhoneHeader?: () => React.ReactNode;
|
|
62
|
-
renderSubmitButton?: (props: {
|
|
62
|
+
renderSubmitButton?: (props: {
|
|
63
|
+
onPress: () => void;
|
|
64
|
+
disabled: boolean;
|
|
65
|
+
loading: boolean;
|
|
66
|
+
}) => React.ReactNode;
|
|
63
67
|
renderLoginWithEmail?: () => React.ReactNode;
|
|
64
68
|
onLoginWithEmail?: () => void;
|
|
65
69
|
renderTopBackBtn?: (props: { onPress: () => void }) => React.ReactNode;
|
|
@@ -70,7 +74,7 @@ const DEFAULT_TEXT = {
|
|
|
70
74
|
phonePlaceholder: 'Enter phone number',
|
|
71
75
|
loginButton: 'Login',
|
|
72
76
|
loadingSubmitBtnText: 'Logging in...',
|
|
73
|
-
loginWithEmailButton: 'Login With Email'
|
|
77
|
+
loginWithEmailButton: 'Login With Email',
|
|
74
78
|
};
|
|
75
79
|
|
|
76
80
|
const LoginWithPhone: React.FC<LoginWithPhoneProps> = ({
|
|
@@ -93,7 +97,7 @@ const LoginWithPhone: React.FC<LoginWithPhoneProps> = ({
|
|
|
93
97
|
renderSubmitButton,
|
|
94
98
|
renderLoginWithEmail,
|
|
95
99
|
onLoginWithEmail,
|
|
96
|
-
renderTopBackBtn
|
|
100
|
+
renderTopBackBtn,
|
|
97
101
|
}) => {
|
|
98
102
|
const { isKeyboardOpen } = useKeyboard();
|
|
99
103
|
const { theme: resolvedTheme } = useTheme(overrideTheme);
|
|
@@ -102,12 +106,12 @@ const LoginWithPhone: React.FC<LoginWithPhoneProps> = ({
|
|
|
102
106
|
const {
|
|
103
107
|
control,
|
|
104
108
|
handleSubmit,
|
|
105
|
-
formState: { errors, isValid }
|
|
109
|
+
formState: { errors, isValid },
|
|
106
110
|
} = useForm<FormValues>({
|
|
107
111
|
defaultValues: {
|
|
108
|
-
phone: { fullNumber: '', countryCode: '91', formattedNumber: '' }
|
|
112
|
+
phone: { fullNumber: '', countryCode: '91', formattedNumber: '' },
|
|
109
113
|
},
|
|
110
|
-
mode: 'onChange'
|
|
114
|
+
mode: 'onChange',
|
|
111
115
|
});
|
|
112
116
|
|
|
113
117
|
const handleFormSubmit = useCallback(
|
|
@@ -139,77 +143,98 @@ const LoginWithPhone: React.FC<LoginWithPhoneProps> = ({
|
|
|
139
143
|
width: '100%',
|
|
140
144
|
paddingHorizontal: scale(16),
|
|
141
145
|
justifyContent: 'center',
|
|
142
|
-
alignItems: 'center'
|
|
146
|
+
alignItems: 'center',
|
|
143
147
|
},
|
|
144
148
|
topBackBtnWrapper: {
|
|
145
149
|
position: 'absolute',
|
|
146
150
|
top: verticalScale(6),
|
|
147
151
|
left: 0,
|
|
148
|
-
zIndex: 10
|
|
152
|
+
zIndex: 10,
|
|
149
153
|
},
|
|
150
154
|
centerContent: {
|
|
151
155
|
flex: 1,
|
|
152
156
|
width: '100%',
|
|
153
157
|
alignItems: 'center',
|
|
154
158
|
justifyContent: 'center',
|
|
155
|
-
maxWidth: scale(400)
|
|
159
|
+
maxWidth: scale(400),
|
|
156
160
|
},
|
|
157
161
|
title: {
|
|
158
162
|
fontSize: RFValue(21),
|
|
159
163
|
fontWeight: '700',
|
|
160
164
|
marginTop: verticalScale(8),
|
|
161
165
|
marginBottom: verticalScale(24),
|
|
162
|
-
color: resolvedTheme.colors.textPrimary
|
|
166
|
+
color: resolvedTheme.colors.textPrimary,
|
|
163
167
|
},
|
|
164
168
|
form: {
|
|
165
169
|
width: '100%',
|
|
166
170
|
gap: verticalScale(10),
|
|
167
|
-
alignItems: 'center'
|
|
171
|
+
alignItems: 'center',
|
|
168
172
|
},
|
|
169
173
|
switchEmailText: {
|
|
170
|
-
marginTop: verticalScale(10)
|
|
171
|
-
}
|
|
174
|
+
marginTop: verticalScale(10),
|
|
175
|
+
},
|
|
172
176
|
}),
|
|
173
177
|
[resolvedTheme]
|
|
174
178
|
);
|
|
175
|
-
const shouldRender = (condition?: boolean | unknown): boolean =>
|
|
179
|
+
const shouldRender = (condition?: boolean | unknown): boolean =>
|
|
180
|
+
typeof condition === 'function' || !!condition;
|
|
176
181
|
return (
|
|
177
182
|
<BackgroundLayout
|
|
178
183
|
backgroundImage={backgroundImage?.source}
|
|
179
184
|
theme={resolvedTheme}
|
|
180
185
|
gradientSplitBackground={isKeyboardOpen ? 0.3 : 0.4}
|
|
181
186
|
>
|
|
182
|
-
<View
|
|
187
|
+
<View
|
|
188
|
+
style={[styles.container, containerStyle]}
|
|
189
|
+
testID="login-with-phone"
|
|
190
|
+
>
|
|
183
191
|
{shouldRender(renderTopBackBtn || onTopBackBtnPress) && (
|
|
184
192
|
<View style={styles.topBackBtnWrapper}>
|
|
185
193
|
{renderTopBackBtn ? (
|
|
186
194
|
renderTopBackBtn({
|
|
187
|
-
onPress: onTopBackBtnPress ?? (() => {})
|
|
195
|
+
onPress: onTopBackBtnPress ?? (() => {}),
|
|
188
196
|
})
|
|
189
197
|
) : (
|
|
190
|
-
<BackBtn
|
|
198
|
+
<BackBtn
|
|
199
|
+
theme={resolvedTheme}
|
|
200
|
+
style={topBackBtnStyle}
|
|
201
|
+
onPress={onTopBackBtnPress}
|
|
202
|
+
/>
|
|
191
203
|
)}
|
|
192
204
|
</View>
|
|
193
205
|
)}
|
|
194
206
|
<HideKeyboard>
|
|
195
207
|
<View style={styles.centerContent}>
|
|
196
|
-
{renderLogo ?
|
|
208
|
+
{renderLogo ? (
|
|
209
|
+
renderLogo()
|
|
210
|
+
) : logoUri ? (
|
|
211
|
+
<Logo logoUri={logoUri} />
|
|
212
|
+
) : null}
|
|
197
213
|
|
|
198
|
-
{renderPhoneHeader ?
|
|
214
|
+
{renderPhoneHeader ? (
|
|
215
|
+
renderPhoneHeader()
|
|
216
|
+
) : (
|
|
217
|
+
<Text style={[styles.title, titleStyle]}>{title}</Text>
|
|
218
|
+
)}
|
|
199
219
|
|
|
200
220
|
<View style={[styles.form, formStyle]}>
|
|
201
221
|
<Controller
|
|
202
222
|
control={control}
|
|
203
223
|
name="phone"
|
|
204
224
|
rules={{
|
|
205
|
-
validate: (value) =>
|
|
225
|
+
validate: (value) =>
|
|
226
|
+
value?.fullNumber?.length >= 10
|
|
227
|
+
? true
|
|
228
|
+
: 'Please enter a valid phone number',
|
|
206
229
|
}}
|
|
207
230
|
render={({ field: { onChange, value } }) => (
|
|
208
231
|
<PhoneNumberInput
|
|
209
232
|
value={value.formattedNumber}
|
|
210
233
|
onChangeText={onChange}
|
|
211
234
|
label={text.phoneLabel || DEFAULT_TEXT.phoneLabel}
|
|
212
|
-
placeholder={
|
|
235
|
+
placeholder={
|
|
236
|
+
text.phonePlaceholder || DEFAULT_TEXT.phonePlaceholder
|
|
237
|
+
}
|
|
213
238
|
disabled={loadingSubmitBtn || isLoading}
|
|
214
239
|
error={!!errors.phone}
|
|
215
240
|
errorMessage={errors.phone?.message}
|
|
@@ -225,7 +250,7 @@ const LoginWithPhone: React.FC<LoginWithPhoneProps> = ({
|
|
|
225
250
|
renderSubmitButton({
|
|
226
251
|
onPress: handleSubmit(handleFormSubmit),
|
|
227
252
|
disabled: !isValid || loadingSubmitBtn || isLoading,
|
|
228
|
-
loading: loadingSubmitBtn || isLoading
|
|
253
|
+
loading: loadingSubmitBtn || isLoading,
|
|
229
254
|
})
|
|
230
255
|
) : (
|
|
231
256
|
<Button.Primary
|
|
@@ -233,7 +258,10 @@ const LoginWithPhone: React.FC<LoginWithPhoneProps> = ({
|
|
|
233
258
|
disabled={loadingSubmitBtn || !isValid || isLoading}
|
|
234
259
|
theme={resolvedTheme}
|
|
235
260
|
onPress={handleSubmit(handleFormSubmit)}
|
|
236
|
-
loadingText={
|
|
261
|
+
loadingText={
|
|
262
|
+
text.loadingSubmitBtnText ||
|
|
263
|
+
DEFAULT_TEXT.loadingSubmitBtnText
|
|
264
|
+
}
|
|
237
265
|
loading={loadingSubmitBtn || isLoading}
|
|
238
266
|
/>
|
|
239
267
|
)}
|
|
@@ -244,7 +272,10 @@ const LoginWithPhone: React.FC<LoginWithPhoneProps> = ({
|
|
|
244
272
|
renderLoginWithEmail()
|
|
245
273
|
) : (
|
|
246
274
|
<TextButton
|
|
247
|
-
title={
|
|
275
|
+
title={
|
|
276
|
+
text.loginWithEmailButton ||
|
|
277
|
+
DEFAULT_TEXT.loginWithEmailButton
|
|
278
|
+
}
|
|
248
279
|
onPress={handleEmailLogin}
|
|
249
280
|
color={resolvedTheme.colors.button}
|
|
250
281
|
style={styles.switchEmailText}
|