@tap-payments/auth-jsconnect 2.5.23-test → 3.0.0-test
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/build/@types/app.d.ts +4 -0
- package/build/@types/app.js +5 -0
- package/build/api/country.d.ts +1 -0
- package/build/api/country.js +11 -1
- package/build/api/index.d.ts +1 -0
- package/build/app/settings.d.ts +5 -2
- package/build/app/settings.js +13 -3
- package/build/assets/locales/ar.json +107 -5
- package/build/assets/locales/en.json +108 -7
- package/build/components/AnimationFlow/AnimationFlow.d.ts +3 -3
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +3 -4
- package/build/components/AnimationFlow/BottomSheet.js +33 -27
- package/build/components/AnimationFlow/Dialog.d.ts +3 -4
- package/build/components/AnimationFlow/Dialog.js +17 -54
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +3 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +12 -5
- package/build/components/ArabicDatePicker/style.css +2 -0
- package/build/components/Button/Button.js +21 -10
- package/build/components/CheckBox/CheckBox.d.ts +2 -1
- package/build/components/CheckBox/CheckBox.js +41 -19
- package/build/components/DatePicker/DatePicker.d.ts +3 -1
- package/build/components/DatePicker/DatePicker.js +12 -6
- package/build/components/DatePicker/customStyle.css +1 -0
- package/build/components/ExpandIcon/ExpandIcon.js +8 -5
- package/build/components/FileInput/DragAndDrop.js +43 -39
- package/build/components/Icon/Icon.js +1 -1
- package/build/components/OTPField/OTPField.js +5 -4
- package/build/components/OTPTimer/OTPTimer.js +2 -6
- package/build/components/Popover/Popover.d.ts +6 -0
- package/build/components/Popover/Popover.js +79 -0
- package/build/components/Popover/index.d.ts +3 -0
- package/build/components/Popover/index.js +2 -0
- package/build/components/ProgressBar/CircularProgressBar.js +14 -15
- package/build/components/Radio/Radio.js +16 -6
- package/build/components/RadioLabel/RadioLabel.js +3 -2
- package/build/components/SimpleList/SimpleList.d.ts +15 -1
- package/build/components/SimpleList/SimpleList.js +48 -37
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +1 -1
- package/build/components/TextField/TextField.d.ts +17 -0
- package/build/components/TextField/TextField.js +89 -0
- package/build/components/TextField/index.d.ts +3 -0
- package/build/components/TextField/index.js +2 -0
- package/build/components/ToggleButtonGroup/ToggleButtonGroup.js +2 -1
- package/build/components/Tooltip/Tooltip.js +38 -7
- package/build/components/Warning/Warning.js +4 -4
- package/build/constants/app.js +35 -11
- package/build/constants/assets.d.ts +72 -0
- package/build/constants/assets.js +131 -59
- package/build/constants/date.d.ts +1 -0
- package/build/constants/date.js +14 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/features/app/brand/brandStore.d.ts +3 -2
- package/build/features/app/brand/brandStore.js +4 -1
- package/build/features/app/business/businessStore.d.ts +4 -2
- package/build/features/app/business/businessStore.js +10 -4
- package/build/features/app/entity/entityStore.d.ts +3 -2
- package/build/features/app/entity/entityStore.js +4 -1
- package/build/features/app/individual/individualStore.d.ts +3 -2
- package/build/features/app/individual/individualStore.js +4 -1
- package/build/features/bank/Bank.js +3 -3
- package/build/features/bank/screens/BankDetails/BankDetails.js +3 -8
- package/build/features/bank/screens/BankDetails/BankName.js +7 -3
- package/build/features/bank/screens/BankDetails/BankStatement.js +1 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -3
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +7 -16
- package/build/features/bank/screens/BankDetails/IBAN.js +7 -2
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/bank/screens/Success/Success.js +14 -2
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/bank/screens/Verify/Verify.js +5 -8
- package/build/features/brand/Brand.js +3 -3
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +2 -51
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +17 -55
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +9 -7
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +2 -31
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +14 -32
- 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/ExpectedSaleField.d.ts +8 -0
- package/build/features/brand/screens/BrandActivities/ExpectedSaleField.js +55 -0
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +9 -16
- package/build/features/brand/screens/BrandActivities/TAC.js +8 -21
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +4 -2
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +2 -2
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandName.js +7 -51
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +8 -4
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.js +11 -5
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.js +10 -4
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.js +10 -4
- package/build/features/brand/screens/BrandSegmentInfo/TeamSize.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/TeamSize.js +10 -4
- package/build/features/brand/screens/ExpectedSales/ExpectedSaleList.d.ts +29 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSaleList.js +136 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSales.d.ts +5 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSales.js +91 -0
- package/build/features/brand/screens/ExpectedSales/index.d.ts +2 -0
- package/build/features/brand/screens/ExpectedSales/index.js +2 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/brand/screens/Success/Success.js +13 -1
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/brand/screens/Verify/Verify.js +5 -8
- package/build/features/business/Business.js +3 -3
- package/build/features/business/screens/Activities/Activities.js +7 -11
- package/build/features/business/screens/Activities/ActivityField.d.ts +22 -0
- package/build/features/business/screens/Activities/ActivityField.js +63 -0
- package/build/features/business/screens/Activities/LicenseName.js +4 -2
- package/build/features/business/screens/Activities/OperationStartDate.js +3 -3
- package/build/features/business/screens/BrandDetails/BrandDetails.js +3 -2
- package/build/features/business/screens/BrandDetails/BrandName.js +5 -9
- package/build/features/business/screens/BrandDetails/Header.js +4 -3
- package/build/features/business/screens/BrandDetails/LicenseInfo.js +5 -9
- package/build/features/business/screens/BrandDetails/SalesChannel.js +9 -5
- package/build/features/business/screens/BusinessActivities/ActivityList.d.ts +30 -0
- package/build/features/business/screens/BusinessActivities/ActivityList.js +265 -0
- package/build/features/business/screens/BusinessActivities/BusinessActivities.d.ts +5 -0
- package/build/features/business/screens/BusinessActivities/BusinessActivities.js +90 -0
- package/build/features/business/screens/BusinessActivities/index.d.ts +2 -0
- package/build/features/business/screens/BusinessActivities/index.js +2 -0
- package/build/features/business/screens/BusinessType/Article.js +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +6 -4
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +2 -1
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +9 -11
- package/build/features/business/screens/BusinessType/EntityName.js +6 -3
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +2 -1
- package/build/features/business/screens/BusinessType/LicenseList.js +9 -6
- package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -3
- package/build/features/business/screens/BusinessType/LicenseType.js +16 -11
- package/build/features/business/screens/CivilID/CivilID.js +8 -16
- package/build/features/business/screens/CivilID/IDNumber.js +5 -18
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -18
- package/build/features/business/screens/Customers/CustomerLocations.js +11 -26
- package/build/features/business/screens/Customers/Customers.js +12 -10
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +2 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.js +10 -13
- package/build/features/business/screens/Customers/ExpectedSaleField.d.ts +6 -0
- package/build/features/business/screens/Customers/ExpectedSaleField.js +49 -0
- package/build/features/business/screens/Customers/RefundPolicy.js +8 -16
- package/build/features/business/screens/Customers/TransactionPolicy.js +4 -2
- package/build/features/business/screens/ExpectedSales/ExpectedSaleList.d.ts +29 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSaleList.js +136 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSales.d.ts +5 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSales.js +91 -0
- package/build/features/business/screens/ExpectedSales/index.d.ts +2 -0
- package/build/features/business/screens/ExpectedSales/index.js +2 -0
- package/build/features/business/screens/IDBOD/DOB.js +3 -12
- package/build/features/business/screens/IDBOD/ID.js +2 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +9 -16
- package/build/features/business/screens/OTP/OTP.js +10 -22
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/business/screens/Success/Success.js +13 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/business/screens/Verify/Verify.js +5 -8
- package/build/features/connect/Connect.js +3 -3
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +8 -4
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentLocations.js +9 -5
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentProfits.js +8 -4
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +8 -4
- package/build/features/connect/screens/BrandSegment/TeamSize.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/TeamSize.js +8 -4
- package/build/features/connect/screens/CivilID/CivilID.js +11 -12
- package/build/features/connect/screens/CivilID/IDNumber.js +3 -18
- package/build/features/connect/screens/Individual/Email.js +6 -2
- package/build/features/connect/screens/Individual/Individual.js +11 -9
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -0
- package/build/features/connect/screens/Individual/MobileNumber.js +29 -22
- package/build/features/connect/screens/Individual/Name.js +4 -2
- package/build/features/connect/screens/Merchant/BrandList.d.ts +2 -1
- package/build/features/connect/screens/Merchant/BrandList.js +8 -4
- package/build/features/connect/screens/Merchant/BrandName.d.ts +2 -1
- package/build/features/connect/screens/Merchant/BrandName.js +7 -42
- package/build/features/connect/screens/Merchant/Merchant.js +8 -4
- package/build/features/connect/screens/Merchant/TAC.js +12 -24
- package/build/features/connect/screens/Mobile/Mobile.js +19 -21
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -0
- package/build/features/connect/screens/Mobile/MobileNumber.js +22 -19
- package/build/features/connect/screens/NID/DOB.d.ts +1 -1
- package/build/features/connect/screens/NID/DOB.js +5 -26
- package/build/features/connect/screens/NID/IDNumber.js +3 -18
- package/build/features/connect/screens/NID/NID.js +13 -14
- package/build/features/connect/screens/OTP/OTP.js +5 -8
- package/build/features/connect/screens/ThankYou/ThankYou.js +13 -1
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +0 -61
- package/build/features/connectExpress/ConnectExpress.js +3 -3
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +13 -1
- package/build/features/connectExpress/screens/Brand/Brand.js +4 -2
- package/build/features/connectExpress/screens/CivilID/CivilID.js +7 -8
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +3 -18
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -2
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +3 -18
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -40
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +9 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +11 -6
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +8 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +9 -17
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +6 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +6 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +33 -26
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +6 -2
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +5 -8
- package/build/features/connectExpress/screens/Mobile/Mobile.js +21 -12
- package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +33 -26
- package/build/features/connectExpress/screens/Mobile/TAC.js +12 -24
- package/build/features/connectExpress/screens/NID/DOB.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/DOB.js +4 -24
- package/build/features/connectExpress/screens/NID/IDNumber.js +8 -18
- package/build/features/connectExpress/screens/NID/NID.js +7 -8
- package/build/features/connectExpress/screens/NID/TAC.js +9 -17
- package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +1 -1
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +3 -24
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +5 -18
- package/build/features/connectExpress/screens/NIDMissed/NID.js +2 -2
- package/build/features/connectExpress/screens/OTP/OTP.js +5 -8
- package/build/features/connectExpress/screens/OTP/OTPInput.js +1 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/entity/Entity.js +3 -3
- package/build/features/entity/screens/EntityActivities/ActivityList.d.ts +30 -0
- package/build/features/entity/screens/EntityActivities/ActivityList.js +265 -0
- package/build/features/entity/screens/EntityActivities/EntityActivities.d.ts +5 -0
- package/build/features/entity/screens/EntityActivities/EntityActivities.js +89 -0
- package/build/features/entity/screens/EntityActivities/index.d.ts +2 -0
- package/build/features/entity/screens/EntityActivities/index.js +2 -0
- package/build/features/entity/screens/EntityCapital/ActivityField.d.ts +22 -0
- package/build/features/entity/screens/EntityCapital/ActivityField.js +63 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +7 -3
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +6 -2
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +7 -3
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +10 -11
- package/build/features/entity/screens/EntityName/Article.js +1 -1
- package/build/features/entity/screens/EntityName/EntityName.js +6 -4
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +1 -50
- package/build/features/entity/screens/EntityName/EntityTypeList.js +19 -50
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -15
- package/build/features/entity/screens/EntityName/ExpiryDate.js +5 -11
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -15
- package/build/features/entity/screens/EntityName/IssuingDate.js +5 -11
- package/build/features/entity/screens/EntityName/LegalName.js +6 -2
- package/build/features/entity/screens/EntityName/LicenseNumber.js +4 -2
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +6 -2
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/entity/screens/Success/Success.js +13 -1
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/entity/screens/Verify/Verify.js +5 -8
- package/build/features/featuresScreens.js +26 -1
- package/build/features/individual/Individual.js +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +8 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +9 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +19 -100
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +14 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +6 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +7 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +9 -3
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +1 -1
- package/build/features/individual/screens/IndividualList/Email.js +4 -2
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +1 -27
- package/build/features/individual/screens/IndividualList/IndividualList.js +2 -21
- package/build/features/individual/screens/IndividualList/MobileNumber.js +30 -24
- package/build/features/individual/screens/IndividualList/UserList.js +36 -15
- package/build/features/individual/screens/IndividualOccupation/IndividualOccupation.d.ts +5 -0
- package/build/features/individual/screens/IndividualOccupation/IndividualOccupation.js +91 -0
- package/build/features/individual/screens/IndividualOccupation/OccupationList.d.ts +29 -0
- package/build/features/individual/screens/IndividualOccupation/OccupationList.js +136 -0
- package/build/features/individual/screens/IndividualOccupation/index.d.ts +2 -0
- package/build/features/individual/screens/IndividualOccupation/index.js +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +4 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +4 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +16 -12
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +7 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +7 -4
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +31 -24
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +10 -4
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +34 -30
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +10 -2
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/individual/screens/Success/Success.js +13 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/individual/screens/Verify/Verify.js +5 -8
- package/build/features/password/Password.js +3 -3
- package/build/features/password/screens/CreatePassword/ConditionText.js +2 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +15 -2
- package/build/features/password/screens/CreatePassword/CreatePassword.js +3 -3
- package/build/features/password/screens/CreatePassword/Password.js +17 -9
- package/build/features/password/screens/CreatePassword/PasswordBar.js +4 -4
- package/build/features/password/screens/OTP/OTP.js +10 -22
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/password/screens/Success/Success.js +13 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/password/screens/Verify/Verify.js +5 -8
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +16 -11
- package/build/features/shared/Background/Background.js +11 -2
- package/build/features/shared/Button/AbsherButton.js +12 -2
- package/build/features/shared/Button/Button.js +16 -11
- package/build/features/shared/Button/EmailProvidersButtons.js +34 -22
- package/build/features/shared/Button/FlowsButtons.d.ts +3 -1
- package/build/features/shared/Button/FlowsButtons.js +79 -69
- package/build/features/shared/Button/IndividualActionButtons.js +39 -40
- package/build/features/shared/Button/MobileButton.js +16 -2
- package/build/features/shared/Button/SuccessButton.d.ts +1 -1
- package/build/features/shared/Button/SuccessButton.js +10 -15
- package/build/features/shared/Calender/Calender.d.ts +3 -1
- package/build/features/shared/Calender/Calender.js +4 -4
- package/build/features/shared/Calender/CustomCalender.d.ts +15 -0
- package/build/features/shared/Calender/CustomCalender.js +46 -0
- package/build/features/shared/Calender/CustomDatePicker.d.ts +29 -0
- package/build/features/shared/Calender/CustomDatePicker.js +252 -0
- package/build/features/shared/Calender/CustomHijriDatePicker.d.ts +29 -0
- package/build/features/shared/Calender/CustomHijriDatePicker.js +258 -0
- package/build/features/shared/Calender/DatePicker.d.ts +29 -0
- package/build/features/shared/Calender/DatePicker.js +229 -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 +2 -2
- package/build/features/shared/CheckIcon/CheckIcon.js +9 -7
- package/build/features/shared/Chip/Chip.js +2 -1
- package/build/features/shared/ClearIcon/ClearIcon.d.ts +2 -0
- package/build/features/shared/ClearIcon/ClearIcon.js +2 -1
- package/build/features/shared/Containers/ContainerWithHeader.d.ts +11 -0
- package/build/features/shared/Containers/ContainerWithHeader.js +52 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -2
- package/build/features/shared/Containers/FeatureContainer.js +6 -4
- package/build/features/shared/Containers/index.d.ts +2 -1
- package/build/features/shared/Containers/index.js +2 -1
- package/build/features/shared/CountryPopup/CountryPopup.d.ts +7 -0
- package/build/features/shared/CountryPopup/CountryPopup.js +166 -0
- package/build/features/shared/CountryPopup/index.d.ts +2 -0
- package/build/features/shared/CountryPopup/index.js +2 -0
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +6 -6
- package/build/features/shared/DataLoading/DataLoading.js +6 -6
- package/build/features/shared/DropDownStyle/DropDownStyle.d.ts +24 -0
- package/build/features/shared/DropDownStyle/DropDownStyle.js +61 -0
- package/build/features/shared/DropDownStyle/index.d.ts +2 -0
- package/build/features/shared/DropDownStyle/index.js +2 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +2 -1
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +2 -2
- package/build/features/shared/Footer/PoweredByFooter.d.ts +1 -2
- package/build/features/shared/Footer/PoweredByFooter.js +3 -3
- package/build/features/shared/GenericError/GenericError.js +3 -2
- package/build/features/shared/Header/Header.d.ts +8 -0
- package/build/features/shared/Header/Header.js +88 -0
- package/build/features/shared/Header/index.d.ts +3 -0
- package/build/features/shared/Header/index.js +2 -0
- package/build/features/shared/InputSelect/InputSelect.js +0 -1
- package/build/features/shared/LanguagePopup/LanguagePopup.d.ts +5 -0
- package/build/features/shared/LanguagePopup/LanguagePopup.js +178 -0
- package/build/features/shared/LanguagePopup/index.d.ts +2 -0
- package/build/features/shared/LanguagePopup/index.js +2 -0
- package/build/features/shared/Mandatory/Mandatory.js +2 -2
- package/build/features/shared/OTP/OTP.js +10 -11
- package/build/features/shared/PaciVerification/PaciVerification.js +5 -4
- package/build/features/shared/PasswordIcon/PasswordIcon.js +3 -2
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +47 -22
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +13 -0
- package/build/features/shared/SalesChannels/SalesChannel.js +11 -24
- package/build/features/shared/Search/Search.d.ts +3 -1
- package/build/features/shared/Search/Search.js +39 -3
- package/build/features/shared/SearchIcon/SearchIcon.d.ts +0 -1
- package/build/features/shared/SearchIcon/SearchIcon.js +6 -7
- package/build/features/shared/SearchIcon/index.d.ts +2 -0
- package/build/features/shared/SearchIcon/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +23 -8
- package/build/features/shared/SuccessScreen/SuccessScreen.js +9 -7
- package/build/features/shared/{UploadFile/UploadFile.d.ts → TextField/TextField.d.ts} +14 -24
- package/build/features/shared/TextField/TextField.js +63 -0
- package/build/features/shared/TextField/index.d.ts +3 -0
- package/build/features/shared/TextField/index.js +2 -0
- package/build/features/shared/TextFieldSelect/TextFieldSelect.d.ts +4 -0
- package/build/features/shared/TextFieldSelect/TextFieldSelect.js +32 -0
- package/build/features/shared/TextFieldSelect/index.d.ts +2 -0
- package/build/features/shared/TextFieldSelect/index.js +2 -0
- package/build/features/shared/TitleDescription/TitleDescription.d.ts +9 -0
- package/build/features/shared/TitleDescription/TitleDescription.js +77 -0
- package/build/features/shared/TitleDescription/index.d.ts +2 -0
- package/build/features/shared/TitleDescription/index.js +2 -0
- package/build/features/shared/UploadFile/FileUpload.d.ts +8 -2
- package/build/features/shared/UploadFile/FileUpload.js +58 -31
- package/build/features/shared/UploadFile/UploadWrapper.js +7 -3
- package/build/features/shared/UploadFile/index.d.ts +1 -2
- package/build/features/shared/UploadFile/index.js +1 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +8 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.js +58 -31
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +14 -9
- package/build/features/signIn/SignIn.js +3 -3
- package/build/features/signIn/screens/Mobile/MobileNumber.js +7 -4
- package/build/features/tax/Tax.js +3 -3
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/tax/screens/Success/Success.js +13 -1
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +7 -16
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +2 -2
- package/build/features/tax/screens/TaxDetails/VATId.js +7 -2
- package/build/features/tax/screens/Verify/Verify.js +9 -9
- package/build/hooks/useAppConfig.js +10 -1
- package/build/theme/palette.js +81 -27
- package/build/theme/shadows.js +7 -7
- package/build/theme/typography.js +3 -3
- package/build/utils/array.d.ts +1 -1
- package/build/utils/array.js +2 -2
- package/build/utils/string.js +14 -16
- package/package.json +3 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +0 -10
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +0 -143
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +0 -37
- package/build/features/business/screens/Activities/ActivitiesList.js +0 -292
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +0 -8
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +0 -138
- package/build/features/connect/screens/Mobile/Title.d.ts +0 -8
- package/build/features/connect/screens/Mobile/Title.js +0 -29
- package/build/features/connectExpress/screens/Mobile/Title.d.ts +0 -8
- package/build/features/connectExpress/screens/Mobile/Title.js +0 -29
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +0 -38
- package/build/features/entity/screens/EntityCapital/ActivityList.js +0 -290
- package/build/features/shared/UploadFile/UploadFile.js +0 -91
|
@@ -18,13 +18,14 @@ import { handleCurrentActiveScreen, handlePrevScreenStep, settingsSelector } fro
|
|
|
18
18
|
import Box from '@mui/material/Box';
|
|
19
19
|
import { alpha, styled } from '@mui/material/styles';
|
|
20
20
|
import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
|
|
21
|
+
import { DropDownMode } from '../../../../@types';
|
|
21
22
|
import { convertToEnglishDateFormat, deepCopy, getUserName } from '../../../../utils';
|
|
22
23
|
import Form from '../../../../components/Form';
|
|
23
24
|
import Collapse from '../../../../components/Collapse';
|
|
24
25
|
import Text from '../../../../components/Text';
|
|
25
26
|
import { clearError, individualSelector, retrieveBoardStatus, updateIndividualPersonalInfo } from '../../../app/individual/individualStore';
|
|
26
27
|
import Button from '../../../shared/Button';
|
|
27
|
-
import
|
|
28
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
28
29
|
import { IndividualInfoValidationSchema } from './validation';
|
|
29
30
|
import Name from './Name';
|
|
30
31
|
import MobileNumber from './MobileNumber';
|
|
@@ -56,6 +57,7 @@ var IndividualPersonalInfo = function (_a) {
|
|
|
56
57
|
var dispatch = useAppDispatch();
|
|
57
58
|
var _l = useAppSelector(individualSelector), data = _l.data, loading = _l.loading, error = _l.error, cityLoading = _l.cityLoading;
|
|
58
59
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
60
|
+
var isPopupMode = settingsData.dropDownOpenMode === DropDownMode.popup;
|
|
59
61
|
var countries = settingsData.countries;
|
|
60
62
|
var verify = data.verify, individualPersonalData = data.individualPersonalData;
|
|
61
63
|
var _m = verify.responseBody || {}, user = _m.user, flows = _m.flows;
|
|
@@ -156,7 +158,8 @@ var IndividualPersonalInfo = function (_a) {
|
|
|
156
158
|
dispatch(retrieveBoardStatus());
|
|
157
159
|
};
|
|
158
160
|
var handleMenuClick = function (flag) {
|
|
159
|
-
|
|
161
|
+
if (!isPopupMode)
|
|
162
|
+
setListActive(flag);
|
|
160
163
|
};
|
|
161
164
|
var handleDobActive = function (flag) {
|
|
162
165
|
setDobActive(flag);
|
|
@@ -172,11 +175,11 @@ var IndividualPersonalInfo = function (_a) {
|
|
|
172
175
|
var isBirthCountryListActive = listActive === ListType.BirthCountryList;
|
|
173
176
|
var isBirthCityListActive = listActive === ListType.BirthCityList;
|
|
174
177
|
var isNationalityListActive = listActive === ListType.NationalityList;
|
|
175
|
-
return (_jsx(
|
|
178
|
+
return (_jsx(ContainerWithHeader, __assign({ onBack: function () { return onBack(); }, title: 'individual_personal_title', description: 'individual_personal_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Box, { children: [_jsx(Name, { show: showField, readOnly: readOnly['name'] || (noneEditable['name.en'] && noneEditable['name.ar']), isVerified: isNameVerified }), _jsx(MobileNumber, { isPopupMode: isPopupMode, readOnly: readOnly['mobile'] || noneEditable['contact.phone.number'] || noneEditable['contact.phone.country_code'], show: !isDateFieldActive && !isBirthCountryListActive && !isBirthCityListActive && !isNationalityListActive && !isIssuedCountryListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.MobileCountryList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isPhoneNumberVerified }), _jsx(Email, { show: showField, readOnly: readOnly['email'] || noneEditable['contact.email'], isVerified: isEmailVerified }), _jsx(Gender, { show: showField, readOnly: readOnly['gender'] || noneEditable['gender'], isVerified: isGenderVerified }), _jsx(ID, { show: showField, readOnly: readOnly['nid'] || noneEditable['identification.id'], isVerified: isIDVerified }), _jsx(IssuedCountry, { isPopupMode: isPopupMode, readOnly: readOnly['issuedCountry'] || noneEditable['identification.issuer_country'], show: !isMobileCountryListActive && !isDateFieldActive && !isBirthCountryListActive && !isBirthCityListActive && !isNationalityListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.IssuedCountryList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isIssuedCountryVerified }), _jsx(ExpiryDate, { show: !listActive && !dobActive, onDateClicked: handleExpiryDateActive, readOnly: readOnly['expiryDate'] || noneEditable['identification.expiry'], isVerified: isExpiryDateVerified }), _jsx(DOB, { show: !listActive && !expiryDateActive, onDateClicked: handleDobActive, readOnly: readOnly['dob'] || noneEditable['birth.date'], isVerified: isDOBVerified }), _jsx(BirthCountry, { isPopupMode: isPopupMode, readOnly: readOnly['placeOfBirthCountry'] || noneEditable['birth.country'], show: !isMobileCountryListActive && !isDateFieldActive && !isIssuedCountryListActive && !isBirthCityListActive && !isNationalityListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.BirthCountryList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isBirthCountryVerified }), _jsx(BirthCity, { isPopupMode: isPopupMode, readOnly: readOnly['placeOfBirthCity'] || noneEditable['birth.city'], show: !isMobileCountryListActive &&
|
|
176
179
|
!isDateFieldActive &&
|
|
177
180
|
!isIssuedCountryListActive &&
|
|
178
181
|
!isBirthCountryListActive &&
|
|
179
|
-
!isNationalityListActive, onListOpen: function () { return handleMenuClick(ListType.BirthCityList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isBirthCityVerified }), _jsx(Nationality, { readOnly: readOnly['nationality'] || noneEditable['nationality'], show: !isMobileCountryListActive && !isDateFieldActive && !isIssuedCountryListActive && !isBirthCityListActive && !isBirthCountryListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.NationalityList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isNationalityVerified })] }), _jsx(Collapse, __assign({ in: showField, timeout: 500 }, { children: _jsx(Button, __assign({
|
|
182
|
+
!isNationalityListActive, onListOpen: function () { return handleMenuClick(ListType.BirthCityList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isBirthCityVerified }), _jsx(Nationality, { isPopupMode: isPopupMode, readOnly: readOnly['nationality'] || noneEditable['nationality'], show: !isMobileCountryListActive && !isDateFieldActive && !isIssuedCountryListActive && !isBirthCityListActive && !isBirthCountryListActive, countries: countries, onListOpen: function () { return handleMenuClick(ListType.NationalityList); }, onListClose: function () { return handleMenuClick(); }, isVerified: isNationalityVerified })] }), _jsx(Collapse, __assign({ in: showField, timeout: 500 }, { children: _jsx(Button, __assign({ disableBack: true, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) })));
|
|
180
183
|
};
|
|
181
184
|
IndividualPersonalInfo.defaultProps = {};
|
|
182
185
|
export default React.memo(IndividualPersonalInfo);
|
|
@@ -7,6 +7,7 @@ interface IssuedCountryProps {
|
|
|
7
7
|
onListClose?: () => void;
|
|
8
8
|
readOnly?: boolean;
|
|
9
9
|
isVerified?: boolean;
|
|
10
|
+
isPopupMode: boolean;
|
|
10
11
|
}
|
|
11
12
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<IssuedCountryProps & React.RefAttributes<unknown>>>;
|
|
12
13
|
export default _default;
|
|
@@ -27,23 +27,25 @@ import { useTranslation } from 'react-i18next';
|
|
|
27
27
|
import { useController, useFormContext } from 'react-hook-form';
|
|
28
28
|
import { styled } from '@mui/material/styles';
|
|
29
29
|
import { useLanguage } from '../../../../hooks';
|
|
30
|
+
import { ThemeMode } from '../../../../@types';
|
|
30
31
|
import Collapse from '../../../../components/Collapse';
|
|
31
32
|
import Text from '../../../../components/Text';
|
|
32
33
|
import SimpleList from '../../../../components/SimpleList';
|
|
33
34
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
34
|
-
import InputSelect from '../../../shared/
|
|
35
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
35
36
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
36
37
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
38
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
37
39
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
38
40
|
display: 'flex'
|
|
39
41
|
}); });
|
|
40
42
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
41
43
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
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) }));
|
|
44
|
+
return (__assign(__assign({ color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
43
45
|
});
|
|
44
46
|
var IssuedCountry = React.forwardRef(function (_a, ref) {
|
|
45
47
|
var _b, _c, _d;
|
|
46
|
-
var countries = _a.countries, readOnly = _a.readOnly, isVerified = _a.isVerified, rest = __rest(_a, ["countries", "readOnly", "isVerified"]);
|
|
48
|
+
var countries = _a.countries, readOnly = _a.readOnly, isVerified = _a.isVerified, isPopupMode = _a.isPopupMode, rest = __rest(_a, ["countries", "readOnly", "isVerified", "isPopupMode"]);
|
|
47
49
|
var _e = React.useState(countries), locationCountries = _e[0], setCountries = _e[1];
|
|
48
50
|
var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
|
|
49
51
|
var t = useTranslation().t;
|
|
@@ -69,7 +71,11 @@ var IssuedCountry = React.forwardRef(function (_a, ref) {
|
|
|
69
71
|
};
|
|
70
72
|
var location = issuedCountryControl.field.value;
|
|
71
73
|
var error = (_b = issuedCountryControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
72
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt:
|
|
74
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 1.5 } }, { children: [_jsx(InputSelect, { label: t('issued_country_label'), InputProps: {
|
|
75
|
+
endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified })
|
|
76
|
+
}, inputProps: {
|
|
77
|
+
readOnly: readOnly
|
|
78
|
+
}, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, 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) || '', helperText: error && t(error) }), _jsx(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseCountrySelect }, { children: _jsx(SimpleList, { isPopupMode: isPopupMode, searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
73
79
|
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 })] }));
|
|
74
80
|
} }) }))] })) })));
|
|
75
81
|
});
|
|
@@ -7,6 +7,7 @@ interface MobileNumberProps {
|
|
|
7
7
|
onListClose?: () => void;
|
|
8
8
|
readOnly?: boolean;
|
|
9
9
|
isVerified?: boolean;
|
|
10
|
+
isPopupMode: boolean;
|
|
10
11
|
}
|
|
11
12
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<MobileNumberProps & React.RefAttributes<unknown>>>;
|
|
12
13
|
export default _default;
|
|
@@ -25,25 +25,19 @@ import * as React from 'react';
|
|
|
25
25
|
import { useTranslation } from 'react-i18next';
|
|
26
26
|
import { useController, useFormContext } from 'react-hook-form';
|
|
27
27
|
import Box from '@mui/material/Box';
|
|
28
|
-
import { styled
|
|
28
|
+
import { styled } from '@mui/material/styles';
|
|
29
29
|
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
30
30
|
import { useLanguage } from '../../../../hooks';
|
|
31
|
+
import { ThemeMode } from '../../../../@types';
|
|
31
32
|
import Text from '../../../../components/Text';
|
|
32
33
|
import Collapse from '../../../../components/Collapse';
|
|
33
34
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
34
35
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
36
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
36
37
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
37
|
-
import Input from '../../../shared/
|
|
38
|
+
import Input from '../../../shared/TextField';
|
|
38
39
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
39
|
-
|
|
40
|
-
var theme = _a.theme;
|
|
41
|
-
return ({
|
|
42
|
-
display: 'flex',
|
|
43
|
-
justifyContent: 'space-between',
|
|
44
|
-
padding: theme.spacing(0, 2.5, 1.25, 2.5)
|
|
45
|
-
});
|
|
46
|
-
});
|
|
40
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
47
41
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
48
42
|
display: 'flex'
|
|
49
43
|
}); });
|
|
@@ -51,38 +45,45 @@ var CountryCodeText = styled(Text, {
|
|
|
51
45
|
shouldForwardProp: function (prop) { return prop !== 'isSelected'; }
|
|
52
46
|
})(function (_a) {
|
|
53
47
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
54
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { width: theme.spacing(10), textAlign: 'start', fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
|
|
48
|
+
return (__assign(__assign({ color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { width: theme.spacing(10), textAlign: 'start', fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
|
|
55
49
|
});
|
|
56
50
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
57
51
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
58
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
52
|
+
return (__assign(__assign({ color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
59
53
|
});
|
|
60
|
-
var CountryCodeStyled = styled(Text)(function (_a) {
|
|
61
|
-
var theme = _a.theme;
|
|
62
|
-
return (__assign(__assign({ cursor: 'pointer' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightRegular, display: 'flex', alignItems: 'center', minWidth: theme.spacing(8.75) }));
|
|
54
|
+
var CountryCodeStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'readOnly'; } })(function (_a) {
|
|
55
|
+
var theme = _a.theme, readOnly = _a.readOnly;
|
|
56
|
+
return (__assign(__assign({ cursor: readOnly ? 'auto' : 'pointer', color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { fontWeight: theme.typography.fontWeightRegular, display: 'flex', alignItems: 'center', minWidth: theme.spacing(8.75), position: 'relative', bottom: theme.spacing(-1.125) }));
|
|
63
57
|
});
|
|
64
|
-
var
|
|
65
|
-
var theme = _a.theme;
|
|
66
|
-
return (
|
|
58
|
+
var ExpandIconStyled = styled(ExpandIcon, { shouldForwardProp: function (prop) { return prop !== 'readOnly'; } })(function (_a) {
|
|
59
|
+
var theme = _a.theme, readOnly = _a.readOnly;
|
|
60
|
+
return ({
|
|
61
|
+
cursor: readOnly ? 'auto' : 'pointer',
|
|
62
|
+
marginInlineStart: theme.spacing(1)
|
|
63
|
+
});
|
|
67
64
|
});
|
|
68
|
-
var
|
|
65
|
+
var CodeExpandIconStyled = styled(ExpandIconStyled)(function (_a) {
|
|
69
66
|
var theme = _a.theme;
|
|
70
67
|
return ({
|
|
71
|
-
|
|
68
|
+
width: theme.spacing(0.875),
|
|
69
|
+
height: theme.spacing(0.875)
|
|
72
70
|
});
|
|
73
71
|
});
|
|
74
72
|
var InputStyled = styled(Input)(function (_a) {
|
|
75
|
-
var
|
|
73
|
+
var inputProps = _a.inputProps;
|
|
76
74
|
return ({
|
|
77
75
|
direction: 'ltr',
|
|
78
76
|
'& .MuiInputBase-input': {
|
|
79
|
-
cursor: readOnly ? 'default' : 'pointer'
|
|
77
|
+
cursor: (inputProps === null || inputProps === void 0 ? void 0 : inputProps.readOnly) ? 'default' : 'pointer'
|
|
78
|
+
},
|
|
79
|
+
label: {
|
|
80
|
+
transformOrigin: 'top left'
|
|
80
81
|
}
|
|
81
82
|
});
|
|
82
83
|
});
|
|
83
84
|
var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
84
85
|
var _b, _c, _d;
|
|
85
|
-
var countries = _a.countries, readOnly = _a.readOnly, isVerified = _a.isVerified, rest = __rest(_a, ["countries", "readOnly", "isVerified"]);
|
|
86
|
+
var countries = _a.countries, readOnly = _a.readOnly, isVerified = _a.isVerified, isPopupMode = _a.isPopupMode, rest = __rest(_a, ["countries", "readOnly", "isVerified", "isPopupMode"]);
|
|
86
87
|
var _e = React.useState(countries || []), countriesCode = _e[0], setCountries = _e[1];
|
|
87
88
|
var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
|
|
88
89
|
var t = useTranslation().t;
|
|
@@ -135,7 +136,13 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
135
136
|
setValue('mobile', '');
|
|
136
137
|
countryCodeControl.field.onChange(country);
|
|
137
138
|
};
|
|
138
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { mb:
|
|
139
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { mb: 1.5 } }, { children: [_jsx(InputStyled, { label: t('signup_enter_mobile'), inputProps: {
|
|
140
|
+
maxLength: requiredLen,
|
|
141
|
+
readOnly: readOnly
|
|
142
|
+
}, InputProps: {
|
|
143
|
+
startAdornment: (_jsxs(CountryCodeStyled, __assign({ readOnly: readOnly, onClick: readOnly ? undefined : function () { return toggleCountryList(); } }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), !anchorEl && _jsx(CodeExpandIconStyled, { readOnly: readOnly, anchorEl: !!anchorEl })] }))),
|
|
144
|
+
endAdornment: !!anchorEl ? (_jsx(ExpandIconStyled, { onClick: function () { return toggleCountryList(); }, anchorEl: !!anchorEl })) : (_jsx(EndAdornment, { value: mobileValue, isVerified: isVerified, onClear: clearMobileNumber, error: error }))
|
|
145
|
+
}, type: 'tel', disabled: !!anchorEl, onClick: onCloseCountryList, onChange: onPhoneNumberChange, value: !!anchorEl ? countryName : mobileValue, placeholder: "".concat(isSA ? '5' : '0', "00000000"), helperText: error && t(error, { length: requiredLen, number: '05|5' }) }), _jsx(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseCountryList }, { children: _jsx(SimpleList, { isPopupMode: isPopupMode, searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
139
146
|
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 })] }));
|
|
140
147
|
} }) }))] })) })));
|
|
141
148
|
});
|
|
@@ -17,7 +17,7 @@ import { styled } from '@mui/material/styles';
|
|
|
17
17
|
import { removeAllOtherThanAlphabetAndSpace } from '../../../../utils';
|
|
18
18
|
import Collapse from '../../../../components/Collapse';
|
|
19
19
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
|
-
import Input from '../../../shared/
|
|
20
|
+
import Input from '../../../shared/TextField';
|
|
21
21
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
22
22
|
var InputStyled = styled(Input)(function () { return ({
|
|
23
23
|
input: {
|
|
@@ -39,6 +39,10 @@ var Name = function (_a) {
|
|
|
39
39
|
var clearNumber = function () {
|
|
40
40
|
nameControl.field.onChange('');
|
|
41
41
|
};
|
|
42
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mb:
|
|
42
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mb: 1.5 } }, { children: _jsx(InputStyled, { InputProps: {
|
|
43
|
+
endAdornment: _jsx(EndAdornment, { value: nameValue, isVerified: isVerified, onClear: clearNumber, error: error })
|
|
44
|
+
}, inputProps: {
|
|
45
|
+
readOnly: readOnly
|
|
46
|
+
}, label: t('signup_merchant_name_label'), value: nameValue, onChange: handleNameChange, placeholder: t('signup_merchant_name_label'), helperText: error && t(error) }) })) })));
|
|
43
47
|
};
|
|
44
48
|
export default React.memo(Name);
|
|
@@ -7,6 +7,7 @@ interface NationalityProps {
|
|
|
7
7
|
onListClose?: () => void;
|
|
8
8
|
readOnly?: boolean;
|
|
9
9
|
isVerified?: boolean;
|
|
10
|
+
isPopupMode: boolean;
|
|
10
11
|
}
|
|
11
12
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<NationalityProps & React.RefAttributes<unknown>>>;
|
|
12
13
|
export default _default;
|
|
@@ -27,23 +27,25 @@ import { useTranslation } from 'react-i18next';
|
|
|
27
27
|
import { useController, useFormContext } from 'react-hook-form';
|
|
28
28
|
import { styled } from '@mui/material/styles';
|
|
29
29
|
import { useLanguage } from '../../../../hooks';
|
|
30
|
+
import { ThemeMode } from '../../../../@types';
|
|
30
31
|
import Collapse from '../../../../components/Collapse';
|
|
31
32
|
import Text from '../../../../components/Text';
|
|
32
33
|
import SimpleList from '../../../../components/SimpleList';
|
|
33
34
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
34
|
-
import InputSelect from '../../../shared/
|
|
35
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
35
36
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
36
37
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
38
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
37
39
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
38
40
|
display: 'flex'
|
|
39
41
|
}); });
|
|
40
42
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
41
43
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
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) }));
|
|
44
|
+
return (__assign(__assign({ color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
43
45
|
});
|
|
44
46
|
var Nationality = React.forwardRef(function (_a, ref) {
|
|
45
47
|
var _b, _c, _d;
|
|
46
|
-
var countries = _a.countries, readOnly = _a.readOnly, isVerified = _a.isVerified, rest = __rest(_a, ["countries", "readOnly", "isVerified"]);
|
|
48
|
+
var isPopupMode = _a.isPopupMode, countries = _a.countries, readOnly = _a.readOnly, isVerified = _a.isVerified, rest = __rest(_a, ["isPopupMode", "countries", "readOnly", "isVerified"]);
|
|
47
49
|
var _e = React.useState(countries), locationCountries = _e[0], setCountries = _e[1];
|
|
48
50
|
var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
|
|
49
51
|
var t = useTranslation().t;
|
|
@@ -69,7 +71,11 @@ var Nationality = React.forwardRef(function (_a, ref) {
|
|
|
69
71
|
};
|
|
70
72
|
var location = nationalityControl.field.value;
|
|
71
73
|
var error = (_b = nationalityControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
72
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt:
|
|
74
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { pt: 1.5 } }, { children: [_jsx(InputSelect, { label: t('nationality_label'), InputProps: {
|
|
75
|
+
endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl, isVerified: isVerified })
|
|
76
|
+
}, inputProps: {
|
|
77
|
+
readOnly: readOnly
|
|
78
|
+
}, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, 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(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseCountrySelect }, { children: _jsx(SimpleList, { isPopupMode: isPopupMode, searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: locationCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
73
79
|
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 })] }));
|
|
74
80
|
} }) }))] })) })));
|
|
75
81
|
});
|
|
@@ -8,6 +8,7 @@ interface MobileNumberProps {
|
|
|
8
8
|
onListClose?: () => void;
|
|
9
9
|
sx?: SxProps<Theme>;
|
|
10
10
|
readOnly?: boolean;
|
|
11
|
+
isPopupMode: boolean;
|
|
11
12
|
}
|
|
12
13
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<MobileNumberProps & React.RefAttributes<unknown>>>;
|
|
13
14
|
export default _default;
|
|
@@ -25,9 +25,10 @@ import * as React from 'react';
|
|
|
25
25
|
import { useTranslation } from 'react-i18next';
|
|
26
26
|
import { useController, useFormContext } from 'react-hook-form';
|
|
27
27
|
import Box from '@mui/material/Box';
|
|
28
|
-
import { styled
|
|
28
|
+
import { styled } from '@mui/material/styles';
|
|
29
29
|
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
30
|
-
import { useLanguage
|
|
30
|
+
import { useLanguage } from '../../../../hooks';
|
|
31
|
+
import { ThemeMode } from '../../../../@types';
|
|
31
32
|
import Text from '../../../../components/Text';
|
|
32
33
|
import Collapse from '../../../../components/Collapse';
|
|
33
34
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
@@ -35,16 +36,8 @@ import SimpleList from '../../../../components/SimpleList';
|
|
|
35
36
|
import ClearIcon from '../../../shared/ClearIcon';
|
|
36
37
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
38
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
38
|
-
import Input from '../../../shared/
|
|
39
|
-
import
|
|
40
|
-
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
41
|
-
var theme = _a.theme;
|
|
42
|
-
return ({
|
|
43
|
-
display: 'flex',
|
|
44
|
-
justifyContent: 'space-between',
|
|
45
|
-
padding: theme.spacing(0, 2.5, 1.25, 2.5)
|
|
46
|
-
});
|
|
47
|
-
});
|
|
39
|
+
import Input from '../../../shared/TextField';
|
|
40
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
48
41
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
49
42
|
display: 'flex'
|
|
50
43
|
}); });
|
|
@@ -52,41 +45,47 @@ var CountryCodeText = styled(Text, {
|
|
|
52
45
|
shouldForwardProp: function (prop) { return prop !== 'isSelected'; }
|
|
53
46
|
})(function (_a) {
|
|
54
47
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
55
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { width: theme.spacing(10), textAlign: 'start', fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
|
|
48
|
+
return (__assign(__assign({ color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { width: theme.spacing(10), textAlign: 'start', fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
|
|
56
49
|
});
|
|
57
50
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
58
51
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
59
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
52
|
+
return (__assign(__assign({ color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
60
53
|
});
|
|
61
|
-
var CountryCodeStyled = styled(Text)(function (_a) {
|
|
62
|
-
var theme = _a.theme;
|
|
63
|
-
return (__assign(__assign({ cursor: 'pointer' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightRegular, display: 'flex', alignItems: 'center', minWidth: theme.spacing(8.75) }));
|
|
54
|
+
var CountryCodeStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'readOnly'; } })(function (_a) {
|
|
55
|
+
var theme = _a.theme, readOnly = _a.readOnly;
|
|
56
|
+
return (__assign(__assign({ cursor: readOnly ? 'auto' : 'pointer', color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { fontWeight: theme.typography.fontWeightRegular, display: 'flex', alignItems: 'center', minWidth: theme.spacing(8.75), position: 'relative', bottom: theme.spacing(-1.125) }));
|
|
64
57
|
});
|
|
65
|
-
var
|
|
66
|
-
var theme = _a.theme;
|
|
67
|
-
return (
|
|
58
|
+
var ExpandIconStyled = styled(ExpandIcon, { shouldForwardProp: function (prop) { return prop !== 'readOnly'; } })(function (_a) {
|
|
59
|
+
var theme = _a.theme, readOnly = _a.readOnly;
|
|
60
|
+
return ({
|
|
61
|
+
cursor: readOnly ? 'auto' : 'pointer',
|
|
62
|
+
marginInlineStart: theme.spacing(1)
|
|
63
|
+
});
|
|
68
64
|
});
|
|
69
|
-
var
|
|
65
|
+
var CodeExpandIconStyled = styled(ExpandIconStyled)(function (_a) {
|
|
70
66
|
var theme = _a.theme;
|
|
71
67
|
return ({
|
|
72
|
-
|
|
68
|
+
width: theme.spacing(0.875),
|
|
69
|
+
height: theme.spacing(0.875)
|
|
73
70
|
});
|
|
74
71
|
});
|
|
75
72
|
var InputStyled = styled(Input)(function () { return ({
|
|
76
73
|
direction: 'ltr',
|
|
77
74
|
'& .MuiInputBase-input': {
|
|
78
75
|
cursor: 'auto'
|
|
76
|
+
},
|
|
77
|
+
label: {
|
|
78
|
+
transformOrigin: 'top left'
|
|
79
79
|
}
|
|
80
80
|
}); });
|
|
81
81
|
var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
82
82
|
var _b, _c, _d;
|
|
83
|
-
var countries = _a.countries, sx = _a.sx, readOnly = _a.readOnly, rest = __rest(_a, ["countries", "sx", "readOnly"]);
|
|
83
|
+
var countries = _a.countries, sx = _a.sx, readOnly = _a.readOnly, isPopupMode = _a.isPopupMode, rest = __rest(_a, ["countries", "sx", "readOnly", "isPopupMode"]);
|
|
84
84
|
var _e = React.useState(countries || []), countriesCode = _e[0], setCountries = _e[1];
|
|
85
85
|
var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
|
|
86
86
|
var t = useTranslation().t;
|
|
87
87
|
var isAr = useLanguage().isAr;
|
|
88
88
|
var _g = useFormContext(), control = _g.control, setValue = _g.setValue;
|
|
89
|
-
var data = useAppSelector(individualSelector).data;
|
|
90
89
|
var phoneControl = useController({ name: 'mobile', control: control });
|
|
91
90
|
var countryCodeControl = useController({ name: 'countryCode', control: control });
|
|
92
91
|
var countryCodeValue = countryCodeControl.field.value;
|
|
@@ -97,7 +96,6 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
97
96
|
var mobileLen = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits;
|
|
98
97
|
var isStartsWith5 = mobileValue.startsWith('5');
|
|
99
98
|
var requiredLen = isSA && isStartsWith5 ? mobileLen - 1 : mobileLen;
|
|
100
|
-
var verify = data.verify;
|
|
101
99
|
React.useEffect(function () {
|
|
102
100
|
if (mobileValue)
|
|
103
101
|
setValue('mobile', mobileValue, { shouldValidate: true });
|
|
@@ -135,11 +133,17 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
135
133
|
setValue('mobile', '');
|
|
136
134
|
countryCodeControl.field.onChange(country);
|
|
137
135
|
};
|
|
138
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: sx }, { children: [_jsx(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: sx }, { children: [_jsx(InputStyled, { label: t('signup_enter_mobile'), InputProps: {
|
|
137
|
+
startAdornment: (_jsxs(CountryCodeStyled, __assign({ readOnly: readOnly, onClick: function () {
|
|
138
|
+
if (readOnly)
|
|
139
|
+
return;
|
|
140
|
+
toggleCountryList();
|
|
141
|
+
} }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), !anchorEl && _jsx(CodeExpandIconStyled, { readOnly: readOnly, anchorEl: !!anchorEl })] }))),
|
|
142
|
+
endAdornment: !!anchorEl ? (_jsx(ExpandIconStyled, { onClick: function () { return toggleCountryList(); }, anchorEl: !!anchorEl })) : !error && mobileValue ? (_jsx(CheckIcon, {})) : (mobileValue && _jsx(ClearIcon, { onClick: clearMobileNumber }))
|
|
143
|
+
}, inputProps: {
|
|
144
|
+
maxLength: requiredLen,
|
|
145
|
+
readOnly: readOnly
|
|
146
|
+
}, type: 'tel', disabled: !!anchorEl, onClick: onCloseCountryList, onChange: onPhoneNumberChange, value: !!anchorEl ? countryName : mobileValue, placeholder: "".concat(isSA ? '5' : '0', "00000000"), helperText: error && t(error, { length: requiredLen, number: '05|5' }) }), _jsx(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseCountryList }, { children: _jsx(SimpleList, { isPopupMode: isPopupMode, searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
143
147
|
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, {})] }));
|
|
144
148
|
} }) }))] })) })));
|
|
145
149
|
});
|
|
@@ -18,9 +18,10 @@ import { styled } from '@mui/material/styles';
|
|
|
18
18
|
import { settingsSelector } from '../../../../app/settings';
|
|
19
19
|
import { useAppDispatch, useExcludeReadOnlyFelids, useFormErrorAndUpdateReadOnly, useFormReadOnly, useSetFromDefaultValues } from '../../../../hooks';
|
|
20
20
|
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
21
|
+
import { DropDownMode } from '../../../../@types';
|
|
21
22
|
import Form from '../../../../components/Form';
|
|
22
23
|
import Collapse from '../../../../components/Collapse';
|
|
23
|
-
import {
|
|
24
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
24
25
|
import { individualSelector, clearError, updatePhoneInfo } from '../../../app/individual/individualStore';
|
|
25
26
|
import Button from '../../../shared/Button';
|
|
26
27
|
import { IndividualPhoneInfoValidationSchema } from './validation';
|
|
@@ -35,6 +36,7 @@ var PhoneInfo = function (_a) {
|
|
|
35
36
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
36
37
|
var countries = settingsData.countries;
|
|
37
38
|
var _b = useAppSelector(individualSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
39
|
+
var isPopupMode = settingsData.dropDownOpenMode === DropDownMode.popup;
|
|
38
40
|
var _c = data.individualPhoneInfo, mobile = _c.mobile, countryCode = _c.countryCode;
|
|
39
41
|
var methods = useForm({
|
|
40
42
|
resolver: yupResolver(IndividualPhoneInfoValidationSchema),
|
|
@@ -59,6 +61,12 @@ var PhoneInfo = function (_a) {
|
|
|
59
61
|
dispatch(clearError());
|
|
60
62
|
}, [methods.formState.isValid]);
|
|
61
63
|
var disabled = !methods.formState.isValid || !!error;
|
|
62
|
-
return (_jsx(
|
|
64
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'individual_phone_title', description: 'individual_phone_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(MobileNumber, { isPopupMode: isPopupMode, readOnly: readOnly['mobile'], show: true, sx: { mb: 7.5 }, countries: countries, onListOpen: function () {
|
|
65
|
+
if (!isPopupMode)
|
|
66
|
+
setListActive(true);
|
|
67
|
+
}, onListClose: function () {
|
|
68
|
+
if (!isPopupMode)
|
|
69
|
+
setListActive(false);
|
|
70
|
+
} }), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(Button, __assign({ disableBack: true, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) })));
|
|
63
71
|
};
|
|
64
72
|
export default React.memo(PhoneInfo);
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import * as React from 'react';
|
|
3
14
|
import { Trans, useTranslation } from 'react-i18next';
|
|
4
15
|
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
5
16
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
6
18
|
import { maskEmail } from '../../../../utils';
|
|
7
19
|
import { individualSelector } from '../../../../features/app/individual/individualStore';
|
|
8
20
|
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
@@ -16,6 +28,6 @@ var ResetPasswordSuccess = function (_a) {
|
|
|
16
28
|
var onBack = function () {
|
|
17
29
|
dispatch(handlePrevScreenStep());
|
|
18
30
|
};
|
|
19
|
-
return (_jsx(SuccessScreen, { title: t("reset_password_success_title"), description: _jsx(Trans, { i18nKey: 'reset_password_success_description_dev', values: { email: maskedEmail } }), showEmailProviders: true, enableBack: true, onBack: function () { return onBack(); } }));
|
|
31
|
+
return (_jsx(ContainerWithHeader, __assign({ onBack: function () { return onBack(); }, title: 'reset_password_success_header_title', description: 'reset_password_success_header_description' }, { children: _jsx(SuccessScreen, { title: t("reset_password_success_title"), description: _jsx(Trans, { i18nKey: 'reset_password_success_description_dev', values: { email: maskedEmail } }), showEmailProviders: true, enableBack: true, onBack: function () { return onBack(); } }) })));
|
|
20
32
|
};
|
|
21
33
|
export default React.memo(ResetPasswordSuccess);
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import * as React from 'react';
|
|
3
14
|
import { useTranslation } from 'react-i18next';
|
|
4
15
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
16
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
5
17
|
import { individualSelector, updateBoardSuccess } from '../../../app/individual/individualStore';
|
|
6
18
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
7
19
|
var Success = function (_a) {
|
|
@@ -15,6 +27,6 @@ var Success = function (_a) {
|
|
|
15
27
|
var onSuccess = function () {
|
|
16
28
|
setClicked(true);
|
|
17
29
|
};
|
|
18
|
-
return (_jsx(SuccessScreen, { title: t('individual_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: clicked && loading, error: error || '' }));
|
|
30
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'individual_success_header_title', description: 'individual_success_header_description' }, { children: _jsx(SuccessScreen, { title: t('individual_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: clicked && loading, error: error || '' }) })));
|
|
19
31
|
};
|
|
20
32
|
export default React.memo(Success);
|
|
@@ -14,9 +14,10 @@ import { memo } from 'react';
|
|
|
14
14
|
import { useAppSelector } from '../../../../hooks';
|
|
15
15
|
import { individualSelector } from '../../../app/individual/individualStore';
|
|
16
16
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
17
18
|
var SuccessWithFlowButtons = function () {
|
|
18
19
|
var data = useAppSelector(individualSelector).data;
|
|
19
20
|
var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name, individuals = _a.individuals;
|
|
20
|
-
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, 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 || [] }));
|
|
21
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'individual_flows_title' }, { children: _jsx(SuccessFlowButtons, { flowName: data.flowName, 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 || [] }) })));
|
|
21
22
|
};
|
|
22
23
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -21,7 +21,7 @@ import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
|
21
21
|
import { deepCopy, maskPhone } from '../../../../utils';
|
|
22
22
|
import Form from '../../../../components/Form';
|
|
23
23
|
import Text from '../../../../components/Text';
|
|
24
|
-
import {
|
|
24
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
25
25
|
import { individualSelector, clearError, resetOTPScreen, verifyLeadOTP } from '../../../app/individual/individualStore';
|
|
26
26
|
import Button from '../../../shared/Button';
|
|
27
27
|
import { OTPValidation } from './validation';
|
|
@@ -29,17 +29,14 @@ import OTPInput from './OTPInput';
|
|
|
29
29
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
30
30
|
var theme = _a.theme;
|
|
31
31
|
return ({
|
|
32
|
-
background: theme.palette.common.white,
|
|
33
|
-
border: '1px solid',
|
|
34
|
-
borderColor: theme.palette.divider,
|
|
35
32
|
direction: theme.direction,
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
paddingInline: theme.spacing(3),
|
|
34
|
+
paddingBottom: theme.spacing(5)
|
|
38
35
|
});
|
|
39
36
|
});
|
|
40
37
|
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
41
38
|
var theme = _a.theme;
|
|
42
|
-
return (__assign(__assign({}, theme.typography.
|
|
39
|
+
return (__assign(__assign({}, theme.typography.body2), { color: theme.palette.secondary.main, fontWeight: theme.typography.fontWeightRegular, lineHeight: '19px', whiteSpace: 'pre-line' }));
|
|
43
40
|
});
|
|
44
41
|
var FormStyled = styled(Form)(function () { return ({
|
|
45
42
|
display: 'flex',
|
|
@@ -75,6 +72,6 @@ var VerifyNumber = function (_a) {
|
|
|
75
72
|
var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
|
|
76
73
|
var dataLoading = loading || cityLoading;
|
|
77
74
|
var showMobileNumber = !loading && !cityLoading && phone;
|
|
78
|
-
return (_jsx(
|
|
75
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'otp_authentication', description: 'otp_authentication_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [dataLoading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), showMobileNumber && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) })));
|
|
79
76
|
};
|
|
80
77
|
export default React.memo(VerifyNumber);
|