@tap-payments/auth-jsconnect 2.4.0-test → 2.4.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 +1 -1
- package/build/@types/app.d.ts +266 -15
- package/build/@types/app.js +7 -0
- package/build/@types/form.d.ts +31 -23
- package/build/@types/theme.d.ts +1 -1
- package/build/@types/user.d.ts +39 -3
- package/build/api/account.d.ts +2 -2
- package/build/api/auth.d.ts +12 -11
- package/build/api/auth.js +5 -1
- package/build/api/availabilityServices.d.ts +3 -3
- package/build/api/axios.js +1 -1
- package/build/api/board.d.ts +3 -3
- package/build/api/brand.d.ts +1 -1
- package/build/api/country.d.ts +2 -1
- package/build/api/country.js +8 -1
- package/build/api/data.d.ts +17 -10
- package/build/api/data.js +26 -2
- package/build/api/document.d.ts +2 -2
- package/build/api/entity.d.ts +13 -8
- package/build/api/entity.js +32 -1
- package/build/api/file.d.ts +1 -1
- package/build/api/index.d.ts +26 -5
- package/build/api/individual.d.ts +29 -11
- package/build/api/individual.js +9 -1
- package/build/api/init.d.ts +2 -1
- package/build/api/lead.d.ts +15 -10
- package/build/api/lead.js +58 -1
- package/build/api/operator.d.ts +10 -1
- package/build/api/operator.js +10 -2
- package/build/api/user.d.ts +2 -2
- package/build/app/rootReducer.d.ts +1 -0
- package/build/app/rootReducer.js +3 -1
- package/build/app/settings.d.ts +37 -3
- package/build/app/settings.js +116 -39
- package/build/app/store.d.ts +6 -4
- package/build/assets/locales/ar.json +24 -1
- package/build/assets/locales/en.json +24 -1
- package/build/components/AnimationFlow/AnimationFlow.d.ts +2 -1
- package/build/components/AnimationFlow/AnimationFlow.js +3 -3
- package/build/components/AnimationFlow/BottomSheet.js +26 -5
- package/build/components/AnimationFlow/Dialog.d.ts +2 -1
- package/build/components/AnimationFlow/Dialog.js +2 -2
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +5 -2
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +45 -23
- package/build/components/ArabicDatePicker/arabicAr.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicAr.js +32 -0
- package/build/components/ArabicDatePicker/arabicEn.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicEn.js +32 -0
- package/build/components/ArabicDatePicker/style.css +45 -5
- package/build/components/DatePicker/DatePicker.d.ts +3 -1
- package/build/components/DatePicker/DatePicker.js +23 -17
- package/build/components/ExpandIcon/ExpandIcon.d.ts +2 -0
- package/build/components/SimpleList/SimpleList.d.ts +2 -1
- package/build/components/SimpleList/SimpleList.js +12 -9
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/constants/api.d.ts +9 -0
- package/build/constants/api.js +18 -1
- package/build/constants/app.d.ts +9 -1
- package/build/constants/app.js +84 -16
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +4 -0
- package/build/constants/dummy.d.ts +62 -0
- package/build/constants/dummy.js +603 -0
- package/build/constants/validation.d.ts +2 -2
- package/build/constants/validation.js +3 -3
- package/build/features/app/bank/bankStore.d.ts +94 -10
- package/build/features/app/bank/bankStore.js +110 -54
- package/build/features/app/board/boardStore.d.ts +66 -0
- package/build/features/app/board/boardStore.js +223 -0
- package/build/features/app/brand/brandStore.d.ts +161 -18
- package/build/features/app/brand/brandStore.js +295 -133
- package/build/features/app/business/businessStore.d.ts +171 -18
- package/build/features/app/business/businessStore.js +278 -200
- package/build/features/app/connect/connectStore.d.ts +180 -14
- package/build/features/app/connect/connectStore.js +342 -95
- package/build/features/app/connectExpress/connectExpressStore.d.ts +273 -25
- package/build/features/app/connectExpress/connectExpressStore.js +453 -71
- package/build/features/app/entity/entityStore.d.ts +98 -10
- package/build/features/app/entity/entityStore.js +150 -75
- package/build/features/app/individual/individualStore.d.ts +200 -28
- package/build/features/app/individual/individualStore.js +346 -222
- package/build/features/app/password/passwordStore.d.ts +114 -12
- package/build/features/app/password/passwordStore.js +113 -43
- package/build/features/app/signIn/signInStore.d.ts +61 -7
- package/build/features/app/signIn/signInStore.js +1 -1
- package/build/features/app/tax/taxStore.d.ts +83 -9
- package/build/features/app/tax/taxStore.js +97 -48
- package/build/features/bank/Bank.d.ts +1 -0
- package/build/features/bank/Bank.js +11 -6
- package/build/features/bank/screens/BankDetails/BankDetails.js +19 -14
- package/build/features/bank/screens/BankDetails/BankName.d.ts +3 -2
- package/build/features/bank/screens/BankDetails/BankName.js +4 -5
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +3 -2
- package/build/features/bank/screens/BankDetails/BankStatement.js +5 -4
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +2 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +8 -10
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +1 -1
- package/build/features/bank/screens/BankDetails/IBAN.d.ts +2 -1
- package/build/features/bank/screens/BankDetails/IBAN.js +4 -6
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/bank/screens/Verify/OTPInput.js +3 -1
- package/build/features/bank/screens/Verify/Verify.js +2 -2
- package/build/features/board/Board.d.ts +10 -0
- package/build/features/board/Board.js +74 -0
- package/build/features/board/index.d.ts +1 -0
- package/build/features/board/index.js +1 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +35 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/board/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/board/screens/Verify/OTPInput.js +51 -0
- package/build/features/board/screens/Verify/Verify.d.ts +5 -0
- package/build/features/board/screens/Verify/Verify.js +74 -0
- package/build/features/board/screens/Verify/index.d.ts +2 -0
- package/build/features/board/screens/Verify/index.js +2 -0
- package/build/features/board/screens/Verify/validation.d.ts +8 -0
- package/build/features/board/screens/Verify/validation.js +4 -0
- package/build/features/brand/Brand.d.ts +1 -0
- package/build/features/brand/Brand.js +11 -6
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +6 -20
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +26 -23
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +31 -8
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +7 -30
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +13 -25
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +2 -1
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +12 -13
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +2 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +22 -23
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -5
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +2 -2
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +1 -1
- package/build/features/brand/screens/BrandActivities/validation.d.ts +36 -36
- package/build/features/brand/screens/BrandActivities/validation.js +5 -10
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +18 -31
- package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +3 -3
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +3 -14
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +2 -2
- package/build/features/brand/screens/BrandInfo/BrandName.js +4 -7
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +17 -6
- package/build/features/brand/screens/BrandInfo/validation.d.ts +21 -6
- package/build/features/brand/screens/BrandInfo/validation.js +9 -8
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.d.ts +5 -0
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +103 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.js +69 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.js +69 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.js +69 -0
- package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/TeamSize.d.ts +2 -1
- package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/TeamSize.js +18 -33
- package/build/features/brand/screens/BrandSegmentInfo/index.d.ts +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/index.js +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.d.ts +17 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.js +9 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/brand/screens/Verify/OTPInput.js +3 -1
- package/build/features/brand/screens/Verify/Verify.js +2 -2
- package/build/features/business/Business.js +4 -1
- package/build/features/business/screens/Activities/Activities.js +2 -1
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +13 -61
- package/build/features/business/screens/Activities/ActivitiesList.js +226 -103
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +1 -1
- 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 +5 -2
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +1 -1
- package/build/features/business/screens/BusinessType/Article.d.ts +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +14 -6
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +3 -6
- package/build/features/business/screens/BusinessType/EntityName.js +4 -5
- package/build/features/business/screens/BusinessType/LicenseList.js +6 -9
- package/build/features/business/screens/BusinessType/LicenseNumber.js +10 -9
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +3 -3
- package/build/features/business/screens/BusinessType/validation.d.ts +10 -0
- package/build/features/business/screens/BusinessType/validation.js +18 -2
- package/build/features/business/screens/CivilID/CivilID.js +2 -1
- package/build/features/business/screens/CivilID/IDNumber.js +2 -3
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +41 -29
- package/build/features/business/screens/Customers/CustomerLocations.js +35 -19
- package/build/features/business/screens/Customers/Customers.js +29 -17
- package/build/features/business/screens/Customers/ExpectedCustomers.js +8 -10
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +13 -15
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +4 -4
- package/build/features/business/screens/IDBOD/DOB.js +2 -2
- package/build/features/business/screens/IDBOD/ID.js +7 -4
- package/build/features/business/screens/IDBOD/IDBOD.js +9 -17
- package/build/features/business/screens/IDBOD/validation.d.ts +10 -0
- package/build/features/business/screens/IDBOD/validation.js +4 -0
- package/build/features/business/screens/OTP/OTP.js +2 -2
- package/build/features/business/screens/OTP/OTPInput.js +5 -2
- package/build/features/business/screens/Verify/OTPInput.js +3 -1
- package/build/features/business/screens/Verify/Verify.js +2 -2
- package/build/features/connect/Connect.d.ts +2 -0
- package/build/features/connect/Connect.js +95 -13
- package/build/features/connect/screens/BrandSegment/BrandSegment.d.ts +5 -0
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +84 -0
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +8 -0
- package/build/features/{brand/screens/BrandInfo/Segments.js → connect/screens/BrandSegment/SegmentLocations.js} +19 -37
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +8 -0
- package/build/features/connect/screens/{Merchant/Segments.js → BrandSegment/SegmentProfits.js} +17 -30
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +8 -0
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +66 -0
- package/build/features/connect/screens/{Merchant → BrandSegment}/TeamSize.js +12 -25
- package/build/features/connect/screens/BrandSegment/index.d.ts +3 -0
- package/build/features/connect/screens/BrandSegment/index.js +2 -0
- package/build/features/connect/screens/BrandSegment/validation.d.ts +17 -0
- package/build/features/connect/screens/BrandSegment/validation.js +9 -0
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +103 -0
- package/build/features/connect/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connect/screens/BusinessCountry/index.js +2 -0
- package/build/features/connect/screens/CivilID/CivilID.js +12 -16
- package/build/features/connect/screens/CivilID/IDNumber.js +5 -6
- package/build/features/connect/screens/Individual/Email.js +9 -11
- package/build/features/connect/screens/Individual/Individual.js +9 -2
- package/build/features/connect/screens/Individual/MobileNumber.js +6 -9
- package/build/features/connect/screens/Individual/Name.js +11 -15
- package/build/features/connect/screens/Merchant/BrandList.js +4 -22
- package/build/features/connect/screens/Merchant/BrandName.js +3 -5
- package/build/features/connect/screens/Merchant/Merchant.js +13 -16
- package/build/features/connect/screens/Merchant/SalesChannels.js +6 -6
- package/build/features/connect/screens/Merchant/validation.d.ts +0 -6
- package/build/features/connect/screens/Merchant/validation.js +8 -12
- package/build/features/connect/screens/Mobile/Mobile.js +23 -22
- package/build/features/connect/screens/Mobile/MobileNumber.js +22 -15
- package/build/features/connect/screens/NID/DOB.js +3 -3
- package/build/features/connect/screens/NID/IDNumber.js +6 -7
- package/build/features/connect/screens/NID/NID.js +17 -4
- package/build/features/connect/screens/OTP/OTP.js +14 -16
- package/build/features/connect/screens/OTP/OTPInput.js +14 -2
- package/build/features/connect/screens/ThankYou/ThankYou.js +17 -2
- package/build/features/connectExpress/ConnectExpress.d.ts +1 -1
- package/build/features/connectExpress/ConnectExpress.js +87 -17
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +93 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.d.ts +10 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.js +81 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +11 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +96 -0
- package/build/features/connectExpress/screens/AuthenticationList/MerchantList.d.ts +10 -0
- package/build/features/connectExpress/screens/AuthenticationList/MerchantList.js +107 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.js +2 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +14 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +8 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +105 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.js +2 -0
- package/build/features/connectExpress/screens/CivilID/CivilID.js +11 -4
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +12 -8
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -1
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +6 -7
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +4 -6
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +13 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +10 -12
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +9 -8
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +3 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +13 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +71 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +6 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +3 -5
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +2 -3
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +4 -4
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +5 -3
- package/build/features/connectExpress/screens/Mobile/Mobile.js +9 -5
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +9 -6
- package/build/features/connectExpress/screens/Mobile/TAC.js +1 -1
- package/build/features/connectExpress/screens/NID/DOB.js +2 -2
- package/build/features/connectExpress/screens/NID/IDNumber.js +2 -3
- package/build/features/connectExpress/screens/NID/NID.js +7 -3
- package/build/features/connectExpress/screens/NID/TAC.d.ts +2 -2
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +2 -2
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +7 -4
- package/build/features/connectExpress/screens/NIDMissed/NID.js +7 -4
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +10 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.js +4 -0
- package/build/features/connectExpress/screens/OTP/OTP.js +3 -3
- package/build/features/connectExpress/screens/OTP/OTPInput.js +4 -2
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -6
- package/build/features/entity/Entity.d.ts +1 -0
- package/build/features/entity/Entity.js +11 -6
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +3 -16
- package/build/features/entity/screens/EntityCapital/ActivityList.js +53 -35
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +8 -15
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +7 -12
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +9 -16
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +14 -6
- package/build/features/entity/screens/EntityCapital/validation.d.ts +90 -90
- package/build/features/entity/screens/EntityCapital/validation.js +2 -2
- package/build/features/entity/screens/EntityName/Article.d.ts +3 -2
- package/build/features/entity/screens/EntityName/Article.js +3 -2
- package/build/features/entity/screens/EntityName/EntityName.js +45 -16
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +8 -20
- package/build/features/entity/screens/EntityName/EntityTypeList.js +16 -24
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +3 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.js +4 -5
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +3 -2
- package/build/features/entity/screens/EntityName/IssuingDate.js +4 -5
- package/build/features/entity/screens/EntityName/LegalName.d.ts +2 -1
- package/build/features/entity/screens/EntityName/LegalName.js +3 -4
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +8 -2
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +2 -1
- package/build/features/entity/screens/EntityName/LicenseNumber.js +10 -10
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +2 -1
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +3 -4
- package/build/features/entity/screens/EntityName/validation.d.ts +28 -0
- package/build/features/entity/screens/EntityName/validation.js +40 -2
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/entity/screens/Verify/OTPInput.js +3 -1
- package/build/features/entity/screens/Verify/Verify.js +2 -2
- package/build/features/featuresScreens.d.ts +1 -0
- package/build/features/featuresScreens.js +42 -0
- package/build/features/individual/Individual.d.ts +1 -0
- package/build/features/individual/Individual.js +11 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +36 -25
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +10 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +13 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +19 -30
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +87 -48
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +12 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +6 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +9 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +17 -27
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +7 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +8 -7
- package/build/features/individual/screens/IndividualList/Email.js +1 -1
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +2 -2
- package/build/features/individual/screens/IndividualList/UserList.js +10 -6
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +6 -22
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +6 -22
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +3 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +3 -8
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +3 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +5 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +3 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +8 -6
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +56 -37
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +7 -24
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +5 -8
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +3 -10
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +7 -24
- package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +67 -63
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +2 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/individual/screens/Verify/OTPInput.js +3 -1
- package/build/features/individual/screens/Verify/Verify.js +2 -2
- package/build/features/password/Password.d.ts +1 -0
- package/build/features/password/Password.js +20 -5
- package/build/features/password/screens/CreatePassword/CreatePassword.js +3 -2
- package/build/features/password/screens/OTP/OTP.js +2 -2
- package/build/features/password/screens/OTP/OTPInput.js +5 -2
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/password/screens/Verify/OTPInput.js +3 -1
- package/build/features/password/screens/Verify/Verify.js +2 -2
- package/build/features/shared/Address/CountryList.d.ts +6 -6
- package/build/features/shared/Address/InputSelect.d.ts +6 -6
- package/build/features/shared/Address/InputSelect.js +1 -1
- package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +15 -0
- package/build/features/shared/BusinessCountry/BusinessCountry.js +179 -0
- package/build/features/shared/BusinessCountry/index.d.ts +2 -0
- package/build/features/shared/BusinessCountry/index.js +2 -0
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +9 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +4 -2
- package/build/features/shared/Button/FlowsButtons.js +17 -13
- package/build/features/shared/Button/IndividualActionButtons.d.ts +4 -2
- package/build/features/shared/Button/IndividualActionButtons.js +26 -2
- package/build/features/shared/Calender/Calender.d.ts +13 -0
- package/build/features/shared/Calender/Calender.js +56 -0
- package/build/features/shared/Calender/index.d.ts +2 -0
- package/build/features/shared/Calender/index.js +2 -0
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +7 -1
- package/build/features/shared/CheckIcon/CheckIcon.js +7 -6
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- 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 +10 -1
- package/build/features/shared/Footer/PoweredByFooter.d.ts +1 -1
- package/build/features/shared/Input/Input.d.ts +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/SalesChannels/SaleChannelIconsInput.d.ts +2 -1
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +4 -3
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +2 -1
- package/build/features/shared/SalesChannels/SalesChannel.js +6 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +3 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +20 -9
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/shared/UploadFile/FileUpload.d.ts +5 -4
- package/build/features/shared/UploadFile/FileUpload.js +4 -4
- package/build/features/shared/UploadFile/UploadFile.d.ts +2 -2
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +4 -3
- package/build/features/shared/UploadFile/UploadWrapper.js +3 -3
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +5 -4
- package/build/features/shared/UploadMultipleFile/UploadFile.js +4 -4
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +4 -3
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +2 -2
- package/build/features/signIn/screens/Email/Email.js +2 -1
- package/build/features/signIn/screens/Mobile/Mobile.js +2 -1
- package/build/features/signIn/screens/OTP/OTP.js +2 -2
- package/build/features/signIn/screens/OTP/OTPInput.js +4 -2
- package/build/features/signIn/screens/Password/Password.js +2 -1
- package/build/features/tax/Tax.d.ts +1 -0
- package/build/features/tax/Tax.js +11 -6
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +1 -1
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +10 -7
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +8 -2
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +3 -2
- package/build/features/tax/screens/TaxDetails/VATId.js +3 -5
- package/build/features/tax/screens/Verify/OTPInput.js +3 -1
- package/build/features/tax/screens/Verify/Verify.js +2 -2
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppConfig.d.ts +4 -2
- package/build/hooks/useAppConfig.js +18 -18
- package/build/hooks/useAppDispatch.d.ts +1 -0
- package/build/hooks/useCountry.d.ts +1 -0
- package/build/hooks/useCountry.js +4 -3
- 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 +1 -1
- package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +1 -1
- package/build/hooks/useFormReadOnly.d.ts +1 -1
- package/build/hooks/useVerifyToken.js +1 -1
- package/build/index.d.ts +3 -2
- package/build/index.js +4 -2
- package/build/utils/array.d.ts +13 -2
- package/build/utils/array.js +115 -2
- package/build/utils/common.d.ts +1 -0
- package/build/utils/common.js +10 -0
- package/build/utils/date.d.ts +1 -0
- package/build/utils/date.js +6 -0
- package/build/utils/gtm.d.ts +6 -0
- package/build/utils/gtm.js +29 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +14 -0
- package/build/utils/string.d.ts +1 -0
- package/build/utils/string.js +3 -0
- package/package.json +4 -2
- package/build/features/brand/screens/BrandInfo/Segments.d.ts +0 -9
- package/build/features/connect/screens/Merchant/Segments.d.ts +0 -8
- /package/build/features/connect/screens/{Merchant → BrandSegment}/TeamSize.d.ts +0 -0
|
@@ -6,31 +6,105 @@ interface VerifyLeadTokenProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const verifyLeadToken: import("@reduxjs/toolkit").AsyncThunk<{
|
|
8
8
|
data: any;
|
|
9
|
+
individualData: any;
|
|
9
10
|
boardResponse: any;
|
|
10
11
|
token: string;
|
|
11
|
-
}, VerifyLeadTokenProps, {
|
|
12
|
+
}, VerifyLeadTokenProps, {
|
|
13
|
+
state?: unknown;
|
|
14
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
15
|
+
extra?: unknown;
|
|
16
|
+
rejectValue?: unknown;
|
|
17
|
+
serializedErrorType?: unknown;
|
|
18
|
+
pendingMeta?: unknown;
|
|
19
|
+
fulfilledMeta?: unknown;
|
|
20
|
+
rejectedMeta?: unknown;
|
|
21
|
+
}>;
|
|
12
22
|
export declare const resendOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
13
23
|
data: any;
|
|
14
|
-
}, void, {
|
|
24
|
+
}, void, {
|
|
25
|
+
state?: unknown;
|
|
26
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
27
|
+
extra?: unknown;
|
|
28
|
+
rejectValue?: unknown;
|
|
29
|
+
serializedErrorType?: unknown;
|
|
30
|
+
pendingMeta?: unknown;
|
|
31
|
+
fulfilledMeta?: unknown;
|
|
32
|
+
rejectedMeta?: unknown;
|
|
33
|
+
}>;
|
|
15
34
|
export declare const retrieveBoardStatus: import("@reduxjs/toolkit").AsyncThunk<{
|
|
16
35
|
flows: any;
|
|
17
|
-
}, void, {
|
|
36
|
+
}, void, {
|
|
37
|
+
state?: unknown;
|
|
38
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
39
|
+
extra?: unknown;
|
|
40
|
+
rejectValue?: unknown;
|
|
41
|
+
serializedErrorType?: unknown;
|
|
42
|
+
pendingMeta?: unknown;
|
|
43
|
+
fulfilledMeta?: unknown;
|
|
44
|
+
rejectedMeta?: unknown;
|
|
45
|
+
}>;
|
|
18
46
|
export declare const retrieveEntityInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
19
47
|
data: any;
|
|
20
|
-
}, string, {
|
|
48
|
+
}, string, {
|
|
49
|
+
state?: unknown;
|
|
50
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
51
|
+
extra?: unknown;
|
|
52
|
+
rejectValue?: unknown;
|
|
53
|
+
serializedErrorType?: unknown;
|
|
54
|
+
pendingMeta?: unknown;
|
|
55
|
+
fulfilledMeta?: unknown;
|
|
56
|
+
rejectedMeta?: unknown;
|
|
57
|
+
}>;
|
|
21
58
|
export declare const verifyTaxLeadOTP: import("@reduxjs/toolkit").AsyncThunk<{
|
|
22
59
|
data: any;
|
|
23
60
|
formData: OTPFormValues;
|
|
24
|
-
}, OTPFormValues, {
|
|
61
|
+
}, OTPFormValues, {
|
|
62
|
+
state?: unknown;
|
|
63
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
64
|
+
extra?: unknown;
|
|
65
|
+
rejectValue?: unknown;
|
|
66
|
+
serializedErrorType?: unknown;
|
|
67
|
+
pendingMeta?: unknown;
|
|
68
|
+
fulfilledMeta?: unknown;
|
|
69
|
+
rejectedMeta?: unknown;
|
|
70
|
+
}>;
|
|
25
71
|
export declare const updateTaxInfo: import("@reduxjs/toolkit").AsyncThunk<{
|
|
26
72
|
data: any;
|
|
27
73
|
formData: TaxFormValues;
|
|
28
|
-
}, AsyncThunkParams<TaxFormValues>, {
|
|
74
|
+
}, AsyncThunkParams<TaxFormValues>, {
|
|
75
|
+
state?: unknown;
|
|
76
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
77
|
+
extra?: unknown;
|
|
78
|
+
rejectValue?: unknown;
|
|
79
|
+
serializedErrorType?: unknown;
|
|
80
|
+
pendingMeta?: unknown;
|
|
81
|
+
fulfilledMeta?: unknown;
|
|
82
|
+
rejectedMeta?: unknown;
|
|
83
|
+
}>;
|
|
29
84
|
export declare const updateLeadSuccess: import("@reduxjs/toolkit").AsyncThunk<{
|
|
30
85
|
response: any;
|
|
31
86
|
formData: void;
|
|
32
|
-
} | undefined, void, {
|
|
33
|
-
|
|
87
|
+
} | undefined, void, {
|
|
88
|
+
state?: unknown;
|
|
89
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
90
|
+
extra?: unknown;
|
|
91
|
+
rejectValue?: unknown;
|
|
92
|
+
serializedErrorType?: unknown;
|
|
93
|
+
pendingMeta?: unknown;
|
|
94
|
+
fulfilledMeta?: unknown;
|
|
95
|
+
rejectedMeta?: unknown;
|
|
96
|
+
}>;
|
|
97
|
+
export declare const onCloseCompleteTax: import("@reduxjs/toolkit").AsyncThunk<void, void, {
|
|
98
|
+
state?: unknown;
|
|
99
|
+
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
100
|
+
extra?: unknown;
|
|
101
|
+
rejectValue?: unknown;
|
|
102
|
+
serializedErrorType?: unknown;
|
|
103
|
+
pendingMeta?: unknown;
|
|
104
|
+
fulfilledMeta?: unknown;
|
|
105
|
+
rejectedMeta?: unknown;
|
|
106
|
+
}>;
|
|
107
|
+
type VerifyData = {
|
|
34
108
|
token: string;
|
|
35
109
|
};
|
|
36
110
|
export interface TaxData {
|
|
@@ -49,7 +123,7 @@ export declare const taxSlice: import("@reduxjs/toolkit").Slice<TaxState, {
|
|
|
49
123
|
resetOTPScreen: (state: TaxState) => void;
|
|
50
124
|
uploadingStatus: (state: TaxState, action: ActionState<boolean>) => void;
|
|
51
125
|
}, "tax/store">;
|
|
52
|
-
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<
|
|
126
|
+
export declare const clearError: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tax/store/clearError">, stopLoader: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tax/store/stopLoader">, resetOTPScreen: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"tax/store/resetOTPScreen">, uploadingStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "tax/store/uploadingStatus">;
|
|
53
127
|
declare const _default: import("redux").Reducer<TaxState, import("redux").AnyAction>;
|
|
54
128
|
export default _default;
|
|
55
129
|
export declare const taxSelector: (state: RootState) => TaxState;
|
|
@@ -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]) {
|
|
@@ -49,16 +49,16 @@ var _a;
|
|
|
49
49
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
50
|
import API from '../../../api';
|
|
51
51
|
import { DocumentPurpose, FlowsTypes } from '../../../@types';
|
|
52
|
-
import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2, handlePrevScreenStep } from '../../../app/settings';
|
|
52
|
+
import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2, handlePrevScreenStep, handlePublicKey, onCloseComplete } from '../../../app/settings';
|
|
53
53
|
import { TAX_STEP_NAMES } from '../../../constants';
|
|
54
|
-
import { getRecentDocumentBasedOnPurpose, hasNoneEditableValue, sleep } from '../../../utils';
|
|
54
|
+
import { getRecentDocumentBasedOnPurpose, hasNoneEditableValue, retrieveIndividualData, sleep } from '../../../utils';
|
|
55
55
|
export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a, thunkApi) {
|
|
56
56
|
var token = _a.token, isInternally = _a.isInternally;
|
|
57
57
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
var payload, data, boardData, countryIso2;
|
|
59
|
-
var
|
|
60
|
-
return __generator(this, function (
|
|
61
|
-
switch (
|
|
58
|
+
var payload, data, boardData, boardInfoData, individualData, publicKey, _b, id_1, type_1, serviceCallBack, _c, boardRes, individualRes, countryIso2;
|
|
59
|
+
var _d, _e, _f, _g, _h;
|
|
60
|
+
return __generator(this, function (_j) {
|
|
61
|
+
switch (_j.label) {
|
|
62
62
|
case 0:
|
|
63
63
|
payload = {
|
|
64
64
|
service_name: 'tap_email',
|
|
@@ -66,30 +66,47 @@ export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a
|
|
|
66
66
|
};
|
|
67
67
|
return [4, API.leadService.verifyLeadToken(payload)];
|
|
68
68
|
case 1:
|
|
69
|
-
data = (
|
|
70
|
-
|
|
71
|
-
if (((
|
|
69
|
+
data = (_j.sent()).data;
|
|
70
|
+
individualData = undefined;
|
|
71
|
+
if (((_d = data === null || data === void 0 ? void 0 : data.errors) === null || _d === void 0 ? void 0 : _d.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
|
|
72
72
|
throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
|
|
73
73
|
if (isInternally)
|
|
74
74
|
data.step_name = TAX_STEP_NAMES.TAX_INFO;
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
publicKey = (_e = data === null || data === void 0 ? void 0 : data.config) === null || _e === void 0 ? void 0 : _e.public_key;
|
|
76
|
+
if (publicKey) {
|
|
77
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
78
|
+
}
|
|
79
|
+
if (!(data === null || data === void 0 ? void 0 : data.id)) return [3, 6];
|
|
80
|
+
if (!data.board_info_id) return [3, 3];
|
|
81
|
+
return [4, API.boardService.retrieveBoardInfo({ id: data.id, infoId: data.board_info_id })];
|
|
77
82
|
case 2:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
case 3:
|
|
81
|
-
|
|
83
|
+
boardInfoData = _j.sent();
|
|
84
|
+
_j.label = 3;
|
|
85
|
+
case 3: return [4, API.boardService.retrieveBoardDetails(data.id)];
|
|
86
|
+
case 4:
|
|
87
|
+
boardData = _j.sent();
|
|
88
|
+
_b = ((_f = boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification) === null || _f === void 0 ? void 0 : _f.recipient) || {}, id_1 = _b.id, type_1 = _b.type;
|
|
89
|
+
serviceCallBack = function () { return API.individualService.retrieveIndividual(id_1, type_1); };
|
|
90
|
+
return [4, retrieveIndividualData(type_1, boardData, serviceCallBack)];
|
|
91
|
+
case 5:
|
|
92
|
+
_c = _j.sent(), boardRes = _c.boardRes, individualRes = _c.individualRes;
|
|
93
|
+
boardData = boardRes;
|
|
94
|
+
individualData = individualRes;
|
|
95
|
+
_j.label = 6;
|
|
96
|
+
case 6:
|
|
97
|
+
countryIso2 = (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.country;
|
|
82
98
|
if (countryIso2)
|
|
83
99
|
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
84
100
|
if (data.step_name === TAX_STEP_NAMES.PHONE_AUTH) {
|
|
85
101
|
thunkApi.dispatch(handleCurrentActiveScreen('TAX_VERIFY_STEP'));
|
|
86
102
|
}
|
|
87
103
|
else if (data.step_name === TAX_STEP_NAMES.TAX_INFO) {
|
|
88
|
-
|
|
104
|
+
thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
|
|
89
105
|
}
|
|
90
106
|
return [2, {
|
|
91
107
|
data: data,
|
|
92
|
-
|
|
108
|
+
individualData: individualData,
|
|
109
|
+
boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _h === void 0 ? void 0 : _h.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, business: boardData === null || boardData === void 0 ? void 0 : boardData.business, notification: boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.notification }),
|
|
93
110
|
token: token
|
|
94
111
|
}];
|
|
95
112
|
}
|
|
@@ -140,10 +157,10 @@ export var retrieveEntityInfo = createAsyncThunk('retrieveTaxEntityInfo', functi
|
|
|
140
157
|
});
|
|
141
158
|
}); });
|
|
142
159
|
export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
143
|
-
var _a, tax, settings, responseBody, payload, data;
|
|
144
|
-
var _b, _c, _d, _e;
|
|
145
|
-
return __generator(this, function (
|
|
146
|
-
switch (
|
|
160
|
+
var _a, tax, settings, responseBody, payload, data, publicKey;
|
|
161
|
+
var _b, _c, _d, _e, _f;
|
|
162
|
+
return __generator(this, function (_g) {
|
|
163
|
+
switch (_g.label) {
|
|
147
164
|
case 0:
|
|
148
165
|
_a = thunkApi.getState(), tax = _a.tax, settings = _a.settings;
|
|
149
166
|
responseBody = tax.data.verify.responseBody;
|
|
@@ -156,10 +173,14 @@ export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (par
|
|
|
156
173
|
};
|
|
157
174
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
158
175
|
case 1:
|
|
159
|
-
data = (
|
|
176
|
+
data = (_g.sent()).data;
|
|
160
177
|
if ((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length)
|
|
161
178
|
throw new Error(data.errors[0].description);
|
|
162
|
-
|
|
179
|
+
publicKey = (_d = data === null || data === void 0 ? void 0 : data.config) === null || _d === void 0 ? void 0 : _d.public_key;
|
|
180
|
+
if (publicKey) {
|
|
181
|
+
thunkApi.dispatch(handlePublicKey(publicKey));
|
|
182
|
+
}
|
|
183
|
+
(_f = (_e = settings.data.appConfig).onStepCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, settings.data.activeScreen.name, { otp: params.otp });
|
|
163
184
|
sleep(100).then(function () { return thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP')); });
|
|
164
185
|
return [2, { data: data, formData: params }];
|
|
165
186
|
}
|
|
@@ -168,28 +189,27 @@ export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (par
|
|
|
168
189
|
export var updateTaxInfo = createAsyncThunk('updateTaxInfo', function (_a, thunkApi) {
|
|
169
190
|
var formData = _a.formData, originalFormData = _a.originalFormData;
|
|
170
191
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
171
|
-
var _b, settings, tax, _c, id, data_status, documents, isTaxNumberNonEditable, isConfirmPolicyNonEditable, isDocumentsNonEditable, document, vatId, confirmPolicy, documentId, requestBody, data, documentBody,
|
|
172
|
-
var
|
|
173
|
-
return __generator(this, function (
|
|
174
|
-
switch (
|
|
192
|
+
var _b, settings, tax, _c, entity, notification, _d, id, data_status, documents, isTaxNumberNonEditable, isConfirmPolicyNonEditable, isDocumentsNonEditable, document, vatId, confirmPolicy, documentId, requestBody, data, documentBody, _e, documentBody, _f;
|
|
193
|
+
var _g, _h, _j, _k;
|
|
194
|
+
return __generator(this, function (_l) {
|
|
195
|
+
switch (_l.label) {
|
|
175
196
|
case 0:
|
|
176
197
|
_b = thunkApi.getState(), settings = _b.settings, tax = _b.tax;
|
|
177
|
-
_c =
|
|
198
|
+
_c = tax.data.verify.responseBody || {}, entity = _c.entity, notification = _c.notification;
|
|
199
|
+
_d = entity || {}, id = _d.id, data_status = _d.data_status, documents = _d.documents;
|
|
178
200
|
isTaxNumberNonEditable = hasNoneEditableValue(data_status, 'tax_number');
|
|
179
201
|
isConfirmPolicyNonEditable = hasNoneEditableValue(data_status, 'is_vat_acknowledged');
|
|
180
202
|
isDocumentsNonEditable = hasNoneEditableValue(data_status, 'documents');
|
|
181
203
|
document = getRecentDocumentBasedOnPurpose(documents, DocumentPurpose.TAX_DOCUMENT);
|
|
182
204
|
vatId = formData.vatId, confirmPolicy = formData.confirmPolicy, documentId = formData.documentId;
|
|
183
|
-
requestBody = {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
is_vat_acknowledged: isConfirmPolicyNonEditable ? undefined : confirmPolicy
|
|
188
|
-
};
|
|
205
|
+
requestBody = __assign(__assign({ id: id, vat_id: isTaxNumberNonEditable ? undefined : vatId }, (!isConfirmPolicyNonEditable && {
|
|
206
|
+
vat_acknowledged_by: (_g = notification === null || notification === void 0 ? void 0 : notification.recipient) === null || _g === void 0 ? void 0 : _g.id,
|
|
207
|
+
is_vat_acknowledged: confirmPolicy
|
|
208
|
+
})), { step_name: TAX_STEP_NAMES.TAX_INFO });
|
|
189
209
|
return [4, API.entityService.updateEntityInfo(requestBody)];
|
|
190
210
|
case 1:
|
|
191
|
-
data = (
|
|
192
|
-
if ((
|
|
211
|
+
data = (_l.sent()).data;
|
|
212
|
+
if ((_h = data.errors) === null || _h === void 0 ? void 0 : _h.length)
|
|
193
213
|
throw new Error(data.errors[0].description);
|
|
194
214
|
if (!(!isDocumentsNonEditable && (documentId || []).length > 0)) return [3, 5];
|
|
195
215
|
if (!(document === null || document === void 0 ? void 0 : document.id)) return [3, 3];
|
|
@@ -197,10 +217,10 @@ export var updateTaxInfo = createAsyncThunk('updateTaxInfo', function (_a, thunk
|
|
|
197
217
|
id: document === null || document === void 0 ? void 0 : document.id,
|
|
198
218
|
images: documentId
|
|
199
219
|
};
|
|
200
|
-
|
|
220
|
+
_e = data;
|
|
201
221
|
return [4, API.documentService.addFilesToExistingDocument(documentBody)];
|
|
202
222
|
case 2:
|
|
203
|
-
|
|
223
|
+
_e.documentData = _l.sent();
|
|
204
224
|
return [3, 5];
|
|
205
225
|
case 3:
|
|
206
226
|
documentBody = {
|
|
@@ -212,14 +232,14 @@ export var updateTaxInfo = createAsyncThunk('updateTaxInfo', function (_a, thunk
|
|
|
212
232
|
}
|
|
213
233
|
]
|
|
214
234
|
};
|
|
215
|
-
|
|
235
|
+
_f = data;
|
|
216
236
|
return [4, API.documentService.updateDocumentInfo(documentBody)];
|
|
217
237
|
case 4:
|
|
218
|
-
|
|
219
|
-
|
|
238
|
+
_f.documentData = _l.sent();
|
|
239
|
+
_l.label = 5;
|
|
220
240
|
case 5:
|
|
221
241
|
thunkApi.dispatch(handleNextScreenStep());
|
|
222
|
-
(
|
|
242
|
+
(_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, requestBody);
|
|
223
243
|
return [2, { data: data, formData: originalFormData }];
|
|
224
244
|
}
|
|
225
245
|
});
|
|
@@ -252,12 +272,26 @@ export var updateLeadSuccess = createAsyncThunk('taxUpdateLeadSuccess', function
|
|
|
252
272
|
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
|
|
253
273
|
thunkApi.dispatch(handleNextScreenStep());
|
|
254
274
|
return [2, {
|
|
255
|
-
response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], user: boardData === null || boardData === void 0 ? void 0 : boardData.user, entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
|
|
275
|
+
response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], user: boardData === null || boardData === void 0 ? void 0 : boardData.user, entity: boardData === null || boardData === void 0 ? void 0 : boardData.entity, brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand, bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _g === void 0 ? void 0 : _g.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
|
|
256
276
|
formData: params
|
|
257
277
|
}];
|
|
258
278
|
}
|
|
259
279
|
});
|
|
260
280
|
}); });
|
|
281
|
+
export var onCloseCompleteTax = createAsyncThunk('password/onCloseCompleteTax', function (_, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
282
|
+
var tax, _a, merchant, brand, entity;
|
|
283
|
+
return __generator(this, function (_b) {
|
|
284
|
+
switch (_b.label) {
|
|
285
|
+
case 0:
|
|
286
|
+
tax = thunkApi.getState().tax;
|
|
287
|
+
_a = tax.data.verify.responseBody || {}, merchant = _a.merchant, brand = _a.brand, entity = _a.entity;
|
|
288
|
+
return [4, thunkApi.dispatch(onCloseComplete({ merchantId: merchant === null || merchant === void 0 ? void 0 : merchant.id, brandId: brand === null || brand === void 0 ? void 0 : brand.id, entityId: entity === null || entity === void 0 ? void 0 : entity.id }))];
|
|
289
|
+
case 1:
|
|
290
|
+
_b.sent();
|
|
291
|
+
return [2];
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
}); });
|
|
261
295
|
var initialState = {
|
|
262
296
|
error: null,
|
|
263
297
|
loading: false,
|
|
@@ -298,9 +332,9 @@ export var taxSlice = createSlice({
|
|
|
298
332
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
299
333
|
state.error = null;
|
|
300
334
|
state.customLoading = false;
|
|
301
|
-
var _a = action.payload, data = _a.data, token = _a.token, boardResponse = _a.boardResponse;
|
|
335
|
+
var _a = action.payload, data = _a.data, token = _a.token, boardResponse = _a.boardResponse, individualData = _a.individualData;
|
|
302
336
|
var user = boardResponse.user, bank_account = boardResponse.bank_account, vatID = boardResponse.vatID, merchant = boardResponse.merchant, individuals = boardResponse.individuals, entity = boardResponse.entity;
|
|
303
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id, name: user === null || user === void 0 ? void 0 : user.names, bank_account: bank_account, vatID: vatID, merchant: merchant, individuals: individuals });
|
|
337
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id, name: user === null || user === void 0 ? void 0 : user.names, bank_account: bank_account, vatID: vatID, merchant: merchant, individuals: individuals, individualData: individualData });
|
|
304
338
|
state.data.verify.token = token;
|
|
305
339
|
state.data.taxData.vatId = vatID;
|
|
306
340
|
if (entity === null || entity === void 0 ? void 0 : entity.is_vat_acknowledged)
|
|
@@ -406,8 +440,11 @@ export var taxSlice = createSlice({
|
|
|
406
440
|
state.error = description;
|
|
407
441
|
return;
|
|
408
442
|
}
|
|
409
|
-
var flows = response.flows, steps = response.steps, user = response.user, bank_account = response.bank_account, vatID = response.vatID, merchant = response.merchant, individuals = response.individuals, entity = response.entity, brand = response.brand;
|
|
410
|
-
|
|
443
|
+
var flows = response.flows, steps = response.steps, user = response.user, bank_account = response.bank_account, vatID = response.vatID, merchant = response.merchant, individuals = response.individuals, entity = response.entity, brand = response.brand, individualData = response.individualData;
|
|
444
|
+
var data_state = (((individualData === null || individualData === void 0 ? void 0 : individualData.is_authorized) ? individuals : individualData) || {}).data_state;
|
|
445
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, state.data.verify.responseBody), { flows: flows, steps: steps, bank_account: bank_account, name: user === null || user === void 0 ? void 0 : user.names, vatID: vatID, merchant: merchant, individuals: individuals, entity: entity, brand: brand }), (individualData && { user: individualData })), (data_state && {
|
|
446
|
+
individuals: __assign(__assign({}, individuals), { data_state: data_state })
|
|
447
|
+
}));
|
|
411
448
|
})
|
|
412
449
|
.addCase(updateLeadSuccess.pending, function (state) {
|
|
413
450
|
state.loading = true;
|
|
@@ -418,6 +455,18 @@ export var taxSlice = createSlice({
|
|
|
418
455
|
state.loading = false;
|
|
419
456
|
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateBoardSuccessLoading: false });
|
|
420
457
|
state.error = action.error.message;
|
|
458
|
+
})
|
|
459
|
+
.addCase(onCloseCompleteTax.pending, function (state) {
|
|
460
|
+
state.loading = true;
|
|
461
|
+
state.error = null;
|
|
462
|
+
})
|
|
463
|
+
.addCase(onCloseCompleteTax.fulfilled, function (state) {
|
|
464
|
+
state.loading = false;
|
|
465
|
+
state.error = null;
|
|
466
|
+
})
|
|
467
|
+
.addCase(onCloseCompleteTax.rejected, function (state, action) {
|
|
468
|
+
state.loading = false;
|
|
469
|
+
state.error = action.error.message;
|
|
421
470
|
});
|
|
422
471
|
}
|
|
423
472
|
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface BankLibProps extends LibConfig {
|
|
4
4
|
verifyToken?: string;
|
|
5
|
+
configToken?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function BankElement(props: BankLibProps): JSX.Element;
|
|
7
8
|
export declare function renderBankLib(config: BankLibProps, elementId: string): {
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { memo } from 'react';
|
|
24
|
+
import React, { memo } from 'react';
|
|
25
25
|
import { createRoot } from 'react-dom/client';
|
|
26
26
|
import { useAppTheme, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
27
27
|
import { settingsSelector } from '../../app/settings';
|
|
@@ -29,28 +29,33 @@ import AnimationFlow from '../../components/AnimationFlow';
|
|
|
29
29
|
import { store } from '../../app/store';
|
|
30
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
31
31
|
import Collapse from '../../components/Collapse';
|
|
32
|
-
import { findOrCreateElementAndInject } from '../../utils';
|
|
32
|
+
import { findOrCreateElementAndInject, sendPageView } from '../../utils';
|
|
33
33
|
import { FeatureContainer } from '../shared/Containers';
|
|
34
34
|
import { BANK_SCREENS_NAVIGATION } from '../../constants';
|
|
35
35
|
import { bankFeatureScreens } from '../featuresScreens';
|
|
36
36
|
import { bankSelector, verifyLeadToken } from '../app/bank/bankStore';
|
|
37
37
|
import Background from '../shared/Background';
|
|
38
38
|
var Bank = memo(function (_a) {
|
|
39
|
-
var verifyToken = _a.verifyToken, props = __rest(_a, ["verifyToken"]);
|
|
39
|
+
var verifyToken = _a.verifyToken, configToken = _a.configToken, props = __rest(_a, ["verifyToken", "configToken"]);
|
|
40
40
|
var theme = useAppTheme().theme;
|
|
41
|
-
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
41
|
+
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading, internalLoading = _b.internalLoading;
|
|
42
42
|
var _c = useAppSelector(bankSelector), customLoading = _c.customLoading, loading = _c.loading, bankError = _c.error;
|
|
43
|
-
useAppConfig(__assign(__assign({ navigation: BANK_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
43
|
+
useAppConfig(__assign(__assign({ configToken: configToken, navigation: BANK_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
44
44
|
useErrorListener(bankError || error);
|
|
45
45
|
useStepStartedListener();
|
|
46
46
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
47
|
+
React.useEffect(function () {
|
|
48
|
+
sendPageView({
|
|
49
|
+
title: 'Bank'
|
|
50
|
+
});
|
|
51
|
+
}, []);
|
|
47
52
|
useVerifyToken({
|
|
48
53
|
verify: verifyLeadToken,
|
|
49
54
|
loadingScreenName: 'BANK_LOADING_DATA_STEP',
|
|
50
55
|
navigation: featureScreensNavigation,
|
|
51
56
|
open: open,
|
|
52
57
|
internalToken: verifyToken,
|
|
53
|
-
settingLoading: settingLoading
|
|
58
|
+
settingLoading: configToken ? internalLoading : settingLoading
|
|
54
59
|
});
|
|
55
60
|
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
56
61
|
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, merchantInfo: merchant, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, __assign({ isMaturityExpress: isMaturityExpress }, { children: bankFeatureScreens.map(function (_a, index) {
|
|
@@ -16,7 +16,7 @@ import Beneficiary from './Beneficiary';
|
|
|
16
16
|
import IBAN from './IBAN';
|
|
17
17
|
import BankName from './BankName';
|
|
18
18
|
import Button from '../../../shared/Button';
|
|
19
|
-
import { useAppDispatch, useAppSelector, useFormReadOnly, useSetFromDefaultValues, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids } from '../../../../hooks';
|
|
19
|
+
import { useAppDispatch, useAppSelector, useFormReadOnly, useSetFromDefaultValues, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
|
|
20
20
|
import { BankKWFLValidation, BankValidation } from './validation';
|
|
21
21
|
import { useTranslation } from 'react-i18next';
|
|
22
22
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
@@ -29,7 +29,7 @@ import Form from '../../../../components/Form';
|
|
|
29
29
|
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
30
30
|
import ConfirmPolicy from './ConfirmPolicy';
|
|
31
31
|
import BankStatement from './BankStatement';
|
|
32
|
-
import { getFileDetailsFromDocument, isKW, isStringHasOneAsterisk } from '../../../../utils';
|
|
32
|
+
import { deepCopy, getFileDetailsFromDocument, isKW, isStringHasOneAsterisk } from '../../../../utils';
|
|
33
33
|
var FormStyled = styled(Form)(function () { return ({
|
|
34
34
|
display: 'flex',
|
|
35
35
|
flexDirection: 'column',
|
|
@@ -42,17 +42,18 @@ var ButtonStyled = styled(Button)(function (_a) {
|
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
44
|
var BankDetails = function () {
|
|
45
|
-
var _a, _b
|
|
46
|
-
var
|
|
45
|
+
var _a, _b;
|
|
46
|
+
var _c = React.useState(false), ibanChecking = _c[0], setIbanChecking = _c[1];
|
|
47
47
|
var dispatch = useAppDispatch();
|
|
48
|
-
var
|
|
48
|
+
var _d = useAppSelector(bankSelector), data = _d.data, loading = _d.loading, error = _d.error;
|
|
49
49
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
50
|
-
var
|
|
50
|
+
var _e = data.bankData, iban = _e.iban, beneficiaryName = _e.beneficiaryName, bankName = _e.bankName, bankStatementId = _e.bankStatementId, bankStatementUploading = _e.uploading, confirmPolicy = _e.confirmPolicy;
|
|
51
51
|
var verify = data.verify;
|
|
52
|
-
var
|
|
52
|
+
var _f = verify.responseBody || {}, bank_account = _f.bank_account, entity = _f.entity, flows = _f.flows;
|
|
53
|
+
var _g = bank_account || {}, document = _g.document, data_status = _g.data_status, data_verification = _g.data_verification, beneficiary_name = _g.beneficiary_name, resIban = _g.iban, bank_name = _g.bank_name;
|
|
53
54
|
var isKWCountry = React.useMemo(function () { return isKW(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
54
55
|
var isFL = ((_a = entity === null || entity === void 0 ? void 0 : entity.type) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === BusinessType.FL ? true : false;
|
|
55
|
-
var bankHasDocument = ((
|
|
56
|
+
var bankHasDocument = ((_b = document === null || document === void 0 ? void 0 : document.file_details) === null || _b === void 0 ? void 0 : _b.length) > 0;
|
|
56
57
|
var isIBANMasked = isStringHasOneAsterisk(iban);
|
|
57
58
|
var methods = useForm({
|
|
58
59
|
resolver: yupResolver(isKWCountry && isFL && !bankHasDocument ? BankKWFLValidation(isIBANMasked) : BankValidation(isIBANMasked)),
|
|
@@ -82,12 +83,12 @@ var BankDetails = function () {
|
|
|
82
83
|
dispatch(clearError());
|
|
83
84
|
}, [methods.formState.isValid, methods.watch('bankStatementId')]);
|
|
84
85
|
var defaultBankFiles = React.useMemo(function () {
|
|
85
|
-
if (!
|
|
86
|
+
if (!document)
|
|
86
87
|
return [];
|
|
87
|
-
return getFileDetailsFromDocument([
|
|
88
|
-
}, [
|
|
88
|
+
return getFileDetailsFromDocument([document], DocumentPurpose.BANK_STATEMENT);
|
|
89
|
+
}, [document]);
|
|
89
90
|
var originalReadOnly = useFormReadOnly(methods, { bankStatementId: defaultBankFiles });
|
|
90
|
-
var noneEditable = useDataNoneEditable(
|
|
91
|
+
var noneEditable = useDataNoneEditable(data_status, [
|
|
91
92
|
'beneficiary_name',
|
|
92
93
|
'bank_name',
|
|
93
94
|
'iban',
|
|
@@ -95,11 +96,15 @@ var BankDetails = function () {
|
|
|
95
96
|
'bank_statement_file_id',
|
|
96
97
|
'is_acknowledged'
|
|
97
98
|
]);
|
|
99
|
+
var dataVerified = useDataVerified(data_verification, ['bank_name', 'beneficiary_name', 'document', 'iban']);
|
|
98
100
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly, noneEditable);
|
|
101
|
+
var isBeneficiaryNameVerified = dataVerified['beneficiary_name'] && beneficiary_name === methods.watch('beneficiaryName');
|
|
102
|
+
var isIBANVerified = dataVerified['iban'] && resIban === methods.watch('iban');
|
|
103
|
+
var isBankNameVerified = dataVerified['bank_name'] && bank_name === methods.watch('bankName');
|
|
99
104
|
var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
|
|
100
105
|
var onSubmit = function (data) {
|
|
101
|
-
dispatch(createBankAccount(getFelids(data)));
|
|
106
|
+
dispatch(createBankAccount(deepCopy(getFelids(data))));
|
|
102
107
|
};
|
|
103
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, { readOnly: readOnly['beneficiaryName'] || noneEditable['beneficiary_name'] }), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking, readOnly: readOnly['iban'] || noneEditable['iban'] }), _jsx(BankName, { readOnly: readOnly['bankName'] || noneEditable['bank_name'] }), _jsx(BankStatement, { required: isKWCountry && isFL && !bankHasDocument, defaultFiles: defaultBankFiles, readOnly: readOnly['bankStatementId'] || noneEditable['bank_statement_file_id'] }), _jsx(ConfirmPolicy, { readOnly: readOnly['confirmPolicy'] || noneEditable['is_acknowledged'] }), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
|
|
108
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, { readOnly: readOnly['beneficiaryName'] || noneEditable['beneficiary_name'], isVerified: isBeneficiaryNameVerified }), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking, readOnly: readOnly['iban'] || noneEditable['iban'], isVerified: isIBANVerified }), _jsx(BankName, { readOnly: readOnly['bankName'] || noneEditable['bank_name'], isVerified: isBankNameVerified }), _jsx(BankStatement, { isVerified: dataVerified['document'], required: isKWCountry && isFL && !bankHasDocument, defaultFiles: defaultBankFiles, readOnly: readOnly['bankStatementId'] || noneEditable['bank_statement_file_id'] }), _jsx(ConfirmPolicy, { readOnly: readOnly['confirmPolicy'] || noneEditable['is_acknowledged'] }), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
|
|
104
109
|
};
|
|
105
110
|
export default BankDetails;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
type BankNameProps = {
|
|
3
3
|
readOnly?: boolean;
|
|
4
|
+
isVerified?: boolean;
|
|
4
5
|
};
|
|
5
|
-
declare const BankName: ({ readOnly }: BankNameProps) => JSX.Element;
|
|
6
|
+
declare const BankName: ({ readOnly, isVerified }: BankNameProps) => JSX.Element;
|
|
6
7
|
export default BankName;
|
|
@@ -20,9 +20,8 @@ import { FieldType } from '../../../../@types';
|
|
|
20
20
|
import Collapse from '../../../../components/Collapse';
|
|
21
21
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
22
22
|
import Input from '../../../shared/Input';
|
|
23
|
-
import ClearIcon from '../../../shared/ClearIcon';
|
|
24
|
-
import CheckIcon from '../../../shared/CheckIcon';
|
|
25
23
|
import { bankSelector } from '../../../app/bank/bankStore';
|
|
24
|
+
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
26
25
|
var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
27
26
|
var theme = _a.theme;
|
|
28
27
|
return ({
|
|
@@ -36,13 +35,13 @@ var InputStyled = styled(Input)(function () { return ({
|
|
|
36
35
|
}); });
|
|
37
36
|
var BankName = function (_a) {
|
|
38
37
|
var _b, _c, _d;
|
|
39
|
-
var readOnly = _a.readOnly;
|
|
38
|
+
var readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
40
39
|
var t = useTranslation().t;
|
|
41
40
|
var _e = useFormContext(), setValue = _e.setValue, control = _e.control;
|
|
42
41
|
var data = useAppSelector(bankSelector).data;
|
|
43
42
|
var bankNameControl = useController({ name: 'bankName', control: control });
|
|
44
43
|
var bankNameValue = bankNameControl.field.value;
|
|
45
|
-
var
|
|
44
|
+
var error = (_b = bankNameControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
46
45
|
var bank_account = (data.verify.responseBody || {}).bank_account;
|
|
47
46
|
var isNonEditable = ((_c = bank_account === null || bank_account === void 0 ? void 0 : bank_account.data_status) === null || _c === void 0 ? void 0 : _c.bank_name) === FieldType.NON_EDITABLE;
|
|
48
47
|
var clearValue = function () {
|
|
@@ -59,6 +58,6 @@ var BankName = function (_a) {
|
|
|
59
58
|
var value = removeAllOtherThanAlphabetAndSpace(target.value);
|
|
60
59
|
bankNameControl.field.onChange(value);
|
|
61
60
|
};
|
|
62
|
-
return (_jsx(Collapse, __assign({ in: !!bankNameValue }, { children: _jsx(FeatureStyled, { children: _jsx(InputStyled, { readOnly: readOnly, label: t('enter_bank_name'), placeholder: t('enter_bank_name_placeholder'), onChange: handleBankChange, value: bankNameValue, required: true, disabled: isNonEditable, endAdornment:
|
|
61
|
+
return (_jsx(Collapse, __assign({ in: !!bankNameValue }, { children: _jsx(FeatureStyled, { children: _jsx(InputStyled, { readOnly: readOnly, label: t('enter_bank_name'), placeholder: t('enter_bank_name_placeholder'), onChange: handleBankChange, value: bankNameValue, required: true, disabled: isNonEditable, endAdornment: _jsx(EndAdornment, { value: bankNameValue, isVerified: isVerified, error: error, onClear: clearValue }) }) }) })));
|
|
63
62
|
};
|
|
64
63
|
export default BankName;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FileDetails } from '../../../../@types';
|
|
3
|
-
|
|
3
|
+
type BankStatementProps = {
|
|
4
4
|
required: boolean;
|
|
5
5
|
readOnly?: boolean;
|
|
6
|
+
isVerified?: boolean;
|
|
6
7
|
defaultFiles?: Array<FileDetails>;
|
|
7
8
|
};
|
|
8
|
-
declare const BankStatement: ({ required, readOnly, defaultFiles }: BankStatementProps) => JSX.Element;
|
|
9
|
+
declare const BankStatement: ({ required, readOnly, defaultFiles, isVerified }: BankStatementProps) => JSX.Element;
|
|
9
10
|
export default BankStatement;
|