@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
|
@@ -20,7 +20,7 @@ import { settingsSelector } from '../../../../app/settings';
|
|
|
20
20
|
import { CR_MIN_LICENSE_LENGTH, CR_NUMBER_MAX_LENGTH, FL_MIN_LICENSE_LENGTH, FL_NUMBER_ENTITY_LENGTH, KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH } from '../../../../constants';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
22
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
23
|
-
import Input from '../../../shared/
|
|
23
|
+
import Input from '../../../shared/TextField';
|
|
24
24
|
import { clearError, entitySelector } from '../../../app/entity/entityStore';
|
|
25
25
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
26
26
|
var LicenseNumber = function (_a) {
|
|
@@ -48,6 +48,8 @@ var LicenseNumber = function (_a) {
|
|
|
48
48
|
var isCR = type === BusinessType.CR;
|
|
49
49
|
var length = !isSACountry ? KW_MAX_LICENSE_LENGTH : isCR ? CR_NUMBER_MAX_LENGTH : FL_NUMBER_ENTITY_LENGTH;
|
|
50
50
|
var minLength = !isSACountry ? KW_MIN_LICENSE_LENGTH : isCR ? CR_MIN_LICENSE_LENGTH : FL_MIN_LICENSE_LENGTH;
|
|
51
|
-
return (_jsx(Collapse, __assign({ in: show && !!number }, { children: _jsx(ScreenContainer, __assign({ sx: { mt:
|
|
51
|
+
return (_jsx(Collapse, __assign({ in: show && !!number }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 1.5 } }, { children: _jsx(Input, { label: t('license_number_label'), onChange: handleChange, InputProps: {
|
|
52
|
+
endAdornment: _jsx(EndAdornment, { value: licenseNumberValue, isVerified: isVerified })
|
|
53
|
+
}, inputProps: { maxLength: length, readOnly: readOnly }, value: licenseNumberValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: isCR ? t('cr_number_hint') : t('fl_number_hint'), helperText: error && t(error, { length: minLength }) }) })) })));
|
|
52
54
|
};
|
|
53
55
|
export default React.memo(LicenseNumber);
|
|
@@ -17,7 +17,7 @@ import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
|
17
17
|
import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
|
|
18
18
|
import Collapse from '../../../../components/Collapse';
|
|
19
19
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
|
-
import Input from '../../../shared/
|
|
20
|
+
import Input from '../../../shared/TextField';
|
|
21
21
|
import { clearError, entitySelector } from '../../../app/entity/entityStore';
|
|
22
22
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
23
23
|
var UnifiedNumber = function (_a) {
|
|
@@ -39,6 +39,10 @@ var UnifiedNumber = function (_a) {
|
|
|
39
39
|
var unifiedNumberControl = useController({ control: control, name: 'unifiedNumber' });
|
|
40
40
|
var unifiedNumberValue = unifiedNumberControl.field.value;
|
|
41
41
|
var error = (_d = unifiedNumberControl.fieldState.error) === null || _d === void 0 ? void 0 : _d.message;
|
|
42
|
-
return (_jsx(Collapse, __assign({ in: show && !!number }, { children: _jsx(ScreenContainer, __assign({ sx: { mt:
|
|
42
|
+
return (_jsx(Collapse, __assign({ in: show && !!number }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 1.5 } }, { children: _jsx(Input, { InputProps: {
|
|
43
|
+
endAdornment: _jsx(EndAdornment, { value: unifiedNumberValue, isVerified: isVerified })
|
|
44
|
+
}, inputProps: {
|
|
45
|
+
readOnly: readOnly
|
|
46
|
+
}, label: t('unified_number_label'), onChange: handleChange, value: unifiedNumberValue, sx: { '& .MuiInputBase-input': { cursor: 'auto' } }, placeholder: t('unified_number_hint'), helperText: error && t(error) }) })) })));
|
|
43
47
|
};
|
|
44
48
|
export default React.memo(UnifiedNumber);
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import * as React from 'react';
|
|
3
14
|
import { Trans, useTranslation } from 'react-i18next';
|
|
4
15
|
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
5
16
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
6
18
|
import { maskEmail } from '../../../../utils';
|
|
7
19
|
import { entitySelector } from '../../../app/entity/entityStore';
|
|
8
20
|
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
@@ -16,6 +28,6 @@ var ResetPasswordSuccess = function (_a) {
|
|
|
16
28
|
var onBack = function () {
|
|
17
29
|
dispatch(handlePrevScreenStep());
|
|
18
30
|
};
|
|
19
|
-
return (_jsx(SuccessScreen, { title: t("reset_password_success_title"), description: _jsx(Trans, { i18nKey: 'reset_password_success_description_dev', values: { email: maskedEmail } }), showEmailProviders: true, enableBack: true, onBack: function () { return onBack(); } }));
|
|
31
|
+
return (_jsx(ContainerWithHeader, __assign({ onBack: function () { return onBack(); }, title: 'reset_password_success_header_title', description: 'reset_password_success_header_description' }, { children: _jsx(SuccessScreen, { title: t("reset_password_success_title"), description: _jsx(Trans, { i18nKey: 'reset_password_success_description_dev', values: { email: maskedEmail } }), showEmailProviders: true, enableBack: true, onBack: function () { return onBack(); } }) })));
|
|
20
32
|
};
|
|
21
33
|
export default React.memo(ResetPasswordSuccess);
|
|
@@ -1,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 } from 'react-i18next';
|
|
4
15
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
5
16
|
import { updateBoardSuccess, entitySelector } from '../../../app/entity/entityStore';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
6
18
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
7
19
|
var Success = function (_a) {
|
|
8
20
|
var t = useTranslation().t;
|
|
@@ -15,6 +27,6 @@ var Success = function (_a) {
|
|
|
15
27
|
var onSuccess = function () {
|
|
16
28
|
setClicked(true);
|
|
17
29
|
};
|
|
18
|
-
return (_jsx(SuccessScreen, { title: t('entity_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: clicked && loading, error: error || '' }));
|
|
30
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'entity_success_header_title', description: 'entity_success_header_description' }, { children: _jsx(SuccessScreen, { title: t('entity_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: clicked && loading, error: error || '' }) })));
|
|
19
31
|
};
|
|
20
32
|
export default React.memo(Success);
|
|
@@ -14,9 +14,10 @@ import { memo } from 'react';
|
|
|
14
14
|
import { useAppSelector } from '../../../../hooks';
|
|
15
15
|
import { entitySelector } from '../../../app/entity/entityStore';
|
|
16
16
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
17
18
|
var SuccessWithFlowButtons = function () {
|
|
18
19
|
var data = useAppSelector(entitySelector).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: 'entity_flows_title', description: 'entity_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);
|
|
@@ -21,7 +21,7 @@ import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
|
21
21
|
import { deepCopy, maskPhone } from '../../../../utils';
|
|
22
22
|
import Form from '../../../../components/Form';
|
|
23
23
|
import Text from '../../../../components/Text';
|
|
24
|
-
import {
|
|
24
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
25
25
|
import { entitySelector, clearError, resetOTPScreen, verifyEntityLeadOTP } from '../../../app/entity/entityStore';
|
|
26
26
|
import Button from '../../../shared/Button';
|
|
27
27
|
import { OTPValidation } from './validation';
|
|
@@ -29,17 +29,14 @@ import OTPInput from './OTPInput';
|
|
|
29
29
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
30
30
|
var theme = _a.theme;
|
|
31
31
|
return ({
|
|
32
|
-
background: theme.palette.common.white,
|
|
33
|
-
border: '1px solid',
|
|
34
|
-
borderColor: theme.palette.divider,
|
|
35
32
|
direction: theme.direction,
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
paddingInline: theme.spacing(3),
|
|
34
|
+
paddingBottom: theme.spacing(5)
|
|
38
35
|
});
|
|
39
36
|
});
|
|
40
37
|
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
41
38
|
var theme = _a.theme;
|
|
42
|
-
return (__assign(__assign({}, theme.typography.
|
|
39
|
+
return (__assign(__assign({}, theme.typography.body2), { color: theme.palette.secondary.main, fontWeight: theme.typography.fontWeightRegular, lineHeight: '19px', whiteSpace: 'pre-line' }));
|
|
43
40
|
});
|
|
44
41
|
var FormStyled = styled(Form)(function () { return ({
|
|
45
42
|
display: 'flex',
|
|
@@ -73,6 +70,6 @@ var VerifyNumber = function (_a) {
|
|
|
73
70
|
dispatch(verifyEntityLeadOTP(deepCopy(formData)));
|
|
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, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) })));
|
|
77
74
|
};
|
|
78
75
|
export default React.memo(VerifyNumber);
|
|
@@ -22,11 +22,13 @@ import ConnectExpressCreateAccountLoaderScreen from './connectExpress/screens/Cr
|
|
|
22
22
|
import ConnectExpressSuccessFlowButtonsScreen from '../features/connectExpress/screens/SuccessWithFlowButtons';
|
|
23
23
|
import ConnectExpressAccountAlreadyCreatedScreen from '../features/connectExpress/screens/AccountAlreadyCreated';
|
|
24
24
|
import CustomersPage from './business/screens/Customers';
|
|
25
|
+
import ExpectedSalesPage from './business/screens/ExpectedSales';
|
|
25
26
|
import IDBODPage from './business/screens/IDBOD';
|
|
26
27
|
import BusinessVerifyPage from './business/screens/Verify';
|
|
27
28
|
import BusinessOTPPage from './business/screens/OTP';
|
|
28
29
|
import BusinessTypePage from './business/screens/BusinessType';
|
|
29
|
-
import
|
|
30
|
+
import ActivityInfoPage from './business/screens/Activities';
|
|
31
|
+
import ActivitiesPage from './business/screens/BusinessActivities';
|
|
30
32
|
import SuccessPage from './business/screens/Success';
|
|
31
33
|
import SuccessWithFlowButtonsPage from './business/screens/SuccessWithFlowButtons';
|
|
32
34
|
import ResetPasswordSuccessPage from './business/screens/ResetPasswordSuccess';
|
|
@@ -44,6 +46,7 @@ import IndividualPhoneInfoPage from './individual/screens/IndividualPhoneInfo';
|
|
|
44
46
|
import IndividualListPage from './individual/screens/IndividualList';
|
|
45
47
|
import IndividualPersonalInfo from './individual/screens/IndividualPersonalInfo';
|
|
46
48
|
import AdditionalIndividualInfoPage from './individual/screens/AdditionalIndividualInfo';
|
|
49
|
+
import IndividualOccupationPage from './individual/screens/IndividualOccupation';
|
|
47
50
|
import SuccessOwnerPage from './individual/screens/Success';
|
|
48
51
|
import IndividualSuccessWithFlowPage from './individual/screens/SuccessWithFlowButtons';
|
|
49
52
|
import IndividualResetPasswordSuccessPage from './individual/screens/ResetPasswordSuccess';
|
|
@@ -71,10 +74,12 @@ import EntitySuccessPage from './entity/screens/Success';
|
|
|
71
74
|
import EntitySuccessWithFlowPage from './entity/screens/SuccessWithFlowButtons';
|
|
72
75
|
import EntityResetPasswordSuccessPage from './entity/screens/ResetPasswordSuccess';
|
|
73
76
|
import EntityDataLoadingPage from './entity/screens/PrepareDataLoading';
|
|
77
|
+
import EntityActivities from './entity/screens/EntityActivities';
|
|
74
78
|
import BrandVerifyPage from './brand/screens/Verify';
|
|
75
79
|
import BrandInfoPage from './brand/screens/BrandInfo';
|
|
76
80
|
import BrandSegmentPage from './brand/screens/BrandSegmentInfo';
|
|
77
81
|
import BrandActivitiesPage from './brand/screens/BrandActivities';
|
|
82
|
+
import BrandExpectedSalesPage from './brand/screens/ExpectedSales';
|
|
78
83
|
import BrandSuccessPage from './brand/screens/Success';
|
|
79
84
|
import BrandSuccessWithFlowPage from './brand/screens/SuccessWithFlowButtons';
|
|
80
85
|
import BrandResetPasswordSuccessPage from './brand/screens/ResetPasswordSuccess';
|
|
@@ -200,6 +205,10 @@ export var businessFeatureScreens = [
|
|
|
200
205
|
name: 'BUSINESS_BUSINESS_TYPE_STEP',
|
|
201
206
|
element: BusinessTypePage
|
|
202
207
|
},
|
|
208
|
+
{
|
|
209
|
+
name: 'BUSINESS_ACTIVITIES_INFO_STEP',
|
|
210
|
+
element: ActivityInfoPage
|
|
211
|
+
},
|
|
203
212
|
{
|
|
204
213
|
name: 'BUSINESS_ACTIVITIES_STEP',
|
|
205
214
|
element: ActivitiesPage
|
|
@@ -208,6 +217,10 @@ export var businessFeatureScreens = [
|
|
|
208
217
|
name: 'BUSINESS_CUSTOMERS_STEP',
|
|
209
218
|
element: CustomersPage
|
|
210
219
|
},
|
|
220
|
+
{
|
|
221
|
+
name: 'BUSINESS_EXCEPTED_SALES_STEP',
|
|
222
|
+
element: ExpectedSalesPage
|
|
223
|
+
},
|
|
211
224
|
{ name: 'BUSINESS_SUCCESS_STEP', element: SuccessPage },
|
|
212
225
|
{ name: 'BUSINESS_SUCCESS_FOUR_FLOWS_BUTTONS_STEP', element: SuccessWithFlowButtonsPage },
|
|
213
226
|
{ name: 'BUSINESS_RESET_PASSWORD_SUCCESS', element: ResetPasswordSuccessPage },
|
|
@@ -257,6 +270,10 @@ export var individualFeatureScreens = [
|
|
|
257
270
|
name: 'INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP',
|
|
258
271
|
element: IndividualPersonalInfo
|
|
259
272
|
},
|
|
273
|
+
{
|
|
274
|
+
name: 'INDIVIDUAL_OCCUPATIONS_STEP',
|
|
275
|
+
element: IndividualOccupationPage
|
|
276
|
+
},
|
|
260
277
|
{
|
|
261
278
|
name: 'INDIVIDUAL_ADDITIONAL_INDIVIDUAL_INFO_STEP',
|
|
262
279
|
element: AdditionalIndividualInfoPage
|
|
@@ -352,6 +369,10 @@ export var entityFeatureScreens = [
|
|
|
352
369
|
name: 'ENTITY_CAPITAL_STEP',
|
|
353
370
|
element: EntityCapitalPage
|
|
354
371
|
},
|
|
372
|
+
{
|
|
373
|
+
name: 'ENTITY_ACTIVITIES_STEP',
|
|
374
|
+
element: EntityActivities
|
|
375
|
+
},
|
|
355
376
|
{
|
|
356
377
|
name: 'ENTITY_DETAILS_SUCCESS_STEP',
|
|
357
378
|
element: EntitySuccessPage
|
|
@@ -383,6 +404,10 @@ export var brandFeatureScreens = [
|
|
|
383
404
|
name: 'BRAND_ACTIVITIES_STEP',
|
|
384
405
|
element: BrandActivitiesPage
|
|
385
406
|
},
|
|
407
|
+
{
|
|
408
|
+
name: 'BRAND_EXCEPTED_SALES_STEP',
|
|
409
|
+
element: BrandExpectedSalesPage
|
|
410
|
+
},
|
|
386
411
|
{
|
|
387
412
|
name: 'BRAND_DETAILS_SUCCESS_STEP',
|
|
388
413
|
element: BrandSuccessPage
|
|
@@ -43,7 +43,7 @@ var Individual = memo(function (_a) {
|
|
|
43
43
|
useAppConfig(__assign(__assign({ navigation: INDIVIDUAL_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
44
44
|
useErrorListener(individualError || error);
|
|
45
45
|
useStepStartedListener();
|
|
46
|
-
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation,
|
|
46
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, isMaturityExpress = data.isMaturityExpress;
|
|
47
47
|
useVerifyToken({
|
|
48
48
|
verify: verifyLeadToken,
|
|
49
49
|
loadingScreenName: 'INDIVIDUAL_LOADING_DATA_STEP',
|
|
@@ -58,11 +58,11 @@ var Individual = memo(function (_a) {
|
|
|
58
58
|
});
|
|
59
59
|
}, []);
|
|
60
60
|
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
61
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name,
|
|
61
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ countries: data.tapCountries, pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: initialLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, { children: individualFeatureScreens.map(function (_a, index) {
|
|
62
62
|
var Element = _a.element, name = _a.name;
|
|
63
63
|
var isActive = activeScreen.name === name;
|
|
64
64
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
65
|
-
}) })
|
|
65
|
+
}) }) })) })) })));
|
|
66
66
|
});
|
|
67
67
|
export function IndividualElement(props) {
|
|
68
68
|
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Individual, __assign({}, props)) })));
|
package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js
CHANGED
|
@@ -18,14 +18,14 @@ import { handleCurrentActiveScreen, settingsSelector } from '../../../../app/set
|
|
|
18
18
|
import Box from '@mui/material/Box';
|
|
19
19
|
import { alpha, styled } from '@mui/material/styles';
|
|
20
20
|
import { useAppDispatch, useAppSelector, useSetFromDefaultValues, useLanguage, useFormReadOnly, useDataNoneEditable, useFormErrorAndUpdateReadOnly, useExcludeReadOnlyFelids, useDataVerified } from '../../../../hooks';
|
|
21
|
-
import { DocumentPurpose, IndividualType } from '../../../../@types';
|
|
22
|
-
import { deepCopy, getIndividualType, isSA } from '../../../../utils';
|
|
21
|
+
import { DocumentPurpose, DropDownMode, IndividualType, ThemeMode } from '../../../../@types';
|
|
22
|
+
import { deepCopy, getIndividualType, isSA, getFileDetailsFromDocument } from '../../../../utils';
|
|
23
23
|
import Form from '../../../../components/Form';
|
|
24
24
|
import Collapse from '../../../../components/Collapse';
|
|
25
25
|
import Text from '../../../../components/Text';
|
|
26
26
|
import { individualSelector, updateIndividualInfo } from '../../../app/individual/individualStore';
|
|
27
27
|
import Button from '../../../shared/Button';
|
|
28
|
-
import
|
|
28
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
29
29
|
import PEPSwitch from './PEPSwitch';
|
|
30
30
|
import { IndividualInfoValidationSchema } from './validation';
|
|
31
31
|
import InfluencerSwitch from './InfluencerSwitch';
|
|
@@ -36,10 +36,9 @@ import CivilIDFile from './CivilIDFile';
|
|
|
36
36
|
import SignatureFile from './SignatureFile';
|
|
37
37
|
import ShareCount from './ShareCount';
|
|
38
38
|
import ShareValue from './ShareValue';
|
|
39
|
-
import { getFileDetailsFromDocument } from '../../../../utils';
|
|
40
39
|
var TextBoxStyled = styled(Box)(function (_a) {
|
|
41
40
|
var theme = _a.theme;
|
|
42
|
-
return (__assign(__assign({ display: 'flex', justifyContent: 'center', flexDirection: 'row', padding: theme.spacing(
|
|
41
|
+
return (__assign(__assign({ display: 'flex', justifyContent: 'center', flexDirection: 'row', padding: theme.spacing(0, 3, 1.8, 3) }, theme.typography.body1), { lineHeight: theme.spacing(2.5), color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary, fontWeight: theme.typography.fontWeightMedium }));
|
|
43
42
|
});
|
|
44
43
|
export var RoleTextStyled = styled(Text)(function (_a) {
|
|
45
44
|
var theme = _a.theme;
|
|
@@ -49,7 +48,6 @@ var ListType;
|
|
|
49
48
|
(function (ListType) {
|
|
50
49
|
ListType["SourceOfIncomeList"] = "SourceOfIncomeList";
|
|
51
50
|
ListType["MonthlyIncomeList"] = "MonthlyIncomeList";
|
|
52
|
-
ListType["OccupationList"] = "OccupationList";
|
|
53
51
|
})(ListType || (ListType = {}));
|
|
54
52
|
var AdditionalIndividualInfo = function (_a) {
|
|
55
53
|
var _b;
|
|
@@ -58,6 +56,7 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
58
56
|
var dispatch = useAppDispatch();
|
|
59
57
|
var _c = useAppSelector(individualSelector), data = _c.data, loading = _c.loading, error = _c.error;
|
|
60
58
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
59
|
+
var isPopupMode = settingsData.dropDownOpenMode === DropDownMode.popup;
|
|
61
60
|
var verify = data.verify;
|
|
62
61
|
var user = (verify.responseBody || {}).user;
|
|
63
62
|
var _d = data.individualData, occupation = _d.occupation, sourceIncome = _d.sourceIncome, monthlyIncome = _d.monthlyIncome, employerName = _d.employerName, isPEP = _d.isPEP, isInfluencer = _d.isInfluencer, civilID = _d.civilID, signatureFileId = _d.signatureFileId, civilIDUploading = _d.civilIDUploading, signatureFileUploading = _d.signatureFileUploading, shareCount = _d.shareCount, shareValue = _d.shareValue;
|
|
@@ -112,7 +111,8 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
112
111
|
dispatch(handleCurrentActiveScreen('INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP'));
|
|
113
112
|
};
|
|
114
113
|
var handleMenuClick = function (flag) {
|
|
115
|
-
|
|
114
|
+
if (!isPopupMode)
|
|
115
|
+
setListActive(flag);
|
|
116
116
|
};
|
|
117
117
|
var getUserName = function () {
|
|
118
118
|
var _a, _b, _c, _d;
|
|
@@ -142,9 +142,8 @@ var AdditionalIndividualInfo = function (_a) {
|
|
|
142
142
|
var showShares = isShareholder;
|
|
143
143
|
var isSourceOfIncomeListActive = listActive === ListType.SourceOfIncomeList;
|
|
144
144
|
var isMonthlyIncomeListActive = listActive === ListType.MonthlyIncomeList;
|
|
145
|
-
var isOccupationListActive = listActive === ListType.OccupationList;
|
|
146
145
|
var disabled = !methods.formState.isValid || civilIDUploading || signatureFileUploading;
|
|
147
|
-
return (_jsxs(
|
|
146
|
+
return (_jsxs(ContainerWithHeader, __assign({ onBack: function () { return onBack(); }, title: 'individual_additional_title', description: 'individual_additional_description' }, { children: [_jsx(Collapse, __assign({ in: !listActive && !!is_authorized, timeout: 500 }, { children: _jsx(TextBoxStyled, { children: getUserName() || '' }) })), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(Box, { children: [_jsx(Occupation, { isVerified: isOccupationVerified, readOnly: readOnly['occupation'] || noneEditable['occupation'], show: showOccupationFile && !isMonthlyIncomeListActive && !isSourceOfIncomeListActive }), _jsx(SourceOfIncome, { isPopupMode: isPopupMode, readOnly: readOnly['sourceIncome'] || noneEditable['source_of_income'], onListOpen: function () { return handleMenuClick(ListType.SourceOfIncomeList); }, onListClose: function () { return handleMenuClick(); }, show: showSourceOfIncome && !isMonthlyIncomeListActive }), _jsx(MonthlyIncome, { isPopupMode: isPopupMode, readOnly: readOnly['monthlyIncome'] || noneEditable['monthly_income'], show: showSourceOfIncome && !isSourceOfIncomeListActive, onListOpen: function () { return handleMenuClick(ListType.MonthlyIncomeList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ShareCount, { show: !listActive && showShares, readOnly: readOnly['shareCount'] }), _jsx(ShareValue, { show: !listActive && showShares, readOnly: readOnly['shareValue'] }), _jsxs(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: [_jsx(CivilIDFile, { show: !isSACountry, readOnly: readOnly['civilID'], defaultFiles: defaultCivilIdFiles }), _jsx(SignatureFile, { show: is_authorized && showSignatureFile, readOnly: readOnly['signatureFileId'], defaultFiles: defaultSignatureFiles })] })), _jsx(PEPSwitch, { show: showIsPEP && !listActive, readOnly: readOnly['isPEP'] || noneEditable['is_relative_PEP'], isVerified: isPEPSwitchVerified }), _jsx(InfluencerSwitch, { show: showIsInfluencer && !listActive, readOnly: readOnly['isInfluencer'] || noneEditable['is_influencer'], isVerified: isInfluencerSwitchVerified })] }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ disableBack: true, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) }))] })));
|
|
148
147
|
};
|
|
149
148
|
export default React.memo(AdditionalIndividualInfo);
|
|
150
149
|
AdditionalIndividualInfo.defaultProps = {};
|
|
@@ -20,7 +20,7 @@ import Tooltip from '../../../../components/Tooltip';
|
|
|
20
20
|
import Text from '../../../../components/Text';
|
|
21
21
|
import RadioGroup from '../../../../components/RadioGroup';
|
|
22
22
|
import RadioLabel from '../../../../components/RadioLabel';
|
|
23
|
-
import { styled
|
|
23
|
+
import { styled } from '@mui/material/styles';
|
|
24
24
|
import Mandatory from '../../../shared/Mandatory';
|
|
25
25
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
26
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
@@ -28,7 +28,7 @@ import { individualSelector, clearError } from '../../../app/individual/individu
|
|
|
28
28
|
import { InfoIconStyled, InfoOutlinedIconStyled } from './PEPSwitch';
|
|
29
29
|
var LabelTextStyled = styled(Text)(function (_a) {
|
|
30
30
|
var theme = _a.theme;
|
|
31
|
-
return (__assign(__assign({}, theme.typography.caption), { color:
|
|
31
|
+
return (__assign(__assign({}, theme.typography.caption), { color: theme.palette.text.secondary, marginBlockEnd: theme.spacing(0.625) }));
|
|
32
32
|
});
|
|
33
33
|
var RadioGroupStyled = styled(RadioGroup)(function (_a) {
|
|
34
34
|
var theme = _a.theme;
|
|
@@ -54,6 +54,6 @@ var InfluencerSwitch = function (_a) {
|
|
|
54
54
|
influencerControl.field.onChange(target.value === 'yes');
|
|
55
55
|
};
|
|
56
56
|
var influencerValue = influencerControl.field.value;
|
|
57
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl:
|
|
57
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pt: 2.5, pl: 3, pr: 3 } }, { children: [_jsxs(Box, __assign({ style: { display: 'flex', justifyContent: 'space-between' } }, { children: [_jsxs(LabelTextStyled, { children: [t('tap_js_are_you_an_influencer'), _jsx(Mandatory, {})] }), _jsx(Tooltip, __assign({ title: t('influencer_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] })), _jsxs(RadioGroupStyled, __assign({ readOnly: readOnly, value: influencerValue != null ? (influencerValue ? 'yes' : 'no') : false, onChange: readOnly ? undefined : handleOnChange }, { children: [_jsx(RadioLabel, { value: 'yes', label: _jsxs(RadioLabelStyled, { children: [t('yes'), influencerValue && isVerified && _jsx(CheckIcon, { sx: { marginInlineStart: '5px' }, isVerified: isVerified })] }) }), _jsx(RadioLabel, { value: 'no', label: _jsxs(RadioLabelStyled, { children: [t('no'), influencerValue === false && isVerified && _jsx(CheckIcon, { sx: { marginInlineStart: '5px' }, isVerified: isVerified })] }) })] }))] })) })));
|
|
58
58
|
};
|
|
59
59
|
export default React.memo(InfluencerSwitch);
|
|
@@ -18,20 +18,22 @@ import { styled } from '@mui/material/styles';
|
|
|
18
18
|
import { settingsSelector } from '../../../../app/settings';
|
|
19
19
|
import { findCurrencyByIso2, hasVerifiedValue } from '../../../../utils';
|
|
20
20
|
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
21
|
+
import { ThemeMode } from '../../../../@types';
|
|
21
22
|
import Collapse from '../../../../components/Collapse';
|
|
22
23
|
import Text from '../../../../components/Text';
|
|
23
24
|
import SimpleList from '../../../../components/SimpleList';
|
|
24
25
|
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
25
|
-
import InputSelect from '../../../shared/
|
|
26
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
26
27
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
27
28
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
28
29
|
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
30
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
29
31
|
var Container = styled(Box)(function () { return ({
|
|
30
32
|
display: 'flex'
|
|
31
33
|
}); });
|
|
32
34
|
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
33
35
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
34
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
36
|
+
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) }));
|
|
35
37
|
});
|
|
36
38
|
var MonthlyIncome = function (props) {
|
|
37
39
|
var _a;
|
|
@@ -82,7 +84,11 @@ var MonthlyIncome = function (props) {
|
|
|
82
84
|
var error = (_a = monthlyIncomeControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
83
85
|
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 0 } }, { children: [_jsx(InputSelect, { label: t('please_enter_actual_income', {
|
|
84
86
|
currency: t(findCurrencyByIso2(countryCode.iso2))
|
|
85
|
-
}), required: true,
|
|
87
|
+
}), required: true, InputProps: {
|
|
88
|
+
endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isMonthlyIncomeVerified(income), anchorEl: anchorEl })
|
|
89
|
+
}, inputProps: {
|
|
90
|
+
readOnly: props.readOnly
|
|
91
|
+
}, onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, placeholder: t('choose_any_source_of_income'), value: (isAr ? income === null || income === void 0 ? void 0 : income.range.ar : income === null || income === void 0 ? void 0 : income.range.en) || '', helperText: error && t(error) }), _jsx(DropDownStyle, __assign({ isPopupMode: props.isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseList }, { children: _jsx(SimpleList, { isPopupMode: props.isPopupMode, searchKeyPath: 'range.en', searchValuePath: ['range.en', 'range.ar'], list: incomeList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
86
92
|
return (_jsxs(_Fragment, { children: [_jsx(Container, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (income === null || income === void 0 ? void 0 : income.id) }, { children: isAr ? item.range.ar : item === null || item === void 0 ? void 0 : item.range.en })) }), item.id === (income === null || income === void 0 ? void 0 : income.id) && _jsx(CheckIcon, { isVerified: isMonthlyIncomeVerified(item) })] }));
|
|
87
93
|
} }) }))] })) })));
|
|
88
94
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
interface OccupationProps {
|
|
3
3
|
show: boolean;
|
|
4
|
-
onListOpen?: () => void;
|
|
5
|
-
onListClose?: () => void;
|
|
6
4
|
readOnly?: boolean;
|
|
7
5
|
isVerified?: boolean;
|
|
8
6
|
}
|
|
9
|
-
declare const Occupation: (
|
|
7
|
+
declare const Occupation: ({ show, readOnly, isVerified }: OccupationProps) => JSX.Element;
|
|
10
8
|
export default Occupation;
|
|
@@ -9,123 +9,42 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
13
|
import { useController, useFormContext } from 'react-hook-form';
|
|
15
14
|
import { useTranslation } from 'react-i18next';
|
|
16
|
-
import Box from '@mui/material/Box';
|
|
17
15
|
import { styled } from '@mui/material/styles';
|
|
18
|
-
import { useLanguage,
|
|
19
|
-
import {
|
|
20
|
-
import SimpleList from '../../../../components/SimpleList';
|
|
21
|
-
import Text from '../../../../components/Text';
|
|
16
|
+
import { useLanguage, useAppDispatch } from '../../../../hooks';
|
|
17
|
+
import { handleCurrentActiveScreen } from '../../../../app/settings';
|
|
22
18
|
import Collapse from '../../../../components/Collapse';
|
|
23
19
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
24
20
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
|
-
import
|
|
26
|
-
import { individualSelector, clearError } from '../../../app/individual/individualStore';
|
|
27
|
-
import InputSelect from '../../../shared/InputSelect';
|
|
21
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
28
22
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
32
|
-
});
|
|
33
|
-
var ListItem = styled(Box)(function (_a) {
|
|
23
|
+
var InputStyled = styled(InputSelect)(function () { return ({}); });
|
|
24
|
+
var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
|
|
34
25
|
var theme = _a.theme;
|
|
35
26
|
return ({
|
|
36
|
-
|
|
37
|
-
justifyContent: 'space-between',
|
|
38
|
-
width: '100%',
|
|
39
|
-
paddingInlineStart: theme.spacing(2.5),
|
|
40
|
-
paddingInlineEnd: theme.spacing(2.5),
|
|
41
|
-
paddingTop: theme.spacing(1.5),
|
|
42
|
-
paddingBottom: theme.spacing(1.5)
|
|
27
|
+
transform: theme.direction === 'rtl' ? 'rotate(90deg)' : 'rotate(-90deg)'
|
|
43
28
|
});
|
|
44
29
|
});
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
width: '100%'
|
|
49
|
-
}); });
|
|
50
|
-
var SimpleListStyled = styled((SimpleList))(function () { return ({
|
|
51
|
-
height: 'fit-content'
|
|
52
|
-
}); });
|
|
53
|
-
var Occupation = function (props) {
|
|
54
|
-
var _a, _b;
|
|
55
|
-
var _c = React.useState([]), occupation = _c[0], setOccupation = _c[1];
|
|
56
|
-
var _d = React.useState(null), anchorEl = _d[0], setAnchorEl = _d[1];
|
|
57
|
-
var _e = React.useState(''), subIndex = _e[0], setSubIndex = _e[1];
|
|
30
|
+
var Occupation = function (_a) {
|
|
31
|
+
var _b, _c;
|
|
32
|
+
var show = _a.show, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
58
33
|
var t = useTranslation().t;
|
|
59
34
|
var isAr = useLanguage().isAr;
|
|
60
35
|
var dispatch = useAppDispatch();
|
|
61
|
-
var _f = useAppSelector(individualSelector), data = _f.data, bckError = _f.error;
|
|
62
36
|
var control = useFormContext().control;
|
|
63
37
|
var occupationControl = useController({ name: 'occupation', control: control });
|
|
64
|
-
var occupationList = (data.individualData.responseBody || {}).occupationList;
|
|
65
38
|
var occupationValue = occupationControl.field.value;
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
(_a = props.onListClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
71
|
-
};
|
|
72
|
-
var handleOpenMainMenu = function (event) {
|
|
73
|
-
var _a;
|
|
74
|
-
setAnchorEl(event.currentTarget);
|
|
75
|
-
(_a = props.onListOpen) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
76
|
-
};
|
|
77
|
-
var handleOpenSubMenu = function (index) {
|
|
78
|
-
if (subIndex === index)
|
|
79
|
-
setSubIndex('');
|
|
80
|
-
else
|
|
81
|
-
setSubIndex(index);
|
|
82
|
-
};
|
|
83
|
-
var handleCloseSubMenu = function () {
|
|
84
|
-
setSubIndex('');
|
|
85
|
-
handleCloseMainMenu();
|
|
86
|
-
};
|
|
87
|
-
React.useEffect(function () {
|
|
88
|
-
if ((occupationList === null || occupationList === void 0 ? void 0 : occupationList.length) > 0) {
|
|
89
|
-
setOccupation(occupationList);
|
|
90
|
-
}
|
|
91
|
-
}, [occupationList]);
|
|
92
|
-
var onSelectItem = function (occupation) {
|
|
93
|
-
if (bckError)
|
|
94
|
-
dispatch(clearError());
|
|
95
|
-
handleCloseSubMenu();
|
|
96
|
-
occupationControl.field.onChange(occupation);
|
|
97
|
-
};
|
|
98
|
-
var handleSearch = function (value) {
|
|
99
|
-
var filteredList = occupationList === null || occupationList === void 0 ? void 0 : occupationList.filter(function (chapter) {
|
|
100
|
-
var _a, _b, _c;
|
|
101
|
-
return chapter.name.en.toLowerCase().includes(value.toLowerCase()) ||
|
|
102
|
-
chapter.name.en.toLowerCase().replace(',', '').includes(value.toLowerCase()) ||
|
|
103
|
-
chapter.name.ar.toLowerCase().includes(value.toLowerCase()) ||
|
|
104
|
-
((_a = chapter.sub) === null || _a === void 0 ? void 0 : _a.find(function (obj) { return obj.name.en.toLowerCase().includes(value.toLowerCase()); })) ||
|
|
105
|
-
((_b = chapter.sub) === null || _b === void 0 ? void 0 : _b.find(function (obj) { return obj.name.en.toLowerCase().replace(',', '').includes(value.toLowerCase()); })) ||
|
|
106
|
-
((_c = chapter.sub) === null || _c === void 0 ? void 0 : _c.find(function (obj) { return obj.name.ar.toLowerCase().includes(value.toLowerCase()); }));
|
|
107
|
-
});
|
|
108
|
-
setOccupation(filteredList);
|
|
39
|
+
var openOccupationsScreen = function () {
|
|
40
|
+
if (readOnly)
|
|
41
|
+
return;
|
|
42
|
+
dispatch(handleCurrentActiveScreen('INDIVIDUAL_OCCUPATIONS_STEP'));
|
|
109
43
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return (_jsx(Collapse, __assign({ in: props.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: 2.5 } }, { children: [_jsx(InputSelect, { required: true, label: t('occupation_title'), value: (isAr ? (_a = occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.name) === null || _b === void 0 ? void 0 : _b.en) || '', readOnly: props.readOnly, onClick: !!anchorEl ? handleCloseMainMenu : handleOpenMainMenu, placeholder: t('choose_any_occupation'), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { sx: { maxHeight: '350px', paddingTop: 0 }, list: occupation, listItemProps: { sx: { padding: 0 } }, onSelectItem: function (item) {
|
|
116
|
-
var _a;
|
|
117
|
-
var isSubEmpty = !item.sub || !((_a = item.sub) === null || _a === void 0 ? void 0 : _a.length);
|
|
118
|
-
if (isSubEmpty)
|
|
119
|
-
onSelectItem(item);
|
|
120
|
-
else
|
|
121
|
-
handleOpenSubMenu(item.code);
|
|
122
|
-
}, renderItem: function (item) {
|
|
123
|
-
var _a;
|
|
124
|
-
var isSubEmpty = !item.sub || !((_a = item.sub) === null || _a === void 0 ? void 0 : _a.length);
|
|
125
|
-
var showCheck = item.code === (occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.section_code) && isSubEmpty;
|
|
126
|
-
return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, __assign({ sx: __assign({ bgcolor: 'rgb(196 184 184 / 8%)', borderBottom: '1px solid rgba(227, 232, 238, 0.8)' }, (isSubEmpty && { bgcolor: 'inherit', borderBottom: 'none' })) }, { children: [_jsx(NameContainer, __assign({ isSelected: item.code === (occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.section_code), sx: __assign({}, (isSubEmpty && { paddingInlineStart: '5px' })) }, { children: isAr ? item.name.ar : item.name.en })), showCheck ? _jsx(CheckIcon, {}) : !isSubEmpty && _jsx(ExpandIcon, { anchorEl: subIndex === item.code })] })), _jsx(Collapse, __assign({ in: item.code === subIndex && !isSubEmpty }, { children: _jsx(SimpleListStyled, { sx: { pt: 0, pb: 0 }, list: (!isSubEmpty && item.sub) || [], onSelectItem: onSelectItem, listItemProps: { sx: { padding: 0, '&:last-child': { paddingBottom: 0 } } }, renderItem: function (item, idx) {
|
|
127
|
-
return (_jsxs(ListItem, __assign({ sx: { mt: idx === 0 ? 1 : 0 } }, { children: [_jsx(NameContainer, __assign({ isSelected: item.code === (occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.code) }, { children: isAr ? item.name.ar : item.name.en })), item.code === (occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.code) && _jsx(CheckIcon, {})] })));
|
|
128
|
-
} }) }))] }));
|
|
129
|
-
} })] }))] })) })));
|
|
44
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { pb: 1.5 } }, { children: _jsx(InputStyled, { required: true, label: t('occupation_title'), value: (isAr ? (_b = occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = occupationValue === null || occupationValue === void 0 ? void 0 : occupationValue.name) === null || _c === void 0 ? void 0 : _c.en) || '', InputProps: {
|
|
45
|
+
endAdornment: (_jsxs(_Fragment, { children: [_jsx(CheckIcon, { isVerified: isVerified, sx: { marginInlineEnd: '10px' } }), _jsx(ExpandIconStyled, {})] }))
|
|
46
|
+
}, inputProps: {
|
|
47
|
+
readOnly: readOnly
|
|
48
|
+
}, onClick: openOccupationsScreen, placeholder: t('choose_any_occupation') }) })) })));
|
|
130
49
|
};
|
|
131
50
|
export default Occupation;
|