@kiosinc/commons-rn 0.1.85 → 0.1.87
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/OfflineStrip.js +55 -0
- package/lib/commonjs/components/OfflineStrip.js.map +1 -0
- 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/components/index.js +7 -0
- package/lib/commonjs/components/index.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 +88 -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/OfflineStrip.js +45 -0
- package/lib/module/components/OfflineStrip.js.map +1 -0
- 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/components/index.js +1 -0
- package/lib/module/components/index.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 +88 -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/OfflineStrip.d.ts +3 -0
- package/lib/typescript/src/components/OfflineStrip.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +1 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/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 +91 -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 +4 -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/OfflineStrip.tsx +52 -0
- package/src/components/SelectionDialog.tsx +1 -1
- package/src/components/Snackbar.tsx +1 -1
- package/src/components/index.ts +1 -0
- 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 +88 -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
|
@@ -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>
|
|
@@ -13,7 +13,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
13
13
|
import { Controller, useForm } from 'react-hook-form';
|
|
14
14
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
15
15
|
import { passwordVerificationSchema } from './validators';
|
|
16
|
-
import {
|
|
16
|
+
import { useAuth } from '../../hooks';
|
|
17
17
|
|
|
18
18
|
type FormData = {
|
|
19
19
|
password: string;
|
|
@@ -26,15 +26,15 @@ type SignUpPasswordProps = {
|
|
|
26
26
|
export const SignUpPassword: React.FC<SignUpPasswordProps> = ({ route }) => {
|
|
27
27
|
const params = route.params;
|
|
28
28
|
const { t } = useTranslation();
|
|
29
|
-
const { useVerifyPhoneNumber } =
|
|
29
|
+
const { useVerifyPhoneNumber } = useAuth();
|
|
30
30
|
const { mutate: verifyPhoneNumber, isLoading: isVerifyingPhoneNumber } =
|
|
31
31
|
useVerifyPhoneNumber();
|
|
32
32
|
const passwordExpectations = [
|
|
33
|
-
t('
|
|
34
|
-
t('
|
|
35
|
-
t('
|
|
36
|
-
t('
|
|
37
|
-
t('
|
|
33
|
+
t('commons.minLength'),
|
|
34
|
+
t('commons.1lowerChar'),
|
|
35
|
+
t('commons.1upperChar'),
|
|
36
|
+
t('commons.1number'),
|
|
37
|
+
t('commons.1special'),
|
|
38
38
|
];
|
|
39
39
|
|
|
40
40
|
const {
|
|
@@ -59,7 +59,7 @@ export const SignUpPassword: React.FC<SignUpPasswordProps> = ({ route }) => {
|
|
|
59
59
|
|
|
60
60
|
return (
|
|
61
61
|
<ParentView px="16">
|
|
62
|
-
<Header title={t('
|
|
62
|
+
<Header title={t('commons.createPassword')} />
|
|
63
63
|
<View flex={1}>
|
|
64
64
|
<KeyboardAvoidingView
|
|
65
65
|
alignSelf="center"
|
|
@@ -87,9 +87,9 @@ export const SignUpPassword: React.FC<SignUpPasswordProps> = ({ route }) => {
|
|
|
87
87
|
trigger();
|
|
88
88
|
}}
|
|
89
89
|
value={value}
|
|
90
|
-
label={t('
|
|
90
|
+
label={t('commons.password')}
|
|
91
91
|
/>
|
|
92
|
-
<Text pt="4">{t('
|
|
92
|
+
<Text pt="4">{t('commons.passwordMustContain')}</Text>
|
|
93
93
|
{passwordExpectations.map((expectation, index) => {
|
|
94
94
|
const didExpectationFoundInErrors =
|
|
95
95
|
passwordErrors?.includes(expectation) ?? false;
|
|
@@ -122,7 +122,7 @@ export const SignUpPassword: React.FC<SignUpPasswordProps> = ({ route }) => {
|
|
|
122
122
|
mode="contained"
|
|
123
123
|
onPress={handleSubmit(onSubmit)}
|
|
124
124
|
>
|
|
125
|
-
{t('continue')}
|
|
125
|
+
{t('commons.continue')}
|
|
126
126
|
</Button>
|
|
127
127
|
</KeyboardAvoidingView>
|
|
128
128
|
</View>
|
|
@@ -14,7 +14,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
14
14
|
import { Controller, useForm } from 'react-hook-form';
|
|
15
15
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
16
16
|
import { verificationValidationSchema } from './validators';
|
|
17
|
-
import {
|
|
17
|
+
import { useAuth } from '../../hooks';
|
|
18
18
|
|
|
19
19
|
type FormData = {
|
|
20
20
|
code: string;
|
|
@@ -29,7 +29,7 @@ export const VerifyPhoneNumber: React.FC<VerifyPhoneNumberProps> = ({
|
|
|
29
29
|
}) => {
|
|
30
30
|
const params = route.params as any;
|
|
31
31
|
const { t } = useTranslation();
|
|
32
|
-
const { useSignUp, useVerifyPhoneNumber } =
|
|
32
|
+
const { useSignUp, useVerifyPhoneNumber } = useAuth();
|
|
33
33
|
|
|
34
34
|
const { mutate: signUp, isLoading: isSigningUp } = useSignUp();
|
|
35
35
|
const { mutate: resendCode, isLoading: isResendingCode } =
|
|
@@ -57,7 +57,7 @@ export const VerifyPhoneNumber: React.FC<VerifyPhoneNumberProps> = ({
|
|
|
57
57
|
>
|
|
58
58
|
<View alignItems="center">
|
|
59
59
|
<Text pt="48" pb="8" textAlign="center" variant="titleLarge">
|
|
60
|
-
{t('
|
|
60
|
+
{t('commons.verifyYourNumber')}
|
|
61
61
|
</Text>
|
|
62
62
|
<Text
|
|
63
63
|
color="onSurfaceVariant"
|
|
@@ -65,7 +65,7 @@ export const VerifyPhoneNumber: React.FC<VerifyPhoneNumberProps> = ({
|
|
|
65
65
|
textAlign="center"
|
|
66
66
|
variant="bodyLarge"
|
|
67
67
|
>
|
|
68
|
-
{t('
|
|
68
|
+
{t('commons.codeSent', {
|
|
69
69
|
phoneNumber: params.phoneNumber,
|
|
70
70
|
})}
|
|
71
71
|
</Text>
|
|
@@ -90,7 +90,7 @@ export const VerifyPhoneNumber: React.FC<VerifyPhoneNumberProps> = ({
|
|
|
90
90
|
mode="contained"
|
|
91
91
|
onPress={handleSubmit(onSubmit)}
|
|
92
92
|
>
|
|
93
|
-
{t('continue')}
|
|
93
|
+
{t('commons.continue')}
|
|
94
94
|
</Button>
|
|
95
95
|
<LinkButton
|
|
96
96
|
disabled={isResendingCode || isSigningUp}
|
|
@@ -101,7 +101,7 @@ export const VerifyPhoneNumber: React.FC<VerifyPhoneNumberProps> = ({
|
|
|
101
101
|
resendCode(params as any);
|
|
102
102
|
}}
|
|
103
103
|
>
|
|
104
|
-
{t('
|
|
104
|
+
{t('commons.resendCode')}
|
|
105
105
|
</LinkButton>
|
|
106
106
|
</KeyboardAvoidingView>
|
|
107
107
|
</View>
|
|
@@ -14,7 +14,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
14
14
|
import { Controller, useForm } from 'react-hook-form';
|
|
15
15
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
16
16
|
import { verificationValidationSchema } from './validators';
|
|
17
|
-
import {
|
|
17
|
+
import { useAuth } from '../../hooks';
|
|
18
18
|
|
|
19
19
|
type FormData = {
|
|
20
20
|
code: string;
|
|
@@ -29,8 +29,7 @@ export const VerifyPhoneNumberForLogin: React.FC<
|
|
|
29
29
|
> = ({ route }) => {
|
|
30
30
|
const params = route.params as any;
|
|
31
31
|
const { t } = useTranslation();
|
|
32
|
-
const { useVerifyPhoneNumberForLogin, useConfirmPhoneNumber } =
|
|
33
|
-
useAuthentication();
|
|
32
|
+
const { useVerifyPhoneNumberForLogin, useConfirmPhoneNumber } = useAuth();
|
|
34
33
|
|
|
35
34
|
const { mutate: confirmCode, isLoading: isConfirmingCode } =
|
|
36
35
|
useConfirmPhoneNumber();
|
|
@@ -59,7 +58,7 @@ export const VerifyPhoneNumberForLogin: React.FC<
|
|
|
59
58
|
>
|
|
60
59
|
<View alignItems="center">
|
|
61
60
|
<Text pt="48" pb="8" textAlign="center" variant="titleLarge">
|
|
62
|
-
{t('
|
|
61
|
+
{t('commons.loginWithNumber')}
|
|
63
62
|
</Text>
|
|
64
63
|
<Text
|
|
65
64
|
color="onSurfaceVariant"
|
|
@@ -67,7 +66,7 @@ export const VerifyPhoneNumberForLogin: React.FC<
|
|
|
67
66
|
textAlign="center"
|
|
68
67
|
variant="bodyLarge"
|
|
69
68
|
>
|
|
70
|
-
{t('
|
|
69
|
+
{t('commons.codeSent', {
|
|
71
70
|
phoneNumber: params.phoneNumber,
|
|
72
71
|
})}
|
|
73
72
|
</Text>
|
|
@@ -92,7 +91,7 @@ export const VerifyPhoneNumberForLogin: React.FC<
|
|
|
92
91
|
mode="contained"
|
|
93
92
|
onPress={handleSubmit(onSubmit)}
|
|
94
93
|
>
|
|
95
|
-
{t('continue')}
|
|
94
|
+
{t('commons.continue')}
|
|
96
95
|
</Button>
|
|
97
96
|
<LinkButton
|
|
98
97
|
disabled={isResendingCode || isConfirmingCode}
|
|
@@ -103,7 +102,7 @@ export const VerifyPhoneNumberForLogin: React.FC<
|
|
|
103
102
|
resendCode(params as any);
|
|
104
103
|
}}
|
|
105
104
|
>
|
|
106
|
-
{t('
|
|
105
|
+
{t('commons.resendCode')}
|
|
107
106
|
</LinkButton>
|
|
108
107
|
</KeyboardAvoidingView>
|
|
109
108
|
</View>
|
|
@@ -5,51 +5,51 @@ import type { TFunction } from 'i18next';
|
|
|
5
5
|
const displayName = (t: TFunction) =>
|
|
6
6
|
yup
|
|
7
7
|
.string()
|
|
8
|
-
.required(t('
|
|
9
|
-
.label(t('
|
|
8
|
+
.required(t('commons.displayNameRequired'))
|
|
9
|
+
.label(t('commons.displayNameRequired'));
|
|
10
10
|
|
|
11
11
|
const businessName = (t: TFunction) =>
|
|
12
12
|
yup
|
|
13
13
|
.string()
|
|
14
|
-
.required(t('
|
|
15
|
-
.label(t('
|
|
14
|
+
.required(t('commons.businessNameRequired'))
|
|
15
|
+
.label(t('commons.businessName'));
|
|
16
16
|
|
|
17
17
|
const emailForLogin = (t: TFunction) =>
|
|
18
18
|
yup
|
|
19
19
|
.string()
|
|
20
|
-
.required(t('
|
|
21
|
-
.matches(EMAIL_REGEX, t('
|
|
22
|
-
.label(t('
|
|
20
|
+
.required(t('commons.requiredEmailForLogin'))
|
|
21
|
+
.matches(EMAIL_REGEX, t('commons.validEmail'))
|
|
22
|
+
.label(t('commons.email'));
|
|
23
23
|
|
|
24
24
|
const emailForSignup = (t: TFunction) =>
|
|
25
25
|
yup
|
|
26
26
|
.string()
|
|
27
|
-
.required(t('
|
|
28
|
-
.matches(EMAIL_REGEX, t('
|
|
29
|
-
.label(t('
|
|
27
|
+
.required(t('commons.requiredEmailForSignUp'))
|
|
28
|
+
.matches(EMAIL_REGEX, t('commons.validEmail'))
|
|
29
|
+
.label(t('commons.email'));
|
|
30
30
|
|
|
31
31
|
const phoneNumber = (t: TFunction) =>
|
|
32
32
|
yup
|
|
33
33
|
.string()
|
|
34
|
-
.required(t('
|
|
35
|
-
.label(t('
|
|
34
|
+
.required(t('commons.requiredPhoneNumber'))
|
|
35
|
+
.label(t('commons.phoneNumber'));
|
|
36
36
|
|
|
37
37
|
const password = (t: TFunction) =>
|
|
38
38
|
yup
|
|
39
39
|
.string()
|
|
40
|
-
.required(t('
|
|
41
|
-
.label(t('
|
|
40
|
+
.required(t('commons.requiredPassword'))
|
|
41
|
+
.label(t('commons.password'));
|
|
42
42
|
|
|
43
43
|
const newPassword = (t: TFunction) =>
|
|
44
44
|
yup
|
|
45
45
|
.string()
|
|
46
46
|
.required()
|
|
47
|
-
.min(8, t('
|
|
48
|
-
.matches(/[a-z]/, t('
|
|
49
|
-
.matches(/[A-Z]/, t('
|
|
50
|
-
.matches(/[0-9]/, t('
|
|
51
|
-
.matches(/[!@#$%^&*(),.?":{}|<>]/, t('
|
|
52
|
-
.label(t('
|
|
47
|
+
.min(8, t('commons.minLength'))
|
|
48
|
+
.matches(/[a-z]/, t('commons.1lowerChar'))
|
|
49
|
+
.matches(/[A-Z]/, t('commons.1upperChar'))
|
|
50
|
+
.matches(/[0-9]/, t('commons.1number'))
|
|
51
|
+
.matches(/[!@#$%^&*(),.?":{}|<>]/, t('commons.1special'))
|
|
52
|
+
.label(t('commons.password'));
|
|
53
53
|
|
|
54
54
|
const code = yup.string().required().min(6);
|
|
55
55
|
|
|
@@ -3,7 +3,7 @@ import { Alert, Card, IconButton, Text, View } from '../../components';
|
|
|
3
3
|
import { RadioButton, useTheme } from 'react-native-paper';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { getCardName } from '../../utils/checkout';
|
|
6
|
-
import { CustomerCardPayment } from '
|
|
6
|
+
import { CustomerCardPayment } from '@kiosinc/commons-types';
|
|
7
7
|
|
|
8
8
|
export const CardRow = ({
|
|
9
9
|
card,
|
|
@@ -26,18 +26,18 @@ export const CardRow = ({
|
|
|
26
26
|
|
|
27
27
|
const onDeleteCard = () => {
|
|
28
28
|
Alert.show({
|
|
29
|
-
title: t('
|
|
30
|
-
description: t('
|
|
29
|
+
title: t('commons.confirmCardDelete'),
|
|
30
|
+
description: t('commons.cardDeleteDesc', {
|
|
31
31
|
card: card.cardDetails.last4,
|
|
32
32
|
}),
|
|
33
33
|
buttons: [
|
|
34
34
|
{
|
|
35
|
-
label: t('delete'),
|
|
35
|
+
label: t('commons.delete'),
|
|
36
36
|
textColor: theme.colors.error,
|
|
37
37
|
onPress: () => onDelete(card.id),
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
label: t('cancel'),
|
|
40
|
+
label: t('commons.cancel'),
|
|
41
41
|
textColor: theme.colors.onSurface,
|
|
42
42
|
},
|
|
43
43
|
],
|
|
@@ -15,7 +15,7 @@ import { onStartCardEntry } from '../../utils/square';
|
|
|
15
15
|
import { useCustomerQueries } from '../../hooks/useCustomer';
|
|
16
16
|
import { useCheckCustomer } from '../../hooks/useCheckCustomer';
|
|
17
17
|
import { CardRow } from './CardRow';
|
|
18
|
-
import { CustomerCardPayment } from '
|
|
18
|
+
import { CustomerCardPayment } from '@kiosinc/commons-types';
|
|
19
19
|
|
|
20
20
|
export const SavedCards = ({
|
|
21
21
|
onCheckout,
|
|
@@ -64,7 +64,7 @@ export const SavedCards = ({
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
const label =
|
|
67
|
-
cards.length > 0 ? t('
|
|
67
|
+
cards.length > 0 ? t('commons.payAndPlaceOrder') : t('commons.payByCard');
|
|
68
68
|
|
|
69
69
|
if (isLoading) {
|
|
70
70
|
return <ActivityIndicator />;
|
|
@@ -134,11 +134,11 @@ export const SavedCards = ({
|
|
|
134
134
|
<>
|
|
135
135
|
{cards.length > 0 ? (
|
|
136
136
|
<Text mb="8" variant="titleMedium">
|
|
137
|
-
{t('
|
|
137
|
+
{t('commons.paymentMethods')}
|
|
138
138
|
</Text>
|
|
139
139
|
) : (
|
|
140
140
|
<Text variant="bodyLarge" color="outline">
|
|
141
|
-
{t('
|
|
141
|
+
{t('commons.noSavedCards')}
|
|
142
142
|
</Text>
|
|
143
143
|
)}
|
|
144
144
|
</>
|
|
@@ -152,7 +152,7 @@ export const SavedCards = ({
|
|
|
152
152
|
icon="plus"
|
|
153
153
|
mode="text"
|
|
154
154
|
>
|
|
155
|
-
{t('
|
|
155
|
+
{t('commons.addCard')}
|
|
156
156
|
</Button>
|
|
157
157
|
</View>
|
|
158
158
|
}
|
|
@@ -169,7 +169,7 @@ export const SavedCards = ({
|
|
|
169
169
|
>
|
|
170
170
|
<View>
|
|
171
171
|
<Text variant="bodyLarge" color="onSurface">
|
|
172
|
-
{t('
|
|
172
|
+
{t('commons.total')}
|
|
173
173
|
</Text>
|
|
174
174
|
<Text variant="titleLarge" color="onSurface">
|
|
175
175
|
{total}
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
TextInput,
|
|
7
7
|
View,
|
|
8
8
|
BottomSheet,
|
|
9
|
-
} from '
|
|
9
|
+
} from '../../components';
|
|
10
10
|
import { BottomSheetTextInput } from '@gorhom/bottom-sheet';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
|
-
import { useCreateBusiness } from '
|
|
12
|
+
import { useCreateBusiness } from '../../hooks';
|
|
13
13
|
|
|
14
14
|
type CreateBusinessBottomSheetProps = {
|
|
15
15
|
isVisible: boolean;
|
|
@@ -44,7 +44,7 @@ export const CreateBusinessBottomSheet = forwardRef(
|
|
|
44
44
|
<BottomSheet pressBehavior="close" ref={ref as any}>
|
|
45
45
|
<View px="16" bg="background" flex={1}>
|
|
46
46
|
<Text pt="16" variant="titleLarge">
|
|
47
|
-
{t('
|
|
47
|
+
{t('commons.createBusiness')}
|
|
48
48
|
</Text>
|
|
49
49
|
<KeyboardAvoidingView>
|
|
50
50
|
<TextInput
|
|
@@ -55,11 +55,11 @@ export const CreateBusinessBottomSheet = forwardRef(
|
|
|
55
55
|
mode="outlined"
|
|
56
56
|
onChangeText={setName}
|
|
57
57
|
value={name}
|
|
58
|
-
label={t('
|
|
58
|
+
label={t('commons.businessName')}
|
|
59
59
|
/>
|
|
60
60
|
<View mt="16" flexDirection="row" justifyContent="flex-end">
|
|
61
61
|
<Button mode="text" onPress={close}>
|
|
62
|
-
{t('cancel')}
|
|
62
|
+
{t('commons.cancel')}
|
|
63
63
|
</Button>
|
|
64
64
|
<Button
|
|
65
65
|
loading={isLoading}
|
|
@@ -67,7 +67,7 @@ export const CreateBusinessBottomSheet = forwardRef(
|
|
|
67
67
|
mode="text"
|
|
68
68
|
onPress={onCreate}
|
|
69
69
|
>
|
|
70
|
-
{t('create')}
|
|
70
|
+
{t('commons.create')}
|
|
71
71
|
</Button>
|
|
72
72
|
</View>
|
|
73
73
|
</KeyboardAvoidingView>
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
Text,
|
|
11
11
|
View,
|
|
12
12
|
LinkButton,
|
|
13
|
-
} from '
|
|
13
|
+
} from '../../components';
|
|
14
14
|
import { FlashList } from '@shopify/flash-list';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { ActivityIndicator, useTheme } from 'react-native-paper';
|
|
@@ -18,11 +18,10 @@ import { useMMKVString } from 'react-native-mmkv';
|
|
|
18
18
|
import { type NavigationProp, useNavigation } from '@react-navigation/native';
|
|
19
19
|
import { useQueryClient } from '@tanstack/react-query';
|
|
20
20
|
import { CreateBusinessBottomSheet } from './CreateBusinessBottomSheet';
|
|
21
|
-
import { useBusinesses } from '
|
|
22
|
-
import { MMKV_KEYS } from '
|
|
23
|
-
import { useSingleSnapBottomSheetRef } from '
|
|
24
|
-
import Tick from '
|
|
25
|
-
import { useLogout } from '../auth/hooks/useLogout';
|
|
21
|
+
import { useBusinesses, useLogout } from '../../hooks';
|
|
22
|
+
import { MMKV_KEYS } from '../../constants';
|
|
23
|
+
import { useSingleSnapBottomSheetRef } from '../../utils';
|
|
24
|
+
import Tick from '../../assets/icons/tick.svg';
|
|
26
25
|
|
|
27
26
|
const BusinessCard = ({
|
|
28
27
|
business,
|
|
@@ -116,7 +115,7 @@ export const SelectBusiness = () => {
|
|
|
116
115
|
|
|
117
116
|
return (
|
|
118
117
|
<ParentView flex={1} backgroundColor="background">
|
|
119
|
-
<Header title={t('
|
|
118
|
+
<Header title={t('commons.selectBusiness')} />
|
|
120
119
|
{searchText.length === 0 && !isFetching && businesses?.length === 0 && (
|
|
121
120
|
<View
|
|
122
121
|
position="absolute"
|
|
@@ -125,7 +124,7 @@ export const SelectBusiness = () => {
|
|
|
125
124
|
alignItems={'center'}
|
|
126
125
|
justifyContent={'center'}
|
|
127
126
|
>
|
|
128
|
-
<Text alignSelf={'center'}>{t('
|
|
127
|
+
<Text alignSelf={'center'}>{t('commons.noBusiness')}</Text>
|
|
129
128
|
</View>
|
|
130
129
|
)}
|
|
131
130
|
<View px="16" flex={1}>
|
|
@@ -134,7 +133,7 @@ export const SelectBusiness = () => {
|
|
|
134
133
|
mb="12"
|
|
135
134
|
bg="inverseOnSurface"
|
|
136
135
|
value={searchText}
|
|
137
|
-
placeholder={t('
|
|
136
|
+
placeholder={t('commons.searchBusiness')}
|
|
138
137
|
onChangeText={setSearchText}
|
|
139
138
|
/>
|
|
140
139
|
{!isFetching && (
|
|
@@ -173,7 +172,7 @@ export const SelectBusiness = () => {
|
|
|
173
172
|
{!selectedBusinessId && (
|
|
174
173
|
<View justifyContent="flex-end">
|
|
175
174
|
<LinkButton mode="text" onPress={handleLogout} alignSelf={'center'}>
|
|
176
|
-
{t('
|
|
175
|
+
{t('commons.logout')}
|
|
177
176
|
</LinkButton>
|
|
178
177
|
</View>
|
|
179
178
|
)}
|