@tap-payments/auth-jsconnect 2.0.46-test → 2.0.46
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 +165 -27
- package/build/@types/app.js +44 -3
- package/build/@types/form.d.ts +88 -32
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/theme.d.ts +1 -1
- package/build/@types/user.d.ts +141 -0
- package/build/@types/user.js +1 -0
- package/build/api/account.d.ts +6 -1
- package/build/api/account.js +9 -1
- package/build/api/auth.d.ts +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 +20 -3
- package/build/api/board.js +17 -1
- package/build/api/brand.d.ts +3 -1
- package/build/api/brand.js +18 -1
- package/build/api/country.d.ts +7 -1
- package/build/api/country.js +12 -2
- package/build/api/data.d.ts +46 -7
- package/build/api/data.js +73 -17
- package/build/api/entity.d.ts +91 -15
- 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 +75 -18
- package/build/api/index.js +5 -3
- package/build/api/individual.d.ts +136 -23
- package/build/api/individual.js +37 -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 +7 -1
- package/build/api/user.js +9 -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 +51 -33
- package/build/app/store.d.ts +8 -8
- package/build/assets/locales/ar.json +323 -183
- package/build/assets/locales/en.json +258 -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 +4 -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 +15 -0
- package/build/constants/api.js +32 -1
- package/build/constants/app.d.ts +27 -4
- package/build/constants/app.js +248 -39
- package/build/constants/assets.d.ts +21 -0
- package/build/constants/assets.js +23 -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 +88 -15
- package/build/features/app/bank/bankStore.js +108 -81
- package/build/features/app/brand/brandStore.d.ts +193 -0
- package/build/features/app/brand/brandStore.js +674 -0
- package/build/features/app/business/businessStore.d.ts +200 -20
- package/build/features/app/business/businessStore.js +514 -363
- 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 +1019 -0
- package/build/features/app/entity/entityStore.d.ts +129 -18
- package/build/features/app/entity/entityStore.js +438 -192
- package/build/features/app/individual/individualStore.d.ts +186 -16
- package/build/features/app/individual/individualStore.js +767 -159
- 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 +121 -102
- 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 +28 -10
- package/build/features/bank/screens/BankDetails/BankName.js +15 -11
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +4 -1
- package/build/features/bank/screens/BankDetails/BankStatement.js +19 -13
- package/build/features/bank/screens/BankDetails/Beneficiary.js +19 -21
- package/build/features/bank/screens/BankDetails/IBAN.js +16 -9
- package/build/features/bank/screens/BankDetails/validation.d.ts +29 -13
- package/build/features/bank/screens/BankDetails/validation.js +34 -28
- package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/bank/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/bank/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/bank/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +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 -33
- package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +82 -0
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +82 -0
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +146 -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 +133 -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 +32 -0
- package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +79 -0
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +8 -0
- package/build/features/brand/screens/BrandInfo/BrandName.js +143 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +5 -0
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +42 -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 +116 -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 +43 -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 +13 -9
- 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 +140 -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/{individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts → connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts} +2 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +149 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +6 -0
- package/build/features/{individual/screens/AdditionalIndividualInfo/EmployerName.js → connectExpress/screens/CollectIndividualInfo/Name.js} +15 -16
- package/build/features/connectExpress/screens/CollectIndividualInfo/index.d.ts +3 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/index.js +2 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.d.ts +14 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +31 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.d.ts +5 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +34 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/index.d.ts +2 -0
- package/build/features/connectExpress/screens/CreateAccountLoader/index.js +2 -0
- package/build/features/{auth/screens/OTP → connectExpress/screens/IdentityOTP}/OTP.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 +48 -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 +161 -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.d.ts +13 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +64 -46
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +3 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +35 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +12 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +19 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +28 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +31 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +35 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +41 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +6 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +48 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +10 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +31 -23
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +19 -23
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.d.ts +10 -0
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +31 -0
- package/build/features/individual/screens/IndividualList/Email.d.ts +6 -0
- package/build/features/individual/screens/IndividualList/Email.js +48 -0
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +31 -0
- package/build/features/individual/screens/IndividualList/IndividualList.js +58 -0
- package/build/features/individual/screens/IndividualList/MobileNumber.d.ts +12 -0
- package/build/features/individual/screens/IndividualList/MobileNumber.js +143 -0
- package/build/features/individual/screens/IndividualList/UserList.d.ts +5 -0
- package/build/features/individual/screens/IndividualList/UserList.js +186 -0
- package/build/features/individual/screens/IndividualList/index.d.ts +3 -0
- package/build/features/individual/screens/IndividualList/index.js +2 -0
- package/build/features/individual/screens/IndividualList/validation.d.ts +12 -0
- package/build/features/individual/screens/IndividualList/validation.js +39 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +8 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +109 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +10 -0
- package/build/features/individual/screens/{AdditionalIndividualInfo/EmployerLocation.js → IndividualPersonalInfo/BirthCountry.js} +14 -24
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +7 -0
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +46 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +6 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +50 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +7 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +50 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +34 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +81 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +6 -0
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +48 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +21 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +139 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +10 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +88 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +10 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +145 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +6 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +52 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +10 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +88 -0
- package/build/features/individual/screens/IndividualPersonalInfo/index.d.ts +3 -0
- package/build/features/individual/screens/IndividualPersonalInfo/index.js +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +38 -0
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +68 -0
- package/build/features/individual/screens/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 +13 -7
- 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 +16 -0
- package/build/features/shared/Address/Address.js +73 -0
- package/build/features/shared/Address/CountryList.d.ts +72 -0
- package/build/features/shared/Address/CountryList.js +89 -0
- package/build/features/shared/Address/InputSelect.d.ts +71 -0
- package/build/features/shared/Address/InputSelect.js +172 -0
- package/build/features/shared/Address/InputText.d.ts +12 -0
- package/build/features/shared/Address/InputText.js +12 -0
- package/build/features/shared/Address/index.d.ts +2 -0
- package/build/features/shared/Address/index.js +2 -0
- package/build/features/shared/Background/Background.d.ts +2 -5
- package/build/features/shared/Background/Background.js +7 -9
- package/build/features/shared/Button/Button.js +13 -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 +4 -1
- package/build/features/shared/Button/FlowsButtons.js +43 -11
- package/build/features/shared/Button/ListButton.d.ts +18 -0
- package/build/features/shared/Button/ListButton.js +125 -0
- package/build/features/shared/Button/MobileButton.d.ts +2 -1
- package/build/features/shared/Button/MobileButton.js +2 -2
- package/build/features/shared/Button/index.d.ts +2 -1
- package/build/features/shared/Button/index.js +2 -1
- 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 +7 -0
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +58 -0
- package/build/features/shared/CreateAccountLoading/index.d.ts +2 -0
- package/build/features/shared/CreateAccountLoading/index.js +2 -0
- package/build/features/shared/DataLoading/DataLoading.d.ts +6 -0
- package/build/features/shared/DataLoading/DataLoading.js +58 -0
- package/build/features/shared/DataLoading/index.d.ts +2 -0
- package/build/features/shared/DataLoading/index.js +2 -0
- package/build/features/shared/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 +12 -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 +17 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +115 -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 +32 -0
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +171 -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 +23 -11
- package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +6 -0
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +48 -0
- package/build/features/tax/screens/TaxDetails/VATId.js +14 -4
- package/build/features/tax/screens/TaxDetails/validation.d.ts +7 -4
- package/build/features/tax/screens/TaxDetails/validation.js +10 -4
- 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 +53 -1
- package/build/utils/array.js +90 -3
- package/build/utils/common.d.ts +2 -0
- package/build/utils/common.js +10 -0
- package/build/utils/date.d.ts +2 -0
- package/build/utils/date.js +11 -0
- package/build/utils/device.d.ts +1 -0
- package/build/utils/device.js +13 -0
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/build/utils/html.d.ts +1 -2
- package/build/utils/html.js +6 -11
- package/build/utils/index.d.ts +3 -0
- package/build/utils/index.js +3 -0
- package/build/utils/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 +30 -2
- package/build/utils/string.js +131 -6
- package/build/utils/validation.d.ts +3 -0
- package/build/utils/validation.js +9 -0
- package/package.json +129 -128
- 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/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +0 -6
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +0 -19
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +0 -52
- package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +0 -3
- package/build/features/individual/screens/ShowIndividualInfo/index.js +0 -2
- package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +0 -7
- package/build/features/individual/screens/ShowIndividualInfo/info.js +0 -28
- package/build/features/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]) {
|
|
@@ -45,59 +45,102 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
49
|
+
var t = {};
|
|
50
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
51
|
+
t[p] = s[p];
|
|
52
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
53
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
54
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
55
|
+
t[p[i]] = s[p[i]];
|
|
56
|
+
}
|
|
57
|
+
return t;
|
|
58
|
+
};
|
|
48
59
|
var _a;
|
|
49
60
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
50
61
|
import API from '../../../api';
|
|
51
|
-
import { FlowsTypes } from '../../../@types';
|
|
52
|
-
import {
|
|
53
|
-
import { ENTITY_STEP_NAMES
|
|
62
|
+
import { BusinessType, DocumentPurpose, FieldType, FlowsTypes } from '../../../@types';
|
|
63
|
+
import { handleNextScreenStep, handleSetCountryByIso2 } from '../../../app/settings';
|
|
64
|
+
import { ENTITY_STEP_NAMES } from '../../../constants';
|
|
54
65
|
import moment from 'moment';
|
|
55
66
|
import { convertNumbers2English } from '../../../utils';
|
|
56
|
-
export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (
|
|
57
|
-
var
|
|
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
|
-
|
|
67
|
+
export var verifyLeadToken = createAsyncThunk('entityVerifyLeadToken', function (_a, thunkApi) {
|
|
68
|
+
var token = _a.token, isInternally = _a.isInternally;
|
|
69
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
70
|
+
var payload, data, boardData, entityData, boardInfoData, entityTypes, countryIso2, board_id, entityId, info, hasEntityCompleted;
|
|
71
|
+
var _b, _c, _d, _e;
|
|
72
|
+
return __generator(this, function (_f) {
|
|
73
|
+
switch (_f.label) {
|
|
74
|
+
case 0:
|
|
75
|
+
payload = {
|
|
76
|
+
service_name: 'tap_email',
|
|
77
|
+
verify_token: token
|
|
78
|
+
};
|
|
79
|
+
return [4, API.leadService.verifyLeadToken(payload)];
|
|
80
|
+
case 1:
|
|
81
|
+
data = (_f.sent()).data;
|
|
82
|
+
countryIso2 = undefined;
|
|
83
|
+
if (!(!(data === null || data === void 0 ? void 0 : data.errors) && !(data === null || data === void 0 ? void 0 : data.mw_error))) return [3, 9];
|
|
84
|
+
if (isInternally)
|
|
85
|
+
data.step_name = ENTITY_STEP_NAMES.ENTITY_INFO;
|
|
86
|
+
if (data === null || data === void 0 ? void 0 : data.country_code) {
|
|
87
|
+
countryIso2 = data === null || data === void 0 ? void 0 : data.country_code;
|
|
88
|
+
if (countryIso2)
|
|
89
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
90
|
+
}
|
|
91
|
+
if (!(data.step_name !== ENTITY_STEP_NAMES.PHONE_AUTH)) return [3, 9];
|
|
92
|
+
board_id = data === null || data === void 0 ? void 0 : data.id;
|
|
93
|
+
if (!board_id) return [3, 4];
|
|
94
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
95
|
+
case 2:
|
|
96
|
+
boardInfoData = _f.sent();
|
|
97
|
+
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
98
|
+
case 3:
|
|
99
|
+
boardData = _f.sent();
|
|
100
|
+
_f.label = 4;
|
|
101
|
+
case 4:
|
|
102
|
+
entityId = (_b = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _b === void 0 ? void 0 : _b.id;
|
|
103
|
+
if (!entityId) return [3, 6];
|
|
104
|
+
return [4, API.entityService.retrieveEntity(entityId)];
|
|
105
|
+
case 5:
|
|
106
|
+
entityData = _f.sent();
|
|
107
|
+
_f.label = 6;
|
|
108
|
+
case 6:
|
|
109
|
+
if (!countryIso2) {
|
|
110
|
+
countryIso2 = entityData.country;
|
|
111
|
+
if (countryIso2)
|
|
112
|
+
thunkApi.dispatch(handleSetCountryByIso2(countryIso2));
|
|
113
|
+
}
|
|
114
|
+
info = (boardInfoData || {}).info;
|
|
115
|
+
hasEntityCompleted = ((_c = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'entity'; })) === null || _c === void 0 ? void 0 : _c.status) === 'completed';
|
|
116
|
+
if (!hasEntityCompleted) return [3, 7];
|
|
91
117
|
thunkApi.dispatch(handleNextScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
118
|
+
return [3, 9];
|
|
119
|
+
case 7: return [4, API.entityService.retrieveEntityType()];
|
|
120
|
+
case 8:
|
|
121
|
+
entityTypes = _f.sent();
|
|
122
|
+
thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
|
|
123
|
+
_f.label = 9;
|
|
124
|
+
case 9: return [2, {
|
|
125
|
+
data: data,
|
|
126
|
+
boardResponse: {
|
|
127
|
+
user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
|
|
128
|
+
brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
|
|
129
|
+
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
130
|
+
entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
|
|
131
|
+
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
132
|
+
name: (_d = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _d === void 0 ? void 0 : _d.names,
|
|
133
|
+
contact: (_e = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _e === void 0 ? void 0 : _e.contact,
|
|
134
|
+
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
135
|
+
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
|
|
136
|
+
entityTypes: entityTypes
|
|
137
|
+
},
|
|
138
|
+
token: token
|
|
139
|
+
}];
|
|
140
|
+
}
|
|
141
|
+
});
|
|
99
142
|
});
|
|
100
|
-
});
|
|
143
|
+
});
|
|
101
144
|
export var resendOTP = createAsyncThunk('entityResendOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
102
145
|
var entity, payload, data;
|
|
103
146
|
return __generator(this, function (_a) {
|
|
@@ -116,14 +159,13 @@ export var resendOTP = createAsyncThunk('entityResendOTP', function (params, thu
|
|
|
116
159
|
});
|
|
117
160
|
}); });
|
|
118
161
|
export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
119
|
-
var _a, entity, settings, responseBody,
|
|
120
|
-
var _b, _c, _d, _e;
|
|
121
|
-
return __generator(this, function (
|
|
122
|
-
switch (
|
|
162
|
+
var _a, entity, settings, responseBody, payload, data, boardData, entityData, entityTypes, boardInfoData, board_id, entityId, info, hasEntityCompleted;
|
|
163
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
|
164
|
+
return __generator(this, function (_j) {
|
|
165
|
+
switch (_j.label) {
|
|
123
166
|
case 0:
|
|
124
167
|
_a = thunkApi.getState(), entity = _a.entity, settings = _a.settings;
|
|
125
168
|
responseBody = entity.data.verify.responseBody;
|
|
126
|
-
flows = (responseBody || {}).flows;
|
|
127
169
|
payload = {
|
|
128
170
|
data: params.otp,
|
|
129
171
|
service_name: (_b = responseBody === null || responseBody === void 0 ? void 0 : responseBody.verification_by) === null || _b === void 0 ? void 0 : _b.service_name,
|
|
@@ -133,18 +175,53 @@ export var verifyEntityLeadOTP = createAsyncThunk('verifyEntityLeadOTP', functio
|
|
|
133
175
|
};
|
|
134
176
|
return [4, API.leadService.verifyLeadOTP(payload)];
|
|
135
177
|
case 1:
|
|
136
|
-
data = (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
178
|
+
data = (_j.sent()).data;
|
|
179
|
+
boardInfoData = undefined;
|
|
180
|
+
if (!!data.errors) return [3, 9];
|
|
181
|
+
board_id = responseBody === null || responseBody === void 0 ? void 0 : responseBody.id;
|
|
182
|
+
if (!board_id) return [3, 4];
|
|
183
|
+
return [4, API.boardService.retrieveBoardInfoStatus(board_id)];
|
|
184
|
+
case 2:
|
|
185
|
+
boardInfoData = _j.sent();
|
|
186
|
+
return [4, API.boardService.retrieveBoardDetails(board_id)];
|
|
187
|
+
case 3:
|
|
188
|
+
boardData = _j.sent();
|
|
189
|
+
_j.label = 4;
|
|
190
|
+
case 4:
|
|
191
|
+
entityId = (_c = boardData === null || boardData === void 0 ? void 0 : boardData.entity) === null || _c === void 0 ? void 0 : _c.id;
|
|
192
|
+
if (!entityId) return [3, 6];
|
|
193
|
+
return [4, API.entityService.retrieveEntity(entityId)];
|
|
194
|
+
case 5:
|
|
195
|
+
entityData = _j.sent();
|
|
196
|
+
_j.label = 6;
|
|
197
|
+
case 6:
|
|
198
|
+
(_e = (_d = settings.data.appConfig).onStepCompleted) === null || _e === void 0 ? void 0 : _e.call(_d, settings.data.activeScreen.name, { otp: params.otp });
|
|
199
|
+
info = (boardInfoData || {}).info;
|
|
200
|
+
hasEntityCompleted = ((_f = info === null || info === void 0 ? void 0 : info.find(function (flow) { return flow.name === 'entity'; })) === null || _f === void 0 ? void 0 : _f.status) === 'completed';
|
|
201
|
+
if (!hasEntityCompleted) return [3, 7];
|
|
202
|
+
thunkApi.dispatch(handleNextScreenStep('ENTITY_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
203
|
+
return [3, 9];
|
|
204
|
+
case 7: return [4, API.entityService.retrieveEntityType()];
|
|
205
|
+
case 8:
|
|
206
|
+
entityTypes = _j.sent();
|
|
207
|
+
thunkApi.dispatch(handleNextScreenStep('ENTITY_NAME_STEP'));
|
|
208
|
+
_j.label = 9;
|
|
209
|
+
case 9: return [2, {
|
|
210
|
+
data: data,
|
|
211
|
+
boardResponse: {
|
|
212
|
+
user: boardData === null || boardData === void 0 ? void 0 : boardData.user,
|
|
213
|
+
brand: boardData === null || boardData === void 0 ? void 0 : boardData.brand,
|
|
214
|
+
bank_account: boardData === null || boardData === void 0 ? void 0 : boardData.bank_account,
|
|
215
|
+
entity: entityData === null || entityData === void 0 ? void 0 : entityData.entity,
|
|
216
|
+
merchant: boardData === null || boardData === void 0 ? void 0 : boardData.merchant,
|
|
217
|
+
name: (_g = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _g === void 0 ? void 0 : _g.names,
|
|
218
|
+
contact: (_h = boardData === null || boardData === void 0 ? void 0 : boardData.user) === null || _h === void 0 ? void 0 : _h.contact,
|
|
219
|
+
individuals: boardData === null || boardData === void 0 ? void 0 : boardData.individuals,
|
|
220
|
+
flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [],
|
|
221
|
+
entityTypes: entityTypes
|
|
222
|
+
},
|
|
223
|
+
formData: params
|
|
224
|
+
}];
|
|
148
225
|
}
|
|
149
226
|
});
|
|
150
227
|
}); });
|
|
@@ -157,42 +234,158 @@ export var retrieveBoardDetails = createAsyncThunk('entityRetrieveEntityInfo', f
|
|
|
157
234
|
case 1:
|
|
158
235
|
data = _c.sent();
|
|
159
236
|
return [2, {
|
|
160
|
-
data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.
|
|
237
|
+
data: __assign(__assign({}, data), { user: data === null || data === void 0 ? void 0 : data.user, brand: data === null || data === void 0 ? void 0 : data.brand, bank_account: data === null || data === void 0 ? void 0 : data.bank_account, entity: data === null || data === void 0 ? void 0 : data.entity, merchant: data === null || data === void 0 ? void 0 : data.merchant, name: (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.names, contact: (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.contact, individuals: data === null || data === void 0 ? void 0 : data.individuals })
|
|
161
238
|
}];
|
|
162
239
|
}
|
|
163
240
|
});
|
|
164
241
|
}); });
|
|
165
|
-
export var
|
|
166
|
-
var _a, settings, entity,
|
|
167
|
-
var
|
|
168
|
-
return __generator(this, function (
|
|
169
|
-
switch (
|
|
242
|
+
export var updateEntityName = createAsyncThunk('entityUpdateEntityName', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
243
|
+
var _a, settings, entity, entityData, _b, id, data_status, articleId, issuingDate, expiryDate, isFL, isLegalNameEditable, isLicenseTypeEditable, isEntityTypeEditable, isLicenseNumberEditable, isUnifiedNumberEditable, isIssuingDateEditable, isExpiryDateEditable, payload, data, documentBody, _c, list;
|
|
244
|
+
var _d, _e, _f, _g, _h, _j, _k;
|
|
245
|
+
return __generator(this, function (_l) {
|
|
246
|
+
switch (_l.label) {
|
|
170
247
|
case 0:
|
|
171
248
|
_a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
249
|
+
entityData = (entity.data.verify.responseBody || {}).entity;
|
|
250
|
+
_b = entityData || {}, id = _b.id, data_status = _b.data_status;
|
|
251
|
+
articleId = entity.data.entityNameData.articleId;
|
|
252
|
+
issuingDate = new Date(params.issuingDate).getTime();
|
|
253
|
+
expiryDate = new Date(params.expiryDate).getTime();
|
|
254
|
+
isFL = params.licenseType === BusinessType.FL;
|
|
255
|
+
isLegalNameEditable = (data_status === null || data_status === void 0 ? void 0 : data_status.legal_name) === FieldType.EDITABLE;
|
|
256
|
+
isLicenseTypeEditable = ((_d = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _d === void 0 ? void 0 : _d.type) === FieldType.EDITABLE;
|
|
257
|
+
isEntityTypeEditable = (data_status === null || data_status === void 0 ? void 0 : data_status.type) === FieldType.EDITABLE;
|
|
258
|
+
isLicenseNumberEditable = ((_e = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _e === void 0 ? void 0 : _e.number) === FieldType.EDITABLE;
|
|
259
|
+
isUnifiedNumberEditable = ((_f = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _f === void 0 ? void 0 : _f.additional_info) === FieldType.EDITABLE;
|
|
260
|
+
isIssuingDateEditable = ((_g = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _g === void 0 ? void 0 : _g.issuing_date) === FieldType.EDITABLE;
|
|
261
|
+
isExpiryDateEditable = ((_h = data_status === null || data_status === void 0 ? void 0 : data_status.license) === null || _h === void 0 ? void 0 : _h.expiry_date) === FieldType.EDITABLE;
|
|
262
|
+
payload = {
|
|
263
|
+
id: id,
|
|
264
|
+
AOA_file_id: articleId,
|
|
265
|
+
license: {
|
|
266
|
+
number: isLicenseNumberEditable && params.licenseNumber ? params.licenseNumber : undefined,
|
|
267
|
+
type: isLicenseTypeEditable ? (isFL ? 'freelance' : 'commercial_registration') : undefined,
|
|
268
|
+
issuing_date: isIssuingDateEditable ? issuingDate === null || issuingDate === void 0 ? void 0 : issuingDate.toString() : undefined,
|
|
269
|
+
expiry_date: isExpiryDateEditable ? expiryDate === null || expiryDate === void 0 ? void 0 : expiryDate.toString() : undefined,
|
|
270
|
+
additional_info: isUnifiedNumberEditable && params.unifiedNumber
|
|
271
|
+
? {
|
|
272
|
+
unified_number: params.unifiedNumber
|
|
273
|
+
}
|
|
274
|
+
: undefined
|
|
275
|
+
},
|
|
276
|
+
type: isEntityTypeEditable && params.entityType ? params.entityType : undefined,
|
|
277
|
+
legal_name: isLegalNameEditable && params.legalName
|
|
278
|
+
? {
|
|
279
|
+
ar: params.legalName,
|
|
280
|
+
en: params.legalName
|
|
281
|
+
}
|
|
282
|
+
: undefined,
|
|
283
|
+
encryption_contract: [
|
|
284
|
+
'license.number',
|
|
285
|
+
'legal_name.ar',
|
|
286
|
+
'legal_name.en',
|
|
287
|
+
'license.type',
|
|
288
|
+
'license.issuing_date',
|
|
289
|
+
'license.expiry_date',
|
|
290
|
+
'license.additional_info.unified_number',
|
|
291
|
+
'type'
|
|
292
|
+
]
|
|
182
293
|
};
|
|
183
|
-
return [4, API.entityService.
|
|
294
|
+
return [4, API.entityService.updateEntity(payload)];
|
|
184
295
|
case 1:
|
|
185
|
-
data =
|
|
186
|
-
if (!
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
296
|
+
data = _l.sent();
|
|
297
|
+
if (!((params.certificateId || []).length > 0)) return [3, 3];
|
|
298
|
+
documentBody = {
|
|
299
|
+
entity_id: id || '',
|
|
300
|
+
documents: [
|
|
301
|
+
{
|
|
302
|
+
images: params.certificateId
|
|
303
|
+
}
|
|
304
|
+
]
|
|
305
|
+
};
|
|
306
|
+
_c = data;
|
|
307
|
+
return [4, API.entityService.updateDocumentInfo(documentBody)];
|
|
308
|
+
case 2:
|
|
309
|
+
_c.documentData = _l.sent();
|
|
310
|
+
_l.label = 3;
|
|
311
|
+
case 3: return [4, API.dataService.getActivities()];
|
|
312
|
+
case 4:
|
|
313
|
+
list = (_l.sent()).list;
|
|
314
|
+
data.activityList = list;
|
|
315
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
316
|
+
(_k = (_j = settings.data.appConfig).onStepCompleted) === null || _k === void 0 ? void 0 : _k.call(_j, settings.data.activeScreen.name, id);
|
|
317
|
+
return [2, { data: data, formData: params }];
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
}); });
|
|
321
|
+
export var uploadArticle = createAsyncThunk('entityUploadArticle', function (_a) {
|
|
322
|
+
var file = _a.file, onProgress = _a.onProgress;
|
|
323
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
324
|
+
var typeArray, type, uploadPayload, onUploadProgress, data;
|
|
325
|
+
var _b;
|
|
326
|
+
return __generator(this, function (_c) {
|
|
327
|
+
switch (_c.label) {
|
|
328
|
+
case 0:
|
|
329
|
+
typeArray = ((_b = file === null || file === void 0 ? void 0 : file.type) === null || _b === void 0 ? void 0 : _b.split('/')) || [];
|
|
330
|
+
type = typeArray[1] || '';
|
|
331
|
+
uploadPayload = {
|
|
332
|
+
file_link_create: true,
|
|
333
|
+
title: file === null || file === void 0 ? void 0 : file.name,
|
|
334
|
+
purpose: DocumentPurpose.ARTICLE_ASSOCIATION,
|
|
335
|
+
type: type,
|
|
336
|
+
file: file
|
|
337
|
+
};
|
|
338
|
+
onUploadProgress = function (progressEvent) {
|
|
339
|
+
var progress = ((progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.loaded) / (progressEvent === null || progressEvent === void 0 ? void 0 : progressEvent.total)) * 100;
|
|
340
|
+
onProgress === null || onProgress === void 0 ? void 0 : onProgress(Math.floor(progress));
|
|
341
|
+
};
|
|
342
|
+
return [4, API.fileService.uploadFileInfo(uploadPayload, { onUploadProgress: onUploadProgress })];
|
|
343
|
+
case 1:
|
|
344
|
+
data = _c.sent();
|
|
345
|
+
return [2, { data: data }];
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
});
|
|
349
|
+
});
|
|
350
|
+
export var updateEntityCapital = createAsyncThunk('entityUpdateEntityCapital', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
351
|
+
var _a, settings, entity, entityData, _b, id, data_status, isCapitalPaidEditable, isCapitalShareEditable, activities, payload, data;
|
|
352
|
+
var _c, _d, _e, _f, _g;
|
|
353
|
+
return __generator(this, function (_h) {
|
|
354
|
+
switch (_h.label) {
|
|
355
|
+
case 0:
|
|
356
|
+
_a = thunkApi.getState(), settings = _a.settings, entity = _a.entity;
|
|
357
|
+
entityData = (entity.data.verify.responseBody || {}).entity;
|
|
358
|
+
_b = entityData || {}, id = _b.id, data_status = _b.data_status;
|
|
359
|
+
isCapitalPaidEditable = ((_c = data_status === null || data_status === void 0 ? void 0 : data_status.capital) === null || _c === void 0 ? void 0 : _c.paid) === FieldType.EDITABLE;
|
|
360
|
+
isCapitalShareEditable = ((_d = data_status === null || data_status === void 0 ? void 0 : data_status.capital) === null || _d === void 0 ? void 0 : _d.shares) === FieldType.EDITABLE;
|
|
361
|
+
activities = (_e = (params.activities || [])) === null || _e === void 0 ? void 0 : _e.map(function (_a) {
|
|
362
|
+
var id = _a.id;
|
|
363
|
+
return ({ id: id, action: 'add' });
|
|
364
|
+
});
|
|
365
|
+
payload = {
|
|
366
|
+
id: id,
|
|
367
|
+
activities: (activities === null || activities === void 0 ? void 0 : activities.length) > 0 ? activities : undefined,
|
|
368
|
+
capital: {
|
|
369
|
+
paid: isCapitalPaidEditable ? params.capitalPaid : undefined,
|
|
370
|
+
shares: isCapitalShareEditable
|
|
371
|
+
? {
|
|
372
|
+
count: params.capitalShareCount,
|
|
373
|
+
value: params.capitalShareValue
|
|
374
|
+
}
|
|
375
|
+
: undefined
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
return [4, API.entityService.updateEntity(payload)];
|
|
379
|
+
case 1:
|
|
380
|
+
data = _h.sent();
|
|
381
|
+
thunkApi.dispatch(handleNextScreenStep());
|
|
382
|
+
(_g = (_f = settings.data.appConfig).onStepCompleted) === null || _g === void 0 ? void 0 : _g.call(_f, settings.data.activeScreen.name, id);
|
|
190
383
|
return [2, { data: data, formData: params }];
|
|
191
384
|
}
|
|
192
385
|
});
|
|
193
386
|
}); });
|
|
194
387
|
export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
195
|
-
var _a, settings, entity, _b, id, infoId, payload, data;
|
|
388
|
+
var _a, settings, entity, _b, id, infoId, payload, data, boardInfoData;
|
|
196
389
|
var _c, _d, _e, _f;
|
|
197
390
|
return __generator(this, function (_g) {
|
|
198
391
|
switch (_g.label) {
|
|
@@ -209,24 +402,16 @@ export var updateBoardSuccess = createAsyncThunk('updateBoardEntitySuccess', fun
|
|
|
209
402
|
return [4, API.boardService.updateBoardInfo(__assign({ id: id, infoId: infoId }, payload))];
|
|
210
403
|
case 1:
|
|
211
404
|
data = _g.sent();
|
|
212
|
-
return [4,
|
|
405
|
+
return [4, API.boardService.retrieveBoardInfoStatus(id)];
|
|
213
406
|
case 2:
|
|
407
|
+
boardInfoData = _g.sent();
|
|
408
|
+
return [4, thunkApi.dispatch(retrieveBoardDetails(id))];
|
|
409
|
+
case 3:
|
|
214
410
|
_g.sent();
|
|
215
|
-
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name,
|
|
411
|
+
(_d = (_c = settings.data.appConfig).onStepCompleted) === null || _d === void 0 ? void 0 : _d.call(_c, settings.data.activeScreen.name, {});
|
|
216
412
|
(_f = (_e = settings.data.appConfig).onFlowCompleted) === null || _f === void 0 ? void 0 : _f.call(_e, { data: data });
|
|
217
413
|
thunkApi.dispatch(handleNextScreenStep());
|
|
218
|
-
return [2, { response: __assign(__assign({}, data), { flows:
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
}); });
|
|
222
|
-
export var retrieveChannels = createAsyncThunk('retrieveChannelsEntity', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
223
|
-
var data;
|
|
224
|
-
return __generator(this, function (_a) {
|
|
225
|
-
switch (_a.label) {
|
|
226
|
-
case 0: return [4, API.dataService.getChannelsOfServices()];
|
|
227
|
-
case 1:
|
|
228
|
-
data = (_a.sent()).data;
|
|
229
|
-
return [2, data];
|
|
414
|
+
return [2, { response: __assign(__assign({}, data), { flows: (boardInfoData === null || boardInfoData === void 0 ? void 0 : boardInfoData.info) || [] }), formData: params }];
|
|
230
415
|
}
|
|
231
416
|
});
|
|
232
417
|
}); });
|
|
@@ -234,6 +419,9 @@ var initialState = {
|
|
|
234
419
|
error: null,
|
|
235
420
|
loading: false,
|
|
236
421
|
customLoading: false,
|
|
422
|
+
uploading: false,
|
|
423
|
+
uploadingArticle: false,
|
|
424
|
+
uploadingArticleError: null,
|
|
237
425
|
data: {
|
|
238
426
|
flowName: FlowsTypes.ENTITY,
|
|
239
427
|
verify: {
|
|
@@ -242,10 +430,20 @@ var initialState = {
|
|
|
242
430
|
otpData: {
|
|
243
431
|
otp: ''
|
|
244
432
|
},
|
|
245
|
-
|
|
433
|
+
entityNameData: {
|
|
434
|
+
legalName: '',
|
|
435
|
+
licenseNumber: '',
|
|
436
|
+
licenseType: '',
|
|
437
|
+
entityType: '',
|
|
438
|
+
issuingDate: '',
|
|
439
|
+
expiryDate: '',
|
|
440
|
+
unifiedNumber: ''
|
|
441
|
+
},
|
|
442
|
+
entityCapitalData: {
|
|
246
443
|
activities: [],
|
|
247
|
-
|
|
248
|
-
|
|
444
|
+
capitalPaid: '',
|
|
445
|
+
capitalShareCount: '',
|
|
446
|
+
capitalShareValue: ''
|
|
249
447
|
}
|
|
250
448
|
}
|
|
251
449
|
};
|
|
@@ -261,6 +459,12 @@ export var entitySlice = createSlice({
|
|
|
261
459
|
},
|
|
262
460
|
resetOTPScreen: function (state) {
|
|
263
461
|
state.data.otpData.otp = '';
|
|
462
|
+
},
|
|
463
|
+
uploadingStatus: function (state, action) {
|
|
464
|
+
state.uploading = action.payload;
|
|
465
|
+
},
|
|
466
|
+
clearArticleId: function (state) {
|
|
467
|
+
state.data.entityNameData.articleId = '';
|
|
264
468
|
}
|
|
265
469
|
},
|
|
266
470
|
extraReducers: function (builder) {
|
|
@@ -270,51 +474,60 @@ export var entitySlice = createSlice({
|
|
|
270
474
|
state.customLoading = true;
|
|
271
475
|
})
|
|
272
476
|
.addCase(verifyLeadToken.fulfilled, function (state, action) {
|
|
273
|
-
var _a, _b, _c;
|
|
477
|
+
var _a, _b, _c, _d;
|
|
274
478
|
state.error = null;
|
|
275
479
|
state.customLoading = false;
|
|
276
|
-
var
|
|
480
|
+
var _e = action.payload, data = _e.data, token = _e.token, boardResponse = _e.boardResponse;
|
|
277
481
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
278
482
|
if (description) {
|
|
279
483
|
state.error = description;
|
|
280
484
|
return;
|
|
281
485
|
}
|
|
282
|
-
|
|
283
|
-
var issuingDate = brand === null || brand === void 0 ? void 0 : brand.business_operation_start_at;
|
|
284
|
-
if (!!issuingDate) {
|
|
285
|
-
var formattedDate = moment(issuingDate).format('YYYY-MM-DD');
|
|
286
|
-
state.data.entityData.operationStartDate = convertNumbers2English(formattedDate);
|
|
287
|
-
}
|
|
288
|
-
var channels = (_b = state.data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.channelList;
|
|
289
|
-
var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
|
|
290
|
-
var _f = brand || {}, website = _f.website, social = _f.social;
|
|
291
|
-
var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
|
|
292
|
-
var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
|
|
293
|
-
var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
|
|
294
|
-
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'website'; });
|
|
295
|
-
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'social'; });
|
|
296
|
-
if (isHasWebsite && (isHasTwitter || isHasInstagram))
|
|
297
|
-
selectedChannels = [websiteData, socialData];
|
|
298
|
-
else if (isHasTwitter || isHasInstagram)
|
|
299
|
-
selectedChannels = [socialData];
|
|
300
|
-
else if (isHasWebsite)
|
|
301
|
-
selectedChannels = [websiteData];
|
|
302
|
-
if (((_c = brand === null || brand === void 0 ? void 0 : brand.channel_services) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
303
|
-
selectedChannels = channels === null || channels === void 0 ? void 0 : channels.filter(function (channel) {
|
|
304
|
-
var _a;
|
|
305
|
-
return (_a = brand === null || brand === void 0 ? void 0 : brand.channel_services) === null || _a === void 0 ? void 0 : _a.find(function (storedChannel) { return channel.name_en.toLowerCase() === storedChannel.toLowerCase(); });
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
state.data.entityData.salesChannels = selectedChannels;
|
|
309
|
-
var activities = (entity === null || entity === void 0 ? void 0 : entity.activities) || [];
|
|
310
|
-
var selectedActivity = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
|
|
311
|
-
var _a;
|
|
312
|
-
return (_a = brand === null || brand === void 0 ? void 0 : brand.activities) === null || _a === void 0 ? void 0 : _a.find(function (value) { var _a; return ((_a = activity.en) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === value.toLowerCase(); });
|
|
313
|
-
});
|
|
314
|
-
state.data.entityData.activities = (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [activities === null || activities === void 0 ? void 0 : activities[0]];
|
|
315
|
-
state.data.entityData.responseBody = __assign(__assign({}, state.data.entityData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id, activities: activities, selectedActivities: (selectedActivity === null || selectedActivity === void 0 ? void 0 : selectedActivity.length) > 0 ? selectedActivity : [activities === null || activities === void 0 ? void 0 : activities[0]] });
|
|
316
|
-
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), boardResponse), state.data.verify.responseBody), { board_id: data.id });
|
|
486
|
+
state.data.verify.responseBody = __assign(__assign(__assign(__assign({}, data), state.data.verify.responseBody), boardResponse), { board_id: data.id });
|
|
317
487
|
state.data.verify.token = token;
|
|
488
|
+
var _f = boardResponse || {}, entity = _f.entity, entityTypes = _f.entityTypes;
|
|
489
|
+
if (entity) {
|
|
490
|
+
var _g = entity || {}, license = _g.license, type = _g.type, capital = _g.capital, activities = _g.activities, legal_name = _g.legal_name;
|
|
491
|
+
var legalName = legal_name;
|
|
492
|
+
var licenseNumber = license === null || license === void 0 ? void 0 : license.number;
|
|
493
|
+
var unifiedNumber = (_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number;
|
|
494
|
+
var licenseType = (license === null || license === void 0 ? void 0 : license.type) === 'freelance' ? BusinessType.FL : BusinessType.CR;
|
|
495
|
+
var entityType = type || (entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes[0]);
|
|
496
|
+
var _h = capital || {}, paid = _h.paid, shares = _h.shares;
|
|
497
|
+
var entityIssueDate = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.issuing_date;
|
|
498
|
+
var entityExpiredDate = (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.expiry_date;
|
|
499
|
+
var issuingDate = void 0, expiryDate = undefined;
|
|
500
|
+
if (entityIssueDate) {
|
|
501
|
+
var date = new Date(entityIssueDate);
|
|
502
|
+
var formattedDate = moment(date).format('YYYY-MM-DD');
|
|
503
|
+
issuingDate = convertNumbers2English(formattedDate);
|
|
504
|
+
}
|
|
505
|
+
if (entityExpiredDate) {
|
|
506
|
+
var date = new Date(entityExpiredDate);
|
|
507
|
+
var formattedDate = moment(date).format('YYYY-MM-DD');
|
|
508
|
+
expiryDate = convertNumbers2English(formattedDate);
|
|
509
|
+
}
|
|
510
|
+
if ((legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar))
|
|
511
|
+
state.data.entityNameData.legalName = (legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar);
|
|
512
|
+
if (licenseNumber)
|
|
513
|
+
state.data.entityNameData.licenseNumber = licenseNumber;
|
|
514
|
+
if (unifiedNumber)
|
|
515
|
+
state.data.entityNameData.unifiedNumber = unifiedNumber;
|
|
516
|
+
state.data.entityNameData.licenseType = licenseType;
|
|
517
|
+
if (entityType)
|
|
518
|
+
state.data.entityNameData.entityType = entityType;
|
|
519
|
+
state.data.entityNameData.issuingDate = issuingDate || moment(new Date()).format('YYYY-MM-DD');
|
|
520
|
+
state.data.entityNameData.expiryDate = expiryDate || moment(new Date()).format('YYYY-MM-DD');
|
|
521
|
+
if (activities)
|
|
522
|
+
state.data.entityCapitalData.activities = activities;
|
|
523
|
+
if (paid)
|
|
524
|
+
state.data.entityCapitalData.capitalPaid = paid;
|
|
525
|
+
if (shares === null || shares === void 0 ? void 0 : shares.count)
|
|
526
|
+
state.data.entityCapitalData.capitalShareCount = shares === null || shares === void 0 ? void 0 : shares.count;
|
|
527
|
+
if (shares === null || shares === void 0 ? void 0 : shares.value)
|
|
528
|
+
state.data.entityCapitalData.capitalShareValue = shares === null || shares === void 0 ? void 0 : shares.value;
|
|
529
|
+
state.data.entityNameData.responseBody = __assign(__assign({}, state.data.entityNameData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id });
|
|
530
|
+
}
|
|
318
531
|
})
|
|
319
532
|
.addCase(verifyLeadToken.rejected, function (state, action) {
|
|
320
533
|
state.error = action.error.message;
|
|
@@ -342,10 +555,10 @@ export var entitySlice = createSlice({
|
|
|
342
555
|
state.error = null;
|
|
343
556
|
})
|
|
344
557
|
.addCase(verifyEntityLeadOTP.fulfilled, function (state, action) {
|
|
345
|
-
var _a;
|
|
558
|
+
var _a, _b, _c, _d;
|
|
346
559
|
state.loading = false;
|
|
347
560
|
state.error = null;
|
|
348
|
-
var
|
|
561
|
+
var _e = action.payload, data = _e.data, boardResponse = _e.boardResponse, formData = _e.formData;
|
|
349
562
|
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
350
563
|
if (description) {
|
|
351
564
|
state.error = description;
|
|
@@ -353,29 +566,98 @@ export var entitySlice = createSlice({
|
|
|
353
566
|
}
|
|
354
567
|
state.data.otpData = formData;
|
|
355
568
|
state.data.otpData.responseBody = data;
|
|
569
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), boardResponse);
|
|
570
|
+
var _f = boardResponse || {}, entity = _f.entity, entityTypes = _f.entityTypes;
|
|
571
|
+
var _g = entity || {}, license = _g.license, type = _g.type, capital = _g.capital, activities = _g.activities, legal_name = _g.legal_name;
|
|
572
|
+
var legalName = legal_name;
|
|
573
|
+
var licenseNumber = license === null || license === void 0 ? void 0 : license.number;
|
|
574
|
+
var unifiedNumber = (_b = license === null || license === void 0 ? void 0 : license.additional_info) === null || _b === void 0 ? void 0 : _b.unified_number;
|
|
575
|
+
var licenseType = (license === null || license === void 0 ? void 0 : license.type) === 'freelance' ? BusinessType.FL : BusinessType.CR;
|
|
576
|
+
var entityType = type || (entityTypes === null || entityTypes === void 0 ? void 0 : entityTypes[0]);
|
|
577
|
+
var _h = capital || {}, paid = _h.paid, shares = _h.shares;
|
|
578
|
+
var entityIssueDate = (_c = entity === null || entity === void 0 ? void 0 : entity.license) === null || _c === void 0 ? void 0 : _c.issuing_date;
|
|
579
|
+
var entityExpiredDate = (_d = entity === null || entity === void 0 ? void 0 : entity.license) === null || _d === void 0 ? void 0 : _d.expiry_date;
|
|
580
|
+
var issuingDate, expiryDate = undefined;
|
|
581
|
+
if (entityIssueDate) {
|
|
582
|
+
var date = new Date(entityIssueDate);
|
|
583
|
+
var formattedDate = moment(date).format('YYYY-MM-DD');
|
|
584
|
+
issuingDate = convertNumbers2English(formattedDate);
|
|
585
|
+
}
|
|
586
|
+
if (entityExpiredDate) {
|
|
587
|
+
var date = new Date(entityExpiredDate);
|
|
588
|
+
var formattedDate = moment(date).format('YYYY-MM-DD');
|
|
589
|
+
expiryDate = convertNumbers2English(formattedDate);
|
|
590
|
+
}
|
|
591
|
+
if ((legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar))
|
|
592
|
+
state.data.entityNameData.legalName = (legalName === null || legalName === void 0 ? void 0 : legalName.en) || (legalName === null || legalName === void 0 ? void 0 : legalName.ar);
|
|
593
|
+
if (licenseNumber)
|
|
594
|
+
state.data.entityNameData.licenseNumber = licenseNumber;
|
|
595
|
+
if (unifiedNumber)
|
|
596
|
+
state.data.entityNameData.unifiedNumber = unifiedNumber;
|
|
597
|
+
state.data.entityNameData.licenseType = licenseType;
|
|
598
|
+
if (entityType)
|
|
599
|
+
state.data.entityNameData.entityType = entityType;
|
|
600
|
+
state.data.entityNameData.issuingDate = issuingDate || moment(new Date()).format('YYYY-MM-DD');
|
|
601
|
+
state.data.entityNameData.expiryDate = expiryDate || moment(new Date()).format('YYYY-MM-DD');
|
|
602
|
+
if (activities)
|
|
603
|
+
state.data.entityCapitalData.activities = activities;
|
|
604
|
+
if (paid)
|
|
605
|
+
state.data.entityCapitalData.capitalPaid = paid;
|
|
606
|
+
if (shares === null || shares === void 0 ? void 0 : shares.count)
|
|
607
|
+
state.data.entityCapitalData.capitalShareCount = shares === null || shares === void 0 ? void 0 : shares.count;
|
|
608
|
+
if (shares === null || shares === void 0 ? void 0 : shares.value)
|
|
609
|
+
state.data.entityCapitalData.capitalShareValue = shares === null || shares === void 0 ? void 0 : shares.value;
|
|
610
|
+
state.data.entityNameData = __assign(__assign({}, state.data.entityNameData), { responseBody: __assign(__assign({}, state.data.entityNameData.responseBody), { entity_id: entity === null || entity === void 0 ? void 0 : entity.id }) });
|
|
356
611
|
})
|
|
357
612
|
.addCase(verifyEntityLeadOTP.rejected, function (state, action) {
|
|
358
613
|
state.loading = false;
|
|
359
614
|
state.error = action.error.message;
|
|
360
615
|
})
|
|
361
|
-
.addCase(
|
|
616
|
+
.addCase(updateEntityName.pending, function (state) {
|
|
362
617
|
state.loading = true;
|
|
363
618
|
state.error = null;
|
|
364
619
|
})
|
|
365
|
-
.addCase(
|
|
366
|
-
var _a;
|
|
620
|
+
.addCase(updateEntityName.fulfilled, function (state, action) {
|
|
367
621
|
state.loading = false;
|
|
368
622
|
state.error = null;
|
|
369
|
-
var
|
|
370
|
-
var
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
state.data.entityData.responseBody = data;
|
|
623
|
+
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
624
|
+
var _b = data || {}, activityList = _b.activityList, rest = __rest(_b, ["activityList"]);
|
|
625
|
+
state.data.entityNameData = formData;
|
|
626
|
+
state.data.entityNameData.responseBody = __assign(__assign({}, state.data.entityNameData.responseBody), { rest: rest });
|
|
627
|
+
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { activityList: activityList });
|
|
628
|
+
if (rest === null || rest === void 0 ? void 0 : rest.activities)
|
|
629
|
+
state.data.entityCapitalData = __assign(__assign({}, state.data.entityCapitalData), { activities: rest === null || rest === void 0 ? void 0 : rest.activities });
|
|
377
630
|
})
|
|
378
|
-
.addCase(
|
|
631
|
+
.addCase(updateEntityName.rejected, function (state, action) {
|
|
632
|
+
state.loading = false;
|
|
633
|
+
state.error = action.error.message;
|
|
634
|
+
})
|
|
635
|
+
.addCase(uploadArticle.pending, function (state) {
|
|
636
|
+
state.uploadingArticleError = null;
|
|
637
|
+
state.uploadingArticle = true;
|
|
638
|
+
})
|
|
639
|
+
.addCase(uploadArticle.fulfilled, function (state, action) {
|
|
640
|
+
state.uploadingArticleError = null;
|
|
641
|
+
state.uploadingArticle = false;
|
|
642
|
+
var data = action.payload.data;
|
|
643
|
+
state.data.entityNameData.articleId = data === null || data === void 0 ? void 0 : data.id;
|
|
644
|
+
})
|
|
645
|
+
.addCase(uploadArticle.rejected, function (state) {
|
|
646
|
+
state.uploadingArticle = false;
|
|
647
|
+
state.uploadingArticleError = 'file_upload_article_error';
|
|
648
|
+
})
|
|
649
|
+
.addCase(updateEntityCapital.pending, function (state) {
|
|
650
|
+
state.loading = true;
|
|
651
|
+
state.error = null;
|
|
652
|
+
})
|
|
653
|
+
.addCase(updateEntityCapital.fulfilled, function (state, action) {
|
|
654
|
+
state.loading = false;
|
|
655
|
+
state.error = null;
|
|
656
|
+
var _a = action.payload, data = _a.data, formData = _a.formData;
|
|
657
|
+
state.data.entityCapitalData = formData;
|
|
658
|
+
state.data.entityCapitalData.responseBody = __assign(__assign({}, state.data.entityCapitalData.responseBody), { data: data });
|
|
659
|
+
})
|
|
660
|
+
.addCase(updateEntityCapital.rejected, function (state, action) {
|
|
379
661
|
state.loading = false;
|
|
380
662
|
state.error = action.error.message;
|
|
381
663
|
})
|
|
@@ -413,45 +695,9 @@ export var entitySlice = createSlice({
|
|
|
413
695
|
.addCase(updateBoardSuccess.rejected, function (state, action) {
|
|
414
696
|
state.loading = false;
|
|
415
697
|
state.error = action.error.message;
|
|
416
|
-
})
|
|
417
|
-
.addCase(retrieveChannels.pending, function (state) {
|
|
418
|
-
state.error = null;
|
|
419
|
-
state.loading = true;
|
|
420
|
-
})
|
|
421
|
-
.addCase(retrieveChannels.fulfilled, function (state, action) {
|
|
422
|
-
var _a;
|
|
423
|
-
state.error = null;
|
|
424
|
-
state.loading = false;
|
|
425
|
-
var data = action.payload || {};
|
|
426
|
-
var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
|
|
427
|
-
if (description) {
|
|
428
|
-
state.error = description;
|
|
429
|
-
return;
|
|
430
|
-
}
|
|
431
|
-
var channels = data || [];
|
|
432
|
-
state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { channelList: channels });
|
|
433
|
-
var brand = (state.data.verify.responseBody || {}).brand;
|
|
434
|
-
var selectedChannels = (!!(channels === null || channels === void 0 ? void 0 : channels[0]) && [channels === null || channels === void 0 ? void 0 : channels[0]]) || [];
|
|
435
|
-
var _b = brand || {}, website = _b.website, social = _b.social;
|
|
436
|
-
var isHasWebsite = (website === null || website === void 0 ? void 0 : website.length) > 0;
|
|
437
|
-
var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
|
|
438
|
-
var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
|
|
439
|
-
var websiteData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'website'; });
|
|
440
|
-
var socialData = channels === null || channels === void 0 ? void 0 : channels.find(function (c) { return c.name_en.toLocaleLowerCase() === 'social'; });
|
|
441
|
-
if (isHasWebsite && (isHasTwitter || isHasInstagram))
|
|
442
|
-
selectedChannels = [websiteData, socialData];
|
|
443
|
-
else if (isHasTwitter || isHasInstagram)
|
|
444
|
-
selectedChannels = [socialData];
|
|
445
|
-
else if (isHasWebsite)
|
|
446
|
-
selectedChannels = [websiteData];
|
|
447
|
-
state.data.entityData.salesChannels = selectedChannels;
|
|
448
|
-
})
|
|
449
|
-
.addCase(retrieveChannels.rejected, function (state, action) {
|
|
450
|
-
state.error = action.error.message;
|
|
451
|
-
state.loading = false;
|
|
452
698
|
});
|
|
453
699
|
}
|
|
454
700
|
});
|
|
455
|
-
export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen;
|
|
701
|
+
export var clearError = (_a = entitySlice.actions, _a.clearError), stopLoader = _a.stopLoader, resetOTPScreen = _a.resetOTPScreen, uploadingStatus = _a.uploadingStatus, clearArticleId = _a.clearArticleId;
|
|
456
702
|
export default entitySlice.reducer;
|
|
457
703
|
export var entitySelector = function (state) { return state.entity; };
|