@tap-payments/auth-jsconnect 2.6.8-test → 2.6.8
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/README.md +1 -1
- package/build/@types/app.d.ts +73 -18
- package/build/@types/app.js +19 -1
- package/build/@types/config.d.ts +49 -0
- package/build/@types/config.js +1 -0
- package/build/@types/form.d.ts +18 -3
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/redux.d.ts +1 -0
- package/build/@types/theme.d.ts +4 -0
- package/build/@types/theme.js +5 -0
- package/build/api/account.d.ts +6 -0
- package/build/api/account.js +16 -2
- package/build/api/auth.d.ts +44 -2
- package/build/api/auth.js +18 -1
- package/build/api/availabilityServices.d.ts +1 -0
- package/build/api/country.d.ts +1 -0
- package/build/api/country.js +8 -1
- package/build/api/data.d.ts +4 -17
- package/build/api/data.js +5 -45
- package/build/api/entity.d.ts +28 -3
- package/build/api/entity.js +23 -10
- package/build/api/firebase.js +68 -8
- package/build/api/index.d.ts +24 -29
- package/build/api/lead.d.ts +27 -3
- package/build/api/lead.js +63 -1
- package/build/api/operator.d.ts +6 -3
- package/build/api/operator.js +4 -16
- package/build/api/user.d.ts +7 -0
- package/build/api/user.js +9 -1
- package/build/app/rootReducer.d.ts +2 -0
- package/build/app/rootReducer.js +5 -1
- package/build/app/settings.d.ts +13 -6
- package/build/app/settings.js +118 -78
- package/build/app/store.d.ts +4 -0
- package/build/assets/locales/ar.json +351 -143
- package/build/assets/locales/en.json +347 -142
- package/build/components/AnimationFlow/AnimationFlow.d.ts +14 -3
- package/build/components/AnimationFlow/AnimationFlow.js +16 -5
- package/build/components/AnimationFlow/BottomSheet.d.ts +7 -2
- package/build/components/AnimationFlow/BottomSheet.js +44 -15
- package/build/components/AnimationFlow/Dialog.d.ts +11 -2
- package/build/components/AnimationFlow/Dialog.js +10 -12
- package/build/components/AnimationFlow/Loader.d.ts +6 -1
- package/build/components/AnimationFlow/Loader.js +17 -5
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +2 -2
- package/build/components/ArabicDatePicker/style.css +32 -3
- package/build/components/DatePicker/DatePicker.d.ts +1 -1
- package/build/components/DatePicker/DatePicker.js +2 -2
- package/build/components/ExpandIcon/ExpandIcon.d.ts +2 -0
- package/build/components/Footer/Footer.js +2 -1
- package/build/components/Input/Input.js +1 -1
- package/build/components/Providers/ThemeProvider.js +3 -3
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/api.d.ts +9 -7
- package/build/constants/api.js +19 -15
- package/build/constants/app.d.ts +62 -0
- package/build/constants/app.js +480 -25
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +5 -1
- package/build/constants/dummy.d.ts +43 -196
- package/build/constants/dummy.js +614 -6141
- package/build/constants/flows.d.ts +24 -0
- package/build/constants/flows.js +25 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/constants/validation.d.ts +5 -0
- package/build/constants/validation.js +6 -1
- package/build/features/app/auth/authStore.d.ts +103 -0
- package/build/features/app/auth/authStore.js +1184 -0
- package/build/features/app/bank/bankStore.d.ts +13 -18
- package/build/features/app/bank/bankStore.js +194 -161
- package/build/features/app/board/boardStore.d.ts +33 -0
- package/build/features/app/board/boardStore.js +269 -0
- package/build/features/app/brand/brandStore.d.ts +17 -31
- package/build/features/app/brand/brandStore.js +272 -266
- package/build/features/app/business/businessStore.d.ts +37 -10
- package/build/features/app/business/businessStore.js +469 -218
- package/build/features/app/connect/connectStore.d.ts +46 -15
- package/build/features/app/connect/connectStore.js +419 -217
- package/build/features/app/connectExpress/connectExpressStore.d.ts +70 -29
- package/build/features/app/connectExpress/connectExpressStore.js +876 -383
- package/build/features/app/entity/entityStore.d.ts +20 -34
- package/build/features/app/entity/entityStore.js +224 -249
- package/build/features/app/individual/individualStore.d.ts +22 -32
- package/build/features/app/individual/individualStore.js +331 -290
- package/build/features/app/password/passwordStore.d.ts +33 -18
- package/build/features/app/password/passwordStore.js +263 -223
- package/build/features/app/signIn/signInStore.js +19 -15
- package/build/features/app/tax/taxStore.d.ts +13 -7
- package/build/features/app/tax/taxStore.js +178 -144
- package/build/features/auth/Auth.d.ts +14 -0
- package/build/features/auth/Auth.js +168 -0
- package/build/features/auth/index.d.ts +1 -0
- package/build/features/auth/index.js +1 -0
- package/build/features/auth/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +5 -0
- package/build/features/auth/screens/AccountCreatedLoader/AccountCreatedLoader.js +36 -0
- package/build/features/auth/screens/AccountCreatedLoader/index.d.ts +2 -0
- package/build/features/auth/screens/AccountCreatedLoader/index.js +2 -0
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.d.ts +5 -0
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +71 -0
- package/build/features/auth/screens/AccountNotFound/index.d.ts +2 -0
- package/build/features/auth/screens/AccountNotFound/index.js +2 -0
- package/build/features/auth/screens/AuthMerchant/AuthMerchant.d.ts +5 -0
- package/build/features/auth/screens/AuthMerchant/AuthMerchant.js +73 -0
- package/build/features/{connectExpress/screens/AuthenticationList → auth/screens/AuthMerchant}/MerchantList.d.ts +2 -1
- package/build/features/auth/screens/AuthMerchant/MerchantList.js +64 -0
- package/build/features/auth/screens/AuthMerchant/index.d.ts +2 -0
- package/build/features/auth/screens/AuthMerchant/index.js +2 -0
- package/build/features/auth/screens/AuthMerchant/validation.d.ts +8 -0
- package/build/features/auth/screens/AuthMerchant/validation.js +4 -0
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.d.ts +5 -0
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +58 -0
- package/build/features/auth/screens/AuthSwitch/index.d.ts +3 -0
- package/build/features/auth/screens/AuthSwitch/index.js +2 -0
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +96 -0
- package/build/features/auth/screens/AuthenticationList/BrandList.d.ts +10 -0
- package/build/features/auth/screens/AuthenticationList/BrandList.js +81 -0
- package/build/features/auth/screens/AuthenticationList/EntityLegalName.d.ts +3 -0
- package/build/features/auth/screens/AuthenticationList/EntityLegalName.js +48 -0
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +31 -0
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +90 -0
- package/build/features/auth/screens/AuthenticationList/EntityList.d.ts +11 -0
- package/build/features/auth/screens/AuthenticationList/EntityList.js +138 -0
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.js +36 -0
- package/build/features/auth/screens/AuthenticationList/index.d.ts +3 -0
- package/build/features/auth/screens/AuthenticationList/index.js +2 -0
- package/build/features/auth/screens/AuthenticationList/validation.d.ts +20 -0
- package/build/features/auth/screens/AuthenticationList/validation.js +68 -0
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +111 -0
- package/build/features/auth/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/auth/screens/BusinessCountry/index.js +2 -0
- package/build/features/auth/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/auth/screens/CivilID/CivilID.js +57 -0
- package/build/features/auth/screens/CivilID/IDNumber.d.ts +8 -0
- package/build/features/auth/screens/CivilID/IDNumber.js +54 -0
- package/build/features/auth/screens/CivilID/index.d.ts +3 -0
- package/build/features/auth/screens/CivilID/index.js +2 -0
- package/build/features/auth/screens/CivilID/validation.d.ts +8 -0
- package/build/features/auth/screens/CivilID/validation.js +4 -0
- package/build/features/auth/screens/DOB/DOB.js +47 -0
- package/build/features/auth/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/auth/screens/DOB/DOBForm.js +59 -0
- package/build/features/auth/screens/DOB/index.d.ts +3 -0
- package/build/features/auth/screens/DOB/index.js +2 -0
- package/build/features/auth/screens/DOB/validation.d.ts +8 -0
- package/build/features/auth/screens/DOB/validation.js +4 -0
- package/build/features/auth/screens/Email/Email.d.ts +5 -0
- package/build/features/auth/screens/Email/Email.js +57 -0
- package/build/features/auth/screens/Email/EmailField.d.ts +8 -0
- package/build/features/auth/screens/Email/EmailField.js +52 -0
- package/build/features/auth/screens/Email/index.d.ts +3 -0
- package/build/features/auth/screens/Email/index.js +2 -0
- package/build/features/auth/screens/Email/validation.d.ts +8 -0
- package/build/features/auth/screens/Email/validation.js +4 -0
- package/build/features/auth/screens/EmailSent/EmailSent.d.ts +5 -0
- package/build/features/auth/screens/EmailSent/EmailSent.js +79 -0
- package/build/features/auth/screens/EmailSent/index.d.ts +2 -0
- package/build/features/auth/screens/EmailSent/index.js +2 -0
- package/build/features/auth/screens/MigratingData/MigratingData.d.ts +5 -0
- package/build/features/auth/screens/MigratingData/MigratingData.js +44 -0
- package/build/features/auth/screens/MigratingData/index.d.ts +2 -0
- package/build/features/auth/screens/MigratingData/index.js +2 -0
- package/build/features/auth/screens/Mobile/Mobile.d.ts +5 -0
- package/build/features/auth/screens/Mobile/Mobile.js +82 -0
- package/build/features/auth/screens/Mobile/MobileNumber.d.ts +13 -0
- package/build/features/auth/screens/Mobile/MobileNumber.js +156 -0
- package/build/features/auth/screens/Mobile/index.d.ts +3 -0
- package/build/features/auth/screens/Mobile/index.js +2 -0
- package/build/features/auth/screens/Mobile/validation.d.ts +8 -0
- package/build/features/auth/screens/Mobile/validation.js +38 -0
- package/build/features/auth/screens/NID/IDNumber.d.ts +7 -0
- package/build/features/auth/screens/NID/IDNumber.js +55 -0
- package/build/features/auth/screens/NID/NID.d.ts +5 -0
- package/build/features/auth/screens/NID/NID.js +56 -0
- package/build/features/auth/screens/NID/index.d.ts +3 -0
- package/build/features/auth/screens/NID/index.js +2 -0
- package/build/features/auth/screens/NID/validation.d.ts +8 -0
- package/build/features/auth/screens/NID/validation.js +10 -0
- package/build/features/auth/screens/OTP/OTP.js +118 -0
- package/build/features/{connectExpress/screens/IdentityOTP → auth/screens/OTP}/OTPInput.js +27 -7
- package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
- package/build/features/auth/screens/OperatorError/index.js +2 -0
- package/build/features/auth/screens/Password/Password.d.ts +5 -0
- package/build/features/auth/screens/Password/Password.js +61 -0
- package/build/features/auth/screens/Password/PasswordField.d.ts +5 -0
- package/build/features/auth/screens/Password/PasswordField.js +28 -0
- package/build/features/auth/screens/Password/index.d.ts +3 -0
- package/build/features/auth/screens/Password/index.js +2 -0
- package/build/features/auth/screens/Password/validation.d.ts +8 -0
- package/build/features/auth/screens/Password/validation.js +4 -0
- package/build/features/auth/screens/PreparingData/PreparingData.d.ts +5 -0
- package/build/features/auth/screens/PreparingData/PreparingData.js +44 -0
- package/build/features/auth/screens/PreparingData/index.d.ts +2 -0
- package/build/features/auth/screens/PreparingData/index.js +2 -0
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.d.ts +5 -0
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.js +21 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.d.ts +3 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.js +2 -0
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/auth/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/auth/screens/VerifyNafath/index.js +2 -0
- package/build/features/auth/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/auth/screens/VerifyPACI/VerifyPACI.js +34 -0
- package/build/features/auth/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/auth/screens/VerifyPACI/index.js +2 -0
- package/build/features/bank/Bank.d.ts +6 -1
- package/build/features/bank/Bank.js +26 -12
- package/build/features/bank/screens/BankDetails/BankDetails.js +21 -7
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
- package/build/features/bank/screens/OperatorError/index.js +2 -0
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -3
- package/build/features/bank/screens/Verify/Verify.js +8 -7
- package/build/features/board/Board.d.ts +13 -0
- package/build/features/board/Board.js +87 -0
- package/build/features/board/index.d.ts +1 -0
- package/build/features/board/index.js +1 -0
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/board/screens/OperatorError/index.d.ts +3 -0
- package/build/features/board/screens/OperatorError/index.js +2 -0
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +44 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/board/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/{business/screens/OTP → board/screens/Verify}/OTPInput.js +9 -7
- package/build/features/{connectExpress/screens/IdentityOTP/OTP.js → board/screens/Verify/Verify.js} +25 -37
- package/build/features/board/screens/Verify/index.d.ts +2 -0
- package/build/features/board/screens/Verify/index.js +2 -0
- package/build/features/brand/Brand.d.ts +6 -1
- package/build/features/brand/Brand.js +26 -12
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +9 -9
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +49 -12
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +6 -6
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +1 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +5 -2
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +4 -4
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +27 -7
- package/build/features/brand/screens/BrandInfo/BrandName.js +5 -2
- package/build/features/brand/screens/BrandInfo/validation.js +2 -2
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +23 -7
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
- package/build/features/brand/screens/OperatorError/index.js +2 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -3
- package/build/features/brand/screens/Verify/Verify.js +4 -3
- package/build/features/business/Business.js +20 -12
- package/build/features/business/screens/Activities/Activities.js +27 -10
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +4 -4
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +5 -3
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +2 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +24 -8
- package/build/features/business/screens/BusinessType/EntityName.js +3 -3
- package/build/features/business/screens/BusinessType/LicenseList.js +3 -3
- package/build/features/business/screens/BusinessType/LicenseNumber.js +10 -9
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +4 -4
- package/build/features/business/screens/BusinessType/validation.d.ts +10 -0
- package/build/features/business/screens/BusinessType/validation.js +16 -0
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +14 -12
- package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
- package/build/features/business/screens/Customers/Customers.js +51 -11
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +3 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.js +5 -3
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +3 -1
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +10 -4
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +12 -5
- package/build/features/business/screens/Customers/RefundPolicy.js +13 -13
- package/build/features/business/screens/Customers/TransactionPolicy.d.ts +4 -1
- package/build/features/business/screens/Customers/TransactionPolicy.js +8 -5
- package/build/features/business/screens/Customers/validation.d.ts +6 -6
- package/build/features/business/screens/Customers/validation.js +3 -8
- package/build/features/business/screens/DOB/DOB.d.ts +6 -0
- package/build/features/business/screens/DOB/DOB.js +45 -0
- package/build/features/business/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/business/screens/DOB/DOBForm.js +72 -0
- package/build/features/business/screens/DOB/index.d.ts +3 -0
- package/build/features/business/screens/DOB/index.js +2 -0
- package/build/features/business/screens/DOB/validation.d.ts +8 -0
- package/build/features/business/screens/DOB/validation.js +4 -0
- package/build/features/business/screens/IDBOD/ID.js +6 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +18 -19
- package/build/features/business/screens/IDBOD/validation.d.ts +7 -0
- package/build/features/business/screens/IDBOD/validation.js +4 -1
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +105 -0
- package/build/features/business/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/business/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/business/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/business/screens/MobileOwnership/index.js +2 -0
- package/build/features/business/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/business/screens/MobileOwnership/validation.js +38 -0
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/business/screens/OperatorError/index.d.ts +3 -0
- package/build/features/business/screens/OperatorError/index.js +2 -0
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
- package/build/features/business/screens/Verify/Verify.js +16 -5
- package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/business/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/business/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/business/screens/VerifyNafath/index.js +2 -0
- package/build/features/connect/Connect.d.ts +5 -1
- package/build/features/connect/Connect.js +48 -31
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +4 -26
- package/build/features/connect/screens/BrandSegment/TeamSize.js +1 -1
- package/build/features/connect/screens/BrandSegment/validation.d.ts +0 -9
- package/build/features/connect/screens/BrandSegment/validation.js +0 -3
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +113 -0
- package/build/features/connect/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connect/screens/BusinessCountry/index.js +2 -0
- package/build/features/connect/screens/CivilID/CivilID.js +12 -4
- package/build/features/{connectExpress/screens/NID → connect/screens/DOB}/DOB.d.ts +1 -2
- package/build/features/connect/screens/{NID → DOB}/DOB.js +2 -2
- package/build/features/connect/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connect/screens/DOB/DOBForm.js +59 -0
- package/build/features/connect/screens/DOB/index.d.ts +3 -0
- package/build/features/connect/screens/DOB/index.js +2 -0
- package/build/features/connect/screens/DOB/validation.d.ts +8 -0
- package/build/features/connect/screens/DOB/validation.js +4 -0
- package/build/features/connect/screens/Individual/Individual.js +12 -6
- package/build/features/connect/screens/Individual/MobileNumber.js +8 -7
- package/build/features/connect/screens/Individual/validation.js +11 -3
- package/build/features/connect/screens/Merchant/BrandList.js +3 -3
- package/build/features/connect/screens/Merchant/BrandName.js +5 -2
- package/build/features/connect/screens/Merchant/Merchant.js +1 -1
- package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- package/build/features/connect/screens/Mobile/Mobile.js +14 -7
- package/build/features/connect/screens/Mobile/MobileNumber.js +15 -11
- package/build/features/connect/screens/Mobile/validation.js +11 -3
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +106 -0
- package/build/features/connect/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/connect/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/connect/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/connect/screens/MobileOwnership/index.js +2 -0
- package/build/features/connect/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/connect/screens/MobileOwnership/validation.js +38 -0
- package/build/features/connect/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connect/screens/NID/IDNumber.js +2 -2
- package/build/features/connect/screens/NID/NID.js +10 -13
- package/build/features/connect/screens/NID/validation.d.ts +0 -3
- package/build/features/connect/screens/NID/validation.js +0 -1
- package/build/features/connect/screens/OTP/OTP.js +7 -7
- package/build/features/connect/screens/OTP/OTPInput.js +3 -11
- package/build/features/connect/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connect/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connect/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connect/screens/OperatorError/index.js +2 -0
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/connect/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyNafath/index.js +2 -0
- package/build/features/connectExpress/ConnectExpress.d.ts +5 -2
- package/build/features/connectExpress/ConnectExpress.js +69 -36
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +14 -2
- package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +5 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.js +36 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/index.d.ts +2 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/index.js +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.d.ts +5 -0
- package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.js +74 -0
- package/build/features/connectExpress/screens/{AuthenticationList/TerminalList.d.ts → AuthMerchant/MerchantList.d.ts} +4 -3
- package/build/features/connectExpress/screens/AuthMerchant/MerchantList.js +64 -0
- package/build/features/connectExpress/screens/AuthMerchant/index.d.ts +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/index.js +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/AuthMerchant/validation.js +4 -0
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +28 -17
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.js +48 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +31 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +90 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +3 -3
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +52 -10
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +36 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +13 -10
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +66 -7
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +111 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.js +2 -0
- package/build/features/connectExpress/screens/CivilID/CivilID.js +16 -5
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +7 -2
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +20 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +6 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +9 -8
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +13 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +68 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +34 -7
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +9 -8
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +11 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/DOB/DOB.d.ts +6 -0
- package/build/features/connectExpress/screens/{NID → DOB}/DOB.js +3 -3
- package/build/features/connectExpress/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connectExpress/screens/DOB/DOBForm.js +63 -0
- package/build/features/connectExpress/screens/DOB/index.d.ts +3 -0
- package/build/features/connectExpress/screens/DOB/index.js +2 -0
- package/build/features/connectExpress/screens/DOB/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/DOB/validation.js +4 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +35 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +2 -0
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +2 -2
- package/build/features/connectExpress/screens/Mobile/Mobile.js +17 -7
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +18 -14
- package/build/features/connectExpress/screens/Mobile/TAC.js +1 -1
- package/build/features/connectExpress/screens/Mobile/validation.js +21 -6
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.d.ts +3 -0
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +108 -0
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.d.ts +3 -0
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.js +72 -0
- package/build/features/connectExpress/screens/MobileOwnership/index.d.ts +2 -0
- package/build/features/connectExpress/screens/MobileOwnership/index.js +2 -0
- package/build/features/connectExpress/screens/MobileOwnership/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/MobileOwnership/validation.js +38 -0
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
- package/build/features/connectExpress/screens/NID/NID.js +15 -12
- package/build/features/connectExpress/screens/NID/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/TAC.js +2 -2
- package/build/features/connectExpress/screens/NID/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/NID/validation.js +0 -2
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +6 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.js +10 -8
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +7 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.js +4 -1
- package/build/features/connectExpress/screens/OTP/OTP.js +14 -16
- package/build/features/connectExpress/screens/OTP/OTPInput.js +12 -10
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -4
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.js +2 -0
- package/build/features/entity/Entity.d.ts +5 -1
- package/build/features/entity/Entity.js +26 -12
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +4 -4
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +5 -3
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +6 -4
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +34 -10
- package/build/features/entity/screens/EntityName/EntityName.js +44 -19
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +9 -9
- package/build/features/entity/screens/EntityName/EntityTypeList.js +2 -3
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.js +13 -8
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.js +15 -8
- package/build/features/entity/screens/EntityName/LegalName.js +1 -13
- package/build/features/entity/screens/EntityName/LicenseNumber.js +10 -11
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +4 -6
- package/build/features/entity/screens/EntityName/validation.d.ts +31 -3
- package/build/features/entity/screens/EntityName/validation.js +38 -9
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
- package/build/features/entity/screens/OperatorError/index.js +2 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -3
- package/build/features/entity/screens/Verify/Verify.js +4 -3
- package/build/features/featuresScreens.d.ts +2 -0
- package/build/features/featuresScreens.js +265 -16
- package/build/features/individual/Individual.d.ts +5 -1
- package/build/features/individual/Individual.js +26 -12
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +55 -15
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +36 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +76 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +7 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +4 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +4 -3
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualList/IndividualList.js +21 -6
- package/build/features/individual/screens/IndividualList/MobileNumber.js +8 -10
- package/build/features/individual/screens/IndividualList/UserList.js +13 -9
- package/build/features/individual/screens/IndividualList/validation.js +11 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +4 -4
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +79 -21
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -5
- package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +75 -63
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +9 -11
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +11 -3
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
- package/build/features/individual/screens/OperatorError/index.js +2 -0
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -3
- package/build/features/individual/screens/Verify/Verify.js +4 -3
- package/build/features/password/Password.d.ts +5 -1
- package/build/features/password/Password.js +90 -33
- package/build/features/password/screens/CreatePassword/CreatePassword.js +10 -4
- package/build/features/password/screens/OTP/OTP.js +4 -4
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/password/screens/OperatorError/index.d.ts +3 -0
- package/build/features/password/screens/OperatorError/index.js +2 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -3
- package/build/features/password/screens/Verify/Verify.js +8 -7
- package/build/features/shared/Address/CountryList.d.ts +7 -7
- package/build/features/shared/Address/InputSelect.d.ts +7 -7
- package/build/features/shared/Background/Background.d.ts +3 -1
- package/build/features/shared/Background/Background.js +9 -11
- package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +15 -0
- package/build/features/shared/BusinessCountry/BusinessCountry.js +179 -0
- package/build/features/shared/BusinessCountry/index.d.ts +2 -0
- package/build/features/shared/BusinessCountry/index.js +2 -0
- package/build/features/shared/Button/Button.js +11 -5
- package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
- package/build/features/shared/Button/FlowsButtons.js +20 -5
- package/build/features/shared/Button/NafathButton.d.ts +8 -0
- package/build/features/shared/Button/{AbsherButton.js → NafathButton.js} +12 -3
- package/build/features/shared/Button/index.d.ts +2 -2
- package/build/features/shared/Button/index.js +2 -2
- package/build/features/shared/Calender/Calender.d.ts +2 -1
- package/build/features/shared/Calender/Calender.js +3 -3
- package/build/features/shared/Containers/FeatureContainer.d.ts +3 -1
- package/build/features/shared/Containers/FeatureContainer.js +5 -3
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/DataLoading/DataLoading.d.ts +4 -1
- package/build/features/shared/DataLoading/DataLoading.js +2 -2
- package/build/features/shared/Dialog/DialogContainer.js +5 -4
- package/build/features/shared/Footer/Footer.js +2 -1
- package/build/features/shared/Input/Input.d.ts +2 -2
- package/build/features/shared/NafathVerification/NafathVerification.d.ts +14 -0
- package/build/features/shared/NafathVerification/NafathVerification.js +92 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +8 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.js +53 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +5 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +8 -0
- package/build/features/shared/NafathVerification/index.d.ts +2 -0
- package/build/features/shared/NafathVerification/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +6 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +10 -13
- package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
- package/build/features/shared/UploadFile/FileUpload.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
- package/build/features/signIn/SignIn.js +18 -7
- package/build/features/signIn/screens/Mobile/MobileNumber.js +8 -7
- package/build/features/signIn/screens/Mobile/validation.js +11 -3
- package/build/features/signIn/screens/OTP/OTP.js +5 -4
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
- package/build/features/signIn/screens/OperatorError/index.js +2 -0
- package/build/features/tax/Tax.d.ts +5 -1
- package/build/features/tax/Tax.js +26 -12
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
- package/build/features/tax/screens/OperatorError/index.js +2 -0
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -3
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +9 -3
- package/build/features/tax/screens/Verify/Verify.js +8 -7
- package/build/hooks/index.d.ts +3 -0
- package/build/hooks/index.js +3 -0
- package/build/hooks/useAppConfig.d.ts +3 -3
- package/build/hooks/useAppConfig.js +10 -8
- package/build/hooks/useAppDispatch.d.ts +2 -0
- package/build/hooks/useAppTheme.js +4 -3
- package/build/hooks/useCountDown.d.ts +10 -0
- package/build/hooks/useCountDown.js +17 -0
- package/build/hooks/useCountry.d.ts +1 -0
- package/build/hooks/useCountry.js +4 -3
- package/build/hooks/useFormDirtyCheck.d.ts +10 -0
- package/build/hooks/useFormDirtyCheck.js +66 -0
- package/build/hooks/useSanitizedTranslation.d.ts +2 -0
- package/build/hooks/useSanitizedTranslation.js +15 -0
- package/build/hooks/useVerifyToken.d.ts +5 -2
- package/build/hooks/useVerifyToken.js +10 -5
- package/build/index.css +360 -120
- package/build/index.d.ts +4 -2
- package/build/index.js +6 -2
- package/build/theme/components.js +7 -0
- package/build/theme/palette.js +4 -2
- package/build/theme/shadows.js +1 -1
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +2 -2
- package/build/utils/array.js +2 -2
- package/build/utils/common.d.ts +3 -0
- package/build/utils/common.js +38 -2
- package/build/utils/device.d.ts +2 -0
- package/build/utils/device.js +6 -0
- package/build/utils/locale.js +2 -1
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +4 -1
- package/build/utils/string.d.ts +7 -2
- package/build/utils/string.js +32 -5
- package/build/utils/validation.d.ts +5 -0
- package/build/utils/validation.js +16 -0
- package/package.json +2 -2
- package/build/features/business/screens/OTP/OTP.d.ts +0 -8
- package/build/features/business/screens/OTP/OTP.js +0 -90
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentLocations.js +0 -66
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentProfits.js +0 -66
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +0 -66
- package/build/features/connectExpress/screens/AuthenticationList/MerchantList.js +0 -100
- package/build/features/connectExpress/screens/AuthenticationList/TerminalList.js +0 -101
- package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
- package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
- package/build/features/shared/Button/AbsherButton.d.ts +0 -8
- /package/build/features/{connect/screens/NID → auth/screens/DOB}/DOB.d.ts +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP → auth/screens/OTP}/OTP.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/OTPInput.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/index.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/index.js +0 -0
- /package/build/features/{business → auth}/screens/OTP/validation.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/validation.js +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP/OTPInput.d.ts → board/screens/Verify/Verify.d.ts} +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP → board/screens/Verify}/validation.d.ts +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP → board/screens/Verify}/validation.js +0 -0
|
@@ -67,24 +67,44 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
67
67
|
};
|
|
68
68
|
var _a;
|
|
69
69
|
import API from '../../../api';
|
|
70
|
-
import { handleNextScreenStep } from '../../../app/settings';
|
|
71
|
-
import { CONNECT_STEP_NAMES, defaultCountry, IDENTIFICATION_TYPE, OTHER_BRAND } from '../../../constants';
|
|
70
|
+
import { handleCurrentActiveScreen, handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
71
|
+
import { COLLECT_DOB_INFO_NAFATH, CONNECT_STEP_NAMES, defaultCountry, IDENTIFICATION_TYPE, NAFATH_VERIFICATION_FAILED, OTHER_BRAND } from '../../../constants';
|
|
72
72
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
73
73
|
import { AuthForType, FlowsTypes } from '../../../@types';
|
|
74
|
-
import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM } from '../../../utils';
|
|
74
|
+
import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM, isOtherThanKWOrSA, isKW, findCountryByIso2, getMetaData, isNetworkError } from '../../../utils';
|
|
75
|
+
export var updateBusinessCountry = createAsyncThunk('connect/updateBusinessCountry', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
+
var connect, payload, data;
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
switch (_a.label) {
|
|
79
|
+
case 0:
|
|
80
|
+
connect = thunkApi.getState().connect;
|
|
81
|
+
payload = {
|
|
82
|
+
id: connect.data.leadId || '',
|
|
83
|
+
country_code: countryCode,
|
|
84
|
+
encryption_contract: []
|
|
85
|
+
};
|
|
86
|
+
return [4, API.leadService.updateLead(payload)];
|
|
87
|
+
case 1:
|
|
88
|
+
data = _a.sent();
|
|
89
|
+
return [2, data];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}); });
|
|
75
93
|
export var createMobileAuth = createAsyncThunk('createMobileAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
-
var settings, requestBody, data;
|
|
77
|
-
var _a, _b;
|
|
78
|
-
return __generator(this, function (
|
|
79
|
-
switch (
|
|
94
|
+
var settings, isStartWithZero, mobileNumber, requestBody, data;
|
|
95
|
+
var _a, _b, _c;
|
|
96
|
+
return __generator(this, function (_d) {
|
|
97
|
+
switch (_d.label) {
|
|
80
98
|
case 0:
|
|
81
99
|
settings = thunkApi.getState().settings;
|
|
100
|
+
isStartWithZero = (_a = params.mobile) === null || _a === void 0 ? void 0 : _a.startsWith('0');
|
|
101
|
+
mobileNumber = isStartWithZero ? params.mobile.slice(1) : params.mobile;
|
|
82
102
|
requestBody = {
|
|
83
103
|
country: settings.data.businessCountry.iso2,
|
|
84
104
|
scope: settings.data.appConfig.scope,
|
|
85
105
|
lang: settings.data.language,
|
|
86
106
|
user_credentail: {
|
|
87
|
-
phone:
|
|
107
|
+
phone: mobileNumber || '',
|
|
88
108
|
code: params.countryCode.idd_prefix.toString()
|
|
89
109
|
},
|
|
90
110
|
sign_in: false,
|
|
@@ -94,9 +114,9 @@ export var createMobileAuth = createAsyncThunk('createMobileAuth', function (par
|
|
|
94
114
|
};
|
|
95
115
|
return [4, API.authService.createAuth(requestBody)];
|
|
96
116
|
case 1:
|
|
97
|
-
data =
|
|
117
|
+
data = _d.sent();
|
|
98
118
|
thunkApi.dispatch(handleNextScreenStep());
|
|
99
|
-
(
|
|
119
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
100
120
|
return [2, { response: data, formData: params }];
|
|
101
121
|
}
|
|
102
122
|
});
|
|
@@ -131,18 +151,20 @@ export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (p
|
|
|
131
151
|
});
|
|
132
152
|
}); });
|
|
133
153
|
export var resendOTPMobile = createAsyncThunk('resendOTPMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
134
|
-
var _a, settings, connect, _b, mobile, countryCode, requestBody;
|
|
154
|
+
var _a, settings, connect, _b, mobile, countryCode, isStartWithZero, mobileNumber, requestBody;
|
|
135
155
|
return __generator(this, function (_c) {
|
|
136
156
|
switch (_c.label) {
|
|
137
157
|
case 0:
|
|
138
158
|
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
139
159
|
_b = connect.data.mobileData, mobile = _b.mobile, countryCode = _b.countryCode;
|
|
160
|
+
isStartWithZero = mobile === null || mobile === void 0 ? void 0 : mobile.startsWith('0');
|
|
161
|
+
mobileNumber = isStartWithZero ? mobile.slice(1) : mobile;
|
|
140
162
|
requestBody = {
|
|
141
163
|
country: settings.data.businessCountry.iso2,
|
|
142
164
|
scope: settings.data.appConfig.scope,
|
|
143
165
|
lang: settings.data.language,
|
|
144
166
|
user_credentail: {
|
|
145
|
-
phone:
|
|
167
|
+
phone: mobileNumber || '',
|
|
146
168
|
code: countryCode.idd_prefix.toString()
|
|
147
169
|
},
|
|
148
170
|
sign_in: false,
|
|
@@ -155,75 +177,33 @@ export var resendOTPMobile = createAsyncThunk('resendOTPMobile', function (param
|
|
|
155
177
|
}
|
|
156
178
|
});
|
|
157
179
|
}); });
|
|
158
|
-
export var
|
|
159
|
-
var
|
|
160
|
-
return __generator(this, function (_c) {
|
|
161
|
-
switch (_c.label) {
|
|
162
|
-
case 0:
|
|
163
|
-
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
164
|
-
_b = connect.data.nidData, nid = _b.nid, dob = _b.dob;
|
|
165
|
-
identification_id_type = nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
|
|
166
|
-
requestBody = {
|
|
167
|
-
country: settings.data.businessCountry.iso2,
|
|
168
|
-
scope: settings.data.appConfig.scope,
|
|
169
|
-
lang: settings.data.language,
|
|
170
|
-
user_credentail: {
|
|
171
|
-
identification_id: nid,
|
|
172
|
-
identification_id_type: identification_id_type,
|
|
173
|
-
date_of_birth: dob,
|
|
174
|
-
country_code: settings.data.businessCountry.iso2
|
|
175
|
-
},
|
|
176
|
-
sign_in: false,
|
|
177
|
-
is_lead: true,
|
|
178
|
-
step_name: CONNECT_STEP_NAMES.CREATE_AUTH_NID,
|
|
179
|
-
encryption_contract: [
|
|
180
|
-
'user_credentail.country_code',
|
|
181
|
-
'user_credentail.identification_id',
|
|
182
|
-
'user_credentail.identification_id_type',
|
|
183
|
-
'user_credentail.date_of_birth'
|
|
184
|
-
]
|
|
185
|
-
};
|
|
186
|
-
return [4, API.authService.createAuth(requestBody)];
|
|
187
|
-
case 1:
|
|
188
|
-
data = _c.sent();
|
|
189
|
-
return [2, data];
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
}); });
|
|
193
|
-
export var createNIDAuth = createAsyncThunk('createNIDAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
194
|
-
var settings, identification_id_type, requestBody, data;
|
|
180
|
+
export var createNafathAuth = createAsyncThunk('connect/createNafathAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
181
|
+
var settings, requestBody, data;
|
|
195
182
|
var _a, _b;
|
|
196
183
|
return __generator(this, function (_c) {
|
|
197
184
|
switch (_c.label) {
|
|
198
185
|
case 0:
|
|
199
186
|
settings = thunkApi.getState().settings;
|
|
200
|
-
identification_id_type = params.nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
|
|
201
187
|
requestBody = {
|
|
202
188
|
country: settings.data.businessCountry.iso2,
|
|
203
189
|
scope: settings.data.appConfig.scope,
|
|
204
190
|
lang: settings.data.language,
|
|
205
191
|
user_credentail: {
|
|
206
192
|
identification_id: params.nid,
|
|
207
|
-
identification_id_type:
|
|
208
|
-
date_of_birth: params.dob,
|
|
193
|
+
identification_id_type: IDENTIFICATION_TYPE.NAFATH,
|
|
209
194
|
country_code: settings.data.businessCountry.iso2
|
|
210
195
|
},
|
|
211
196
|
sign_in: false,
|
|
212
197
|
is_lead: true,
|
|
213
198
|
step_name: CONNECT_STEP_NAMES.CREATE_AUTH_NID,
|
|
214
|
-
encryption_contract: [
|
|
215
|
-
'user_credentail.country_code',
|
|
216
|
-
'user_credentail.identification_id',
|
|
217
|
-
'user_credentail.identification_id_type',
|
|
218
|
-
'user_credentail.date_of_birth'
|
|
219
|
-
]
|
|
199
|
+
encryption_contract: ['user_credentail.country_code', 'user_credentail.identification_id', 'user_credentail.identification_id_type']
|
|
220
200
|
};
|
|
221
|
-
return [4, API.authService.
|
|
201
|
+
return [4, API.authService.createAuthKitNID(requestBody)];
|
|
222
202
|
case 1:
|
|
223
203
|
data = _c.sent();
|
|
224
204
|
thunkApi.dispatch(handleNextScreenStep());
|
|
225
|
-
(_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody
|
|
226
|
-
return [2, { response: data, formData: __assign(__assign({}, params), { type:
|
|
205
|
+
(_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody);
|
|
206
|
+
return [2, { response: data, formData: __assign(__assign({}, params), { type: IDENTIFICATION_TYPE.NAFATH }) }];
|
|
227
207
|
}
|
|
228
208
|
});
|
|
229
209
|
}); });
|
|
@@ -382,6 +362,129 @@ export var verifyPACI = createAsyncThunk('connect/verifyPACI', function (params,
|
|
|
382
362
|
}
|
|
383
363
|
});
|
|
384
364
|
}); });
|
|
365
|
+
export var verifyNafath = createAsyncThunk('connect/verifyNafath', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
366
|
+
var _a, settings, connect, responseBody, expiry, interval, maxCalls, count, authResponse, error_1, isSuccess, isFailed, countryCode, lead_id, leadResponse, channels, brand, err_5, brands, err_6, phone, isNextScreenDob, stepName;
|
|
367
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
|
368
|
+
return __generator(this, function (_j) {
|
|
369
|
+
switch (_j.label) {
|
|
370
|
+
case 0:
|
|
371
|
+
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
372
|
+
responseBody = connect.data.nidData.responseBody;
|
|
373
|
+
expiry = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.expiry) || 120;
|
|
374
|
+
interval = 3;
|
|
375
|
+
maxCalls = Math.floor(expiry / interval);
|
|
376
|
+
count = 1;
|
|
377
|
+
_j.label = 1;
|
|
378
|
+
case 1:
|
|
379
|
+
if (!(count <= maxCalls)) return [3, 19];
|
|
380
|
+
if (thunkApi.signal.aborted) {
|
|
381
|
+
return [3, 19];
|
|
382
|
+
}
|
|
383
|
+
authResponse = void 0;
|
|
384
|
+
_j.label = 2;
|
|
385
|
+
case 2:
|
|
386
|
+
_j.trys.push([2, 4, , 5]);
|
|
387
|
+
return [4, API.authService.getVerifyAuth(responseBody === null || responseBody === void 0 ? void 0 : responseBody.auth_token)];
|
|
388
|
+
case 3:
|
|
389
|
+
authResponse = _j.sent();
|
|
390
|
+
return [3, 5];
|
|
391
|
+
case 4:
|
|
392
|
+
error_1 = _j.sent();
|
|
393
|
+
if (!isNetworkError(error_1.message)) {
|
|
394
|
+
throw new Error(error_1);
|
|
395
|
+
}
|
|
396
|
+
return [3, 5];
|
|
397
|
+
case 5:
|
|
398
|
+
isSuccess = ((_b = authResponse === null || authResponse === void 0 ? void 0 : authResponse.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
|
|
399
|
+
isFailed = ((_c = authResponse === null || authResponse === void 0 ? void 0 : authResponse.status) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === 'failed';
|
|
400
|
+
countryCode = settings.data.businessCountry;
|
|
401
|
+
if (isFailed) {
|
|
402
|
+
(_d = params.onFailure) === null || _d === void 0 ? void 0 : _d.call(params);
|
|
403
|
+
return [2, { authResponse: authResponse, countryCode: countryCode }];
|
|
404
|
+
}
|
|
405
|
+
if (!isSuccess) return [3, 16];
|
|
406
|
+
lead_id = authResponse.lead_id;
|
|
407
|
+
if (!lead_id)
|
|
408
|
+
throw new Error('Lead id is missing');
|
|
409
|
+
return [4, API.leadService.retrieveLead(lead_id)];
|
|
410
|
+
case 6:
|
|
411
|
+
leadResponse = (_j.sent()).data;
|
|
412
|
+
if ((_e = leadResponse.errors) === null || _e === void 0 ? void 0 : _e.length)
|
|
413
|
+
throw new Error(leadResponse.errors[0].description);
|
|
414
|
+
return [4, API.dataService.getChannelsOfServices({ page: 0 })];
|
|
415
|
+
case 7:
|
|
416
|
+
channels = (_j.sent()).list;
|
|
417
|
+
leadResponse.channel_list = channels;
|
|
418
|
+
_j.label = 8;
|
|
419
|
+
case 8:
|
|
420
|
+
_j.trys.push([8, 10, , 11]);
|
|
421
|
+
return [4, API.brandService.retrieveBrand(leadResponse.brand.id)];
|
|
422
|
+
case 9:
|
|
423
|
+
brand = (_j.sent()).brand;
|
|
424
|
+
leadResponse.brand = __assign(__assign({}, leadResponse.brand), brand);
|
|
425
|
+
return [3, 11];
|
|
426
|
+
case 10:
|
|
427
|
+
err_5 = _j.sent();
|
|
428
|
+
return [3, 11];
|
|
429
|
+
case 11:
|
|
430
|
+
_j.trys.push([11, 13, , 14]);
|
|
431
|
+
return [4, API.brandService.getBrandList({ individual_id: leadResponse.individual_id })];
|
|
432
|
+
case 12:
|
|
433
|
+
brands = (_j.sent()).brands;
|
|
434
|
+
leadResponse.brand_list = fixBrandList(brands, channels);
|
|
435
|
+
return [3, 14];
|
|
436
|
+
case 13:
|
|
437
|
+
err_6 = _j.sent();
|
|
438
|
+
return [3, 14];
|
|
439
|
+
case 14:
|
|
440
|
+
(_f = params.onSuccess) === null || _f === void 0 ? void 0 : _f.call(params);
|
|
441
|
+
return [4, sleep(3000)];
|
|
442
|
+
case 15:
|
|
443
|
+
_j.sent();
|
|
444
|
+
phone = (leadResponse.contact || {}).phone;
|
|
445
|
+
if (phone === null || phone === void 0 ? void 0 : phone.country_code)
|
|
446
|
+
countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
|
|
447
|
+
(_h = (_g = settings.data.appConfig).onStepCompleted) === null || _h === void 0 ? void 0 : _h.call(_g, settings.data.activeScreen.name, {});
|
|
448
|
+
isNextScreenDob = (authResponse === null || authResponse === void 0 ? void 0 : authResponse.step_name) === COLLECT_DOB_INFO_NAFATH;
|
|
449
|
+
stepName = isNextScreenDob ? 'CONNECT_DOB_STEP' : 'CONNECT_INDIVIDUAL_STEP';
|
|
450
|
+
thunkApi.dispatch(handleNextScreenStep(stepName));
|
|
451
|
+
return [2, { authResponse: authResponse, leadResponse: leadResponse, countryCode: countryCode, isNextScreenDob: isNextScreenDob }];
|
|
452
|
+
case 16: return [4, sleep(interval * 1000)];
|
|
453
|
+
case 17:
|
|
454
|
+
_j.sent();
|
|
455
|
+
_j.label = 18;
|
|
456
|
+
case 18:
|
|
457
|
+
count++;
|
|
458
|
+
return [3, 1];
|
|
459
|
+
case 19: throw new Error(NAFATH_VERIFICATION_FAILED);
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
}); });
|
|
463
|
+
export var updateLeadDOB = createAsyncThunk('connect/updateLeadDOB', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
464
|
+
var _a, settings, connect, lead_id, brandData, payload, leadResponse;
|
|
465
|
+
var _b, _c;
|
|
466
|
+
return __generator(this, function (_d) {
|
|
467
|
+
switch (_d.label) {
|
|
468
|
+
case 0:
|
|
469
|
+
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
470
|
+
lead_id = (connect.data.otpData.responseBody || {}).lead_id;
|
|
471
|
+
brandData = (connect.data.brandData.responseBody || {}).brandData;
|
|
472
|
+
payload = {
|
|
473
|
+
id: lead_id || '',
|
|
474
|
+
date_of_birth: params.dob,
|
|
475
|
+
step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_DOB,
|
|
476
|
+
encryption_contract: ['date_of_birth']
|
|
477
|
+
};
|
|
478
|
+
return [4, API.leadService.updateLead(payload)];
|
|
479
|
+
case 1:
|
|
480
|
+
leadResponse = _d.sent();
|
|
481
|
+
leadResponse.brand = __assign(__assign({}, leadResponse.brand), brandData);
|
|
482
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, params);
|
|
483
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
484
|
+
return [2, { leadResponse: leadResponse, formData: params }];
|
|
485
|
+
}
|
|
486
|
+
});
|
|
487
|
+
}); });
|
|
385
488
|
export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
386
489
|
var _a, settings, connect, lead_id, brandData, phoneCountry, payload, leadResponse;
|
|
387
490
|
var _b, _c, _d, _e, _f;
|
|
@@ -397,6 +500,7 @@ export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', funct
|
|
|
397
500
|
country_code: (_d = settings.data.businessCountry) === null || _d === void 0 ? void 0 : _d.iso2,
|
|
398
501
|
name: getIndividualName(params.name),
|
|
399
502
|
contact: __assign({ email: params.email }, (params.mobile && { phone: { country_code: phoneCountry, number: params.mobile } })),
|
|
503
|
+
metadata: getMetaData(),
|
|
400
504
|
step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_INDIVIDUAL,
|
|
401
505
|
encryption_contract: ['name.first', 'name.middle', 'name.last', 'contact.email', 'contact.phone.country_code', 'contact.phone.number']
|
|
402
506
|
};
|
|
@@ -405,60 +509,55 @@ export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', funct
|
|
|
405
509
|
leadResponse = _g.sent();
|
|
406
510
|
leadResponse.brand = __assign(__assign({}, leadResponse.brand), brandData);
|
|
407
511
|
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
|
|
408
|
-
|
|
512
|
+
if (leadResponse.step_name === CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP) {
|
|
513
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_MOBILE_OWNERSHIP'));
|
|
514
|
+
}
|
|
515
|
+
else {
|
|
516
|
+
thunkApi.dispatch(handleNextScreenStep('CONNECT_MERCHANT_INFO_STEP'));
|
|
517
|
+
}
|
|
409
518
|
return [2, { leadResponse: leadResponse, formData: params }];
|
|
410
519
|
}
|
|
411
520
|
});
|
|
412
521
|
}); });
|
|
413
|
-
export var retrieveLead = createAsyncThunk('connect/retrieveLead', function (
|
|
414
|
-
var settings, data, countryCode, phone;
|
|
415
|
-
var _a;
|
|
416
|
-
return __generator(this, function (
|
|
417
|
-
switch (
|
|
522
|
+
export var retrieveLead = createAsyncThunk('connect/retrieveLead', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
523
|
+
var leadId, isRedirect, settings, data, countryCode, code, phone;
|
|
524
|
+
var _a, _b, _c, _d;
|
|
525
|
+
return __generator(this, function (_e) {
|
|
526
|
+
switch (_e.label) {
|
|
418
527
|
case 0:
|
|
528
|
+
leadId = params.leadId, isRedirect = params.isRedirect;
|
|
419
529
|
settings = thunkApi.getState().settings;
|
|
420
530
|
return [4, API.leadService.retrieveLead(leadId)];
|
|
421
531
|
case 1:
|
|
422
|
-
data = (
|
|
532
|
+
data = (_e.sent()).data;
|
|
423
533
|
if ((_a = data.errors) === null || _a === void 0 ? void 0 : _a.length)
|
|
424
534
|
throw new Error(data.errors[0].description);
|
|
425
535
|
countryCode = settings.data.businessCountry;
|
|
536
|
+
code = (data === null || data === void 0 ? void 0 : data.country_code) || ((_b = settings.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2);
|
|
537
|
+
if (code)
|
|
538
|
+
countryCode = findCountryByIso2(settings.data.countries, code === null || code === void 0 ? void 0 : code.toLowerCase());
|
|
426
539
|
phone = (data.contact || {}).phone;
|
|
427
540
|
if (phone === null || phone === void 0 ? void 0 : phone.country_code)
|
|
428
541
|
countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
|
|
542
|
+
if (isRedirect && !(data === null || data === void 0 ? void 0 : data.country_code) && !((_c = settings.data.businessCountry) === null || _c === void 0 ? void 0 : _c.iso2)) {
|
|
543
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_BUSINESS_COUNTRY_STEP'));
|
|
544
|
+
return [2, { data: data, countryCode: countryCode }];
|
|
545
|
+
}
|
|
546
|
+
if (isRedirect && (data === null || data === void 0 ? void 0 : data.country_code) && !((_d = settings.data.businessCountry) === null || _d === void 0 ? void 0 : _d.iso2)) {
|
|
547
|
+
thunkApi.dispatch(handleSetCountryByIso2(data.country_code));
|
|
548
|
+
if (isOtherThanKWOrSA(data.country_code) || isKW(data.country_code))
|
|
549
|
+
thunkApi.dispatch(handleCurrentActiveScreen('CONNECT_MOBILE_STEP'));
|
|
550
|
+
return [2, { data: data, countryCode: countryCode }];
|
|
551
|
+
}
|
|
429
552
|
return [2, { data: data, countryCode: countryCode }];
|
|
430
553
|
}
|
|
431
554
|
});
|
|
432
555
|
}); });
|
|
433
|
-
export var retrieveSegmentDataList = createAsyncThunk('connectRetrieveSegmentDataList', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
434
|
-
var dataBody, _a, segmentLocation, segmentProfit, segmentTech;
|
|
435
|
-
return __generator(this, function (_b) {
|
|
436
|
-
switch (_b.label) {
|
|
437
|
-
case 0:
|
|
438
|
-
dataBody = {
|
|
439
|
-
page: 0,
|
|
440
|
-
limit: 50
|
|
441
|
-
};
|
|
442
|
-
return [4, Promise.all([
|
|
443
|
-
API.dataService.getSegmentLocation(dataBody),
|
|
444
|
-
API.dataService.getSegmentProfit(dataBody),
|
|
445
|
-
API.dataService.getSegmentTech(dataBody)
|
|
446
|
-
])];
|
|
447
|
-
case 1:
|
|
448
|
-
_a = _b.sent(), segmentLocation = _a[0].list, segmentProfit = _a[1].list, segmentTech = _a[2].list;
|
|
449
|
-
return [2, {
|
|
450
|
-
segmentLocation: segmentLocation,
|
|
451
|
-
segmentProfit: segmentProfit,
|
|
452
|
-
segmentTech: segmentTech
|
|
453
|
-
}];
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
}); });
|
|
457
556
|
export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
458
|
-
var _a, settings, connect, responseBody, leadBrandId, isNewBrand, brandName, salesChannels, selectedBrandItem, brandLogoId, termAndConditionChecked, getAddress, channel_services, payload_1, brandReqBody_1, brand_1,
|
|
459
|
-
var
|
|
460
|
-
return __generator(this, function (
|
|
461
|
-
switch (
|
|
557
|
+
var _a, settings, connect, responseBody, leadBrandId, isNewBrand, brandName, salesChannels, selectedBrandItem, brandLogoId, termAndConditionChecked, getAddress, channel_services, payload_1, brandReqBody_1, brand_1, team, err_7, brandNameBody, payload, lead, brandReqBody, brand, team, err_8;
|
|
558
|
+
var _b, _c, _d, _e, _f;
|
|
559
|
+
return __generator(this, function (_g) {
|
|
560
|
+
switch (_g.label) {
|
|
462
561
|
case 0:
|
|
463
562
|
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
464
563
|
responseBody = connect.data.otpData.responseBody;
|
|
@@ -481,7 +580,7 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
481
580
|
})
|
|
482
581
|
};
|
|
483
582
|
});
|
|
484
|
-
if (!!isNewBrand) return [3,
|
|
583
|
+
if (!!isNewBrand) return [3, 8];
|
|
485
584
|
if (!(leadBrandId !== (selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.id))) return [3, 2];
|
|
486
585
|
payload_1 = {
|
|
487
586
|
brand: {
|
|
@@ -493,8 +592,8 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
493
592
|
};
|
|
494
593
|
return [4, API.leadService.updateLead(payload_1)];
|
|
495
594
|
case 1:
|
|
496
|
-
|
|
497
|
-
|
|
595
|
+
_g.sent();
|
|
596
|
+
_g.label = 2;
|
|
498
597
|
case 2:
|
|
499
598
|
brandReqBody_1 = {
|
|
500
599
|
id: (selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.id) || '',
|
|
@@ -504,35 +603,23 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
504
603
|
};
|
|
505
604
|
return [4, API.brandService.updateBrandInfo(brandReqBody_1)];
|
|
506
605
|
case 3:
|
|
507
|
-
brand_1 =
|
|
508
|
-
|
|
606
|
+
brand_1 = _g.sent();
|
|
607
|
+
_g.label = 4;
|
|
509
608
|
case 4:
|
|
510
|
-
|
|
511
|
-
return [4,
|
|
609
|
+
_g.trys.push([4, 6, , 7]);
|
|
610
|
+
return [4, API.dataService.getSegments({ page: 0, limit: 50 })];
|
|
512
611
|
case 5:
|
|
513
|
-
|
|
514
|
-
brand_1.
|
|
515
|
-
brand_1.segment_profit_list = segmentProfit;
|
|
516
|
-
brand_1.segment_tech_list = segmentTech;
|
|
612
|
+
team = (_g.sent()).team;
|
|
613
|
+
brand_1.team_size_list = (team === null || team === void 0 ? void 0 : team.list) || [];
|
|
517
614
|
return [3, 7];
|
|
518
615
|
case 6:
|
|
519
|
-
|
|
616
|
+
err_7 = _g.sent();
|
|
520
617
|
return [3, 7];
|
|
521
618
|
case 7:
|
|
522
|
-
_j.trys.push([7, 9, , 10]);
|
|
523
|
-
return [4, API.dataService.getTeamSize({ page: 0 })];
|
|
524
|
-
case 8:
|
|
525
|
-
teamSize = _j.sent();
|
|
526
|
-
brand_1.team_size_list = teamSize.list;
|
|
527
|
-
return [3, 10];
|
|
528
|
-
case 9:
|
|
529
|
-
err_6 = _j.sent();
|
|
530
|
-
return [3, 10];
|
|
531
|
-
case 10:
|
|
532
619
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
533
|
-
(
|
|
620
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, params);
|
|
534
621
|
return [2, { response: brand_1, formData: params }];
|
|
535
|
-
case
|
|
622
|
+
case 8:
|
|
536
623
|
brandNameBody = {
|
|
537
624
|
id: '',
|
|
538
625
|
name: {
|
|
@@ -545,56 +632,44 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
545
632
|
terms_conditions_accepted: termAndConditionChecked,
|
|
546
633
|
id: (responseBody === null || responseBody === void 0 ? void 0 : responseBody.lead_id) || '',
|
|
547
634
|
step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_BRAND,
|
|
548
|
-
encryption_contract: [
|
|
635
|
+
encryption_contract: []
|
|
549
636
|
};
|
|
550
637
|
return [4, API.leadService.updateLead(payload)];
|
|
551
|
-
case
|
|
552
|
-
lead =
|
|
638
|
+
case 9:
|
|
639
|
+
lead = _g.sent();
|
|
553
640
|
if (!lead.brand) {
|
|
554
641
|
console.error('Internal server error: brand is not created');
|
|
555
642
|
throw new Error('Internal server error');
|
|
556
643
|
}
|
|
557
644
|
brandReqBody = {
|
|
558
|
-
id: ((
|
|
645
|
+
id: ((_d = lead.brand) === null || _d === void 0 ? void 0 : _d.id) || '',
|
|
559
646
|
channel_services: channel_services,
|
|
560
647
|
term: ['general'],
|
|
561
648
|
step_name: CONNECT_STEP_NAMES.UPDATE_BRAND_INFO
|
|
562
649
|
};
|
|
563
650
|
return [4, API.brandService.updateBrandInfo(brandReqBody)];
|
|
651
|
+
case 10:
|
|
652
|
+
brand = _g.sent();
|
|
653
|
+
_g.label = 11;
|
|
654
|
+
case 11:
|
|
655
|
+
_g.trys.push([11, 13, , 14]);
|
|
656
|
+
return [4, API.dataService.getSegments({ page: 0, limit: 50 })];
|
|
657
|
+
case 12:
|
|
658
|
+
team = (_g.sent()).team;
|
|
659
|
+
brand.team_size_list = (team === null || team === void 0 ? void 0 : team.list) || [];
|
|
660
|
+
return [3, 14];
|
|
564
661
|
case 13:
|
|
565
|
-
|
|
566
|
-
|
|
662
|
+
err_8 = _g.sent();
|
|
663
|
+
return [3, 14];
|
|
567
664
|
case 14:
|
|
568
|
-
_j.trys.push([14, 16, , 17]);
|
|
569
|
-
return [4, thunkApi.dispatch(retrieveSegmentDataList()).unwrap()];
|
|
570
|
-
case 15:
|
|
571
|
-
_c = _j.sent(), segmentLocation = _c.segmentLocation, segmentProfit = _c.segmentProfit, segmentTech = _c.segmentTech;
|
|
572
|
-
brand.segment_location_list = segmentLocation;
|
|
573
|
-
brand.segment_profit_list = segmentProfit;
|
|
574
|
-
brand.segment_tech_list = segmentTech;
|
|
575
|
-
return [3, 17];
|
|
576
|
-
case 16:
|
|
577
|
-
err_7 = _j.sent();
|
|
578
|
-
return [3, 17];
|
|
579
|
-
case 17:
|
|
580
|
-
_j.trys.push([17, 19, , 20]);
|
|
581
|
-
return [4, API.dataService.getTeamSize({ page: 0 })];
|
|
582
|
-
case 18:
|
|
583
|
-
teamSize = _j.sent();
|
|
584
|
-
brand.team_size_list = teamSize.list;
|
|
585
|
-
return [3, 20];
|
|
586
|
-
case 19:
|
|
587
|
-
err_8 = _j.sent();
|
|
588
|
-
return [3, 20];
|
|
589
|
-
case 20:
|
|
590
665
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep()); });
|
|
591
|
-
(
|
|
666
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
|
|
592
667
|
return [2, { response: brand, formData: params }];
|
|
593
668
|
}
|
|
594
669
|
});
|
|
595
670
|
}); });
|
|
596
671
|
export var updateLeadBrandSegment = createAsyncThunk('updateLeadBrandSegment', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
597
|
-
var _a, settings, connect, responseBody, leadBrandId,
|
|
672
|
+
var _a, settings, connect, responseBody, leadBrandId, teamSize, brandReqBody, brand;
|
|
598
673
|
var _b, _c, _d;
|
|
599
674
|
return __generator(this, function (_e) {
|
|
600
675
|
switch (_e.label) {
|
|
@@ -602,11 +677,13 @@ export var updateLeadBrandSegment = createAsyncThunk('updateLeadBrandSegment', f
|
|
|
602
677
|
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
603
678
|
responseBody = connect.data.brandData.responseBody;
|
|
604
679
|
leadBrandId = (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.brand) === null || _b === void 0 ? void 0 : _b.id;
|
|
605
|
-
|
|
680
|
+
teamSize = params.teamSize;
|
|
606
681
|
brandReqBody = {
|
|
607
682
|
id: leadBrandId || '',
|
|
608
683
|
step_name: CONNECT_STEP_NAMES.UPDATE_BRAND_SEGMENT_INFO,
|
|
609
|
-
segment:
|
|
684
|
+
segment: {
|
|
685
|
+
team: { id: (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) || '' }
|
|
686
|
+
}
|
|
610
687
|
};
|
|
611
688
|
return [4, API.brandService.updateBrandInfo(brandReqBody)];
|
|
612
689
|
case 1:
|
|
@@ -618,20 +695,76 @@ export var updateLeadBrandSegment = createAsyncThunk('updateLeadBrandSegment', f
|
|
|
618
695
|
}
|
|
619
696
|
});
|
|
620
697
|
}); });
|
|
621
|
-
export var
|
|
698
|
+
export var updateLeadMobile = createAsyncThunk('connect/updateLeadMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
699
|
+
var _a, settings, connect, lead_id, payload, leadResponse;
|
|
700
|
+
var _b, _c;
|
|
701
|
+
return __generator(this, function (_d) {
|
|
702
|
+
switch (_d.label) {
|
|
703
|
+
case 0:
|
|
704
|
+
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
705
|
+
lead_id = (connect.data.otpData.responseBody || {}).lead_id;
|
|
706
|
+
payload = {
|
|
707
|
+
id: lead_id || '',
|
|
708
|
+
contact: {
|
|
709
|
+
phone: {
|
|
710
|
+
country_code: params.countryCode.idd_prefix.toString(),
|
|
711
|
+
number: params.mobile
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
step_name: CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP,
|
|
715
|
+
encryption_contract: ['contact.phone.country_code', 'contact.phone.number']
|
|
716
|
+
};
|
|
717
|
+
return [4, API.leadService.updateLead(payload)];
|
|
718
|
+
case 1:
|
|
719
|
+
leadResponse = _d.sent();
|
|
720
|
+
if (leadResponse.step_name === CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP) {
|
|
721
|
+
throw new Error("The new mobile number doesn't match the national ID, please update the mobile to the correct one");
|
|
722
|
+
}
|
|
723
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, params);
|
|
724
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
725
|
+
return [2, { leadResponse: leadResponse, formData: params }];
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
}); });
|
|
729
|
+
export var skipUpdateLeadMobile = createAsyncThunk('connect/skipUpdateLeadMobile', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
730
|
+
var _a, settings, connect, lead_id, payload, leadResponse;
|
|
731
|
+
var _b, _c;
|
|
732
|
+
return __generator(this, function (_d) {
|
|
733
|
+
switch (_d.label) {
|
|
734
|
+
case 0:
|
|
735
|
+
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
736
|
+
lead_id = (connect.data.otpData.responseBody || {}).lead_id;
|
|
737
|
+
payload = {
|
|
738
|
+
id: lead_id || '',
|
|
739
|
+
step_name: CONNECT_STEP_NAMES.CONNECT_MOBILE_OWNERSHIP_SKIPPED,
|
|
740
|
+
encryption_contract: []
|
|
741
|
+
};
|
|
742
|
+
return [4, API.leadService.updateLead(payload)];
|
|
743
|
+
case 1:
|
|
744
|
+
leadResponse = _d.sent();
|
|
745
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, {});
|
|
746
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
747
|
+
return [2, { leadResponse: leadResponse }];
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
}); });
|
|
751
|
+
export var checkEmailAvailability = createAsyncThunk('checkEmailAvailability', function (_a, thunkApi) {
|
|
622
752
|
var email = _a.email, cancelToken = _a.cancelToken, onSuccess = _a.onSuccess;
|
|
623
753
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
624
|
-
var requestBody, data;
|
|
625
|
-
|
|
626
|
-
|
|
754
|
+
var connect, requestBody, data;
|
|
755
|
+
var _b, _c;
|
|
756
|
+
return __generator(this, function (_d) {
|
|
757
|
+
switch (_d.label) {
|
|
627
758
|
case 0:
|
|
759
|
+
connect = thunkApi.getState().connect;
|
|
628
760
|
requestBody = {
|
|
629
761
|
email: email,
|
|
762
|
+
country: (_c = (_b = connect.data.otpData.responseBody) === null || _b === void 0 ? void 0 : _b.leadData) === null || _c === void 0 ? void 0 : _c.country_code,
|
|
630
763
|
encryption_contract: ['email']
|
|
631
764
|
};
|
|
632
765
|
return [4, API.availabilityServices.checkEmail(requestBody, { cancelToken: cancelToken })];
|
|
633
766
|
case 1:
|
|
634
|
-
data = (
|
|
767
|
+
data = (_d.sent()).data;
|
|
635
768
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
636
769
|
if (!data.errors)
|
|
637
770
|
return [2, { response: data, formData: email }];
|
|
@@ -652,7 +785,7 @@ export var checkBrandNameAvailability = createAsyncThunk('checkBrandNameAvailabi
|
|
|
652
785
|
requestBody = {
|
|
653
786
|
profile_name: name,
|
|
654
787
|
country_code: (_b = settings.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2,
|
|
655
|
-
encryption_contract: [
|
|
788
|
+
encryption_contract: []
|
|
656
789
|
};
|
|
657
790
|
return [4, API.availabilityServices.checkBrand(requestBody, { cancelToken: cancelToken })];
|
|
658
791
|
case 1:
|
|
@@ -693,6 +826,8 @@ var initialState = {
|
|
|
693
826
|
loading: false,
|
|
694
827
|
customLoading: false,
|
|
695
828
|
data: {
|
|
829
|
+
leadId: '',
|
|
830
|
+
isStartFromBusinessCountry: false,
|
|
696
831
|
flowName: FlowsTypes.CONNECT,
|
|
697
832
|
mobileData: {
|
|
698
833
|
countryCode: defaultCountry,
|
|
@@ -700,7 +835,6 @@ var initialState = {
|
|
|
700
835
|
},
|
|
701
836
|
nidData: {
|
|
702
837
|
nid: '',
|
|
703
|
-
dob: '',
|
|
704
838
|
type: ''
|
|
705
839
|
},
|
|
706
840
|
civilIdData: {
|
|
@@ -710,7 +844,11 @@ var initialState = {
|
|
|
710
844
|
otp: '',
|
|
711
845
|
authFor: AuthForType.MOBILE
|
|
712
846
|
},
|
|
847
|
+
dobData: {
|
|
848
|
+
dob: ''
|
|
849
|
+
},
|
|
713
850
|
individualData: {
|
|
851
|
+
isPrevDob: false,
|
|
714
852
|
name: '',
|
|
715
853
|
email: '',
|
|
716
854
|
mobile: '',
|
|
@@ -730,9 +868,6 @@ var initialState = {
|
|
|
730
868
|
}
|
|
731
869
|
},
|
|
732
870
|
brandSegmentData: {
|
|
733
|
-
segmentLocation: undefined,
|
|
734
|
-
segmentProfit: undefined,
|
|
735
|
-
segmentTech: undefined,
|
|
736
871
|
teamSize: undefined
|
|
737
872
|
}
|
|
738
873
|
}
|
|
@@ -744,6 +879,12 @@ export var connectSlice = createSlice({
|
|
|
744
879
|
clearError: function (state) {
|
|
745
880
|
state.error = null;
|
|
746
881
|
},
|
|
882
|
+
storeLeadId: function (state, action) {
|
|
883
|
+
state.data.leadId = action.payload;
|
|
884
|
+
},
|
|
885
|
+
storeIsStartFromBusinessCountry: function (state, action) {
|
|
886
|
+
state.data.isStartFromBusinessCountry = action.payload;
|
|
887
|
+
},
|
|
747
888
|
stopLoader: function (state) {
|
|
748
889
|
state.loading = false;
|
|
749
890
|
},
|
|
@@ -770,7 +911,7 @@ export var connectSlice = createSlice({
|
|
|
770
911
|
},
|
|
771
912
|
resetStore: function (state) {
|
|
772
913
|
var countryCode = state.data.mobileData.countryCode;
|
|
773
|
-
state.data = __assign(__assign({}, initialState.data), { mobileData: __assign(__assign({}, initialState.data.mobileData), { countryCode: countryCode }), individualData: __assign(__assign({}, initialState.data.individualData), { countryCode: countryCode }) });
|
|
914
|
+
state.data = __assign(__assign({}, initialState.data), { isStartFromBusinessCountry: state.data.isStartFromBusinessCountry, mobileData: __assign(__assign({}, initialState.data.mobileData), { countryCode: countryCode }), individualData: __assign(__assign({}, initialState.data.individualData), { countryCode: countryCode }) });
|
|
774
915
|
}
|
|
775
916
|
},
|
|
776
917
|
extraReducers: function (builder) {
|
|
@@ -856,7 +997,7 @@ export var connectSlice = createSlice({
|
|
|
856
997
|
channel_list: channel_list,
|
|
857
998
|
brandData: brand
|
|
858
999
|
};
|
|
859
|
-
state.data.otpData.responseBody = __assign(__assign({}, authResponse), { is_new_individual: is_new_individual, lead_id: id, brand_id: brand === null || brand === void 0 ? void 0 : brand.id, name: name, contact: contact });
|
|
1000
|
+
state.data.otpData.responseBody = __assign(__assign({}, authResponse), { is_new_individual: is_new_individual, lead_id: id, brand_id: brand === null || brand === void 0 ? void 0 : brand.id, name: name, contact: contact, leadData: leadResponse });
|
|
860
1001
|
})
|
|
861
1002
|
.addCase(verifyPACI.rejected, function (state, action) {
|
|
862
1003
|
state.loading = false;
|
|
@@ -864,6 +1005,70 @@ export var connectSlice = createSlice({
|
|
|
864
1005
|
if (error !== 'Aborted') {
|
|
865
1006
|
state.error = error;
|
|
866
1007
|
}
|
|
1008
|
+
})
|
|
1009
|
+
.addCase(createNafathAuth.fulfilled, function (state, action) {
|
|
1010
|
+
state.loading = false;
|
|
1011
|
+
state.error = null;
|
|
1012
|
+
var _a = action.payload, formData = _a.formData, response = _a.response;
|
|
1013
|
+
state.data.nidData = formData;
|
|
1014
|
+
state.data.nidData.responseBody = response;
|
|
1015
|
+
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
1016
|
+
})
|
|
1017
|
+
.addCase(createNafathAuth.pending, function (state) {
|
|
1018
|
+
state.loading = true;
|
|
1019
|
+
state.error = null;
|
|
1020
|
+
})
|
|
1021
|
+
.addCase(createNafathAuth.rejected, function (state, action) {
|
|
1022
|
+
state.loading = false;
|
|
1023
|
+
state.error = action.error.message;
|
|
1024
|
+
})
|
|
1025
|
+
.addCase(verifyNafath.pending, function (state) {
|
|
1026
|
+
state.loading = true;
|
|
1027
|
+
state.error = null;
|
|
1028
|
+
})
|
|
1029
|
+
.addCase(verifyNafath.fulfilled, function (state, action) {
|
|
1030
|
+
var _a;
|
|
1031
|
+
state.loading = false;
|
|
1032
|
+
state.error = null;
|
|
1033
|
+
var _b = action.payload, authResponse = _b.authResponse, leadResponse = _b.leadResponse, countryCode = _b.countryCode, isNextScreenDob = _b.isNextScreenDob;
|
|
1034
|
+
var _c = leadResponse || {}, name = _c.name, contact = _c.contact, brand = _c.brand, brand_list = _c.brand_list, channel_list = _c.channel_list, is_new_individual = _c.is_new_individual, id = _c.id;
|
|
1035
|
+
var _d = contact || {}, email = _d.email, phone = _d.phone;
|
|
1036
|
+
var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
|
|
1037
|
+
if (!!fullName) {
|
|
1038
|
+
var capitalizedName = capitalizeTheFirstLetterOfEachWord(fullName);
|
|
1039
|
+
state.data.individualData.name = capitalizedName;
|
|
1040
|
+
}
|
|
1041
|
+
if (email)
|
|
1042
|
+
state.data.individualData.email = email;
|
|
1043
|
+
if (phone === null || phone === void 0 ? void 0 : phone.number)
|
|
1044
|
+
state.data.individualData.mobile = phone.number;
|
|
1045
|
+
if (!!countryCode)
|
|
1046
|
+
state.data.individualData.countryCode = countryCode;
|
|
1047
|
+
if ((_a = brand === null || brand === void 0 ? void 0 : brand.name) === null || _a === void 0 ? void 0 : _a.en)
|
|
1048
|
+
state.data.brandData.brandName = brand.name.en;
|
|
1049
|
+
state.data.individualData.isPrevDob = isNextScreenDob || false;
|
|
1050
|
+
var brandList = [];
|
|
1051
|
+
if ((brand_list === null || brand_list === void 0 ? void 0 : brand_list.length) > 0) {
|
|
1052
|
+
var isBrandExist = brand_list.find(function (item) { return item.id === (brand === null || brand === void 0 ? void 0 : brand.id); });
|
|
1053
|
+
brandList = __spreadArray([], brand_list, true);
|
|
1054
|
+
if (!isBrandExist && brand)
|
|
1055
|
+
brandList = __spreadArray(__spreadArray([], brandList, true), [__assign(__assign({}, brand), { channel_services: (brand === null || brand === void 0 ? void 0 : brand.channel_services) || [] })], false);
|
|
1056
|
+
brandList = __spreadArray(__spreadArray([], brandList, true), [OTHER_BRAND], false);
|
|
1057
|
+
state.data.brandData.selectedBrandItem = brandList[0];
|
|
1058
|
+
}
|
|
1059
|
+
state.data.brandData.responseBody = {
|
|
1060
|
+
brand_list: brandList,
|
|
1061
|
+
channel_list: channel_list,
|
|
1062
|
+
brandData: brand
|
|
1063
|
+
};
|
|
1064
|
+
state.data.otpData.responseBody = __assign(__assign({}, authResponse), { is_new_individual: is_new_individual, lead_id: id, brand_id: brand === null || brand === void 0 ? void 0 : brand.id, name: name, contact: contact, leadData: leadResponse });
|
|
1065
|
+
})
|
|
1066
|
+
.addCase(verifyNafath.rejected, function (state, action) {
|
|
1067
|
+
state.loading = false;
|
|
1068
|
+
var error = action.error.message;
|
|
1069
|
+
if (error !== 'Aborted') {
|
|
1070
|
+
state.error = error;
|
|
1071
|
+
}
|
|
867
1072
|
})
|
|
868
1073
|
.addCase(verifyAuth.fulfilled, function (state, action) {
|
|
869
1074
|
var _a;
|
|
@@ -899,7 +1104,7 @@ export var connectSlice = createSlice({
|
|
|
899
1104
|
channel_list: channel_list,
|
|
900
1105
|
brandData: brand
|
|
901
1106
|
};
|
|
902
|
-
state.data.otpData.responseBody = __assign(__assign({}, authResponse), { is_new_individual: is_new_individual, lead_id: id, brand_id: brand === null || brand === void 0 ? void 0 : brand.id, name: name, contact: contact });
|
|
1107
|
+
state.data.otpData.responseBody = __assign(__assign({}, authResponse), { is_new_individual: is_new_individual, lead_id: id, brand_id: brand === null || brand === void 0 ? void 0 : brand.id, name: name, contact: contact, leadData: leadResponse });
|
|
903
1108
|
})
|
|
904
1109
|
.addCase(verifyAuth.pending, function (state) {
|
|
905
1110
|
state.loading = true;
|
|
@@ -909,33 +1114,20 @@ export var connectSlice = createSlice({
|
|
|
909
1114
|
state.loading = false;
|
|
910
1115
|
state.error = action.error.message;
|
|
911
1116
|
})
|
|
912
|
-
.addCase(
|
|
1117
|
+
.addCase(updateLeadDOB.fulfilled, function (state, action) {
|
|
913
1118
|
state.loading = false;
|
|
914
1119
|
state.error = null;
|
|
915
|
-
var _a = action.payload, formData = _a.formData,
|
|
916
|
-
state.data.
|
|
917
|
-
state.data.
|
|
918
|
-
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
1120
|
+
var _a = action.payload, formData = _a.formData, leadResponse = _a.leadResponse;
|
|
1121
|
+
state.data.dobData = formData;
|
|
1122
|
+
state.data.dobData.responseBody = leadResponse;
|
|
919
1123
|
})
|
|
920
|
-
.addCase(
|
|
1124
|
+
.addCase(updateLeadDOB.pending, function (state) {
|
|
921
1125
|
state.loading = true;
|
|
922
1126
|
state.error = null;
|
|
923
1127
|
})
|
|
924
|
-
.addCase(
|
|
1128
|
+
.addCase(updateLeadDOB.rejected, function (state, action) {
|
|
925
1129
|
state.loading = false;
|
|
926
1130
|
state.error = action.error.message;
|
|
927
|
-
})
|
|
928
|
-
.addCase(resendOTPNID.fulfilled, function (state, action) {
|
|
929
|
-
state.error = null;
|
|
930
|
-
var response = action.payload;
|
|
931
|
-
state.data.nidData.responseBody = response;
|
|
932
|
-
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
933
|
-
})
|
|
934
|
-
.addCase(resendOTPNID.pending, function (state) {
|
|
935
|
-
state.error = null;
|
|
936
|
-
})
|
|
937
|
-
.addCase(resendOTPNID.rejected, function (state, action) {
|
|
938
|
-
state.error = action.error.message;
|
|
939
1131
|
})
|
|
940
1132
|
.addCase(updateLeadIndividual.fulfilled, function (state, action) {
|
|
941
1133
|
var _a, _b, _c;
|
|
@@ -964,47 +1156,20 @@ export var connectSlice = createSlice({
|
|
|
964
1156
|
.addCase(updateLeadIndividual.rejected, function (state, action) {
|
|
965
1157
|
state.loading = false;
|
|
966
1158
|
state.error = action.error.message;
|
|
967
|
-
})
|
|
968
|
-
.addCase(retrieveSegmentDataList.pending, function (state) {
|
|
969
|
-
state.loading = true;
|
|
970
|
-
state.error = null;
|
|
971
|
-
})
|
|
972
|
-
.addCase(retrieveSegmentDataList.fulfilled, function (state) {
|
|
973
|
-
state.loading = false;
|
|
974
|
-
state.error = null;
|
|
975
|
-
})
|
|
976
|
-
.addCase(retrieveSegmentDataList.rejected, function (state, action) {
|
|
977
|
-
state.loading = false;
|
|
978
|
-
state.error = action.error.message;
|
|
979
1159
|
})
|
|
980
1160
|
.addCase(updateLeadBrand.fulfilled, function (state, action) {
|
|
981
1161
|
state.loading = false;
|
|
982
1162
|
state.error = null;
|
|
983
1163
|
var _a = action.payload, formData = _a.formData, response = _a.response;
|
|
984
|
-
var _b = response || {},
|
|
985
|
-
var selectedSegmentLocation = segment_location_list === null || segment_location_list === void 0 ? void 0 : segment_location_list.find(function (location) {
|
|
986
|
-
var _a, _b;
|
|
987
|
-
return location.id === ((_b = (_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.location_type) === null || _b === void 0 ? void 0 : _b.id);
|
|
988
|
-
});
|
|
989
|
-
var selectedSegmentProfit = segment_profit_list === null || segment_profit_list === void 0 ? void 0 : segment_profit_list.find(function (profit) {
|
|
990
|
-
var _a, _b;
|
|
991
|
-
return profit.id === ((_b = (_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.profit_type) === null || _b === void 0 ? void 0 : _b.id);
|
|
992
|
-
});
|
|
993
|
-
var selectedSegmentTech = segment_tech_list === null || segment_tech_list === void 0 ? void 0 : segment_tech_list.find(function (tech) {
|
|
994
|
-
var _a, _b;
|
|
995
|
-
return tech.id === ((_b = (_a = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _a === void 0 ? void 0 : _a.tech_type) === null || _b === void 0 ? void 0 : _b.id);
|
|
996
|
-
});
|
|
1164
|
+
var _b = response || {}, team_size_list = _b.team_size_list, brand = _b.brand;
|
|
997
1165
|
var selectedTeamSize = team_size_list === null || team_size_list === void 0 ? void 0 : team_size_list.find(function (_a) {
|
|
998
1166
|
var _b, _c;
|
|
999
1167
|
var id = _a.id;
|
|
1000
1168
|
return ((_c = (_b = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _b === void 0 ? void 0 : _b.team) === null || _c === void 0 ? void 0 : _c.id) === id;
|
|
1001
1169
|
});
|
|
1002
|
-
state.data.brandSegmentData.segmentLocation = selectedSegmentLocation || (segment_location_list === null || segment_location_list === void 0 ? void 0 : segment_location_list[0]);
|
|
1003
|
-
state.data.brandSegmentData.segmentProfit = selectedSegmentProfit || (segment_profit_list === null || segment_profit_list === void 0 ? void 0 : segment_profit_list[0]);
|
|
1004
|
-
state.data.brandSegmentData.segmentTech = selectedSegmentTech || (segment_tech_list === null || segment_tech_list === void 0 ? void 0 : segment_tech_list[1]);
|
|
1005
1170
|
state.data.brandSegmentData.teamSize = selectedTeamSize;
|
|
1006
1171
|
state.data.brandData = __assign(__assign({}, formData), { responseBody: __assign(__assign({}, state.data.brandData.responseBody), { brand: brand }) });
|
|
1007
|
-
state.data.brandSegmentData.responseBody = {
|
|
1172
|
+
state.data.brandSegmentData.responseBody = { team_size_list: team_size_list };
|
|
1008
1173
|
})
|
|
1009
1174
|
.addCase(updateLeadBrand.pending, function (state) {
|
|
1010
1175
|
state.loading = true;
|
|
@@ -1028,6 +1193,33 @@ export var connectSlice = createSlice({
|
|
|
1028
1193
|
.addCase(updateLeadBrandSegment.rejected, function (state, action) {
|
|
1029
1194
|
state.loading = false;
|
|
1030
1195
|
state.error = action.error.message;
|
|
1196
|
+
})
|
|
1197
|
+
.addCase(updateLeadMobile.fulfilled, function (state, action) {
|
|
1198
|
+
state.loading = false;
|
|
1199
|
+
state.error = null;
|
|
1200
|
+
state.data.individualData.mobile = action.payload.leadResponse.contact.phone.number;
|
|
1201
|
+
state.data.individualData.responseBody = action.payload.leadResponse;
|
|
1202
|
+
})
|
|
1203
|
+
.addCase(updateLeadMobile.pending, function (state) {
|
|
1204
|
+
state.loading = true;
|
|
1205
|
+
state.error = null;
|
|
1206
|
+
})
|
|
1207
|
+
.addCase(updateLeadMobile.rejected, function (state, action) {
|
|
1208
|
+
state.loading = false;
|
|
1209
|
+
state.error = action.error.message;
|
|
1210
|
+
})
|
|
1211
|
+
.addCase(skipUpdateLeadMobile.fulfilled, function (state, action) {
|
|
1212
|
+
state.loading = false;
|
|
1213
|
+
state.error = null;
|
|
1214
|
+
state.data.individualData.responseBody = action.payload.leadResponse;
|
|
1215
|
+
})
|
|
1216
|
+
.addCase(skipUpdateLeadMobile.pending, function (state) {
|
|
1217
|
+
state.loading = true;
|
|
1218
|
+
state.error = null;
|
|
1219
|
+
})
|
|
1220
|
+
.addCase(skipUpdateLeadMobile.rejected, function (state, action) {
|
|
1221
|
+
state.loading = false;
|
|
1222
|
+
state.error = action.error.message;
|
|
1031
1223
|
})
|
|
1032
1224
|
.addCase(checkEmailAvailability.fulfilled, function (state, action) {
|
|
1033
1225
|
var _a;
|
|
@@ -1079,7 +1271,7 @@ export var connectSlice = createSlice({
|
|
|
1079
1271
|
state.customLoading = false;
|
|
1080
1272
|
state.error = null;
|
|
1081
1273
|
var _b = action.payload, data = _b.data, countryCode = _b.countryCode;
|
|
1082
|
-
var _c = data || {}, name = _c.name, contact = _c.contact, brand = _c.brand, identification = _c.identification
|
|
1274
|
+
var _c = data || {}, name = _c.name, contact = _c.contact, brand = _c.brand, identification = _c.identification;
|
|
1083
1275
|
var _d = contact || {}, email = _d.email, phone = _d.phone;
|
|
1084
1276
|
var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
|
|
1085
1277
|
if (!!fullName) {
|
|
@@ -1100,8 +1292,6 @@ export var connectSlice = createSlice({
|
|
|
1100
1292
|
state.data.brandData.brandName = brand.name.en;
|
|
1101
1293
|
if (identification === null || identification === void 0 ? void 0 : identification.id)
|
|
1102
1294
|
state.data.nidData.nid = identification === null || identification === void 0 ? void 0 : identification.id;
|
|
1103
|
-
if (date_of_birth)
|
|
1104
|
-
state.data.nidData.dob = date_of_birth;
|
|
1105
1295
|
})
|
|
1106
1296
|
.addCase(retrieveLead.pending, function (state) {
|
|
1107
1297
|
state.customLoading = true;
|
|
@@ -1110,9 +1300,21 @@ export var connectSlice = createSlice({
|
|
|
1110
1300
|
.addCase(retrieveLead.rejected, function (state, action) {
|
|
1111
1301
|
state.customLoading = false;
|
|
1112
1302
|
state.error = action.error.message;
|
|
1303
|
+
})
|
|
1304
|
+
.addCase(updateBusinessCountry.pending, function (state) {
|
|
1305
|
+
state.loading = true;
|
|
1306
|
+
state.error = null;
|
|
1307
|
+
})
|
|
1308
|
+
.addCase(updateBusinessCountry.rejected, function (state, action) {
|
|
1309
|
+
state.loading = false;
|
|
1310
|
+
state.error = action.error.message;
|
|
1311
|
+
})
|
|
1312
|
+
.addCase(updateBusinessCountry.fulfilled, function (state) {
|
|
1313
|
+
state.loading = false;
|
|
1314
|
+
state.error = null;
|
|
1113
1315
|
});
|
|
1114
1316
|
}
|
|
1115
1317
|
});
|
|
1116
|
-
export var clearError = (_a = connectSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetMobileScreen = _a.resetMobileScreen, resetOTPScreen = _a.resetOTPScreen, resetIndividualScreen = _a.resetIndividualScreen, resetMerchantScreen = _a.resetMerchantScreen, resetNIDScreen = _a.resetNIDScreen, resetCivilScreen = _a.resetCivilScreen, resetStore = _a.resetStore, setDefaultCountryCode = _a.setDefaultCountryCode;
|
|
1318
|
+
export var clearError = (_a = connectSlice.actions, _a.clearError), storeLeadId = _a.storeLeadId, stopLoader = _a.stopLoader, resetMobileScreen = _a.resetMobileScreen, resetOTPScreen = _a.resetOTPScreen, resetIndividualScreen = _a.resetIndividualScreen, resetMerchantScreen = _a.resetMerchantScreen, resetNIDScreen = _a.resetNIDScreen, resetCivilScreen = _a.resetCivilScreen, resetStore = _a.resetStore, setDefaultCountryCode = _a.setDefaultCountryCode, storeIsStartFromBusinessCountry = _a.storeIsStartFromBusinessCountry;
|
|
1117
1319
|
export default connectSlice.reducer;
|
|
1118
1320
|
export var connectSelector = function (state) { return state.connect; };
|