@tap-payments/auth-jsconnect 2.0.45-test → 2.0.45
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 +120 -27
- package/build/@types/app.js +22 -3
- package/build/@types/form.d.ts +70 -32
- package/build/@types/theme.d.ts +1 -1
- package/build/api/account.d.ts +6 -1
- package/build/api/account.js +9 -1
- package/build/api/auth.d.ts +45 -16
- package/build/api/auth.js +57 -2
- package/build/api/availabilityServices.d.ts +3 -3
- package/build/api/axios.js +3 -3
- package/build/api/board.d.ts +4 -3
- package/build/api/board.js +8 -1
- package/build/api/brand.d.ts +3 -1
- package/build/api/brand.js +18 -1
- package/build/api/country.d.ts +3 -1
- package/build/api/country.js +3 -1
- package/build/api/data.d.ts +46 -7
- package/build/api/data.js +73 -17
- package/build/api/entity.d.ts +88 -12
- package/build/api/entity.js +50 -10
- package/build/api/file.d.ts +13 -0
- package/build/api/file.js +24 -0
- package/build/api/firebase.d.ts +1 -1
- package/build/api/firebase.js +3 -1
- package/build/api/index.d.ts +69 -17
- package/build/api/index.js +5 -3
- package/build/api/individual.d.ts +84 -21
- package/build/api/individual.js +29 -2
- package/build/api/lead.d.ts +25 -16
- package/build/api/lead.js +24 -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 +1 -1
- package/build/app/rootReducer.d.ts +2 -2
- package/build/app/rootReducer.js +4 -4
- package/build/app/settings.d.ts +20 -2
- package/build/app/settings.js +41 -26
- package/build/app/store.d.ts +8 -8
- package/build/assets/locales/ar.json +297 -183
- package/build/assets/locales/en.json +231 -108
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
- package/build/components/AnimationFlow/AnimationFlow.js +6 -8
- package/build/components/AnimationFlow/BottomSheet.d.ts +2 -1
- package/build/components/AnimationFlow/BottomSheet.js +4 -3
- package/build/components/AnimationFlow/Dialog.d.ts +4 -1
- package/build/components/AnimationFlow/Dialog.js +5 -3
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +13 -0
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +94 -0
- package/build/components/ArabicDatePicker/index.d.ts +2 -0
- package/build/components/ArabicDatePicker/index.js +2 -0
- package/build/components/ArabicDatePicker/style.css +24 -0
- package/build/components/Button/Button.js +1 -5
- package/build/components/FileInput/DragAndDrop.d.ts +12 -2
- package/build/components/FileInput/DragAndDrop.js +109 -11
- package/build/components/Lottie/Lottie.d.ts +4204 -0
- package/build/components/Lottie/Lottie.js +66 -0
- package/build/components/Lottie/files/account_creating.json +732 -0
- package/build/components/Lottie/files/error.json +692 -0
- package/build/components/Lottie/files/pulsating_circle_waves.json +236 -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/files/success.json +425 -0
- package/build/components/Lottie/index.d.ts +3 -0
- package/build/components/Lottie/index.js +3 -0
- package/build/components/OTPField/OTPField.d.ts +2 -1
- package/build/components/OTPField/OTPField.js +2 -2
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/components/ProgressBar/CircularProgressBar.d.ts +16 -0
- package/build/components/ProgressBar/CircularProgressBar.js +48 -0
- package/build/components/ProgressBar/index.d.ts +2 -0
- package/build/components/ProgressBar/index.js +2 -0
- package/build/components/Radio/Radio.js +1 -1
- package/build/components/RadioLabel/RadioLabel.d.ts +5 -2
- package/build/components/RadioLabel/RadioLabel.js +2 -2
- package/build/components/SimpleList/SimpleList.d.ts +2 -1
- package/build/components/SimpleList/SimpleList.js +22 -10
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +2 -6
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +4 -49
- package/build/components/Tooltip/Tooltip.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.js +12 -3
- package/build/constants/api.d.ts +14 -0
- package/build/constants/api.js +30 -1
- package/build/constants/app.d.ts +26 -4
- package/build/constants/app.js +229 -33
- package/build/constants/assets.d.ts +17 -0
- package/build/constants/assets.js +19 -2
- package/build/constants/dummy.d.ts +1 -1
- package/build/constants/dummy.js +2 -2
- package/build/constants/validation.d.ts +13 -0
- package/build/constants/validation.js +14 -1
- package/build/features/app/bank/bankStore.d.ts +87 -15
- package/build/features/app/bank/bankStore.js +99 -78
- package/build/features/app/brand/brandStore.d.ts +191 -0
- package/build/features/app/brand/brandStore.js +654 -0
- package/build/features/app/business/businessStore.d.ts +200 -20
- package/build/features/app/business/businessStore.js +513 -362
- package/build/features/app/connect/connectStore.d.ts +148 -40
- package/build/features/app/connect/connectStore.js +465 -374
- package/build/features/app/connectExpress/connectExpressStore.d.ts +282 -0
- package/build/features/app/connectExpress/connectExpressStore.js +1013 -0
- package/build/features/app/entity/entityStore.d.ts +127 -18
- package/build/features/app/entity/entityStore.js +436 -192
- package/build/features/app/individual/individualStore.d.ts +96 -15
- package/build/features/app/individual/individualStore.js +258 -134
- package/build/features/app/password/passwordStore.d.ts +107 -24
- package/build/features/app/password/passwordStore.js +50 -34
- 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 +69 -9
- package/build/features/app/tax/taxStore.js +112 -94
- package/build/features/bank/Bank.d.ts +5 -3
- package/build/features/bank/Bank.js +39 -36
- package/build/features/bank/screens/BankDetails/BankDetails.js +27 -10
- package/build/features/bank/screens/BankDetails/BankName.js +2 -1
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +4 -1
- package/build/features/bank/screens/BankDetails/BankStatement.js +12 -12
- package/build/features/bank/screens/BankDetails/Beneficiary.js +10 -11
- package/build/features/bank/screens/BankDetails/IBAN.js +5 -2
- package/build/features/bank/screens/BankDetails/validation.d.ts +22 -6
- package/build/features/bank/screens/BankDetails/validation.js +11 -24
- 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 +9 -2
- package/build/features/bank/screens/Success/Success.js +7 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
- package/build/features/brand/Brand.d.ts +9 -0
- package/build/features/brand/Brand.js +72 -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 +91 -0
- package/build/features/{entity/screens/EntityInfoConfirm → brand/screens/BrandActivities}/ActivitiesList.js +58 -35
- package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +72 -0
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +82 -0
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +143 -0
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +8 -0
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +97 -0
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +8 -0
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +130 -0
- package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +20 -0
- package/build/features/brand/screens/BrandActivities/OperationStartDate.js +45 -0
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +36 -0
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +82 -0
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +6 -0
- package/build/features/brand/screens/BrandActivities/TAC.js +84 -0
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +3 -0
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +42 -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/brand/screens/BrandActivities/validation.d.ts +71 -0
- package/build/features/brand/screens/BrandActivities/validation.js +21 -0
- package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +72 -0
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +8 -0
- package/build/features/brand/screens/BrandInfo/BrandName.js +142 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +5 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +30 -0
- package/build/features/brand/screens/BrandInfo/Segments.d.ts +8 -0
- package/build/features/brand/screens/BrandInfo/Segments.js +74 -0
- package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +8 -0
- package/build/features/brand/screens/BrandInfo/TeamSize.js +74 -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 +41 -0
- package/build/features/brand/screens/BrandInfo/validation.js +106 -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 +16 -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/{otp/screens/OTPVerify → brand/screens/Verify}/OTPInput.js +2 -2
- package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/Verify.d.ts +0 -0
- package/build/features/brand/screens/Verify/Verify.js +91 -0
- package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/index.d.ts +0 -0
- package/build/features/{otp/screens/OTPVerify → brand/screens/Verify}/index.js +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/business/Business.d.ts +4 -3
- package/build/features/business/Business.js +12 -17
- package/build/features/business/screens/Activities/Activities.js +8 -17
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +44 -8
- package/build/features/business/screens/Activities/ActivitiesList.js +49 -16
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +15 -1
- package/build/features/business/screens/Activities/OperationStartDate.js +21 -2
- package/build/features/business/screens/Activities/validation.d.ts +0 -51
- package/build/features/business/screens/Activities/validation.js +4 -10
- package/build/features/business/screens/BusinessType/Article.d.ts +6 -0
- package/build/features/business/screens/BusinessType/Article.js +87 -0
- package/build/features/business/screens/BusinessType/BusinessType.js +23 -9
- package/build/features/business/screens/BusinessType/EntityName.d.ts +6 -0
- package/build/features/business/screens/BusinessType/EntityName.js +56 -0
- package/build/features/business/screens/BusinessType/LicenseCertificate.d.ts +6 -0
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +42 -0
- package/build/features/business/screens/BusinessType/LicenseList.js +27 -7
- package/build/features/business/screens/BusinessType/LicenseNumber.js +12 -6
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +34 -0
- package/build/features/business/screens/BusinessType/LicenseType.js +103 -0
- package/build/features/business/screens/BusinessType/validation.d.ts +22 -0
- package/build/features/business/screens/BusinessType/validation.js +60 -3
- package/build/features/business/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/business/screens/CivilID/CivilID.js +67 -0
- package/build/features/business/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/business/screens/CivilID/IDNumber.js +59 -0
- package/build/features/business/screens/CivilID/index.d.ts +3 -0
- package/build/features/business/screens/CivilID/index.js +2 -0
- package/build/features/business/screens/CivilID/validation.d.ts +8 -0
- package/build/features/business/screens/CivilID/validation.js +4 -0
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +24 -11
- package/build/features/business/screens/Customers/CustomerLocations.js +31 -8
- package/build/features/business/screens/Customers/Customers.js +15 -9
- package/build/features/business/screens/Customers/ExpectedCustomers.js +15 -4
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +36 -15
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
- package/build/features/business/screens/Customers/RefundPolicy.js +6 -2
- package/build/features/business/screens/Customers/TransactionPolicy.js +6 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +15 -2
- package/build/features/business/screens/OTP/OTP.js +15 -2
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
- package/build/features/business/screens/Success/Success.js +10 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
- package/build/features/business/screens/Verify/Verify.js +4 -4
- package/build/features/business/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/business/screens/VerifyPACI/VerifyPACI.js +34 -0
- package/build/features/business/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/business/screens/VerifyPACI/index.js +2 -0
- package/build/features/connect/Connect.d.ts +4 -3
- package/build/features/connect/Connect.js +32 -21
- package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/connect/screens/CivilID/CivilID.js +102 -0
- package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
- package/build/features/connect/screens/CivilID/index.d.ts +3 -0
- package/build/features/connect/screens/CivilID/index.js +2 -0
- package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
- package/build/features/connect/screens/CivilID/validation.js +4 -0
- package/build/features/connect/screens/Individual/Email.js +12 -4
- package/build/features/connect/screens/Individual/Individual.js +46 -29
- package/build/features/connect/screens/Individual/validation.js +2 -8
- package/build/features/connect/screens/Merchant/BrandList.js +29 -8
- package/build/features/connect/screens/Merchant/BrandName.js +8 -5
- package/build/features/connect/screens/Merchant/Merchant.js +46 -73
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +4 -4
- package/build/features/connect/screens/Merchant/SalesChannels.js +26 -102
- package/build/features/connect/screens/Merchant/Segments.d.ts +8 -0
- package/build/features/connect/screens/Merchant/Segments.js +74 -0
- package/build/features/connect/screens/Merchant/TAC.js +6 -2
- package/build/features/connect/screens/Merchant/TeamSize.d.ts +8 -0
- package/build/features/connect/screens/Merchant/TeamSize.js +74 -0
- package/build/features/connect/screens/Merchant/validation.d.ts +19 -123
- package/build/features/connect/screens/Merchant/validation.js +110 -173
- package/build/features/connect/screens/Mobile/Mobile.js +33 -12
- package/build/features/connect/screens/NID/NID.js +5 -1
- package/build/features/connect/screens/OTP/OTP.js +20 -6
- package/build/features/connect/screens/OTP/OTPInput.js +3 -2
- package/build/features/connect/screens/ThankYou/ThankYou.js +9 -2
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +95 -0
- package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyPACI/index.js +2 -0
- package/build/features/connectExpress/ConnectExpress.d.ts +11 -0
- package/build/features/connectExpress/ConnectExpress.js +84 -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 +55 -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 +55 -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 +8 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +142 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.d.ts +5 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +80 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +8 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +144 -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 +34 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +94 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +6 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +83 -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 +89 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +8 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +113 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +10 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +149 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +6 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +45 -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 +14 -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.d.ts +0 -0
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.js +26 -11
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.d.ts +0 -0
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTPInput.js +10 -2
- 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/{otp/screens/OTPVerify → connectExpress/screens/IdentityOTP}/validation.d.ts +0 -0
- package/build/features/{otp/screens/OTPVerify → connectExpress/screens/IdentityOTP}/validation.js +0 -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 +110 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +12 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +151 -0
- package/build/features/connectExpress/screens/Mobile/TAC.d.ts +6 -0
- package/build/features/connectExpress/screens/Mobile/TAC.js +83 -0
- 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 +6 -0
- package/build/features/connectExpress/screens/NID/DOB.js +47 -0
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +6 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +61 -0
- package/build/features/connectExpress/screens/NID/NID.d.ts +5 -0
- package/build/features/connectExpress/screens/NID/NID.js +92 -0
- package/build/features/connectExpress/screens/NID/TAC.d.ts +6 -0
- package/build/features/connectExpress/screens/NID/TAC.js +83 -0
- package/build/features/connectExpress/screens/NID/index.d.ts +3 -0
- package/build/features/connectExpress/screens/NID/index.js +2 -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/connectExpress/screens/NIDMissed/DOB.d.ts +6 -0
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +47 -0
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.d.ts +6 -0
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +56 -0
- package/build/features/connectExpress/screens/NIDMissed/NID.d.ts +5 -0
- package/build/features/connectExpress/screens/NIDMissed/NID.js +59 -0
- 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/connectExpress/screens/OTP/OTP.d.ts +5 -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 +39 -37
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +90 -0
- package/build/features/entity/screens/EntityCapital/ActivityList.js +175 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +47 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +42 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +47 -0
- package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +5 -0
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +75 -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 +62 -0
- package/build/features/entity/screens/EntityCapital/validation.js +21 -0
- package/build/features/entity/screens/EntityName/Article.d.ts +6 -0
- package/build/features/entity/screens/EntityName/Article.js +87 -0
- package/build/features/entity/screens/EntityName/EntityName.d.ts +5 -0
- package/build/features/entity/screens/EntityName/EntityName.js +93 -0
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +90 -0
- package/build/features/entity/screens/EntityName/EntityTypeList.js +151 -0
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +19 -0
- package/build/features/entity/screens/EntityName/ExpiryDate.js +46 -0
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +19 -0
- package/build/features/entity/screens/EntityName/IssuingDate.js +46 -0
- package/build/features/entity/screens/EntityName/LegalName.d.ts +5 -0
- package/build/features/entity/screens/EntityName/LegalName.js +48 -0
- package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +6 -0
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +42 -0
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +6 -0
- package/build/features/entity/screens/EntityName/LicenseNumber.js +51 -0
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +6 -0
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +43 -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 +116 -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 +9 -2
- package/build/features/entity/screens/Success/Success.js +7 -3
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
- package/build/features/entity/screens/Verify/Verify.js +18 -5
- package/build/features/featuresScreens.d.ts +2 -2
- package/build/features/featuresScreens.js +151 -14
- package/build/features/individual/Individual.d.ts +5 -3
- package/build/features/individual/Individual.js +39 -37
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +23 -28
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +3 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +30 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +5 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +21 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +28 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +24 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +42 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +2 -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 +9 -2
- package/build/features/individual/screens/Success/Success.js +7 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
- package/build/features/individual/screens/Verify/Verify.js +18 -5
- package/build/features/password/Password.d.ts +5 -3
- package/build/features/password/Password.js +12 -17
- package/build/features/password/screens/CreatePassword/CreatePassword.js +16 -3
- package/build/features/password/screens/OTP/OTP.js +15 -2
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -2
- package/build/features/password/screens/Success/Success.js +7 -3
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -94
- package/build/features/password/screens/Verify/Verify.js +16 -3
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +1 -1
- package/build/features/shared/Address/Address.d.ts +11 -0
- package/build/features/shared/Address/Address.js +63 -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 +11 -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.d.ts +2 -5
- package/build/features/shared/Background/Background.js +7 -9
- package/build/features/shared/Button/Button.js +2 -3
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +3 -2
- package/build/features/shared/Button/EmailProvidersButtons.js +7 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +3 -1
- package/build/features/shared/Button/FlowsButtons.js +39 -7
- package/build/features/shared/Button/MobileButton.d.ts +2 -1
- package/build/features/shared/Button/MobileButton.js +2 -2
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.d.ts +6 -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/Dialog/CloseDialog.d.ts +11 -0
- package/build/features/shared/Dialog/CloseDialog.js +71 -0
- package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
- package/build/features/shared/Dialog/DialogContainer.js +56 -0
- package/build/features/shared/Dialog/index.d.ts +4 -0
- package/build/features/shared/Dialog/index.js +4 -0
- package/build/features/shared/Footer/Footer.js +1 -1
- 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 +9 -7
- package/build/features/shared/Input/Input.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/shared/PaciVerification/VerifyPACILoading.d.ts +7 -0
- package/build/features/shared/PaciVerification/VerifyPACILoading.js +27 -0
- package/build/features/shared/PaciVerification/VerifyPACISuccess.d.ts +5 -0
- package/build/features/shared/PaciVerification/VerifyPACISuccess.js +8 -0
- 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 +11 -0
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +100 -0
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +11 -0
- package/build/features/shared/SalesChannels/SalesChannel.js +149 -0
- package/build/features/shared/SalesChannels/index.d.ts +2 -0
- package/build/features/shared/SalesChannels/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +16 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +113 -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 +1 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +3 -2
- package/build/features/shared/UploadFile/UploadFile.d.ts +14 -6
- package/build/features/shared/UploadFile/UploadFile.js +32 -17
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +38 -0
- package/build/features/shared/UploadMultipleFile/UploadFile.js +184 -0
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +27 -0
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +149 -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 -18
- package/build/features/signIn/screens/Email/Email.js +4 -2
- package/build/features/signIn/screens/Mobile/Mobile.js +5 -1
- package/build/features/signIn/screens/OTP/OTP.js +14 -1
- package/build/features/signIn/screens/Password/Password.js +15 -2
- package/build/features/tax/Tax.d.ts +5 -3
- package/build/features/tax/Tax.js +39 -38
- 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 +9 -2
- package/build/features/tax/screens/Success/Success.js +9 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +6 -93
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +21 -10
- package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +6 -0
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +42 -0
- package/build/features/tax/screens/TaxDetails/VATId.js +7 -2
- package/build/features/tax/screens/TaxDetails/validation.d.ts +3 -0
- package/build/features/tax/screens/TaxDetails/validation.js +2 -1
- package/build/features/tax/screens/Verify/Verify.js +16 -3
- package/build/hooks/index.d.ts +5 -0
- package/build/hooks/index.js +5 -0
- package/build/hooks/useAppConfig.d.ts +5 -1
- package/build/hooks/useAppConfig.js +6 -4
- package/build/hooks/useAppDispatch.d.ts +2 -2
- 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/useErrorListener.js +0 -6
- package/build/hooks/useScreen.d.ts +3 -0
- package/build/hooks/useScreen.js +14 -0
- package/build/hooks/useSetFromDefaultValues.d.ts +2 -0
- package/build/hooks/useSetFromDefaultValues.js +26 -0
- package/build/hooks/useVerifyToken.d.ts +15 -0
- package/build/hooks/useVerifyToken.js +25 -0
- package/build/index.d.ts +12 -12
- package/build/index.js +13 -24
- package/build/theme/typography.js +1 -1
- package/build/utils/array.d.ts +52 -1
- package/build/utils/array.js +82 -3
- package/build/utils/common.d.ts +1 -0
- package/build/utils/common.js +4 -0
- package/build/utils/date.d.ts +1 -0
- package/build/utils/date.js +5 -0
- package/build/utils/device.d.ts +1 -0
- package/build/utils/device.js +13 -0
- package/build/utils/html.d.ts +0 -1
- package/build/utils/html.js +2 -10
- package/build/utils/index.d.ts +2 -0
- package/build/utils/index.js +2 -0
- package/build/utils/locale.js +1 -1
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +12 -0
- package/build/utils/string.d.ts +15 -0
- package/build/utils/string.js +94 -3
- package/build/utils/validation.d.ts +2 -0
- package/build/utils/validation.js +6 -0
- package/package.json +4 -3
- package/build/api/ip.d.ts +0 -4
- package/build/api/ip.js +0 -12
- package/build/features/app/auth/authStore.d.ts +0 -20
- package/build/features/app/auth/authStore.js +0 -99
- package/build/features/app/otp/otpStore.d.ts +0 -28
- package/build/features/app/otp/otpStore.js +0 -153
- package/build/features/auth/Auth.d.ts +0 -9
- package/build/features/auth/Auth.js +0 -59
- package/build/features/auth/index.d.ts +0 -1
- package/build/features/auth/index.js +0 -1
- package/build/features/business/screens/Activities/SalesChannels.d.ts +0 -5
- package/build/features/business/screens/Activities/SalesChannels.js +0 -112
- package/build/features/connect/screens/Merchant/SocialMedia.d.ts +0 -9
- package/build/features/connect/screens/Merchant/SocialMedia.js +0 -162
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +0 -54
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -56
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -17
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +0 -28
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -38
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +0 -5
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +0 -112
- 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.d.ts +0 -107
- package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -17
- package/build/features/otp/OTP.d.ts +0 -7
- package/build/features/otp/OTP.js +0 -58
- package/build/features/otp/index.d.ts +0 -0
- package/build/features/otp/index.js +0 -1
- package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +0 -6
- package/build/features/otp/screens/OTPVerify/Verify.js +0 -49
|
@@ -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]) {
|
|
@@ -50,52 +50,60 @@ import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
|
50
50
|
import API from '../../../api';
|
|
51
51
|
import { FlowsTypes } from '../../../@types';
|
|
52
52
|
import { hasKey } from '../../../utils';
|
|
53
|
-
import { handleNextScreenStep, handleCurrentActiveScreen } from '../../../app/settings';
|
|
54
|
-
import {
|
|
55
|
-
export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
data
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
53
|
+
import { handleNextScreenStep, handleCurrentActiveScreen, handleSetCountryByIso2 } from '../../../app/settings';
|
|
54
|
+
import { TAX_STEP_NAMES } from '../../../constants';
|
|
55
|
+
export var verifyLeadToken = createAsyncThunk('taxVerifyLeadToken', function (_a, thunkApi) {
|
|
56
|
+
var token = _a.token, isInternally = _a.isInternally;
|
|
57
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
+
var payload, data, boardData, boardInfoData, info, countryIso2, hasTaxCompleted;
|
|
59
|
+
var _b, _c, _d, _e;
|
|
60
|
+
return __generator(this, function (_f) {
|
|
61
|
+
switch (_f.label) {
|
|
62
|
+
case 0:
|
|
63
|
+
payload = {
|
|
64
|
+
service_name: 'tap_email',
|
|
65
|
+
verify_token: token
|
|
66
|
+
};
|
|
67
|
+
return [4, API.leadService.verifyLeadToken(payload)];
|
|
68
|
+
case 1:
|
|
69
|
+
data = (_f.sent()).data;
|
|
70
|
+
boardInfoData = undefined;
|
|
71
|
+
if (((_b = data.errors) === null || _b === void 0 ? void 0 : _b.length) || (data === null || data === void 0 ? void 0 : data.mw_error))
|
|
72
|
+
throw new Error(data.errors[0].description || (data === null || data === void 0 ? void 0 : data.mw_error));
|
|
73
|
+
if (isInternally)
|
|
74
|
+
data.step_name = TAX_STEP_NAMES.TAX_INFO;
|
|
75
|
+
if (!data.id) return [3, 4];
|
|
76
|
+
return [4, API.boardService.retrieveBoardInfoStatus(data.id)];
|
|
77
|
+
case 2:
|
|
78
|
+
boardInfoData = _f.sent();
|
|
79
|
+
return [4, API.boardService.retrieveBoardDetails(data === null || data === void 0 ? void 0 : data.id)];
|
|
80
|
+
case 3:
|
|
81
|
+
boardData = _f.sent();
|
|
82
|
+
_f.label = 4;
|
|
83
|
+
case 4:
|
|
84
|
+
info = (boardInfoData || {}).info;
|
|
85
|
+
countryIso2 = (_c = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _c === void 0 ? void 0 : _c.country;
|
|
86
|
+
if (countryIso2)
|
|
87
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
88
|
+
hasTaxCompleted = ((_d = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'tax'; })) === null || _d === void 0 ? void 0 : _d.status) === 'completed';
|
|
89
|
+
if (hasTaxCompleted) {
|
|
90
|
+
thunkApi.dispatch(handleNextScreenStep('TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
91
|
+
}
|
|
92
|
+
else if (data.step_name === TAX_STEP_NAMES.PHONE_AUTH) {
|
|
93
|
+
thunkApi.dispatch(handleCurrentActiveScreen('TAX_VERIFY_STEP'));
|
|
94
|
+
}
|
|
95
|
+
else if (data.step_name === TAX_STEP_NAMES.TAX_INFO) {
|
|
96
|
+
thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
|
|
97
|
+
}
|
|
98
|
+
return [2, {
|
|
99
|
+
data: data,
|
|
100
|
+
boardResponse: __assign(__assign({}, boardData === null || boardData === void 0 ? void 0 : boardData.business), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], 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: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account, vatID: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _e === void 0 ? void 0 : _e.vat_id, merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
|
|
101
|
+
token: token
|
|
102
|
+
}];
|
|
103
|
+
}
|
|
104
|
+
});
|
|
97
105
|
});
|
|
98
|
-
});
|
|
106
|
+
});
|
|
99
107
|
export var resendOTP = createAsyncThunk('resendOTPTax', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
100
108
|
var tax, payload, data;
|
|
101
109
|
return __generator(this, function (_a) {
|
|
@@ -126,9 +134,9 @@ export var retrieveEntityInfo = createAsyncThunk('retrieveTaxEntityInfo', functi
|
|
|
126
134
|
}); });
|
|
127
135
|
export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
128
136
|
var _a, tax, settings, responseBody, payload, data, steps, hasTaxCompleted;
|
|
129
|
-
var _b, _c, _d, _e;
|
|
130
|
-
return __generator(this, function (
|
|
131
|
-
switch (
|
|
137
|
+
var _b, _c, _d, _e, _f;
|
|
138
|
+
return __generator(this, function (_g) {
|
|
139
|
+
switch (_g.label) {
|
|
132
140
|
case 0:
|
|
133
141
|
_a = thunkApi.getState(), tax = _a.tax, settings = _a.settings;
|
|
134
142
|
responseBody = tax.data.verify.responseBody;
|
|
@@ -141,56 +149,73 @@ export var verifyTaxLeadOTP = createAsyncThunk('verifyTaxLeadOTP', function (par
|
|
|
141
149
|
};
|
|
142
150
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
143
151
|
case 1:
|
|
144
|
-
data = (
|
|
145
|
-
if (
|
|
146
|
-
|
|
152
|
+
data = (_g.sent()).data;
|
|
153
|
+
if ((_c = data.errors) === null || _c === void 0 ? void 0 : _c.length)
|
|
154
|
+
throw new Error(data.errors[0].description);
|
|
155
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, { otp: params.otp });
|
|
147
156
|
steps = responseBody === null || responseBody === void 0 ? void 0 : responseBody.steps;
|
|
148
157
|
hasTaxCompleted = hasKey(steps, TAX_STEP_NAMES.TAX_SUCCESS);
|
|
149
158
|
if (!hasTaxCompleted) return [3, 3];
|
|
150
|
-
return [4, thunkApi.dispatch(retrieveEntityInfo((
|
|
159
|
+
return [4, thunkApi.dispatch(retrieveEntityInfo((_f = responseBody === null || responseBody === void 0 ? void 0 : responseBody.entity) === null || _f === void 0 ? void 0 : _f.id))];
|
|
151
160
|
case 2:
|
|
152
|
-
|
|
161
|
+
_g.sent();
|
|
153
162
|
thunkApi.dispatch(handleNextScreenStep('TAX_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
154
163
|
return [3, 4];
|
|
155
164
|
case 3:
|
|
156
165
|
thunkApi.dispatch(handleNextScreenStep('TAX_TAX_DETAILS_STEP'));
|
|
157
|
-
|
|
166
|
+
_g.label = 4;
|
|
158
167
|
case 4: return [2, { data: data, formData: params }];
|
|
159
168
|
}
|
|
160
169
|
});
|
|
161
170
|
}); });
|
|
162
171
|
export var updateTaxInfo = createAsyncThunk('updateTaxInfo', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
163
|
-
var _a, settings, tax, requestBody, data;
|
|
164
|
-
var
|
|
165
|
-
return __generator(this, function (
|
|
166
|
-
switch (
|
|
172
|
+
var _a, settings, tax, entityId, requestBody, data, documentBody, _b;
|
|
173
|
+
var _c, _d, _e, _f, _g;
|
|
174
|
+
return __generator(this, function (_h) {
|
|
175
|
+
switch (_h.label) {
|
|
167
176
|
case 0:
|
|
168
177
|
_a = thunkApi.getState(), settings = _a.settings, tax = _a.tax;
|
|
178
|
+
entityId = (_d = (_c = tax.data.verify.responseBody) === null || _c === void 0 ? void 0 : _c.entity) === null || _d === void 0 ? void 0 : _d.id;
|
|
169
179
|
requestBody = {
|
|
170
|
-
id:
|
|
180
|
+
id: entityId,
|
|
171
181
|
vat_id: params.vatId,
|
|
172
182
|
step_name: TAX_STEP_NAMES.TAX_INFO,
|
|
173
183
|
is_vat_acknowledged: params.confirmPolicy
|
|
174
184
|
};
|
|
175
185
|
return [4, API.entityService.updateEntityInfo(requestBody)];
|
|
176
186
|
case 1:
|
|
177
|
-
data = (
|
|
178
|
-
if (
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
187
|
+
data = (_h.sent()).data;
|
|
188
|
+
if ((_e = data.errors) === null || _e === void 0 ? void 0 : _e.length)
|
|
189
|
+
throw new Error(data.errors[0].description);
|
|
190
|
+
if (!((params.documentId || []).length > 0)) return [3, 3];
|
|
191
|
+
documentBody = {
|
|
192
|
+
entity_id: entityId || '',
|
|
193
|
+
documents: [
|
|
194
|
+
{
|
|
195
|
+
images: params.documentId
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
};
|
|
199
|
+
_b = data;
|
|
200
|
+
return [4, API.entityService.updateDocumentInfo(documentBody)];
|
|
201
|
+
case 2:
|
|
202
|
+
_b.documentData = _h.sent();
|
|
203
|
+
_h.label = 3;
|
|
204
|
+
case 3:
|
|
205
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
206
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, requestBody);
|
|
182
207
|
return [2, { data: data, formData: params }];
|
|
183
208
|
}
|
|
184
209
|
});
|
|
185
210
|
}); });
|
|
186
211
|
export var updateLeadSuccess = createAsyncThunk('taxUpdateLeadSuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
187
|
-
var _a, settings, tax, _b, id, infoId,
|
|
212
|
+
var _a, settings, tax, _b, id, infoId, payload, data, boardInfoData, boardData;
|
|
188
213
|
var _c, _d, _e, _f, _g;
|
|
189
214
|
return __generator(this, function (_h) {
|
|
190
215
|
switch (_h.label) {
|
|
191
216
|
case 0:
|
|
192
217
|
_a = thunkApi.getState(), settings = _a.settings, tax = _a.tax;
|
|
193
|
-
_b = tax.data.verify.responseBody || {}, id = _b.board_id, infoId = _b.board_info_id
|
|
218
|
+
_b = tax.data.verify.responseBody || {}, id = _b.board_id, infoId = _b.board_info_id;
|
|
194
219
|
if (!id)
|
|
195
220
|
return [2];
|
|
196
221
|
payload = {
|
|
@@ -200,14 +225,17 @@ export var updateLeadSuccess = createAsyncThunk('taxUpdateLeadSuccess', function
|
|
|
200
225
|
return [4, API.boardService.updateBoardInfo(__assign({ id: id, infoId: infoId }, payload))];
|
|
201
226
|
case 1:
|
|
202
227
|
data = _h.sent();
|
|
203
|
-
return [4, API.boardService.
|
|
228
|
+
return [4, API.boardService.retrieveBoardInfoStatus(id)];
|
|
204
229
|
case 2:
|
|
230
|
+
boardInfoData = _h.sent();
|
|
231
|
+
return [4, API.boardService.retrieveBoardDetails(id)];
|
|
232
|
+
case 3:
|
|
205
233
|
boardData = _h.sent();
|
|
206
|
-
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name,
|
|
234
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
|
|
207
235
|
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
|
|
208
236
|
thunkApi.dispatch(handleNextScreenStep());
|
|
209
237
|
return [2, {
|
|
210
|
-
response: __assign(__assign({}, data), { flows:
|
|
238
|
+
response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [], user: boardData === null || boardData === void 0 ? void 0 : boardData.user, bank: 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, business: boardData === null || boardData === void 0 ? void 0 : boardData.business }),
|
|
211
239
|
formData: params
|
|
212
240
|
}];
|
|
213
241
|
}
|
|
@@ -216,6 +244,7 @@ export var updateLeadSuccess = createAsyncThunk('taxUpdateLeadSuccess', function
|
|
|
216
244
|
var initialState = {
|
|
217
245
|
error: null,
|
|
218
246
|
loading: false,
|
|
247
|
+
uploading: false,
|
|
219
248
|
data: {
|
|
220
249
|
flowName: FlowsTypes.TAX,
|
|
221
250
|
verify: {
|
|
@@ -242,23 +271,21 @@ export var taxSlice = createSlice({
|
|
|
242
271
|
},
|
|
243
272
|
resetOTPScreen: function (state) {
|
|
244
273
|
state.data.otpData.otp = '';
|
|
274
|
+
},
|
|
275
|
+
uploadingStatus: function (state, action) {
|
|
276
|
+
state.uploading = action.payload;
|
|
245
277
|
}
|
|
246
278
|
},
|
|
247
279
|
extraReducers: function (builder) {
|
|
248
280
|
builder
|
|
249
281
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
250
|
-
var _a;
|
|
251
282
|
state.error = null;
|
|
252
283
|
state.customLoading = false;
|
|
253
|
-
var
|
|
284
|
+
var _a = action.payload, data = _a.data, token = _a.token, boardResponse = _a.boardResponse;
|
|
254
285
|
var user = boardResponse.user, bank_account = boardResponse.bank_account, vatID = boardResponse.vatID, merchant = boardResponse.merchant;
|
|
255
|
-
|
|
256
|
-
if (description) {
|
|
257
|
-
state.error = description;
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id, name: user.name, bank_account: bank_account, vatID: vatID, merchant: merchant });
|
|
286
|
+
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 });
|
|
261
287
|
state.data.verify.token = token;
|
|
288
|
+
state.data.taxData.vatId = vatID;
|
|
262
289
|
})
|
|
263
290
|
.addCase(verifyLeadToken.pending, function (state) {
|
|
264
291
|
state.error = null;
|
|
@@ -290,15 +317,9 @@ export var taxSlice = createSlice({
|
|
|
290
317
|
state.error = null;
|
|
291
318
|
})
|
|
292
319
|
.addCase(verifyTaxLeadOTP.fulfilled, function (state, action) {
|
|
293
|
-
var _a;
|
|
294
320
|
state.loading = false;
|
|
295
321
|
state.error = null;
|
|
296
|
-
var
|
|
297
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
298
|
-
if (description) {
|
|
299
|
-
state.error = description;
|
|
300
|
-
return;
|
|
301
|
-
}
|
|
322
|
+
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
302
323
|
state.data.otpData = formData;
|
|
303
324
|
state.data.otpData.responseBody = data;
|
|
304
325
|
})
|
|
@@ -311,15 +332,9 @@ export var taxSlice = createSlice({
|
|
|
311
332
|
state.error = null;
|
|
312
333
|
})
|
|
313
334
|
.addCase(updateTaxInfo.fulfilled, function (state, action) {
|
|
314
|
-
var _a;
|
|
315
335
|
state.loading = false;
|
|
316
336
|
state.error = null;
|
|
317
|
-
var
|
|
318
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
319
|
-
if (description) {
|
|
320
|
-
state.error = description;
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
337
|
+
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
323
338
|
state.data.taxData = formData;
|
|
324
339
|
state.data.taxData.responseBody = data;
|
|
325
340
|
})
|
|
@@ -350,6 +365,7 @@ export var taxSlice = createSlice({
|
|
|
350
365
|
.addCase(updateLeadSuccess.fulfilled, function (state, action) {
|
|
351
366
|
var _a;
|
|
352
367
|
state.loading = false;
|
|
368
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateBoardSuccessLoading: false });
|
|
353
369
|
state.error = null;
|
|
354
370
|
var response = (action.payload || {}).response;
|
|
355
371
|
var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
@@ -358,18 +374,20 @@ export var taxSlice = createSlice({
|
|
|
358
374
|
return;
|
|
359
375
|
}
|
|
360
376
|
var flows = response.flows, steps = response.steps, user = response.user, bank_account = response.bank_account, vatID = response.vatID, merchant = response.merchant;
|
|
361
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { flows: flows, steps: steps, bank_account: bank_account, name: user.
|
|
377
|
+
state.data.verify.responseBody = __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 });
|
|
362
378
|
})
|
|
363
379
|
.addCase(updateLeadSuccess.pending, function (state) {
|
|
364
380
|
state.loading = true;
|
|
381
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateBoardSuccessLoading: true });
|
|
365
382
|
state.error = null;
|
|
366
383
|
})
|
|
367
384
|
.addCase(updateLeadSuccess.rejected, function (state, action) {
|
|
368
385
|
state.loading = false;
|
|
386
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateBoardSuccessLoading: false });
|
|
369
387
|
state.error = action.error.message;
|
|
370
388
|
});
|
|
371
389
|
}
|
|
372
390
|
});
|
|
373
|
-
export var clearError = (_a = taxSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen;
|
|
391
|
+
export var clearError = (_a = taxSlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus;
|
|
374
392
|
export default taxSlice.reducer;
|
|
375
393
|
export var taxSelector = function (state) { return state.tax; };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface BankLibProps extends LibConfig {
|
|
4
|
+
verifyToken?: string;
|
|
4
5
|
}
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function renderBankLib(config: BankLibProps, elementId: string):
|
|
7
|
-
|
|
6
|
+
export declare function BankElement(props: BankLibProps): JSX.Element;
|
|
7
|
+
export declare function renderBankLib(config: BankLibProps, elementId: string): {
|
|
8
|
+
unmount: () => void;
|
|
9
|
+
};
|
|
@@ -9,61 +9,64 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { memo
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
24
|
+
import { memo } from 'react';
|
|
25
|
+
import { createRoot } from 'react-dom/client';
|
|
26
|
+
import { useAppTheme, useAppSelector, useErrorListener, useAppConfig, useStepStartedListener, useVerifyToken } from '../../hooks';
|
|
27
|
+
import { settingsSelector } from '../../app/settings';
|
|
16
28
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
17
29
|
import { store } from '../../app/store';
|
|
18
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
19
31
|
import Collapse from '../../components/Collapse';
|
|
20
|
-
import {
|
|
32
|
+
import { createElementAndInject } from '../../utils';
|
|
21
33
|
import { FeatureContainer } from '../shared/Containers';
|
|
22
|
-
import { BANK_SCREENS_NAVIGATION
|
|
34
|
+
import { BANK_SCREENS_NAVIGATION } from '../../constants';
|
|
23
35
|
import { bankFeatureScreens } from '../featuresScreens';
|
|
24
36
|
import CustomFooter from '../shared/Footer';
|
|
25
37
|
import { bankSelector, verifyLeadToken } from '../app/bank/bankStore';
|
|
26
38
|
import Background from '../shared/Background';
|
|
27
|
-
var Bank = memo(function (
|
|
39
|
+
var Bank = memo(function (_a) {
|
|
40
|
+
var verifyToken = _a.verifyToken, props = __rest(_a, ["verifyToken"]);
|
|
28
41
|
var theme = useAppTheme().theme;
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
useAppConfig(__assign({ navigation: BANK_SCREENS_NAVIGATION }, props));
|
|
42
|
+
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
43
|
+
var _c = useAppSelector(bankSelector), customLoading = _c.customLoading, loading = _c.loading, bankError = _c.error;
|
|
44
|
+
useAppConfig(__assign(__assign({ navigation: BANK_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
33
45
|
useErrorListener(bankError || error);
|
|
34
46
|
useStepStartedListener();
|
|
35
|
-
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (!settingLoading)
|
|
47
|
-
verifyToken();
|
|
48
|
-
}, [settingLoading]);
|
|
49
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: bankFeatureScreens.map(function (_a, index) {
|
|
47
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation;
|
|
48
|
+
useVerifyToken({
|
|
49
|
+
verify: verifyLeadToken,
|
|
50
|
+
loadingScreenName: 'BANK_LOADING_DATA_STEP',
|
|
51
|
+
navigation: featureScreensNavigation,
|
|
52
|
+
open: open,
|
|
53
|
+
internalToken: verifyToken,
|
|
54
|
+
settingLoading: settingLoading
|
|
55
|
+
});
|
|
56
|
+
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
57
|
+
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', footer: _jsx(CustomFooter, {}), screenId: activeScreen.name }, { children: _jsx(FeatureContainer, { children: bankFeatureScreens.map(function (_a, index) {
|
|
50
58
|
var Element = _a.element, name = _a.name;
|
|
51
59
|
var isActive = activeScreen.name === name;
|
|
52
60
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
53
61
|
}) }) })) })) })));
|
|
54
62
|
});
|
|
55
|
-
export function
|
|
63
|
+
export function BankElement(props) {
|
|
56
64
|
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Bank, __assign({}, props)) })));
|
|
57
65
|
}
|
|
58
66
|
export function renderBankLib(config, elementId) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
var _a;
|
|
65
|
-
((_a = element === null || element === void 0 ? void 0 : element.children) === null || _a === void 0 ? void 0 : _a.length) && element.removeChild(element.children[0]);
|
|
66
|
-
removeElement(DIALOG_ID);
|
|
67
|
-
reactElement(elementId).unmount();
|
|
68
|
-
}, 1000);
|
|
67
|
+
var element = createElementAndInject(elementId);
|
|
68
|
+
var root = createRoot(element);
|
|
69
|
+
root.render(_jsx(BankElement, __assign({}, config)));
|
|
70
|
+
var unmount = function () { return root.unmount(); };
|
|
71
|
+
return { unmount: unmount };
|
|
69
72
|
}
|
|
@@ -16,18 +16,20 @@ 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 } from '../../../../hooks';
|
|
20
|
-
import { BankValidation } from './validation';
|
|
19
|
+
import { useAppDispatch, useAppSelector, useSetFromDefaultValues } from '../../../../hooks';
|
|
20
|
+
import { BankKWFLValidation, BankValidation } from './validation';
|
|
21
21
|
import { useTranslation } from 'react-i18next';
|
|
22
22
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
23
23
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
24
24
|
import { useLanguage } from '../../../../hooks';
|
|
25
25
|
import { styled } from '@mui/material/styles';
|
|
26
|
+
import { BusinessType } from '../../../../@types';
|
|
26
27
|
import { bankSelector, clearError, createBankAccount } from '../../../app/bank/bankStore';
|
|
27
28
|
import Form from '../../../../components/Form';
|
|
28
|
-
import { handleCurrentActiveScreen } from '../../../../app/settings';
|
|
29
|
+
import { handleCurrentActiveScreen, settingsSelector } from '../../../../app/settings';
|
|
29
30
|
import ConfirmPolicy from './ConfirmPolicy';
|
|
30
31
|
import BankStatement from './BankStatement';
|
|
32
|
+
import { isKW } from '../../../../utils';
|
|
31
33
|
var FormStyled = styled(Form)(function () { return ({
|
|
32
34
|
display: 'flex',
|
|
33
35
|
flexDirection: 'column',
|
|
@@ -40,14 +42,29 @@ var ButtonStyled = styled(Button)(function (_a) {
|
|
|
40
42
|
});
|
|
41
43
|
});
|
|
42
44
|
var BankDetails = function () {
|
|
43
|
-
var _a
|
|
45
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
46
|
+
var _h = React.useState(false), ibanChecking = _h[0], setIbanChecking = _h[1];
|
|
44
47
|
var dispatch = useAppDispatch();
|
|
45
|
-
var
|
|
48
|
+
var _j = useAppSelector(bankSelector), data = _j.data, loading = _j.loading, error = _j.error;
|
|
49
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
50
|
+
var _k = data.bankData, iban = _k.iban, beneficiaryName = _k.beneficiaryName, bankName = _k.bankName, bankStatementId = _k.bankStatementId, bankStatementUploading = _k.uploading, confirmPolicy = _k.confirmPolicy;
|
|
51
|
+
var verify = data.verify;
|
|
52
|
+
var isKWCountry = React.useMemo(function () { return isKW(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
53
|
+
var isFL = ((_c = (_b = (_a = verify.responseBody) === null || _a === void 0 ? void 0 : _a.entity) === null || _b === void 0 ? void 0 : _b.type) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === BusinessType.FL ? true : false;
|
|
54
|
+
var bankHasDocument = ((_g = (_f = (_e = (_d = verify.responseBody) === null || _d === void 0 ? void 0 : _d.bank_account) === null || _e === void 0 ? void 0 : _e.document) === null || _f === void 0 ? void 0 : _f.file_details) === null || _g === void 0 ? void 0 : _g.length) > 0;
|
|
46
55
|
var methods = useForm({
|
|
47
|
-
resolver: yupResolver(BankValidation),
|
|
48
|
-
defaultValues:
|
|
56
|
+
resolver: yupResolver(isKWCountry && isFL && !bankHasDocument ? BankKWFLValidation : BankValidation),
|
|
57
|
+
defaultValues: {
|
|
58
|
+
iban: iban,
|
|
59
|
+
beneficiaryName: beneficiaryName,
|
|
60
|
+
bankName: bankName,
|
|
61
|
+
bankStatementId: bankStatementId,
|
|
62
|
+
uploading: bankStatementUploading,
|
|
63
|
+
confirmPolicy: confirmPolicy
|
|
64
|
+
},
|
|
49
65
|
mode: 'onChange'
|
|
50
66
|
});
|
|
67
|
+
useSetFromDefaultValues(methods, data.bankData);
|
|
51
68
|
var onSubmit = function (data) {
|
|
52
69
|
dispatch(createBankAccount(data));
|
|
53
70
|
};
|
|
@@ -56,11 +73,11 @@ var BankDetails = function () {
|
|
|
56
73
|
var onBack = function () {
|
|
57
74
|
dispatch(handleCurrentActiveScreen('BANK_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
58
75
|
};
|
|
59
|
-
var disabled = ibanChecking || !methods.formState.isValid || !!error;
|
|
76
|
+
var disabled = ibanChecking || !methods.formState.isValid || !!error || bankStatementUploading;
|
|
60
77
|
React.useEffect(function () {
|
|
61
78
|
if (error)
|
|
62
79
|
dispatch(clearError());
|
|
63
|
-
}, [methods.formState.isValid, methods.watch('
|
|
64
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(BankStatement, {}), _jsx(ConfirmPolicy, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
|
|
80
|
+
}, [methods.formState.isValid, methods.watch('bankStatementId')]);
|
|
81
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Beneficiary, {}), _jsx(IBAN, { fetchingIban: function (value) { return setIbanChecking(value); }, ibanChecking: ibanChecking }), _jsx(BankName, {}), _jsx(BankStatement, { required: isKWCountry && isFL && !bankHasDocument }), _jsx(ConfirmPolicy, {}), _jsx(ButtonStyled, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, disableBack: true, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('confirm') }))] })) })) }));
|
|
65
82
|
};
|
|
66
83
|
export default BankDetails;
|
|
@@ -47,7 +47,8 @@ var BankName = function () {
|
|
|
47
47
|
React.useEffect(function () {
|
|
48
48
|
var _a;
|
|
49
49
|
var bankName = (_a = data.bankData.responseBody) === null || _a === void 0 ? void 0 : _a.bank_name;
|
|
50
|
-
|
|
50
|
+
if (bankName && !bankNameValue)
|
|
51
|
+
setValue('bankName', bankName);
|
|
51
52
|
}, [(_b = data.bankData.responseBody) === null || _b === void 0 ? void 0 : _b.bank_name]);
|
|
52
53
|
var handleBankChange = function (_a) {
|
|
53
54
|
var target = _a.target;
|
|
@@ -3,28 +3,28 @@ import { styled } from '@mui/material/styles';
|
|
|
3
3
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { useController, useFormContext } from 'react-hook-form';
|
|
6
|
-
import { useAppSelector } from '../../../../hooks';
|
|
7
|
-
import { bankSelector } from '../../../app/bank/bankStore';
|
|
8
|
-
import
|
|
6
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
7
|
+
import { bankSelector, bankStatementUploadingStatus } from '../../../app/bank/bankStore';
|
|
8
|
+
import UploadMultipleFile from '../../../shared/UploadMultipleFile';
|
|
9
9
|
var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
10
10
|
var theme = _a.theme;
|
|
11
11
|
return ({
|
|
12
12
|
marginBlockStart: theme.spacing(3)
|
|
13
13
|
});
|
|
14
14
|
});
|
|
15
|
-
var BankStatement = function () {
|
|
16
|
-
var _a;
|
|
15
|
+
var BankStatement = function (_a) {
|
|
16
|
+
var required = _a.required;
|
|
17
17
|
var t = useTranslation().t;
|
|
18
18
|
var control = useFormContext().control;
|
|
19
|
-
var
|
|
19
|
+
var bankStatementIdControl = useController({ name: 'bankStatementId', control: control });
|
|
20
20
|
var loading = useAppSelector(bankSelector).loading;
|
|
21
|
-
var
|
|
22
|
-
var handleBankStatementChange = function (
|
|
23
|
-
|
|
21
|
+
var dispatch = useAppDispatch();
|
|
22
|
+
var handleBankStatementChange = function (ids) {
|
|
23
|
+
bankStatementIdControl.field.onChange(ids);
|
|
24
24
|
};
|
|
25
|
-
var handleReset = function () {
|
|
26
|
-
|
|
25
|
+
var handleReset = function (ids) {
|
|
26
|
+
bankStatementIdControl.field.onChange(ids);
|
|
27
27
|
};
|
|
28
|
-
return (_jsx(FeatureStyled, { children: _jsx(
|
|
28
|
+
return (_jsx(FeatureStyled, { children: _jsx(UploadMultipleFile, { label: t('title_bank_statement'), title: t('drag_and_drop'), subTitle: t('subtitle_drop'), dragDescription: t('desc_drag_and_drop'), uploadingTitle: t('file_uploading_title'), successTitle: t('success_upload_bank_statement'), onFileUploaded: handleBankStatementChange, isSubmitting: loading, required: required, onDeleteFile: handleReset, purpose: 'bank_statement', maxLimit: 4, fileUploadingStatus: function (uploading) { return dispatch(bankStatementUploadingStatus(uploading)); } }) }));
|
|
29
29
|
};
|
|
30
30
|
export default BankStatement;
|