@tap-payments/auth-jsconnect 2.0.125-test → 2.1.0
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 +34 -34
- package/build/@types/app.d.ts +397 -7
- package/build/@types/app.js +47 -0
- package/build/@types/form.d.ts +89 -37
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/redux.d.ts +4 -0
- package/build/@types/theme.d.ts +1 -1
- package/build/@types/user.d.ts +177 -0
- package/build/@types/user.js +1 -0
- package/build/api/account.d.ts +6 -1
- package/build/api/account.js +9 -1
- package/build/api/auth.d.ts +24 -18
- package/build/api/auth.js +25 -5
- package/build/api/availabilityServices.d.ts +3 -3
- package/build/api/axios.js +3 -3
- package/build/api/board.d.ts +20 -3
- package/build/api/board.js +17 -1
- package/build/api/brand.d.ts +8 -0
- package/build/api/brand.js +18 -1
- package/build/api/country.d.ts +4 -0
- package/build/api/country.js +9 -1
- package/build/api/data.d.ts +24 -8
- package/build/api/data.js +50 -2
- package/build/api/document.d.ts +25 -0
- package/build/api/document.js +38 -0
- package/build/api/entity.d.ts +61 -31
- package/build/api/entity.js +47 -20
- package/build/api/file.d.ts +14 -0
- package/build/api/file.js +37 -0
- package/build/api/index.d.ts +70 -13
- package/build/api/index.js +9 -3
- package/build/api/individual.d.ts +87 -13
- package/build/api/individual.js +17 -1
- package/build/api/init.d.ts +16 -0
- package/build/api/init.js +13 -0
- package/build/api/lead.d.ts +24 -11
- package/build/api/lead.js +25 -1
- package/build/api/location.d.ts +5 -0
- package/build/api/location.js +19 -0
- package/build/api/operator.d.ts +1 -1
- package/build/api/operator.js +1 -1
- package/build/api/user.d.ts +7 -1
- package/build/api/user.js +9 -1
- package/build/app/rootReducer.d.ts +2 -1
- package/build/app/rootReducer.js +4 -2
- package/build/app/settings.d.ts +25 -12
- package/build/app/settings.js +95 -43
- package/build/app/store.d.ts +8 -6
- package/build/assets/locales/ar.json +93 -2
- package/build/assets/locales/en.json +95 -1
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -2
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +4 -1
- package/build/components/AnimationFlow/BottomSheet.js +43 -19
- package/build/components/AnimationFlow/Dialog.d.ts +4 -2
- package/build/components/AnimationFlow/Dialog.js +30 -7
- package/build/components/Button/Button.js +1 -5
- package/build/components/DatePicker/DatePicker.d.ts +3 -1
- package/build/components/DatePicker/DatePicker.js +20 -15
- package/build/components/FileInput/DragAndDrop.d.ts +3 -2
- package/build/components/FileInput/DragAndDrop.js +5 -7
- package/build/components/LogoBadge/LogoBadge.js +3 -0
- package/build/components/Lottie/Lottie.d.ts +3536 -211
- package/build/components/Lottie/Lottie.js +12 -4
- package/build/components/Lottie/files/account_creating.json +732 -0
- package/build/components/Lottie/files/error.json +692 -0
- package/build/components/Lottie/files/start_loading.json +1140 -0
- package/build/components/Lottie/files/still_loading.json +1140 -0
- package/build/components/Lottie/index.d.ts +2 -2
- package/build/components/Lottie/index.js +2 -2
- package/build/components/ProgressBar/CircularProgressBar.d.ts +3 -1
- package/build/components/ProgressBar/CircularProgressBar.js +2 -2
- package/build/components/Radio/Radio.js +1 -1
- package/build/components/RadioGroup/RadioGroup.d.ts +5 -2
- package/build/components/RadioGroup/RadioGroup.js +5 -9
- package/build/components/RadioGroup/index.d.ts +1 -1
- package/build/components/RadioLabel/RadioLabel.d.ts +4 -2
- package/build/components/RadioLabel/RadioLabel.js +2 -2
- package/build/components/SimpleList/SimpleList.d.ts +8 -2
- package/build/components/SimpleList/SimpleList.js +46 -14
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.js +12 -3
- package/build/constants/api.d.ts +16 -0
- package/build/constants/api.js +32 -1
- package/build/constants/app.d.ts +69 -1
- package/build/constants/app.js +274 -36
- package/build/constants/assets.d.ts +14 -0
- package/build/constants/assets.js +14 -0
- package/build/constants/validation.d.ts +4 -0
- package/build/constants/validation.js +4 -0
- package/build/features/app/bank/bankStore.d.ts +94 -24
- package/build/features/app/bank/bankStore.js +192 -166
- package/build/features/app/brand/brandStore.d.ts +232 -0
- package/build/features/app/brand/brandStore.js +837 -0
- package/build/features/app/business/businessStore.d.ts +192 -28
- package/build/features/app/business/businessStore.js +431 -358
- package/build/features/app/connect/connectStore.d.ts +124 -19
- package/build/features/app/connect/connectStore.js +249 -278
- package/build/features/app/connectExpress/connectExpressStore.d.ts +323 -0
- package/build/features/app/connectExpress/connectExpressStore.js +1152 -0
- package/build/features/app/entity/entityStore.d.ts +109 -20
- package/build/features/app/entity/entityStore.js +451 -246
- package/build/features/app/individual/individualStore.d.ts +242 -26
- package/build/features/app/individual/individualStore.js +1002 -240
- package/build/features/app/password/passwordStore.d.ts +111 -24
- package/build/features/app/password/passwordStore.js +107 -43
- package/build/features/app/signIn/signInStore.d.ts +61 -7
- package/build/features/app/signIn/signInStore.js +24 -47
- package/build/features/app/tax/taxStore.d.ts +82 -9
- package/build/features/app/tax/taxStore.js +181 -119
- package/build/features/bank/Bank.d.ts +5 -3
- package/build/features/bank/Bank.js +45 -38
- package/build/features/bank/screens/BankDetails/BankDetails.js +59 -28
- package/build/features/bank/screens/BankDetails/BankName.d.ts +5 -1
- package/build/features/bank/screens/BankDetails/BankName.js +15 -12
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +8 -1
- package/build/features/bank/screens/BankDetails/BankStatement.js +16 -46
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +3 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +15 -17
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +4 -1
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +12 -13
- package/build/features/bank/screens/BankDetails/IBAN.d.ts +3 -1
- package/build/features/bank/screens/BankDetails/IBAN.js +17 -12
- package/build/features/bank/screens/BankDetails/validation.d.ts +26 -10
- package/build/features/bank/screens/BankDetails/validation.js +23 -28
- package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/bank/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/bank/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
- package/build/features/bank/screens/Success/Success.js +7 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
- package/build/features/bank/screens/Verify/OTPInput.js +5 -3
- package/build/features/bank/screens/Verify/Verify.js +1 -5
- package/build/features/brand/Brand.d.ts +9 -0
- package/build/features/brand/Brand.js +76 -0
- package/build/features/brand/index.d.ts +1 -0
- package/build/features/brand/index.js +1 -0
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +74 -0
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +180 -0
- package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +114 -0
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +55 -0
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +135 -0
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +10 -0
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +100 -0
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +10 -0
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +142 -0
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +43 -0
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +93 -0
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +18 -0
- package/build/features/brand/screens/BrandActivities/TAC.js +93 -0
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +6 -0
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +56 -0
- package/build/features/brand/screens/BrandActivities/index.d.ts +2 -0
- package/build/features/brand/screens/BrandActivities/index.js +2 -0
- package/build/features/{entity/screens/EntityInfoConfirm → brand/screens/BrandActivities}/validation.d.ts +19 -16
- package/build/features/brand/screens/BrandActivities/validation.js +23 -0
- package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +124 -0
- package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +10 -0
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +53 -0
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +10 -0
- package/build/features/brand/screens/BrandInfo/BrandName.js +141 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +6 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +36 -0
- package/build/features/brand/screens/BrandInfo/SegmentLocations.d.ts +10 -0
- package/build/features/brand/screens/BrandInfo/SegmentLocations.js +69 -0
- package/build/features/brand/screens/BrandInfo/SegmentProfits.d.ts +10 -0
- package/build/features/brand/screens/BrandInfo/SegmentProfits.js +69 -0
- package/build/features/brand/screens/BrandInfo/SegmentTechs.d.ts +10 -0
- package/build/features/brand/screens/BrandInfo/SegmentTechs.js +69 -0
- package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +10 -0
- package/build/features/brand/screens/BrandInfo/TeamSize.js +69 -0
- package/build/features/brand/screens/BrandInfo/index.d.ts +2 -0
- package/build/features/brand/screens/BrandInfo/index.js +2 -0
- package/build/features/brand/screens/BrandInfo/validation.d.ts +47 -0
- package/build/features/brand/screens/BrandInfo/validation.js +110 -0
- package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/brand/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/brand/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/brand/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
- package/build/features/brand/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/brand/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/brand/screens/Success/Success.d.ts +5 -0
- package/build/features/brand/screens/Success/Success.js +20 -0
- package/build/features/brand/screens/Success/index.d.ts +3 -0
- package/build/features/brand/screens/Success/index.js +2 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +22 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/brand/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/{auth/screens/OTP → brand/screens/Verify}/OTPInput.js +8 -10
- package/build/features/brand/screens/Verify/Verify.js +78 -0
- package/build/features/brand/screens/Verify/index.d.ts +2 -0
- package/build/features/brand/screens/Verify/index.js +2 -0
- package/build/features/business/Business.d.ts +4 -3
- package/build/features/business/Business.js +15 -18
- package/build/features/business/screens/Activities/Activities.js +6 -14
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +17 -70
- package/build/features/business/screens/Activities/ActivitiesList.js +222 -100
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +3 -3
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/Activities/validation.d.ts +165 -30
- package/build/features/business/screens/Activities/validation.js +9 -3
- package/build/features/business/screens/BrandDetails/BrandDetails.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/BrandDetails.js +39 -0
- package/build/features/business/screens/BrandDetails/BrandName.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/BrandName.js +36 -0
- package/build/features/business/screens/BrandDetails/Header.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/Header.js +49 -0
- package/build/features/business/screens/BrandDetails/LicenseInfo.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/LicenseInfo.js +38 -0
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +18 -0
- package/build/features/business/screens/BrandDetails/SalesChannel.js +48 -0
- package/build/features/business/screens/BrandDetails/index.d.ts +3 -0
- package/build/features/business/screens/BrandDetails/index.js +2 -0
- package/build/features/business/screens/BusinessType/Article.d.ts +8 -0
- package/build/features/business/screens/BusinessType/Article.js +52 -0
- package/build/features/business/screens/BusinessType/BusinessType.js +42 -17
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +9 -0
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +129 -0
- package/build/features/business/screens/BusinessType/EntityName.js +6 -7
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +14 -46
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -0
- package/build/features/business/screens/BusinessType/LicenseList.js +11 -23
- package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -2
- package/build/features/business/screens/BusinessType/LicenseNumber.js +10 -8
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +30 -2
- package/build/features/business/screens/BusinessType/LicenseType.js +42 -6
- package/build/features/business/screens/BusinessType/validation.d.ts +9 -6
- package/build/features/business/screens/BusinessType/validation.js +21 -13
- package/build/features/business/screens/CivilID/IDNumber.js +2 -3
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +47 -40
- package/build/features/business/screens/Customers/CustomerLocations.js +36 -21
- package/build/features/business/screens/Customers/Customers.js +27 -16
- package/build/features/business/screens/Customers/ExpectedCustomers.js +13 -6
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +20 -9
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +7 -7
- package/build/features/business/screens/Customers/RefundPolicy.js +15 -6
- package/build/features/business/screens/Customers/TransactionPolicy.js +19 -11
- package/build/features/business/screens/IDBOD/DOB.js +2 -2
- package/build/features/business/screens/IDBOD/ID.js +2 -3
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
- package/build/features/business/screens/Success/Success.js +10 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -96
- package/build/features/business/screens/Verify/OTPInput.js +5 -3
- package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/business/screens/VerifyPACI/VerifyPACI.js +9 -134
- package/build/features/connect/Connect.d.ts +4 -4
- package/build/features/connect/Connect.js +40 -37
- package/build/features/connect/screens/CivilID/CivilID.js +6 -14
- package/build/features/connect/screens/CivilID/IDNumber.js +5 -6
- package/build/features/connect/screens/Individual/Email.js +18 -28
- package/build/features/connect/screens/Individual/Individual.js +20 -10
- package/build/features/connect/screens/Individual/MobileNumber.js +16 -15
- package/build/features/connect/screens/Individual/Name.js +11 -15
- package/build/features/connect/screens/Individual/validation.js +2 -8
- package/build/features/connect/screens/Merchant/BrandList.js +17 -9
- package/build/features/connect/screens/Merchant/BrandName.js +10 -12
- package/build/features/connect/screens/Merchant/Merchant.js +41 -36
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +1 -3
- package/build/features/connect/screens/Merchant/SalesChannels.js +28 -103
- package/build/features/connect/screens/Merchant/Segments.d.ts +8 -0
- package/build/features/connect/screens/Merchant/Segments.js +66 -0
- package/build/features/connect/screens/Merchant/TAC.js +1 -3
- package/build/features/connect/screens/Merchant/TeamSize.d.ts +8 -0
- package/build/features/connect/screens/Merchant/TeamSize.js +66 -0
- package/build/features/connect/screens/Merchant/validation.d.ts +9 -0
- package/build/features/connect/screens/Merchant/validation.js +17 -14
- package/build/features/connect/screens/Mobile/Mobile.js +13 -16
- package/build/features/connect/screens/Mobile/MobileNumber.js +14 -10
- package/build/features/connect/screens/NID/DOB.js +1 -1
- package/build/features/connect/screens/NID/IDNumber.js +6 -7
- package/build/features/connect/screens/NID/NID.js +6 -0
- package/build/features/connect/screens/OTP/OTP.js +13 -15
- package/build/features/connect/screens/OTP/OTPInput.js +10 -0
- package/build/features/connect/screens/ThankYou/ThankYou.js +24 -2
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +1 -1
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +9 -73
- package/build/features/connectExpress/ConnectExpress.d.ts +12 -0
- package/build/features/connectExpress/ConnectExpress.js +149 -0
- package/build/features/connectExpress/index.d.ts +1 -0
- package/build/features/connectExpress/index.js +1 -0
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.d.ts +5 -0
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +15 -0
- package/build/features/connectExpress/screens/AccountAlreadyCreated/index.d.ts +3 -0
- package/build/features/connectExpress/screens/AccountAlreadyCreated/index.js +2 -0
- package/build/features/connectExpress/screens/Brand/Brand.d.ts +5 -0
- package/build/features/connectExpress/screens/Brand/Brand.js +71 -0
- package/build/features/connectExpress/screens/Brand/index.d.ts +2 -0
- package/build/features/connectExpress/screens/Brand/index.js +2 -0
- package/build/features/connectExpress/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/connectExpress/screens/CivilID/CivilID.js +84 -0
- package/build/features/connectExpress/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +54 -0
- package/build/features/connectExpress/screens/CivilID/index.d.ts +3 -0
- package/build/features/connectExpress/screens/CivilID/index.js +2 -0
- package/build/features/connectExpress/screens/CivilID/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/CivilID/validation.js +4 -0
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.d.ts +5 -0
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +53 -0
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.d.ts +7 -0
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +54 -0
- package/build/features/connectExpress/screens/CivilIDMissed/index.d.ts +3 -0
- package/build/features/connectExpress/screens/CivilIDMissed/index.js +2 -0
- package/build/features/connectExpress/screens/CivilIDMissed/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/CivilIDMissed/validation.js +4 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +9 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +138 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +5 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +83 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +9 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +139 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +7 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +52 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +35 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +96 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +19 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +82 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/index.d.ts +3 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/index.js +2 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +27 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +155 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.d.ts +5 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +94 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +9 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +105 -0
- package/build/features/{individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts → connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts} +3 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +153 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +7 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +44 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/index.d.ts +3 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/index.js +2 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.d.ts +14 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +31 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +5 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +34 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/index.d.ts +2 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/index.js +2 -0
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.js +23 -12
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +5 -0
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +52 -0
- package/build/features/connectExpress/screens/IdentityOTP/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/IdentityOTP/validation.js +4 -0
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +34 -0
- package/build/features/connectExpress/screens/IdentityVerifyPACI/index.d.ts +3 -0
- package/build/features/connectExpress/screens/IdentityVerifyPACI/index.js +2 -0
- package/build/features/connectExpress/screens/Mobile/Mobile.d.ts +5 -0
- package/build/features/connectExpress/screens/Mobile/Mobile.js +111 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +13 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +155 -0
- package/build/features/connectExpress/screens/Mobile/TAC.d.ts +7 -0
- package/build/features/{auth/screens/NID → connectExpress/screens/Mobile}/TAC.js +12 -14
- package/build/features/connectExpress/screens/Mobile/Title.d.ts +8 -0
- package/build/features/connectExpress/screens/Mobile/Title.js +29 -0
- package/build/features/connectExpress/screens/Mobile/index.d.ts +3 -0
- package/build/features/connectExpress/screens/Mobile/index.js +2 -0
- package/build/features/connectExpress/screens/Mobile/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/Mobile/validation.js +60 -0
- package/build/features/connectExpress/screens/NID/DOB.d.ts +7 -0
- package/build/features/connectExpress/screens/NID/DOB.js +47 -0
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +7 -0
- package/build/features/{auth → connectExpress}/screens/NID/IDNumber.js +14 -18
- package/build/features/connectExpress/screens/NID/NID.js +94 -0
- package/build/features/connectExpress/screens/NID/TAC.d.ts +19 -0
- package/build/features/connectExpress/screens/NID/TAC.js +82 -0
- package/build/features/connectExpress/screens/NID/validation.d.ts +11 -0
- package/build/features/connectExpress/screens/NID/validation.js +22 -0
- package/build/features/{auth/screens/NID → connectExpress/screens/NIDMissed}/DOB.d.ts +1 -2
- package/build/features/{auth/screens/NID → connectExpress/screens/NIDMissed}/DOB.js +9 -9
- package/build/features/{auth/screens/NID → connectExpress/screens/NIDMissed}/IDNumber.d.ts +4 -1
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +55 -0
- package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +5 -0
- package/build/features/{auth/screens/NID → connectExpress/screens/NIDMissed}/NID.js +14 -23
- package/build/features/connectExpress/screens/NIDMissed/index.d.ts +3 -0
- package/build/features/connectExpress/screens/NIDMissed/index.js +2 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +11 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.js +9 -0
- package/build/features/{auth/screens/NID/TAC.d.ts → connectExpress/screens/OTP/OTP.d.ts} +2 -0
- package/build/features/connectExpress/screens/OTP/OTP.js +88 -0
- package/build/features/connectExpress/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/connectExpress/screens/OTP/OTPInput.js +55 -0
- package/build/features/connectExpress/screens/OTP/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OTP/index.js +2 -0
- package/build/features/connectExpress/screens/OTP/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/OTP/validation.js +4 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +32 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyPACI/VerifyPACI.js +34 -0
- package/build/features/connectExpress/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyPACI/index.js +2 -0
- package/build/features/entity/Entity.d.ts +5 -3
- package/build/features/entity/Entity.js +45 -39
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +37 -0
- package/build/features/entity/screens/EntityCapital/ActivityList.js +286 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +7 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +45 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +7 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +40 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +7 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +45 -0
- package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +86 -0
- package/build/features/entity/screens/EntityCapital/index.d.ts +2 -0
- package/build/features/entity/screens/EntityCapital/index.js +2 -0
- package/build/features/entity/screens/EntityCapital/validation.d.ts +197 -0
- package/build/features/entity/screens/EntityCapital/validation.js +18 -0
- package/build/features/entity/screens/EntityName/Article.d.ts +10 -0
- package/build/features/entity/screens/EntityName/Article.js +53 -0
- package/build/features/entity/screens/EntityName/EntityName.d.ts +5 -0
- package/build/features/entity/screens/EntityName/EntityName.js +137 -0
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +73 -0
- package/build/features/entity/screens/EntityName/EntityTypeList.js +134 -0
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +21 -0
- package/build/features/entity/screens/EntityName/ExpiryDate.js +44 -0
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +21 -0
- package/build/features/entity/screens/EntityName/IssuingDate.js +43 -0
- package/build/features/entity/screens/EntityName/LegalName.d.ts +7 -0
- package/build/features/entity/screens/EntityName/LegalName.js +49 -0
- package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +9 -0
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +54 -0
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +8 -0
- package/build/features/entity/screens/EntityName/LicenseNumber.js +53 -0
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +8 -0
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +44 -0
- package/build/features/entity/screens/EntityName/index.d.ts +2 -0
- package/build/features/entity/screens/EntityName/index.js +2 -0
- package/build/features/entity/screens/EntityName/validation.d.ts +60 -0
- package/build/features/entity/screens/EntityName/validation.js +91 -0
- package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/entity/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/entity/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/entity/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
- package/build/features/entity/screens/Success/Success.js +7 -3
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -94
- package/build/features/entity/screens/Verify/OTPInput.js +5 -3
- package/build/features/entity/screens/Verify/Verify.js +7 -20
- package/build/features/featuresScreens.d.ts +2 -1
- package/build/features/featuresScreens.js +148 -12
- package/build/features/individual/Individual.d.ts +5 -3
- package/build/features/individual/Individual.js +45 -39
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +13 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +96 -40
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +9 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +54 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +3 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +19 -5
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +34 -46
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +90 -56
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +31 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +37 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +7 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +42 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +7 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +47 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +9 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +54 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +31 -39
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +31 -23
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +15 -23
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +12 -0
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +32 -0
- package/build/features/individual/screens/IndividualList/Email.d.ts +10 -0
- package/build/features/individual/screens/IndividualList/Email.js +113 -0
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +31 -0
- package/build/features/individual/screens/IndividualList/IndividualList.js +58 -0
- package/build/features/individual/screens/IndividualList/MobileNumber.d.ts +12 -0
- package/build/features/individual/screens/IndividualList/MobileNumber.js +142 -0
- package/build/features/individual/screens/IndividualList/UserList.d.ts +5 -0
- package/build/features/individual/screens/IndividualList/UserList.js +207 -0
- package/build/features/individual/screens/IndividualList/index.d.ts +3 -0
- package/build/features/individual/screens/IndividualList/index.js +2 -0
- package/build/features/individual/screens/IndividualList/validation.d.ts +12 -0
- package/build/features/individual/screens/IndividualList/validation.js +40 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +10 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +103 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +12 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +76 -0
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +9 -0
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +46 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +8 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +42 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +9 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +47 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +36 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +84 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +8 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +40 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +21 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +182 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +12 -0
- package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.js → IndividualPersonalInfo/IssuedCountry.js} +19 -35
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +12 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +142 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +8 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +44 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +12 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +76 -0
- package/build/features/individual/screens/IndividualPersonalInfo/index.d.ts +3 -0
- package/build/features/individual/screens/IndividualPersonalInfo/index.js +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +38 -0
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +68 -0
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +13 -0
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +146 -0
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.d.ts +5 -0
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +63 -0
- package/build/features/individual/screens/IndividualPhoneInfo/index.d.ts +3 -0
- package/build/features/individual/screens/IndividualPhoneInfo/index.js +2 -0
- package/build/features/individual/screens/IndividualPhoneInfo/validation.d.ts +8 -0
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +31 -0
- package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/individual/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/individual/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/individual/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
- package/build/features/individual/screens/Success/Success.js +7 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
- package/build/features/individual/screens/Verify/OTPInput.js +5 -3
- package/build/features/individual/screens/Verify/Verify.js +10 -21
- package/build/features/password/Password.d.ts +5 -3
- package/build/features/password/Password.js +15 -18
- package/build/features/password/screens/CreatePassword/CreatePassword.js +9 -16
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
- package/build/features/password/screens/Success/Success.js +7 -3
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
- package/build/features/password/screens/Verify/OTPInput.js +5 -3
- package/build/features/password/screens/Verify/Verify.js +7 -20
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +1 -1
- package/build/features/shared/Address/Address.d.ts +16 -0
- package/build/features/shared/Address/Address.js +73 -0
- package/build/features/shared/Address/CountryList.d.ts +72 -0
- package/build/features/shared/Address/CountryList.js +89 -0
- package/build/features/shared/Address/InputSelect.d.ts +71 -0
- package/build/features/shared/Address/InputSelect.js +172 -0
- package/build/features/shared/Address/InputText.d.ts +12 -0
- package/build/features/shared/Address/InputText.js +12 -0
- package/build/features/shared/Address/index.d.ts +2 -0
- package/build/features/shared/Address/index.js +2 -0
- package/build/features/shared/Background/Background.js +1 -5
- package/build/features/shared/Button/Button.d.ts +3 -1
- package/build/features/shared/Button/Button.js +14 -4
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +9 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +4 -1
- package/build/features/shared/Button/FlowsButtons.js +64 -30
- package/build/features/shared/Button/IndividualActionButtons.d.ts +21 -0
- package/build/features/shared/Button/IndividualActionButtons.js +156 -0
- package/build/features/shared/Button/index.d.ts +2 -1
- package/build/features/shared/Button/index.js +2 -1
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +7 -1
- package/build/features/shared/CheckIcon/CheckIcon.js +7 -6
- package/build/features/shared/Chip/Chip.d.ts +3 -0
- package/build/features/shared/Chip/Chip.js +21 -0
- package/build/features/shared/Chip/index.d.ts +2 -0
- package/build/features/shared/Chip/index.js +2 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +4 -1
- package/build/features/shared/Containers/FeatureContainer.js +5 -4
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +7 -0
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +58 -0
- package/build/features/shared/CreateAccountLoading/index.d.ts +2 -0
- package/build/features/shared/CreateAccountLoading/index.js +2 -0
- package/build/features/shared/DataLoading/DataLoading.d.ts +6 -0
- package/build/features/shared/DataLoading/DataLoading.js +58 -0
- package/build/features/shared/DataLoading/index.d.ts +2 -0
- package/build/features/shared/DataLoading/index.js +2 -0
- package/build/features/shared/Dot/Dot.d.ts +8 -0
- package/build/features/shared/Dot/Dot.js +29 -0
- package/build/features/shared/Dot/index.d.ts +2 -0
- package/build/features/shared/Dot/index.js +2 -0
- package/build/features/shared/EndAdornment/EndAdornment.d.ts +10 -0
- package/build/features/shared/EndAdornment/EndAdornment.js +17 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +7 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +13 -0
- package/build/features/shared/EndAdornment/index.d.ts +3 -0
- package/build/features/shared/EndAdornment/index.js +3 -0
- package/build/features/shared/Footer/Footer.js +9 -1
- package/build/features/shared/Footer/PoweredByFooter.d.ts +9 -0
- package/build/features/shared/Footer/PoweredByFooter.js +36 -0
- package/build/features/shared/Footer/index.d.ts +3 -2
- package/build/features/shared/Footer/index.js +3 -2
- package/build/features/shared/GenericError/GenericError.d.ts +7 -0
- package/build/features/shared/GenericError/GenericError.js +55 -0
- package/build/features/shared/GenericError/index.d.ts +2 -0
- package/build/features/shared/GenericError/index.js +2 -0
- package/build/features/shared/Input/Input.d.ts +12 -11
- package/build/features/shared/Input/Input.js +4 -5
- package/build/features/shared/Input/index.d.ts +2 -1
- package/build/features/shared/InputSelect/InputSelect.d.ts +4 -0
- package/build/features/shared/InputSelect/InputSelect.js +33 -0
- package/build/features/shared/InputSelect/index.d.ts +2 -0
- package/build/features/shared/InputSelect/index.js +2 -0
- package/build/features/shared/OTP/OTP.d.ts +2 -1
- package/build/features/shared/OTP/OTP.js +2 -2
- package/build/features/shared/PaciVerification/PaciVerification.d.ts +12 -0
- package/build/features/shared/PaciVerification/PaciVerification.js +91 -0
- package/build/features/{connect/screens/VerifyPACI → shared/PaciVerification}/VerifyPACILoading.d.ts +1 -0
- package/build/features/shared/PaciVerification/VerifyPACILoading.js +27 -0
- package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.js +1 -1
- package/build/features/shared/PaciVerification/index.d.ts +2 -0
- package/build/features/shared/PaciVerification/index.js +2 -0
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +13 -0
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +102 -0
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +14 -0
- package/build/features/shared/SalesChannels/SalesChannel.js +154 -0
- package/build/features/shared/SalesChannels/index.d.ts +2 -0
- package/build/features/shared/SalesChannels/index.js +2 -0
- package/build/features/shared/Search/Search.d.ts +2 -1
- package/build/features/shared/Search/Search.js +2 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +17 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +134 -0
- package/build/features/shared/SuccessFlowButtons/index.d.ts +2 -0
- package/build/features/shared/SuccessFlowButtons/index.js +2 -0
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +4 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.js +5 -3
- package/build/features/shared/UploadFile/FileUpload.d.ts +32 -0
- package/build/features/shared/UploadFile/FileUpload.js +267 -0
- package/build/features/shared/UploadFile/UploadFile.d.ts +5 -4
- package/build/features/shared/UploadFile/UploadFile.js +20 -20
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +36 -0
- package/build/features/shared/UploadFile/UploadWrapper.js +115 -0
- package/build/features/shared/UploadFile/index.d.ts +2 -1
- package/build/features/shared/UploadFile/index.js +2 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +29 -0
- package/build/features/shared/UploadMultipleFile/UploadFile.js +273 -0
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +36 -0
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +178 -0
- package/build/features/shared/UploadMultipleFile/index.d.ts +2 -0
- package/build/features/shared/UploadMultipleFile/index.js +2 -0
- package/build/features/signIn/SignIn.d.ts +4 -3
- package/build/features/signIn/SignIn.js +12 -19
- package/build/features/tax/Tax.d.ts +5 -3
- package/build/features/tax/Tax.js +45 -40
- package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/tax/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/tax/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/tax/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +14 -2
- package/build/features/tax/screens/Success/Success.js +9 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -97
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +4 -1
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +12 -12
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +38 -26
- package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +9 -0
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +50 -0
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +5 -1
- package/build/features/tax/screens/TaxDetails/VATId.js +12 -7
- package/build/features/tax/screens/TaxDetails/validation.d.ts +4 -1
- package/build/features/tax/screens/TaxDetails/validation.js +7 -4
- package/build/features/tax/screens/Verify/OTPInput.js +5 -3
- package/build/features/tax/screens/Verify/Verify.js +6 -22
- package/build/hooks/index.d.ts +8 -0
- package/build/hooks/index.js +8 -0
- package/build/hooks/useAppConfig.d.ts +6 -2
- package/build/hooks/useAppConfig.js +13 -6
- package/build/hooks/useAppDispatch.d.ts +2 -1
- package/build/hooks/useCountUp.d.ts +9 -0
- package/build/hooks/useCountUp.js +17 -0
- package/build/hooks/useCountry.d.ts +4 -0
- package/build/hooks/useCountry.js +7 -0
- package/build/hooks/useDataNoneEditable.d.ts +2 -0
- package/build/hooks/useDataNoneEditable.js +19 -0
- package/build/hooks/useDataVerified.d.ts +6 -0
- package/build/hooks/useDataVerified.js +19 -0
- package/build/hooks/useErrorListener.d.ts +2 -1
- package/build/hooks/useErrorListener.js +16 -1
- package/build/hooks/useExcludeReadOnlyFelids.d.ts +11 -0
- package/build/hooks/useExcludeReadOnlyFelids.js +33 -0
- package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +6 -0
- package/build/hooks/useFormErrorAndUpdateReadOnly.js +48 -0
- package/build/hooks/useFormReadOnly.d.ts +6 -0
- package/build/hooks/useFormReadOnly.js +40 -0
- package/build/hooks/useSetFromDefaultValues.js +4 -2
- package/build/hooks/useVerifyToken.d.ts +15 -0
- package/build/hooks/useVerifyToken.js +25 -0
- package/build/index.d.ts +12 -11
- package/build/index.js +14 -21
- package/build/theme/shadows.js +1 -1
- package/build/theme/typography.js +1 -1
- package/build/utils/array.d.ts +55 -1
- package/build/utils/array.js +280 -5
- package/build/utils/common.d.ts +2 -1
- package/build/utils/common.js +7 -0
- package/build/utils/date.d.ts +3 -0
- package/build/utils/date.js +17 -0
- package/build/utils/error.d.ts +2 -0
- package/build/utils/error.js +6 -0
- package/build/utils/gtm.d.ts +6 -0
- package/build/utils/gtm.js +29 -0
- package/build/utils/html.d.ts +1 -2
- package/build/utils/html.js +6 -11
- package/build/utils/index.d.ts +3 -0
- package/build/utils/index.js +3 -0
- package/build/utils/object.d.ts +4 -0
- package/build/utils/object.js +17 -0
- package/build/utils/string.d.ts +20 -2
- package/build/utils/string.js +81 -5
- package/build/utils/validation.d.ts +1 -0
- package/build/utils/validation.js +3 -0
- package/package.json +4 -2
- package/build/api/ip.d.ts +0 -4
- package/build/api/ip.js +0 -12
- package/build/features/app/auth/authStore.d.ts +0 -46
- package/build/features/app/auth/authStore.js +0 -261
- package/build/features/auth/Auth.d.ts +0 -10
- package/build/features/auth/Auth.js +0 -87
- package/build/features/auth/index.d.ts +0 -1
- package/build/features/auth/index.js +0 -1
- package/build/features/auth/screens/NID/validation.d.ts +0 -27
- package/build/features/auth/screens/NID/validation.js +0 -19
- package/build/features/business/screens/VerifyPACI/VerifyPACILoading.d.ts +0 -6
- package/build/features/business/screens/VerifyPACI/VerifyPACILoading.js +0 -23
- package/build/features/connect/screens/Merchant/SocialMedia.d.ts +0 -6
- package/build/features/connect/screens/Merchant/SocialMedia.js +0 -182
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +0 -23
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +0 -5
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +0 -8
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +0 -55
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +0 -149
- package/build/features/entity/screens/EntityInfoConfirm/Article.d.ts +0 -3
- package/build/features/entity/screens/EntityInfoConfirm/Article.js +0 -73
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -75
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -32
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +0 -49
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -33
- package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +0 -2
- package/build/features/entity/screens/EntityInfoConfirm/index.js +0 -2
- package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -24
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +0 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +0 -46
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +0 -19
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +0 -52
- package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +0 -3
- package/build/features/individual/screens/ShowIndividualInfo/index.js +0 -2
- package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +0 -7
- package/build/features/individual/screens/ShowIndividualInfo/info.js +0 -28
- /package/build/features/{auth/screens/OTP/OTPInput.d.ts → brand/screens/Verify/Verify.d.ts} +0 -0
- /package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.d.ts +0 -0
- /package/build/features/{auth/screens/OTP → brand/screens/Verify}/validation.js +0 -0
- /package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.d.ts +0 -0
- /package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.d.ts +0 -0
- /package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/index.js +0 -0
- /package/build/features/{auth → connectExpress}/screens/NID/NID.d.ts +0 -0
- /package/build/features/{auth → connectExpress}/screens/NID/index.d.ts +0 -0
- /package/build/features/{auth → connectExpress}/screens/NID/index.js +0 -0
- /package/build/features/{business/screens/VerifyPACI → shared/PaciVerification}/VerifyPACISuccess.d.ts +0 -0
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -66,13 +66,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
66
66
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
67
67
|
};
|
|
68
68
|
var _a;
|
|
69
|
-
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
70
|
-
import { handleNextScreenStep } from '../../../app/settings';
|
|
71
|
-
import { FlowsTypes, AuthForType } from '../../../@types';
|
|
72
69
|
import API from '../../../api';
|
|
73
|
-
import {
|
|
74
|
-
import { defaultCountry } from '../../../constants';
|
|
75
|
-
import {
|
|
70
|
+
import { handleNextScreenStep } from '../../../app/settings';
|
|
71
|
+
import { CONNECT_STEP_NAMES, defaultCountry, IDENTIFICATION_TYPE, OTHER_BRAND } from '../../../constants';
|
|
72
|
+
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
73
|
+
import { AuthForType, FlowsTypes } from '../../../@types';
|
|
74
|
+
import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM } from '../../../utils';
|
|
76
75
|
export var createMobileAuth = createAsyncThunk('createMobileAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
77
76
|
var settings, requestBody, data;
|
|
78
77
|
var _a, _b;
|
|
@@ -81,6 +80,8 @@ export var createMobileAuth = createAsyncThunk('createMobileAuth', function (par
|
|
|
81
80
|
case 0:
|
|
82
81
|
settings = thunkApi.getState().settings;
|
|
83
82
|
requestBody = {
|
|
83
|
+
country: settings.data.businessCountry.iso2,
|
|
84
|
+
scope: settings.data.appConfig.scope,
|
|
84
85
|
lang: settings.data.language,
|
|
85
86
|
user_credentail: {
|
|
86
87
|
phone: params.mobile || '',
|
|
@@ -93,11 +94,9 @@ export var createMobileAuth = createAsyncThunk('createMobileAuth', function (par
|
|
|
93
94
|
};
|
|
94
95
|
return [4, API.authService.createAuth(requestBody)];
|
|
95
96
|
case 1:
|
|
96
|
-
data =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
(_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
100
|
-
}
|
|
97
|
+
data = _c.sent();
|
|
98
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
99
|
+
(_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
101
100
|
return [2, { response: data, formData: params }];
|
|
102
101
|
}
|
|
103
102
|
});
|
|
@@ -110,6 +109,8 @@ export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (p
|
|
|
110
109
|
case 0:
|
|
111
110
|
settings = thunkApi.getState().settings;
|
|
112
111
|
requestBody = {
|
|
112
|
+
country: settings.data.businessCountry.iso2,
|
|
113
|
+
scope: settings.data.appConfig.scope,
|
|
113
114
|
lang: settings.data.language,
|
|
114
115
|
user_credentail: {
|
|
115
116
|
identification_id: params.civilId,
|
|
@@ -122,23 +123,23 @@ export var createCivilIdAuth = createAsyncThunk('createCivilIdAuth', function (p
|
|
|
122
123
|
};
|
|
123
124
|
return [4, API.authService.createAuth(requestBody)];
|
|
124
125
|
case 1:
|
|
125
|
-
data =
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
(_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
129
|
-
}
|
|
126
|
+
data = _c.sent();
|
|
127
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
128
|
+
(_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
130
129
|
return [2, { response: data, formData: params }];
|
|
131
130
|
}
|
|
132
131
|
});
|
|
133
132
|
}); });
|
|
134
133
|
export var resendOTPMobile = createAsyncThunk('resendOTPMobile', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
135
|
-
var _a, settings, connect, _b, mobile, countryCode, requestBody
|
|
134
|
+
var _a, settings, connect, _b, mobile, countryCode, requestBody;
|
|
136
135
|
return __generator(this, function (_c) {
|
|
137
136
|
switch (_c.label) {
|
|
138
137
|
case 0:
|
|
139
138
|
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
140
139
|
_b = connect.data.mobileData, mobile = _b.mobile, countryCode = _b.countryCode;
|
|
141
140
|
requestBody = {
|
|
141
|
+
country: settings.data.businessCountry.iso2,
|
|
142
|
+
scope: settings.data.appConfig.scope,
|
|
142
143
|
lang: settings.data.language,
|
|
143
144
|
user_credentail: {
|
|
144
145
|
phone: mobile || '',
|
|
@@ -150,26 +151,26 @@ export var resendOTPMobile = createAsyncThunk('resendOTPMobile', function (param
|
|
|
150
151
|
encryption_contract: ['user_credentail.phone', 'user_credentail.code']
|
|
151
152
|
};
|
|
152
153
|
return [4, API.authService.createAuth(requestBody)];
|
|
153
|
-
case 1:
|
|
154
|
-
data = (_c.sent()).data;
|
|
155
|
-
return [2, data];
|
|
154
|
+
case 1: return [2, _c.sent()];
|
|
156
155
|
}
|
|
157
156
|
});
|
|
158
157
|
}); });
|
|
159
|
-
export var
|
|
160
|
-
var settings, identification_id_type, requestBody, data;
|
|
161
|
-
var _a, _b;
|
|
158
|
+
export var resendOTPNID = createAsyncThunk('resendOTPNID', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
159
|
+
var _a, settings, connect, _b, nid, dob, identification_id_type, requestBody, data;
|
|
162
160
|
return __generator(this, function (_c) {
|
|
163
161
|
switch (_c.label) {
|
|
164
162
|
case 0:
|
|
165
|
-
|
|
166
|
-
|
|
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;
|
|
167
166
|
requestBody = {
|
|
167
|
+
country: settings.data.businessCountry.iso2,
|
|
168
|
+
scope: settings.data.appConfig.scope,
|
|
168
169
|
lang: settings.data.language,
|
|
169
170
|
user_credentail: {
|
|
170
|
-
identification_id:
|
|
171
|
+
identification_id: nid,
|
|
171
172
|
identification_id_type: identification_id_type,
|
|
172
|
-
date_of_birth:
|
|
173
|
+
date_of_birth: dob,
|
|
173
174
|
country_code: settings.data.businessCountry.iso2
|
|
174
175
|
},
|
|
175
176
|
sign_in: false,
|
|
@@ -184,28 +185,27 @@ export var createNIDAuth = createAsyncThunk('createNIDAuth', function (params, t
|
|
|
184
185
|
};
|
|
185
186
|
return [4, API.authService.createAuth(requestBody)];
|
|
186
187
|
case 1:
|
|
187
|
-
data =
|
|
188
|
-
|
|
189
|
-
thunkApi.dispatch(handleNextScreenStep());
|
|
190
|
-
(_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
191
|
-
}
|
|
192
|
-
return [2, { response: data, formData: __assign(__assign({}, params), { type: identification_id_type }) }];
|
|
188
|
+
data = _c.sent();
|
|
189
|
+
return [2, data];
|
|
193
190
|
}
|
|
194
191
|
});
|
|
195
192
|
}); });
|
|
196
|
-
export var
|
|
197
|
-
var
|
|
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;
|
|
195
|
+
var _a, _b;
|
|
198
196
|
return __generator(this, function (_c) {
|
|
199
197
|
switch (_c.label) {
|
|
200
198
|
case 0:
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
settings = thunkApi.getState().settings;
|
|
200
|
+
identification_id_type = params.nid.startsWith('1') ? IDENTIFICATION_TYPE.NID : IDENTIFICATION_TYPE.IQAMA;
|
|
203
201
|
requestBody = {
|
|
202
|
+
country: settings.data.businessCountry.iso2,
|
|
203
|
+
scope: settings.data.appConfig.scope,
|
|
204
204
|
lang: settings.data.language,
|
|
205
205
|
user_credentail: {
|
|
206
|
-
identification_id: nid,
|
|
207
|
-
identification_id_type:
|
|
208
|
-
date_of_birth: dob,
|
|
206
|
+
identification_id: params.nid,
|
|
207
|
+
identification_id_type: identification_id_type,
|
|
208
|
+
date_of_birth: params.dob,
|
|
209
209
|
country_code: settings.data.businessCountry.iso2
|
|
210
210
|
},
|
|
211
211
|
sign_in: false,
|
|
@@ -220,16 +220,18 @@ export var resendOTPNID = createAsyncThunk('resendOTPNID', function (params, thu
|
|
|
220
220
|
};
|
|
221
221
|
return [4, API.authService.createAuth(requestBody)];
|
|
222
222
|
case 1:
|
|
223
|
-
data =
|
|
224
|
-
|
|
223
|
+
data = _c.sent();
|
|
224
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
225
|
+
(_b = (_a = settings.data.appConfig).onStepCompleted) === null || _b === void 0 ? void 0 : _b.call(_a, settings.data.activeScreen.name, requestBody.user_credentail);
|
|
226
|
+
return [2, { response: data, formData: __assign(__assign({}, params), { type: identification_id_type }) }];
|
|
225
227
|
}
|
|
226
228
|
});
|
|
227
229
|
}); });
|
|
228
230
|
export var verifyAuth = createAsyncThunk('connect/verifyAuth', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
229
|
-
var _a, connect, settings, startWithNID, _b, mobileData, nidData, responseBody, stepName, payload, data, lead_id,
|
|
230
|
-
var
|
|
231
|
-
return __generator(this, function (
|
|
232
|
-
switch (
|
|
231
|
+
var _a, connect, settings, startWithNID, _b, mobileData, nidData, responseBody, stepName, payload, data, lead_id, leadResponse, channels, brands, err_1, countryCode, phone;
|
|
232
|
+
var _c, _d, _e, _f;
|
|
233
|
+
return __generator(this, function (_g) {
|
|
234
|
+
switch (_g.label) {
|
|
233
235
|
case 0:
|
|
234
236
|
_a = thunkApi.getState(), connect = _a.connect, settings = _a.settings;
|
|
235
237
|
startWithNID = connect.data.otpData.authFor === AuthForType.NATIONAL_ID;
|
|
@@ -244,73 +246,58 @@ export var verifyAuth = createAsyncThunk('connect/verifyAuth', function (params,
|
|
|
244
246
|
service_name: responseBody === null || responseBody === void 0 ? void 0 : responseBody.service_name,
|
|
245
247
|
sign_in: responseBody === null || responseBody === void 0 ? void 0 : responseBody.sign_in,
|
|
246
248
|
remember_me: responseBody === null || responseBody === void 0 ? void 0 : responseBody.remember_me,
|
|
247
|
-
scopes: responseBody === null || responseBody === void 0 ? void 0 : responseBody.scopes,
|
|
248
249
|
step_name: stepName,
|
|
249
250
|
encryption_contract: ['data']
|
|
250
251
|
};
|
|
251
252
|
return [4, API.authService.verifyAuth(payload)];
|
|
252
253
|
case 1:
|
|
253
|
-
data = (
|
|
254
|
-
if ((
|
|
254
|
+
data = (_g.sent()).data;
|
|
255
|
+
if ((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length)
|
|
255
256
|
throw new Error(data.errors[0].description);
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
};
|
|
261
|
-
|
|
257
|
+
sendCustomEventToGTM({
|
|
258
|
+
event: 'Send Event',
|
|
259
|
+
event_category: 'User Registration Flow',
|
|
260
|
+
event_action: 'First OTP Success'
|
|
261
|
+
});
|
|
262
|
+
lead_id = data.lead_id;
|
|
263
|
+
if (!lead_id)
|
|
264
|
+
throw new Error('Lead id is missing');
|
|
262
265
|
return [4, API.leadService.retrieveLead(lead_id)];
|
|
263
266
|
case 2:
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
+
leadResponse = (_g.sent()).data;
|
|
268
|
+
if ((_d = leadResponse.errors) === null || _d === void 0 ? void 0 : _d.length)
|
|
269
|
+
throw new Error(leadResponse.errors[0].description);
|
|
270
|
+
return [4, API.dataService.getChannelsOfServices({ page: 0 })];
|
|
271
|
+
case 3:
|
|
272
|
+
channels = (_g.sent()).list;
|
|
273
|
+
leadResponse.channel_list = channels;
|
|
274
|
+
_g.label = 4;
|
|
267
275
|
case 4:
|
|
268
|
-
|
|
269
|
-
|
|
276
|
+
_g.trys.push([4, 6, , 7]);
|
|
277
|
+
return [4, API.brandService.getBrandList({ individual_id: leadResponse.individual_id })];
|
|
270
278
|
case 5:
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
isNewUser = leadResponse.is_new_individual;
|
|
275
|
-
if (!!isNewUser) return [3, 11];
|
|
276
|
-
_j.label = 6;
|
|
279
|
+
brands = (_g.sent()).brands;
|
|
280
|
+
leadResponse.brand_list = fixBrandList(brands, channels);
|
|
281
|
+
return [3, 7];
|
|
277
282
|
case 6:
|
|
278
|
-
|
|
279
|
-
return [
|
|
283
|
+
err_1 = _g.sent();
|
|
284
|
+
return [3, 7];
|
|
280
285
|
case 7:
|
|
281
|
-
brands = (_j.sent()).brands;
|
|
282
|
-
leadResponse.brand_list = brands;
|
|
283
|
-
return [3, 9];
|
|
284
|
-
case 8:
|
|
285
|
-
err_1 = _j.sent();
|
|
286
|
-
return [3, 9];
|
|
287
|
-
case 9: return [4, API.dataService.getChannelsOfServices({ page: 0 })];
|
|
288
|
-
case 10:
|
|
289
|
-
channels = (_j.sent()).list;
|
|
290
|
-
leadResponse.channel_list = channels;
|
|
291
|
-
_j.label = 11;
|
|
292
|
-
case 11:
|
|
293
286
|
countryCode = settings.data.businessCountry;
|
|
294
|
-
|
|
295
|
-
_d = contact || {}, phone = _d.phone, email = _d.email;
|
|
296
|
-
userInfoMissed = (!phone || !email || !name) && !isNewUser;
|
|
287
|
+
phone = (leadResponse.contact || {}).phone;
|
|
297
288
|
if (phone === null || phone === void 0 ? void 0 : phone.country_code)
|
|
298
289
|
countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
|
|
299
|
-
(
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
return [2, { authResponse: data, leadResponse: leadResponse, isNewUser: isNewUser, countryCode: countryCode, userInfoMissed: userInfoMissed }];
|
|
303
|
-
}
|
|
304
|
-
thunkApi.dispatch(handleNextScreenStep('CONNECT_MERCHANT_INFO_STEP'));
|
|
305
|
-
return [2, { authResponse: data, leadResponse: leadResponse, isNewUser: isNewUser, countryCode: countryCode, userInfoMissed: userInfoMissed }];
|
|
290
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, { otp: params.otp });
|
|
291
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
292
|
+
return [2, { authResponse: data, leadResponse: leadResponse, countryCode: countryCode }];
|
|
306
293
|
}
|
|
307
294
|
});
|
|
308
295
|
}); });
|
|
309
296
|
export var verifyPACI = createAsyncThunk('connect/verifyPACI', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
310
|
-
var _a, settings, connect, responseBody, expiry, interval, maxCalls, count, authResponse, isSuccess, lead_id,
|
|
311
|
-
var
|
|
312
|
-
return __generator(this, function (
|
|
313
|
-
switch (
|
|
297
|
+
var _a, settings, connect, responseBody, expiry, interval, maxCalls, count, authResponse, isSuccess, lead_id, leadResponse, countryCode, channels, brands, err_2, phone;
|
|
298
|
+
var _b, _c, _d, _e, _f;
|
|
299
|
+
return __generator(this, function (_g) {
|
|
300
|
+
switch (_g.label) {
|
|
314
301
|
case 0:
|
|
315
302
|
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
316
303
|
responseBody = connect.data.civilIdData.responseBody;
|
|
@@ -318,129 +305,127 @@ export var verifyPACI = createAsyncThunk('connect/verifyPACI', function (params,
|
|
|
318
305
|
interval = 3;
|
|
319
306
|
maxCalls = Math.floor(expiry / interval);
|
|
320
307
|
count = 1;
|
|
321
|
-
|
|
308
|
+
_g.label = 1;
|
|
322
309
|
case 1:
|
|
323
|
-
if (!(count <= maxCalls)) return [3,
|
|
310
|
+
if (!(count <= maxCalls)) return [3, 13];
|
|
324
311
|
if (thunkApi.signal.aborted) {
|
|
325
|
-
return [3,
|
|
312
|
+
return [3, 13];
|
|
326
313
|
}
|
|
327
314
|
return [4, API.authService.getVerifyAuth(responseBody === null || responseBody === void 0 ? void 0 : responseBody.auth_token)];
|
|
328
315
|
case 2:
|
|
329
|
-
authResponse =
|
|
330
|
-
isSuccess = ((
|
|
331
|
-
if (!isSuccess) return [3,
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
lead_id = authResponse.lead_id, individual_id = authResponse.individual_id;
|
|
336
|
-
leadBody = {
|
|
337
|
-
country_code: settings.data.businessCountry.iso2,
|
|
338
|
-
individual_id: individual_id
|
|
339
|
-
};
|
|
340
|
-
if (!lead_id) return [3, 5];
|
|
316
|
+
authResponse = _g.sent();
|
|
317
|
+
isSuccess = ((_b = authResponse.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
|
|
318
|
+
if (!isSuccess) return [3, 10];
|
|
319
|
+
lead_id = authResponse.lead_id;
|
|
320
|
+
if (!lead_id)
|
|
321
|
+
throw new Error('Lead id is missing');
|
|
341
322
|
return [4, API.leadService.retrieveLead(lead_id)];
|
|
323
|
+
case 3:
|
|
324
|
+
leadResponse = (_g.sent()).data;
|
|
325
|
+
if ((_c = leadResponse.errors) === null || _c === void 0 ? void 0 : _c.length)
|
|
326
|
+
throw new Error(leadResponse.errors[0].description);
|
|
327
|
+
countryCode = settings.data.businessCountry;
|
|
328
|
+
return [4, API.dataService.getChannelsOfServices({ page: 0 })];
|
|
342
329
|
case 4:
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
330
|
+
channels = (_g.sent()).list;
|
|
331
|
+
leadResponse.channel_list = channels;
|
|
332
|
+
_g.label = 5;
|
|
333
|
+
case 5:
|
|
334
|
+
_g.trys.push([5, 7, , 8]);
|
|
335
|
+
return [4, API.brandService.getBrandList({ individual_id: leadResponse.individual_id })];
|
|
346
336
|
case 6:
|
|
347
|
-
|
|
348
|
-
|
|
337
|
+
brands = (_g.sent()).brands;
|
|
338
|
+
leadResponse.brand_list = fixBrandList(brands, channels);
|
|
339
|
+
return [3, 8];
|
|
349
340
|
case 7:
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
throw new Error(leadResponse.errors[0].description);
|
|
353
|
-
isNewUser = leadResponse.is_new_individual;
|
|
354
|
-
countryCode = settings.data.businessCountry;
|
|
355
|
-
contact = leadResponse.contact, name_1 = leadResponse.name;
|
|
356
|
-
_c = contact || {}, phone = _c.phone, email = _c.email;
|
|
357
|
-
userInfoMissed = (!phone || !email || !name_1) && !isNewUser;
|
|
358
|
-
if (!!isNewUser) return [3, 13];
|
|
359
|
-
_j.label = 8;
|
|
341
|
+
err_2 = _g.sent();
|
|
342
|
+
return [3, 8];
|
|
360
343
|
case 8:
|
|
361
|
-
|
|
362
|
-
return [4,
|
|
344
|
+
(_d = params.onSuccess) === null || _d === void 0 ? void 0 : _d.call(params);
|
|
345
|
+
return [4, sleep(3000)];
|
|
363
346
|
case 9:
|
|
364
|
-
|
|
365
|
-
leadResponse.
|
|
366
|
-
return [3, 11];
|
|
367
|
-
case 10:
|
|
368
|
-
err_2 = _j.sent();
|
|
369
|
-
return [3, 11];
|
|
370
|
-
case 11: return [4, API.dataService.getChannelsOfServices({ page: 0 })];
|
|
371
|
-
case 12:
|
|
372
|
-
channels = (_j.sent()).list;
|
|
373
|
-
leadResponse.channel_list = channels;
|
|
374
|
-
_j.label = 13;
|
|
375
|
-
case 13:
|
|
347
|
+
_g.sent();
|
|
348
|
+
phone = (leadResponse.contact || {}).phone;
|
|
376
349
|
if (phone === null || phone === void 0 ? void 0 : phone.country_code)
|
|
377
350
|
countryCode = findCountryByIddPrefix(settings.data.countries, phone.country_code);
|
|
378
|
-
(
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
case
|
|
386
|
-
case 15:
|
|
387
|
-
_j.sent();
|
|
388
|
-
_j.label = 16;
|
|
389
|
-
case 16:
|
|
351
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, {});
|
|
352
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
353
|
+
return [2, { authResponse: authResponse, leadResponse: leadResponse, countryCode: countryCode }];
|
|
354
|
+
case 10: return [4, sleep(interval * 1000)];
|
|
355
|
+
case 11:
|
|
356
|
+
_g.sent();
|
|
357
|
+
_g.label = 12;
|
|
358
|
+
case 12:
|
|
390
359
|
count++;
|
|
391
360
|
return [3, 1];
|
|
392
|
-
case
|
|
361
|
+
case 13: throw new Error('paci_verification_failed');
|
|
393
362
|
}
|
|
394
363
|
});
|
|
395
364
|
}); });
|
|
396
365
|
export var updateLeadIndividual = createAsyncThunk('updateLeadIndividual', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
397
|
-
var _a, settings, connect,
|
|
398
|
-
var _c, _d, _e, _f
|
|
399
|
-
return __generator(this, function (
|
|
400
|
-
switch (
|
|
366
|
+
var _a, settings, connect, lead_id, phoneCountry, payload, leadResponse, segments, err_3, teamSize, err_4, brand;
|
|
367
|
+
var _b, _c, _d, _e, _f;
|
|
368
|
+
return __generator(this, function (_g) {
|
|
369
|
+
switch (_g.label) {
|
|
401
370
|
case 0:
|
|
402
371
|
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
403
|
-
|
|
404
|
-
phoneCountry = (
|
|
405
|
-
payload =
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
372
|
+
lead_id = (connect.data.otpData.responseBody || {}).lead_id;
|
|
373
|
+
phoneCountry = (_c = (_b = params.countryCode) === null || _b === void 0 ? void 0 : _b.idd_prefix) === null || _c === void 0 ? void 0 : _c.toString();
|
|
374
|
+
payload = {
|
|
375
|
+
id: lead_id || '',
|
|
376
|
+
country_code: (_d = settings.data.businessCountry) === null || _d === void 0 ? void 0 : _d.iso2,
|
|
377
|
+
name: getIndividualName(params.name),
|
|
378
|
+
contact: __assign({ email: params.email }, (params.mobile && { phone: { country_code: phoneCountry, number: params.mobile } })),
|
|
379
|
+
step_name: CONNECT_STEP_NAMES.UPDATE_LEAD_INDIVIDUAL,
|
|
380
|
+
encryption_contract: ['name.first', 'name.middle', 'name.last', 'contact.email', 'contact.phone.country_code', 'contact.phone.number']
|
|
381
|
+
};
|
|
413
382
|
return [4, API.leadService.updateLead(payload)];
|
|
414
383
|
case 1:
|
|
415
|
-
leadResponse =
|
|
416
|
-
|
|
417
|
-
return [4, API.brandService.retrieveBrand(leadResponse.brand.id)];
|
|
384
|
+
leadResponse = _g.sent();
|
|
385
|
+
_g.label = 2;
|
|
418
386
|
case 2:
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
_h.label = 3;
|
|
387
|
+
_g.trys.push([2, 4, , 5]);
|
|
388
|
+
return [4, API.dataService.getSegments({ page: 0 })];
|
|
422
389
|
case 3:
|
|
423
|
-
|
|
424
|
-
|
|
390
|
+
segments = _g.sent();
|
|
391
|
+
leadResponse.segments_list = segments.list;
|
|
392
|
+
return [3, 5];
|
|
425
393
|
case 4:
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
_h.label = 5;
|
|
394
|
+
err_3 = _g.sent();
|
|
395
|
+
return [3, 5];
|
|
429
396
|
case 5:
|
|
430
|
-
|
|
397
|
+
_g.trys.push([5, 7, , 8]);
|
|
398
|
+
return [4, API.dataService.getTeamSize({ page: 0 })];
|
|
399
|
+
case 6:
|
|
400
|
+
teamSize = _g.sent();
|
|
401
|
+
leadResponse.team_size_list = teamSize.list;
|
|
402
|
+
return [3, 8];
|
|
403
|
+
case 7:
|
|
404
|
+
err_4 = _g.sent();
|
|
405
|
+
return [3, 8];
|
|
406
|
+
case 8:
|
|
407
|
+
if (!leadResponse.brand) return [3, 10];
|
|
408
|
+
return [4, API.brandService.retrieveBrand(leadResponse.brand.id)];
|
|
409
|
+
case 9:
|
|
410
|
+
brand = (_g.sent()).brand;
|
|
411
|
+
leadResponse.brand = __assign(__assign({}, leadResponse.brand), brand);
|
|
412
|
+
_g.label = 10;
|
|
413
|
+
case 10:
|
|
414
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, params);
|
|
431
415
|
thunkApi.dispatch(handleNextScreenStep());
|
|
432
416
|
return [2, { leadResponse: leadResponse, formData: params }];
|
|
433
417
|
}
|
|
434
418
|
});
|
|
435
419
|
}); });
|
|
436
420
|
export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
437
|
-
var _a, settings, connect, responseBody, isNewBrand, brandName, salesChannels, selectedBrandItem, getAddress, channel_services, payload_1,
|
|
438
|
-
var _b, _c, _d, _e, _f, _g;
|
|
439
|
-
return __generator(this, function (
|
|
440
|
-
switch (
|
|
421
|
+
var _a, settings, connect, responseBody, leadBrandId, isNewBrand, brandName, salesChannels, selectedBrandItem, getAddress, channel_services, payload_1, brandReqBody_1, brand_1, brandNameBody, payload, lead, brandReqBody, brand;
|
|
422
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
423
|
+
return __generator(this, function (_l) {
|
|
424
|
+
switch (_l.label) {
|
|
441
425
|
case 0:
|
|
442
426
|
_a = thunkApi.getState(), settings = _a.settings, connect = _a.connect;
|
|
443
427
|
responseBody = connect.data.otpData.responseBody;
|
|
428
|
+
leadBrandId = responseBody === null || responseBody === void 0 ? void 0 : responseBody.brand_id;
|
|
444
429
|
isNewBrand = params.isNewBrand, brandName = params.brandName, salesChannels = params.salesChannels, selectedBrandItem = params.selectedBrandItem;
|
|
445
430
|
getAddress = function (value, isTwitter, isWeb) {
|
|
446
431
|
if (isTwitter)
|
|
@@ -459,7 +444,8 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
459
444
|
})
|
|
460
445
|
};
|
|
461
446
|
});
|
|
462
|
-
if (!!isNewBrand) return [3,
|
|
447
|
+
if (!!isNewBrand) return [3, 4];
|
|
448
|
+
if (!(leadBrandId !== (selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.id))) return [3, 2];
|
|
463
449
|
payload_1 = {
|
|
464
450
|
brand: {
|
|
465
451
|
id: (selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.id) || ''
|
|
@@ -469,21 +455,26 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
469
455
|
};
|
|
470
456
|
return [4, API.leadService.updateLead(payload_1)];
|
|
471
457
|
case 1:
|
|
472
|
-
|
|
458
|
+
_l.sent();
|
|
459
|
+
_l.label = 2;
|
|
460
|
+
case 2:
|
|
473
461
|
brandReqBody_1 = {
|
|
474
|
-
id: (
|
|
462
|
+
id: (selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.id) || '',
|
|
475
463
|
channel_services: channel_services,
|
|
464
|
+
term: ['general'],
|
|
465
|
+
segment: { type: { id: ((_b = params.segment) === null || _b === void 0 ? void 0 : _b.id) || '' }, team: { id: ((_c = params.teamSize) === null || _c === void 0 ? void 0 : _c.id) || '' } },
|
|
476
466
|
step_name: CONNECT_STEP_NAMES.UPDATE_BRAND_INFO
|
|
477
467
|
};
|
|
478
468
|
return [4, API.brandService.updateBrandInfo(brandReqBody_1)];
|
|
479
|
-
case
|
|
480
|
-
brand_1 =
|
|
469
|
+
case 3:
|
|
470
|
+
brand_1 = _l.sent();
|
|
481
471
|
thunkApi.dispatch(updateLeadSuccess());
|
|
482
472
|
thunkApi.dispatch(handleNextScreenStep());
|
|
483
|
-
(
|
|
473
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, params);
|
|
484
474
|
return [2, { response: brand_1, formData: params }];
|
|
485
|
-
case
|
|
475
|
+
case 4:
|
|
486
476
|
brandNameBody = {
|
|
477
|
+
id: '',
|
|
487
478
|
name: {
|
|
488
479
|
en: brandName,
|
|
489
480
|
ar: brandName,
|
|
@@ -497,20 +488,25 @@ export var updateLeadBrand = createAsyncThunk('updateLeadBrand', function (param
|
|
|
497
488
|
encryption_contract: ['brand.name.en', 'brand.name.ar', 'brand.name.zh']
|
|
498
489
|
};
|
|
499
490
|
return [4, API.leadService.updateLead(payload)];
|
|
500
|
-
case
|
|
501
|
-
lead =
|
|
491
|
+
case 5:
|
|
492
|
+
lead = _l.sent();
|
|
493
|
+
if (!lead.brand) {
|
|
494
|
+
console.error('Internal server error: brand is not created');
|
|
495
|
+
throw new Error('Internal server error');
|
|
496
|
+
}
|
|
502
497
|
brandReqBody = {
|
|
503
|
-
id: ((
|
|
498
|
+
id: ((_f = lead.brand) === null || _f === void 0 ? void 0 : _f.id) || '',
|
|
504
499
|
channel_services: channel_services,
|
|
505
|
-
term: ['
|
|
506
|
-
step_name: CONNECT_STEP_NAMES.UPDATE_BRAND_INFO
|
|
500
|
+
term: ['general'],
|
|
501
|
+
step_name: CONNECT_STEP_NAMES.UPDATE_BRAND_INFO,
|
|
502
|
+
segment: { type: { id: ((_g = params.segment) === null || _g === void 0 ? void 0 : _g.id) || '' }, team: { id: ((_h = params.teamSize) === null || _h === void 0 ? void 0 : _h.id) || '' } }
|
|
507
503
|
};
|
|
508
504
|
return [4, API.brandService.updateBrandInfo(brandReqBody)];
|
|
509
|
-
case
|
|
510
|
-
brand =
|
|
505
|
+
case 6:
|
|
506
|
+
brand = _l.sent();
|
|
511
507
|
thunkApi.dispatch(updateLeadSuccess());
|
|
512
508
|
thunkApi.dispatch(handleNextScreenStep());
|
|
513
|
-
(
|
|
509
|
+
(_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, params);
|
|
514
510
|
return [2, { response: brand, formData: params }];
|
|
515
511
|
}
|
|
516
512
|
});
|
|
@@ -579,7 +575,7 @@ export var updateLeadSuccess = createAsyncThunk('updateLeadSuccess', function (p
|
|
|
579
575
|
return [4, API.leadService.updateLead(payload)];
|
|
580
576
|
case 1:
|
|
581
577
|
data = _f.sent();
|
|
582
|
-
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name,
|
|
578
|
+
(_c = (_b = settings.data.appConfig).onStepCompleted) === null || _c === void 0 ? void 0 : _c.call(_b, settings.data.activeScreen.name, {});
|
|
583
579
|
(_e = (_d = settings.data.appConfig).onFlowCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, { data: data });
|
|
584
580
|
return [2, { response: data, formData: params }];
|
|
585
581
|
}
|
|
@@ -597,7 +593,7 @@ var initialState = {
|
|
|
597
593
|
},
|
|
598
594
|
nidData: {
|
|
599
595
|
nid: '',
|
|
600
|
-
dob:
|
|
596
|
+
dob: '',
|
|
601
597
|
type: ''
|
|
602
598
|
},
|
|
603
599
|
civilIdData: {
|
|
@@ -611,11 +607,17 @@ var initialState = {
|
|
|
611
607
|
name: '',
|
|
612
608
|
email: '',
|
|
613
609
|
mobile: '',
|
|
614
|
-
countryCode: defaultCountry
|
|
610
|
+
countryCode: defaultCountry,
|
|
611
|
+
responseBody: {
|
|
612
|
+
segments_list: [],
|
|
613
|
+
team_size_list: []
|
|
614
|
+
}
|
|
615
615
|
},
|
|
616
616
|
brandData: {
|
|
617
617
|
brandName: '',
|
|
618
618
|
salesChannels: [],
|
|
619
|
+
segment: undefined,
|
|
620
|
+
teamSize: undefined,
|
|
619
621
|
termAndConditionChecked: false,
|
|
620
622
|
selectedBrandItem: {},
|
|
621
623
|
responseBody: {
|
|
@@ -663,15 +665,9 @@ export var connectSlice = createSlice({
|
|
|
663
665
|
extraReducers: function (builder) {
|
|
664
666
|
builder
|
|
665
667
|
.addCase(createMobileAuth.fulfilled, function (state, action) {
|
|
666
|
-
var _a;
|
|
667
668
|
state.loading = false;
|
|
668
669
|
state.error = null;
|
|
669
|
-
var
|
|
670
|
-
var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
671
|
-
if (description) {
|
|
672
|
-
state.error = description;
|
|
673
|
-
return;
|
|
674
|
-
}
|
|
670
|
+
var _a = action.payload, formData = _a.formData, response = _a.response;
|
|
675
671
|
state.data.mobileData = formData;
|
|
676
672
|
state.data.mobileData.responseBody = response;
|
|
677
673
|
state.data.otpData.authFor = AuthForType.MOBILE;
|
|
@@ -685,14 +681,8 @@ export var connectSlice = createSlice({
|
|
|
685
681
|
state.error = action.error.message;
|
|
686
682
|
})
|
|
687
683
|
.addCase(resendOTPMobile.fulfilled, function (state, action) {
|
|
688
|
-
var _a;
|
|
689
684
|
state.error = null;
|
|
690
685
|
var response = action.payload;
|
|
691
|
-
var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
692
|
-
if (description) {
|
|
693
|
-
state.error = description;
|
|
694
|
-
return;
|
|
695
|
-
}
|
|
696
686
|
state.data.mobileData.responseBody = response;
|
|
697
687
|
state.data.otpData.authFor = AuthForType.MOBILE;
|
|
698
688
|
})
|
|
@@ -707,15 +697,9 @@ export var connectSlice = createSlice({
|
|
|
707
697
|
state.error = null;
|
|
708
698
|
})
|
|
709
699
|
.addCase(createCivilIdAuth.fulfilled, function (state, action) {
|
|
710
|
-
var _a;
|
|
711
700
|
state.loading = false;
|
|
712
701
|
state.error = null;
|
|
713
|
-
var
|
|
714
|
-
var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
715
|
-
if (description) {
|
|
716
|
-
state.error = description;
|
|
717
|
-
return;
|
|
718
|
-
}
|
|
702
|
+
var _a = action.payload, formData = _a.formData, response = _a.response;
|
|
719
703
|
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
720
704
|
state.data.civilIdData = __assign(__assign({}, formData), { responseBody: response });
|
|
721
705
|
})
|
|
@@ -731,7 +715,7 @@ export var connectSlice = createSlice({
|
|
|
731
715
|
var _a;
|
|
732
716
|
state.loading = false;
|
|
733
717
|
state.error = null;
|
|
734
|
-
var _b = action.payload, authResponse = _b.authResponse, leadResponse = _b.leadResponse,
|
|
718
|
+
var _b = action.payload, authResponse = _b.authResponse, leadResponse = _b.leadResponse, countryCode = _b.countryCode;
|
|
735
719
|
var name = leadResponse.name, contact = leadResponse.contact, brand = leadResponse.brand, brand_list = leadResponse.brand_list, channel_list = leadResponse.channel_list, is_new_individual = leadResponse.is_new_individual, id = leadResponse.id;
|
|
736
720
|
var _c = contact || {}, email = _c.email, phone = _c.phone;
|
|
737
721
|
var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
|
|
@@ -747,22 +731,20 @@ export var connectSlice = createSlice({
|
|
|
747
731
|
state.data.individualData.countryCode = countryCode;
|
|
748
732
|
if ((_a = brand === null || brand === void 0 ? void 0 : brand.name) === null || _a === void 0 ? void 0 : _a.en)
|
|
749
733
|
state.data.brandData.brandName = brand.name.en;
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
state.data.brandData.selectedBrandItem = brandList[0];
|
|
759
|
-
}
|
|
760
|
-
state.data.brandData.responseBody = {
|
|
761
|
-
brand_list: brandList,
|
|
762
|
-
channel_list: channel_list
|
|
763
|
-
};
|
|
734
|
+
var brandList = [];
|
|
735
|
+
if ((brand_list === null || brand_list === void 0 ? void 0 : brand_list.length) > 0) {
|
|
736
|
+
var isBrandExist = brand_list.find(function (item) { return item.id === (brand === null || brand === void 0 ? void 0 : brand.id); });
|
|
737
|
+
brandList = __spreadArray([], brand_list, true);
|
|
738
|
+
if (!isBrandExist && brand)
|
|
739
|
+
brandList = __spreadArray(__spreadArray([], brandList, true), [__assign(__assign({}, brand), { channel_services: [] })], false);
|
|
740
|
+
brandList = __spreadArray(__spreadArray([], brandList, true), [OTHER_BRAND], false);
|
|
741
|
+
state.data.brandData.selectedBrandItem = brandList[0];
|
|
764
742
|
}
|
|
765
|
-
state.data.
|
|
743
|
+
state.data.brandData.responseBody = {
|
|
744
|
+
brand_list: brandList,
|
|
745
|
+
channel_list: channel_list
|
|
746
|
+
};
|
|
747
|
+
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 });
|
|
766
748
|
})
|
|
767
749
|
.addCase(verifyPACI.rejected, function (state, action) {
|
|
768
750
|
state.loading = false;
|
|
@@ -775,7 +757,7 @@ export var connectSlice = createSlice({
|
|
|
775
757
|
var _a;
|
|
776
758
|
state.loading = false;
|
|
777
759
|
state.error = null;
|
|
778
|
-
var _b = action.payload, authResponse = _b.authResponse, leadResponse = _b.leadResponse,
|
|
760
|
+
var _b = action.payload, authResponse = _b.authResponse, leadResponse = _b.leadResponse, countryCode = _b.countryCode;
|
|
779
761
|
var name = leadResponse.name, contact = leadResponse.contact, brand = leadResponse.brand, brand_list = leadResponse.brand_list, channel_list = leadResponse.channel_list, is_new_individual = leadResponse.is_new_individual, id = leadResponse.id;
|
|
780
762
|
var _c = contact || {}, email = _c.email, phone = _c.phone;
|
|
781
763
|
var fullName = concatenateObjectValues(name, ['first', 'middle', 'last']);
|
|
@@ -791,22 +773,20 @@ export var connectSlice = createSlice({
|
|
|
791
773
|
state.data.individualData.countryCode = countryCode;
|
|
792
774
|
if ((_a = brand === null || brand === void 0 ? void 0 : brand.name) === null || _a === void 0 ? void 0 : _a.en)
|
|
793
775
|
state.data.brandData.brandName = brand.name.en;
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
state.data.brandData.selectedBrandItem = brandList[0];
|
|
803
|
-
}
|
|
804
|
-
state.data.brandData.responseBody = {
|
|
805
|
-
brand_list: brandList,
|
|
806
|
-
channel_list: channel_list
|
|
807
|
-
};
|
|
776
|
+
var brandList = [];
|
|
777
|
+
if ((brand_list === null || brand_list === void 0 ? void 0 : brand_list.length) > 0) {
|
|
778
|
+
var isBrandExist = brand_list.find(function (item) { return item.id === (brand === null || brand === void 0 ? void 0 : brand.id); });
|
|
779
|
+
brandList = __spreadArray([], brand_list, true);
|
|
780
|
+
if (!isBrandExist && brand)
|
|
781
|
+
brandList = __spreadArray(__spreadArray([], brandList, true), [__assign(__assign({}, brand), { channel_services: [] })], false);
|
|
782
|
+
brandList = __spreadArray(__spreadArray([], brandList, true), [OTHER_BRAND], false);
|
|
783
|
+
state.data.brandData.selectedBrandItem = brandList[0];
|
|
808
784
|
}
|
|
809
|
-
state.data.
|
|
785
|
+
state.data.brandData.responseBody = {
|
|
786
|
+
brand_list: brandList,
|
|
787
|
+
channel_list: channel_list
|
|
788
|
+
};
|
|
789
|
+
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 });
|
|
810
790
|
})
|
|
811
791
|
.addCase(verifyAuth.pending, function (state) {
|
|
812
792
|
state.loading = true;
|
|
@@ -817,15 +797,9 @@ export var connectSlice = createSlice({
|
|
|
817
797
|
state.error = action.error.message;
|
|
818
798
|
})
|
|
819
799
|
.addCase(createNIDAuth.fulfilled, function (state, action) {
|
|
820
|
-
var _a;
|
|
821
800
|
state.loading = false;
|
|
822
801
|
state.error = null;
|
|
823
|
-
var
|
|
824
|
-
var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
825
|
-
if (description) {
|
|
826
|
-
state.error = description;
|
|
827
|
-
return;
|
|
828
|
-
}
|
|
802
|
+
var _a = action.payload, formData = _a.formData, response = _a.response;
|
|
829
803
|
state.data.nidData = formData;
|
|
830
804
|
state.data.nidData.responseBody = response;
|
|
831
805
|
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
@@ -839,14 +813,8 @@ export var connectSlice = createSlice({
|
|
|
839
813
|
state.error = action.error.message;
|
|
840
814
|
})
|
|
841
815
|
.addCase(resendOTPNID.fulfilled, function (state, action) {
|
|
842
|
-
var _a;
|
|
843
816
|
state.error = null;
|
|
844
817
|
var response = action.payload;
|
|
845
|
-
var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
846
|
-
if (description) {
|
|
847
|
-
state.error = description;
|
|
848
|
-
return;
|
|
849
|
-
}
|
|
850
818
|
state.data.nidData.responseBody = response;
|
|
851
819
|
state.data.otpData.authFor = AuthForType.NATIONAL_ID;
|
|
852
820
|
})
|
|
@@ -857,29 +825,32 @@ export var connectSlice = createSlice({
|
|
|
857
825
|
state.error = action.error.message;
|
|
858
826
|
})
|
|
859
827
|
.addCase(updateLeadIndividual.fulfilled, function (state, action) {
|
|
828
|
+
var _a, _b, _c;
|
|
860
829
|
state.loading = false;
|
|
861
830
|
state.error = null;
|
|
862
|
-
var
|
|
863
|
-
var brand = leadResponse.brand,
|
|
831
|
+
var _d = action.payload, formData = _d.formData, leadResponse = _d.leadResponse;
|
|
832
|
+
var brand = leadResponse.brand, rest = __rest(leadResponse, ["brand"]);
|
|
864
833
|
if (brand) {
|
|
865
834
|
var channel_services = brand.channel_services, terms = brand.terms;
|
|
866
835
|
state.data.brandData.salesChannels = channel_services || [];
|
|
867
836
|
var termAndCondition = (terms || []).find(function (_a) {
|
|
868
837
|
var term = _a.term, agree = _a.agree;
|
|
869
|
-
return term === '
|
|
838
|
+
return term === 'general' && agree === true;
|
|
870
839
|
});
|
|
871
840
|
state.data.brandData.termAndConditionChecked = !!termAndCondition;
|
|
872
841
|
}
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
842
|
+
var selectedBrand = ((_b = (_a = state.data.brandData) === null || _a === void 0 ? void 0 : _a.responseBody) === null || _b === void 0 ? void 0 : _b.brand_list[0]) || leadResponse.brand;
|
|
843
|
+
state.data.brandData.brandName = (_c = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.name) === null || _c === void 0 ? void 0 : _c.en;
|
|
844
|
+
state.data.brandData.segment = rest.segments_list.find(function (_a) {
|
|
845
|
+
var _b, _c;
|
|
846
|
+
var id = _a.id;
|
|
847
|
+
return ((_c = (_b = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.segment) === null || _b === void 0 ? void 0 : _b.type) === null || _c === void 0 ? void 0 : _c.id) === id;
|
|
848
|
+
});
|
|
849
|
+
state.data.brandData.teamSize = rest.team_size_list.find(function (_a) {
|
|
850
|
+
var _b, _c;
|
|
851
|
+
var id = _a.id;
|
|
852
|
+
return ((_c = (_b = selectedBrand === null || selectedBrand === void 0 ? void 0 : selectedBrand.segment) === null || _b === void 0 ? void 0 : _b.team) === null || _c === void 0 ? void 0 : _c.id) === id;
|
|
853
|
+
});
|
|
883
854
|
state.data.individualData = formData;
|
|
884
855
|
state.data.individualData.responseBody = rest;
|
|
885
856
|
})
|