@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
|
@@ -9,17 +9,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
13
|
import * as React from 'react';
|
|
25
14
|
import { useAppDispatch, useAppSelector, useSetFromDefaultValues } from '../../../../hooks';
|
|
@@ -32,7 +21,7 @@ import { handlePrevScreenStep } from '../../../../app/settings';
|
|
|
32
21
|
import { useLanguage } from '../../../../hooks';
|
|
33
22
|
import Form from '../../../../components/Form';
|
|
34
23
|
import Text from '../../../../components/Text';
|
|
35
|
-
import {
|
|
24
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
36
25
|
import { businessSelector, clearError, resetOTPScreen, verifyLeadOTP } from '../../../app/business/businessStore';
|
|
37
26
|
import Button from '../../../shared/Button';
|
|
38
27
|
import { deepCopy, maskID } from '../../../../utils';
|
|
@@ -41,17 +30,14 @@ import OTPInput from './OTPInput';
|
|
|
41
30
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
42
31
|
var theme = _a.theme;
|
|
43
32
|
return ({
|
|
44
|
-
background: theme.palette.common.white,
|
|
45
|
-
border: '1px solid',
|
|
46
|
-
borderColor: theme.palette.divider,
|
|
47
33
|
direction: theme.direction,
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
paddingInline: theme.spacing(3),
|
|
35
|
+
paddingBottom: theme.spacing(5)
|
|
50
36
|
});
|
|
51
37
|
});
|
|
52
38
|
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
53
39
|
var theme = _a.theme;
|
|
54
|
-
return (__assign(__assign({}, theme.typography.
|
|
40
|
+
return (__assign(__assign({}, theme.typography.body2), { color: theme.palette.secondary.main, fontWeight: theme.typography.fontWeightRegular, lineHeight: '19px', whiteSpace: 'pre-line' }));
|
|
55
41
|
});
|
|
56
42
|
var FormStyled = styled(Form)(function () { return ({
|
|
57
43
|
display: 'flex',
|
|
@@ -60,13 +46,15 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
60
46
|
var OTP = function (_a) {
|
|
61
47
|
var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
62
48
|
var dispatch = useAppDispatch();
|
|
63
|
-
var
|
|
49
|
+
var otp = data.otpData.otp;
|
|
64
50
|
var methods = useForm({
|
|
65
51
|
resolver: yupResolver(OTPValidation),
|
|
66
|
-
defaultValues:
|
|
52
|
+
defaultValues: {
|
|
53
|
+
otp: otp
|
|
54
|
+
},
|
|
67
55
|
mode: 'onChange'
|
|
68
56
|
});
|
|
69
|
-
useSetFromDefaultValues(methods,
|
|
57
|
+
useSetFromDefaultValues(methods, data.otpData);
|
|
70
58
|
var t = useTranslation().t;
|
|
71
59
|
var isAr = useLanguage().isAr;
|
|
72
60
|
React.useEffect(function () {
|
|
@@ -84,7 +72,7 @@ var OTP = function (_a) {
|
|
|
84
72
|
};
|
|
85
73
|
var disabled = !methods.formState.isValid || !!error;
|
|
86
74
|
var idNumber = data.nidData.nid;
|
|
87
|
-
return (_jsx(
|
|
75
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'otp_authentication', description: 'otp_authentication_description', onBack: function () { return onBack(); } }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('opt_nid_sent_title', { provider: 'ABSHER' }), ' ', !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskID(idNumber || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disableBack: true, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) })));
|
|
88
76
|
};
|
|
89
77
|
OTP.defaultProps = {};
|
|
90
78
|
export default React.memo(OTP);
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import * as React from 'react';
|
|
3
14
|
import { useTranslation, Trans } from 'react-i18next';
|
|
4
15
|
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
5
16
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
6
18
|
import { businessSelector } from '../../../app/business/businessStore';
|
|
7
19
|
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
8
20
|
import { maskEmail } from '../../../../utils';
|
|
@@ -16,6 +28,6 @@ var ResetPasswordSuccess = function (_a) {
|
|
|
16
28
|
var onBack = function () {
|
|
17
29
|
dispatch(handlePrevScreenStep());
|
|
18
30
|
};
|
|
19
|
-
return (_jsx(SuccessScreen, { title: t("reset_password_success_title"), description: _jsx(Trans, { i18nKey: 'reset_password_success_description_dev', values: { email: maskedEmail } }), showEmailProviders: true, enableBack: true, onBack: function () { return onBack(); } }));
|
|
31
|
+
return (_jsx(ContainerWithHeader, __assign({ onBack: function () { return onBack(); }, title: 'reset_password_success_header_title', description: 'reset_password_success_header_description' }, { children: _jsx(SuccessScreen, { title: t("reset_password_success_title"), description: _jsx(Trans, { i18nKey: 'reset_password_success_description_dev', values: { email: maskedEmail } }), showEmailProviders: true, enableBack: true, onBack: function () { return onBack(); } }) })));
|
|
20
32
|
};
|
|
21
33
|
export default React.memo(ResetPasswordSuccess);
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import * as React from 'react';
|
|
3
14
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
4
15
|
import { useTranslation } from 'react-i18next';
|
|
5
16
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
6
18
|
import { businessSelector, updateLeadSuccess } from '../../../app/business/businessStore';
|
|
7
19
|
var Success = function (_a) {
|
|
8
20
|
var t = useTranslation().t;
|
|
@@ -18,6 +30,6 @@ var Success = function (_a) {
|
|
|
18
30
|
var onSuccess = function () {
|
|
19
31
|
setClicked(true);
|
|
20
32
|
};
|
|
21
|
-
return (_jsx(
|
|
33
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'business_success_title', description: 'business_success_description' }, { children: _jsx(SuccessScreen, { onSuccess: onSuccess, description: t('business_completed_description'), successTitle: t('continue'), loading: clicked && updateLeadSuccessLoading, error: error || '' }) })));
|
|
22
34
|
};
|
|
23
35
|
export default React.memo(Success);
|
|
@@ -14,9 +14,10 @@ import { memo } from 'react';
|
|
|
14
14
|
import { useAppSelector } from '../../../../hooks';
|
|
15
15
|
import { businessSelector } from '../../../app/business/businessStore';
|
|
16
16
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
17
18
|
var SuccessWithFlowButtons = function () {
|
|
18
19
|
var data = useAppSelector(businessSelector).data;
|
|
19
20
|
var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name, individuals = _a.individuals;
|
|
20
|
-
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, individuals: individuals, boardInfoId: board_info_id, flows: flows || [] }));
|
|
21
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'business_flows_title', description: 'business_flows_description' }, { children: _jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, individuals: individuals, boardInfoId: board_info_id, flows: flows || [] }) })));
|
|
21
22
|
};
|
|
22
23
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -22,7 +22,7 @@ import { useLanguage } from '../../../../hooks';
|
|
|
22
22
|
import { deepCopy, maskPhone } from '../../../../utils';
|
|
23
23
|
import Form from '../../../../components/Form';
|
|
24
24
|
import Text from '../../../../components/Text';
|
|
25
|
-
import {
|
|
25
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
26
26
|
import { businessSelector, clearError, resetOTPScreen, verifyLeadOTP } from '../../../app/business/businessStore';
|
|
27
27
|
import Button from '../../../shared/Button';
|
|
28
28
|
import { OTPValidation } from './validation';
|
|
@@ -30,17 +30,14 @@ import OTPInput from './OTPInput';
|
|
|
30
30
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
31
31
|
var theme = _a.theme;
|
|
32
32
|
return ({
|
|
33
|
-
background: theme.palette.common.white,
|
|
34
|
-
border: '1px solid',
|
|
35
|
-
borderColor: theme.palette.divider,
|
|
36
33
|
direction: theme.direction,
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
paddingInline: theme.spacing(3),
|
|
35
|
+
paddingBottom: theme.spacing(5)
|
|
39
36
|
});
|
|
40
37
|
});
|
|
41
38
|
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
42
39
|
var theme = _a.theme;
|
|
43
|
-
return (__assign(__assign({}, theme.typography.
|
|
40
|
+
return (__assign(__assign({}, theme.typography.body2), { color: theme.palette.secondary.main, fontWeight: theme.typography.fontWeightRegular, lineHeight: '19px', whiteSpace: 'pre-line' }));
|
|
44
41
|
});
|
|
45
42
|
var FormStyled = styled(Form)(function () { return ({
|
|
46
43
|
display: 'flex',
|
|
@@ -73,6 +70,6 @@ var VerifyNumber = function (_a) {
|
|
|
73
70
|
dispatch(handlePrevScreenStep());
|
|
74
71
|
};
|
|
75
72
|
var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
|
|
76
|
-
return (_jsx(
|
|
73
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'otp_authentication', description: 'otp_authentication_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) })));
|
|
77
74
|
};
|
|
78
75
|
export default React.memo(VerifyNumber);
|
|
@@ -88,7 +88,7 @@ var Connect = memo(function (props) {
|
|
|
88
88
|
event_action: 'Registration Error'
|
|
89
89
|
});
|
|
90
90
|
useStepStartedListener();
|
|
91
|
-
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open
|
|
91
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open;
|
|
92
92
|
React.useEffect(function () {
|
|
93
93
|
initializeGTM();
|
|
94
94
|
}, []);
|
|
@@ -124,11 +124,11 @@ var Connect = memo(function (props) {
|
|
|
124
124
|
var handleDialogClose = function () {
|
|
125
125
|
dispatch(handleOpen(false));
|
|
126
126
|
};
|
|
127
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', onConfirm: handleDialogClose, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, screenId: activeScreen.name,
|
|
127
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ countries: data.tapCountries, pointerEvents: loading ? 'none' : 'auto', onConfirm: handleDialogClose, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, screenId: activeScreen.name, isMaturityExpress: false }, { children: _jsx(FeatureContainer, { children: connectFeatureScreens.map(function (_a, index) {
|
|
128
128
|
var Element = _a.element, name = _a.name;
|
|
129
129
|
var isActive = activeScreen.name === name;
|
|
130
130
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
131
|
-
}) })
|
|
131
|
+
}) }) })) })) })));
|
|
132
132
|
});
|
|
133
133
|
export function ConnectElement(props) {
|
|
134
134
|
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Connect, __assign({}, props)) })));
|
|
@@ -16,10 +16,11 @@ import { useTranslation } from 'react-i18next';
|
|
|
16
16
|
import Collapse from '@mui/material/Collapse';
|
|
17
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
18
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
19
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
19
|
+
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
20
20
|
import { deepCopy, sendCustomEventToGTM } from '../../../../utils';
|
|
21
|
+
import { DropDownMode } from '../../../../@types';
|
|
21
22
|
import Form from '../../../../components/Form';
|
|
22
|
-
import {
|
|
23
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
23
24
|
import Button from '../../../shared/Button';
|
|
24
25
|
import { clearError, connectSelector, updateLeadBrandSegment } from '../../../app/connect/connectStore';
|
|
25
26
|
import { useLanguage } from '../../../../hooks';
|
|
@@ -39,8 +40,10 @@ var ListType;
|
|
|
39
40
|
})(ListType || (ListType = {}));
|
|
40
41
|
var BrandSegment = function (_a) {
|
|
41
42
|
var _b = useAppSelector(connectSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
43
|
+
var settingsStore = useAppSelector(settingsSelector);
|
|
42
44
|
var _c = data.brandSegmentData, segmentLocation = _c.segmentLocation, segmentProfit = _c.segmentProfit, segmentTech = _c.segmentTech, teamSize = _c.teamSize;
|
|
43
45
|
var _d = React.useState(), listActive = _d[0], setListActive = _d[1];
|
|
46
|
+
var isPopupMode = settingsStore.data.dropDownOpenMode === DropDownMode.popup;
|
|
44
47
|
React.useEffect(function () {
|
|
45
48
|
sendCustomEventToGTM({
|
|
46
49
|
event: 'Send Event',
|
|
@@ -73,12 +76,13 @@ var BrandSegment = function (_a) {
|
|
|
73
76
|
}, [methods.formState.isValid]);
|
|
74
77
|
var disabled = !methods.formState.isValid || !!error;
|
|
75
78
|
var handleMenuClick = function (flag) {
|
|
76
|
-
|
|
79
|
+
if (!isPopupMode)
|
|
80
|
+
setListActive(flag);
|
|
77
81
|
};
|
|
78
82
|
var isSegmentLocationListActive = listActive === ListType.SegmentLocationList;
|
|
79
83
|
var isSegmentProfitListActive = listActive === ListType.SegmentProfitList;
|
|
80
84
|
var isSegmentTechListActive = listActive === ListType.SegmentTechList;
|
|
81
85
|
var isTeamSizeListActive = listActive === ListType.TeamSizeList;
|
|
82
|
-
return (_jsx(
|
|
86
|
+
return (_jsx(ContainerWithHeader, __assign({ title: t('one_last_step'), description: 'brand_details_additional_info', onBack: function () { return onBack(); } }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(SegmentLocations, { isPopupMode: isPopupMode, show: !isTeamSizeListActive && !isSegmentProfitListActive && !isSegmentTechListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentLocationList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(SegmentProfits, { isPopupMode: isPopupMode, show: !isTeamSizeListActive && !isSegmentLocationListActive && !isSegmentTechListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentProfitList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(SegmentTechs, { isPopupMode: isPopupMode, show: !isTeamSizeListActive && !isSegmentLocationListActive && !isSegmentProfitListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentTechList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(TeamSize, { isPopupMode: isPopupMode, show: !isSegmentLocationListActive && !isSegmentProfitListActive && !isSegmentTechListActive, onListOpen: function () { return handleMenuClick(ListType.TeamSizeList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ disableBack: true, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading }, { children: t('next') })) }))] })) })) })));
|
|
83
87
|
};
|
|
84
88
|
export default React.memo(BrandSegment);
|
|
@@ -3,6 +3,7 @@ interface SegmentLocationsProps {
|
|
|
3
3
|
show: boolean;
|
|
4
4
|
onListOpen?: () => void;
|
|
5
5
|
onListClose?: () => void;
|
|
6
|
+
isPopupMode: boolean;
|
|
6
7
|
}
|
|
7
|
-
declare const SegmentLocations: ({ show, onListOpen, onListClose }: SegmentLocationsProps) => JSX.Element;
|
|
8
|
+
declare const SegmentLocations: ({ show, onListOpen, onListClose, isPopupMode }: SegmentLocationsProps) => JSX.Element;
|
|
8
9
|
export default SegmentLocations;
|
|
@@ -19,18 +19,20 @@ import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
|
19
19
|
import SimpleList from '../../../../components/SimpleList';
|
|
20
20
|
import Text from '../../../../components/Text';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
|
+
import { ThemeMode } from '../../../../@types';
|
|
22
23
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
23
24
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
-
import InputSelect from '../../../shared/
|
|
25
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
25
26
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
27
|
import { connectSelector } from '../../../app/connect/connectStore';
|
|
28
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
27
29
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
28
30
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
29
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
31
|
+
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), textAlign: 'start' }));
|
|
30
32
|
});
|
|
31
33
|
var SegmentLocations = function (_a) {
|
|
32
34
|
var _b, _c, _d, _e;
|
|
33
|
-
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose;
|
|
35
|
+
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose, isPopupMode = _a.isPopupMode;
|
|
34
36
|
var _f = React.useState([]), segmentList = _f[0], setSegmentList = _f[1];
|
|
35
37
|
var _g = React.useState(null), anchorEl = _g[0], setAnchorEl = _g[1];
|
|
36
38
|
var t = useTranslation().t;
|
|
@@ -58,9 +60,11 @@ var SegmentLocations = function (_a) {
|
|
|
58
60
|
onCloseList();
|
|
59
61
|
segmentControl.field.onChange(segment);
|
|
60
62
|
};
|
|
61
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer,
|
|
63
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputSelect, { required: true, label: t('segment_location_title'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, InputProps: {
|
|
64
|
+
endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl })
|
|
65
|
+
}, placeholder: t('choose_any_segment'), value: (isAr ? (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = segment === null || segment === void 0 ? void 0 : segment.name) === null || _e === void 0 ? void 0 : _e.en) || '', helperText: error && t(error) }), _jsx(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseList }, { children: _jsx(SimpleList, { isPopupMode: isPopupMode, list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
62
66
|
var _a, _b;
|
|
63
67
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIcon, {})] }));
|
|
64
|
-
} }) }))] })
|
|
68
|
+
} }) }))] }) })));
|
|
65
69
|
};
|
|
66
70
|
export default SegmentLocations;
|
|
@@ -3,6 +3,7 @@ interface SegmentProfitsProps {
|
|
|
3
3
|
show: boolean;
|
|
4
4
|
onListOpen?: () => void;
|
|
5
5
|
onListClose?: () => void;
|
|
6
|
+
isPopupMode: boolean;
|
|
6
7
|
}
|
|
7
|
-
declare const SegmentProfits: ({ show, onListOpen, onListClose }: SegmentProfitsProps) => JSX.Element;
|
|
8
|
+
declare const SegmentProfits: ({ show, onListOpen, onListClose, isPopupMode }: SegmentProfitsProps) => JSX.Element;
|
|
8
9
|
export default SegmentProfits;
|
|
@@ -19,18 +19,20 @@ import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
|
19
19
|
import SimpleList from '../../../../components/SimpleList';
|
|
20
20
|
import Text from '../../../../components/Text';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
|
+
import { ThemeMode } from '../../../../@types';
|
|
22
23
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
23
24
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
-
import InputSelect from '../../../shared/
|
|
25
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
25
26
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
27
|
import { connectSelector } from '../../../app/connect/connectStore';
|
|
28
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
27
29
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
28
30
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
29
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
31
|
+
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), textAlign: 'start' }));
|
|
30
32
|
});
|
|
31
33
|
var SegmentProfits = function (_a) {
|
|
32
34
|
var _b, _c, _d, _e;
|
|
33
|
-
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose;
|
|
35
|
+
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose, isPopupMode = _a.isPopupMode;
|
|
34
36
|
var _f = React.useState([]), segmentList = _f[0], setSegmentList = _f[1];
|
|
35
37
|
var _g = React.useState(null), anchorEl = _g[0], setAnchorEl = _g[1];
|
|
36
38
|
var t = useTranslation().t;
|
|
@@ -58,7 +60,9 @@ var SegmentProfits = function (_a) {
|
|
|
58
60
|
onCloseList();
|
|
59
61
|
segmentControl.field.onChange(segment);
|
|
60
62
|
};
|
|
61
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt:
|
|
63
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 1.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('segment_profit_title'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, InputProps: {
|
|
64
|
+
endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl })
|
|
65
|
+
}, placeholder: t('choose_any_segment'), value: (isAr ? (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = segment === null || segment === void 0 ? void 0 : segment.name) === null || _e === void 0 ? void 0 : _e.en) || '', helperText: error && t(error) }), _jsx(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseList }, { children: _jsx(SimpleList, { isPopupMode: isPopupMode, list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
62
66
|
var _a, _b;
|
|
63
67
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIcon, {})] }));
|
|
64
68
|
} }) }))] })) })));
|
|
@@ -3,6 +3,7 @@ interface SegmentTechsProps {
|
|
|
3
3
|
show: boolean;
|
|
4
4
|
onListOpen?: () => void;
|
|
5
5
|
onListClose?: () => void;
|
|
6
|
+
isPopupMode: boolean;
|
|
6
7
|
}
|
|
7
|
-
declare const SegmentTechs: ({ show, onListOpen, onListClose }: SegmentTechsProps) => JSX.Element;
|
|
8
|
+
declare const SegmentTechs: ({ show, onListOpen, onListClose, isPopupMode }: SegmentTechsProps) => JSX.Element;
|
|
8
9
|
export default SegmentTechs;
|
|
@@ -19,18 +19,20 @@ import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
|
19
19
|
import SimpleList from '../../../../components/SimpleList';
|
|
20
20
|
import Text from '../../../../components/Text';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
|
+
import { ThemeMode } from '../../../../@types';
|
|
22
23
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
23
24
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
-
import InputSelect from '../../../shared/
|
|
25
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
25
26
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
27
|
import { connectSelector } from '../../../app/connect/connectStore';
|
|
28
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
27
29
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
28
30
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
29
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
31
|
+
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), textAlign: 'start' }));
|
|
30
32
|
});
|
|
31
33
|
var SegmentTechs = function (_a) {
|
|
32
34
|
var _b, _c, _d, _e;
|
|
33
|
-
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose;
|
|
35
|
+
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose, isPopupMode = _a.isPopupMode;
|
|
34
36
|
var _f = React.useState([]), segmentList = _f[0], setSegmentList = _f[1];
|
|
35
37
|
var _g = React.useState(null), anchorEl = _g[0], setAnchorEl = _g[1];
|
|
36
38
|
var t = useTranslation().t;
|
|
@@ -58,7 +60,9 @@ var SegmentTechs = function (_a) {
|
|
|
58
60
|
onCloseList();
|
|
59
61
|
segmentControl.field.onChange(segment);
|
|
60
62
|
};
|
|
61
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt:
|
|
63
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 1.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('segment_tech_title'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, InputProps: {
|
|
64
|
+
endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl })
|
|
65
|
+
}, placeholder: t('choose_any_segment'), value: (isAr ? (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = segment === null || segment === void 0 ? void 0 : segment.name) === null || _e === void 0 ? void 0 : _e.en) || '', helperText: error && t(error) }), _jsx(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseList }, { children: _jsx(SimpleList, { isPopupMode: isPopupMode, list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
62
66
|
var _a, _b;
|
|
63
67
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIcon, {})] }));
|
|
64
68
|
} }) }))] })) })));
|
|
@@ -3,6 +3,7 @@ interface TeamSizeProps {
|
|
|
3
3
|
show: boolean;
|
|
4
4
|
onListOpen?: () => void;
|
|
5
5
|
onListClose?: () => void;
|
|
6
|
+
isPopupMode: boolean;
|
|
6
7
|
}
|
|
7
|
-
declare const TeamSize: ({ show, onListOpen, onListClose }: TeamSizeProps) => JSX.Element;
|
|
8
|
+
declare const TeamSize: ({ show, onListOpen, onListClose, isPopupMode }: TeamSizeProps) => JSX.Element;
|
|
8
9
|
export default TeamSize;
|
|
@@ -20,17 +20,19 @@ import SimpleList from '../../../../components/SimpleList';
|
|
|
20
20
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
22
|
import Text from '../../../../components/Text';
|
|
23
|
+
import { ThemeMode } from '../../../../@types';
|
|
23
24
|
import { connectSelector } from '../../../app/connect/connectStore';
|
|
24
25
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
|
-
import InputSelect from '../../../shared/
|
|
26
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
26
27
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
28
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
27
29
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
28
30
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
29
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
31
|
+
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), textAlign: 'start' }));
|
|
30
32
|
});
|
|
31
33
|
var TeamSize = function (_a) {
|
|
32
34
|
var _b, _c, _d, _e;
|
|
33
|
-
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose;
|
|
35
|
+
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose, isPopupMode = _a.isPopupMode;
|
|
34
36
|
var _f = React.useState([]), teamSizeList = _f[0], setTeamSizeList = _f[1];
|
|
35
37
|
var _g = React.useState(null), anchorEl = _g[0], setAnchorEl = _g[1];
|
|
36
38
|
var t = useTranslation().t;
|
|
@@ -58,7 +60,9 @@ var TeamSize = function (_a) {
|
|
|
58
60
|
onCloseList();
|
|
59
61
|
teamSizeControl.field.onChange(teamSize);
|
|
60
62
|
};
|
|
61
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt:
|
|
63
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 1.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('team_size_title'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, InputProps: {
|
|
64
|
+
endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl })
|
|
65
|
+
}, placeholder: t('choose_team_size'), value: (isAr ? (_d = teamSize === null || teamSize === void 0 ? void 0 : teamSize.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = teamSize === null || teamSize === void 0 ? void 0 : teamSize.name) === null || _e === void 0 ? void 0 : _e.en) || '', helperText: error && t(error) }), _jsx(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseList }, { children: _jsx(SimpleList, { isPopupMode: isPopupMode, list: teamSizeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
62
66
|
var _a, _b;
|
|
63
67
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (teamSize === null || teamSize === void 0 ? void 0 : teamSize.id) && _jsx(CheckIcon, {})] }));
|
|
64
68
|
} }) }))] })) })));
|
|
@@ -11,23 +11,23 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import { alpha, styled } from '@mui/material/styles';
|
|
16
14
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
15
|
+
import { useTranslation } from 'react-i18next';
|
|
16
|
+
import { styled } from '@mui/material/styles';
|
|
17
|
+
import Box from '@mui/material/Box';
|
|
18
|
+
import Divider from '@mui/material/Divider';
|
|
17
19
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
|
-
import { civilIDValidationSchema } from './validation';
|
|
19
20
|
import { useAppDispatch, useLanguage, useAppSelector, useSetFromDefaultValues } from '../../../../hooks';
|
|
20
21
|
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
21
22
|
import { deepCopy } from '../../../../utils';
|
|
22
23
|
import { clearError, connectSelector, createCivilIdAuth, resetMobileScreen, resetStore } from '../../../app/connect/connectStore';
|
|
23
24
|
import Form from '../../../../components/Form';
|
|
24
25
|
import Button, { MobileButton } from '../../../shared/Button';
|
|
25
|
-
import {
|
|
26
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
26
27
|
import Collapse from '../../../../components/Collapse';
|
|
27
|
-
import Box from '@mui/material/Box';
|
|
28
|
-
import Divider from '@mui/material/Divider';
|
|
29
28
|
import Text from '../../../../components/Text';
|
|
30
29
|
import IDNumber from './IDNumber';
|
|
30
|
+
import { civilIDValidationSchema } from './validation';
|
|
31
31
|
var FormStyled = styled(Form)(function () { return ({
|
|
32
32
|
display: 'flex',
|
|
33
33
|
flexDirection: 'column'
|
|
@@ -35,14 +35,14 @@ var FormStyled = styled(Form)(function () { return ({
|
|
|
35
35
|
var TextStyled = styled(Text)(function (_a) {
|
|
36
36
|
var theme = _a.theme;
|
|
37
37
|
return ({
|
|
38
|
-
color:
|
|
38
|
+
color: theme.palette.info.contrastText
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
var DividerStyled = styled(Divider)(function (_a) {
|
|
42
42
|
var theme = _a.theme;
|
|
43
43
|
return ({
|
|
44
44
|
width: '45%',
|
|
45
|
-
borderColor:
|
|
45
|
+
borderColor: theme.palette.divider,
|
|
46
46
|
marginBlockEnd: theme.spacing(0.62)
|
|
47
47
|
});
|
|
48
48
|
});
|
|
@@ -51,9 +51,8 @@ var OrBoxStyled = styled(Box)(function (_a) {
|
|
|
51
51
|
return ({
|
|
52
52
|
display: 'flex',
|
|
53
53
|
justifyContent: 'space-between',
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
marginInline: theme.spacing(2.5)
|
|
54
|
+
margin: theme.spacing(3),
|
|
55
|
+
marginTop: theme.spacing(0)
|
|
57
56
|
});
|
|
58
57
|
});
|
|
59
58
|
var CivilID = function (_a) {
|
|
@@ -90,6 +89,6 @@ var CivilID = function (_a) {
|
|
|
90
89
|
dispatch(resetStore());
|
|
91
90
|
}, []);
|
|
92
91
|
var disabled = !methods.formState.isValid || !!error;
|
|
93
|
-
return (_jsx(
|
|
92
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'get_started', description: 'civil_id_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(IDNumber, { sx: { mb: methods.formState.isValid ? 5.5 : 0, transition: 'mb 0.3s' } }), _jsx(Button, __assign({ sx: { mt: 5 }, loading: loading, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: !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 || settingsStore.loading }, { children: t('mobile_button_label') }))] }))] })) })) })));
|
|
94
93
|
};
|
|
95
94
|
export default React.memo(CivilID);
|
|
@@ -9,30 +9,15 @@ 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
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
-
import Box from '@mui/material/Box';
|
|
17
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
18
|
-
import Text from '../../../../components/Text';
|
|
19
16
|
import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
|
|
20
17
|
import { CIVIL_ID_NUMBER_LENGTH } from '../../../../constants';
|
|
21
|
-
import Input from '../../../shared/
|
|
18
|
+
import Input from '../../../shared/TextField';
|
|
22
19
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
23
20
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
24
|
-
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
25
|
-
var theme = _a.theme;
|
|
26
|
-
return ({
|
|
27
|
-
display: 'flex',
|
|
28
|
-
justifyContent: 'space-between',
|
|
29
|
-
padding: theme.spacing(0, 2.5, 1.25, 2.5)
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
var InputLabelStyled = styled(Text)(function (_a) {
|
|
33
|
-
var theme = _a.theme;
|
|
34
|
-
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
35
|
-
});
|
|
36
21
|
var IDNumber = React.forwardRef(function (_a, ref) {
|
|
37
22
|
var _b;
|
|
38
23
|
var sx = _a.sx;
|
|
@@ -53,6 +38,6 @@ var IDNumber = React.forwardRef(function (_a, ref) {
|
|
|
53
38
|
};
|
|
54
39
|
var idValue = civilIdControl.field.value;
|
|
55
40
|
var error = (_b = civilIdControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
56
|
-
return (
|
|
41
|
+
return (_jsx(ScreenContainer, __assign({ ref: ref, sx: sx }, { children: _jsx(Input, { dir: 'ltr', type: 'text', label: t('enter_civil_id'), inputProps: { maxLength: CIVIL_ID_NUMBER_LENGTH }, InputProps: { endAdornment: _jsx(EndAdornment, { value: idValue, error: error, onClear: clearIdNumber }) }, onChange: handleIdChange, value: idValue, placeholder: t('civil_id_placeholder'), helperText: error && t(error), required: true }) })));
|
|
57
42
|
});
|
|
58
43
|
export default React.memo(IDNumber);
|
|
@@ -55,7 +55,7 @@ import { styled } from '@mui/material/styles';
|
|
|
55
55
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
56
56
|
import Collapse from '../../../../components/Collapse';
|
|
57
57
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
58
|
-
import Input from '../../../shared/
|
|
58
|
+
import Input from '../../../shared/TextField';
|
|
59
59
|
import { checkEmailAvailability, connectSelector } from '../../../app/connect/connectStore';
|
|
60
60
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
61
61
|
var InputStyled = styled(Input)(function () { return ({
|
|
@@ -101,6 +101,10 @@ var Email = function (_a) {
|
|
|
101
101
|
var clearNumber = function () {
|
|
102
102
|
emailControl.field.onChange('');
|
|
103
103
|
};
|
|
104
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(InputStyled, { label: t('signup_email_lable'), value: emailValue,
|
|
104
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, { children: _jsx(InputStyled, { label: t('signup_email_lable'), value: emailValue, inputProps: {
|
|
105
|
+
readOnly: readOnly
|
|
106
|
+
}, InputProps: {
|
|
107
|
+
endAdornment: _jsx(EndAdornment, { value: emailValue, loading: emailChecking, error: error, onClear: clearNumber })
|
|
108
|
+
}, onEnterPressed: function (e) { return e.preventDefault(); }, onChange: handleEmailChange, type: 'email', placeholder: t('signup_email_placeholder'), helperText: error && t(error) }) }) })));
|
|
105
109
|
};
|
|
106
110
|
export default React.memo(Email);
|