@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { ActivitiesFormValues, CustomersFormValues, BusinessTypeFormValues, NIDFormValues, OTPFormValues, ResponseData, SharedState, FlowsTypes, Activity, SalesChannel } from '
|
|
1
|
+
import { RootState } from '@store';
|
|
2
|
+
import { ActivitiesFormValues, CustomersFormValues, BusinessTypeFormValues, NIDFormValues, OTPFormValues, ResponseData, SharedState, FlowsTypes, Activity, SalesChannel } from '@types';
|
|
3
3
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
4
|
data: any;
|
|
5
5
|
leadData: any;
|
|
@@ -57,11 +57,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
57
57
|
var _a;
|
|
58
58
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
59
59
|
import moment from 'moment';
|
|
60
|
-
import API from '
|
|
61
|
-
import { BusinessType, FlowsTypes } from '
|
|
62
|
-
import { BUSINESS_FLOW_SUCCESS, BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '
|
|
63
|
-
import { convertNumbers2English, getEighteenYearsAgo, hasKey } from '
|
|
64
|
-
import { handleNextScreenStep } from '
|
|
60
|
+
import API from '@api';
|
|
61
|
+
import { BusinessType, FlowsTypes } from '@types';
|
|
62
|
+
import { BUSINESS_FLOW_SUCCESS, BUSINESS_STEP_NAMES, IDENTIFICATION_TYPE, OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '@constants';
|
|
63
|
+
import { convertNumbers2English, getEighteenYearsAgo, hasKey } from '@utils';
|
|
64
|
+
import { handleNextScreenStep } from '@app/settings';
|
|
65
65
|
export var verifyLeadToken = createAsyncThunk('businessVerifyLeadToken', function (token, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
66
|
var payload, data, leadResponse, brandInfo, boardResponse, board_id, board_info_id, steps, brandID, hasBusinessCompleted, hasBusinessCRInfoCompleted, hasBusinessCRActivitiesCompleted, hasBusinessCustomersCompleted;
|
|
67
67
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -192,7 +192,7 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
192
192
|
case 1:
|
|
193
193
|
data = (_k.sent()).data;
|
|
194
194
|
brandInfo = undefined;
|
|
195
|
-
if (!!data.errors) return [3,
|
|
195
|
+
if (!!data.errors) return [3, 14];
|
|
196
196
|
thunkApi.dispatch(updateStepName(stepName));
|
|
197
197
|
return [4, thunkApi.dispatch(retrieveEntityList({ leadId: data === null || data === void 0 ? void 0 : data.id }))];
|
|
198
198
|
case 2:
|
|
@@ -205,45 +205,47 @@ export var verifyLeadOTP = createAsyncThunk('verifyLeadOTP', function (params, t
|
|
|
205
205
|
hasBusinessCustomersCompleted = hasKey(steps, BUSINESS_STEP_NAMES.BUSINESS_CUSTOMERS);
|
|
206
206
|
if (!isNID) return [3, 3];
|
|
207
207
|
thunkApi.dispatch(handleNextScreenStep());
|
|
208
|
-
return [3,
|
|
208
|
+
return [3, 14];
|
|
209
209
|
case 3:
|
|
210
210
|
if (!hasBusinessCompleted) return [3, 5];
|
|
211
211
|
return [4, thunkApi.dispatch(retrieveBoardDetails(verifyResponse === null || verifyResponse === void 0 ? void 0 : verifyResponse.board_id))];
|
|
212
212
|
case 4:
|
|
213
213
|
_k.sent();
|
|
214
214
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
215
|
-
return [3,
|
|
215
|
+
return [3, 14];
|
|
216
216
|
case 5:
|
|
217
217
|
if (!(data.step_name === BUSINESS_STEP_NAMES.IDENTITY_AUTH)) return [3, 6];
|
|
218
218
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
219
|
-
return [3,
|
|
219
|
+
return [3, 14];
|
|
220
220
|
case 6:
|
|
221
221
|
if (!hasBusinessCustomersCompleted) return [3, 7];
|
|
222
222
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_SUCCESS_STEP'));
|
|
223
|
-
return [3,
|
|
223
|
+
return [3, 14];
|
|
224
224
|
case 7:
|
|
225
|
-
if (!hasBusinessCRActivitiesCompleted) return [3,
|
|
225
|
+
if (!hasBusinessCRActivitiesCompleted) return [3, 10];
|
|
226
226
|
thunkApi.dispatch(retrieveChannels());
|
|
227
|
-
thunkApi.dispatch(retrieveDataList());
|
|
227
|
+
return [4, thunkApi.dispatch(retrieveDataList())];
|
|
228
|
+
case 8:
|
|
229
|
+
_k.sent();
|
|
228
230
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_CUSTOMERS_STEP'));
|
|
229
231
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
230
|
-
case 8:
|
|
231
|
-
brandInfo = _k.sent();
|
|
232
|
-
return [3, 13];
|
|
233
232
|
case 9:
|
|
234
|
-
|
|
235
|
-
return [
|
|
233
|
+
brandInfo = _k.sent();
|
|
234
|
+
return [3, 14];
|
|
236
235
|
case 10:
|
|
236
|
+
if (!hasBusinessCRInfoCompleted) return [3, 13];
|
|
237
|
+
return [4, thunkApi.dispatch(retrieveChannels())];
|
|
238
|
+
case 11:
|
|
237
239
|
_k.sent();
|
|
238
240
|
return [4, API.brandService.retrieveBrand(brandID)];
|
|
239
|
-
case
|
|
241
|
+
case 12:
|
|
240
242
|
brandInfo = _k.sent();
|
|
241
243
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_ACTIVITIES_STEP'));
|
|
242
|
-
return [3,
|
|
243
|
-
case
|
|
244
|
+
return [3, 14];
|
|
245
|
+
case 13:
|
|
244
246
|
thunkApi.dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
245
|
-
_k.label =
|
|
246
|
-
case
|
|
247
|
+
_k.label = 14;
|
|
248
|
+
case 14: return [2, { data: data, formData: __assign(__assign({}, params), { isNID: isNID }), brandInfo: brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.brand }];
|
|
247
249
|
}
|
|
248
250
|
});
|
|
249
251
|
}); });
|
|
@@ -302,12 +304,16 @@ export var resendOTPLeadIdentity = createAsyncThunk('resendOTPLeadIdentity', fun
|
|
|
302
304
|
});
|
|
303
305
|
}); });
|
|
304
306
|
export var retrieveChannels = createAsyncThunk('retrieveChannels', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
305
|
-
var data;
|
|
307
|
+
var body, data;
|
|
306
308
|
return __generator(this, function (_a) {
|
|
307
309
|
switch (_a.label) {
|
|
308
|
-
case 0:
|
|
310
|
+
case 0:
|
|
311
|
+
body = {
|
|
312
|
+
page: 0
|
|
313
|
+
};
|
|
314
|
+
return [4, API.dataService.getChannelsOfServices(body)];
|
|
309
315
|
case 1:
|
|
310
|
-
data =
|
|
316
|
+
data = _a.sent();
|
|
311
317
|
return [2, data];
|
|
312
318
|
}
|
|
313
319
|
});
|
|
@@ -415,17 +421,21 @@ export var updateActivitiesInfo = createAsyncThunk('updateActivitiesInfo', funct
|
|
|
415
421
|
}
|
|
416
422
|
});
|
|
417
423
|
}); });
|
|
418
|
-
export var retrieveDataList = createAsyncThunk('
|
|
419
|
-
var _a, customerBases, expectedSales, expectedCustomerSales;
|
|
424
|
+
export var retrieveDataList = createAsyncThunk('businessRetrieveDataList', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
425
|
+
var dataBody, _a, customerBases, expectedSales, expectedCustomerSales;
|
|
420
426
|
return __generator(this, function (_b) {
|
|
421
427
|
switch (_b.label) {
|
|
422
|
-
case 0:
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
428
|
+
case 0:
|
|
429
|
+
dataBody = {
|
|
430
|
+
page: 0
|
|
431
|
+
};
|
|
432
|
+
return [4, Promise.all([
|
|
433
|
+
API.dataService.getCustomerBases(dataBody),
|
|
434
|
+
API.dataService.getExpectedSales(dataBody),
|
|
435
|
+
API.dataService.getExpectedCustomerSales(dataBody)
|
|
436
|
+
])];
|
|
427
437
|
case 1:
|
|
428
|
-
_a = _b.sent(), customerBases = _a[0]
|
|
438
|
+
_a = _b.sent(), customerBases = _a[0], expectedSales = _a[1], expectedCustomerSales = _a[2];
|
|
429
439
|
return [2, {
|
|
430
440
|
customerBases: customerBases,
|
|
431
441
|
expectedSales: expectedSales,
|
|
@@ -450,7 +460,7 @@ export var updateCustomersInfo = createAsyncThunk('updateCustomersInfo', functio
|
|
|
450
460
|
requestBody = {
|
|
451
461
|
brand: {
|
|
452
462
|
customers_base: customerBase,
|
|
453
|
-
customers_served_monthly:
|
|
463
|
+
customers_served_monthly: (_d = params.expectedCustomer) === null || _d === void 0 ? void 0 : _d.id,
|
|
454
464
|
monthly_sales_range: ((_e = params.expectedSale) === null || _e === void 0 ? void 0 : _e.id) || '',
|
|
455
465
|
agree_refund: params.refundPolicy,
|
|
456
466
|
agree_chargeback: params.transactionPolicy
|
|
@@ -609,8 +619,8 @@ export var businessSlice = createSlice({
|
|
|
609
619
|
var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
|
|
610
620
|
var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
|
|
611
621
|
var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
|
|
612
|
-
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.
|
|
613
|
-
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.
|
|
622
|
+
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'website'; });
|
|
623
|
+
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'social media'; });
|
|
614
624
|
if (isHasWebsite && (isHasTwitter || isHasInstagram))
|
|
615
625
|
selectedChannels = [websiteData, socialData];
|
|
616
626
|
else if (isHasTwitter || isHasInstagram)
|
|
@@ -620,7 +630,7 @@ export var businessSlice = createSlice({
|
|
|
620
630
|
if (((_d = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
621
631
|
selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
|
|
622
632
|
var _a;
|
|
623
|
-
return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.
|
|
633
|
+
return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.id === storedChannel; });
|
|
624
634
|
});
|
|
625
635
|
}
|
|
626
636
|
state.data.activitiesData.salesChannels = selectedChannels;
|
|
@@ -700,8 +710,8 @@ export var businessSlice = createSlice({
|
|
|
700
710
|
var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
|
|
701
711
|
var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
|
|
702
712
|
var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
|
|
703
|
-
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.
|
|
704
|
-
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.
|
|
713
|
+
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'website'; });
|
|
714
|
+
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'social media'; });
|
|
705
715
|
if (isHasWebsite && (isHasTwitter || isHasInstagram))
|
|
706
716
|
selectedChannels = [websiteData, socialData];
|
|
707
717
|
else if (isHasTwitter || isHasInstagram)
|
|
@@ -711,7 +721,7 @@ export var businessSlice = createSlice({
|
|
|
711
721
|
if (((_d = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
|
712
722
|
selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
|
|
713
723
|
var _a;
|
|
714
|
-
return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.
|
|
724
|
+
return (_a = brandInfo === null || brandInfo === void 0 ? void 0 : brandInfo.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.name.en.toLowerCase() === storedChannel.toLowerCase(); });
|
|
715
725
|
});
|
|
716
726
|
}
|
|
717
727
|
state.data.activitiesData.salesChannels = selectedChannels;
|
|
@@ -851,7 +861,7 @@ export var businessSlice = createSlice({
|
|
|
851
861
|
state.error = description;
|
|
852
862
|
return;
|
|
853
863
|
}
|
|
854
|
-
var channels = data || [];
|
|
864
|
+
var channels = data.list || [];
|
|
855
865
|
state.data.businessTypeData.responseBody = __assign(__assign({}, state.data.businessTypeData.responseBody), { channelList: channels });
|
|
856
866
|
var brand = (state.data.verify.responseBody || {}).brand;
|
|
857
867
|
var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
|
|
@@ -859,8 +869,8 @@ export var businessSlice = createSlice({
|
|
|
859
869
|
var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
|
|
860
870
|
var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
|
|
861
871
|
var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
|
|
862
|
-
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.
|
|
863
|
-
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.
|
|
872
|
+
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'website'; });
|
|
873
|
+
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name.en.toLocaleLowerCase() === 'social media'; });
|
|
864
874
|
if (isHasWebsite && (isHasTwitter || isHasInstagram))
|
|
865
875
|
selectedChannels = [websiteData, socialData];
|
|
866
876
|
else if (isHasTwitter || isHasInstagram)
|
|
@@ -927,15 +937,15 @@ export var businessSlice = createSlice({
|
|
|
927
937
|
state.error = null;
|
|
928
938
|
})
|
|
929
939
|
.addCase(retrieveDataList.fulfilled, function (state, action) {
|
|
930
|
-
var _a, _b;
|
|
940
|
+
var _a, _b, _c, _d, _e;
|
|
931
941
|
state.loading = false;
|
|
932
942
|
state.error = null;
|
|
933
943
|
var payload = action.payload;
|
|
934
|
-
var customerBases = payload.customerBases || [];
|
|
944
|
+
var customerBases = ((_a = payload.customerBases) === null || _a === void 0 ? void 0 : _a.list) || [];
|
|
935
945
|
var customerBase = customerBases === null || customerBases === void 0 ? void 0 : customerBases[1];
|
|
936
|
-
var expectedSales = payload.expectedSales || [];
|
|
937
|
-
var expectedSale = (
|
|
938
|
-
var expectedCustomerSales = payload.expectedCustomerSales || [];
|
|
946
|
+
var expectedSales = ((_b = payload.expectedSales) === null || _b === void 0 ? void 0 : _b.list) || [];
|
|
947
|
+
var expectedSale = (_d = (_c = expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales[0]) === null || _c === void 0 ? void 0 : _c.sub) === null || _d === void 0 ? void 0 : _d[4];
|
|
948
|
+
var expectedCustomerSales = ((_e = payload.expectedCustomerSales) === null || _e === void 0 ? void 0 : _e.list) || [];
|
|
939
949
|
var expectedCustomerSale = expectedCustomerSales === null || expectedCustomerSales === void 0 ? void 0 : expectedCustomerSales[3];
|
|
940
950
|
state.data.activitiesData.responseBody = __assign(__assign({}, state.data.activitiesData.responseBody), { customerBases: customerBases, expectedSales: expectedSales, expectedCustomerSales: expectedCustomerSales });
|
|
941
951
|
if (!!customerBase)
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { ResponseData, MobileFormValues, NIDFormValues, OTPFormValues, IndividualFormValues, SharedState, BrandFormValues, FlowsTypes } from '
|
|
1
|
+
import { RootState } from '@app/store';
|
|
2
|
+
import { ResponseData, MobileFormValues, NIDFormValues, CivilFormValues, OTPFormValues, IndividualFormValues, SharedState, BrandFormValues, FlowsTypes } from '@types';
|
|
3
3
|
import { CancelToken } from 'axios';
|
|
4
4
|
export declare const createMobileAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
5
5
|
response: any;
|
|
6
6
|
formData: MobileFormValues;
|
|
7
7
|
}, MobileFormValues, {}>;
|
|
8
|
+
export declare const createCivilIdAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
9
|
+
response: any;
|
|
10
|
+
formData: CivilFormValues;
|
|
11
|
+
}, CivilFormValues, {}>;
|
|
8
12
|
export declare const resendOTPMobile: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
|
|
9
13
|
export declare const createNIDAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
10
14
|
response: any;
|
|
@@ -19,6 +23,12 @@ export declare const verifyAuth: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
19
23
|
response: any;
|
|
20
24
|
formData: OTPFormValues;
|
|
21
25
|
}, OTPFormValues, {}>;
|
|
26
|
+
interface verifyPACIParams {
|
|
27
|
+
onSuccess?: () => void | Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
export declare const verifyPACI: import("@reduxjs/toolkit").AsyncThunk<{
|
|
30
|
+
response: any;
|
|
31
|
+
}, verifyPACIParams, {}>;
|
|
22
32
|
export declare const retrieveLead: import("@reduxjs/toolkit").AsyncThunk<{
|
|
23
33
|
response: any;
|
|
24
34
|
formData: {
|
|
@@ -40,6 +50,7 @@ export declare const createLead: import("@reduxjs/toolkit").AsyncThunk<{
|
|
|
40
50
|
stepName: string;
|
|
41
51
|
}, {}>;
|
|
42
52
|
export declare const retrieveBrandList: import("@reduxjs/toolkit").AsyncThunk<any, string, {}>;
|
|
53
|
+
export declare const retrieveChannels: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
|
|
43
54
|
export declare const updateLeadIndividual: import("@reduxjs/toolkit").AsyncThunk<{
|
|
44
55
|
response: any;
|
|
45
56
|
formData: IndividualFormValues;
|
|
@@ -75,6 +86,7 @@ export interface ConnectData {
|
|
|
75
86
|
nidData: NIDFormValues & ResponseData & {
|
|
76
87
|
type: string;
|
|
77
88
|
};
|
|
89
|
+
civilIdData: CivilFormValues & ResponseData;
|
|
78
90
|
otpData: OTPFormValues & ResponseData & {
|
|
79
91
|
isAbsher: boolean;
|
|
80
92
|
};
|
|
@@ -56,12 +56,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
56
56
|
};
|
|
57
57
|
var _a;
|
|
58
58
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
59
|
-
import { handleNextScreenStep } from '
|
|
60
|
-
import { FlowsTypes } from '
|
|
61
|
-
import API from '
|
|
62
|
-
import { CONNECT_STEP_NAMES, IDENTIFICATION_TYPE, INSTAGRAM_URL, OTHER_BRAND, TWITTER_URL } from '
|
|
63
|
-
import { defaultCountry } from '
|
|
64
|
-
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, getEighteenYearsAgo } from '
|
|
59
|
+
import { handleNextScreenStep } from '@app/settings';
|
|
60
|
+
import { FlowsTypes } from '@types';
|
|
61
|
+
import API from '@api';
|
|
62
|
+
import { CONNECT_STEP_NAMES, IDENTIFICATION_TYPE, INSTAGRAM_URL, OTHER_BRAND, TWITTER_URL } from '@constants';
|
|
63
|
+
import { defaultCountry } from '@constants';
|
|
64
|
+
import { getIndividualName, capitalizeTheFirstLetterOfEachWord, getEighteenYearsAgo } from '@utils';
|
|
65
65
|
export var createMobileAuth = createAsyncThunk('createMobileAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
66
|
var settings, requestBody, data;
|
|
67
67
|
var _a, _b;
|
|
@@ -90,6 +90,34 @@ export var createMobileAuth = createAsyncThunk('createMobileAuth', function (par
|
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
}); });
|
|
93
|
+
export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
94
|
+
var settings, requestBody, data;
|
|
95
|
+
var _a, _b;
|
|
96
|
+
return __generator(this, function (_c) {
|
|
97
|
+
switch (_c.label) {
|
|
98
|
+
case 0:
|
|
99
|
+
settings = thunkApi.getState().settings;
|
|
100
|
+
requestBody = {
|
|
101
|
+
lang: settings.data.language,
|
|
102
|
+
user_credentail: {
|
|
103
|
+
identification_id: params.civilId,
|
|
104
|
+
country_code: 'KW'
|
|
105
|
+
},
|
|
106
|
+
sign_in: false,
|
|
107
|
+
step_name: CONNECT_STEP_NAMES.CREATE_AUTH_CIVIL_ID,
|
|
108
|
+
encryption_contract: ['user_credentail.civil_id']
|
|
109
|
+
};
|
|
110
|
+
return [4, API.authService.createAuth(requestBody)];
|
|
111
|
+
case 1:
|
|
112
|
+
data = (_c.sent()).data;
|
|
113
|
+
if (!data.errors) {
|
|
114
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
115
|
+
(_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
116
|
+
}
|
|
117
|
+
return [2, { response: data, formData: params }];
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}); });
|
|
93
121
|
export var resendOTPMobile = createAsyncThunk('resendOTPMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
94
122
|
var _a, settings, connect, _b, mobile, countryCode, requestBody, data;
|
|
95
123
|
return __generator(this, function (_c) {
|
|
@@ -207,7 +235,7 @@ export var verifyAuth = createAsyncThunk('verifyAuth', function (params, thunkAp
|
|
|
207
235
|
return [4, API.authService.verifyAuth(payload)];
|
|
208
236
|
case 1:
|
|
209
237
|
data = (_e.sent()).data;
|
|
210
|
-
if (!!data.errors) return [3,
|
|
238
|
+
if (!!data.errors) return [3, 5];
|
|
211
239
|
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, { otp: params.otp });
|
|
212
240
|
if (!(responseBody === null || responseBody === void 0 ? void 0 : responseBody.new_user)) return [3, 2];
|
|
213
241
|
params_1 = {
|
|
@@ -215,9 +243,12 @@ export var verifyAuth = createAsyncThunk('verifyAuth', function (params, thunkAp
|
|
|
215
243
|
stepName: 'CONNECT_INDIVIDUAL_STEP'
|
|
216
244
|
};
|
|
217
245
|
thunkApi.dispatch(retrieveLead(params_1));
|
|
218
|
-
return [3,
|
|
246
|
+
return [3, 5];
|
|
219
247
|
case 2: return [4, thunkApi.dispatch(retrieveBrandList(data === null || data === void 0 ? void 0 : data.individual_id))];
|
|
220
248
|
case 3:
|
|
249
|
+
_e.sent();
|
|
250
|
+
return [4, thunkApi.dispatch(retrieveChannels())];
|
|
251
|
+
case 4:
|
|
221
252
|
_e.sent();
|
|
222
253
|
if (!(data === null || data === void 0 ? void 0 : data.lead_id)) {
|
|
223
254
|
params_2 = {
|
|
@@ -229,8 +260,52 @@ export var verifyAuth = createAsyncThunk('verifyAuth', function (params, thunkAp
|
|
|
229
260
|
else {
|
|
230
261
|
thunkApi.dispatch(handleNextScreenStep('CONNECT_MERCHANT_INFO_STEP'));
|
|
231
262
|
}
|
|
232
|
-
_e.label =
|
|
233
|
-
case
|
|
263
|
+
_e.label = 5;
|
|
264
|
+
case 5: return [2, { response: data, formData: params }];
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
}); });
|
|
268
|
+
export var verifyPACI = createAsyncThunk('verifyPACI', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
269
|
+
var _a, settings, connect, responseBody, data, params_3, params_4;
|
|
270
|
+
var _b, _c, _d, _e;
|
|
271
|
+
return __generator(this, function (_f) {
|
|
272
|
+
switch (_f.label) {
|
|
273
|
+
case 0:
|
|
274
|
+
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
275
|
+
responseBody = connect.data.civilIdData.responseBody;
|
|
276
|
+
return [4, API.authService.getVerifyAuth(responseBody === null || responseBody === void 0 ? void 0 : responseBody.auth_token)];
|
|
277
|
+
case 1:
|
|
278
|
+
data = _f.sent();
|
|
279
|
+
if (!(((_b = data.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success')) return [3, 6];
|
|
280
|
+
return [4, ((_c = params === null || params === void 0 ? void 0 : params.onSuccess) === null || _c === void 0 ? void 0 : _c.call(params))];
|
|
281
|
+
case 2:
|
|
282
|
+
_f.sent();
|
|
283
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, {});
|
|
284
|
+
if (!(responseBody === null || responseBody === void 0 ? void 0 : responseBody.new_user)) return [3, 3];
|
|
285
|
+
params_3 = {
|
|
286
|
+
leadId: data === null || data === void 0 ? void 0 : data.lead_id,
|
|
287
|
+
stepName: 'CONNECT_INDIVIDUAL_STEP'
|
|
288
|
+
};
|
|
289
|
+
thunkApi.dispatch(retrieveLead(params_3));
|
|
290
|
+
return [3, 6];
|
|
291
|
+
case 3: return [4, thunkApi.dispatch(retrieveBrandList(data === null || data === void 0 ? void 0 : data.individual_id))];
|
|
292
|
+
case 4:
|
|
293
|
+
_f.sent();
|
|
294
|
+
return [4, thunkApi.dispatch(retrieveChannels())];
|
|
295
|
+
case 5:
|
|
296
|
+
_f.sent();
|
|
297
|
+
if (!(data === null || data === void 0 ? void 0 : data.lead_id)) {
|
|
298
|
+
params_4 = {
|
|
299
|
+
individualId: data === null || data === void 0 ? void 0 : data.individual_id,
|
|
300
|
+
stepName: 'CONNECT_MERCHANT_INFO_STEP'
|
|
301
|
+
};
|
|
302
|
+
thunkApi.dispatch(createLead(params_4));
|
|
303
|
+
}
|
|
304
|
+
else {
|
|
305
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_MERCHANT_INFO_STEP'));
|
|
306
|
+
}
|
|
307
|
+
_f.label = 6;
|
|
308
|
+
case 6: return [2, { response: data }];
|
|
234
309
|
}
|
|
235
310
|
});
|
|
236
311
|
}); });
|
|
@@ -282,6 +357,21 @@ export var retrieveBrandList = createAsyncThunk('retrieveBrandList', function (i
|
|
|
282
357
|
}
|
|
283
358
|
});
|
|
284
359
|
}); });
|
|
360
|
+
export var retrieveChannels = createAsyncThunk('retrieveChannels', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
361
|
+
var body, data;
|
|
362
|
+
return __generator(this, function (_a) {
|
|
363
|
+
switch (_a.label) {
|
|
364
|
+
case 0:
|
|
365
|
+
body = {
|
|
366
|
+
page: 0
|
|
367
|
+
};
|
|
368
|
+
return [4, API.dataService.getChannelsOfServices(body)];
|
|
369
|
+
case 1:
|
|
370
|
+
data = _a.sent();
|
|
371
|
+
return [2, data];
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
}); });
|
|
285
375
|
export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
286
376
|
var _a, settings, connect, isAbsher, payload, data;
|
|
287
377
|
var _b, _c, _d, _e, _f, _g;
|
|
@@ -316,6 +406,9 @@ export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', funct
|
|
|
316
406
|
return [4, API.leadService.updateLead(payload)];
|
|
317
407
|
case 1:
|
|
318
408
|
data = _h.sent();
|
|
409
|
+
return [4, thunkApi.dispatch(retrieveChannels())];
|
|
410
|
+
case 2:
|
|
411
|
+
_h.sent();
|
|
319
412
|
thunkApi.dispatch(handleNextScreenStep());
|
|
320
413
|
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, params);
|
|
321
414
|
return [2, { response: data, formData: params }];
|
|
@@ -458,6 +551,9 @@ var initialState = {
|
|
|
458
551
|
dob: getEighteenYearsAgo(),
|
|
459
552
|
type: ''
|
|
460
553
|
},
|
|
554
|
+
civilIdData: {
|
|
555
|
+
civilId: ''
|
|
556
|
+
},
|
|
461
557
|
otpData: {
|
|
462
558
|
otp: '',
|
|
463
559
|
isAbsher: false
|
|
@@ -470,6 +566,7 @@ var initialState = {
|
|
|
470
566
|
},
|
|
471
567
|
brandData: {
|
|
472
568
|
brandName: '',
|
|
569
|
+
salesChannels: [],
|
|
473
570
|
termAndConditionChecked: false,
|
|
474
571
|
links: {
|
|
475
572
|
website: '',
|
|
@@ -547,6 +644,39 @@ export var connectSlice = createSlice({
|
|
|
547
644
|
})
|
|
548
645
|
.addCase(resendOTPMobile.rejected, function (state, action) {
|
|
549
646
|
state.error = action.error.message;
|
|
647
|
+
})
|
|
648
|
+
.addCase(createCivilIdAuth.pending, function (state, action) {
|
|
649
|
+
state.loading = true;
|
|
650
|
+
state.error = null;
|
|
651
|
+
})
|
|
652
|
+
.addCase(createCivilIdAuth.fulfilled, function (state, action) {
|
|
653
|
+
var _a;
|
|
654
|
+
state.loading = false;
|
|
655
|
+
state.error = null;
|
|
656
|
+
var _b = action.payload, formData = _b.formData, response = _b.response;
|
|
657
|
+
var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
658
|
+
if (description) {
|
|
659
|
+
state.error = description;
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
state.data.civilIdData = __assign(__assign({}, formData), { responseBody: response });
|
|
663
|
+
})
|
|
664
|
+
.addCase(createCivilIdAuth.rejected, function (state, action) {
|
|
665
|
+
state.loading = false;
|
|
666
|
+
state.error = action.error.message;
|
|
667
|
+
})
|
|
668
|
+
.addCase(verifyPACI.pending, function (state) {
|
|
669
|
+
state.loading = true;
|
|
670
|
+
state.error = null;
|
|
671
|
+
})
|
|
672
|
+
.addCase(verifyPACI.fulfilled, function (state, action) {
|
|
673
|
+
state.loading = false;
|
|
674
|
+
state.error = null;
|
|
675
|
+
state.data.otpData.responseBody = action.payload.response;
|
|
676
|
+
})
|
|
677
|
+
.addCase(verifyPACI.rejected, function (state, action) {
|
|
678
|
+
state.loading = false;
|
|
679
|
+
state.error = action.error.message;
|
|
550
680
|
})
|
|
551
681
|
.addCase(createNIDAuth.fulfilled, function (state, action) {
|
|
552
682
|
var _a;
|
|
@@ -768,6 +898,36 @@ export var connectSlice = createSlice({
|
|
|
768
898
|
.addCase(updateLeadSuccess.rejected, function (state, action) {
|
|
769
899
|
state.loading = false;
|
|
770
900
|
state.error = action.error.message;
|
|
901
|
+
})
|
|
902
|
+
.addCase(retrieveChannels.pending, function (state) {
|
|
903
|
+
state.error = null;
|
|
904
|
+
state.loading = true;
|
|
905
|
+
})
|
|
906
|
+
.addCase(retrieveChannels.fulfilled, function (state, action) {
|
|
907
|
+
state.error = null;
|
|
908
|
+
state.loading = false;
|
|
909
|
+
var data = action.payload || {};
|
|
910
|
+
var channels = data.list || [];
|
|
911
|
+
state.data.brandData.responseBody = __assign(__assign({}, state.data.brandData.responseBody), { channelList: channels });
|
|
912
|
+
var selectedChannels = [];
|
|
913
|
+
var selectedBrandItem = (state.data.brandData || {}).selectedBrandItem;
|
|
914
|
+
var _a = selectedBrandItem || {}, website = _a.website, social = _a.social;
|
|
915
|
+
var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
|
|
916
|
+
var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
|
|
917
|
+
var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
|
|
918
|
+
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.id.toLocaleLowerCase() === 'website'; });
|
|
919
|
+
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { var _a; return ((_a = c.name) === null || _a === void 0 ? void 0 : _a.en.toLocaleLowerCase()) === 'social'; });
|
|
920
|
+
if (isHasWebsite && (isHasTwitter || isHasInstagram))
|
|
921
|
+
selectedChannels = [websiteData, socialData];
|
|
922
|
+
else if (isHasTwitter || isHasInstagram)
|
|
923
|
+
selectedChannels = [socialData];
|
|
924
|
+
else if (isHasWebsite)
|
|
925
|
+
selectedChannels = [websiteData];
|
|
926
|
+
state.data.brandData.salesChannels = selectedChannels;
|
|
927
|
+
})
|
|
928
|
+
.addCase(retrieveChannels.rejected, function (state, action) {
|
|
929
|
+
state.error = action.error.message;
|
|
930
|
+
state.loading = false;
|
|
771
931
|
});
|
|
772
932
|
}
|
|
773
933
|
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { RootState } from '@store';
|
|
2
|
+
import { EntityFormValues, FlowsTypes, OTPFormValues, ResponseData, SharedState } from '@types';
|
|
3
|
+
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
4
|
+
data: any;
|
|
5
|
+
boardResponse: {
|
|
6
|
+
flows: {
|
|
7
|
+
name: string;
|
|
8
|
+
status: string;
|
|
9
|
+
url: string;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
token: string;
|
|
13
|
+
}, string, {}>;
|
|
14
|
+
export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
15
|
+
data: any;
|
|
16
|
+
}, void, {}>;
|
|
17
|
+
export declare const verifyEntityLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
18
|
+
data: any;
|
|
19
|
+
formData: OTPFormValues;
|
|
20
|
+
}, OTPFormValues, {}>;
|
|
21
|
+
export declare const retrieveBoardDetails: import("@reduxjs/toolkit").AsyncThunk<{
|
|
22
|
+
data: any;
|
|
23
|
+
}, string, {}>;
|
|
24
|
+
export declare const updateEntityInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
25
|
+
data: any;
|
|
26
|
+
formData: EntityFormValues;
|
|
27
|
+
}, EntityFormValues, {}>;
|
|
28
|
+
export declare const updateBoardSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
29
|
+
response: any;
|
|
30
|
+
formData: void;
|
|
31
|
+
} | undefined, void, {}>;
|
|
32
|
+
export declare const retrieveChannels: import("@reduxjs/toolkit").AsyncThunk<any, void, {}>;
|
|
33
|
+
declare type VerifyData = {
|
|
34
|
+
token: string;
|
|
35
|
+
};
|
|
36
|
+
export interface EntityData {
|
|
37
|
+
verify: ResponseData & VerifyData;
|
|
38
|
+
otpData: OTPFormValues & ResponseData;
|
|
39
|
+
entityData: EntityFormValues & ResponseData;
|
|
40
|
+
flowName: FlowsTypes;
|
|
41
|
+
}
|
|
42
|
+
export interface EntityState extends SharedState<EntityData> {
|
|
43
|
+
customLoading?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare const entitySlice: import("@reduxjs/toolkit").Slice<EntityState, {
|
|
46
|
+
clearError: (state: EntityState) => void;
|
|
47
|
+
stopLoader: (state: EntityState) => void;
|
|
48
|
+
resetOTPScreen: (state: EntityState) => void;
|
|
49
|
+
}, "entity/store">;
|
|
50
|
+
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
51
|
+
declare const _default: import("redux").Reducer<EntityState, import("redux").AnyAction>;
|
|
52
|
+
export default _default;
|
|
53
|
+
export declare const entitySelector: (state: RootState) => EntityState;
|