@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
|
@@ -15,15 +15,16 @@ import Box from '@mui/material/Box';
|
|
|
15
15
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
16
16
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
17
17
|
import { useTranslation } from 'react-i18next';
|
|
18
|
-
import { styled
|
|
18
|
+
import { styled } from '@mui/material/styles';
|
|
19
19
|
import Collapse from '../../../../components/Collapse';
|
|
20
20
|
import Form from '../../../../components/Form';
|
|
21
21
|
import Button, { AbsherButton, MobileButton } from '../../../shared/Button';
|
|
22
|
-
import { useAppDispatch, useAppSelector, useCountry, useFormErrorAndUpdateReadOnly, useFormReadOnly } from '../../../../hooks';
|
|
22
|
+
import { useAppDispatch, useAppSelector, useCountry, useFormErrorAndUpdateReadOnly, useFormReadOnly, useSetFromDefaultValues } from '../../../../hooks';
|
|
23
23
|
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
24
|
-
import
|
|
24
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
25
25
|
import { clearError, resetStore, connectExpressSelector, createMobileAuthAsync } from '../../../app/connectExpress/connectExpressStore';
|
|
26
26
|
import { useLanguage } from '../../../../hooks';
|
|
27
|
+
import { DropDownMode } from '../../../../@types';
|
|
27
28
|
import Divider from '@mui/material/Divider';
|
|
28
29
|
import Text from '../../../../components/Text';
|
|
29
30
|
import MobileNumber from './MobileNumber';
|
|
@@ -47,14 +48,14 @@ var InputsContainerStyled = styled(Box)(function (_a) {
|
|
|
47
48
|
var TextStyled = styled(Text)(function (_a) {
|
|
48
49
|
var theme = _a.theme;
|
|
49
50
|
return ({
|
|
50
|
-
color:
|
|
51
|
+
color: theme.palette.info.contrastText
|
|
51
52
|
});
|
|
52
53
|
});
|
|
53
54
|
var DividerStyled = styled(Divider)(function (_a) {
|
|
54
55
|
var theme = _a.theme;
|
|
55
56
|
return ({
|
|
56
57
|
width: '45%',
|
|
57
|
-
borderColor:
|
|
58
|
+
borderColor: theme.palette.divider,
|
|
58
59
|
marginBlockEnd: theme.spacing(0.62)
|
|
59
60
|
});
|
|
60
61
|
});
|
|
@@ -63,9 +64,8 @@ var OrBoxStyled = styled(Box)(function (_a) {
|
|
|
63
64
|
return ({
|
|
64
65
|
display: 'flex',
|
|
65
66
|
justifyContent: 'space-between',
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
marginInline: theme.spacing(2.5)
|
|
67
|
+
margin: theme.spacing(3),
|
|
68
|
+
marginTop: theme.spacing(0)
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
71
|
var Mobile = function (_a) {
|
|
@@ -77,13 +77,20 @@ var Mobile = function (_a) {
|
|
|
77
77
|
var isAr = useLanguage().isAr;
|
|
78
78
|
var dispatch = useAppDispatch();
|
|
79
79
|
var isKuwait = useCountry(settingData.businessCountry.iso2).isKuwait;
|
|
80
|
+
var _f = data.mobileData, mobile = _f.mobile, countryCode = _f.countryCode, termAndConditionChecked = _f.termAndConditionChecked;
|
|
80
81
|
var responseData = data.responseData, isLeadIdPassed = data.isLeadIdPassed;
|
|
81
82
|
var isLeadIdentityIdAvailable = !((_c = (_b = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _b === void 0 ? void 0 : _b.identification) === null || _c === void 0 ? void 0 : _c.id);
|
|
83
|
+
var isPopupMode = settingData.dropDownOpenMode === DropDownMode.popup;
|
|
82
84
|
var methods = useForm({
|
|
83
85
|
resolver: yupResolver(PhoneValidationSchema(isLeadIdPassed)),
|
|
84
|
-
defaultValues:
|
|
86
|
+
defaultValues: {
|
|
87
|
+
mobile: mobile,
|
|
88
|
+
countryCode: countryCode,
|
|
89
|
+
termAndConditionChecked: termAndConditionChecked
|
|
90
|
+
},
|
|
85
91
|
mode: 'onChange'
|
|
86
92
|
});
|
|
93
|
+
useSetFromDefaultValues(methods, data.mobileData);
|
|
87
94
|
React.useEffect(function () {
|
|
88
95
|
if (error)
|
|
89
96
|
dispatch(clearError());
|
|
@@ -99,14 +106,16 @@ var Mobile = function (_a) {
|
|
|
99
106
|
dispatch(handlePrevScreenStep(screen));
|
|
100
107
|
};
|
|
101
108
|
var handleCountryOpen = function () {
|
|
102
|
-
|
|
109
|
+
if (!isPopupMode)
|
|
110
|
+
setAnchor(true);
|
|
103
111
|
};
|
|
104
112
|
var handleCountryClose = function () {
|
|
105
|
-
|
|
113
|
+
if (!isPopupMode)
|
|
114
|
+
setAnchor(false);
|
|
106
115
|
};
|
|
107
116
|
var originalReadOnly = useFormReadOnly(methods);
|
|
108
117
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
|
|
109
118
|
var disabled = !methods.formState.isValid || !!error;
|
|
110
|
-
return (_jsx(
|
|
119
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'get_started', description: 'mobile_number_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { isPopupMode: isPopupMode, readOnly: readOnly['mobile'], show: true, countries: settingData.countries, onListOpen: handleCountryOpen, onListClose: handleCountryClose }) }), _jsxs(Collapse, __assign({ in: !anchor }, { children: [_jsx(TAC, { show: isLeadIdPassed, readOnly: readOnly['termAndConditionChecked'] }), _jsx(Button, __assign({ sx: { mt: 5 }, onBackClicked: function () { return onBack(); }, isAr: isAr, disableBack: true, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: isLeadIdPassed ? !isLeadIdentityIdAvailable : !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), isKuwait ? (_jsx(MobileButton, __assign({ disabled: loading, onClick: function () { return onBack(); }, icon: ICONS_NAMES.PACI_ICON }, { children: t('paci_button_label') }))) : (_jsx(AbsherButton, __assign({ disabled: loading, onClick: function () { return onBack(); } }, { children: t('absher_button_label') })))] }))] }))] })) })) })));
|
|
111
120
|
};
|
|
112
121
|
export default React.memo(Mobile);
|
|
@@ -8,6 +8,7 @@ interface MobileNumberProps {
|
|
|
8
8
|
onListOpen?: () => void;
|
|
9
9
|
onListClose?: () => void;
|
|
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,7 +25,7 @@ import * as React from 'react';
|
|
|
25
25
|
import Box from '@mui/material/Box';
|
|
26
26
|
import { useTranslation } from 'react-i18next';
|
|
27
27
|
import { useController, useFormContext } from 'react-hook-form';
|
|
28
|
-
import { styled
|
|
28
|
+
import { styled } from '@mui/material/styles';
|
|
29
29
|
import Text from '../../../../components/Text';
|
|
30
30
|
import Collapse from '../../../../components/Collapse';
|
|
31
31
|
import ClearIcon from '../../../shared/ClearIcon';
|
|
@@ -33,19 +33,13 @@ import CheckIcon from '../../../shared/CheckIcon';
|
|
|
33
33
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
34
34
|
import { connectSelector } from '../../../app/connect/connectStore';
|
|
35
35
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
36
|
-
import Input from '../../../shared/
|
|
36
|
+
import Input from '../../../shared/TextField';
|
|
37
37
|
import SimpleList from '../../../../components/SimpleList';
|
|
38
38
|
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
39
39
|
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
40
|
+
import { ThemeMode } from '../../../../@types';
|
|
40
41
|
import Search from '../../../shared/Search';
|
|
41
|
-
|
|
42
|
-
var theme = _a.theme;
|
|
43
|
-
return ({
|
|
44
|
-
display: 'flex',
|
|
45
|
-
justifyContent: 'space-between',
|
|
46
|
-
padding: theme.spacing(0, 2.5, 1.25, 2.5)
|
|
47
|
-
});
|
|
48
|
-
});
|
|
42
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
49
43
|
var CountryItemContainer = styled(Box)(function () { return ({
|
|
50
44
|
display: 'flex'
|
|
51
45
|
}); });
|
|
@@ -53,35 +47,42 @@ var CountryCodeText = styled(Text, {
|
|
|
53
47
|
shouldForwardProp: function (prop) { return prop !== 'isSelected'; }
|
|
54
48
|
})(function (_a) {
|
|
55
49
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
56
|
-
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 }));
|
|
50
|
+
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 }));
|
|
57
51
|
});
|
|
58
52
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
59
53
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
60
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
54
|
+
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) }));
|
|
61
55
|
});
|
|
62
|
-
var CountryCodeStyled = styled(Text)(function (_a) {
|
|
63
|
-
var theme = _a.theme;
|
|
64
|
-
return (__assign(__assign({ cursor: 'pointer' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightRegular, display: 'flex', alignItems: 'center', minWidth: theme.spacing(8.75) }));
|
|
56
|
+
var CountryCodeStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'readOnly'; } })(function (_a) {
|
|
57
|
+
var theme = _a.theme, readOnly = _a.readOnly;
|
|
58
|
+
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) }));
|
|
65
59
|
});
|
|
66
|
-
var
|
|
67
|
-
var theme = _a.theme;
|
|
68
|
-
return (
|
|
60
|
+
var ExpandIconStyled = styled(ExpandIcon, { shouldForwardProp: function (prop) { return prop !== 'readOnly'; } })(function (_a) {
|
|
61
|
+
var theme = _a.theme, readOnly = _a.readOnly;
|
|
62
|
+
return ({
|
|
63
|
+
cursor: readOnly ? 'auto' : 'pointer',
|
|
64
|
+
marginInlineStart: theme.spacing(1)
|
|
65
|
+
});
|
|
69
66
|
});
|
|
70
|
-
var
|
|
67
|
+
var CodeExpandIconStyled = styled(ExpandIconStyled)(function (_a) {
|
|
71
68
|
var theme = _a.theme;
|
|
72
69
|
return ({
|
|
73
|
-
|
|
70
|
+
width: theme.spacing(0.875),
|
|
71
|
+
height: theme.spacing(0.875)
|
|
74
72
|
});
|
|
75
73
|
});
|
|
76
74
|
var InputStyled = styled(Input)(function () { return ({
|
|
77
75
|
direction: 'ltr',
|
|
78
76
|
'& .MuiInputBase-input': {
|
|
79
77
|
cursor: 'auto'
|
|
78
|
+
},
|
|
79
|
+
label: {
|
|
80
|
+
transformOrigin: 'top left'
|
|
80
81
|
}
|
|
81
82
|
}); });
|
|
82
83
|
var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
83
84
|
var _b, _c, _d;
|
|
84
|
-
var countries = _a.countries, readOnly = _a.readOnly, rest = __rest(_a, ["countries", "readOnly"]);
|
|
85
|
+
var countries = _a.countries, readOnly = _a.readOnly, isPopupMode = _a.isPopupMode, rest = __rest(_a, ["countries", "readOnly", "isPopupMode"]);
|
|
85
86
|
var _e = React.useState(countries || []), countriesCode = _e[0], setCountries = _e[1];
|
|
86
87
|
var _f = React.useState(null), anchorEl = _f[0], setAnchorEl = _f[1];
|
|
87
88
|
var t = useTranslation().t;
|
|
@@ -144,11 +145,17 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
144
145
|
});
|
|
145
146
|
setCountries(filteredCountries);
|
|
146
147
|
};
|
|
147
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { minHeight: mobileValue ? '133px' : '0px' } }, { children: [_jsx(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { minHeight: (mobileValue === null || mobileValue === void 0 ? void 0 : mobileValue.length) === requiredLen ? '133px' : '0px' } }, { children: [_jsx(InputStyled, { label: t('signup_enter_mobile'), InputProps: {
|
|
149
|
+
startAdornment: (_jsxs(CountryCodeStyled, __assign({ readOnly: readOnly, onClick: function () {
|
|
150
|
+
if (readOnly)
|
|
151
|
+
return;
|
|
152
|
+
toggleCountryList();
|
|
153
|
+
} }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), !anchorEl && _jsx(CodeExpandIconStyled, { readOnly: readOnly, anchorEl: !!anchorEl })] }))),
|
|
154
|
+
endAdornment: !!anchorEl ? (_jsx(ExpandIconStyled, { onClick: function () { return toggleCountryList(); }, anchorEl: !!anchorEl })) : !error && mobileValue ? (_jsx(CheckIcon, {})) : (mobileValue && _jsx(ClearIcon, { onClick: clearMobileNumber }))
|
|
155
|
+
}, inputProps: {
|
|
156
|
+
maxLength: requiredLen,
|
|
157
|
+
readOnly: !!anchorEl || readOnly
|
|
158
|
+
}, type: 'tel', required: true, onClick: onCloseCountryList, onChange: onPhoneNumberChange, onEnterPressed: function (e) { return loading && e.preventDefault(); }, value: !!anchorEl ? countryName : mobileValue, placeholder: "".concat(isSA ? '5' : '0', "00000000"), helperText: !anchorEl ? error && t(error, { length: requiredLen, number: '05|5' }) : undefined }), _jsxs(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseCountryList }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleList, { isPopupMode: isPopupMode, searchKeyPath: 'name.english', list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
152
159
|
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, {})] }));
|
|
153
160
|
} })] }))] })) })));
|
|
154
161
|
});
|
|
@@ -14,7 +14,7 @@ import * as React from 'react';
|
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
|
-
import { styled
|
|
17
|
+
import { styled } from '@mui/material/styles';
|
|
18
18
|
import Link from '@mui/material/Link';
|
|
19
19
|
import { settingsSelector } from '../../../../app/settings';
|
|
20
20
|
import { EXTERNAL_LINKS, TAP_WEBSITE } from '../../../../constants';
|
|
@@ -24,41 +24,29 @@ import Text from '../../../../components/Text';
|
|
|
24
24
|
import Warning from '../../../../components/Warning';
|
|
25
25
|
import Collapse from '../../../../components/Collapse';
|
|
26
26
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
27
|
-
var TACContainerStyled = styled(Box)(function (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
alignItems: 'center',
|
|
33
|
-
paddingInlineStart: theme.spacing(2.5)
|
|
34
|
-
});
|
|
35
|
-
});
|
|
27
|
+
var TACContainerStyled = styled(Box)(function () { return ({
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexDirection: 'row',
|
|
30
|
+
alignItems: 'center'
|
|
31
|
+
}); });
|
|
36
32
|
var TextStyled = styled(Text)(function (_a) {
|
|
37
33
|
var theme = _a.theme;
|
|
38
|
-
return (__assign({ color:
|
|
34
|
+
return (__assign({ color: theme.palette.secondary.main, fontWeight: theme.typography.fontWeightRegular, whiteSpace: 'pre-line', height: 'fit-content' }, theme.typography.caption));
|
|
39
35
|
});
|
|
40
36
|
var LinkStyled = styled(Link)(function (_a) {
|
|
41
37
|
var theme = _a.theme;
|
|
42
38
|
return ({
|
|
43
39
|
color: theme.palette.primary.main,
|
|
44
40
|
fontWeight: theme.typography.fontWeightMedium,
|
|
45
|
-
letterSpacing: theme.spacing(0)
|
|
41
|
+
letterSpacing: theme.spacing(0),
|
|
42
|
+
textDecorationColor: theme.palette.primary.main,
|
|
43
|
+
textDecorationThickness: theme.spacing(0.125)
|
|
46
44
|
});
|
|
47
45
|
});
|
|
48
46
|
var CheckboxStyled = styled(CheckBox)(function (_a) {
|
|
49
47
|
var theme = _a.theme;
|
|
50
48
|
return ({
|
|
51
|
-
|
|
52
|
-
padding: theme.spacing(0),
|
|
53
|
-
marginInlineEnd: theme.spacing(1.5),
|
|
54
|
-
color: theme.palette.primary.main,
|
|
55
|
-
'& .MuiSvgIcon-root': {
|
|
56
|
-
fontSize: theme.spacing(3.75)
|
|
57
|
-
},
|
|
58
|
-
'&.Mui-checked': {
|
|
59
|
-
color: theme.palette.text.primary,
|
|
60
|
-
borderRadius: theme.spacing(2.5)
|
|
61
|
-
}
|
|
49
|
+
marginInlineStart: theme.spacing(-1.125)
|
|
62
50
|
});
|
|
63
51
|
});
|
|
64
52
|
var CollapseStyled = styled(Collapse)(function () { return ({
|
|
@@ -80,6 +68,6 @@ var TAC = function (_a) {
|
|
|
80
68
|
return;
|
|
81
69
|
tacControl.field.onChange(checked);
|
|
82
70
|
};
|
|
83
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }) })));
|
|
71
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, ml: 3, mr: 3 } }, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })) })));
|
|
84
72
|
};
|
|
85
73
|
export default React.memo(TAC);
|
|
@@ -1,30 +1,13 @@
|
|
|
1
|
-
|
|
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
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { useTranslation } from 'react-i18next';
|
|
14
3
|
import { useController, useFormContext } from 'react-hook-form';
|
|
15
4
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
16
5
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
17
|
-
import { alpha, styled } from '@mui/material/styles';
|
|
18
6
|
import { clearError, connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
|
|
19
|
-
import
|
|
20
|
-
import Calender from '../../../shared/Calender';
|
|
21
|
-
var InputLabelStyled = styled(Text)(function (_a) {
|
|
22
|
-
var theme = _a.theme;
|
|
23
|
-
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
24
|
-
});
|
|
7
|
+
import { CustomCalender as Calender } from '../../../shared/Calender';
|
|
25
8
|
var DOB = function (_a) {
|
|
26
9
|
var _b;
|
|
27
|
-
var
|
|
10
|
+
var readOnly = _a.readOnly;
|
|
28
11
|
var t = useTranslation().t;
|
|
29
12
|
var control = useFormContext().control;
|
|
30
13
|
var dispatch = useAppDispatch();
|
|
@@ -39,9 +22,6 @@ var DOB = function (_a) {
|
|
|
39
22
|
dispatch(clearError());
|
|
40
23
|
};
|
|
41
24
|
var dateValue = (_b = dobControl === null || dobControl === void 0 ? void 0 : dobControl.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
42
|
-
return (
|
|
43
|
-
var spacing = _a.spacing;
|
|
44
|
-
return spacing(2.5, 2.5, 1.5, 2.5);
|
|
45
|
-
} } }, { children: t('enter_birth_date') })), _jsx(Calender, { isDob: true, disabled: readOnly, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleBirthDateChange })] }));
|
|
25
|
+
return (_jsx(ScreenContainer, { children: _jsx(Calender, { required: true, label: t('enter_birth_date'), readOnly: readOnly, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateChange: handleBirthDateChange }) }));
|
|
46
26
|
};
|
|
47
27
|
export default DOB;
|
|
@@ -9,33 +9,18 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import Box from '@mui/material/Box';
|
|
15
14
|
import { useTranslation } from 'react-i18next';
|
|
16
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
17
16
|
import { useAppSelector } from '../../../../hooks';
|
|
18
|
-
import
|
|
19
|
-
import Text from '../../../../components/Text';
|
|
20
|
-
import Input from '../../../shared/Input';
|
|
17
|
+
import Input from '../../../shared/TextField';
|
|
21
18
|
import Collapse from '../../../../components/Collapse';
|
|
22
19
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
23
20
|
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
24
21
|
import { ID_NUMBER_LENGTH } from '../../../../constants';
|
|
25
22
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
26
23
|
import { connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
|
|
27
|
-
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
28
|
-
var theme = _a.theme;
|
|
29
|
-
return ({
|
|
30
|
-
display: 'flex',
|
|
31
|
-
justifyContent: 'space-between',
|
|
32
|
-
padding: theme.spacing(0, 2.5, 1.25, 2.5)
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
var InputLabelStyled = styled(Text)(function (_a) {
|
|
36
|
-
var theme = _a.theme;
|
|
37
|
-
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
38
|
-
});
|
|
39
24
|
var IDNumber = React.forwardRef(function (_a, ref) {
|
|
40
25
|
var _b, _c, _d;
|
|
41
26
|
var show = _a.show, readOnly = _a.readOnly;
|
|
@@ -55,6 +40,11 @@ var IDNumber = React.forwardRef(function (_a, ref) {
|
|
|
55
40
|
var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
56
41
|
var isLeadIdPassed = data.isLeadIdPassed, responseData = data.responseData;
|
|
57
42
|
var isLeadIdentityIdAvailable = !!((_d = (_c = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _c === void 0 ? void 0 : _c.identification) === null || _d === void 0 ? void 0 : _d.id);
|
|
58
|
-
return (_jsx(Collapse, __assign({ in: show
|
|
43
|
+
return (_jsx(Collapse, __assign({ in: show, sx: { pb: 1.5 } }, { children: _jsx(ScreenContainer, __assign({ ref: ref }, { children: _jsx(Input, { dir: 'ltr', type: 'tel', label: t('enter_national_id'), InputProps: {
|
|
44
|
+
endAdornment: _jsx(EndAdornment, { value: nidValue, error: error, onClear: clearIdNumber })
|
|
45
|
+
}, inputProps: {
|
|
46
|
+
maxLength: ID_NUMBER_LENGTH,
|
|
47
|
+
readOnly: readOnly
|
|
48
|
+
}, disabled: isLeadIdPassed && isLeadIdentityIdAvailable, onChange: handleIdChange, value: nidValue, placeholder: t('national_id_placeholder'), helperText: error && t(error, { number: '1' }), required: true }) })) })));
|
|
59
49
|
});
|
|
60
50
|
export default React.memo(IDNumber);
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
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
|
-
import {
|
|
15
|
+
import { styled } from '@mui/material/styles';
|
|
16
16
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
17
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
18
|
import { NIDValidationSchema } from './validation';
|
|
@@ -21,7 +21,7 @@ import { handlePrevScreenStep } from '../../../../app/settings';
|
|
|
21
21
|
import { clearError, connectExpressSelector, createNIDAuthAsync } from '../../../app/connectExpress/connectExpressStore';
|
|
22
22
|
import Form from '../../../../components/Form';
|
|
23
23
|
import Button, { MobileButton } from '../../../shared/Button';
|
|
24
|
-
import {
|
|
24
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
25
25
|
import Collapse from '../../../../components/Collapse';
|
|
26
26
|
import Box from '@mui/material/Box';
|
|
27
27
|
import Divider from '@mui/material/Divider';
|
|
@@ -37,14 +37,14 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
37
37
|
var TextStyled = styled(Text)(function (_a) {
|
|
38
38
|
var theme = _a.theme;
|
|
39
39
|
return ({
|
|
40
|
-
color:
|
|
40
|
+
color: theme.palette.info.contrastText
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
var DividerStyled = styled(Divider)(function (_a) {
|
|
44
44
|
var theme = _a.theme;
|
|
45
45
|
return ({
|
|
46
46
|
width: '45%',
|
|
47
|
-
borderColor:
|
|
47
|
+
borderColor: theme.palette.divider,
|
|
48
48
|
marginBlockEnd: theme.spacing(0.62)
|
|
49
49
|
});
|
|
50
50
|
});
|
|
@@ -53,9 +53,8 @@ var OrBoxStyled = styled(Box)(function (_a) {
|
|
|
53
53
|
return ({
|
|
54
54
|
display: 'flex',
|
|
55
55
|
justifyContent: 'space-between',
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
marginInline: theme.spacing(2.5)
|
|
56
|
+
margin: theme.spacing(3),
|
|
57
|
+
marginTop: theme.spacing(0)
|
|
59
58
|
});
|
|
60
59
|
});
|
|
61
60
|
var NID = function (_a) {
|
|
@@ -90,6 +89,6 @@ var NID = function (_a) {
|
|
|
90
89
|
var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
|
|
91
90
|
var disabled = !methods.formState.isValid || !!error;
|
|
92
91
|
var isLeadIdentityIdAvailable = (_c = (_b = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _b === void 0 ? void 0 : _b.identification) === null || _c === void 0 ? void 0 : _c.id;
|
|
93
|
-
return (_jsx(
|
|
92
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'get_started', description: 'national_id_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse, readOnly: readOnly['nid'] }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose, readOnly: readOnly['dob'] }), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(TAC, { show: isLeadIdPassed, readOnly: readOnly['termAndConditionChecked'] }), _jsx(Button, __assign({ sx: { mt: 5 }, loading: loading, isAr: isAr, disableBack: true, disabled: disabled, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: isLeadIdPassed ? !isLeadIdentityIdAvailable && !methods.formState.isValid : !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(MobileButton, __assign({ onClick: function () { return onBack(); }, disabled: loading }, { children: t('mobile_button_label') }))] }))] }))] })) })) })));
|
|
94
93
|
};
|
|
95
94
|
export default React.memo(NID);
|
|
@@ -14,7 +14,7 @@ import * as React from 'react';
|
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
|
-
import { styled
|
|
17
|
+
import { styled } from '@mui/material/styles';
|
|
18
18
|
import Link from '@mui/material/Link';
|
|
19
19
|
import { settingsSelector } from '../../../../app/settings';
|
|
20
20
|
import { EXTERNAL_LINKS, TAP_WEBSITE } from '../../../../constants';
|
|
@@ -25,37 +25,29 @@ import Warning from '../../../../components/Warning';
|
|
|
25
25
|
import Collapse from '../../../../components/Collapse';
|
|
26
26
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
27
27
|
export var TACContainerStyled = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'readOnly'; } })(function (_a) {
|
|
28
|
-
var
|
|
29
|
-
return (__assign({ display: 'flex', flexDirection: 'row', alignItems: 'center'
|
|
28
|
+
var readOnly = _a.readOnly;
|
|
29
|
+
return (__assign({ display: 'flex', flexDirection: 'row', alignItems: 'center' }, (readOnly && {
|
|
30
30
|
opacity: '0.6'
|
|
31
31
|
})));
|
|
32
32
|
});
|
|
33
33
|
var TextStyled = styled(Text)(function (_a) {
|
|
34
34
|
var theme = _a.theme;
|
|
35
|
-
return (__assign({ color:
|
|
35
|
+
return (__assign({ color: theme.palette.secondary.main, fontWeight: theme.typography.fontWeightRegular, whiteSpace: 'pre-line', height: 'fit-content' }, theme.typography.caption));
|
|
36
36
|
});
|
|
37
37
|
var LinkStyled = styled(Link)(function (_a) {
|
|
38
38
|
var theme = _a.theme;
|
|
39
39
|
return ({
|
|
40
40
|
color: theme.palette.primary.main,
|
|
41
41
|
fontWeight: theme.typography.fontWeightMedium,
|
|
42
|
-
letterSpacing: theme.spacing(0)
|
|
42
|
+
letterSpacing: theme.spacing(0),
|
|
43
|
+
textDecorationColor: theme.palette.primary.main,
|
|
44
|
+
textDecorationThickness: theme.spacing(0.125)
|
|
43
45
|
});
|
|
44
46
|
});
|
|
45
47
|
var CheckboxStyled = styled(CheckBox)(function (_a) {
|
|
46
48
|
var theme = _a.theme;
|
|
47
49
|
return ({
|
|
48
|
-
|
|
49
|
-
padding: theme.spacing(0),
|
|
50
|
-
marginInlineEnd: theme.spacing(1.5),
|
|
51
|
-
color: theme.palette.primary.main,
|
|
52
|
-
'& .MuiSvgIcon-root': {
|
|
53
|
-
fontSize: theme.spacing(3.75)
|
|
54
|
-
},
|
|
55
|
-
'&.Mui-checked': {
|
|
56
|
-
color: theme.palette.text.primary,
|
|
57
|
-
borderRadius: theme.spacing(2.5)
|
|
58
|
-
}
|
|
50
|
+
marginInlineStart: theme.spacing(-1.125)
|
|
59
51
|
});
|
|
60
52
|
});
|
|
61
53
|
var CollapseStyled = styled(Collapse)(function () { return ({
|
|
@@ -77,6 +69,6 @@ var TAC = function (_a) {
|
|
|
77
69
|
return;
|
|
78
70
|
tacControl.field.onChange(checked);
|
|
79
71
|
};
|
|
80
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5 } }, { children: [_jsxs(TACContainerStyled, __assign({ readOnly: readOnly }, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] })), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })) })));
|
|
72
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, ml: 3, mr: 3 } }, { children: [_jsxs(TACContainerStyled, __assign({ readOnly: readOnly }, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] })), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })) })));
|
|
81
73
|
};
|
|
82
74
|
export default React.memo(TAC);
|
|
@@ -1,30 +1,12 @@
|
|
|
1
|
-
|
|
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
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
2
|
import { useTranslation } from 'react-i18next';
|
|
14
3
|
import { useController, useFormContext } from 'react-hook-form';
|
|
15
4
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
16
5
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
17
|
-
import { alpha, styled } from '@mui/material/styles';
|
|
18
6
|
import { clearError, connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
|
|
19
|
-
import
|
|
20
|
-
import Calender from '../../../shared/Calender';
|
|
21
|
-
var InputLabelStyled = styled(Text)(function (_a) {
|
|
22
|
-
var theme = _a.theme;
|
|
23
|
-
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
24
|
-
});
|
|
7
|
+
import { CustomCalender as Calender } from '../../../shared/Calender';
|
|
25
8
|
var DOB = function (_a) {
|
|
26
9
|
var _b;
|
|
27
|
-
var onDateClicked = _a.onDateClicked;
|
|
28
10
|
var t = useTranslation().t;
|
|
29
11
|
var control = useFormContext().control;
|
|
30
12
|
var dispatch = useAppDispatch();
|
|
@@ -39,9 +21,6 @@ var DOB = function (_a) {
|
|
|
39
21
|
dispatch(clearError());
|
|
40
22
|
};
|
|
41
23
|
var dateValue = (_b = dobControl === null || dobControl === void 0 ? void 0 : dobControl.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
42
|
-
return (
|
|
43
|
-
var spacing = _a.spacing;
|
|
44
|
-
return spacing(2.5, 2.5, 1.5, 2.5);
|
|
45
|
-
} } }, { children: t('enter_birth_date') })), _jsx(Calender, { isDob: true, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleBirthDateChange })] }));
|
|
24
|
+
return (_jsx(ScreenContainer, { children: _jsx(Calender, { label: t('enter_birth_date'), defaultValue: dateValue ? new Date(dateValue) : undefined, onDateChange: handleBirthDateChange }) }));
|
|
46
25
|
};
|
|
47
26
|
export default DOB;
|
|
@@ -9,31 +9,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import Box from '@mui/material/Box';
|
|
15
14
|
import { useTranslation } from 'react-i18next';
|
|
16
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
17
|
-
import
|
|
18
|
-
import Text from '../../../../components/Text';
|
|
19
|
-
import Input from '../../../shared/Input';
|
|
16
|
+
import Input from '../../../shared/TextField';
|
|
20
17
|
import Collapse from '../../../../components/Collapse';
|
|
21
18
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
22
19
|
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
23
20
|
import { ID_NUMBER_LENGTH } from '../../../../constants';
|
|
24
21
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
25
|
-
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
26
|
-
var theme = _a.theme;
|
|
27
|
-
return ({
|
|
28
|
-
display: 'flex',
|
|
29
|
-
justifyContent: 'space-between',
|
|
30
|
-
padding: theme.spacing(0, 2.5, 1.25, 2.5)
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
var InputLabelStyled = styled(Text)(function (_a) {
|
|
34
|
-
var theme = _a.theme;
|
|
35
|
-
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
36
|
-
});
|
|
37
22
|
var IDNumber = React.forwardRef(function (_a, ref) {
|
|
38
23
|
var _b;
|
|
39
24
|
var show = _a.show;
|
|
@@ -50,6 +35,8 @@ var IDNumber = React.forwardRef(function (_a, ref) {
|
|
|
50
35
|
};
|
|
51
36
|
var nidValue = nidControl.field.value;
|
|
52
37
|
var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
53
|
-
return (_jsx(Collapse, __assign({ in: show }, { children:
|
|
38
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ ref: ref, sx: { pb: 1.5 } }, { children: _jsx(Input, { label: t('enter_national_id'), dir: 'ltr', type: 'tel', InputProps: {
|
|
39
|
+
endAdornment: _jsx(EndAdornment, { value: nidValue, error: error, onClear: clearIdNumber })
|
|
40
|
+
}, inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, placeholder: t('national_id_placeholder'), helperText: error && t(error, { number: '1' }), required: true }) })) })));
|
|
54
41
|
});
|
|
55
42
|
export default React.memo(IDNumber);
|