@tap-payments/auth-jsconnect 2.0.54-test → 2.0.55-test
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/build/@types/app.d.ts +39 -14
- package/build/@types/app.js +9 -0
- package/build/@types/form.d.ts +11 -0
- package/build/api/account.js +1 -1
- package/build/api/auth.d.ts +15 -2
- package/build/api/auth.js +25 -2
- package/build/api/availabilityServices.js +1 -1
- package/build/api/axios.js +4 -4
- package/build/api/board.js +1 -1
- package/build/api/brand.d.ts +1 -1
- package/build/api/brand.js +1 -1
- package/build/api/country.js +1 -1
- package/build/api/data.d.ts +33 -7
- package/build/api/data.js +42 -17
- package/build/api/entity.d.ts +2 -0
- package/build/api/entity.js +1 -1
- package/build/api/firebase.js +1 -1
- package/build/api/individual.d.ts +1 -1
- package/build/api/individual.js +1 -1
- package/build/api/ip.js +1 -1
- package/build/api/lead.d.ts +1 -1
- package/build/api/lead.js +1 -1
- package/build/api/operator.js +1 -1
- package/build/api/user.js +1 -1
- package/build/app/rootReducer.d.ts +10 -7
- package/build/app/rootReducer.js +14 -8
- package/build/app/settings.d.ts +2 -2
- package/build/app/settings.js +11 -5
- package/build/app/store.d.ts +6 -0
- package/build/assets/locales/ar.json +14 -4
- package/build/assets/locales/en.json +14 -4
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
- package/build/components/AnimationFlow/AnimationFlow.js +5 -7
- package/build/components/AnimationFlow/BottomSheet.js +2 -1
- package/build/components/AnimationFlow/Dialog.d.ts +4 -1
- package/build/components/AnimationFlow/Dialog.js +10 -5
- package/build/components/DatePicker/DatePicker.js +3 -3
- package/build/components/FileInput/DragAndDrop.d.ts +9 -1
- package/build/components/FileInput/DragAndDrop.js +115 -10
- package/build/components/FileInput/UploadInput.js +2 -2
- package/build/components/Footer/Footer.js +3 -3
- package/build/components/Input/Input.js +2 -2
- package/build/components/Lottie/Lottie.d.ts +878 -0
- package/build/components/Lottie/Lottie.js +58 -0
- package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
- package/build/components/Lottie/files/success.json +425 -0
- package/build/components/Lottie/index.d.ts +3 -0
- package/build/components/Lottie/index.js +3 -0
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
- package/build/components/ProgressBar/CircularProgressBar.js +48 -0
- package/build/components/ProgressBar/index.d.ts +2 -0
- package/build/components/ProgressBar/index.js +2 -0
- package/build/components/Providers/ThemeProvider.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.js +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +3 -2
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +29 -36
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +10 -7
- package/build/constants/app.d.ts +16 -1
- package/build/constants/app.js +76 -4
- package/build/constants/assets.d.ts +17 -1
- package/build/constants/assets.js +22 -6
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/auth/authStore.d.ts +35 -0
- package/build/features/app/auth/authStore.js +148 -0
- package/build/features/app/bank/bankStore.d.ts +6 -2
- package/build/features/app/bank/bankStore.js +46 -26
- package/build/features/app/business/businessStore.d.ts +2 -2
- package/build/features/app/business/businessStore.js +58 -48
- package/build/features/app/connect/connectStore.d.ts +14 -2
- package/build/features/app/connect/connectStore.js +170 -10
- package/build/features/app/entity/entityStore.d.ts +53 -0
- package/build/features/app/entity/entityStore.js +461 -0
- package/build/features/app/individual/individualStore.d.ts +2 -2
- package/build/features/app/individual/individualStore.js +23 -15
- package/build/features/app/otp/otpStore.d.ts +28 -0
- package/build/features/app/otp/otpStore.js +153 -0
- package/build/features/app/password/passwordStore.d.ts +2 -2
- package/build/features/app/password/passwordStore.js +4 -4
- package/build/features/app/signIn/signInStore.d.ts +2 -2
- package/build/features/app/signIn/signInStore.js +6 -6
- package/build/features/app/tax/taxStore.d.ts +2 -2
- package/build/features/app/tax/taxStore.js +5 -5
- package/build/features/auth/Auth.d.ts +10 -0
- package/build/features/auth/Auth.js +87 -0
- package/build/features/auth/index.d.ts +1 -0
- package/build/features/auth/index.js +1 -0
- package/build/features/auth/screens/OTP/OTP.d.ts +5 -0
- package/build/features/auth/screens/OTP/OTP.js +72 -0
- package/build/features/auth/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/auth/screens/OTP/OTPInput.js +44 -0
- package/build/features/auth/screens/OTP/index.d.ts +3 -0
- package/build/features/auth/screens/OTP/index.js +2 -0
- package/build/features/auth/screens/OTP/validation.d.ts +8 -0
- package/build/features/auth/screens/OTP/validation.js +4 -0
- package/build/features/bank/Bank.d.ts +1 -1
- package/build/features/bank/Bank.js +18 -12
- package/build/features/bank/screens/BankDetails/BankDetails.js +9 -9
- package/build/features/bank/screens/BankDetails/BankName.js +8 -8
- package/build/features/bank/screens/BankDetails/BankStatement.js +35 -10
- package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -7
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +5 -5
- package/build/features/bank/screens/BankDetails/IBAN.js +8 -8
- package/build/features/bank/screens/BankDetails/validation.js +1 -1
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/bank/screens/Success/Success.js +3 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
- package/build/features/bank/screens/Verify/OTPInput.js +4 -4
- package/build/features/bank/screens/Verify/Verify.js +9 -9
- package/build/features/business/Business.d.ts +2 -2
- package/build/features/business/Business.js +20 -13
- package/build/features/business/screens/Activities/Activities.js +7 -7
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
- package/build/features/business/screens/Activities/ActivitiesList.js +9 -9
- package/build/features/business/screens/Activities/LicenseName.js +6 -6
- package/build/features/business/screens/Activities/OperationStartDate.js +4 -4
- package/build/features/business/screens/Activities/SalesChannels.d.ts +1 -1
- package/build/features/business/screens/Activities/SalesChannels.js +8 -8
- package/build/features/business/screens/BusinessType/BusinessType.js +8 -8
- package/build/features/business/screens/BusinessType/LicenseList.js +10 -10
- package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -8
- package/build/features/business/screens/BusinessType/SelectType.js +6 -6
- package/build/features/business/screens/BusinessType/validation.js +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +3 -3
- package/build/features/business/screens/Customers/CustomerLocations.js +33 -15
- package/build/features/business/screens/Customers/Customers.js +8 -8
- package/build/features/business/screens/Customers/ExpectedCustomers.js +22 -10
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +39 -21
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
- package/build/features/business/screens/Customers/RefundPolicy.js +7 -7
- package/build/features/business/screens/Customers/TransactionPolicy.js +5 -5
- package/build/features/business/screens/IDBOD/DOB.js +5 -5
- package/build/features/business/screens/IDBOD/ID.js +6 -6
- package/build/features/business/screens/IDBOD/IDBOD.js +6 -6
- package/build/features/business/screens/OTP/OTP.js +9 -9
- package/build/features/business/screens/OTP/OTPInput.js +4 -4
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/business/screens/Success/Success.js +3 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
- package/build/features/business/screens/Verify/OTPInput.js +4 -4
- package/build/features/business/screens/Verify/Verify.js +9 -9
- package/build/features/connect/Connect.d.ts +3 -2
- package/build/features/connect/Connect.js +46 -16
- package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/connect/screens/CivilID/CivilID.js +85 -0
- package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
- package/build/features/connect/screens/CivilID/index.d.ts +3 -0
- package/build/features/connect/screens/CivilID/index.js +2 -0
- package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
- package/build/features/connect/screens/CivilID/validation.js +4 -0
- package/build/features/connect/screens/Individual/Email.js +7 -7
- package/build/features/connect/screens/Individual/Individual.js +14 -10
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Individual/MobileNumber.js +11 -11
- package/build/features/connect/screens/Individual/Name.js +6 -6
- package/build/features/connect/screens/Individual/validation.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +8 -8
- package/build/features/connect/screens/Merchant/BrandName.js +10 -10
- package/build/features/connect/screens/Merchant/Merchant.js +42 -18
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +5 -0
- package/build/features/connect/screens/Merchant/SalesChannels.js +114 -0
- package/build/features/connect/screens/Merchant/SocialMedia.js +65 -20
- package/build/features/connect/screens/Merchant/TAC.js +7 -7
- package/build/features/connect/screens/Merchant/validation.d.ts +87 -0
- package/build/features/connect/screens/Merchant/validation.js +69 -3
- package/build/features/connect/screens/Mobile/Mobile.js +16 -13
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Mobile/MobileNumber.js +12 -12
- package/build/features/connect/screens/Mobile/Title.js +2 -2
- package/build/features/connect/screens/NID/DOB.js +5 -5
- package/build/features/connect/screens/NID/IDNumber.js +8 -8
- package/build/features/connect/screens/NID/NID.js +8 -8
- package/build/features/connect/screens/OTP/OTP.js +9 -9
- package/build/features/connect/screens/OTP/OTPInput.js +4 -4
- package/build/features/connect/screens/ThankYou/ThankYou.js +1 -1
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +169 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +22 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
- package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyPACI/index.js +2 -0
- package/build/features/entity/Entity.d.ts +7 -0
- package/build/features/entity/Entity.js +70 -0
- package/build/features/entity/index.d.ts +1 -0
- package/build/features/entity/index.js +1 -0
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +54 -0
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +139 -0
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +56 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +17 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +28 -0
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +6 -0
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +38 -0
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +112 -0
- package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +2 -0
- package/build/features/entity/screens/EntityInfoConfirm/index.js +2 -0
- package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +107 -0
- package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -0
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
- package/build/features/entity/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/entity/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/entity/screens/Success/Success.d.ts +5 -0
- package/build/features/entity/screens/Success/Success.js +16 -0
- package/build/features/entity/screens/Success/index.d.ts +3 -0
- package/build/features/entity/screens/Success/index.js +2 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +109 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/entity/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/entity/screens/Verify/OTPInput.js +47 -0
- package/build/features/entity/screens/Verify/Verify.d.ts +5 -0
- package/build/features/entity/screens/Verify/Verify.js +78 -0
- package/build/features/entity/screens/Verify/index.d.ts +2 -0
- package/build/features/entity/screens/Verify/index.js +2 -0
- package/build/features/entity/screens/Verify/validation.d.ts +8 -0
- package/build/features/entity/screens/Verify/validation.js +4 -0
- package/build/features/featuresScreens.d.ts +4 -1
- package/build/features/featuresScreens.js +88 -40
- package/build/features/individual/Individual.d.ts +2 -2
- package/build/features/individual/Individual.js +20 -13
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +9 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +23 -12
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +19 -11
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +10 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +6 -6
- package/build/features/individual/screens/ShowIndividualInfo/info.js +1 -1
- package/build/features/individual/screens/Success/Success.js +3 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
- package/build/features/individual/screens/Verify/OTPInput.js +4 -4
- package/build/features/individual/screens/Verify/Verify.js +9 -9
- package/build/features/otp/OTP.d.ts +7 -0
- package/build/features/otp/OTP.js +58 -0
- package/build/features/otp/index.d.ts +0 -0
- package/build/features/otp/index.js +1 -0
- package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +6 -0
- package/build/features/otp/screens/OTPVerify/OTPInput.js +47 -0
- package/build/features/otp/screens/OTPVerify/Verify.d.ts +5 -0
- package/build/features/otp/screens/OTPVerify/Verify.js +49 -0
- package/build/features/otp/screens/OTPVerify/index.d.ts +2 -0
- package/build/features/otp/screens/OTPVerify/index.js +2 -0
- package/build/features/otp/screens/OTPVerify/validation.d.ts +8 -0
- package/build/features/otp/screens/OTPVerify/validation.js +4 -0
- package/build/features/password/Password.d.ts +2 -2
- package/build/features/password/Password.js +20 -13
- package/build/features/password/screens/CreatePassword/ConditionText.js +1 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +3 -3
- package/build/features/password/screens/CreatePassword/CreatePassword.js +8 -8
- package/build/features/password/screens/CreatePassword/Password.js +6 -6
- package/build/features/password/screens/OTP/OTP.js +9 -9
- package/build/features/password/screens/OTP/OTPInput.js +4 -4
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/password/screens/Success/Success.js +4 -4
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
- package/build/features/password/screens/Verify/OTPInput.js +4 -4
- package/build/features/password/screens/Verify/Verify.js +9 -9
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +4 -4
- package/build/features/shared/Background/Background.d.ts +7 -5
- package/build/features/shared/Background/Background.js +16 -5
- package/build/features/shared/Background/LogoBackground.js +3 -3
- package/build/features/shared/Button/AbsherButton.d.ts +1 -1
- package/build/features/shared/Button/AbsherButton.js +3 -3
- package/build/features/shared/Button/Button.d.ts +1 -1
- package/build/features/shared/Button/Button.js +7 -7
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +2 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +2 -2
- package/build/features/shared/Button/FlowsButtons.js +6 -6
- package/build/features/shared/Button/MobileButton.d.ts +1 -1
- package/build/features/shared/Button/MobileButton.js +3 -3
- package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
- package/build/features/shared/Dialog/CloseDialog.js +62 -0
- package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
- package/build/features/shared/Dialog/DialogContainer.js +56 -0
- package/build/features/shared/Dialog/index.d.ts +4 -0
- package/build/features/shared/Dialog/index.js +4 -0
- package/build/features/shared/Footer/Footer.js +4 -4
- package/build/features/shared/Input/Input.d.ts +2 -2
- package/build/features/shared/Input/Input.js +4 -4
- package/build/features/shared/OTP/OTP.d.ts +1 -1
- package/build/features/shared/OTP/OTP.js +3 -3
- package/build/features/shared/Search/Search.js +1 -1
- package/build/features/shared/SearchIcon/SearchIcon.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.js +5 -5
- package/build/features/shared/UploadFile/UploadFile.d.ts +8 -3
- package/build/features/shared/UploadFile/UploadFile.js +27 -12
- package/build/features/signIn/SignIn.d.ts +2 -2
- package/build/features/signIn/SignIn.js +21 -13
- package/build/features/signIn/screens/Email/Email.js +8 -8
- package/build/features/signIn/screens/Email/EmailField.js +5 -5
- package/build/features/signIn/screens/Email/validation.js +1 -1
- package/build/features/signIn/screens/Mobile/Mobile.js +9 -9
- package/build/features/signIn/screens/Mobile/MobileNumber.d.ts +1 -1
- package/build/features/signIn/screens/Mobile/MobileNumber.js +12 -12
- package/build/features/signIn/screens/OTP/OTP.js +9 -9
- package/build/features/signIn/screens/OTP/OTPInput.js +4 -4
- package/build/features/signIn/screens/Password/Password.js +7 -7
- package/build/features/signIn/screens/Password/PasswordInput.js +3 -3
- package/build/features/tax/Tax.d.ts +2 -2
- package/build/features/tax/Tax.js +21 -13
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/tax/screens/Success/Success.js +3 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +5 -5
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +6 -6
- package/build/features/tax/screens/TaxDetails/VATId.js +5 -5
- package/build/features/tax/screens/Verify/OTPInput.js +4 -4
- package/build/features/tax/screens/Verify/Verify.js +9 -9
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppConfig.d.ts +1 -1
- package/build/hooks/useAppConfig.js +6 -4
- package/build/hooks/useAppDispatch.d.ts +3 -0
- package/build/hooks/useAppSelector.d.ts +1 -1
- package/build/hooks/useAppTheme.d.ts +1 -1
- package/build/hooks/useAppTheme.js +3 -3
- package/build/hooks/useErrorListener.js +4 -3
- package/build/hooks/useLanguage.js +1 -1
- package/build/hooks/useRedirectionListener.js +1 -1
- package/build/hooks/useScreen.d.ts +3 -0
- package/build/hooks/useScreen.js +14 -0
- package/build/hooks/useStepStartedListener.js +1 -1
- package/build/i18n.js +1 -1
- package/build/index.d.ts +12 -9
- package/build/index.js +18 -9
- package/build/theme/theme.d.ts +1 -1
- package/build/utils/array.d.ts +1 -1
- package/build/utils/device.d.ts +1 -0
- package/build/utils/device.js +13 -0
- package/build/utils/html.d.ts +1 -0
- package/build/utils/html.js +6 -0
- package/build/utils/locale.d.ts +1 -1
- package/build/utils/locale.js +2 -2
- package/build/utils/rsa.d.ts +2 -2
- package/build/utils/rsa.js +2 -2
- package/build/utils/string.d.ts +23 -21
- package/build/utils/string.js +13 -4
- package/package.json +1 -1
- package/build/api/index.d.ts +0 -83
- package/build/components/DatePicker/customStyle.css +0 -86
- package/build/index.css +0 -140
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var _a;
|
|
49
|
+
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
|
+
import API from '@api';
|
|
51
|
+
import { FlowsTypes } from '@types';
|
|
52
|
+
import { handleNextScreenStep } from '@app/settings';
|
|
53
|
+
import { OTP_STEP_NAMES } from '@constants';
|
|
54
|
+
export var resendOTP = createAsyncThunk('otpResendOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
+
var otp, payload, data;
|
|
56
|
+
return __generator(this, function (_a) {
|
|
57
|
+
switch (_a.label) {
|
|
58
|
+
case 0:
|
|
59
|
+
otp = thunkApi.getState().otp;
|
|
60
|
+
payload = {
|
|
61
|
+
service_name: 'tap_email',
|
|
62
|
+
verify_token: otp.data.verify.token
|
|
63
|
+
};
|
|
64
|
+
return [4, API.leadService.verifyLeadToken(payload)];
|
|
65
|
+
case 1:
|
|
66
|
+
data = (_a.sent()).data;
|
|
67
|
+
return [2, { data: data }];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}); });
|
|
71
|
+
export var verifyOtpLeadOTP = createAsyncThunk('verifyOtpLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
72
|
+
var otp, responseBody, payload;
|
|
73
|
+
var _a;
|
|
74
|
+
return __generator(this, function (_b) {
|
|
75
|
+
otp = thunkApi.getState().otp;
|
|
76
|
+
responseBody = otp.data.verify.responseBody;
|
|
77
|
+
payload = {
|
|
78
|
+
data: params.otp,
|
|
79
|
+
service_name: (_a = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _a === void 0 ? void 0 : _a.service_name,
|
|
80
|
+
verify_token: responseBody === null || responseBody === void 0 ? void 0 : responseBody.verify_token,
|
|
81
|
+
step_name: OTP_STEP_NAMES.PHONE_AUTH,
|
|
82
|
+
encryption_contract: ['data']
|
|
83
|
+
};
|
|
84
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
85
|
+
return [2, { formData: params }];
|
|
86
|
+
});
|
|
87
|
+
}); });
|
|
88
|
+
var initialState = {
|
|
89
|
+
error: null,
|
|
90
|
+
loading: false,
|
|
91
|
+
customLoading: false,
|
|
92
|
+
data: {
|
|
93
|
+
flowName: FlowsTypes.OTP,
|
|
94
|
+
verify: {
|
|
95
|
+
token: ''
|
|
96
|
+
},
|
|
97
|
+
otpData: {
|
|
98
|
+
otp: ''
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
export var otpSlice = createSlice({
|
|
103
|
+
name: 'otp/store',
|
|
104
|
+
initialState: initialState,
|
|
105
|
+
reducers: {
|
|
106
|
+
clearError: function (state) {
|
|
107
|
+
state.error = null;
|
|
108
|
+
},
|
|
109
|
+
stopLoader: function (state) {
|
|
110
|
+
state.loading = false;
|
|
111
|
+
},
|
|
112
|
+
resetOTPScreen: function (state) {
|
|
113
|
+
state.data.otpData.otp = '';
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
extraReducers: function (builder) {
|
|
117
|
+
builder
|
|
118
|
+
.addCase(resendOTP.pending, function (state) {
|
|
119
|
+
state.error = null;
|
|
120
|
+
})
|
|
121
|
+
.addCase(resendOTP.fulfilled, function (state, action) {
|
|
122
|
+
var _a;
|
|
123
|
+
state.error = null;
|
|
124
|
+
var data = action.payload.data;
|
|
125
|
+
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
126
|
+
if (description) {
|
|
127
|
+
state.error = description;
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), data);
|
|
131
|
+
})
|
|
132
|
+
.addCase(resendOTP.rejected, function (state, action) {
|
|
133
|
+
state.error = action.error.message;
|
|
134
|
+
})
|
|
135
|
+
.addCase(verifyOtpLeadOTP.pending, function (state) {
|
|
136
|
+
state.loading = true;
|
|
137
|
+
state.error = null;
|
|
138
|
+
})
|
|
139
|
+
.addCase(verifyOtpLeadOTP.fulfilled, function (state, action) {
|
|
140
|
+
state.loading = false;
|
|
141
|
+
state.error = null;
|
|
142
|
+
var formData = action.payload.formData;
|
|
143
|
+
state.data.otpData = formData;
|
|
144
|
+
})
|
|
145
|
+
.addCase(verifyOtpLeadOTP.rejected, function (state, action) {
|
|
146
|
+
state.loading = false;
|
|
147
|
+
state.error = action.error.message;
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
export var clearError = (_a = otpSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen;
|
|
152
|
+
export default otpSlice.reducer;
|
|
153
|
+
export var otpSelector = function (state) { return state.otp; };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { FlowsTypes, OTPFormValues, PasswordCreateFormValues, ResponseData, SharedState } from '
|
|
1
|
+
import { RootState } from '@store';
|
|
2
|
+
import { FlowsTypes, OTPFormValues, PasswordCreateFormValues, ResponseData, SharedState } from '@types';
|
|
3
3
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
4
|
data: any;
|
|
5
5
|
boardResponse: {
|
|
@@ -47,10 +47,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
var _a;
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
|
-
import API from '
|
|
51
|
-
import { FlowsTypes } from '
|
|
52
|
-
import { handleCurrentActiveScreen, handleNextScreenStep } from '
|
|
53
|
-
import { BUSINESS_FLOW_SUCCESS, PASSWORD_OPERATION_TYPE, PASSWORD_STEP_NAMES } from '
|
|
50
|
+
import API from '@api';
|
|
51
|
+
import { FlowsTypes } from '@types';
|
|
52
|
+
import { handleCurrentActiveScreen, handleNextScreenStep } from '@app/settings';
|
|
53
|
+
import { BUSINESS_FLOW_SUCCESS, PASSWORD_OPERATION_TYPE, PASSWORD_STEP_NAMES } from '@constants';
|
|
54
54
|
export var verifyLeadToken = createAsyncThunk('passwordVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
55
|
var payload, data, boardInfoData, board_id, board_info_id, info, hasPasswordCompleted;
|
|
56
56
|
var _a;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { MobileFormValues, SharedState, EmailFormValues, ResponseData, OTPFormValues, PasswordFormValues } from '
|
|
1
|
+
import { RootState } from '@store';
|
|
2
|
+
import { MobileFormValues, SharedState, EmailFormValues, ResponseData, OTPFormValues, PasswordFormValues } from '@types';
|
|
3
3
|
export declare const createMobileAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
4
|
data: any;
|
|
5
5
|
formData: MobileFormValues;
|
|
@@ -47,10 +47,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
var _a;
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
|
-
import API from '
|
|
51
|
-
import { defaultCountry, SignIn_STEP_NAMES } from '
|
|
52
|
-
import { handleNextScreenStep, handleOpen } from '
|
|
53
|
-
import { getAxiosHeaders } from '
|
|
50
|
+
import API from '@api';
|
|
51
|
+
import { defaultCountry, SignIn_STEP_NAMES } from '@constants';
|
|
52
|
+
import { handleNextScreenStep, handleOpen } from '@app/settings';
|
|
53
|
+
import { getAxiosHeaders } from '@api';
|
|
54
54
|
var redirection = function (type) {
|
|
55
55
|
if (type === 1)
|
|
56
56
|
return handleNextScreenStep('SIGIN_PASSWORD_STEP');
|
|
@@ -177,7 +177,7 @@ export var verifyAuthOTP = createAsyncThunk('signIn/verifyAuthOTP', function (pa
|
|
|
177
177
|
new_user: responseBody === null || responseBody === void 0 ? void 0 : responseBody.new_user,
|
|
178
178
|
sign_in: responseBody === null || responseBody === void 0 ? void 0 : responseBody.sign_in,
|
|
179
179
|
remember_me: responseBody === null || responseBody === void 0 ? void 0 : responseBody.remember_me,
|
|
180
|
-
scopes:
|
|
180
|
+
scopes: responseBody === null || responseBody === void 0 ? void 0 : responseBody.scopes,
|
|
181
181
|
step_name: mobile ? SignIn_STEP_NAMES.VERIFY_AUTH_MOBILE_OTP : SignIn_STEP_NAMES.VERIFY_AUTH_EMAIL_OTP,
|
|
182
182
|
encryption_contract: ['data']
|
|
183
183
|
};
|
|
@@ -210,7 +210,7 @@ export var verifyAuthPassword = createAsyncThunk('signIn/verifyAuthPassword', fu
|
|
|
210
210
|
new_user: responseBody === null || responseBody === void 0 ? void 0 : responseBody.new_user,
|
|
211
211
|
sign_in: responseBody === null || responseBody === void 0 ? void 0 : responseBody.sign_in,
|
|
212
212
|
remember_me: responseBody === null || responseBody === void 0 ? void 0 : responseBody.remember_me,
|
|
213
|
-
scopes:
|
|
213
|
+
scopes: responseBody === null || responseBody === void 0 ? void 0 : responseBody.scopes,
|
|
214
214
|
step_name: mobile ? SignIn_STEP_NAMES.VERIFY_AUTH_MOBILE : SignIn_STEP_NAMES.VERIFY_AUTH_EMAIL,
|
|
215
215
|
encryption_contract: ['data']
|
|
216
216
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { FlowsTypes, OTPFormValues, ResponseData, SharedState, TaxFormValues } from '
|
|
1
|
+
import { RootState } from '@store';
|
|
2
|
+
import { FlowsTypes, OTPFormValues, ResponseData, SharedState, TaxFormValues } from '@types';
|
|
3
3
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
4
|
data: any;
|
|
5
5
|
boardResponse: any;
|
|
@@ -47,11 +47,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
var _a;
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
|
-
import API from '
|
|
51
|
-
import { FlowsTypes } from '
|
|
52
|
-
import { hasKey } from '
|
|
53
|
-
import { handleNextScreenStep, handleCurrentActiveScreen } from '
|
|
54
|
-
import { BUSINESS_FLOW_SUCCESS, TAX_STEP_NAMES } from '
|
|
50
|
+
import API from '@api';
|
|
51
|
+
import { FlowsTypes } from '@types';
|
|
52
|
+
import { hasKey } from '@utils';
|
|
53
|
+
import { handleNextScreenStep, handleCurrentActiveScreen } from '@app/settings';
|
|
54
|
+
import { BUSINESS_FLOW_SUCCESS, TAX_STEP_NAMES } from '@constants';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
56
|
var payload, data, boardData, boardInfoData, info, hasTaxCompleted;
|
|
57
57
|
var _a, _b;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { LibConfig } from '@types';
|
|
3
|
+
export interface AuthLibProps extends LibConfig {
|
|
4
|
+
leadId: string;
|
|
5
|
+
postURL: string;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function AuthLib(props: AuthLibProps): JSX.Element;
|
|
9
|
+
export declare function renderAuthLib(config: AuthLibProps, elementId: string): void;
|
|
10
|
+
export declare function unmountAuthLib(elementId: string, unmountTimeout?: number): void;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
import { memo, useEffect } from 'react';
|
|
25
|
+
import { FeatureContainer } from '@features/shared/Containers';
|
|
26
|
+
import { useAppTheme, useAppSelector, useAppConfig, useErrorListener, useStepStartedListener, useAppDispatch } from '@hooks';
|
|
27
|
+
import { settingsSelector, handleOpen } from '@app/settings';
|
|
28
|
+
import AnimationFlow from '@components/AnimationFlow';
|
|
29
|
+
import { store } from '@app/store';
|
|
30
|
+
import { authSelector, retrieveLead, storeLeadId, storePostUrl } from '@features/app/auth/authStore';
|
|
31
|
+
import { ReduxProvider, ThemeProvider } from '@components/Providers';
|
|
32
|
+
import Collapse from '@components/Collapse';
|
|
33
|
+
import { reactElement, removeElement } from '@utils';
|
|
34
|
+
import { AUTH_SCREENS_NAVIGATION, DIALOG_ID } from '@constants';
|
|
35
|
+
import { authFeatureScreens } from '../featuresScreens';
|
|
36
|
+
import Background from '../shared/Background';
|
|
37
|
+
var Auth = memo(function (_a) {
|
|
38
|
+
var onClose = _a.onClose, props = __rest(_a, ["onClose"]);
|
|
39
|
+
var theme = useAppTheme().theme;
|
|
40
|
+
var dispatch = useAppDispatch();
|
|
41
|
+
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
42
|
+
var _c = useAppSelector(authSelector), authError = _c.error, customLoading = _c.customLoading;
|
|
43
|
+
useAppConfig(__assign({ navigation: AUTH_SCREENS_NAVIGATION }, props));
|
|
44
|
+
useErrorListener(authError || error);
|
|
45
|
+
useStepStartedListener();
|
|
46
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
47
|
+
useEffect(function () {
|
|
48
|
+
if (!props.leadId)
|
|
49
|
+
throw new Error('leadId is required');
|
|
50
|
+
var _a = props || {}, leadId = _a.leadId, postURL = _a.postURL;
|
|
51
|
+
var data = {
|
|
52
|
+
leadId: leadId,
|
|
53
|
+
postUrl: postURL
|
|
54
|
+
};
|
|
55
|
+
dispatch(storeLeadId(data));
|
|
56
|
+
dispatch(storePostUrl(data));
|
|
57
|
+
}, []);
|
|
58
|
+
useEffect(function () {
|
|
59
|
+
var leadId = (props || {}).leadId;
|
|
60
|
+
if (!settingLoading)
|
|
61
|
+
dispatch(retrieveLead(leadId));
|
|
62
|
+
}, [settingLoading]);
|
|
63
|
+
var handleDialogClose = function () {
|
|
64
|
+
dispatch(handleOpen(false));
|
|
65
|
+
};
|
|
66
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ onClose: onClose, onConfirm: handleDialogClose, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, footer: _jsx(_Fragment, {}), screenId: activeScreen.name, animationType: 'collapse' }, { children: _jsx(FeatureContainer, { children: authFeatureScreens.map(function (_a, index) {
|
|
67
|
+
var Element = _a.element, name = _a.name;
|
|
68
|
+
var isActive = activeScreen.name === name;
|
|
69
|
+
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
70
|
+
}) }) })) })) })));
|
|
71
|
+
});
|
|
72
|
+
export function AuthLib(props) {
|
|
73
|
+
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Auth, __assign({}, props)) })));
|
|
74
|
+
}
|
|
75
|
+
export function renderAuthLib(config, elementId) {
|
|
76
|
+
reactElement(elementId).render(_jsx(AuthLib, __assign({}, config)));
|
|
77
|
+
}
|
|
78
|
+
export function unmountAuthLib(elementId, unmountTimeout) {
|
|
79
|
+
if (unmountTimeout === void 0) { unmountTimeout = 1000; }
|
|
80
|
+
var element = document.getElementById(elementId);
|
|
81
|
+
setTimeout(function () {
|
|
82
|
+
var _a;
|
|
83
|
+
((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
|
|
84
|
+
removeElement(DIALOG_ID);
|
|
85
|
+
reactElement(elementId).unmount();
|
|
86
|
+
}, unmountTimeout);
|
|
87
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Auth';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Auth';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import Box from '@mui/material/Box/Box';
|
|
14
|
+
import { styled } from '@mui/material/styles';
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
import { useTranslation } from 'react-i18next';
|
|
17
|
+
import Text from '@components/Text';
|
|
18
|
+
import { clearError, authSelector, resetOTPScreen, verifyAuthOTP } from '@features/app/auth/authStore';
|
|
19
|
+
import Button from '@features/shared/Button';
|
|
20
|
+
import { ScreenContainer } from '@features/shared/Containers';
|
|
21
|
+
import { useAppDispatch, useAppSelector } from '@hooks';
|
|
22
|
+
import { useLanguage } from '@hooks';
|
|
23
|
+
import { useForm, FormProvider } from 'react-hook-form';
|
|
24
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
25
|
+
import Form from '@components/Form';
|
|
26
|
+
import { maskPhone } from '@utils';
|
|
27
|
+
import { OTPValidation } from './validation';
|
|
28
|
+
import OTPInput from './OTPInput';
|
|
29
|
+
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
30
|
+
var theme = _a.theme;
|
|
31
|
+
return ({
|
|
32
|
+
background: theme.palette.common.white,
|
|
33
|
+
border: '1px solid',
|
|
34
|
+
borderColor: theme.palette.divider,
|
|
35
|
+
direction: theme.direction,
|
|
36
|
+
borderRadius: theme.spacing(0, 0, 1.25, 1.25),
|
|
37
|
+
marginBottom: theme.spacing(5.75)
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
41
|
+
var theme = _a.theme;
|
|
42
|
+
return (__assign(__assign({}, theme.typography.body1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightLight, marginBlock: theme.spacing(1.75), marginInline: theme.spacing(2.5), lineHeight: 1.75, whiteSpace: 'pre-line' }));
|
|
43
|
+
});
|
|
44
|
+
var FormStyled = styled(Form)(function () { return ({
|
|
45
|
+
display: 'flex',
|
|
46
|
+
flexDirection: 'column'
|
|
47
|
+
}); });
|
|
48
|
+
var OTP = function () {
|
|
49
|
+
var dispatch = useAppDispatch();
|
|
50
|
+
var _a = useAppSelector(authSelector), data = _a.data, loading = _a.loading, error = _a.error;
|
|
51
|
+
var methods = useForm({
|
|
52
|
+
resolver: yupResolver(OTPValidation),
|
|
53
|
+
defaultValues: { otp: '' },
|
|
54
|
+
mode: 'onChange'
|
|
55
|
+
});
|
|
56
|
+
var t = useTranslation().t;
|
|
57
|
+
var isAr = useLanguage().isAr;
|
|
58
|
+
React.useEffect(function () {
|
|
59
|
+
if (!!data.mobileNumber && error)
|
|
60
|
+
dispatch(clearError());
|
|
61
|
+
return function () {
|
|
62
|
+
dispatch(resetOTPScreen());
|
|
63
|
+
};
|
|
64
|
+
}, [methods.formState.isValid]);
|
|
65
|
+
var onSubmit = function (formData) {
|
|
66
|
+
dispatch(verifyAuthOTP(formData));
|
|
67
|
+
};
|
|
68
|
+
var disabled = !methods.formState.isValid || !!error;
|
|
69
|
+
var phone = data.mobileNumber;
|
|
70
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: maskPhone(phone) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disabled: disabled, disableBack: true, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
|
|
71
|
+
};
|
|
72
|
+
export default React.memo(OTP);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
15
|
+
import { useTranslation } from 'react-i18next';
|
|
16
|
+
import Box from '@mui/material/Box/Box';
|
|
17
|
+
import { styled } from '@mui/material/styles';
|
|
18
|
+
import OTPField from '@features/shared/OTP';
|
|
19
|
+
import { DEFAULT_TIMER_VALUE } from '@constants';
|
|
20
|
+
import { useAppDispatch } from '@hooks';
|
|
21
|
+
var BoxStyled = styled(Box)(function (_a) {
|
|
22
|
+
var theme = _a.theme;
|
|
23
|
+
return ({
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'column',
|
|
26
|
+
fontFamily: theme.typography.fontFamily
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
var OTPInput = function (_a) {
|
|
30
|
+
var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
|
|
31
|
+
var t = useTranslation().t;
|
|
32
|
+
var dispatch = useAppDispatch();
|
|
33
|
+
var otpControl = useController({ name: 'otp', control: control });
|
|
34
|
+
var handleOnOTPChange = function (otp) {
|
|
35
|
+
otpControl.field.onChange(otp);
|
|
36
|
+
};
|
|
37
|
+
var handleOnResendOTP = function () {
|
|
38
|
+
if (otpControl.field.value)
|
|
39
|
+
setValue('otp', '', { shouldValidate: true });
|
|
40
|
+
};
|
|
41
|
+
var otpValue = otpControl.field.value;
|
|
42
|
+
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
43
|
+
};
|
|
44
|
+
export default React.memo(OTPInput);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
export declare const OTPValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
|
+
otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
5
|
+
otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
6
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
7
|
+
otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
|
+
}>>>;
|
|
@@ -11,18 +11,18 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { memo, useEffect } from 'react';
|
|
14
|
-
import { useAppTheme, useAppDispatch, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener } from '
|
|
15
|
-
import { handleLanguage, settingsSelector } from '
|
|
16
|
-
import AnimationFlow from '
|
|
17
|
-
import { store } from '
|
|
18
|
-
import { ReduxProvider, ThemeProvider } from '
|
|
19
|
-
import Collapse from '
|
|
20
|
-
import { getParameterByName, reactElement } from '
|
|
21
|
-
import { FeatureContainer } from '
|
|
22
|
-
import { BANK_SCREENS_NAVIGATION } from '
|
|
14
|
+
import { useAppTheme, useAppDispatch, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener } from '@hooks';
|
|
15
|
+
import { handleLanguage, settingsSelector } from '@app/settings';
|
|
16
|
+
import AnimationFlow from '@components/AnimationFlow';
|
|
17
|
+
import { store } from '@app/store';
|
|
18
|
+
import { ReduxProvider, ThemeProvider } from '@components/Providers';
|
|
19
|
+
import Collapse from '@components/Collapse';
|
|
20
|
+
import { getParameterByName, reactElement, removeElement } from '@utils';
|
|
21
|
+
import { FeatureContainer } from '@features/shared/Containers';
|
|
22
|
+
import { BANK_SCREENS_NAVIGATION, DIALOG_ID } from '@constants';
|
|
23
23
|
import { bankFeatureScreens } from '../featuresScreens';
|
|
24
24
|
import CustomFooter from '../shared/Footer';
|
|
25
|
-
import { bankSelector, verifyLeadToken } from '
|
|
25
|
+
import { bankSelector, verifyLeadToken } from '@features/app/bank/bankStore';
|
|
26
26
|
import Background from '../shared/Background';
|
|
27
27
|
var Bank = memo(function (props) {
|
|
28
28
|
var theme = useAppTheme().theme;
|
|
@@ -46,7 +46,7 @@ var Bank = memo(function (props) {
|
|
|
46
46
|
if (!settingLoading)
|
|
47
47
|
verifyToken();
|
|
48
48
|
}, [settingLoading]);
|
|
49
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: bankFeatureScreens.map(function (_a, index) {
|
|
49
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: bankFeatureScreens.map(function (_a, index) {
|
|
50
50
|
var Element = _a.element, name = _a.name;
|
|
51
51
|
var isActive = activeScreen.name === name;
|
|
52
52
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
@@ -59,5 +59,11 @@ export function renderBankLib(config, elementId) {
|
|
|
59
59
|
reactElement(elementId).render(_jsx(BankLib, __assign({}, config)));
|
|
60
60
|
}
|
|
61
61
|
export function unmountBankLib(elementId) {
|
|
62
|
-
|
|
62
|
+
var element = document.getElementById(elementId);
|
|
63
|
+
setTimeout(function () {
|
|
64
|
+
var _a;
|
|
65
|
+
((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
|
|
66
|
+
removeElement(DIALOG_ID);
|
|
67
|
+
reactElement(elementId).unmount();
|
|
68
|
+
}, 1000);
|
|
63
69
|
}
|
|
@@ -11,21 +11,21 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import { ScreenContainer } from '
|
|
14
|
+
import { ScreenContainer } from '@features/shared/Containers';
|
|
15
15
|
import Beneficiary from './Beneficiary';
|
|
16
16
|
import IBAN from './IBAN';
|
|
17
17
|
import BankName from './BankName';
|
|
18
|
-
import Button from '
|
|
19
|
-
import { useAppDispatch, useAppSelector } from '
|
|
18
|
+
import Button from '@features/shared/Button';
|
|
19
|
+
import { useAppDispatch, useAppSelector } from '@hooks';
|
|
20
20
|
import { BankValidation } from './validation';
|
|
21
21
|
import { useTranslation } from 'react-i18next';
|
|
22
22
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
23
23
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
24
|
-
import { useLanguage } from '
|
|
24
|
+
import { useLanguage } from '@hooks';
|
|
25
25
|
import { styled } from '@mui/material/styles';
|
|
26
|
-
import { bankSelector, clearError, createBankAccount } from '
|
|
27
|
-
import Form from '
|
|
28
|
-
import { handleCurrentActiveScreen } from '
|
|
26
|
+
import { bankSelector, clearError, createBankAccount } from '@features/app/bank/bankStore';
|
|
27
|
+
import Form from '@components/Form';
|
|
28
|
+
import { handleCurrentActiveScreen } from '@app/settings';
|
|
29
29
|
import ConfirmPolicy from './ConfirmPolicy';
|
|
30
30
|
import BankStatement from './BankStatement';
|
|
31
31
|
var FormStyled = styled(Form)(function () { return ({
|
|
@@ -42,7 +42,7 @@ var ButtonStyled = styled(Button)(function (_a) {
|
|
|
42
42
|
var BankDetails = function () {
|
|
43
43
|
var _a = React.useState(false), ibanChecking = _a[0], setIbanChecking = _a[1];
|
|
44
44
|
var dispatch = useAppDispatch();
|
|
45
|
-
var _b = useAppSelector(bankSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
45
|
+
var _b = useAppSelector(bankSelector), data = _b.data, loading = _b.loading, error = _b.error, uploading = _b.uploading;
|
|
46
46
|
var methods = useForm({
|
|
47
47
|
resolver: yupResolver(BankValidation),
|
|
48
48
|
defaultValues: data.bankData,
|
|
@@ -56,7 +56,7 @@ var BankDetails = function () {
|
|
|
56
56
|
var onBack = function () {
|
|
57
57
|
dispatch(handleCurrentActiveScreen('BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
58
58
|
};
|
|
59
|
-
var disabled = ibanChecking || !methods.formState.isValid || !!error;
|
|
59
|
+
var disabled = ibanChecking || !methods.formState.isValid || !!error || uploading;
|
|
60
60
|
React.useEffect(function () {
|
|
61
61
|
if (error)
|
|
62
62
|
dispatch(clearError());
|