@truworth/twc-auth 3.0.5 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -2
- package/build/assets/animation/redirect-home.json +0 -1101
- package/build/assets/cross_icon copy.svg +0 -5
- package/build/assets/cross_icon.svg +0 -5
- package/build/assets/email_icon.svg +0 -6
- package/build/assets/gender-diversity.svg +0 -22
- package/build/assets/loading-spinner.json +0 -1
- package/build/assets/logo.svg +0 -55
- package/build/assets/okay_icon.svg +0 -3
- package/build/src/api/auth.js +0 -36
- package/build/src/api/axiosClient/index.js +0 -5
- package/build/src/api/axiosClient/index.native.js +0 -5
- package/build/src/components/AdvancedTransitionWrapper/index.js +0 -374
- package/build/src/components/AdvancedTransitionWrapper/index.native.js +0 -10
- package/build/src/components/AdvancedTransitionWrapper/types.js +0 -1
- package/build/src/components/ConfirmationModal/index.js +0 -11
- package/build/src/components/ConfirmationModal/index.native.js +0 -15
- package/build/src/components/ConfirmationModal/types.js +0 -1
- package/build/src/components/IonIcon/index.js +0 -11
- package/build/src/components/IonIcon/index.native.js +0 -9
- package/build/src/components/IonIcon/types.js +0 -1
- package/build/src/components/OTPStatusLabel/index.js +0 -10
- package/build/src/components/OTPStatusLabel/index.native.js +0 -21
- package/build/src/components/OTPStatusLabel/types.js +0 -1
- package/build/src/components/PasswordCriteria/hooks/usePasswordCriteria.js +0 -71
- package/build/src/components/PasswordCriteria/index.js +0 -47
- package/build/src/components/PasswordCriteria/index.native.js +0 -22
- package/build/src/components/PasswordCriteria/types.js +0 -1
- package/build/src/components/ScreenLayout/index.js +0 -12
- package/build/src/components/ScreenLayout/index.native.js +0 -18
- package/build/src/components/ScreenLayout/types.js +0 -1
- package/build/src/components/SupportDetails/index.js +0 -9
- package/build/src/components/SupportDetails/index.native.js +0 -6
- package/build/src/components/VerifyEmailOTP/index.js +0 -20
- package/build/src/components/VerifyEmailOTP/index.native.js +0 -22
- package/build/src/components/VerifyEmailOTP/types.js +0 -1
- package/build/src/components/VerifyMobileOTP/index.js +0 -25
- package/build/src/components/VerifyMobileOTP/index.native.js +0 -38
- package/build/src/components/VerifyMobileOTP/types.js +0 -1
- package/build/src/constants/base-url/index.js +0 -5
- package/build/src/constants/base-url/index.native.js +0 -1
- package/build/src/constants/cdn-url/index.js +0 -2
- package/build/src/constants/cdn-url/index.native.js +0 -5
- package/build/src/constants/defaultPolicy.js +0 -9
- package/build/src/constants/password-requirements.js +0 -7
- package/build/src/constants/social-login-options.js +0 -16
- package/build/src/contexts/AuthContext.js +0 -190
- package/build/src/contexts/type.js +0 -1
- package/build/src/enums/index.js +0 -3
- package/build/src/enums/loginMethod.enum.js +0 -8
- package/build/src/enums/registrationMethod.enum.js +0 -7
- package/build/src/enums/socialLogins.enum.js +0 -6
- package/build/src/helpers/network.js +0 -93
- package/build/src/helpers/show-message/index.js +0 -19
- package/build/src/helpers/show-message/index.native.js +0 -14
- package/build/src/helpers/show-message/types.js +0 -1
- package/build/src/helpers/types.js +0 -1
- package/build/src/helpers/validation.js +0 -12
- package/build/src/hooks/internal/useAuthPackageContext.js +0 -9
- package/build/src/hooks/internal/useTimer.js +0 -40
- package/build/src/hooks/useAuthContext.js +0 -10
- package/build/src/hooks/useNavigator.js +0 -83
- package/build/src/hooks/useRequest.js +0 -34
- package/build/src/index.js +0 -23
- package/build/src/navigator/index.js +0 -10
- package/build/src/navigator/index.native.js +0 -27
- package/build/src/screens/CountryCode/components/CountryCodeDropdown/index.js +0 -37
- package/build/src/screens/CountryCode/components/CountryCodeDropdown/index.native.js +0 -6
- package/build/src/screens/CountryCode/components/CountryCodeDropdown/types.js +0 -1
- package/build/src/screens/CountryCode/hooks/internal/useCountryCode.js +0 -38
- package/build/src/screens/CountryCode/index.js +0 -10
- package/build/src/screens/CountryCode/index.native.js +0 -37
- package/build/src/screens/CountryCode/type.js +0 -1
- package/build/src/screens/CreatePassword/hooks/internal/useCreatePassword.js +0 -46
- package/build/src/screens/CreatePassword/index.js +0 -16
- package/build/src/screens/CreatePassword/index.native.js +0 -32
- package/build/src/screens/CreatePassword/type.js +0 -1
- package/build/src/screens/EnterEmail/hooks/internal/useEnterEmail.js +0 -77
- package/build/src/screens/EnterEmail/index.js +0 -58
- package/build/src/screens/EnterEmail/index.native.js +0 -31
- package/build/src/screens/EnterEmail/types.js +0 -1
- package/build/src/screens/EnterMobile/components/ExistingAccountsSheet/hooks/internal/useExistingAccountsSheet.js +0 -36
- package/build/src/screens/EnterMobile/components/ExistingAccountsSheet/index.js +0 -33
- package/build/src/screens/EnterMobile/components/ExistingAccountsSheet/index.native.js +0 -73
- package/build/src/screens/EnterMobile/components/ExistingAccountsSheet/types.js +0 -1
- package/build/src/screens/EnterMobile/hooks/internal/useEnterMobile.js +0 -67
- package/build/src/screens/EnterMobile/index.js +0 -81
- package/build/src/screens/EnterMobile/index.native.js +0 -56
- package/build/src/screens/EnterMobile/types.js +0 -1
- package/build/src/screens/EnterPassword/hooks/internal/useEnterPassword.js +0 -79
- package/build/src/screens/EnterPassword/index.js +0 -68
- package/build/src/screens/EnterPassword/index.native.js +0 -41
- package/build/src/screens/EnterPassword/types.js +0 -1
- package/build/src/screens/Login/components/LoginWebComponent/index.js +0 -63
- package/build/src/screens/Login/components/LoginWebComponent/index.native.js +0 -6
- package/build/src/screens/Login/index.js +0 -10
- package/build/src/screens/Login/index.native.js +0 -6
- package/build/src/screens/LoginWithEmailOTP/hooks/internal/useLoginWithEmailOTP.js +0 -85
- package/build/src/screens/LoginWithEmailOTP/index.js +0 -8
- package/build/src/screens/LoginWithEmailOTP/index.native.js +0 -10
- package/build/src/screens/LoginWithMobileOTP/hooks/internal/useLoginWithMobileOTP.js +0 -72
- package/build/src/screens/LoginWithMobileOTP/index.js +0 -8
- package/build/src/screens/LoginWithMobileOTP/index.native.js +0 -10
- package/build/src/screens/PartnerSSO/PartnerLogin/components/PartnerLoginWebComponent/index.js +0 -77
- package/build/src/screens/PartnerSSO/PartnerLogin/hooks/internal/usePartnerLogin.js +0 -50
- package/build/src/screens/PartnerSSO/PartnerLogin/index.js +0 -2
- package/build/src/screens/PartnerSSO/PartnerLogin/types.js +0 -1
- package/build/src/screens/PartnerSSO/PartnerRegistration/components/PartnerRegistrationWebComponent/index.js +0 -203
- package/build/src/screens/PartnerSSO/PartnerRegistration/hooks/internal/usePartnerRegistration.js +0 -90
- package/build/src/screens/PartnerSSO/PartnerRegistration/index.js +0 -2
- package/build/src/screens/PartnerSSO/PartnerRegistration/types.js +0 -1
- package/build/src/screens/PartnerSSO/index.js +0 -2
- package/build/src/screens/Profile/components/EditMobileNumber/index.js +0 -31
- package/build/src/screens/Profile/components/EditMobileNumber/index.native.js +0 -8
- package/build/src/screens/Profile/components/EditPassword/index.js +0 -29
- package/build/src/screens/Profile/components/EditPassword/index.native.js +0 -8
- package/build/src/screens/Profile/components/EditProfile/index.js +0 -89
- package/build/src/screens/Profile/components/EditProfile/index.native.js +0 -8
- package/build/src/screens/Profile/components/OtpVerificationModal/index.js +0 -61
- package/build/src/screens/Profile/components/OtpVerificationModal/index.native.js +0 -7
- package/build/src/screens/Profile/components/ProfileWebComponent/index.js +0 -80
- package/build/src/screens/Profile/components/ProfileWebComponent/index.native.js +0 -9
- package/build/src/screens/Profile/hooks/internal/useProfile.js +0 -185
- package/build/src/screens/Profile/index.js +0 -6
- package/build/src/screens/Profile/index.native.js +0 -6
- package/build/src/screens/Profile/types.js +0 -1
- package/build/src/screens/ResetPassword/hooks/internal/useResetPassword.js +0 -57
- package/build/src/screens/ResetPassword/index.js +0 -46
- package/build/src/screens/ResetPassword/index.native.js +0 -26
- package/build/src/screens/ResetPassword/types.js +0 -1
- package/build/src/screens/SSOLogin/AuthWebView/index.js +0 -9
- package/build/src/screens/SSOLogin/AuthWebView/index.native.js +0 -42
- package/build/src/screens/SSOLogin/AuthWebView/types.js +0 -1
- package/build/src/screens/SSOLogin/AuthenticationMethods/hooks/internal/useSSOAuthenticationMethods.js +0 -39
- package/build/src/screens/SSOLogin/AuthenticationMethods/index.js +0 -50
- package/build/src/screens/SSOLogin/AuthenticationMethods/index.native.js +0 -59
- package/build/src/screens/SSOLogin/AuthenticationMethods/types.js +0 -1
- package/build/src/screens/SSOLogin/SSOCallback/components/SSOCallbackComponent/index.js +0 -87
- package/build/src/screens/SSOLogin/SSOCallback/components/SSOCallbackComponent/index.native.js +0 -6
- package/build/src/screens/SSOLogin/SSOCallback/hooks/internal/useSSOCallback.js +0 -58
- package/build/src/screens/SSOLogin/SSOCallback/index.js +0 -9
- package/build/src/screens/SSOLogin/SSOCallback/index.native.js +0 -35
- package/build/src/screens/SSOLogin/SSOCallback/types.js +0 -1
- package/build/src/screens/SSOLogin/SearchOrganization/hooks/internal/useSSOSearchOrganization.js +0 -71
- package/build/src/screens/SSOLogin/SearchOrganization/index.js +0 -46
- package/build/src/screens/SSOLogin/SearchOrganization/index.native.js +0 -37
- package/build/src/screens/SSOLogin/SearchOrganization/types.js +0 -1
- package/build/src/screens/SignUp/components/SignUpForm/index.js +0 -215
- package/build/src/screens/SignUp/components/SignUpForm/index.native.js +0 -6
- package/build/src/screens/SignUp/components/SignUpForm/type.js +0 -1
- package/build/src/screens/SignUp/components/SignUpWebComponent/index.js +0 -62
- package/build/src/screens/SignUp/components/SignUpWebComponent/index.native.js +0 -6
- package/build/src/screens/SignUp/components/SignUpWebComponent/types.js +0 -1
- package/build/src/screens/SignUp/hooks/internal/useSignUp.js +0 -134
- package/build/src/screens/SignUp/index.js +0 -6
- package/build/src/screens/SignUp/index.native.js +0 -188
- package/build/src/screens/SignUp/types.js +0 -1
- package/build/src/screens/UserConsent/hooks/internal/useConsent.js +0 -64
- package/build/src/screens/UserConsent/index.js +0 -93
- package/build/src/screens/UserConsent/index.native.js +0 -47
- package/build/src/screens/UserConsent/types.js +0 -1
- package/build/src/screens/VerifyEmail/hooks/internal/useVerifyEmail.js +0 -69
- package/build/src/screens/VerifyEmail/index.js +0 -8
- package/build/src/screens/VerifyEmail/index.native.js +0 -14
- package/build/src/screens/VerifyEmail/types.js +0 -1
- package/build/src/screens/VerifyLinkPrimaryAccountEmailOTP/hooks/internal/useVerifyLinkPrimaryAccountEmailOTP.js +0 -73
- package/build/src/screens/VerifyLinkPrimaryAccountEmailOTP/index.js +0 -8
- package/build/src/screens/VerifyLinkPrimaryAccountEmailOTP/index.native.js +0 -14
- package/build/src/screens/VerifyLinkPrimaryAccountEmailOTP/types.js +0 -1
- package/build/src/screens/VerifyLinkPrimaryAccountMobileOTP/hooks/internal/useVerifyLinkPrimaryAccountMobileOTP.js +0 -83
- package/build/src/screens/VerifyLinkPrimaryAccountMobileOTP/index.js +0 -8
- package/build/src/screens/VerifyLinkPrimaryAccountMobileOTP/index.native.js +0 -10
- package/build/src/screens/VerifyLinkPrimaryAccountMobileOTP/types.js +0 -1
- package/build/src/screens/VerifyMobile/hooks/internal/useVerifyMobile.js +0 -74
- package/build/src/screens/VerifyMobile/index.js +0 -8
- package/build/src/screens/VerifyMobile/index.native.js +0 -9
- package/build/src/screens/VerifyMobile/types.js +0 -1
- package/build/src/screens/VerifyResetPasswordOTP/hooks/internal/useVerifyResetPasswordOTP.js +0 -74
- package/build/src/screens/VerifyResetPasswordOTP/index.js +0 -8
- package/build/src/screens/VerifyResetPasswordOTP/index.native.js +0 -14
- package/build/src/screens/Welcome/SocialAuth/commonSocialAuth.js +0 -127
- package/build/src/screens/Welcome/SocialAuth/hooks/useSocialAuth.native.js +0 -187
- package/build/src/screens/Welcome/SocialAuth/hooks/useSocialAuth.web.js +0 -13
- package/build/src/screens/Welcome/SocialAuth/hooks/web/useFacebookAuth.web.js +0 -115
- package/build/src/screens/Welcome/SocialAuth/hooks/web/useGoogleAuth.web.js +0 -72
- package/build/src/screens/Welcome/components/SocialLoginModal/index.js +0 -9
- package/build/src/screens/Welcome/components/SocialLoginModal/index.native.js +0 -21
- package/build/src/screens/Welcome/components/SocialLoginModal/types.js +0 -1
- package/build/src/screens/Welcome/hooks/internal/useWelcome.js +0 -26
- package/build/src/screens/Welcome/index.js +0 -28
- package/build/src/screens/Welcome/index.native.js +0 -78
- package/build/src/types/types.js +0 -2
- package/build/types/api/auth.d.ts +0 -11
- package/build/types/api/axiosClient/index.d.ts +0 -1
- package/build/types/api/axiosClient/index.native.d.ts +0 -1
- package/build/types/components/AdvancedTransitionWrapper/index.d.ts +0 -3
- package/build/types/components/AdvancedTransitionWrapper/index.native.d.ts +0 -5
- package/build/types/components/AdvancedTransitionWrapper/types.d.ts +0 -25
- package/build/types/components/ConfirmationModal/index.d.ts +0 -3
- package/build/types/components/ConfirmationModal/index.native.d.ts +0 -3
- package/build/types/components/ConfirmationModal/types.d.ts +0 -16
- package/build/types/components/IonIcon/index.d.ts +0 -3
- package/build/types/components/IonIcon/index.native.d.ts +0 -4
- package/build/types/components/IonIcon/types.d.ts +0 -6
- package/build/types/components/OTPStatusLabel/index.d.ts +0 -2
- package/build/types/components/OTPStatusLabel/index.native.d.ts +0 -3
- package/build/types/components/OTPStatusLabel/types.d.ts +0 -6
- package/build/types/components/PasswordCriteria/hooks/usePasswordCriteria.d.ts +0 -8
- package/build/types/components/PasswordCriteria/index.d.ts +0 -3
- package/build/types/components/PasswordCriteria/index.native.d.ts +0 -3
- package/build/types/components/PasswordCriteria/types.d.ts +0 -15
- package/build/types/components/ScreenLayout/index.d.ts +0 -3
- package/build/types/components/ScreenLayout/index.native.d.ts +0 -3
- package/build/types/components/ScreenLayout/types.d.ts +0 -13
- package/build/types/components/SupportDetails/index.d.ts +0 -2
- package/build/types/components/SupportDetails/index.native.d.ts +0 -2
- package/build/types/components/VerifyEmailOTP/index.d.ts +0 -3
- package/build/types/components/VerifyEmailOTP/index.native.d.ts +0 -3
- package/build/types/components/VerifyEmailOTP/types.d.ts +0 -9
- package/build/types/components/VerifyMobileOTP/index.d.ts +0 -3
- package/build/types/components/VerifyMobileOTP/index.native.d.ts +0 -3
- package/build/types/components/VerifyMobileOTP/types.d.ts +0 -9
- package/build/types/constants/base-url/index.d.ts +0 -1
- package/build/types/constants/base-url/index.native.d.ts +0 -1
- package/build/types/constants/cdn-url/index.d.ts +0 -2
- package/build/types/constants/cdn-url/index.native.d.ts +0 -3
- package/build/types/constants/defaultPolicy.d.ts +0 -9
- package/build/types/constants/password-requirements.d.ts +0 -4
- package/build/types/constants/social-login-options.d.ts +0 -3
- package/build/types/contexts/AuthContext.d.ts +0 -38
- package/build/types/contexts/type.d.ts +0 -94
- package/build/types/enums/index.d.ts +0 -3
- package/build/types/enums/loginMethod.enum.d.ts +0 -7
- package/build/types/enums/registrationMethod.enum.d.ts +0 -6
- package/build/types/enums/socialLogins.enum.d.ts +0 -5
- package/build/types/helpers/network.d.ts +0 -5
- package/build/types/helpers/show-message/index.d.ts +0 -3
- package/build/types/helpers/show-message/index.native.d.ts +0 -3
- package/build/types/helpers/show-message/types.d.ts +0 -6
- package/build/types/helpers/types.d.ts +0 -19
- package/build/types/helpers/validation.d.ts +0 -2
- package/build/types/hooks/internal/useAuthPackageContext.d.ts +0 -1
- package/build/types/hooks/internal/useTimer.d.ts +0 -3
- package/build/types/hooks/useAuthContext.d.ts +0 -2
- package/build/types/hooks/useNavigator.d.ts +0 -66
- package/build/types/hooks/useRequest.d.ts +0 -5
- package/build/types/index.d.ts +0 -15
- package/build/types/navigator/index.d.ts +0 -2
- package/build/types/navigator/index.native.d.ts +0 -82
- package/build/types/screens/CountryCode/components/CountryCodeDropdown/index.d.ts +0 -3
- package/build/types/screens/CountryCode/components/CountryCodeDropdown/index.native.d.ts +0 -2
- package/build/types/screens/CountryCode/components/CountryCodeDropdown/types.d.ts +0 -17
- package/build/types/screens/CountryCode/hooks/internal/useCountryCode.d.ts +0 -12
- package/build/types/screens/CountryCode/index.d.ts +0 -2
- package/build/types/screens/CountryCode/index.native.d.ts +0 -2
- package/build/types/screens/CountryCode/type.d.ts +0 -11
- package/build/types/screens/CreatePassword/hooks/internal/useCreatePassword.d.ts +0 -37
- package/build/types/screens/CreatePassword/index.d.ts +0 -3
- package/build/types/screens/CreatePassword/index.native.d.ts +0 -4
- package/build/types/screens/CreatePassword/type.d.ts +0 -43
- package/build/types/screens/EnterEmail/hooks/internal/useEnterEmail.d.ts +0 -19
- package/build/types/screens/EnterEmail/index.d.ts +0 -3
- package/build/types/screens/EnterEmail/index.native.d.ts +0 -4
- package/build/types/screens/EnterEmail/types.d.ts +0 -13
- package/build/types/screens/EnterMobile/components/ExistingAccountsSheet/hooks/internal/useExistingAccountsSheet.d.ts +0 -13
- package/build/types/screens/EnterMobile/components/ExistingAccountsSheet/index.d.ts +0 -3
- package/build/types/screens/EnterMobile/components/ExistingAccountsSheet/index.native.d.ts +0 -3
- package/build/types/screens/EnterMobile/components/ExistingAccountsSheet/types.d.ts +0 -28
- package/build/types/screens/EnterMobile/hooks/internal/useEnterMobile.d.ts +0 -15
- package/build/types/screens/EnterMobile/index.d.ts +0 -4
- package/build/types/screens/EnterMobile/index.native.d.ts +0 -4
- package/build/types/screens/EnterMobile/types.d.ts +0 -44
- package/build/types/screens/EnterPassword/hooks/internal/useEnterPassword.d.ts +0 -25
- package/build/types/screens/EnterPassword/index.d.ts +0 -3
- package/build/types/screens/EnterPassword/index.native.d.ts +0 -4
- package/build/types/screens/EnterPassword/types.d.ts +0 -24
- package/build/types/screens/Login/components/LoginWebComponent/index.d.ts +0 -2
- package/build/types/screens/Login/components/LoginWebComponent/index.native.d.ts +0 -2
- package/build/types/screens/Login/index.d.ts +0 -2
- package/build/types/screens/Login/index.native.d.ts +0 -2
- package/build/types/screens/LoginWithEmailOTP/hooks/internal/useLoginWithEmailOTP.d.ts +0 -17
- package/build/types/screens/LoginWithEmailOTP/index.d.ts +0 -7
- package/build/types/screens/LoginWithEmailOTP/index.native.d.ts +0 -4
- package/build/types/screens/LoginWithMobileOTP/hooks/internal/useLoginWithMobileOTP.d.ts +0 -11
- package/build/types/screens/LoginWithMobileOTP/index.d.ts +0 -5
- package/build/types/screens/LoginWithMobileOTP/index.native.d.ts +0 -4
- package/build/types/screens/PartnerSSO/PartnerLogin/components/PartnerLoginWebComponent/index.d.ts +0 -25
- package/build/types/screens/PartnerSSO/PartnerLogin/hooks/internal/usePartnerLogin.d.ts +0 -8
- package/build/types/screens/PartnerSSO/PartnerLogin/index.d.ts +0 -2
- package/build/types/screens/PartnerSSO/PartnerLogin/types.d.ts +0 -35
- package/build/types/screens/PartnerSSO/PartnerRegistration/components/PartnerRegistrationWebComponent/index.d.ts +0 -24
- package/build/types/screens/PartnerSSO/PartnerRegistration/hooks/internal/usePartnerRegistration.d.ts +0 -8
- package/build/types/screens/PartnerSSO/PartnerRegistration/index.d.ts +0 -2
- package/build/types/screens/PartnerSSO/PartnerRegistration/types.d.ts +0 -63
- package/build/types/screens/PartnerSSO/index.d.ts +0 -2
- package/build/types/screens/Profile/components/EditMobileNumber/index.d.ts +0 -6
- package/build/types/screens/Profile/components/EditMobileNumber/index.native.d.ts +0 -3
- package/build/types/screens/Profile/components/EditPassword/index.d.ts +0 -6
- package/build/types/screens/Profile/components/EditPassword/index.native.d.ts +0 -3
- package/build/types/screens/Profile/components/EditProfile/index.d.ts +0 -6
- package/build/types/screens/Profile/components/EditProfile/index.native.d.ts +0 -3
- package/build/types/screens/Profile/components/OtpVerificationModal/index.d.ts +0 -4
- package/build/types/screens/Profile/components/OtpVerificationModal/index.native.d.ts +0 -3
- package/build/types/screens/Profile/components/ProfileWebComponent/index.d.ts +0 -4
- package/build/types/screens/Profile/components/ProfileWebComponent/index.native.d.ts +0 -3
- package/build/types/screens/Profile/hooks/internal/useProfile.d.ts +0 -26
- package/build/types/screens/Profile/index.d.ts +0 -7
- package/build/types/screens/Profile/index.native.d.ts +0 -7
- package/build/types/screens/Profile/types.d.ts +0 -53
- package/build/types/screens/ResetPassword/hooks/internal/useResetPassword.d.ts +0 -29
- package/build/types/screens/ResetPassword/index.d.ts +0 -3
- package/build/types/screens/ResetPassword/index.native.d.ts +0 -4
- package/build/types/screens/ResetPassword/types.d.ts +0 -11
- package/build/types/screens/SSOLogin/AuthWebView/index.d.ts +0 -2
- package/build/types/screens/SSOLogin/AuthWebView/index.native.d.ts +0 -4
- package/build/types/screens/SSOLogin/AuthWebView/types.d.ts +0 -8
- package/build/types/screens/SSOLogin/AuthenticationMethods/hooks/internal/useSSOAuthenticationMethods.d.ts +0 -9
- package/build/types/screens/SSOLogin/AuthenticationMethods/index.d.ts +0 -3
- package/build/types/screens/SSOLogin/AuthenticationMethods/index.native.d.ts +0 -4
- package/build/types/screens/SSOLogin/AuthenticationMethods/types.d.ts +0 -14
- package/build/types/screens/SSOLogin/SSOCallback/components/SSOCallbackComponent/index.d.ts +0 -6
- package/build/types/screens/SSOLogin/SSOCallback/components/SSOCallbackComponent/index.native.d.ts +0 -2
- package/build/types/screens/SSOLogin/SSOCallback/hooks/internal/useSSOCallback.d.ts +0 -15
- package/build/types/screens/SSOLogin/SSOCallback/index.d.ts +0 -2
- package/build/types/screens/SSOLogin/SSOCallback/index.native.d.ts +0 -4
- package/build/types/screens/SSOLogin/SSOCallback/types.d.ts +0 -14
- package/build/types/screens/SSOLogin/SearchOrganization/hooks/internal/useSSOSearchOrganization.d.ts +0 -18
- package/build/types/screens/SSOLogin/SearchOrganization/index.d.ts +0 -3
- package/build/types/screens/SSOLogin/SearchOrganization/index.native.d.ts +0 -4
- package/build/types/screens/SSOLogin/SearchOrganization/types.d.ts +0 -13
- package/build/types/screens/SignUp/components/SignUpForm/index.d.ts +0 -3
- package/build/types/screens/SignUp/components/SignUpForm/index.native.d.ts +0 -2
- package/build/types/screens/SignUp/components/SignUpForm/type.d.ts +0 -6
- package/build/types/screens/SignUp/components/SignUpWebComponent/index.d.ts +0 -2
- package/build/types/screens/SignUp/components/SignUpWebComponent/index.native.d.ts +0 -2
- package/build/types/screens/SignUp/components/SignUpWebComponent/types.d.ts +0 -9
- package/build/types/screens/SignUp/hooks/internal/useSignUp.d.ts +0 -48
- package/build/types/screens/SignUp/index.d.ts +0 -2
- package/build/types/screens/SignUp/index.native.d.ts +0 -4
- package/build/types/screens/SignUp/types.d.ts +0 -40
- package/build/types/screens/UserConsent/hooks/internal/useConsent.d.ts +0 -10
- package/build/types/screens/UserConsent/index.d.ts +0 -3
- package/build/types/screens/UserConsent/index.native.d.ts +0 -4
- package/build/types/screens/UserConsent/types.d.ts +0 -33
- package/build/types/screens/VerifyEmail/hooks/internal/useVerifyEmail.d.ts +0 -19
- package/build/types/screens/VerifyEmail/index.d.ts +0 -3
- package/build/types/screens/VerifyEmail/index.native.d.ts +0 -4
- package/build/types/screens/VerifyEmail/types.d.ts +0 -8
- package/build/types/screens/VerifyLinkPrimaryAccountEmailOTP/hooks/internal/useVerifyLinkPrimaryAccountEmailOTP.d.ts +0 -15
- package/build/types/screens/VerifyLinkPrimaryAccountEmailOTP/index.d.ts +0 -3
- package/build/types/screens/VerifyLinkPrimaryAccountEmailOTP/index.native.d.ts +0 -4
- package/build/types/screens/VerifyLinkPrimaryAccountEmailOTP/types.d.ts +0 -14
- package/build/types/screens/VerifyLinkPrimaryAccountMobileOTP/hooks/internal/useVerifyLinkPrimaryAccountMobileOTP.d.ts +0 -17
- package/build/types/screens/VerifyLinkPrimaryAccountMobileOTP/index.d.ts +0 -3
- package/build/types/screens/VerifyLinkPrimaryAccountMobileOTP/index.native.d.ts +0 -4
- package/build/types/screens/VerifyLinkPrimaryAccountMobileOTP/types.d.ts +0 -5
- package/build/types/screens/VerifyMobile/hooks/internal/useVerifyMobile.d.ts +0 -14
- package/build/types/screens/VerifyMobile/index.d.ts +0 -3
- package/build/types/screens/VerifyMobile/index.native.d.ts +0 -4
- package/build/types/screens/VerifyMobile/types.d.ts +0 -5
- package/build/types/screens/VerifyResetPasswordOTP/hooks/internal/useVerifyResetPasswordOTP.d.ts +0 -19
- package/build/types/screens/VerifyResetPasswordOTP/index.d.ts +0 -7
- package/build/types/screens/VerifyResetPasswordOTP/index.native.d.ts +0 -4
- package/build/types/screens/Welcome/SocialAuth/commonSocialAuth.d.ts +0 -50
- package/build/types/screens/Welcome/SocialAuth/hooks/useSocialAuth.native.d.ts +0 -7
- package/build/types/screens/Welcome/SocialAuth/hooks/useSocialAuth.web.d.ts +0 -7
- package/build/types/screens/Welcome/SocialAuth/hooks/web/useFacebookAuth.web.d.ts +0 -5
- package/build/types/screens/Welcome/SocialAuth/hooks/web/useGoogleAuth.web.d.ts +0 -4
- package/build/types/screens/Welcome/components/SocialLoginModal/index.d.ts +0 -3
- package/build/types/screens/Welcome/components/SocialLoginModal/index.native.d.ts +0 -3
- package/build/types/screens/Welcome/components/SocialLoginModal/types.d.ts +0 -8
- package/build/types/screens/Welcome/hooks/internal/useWelcome.d.ts +0 -22
- package/build/types/screens/Welcome/index.d.ts +0 -4
- package/build/types/screens/Welcome/index.native.d.ts +0 -4
- package/build/types/types/types.d.ts +0 -115
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { View, Text } from 'react-native';
|
|
3
|
-
import { Modal } from '@ui-kitten/components';
|
|
4
|
-
import { Colors, RoundedButton } from '@truworth/twc-rn-common';
|
|
5
|
-
import IonIcon from 'react-native-vector-icons/Ionicons';
|
|
6
|
-
const { primary, gray } = Colors;
|
|
7
|
-
const ConfirmationModal = ({ title, visible, onClose, onProceed, onDismiss, primaryLabel, secondaryLabel, iconName = "information-circle-outline", iconColor = primary.primary_main, description }) => {
|
|
8
|
-
return (_jsx(Modal, { visible: visible, onBackdropPress: onClose, backdropStyle: { backgroundColor: 'rgba(0, 0, 0, 0.25)' }, children: _jsxs(View, { style: { flex: 1, backgroundColor: 'white', padding: 32, marginHorizontal: 16, borderRadius: 12, marginTop: -50 }, children: [iconName &&
|
|
9
|
-
_jsx(IonIcon, { name: iconName, size: 64, color: iconColor, style: { alignSelf: 'center', marginBottom: 12 } }), title &&
|
|
10
|
-
_jsx(Text, { style: { fontSize: 16, textAlign: 'center', fontWeight: '600', color: gray.gray_900, marginBottom: 24, lineHeight: 20 }, children: title }), description &&
|
|
11
|
-
_jsx(Text, { style: { fontSize: 12, textAlign: 'center', fontWeight: '600', color: gray.gray_600, marginTop: -16, marginBottom: 24, lineHeight: 16 }, children: description }), primaryLabel &&
|
|
12
|
-
_jsx(RoundedButton, { size: 'large', label: primaryLabel, onPress: () => { onClose(); onProceed?.(); } }), secondaryLabel &&
|
|
13
|
-
_jsx(RoundedButton, { size: 'large', type: "text", label: secondaryLabel, containerStyle: { marginTop: primaryLabel ? 8 : 0 }, onPress: onDismiss ? onDismiss : onClose })] }) }));
|
|
14
|
-
};
|
|
15
|
-
export { ConfirmationModal };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
const IonIcon = ({ name, size, className, ...props }) => {
|
|
3
|
-
const customElementProps = {
|
|
4
|
-
...props,
|
|
5
|
-
name,
|
|
6
|
-
size,
|
|
7
|
-
class: className // For the custom element
|
|
8
|
-
};
|
|
9
|
-
return _jsx("ion-icon", { ...customElementProps });
|
|
10
|
-
};
|
|
11
|
-
export { IonIcon };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
const OTPStatusLabel = () => {
|
|
3
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4
|
-
if (typeof window !== 'undefined') {
|
|
5
|
-
console.warn("[@truworth/twc-auth] We use only OTPStatusLabel for the app");
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
return null;
|
|
9
|
-
};
|
|
10
|
-
export { OTPStatusLabel };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { isIphoneX } from "@truworth/twc-rn-common";
|
|
3
|
-
import { ActivityIndicator, Platform, Text, View } from "react-native";
|
|
4
|
-
import LinearGradient from "react-native-linear-gradient";
|
|
5
|
-
import OkayIcon from '../../../assets/okay_icon.svg';
|
|
6
|
-
import CrossIcon from '../../../assets/cross_icon.svg';
|
|
7
|
-
const OTPStatusLabel = ({ status, timer }) => {
|
|
8
|
-
switch (status) {
|
|
9
|
-
case 'timer':
|
|
10
|
-
return (_jsx(View, { style: { height: isIphoneX() ? 80 : 70, width: '100%', justifyContent: 'center', marginBottom: Platform.OS === 'ios' ? 14 : 0 }, children: _jsx(LinearGradient, { colors: ['#b0bbbd', '#b0bbbd'], style: { flex: 1, justifyContent: 'center', alignItems: 'center' }, start: { x: 0, y: 0 }, end: { x: 1, y: 0 }, children: _jsx(Text, { style: { textAlign: 'center', fontSize: 15, color: '#FFFFFF', textTransform: 'uppercase' }, children: timer && timer > 0 ? `${timer} seconds` : 'OTP expired' }) }) }));
|
|
11
|
-
case 'valid':
|
|
12
|
-
return (_jsx(View, { style: { height: isIphoneX() ? 80 : 70, width: '100%', justifyContent: 'center', marginBottom: Platform.OS === 'ios' ? 14 : 0 }, children: _jsx(LinearGradient, { colors: ['#44cfb9', '#1EC2C9'], style: { flex: 1, alignItems: 'center', justifyContent: 'center' }, start: { x: 0, y: 0 }, end: { x: 1, y: 0 }, children: _jsx(Text, { style: { textAlign: 'center', fontSize: 15, color: '#fff', textTransform: 'uppercase' }, children: _jsx(OkayIcon, {}) }) }) }));
|
|
13
|
-
case 'invalid':
|
|
14
|
-
return (_jsx(View, { style: { height: isIphoneX() ? 80 : 70, width: '100%', justifyContent: 'center', marginBottom: Platform.OS === 'ios' ? 14 : 0 }, children: _jsx(LinearGradient, { colors: ['#F3698B', '#F18A8A'], style: { flex: 1, alignItems: 'center', justifyContent: 'center' }, start: { x: 0, y: 0 }, end: { x: 1, y: 0 }, children: _jsx(Text, { style: { textAlign: 'center', fontSize: 15, color: '#fff', textTransform: 'uppercase' }, children: _jsx(CrossIcon, {}) }) }) }));
|
|
15
|
-
case 'loading':
|
|
16
|
-
return (_jsx(View, { style: { height: isIphoneX() ? 80 : 70, width: '100%', justifyContent: 'center', marginBottom: Platform.OS === 'ios' ? 14 : 0 }, children: _jsx(LinearGradient, { colors: ['#b0bbbd', '#b0bbbd'], style: { flex: 1, alignItems: 'center', justifyContent: 'center' }, start: { x: 0, y: 0 }, end: { x: 1, y: 0 }, children: _jsx(View, { style: { alignItems: 'center' }, children: _jsx(ActivityIndicator, { color: 'black' }) }) }) }));
|
|
17
|
-
default:
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
export { OTPStatusLabel };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
2
|
-
import { axiosClient } from "../../../api/axiosClient";
|
|
3
|
-
import { defaultPolicy } from "../../../constants/defaultPolicy";
|
|
4
|
-
const usePasswordCriteria = ({ email, password, onCriteriaChange, onMaxLengthChange }) => {
|
|
5
|
-
const { maxLength: defaultMaxLength, ...restDefaultPolicy } = defaultPolicy;
|
|
6
|
-
const [loading, setLoading] = useState(false);
|
|
7
|
-
const [passwordPolicy, setPasswordPolicy] = useState(restDefaultPolicy);
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
if (!email) {
|
|
10
|
-
setPasswordPolicy(restDefaultPolicy);
|
|
11
|
-
onMaxLengthChange(defaultMaxLength);
|
|
12
|
-
setLoading(false);
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
return getPasswordPolicy();
|
|
16
|
-
}, [email]);
|
|
17
|
-
const getPasswordPolicy = () => {
|
|
18
|
-
let isActive = true;
|
|
19
|
-
if (email) {
|
|
20
|
-
setPasswordPolicy(restDefaultPolicy);
|
|
21
|
-
onMaxLengthChange(defaultMaxLength);
|
|
22
|
-
setLoading(true);
|
|
23
|
-
axiosClient({
|
|
24
|
-
url: `/auth/password-policy?email=${encodeURIComponent(email)}`,
|
|
25
|
-
method: 'GET',
|
|
26
|
-
}).then(({ data }) => {
|
|
27
|
-
if (!isActive)
|
|
28
|
-
return;
|
|
29
|
-
const { maxLength, ...rest } = (data || {});
|
|
30
|
-
// Apply server-provided policy when present, falling back to defaults
|
|
31
|
-
setPasswordPolicy({
|
|
32
|
-
minLength: typeof rest.minLength === 'number' ? rest.minLength : restDefaultPolicy.minLength,
|
|
33
|
-
numbers: typeof rest.numbers === 'boolean' ? rest.numbers : restDefaultPolicy.numbers,
|
|
34
|
-
uppercase: typeof rest.uppercase === 'boolean' ? rest.uppercase : restDefaultPolicy.uppercase,
|
|
35
|
-
lowercase: typeof rest.lowercase === 'boolean' ? rest.lowercase : restDefaultPolicy.lowercase,
|
|
36
|
-
specialCharacters: typeof rest.specialCharacters === 'boolean' ? rest.specialCharacters : restDefaultPolicy.specialCharacters,
|
|
37
|
-
});
|
|
38
|
-
onMaxLengthChange(typeof maxLength === 'number' ? maxLength : defaultMaxLength);
|
|
39
|
-
}).catch(err => {
|
|
40
|
-
if (!isActive)
|
|
41
|
-
return;
|
|
42
|
-
console.warn('password-policy fetch failed', err);
|
|
43
|
-
setPasswordPolicy(restDefaultPolicy);
|
|
44
|
-
onMaxLengthChange(defaultMaxLength);
|
|
45
|
-
}).finally(() => isActive && setLoading(false));
|
|
46
|
-
}
|
|
47
|
-
return () => { isActive = false; };
|
|
48
|
-
};
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
onCriteriaChange({
|
|
51
|
-
minLength: password.length >= passwordPolicy.minLength,
|
|
52
|
-
specialCharacters: passwordPolicy.specialCharacters ? /[!@#$%^&*(),.?":{}|<>]/.test(password) : true,
|
|
53
|
-
numbers: passwordPolicy.numbers ? /\d/.test(password) : true,
|
|
54
|
-
uppercase: passwordPolicy.uppercase ? /[A-Z]/.test(password) : true,
|
|
55
|
-
lowercase: passwordPolicy.lowercase ? /[a-z]/.test(password) : true,
|
|
56
|
-
});
|
|
57
|
-
}, [password, passwordPolicy]);
|
|
58
|
-
const renderLabel = (criteria) => {
|
|
59
|
-
switch (criteria) {
|
|
60
|
-
case 'minLength': return `min ${passwordPolicy.minLength} characters`;
|
|
61
|
-
case 'specialCharacters': return 'special character';
|
|
62
|
-
default: return criteria;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
return {
|
|
66
|
-
loading,
|
|
67
|
-
passwordPolicy,
|
|
68
|
-
renderLabel,
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
export { usePasswordCriteria };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useId, useMemo } from "react";
|
|
3
|
-
import { usePasswordCriteria } from "./hooks/usePasswordCriteria";
|
|
4
|
-
import { Check, X } from "lucide-react";
|
|
5
|
-
const PasswordCriteria = ({ email, password, criteria, onCriteriaChange, onMaxLengthChange }) => {
|
|
6
|
-
const id = useId();
|
|
7
|
-
const { passwordPolicy, renderLabel, } = usePasswordCriteria({ email, password, onCriteriaChange, onMaxLengthChange });
|
|
8
|
-
const activeRequirementKeys = useMemo(() => {
|
|
9
|
-
// Include minLength always; include other flags only if enabled by policy
|
|
10
|
-
return Object.keys(passwordPolicy).filter((key) => {
|
|
11
|
-
if (key === "minLength")
|
|
12
|
-
return true;
|
|
13
|
-
// @ts-ignore boolean flags present on policy
|
|
14
|
-
return Boolean(passwordPolicy[key]);
|
|
15
|
-
});
|
|
16
|
-
}, [passwordPolicy]);
|
|
17
|
-
const strengthScore = useMemo(() => {
|
|
18
|
-
return activeRequirementKeys.reduce((acc, key) => acc + (criteria[key] ? 1 : 0), 0);
|
|
19
|
-
}, [activeRequirementKeys, criteria]);
|
|
20
|
-
const maxScore = activeRequirementKeys.length || 1;
|
|
21
|
-
const getStrengthColor = (score) => {
|
|
22
|
-
const ratio = score / maxScore;
|
|
23
|
-
if (score === 0)
|
|
24
|
-
return "bg-border";
|
|
25
|
-
if (ratio < 0.4)
|
|
26
|
-
return "bg-red-500";
|
|
27
|
-
if (ratio < 0.7)
|
|
28
|
-
return "bg-orange-500";
|
|
29
|
-
if (ratio < 1)
|
|
30
|
-
return "bg-amber-500";
|
|
31
|
-
return "bg-emerald-500";
|
|
32
|
-
};
|
|
33
|
-
const getStrengthText = (score) => {
|
|
34
|
-
if (score === 0)
|
|
35
|
-
return "Enter a password";
|
|
36
|
-
const ratio = score / maxScore;
|
|
37
|
-
if (ratio < 0.4)
|
|
38
|
-
return "Weak password";
|
|
39
|
-
if (ratio < 0.8)
|
|
40
|
-
return "Medium password";
|
|
41
|
-
return "Strong password";
|
|
42
|
-
};
|
|
43
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "h-1 w-full overflow-hidden rounded-full bg-border", role: "progressbar", "aria-valuenow": strengthScore, "aria-valuemin": 0, "aria-valuemax": maxScore, "aria-label": "Password strength", children: _jsx("div", { className: `h-full ${getStrengthColor(strengthScore)} transition-all duration-500 ease-out`, style: { width: `${(strengthScore / maxScore) * 100}%` } }) }), _jsxs("p", { id: `${id}-description`, className: "mt-2 text-sm font-medium text-foreground", children: [getStrengthText(strengthScore), ". Must contain:"] }), _jsx("ul", { className: "mt-2 space-y-1.5", "aria-label": "Password requirements", children: activeRequirementKeys.map((req, index) => (_jsxs("li", { className: "flex items-center gap-2", children: [criteria[req]
|
|
44
|
-
? _jsx(Check, { size: 16, className: "text-emerald-500", "aria-hidden": "true" })
|
|
45
|
-
: _jsx(X, { size: 16, className: "text-muted-foreground/80", "aria-hidden": "true" }), _jsxs("span", { className: `text-xs ${criteria[req] ? "text-emerald-600" : "text-muted-foreground"}`, children: [renderLabel(req), _jsx("span", { className: "sr-only", children: criteria[req] ? " - Requirement met" : " - Requirement not met" })] })] }, index))) })] }));
|
|
46
|
-
};
|
|
47
|
-
export { PasswordCriteria };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { LoadingPlaceholder, Colors } from '@truworth/twc-rn-common';
|
|
3
|
-
import { Text, View } from 'react-native';
|
|
4
|
-
import { usePasswordCriteria } from './hooks/usePasswordCriteria';
|
|
5
|
-
const { gray, utility } = Colors;
|
|
6
|
-
const PasswordCriteria = ({ email, password, criteria, onCriteriaChange, onMaxLengthChange }) => {
|
|
7
|
-
const { loading, passwordPolicy, renderLabel, } = usePasswordCriteria({ email, password, onCriteriaChange, onMaxLengthChange });
|
|
8
|
-
const getCriteriaColor = (isValid) => (isValid ? utility.success_main : gray.gray_600);
|
|
9
|
-
const getCriteriaBackground = (isValid) => (isValid ? utility.success_bg : gray.gray_100);
|
|
10
|
-
return (_jsx(View, { style: { flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', alignContent: 'space-between', marginTop: 8 }, children: Object.keys(passwordPolicy).map((item, index) => (loading
|
|
11
|
-
? _jsx(LoadingPlaceholder, { height: 24, width: renderLabel(item).length * 8, borderRadius: 12, containerStyle: { marginRight: 8, marginTop: 8 } }, index)
|
|
12
|
-
:
|
|
13
|
-
_jsx(View, { style: {
|
|
14
|
-
marginRight: 8, marginTop: 8, borderRadius: 32,
|
|
15
|
-
paddingVertical: 4, paddingHorizontal: 12,
|
|
16
|
-
backgroundColor: getCriteriaBackground(Boolean(criteria[item])),
|
|
17
|
-
}, children: _jsx(Text, { style: {
|
|
18
|
-
fontSize: 12, fontWeight: '500',
|
|
19
|
-
color: getCriteriaColor(Boolean(criteria[item])),
|
|
20
|
-
}, children: renderLabel(item) }) }, index))) }));
|
|
21
|
-
};
|
|
22
|
-
export { PasswordCriteria };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Typography } from "@truworth/twc-web-design";
|
|
3
|
-
import { AdvancedTransitionWrapper } from "../AdvancedTransitionWrapper";
|
|
4
|
-
import { ArrowLeft } from "lucide-react";
|
|
5
|
-
const ScreenLayout = ({ children, title, subTitle, buttonProps, onPressBack }) => {
|
|
6
|
-
return (_jsxs(AdvancedTransitionWrapper, { type: 'slide', duration: 0.5, children: [onPressBack &&
|
|
7
|
-
_jsx(Button, { label: "Back", size: "large", variant: "link", leftIcon: _jsx(ArrowLeft, {}), className: "p-0 h-auto", onClick: onPressBack }), Boolean(title) &&
|
|
8
|
-
_jsx(Typography, { type: 'heading', size: 'h5', className: 'mb-2 mt-6', children: title }), Boolean(subTitle) &&
|
|
9
|
-
_jsx(Typography, { type: 'body', size: 'large', className: "md:mb-8 mb-6 text-gray-400", children: subTitle }), children, Boolean(buttonProps) &&
|
|
10
|
-
_jsx(Button, { label: "Continue", isFullWidth: true, variant: 'primary', className: "mt-3", ...buttonProps })] }));
|
|
11
|
-
};
|
|
12
|
-
export { ScreenLayout };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { View, Text } from 'react-native';
|
|
3
|
-
import { Colors, Header, RoundedButton } from '@truworth/twc-rn-common';
|
|
4
|
-
const { gray } = Colors;
|
|
5
|
-
const ScreenLayout = ({ children, headerTitle, title, subTitle, hideHeader, buttonProps, containerStyle, accessoryRight }) => {
|
|
6
|
-
return (_jsxs(_Fragment, { children: [!hideHeader &&
|
|
7
|
-
_jsx(Header, { title: headerTitle, accessoryRight: accessoryRight }), _jsxs(View, { style: [{ paddingVertical: 32, paddingHorizontal: 16 }, containerStyle], children: [Boolean(title) &&
|
|
8
|
-
_jsx(Text, { textBreakStrategy: 'simple', style: {
|
|
9
|
-
fontSize: 20, fontWeight: '600', color: gray.gray_900,
|
|
10
|
-
lineHeight: 32, marginBottom: 32,
|
|
11
|
-
}, children: title }), Boolean(subTitle) &&
|
|
12
|
-
_jsx(Text, { textBreakStrategy: 'simple', style: {
|
|
13
|
-
fontSize: 14, fontWeight: '500', color: gray.gray_400,
|
|
14
|
-
lineHeight: 20, marginTop: -24, marginBottom: 32,
|
|
15
|
-
}, children: subTitle }), children, Boolean(buttonProps) &&
|
|
16
|
-
_jsx(RoundedButton, { containerStyle: { marginTop: 32 }, type: buttonProps?.type ?? 'secondary', size: buttonProps?.size ?? 'large', ...buttonProps })] })] }));
|
|
17
|
-
};
|
|
18
|
-
export { ScreenLayout };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CircleHelpIcon } from 'lucide-react';
|
|
3
|
-
import { Flex, Typography } from "@truworth/twc-web-design";
|
|
4
|
-
import { useAuthPackageContext } from "../../hooks/internal/useAuthPackageContext";
|
|
5
|
-
const SupportDetails = () => {
|
|
6
|
-
const { appConfig } = useAuthPackageContext();
|
|
7
|
-
return (_jsxs(Flex, { padding: "sm", className: 'rounded-lg bg-gray-100 md:mt-8 mt-6 gap-3', children: [_jsx(CircleHelpIcon, { size: 20, className: "min-w-5 text-primary" }), _jsxs(Typography, { type: "body", size: "small", children: ["For any customer support\u2013related queries, please write to us at", _jsx("a", { href: `mailto:${appConfig.supportEmail}`, className: "text-primary block", children: _jsx("u", { children: appConfig.supportEmail }) })] })] }));
|
|
8
|
-
};
|
|
9
|
-
export { SupportDetails };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Flex, OTPInput, Typography } from "@truworth/twc-web-design";
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
|
-
const VerifyEmailOTP = ({ validateOTP, resendOTP, resendOTPCounter, email, status }) => {
|
|
5
|
-
const [otp, setOtp] = useState('');
|
|
6
|
-
const [otpError, setOtpError] = useState(false);
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
if (status === 'invalid') {
|
|
9
|
-
setOtpError(true);
|
|
10
|
-
setOtp('');
|
|
11
|
-
}
|
|
12
|
-
}, [status]);
|
|
13
|
-
return (_jsxs(_Fragment, { children: [_jsx(Typography, { type: "body", size: "large", color: "text-gray-400 text-center", children: "OTP sent to" }), _jsx(Typography, { type: "body", size: "large", color: "text-secondary-dark mb-6 text-center", children: email }), _jsx(OTPInput, { value: otp, onChange: (code) => {
|
|
14
|
-
setOtp(code);
|
|
15
|
-
setOtpError(false);
|
|
16
|
-
}, error: otpError, maxLength: 6, className: `!w-auto ${'!border-destructive'}` }), otpError &&
|
|
17
|
-
_jsx(Typography, { type: "utility", size: "medium", className: "mt-1", color: "text-utility-danger-main", children: "Please enter the correct OTP." }), (resendOTPCounter < 3) &&
|
|
18
|
-
_jsxs(Flex, { align: "center", justify: "between", className: 'mt-7', children: [_jsx(Typography, { type: "body", size: "medium", className: "font-semibold", color: "text-gray-400", children: "Didn't receive OTP?" }), _jsx(Button, { variant: 'link', size: 'small', className: "p-0 h-auto", onClick: resendOTP, children: "Resend Code" })] }), _jsx(Button, { label: "Continue", isFullWidth: true, variant: 'primary', className: "mt-7", onClick: () => validateOTP?.(otp), disabled: (otp?.length ?? 0) < 6 })] }));
|
|
19
|
-
};
|
|
20
|
-
export { VerifyEmailOTP };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Dimensions, Platform, ScrollView, Text, TouchableOpacity, View } from "react-native";
|
|
3
|
-
import { Layout } from "@ui-kitten/components";
|
|
4
|
-
import { Header, Colors, CustomKeyboardAvoidingView } from "@truworth/twc-rn-common";
|
|
5
|
-
import { OTPStatusLabel } from "../OTPStatusLabel/index.native";
|
|
6
|
-
import OTPInputView from "@twotalltotems/react-native-otp-input";
|
|
7
|
-
const { gray } = Colors;
|
|
8
|
-
const VerifyEmailOTP = ({ email, status, validateOTP, resendOTP, resendOTPCounter }) => {
|
|
9
|
-
return (_jsxs(Layout, { style: { flex: 1, backgroundColor: '#FFFFFF' }, children: [_jsx(Header, {}), _jsxs(CustomKeyboardAvoidingView, { behavior: Platform.OS === 'ios' ? 'padding' : undefined, keyboardVerticalOffset: 0, children: [_jsxs(ScrollView, { style: { paddingHorizontal: 20, paddingTop: 32, flex: 1 }, showsVerticalScrollIndicator: false, children: [_jsxs(Text, { textBreakStrategy: 'simple', style: {
|
|
10
|
-
fontSize: 20, fontWeight: '600', color: gray.gray_900,
|
|
11
|
-
lineHeight: 32, marginBottom: 32,
|
|
12
|
-
}, children: ["OTP sent to ", '\n', email] }), _jsx(View, { style: { justifyContent: 'center', flexDirection: 'row', marginBottom: 30, position: 'relative' }, children: _jsx(OTPInputView, { pinCount: 6, autoFocusOnLoad: false, codeInputFieldStyle: {
|
|
13
|
-
fontSize: 20, color: 'black',
|
|
14
|
-
height: 45, width: 30,
|
|
15
|
-
borderWidth: 0, borderBottomWidth: 1,
|
|
16
|
-
}, codeInputHighlightStyle: { borderColor: '#03DAC6' }, style: {
|
|
17
|
-
height: 50,
|
|
18
|
-
width: Dimensions.get('window').width - 100,
|
|
19
|
-
}, onCodeFilled: code => validateOTP(code) }) }), resendOTPCounter < 3 &&
|
|
20
|
-
_jsxs(View, { style: { flexDirection: 'row', alignItems: 'center' }, children: [_jsxs(Text, { style: { fontSize: 14, fontWeight: '500', color: gray.gray_400, lineHeight: 20 }, children: ["Did not receive OTP?", ' '] }), _jsx(TouchableOpacity, { activeOpacity: 0.8, onPress: resendOTP, children: _jsx(Text, { style: { fontSize: 14, fontWeight: '500', color: '#2cbaa4', lineHeight: 20 }, children: "Re-send OTP" }) })] })] }), _jsx(View, { style: { alignSelf: 'flex-end', width: '100%' }, children: _jsx(OTPStatusLabel, { status: status }) })] })] }));
|
|
21
|
-
};
|
|
22
|
-
export { VerifyEmailOTP };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect } from "react";
|
|
3
|
-
import { Button, Flex, OTPInput, Typography } from "@truworth/twc-web-design";
|
|
4
|
-
const VerifyMobileOTP = ({ validateOTP, timer, resendOTP, phone, status }) => {
|
|
5
|
-
const [otp, setOtp] = useState('');
|
|
6
|
-
const [otpError, setOtpError] = useState(false);
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
if (status === 'invalid') {
|
|
9
|
-
setOtpError(true);
|
|
10
|
-
setOtp('');
|
|
11
|
-
}
|
|
12
|
-
}, [status]);
|
|
13
|
-
return (_jsxs(_Fragment, { children: [_jsxs(Typography, { type: 'body', size: 'large', className: 'mb-6 text-gray-400 text-center', children: ["OTP sent to", _jsx("span", { className: 'pl-2 text-secondary-dark', children: phone ? `XXXXXXX${phone.slice(-3)}` : 'your registered mobile number' })] }), _jsx(OTPInput, { value: otp, onChange: (code) => {
|
|
14
|
-
setOtp(code);
|
|
15
|
-
setOtpError(false);
|
|
16
|
-
}, error: otpError, maxLength: 6, className: `!w-auto ${otpError ? '!border-destructive' : ''}` }), otpError &&
|
|
17
|
-
_jsx(Typography, { type: "utility", size: "medium", className: "mt-4", color: "text-utility-danger-main", children: "Please enter the correct OTP." }), timer <= 0 ?
|
|
18
|
-
_jsxs(Flex, { justify: 'between', align: 'center', className: 'mt-4', children: [_jsx(Typography, { type: 'utility', size: 'medium', children: "Didn't receive OTP?" }), _jsx(Button, { label: 'Re-send OTP', size: 'small', variant: 'link', onClick: () => {
|
|
19
|
-
setOtp('');
|
|
20
|
-
resendOTP();
|
|
21
|
-
} })] })
|
|
22
|
-
:
|
|
23
|
-
_jsxs(Typography, { type: 'utility', size: 'medium', className: 'mt-3', children: ["Resend Code in ", timer, " seconds"] }), _jsx(Button, { label: "Continue", isFullWidth: true, onClick: () => validateOTP?.(otp), disabled: otp ? otp?.length < 6 : true, className: "mt-6" })] }));
|
|
24
|
-
};
|
|
25
|
-
export { VerifyMobileOTP };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
import { Colors, CustomKeyboardAvoidingView, Header } from '@truworth/twc-rn-common';
|
|
4
|
-
import { Layout } from '@ui-kitten/components';
|
|
5
|
-
import { Dimensions, Platform, ScrollView, Text, TouchableOpacity, View, } from 'react-native';
|
|
6
|
-
import { useAuthPackageContext } from '../../hooks/internal/useAuthPackageContext';
|
|
7
|
-
import { OTPStatusLabel } from '../OTPStatusLabel/index.native';
|
|
8
|
-
import OTPInputView from '@twotalltotems/react-native-otp-input';
|
|
9
|
-
const { gray } = Colors;
|
|
10
|
-
const VerifyMobileOTP = ({ validateOTP, timer, status, resendOTP, phone }) => {
|
|
11
|
-
const [otp, setOtp] = useState('');
|
|
12
|
-
const { otpValue } = useAuthPackageContext();
|
|
13
|
-
useEffect(() => {
|
|
14
|
-
if (otp && otp.length == 6) {
|
|
15
|
-
return validateOTP(otp);
|
|
16
|
-
}
|
|
17
|
-
}, [otp]);
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
if (otpValue && otpValue.length == 6) {
|
|
20
|
-
setOtp(otpValue);
|
|
21
|
-
}
|
|
22
|
-
}, [otpValue]);
|
|
23
|
-
return (_jsxs(Layout, { style: { flex: 1, backgroundColor: '#FFFFFF' }, children: [_jsx(Header, {}), _jsxs(CustomKeyboardAvoidingView, { behavior: Platform.OS === 'ios' ? 'padding' : undefined, keyboardVerticalOffset: 0, children: [_jsxs(ScrollView, { style: { paddingHorizontal: 20, paddingTop: 32, flex: 1 }, children: [_jsxs(Text, { textBreakStrategy: 'simple', style: {
|
|
24
|
-
fontSize: 20, fontWeight: '600', color: gray.gray_900,
|
|
25
|
-
lineHeight: 32, marginBottom: 32,
|
|
26
|
-
}, children: ["OTP sent to ", '\n', phone ? phone.replace(/\d(?=\d{4})/g, 'x') : ''] }), _jsx(View, { style: { justifyContent: 'center', flexDirection: 'row', marginBottom: 30, position: 'relative' }, children: _jsx(OTPInputView, { pinCount: 6, autoFocusOnLoad: false, onCodeChanged: text => setOtp(text), codeInputFieldStyle: {
|
|
27
|
-
fontSize: 20, color: 'black', width: 30,
|
|
28
|
-
height: 45, borderWidth: 0, borderBottomWidth: 1,
|
|
29
|
-
}, codeInputHighlightStyle: { borderColor: '#03DAC6' }, style: {
|
|
30
|
-
height: 50,
|
|
31
|
-
width: Dimensions.get('window').width - 100,
|
|
32
|
-
}, code: otp ?? '', onCodeFilled: code => setOtp(code) }) }), timer <= 0 &&
|
|
33
|
-
_jsxs(View, { style: { flexDirection: 'row', alignItems: 'center' }, children: [_jsx(Text, { style: { fontSize: 12, color: '#000', fontWeight: '400', opacity: 0.5 }, children: "Did not receive OTP?" }), _jsx(TouchableOpacity, { disabled: timer > 0, onPress: () => {
|
|
34
|
-
setOtp('');
|
|
35
|
-
resendOTP();
|
|
36
|
-
}, children: _jsx(Text, { style: { fontSize: 14, color: '#2cbaa4', fontWeight: '400', opacity: 1 }, children: "Re-send OTP" }) })] })] }), _jsx(View, { style: { width: '100%' }, children: _jsx(OTPStatusLabel, { status: status, timer: timer }) })] })] }));
|
|
37
|
-
};
|
|
38
|
-
export { VerifyMobileOTP };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const BASE_URL = process.env.BASE_URL;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export const strongPasswordRequirements = [
|
|
2
|
-
{ regex: /.{6,}/, text: "At least 6 characters" },
|
|
3
|
-
{ regex: /[0-9]/, text: "At least 1 number" },
|
|
4
|
-
{ regex: /[a-z]/, text: "At least 1 lowercase letter" },
|
|
5
|
-
{ regex: /[A-Z]/, text: "At least 1 uppercase letter" },
|
|
6
|
-
{ regex: /[!@#$%^&*()_+]/, text: "At least 1 special character" }
|
|
7
|
-
];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SocialLoginsEnum } from "../enums";
|
|
2
|
-
const socialLoginOptions = [
|
|
3
|
-
{
|
|
4
|
-
type: SocialLoginsEnum.Google,
|
|
5
|
-
iconImageUrl: `https://cdn-thewellnesscorner.s3.amazonaws.com/twc-web-images/template/google-icon.png`,
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
type: SocialLoginsEnum.Facebook,
|
|
9
|
-
iconImageUrl: `https://cdn-thewellnesscorner.s3.amazonaws.com/twc-web-images/template/facebook-icon.png`,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
type: SocialLoginsEnum.Apple,
|
|
13
|
-
iconImageUrl: `https://cdn-thewellnesscorner.s3.amazonaws.com/twc-web-images/template/apple-icon.png`,
|
|
14
|
-
}
|
|
15
|
-
];
|
|
16
|
-
export { socialLoginOptions };
|