@tap-payments/auth-jsconnect 2.5.22-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 +12 -6
- 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
|
@@ -13,12 +13,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useFormContext, useController } from 'react-hook-form';
|
|
16
|
-
import { styled
|
|
16
|
+
import { styled } from '@mui/material/styles';
|
|
17
17
|
import InfoIcon from '@mui/icons-material/Info';
|
|
18
18
|
import Box from '@mui/material/Box';
|
|
19
19
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
20
20
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
21
|
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
22
|
+
import { ThemeMode } from '../../../../@types';
|
|
22
23
|
import Collapse from '../../../../components/Collapse';
|
|
23
24
|
import RadioGroup from '../../../../components/RadioGroup';
|
|
24
25
|
import RadioLabel from '../../../../components/RadioLabel';
|
|
@@ -29,7 +30,7 @@ import CheckIcon from '../../../shared/CheckIcon';
|
|
|
29
30
|
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
30
31
|
var LabelTextStyled = styled(Text)(function (_a) {
|
|
31
32
|
var theme = _a.theme;
|
|
32
|
-
return (__assign(__assign({}, theme.typography.caption), { color:
|
|
33
|
+
return (__assign(__assign({}, theme.typography.caption), { color: theme.palette.text.secondary, marginBlockEnd: theme.spacing(0.625) }));
|
|
33
34
|
});
|
|
34
35
|
var RadioGroupStyled = styled(RadioGroup)(function (_a) {
|
|
35
36
|
var theme = _a.theme;
|
|
@@ -40,19 +41,25 @@ var RadioGroupStyled = styled(RadioGroup)(function (_a) {
|
|
|
40
41
|
export var InfoIconStyled = styled(InfoIcon)(function (_a) {
|
|
41
42
|
var theme = _a.theme;
|
|
42
43
|
return ({
|
|
44
|
+
position: 'relative',
|
|
45
|
+
top: theme.spacing(0.125),
|
|
43
46
|
width: theme.spacing(2.75),
|
|
44
|
-
height: theme.spacing(
|
|
47
|
+
height: theme.spacing(1.75),
|
|
45
48
|
cursor: 'pointer',
|
|
46
|
-
color:
|
|
49
|
+
color: theme.palette.mode === ThemeMode.DARK ? theme.palette.text.disabled : theme.palette.primary.contrastText,
|
|
50
|
+
display: 'inline-flex'
|
|
47
51
|
});
|
|
48
52
|
});
|
|
49
53
|
export var InfoOutlinedIconStyled = styled(InfoOutlinedIcon)(function (_a) {
|
|
50
54
|
var theme = _a.theme;
|
|
51
55
|
return ({
|
|
56
|
+
position: 'relative',
|
|
57
|
+
top: theme.spacing(0.125),
|
|
52
58
|
width: theme.spacing(2.75),
|
|
53
|
-
height: theme.spacing(
|
|
59
|
+
height: theme.spacing(1.75),
|
|
54
60
|
cursor: 'pointer',
|
|
55
|
-
color:
|
|
61
|
+
color: theme.palette.mode === ThemeMode.DARK ? theme.palette.text.disabled : theme.palette.primary.contrastText,
|
|
62
|
+
display: 'inline-flex'
|
|
56
63
|
});
|
|
57
64
|
});
|
|
58
65
|
var RadioLabelStyled = styled('span')(function () { return ({
|
|
@@ -73,6 +80,6 @@ var PEPSwitch = function (_a) {
|
|
|
73
80
|
pepControl.field.onChange(target.value === 'yes');
|
|
74
81
|
};
|
|
75
82
|
var pepValue = pepControl.field.value;
|
|
76
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl:
|
|
83
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 3, pr: 3 } }, { children: [_jsxs(Box, __assign({ style: { display: 'flex', justifyContent: 'space-between' } }, { children: [_jsxs(LabelTextStyled, { children: [t('tap_js_is_close_relative_in_pep'), _jsx(Mandatory, {})] }), _jsx(Tooltip, __assign({ title: t('pep_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] })), _jsxs(RadioGroupStyled, __assign({ readOnly: readOnly, value: pepValue != null ? (pepValue ? 'yes' : 'no') : false, onChange: readOnly ? undefined : handleOnChange }, { children: [_jsx(RadioLabel, { value: 'yes', label: _jsxs(RadioLabelStyled, { children: [t('yes'), pepValue && isVerified && _jsx(CheckIcon, { sx: { marginInlineStart: '5px' }, isVerified: isVerified })] }) }), _jsx(RadioLabel, { value: 'no', label: _jsxs(RadioLabelStyled, { children: [t('no'), pepValue === false && isVerified && _jsx(CheckIcon, { sx: { marginInlineStart: '5px' }, isVerified: isVerified })] }) })] }))] })) })));
|
|
77
84
|
};
|
|
78
85
|
export default React.memo(PEPSwitch);
|
|
@@ -17,7 +17,7 @@ import Collapse from '@mui/material/Collapse';
|
|
|
17
17
|
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
18
18
|
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
19
19
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
|
-
import Input from '../../../shared/
|
|
20
|
+
import Input from '../../../shared/TextField';
|
|
21
21
|
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
22
22
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
23
23
|
var ShareCount = function (_a) {
|
|
@@ -37,6 +37,10 @@ var ShareCount = function (_a) {
|
|
|
37
37
|
var shareCountControl = useController({ control: control, name: 'shareCount' });
|
|
38
38
|
var shareCountValue = shareCountControl.field.value;
|
|
39
39
|
var error = (_b = shareCountControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
40
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mt:
|
|
40
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 1.5 } }, { children: _jsx(Input, { InputProps: {
|
|
41
|
+
endAdornment: _jsx(EndAdornment, { value: shareCountValue, error: error })
|
|
42
|
+
}, inputProps: {
|
|
43
|
+
readOnly: readOnly
|
|
44
|
+
}, label: t('share_count_label'), onChange: handleChange, value: shareCountValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('share_count_hint'), helperText: error && t(error) }) })) })));
|
|
41
45
|
};
|
|
42
46
|
export default React.memo(ShareCount);
|
|
@@ -18,7 +18,7 @@ import { findCurrencyByIso2, formatNumberAsCurrency, removeAllCharsFromNumber }
|
|
|
18
18
|
import { settingsSelector } from '../../../../app/settings';
|
|
19
19
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
20
20
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
21
|
-
import Input from '../../../shared/
|
|
21
|
+
import Input from '../../../shared/TextField';
|
|
22
22
|
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
23
23
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
24
24
|
var ShareValue = function (_a) {
|
|
@@ -40,8 +40,12 @@ var ShareValue = function (_a) {
|
|
|
40
40
|
var shareValueControl = useController({ control: control, name: 'shareValue' });
|
|
41
41
|
var shareValue = shareValueControl.field.value;
|
|
42
42
|
var error = (_b = shareValueControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
43
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mt:
|
|
43
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 1.5 } }, { children: _jsx(Input, { inputProps: {
|
|
44
|
+
readOnly: readOnly
|
|
45
|
+
}, InputProps: {
|
|
46
|
+
endAdornment: _jsx(EndAdornment, { value: shareValue, error: error })
|
|
47
|
+
}, label: t('share_value_label', {
|
|
44
48
|
currency: t(findCurrencyByIso2(countryCode))
|
|
45
|
-
}), onChange: handleChange, value: shareValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('share_value_hint'),
|
|
49
|
+
}), onChange: handleChange, value: shareValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('share_value_hint'), helperText: error && t(error) }) })) })));
|
|
46
50
|
};
|
|
47
51
|
export default React.memo(ShareValue);
|
|
@@ -16,21 +16,23 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
17
|
import { styled } from '@mui/material/styles';
|
|
18
18
|
import { useAppSelector, useLanguage, useAppDispatch } from '../../../../hooks';
|
|
19
|
+
import { ThemeMode } from '../../../../@types';
|
|
19
20
|
import { hasVerifiedValue } from '../../../../utils';
|
|
20
21
|
import Text from '../../../../components/Text';
|
|
21
22
|
import Collapse from '../../../../components/Collapse';
|
|
22
23
|
import SimpleList from '../../../../components/SimpleList';
|
|
23
24
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
24
25
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
25
|
-
import InputSelect from '../../../shared/
|
|
26
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
26
27
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
27
28
|
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
29
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
28
30
|
var Container = styled(Box)(function () { return ({
|
|
29
31
|
display: 'flex'
|
|
30
32
|
}); });
|
|
31
33
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
32
34
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
33
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
35
|
+
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) }));
|
|
34
36
|
});
|
|
35
37
|
var SourceOfIncome = function (props) {
|
|
36
38
|
var _a, _b;
|
|
@@ -74,7 +76,11 @@ var SourceOfIncome = function (props) {
|
|
|
74
76
|
};
|
|
75
77
|
var source = sourceIncomeControl.field.value;
|
|
76
78
|
var error = (_b = sourceIncomeControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
77
|
-
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb:
|
|
79
|
+
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 1.5 } }, { children: [_jsx(InputSelect, { required: true, label: t('tap_js_source_of_income'), InputProps: {
|
|
80
|
+
endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isSourceIncomeVerified(source), anchorEl: anchorEl })
|
|
81
|
+
}, inputProps: {
|
|
82
|
+
readOnly: props.readOnly
|
|
83
|
+
}, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_any_source_of_income'), value: (isAr ? source === null || source === void 0 ? void 0 : source.name.ar : source === null || source === void 0 ? void 0 : source.name.en) || '', helperText: error && t(error) }), _jsx(DropDownStyle, __assign({ isPopupMode: props.isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseList }, { children: _jsx(SimpleList, { isPopupMode: props.isPopupMode, searchKeyPath: 'name.en', list: sourceList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
78
84
|
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (source === null || source === void 0 ? void 0 : source.id) }, { children: isAr ? item.name.ar : item === null || item === void 0 ? void 0 : item.name.en })) }), item.id === (source === null || source === void 0 ? void 0 : source.id) && _jsx(CheckIcon, { isVerified: isSourceIncomeVerified(item) })] }));
|
|
79
85
|
} }) }))] })) })));
|
|
80
86
|
};
|
|
@@ -26,7 +26,7 @@ var CollectPhoneEmail = function (_a) {
|
|
|
26
26
|
var _c = React.useState(false), emailChecking = _c[0], setEmailChecking = _c[1];
|
|
27
27
|
var isEmailAvailable = isValidEmail(email);
|
|
28
28
|
var _d = React.useState(), listActive = _d[0], setListActive = _d[1];
|
|
29
|
-
return (_jsxs(Box, __assign({ sx: { mt: 1.5 } }, { children: [_jsx(MobileNumber, { sx: { mb: isEmailAvailable ?
|
|
29
|
+
return (_jsxs(Box, __assign({ sx: { mt: 1.5 } }, { children: [_jsx(MobileNumber, { sx: { mb: isEmailAvailable ? 1.5 : 3 }, show: !isPhoneAvailable, countries: countries, onListOpen: function () { return setListActive(true); }, onListClose: function () { return setListActive(false); } }), _jsx(Email, { show: !listActive && !isEmailAvailable, fetchingEmail: function (v) { return setEmailChecking(v); }, emailChecking: emailChecking })] })));
|
|
30
30
|
};
|
|
31
31
|
export default React.memo(CollectPhoneEmail);
|
|
32
32
|
CollectPhoneEmail.defaultProps = {};
|
|
@@ -57,7 +57,7 @@ import { useAppDispatch } from '../../../../hooks';
|
|
|
57
57
|
import { isValidEmail } from '../../../../utils';
|
|
58
58
|
import Collapse from '../../../../components/Collapse';
|
|
59
59
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
60
|
-
import Input from '../../../shared/
|
|
60
|
+
import Input from '../../../shared/TextField';
|
|
61
61
|
import ClearIcon from '../../../shared/ClearIcon';
|
|
62
62
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
63
63
|
import { checkEmailAvailability } from '../../../app/individual/individualStore';
|
|
@@ -108,6 +108,8 @@ var Email = function (_a) {
|
|
|
108
108
|
var clearEmail = function () {
|
|
109
109
|
emailControl.field.onChange('');
|
|
110
110
|
};
|
|
111
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(InputStyled, { label: t('signup_email_lable'), value: emailValue, onEnterPressed: function (e) { return e.preventDefault(); }, onChange: handleEmailChange, type: 'email', placeholder: t('signup_email_placeholder'),
|
|
111
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(InputStyled, { boxSx: { padding: 0 }, label: t('signup_email_lable'), value: emailValue, onEnterPressed: function (e) { return e.preventDefault(); }, onChange: handleEmailChange, type: 'email', placeholder: t('signup_email_placeholder'), helperText: error && t(error), InputProps: {
|
|
112
|
+
endAdornment: emailChecking ? (_jsx(CircularProgress, { size: 25, thickness: 5, sx: { height: 'auto !important' } })) : !error && emailValue ? (_jsx(CheckIcon, {})) : (emailValue && _jsx(ClearIcon, { onClick: clearEmail }))
|
|
113
|
+
} }) }) })));
|
|
112
114
|
};
|
|
113
115
|
export default React.memo(Email);
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const TitleStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
|
-
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
6
|
-
gutterBottom?: boolean | undefined;
|
|
7
|
-
noWrap?: boolean | undefined;
|
|
8
|
-
paragraph?: boolean | undefined;
|
|
9
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
10
|
-
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
|
|
11
|
-
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
|
|
12
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
13
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
14
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
15
|
-
export declare const SubTitleStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
16
|
-
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
19
|
-
gutterBottom?: boolean | undefined;
|
|
20
|
-
noWrap?: boolean | undefined;
|
|
21
|
-
paragraph?: boolean | undefined;
|
|
22
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
23
|
-
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
|
|
24
|
-
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
|
|
25
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
26
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
27
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
1
|
+
/// <reference types="react" />
|
|
28
2
|
export interface IndividualListProps {
|
|
29
3
|
}
|
|
30
4
|
declare const IndividualList: () => JSX.Element;
|
|
@@ -15,11 +15,10 @@ import { styled } from '@mui/material/styles';
|
|
|
15
15
|
import Box from '@mui/material/Box';
|
|
16
16
|
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
17
17
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
18
|
-
import Text from '../../../../components/Text';
|
|
19
18
|
import Button from '../../../../components/Button';
|
|
20
19
|
import Collapse from '../../../../components/Collapse';
|
|
21
20
|
import Warning from '../../../../components/Warning';
|
|
22
|
-
import {
|
|
21
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
23
22
|
import { individualSelector } from '../../../app/individual/individualStore';
|
|
24
23
|
import UserList from './UserList';
|
|
25
24
|
var BoxStyled = styled(Box)(function (_a) {
|
|
@@ -28,24 +27,6 @@ var BoxStyled = styled(Box)(function (_a) {
|
|
|
28
27
|
minHeight: theme.spacing(26.875)
|
|
29
28
|
});
|
|
30
29
|
});
|
|
31
|
-
var ContentStyled = styled(Box)(function (_a) {
|
|
32
|
-
var theme = _a.theme;
|
|
33
|
-
return ({
|
|
34
|
-
display: 'flex',
|
|
35
|
-
justifyContent: 'center',
|
|
36
|
-
flexDirection: 'column',
|
|
37
|
-
alignItems: 'center',
|
|
38
|
-
padding: theme.spacing(0, 2.5, 3, 2.5)
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
export var TitleStyled = styled(Text)(function (_a) {
|
|
42
|
-
var theme = _a.theme;
|
|
43
|
-
return (__assign(__assign({ color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightMedium }, theme.typography.body1), { lineHeight: theme.spacing(2.5), paddingBottom: theme.spacing(1.5) }));
|
|
44
|
-
});
|
|
45
|
-
export var SubTitleStyled = styled(Text)(function (_a) {
|
|
46
|
-
var theme = _a.theme;
|
|
47
|
-
return (__assign(__assign({ color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightRegular }, theme.typography.subtitle2), { lineHeight: theme.spacing(2.5) }));
|
|
48
|
-
});
|
|
49
30
|
var IndividualList = function () {
|
|
50
31
|
var dispatch = useAppDispatch();
|
|
51
32
|
var t = useTranslation().t;
|
|
@@ -53,6 +34,6 @@ var IndividualList = function () {
|
|
|
53
34
|
var onBack = function () {
|
|
54
35
|
dispatch(handlePrevScreenStep());
|
|
55
36
|
};
|
|
56
|
-
return (_jsxs(
|
|
37
|
+
return (_jsxs(ContainerWithHeader, __assign({ onBack: function () { return onBack(); }, title: 'company_individuals', description: 'company_individuals_add_or_request_details' }, { children: [_jsx(BoxStyled, { children: _jsx(UserList, {}) }), _jsxs(Box, __assign({ sx: { ml: 3, mr: 3 } }, { children: [_jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsx(Warning, __assign({ warningType: 'error' }, { children: t(error || '') })) })), _jsx(Button, __assign({ sx: { mt: 1.5, mb: 1.5 }, onClick: function () { return onBack(); }, variant: 'text' }, { children: t('back') }))] }))] })));
|
|
57
38
|
};
|
|
58
39
|
export default IndividualList;
|
|
@@ -25,9 +25,11 @@ 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, useAppSelector } from '../../../../hooks';
|
|
31
|
+
import { DropDownMode, ThemeMode } from '../../../../@types';
|
|
32
|
+
import { settingsSelector } from '../../../../app/settings';
|
|
31
33
|
import Text from '../../../../components/Text';
|
|
32
34
|
import Collapse from '../../../../components/Collapse';
|
|
33
35
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
@@ -35,16 +37,8 @@ import SimpleList from '../../../../components/SimpleList';
|
|
|
35
37
|
import ClearIcon from '../../../shared/ClearIcon';
|
|
36
38
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
37
39
|
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
|
-
});
|
|
40
|
+
import Input from '../../../shared/TextField';
|
|
41
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
48
42
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
49
43
|
display: 'flex'
|
|
50
44
|
}); });
|
|
@@ -52,30 +46,37 @@ var CountryCodeText = styled(Text, {
|
|
|
52
46
|
shouldForwardProp: function (prop) { return prop !== 'isSelected'; }
|
|
53
47
|
})(function (_a) {
|
|
54
48
|
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 }));
|
|
49
|
+
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
50
|
});
|
|
57
51
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
58
52
|
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) }));
|
|
53
|
+
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
54
|
});
|
|
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) }));
|
|
55
|
+
var CountryCodeStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'readOnly'; } })(function (_a) {
|
|
56
|
+
var theme = _a.theme, readOnly = _a.readOnly;
|
|
57
|
+
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
58
|
});
|
|
65
|
-
var
|
|
66
|
-
var theme = _a.theme;
|
|
67
|
-
return (
|
|
59
|
+
var ExpandIconStyled = styled(ExpandIcon, { shouldForwardProp: function (prop) { return prop !== 'readOnly'; } })(function (_a) {
|
|
60
|
+
var theme = _a.theme, readOnly = _a.readOnly;
|
|
61
|
+
return ({
|
|
62
|
+
cursor: readOnly ? 'auto' : 'pointer',
|
|
63
|
+
marginInlineStart: theme.spacing(1)
|
|
64
|
+
});
|
|
68
65
|
});
|
|
69
|
-
var
|
|
66
|
+
var CodeExpandIconStyled = styled(ExpandIconStyled)(function (_a) {
|
|
70
67
|
var theme = _a.theme;
|
|
71
68
|
return ({
|
|
72
|
-
|
|
69
|
+
width: theme.spacing(0.875),
|
|
70
|
+
height: theme.spacing(0.875)
|
|
73
71
|
});
|
|
74
72
|
});
|
|
75
73
|
var InputStyled = styled(Input)(function () { return ({
|
|
76
74
|
direction: 'ltr',
|
|
77
75
|
'& .MuiInputBase-input': {
|
|
78
76
|
cursor: 'auto'
|
|
77
|
+
},
|
|
78
|
+
label: {
|
|
79
|
+
transformOrigin: 'top left'
|
|
79
80
|
}
|
|
80
81
|
}); });
|
|
81
82
|
var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
@@ -86,7 +87,8 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
86
87
|
var t = useTranslation().t;
|
|
87
88
|
var isAr = useLanguage().isAr;
|
|
88
89
|
var _g = useFormContext(), control = _g.control, setValue = _g.setValue;
|
|
89
|
-
var
|
|
90
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
91
|
+
var isPopupMode = settingsData.dropDownOpenMode === DropDownMode.popup;
|
|
90
92
|
var phoneControl = useController({ name: 'mobile', control: control });
|
|
91
93
|
var countryCodeControl = useController({ name: 'countryCode', control: control });
|
|
92
94
|
var countryCodeValue = countryCodeControl.field.value;
|
|
@@ -97,7 +99,6 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
97
99
|
var mobileLen = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits;
|
|
98
100
|
var isStartsWith5 = mobileValue.startsWith('5');
|
|
99
101
|
var requiredLen = isSA && isStartsWith5 ? mobileLen - 1 : mobileLen;
|
|
100
|
-
var verify = data.verify;
|
|
101
102
|
React.useEffect(function () {
|
|
102
103
|
if (mobileValue)
|
|
103
104
|
setValue('mobile', mobileValue, { shouldValidate: true });
|
|
@@ -135,7 +136,12 @@ 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: sx }, { children: [_jsx(
|
|
139
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: sx }, { children: [_jsx(InputStyled, { boxSx: { padding: 0 }, inputProps: {
|
|
140
|
+
maxLength: requiredLen
|
|
141
|
+
}, label: t('signup_enter_mobile'), InputProps: {
|
|
142
|
+
startAdornment: (_jsxs(CountryCodeStyled, __assign({ onClick: function () { return toggleCountryList(); } }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), !anchorEl && _jsx(CodeExpandIconStyled, { anchorEl: !!anchorEl })] }))),
|
|
143
|
+
endAdornment: !!anchorEl ? (_jsx(ExpandIconStyled, { onClick: function () { return toggleCountryList(); }, anchorEl: !!anchorEl })) : !error && mobileValue ? (_jsx(CheckIcon, {})) : (mobileValue && _jsx(ClearIcon, { onClick: clearMobileNumber }))
|
|
144
|
+
}, 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, sx: { ml: 0, mr: 0 } }, { children: _jsx(SimpleList, { isPopupMode: isPopupMode, searchKeyPath: 'name.english', searchValuePath: ['name.arabic', 'name.english'], list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
139
145
|
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, {})] }));
|
|
140
146
|
} }) }))] })) })));
|
|
141
147
|
});
|
|
@@ -23,27 +23,36 @@ import * as React from 'react';
|
|
|
23
23
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
24
24
|
import { useTranslation } from 'react-i18next';
|
|
25
25
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
26
|
-
import { alpha, styled
|
|
26
|
+
import { alpha, styled } from '@mui/material/styles';
|
|
27
27
|
import Box from '@mui/material/Box';
|
|
28
28
|
import { getUserName, isValidEmail } from '../../../../utils';
|
|
29
29
|
import { useLanguage, useAppSelector, useAppDispatch, useSetFromDefaultValues } from '../../../../hooks';
|
|
30
|
-
import { IndividualType } from '../../../../@types';
|
|
30
|
+
import { IndividualType, ThemeMode } from '../../../../@types';
|
|
31
|
+
import { ICONS_NAMES } from '../../../../constants';
|
|
31
32
|
import Collapse from '../../../../components/Collapse';
|
|
32
33
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
33
34
|
import Form from '../../../../components/Form';
|
|
34
35
|
import Text from '../../../../components/Text';
|
|
35
|
-
import
|
|
36
|
+
import Icon from '../../../../components/Icon';
|
|
36
37
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
37
38
|
import { addDetailsAsync, individualSelector, requestDetailsByEmail, resetIndividualData } from '../../../app/individual/individualStore';
|
|
38
39
|
import IndividualActionButtons from '../../../../features/shared/Button/IndividualActionButtons';
|
|
39
40
|
import { IndividualCollectInfoValidationSchema } from './validation';
|
|
40
41
|
import CollectPhoneEmail from './CollectPhoneEmail';
|
|
41
|
-
var ScreenContainerStyled = styled(ScreenContainer)(function (
|
|
42
|
+
var ScreenContainerStyled = styled(ScreenContainer)(function () { return ({}); });
|
|
43
|
+
var UserBoxStyled = styled(Box)(function (_a) {
|
|
44
|
+
var theme = _a.theme;
|
|
45
|
+
return (__assign({ background: theme.palette.mode === ThemeMode.DARK ? alpha(theme.palette.text.secondary, 0.3) : theme.palette.background.default, boxShadow: theme.shadows[6], borderRadius: theme.spacing(1), marginBottom: theme.spacing(1) }, (theme.palette.mode === ThemeMode.DARK && {
|
|
46
|
+
boxShadow: theme.shadows[0],
|
|
47
|
+
border: "1px solid ".concat(alpha(theme.palette.text.secondary, 0.3))
|
|
48
|
+
})));
|
|
49
|
+
});
|
|
50
|
+
var IconStyled = styled(Icon)(function (_a) {
|
|
42
51
|
var theme = _a.theme;
|
|
43
52
|
return ({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
53
|
+
width: theme.spacing(2.5),
|
|
54
|
+
height: theme.spacing(2.5),
|
|
55
|
+
marginInlineEnd: theme.spacing(1)
|
|
47
56
|
});
|
|
48
57
|
});
|
|
49
58
|
var TextBoxStyled = styled(Box)(function (_a) {
|
|
@@ -52,20 +61,30 @@ var TextBoxStyled = styled(Box)(function (_a) {
|
|
|
52
61
|
display: 'flex',
|
|
53
62
|
justifyContent: 'space-between',
|
|
54
63
|
flexDirection: 'row',
|
|
55
|
-
padding: theme.spacing(
|
|
64
|
+
padding: theme.spacing(2),
|
|
65
|
+
alignItems: 'center'
|
|
56
66
|
});
|
|
57
67
|
});
|
|
58
68
|
var TextStyled = styled(Box)(function (_a) {
|
|
59
69
|
var theme = _a.theme;
|
|
60
|
-
return (__assign(__assign({}, theme.typography.subtitle2), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightRegular,
|
|
70
|
+
return (__assign(__assign({}, theme.typography.subtitle2), { color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary, fontWeight: theme.typography.fontWeightRegular, display: 'flex', justifyContent: 'start', flexDirection: 'column' }));
|
|
61
71
|
});
|
|
62
72
|
var RoleTextStyled = styled(Text)(function (_a) {
|
|
63
73
|
var theme = _a.theme;
|
|
64
|
-
return (
|
|
74
|
+
return ({
|
|
75
|
+
fontSize: theme.spacing(1.375),
|
|
76
|
+
color: theme.palette.text.secondary,
|
|
77
|
+
fontWeight: theme.typography.fontWeightRegular
|
|
78
|
+
});
|
|
65
79
|
});
|
|
66
80
|
var CollapseStyled = styled(Collapse)(function () { return ({
|
|
67
81
|
width: '100%'
|
|
68
82
|
}); });
|
|
83
|
+
var ContentStyled = styled(Box)(function () { return ({
|
|
84
|
+
display: 'flex',
|
|
85
|
+
flexDirection: 'row',
|
|
86
|
+
alignItems: 'center'
|
|
87
|
+
}); });
|
|
69
88
|
var IndividualRequestType;
|
|
70
89
|
(function (IndividualRequestType) {
|
|
71
90
|
IndividualRequestType[IndividualRequestType["ADD"] = 0] = "ADD";
|
|
@@ -83,7 +102,6 @@ var UserList = function (_a) {
|
|
|
83
102
|
var isAr = useLanguage().isAr;
|
|
84
103
|
var dispatch = useAppDispatch();
|
|
85
104
|
var _j = React.useState(false), emailChecking = _j[0], setEmailChecking = _j[1];
|
|
86
|
-
var theme = useTheme();
|
|
87
105
|
var _k = useAppSelector(individualSelector), data = _k.data, loading = _k.loading, error = _k.error;
|
|
88
106
|
var _l = data.individualCollectData, email = _l.email, mobile = _l.mobile, responseBody = _l.responseBody;
|
|
89
107
|
var is_available = (responseBody || {}).is_available;
|
|
@@ -153,6 +171,9 @@ var UserList = function (_a) {
|
|
|
153
171
|
var name = getUserName(user, isAr);
|
|
154
172
|
return name;
|
|
155
173
|
};
|
|
174
|
+
var getUserIcon = function (user) {
|
|
175
|
+
return (user === null || user === void 0 ? void 0 : user.isRequestedEmail) ? ICONS_NAMES.user_green : ICONS_NAMES.user_grey;
|
|
176
|
+
};
|
|
156
177
|
var isActiveUser = function (user) {
|
|
157
178
|
return (activeUser === null || activeUser === void 0 ? void 0 : activeUser.id) === user.id;
|
|
158
179
|
};
|
|
@@ -185,10 +206,10 @@ var UserList = function (_a) {
|
|
|
185
206
|
if (is_available === false)
|
|
186
207
|
methods.setError('email', { message: 'tap_js_email_already_exist' });
|
|
187
208
|
}, [responseBody]);
|
|
188
|
-
return (_jsx(ScreenContainerStyled, { children: usersMenuList.map(function (user, index) {
|
|
189
|
-
return (_jsxs(
|
|
209
|
+
return (_jsx(ScreenContainerStyled, __assign({ sx: { ml: 3, mr: 3 } }, { children: usersMenuList.map(function (user, index) {
|
|
210
|
+
return (_jsxs(UserBoxStyled, __assign({ sx: index === usersMenuList.length - 1 ? { mb: 0 } : {} }, { children: [_jsxs(TextBoxStyled, __assign({ sx: {
|
|
190
211
|
cursor: emailChecking ? 'default' : 'pointer'
|
|
191
|
-
}, onClick: !!anchorEl && isActiveUser(user) ? function () { return onCloseUserAction(); } : function (e) { return onClickUser(user, e); } }, { children: [_jsx(TextStyled, { children: _jsx("span", { children: getName(user) || '' })
|
|
212
|
+
}, onClick: !!anchorEl && isActiveUser(user) ? function () { return onCloseUserAction(); } : function (e) { return onClickUser(user, e); } }, { children: [_jsxs(ContentStyled, { children: [_jsx(IconStyled, { src: getUserIcon(user) }), _jsxs(TextStyled, { children: [_jsx("span", { children: getName(user) || '' }), _jsx(RoleTextStyled, { children: getUserRole(user) || '' })] })] }), _jsx(ExpandIcon, { anchorEl: !!anchorEl && isActiveUser(user) })] })), _jsx(Collapse, __assign({ in: !!anchorEl && isActiveUser(user), timeout: 300 }, { children: _jsx(IndividualActionButtons, { isAr: isAr, addDetails: {
|
|
192
213
|
status: getUserStatus(user),
|
|
193
214
|
title: t('add_details'),
|
|
194
215
|
onClick: onAddDetails,
|
|
@@ -202,6 +223,6 @@ var UserList = function (_a) {
|
|
|
202
223
|
show: !isSameUserRequestedBefore(user),
|
|
203
224
|
loading: isActiveUser(user) && loading && type === IndividualRequestType.REQUEST_EMAIL
|
|
204
225
|
} }) }))] }), index));
|
|
205
|
-
}) }));
|
|
226
|
+
}) })));
|
|
206
227
|
};
|
|
207
228
|
export default UserList;
|