@kiosinc/commons-rn 0.1.84 → 0.1.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/api/authentication.js.map +1 -0
- package/lib/commonjs/api/customer.js.map +1 -1
- package/lib/commonjs/assets/icons/alert.svg +4 -0
- package/lib/commonjs/components/Alert.js +1 -1
- package/lib/commonjs/components/Alert.js.map +1 -1
- package/lib/commonjs/components/DelayedRender.js +4 -2
- package/lib/commonjs/components/DelayedRender.js.map +1 -1
- package/lib/commonjs/components/SelectionDialog.js +1 -1
- package/lib/commonjs/components/SelectionDialog.js.map +1 -1
- package/lib/commonjs/components/Snackbar.js +1 -1
- package/lib/commonjs/components/Snackbar.js.map +1 -1
- package/lib/commonjs/helpers/index.js +13 -0
- package/lib/commonjs/helpers/index.js.map +1 -0
- package/lib/commonjs/hooks/index.js +69 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/queryKeys.js.map +1 -0
- package/lib/commonjs/hooks/useAppVersionCheck.js +9 -5
- package/lib/commonjs/hooks/useAppVersionCheck.js.map +1 -1
- package/lib/commonjs/{auth/hooks/useAuthentication.js → hooks/useAuth.js} +18 -18
- package/lib/commonjs/hooks/useAuth.js.map +1 -0
- package/lib/commonjs/{auth/hooks → hooks}/useAuthenticateRequests.js +1 -1
- package/lib/commonjs/hooks/useAuthenticateRequests.js.map +1 -0
- package/lib/commonjs/hooks/useBusinesses.js.map +1 -0
- package/lib/commonjs/{selectBusiness → hooks}/useCreateBusiness.js +1 -1
- package/lib/commonjs/hooks/useCreateBusiness.js.map +1 -0
- package/lib/commonjs/hooks/useCustomer.js +1 -1
- package/lib/commonjs/hooks/useCustomer.js.map +1 -1
- package/lib/commonjs/{auth/hooks → hooks}/useDeactivateAccount.js +3 -3
- package/lib/commonjs/hooks/useDeactivateAccount.js.map +1 -0
- package/lib/commonjs/{auth/hooks → hooks}/useLogout.js +3 -3
- package/lib/commonjs/hooks/useLogout.js.map +1 -0
- package/lib/commonjs/{auth/hooks → hooks}/useTermsOfService.js +4 -5
- package/lib/commonjs/hooks/useTermsOfService.js.map +1 -0
- package/lib/commonjs/index.js +50 -97
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/localization/index.js +12 -0
- package/lib/commonjs/localization/index.js.map +1 -0
- package/lib/commonjs/localization/translations/en.json +87 -0
- package/lib/commonjs/providers/authentication/AuthenticationProvider.js.map +1 -0
- package/lib/commonjs/providers/authentication/actions/authentication.actions.js.map +1 -0
- package/lib/commonjs/providers/authentication/reducer/authentication.reducer.js.map +1 -0
- package/lib/commonjs/providers/authentication/types/authentication.types.js.map +1 -0
- package/lib/commonjs/providers/index.js +32 -0
- package/lib/commonjs/providers/index.js.map +1 -0
- package/lib/commonjs/{auth/screens → screens/Auth}/ChangePassword.js +9 -9
- package/lib/commonjs/{auth/screens → screens/Auth}/ChangePassword.js.map +1 -1
- package/lib/commonjs/{auth/screens → screens/Auth}/Login.js +2 -2
- package/lib/commonjs/{auth/screens → screens/Auth}/Login.js.map +1 -1
- package/lib/commonjs/{auth/screens → screens/Auth}/LoginWithEmail.js +7 -7
- package/lib/commonjs/{auth/screens → screens/Auth}/LoginWithEmail.js.map +1 -1
- package/lib/commonjs/{auth/screens → screens/Auth}/LoginWithPhoneNumber.js +5 -5
- package/lib/commonjs/screens/Auth/LoginWithPhoneNumber.js.map +1 -0
- package/lib/commonjs/{auth/screens → screens/Auth}/ResetPassword.js +41 -9
- package/lib/commonjs/screens/Auth/ResetPassword.js.map +1 -0
- package/lib/commonjs/{auth/screens → screens/Auth}/ResetPasswordInstructionsSent.js +2 -2
- package/lib/commonjs/{auth/screens → screens/Auth}/ResetPasswordInstructionsSent.js.map +1 -1
- package/lib/commonjs/{auth/screens → screens/Auth}/SignUp.js +12 -13
- package/lib/commonjs/screens/Auth/SignUp.js.map +1 -0
- package/lib/commonjs/{auth/screens → screens/Auth}/SignUpPassword.js +7 -7
- package/lib/commonjs/screens/Auth/SignUpPassword.js.map +1 -0
- package/lib/commonjs/{auth/screens → screens/Auth}/VerifyPhoneNumber.js +6 -6
- package/lib/commonjs/screens/Auth/VerifyPhoneNumber.js.map +1 -0
- package/lib/commonjs/{auth/screens → screens/Auth}/VerifyPhoneNumberForLogin.js +6 -6
- package/lib/commonjs/screens/Auth/VerifyPhoneNumberForLogin.js.map +1 -0
- package/lib/commonjs/{auth/screens/index.js → screens/Auth/navigators.js} +1 -1
- package/lib/commonjs/screens/Auth/navigators.js.map +1 -0
- package/lib/commonjs/{auth/screens → screens/Auth}/validators.js +7 -7
- package/lib/commonjs/screens/Auth/validators.js.map +1 -0
- package/lib/commonjs/screens/SavedCards/CardRow.js +4 -4
- package/lib/commonjs/screens/SavedCards/CardRow.js.map +1 -1
- package/lib/commonjs/screens/SavedCards/SavedCards.js +5 -5
- package/lib/commonjs/screens/SavedCards/SavedCards.js.map +1 -1
- package/lib/commonjs/{selectBusiness → screens/SelectBusiness}/CreateBusinessBottomSheet.js +7 -7
- package/lib/commonjs/screens/SelectBusiness/CreateBusinessBottomSheet.js.map +1 -0
- package/lib/commonjs/{selectBusiness → screens/SelectBusiness}/SelectBusiness.js +12 -13
- package/lib/commonjs/screens/SelectBusiness/SelectBusiness.js.map +1 -0
- package/lib/commonjs/{auth/screens → screens/TermsOfService}/TermsOfService.js +9 -9
- package/lib/commonjs/screens/TermsOfService/TermsOfService.js.map +1 -0
- package/lib/commonjs/screens/index.js +40 -0
- package/lib/commonjs/screens/index.js.map +1 -0
- package/lib/commonjs/utils/index.js +34 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/api/authentication.js.map +1 -0
- package/lib/module/api/customer.js.map +1 -1
- package/lib/module/assets/icons/alert.svg +4 -0
- package/lib/module/components/Alert.js +1 -1
- package/lib/module/components/Alert.js.map +1 -1
- package/lib/module/components/DelayedRender.js +2 -2
- package/lib/module/components/DelayedRender.js.map +1 -1
- package/lib/module/components/SelectionDialog.js +1 -1
- package/lib/module/components/SelectionDialog.js.map +1 -1
- package/lib/module/components/Snackbar.js +1 -1
- package/lib/module/components/Snackbar.js.map +1 -1
- package/lib/module/helpers/index.js +2 -0
- package/lib/module/helpers/index.js.map +1 -0
- package/lib/module/hooks/index.js +10 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/queryKeys.js.map +1 -0
- package/lib/module/hooks/useAppVersionCheck.js +9 -5
- package/lib/module/hooks/useAppVersionCheck.js.map +1 -1
- package/lib/module/{auth/hooks/useAuthentication.js → hooks/useAuth.js} +10 -10
- package/lib/module/hooks/useAuth.js.map +1 -0
- package/lib/module/{auth/hooks → hooks}/useAuthenticateRequests.js +1 -1
- package/lib/module/hooks/useAuthenticateRequests.js.map +1 -0
- package/lib/module/hooks/useBusinesses.js.map +1 -0
- package/lib/module/{selectBusiness → hooks}/useCreateBusiness.js +1 -1
- package/lib/module/hooks/useCreateBusiness.js.map +1 -0
- package/lib/module/hooks/useCustomer.js +1 -1
- package/lib/module/hooks/useCustomer.js.map +1 -1
- package/lib/module/{auth/hooks → hooks}/useDeactivateAccount.js +3 -3
- package/lib/module/hooks/useDeactivateAccount.js.map +1 -0
- package/lib/module/{auth/hooks → hooks}/useLogout.js +2 -2
- package/lib/module/hooks/useLogout.js.map +1 -0
- package/lib/module/{auth/hooks → hooks}/useTermsOfService.js +4 -4
- package/lib/module/hooks/useTermsOfService.js.map +1 -0
- package/lib/module/index.js +6 -11
- package/lib/module/index.js.map +1 -1
- package/lib/module/localization/index.js +5 -0
- package/lib/module/localization/index.js.map +1 -0
- package/lib/module/localization/translations/en.json +87 -0
- package/lib/module/providers/authentication/AuthenticationProvider.js.map +1 -0
- package/lib/module/providers/authentication/actions/authentication.actions.js.map +1 -0
- package/lib/module/providers/authentication/reducer/authentication.reducer.js.map +1 -0
- package/lib/module/providers/authentication/types/authentication.types.js.map +1 -0
- package/lib/module/providers/index.js +3 -0
- package/lib/module/providers/index.js.map +1 -0
- package/lib/module/{auth/screens → screens/Auth}/ChangePassword.js +9 -9
- package/lib/module/{auth/screens → screens/Auth}/ChangePassword.js.map +1 -1
- package/lib/module/{auth/screens → screens/Auth}/Login.js +2 -2
- package/lib/module/{auth/screens → screens/Auth}/Login.js.map +1 -1
- package/lib/module/{auth/screens → screens/Auth}/LoginWithEmail.js +7 -7
- package/lib/module/{auth/screens → screens/Auth}/LoginWithEmail.js.map +1 -1
- package/lib/module/{auth/screens → screens/Auth}/LoginWithPhoneNumber.js +5 -5
- package/lib/module/screens/Auth/LoginWithPhoneNumber.js.map +1 -0
- package/lib/module/{auth/screens → screens/Auth}/ResetPassword.js +43 -11
- package/lib/module/screens/Auth/ResetPassword.js.map +1 -0
- package/lib/module/{auth/screens → screens/Auth}/ResetPasswordInstructionsSent.js +2 -2
- package/lib/module/{auth/screens → screens/Auth}/ResetPasswordInstructionsSent.js.map +1 -1
- package/lib/module/{auth/screens → screens/Auth}/SignUp.js +11 -12
- package/lib/module/screens/Auth/SignUp.js.map +1 -0
- package/lib/module/{auth/screens → screens/Auth}/SignUpPassword.js +7 -7
- package/lib/module/screens/Auth/SignUpPassword.js.map +1 -0
- package/lib/module/{auth/screens → screens/Auth}/VerifyPhoneNumber.js +6 -6
- package/lib/module/screens/Auth/VerifyPhoneNumber.js.map +1 -0
- package/lib/module/{auth/screens → screens/Auth}/VerifyPhoneNumberForLogin.js +6 -6
- package/lib/module/screens/Auth/VerifyPhoneNumberForLogin.js.map +1 -0
- package/lib/module/{auth/screens/index.js → screens/Auth/navigators.js} +1 -1
- package/lib/module/screens/Auth/navigators.js.map +1 -0
- package/lib/module/screens/Auth/validators.js +45 -0
- package/lib/module/screens/Auth/validators.js.map +1 -0
- package/lib/module/screens/SavedCards/CardRow.js +4 -4
- package/lib/module/screens/SavedCards/CardRow.js.map +1 -1
- package/lib/module/screens/SavedCards/SavedCards.js +5 -5
- package/lib/module/screens/SavedCards/SavedCards.js.map +1 -1
- package/lib/module/{selectBusiness → screens/SelectBusiness}/CreateBusinessBottomSheet.js +6 -6
- package/lib/module/screens/SelectBusiness/CreateBusinessBottomSheet.js.map +1 -0
- package/lib/module/{selectBusiness → screens/SelectBusiness}/SelectBusiness.js +9 -10
- package/lib/module/screens/SelectBusiness/SelectBusiness.js.map +1 -0
- package/lib/module/{auth/screens → screens/TermsOfService}/TermsOfService.js +8 -8
- package/lib/module/screens/TermsOfService/TermsOfService.js.map +1 -0
- package/lib/module/screens/index.js +5 -0
- package/lib/module/screens/index.js.map +1 -0
- package/lib/module/utils/index.js +4 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/src/{auth/api → api}/authentication.d.ts +6 -2
- package/lib/typescript/src/api/authentication.d.ts.map +1 -0
- package/lib/typescript/src/api/customer.d.ts +6 -2
- package/lib/typescript/src/api/customer.d.ts.map +1 -1
- package/lib/typescript/src/components/DelayedRender.d.ts +2 -2
- package/lib/typescript/src/components/DelayedRender.d.ts.map +1 -1
- package/lib/typescript/src/helpers/index.d.ts +2 -0
- package/lib/typescript/src/helpers/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/index.d.ts +10 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/queryKeys.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useAppVersionCheck.d.ts.map +1 -1
- package/lib/typescript/src/{auth/hooks/useAuthentication.d.ts → hooks/useAuth.d.ts} +2 -2
- package/lib/typescript/src/hooks/useAuth.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useAuthenticateRequests.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useBusinesses.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useCreateBusiness.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useCustomer.d.ts +6 -2
- package/lib/typescript/src/hooks/useCustomer.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useDeactivateAccount.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useLogout.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useTermsOfService.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -11
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/localization/index.d.ts +90 -0
- package/lib/typescript/src/localization/index.d.ts.map +1 -0
- package/lib/typescript/src/providers/authentication/AuthenticationProvider.d.ts.map +1 -0
- package/lib/typescript/src/providers/authentication/actions/authentication.actions.d.ts.map +1 -0
- package/lib/typescript/src/providers/authentication/reducer/authentication.reducer.d.ts.map +1 -0
- package/lib/typescript/src/providers/authentication/types/authentication.types.d.ts.map +1 -0
- package/lib/typescript/src/providers/index.d.ts +3 -0
- package/lib/typescript/src/providers/index.d.ts.map +1 -0
- package/lib/typescript/src/{auth/screens → screens/Auth}/ChangePassword.d.ts.map +1 -1
- package/lib/typescript/src/screens/Auth/Login.d.ts.map +1 -0
- package/lib/typescript/src/screens/Auth/LoginWithEmail.d.ts.map +1 -0
- package/lib/typescript/src/{auth/screens → screens/Auth}/LoginWithPhoneNumber.d.ts.map +1 -1
- package/lib/typescript/src/screens/Auth/ResetPassword.d.ts.map +1 -0
- package/lib/typescript/src/{auth/screens → screens/Auth}/ResetPasswordInstructionsSent.d.ts.map +1 -1
- package/lib/typescript/src/screens/Auth/SignUp.d.ts.map +1 -0
- package/lib/typescript/src/{auth/screens → screens/Auth}/SignUpPassword.d.ts.map +1 -1
- package/lib/typescript/src/{auth/screens → screens/Auth}/VerifyPhoneNumber.d.ts.map +1 -1
- package/lib/typescript/src/{auth/screens → screens/Auth}/VerifyPhoneNumberForLogin.d.ts.map +1 -1
- package/lib/typescript/src/{auth/screens/index.d.ts → screens/Auth/navigators.d.ts} +1 -1
- package/lib/typescript/src/screens/Auth/navigators.d.ts.map +1 -0
- package/lib/typescript/src/{auth/screens → screens/Auth}/validators.d.ts.map +1 -1
- package/lib/typescript/src/screens/SavedCards/CardRow.d.ts +1 -1
- package/lib/typescript/src/screens/SavedCards/CardRow.d.ts.map +1 -1
- package/lib/typescript/src/screens/SavedCards/SavedCards.d.ts +1 -1
- package/lib/typescript/src/screens/SavedCards/SavedCards.d.ts.map +1 -1
- package/lib/typescript/src/screens/SelectBusiness/CreateBusinessBottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/screens/SelectBusiness/SelectBusiness.d.ts.map +1 -0
- package/lib/typescript/src/screens/TermsOfService/TermsOfService.d.ts.map +1 -0
- package/lib/typescript/src/screens/index.d.ts +5 -0
- package/lib/typescript/src/screens/index.d.ts.map +1 -0
- package/lib/typescript/src/utils/checkout.d.ts +1 -1
- package/lib/typescript/src/utils/checkout.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +4 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/{auth/api → api}/authentication.ts +6 -2
- package/src/api/customer.ts +6 -4
- package/src/assets/icons/alert.svg +4 -0
- package/src/components/Alert.tsx +1 -1
- package/src/components/DelayedRender.tsx +2 -2
- package/src/components/SelectionDialog.tsx +1 -1
- package/src/components/Snackbar.tsx +1 -1
- package/src/helpers/index.ts +1 -0
- package/src/hooks/index.ts +9 -0
- package/src/hooks/useAppVersionCheck.ts +7 -6
- package/src/{auth/hooks/useAuthentication.ts → hooks/useAuth.ts} +9 -12
- package/src/{auth/hooks → hooks}/useAuthenticateRequests.ts +1 -1
- package/src/{selectBusiness → hooks}/useCreateBusiness.ts +1 -1
- package/src/hooks/useCustomer.ts +7 -7
- package/src/{auth/hooks → hooks}/useDeactivateAccount.ts +3 -3
- package/src/{auth/hooks → hooks}/useLogout.ts +2 -2
- package/src/{auth/hooks → hooks}/useTermsOfService.ts +4 -4
- package/src/index.tsx +6 -22
- package/src/localization/index.ts +4 -0
- package/src/localization/translations/en.json +87 -0
- package/src/providers/index.ts +6 -0
- package/src/{auth/screens → screens/Auth}/ChangePassword.tsx +13 -14
- package/src/{auth/screens → screens/Auth}/Login.tsx +2 -2
- package/src/{auth/screens → screens/Auth}/LoginWithEmail.tsx +7 -7
- package/src/{auth/screens → screens/Auth}/LoginWithPhoneNumber.tsx +5 -5
- package/src/{auth/screens → screens/Auth}/ResetPassword.tsx +46 -8
- package/src/{auth/screens → screens/Auth}/ResetPasswordInstructionsSent.tsx +2 -2
- package/src/{auth/screens → screens/Auth}/SignUp.tsx +11 -12
- package/src/{auth/screens → screens/Auth}/SignUpPassword.tsx +11 -11
- package/src/{auth/screens → screens/Auth}/VerifyPhoneNumber.tsx +6 -6
- package/src/{auth/screens → screens/Auth}/VerifyPhoneNumberForLogin.tsx +6 -7
- package/src/{auth/screens → screens/Auth}/validators.ts +20 -20
- package/src/screens/SavedCards/CardRow.tsx +5 -5
- package/src/screens/SavedCards/SavedCards.tsx +6 -6
- package/src/{selectBusiness → screens/SelectBusiness}/CreateBusinessBottomSheet.tsx +6 -6
- package/src/{selectBusiness → screens/SelectBusiness}/SelectBusiness.tsx +9 -10
- package/src/{auth/screens → screens/TermsOfService}/TermsOfService.tsx +10 -8
- package/src/screens/index.ts +4 -0
- package/src/utils/checkout.ts +1 -1
- package/src/utils/index.ts +11 -0
- package/lib/commonjs/auth/api/authentication.js.map +0 -1
- package/lib/commonjs/auth/hooks/useAuthenticateRequests.js.map +0 -1
- package/lib/commonjs/auth/hooks/useAuthentication.js.map +0 -1
- package/lib/commonjs/auth/hooks/useDeactivateAccount.js.map +0 -1
- package/lib/commonjs/auth/hooks/useLogout.js.map +0 -1
- package/lib/commonjs/auth/hooks/useTermsOfService.js.map +0 -1
- package/lib/commonjs/auth/index.js +0 -65
- package/lib/commonjs/auth/index.js.map +0 -1
- package/lib/commonjs/auth/providers/authentication/AuthenticationProvider.js.map +0 -1
- package/lib/commonjs/auth/providers/authentication/actions/authentication.actions.js.map +0 -1
- package/lib/commonjs/auth/providers/authentication/index.js +0 -50
- package/lib/commonjs/auth/providers/authentication/index.js.map +0 -1
- package/lib/commonjs/auth/providers/authentication/reducer/authentication.reducer.js.map +0 -1
- package/lib/commonjs/auth/providers/authentication/types/authentication.types.js.map +0 -1
- package/lib/commonjs/auth/screens/LoginWithPhoneNumber.js.map +0 -1
- package/lib/commonjs/auth/screens/ResetPassword.js.map +0 -1
- package/lib/commonjs/auth/screens/SignUp.js.map +0 -1
- package/lib/commonjs/auth/screens/SignUpPassword.js.map +0 -1
- package/lib/commonjs/auth/screens/TermsOfService.js.map +0 -1
- package/lib/commonjs/auth/screens/VerifyPhoneNumber.js.map +0 -1
- package/lib/commonjs/auth/screens/VerifyPhoneNumberForLogin.js.map +0 -1
- package/lib/commonjs/auth/screens/index.js.map +0 -1
- package/lib/commonjs/auth/screens/validators.js.map +0 -1
- package/lib/commonjs/selectBusiness/CreateBusinessBottomSheet.js.map +0 -1
- package/lib/commonjs/selectBusiness/SelectBusiness.js.map +0 -1
- package/lib/commonjs/selectBusiness/index.js +0 -20
- package/lib/commonjs/selectBusiness/index.js.map +0 -1
- package/lib/commonjs/selectBusiness/queryKeys.js.map +0 -1
- package/lib/commonjs/selectBusiness/useBusinesses.js.map +0 -1
- package/lib/commonjs/selectBusiness/useCreateBusiness.js.map +0 -1
- package/lib/commonjs/types/customer.d.js +0 -7
- package/lib/commonjs/types/customer.d.js.map +0 -1
- package/lib/module/auth/api/authentication.js.map +0 -1
- package/lib/module/auth/hooks/useAuthenticateRequests.js.map +0 -1
- package/lib/module/auth/hooks/useAuthentication.js.map +0 -1
- package/lib/module/auth/hooks/useDeactivateAccount.js.map +0 -1
- package/lib/module/auth/hooks/useLogout.js.map +0 -1
- package/lib/module/auth/hooks/useTermsOfService.js.map +0 -1
- package/lib/module/auth/index.js +0 -7
- package/lib/module/auth/index.js.map +0 -1
- package/lib/module/auth/providers/authentication/AuthenticationProvider.js.map +0 -1
- package/lib/module/auth/providers/authentication/actions/authentication.actions.js.map +0 -1
- package/lib/module/auth/providers/authentication/index.js +0 -5
- package/lib/module/auth/providers/authentication/index.js.map +0 -1
- package/lib/module/auth/providers/authentication/reducer/authentication.reducer.js.map +0 -1
- package/lib/module/auth/providers/authentication/types/authentication.types.js.map +0 -1
- package/lib/module/auth/screens/LoginWithPhoneNumber.js.map +0 -1
- package/lib/module/auth/screens/ResetPassword.js.map +0 -1
- package/lib/module/auth/screens/SignUp.js.map +0 -1
- package/lib/module/auth/screens/SignUpPassword.js.map +0 -1
- package/lib/module/auth/screens/TermsOfService.js.map +0 -1
- package/lib/module/auth/screens/VerifyPhoneNumber.js.map +0 -1
- package/lib/module/auth/screens/VerifyPhoneNumberForLogin.js.map +0 -1
- package/lib/module/auth/screens/index.js.map +0 -1
- package/lib/module/auth/screens/validators.js +0 -45
- package/lib/module/auth/screens/validators.js.map +0 -1
- package/lib/module/selectBusiness/CreateBusinessBottomSheet.js.map +0 -1
- package/lib/module/selectBusiness/SelectBusiness.js.map +0 -1
- package/lib/module/selectBusiness/index.js +0 -3
- package/lib/module/selectBusiness/index.js.map +0 -1
- package/lib/module/selectBusiness/queryKeys.js.map +0 -1
- package/lib/module/selectBusiness/useBusinesses.js.map +0 -1
- package/lib/module/selectBusiness/useCreateBusiness.js.map +0 -1
- package/lib/module/types/customer.d.js +0 -5
- package/lib/module/types/customer.d.js.map +0 -1
- package/lib/typescript/src/auth/api/authentication.d.ts.map +0 -1
- package/lib/typescript/src/auth/hooks/useAuthenticateRequests.d.ts.map +0 -1
- package/lib/typescript/src/auth/hooks/useAuthentication.d.ts.map +0 -1
- package/lib/typescript/src/auth/hooks/useDeactivateAccount.d.ts.map +0 -1
- package/lib/typescript/src/auth/hooks/useLogout.d.ts.map +0 -1
- package/lib/typescript/src/auth/hooks/useTermsOfService.d.ts.map +0 -1
- package/lib/typescript/src/auth/index.d.ts +0 -7
- package/lib/typescript/src/auth/index.d.ts.map +0 -1
- package/lib/typescript/src/auth/providers/authentication/AuthenticationProvider.d.ts.map +0 -1
- package/lib/typescript/src/auth/providers/authentication/actions/authentication.actions.d.ts.map +0 -1
- package/lib/typescript/src/auth/providers/authentication/index.d.ts +0 -5
- package/lib/typescript/src/auth/providers/authentication/index.d.ts.map +0 -1
- package/lib/typescript/src/auth/providers/authentication/reducer/authentication.reducer.d.ts.map +0 -1
- package/lib/typescript/src/auth/providers/authentication/types/authentication.types.d.ts.map +0 -1
- package/lib/typescript/src/auth/screens/Login.d.ts.map +0 -1
- package/lib/typescript/src/auth/screens/LoginWithEmail.d.ts.map +0 -1
- package/lib/typescript/src/auth/screens/ResetPassword.d.ts.map +0 -1
- package/lib/typescript/src/auth/screens/SignUp.d.ts.map +0 -1
- package/lib/typescript/src/auth/screens/TermsOfService.d.ts.map +0 -1
- package/lib/typescript/src/auth/screens/index.d.ts.map +0 -1
- package/lib/typescript/src/selectBusiness/CreateBusinessBottomSheet.d.ts.map +0 -1
- package/lib/typescript/src/selectBusiness/SelectBusiness.d.ts.map +0 -1
- package/lib/typescript/src/selectBusiness/index.d.ts +0 -3
- package/lib/typescript/src/selectBusiness/index.d.ts.map +0 -1
- package/lib/typescript/src/selectBusiness/queryKeys.d.ts.map +0 -1
- package/lib/typescript/src/selectBusiness/useBusinesses.d.ts.map +0 -1
- package/lib/typescript/src/selectBusiness/useCreateBusiness.d.ts.map +0 -1
- package/src/auth/index.ts +0 -10
- package/src/auth/providers/authentication/index.ts +0 -4
- package/src/selectBusiness/index.ts +0 -2
- package/src/types/customer.d.ts +0 -70
- /package/lib/commonjs/{auth/api → api}/authentication.js +0 -0
- /package/lib/commonjs/{selectBusiness → hooks}/queryKeys.js +0 -0
- /package/lib/commonjs/{selectBusiness → hooks}/useBusinesses.js +0 -0
- /package/lib/commonjs/{auth/providers → providers}/authentication/AuthenticationProvider.js +0 -0
- /package/lib/commonjs/{auth/providers → providers}/authentication/actions/authentication.actions.js +0 -0
- /package/lib/commonjs/{auth/providers → providers}/authentication/reducer/authentication.reducer.js +0 -0
- /package/lib/commonjs/{auth/providers → providers}/authentication/types/authentication.types.js +0 -0
- /package/lib/module/{auth/api → api}/authentication.js +0 -0
- /package/lib/module/{selectBusiness → hooks}/queryKeys.js +0 -0
- /package/lib/module/{selectBusiness → hooks}/useBusinesses.js +0 -0
- /package/lib/module/{auth/providers → providers}/authentication/AuthenticationProvider.js +0 -0
- /package/lib/module/{auth/providers → providers}/authentication/actions/authentication.actions.js +0 -0
- /package/lib/module/{auth/providers → providers}/authentication/reducer/authentication.reducer.js +0 -0
- /package/lib/module/{auth/providers → providers}/authentication/types/authentication.types.js +0 -0
- /package/lib/typescript/src/{selectBusiness → hooks}/queryKeys.d.ts +0 -0
- /package/lib/typescript/src/{auth/hooks → hooks}/useAuthenticateRequests.d.ts +0 -0
- /package/lib/typescript/src/{selectBusiness → hooks}/useBusinesses.d.ts +0 -0
- /package/lib/typescript/src/{selectBusiness → hooks}/useCreateBusiness.d.ts +0 -0
- /package/lib/typescript/src/{auth/hooks → hooks}/useDeactivateAccount.d.ts +0 -0
- /package/lib/typescript/src/{auth/hooks → hooks}/useLogout.d.ts +0 -0
- /package/lib/typescript/src/{auth/hooks → hooks}/useTermsOfService.d.ts +0 -0
- /package/lib/typescript/src/{auth/providers → providers}/authentication/AuthenticationProvider.d.ts +0 -0
- /package/lib/typescript/src/{auth/providers → providers}/authentication/actions/authentication.actions.d.ts +0 -0
- /package/lib/typescript/src/{auth/providers → providers}/authentication/reducer/authentication.reducer.d.ts +0 -0
- /package/lib/typescript/src/{auth/providers → providers}/authentication/types/authentication.types.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/Auth}/ChangePassword.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/Auth}/Login.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/Auth}/LoginWithEmail.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/Auth}/LoginWithPhoneNumber.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/Auth}/ResetPassword.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/Auth}/ResetPasswordInstructionsSent.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/Auth}/SignUp.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/Auth}/SignUpPassword.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/Auth}/VerifyPhoneNumber.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/Auth}/VerifyPhoneNumberForLogin.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/Auth}/validators.d.ts +0 -0
- /package/lib/typescript/src/{selectBusiness → screens/SelectBusiness}/CreateBusinessBottomSheet.d.ts +0 -0
- /package/lib/typescript/src/{selectBusiness → screens/SelectBusiness}/SelectBusiness.d.ts +0 -0
- /package/lib/typescript/src/{auth/screens → screens/TermsOfService}/TermsOfService.d.ts +0 -0
- /package/src/{selectBusiness → hooks}/queryKeys.ts +0 -0
- /package/src/{selectBusiness → hooks}/useBusinesses.ts +0 -0
- /package/src/{auth/providers → providers}/authentication/AuthenticationProvider.tsx +0 -0
- /package/src/{auth/providers → providers}/authentication/actions/authentication.actions.ts +0 -0
- /package/src/{auth/providers → providers}/authentication/reducer/authentication.reducer.ts +0 -0
- /package/src/{auth/providers → providers}/authentication/types/authentication.types.ts +0 -0
- /package/src/{auth/screens/index.tsx → screens/Auth/navigators.tsx} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Alert } from '../../components';
|
|
2
1
|
import axios from 'axios';
|
|
3
2
|
import { useEffect } from 'react';
|
|
4
3
|
import { Platform } from 'react-native';
|
|
5
4
|
import Config from 'react-native-config';
|
|
5
|
+
import { Alert } from '../components';
|
|
6
6
|
|
|
7
7
|
export const useAuthenticateRequests = (
|
|
8
8
|
getToken: () => Promise<string | null>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
2
2
|
import { queryKeys } from './queryKeys';
|
|
3
|
-
import { signUpAPI } from '../
|
|
3
|
+
import { signUpAPI } from '../api/authentication';
|
|
4
4
|
|
|
5
5
|
export const useCreateBusiness = ({ onSuccess }: { onSuccess: () => void }) => {
|
|
6
6
|
const queryClient = useQueryClient();
|
package/src/hooks/useCustomer.ts
CHANGED
|
@@ -15,15 +15,11 @@ import {
|
|
|
15
15
|
saveCustomerCard,
|
|
16
16
|
updateCustomerProfile,
|
|
17
17
|
} from '../api/customer';
|
|
18
|
-
import {
|
|
19
|
-
Address,
|
|
20
|
-
CustomerProfileProps,
|
|
21
|
-
SaveCardRequest,
|
|
22
|
-
} from '../types/customer';
|
|
23
18
|
import { useMMKVString } from 'react-native-mmkv';
|
|
24
19
|
import { MMKV_KEYS } from '../constants';
|
|
25
|
-
import { queryKeys } from '
|
|
20
|
+
import { queryKeys } from './queryKeys';
|
|
26
21
|
import firebase from '@react-native-firebase/auth';
|
|
22
|
+
import { Address, SaveCardRequest } from '@kiosinc/commons-types';
|
|
27
23
|
|
|
28
24
|
export const useCustomerQueries = () => {
|
|
29
25
|
const queryClient = useQueryClient();
|
|
@@ -81,7 +77,11 @@ export const useCustomerQueries = () => {
|
|
|
81
77
|
},
|
|
82
78
|
useUpdateCustomer: () => {
|
|
83
79
|
const mutation = useMutation(
|
|
84
|
-
async (props:
|
|
80
|
+
async (props: {
|
|
81
|
+
addressId: string | null;
|
|
82
|
+
paymentId: string | null;
|
|
83
|
+
squareCustomerId: string | null;
|
|
84
|
+
}) => {
|
|
85
85
|
if (isLoggedIn) {
|
|
86
86
|
const response = await updateCustomerProfile({
|
|
87
87
|
uid: user.uid,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useMutation } from '@tanstack/react-query';
|
|
2
|
-
import { Alert } from '../../components';
|
|
3
|
-
import { deactivateAPI } from '../api/authentication';
|
|
4
2
|
import { useTranslation } from 'react-i18next';
|
|
5
3
|
import auth from '@react-native-firebase/auth';
|
|
4
|
+
import { deactivateAPI } from '../api/authentication';
|
|
5
|
+
import { Alert } from '../components';
|
|
6
6
|
|
|
7
7
|
export const useDeactivateAccount = () => {
|
|
8
8
|
const { t } = useTranslation();
|
|
@@ -14,7 +14,7 @@ export const useDeactivateAccount = () => {
|
|
|
14
14
|
onSuccess: () => {
|
|
15
15
|
auth().signOut();
|
|
16
16
|
Alert.show({
|
|
17
|
-
description: t('
|
|
17
|
+
description: t('commons.deactivationSuccess'),
|
|
18
18
|
});
|
|
19
19
|
},
|
|
20
20
|
}
|
|
@@ -3,9 +3,9 @@ import { useQueryClient } from '@tanstack/react-query';
|
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
import FastImage from 'react-native-fast-image';
|
|
5
5
|
import { useMMKVString } from 'react-native-mmkv';
|
|
6
|
-
import { MMKV_KEYS } from '../../constants';
|
|
7
|
-
import { analytics } from '../../utils/analytics';
|
|
8
6
|
import Config from 'react-native-config';
|
|
7
|
+
import { analytics } from '../utils';
|
|
8
|
+
import { MMKV_KEYS } from '../constants';
|
|
9
9
|
|
|
10
10
|
export const useLogout = () => {
|
|
11
11
|
const [_, setBusinessId] = useMMKVString(MMKV_KEYS.BUSINESS_ID);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
2
2
|
import firestore from '@react-native-firebase/firestore';
|
|
3
|
-
import { DEFAULT_STALE_TIME, queryKeys } from '../../selectBusiness/queryKeys';
|
|
4
|
-
import { getCurrentTimestamp } from '../../utils';
|
|
5
|
-
import { analytics } from '../../utils/analytics';
|
|
6
|
-
import { createCustomer } from '../../api/customer';
|
|
7
3
|
import firebase from '@react-native-firebase/auth';
|
|
4
|
+
import { getCurrentTimestamp } from '../utils';
|
|
5
|
+
import { createCustomer } from '../api/customer';
|
|
6
|
+
import { analytics } from '../utils';
|
|
7
|
+
import { DEFAULT_STALE_TIME, queryKeys } from './queryKeys';
|
|
8
8
|
|
|
9
9
|
export const useTermsOfService = () => {
|
|
10
10
|
const queryClient = useQueryClient();
|
package/src/index.tsx
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
export { AssetManager } from './helpers/AssetManager';
|
|
4
|
-
export { Currency } from './utils/currency';
|
|
5
|
-
|
|
6
|
-
export { useCustomerQueries } from './hooks/useCustomer';
|
|
7
|
-
export { useCheckCustomer } from './hooks/useCheckCustomer';
|
|
8
|
-
export { SavedCards } from './screens/SavedCards/SavedCards';
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
useMultiSnapBottomSheetRef,
|
|
12
|
-
TMultiSnapBottomSheetRef,
|
|
13
|
-
} from './utils/useMultiSnapBottomSheetRef';
|
|
14
|
-
export {
|
|
15
|
-
useSingleSnapBottomSheetRef,
|
|
16
|
-
TSingleSnapBottomSheetRef,
|
|
17
|
-
} from './utils/useSingleSnapBottomSheetRef';
|
|
18
|
-
|
|
1
|
+
export * from './hooks';
|
|
2
|
+
export * from './screens';
|
|
19
3
|
export * from './components';
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './
|
|
22
|
-
|
|
23
|
-
export
|
|
4
|
+
export * from './localization';
|
|
5
|
+
export * from './utils';
|
|
6
|
+
export * from './helpers';
|
|
7
|
+
export * from './providers';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"commons": {
|
|
3
|
+
"ok": "OK",
|
|
4
|
+
"close": "Close",
|
|
5
|
+
"create": "Create",
|
|
6
|
+
"update": "Update",
|
|
7
|
+
"cancel": "Cancel",
|
|
8
|
+
"delete": "Delete",
|
|
9
|
+
"continue": "Continue",
|
|
10
|
+
"logIn": "Log In",
|
|
11
|
+
"forgotPassword": "Forgot Password?",
|
|
12
|
+
"newToApp": "New to KIOS?",
|
|
13
|
+
"signUp": "Sign Up",
|
|
14
|
+
"email": "Email",
|
|
15
|
+
"password": "Password",
|
|
16
|
+
"requiredPassword": "Enter your Password",
|
|
17
|
+
"enterYour": "Enter Your Email to\nReset Password",
|
|
18
|
+
"resetPassword": "Reset Password",
|
|
19
|
+
"resetPasswordInstructionSent": "The reset password instructions were sent to {{email}}.",
|
|
20
|
+
"backToLogin": "Back to Log In",
|
|
21
|
+
"createAccountTitle": "Create a KIOS Account",
|
|
22
|
+
"createAccount": "Create Account",
|
|
23
|
+
"businessName": "Business Name",
|
|
24
|
+
"businessNameRequired": "Enter Business Name",
|
|
25
|
+
"displayName": "Name",
|
|
26
|
+
"displayNameRequired": "Enter a first and last name",
|
|
27
|
+
"phoneNumber": "Phone Number",
|
|
28
|
+
"requiredPhoneNumber": "Enter your Phone Number",
|
|
29
|
+
"passwordMustContain": "Password must contain:",
|
|
30
|
+
"minLength": "At least 8 characters",
|
|
31
|
+
"1lowerChar": "At least 1 lowercase character",
|
|
32
|
+
"1upperChar": "At least 1 uppercase character",
|
|
33
|
+
"1number": "At least 1 number",
|
|
34
|
+
"1special": "At least 1 special character",
|
|
35
|
+
"validEmail": "Email must be a valid email",
|
|
36
|
+
"requiredEmailForLogin": "Enter the email you have an account with",
|
|
37
|
+
"requiredEmailForSignUp": "Enter the email you want to create an account with",
|
|
38
|
+
"byContinue": "By continuing, you agree to KIOS’s",
|
|
39
|
+
"termsAndConditions": "Terms and Conditions",
|
|
40
|
+
"and": "and",
|
|
41
|
+
"privacyPolicy": "Privacy Policy.",
|
|
42
|
+
"createPassword": "Create a Password",
|
|
43
|
+
"verifyYourNumber": "Verify Your Number",
|
|
44
|
+
"loginWithNumber": "Login with Number",
|
|
45
|
+
"codeSent": "We’ve sent a 6-digital code to your {{phoneNumber}}.",
|
|
46
|
+
"resendCode": "Resend Code",
|
|
47
|
+
"userDoesNotExist": "No account found with '{{emailOrPhoneNumber}}'.",
|
|
48
|
+
"wrongCredentials": "You have entered an invalid email or password",
|
|
49
|
+
"deactivationSuccess": "Your account deactivated successfully",
|
|
50
|
+
"wrongOTP": "The verification code which you entered is invalid, Please enter the correct code.",
|
|
51
|
+
"passwordChangeSuccess": "Password changed successfully",
|
|
52
|
+
"newPassword": "New Password",
|
|
53
|
+
"currentPassword": "Current Password",
|
|
54
|
+
"changePassword": "Change password",
|
|
55
|
+
"wrongPassword": "Wrong password",
|
|
56
|
+
"wrongPasswordDesc": "The password you have entered is invalid",
|
|
57
|
+
"resetPasswordWarningAlert": {
|
|
58
|
+
"title": "Log out of all kiosks",
|
|
59
|
+
"description": "Resetting your password will automatically log you out of all your kiosks. Are you sure you want to continue?"
|
|
60
|
+
},
|
|
61
|
+
"appUpdateAlert": {
|
|
62
|
+
"title": "New Update ✨",
|
|
63
|
+
"description": "A new version of the app is available. Please update to the latest version for the best experience."
|
|
64
|
+
},
|
|
65
|
+
"addCard": "Add card",
|
|
66
|
+
"noSavedCards": "You have no saved card yet.",
|
|
67
|
+
"paymentMethods": "Payment methods",
|
|
68
|
+
"payment": "Payment",
|
|
69
|
+
"payAndPlaceOrder": "Pay & Place order",
|
|
70
|
+
"payByCard": "Pay by card",
|
|
71
|
+
"confirmCardDelete": "Confirm Delete Card",
|
|
72
|
+
"cardDeleteDesc": "Are you sure you want to delete card ending in {{card}}?",
|
|
73
|
+
"total": "Subtotal",
|
|
74
|
+
"createBusiness": "Create Business",
|
|
75
|
+
"selectBusiness": "Select Business",
|
|
76
|
+
"searchBusiness": "Search Business",
|
|
77
|
+
"noBusiness": "Looks like you don't have any businesses.",
|
|
78
|
+
"logout": "Logout",
|
|
79
|
+
"termsOfServiceModal": {
|
|
80
|
+
"title": "Please accept the updated terms to continue using Remy",
|
|
81
|
+
"description": "You can view the updated terms at any time but you will need to accept the terms in order to access your account.",
|
|
82
|
+
"review": "Review Terms"
|
|
83
|
+
},
|
|
84
|
+
"termsTitle": "Terms of Service Update",
|
|
85
|
+
"acceptTerms": "Accept Terms"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -15,7 +15,6 @@ import { Controller, useForm } from 'react-hook-form';
|
|
|
15
15
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
16
16
|
import { useTranslation } from 'react-i18next';
|
|
17
17
|
import { RouteProp, useNavigation } from '@react-navigation/native';
|
|
18
|
-
|
|
19
18
|
import { changePasswordSchema } from './validators';
|
|
20
19
|
|
|
21
20
|
export type TPasswordForm = {
|
|
@@ -57,24 +56,24 @@ export const ChangePassword: React.FC<ChangePasswordProps> = ({ route }) => {
|
|
|
57
56
|
await user.reauthenticateWithCredential(credential);
|
|
58
57
|
await user.updatePassword(data.newPassword);
|
|
59
58
|
setIsLoading(false);
|
|
60
|
-
Snackbar.show({ title: t('
|
|
59
|
+
Snackbar.show({ title: t('commons.passwordChangeSuccess') });
|
|
61
60
|
navigation.goBack();
|
|
62
61
|
}
|
|
63
62
|
} catch (error: any) {
|
|
64
63
|
setIsLoading(false);
|
|
65
64
|
Alert.show({
|
|
66
|
-
title: t('
|
|
67
|
-
description: t('
|
|
65
|
+
title: t('commons.wrongPassword'),
|
|
66
|
+
description: t('commons.wrongPasswordDesc'),
|
|
68
67
|
});
|
|
69
68
|
}
|
|
70
69
|
};
|
|
71
70
|
|
|
72
71
|
const passwordExpectations = [
|
|
73
|
-
t('
|
|
74
|
-
t('
|
|
75
|
-
t('
|
|
76
|
-
t('
|
|
77
|
-
t('
|
|
72
|
+
t('commons.minLength'),
|
|
73
|
+
t('commons.1lowerChar'),
|
|
74
|
+
t('commons.1upperChar'),
|
|
75
|
+
t('commons.1number'),
|
|
76
|
+
t('commons.1special'),
|
|
78
77
|
];
|
|
79
78
|
|
|
80
79
|
return (
|
|
@@ -88,7 +87,7 @@ export const ChangePassword: React.FC<ChangePasswordProps> = ({ route }) => {
|
|
|
88
87
|
>
|
|
89
88
|
<View alignItems="center">
|
|
90
89
|
<Text pb="40" variant="titleLarge">
|
|
91
|
-
{t('
|
|
90
|
+
{t('commons.changePassword')}
|
|
92
91
|
</Text>
|
|
93
92
|
</View>
|
|
94
93
|
<Controller
|
|
@@ -106,7 +105,7 @@ export const ChangePassword: React.FC<ChangePasswordProps> = ({ route }) => {
|
|
|
106
105
|
onBlur={onBlur}
|
|
107
106
|
onChangeText={onChange}
|
|
108
107
|
value={value}
|
|
109
|
-
label={t('
|
|
108
|
+
label={t('commons.currentPassword')}
|
|
110
109
|
/>
|
|
111
110
|
);
|
|
112
111
|
}}
|
|
@@ -133,9 +132,9 @@ export const ChangePassword: React.FC<ChangePasswordProps> = ({ route }) => {
|
|
|
133
132
|
trigger();
|
|
134
133
|
}}
|
|
135
134
|
value={value}
|
|
136
|
-
label={t('
|
|
135
|
+
label={t('commons.password')}
|
|
137
136
|
/>
|
|
138
|
-
<Text pt="4">{t('
|
|
137
|
+
<Text pt="4">{t('commons.passwordMustContain')}</Text>
|
|
139
138
|
{passwordExpectations.map((expectation, index) => {
|
|
140
139
|
const didExpectationFoundInErrors =
|
|
141
140
|
passwordErrors?.includes(expectation) ?? false;
|
|
@@ -169,7 +168,7 @@ export const ChangePassword: React.FC<ChangePasswordProps> = ({ route }) => {
|
|
|
169
168
|
onPress={handleSubmit(handleChangePassword)}
|
|
170
169
|
mode="contained"
|
|
171
170
|
>
|
|
172
|
-
{t('
|
|
171
|
+
{t('commons.changePassword')}
|
|
173
172
|
</Button>
|
|
174
173
|
</KeyboardAvoidingView>
|
|
175
174
|
</View>
|
|
@@ -71,7 +71,7 @@ export const Login = () => {
|
|
|
71
71
|
<Tab.Screen
|
|
72
72
|
options={{
|
|
73
73
|
tabBarLabel: TabBarTitle({
|
|
74
|
-
title: t('
|
|
74
|
+
title: t('commons.phoneNumber'),
|
|
75
75
|
}),
|
|
76
76
|
}}
|
|
77
77
|
name="LoginWithPhoneNumber"
|
|
@@ -80,7 +80,7 @@ export const Login = () => {
|
|
|
80
80
|
<Tab.Screen
|
|
81
81
|
options={{
|
|
82
82
|
tabBarLabel: TabBarTitle({
|
|
83
|
-
title: t('
|
|
83
|
+
title: t('commons.email'),
|
|
84
84
|
}),
|
|
85
85
|
}}
|
|
86
86
|
name="LoginWithEmail"
|
|
@@ -54,7 +54,7 @@ export const LoginWithEmail = () => {
|
|
|
54
54
|
});
|
|
55
55
|
})
|
|
56
56
|
.catch(() => {
|
|
57
|
-
Snackbar.show({ title: t('
|
|
57
|
+
Snackbar.show({ title: t('commons.wrongCredentials') });
|
|
58
58
|
})
|
|
59
59
|
.finally(() => {
|
|
60
60
|
setIsLoading(false);
|
|
@@ -79,7 +79,7 @@ export const LoginWithEmail = () => {
|
|
|
79
79
|
onBlur={onBlur}
|
|
80
80
|
onChangeText={onChange}
|
|
81
81
|
value={value}
|
|
82
|
-
label={t('
|
|
82
|
+
label={t('commons.email')}
|
|
83
83
|
/>
|
|
84
84
|
);
|
|
85
85
|
}}
|
|
@@ -99,7 +99,7 @@ export const LoginWithEmail = () => {
|
|
|
99
99
|
onBlur={onBlur}
|
|
100
100
|
onChangeText={onChange}
|
|
101
101
|
value={value}
|
|
102
|
-
label={t('
|
|
102
|
+
label={t('commons.password')}
|
|
103
103
|
/>
|
|
104
104
|
);
|
|
105
105
|
}}
|
|
@@ -113,7 +113,7 @@ export const LoginWithEmail = () => {
|
|
|
113
113
|
navigation.navigate('ResetPassword');
|
|
114
114
|
}}
|
|
115
115
|
>
|
|
116
|
-
{t('
|
|
116
|
+
{t('commons.forgotPassword')}
|
|
117
117
|
</LinkButton>
|
|
118
118
|
</View>
|
|
119
119
|
<Button
|
|
@@ -121,7 +121,7 @@ export const LoginWithEmail = () => {
|
|
|
121
121
|
mode="contained"
|
|
122
122
|
onPress={handleSubmit(onSubmit)}
|
|
123
123
|
>
|
|
124
|
-
{t('
|
|
124
|
+
{t('commons.logIn')}
|
|
125
125
|
</Button>
|
|
126
126
|
{Config.APP_NAME !== 'git' && (
|
|
127
127
|
<View
|
|
@@ -130,7 +130,7 @@ export const LoginWithEmail = () => {
|
|
|
130
130
|
pt="4"
|
|
131
131
|
flexDirection="row"
|
|
132
132
|
>
|
|
133
|
-
<Text variant="labelLarge">{t('
|
|
133
|
+
<Text variant="labelLarge">{t('commons.newToApp')}</Text>
|
|
134
134
|
<LinkButton
|
|
135
135
|
mode="text"
|
|
136
136
|
onPress={() => {
|
|
@@ -138,7 +138,7 @@ export const LoginWithEmail = () => {
|
|
|
138
138
|
navigation.navigate('SignUp');
|
|
139
139
|
}}
|
|
140
140
|
>
|
|
141
|
-
{t('
|
|
141
|
+
{t('commons.signUp')}
|
|
142
142
|
</LinkButton>
|
|
143
143
|
</View>
|
|
144
144
|
)}
|
|
@@ -4,12 +4,12 @@ import { useTranslation } from 'react-i18next';
|
|
|
4
4
|
import { Controller, useForm } from 'react-hook-form';
|
|
5
5
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
6
6
|
import { loginWithPhoneNumberValidationSchema } from './validators';
|
|
7
|
-
import { useAuthentication } from '../hooks/useAuthentication';
|
|
8
7
|
import { ICountry } from 'react-native-international-phone-number';
|
|
9
8
|
import { Keyboard } from 'react-native';
|
|
10
9
|
import Config from 'react-native-config';
|
|
11
10
|
import { analytics } from '../../utils/analytics';
|
|
12
11
|
import { NavigationProp, useNavigation } from '@react-navigation/native';
|
|
12
|
+
import { useAuth } from '../../hooks';
|
|
13
13
|
|
|
14
14
|
type FormData = {
|
|
15
15
|
phoneNumber: string;
|
|
@@ -17,7 +17,7 @@ type FormData = {
|
|
|
17
17
|
|
|
18
18
|
export const LoginWithPhoneNumber = () => {
|
|
19
19
|
const { t } = useTranslation();
|
|
20
|
-
const { useVerifyPhoneNumberForLogin } =
|
|
20
|
+
const { useVerifyPhoneNumberForLogin } = useAuth();
|
|
21
21
|
const { mutate: sendCode, isLoading: isSendingCode } =
|
|
22
22
|
useVerifyPhoneNumberForLogin();
|
|
23
23
|
const [selectedCountry, setSelectedCountry] = useState<ICountry>();
|
|
@@ -75,7 +75,7 @@ export const LoginWithPhoneNumber = () => {
|
|
|
75
75
|
mode="contained"
|
|
76
76
|
onPress={handleSubmit(onSubmit)}
|
|
77
77
|
>
|
|
78
|
-
{t('
|
|
78
|
+
{t('commons.logIn')}
|
|
79
79
|
</Button>
|
|
80
80
|
{Config.APP_NAME !== 'git' && (
|
|
81
81
|
<View
|
|
@@ -84,7 +84,7 @@ export const LoginWithPhoneNumber = () => {
|
|
|
84
84
|
pt="4"
|
|
85
85
|
flexDirection="row"
|
|
86
86
|
>
|
|
87
|
-
<Text variant="labelLarge">{t('
|
|
87
|
+
<Text variant="labelLarge">{t('commons.newToApp')}</Text>
|
|
88
88
|
<LinkButton
|
|
89
89
|
mode="text"
|
|
90
90
|
onPress={() => {
|
|
@@ -92,7 +92,7 @@ export const LoginWithPhoneNumber = () => {
|
|
|
92
92
|
navigation.navigate('SignUp');
|
|
93
93
|
}}
|
|
94
94
|
>
|
|
95
|
-
{t('
|
|
95
|
+
{t('commons.signUp')}
|
|
96
96
|
</LinkButton>
|
|
97
97
|
</View>
|
|
98
98
|
)}
|
|
@@ -5,14 +5,22 @@ import {
|
|
|
5
5
|
Button,
|
|
6
6
|
KeyboardAvoidingView,
|
|
7
7
|
Header,
|
|
8
|
+
Alert,
|
|
9
|
+
View,
|
|
8
10
|
} from '../../components';
|
|
9
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
type NavigationProp,
|
|
13
|
+
useNavigation,
|
|
14
|
+
useTheme,
|
|
15
|
+
} from '@react-navigation/native';
|
|
10
16
|
import React from 'react';
|
|
11
17
|
import { useTranslation } from 'react-i18next';
|
|
12
18
|
import { Controller, useForm } from 'react-hook-form';
|
|
13
19
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
20
|
+
import { useAuth } from '../../hooks/useAuth';
|
|
21
|
+
import Config from 'react-native-config';
|
|
14
22
|
import { resetPasswordValidationSchema } from './validators';
|
|
15
|
-
import
|
|
23
|
+
import AlertSVG from '../../assets/icons/alert.svg';
|
|
16
24
|
|
|
17
25
|
type FormData = {
|
|
18
26
|
email: string;
|
|
@@ -21,8 +29,9 @@ type FormData = {
|
|
|
21
29
|
export const ResetPassword = () => {
|
|
22
30
|
const { t } = useTranslation();
|
|
23
31
|
const navigation = useNavigation<NavigationProp<RootStackType>>();
|
|
24
|
-
const { useResetPassword } =
|
|
32
|
+
const { useResetPassword } = useAuth();
|
|
25
33
|
const { mutate: resetPassword, isLoading } = useResetPassword();
|
|
34
|
+
const theme = useTheme();
|
|
26
35
|
|
|
27
36
|
const {
|
|
28
37
|
handleSubmit,
|
|
@@ -36,7 +45,36 @@ export const ResetPassword = () => {
|
|
|
36
45
|
});
|
|
37
46
|
|
|
38
47
|
const onSubmit = async (data: FormData) => {
|
|
39
|
-
|
|
48
|
+
if (!['gusteau'].includes(Config.APP_NAME ?? '')) {
|
|
49
|
+
Alert.show({
|
|
50
|
+
renderDescription: () => {
|
|
51
|
+
return (
|
|
52
|
+
<View pt={'24'}>
|
|
53
|
+
<View alignSelf={'center'}>
|
|
54
|
+
<AlertSVG fill={theme.colors.text} />
|
|
55
|
+
</View>
|
|
56
|
+
<Text variant="titleMedium" textAlign={'center'} py={'16'}>
|
|
57
|
+
{t('commons.resetPasswordWarningAlert.title')}
|
|
58
|
+
</Text>
|
|
59
|
+
<Text variant="bodyMedium" pb={'16'}>
|
|
60
|
+
{t('commons.resetPasswordWarningAlert.description')}
|
|
61
|
+
</Text>
|
|
62
|
+
</View>
|
|
63
|
+
);
|
|
64
|
+
},
|
|
65
|
+
buttons: [
|
|
66
|
+
{
|
|
67
|
+
label: t('commons.continue'),
|
|
68
|
+
onPress: () => resetPassword({ email: data.email }),
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
label: t('commons.cancel'),
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
});
|
|
75
|
+
} else {
|
|
76
|
+
resetPassword({ email: data.email });
|
|
77
|
+
}
|
|
40
78
|
};
|
|
41
79
|
|
|
42
80
|
return (
|
|
@@ -48,7 +86,7 @@ export const ResetPassword = () => {
|
|
|
48
86
|
width={{ phone: '100%', tablet: 372 }}
|
|
49
87
|
>
|
|
50
88
|
<Text py="48" textAlign="center" variant="titleLarge">
|
|
51
|
-
{t('
|
|
89
|
+
{t('commons.enterYour')}
|
|
52
90
|
</Text>
|
|
53
91
|
<Controller
|
|
54
92
|
control={control}
|
|
@@ -65,7 +103,7 @@ export const ResetPassword = () => {
|
|
|
65
103
|
onBlur={onBlur}
|
|
66
104
|
onChangeText={onChange}
|
|
67
105
|
value={value}
|
|
68
|
-
label={t('
|
|
106
|
+
label={t('commons.email')}
|
|
69
107
|
/>
|
|
70
108
|
);
|
|
71
109
|
}}
|
|
@@ -77,10 +115,10 @@ export const ResetPassword = () => {
|
|
|
77
115
|
mode="contained"
|
|
78
116
|
onPress={handleSubmit(onSubmit)}
|
|
79
117
|
>
|
|
80
|
-
{t('
|
|
118
|
+
{t('commons.resetPassword')}
|
|
81
119
|
</Button>
|
|
82
120
|
<Button mt="48" mode="outlined" onPress={navigation.goBack}>
|
|
83
|
-
{t('cancel')}
|
|
121
|
+
{t('commons.cancel')}
|
|
84
122
|
</Button>
|
|
85
123
|
</KeyboardAvoidingView>
|
|
86
124
|
</ParentView>
|
|
@@ -25,12 +25,12 @@ export const ResetPasswordInstructionSent: React.FC<
|
|
|
25
25
|
width={{ phone: '100%', tablet: 372 }}
|
|
26
26
|
>
|
|
27
27
|
<Text py="48" textAlign="center" variant="titleLarge">
|
|
28
|
-
{t('
|
|
28
|
+
{t('commons.resetPasswordInstructionSent', {
|
|
29
29
|
email: route.params?.email,
|
|
30
30
|
})}
|
|
31
31
|
</Text>
|
|
32
32
|
<Button mode="outlined" onPress={() => navigation.navigate('Login')}>
|
|
33
|
-
{t('
|
|
33
|
+
{t('commons.backToLogin')}
|
|
34
34
|
</Button>
|
|
35
35
|
</ParentView>
|
|
36
36
|
);
|
|
@@ -18,12 +18,11 @@ import {
|
|
|
18
18
|
signUpValidationSchemaWithBusinessName,
|
|
19
19
|
signUpValidationSchemaWithoutBusinessName,
|
|
20
20
|
} from './validators';
|
|
21
|
-
import { useAuthentication } from '../hooks/useAuthentication';
|
|
22
21
|
import { Linking } from 'react-native';
|
|
23
22
|
import { PRIVACY_POLICY, TERMS_OF_SERVICE } from '../../constants';
|
|
24
23
|
import Config from 'react-native-config';
|
|
25
24
|
import { ICountry } from 'react-native-international-phone-number';
|
|
26
|
-
import { useTermsOfService } from '
|
|
25
|
+
import { useAuth, useTermsOfService } from '../../hooks';
|
|
27
26
|
|
|
28
27
|
export type TUserForm = {
|
|
29
28
|
displayName: string;
|
|
@@ -35,7 +34,7 @@ export type TUserForm = {
|
|
|
35
34
|
export const SignUp = () => {
|
|
36
35
|
const [selectedCountry, setSelectedCountry] = useState<ICountry>();
|
|
37
36
|
const { t } = useTranslation();
|
|
38
|
-
const { useIsCheckRegistered } =
|
|
37
|
+
const { useIsCheckRegistered } = useAuth();
|
|
39
38
|
const { mutate: checkRegistration, isLoading: isCheckingIsRegistered } =
|
|
40
39
|
useIsCheckRegistered();
|
|
41
40
|
const { useTermsOfServiceURL } = useTermsOfService();
|
|
@@ -71,7 +70,7 @@ export const SignUp = () => {
|
|
|
71
70
|
|
|
72
71
|
return (
|
|
73
72
|
<ParentView px="16">
|
|
74
|
-
<Header title={t('
|
|
73
|
+
<Header title={t('commons.createAccountTitle')} />
|
|
75
74
|
<KeyboardAvoidingView
|
|
76
75
|
flex={1}
|
|
77
76
|
behavior="padding"
|
|
@@ -90,7 +89,7 @@ export const SignUp = () => {
|
|
|
90
89
|
onBlur={onBlur}
|
|
91
90
|
onChangeText={onChange}
|
|
92
91
|
value={value}
|
|
93
|
-
label={t('
|
|
92
|
+
label={t('commons.displayName')}
|
|
94
93
|
/>
|
|
95
94
|
);
|
|
96
95
|
}}
|
|
@@ -109,7 +108,7 @@ export const SignUp = () => {
|
|
|
109
108
|
onBlur={onBlur}
|
|
110
109
|
onChangeText={onChange}
|
|
111
110
|
value={value}
|
|
112
|
-
label={t('
|
|
111
|
+
label={t('commons.businessName')}
|
|
113
112
|
/>
|
|
114
113
|
);
|
|
115
114
|
}}
|
|
@@ -131,7 +130,7 @@ export const SignUp = () => {
|
|
|
131
130
|
onBlur={onBlur}
|
|
132
131
|
onChangeText={onChange}
|
|
133
132
|
value={value}
|
|
134
|
-
label={t('
|
|
133
|
+
label={t('commons.email')}
|
|
135
134
|
/>
|
|
136
135
|
);
|
|
137
136
|
}}
|
|
@@ -161,24 +160,24 @@ export const SignUp = () => {
|
|
|
161
160
|
onPress={handleSubmit(onSubmit)}
|
|
162
161
|
mode="contained"
|
|
163
162
|
>
|
|
164
|
-
{t('
|
|
163
|
+
{t('commons.createAccount')}
|
|
165
164
|
</Button>
|
|
166
165
|
<View flexDirection="row" flexWrap="wrap" pt="10">
|
|
167
|
-
<Text variant="bodyMedium">{t('
|
|
166
|
+
<Text variant="bodyMedium">{t('commons.byContinue')} </Text>
|
|
168
167
|
<LinkButton
|
|
169
168
|
labelStyle={style.linkButton}
|
|
170
169
|
mode="text"
|
|
171
170
|
onPress={() => Linking.openURL(url || TERMS_OF_SERVICE)}
|
|
172
171
|
>
|
|
173
|
-
{t('
|
|
172
|
+
{t('commons.termsAndConditions')}
|
|
174
173
|
</LinkButton>
|
|
175
|
-
<Text variant="bodyMedium"> {t('
|
|
174
|
+
<Text variant="bodyMedium"> {t('commons.and')} </Text>
|
|
176
175
|
<LinkButton
|
|
177
176
|
labelStyle={style.linkButton}
|
|
178
177
|
mode="text"
|
|
179
178
|
onPress={() => Linking.openURL(PRIVACY_POLICY)}
|
|
180
179
|
>
|
|
181
|
-
{t('
|
|
180
|
+
{t('commons.privacyPolicy')}
|
|
182
181
|
</LinkButton>
|
|
183
182
|
</View>
|
|
184
183
|
</KeyboardAvoidingView>
|