@tap-payments/auth-jsconnect 2.3.99-test → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/@types/app.d.ts +266 -15
- package/build/@types/app.js +7 -0
- package/build/@types/form.d.ts +31 -23
- package/build/@types/theme.d.ts +1 -1
- package/build/@types/user.d.ts +39 -3
- package/build/api/account.d.ts +2 -2
- package/build/api/auth.d.ts +12 -11
- package/build/api/auth.js +5 -1
- package/build/api/availabilityServices.d.ts +3 -3
- package/build/api/axios.js +1 -1
- package/build/api/board.d.ts +3 -3
- package/build/api/brand.d.ts +1 -1
- package/build/api/country.d.ts +2 -1
- package/build/api/country.js +8 -1
- package/build/api/data.d.ts +17 -10
- package/build/api/data.js +26 -2
- package/build/api/document.d.ts +2 -2
- package/build/api/entity.d.ts +13 -8
- package/build/api/entity.js +32 -1
- package/build/api/file.d.ts +1 -1
- package/build/api/index.d.ts +26 -5
- package/build/api/individual.d.ts +29 -11
- package/build/api/individual.js +9 -1
- package/build/api/init.d.ts +2 -1
- package/build/api/lead.d.ts +15 -10
- package/build/api/lead.js +58 -1
- package/build/api/operator.d.ts +10 -1
- package/build/api/operator.js +10 -2
- package/build/api/user.d.ts +2 -2
- package/build/app/rootReducer.d.ts +1 -0
- package/build/app/rootReducer.js +3 -1
- package/build/app/settings.d.ts +37 -3
- package/build/app/settings.js +116 -39
- package/build/app/store.d.ts +6 -4
- package/build/assets/locales/ar.json +24 -1
- package/build/assets/locales/en.json +24 -1
- package/build/components/AnimationFlow/AnimationFlow.d.ts +2 -1
- package/build/components/AnimationFlow/AnimationFlow.js +3 -3
- package/build/components/AnimationFlow/BottomSheet.js +26 -5
- package/build/components/AnimationFlow/Dialog.d.ts +2 -1
- package/build/components/AnimationFlow/Dialog.js +2 -2
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +5 -2
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +45 -23
- package/build/components/ArabicDatePicker/arabicAr.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicAr.js +32 -0
- package/build/components/ArabicDatePicker/arabicEn.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicEn.js +32 -0
- package/build/components/ArabicDatePicker/style.css +45 -5
- package/build/components/DatePicker/DatePicker.d.ts +3 -1
- package/build/components/DatePicker/DatePicker.js +23 -17
- package/build/components/ExpandIcon/ExpandIcon.d.ts +2 -0
- package/build/components/SimpleList/SimpleList.d.ts +2 -1
- package/build/components/SimpleList/SimpleList.js +12 -9
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/constants/api.d.ts +9 -0
- package/build/constants/api.js +18 -1
- package/build/constants/app.d.ts +9 -1
- package/build/constants/app.js +84 -16
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +4 -0
- package/build/constants/dummy.d.ts +62 -0
- package/build/constants/dummy.js +603 -0
- package/build/constants/validation.d.ts +2 -2
- package/build/constants/validation.js +3 -3
- package/build/features/app/bank/bankStore.d.ts +94 -10
- package/build/features/app/bank/bankStore.js +110 -54
- package/build/features/app/board/boardStore.d.ts +66 -0
- package/build/features/app/board/boardStore.js +223 -0
- package/build/features/app/brand/brandStore.d.ts +161 -18
- package/build/features/app/brand/brandStore.js +295 -145
- package/build/features/app/business/businessStore.d.ts +171 -18
- package/build/features/app/business/businessStore.js +297 -198
- package/build/features/app/connect/connectStore.d.ts +180 -14
- package/build/features/app/connect/connectStore.js +342 -95
- package/build/features/app/connectExpress/connectExpressStore.d.ts +273 -25
- package/build/features/app/connectExpress/connectExpressStore.js +453 -71
- package/build/features/app/entity/entityStore.d.ts +98 -10
- package/build/features/app/entity/entityStore.js +150 -75
- package/build/features/app/individual/individualStore.d.ts +200 -28
- package/build/features/app/individual/individualStore.js +346 -222
- package/build/features/app/password/passwordStore.d.ts +114 -12
- package/build/features/app/password/passwordStore.js +113 -43
- package/build/features/app/signIn/signInStore.d.ts +61 -7
- package/build/features/app/signIn/signInStore.js +1 -1
- package/build/features/app/tax/taxStore.d.ts +83 -9
- package/build/features/app/tax/taxStore.js +97 -48
- package/build/features/bank/Bank.d.ts +1 -0
- package/build/features/bank/Bank.js +11 -6
- package/build/features/bank/screens/BankDetails/BankDetails.js +19 -14
- package/build/features/bank/screens/BankDetails/BankName.d.ts +3 -2
- package/build/features/bank/screens/BankDetails/BankName.js +4 -5
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +3 -2
- package/build/features/bank/screens/BankDetails/BankStatement.js +5 -4
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +2 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +8 -10
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +1 -1
- package/build/features/bank/screens/BankDetails/IBAN.d.ts +2 -1
- package/build/features/bank/screens/BankDetails/IBAN.js +4 -6
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/bank/screens/Verify/OTPInput.js +3 -1
- package/build/features/bank/screens/Verify/Verify.js +2 -2
- package/build/features/board/Board.d.ts +10 -0
- package/build/features/board/Board.js +74 -0
- package/build/features/board/index.d.ts +1 -0
- package/build/features/board/index.js +1 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +35 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/board/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/board/screens/Verify/OTPInput.js +51 -0
- package/build/features/board/screens/Verify/Verify.d.ts +5 -0
- package/build/features/board/screens/Verify/Verify.js +74 -0
- package/build/features/board/screens/Verify/index.d.ts +2 -0
- package/build/features/board/screens/Verify/index.js +2 -0
- package/build/features/board/screens/Verify/validation.d.ts +8 -0
- package/build/features/board/screens/Verify/validation.js +4 -0
- package/build/features/brand/Brand.d.ts +1 -0
- package/build/features/brand/Brand.js +11 -6
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +6 -20
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +26 -23
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +31 -8
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +7 -30
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +13 -25
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +2 -1
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +12 -13
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +2 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +22 -23
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +5 -5
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +3 -3
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +3 -4
- package/build/features/brand/screens/BrandActivities/TAC.js +3 -3
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +3 -3
- package/build/features/brand/screens/BrandActivities/validation.d.ts +36 -36
- package/build/features/brand/screens/BrandActivities/validation.js +5 -10
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +18 -31
- package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +3 -3
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +3 -14
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +2 -2
- package/build/features/brand/screens/BrandInfo/BrandName.js +4 -7
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +17 -6
- package/build/features/brand/screens/BrandInfo/validation.d.ts +21 -6
- package/build/features/brand/screens/BrandInfo/validation.js +9 -8
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.d.ts +5 -0
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +103 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.js +69 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.js +69 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.js +69 -0
- package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/TeamSize.d.ts +2 -1
- package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/TeamSize.js +18 -33
- package/build/features/brand/screens/BrandSegmentInfo/index.d.ts +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/index.js +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.d.ts +17 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.js +9 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/brand/screens/Verify/OTPInput.js +3 -1
- package/build/features/brand/screens/Verify/Verify.js +2 -2
- package/build/features/business/Business.js +4 -1
- package/build/features/business/screens/Activities/Activities.js +2 -1
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +13 -61
- package/build/features/business/screens/Activities/ActivitiesList.js +226 -103
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/Activities/validation.d.ts +165 -30
- package/build/features/business/screens/Activities/validation.js +5 -2
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +1 -1
- package/build/features/business/screens/BusinessType/Article.d.ts +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +14 -6
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +3 -6
- package/build/features/business/screens/BusinessType/EntityName.js +4 -5
- package/build/features/business/screens/BusinessType/LicenseList.js +6 -9
- package/build/features/business/screens/BusinessType/LicenseNumber.js +10 -9
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +3 -3
- package/build/features/business/screens/BusinessType/validation.d.ts +10 -0
- package/build/features/business/screens/BusinessType/validation.js +18 -2
- package/build/features/business/screens/CivilID/CivilID.js +2 -1
- package/build/features/business/screens/CivilID/IDNumber.js +2 -3
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +41 -29
- package/build/features/business/screens/Customers/CustomerLocations.js +35 -19
- package/build/features/business/screens/Customers/Customers.js +29 -17
- package/build/features/business/screens/Customers/ExpectedCustomers.js +8 -10
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +13 -15
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +4 -4
- package/build/features/business/screens/Customers/RefundPolicy.js +15 -4
- package/build/features/business/screens/Customers/TransactionPolicy.js +19 -9
- package/build/features/business/screens/IDBOD/DOB.js +2 -2
- package/build/features/business/screens/IDBOD/ID.js +7 -4
- package/build/features/business/screens/IDBOD/IDBOD.js +9 -17
- package/build/features/business/screens/IDBOD/validation.d.ts +10 -0
- package/build/features/business/screens/IDBOD/validation.js +4 -0
- package/build/features/business/screens/OTP/OTP.js +2 -2
- package/build/features/business/screens/OTP/OTPInput.js +5 -2
- package/build/features/business/screens/Verify/OTPInput.js +3 -1
- package/build/features/business/screens/Verify/Verify.js +2 -2
- package/build/features/connect/Connect.d.ts +2 -0
- package/build/features/connect/Connect.js +95 -13
- package/build/features/connect/screens/BrandSegment/BrandSegment.d.ts +5 -0
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +84 -0
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +8 -0
- package/build/features/{brand/screens/BrandInfo/Segments.js → connect/screens/BrandSegment/SegmentLocations.js} +19 -37
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +8 -0
- package/build/features/connect/screens/{Merchant/Segments.js → BrandSegment/SegmentProfits.js} +17 -30
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +8 -0
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +66 -0
- package/build/features/connect/screens/{Merchant → BrandSegment}/TeamSize.js +12 -25
- package/build/features/connect/screens/BrandSegment/index.d.ts +3 -0
- package/build/features/connect/screens/BrandSegment/index.js +2 -0
- package/build/features/connect/screens/BrandSegment/validation.d.ts +17 -0
- package/build/features/connect/screens/BrandSegment/validation.js +9 -0
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +103 -0
- package/build/features/connect/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connect/screens/BusinessCountry/index.js +2 -0
- package/build/features/connect/screens/CivilID/CivilID.js +12 -16
- package/build/features/connect/screens/CivilID/IDNumber.js +5 -6
- package/build/features/connect/screens/Individual/Email.js +9 -11
- package/build/features/connect/screens/Individual/Individual.js +9 -2
- package/build/features/connect/screens/Individual/MobileNumber.js +6 -9
- package/build/features/connect/screens/Individual/Name.js +11 -15
- package/build/features/connect/screens/Merchant/BrandList.js +4 -22
- package/build/features/connect/screens/Merchant/BrandName.js +3 -5
- package/build/features/connect/screens/Merchant/Merchant.js +13 -16
- package/build/features/connect/screens/Merchant/SalesChannels.js +6 -6
- package/build/features/connect/screens/Merchant/validation.d.ts +0 -6
- package/build/features/connect/screens/Merchant/validation.js +8 -12
- package/build/features/connect/screens/Mobile/Mobile.js +23 -22
- package/build/features/connect/screens/Mobile/MobileNumber.js +22 -15
- package/build/features/connect/screens/NID/DOB.js +3 -3
- package/build/features/connect/screens/NID/IDNumber.js +6 -7
- package/build/features/connect/screens/NID/NID.js +17 -4
- package/build/features/connect/screens/OTP/OTP.js +14 -16
- package/build/features/connect/screens/OTP/OTPInput.js +14 -2
- package/build/features/connect/screens/ThankYou/ThankYou.js +17 -2
- package/build/features/connectExpress/ConnectExpress.d.ts +1 -1
- package/build/features/connectExpress/ConnectExpress.js +87 -17
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +93 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.d.ts +10 -0
- package/build/features/connectExpress/screens/AuthenticationList/BrandList.js +81 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +11 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +96 -0
- package/build/features/connectExpress/screens/AuthenticationList/MerchantList.d.ts +10 -0
- package/build/features/connectExpress/screens/AuthenticationList/MerchantList.js +107 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/index.js +2 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +14 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +8 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +105 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.js +2 -0
- package/build/features/connectExpress/screens/CivilID/CivilID.js +11 -4
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +12 -8
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -1
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +6 -7
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +4 -6
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +13 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +10 -12
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +9 -8
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +3 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +13 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +71 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +6 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +3 -5
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +2 -3
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +4 -4
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +5 -3
- package/build/features/connectExpress/screens/Mobile/Mobile.js +9 -5
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +9 -6
- package/build/features/connectExpress/screens/Mobile/TAC.js +1 -1
- package/build/features/connectExpress/screens/NID/DOB.js +2 -2
- package/build/features/connectExpress/screens/NID/IDNumber.js +2 -3
- package/build/features/connectExpress/screens/NID/NID.js +7 -3
- package/build/features/connectExpress/screens/NID/TAC.d.ts +2 -2
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +2 -2
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +7 -4
- package/build/features/connectExpress/screens/NIDMissed/NID.js +7 -4
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +10 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.js +4 -0
- package/build/features/connectExpress/screens/OTP/OTP.js +3 -3
- package/build/features/connectExpress/screens/OTP/OTPInput.js +4 -2
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +15 -6
- package/build/features/entity/Entity.d.ts +1 -0
- package/build/features/entity/Entity.js +11 -6
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +3 -16
- package/build/features/entity/screens/EntityCapital/ActivityList.js +53 -35
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +8 -15
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +7 -12
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +2 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +9 -16
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +14 -6
- package/build/features/entity/screens/EntityCapital/validation.d.ts +90 -90
- package/build/features/entity/screens/EntityCapital/validation.js +2 -2
- package/build/features/entity/screens/EntityName/Article.d.ts +3 -2
- package/build/features/entity/screens/EntityName/Article.js +3 -2
- package/build/features/entity/screens/EntityName/EntityName.js +45 -16
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +8 -20
- package/build/features/entity/screens/EntityName/EntityTypeList.js +16 -24
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +3 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.js +4 -5
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +3 -2
- package/build/features/entity/screens/EntityName/IssuingDate.js +4 -5
- package/build/features/entity/screens/EntityName/LegalName.d.ts +2 -1
- package/build/features/entity/screens/EntityName/LegalName.js +3 -4
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +8 -2
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +2 -1
- package/build/features/entity/screens/EntityName/LicenseNumber.js +10 -10
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +2 -1
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +3 -4
- package/build/features/entity/screens/EntityName/validation.d.ts +28 -0
- package/build/features/entity/screens/EntityName/validation.js +40 -2
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/entity/screens/Verify/OTPInput.js +3 -1
- package/build/features/entity/screens/Verify/Verify.js +2 -2
- package/build/features/featuresScreens.d.ts +1 -0
- package/build/features/featuresScreens.js +42 -0
- package/build/features/individual/Individual.d.ts +1 -0
- package/build/features/individual/Individual.js +11 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +36 -25
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +10 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +13 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +19 -30
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +87 -48
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +12 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +6 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +9 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +17 -27
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +7 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +8 -7
- package/build/features/individual/screens/IndividualList/Email.js +1 -1
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +2 -2
- package/build/features/individual/screens/IndividualList/UserList.js +10 -6
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +6 -22
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +6 -22
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +3 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +3 -8
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +3 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +5 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +3 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +8 -6
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +56 -37
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +7 -24
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +5 -8
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +2 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +3 -10
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +7 -24
- package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +67 -63
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +2 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/individual/screens/Verify/OTPInput.js +3 -1
- package/build/features/individual/screens/Verify/Verify.js +2 -2
- package/build/features/password/Password.d.ts +1 -0
- package/build/features/password/Password.js +20 -5
- package/build/features/password/screens/CreatePassword/CreatePassword.js +3 -2
- package/build/features/password/screens/OTP/OTP.js +2 -2
- package/build/features/password/screens/OTP/OTPInput.js +5 -2
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/password/screens/Verify/OTPInput.js +3 -1
- package/build/features/password/screens/Verify/Verify.js +2 -2
- package/build/features/shared/Address/CountryList.d.ts +6 -6
- package/build/features/shared/Address/InputSelect.d.ts +6 -6
- package/build/features/shared/Address/InputSelect.js +1 -1
- package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +15 -0
- package/build/features/shared/BusinessCountry/BusinessCountry.js +179 -0
- package/build/features/shared/BusinessCountry/index.d.ts +2 -0
- package/build/features/shared/BusinessCountry/index.js +2 -0
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +9 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +4 -2
- package/build/features/shared/Button/FlowsButtons.js +17 -13
- package/build/features/shared/Button/IndividualActionButtons.d.ts +4 -2
- package/build/features/shared/Button/IndividualActionButtons.js +26 -2
- package/build/features/shared/Calender/Calender.d.ts +13 -0
- package/build/features/shared/Calender/Calender.js +56 -0
- package/build/features/shared/Calender/index.d.ts +2 -0
- package/build/features/shared/Calender/index.js +2 -0
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +7 -1
- package/build/features/shared/CheckIcon/CheckIcon.js +7 -6
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -1
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/Dot/Dot.d.ts +8 -0
- package/build/features/shared/Dot/Dot.js +29 -0
- package/build/features/shared/Dot/index.d.ts +2 -0
- package/build/features/shared/Dot/index.js +2 -0
- package/build/features/shared/EndAdornment/EndAdornment.d.ts +10 -0
- package/build/features/shared/EndAdornment/EndAdornment.js +17 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +7 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +13 -0
- package/build/features/shared/EndAdornment/index.d.ts +3 -0
- package/build/features/shared/EndAdornment/index.js +3 -0
- package/build/features/shared/Footer/Footer.js +10 -1
- package/build/features/shared/Footer/PoweredByFooter.d.ts +1 -1
- package/build/features/shared/Input/Input.d.ts +4 -5
- package/build/features/shared/Input/index.d.ts +2 -1
- package/build/features/shared/InputSelect/InputSelect.d.ts +4 -0
- package/build/features/shared/InputSelect/InputSelect.js +33 -0
- package/build/features/shared/InputSelect/index.d.ts +2 -0
- package/build/features/shared/InputSelect/index.js +2 -0
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +2 -1
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +4 -3
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +2 -1
- package/build/features/shared/SalesChannels/SalesChannel.js +6 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +3 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +20 -9
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/shared/UploadFile/FileUpload.d.ts +5 -4
- package/build/features/shared/UploadFile/FileUpload.js +4 -4
- package/build/features/shared/UploadFile/UploadFile.d.ts +2 -2
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +4 -3
- package/build/features/shared/UploadFile/UploadWrapper.js +3 -3
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +5 -4
- package/build/features/shared/UploadMultipleFile/UploadFile.js +4 -4
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +4 -3
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +2 -2
- package/build/features/signIn/screens/Email/Email.js +2 -1
- package/build/features/signIn/screens/Mobile/Mobile.js +2 -1
- package/build/features/signIn/screens/OTP/OTP.js +2 -2
- package/build/features/signIn/screens/OTP/OTPInput.js +4 -2
- package/build/features/signIn/screens/Password/Password.js +2 -1
- package/build/features/tax/Tax.d.ts +1 -0
- package/build/features/tax/Tax.js +11 -6
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +1 -1
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +10 -7
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +8 -2
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +3 -2
- package/build/features/tax/screens/TaxDetails/VATId.js +3 -5
- package/build/features/tax/screens/Verify/OTPInput.js +3 -1
- package/build/features/tax/screens/Verify/Verify.js +2 -2
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppConfig.d.ts +4 -2
- package/build/hooks/useAppConfig.js +18 -18
- package/build/hooks/useAppDispatch.d.ts +1 -0
- package/build/hooks/useCountry.d.ts +1 -0
- package/build/hooks/useCountry.js +4 -3
- package/build/hooks/useDataVerified.d.ts +6 -0
- package/build/hooks/useDataVerified.js +19 -0
- package/build/hooks/useErrorListener.d.ts +2 -1
- package/build/hooks/useErrorListener.js +16 -1
- package/build/hooks/useExcludeReadOnlyFelids.d.ts +1 -1
- package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +1 -1
- package/build/hooks/useFormReadOnly.d.ts +1 -1
- package/build/hooks/useVerifyToken.js +1 -1
- package/build/index.d.ts +3 -2
- package/build/index.js +4 -2
- package/build/utils/array.d.ts +13 -2
- package/build/utils/array.js +115 -2
- package/build/utils/common.d.ts +1 -0
- package/build/utils/common.js +10 -0
- package/build/utils/date.d.ts +1 -0
- package/build/utils/date.js +6 -0
- package/build/utils/gtm.d.ts +6 -0
- package/build/utils/gtm.js +29 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +14 -0
- package/build/utils/string.d.ts +1 -0
- package/build/utils/string.js +3 -0
- package/package.json +4 -2
- package/build/features/brand/screens/BrandInfo/Segments.d.ts +0 -9
- package/build/features/connect/screens/Merchant/Segments.d.ts +0 -8
- /package/build/features/connect/screens/{Merchant → BrandSegment}/TeamSize.d.ts +0 -0
|
@@ -6,6 +6,7 @@ interface IssuedCountryProps {
|
|
|
6
6
|
onListOpen?: () => void;
|
|
7
7
|
onListClose?: () => void;
|
|
8
8
|
readOnly?: boolean;
|
|
9
|
+
isVerified?: boolean;
|
|
9
10
|
}
|
|
10
11
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<IssuedCountryProps & React.RefAttributes<unknown>>>;
|
|
11
12
|
export default _default;
|
|
@@ -20,53 +20,36 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import {
|
|
23
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
import Box from '@mui/material/Box';
|
|
26
26
|
import { useTranslation } from 'react-i18next';
|
|
27
27
|
import { useController, useFormContext } from 'react-hook-form';
|
|
28
28
|
import { styled } from '@mui/material/styles';
|
|
29
|
-
import CheckIcon from '@mui/icons-material/Check';
|
|
30
29
|
import { useLanguage } from '../../../../hooks';
|
|
31
30
|
import Collapse from '../../../../components/Collapse';
|
|
32
|
-
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
33
31
|
import Text from '../../../../components/Text';
|
|
34
32
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
33
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
36
|
-
import
|
|
34
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
35
|
+
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
36
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
37
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
38
38
|
display: 'flex'
|
|
39
39
|
}); });
|
|
40
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
41
|
-
var readOnly = _a.readOnly;
|
|
42
|
-
return ({
|
|
43
|
-
'& .MuiInputBase-input': {
|
|
44
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
40
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
49
41
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
50
42
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
51
43
|
});
|
|
52
|
-
var CheckIconStyled = styled(CheckIcon)(function (_a) {
|
|
53
|
-
var theme = _a.theme;
|
|
54
|
-
return ({
|
|
55
|
-
color: theme.palette.success.main,
|
|
56
|
-
display: 'flex',
|
|
57
|
-
alignItems: 'flex-end'
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
44
|
var IssuedCountry = React.forwardRef(function (_a, ref) {
|
|
61
45
|
var _b, _c, _d;
|
|
62
|
-
var countries = _a.countries, readOnly = _a.readOnly, rest = __rest(_a, ["countries", "readOnly"]);
|
|
46
|
+
var countries = _a.countries, readOnly = _a.readOnly, isVerified = _a.isVerified, rest = __rest(_a, ["countries", "readOnly", "isVerified"]);
|
|
63
47
|
var _e = React.useState(countries), locationCountries = _e[0], setCountries = _e[1];
|
|
64
48
|
var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
|
|
65
49
|
var t = useTranslation().t;
|
|
66
50
|
var isAr = useLanguage().isAr;
|
|
67
51
|
var control = useFormContext().control;
|
|
68
52
|
var issuedCountryControl = useController({ control: control, name: 'issuedCountry' });
|
|
69
|
-
var disabled = false;
|
|
70
53
|
var onOpenCountrySelect = function (event) {
|
|
71
54
|
var _a;
|
|
72
55
|
if (readOnly)
|
|
@@ -86,8 +69,8 @@ var IssuedCountry = React.forwardRef(function (_a, ref) {
|
|
|
86
69
|
};
|
|
87
70
|
var location = issuedCountryControl.field.value;
|
|
88
71
|
var error = (_b = issuedCountryControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
89
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(
|
|
90
|
-
return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(
|
|
72
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(InputSelect, { label: t('issued_country_label'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }), placeholder: t('choose_issued_country'), value: (isAr ? (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.arabic : (_d = location === null || location === void 0 ? void 0 : location.name) === null || _d === void 0 ? void 0 : _d.english) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
73
|
+
return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
91
74
|
} }) }))] })) })));
|
|
92
75
|
});
|
|
93
76
|
export default React.memo(IssuedCountry);
|
|
@@ -6,6 +6,7 @@ interface MobileNumberProps {
|
|
|
6
6
|
onListOpen?: () => void;
|
|
7
7
|
onListClose?: () => void;
|
|
8
8
|
readOnly?: boolean;
|
|
9
|
+
isVerified?: boolean;
|
|
9
10
|
}
|
|
10
11
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<MobileNumberProps & React.RefAttributes<unknown>>>;
|
|
11
12
|
export default _default;
|
|
@@ -27,16 +27,15 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
27
27
|
import Box from '@mui/material/Box';
|
|
28
28
|
import { styled, alpha } from '@mui/material/styles';
|
|
29
29
|
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
30
|
-
import { useLanguage
|
|
30
|
+
import { useLanguage } from '../../../../hooks';
|
|
31
31
|
import Text from '../../../../components/Text';
|
|
32
32
|
import Collapse from '../../../../components/Collapse';
|
|
33
33
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
34
34
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
|
-
import ClearIcon from '../../../shared/ClearIcon';
|
|
36
35
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
36
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
38
37
|
import Input from '../../../shared/Input';
|
|
39
|
-
import {
|
|
38
|
+
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
40
39
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
41
40
|
var theme = _a.theme;
|
|
42
41
|
return ({
|
|
@@ -83,13 +82,12 @@ var InputStyled = styled(Input)(function (_a) {
|
|
|
83
82
|
});
|
|
84
83
|
var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
85
84
|
var _b, _c, _d;
|
|
86
|
-
var countries = _a.countries, readOnly = _a.readOnly, rest = __rest(_a, ["countries", "readOnly"]);
|
|
85
|
+
var countries = _a.countries, readOnly = _a.readOnly, isVerified = _a.isVerified, rest = __rest(_a, ["countries", "readOnly", "isVerified"]);
|
|
87
86
|
var _e = React.useState(countries || []), countriesCode = _e[0], setCountries = _e[1];
|
|
88
87
|
var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
|
|
89
88
|
var t = useTranslation().t;
|
|
90
89
|
var isAr = useLanguage().isAr;
|
|
91
90
|
var _g = useFormContext(), control = _g.control, setValue = _g.setValue;
|
|
92
|
-
var data = useAppSelector(individualSelector).data;
|
|
93
91
|
var phoneControl = useController({ name: 'mobile', control: control });
|
|
94
92
|
var countryCodeControl = useController({ name: 'countryCode', control: control });
|
|
95
93
|
var countryCodeValue = countryCodeControl.field.value;
|
|
@@ -100,7 +98,6 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
100
98
|
var mobileLen = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits;
|
|
101
99
|
var isStartsWith5 = mobileValue.startsWith('5');
|
|
102
100
|
var requiredLen = isSA && isStartsWith5 ? mobileLen - 1 : mobileLen;
|
|
103
|
-
var disabled = false;
|
|
104
101
|
React.useEffect(function () {
|
|
105
102
|
if (mobileValue)
|
|
106
103
|
setValue('mobile', mobileValue, { shouldValidate: true });
|
|
@@ -138,8 +135,8 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
138
135
|
setValue('mobile', '');
|
|
139
136
|
countryCodeControl.field.onChange(country);
|
|
140
137
|
};
|
|
141
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { mb: 3 } }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('signup_enter_mobile') }) }), _jsx(InputStyled, { readOnly: readOnly, inputProps: { maxLength: requiredLen }, type: 'tel', disabled:
|
|
142
|
-
return (_jsxs(_Fragment, { children: [_jsxs(CountryItemContainer, { children: [_jsxs(CountryCodeText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: ["+", item.idd_prefix] })), _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english }))] }), item.idd_prefix === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) && _jsx(CheckIcon, {})] }));
|
|
138
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { mb: 3 } }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('signup_enter_mobile') }) }), _jsx(InputStyled, { readOnly: readOnly, inputProps: { maxLength: requiredLen }, type: 'tel', disabled: !!anchorEl, onClick: onCloseCountryList, onChange: onPhoneNumberChange, value: !!anchorEl ? countryName : mobileValue, startAdornment: _jsxs(CountryCodeStyled, __assign({ onClick: readOnly ? undefined : function () { return toggleCountryList(); } }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), !anchorEl && _jsx(ExpandIconStyled, { anchorEl: !!anchorEl })] })), endAdornment: !!anchorEl ? (_jsx(ExpandIconStyled, { onClick: function () { return toggleCountryList(); }, anchorEl: !!anchorEl })) : (_jsx(EndAdornment, { value: mobileValue, isVerified: isVerified, onClear: clearMobileNumber, error: error })), placeholder: "".concat(isSA ? '5' : '0', "00000000"), warningType: 'alert', warningMessage: error && t(error, { length: requiredLen, number: '05|5' }) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
139
|
+
return (_jsxs(_Fragment, { children: [_jsxs(CountryItemContainer, { children: [_jsxs(CountryCodeText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: ["+", item.idd_prefix] })), _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english }))] }), item.idd_prefix === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
143
140
|
} }) }))] })) })));
|
|
144
141
|
});
|
|
145
142
|
export default React.memo(MobileNumber);
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
export interface NameProps {
|
|
3
3
|
show: boolean;
|
|
4
4
|
readOnly?: boolean;
|
|
5
|
+
isVerified?: boolean;
|
|
5
6
|
}
|
|
6
|
-
declare const _default: React.MemoExoticComponent<({ show, readOnly }: NameProps) => JSX.Element>;
|
|
7
|
+
declare const _default: React.MemoExoticComponent<({ show, readOnly, isVerified }: NameProps) => JSX.Element>;
|
|
7
8
|
export default _default;
|
|
@@ -15,13 +15,10 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import { styled } from '@mui/material/styles';
|
|
17
17
|
import { removeAllOtherThanAlphabetAndSpace } from '../../../../utils';
|
|
18
|
-
import { useAppSelector } from '../../../../hooks';
|
|
19
18
|
import Collapse from '../../../../components/Collapse';
|
|
20
19
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
20
|
import Input from '../../../shared/Input';
|
|
22
|
-
import
|
|
23
|
-
import CheckIcon from '../../../shared/CheckIcon';
|
|
24
|
-
import { individualSelector } from '../../../app/individual/individualStore';
|
|
21
|
+
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
25
22
|
var InputStyled = styled(Input)(function () { return ({
|
|
26
23
|
input: {
|
|
27
24
|
textTransform: 'capitalize'
|
|
@@ -29,23 +26,19 @@ var InputStyled = styled(Input)(function () { return ({
|
|
|
29
26
|
}); });
|
|
30
27
|
var Name = function (_a) {
|
|
31
28
|
var _b;
|
|
32
|
-
var show = _a.show, readOnly = _a.readOnly;
|
|
29
|
+
var show = _a.show, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
33
30
|
var t = useTranslation().t;
|
|
34
31
|
var control = useFormContext().control;
|
|
35
32
|
var nameControl = useController({ name: 'name', control: control });
|
|
36
|
-
var data = useAppSelector(individualSelector).data;
|
|
37
|
-
var verify = data.verify;
|
|
38
|
-
var user = (verify.responseBody || {}).user;
|
|
39
33
|
var handleNameChange = function (event) {
|
|
40
34
|
var value = removeAllOtherThanAlphabetAndSpace(event.target.value);
|
|
41
35
|
nameControl.field.onChange(value);
|
|
42
36
|
};
|
|
43
37
|
var nameValue = nameControl.field.value;
|
|
44
38
|
var error = (_b = nameControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
45
|
-
var disabled = false;
|
|
46
39
|
var clearNumber = function () {
|
|
47
40
|
nameControl.field.onChange('');
|
|
48
41
|
};
|
|
49
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mb: 3, mt: 2.5 } }, { children: _jsx(InputStyled, { readOnly: readOnly, label: t('signup_merchant_name_label'), value: nameValue,
|
|
42
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mb: 3, mt: 2.5 } }, { children: _jsx(InputStyled, { readOnly: readOnly, label: t('signup_merchant_name_label'), value: nameValue, onChange: handleNameChange, placeholder: t('signup_merchant_name_label'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: nameValue, isVerified: isVerified, onClear: clearNumber, error: error }) }) })) })));
|
|
50
43
|
};
|
|
51
44
|
export default React.memo(Name);
|
|
@@ -6,6 +6,7 @@ interface NationalityProps {
|
|
|
6
6
|
onListOpen?: () => void;
|
|
7
7
|
onListClose?: () => void;
|
|
8
8
|
readOnly?: boolean;
|
|
9
|
+
isVerified?: boolean;
|
|
9
10
|
}
|
|
10
11
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<NationalityProps & React.RefAttributes<unknown>>>;
|
|
11
12
|
export default _default;
|
|
@@ -20,53 +20,36 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import {
|
|
23
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
import Box from '@mui/material/Box';
|
|
26
26
|
import { useTranslation } from 'react-i18next';
|
|
27
27
|
import { useController, useFormContext } from 'react-hook-form';
|
|
28
28
|
import { styled } from '@mui/material/styles';
|
|
29
|
-
import CheckIcon from '@mui/icons-material/Check';
|
|
30
29
|
import { useLanguage } from '../../../../hooks';
|
|
31
30
|
import Collapse from '../../../../components/Collapse';
|
|
32
|
-
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
33
31
|
import Text from '../../../../components/Text';
|
|
34
32
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
33
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
36
|
-
import
|
|
34
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
35
|
+
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
36
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
37
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
38
38
|
display: 'flex'
|
|
39
39
|
}); });
|
|
40
|
-
var InputStyled = styled(Input)(function (_a) {
|
|
41
|
-
var readOnly = _a.readOnly;
|
|
42
|
-
return ({
|
|
43
|
-
'& .MuiInputBase-input': {
|
|
44
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
40
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
49
41
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
50
42
|
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
51
43
|
});
|
|
52
|
-
var CheckIconStyled = styled(CheckIcon)(function (_a) {
|
|
53
|
-
var theme = _a.theme;
|
|
54
|
-
return ({
|
|
55
|
-
color: theme.palette.success.main,
|
|
56
|
-
display: 'flex',
|
|
57
|
-
alignItems: 'flex-end'
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
44
|
var Nationality = React.forwardRef(function (_a, ref) {
|
|
61
45
|
var _b, _c, _d;
|
|
62
|
-
var countries = _a.countries, readOnly = _a.readOnly, rest = __rest(_a, ["countries", "readOnly"]);
|
|
46
|
+
var countries = _a.countries, readOnly = _a.readOnly, isVerified = _a.isVerified, rest = __rest(_a, ["countries", "readOnly", "isVerified"]);
|
|
63
47
|
var _e = React.useState(countries), locationCountries = _e[0], setCountries = _e[1];
|
|
64
48
|
var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
|
|
65
49
|
var t = useTranslation().t;
|
|
66
50
|
var isAr = useLanguage().isAr;
|
|
67
51
|
var control = useFormContext().control;
|
|
68
52
|
var nationalityControl = useController({ control: control, name: 'nationality' });
|
|
69
|
-
var disabled = false;
|
|
70
53
|
var onOpenCountrySelect = function (event) {
|
|
71
54
|
var _a;
|
|
72
55
|
if (readOnly)
|
|
@@ -86,8 +69,8 @@ var Nationality = React.forwardRef(function (_a, ref) {
|
|
|
86
69
|
};
|
|
87
70
|
var location = nationalityControl.field.value;
|
|
88
71
|
var error = (_b = nationalityControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
89
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(
|
|
90
|
-
return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(
|
|
72
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 2.5 } }, { children: [_jsx(InputSelect, { label: t('nationality_label'), readOnly: readOnly, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified }), placeholder: t('choose_nationality'), value: (isAr ? (_c = location === null || location === void 0 ? void 0 : location.name) === null || _c === void 0 ? void 0 : _c.arabic : (_d = location === null || location === void 0 ? void 0 : location.name) === null || _d === void 0 ? void 0 : _d.english) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
73
|
+
return (_jsxs(_Fragment, { children: [_jsx(CountryItemContainer, { children: _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (location === null || location === void 0 ? void 0 : location.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english })) }), item.idd_prefix === (location === null || location === void 0 ? void 0 : location.idd_prefix) && _jsx(CheckIcon, { isVerified: isVerified })] }));
|
|
91
74
|
} }) }))] })) })));
|
|
92
75
|
});
|
|
93
76
|
export default React.memo(Nationality);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
|
-
export declare const IndividualInfoValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
2
|
+
export declare const IndividualInfoValidationSchema: (isOtherCountry: boolean) => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
3
|
name: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
4
4
|
mobile: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
5
5
|
email: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
@@ -1,68 +1,72 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
import { REGEX_FULL_NAME } from '../../../../constants';
|
|
3
|
-
export var IndividualInfoValidationSchema =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
.optional(),
|
|
17
|
-
mobile: yup
|
|
18
|
-
.string()
|
|
19
|
-
.test({
|
|
20
|
-
test: function (value) {
|
|
21
|
-
if (((value === null || value === void 0 ? void 0 : value.length) || 0) > 0) {
|
|
22
|
-
var countryCode = this.parent.countryCode;
|
|
23
|
-
var isSA = countryCode.iso2 === 'SA';
|
|
24
|
-
var digits = countryCode.digits;
|
|
25
|
-
var mobileValue = value || '';
|
|
26
|
-
var valueLen = mobileValue.length;
|
|
27
|
-
var isNumber = mobileValue.match(/^[0-9]/g);
|
|
28
|
-
if (!isNumber)
|
|
29
|
-
return this.createError({ message: 'enter_valid_mobile_number' });
|
|
30
|
-
var isStartWithZero = mobileValue.startsWith('05');
|
|
31
|
-
var isStartWith5 = mobileValue.startsWith('5');
|
|
32
|
-
var isSaudiNumber = isStartWith5 || isStartWithZero;
|
|
33
|
-
if (isSA) {
|
|
34
|
-
if (!isSaudiNumber)
|
|
35
|
-
return this.createError({ message: 'start_with_number' });
|
|
36
|
-
var requiredLen = isStartWith5 ? digits - 1 : digits;
|
|
37
|
-
return valueLen === requiredLen ? true : this.createError({ message: 'enter_valid_mobile_number' });
|
|
3
|
+
export var IndividualInfoValidationSchema = function (isOtherCountry) {
|
|
4
|
+
return yup.object().shape({
|
|
5
|
+
name: yup
|
|
6
|
+
.string()
|
|
7
|
+
.test({
|
|
8
|
+
test: function (value) {
|
|
9
|
+
if (((value === null || value === void 0 ? void 0 : value.length) || 0) > 0) {
|
|
10
|
+
var name_1 = value || '';
|
|
11
|
+
var isMatch = name_1.match(REGEX_FULL_NAME);
|
|
12
|
+
return isMatch ? true : this.createError({ message: 'please write your first and last name' });
|
|
38
13
|
}
|
|
39
|
-
return
|
|
14
|
+
return true;
|
|
40
15
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
16
|
+
})
|
|
17
|
+
.optional(),
|
|
18
|
+
mobile: yup
|
|
19
|
+
.string()
|
|
20
|
+
.test({
|
|
21
|
+
test: function (value) {
|
|
22
|
+
if (((value === null || value === void 0 ? void 0 : value.length) || 0) > 0) {
|
|
23
|
+
var countryCode = this.parent.countryCode;
|
|
24
|
+
var isSA = countryCode.iso2 === 'SA';
|
|
25
|
+
var digits = countryCode.digits;
|
|
26
|
+
var mobileValue = value || '';
|
|
27
|
+
var valueLen = mobileValue.length;
|
|
28
|
+
var isNumber = mobileValue.match(/^[0-9]/g);
|
|
29
|
+
if (!isNumber)
|
|
30
|
+
return this.createError({ message: 'enter_valid_mobile_number' });
|
|
31
|
+
var isStartWithZero = mobileValue.startsWith('05');
|
|
32
|
+
var isStartWith5 = mobileValue.startsWith('5');
|
|
33
|
+
var isSaudiNumber = isStartWith5 || isStartWithZero;
|
|
34
|
+
if (isSA) {
|
|
35
|
+
if (!isSaudiNumber)
|
|
36
|
+
return this.createError({ message: 'start_with_number' });
|
|
37
|
+
var requiredLen = isStartWith5 ? digits - 1 : digits;
|
|
38
|
+
return valueLen === requiredLen ? true : this.createError({ message: 'enter_valid_mobile_number' });
|
|
39
|
+
}
|
|
40
|
+
return valueLen === digits ? true : this.createError({ message: 'enter_valid_mobile_number' });
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
57
43
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.optional(),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
44
|
+
})
|
|
45
|
+
.optional(),
|
|
46
|
+
email: yup.string().email('email_not_valid').optional(),
|
|
47
|
+
gender: yup.string().optional(),
|
|
48
|
+
nid: isOtherCountry
|
|
49
|
+
? yup.string().min(3, 'signup_invalid_national_id').required('signup_invalid_national_id')
|
|
50
|
+
: yup
|
|
51
|
+
.string()
|
|
52
|
+
.test({
|
|
53
|
+
test: function (value) {
|
|
54
|
+
var id = value || '';
|
|
55
|
+
if (id.length > 0) {
|
|
56
|
+
if (id.length < 10)
|
|
57
|
+
return this.createError({ message: 'signup_invalid_national_id' });
|
|
58
|
+
var isMatch = id.match(/^(1|2)([0-9]{1,})$/g);
|
|
59
|
+
return isMatch ? true : this.createError({ message: 'signup_invalid_national_id_format' });
|
|
60
|
+
}
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
.optional(),
|
|
65
|
+
issuedCountry: yup.object().optional(),
|
|
66
|
+
expiryDate: yup.string().min(5).optional(),
|
|
67
|
+
dob: yup.string().min(5).optional(),
|
|
68
|
+
placeOfBirthCountry: yup.object().optional(),
|
|
69
|
+
placeOfBirthCity: yup.object().optional(),
|
|
70
|
+
nationality: yup.object().optional()
|
|
71
|
+
});
|
|
72
|
+
};
|
|
@@ -25,6 +25,7 @@ import { individualSelector, clearError, updatePhoneInfo } from '../../../app/in
|
|
|
25
25
|
import Button from '../../../shared/Button';
|
|
26
26
|
import { IndividualPhoneInfoValidationSchema } from './validation';
|
|
27
27
|
import MobileNumber from './MobileNumber';
|
|
28
|
+
import { deepCopy } from '../../../../utils';
|
|
28
29
|
var FormStyled = styled(Form)(function () { return ({
|
|
29
30
|
display: 'flex',
|
|
30
31
|
flexDirection: 'column'
|
|
@@ -51,7 +52,7 @@ var PhoneInfo = function (_a) {
|
|
|
51
52
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
|
|
52
53
|
var getFelids = useExcludeReadOnlyFelids(methods, readOnly).getFelids;
|
|
53
54
|
var onSubmit = function (formData) {
|
|
54
|
-
dispatch(updatePhoneInfo(getFelids(formData)));
|
|
55
|
+
dispatch(updatePhoneInfo(deepCopy(getFelids(formData))));
|
|
55
56
|
};
|
|
56
57
|
React.useEffect(function () {
|
|
57
58
|
if (error && methods.formState.isValid)
|
|
@@ -11,12 +11,20 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { memo } from 'react';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { settingsSelector } from '../../../../app/settings';
|
|
15
|
+
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
16
|
+
import { SCOPE_AUTH } from '../../../../constants';
|
|
17
|
+
import { individualSelector, onCloseCompleteIndividual } from '../../../app/individual/individualStore';
|
|
16
18
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
19
|
var SuccessWithFlowButtons = function () {
|
|
18
|
-
var
|
|
19
|
-
var _a =
|
|
20
|
-
|
|
20
|
+
var dispatch = useAppDispatch();
|
|
21
|
+
var _a = useAppSelector(individualSelector), data = _a.data, loading = _a.loading;
|
|
22
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
23
|
+
var isScopeAuthentication = settingsData.appConfig.scope === SCOPE_AUTH;
|
|
24
|
+
var _b = data.verify.responseBody || {}, flows = _b.flows, entity = _b.entity, brand = _b.brand, bank = _b.bank_account, merchant = _b.merchant, user = _b.user, business = _b.business, board_id = _b.board_id, board_info_id = _b.board_info_id, name = _b.name, individuals = _b.individuals;
|
|
25
|
+
var onClose = function () {
|
|
26
|
+
dispatch(onCloseCompleteIndividual());
|
|
27
|
+
};
|
|
28
|
+
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [], onClose: isScopeAuthentication ? onClose : undefined }));
|
|
21
29
|
};
|
|
22
30
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -19,7 +19,7 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
19
19
|
import { useTranslation } from 'react-i18next';
|
|
20
20
|
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
21
21
|
import { isTokenExpired } from '../../../../utils';
|
|
22
|
-
import { individualSelector, resendOTP } from '../../../app/individual/individualStore';
|
|
22
|
+
import { clearError, individualSelector, resendOTP } from '../../../app/individual/individualStore';
|
|
23
23
|
var BoxStyled = styled(Box)(function (_a) {
|
|
24
24
|
var theme = _a.theme;
|
|
25
25
|
return ({
|
|
@@ -36,6 +36,8 @@ var OTPInput = function (_a) {
|
|
|
36
36
|
var dispatch = useAppDispatch();
|
|
37
37
|
var error = useAppSelector(individualSelector).error;
|
|
38
38
|
var handleOnOTPChange = function (otp) {
|
|
39
|
+
if (error)
|
|
40
|
+
dispatch(clearError());
|
|
39
41
|
otpControl.field.onChange(otp);
|
|
40
42
|
};
|
|
41
43
|
var handleOnResendOTP = function () {
|
|
@@ -18,7 +18,7 @@ import { yupResolver } from '@hookform/resolvers/yup';
|
|
|
18
18
|
import Box from '@mui/material/Box/Box';
|
|
19
19
|
import { styled } from '@mui/material/styles';
|
|
20
20
|
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
21
|
-
import { maskPhone } from '../../../../utils';
|
|
21
|
+
import { deepCopy, maskPhone } from '../../../../utils';
|
|
22
22
|
import Form from '../../../../components/Form';
|
|
23
23
|
import Text from '../../../../components/Text';
|
|
24
24
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
@@ -70,7 +70,7 @@ var VerifyNumber = function (_a) {
|
|
|
70
70
|
};
|
|
71
71
|
}, [methods.formState.isValid]);
|
|
72
72
|
var onSubmit = function (formData) {
|
|
73
|
-
dispatch(verifyLeadOTP(formData));
|
|
73
|
+
dispatch(verifyLeadOTP(deepCopy(formData)));
|
|
74
74
|
};
|
|
75
75
|
var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
|
|
76
76
|
var dataLoading = loading || cityLoading;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { LibConfig } from '../../@types';
|
|
3
3
|
export interface PasswordLibProps extends LibConfig {
|
|
4
4
|
verifyToken?: string;
|
|
5
|
+
configToken?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare function PasswordElement(props: PasswordLibProps): JSX.Element;
|
|
7
8
|
export declare function renderPasswordLib(config: PasswordLibProps, elementId: string): {
|
|
@@ -9,6 +9,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
24
|
import { memo, useEffect } from 'react';
|
|
14
25
|
import { createRoot } from 'react-dom/client';
|
|
@@ -19,17 +30,18 @@ import { store } from '../../app/store';
|
|
|
19
30
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
20
31
|
import Collapse from '../../components/Collapse';
|
|
21
32
|
import { FeatureContainer } from '../shared/Containers';
|
|
22
|
-
import { getParameterByName, findOrCreateElementAndInject } from '../../utils';
|
|
33
|
+
import { getParameterByName, findOrCreateElementAndInject, sendPageView } from '../../utils';
|
|
23
34
|
import { PASSWORD_OPERATION_TYPE, PASSWORD_SCREENS_NAVIGATION } from '../../constants';
|
|
24
35
|
import { passwordFeatureScreens } from '../featuresScreens';
|
|
25
36
|
import { passwordSelector, verifyLeadToken, verifyOperationToken } from '../app/password/passwordStore';
|
|
26
37
|
import Background from '../shared/Background';
|
|
27
|
-
var Password = memo(function (
|
|
38
|
+
var Password = memo(function (_a) {
|
|
39
|
+
var configToken = _a.configToken, props = __rest(_a, ["configToken"]);
|
|
28
40
|
var theme = useAppTheme().theme;
|
|
29
41
|
var dispatch = useAppDispatch();
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
useAppConfig(__assign({ navigation: PASSWORD_SCREENS_NAVIGATION }, props));
|
|
42
|
+
var _b = useAppSelector(settingsSelector), data = _b.data, error = _b.error, settingLoading = _b.loading;
|
|
43
|
+
var _c = useAppSelector(passwordSelector), customLoading = _c.customLoading, passwordError = _c.error, loading = _c.loading;
|
|
44
|
+
useAppConfig(__assign({ configToken: configToken, navigation: PASSWORD_SCREENS_NAVIGATION }, props));
|
|
33
45
|
useErrorListener(passwordError || error);
|
|
34
46
|
useStepStartedListener();
|
|
35
47
|
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, merchant = data.merchant, isMaturityExpress = data.isMaturityExpress;
|
|
@@ -43,6 +55,9 @@ var Password = memo(function (props) {
|
|
|
43
55
|
dispatch(handleLanguage(lang));
|
|
44
56
|
if (!token)
|
|
45
57
|
throw new Error('Auth token is not found!');
|
|
58
|
+
sendPageView({
|
|
59
|
+
title: 'Password'
|
|
60
|
+
});
|
|
46
61
|
if (operationType === PASSWORD_OPERATION_TYPE.RESET_PASSWORD) {
|
|
47
62
|
dispatch(verifyOperationToken({ token: token, boardId: boardId, boardInfoId: boardInfoId }));
|
|
48
63
|
return;
|
|
@@ -27,6 +27,7 @@ import { PasswordValidation } from './validation';
|
|
|
27
27
|
import Password from './Password';
|
|
28
28
|
import { createPassword, passwordSelector, storePasswordScreen } from '../../../app/password/passwordStore';
|
|
29
29
|
import { useSelector } from 'react-redux';
|
|
30
|
+
import { deepCopy } from '../../../../utils';
|
|
30
31
|
var InputsContainerStyled = styled(Box)(function (_a) {
|
|
31
32
|
var theme = _a.theme;
|
|
32
33
|
return ({
|
|
@@ -52,11 +53,11 @@ var CreatePassword = function (_a) {
|
|
|
52
53
|
useSetFromDefaultValues(methods, data.passwordData);
|
|
53
54
|
var onSubmit = function (data) {
|
|
54
55
|
if (operationType === PASSWORD_OPERATION_TYPE.RESET_PASSWORD) {
|
|
55
|
-
dispatch(storePasswordScreen(data));
|
|
56
|
+
dispatch(storePasswordScreen(deepCopy(data)));
|
|
56
57
|
dispatch(handleNextScreenStep('PASSWORD_RESET_PASSWORD_OTP_STEP'));
|
|
57
58
|
return;
|
|
58
59
|
}
|
|
59
|
-
dispatch(createPassword(data));
|
|
60
|
+
dispatch(createPassword(deepCopy(data)));
|
|
60
61
|
};
|
|
61
62
|
var onBack = function () {
|
|
62
63
|
dispatch(handleCurrentActiveScreen('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
@@ -35,7 +35,7 @@ import Text from '../../../../components/Text';
|
|
|
35
35
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
36
36
|
import { passwordSelector, clearError, resetOTPScreen, resetPassword } from '../../../app/password/passwordStore';
|
|
37
37
|
import Button from '../../../shared/Button';
|
|
38
|
-
import { maskPhone } from '../../../../utils';
|
|
38
|
+
import { deepCopy, maskPhone } from '../../../../utils';
|
|
39
39
|
import { OTPValidation } from './validation';
|
|
40
40
|
import OTPInput from './OTPInput';
|
|
41
41
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
@@ -78,7 +78,7 @@ var OTP = function (_a) {
|
|
|
78
78
|
};
|
|
79
79
|
}, [methods.formState.isValid]);
|
|
80
80
|
var onSubmit = function (formData) {
|
|
81
|
-
dispatch(resetPassword(formData));
|
|
81
|
+
dispatch(resetPassword(deepCopy(formData)));
|
|
82
82
|
};
|
|
83
83
|
var onBack = function () {
|
|
84
84
|
dispatch(handlePrevScreenStep());
|