@tap-payments/auth-jsconnect 2.5.23-test → 3.0.0-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +4 -0
- package/build/@types/app.js +5 -0
- package/build/api/country.d.ts +1 -0
- package/build/api/country.js +11 -1
- package/build/api/index.d.ts +1 -0
- package/build/app/settings.d.ts +5 -2
- package/build/app/settings.js +13 -3
- package/build/assets/locales/ar.json +107 -5
- package/build/assets/locales/en.json +108 -7
- package/build/components/AnimationFlow/AnimationFlow.d.ts +3 -3
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +3 -4
- package/build/components/AnimationFlow/BottomSheet.js +33 -27
- package/build/components/AnimationFlow/Dialog.d.ts +3 -4
- package/build/components/AnimationFlow/Dialog.js +17 -54
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +3 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +12 -5
- package/build/components/ArabicDatePicker/style.css +2 -0
- package/build/components/Button/Button.js +21 -10
- package/build/components/CheckBox/CheckBox.d.ts +2 -1
- package/build/components/CheckBox/CheckBox.js +41 -19
- package/build/components/DatePicker/DatePicker.d.ts +3 -1
- package/build/components/DatePicker/DatePicker.js +12 -6
- package/build/components/DatePicker/customStyle.css +1 -0
- package/build/components/ExpandIcon/ExpandIcon.js +8 -5
- package/build/components/FileInput/DragAndDrop.js +43 -39
- package/build/components/Icon/Icon.js +1 -1
- package/build/components/OTPField/OTPField.js +5 -4
- package/build/components/OTPTimer/OTPTimer.js +2 -6
- package/build/components/Popover/Popover.d.ts +6 -0
- package/build/components/Popover/Popover.js +79 -0
- package/build/components/Popover/index.d.ts +3 -0
- package/build/components/Popover/index.js +2 -0
- package/build/components/ProgressBar/CircularProgressBar.js +14 -15
- package/build/components/Radio/Radio.js +16 -6
- package/build/components/RadioLabel/RadioLabel.js +3 -2
- package/build/components/SimpleList/SimpleList.d.ts +15 -1
- package/build/components/SimpleList/SimpleList.js +48 -37
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +1 -1
- package/build/components/TextField/TextField.d.ts +17 -0
- package/build/components/TextField/TextField.js +89 -0
- package/build/components/TextField/index.d.ts +3 -0
- package/build/components/TextField/index.js +2 -0
- package/build/components/ToggleButtonGroup/ToggleButtonGroup.js +2 -1
- package/build/components/Tooltip/Tooltip.js +38 -7
- package/build/components/Warning/Warning.js +4 -4
- package/build/constants/app.js +35 -11
- package/build/constants/assets.d.ts +72 -0
- package/build/constants/assets.js +131 -59
- package/build/constants/date.d.ts +1 -0
- package/build/constants/date.js +14 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/features/app/brand/brandStore.d.ts +3 -2
- package/build/features/app/brand/brandStore.js +4 -1
- package/build/features/app/business/businessStore.d.ts +4 -2
- package/build/features/app/business/businessStore.js +10 -4
- package/build/features/app/entity/entityStore.d.ts +3 -2
- package/build/features/app/entity/entityStore.js +4 -1
- package/build/features/app/individual/individualStore.d.ts +3 -2
- package/build/features/app/individual/individualStore.js +4 -1
- package/build/features/bank/Bank.js +3 -3
- package/build/features/bank/screens/BankDetails/BankDetails.js +3 -8
- package/build/features/bank/screens/BankDetails/BankName.js +7 -3
- package/build/features/bank/screens/BankDetails/BankStatement.js +1 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -3
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +7 -16
- package/build/features/bank/screens/BankDetails/IBAN.js +7 -2
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/bank/screens/Success/Success.js +14 -2
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/bank/screens/Verify/Verify.js +5 -8
- package/build/features/brand/Brand.js +3 -3
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +2 -51
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +17 -55
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +9 -7
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +2 -31
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +14 -32
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +2 -1
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +12 -13
- package/build/features/brand/screens/BrandActivities/ExpectedSaleField.d.ts +8 -0
- package/build/features/brand/screens/BrandActivities/ExpectedSaleField.js +55 -0
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +9 -16
- package/build/features/brand/screens/BrandActivities/TAC.js +8 -21
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +4 -2
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +2 -2
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandName.js +7 -51
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +8 -4
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.js +11 -5
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.js +10 -4
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.js +10 -4
- package/build/features/brand/screens/BrandSegmentInfo/TeamSize.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/TeamSize.js +10 -4
- package/build/features/brand/screens/ExpectedSales/ExpectedSaleList.d.ts +29 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSaleList.js +136 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSales.d.ts +5 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSales.js +91 -0
- package/build/features/brand/screens/ExpectedSales/index.d.ts +2 -0
- package/build/features/brand/screens/ExpectedSales/index.js +2 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/brand/screens/Success/Success.js +13 -1
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/brand/screens/Verify/Verify.js +5 -8
- package/build/features/business/Business.js +3 -3
- package/build/features/business/screens/Activities/Activities.js +7 -11
- package/build/features/business/screens/Activities/ActivityField.d.ts +22 -0
- package/build/features/business/screens/Activities/ActivityField.js +63 -0
- package/build/features/business/screens/Activities/LicenseName.js +4 -2
- package/build/features/business/screens/Activities/OperationStartDate.js +3 -3
- package/build/features/business/screens/BrandDetails/BrandDetails.js +3 -2
- package/build/features/business/screens/BrandDetails/BrandName.js +5 -9
- package/build/features/business/screens/BrandDetails/Header.js +4 -3
- package/build/features/business/screens/BrandDetails/LicenseInfo.js +5 -9
- package/build/features/business/screens/BrandDetails/SalesChannel.js +9 -5
- package/build/features/business/screens/BusinessActivities/ActivityList.d.ts +30 -0
- package/build/features/business/screens/BusinessActivities/ActivityList.js +265 -0
- package/build/features/business/screens/BusinessActivities/BusinessActivities.d.ts +5 -0
- package/build/features/business/screens/BusinessActivities/BusinessActivities.js +90 -0
- package/build/features/business/screens/BusinessActivities/index.d.ts +2 -0
- package/build/features/business/screens/BusinessActivities/index.js +2 -0
- package/build/features/business/screens/BusinessType/Article.js +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +6 -4
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +2 -1
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +9 -11
- package/build/features/business/screens/BusinessType/EntityName.js +6 -3
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +2 -1
- package/build/features/business/screens/BusinessType/LicenseList.js +9 -6
- package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -3
- package/build/features/business/screens/BusinessType/LicenseType.js +16 -11
- package/build/features/business/screens/CivilID/CivilID.js +8 -16
- package/build/features/business/screens/CivilID/IDNumber.js +5 -18
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -18
- package/build/features/business/screens/Customers/CustomerLocations.js +11 -26
- package/build/features/business/screens/Customers/Customers.js +12 -10
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +2 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.js +10 -13
- package/build/features/business/screens/Customers/ExpectedSaleField.d.ts +6 -0
- package/build/features/business/screens/Customers/ExpectedSaleField.js +49 -0
- package/build/features/business/screens/Customers/RefundPolicy.js +8 -16
- package/build/features/business/screens/Customers/TransactionPolicy.js +4 -2
- package/build/features/business/screens/ExpectedSales/ExpectedSaleList.d.ts +29 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSaleList.js +136 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSales.d.ts +5 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSales.js +91 -0
- package/build/features/business/screens/ExpectedSales/index.d.ts +2 -0
- package/build/features/business/screens/ExpectedSales/index.js +2 -0
- package/build/features/business/screens/IDBOD/DOB.js +3 -12
- package/build/features/business/screens/IDBOD/ID.js +2 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +9 -16
- package/build/features/business/screens/OTP/OTP.js +10 -22
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/business/screens/Success/Success.js +13 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/business/screens/Verify/Verify.js +5 -8
- package/build/features/connect/Connect.js +3 -3
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +8 -4
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentLocations.js +9 -5
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentProfits.js +8 -4
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +8 -4
- package/build/features/connect/screens/BrandSegment/TeamSize.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/TeamSize.js +8 -4
- package/build/features/connect/screens/CivilID/CivilID.js +11 -12
- package/build/features/connect/screens/CivilID/IDNumber.js +3 -18
- package/build/features/connect/screens/Individual/Email.js +6 -2
- package/build/features/connect/screens/Individual/Individual.js +11 -9
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -0
- package/build/features/connect/screens/Individual/MobileNumber.js +29 -22
- package/build/features/connect/screens/Individual/Name.js +4 -2
- package/build/features/connect/screens/Merchant/BrandList.d.ts +2 -1
- package/build/features/connect/screens/Merchant/BrandList.js +8 -4
- package/build/features/connect/screens/Merchant/BrandName.d.ts +2 -1
- package/build/features/connect/screens/Merchant/BrandName.js +7 -42
- package/build/features/connect/screens/Merchant/Merchant.js +8 -4
- package/build/features/connect/screens/Merchant/TAC.js +12 -24
- package/build/features/connect/screens/Mobile/Mobile.js +19 -21
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -0
- package/build/features/connect/screens/Mobile/MobileNumber.js +22 -19
- package/build/features/connect/screens/NID/DOB.d.ts +1 -1
- package/build/features/connect/screens/NID/DOB.js +5 -26
- package/build/features/connect/screens/NID/IDNumber.js +3 -18
- package/build/features/connect/screens/NID/NID.js +13 -14
- package/build/features/connect/screens/OTP/OTP.js +5 -8
- package/build/features/connect/screens/ThankYou/ThankYou.js +13 -1
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +0 -61
- package/build/features/connectExpress/ConnectExpress.js +3 -3
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +13 -1
- package/build/features/connectExpress/screens/Brand/Brand.js +4 -2
- package/build/features/connectExpress/screens/CivilID/CivilID.js +7 -8
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +3 -18
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -2
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +3 -18
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -40
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +9 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +11 -6
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +8 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +9 -17
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +6 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +6 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +33 -26
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +6 -2
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +5 -8
- package/build/features/connectExpress/screens/Mobile/Mobile.js +21 -12
- package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +33 -26
- package/build/features/connectExpress/screens/Mobile/TAC.js +12 -24
- package/build/features/connectExpress/screens/NID/DOB.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/DOB.js +4 -24
- package/build/features/connectExpress/screens/NID/IDNumber.js +8 -18
- package/build/features/connectExpress/screens/NID/NID.js +7 -8
- package/build/features/connectExpress/screens/NID/TAC.js +9 -17
- package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +1 -1
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +3 -24
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +5 -18
- package/build/features/connectExpress/screens/NIDMissed/NID.js +2 -2
- package/build/features/connectExpress/screens/OTP/OTP.js +5 -8
- package/build/features/connectExpress/screens/OTP/OTPInput.js +1 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/entity/Entity.js +3 -3
- package/build/features/entity/screens/EntityActivities/ActivityList.d.ts +30 -0
- package/build/features/entity/screens/EntityActivities/ActivityList.js +265 -0
- package/build/features/entity/screens/EntityActivities/EntityActivities.d.ts +5 -0
- package/build/features/entity/screens/EntityActivities/EntityActivities.js +89 -0
- package/build/features/entity/screens/EntityActivities/index.d.ts +2 -0
- package/build/features/entity/screens/EntityActivities/index.js +2 -0
- package/build/features/entity/screens/EntityCapital/ActivityField.d.ts +22 -0
- package/build/features/entity/screens/EntityCapital/ActivityField.js +63 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +7 -3
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +6 -2
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +7 -3
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +10 -11
- package/build/features/entity/screens/EntityName/Article.js +1 -1
- package/build/features/entity/screens/EntityName/EntityName.js +6 -4
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +1 -50
- package/build/features/entity/screens/EntityName/EntityTypeList.js +19 -50
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -15
- package/build/features/entity/screens/EntityName/ExpiryDate.js +5 -11
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -15
- package/build/features/entity/screens/EntityName/IssuingDate.js +5 -11
- package/build/features/entity/screens/EntityName/LegalName.js +6 -2
- package/build/features/entity/screens/EntityName/LicenseNumber.js +4 -2
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +6 -2
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/entity/screens/Success/Success.js +13 -1
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/entity/screens/Verify/Verify.js +5 -8
- package/build/features/featuresScreens.js +26 -1
- package/build/features/individual/Individual.js +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +8 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +9 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +19 -100
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +14 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +6 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +7 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +9 -3
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +1 -1
- package/build/features/individual/screens/IndividualList/Email.js +4 -2
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +1 -27
- package/build/features/individual/screens/IndividualList/IndividualList.js +2 -21
- package/build/features/individual/screens/IndividualList/MobileNumber.js +30 -24
- package/build/features/individual/screens/IndividualList/UserList.js +36 -15
- package/build/features/individual/screens/IndividualOccupation/IndividualOccupation.d.ts +5 -0
- package/build/features/individual/screens/IndividualOccupation/IndividualOccupation.js +91 -0
- package/build/features/individual/screens/IndividualOccupation/OccupationList.d.ts +29 -0
- package/build/features/individual/screens/IndividualOccupation/OccupationList.js +136 -0
- package/build/features/individual/screens/IndividualOccupation/index.d.ts +2 -0
- package/build/features/individual/screens/IndividualOccupation/index.js +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +4 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +4 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +16 -12
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +7 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +7 -4
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +31 -24
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +10 -4
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +34 -30
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +10 -2
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/individual/screens/Success/Success.js +13 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/individual/screens/Verify/Verify.js +5 -8
- package/build/features/password/Password.js +3 -3
- package/build/features/password/screens/CreatePassword/ConditionText.js +2 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +15 -2
- package/build/features/password/screens/CreatePassword/CreatePassword.js +3 -3
- package/build/features/password/screens/CreatePassword/Password.js +17 -9
- package/build/features/password/screens/CreatePassword/PasswordBar.js +4 -4
- package/build/features/password/screens/OTP/OTP.js +10 -22
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/password/screens/Success/Success.js +13 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/password/screens/Verify/Verify.js +5 -8
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +16 -11
- package/build/features/shared/Background/Background.js +11 -2
- package/build/features/shared/Button/AbsherButton.js +12 -2
- package/build/features/shared/Button/Button.js +16 -11
- package/build/features/shared/Button/EmailProvidersButtons.js +34 -22
- package/build/features/shared/Button/FlowsButtons.d.ts +3 -1
- package/build/features/shared/Button/FlowsButtons.js +79 -69
- package/build/features/shared/Button/IndividualActionButtons.js +39 -40
- package/build/features/shared/Button/MobileButton.js +16 -2
- package/build/features/shared/Button/SuccessButton.d.ts +1 -1
- package/build/features/shared/Button/SuccessButton.js +10 -15
- package/build/features/shared/Calender/Calender.d.ts +3 -1
- package/build/features/shared/Calender/Calender.js +4 -4
- package/build/features/shared/Calender/CustomCalender.d.ts +15 -0
- package/build/features/shared/Calender/CustomCalender.js +46 -0
- package/build/features/shared/Calender/CustomDatePicker.d.ts +29 -0
- package/build/features/shared/Calender/CustomDatePicker.js +252 -0
- package/build/features/shared/Calender/CustomHijriDatePicker.d.ts +29 -0
- package/build/features/shared/Calender/CustomHijriDatePicker.js +258 -0
- package/build/features/shared/Calender/DatePicker.d.ts +29 -0
- package/build/features/shared/Calender/DatePicker.js +229 -0
- package/build/features/shared/Calender/index.d.ts +2 -0
- package/build/features/shared/Calender/index.js +2 -0
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -2
- package/build/features/shared/CheckIcon/CheckIcon.js +9 -7
- package/build/features/shared/Chip/Chip.js +2 -1
- package/build/features/shared/ClearIcon/ClearIcon.d.ts +2 -0
- package/build/features/shared/ClearIcon/ClearIcon.js +2 -1
- package/build/features/shared/Containers/ContainerWithHeader.d.ts +11 -0
- package/build/features/shared/Containers/ContainerWithHeader.js +52 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -2
- package/build/features/shared/Containers/FeatureContainer.js +6 -4
- package/build/features/shared/Containers/index.d.ts +2 -1
- package/build/features/shared/Containers/index.js +2 -1
- package/build/features/shared/CountryPopup/CountryPopup.d.ts +7 -0
- package/build/features/shared/CountryPopup/CountryPopup.js +166 -0
- package/build/features/shared/CountryPopup/index.d.ts +2 -0
- package/build/features/shared/CountryPopup/index.js +2 -0
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +6 -6
- package/build/features/shared/DataLoading/DataLoading.js +6 -6
- package/build/features/shared/DropDownStyle/DropDownStyle.d.ts +24 -0
- package/build/features/shared/DropDownStyle/DropDownStyle.js +61 -0
- package/build/features/shared/DropDownStyle/index.d.ts +2 -0
- package/build/features/shared/DropDownStyle/index.js +2 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +2 -1
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +2 -2
- package/build/features/shared/Footer/PoweredByFooter.d.ts +1 -2
- package/build/features/shared/Footer/PoweredByFooter.js +3 -3
- package/build/features/shared/GenericError/GenericError.js +3 -2
- package/build/features/shared/Header/Header.d.ts +8 -0
- package/build/features/shared/Header/Header.js +88 -0
- package/build/features/shared/Header/index.d.ts +3 -0
- package/build/features/shared/Header/index.js +2 -0
- package/build/features/shared/InputSelect/InputSelect.js +0 -1
- package/build/features/shared/LanguagePopup/LanguagePopup.d.ts +5 -0
- package/build/features/shared/LanguagePopup/LanguagePopup.js +178 -0
- package/build/features/shared/LanguagePopup/index.d.ts +2 -0
- package/build/features/shared/LanguagePopup/index.js +2 -0
- package/build/features/shared/Mandatory/Mandatory.js +2 -2
- package/build/features/shared/OTP/OTP.js +10 -11
- package/build/features/shared/PaciVerification/PaciVerification.js +5 -4
- package/build/features/shared/PasswordIcon/PasswordIcon.js +3 -2
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +47 -22
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +13 -0
- package/build/features/shared/SalesChannels/SalesChannel.js +11 -24
- package/build/features/shared/Search/Search.d.ts +3 -1
- package/build/features/shared/Search/Search.js +39 -3
- package/build/features/shared/SearchIcon/SearchIcon.d.ts +0 -1
- package/build/features/shared/SearchIcon/SearchIcon.js +6 -7
- package/build/features/shared/SearchIcon/index.d.ts +2 -0
- package/build/features/shared/SearchIcon/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +23 -8
- package/build/features/shared/SuccessScreen/SuccessScreen.js +9 -7
- package/build/features/shared/{UploadFile/UploadFile.d.ts → TextField/TextField.d.ts} +14 -24
- package/build/features/shared/TextField/TextField.js +63 -0
- package/build/features/shared/TextField/index.d.ts +3 -0
- package/build/features/shared/TextField/index.js +2 -0
- package/build/features/shared/TextFieldSelect/TextFieldSelect.d.ts +4 -0
- package/build/features/shared/TextFieldSelect/TextFieldSelect.js +32 -0
- package/build/features/shared/TextFieldSelect/index.d.ts +2 -0
- package/build/features/shared/TextFieldSelect/index.js +2 -0
- package/build/features/shared/TitleDescription/TitleDescription.d.ts +9 -0
- package/build/features/shared/TitleDescription/TitleDescription.js +77 -0
- package/build/features/shared/TitleDescription/index.d.ts +2 -0
- package/build/features/shared/TitleDescription/index.js +2 -0
- package/build/features/shared/UploadFile/FileUpload.d.ts +8 -2
- package/build/features/shared/UploadFile/FileUpload.js +58 -31
- package/build/features/shared/UploadFile/UploadWrapper.js +7 -3
- package/build/features/shared/UploadFile/index.d.ts +1 -2
- package/build/features/shared/UploadFile/index.js +1 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +8 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.js +58 -31
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +14 -9
- package/build/features/signIn/SignIn.js +3 -3
- package/build/features/signIn/screens/Mobile/MobileNumber.js +7 -4
- package/build/features/tax/Tax.js +3 -3
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/tax/screens/Success/Success.js +13 -1
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +7 -16
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +2 -2
- package/build/features/tax/screens/TaxDetails/VATId.js +7 -2
- package/build/features/tax/screens/Verify/Verify.js +9 -9
- package/build/hooks/useAppConfig.js +10 -1
- package/build/theme/palette.js +81 -27
- package/build/theme/shadows.js +7 -7
- package/build/theme/typography.js +3 -3
- package/build/utils/array.d.ts +1 -1
- package/build/utils/array.js +2 -2
- package/build/utils/string.js +14 -16
- package/package.json +3 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +0 -10
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +0 -143
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +0 -37
- package/build/features/business/screens/Activities/ActivitiesList.js +0 -292
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +0 -8
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +0 -138
- package/build/features/connect/screens/Mobile/Title.d.ts +0 -8
- package/build/features/connect/screens/Mobile/Title.js +0 -29
- package/build/features/connectExpress/screens/Mobile/Title.d.ts +0 -8
- package/build/features/connectExpress/screens/Mobile/Title.js +0 -29
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +0 -38
- package/build/features/entity/screens/EntityCapital/ActivityList.js +0 -290
- package/build/features/shared/UploadFile/UploadFile.js +0 -91
|
@@ -12,11 +12,12 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import Box from '@mui/material/Box';
|
|
15
16
|
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
16
17
|
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
17
18
|
import { BUSINESS_WEBSITE } from '../../../../constants';
|
|
18
19
|
import FlatButton from '../../../../components/Button';
|
|
19
|
-
import
|
|
20
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
20
21
|
import { businessSelector } from '../../../app/business/businessStore';
|
|
21
22
|
import Button from '../../../shared/Button';
|
|
22
23
|
import Header from './Header';
|
|
@@ -34,6 +35,6 @@ var BrandDetails = function (_a) {
|
|
|
34
35
|
var loginToDashboard = function () {
|
|
35
36
|
window.open(BUSINESS_WEBSITE, '_blank');
|
|
36
37
|
};
|
|
37
|
-
return (_jsxs(
|
|
38
|
+
return (_jsxs(ContainerWithHeader, __assign({ title: 'business_brand_title', description: 'business_brand_description', onBack: function () { return onBack(); } }, { children: [_jsx(Header, {}), _jsx(BrandName, {}), _jsx(LicenseInfo, {}), _jsx(SalesChannel, {}), _jsx(Box, __assign({ sx: { ml: 3, mr: 3 } }, { children: _jsx(FlatButton, __assign({ disableElevation: true, disableFocusRipple: true, disableTouchRipple: true, sx: { mt: 1.5 }, onClick: function () { return onBack(); }, variant: 'text' }, { children: t('review_account') })) })), _jsx(Button, __assign({ sx: { mt: 1 }, disableBack: true, onClick: function () { return loginToDashboard(); }, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('login_to_dashboard') }))] })));
|
|
38
39
|
};
|
|
39
40
|
export default React.memo(BrandDetails);
|
|
@@ -15,15 +15,11 @@ import { useTranslation } from 'react-i18next';
|
|
|
15
15
|
import { styled } from '@mui/material/styles';
|
|
16
16
|
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
17
17
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
-
import Input from '../../../shared/
|
|
18
|
+
import Input from '../../../shared/TextField';
|
|
19
19
|
import { businessSelector } from '../../../app/business/businessStore';
|
|
20
|
-
var InputStyled = styled(Input)(function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
opacity: 1,
|
|
24
|
-
'& .MuiInputBase-input': { cursor: 'auto', color: theme.palette.text.primary }
|
|
25
|
-
});
|
|
26
|
-
});
|
|
20
|
+
var InputStyled = styled(Input)(function () { return ({
|
|
21
|
+
'& .MuiInputBase-input': { cursor: 'auto' }
|
|
22
|
+
}); });
|
|
27
23
|
var BrandName = function (_a) {
|
|
28
24
|
var _b, _c, _d;
|
|
29
25
|
var t = useTranslation().t;
|
|
@@ -31,6 +27,6 @@ var BrandName = function (_a) {
|
|
|
31
27
|
var data = useAppSelector(businessSelector).data;
|
|
32
28
|
var brand = (((_b = data.verify) === null || _b === void 0 ? void 0 : _b.responseBody) || {}).brand;
|
|
33
29
|
var name = isAr ? (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.ar : (_d = brand === null || brand === void 0 ? void 0 : brand.name) === null || _d === void 0 ? void 0 : _d.en;
|
|
34
|
-
return (_jsx(ScreenContainer, __assign({ sx: { mt: 3 } }, { children: _jsx(InputStyled, { label: t('signup_brand_name_label'), readOnly: true, value: name }) })));
|
|
30
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mt: 3 } }, { children: _jsx(InputStyled, { label: t('signup_brand_name_label'), inputProps: { readOnly: true }, value: name }) })));
|
|
35
31
|
};
|
|
36
32
|
export default React.memo(BrandName);
|
|
@@ -18,17 +18,18 @@ import { ICONS_NAMES } from '../../../../constants';
|
|
|
18
18
|
import Text from '../../../../components/Text';
|
|
19
19
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
20
20
|
import Chip from '../../../shared/Chip';
|
|
21
|
+
import { ThemeMode } from '../../../../@types';
|
|
21
22
|
var ScreenContainerStyled = styled(ScreenContainer)(function () { return ({
|
|
22
23
|
alignItems: 'center',
|
|
23
24
|
justifyContent: 'center'
|
|
24
25
|
}); });
|
|
25
26
|
var TitleStyled = styled(Text)(function (_a) {
|
|
26
27
|
var theme = _a.theme;
|
|
27
|
-
return (__assign(__assign({}, theme.typography.
|
|
28
|
+
return (__assign(__assign({}, theme.typography.h6), { fontWeight: 600, color: theme.palette.mode === ThemeMode.DARK ? theme.palette.secondary.main : theme.palette.text.primary, marginBlockEnd: theme.spacing(1), padding: theme.spacing(0, 3) }));
|
|
28
29
|
});
|
|
29
30
|
var ChipStyled = styled(Chip, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
30
31
|
var theme = _a.theme, isAr = _a.isAr;
|
|
31
|
-
return (__assign(__assign({ background: alpha(theme.palette.success.main, 0.
|
|
32
|
+
return (__assign(__assign({ background: alpha(theme.palette.success.main, 0.06), borderRadius: theme.spacing(0.75), color: theme.palette.success.main, height: theme.spacing(3.125), boxShadow: theme.shadows[0] }, theme.typography.subtitle2), { '& .MuiChip-icon': {
|
|
32
33
|
marginLeft: isAr ? '-6px' : '5px',
|
|
33
34
|
marginRight: isAr ? '5px' : '-6px'
|
|
34
35
|
} }));
|
|
@@ -44,6 +45,6 @@ var Image = styled('img')(function (_a) {
|
|
|
44
45
|
var Header = function (_a) {
|
|
45
46
|
var t = useTranslation().t;
|
|
46
47
|
var isAr = useLanguage().isAr;
|
|
47
|
-
return (_jsxs(ScreenContainerStyled, { children: [_jsx(TitleStyled, { children: t('your_brand_details') }), _jsx(ChipStyled, { isAr: isAr, label: t('signed_up'), icon: _jsx(Image, { src: ICONS_NAMES.SIGNED_UP_SUCCESS }) })] }));
|
|
48
|
+
return (_jsxs(ScreenContainerStyled, __assign({ sx: { mt: 3 } }, { children: [_jsx(TitleStyled, { children: t('your_brand_details') }), _jsx(ChipStyled, { isAr: isAr, label: t('signed_up'), icon: _jsx(Image, { src: ICONS_NAMES.SIGNED_UP_SUCCESS }) })] })));
|
|
48
49
|
};
|
|
49
50
|
export default React.memo(Header);
|
|
@@ -15,15 +15,11 @@ import { useTranslation } from 'react-i18next';
|
|
|
15
15
|
import { styled } from '@mui/material/styles';
|
|
16
16
|
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
17
17
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
-
import Input from '../../../shared/
|
|
18
|
+
import Input from '../../../shared/TextField';
|
|
19
19
|
import { businessSelector } from '../../../app/business/businessStore';
|
|
20
|
-
var InputStyled = styled(Input)(function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
opacity: 1,
|
|
24
|
-
'& .MuiInputBase-input': { cursor: 'auto', color: theme.palette.text.primary }
|
|
25
|
-
});
|
|
26
|
-
});
|
|
20
|
+
var InputStyled = styled(Input)(function () { return ({
|
|
21
|
+
'& .MuiInputBase-input': { cursor: 'auto' }
|
|
22
|
+
}); });
|
|
27
23
|
var LicenseInfo = function (_a) {
|
|
28
24
|
var _b;
|
|
29
25
|
var t = useTranslation().t;
|
|
@@ -33,6 +29,6 @@ var LicenseInfo = function (_a) {
|
|
|
33
29
|
var getLicenseNumber = React.useMemo(function () { var _a; return ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || ''; }, [entity]);
|
|
34
30
|
var getLicenseName = React.useMemo(function () { var _a, _b; return t((isAr ? (_a = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _a === void 0 ? void 0 : _a.ar : (_b = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _b === void 0 ? void 0 : _b.en) || ''); }, [entity]);
|
|
35
31
|
var name = getLicenseNumber ? "".concat(getLicenseNumber, " - ").concat(getLicenseName) : getLicenseName;
|
|
36
|
-
return (_jsx(ScreenContainer, __assign({ sx: { mt: 1.5 } }, { children: _jsx(InputStyled, { label: t('license_info'), readOnly: true, value: name }) })));
|
|
32
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mt: 1.5 } }, { children: _jsx(InputStyled, { label: t('license_info'), inputProps: { readOnly: true }, value: name }) })));
|
|
37
33
|
};
|
|
38
34
|
export default React.memo(LicenseInfo);
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import {
|
|
15
|
+
import { styled } from '@mui/material/styles';
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
17
|
import { useAppSelector } from '../../../../hooks';
|
|
18
18
|
import Text from '../../../../components/Text';
|
|
@@ -24,18 +24,22 @@ var LabelContainerStyled = styled(Box)(function (_a) {
|
|
|
24
24
|
return ({
|
|
25
25
|
display: 'flex',
|
|
26
26
|
justifyContent: 'flex-start',
|
|
27
|
-
padding: theme.spacing(0,
|
|
27
|
+
padding: theme.spacing(0, 3, 0.25, 3)
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
30
|
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
31
31
|
var theme = _a.theme;
|
|
32
|
-
return (
|
|
32
|
+
return ({
|
|
33
|
+
color: theme.palette.text.secondary,
|
|
34
|
+
fontWeight: theme.typography.fontWeightRegular,
|
|
35
|
+
fontSize: theme.spacing(1.375)
|
|
36
|
+
});
|
|
33
37
|
});
|
|
34
38
|
var ChipContainerStyled = styled(Box)(function (_a) {
|
|
35
39
|
var theme = _a.theme;
|
|
36
40
|
return ({
|
|
37
41
|
display: 'block',
|
|
38
|
-
padding: theme.spacing(0,
|
|
42
|
+
padding: theme.spacing(0, 3, 1.25, 3)
|
|
39
43
|
});
|
|
40
44
|
});
|
|
41
45
|
var SalesChannel = function (_a) {
|
|
@@ -43,6 +47,6 @@ var SalesChannel = function (_a) {
|
|
|
43
47
|
var t = useTranslation().t;
|
|
44
48
|
var data = useAppSelector(businessSelector).data;
|
|
45
49
|
var channels = ((_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.channel_services) || [];
|
|
46
|
-
return (_jsxs(ScreenContainer, __assign({ sx: { mt:
|
|
50
|
+
return (_jsxs(ScreenContainer, __assign({ sx: { mt: 3 } }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('sales_channels') }) }), _jsx(ChipContainerStyled, { children: channels.map(function (channel, index) { return (_jsx(Chip, { label: t("".concat(channel.code, "_label")), sx: { marginInlineEnd: index !== channels.length - 1 ? '8px' : '0px', marginTop: '8px' } }, index)); }) })] })));
|
|
47
51
|
};
|
|
48
52
|
export default React.memo(SalesChannel);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ActivitiesIsIc, Activity } from '../../../../@types';
|
|
3
|
+
export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
4
|
+
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
7
|
+
gutterBottom?: boolean | undefined;
|
|
8
|
+
noWrap?: boolean | undefined;
|
|
9
|
+
paragraph?: boolean | undefined;
|
|
10
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
11
|
+
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
|
|
12
|
+
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
|
|
13
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
14
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
15
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
16
|
+
isSelected?: boolean | undefined;
|
|
17
|
+
isAr?: boolean | undefined;
|
|
18
|
+
}, {}, {}>;
|
|
19
|
+
interface ActivityListProps {
|
|
20
|
+
data: {
|
|
21
|
+
activityList: Array<ActivitiesIsIc>;
|
|
22
|
+
dataVerification: any;
|
|
23
|
+
};
|
|
24
|
+
activities: Array<ActivitiesIsIc>;
|
|
25
|
+
selectedActivities: Array<Activity>;
|
|
26
|
+
updateActivities: (activities: Array<ActivitiesIsIc>) => void;
|
|
27
|
+
updateSelectedActivities: (activities: Array<Activity>) => void;
|
|
28
|
+
}
|
|
29
|
+
declare const ActivityList: ({ data, activities, selectedActivities, updateSelectedActivities, updateActivities }: ActivityListProps) => JSX.Element;
|
|
30
|
+
export default ActivityList;
|
|
@@ -0,0 +1,265 @@
|
|
|
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
|
+
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import * as React from 'react';
|
|
23
|
+
import Box from '@mui/material/Box';
|
|
24
|
+
import { alpha, styled, useTheme } from '@mui/material/styles';
|
|
25
|
+
import { useLanguage } from '../../../../hooks';
|
|
26
|
+
import { ThemeMode } from '../../../../@types';
|
|
27
|
+
import SimpleList from '../../../../components/SimpleList';
|
|
28
|
+
import Collapse from '../../../../components/Collapse';
|
|
29
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
30
|
+
import Text from '../../../../components/Text';
|
|
31
|
+
import { isExist, groupSectionWithSelectedActivitiesAtBeginning, hasVerifiedValue, filterActivitiesByName } from '../../../../utils';
|
|
32
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
33
|
+
import Search from '../../../shared/Search';
|
|
34
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
35
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
36
|
+
import CustomChip from '../../../shared/Chip/Chip';
|
|
37
|
+
import ClearIcon from '../../../shared/ClearIcon';
|
|
38
|
+
var BoxStyled = styled(Box)(function (_a) {
|
|
39
|
+
var theme = _a.theme;
|
|
40
|
+
return ({
|
|
41
|
+
padding: theme.spacing(2, 3, 2, 3),
|
|
42
|
+
background: theme.palette.mode === ThemeMode.DARK ? theme.palette.background.paper : theme.palette.common.white,
|
|
43
|
+
borderBottom: "1px solid ".concat(alpha(theme.palette.common.black, 0.1)),
|
|
44
|
+
paddingBottom: theme.spacing(1)
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
var ChipStyled = styled(CustomChip)(function (_a) {
|
|
48
|
+
var theme = _a.theme;
|
|
49
|
+
return ({
|
|
50
|
+
padding: 0,
|
|
51
|
+
borderRadius: theme.spacing(3),
|
|
52
|
+
boxShadow: theme.shadows[9],
|
|
53
|
+
marginInlineEnd: theme.spacing(1),
|
|
54
|
+
marginBottom: theme.spacing(1),
|
|
55
|
+
maxWidth: 'unset',
|
|
56
|
+
height: 'unset',
|
|
57
|
+
'& .MuiChip-label': {
|
|
58
|
+
whiteSpace: 'pre-line',
|
|
59
|
+
paddingLeft: theme.spacing(1),
|
|
60
|
+
paddingRight: theme.spacing(1),
|
|
61
|
+
paddingTop: theme.spacing(0.5),
|
|
62
|
+
paddingBottom: theme.spacing(0.5),
|
|
63
|
+
display: 'flex',
|
|
64
|
+
gap: theme.spacing(1)
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
var ChipTextStyled = styled(Box)(function () { return ({
|
|
69
|
+
display: 'flex',
|
|
70
|
+
justifyContent: 'space-between',
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
gap: 0.625
|
|
73
|
+
}); });
|
|
74
|
+
var ScreenContainerStyled = styled(ScreenContainer)(function (_a) {
|
|
75
|
+
var theme = _a.theme;
|
|
76
|
+
return ({
|
|
77
|
+
borderBottom: "1px solid ".concat(theme.palette.divider)
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
|
|
81
|
+
var theme = _a.theme;
|
|
82
|
+
return ({
|
|
83
|
+
width: theme.spacing(1.375),
|
|
84
|
+
height: theme.spacing(1.375)
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return !['isSelected', 'isAr'].includes(prop.toString()); } })(function (_a) {
|
|
88
|
+
var theme = _a.theme, isSelected = _a.isSelected, isAr = _a.isAr;
|
|
89
|
+
return (__assign(__assign({ color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.button), { textAlign: isAr ? 'right' : 'left', fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineEnd: theme.spacing(1), textTransform: 'none' }));
|
|
90
|
+
});
|
|
91
|
+
var ListItem = styled(Box)(function (_a) {
|
|
92
|
+
var theme = _a.theme;
|
|
93
|
+
return ({
|
|
94
|
+
display: 'flex',
|
|
95
|
+
justifyContent: 'space-between',
|
|
96
|
+
width: '100%',
|
|
97
|
+
paddingInlineStart: theme.spacing(2),
|
|
98
|
+
paddingInlineEnd: theme.spacing(2),
|
|
99
|
+
paddingTop: theme.spacing(1.25),
|
|
100
|
+
paddingBottom: theme.spacing(1.25),
|
|
101
|
+
alignItems: 'center',
|
|
102
|
+
borderBottom: "1px solid ".concat(theme.palette.divider),
|
|
103
|
+
'&:hover': {
|
|
104
|
+
backgroundColor: theme.palette.action.hover
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
var ListItemContainer = styled(Box)(function () { return ({
|
|
109
|
+
display: 'flex',
|
|
110
|
+
flexDirection: 'column',
|
|
111
|
+
width: '100%'
|
|
112
|
+
}); });
|
|
113
|
+
var SimpleListStyled = styled((SimpleList))(function () { return ({
|
|
114
|
+
height: 'fit-content',
|
|
115
|
+
maxHeight: 'calc(100vh - 355px)',
|
|
116
|
+
paddingTop: 0
|
|
117
|
+
}); });
|
|
118
|
+
var DivisionListStyled = styled((SimpleList))(function () { return ({
|
|
119
|
+
height: 'fit-content'
|
|
120
|
+
}); });
|
|
121
|
+
var ActivityListStyled = styled((SimpleList))(function () { return ({
|
|
122
|
+
height: 'fit-content'
|
|
123
|
+
}); });
|
|
124
|
+
var ActivityList = function (_a) {
|
|
125
|
+
var data = _a.data, activities = _a.activities, selectedActivities = _a.selectedActivities, updateSelectedActivities = _a.updateSelectedActivities, updateActivities = _a.updateActivities;
|
|
126
|
+
var _b = React.useState(''), subIndex = _b[0], setSubIndex = _b[1];
|
|
127
|
+
var _c = React.useState(''), subItemIndex = _c[0], setSubItemIndex = _c[1];
|
|
128
|
+
var isAr = useLanguage().isAr;
|
|
129
|
+
var theme = useTheme();
|
|
130
|
+
var activityList = data.activityList, dataVerification = data.dataVerification;
|
|
131
|
+
var isActivityVerified = function (item) {
|
|
132
|
+
return hasVerifiedValue(dataVerification, "activities.".concat(item.id));
|
|
133
|
+
};
|
|
134
|
+
var handleOpenSubMenu = function (index) {
|
|
135
|
+
if (subIndex === index)
|
|
136
|
+
setSubIndex('');
|
|
137
|
+
else
|
|
138
|
+
setSubIndex(index);
|
|
139
|
+
};
|
|
140
|
+
var handleOpenSubItem = function (index) {
|
|
141
|
+
if (subItemIndex === index)
|
|
142
|
+
setSubItemIndex('');
|
|
143
|
+
else
|
|
144
|
+
setSubItemIndex(index);
|
|
145
|
+
};
|
|
146
|
+
var onSelectItem = function (activity) {
|
|
147
|
+
var isActivityExists = selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.find(function (ac) { return ac.id === activity.id; });
|
|
148
|
+
if (isActivityExists) {
|
|
149
|
+
var updatedIdList = selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.filter(function (ac) { return ac.id !== activity.id; });
|
|
150
|
+
if (!updatedIdList.length) {
|
|
151
|
+
updateSelectedActivities([]);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (updatedIdList.length >= 1)
|
|
155
|
+
updateSelectedActivities(updatedIdList);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
var activities = selectedActivities ? __spreadArray(__spreadArray([], selectedActivities, true), [activity], false) : [activity];
|
|
159
|
+
updateSelectedActivities(activities);
|
|
160
|
+
};
|
|
161
|
+
var getSelectedActivityName = function (item) {
|
|
162
|
+
var _a, _b, _c;
|
|
163
|
+
var code = item === null || item === void 0 ? void 0 : item.isic_code;
|
|
164
|
+
var name = 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) : (_c = item === null || item === void 0 ? void 0 : item.name) === null || _c === void 0 ? void 0 : _c.en;
|
|
165
|
+
return code ? "".concat(code, " - ").concat(name) : name;
|
|
166
|
+
};
|
|
167
|
+
var getSelectedActivitySectionFlag = function (section) {
|
|
168
|
+
var findSection = selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.find(function (_a) {
|
|
169
|
+
var id = _a.id;
|
|
170
|
+
return id === section.id;
|
|
171
|
+
});
|
|
172
|
+
var findDivision = selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.find(function (_a) {
|
|
173
|
+
var _b;
|
|
174
|
+
var id = _a.id;
|
|
175
|
+
return (_b = section.divisions) === null || _b === void 0 ? void 0 : _b.find(function (division) { return division.id === id; });
|
|
176
|
+
});
|
|
177
|
+
var findActivity = selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.find(function (_a) {
|
|
178
|
+
var _b;
|
|
179
|
+
var id = _a.id;
|
|
180
|
+
return (_b = section.divisions) === null || _b === void 0 ? void 0 : _b.find(function (division) { var _a; return (_a = division === null || division === void 0 ? void 0 : division.activities) === null || _a === void 0 ? void 0 : _a.find(function (activity) { return activity.id === id; }); });
|
|
181
|
+
});
|
|
182
|
+
if (findSection || findDivision || findActivity)
|
|
183
|
+
return section.id;
|
|
184
|
+
return '';
|
|
185
|
+
};
|
|
186
|
+
var getSelectedActivityDivisionFlag = function (division) {
|
|
187
|
+
var findDivision = selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.find(function (_a) {
|
|
188
|
+
var id = _a.id;
|
|
189
|
+
return division.id === id;
|
|
190
|
+
});
|
|
191
|
+
var findActivity = selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.find(function (_a) {
|
|
192
|
+
var _b;
|
|
193
|
+
var id = _a.id;
|
|
194
|
+
return (_b = division.activities) === null || _b === void 0 ? void 0 : _b.find(function (activity) { return activity.id === id; });
|
|
195
|
+
});
|
|
196
|
+
if (findDivision || findActivity)
|
|
197
|
+
return division.id;
|
|
198
|
+
return '';
|
|
199
|
+
};
|
|
200
|
+
var getSelectedActivityFlag = function (activity) {
|
|
201
|
+
var findActivity = selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.find(function (_a) {
|
|
202
|
+
var id = _a.id;
|
|
203
|
+
return id === activity.id;
|
|
204
|
+
});
|
|
205
|
+
if (findActivity)
|
|
206
|
+
return activity.id;
|
|
207
|
+
return '';
|
|
208
|
+
};
|
|
209
|
+
var handleSearch = function (value) {
|
|
210
|
+
if (!value) {
|
|
211
|
+
var list = groupSectionWithSelectedActivitiesAtBeginning(activityList, selectedActivities);
|
|
212
|
+
if ((list === null || list === void 0 ? void 0 : list.length) > 0) {
|
|
213
|
+
updateActivities(list);
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
updateActivities(activityList);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
var filteredList = filterActivitiesByName(activityList, value);
|
|
220
|
+
updateActivities(filteredList);
|
|
221
|
+
};
|
|
222
|
+
React.useEffect(function () {
|
|
223
|
+
if (selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.length) {
|
|
224
|
+
var item = isExist(activityList || [], selectedActivities.map(function (item) { return item.id; }));
|
|
225
|
+
if (item)
|
|
226
|
+
setSubIndex(item.id);
|
|
227
|
+
}
|
|
228
|
+
}, [selectedActivities]);
|
|
229
|
+
return (_jsxs(ScreenContainerStyled, { children: [_jsx(Collapse, __assign({ in: !!(selectedActivities === null || selectedActivities === void 0 ? void 0 : selectedActivities.length) }, { children: _jsx(BoxStyled, { children: (selectedActivities || []).map(function (activity, index) {
|
|
230
|
+
return (_jsx(ChipStyled, { label: _jsxs(ChipTextStyled, { children: [getSelectedActivityName(activity), _jsx(ClearIcon, { sx: { position: 'relative', top: theme.spacing(0.1875) }, onClick: function () { return onSelectItem(activity); } })] }) }, index));
|
|
231
|
+
}) }) })), _jsx(Search, { sx: { p: 0, ml: 3, mr: 3, mt: 1 }, onSearchValue: handleSearch, placeholder: 'search_activities_placeholder' }), _jsx(DropDownStyle, __assign({ sx: { mt: 1, mb: 1.25, boxShadow: 'none' }, anchorEl: true }, { children: _jsx(SimpleListStyled, { space: 292, list: activities, listItemProps: { sx: { padding: 0, margin: 0, '&:hover': { background: 'none' } } }, onSelectItem: function (section) {
|
|
232
|
+
var isDivisionNotAvailable = !section.divisions || section.divisions.length === 0;
|
|
233
|
+
if (isDivisionNotAvailable)
|
|
234
|
+
onSelectItem(section);
|
|
235
|
+
else
|
|
236
|
+
handleOpenSubMenu(section.id);
|
|
237
|
+
}, renderItem: function (section) {
|
|
238
|
+
var _a;
|
|
239
|
+
var isDivisionNotAvailable = !section.divisions || ((_a = section.divisions) === null || _a === void 0 ? void 0 : _a.length) === 0;
|
|
240
|
+
var showCheck = section.id === getSelectedActivitySectionFlag(section) && isDivisionNotAvailable;
|
|
241
|
+
return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, { children: [_jsx(NameContainer, __assign({ isAr: isAr, isSelected: section.id === getSelectedActivitySectionFlag(section) }, { children: getSelectedActivityName(section) })), showCheck ? (_jsx(CheckIcon, { sx: { width: theme.spacing(2), height: theme.spacing(2) }, isVerified: isActivityVerified(section) })) : (!isDivisionNotAvailable && _jsx(ExpandIconStyled, { anchorEl: subIndex === section.id }))] }), _jsx(Collapse, __assign({ in: section.id === subIndex && !isDivisionNotAvailable }, { children: _jsx(DivisionListStyled, { sx: { pt: 0, pb: 0 }, list: (!isDivisionNotAvailable && section.divisions) || [], onSelectItem: function (division, e) {
|
|
242
|
+
e.stopPropagation();
|
|
243
|
+
var isOnlyOneItem = !division.activities || division.activities.length <= 1;
|
|
244
|
+
if (isOnlyOneItem)
|
|
245
|
+
onSelectItem(division);
|
|
246
|
+
else
|
|
247
|
+
handleOpenSubItem(division.id);
|
|
248
|
+
}, listItemProps: { sx: { padding: 0, margin: 0, '&:hover': { background: 'none' } } }, renderItem: function (division, idx) {
|
|
249
|
+
var _a;
|
|
250
|
+
var isOnlyOneItem = !division.activities || ((_a = division.activities) === null || _a === void 0 ? void 0 : _a.length) <= 1;
|
|
251
|
+
var showCheck = division.id === getSelectedActivityDivisionFlag(division) && isOnlyOneItem;
|
|
252
|
+
return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, { children: [_jsx(NameContainer, __assign({ isAr: isAr, isSelected: division.id === getSelectedActivityDivisionFlag(division), sx: {
|
|
253
|
+
paddingInlineStart: theme.spacing(1)
|
|
254
|
+
} }, { children: getSelectedActivityName(division) })), showCheck ? (_jsx(CheckIcon, { sx: { width: theme.spacing(2), height: theme.spacing(2) }, isVerified: isActivityVerified(division) })) : (!isOnlyOneItem && _jsx(ExpandIconStyled, { anchorEl: subItemIndex === division.id }))] }), _jsx(Collapse, __assign({ in: division.id === subItemIndex && !isOnlyOneItem }, { children: _jsx(ActivityListStyled, { sx: { pt: 0, pb: 0 }, list: (!isOnlyOneItem && division.activities) || [], onSelectItem: function (activity, e) {
|
|
255
|
+
e.stopPropagation();
|
|
256
|
+
onSelectItem(activity);
|
|
257
|
+
}, listItemProps: { sx: { padding: 0, margin: 0, '&:hover': { background: 'none' } } }, renderItem: function (activity, idx) {
|
|
258
|
+
return (_jsxs(ListItem, { children: [_jsx(NameContainer, __assign({ sx: {
|
|
259
|
+
paddingInlineStart: theme.spacing(2)
|
|
260
|
+
}, isAr: isAr, isSelected: activity.id === getSelectedActivityFlag(activity) }, { children: getSelectedActivityName(activity) })), activity.id === getSelectedActivityFlag(activity) && (_jsx(CheckIcon, { sx: { width: theme.spacing(2), height: theme.spacing(2) }, isVerified: isActivityVerified(activity) }))] }, idx));
|
|
261
|
+
} }) }))] }, idx));
|
|
262
|
+
} }) }))] }));
|
|
263
|
+
} }) }))] }));
|
|
264
|
+
};
|
|
265
|
+
export default ActivityList;
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { Box, alpha, styled } from '@mui/material';
|
|
16
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
17
|
+
import { ThemeMode } from '../../../../@types';
|
|
18
|
+
import Button from '../../../../components/Button';
|
|
19
|
+
import { businessSelector, storeActivities } from '../../../app/business/businessStore';
|
|
20
|
+
import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
|
|
21
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
22
|
+
import ActivityList from './ActivityList';
|
|
23
|
+
var BoxStyled = styled(Box)(function (_a) {
|
|
24
|
+
var theme = _a.theme;
|
|
25
|
+
return ({
|
|
26
|
+
borderTop: alpha(theme.palette.common.black, 0.05),
|
|
27
|
+
marginLeft: theme.spacing(3),
|
|
28
|
+
marginRight: theme.spacing(3),
|
|
29
|
+
marginTop: theme.spacing(1),
|
|
30
|
+
marginBottom: theme.spacing(1),
|
|
31
|
+
display: 'flex',
|
|
32
|
+
justifyContent: 'end',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
gap: theme.spacing(0.5)
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
var ButtonStyled = styled(Button)(function (_a) {
|
|
38
|
+
var theme = _a.theme;
|
|
39
|
+
return ({
|
|
40
|
+
minHeight: theme.spacing(5),
|
|
41
|
+
width: theme.spacing(12.5),
|
|
42
|
+
fontWeight: 600
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
var FlatButtonStyled = styled(ButtonStyled)(function (_a) {
|
|
46
|
+
var theme = _a.theme;
|
|
47
|
+
return ({
|
|
48
|
+
color: theme.palette.mode === ThemeMode.DARK ? theme.palette.secondary.dark : theme.palette.text.disabled
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
var ContainedButtonStyled = styled(ButtonStyled)(function (_a) {
|
|
52
|
+
var theme = _a.theme;
|
|
53
|
+
return ({
|
|
54
|
+
paddingInlineEnd: theme.spacing(0.75)
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
var BusinessActivities = function (_a) {
|
|
58
|
+
var dispatch = useAppDispatch();
|
|
59
|
+
var t = useTranslation().t;
|
|
60
|
+
var _b = React.useState([]), activities = _b[0], setActivities = _b[1];
|
|
61
|
+
var _c = React.useState([]), selectedActivities = _c[0], setSelectedActivities = _c[1];
|
|
62
|
+
var data = useAppSelector(businessSelector).data;
|
|
63
|
+
var _d = data || {}, verify = _d.verify, businessTypeData = _d.businessTypeData, activitiesData = _d.activitiesData;
|
|
64
|
+
var activityList = (businessTypeData.responseBody || {}).activityList;
|
|
65
|
+
var entity = (verify.responseBody || {}).entity;
|
|
66
|
+
React.useEffect(function () {
|
|
67
|
+
if ((activityList === null || activityList === void 0 ? void 0 : activityList.length) > 0) {
|
|
68
|
+
setActivities(activityList);
|
|
69
|
+
}
|
|
70
|
+
}, [activityList]);
|
|
71
|
+
React.useEffect(function () {
|
|
72
|
+
var _a;
|
|
73
|
+
if ((_a = activitiesData === null || activitiesData === void 0 ? void 0 : activitiesData.activities) === null || _a === void 0 ? void 0 : _a.length) {
|
|
74
|
+
setSelectedActivities(activitiesData.activities);
|
|
75
|
+
}
|
|
76
|
+
}, [activitiesData === null || activitiesData === void 0 ? void 0 : activitiesData.activities]);
|
|
77
|
+
var onSubmit = function () {
|
|
78
|
+
dispatch(storeActivities(selectedActivities));
|
|
79
|
+
dispatch(handleNextScreenStep());
|
|
80
|
+
};
|
|
81
|
+
var onBack = function () {
|
|
82
|
+
dispatch(handlePrevScreenStep());
|
|
83
|
+
};
|
|
84
|
+
return (_jsxs(ContainerWithHeader, __assign({ titleBoxSx: { mb: 0 }, onBack: function () { return onBack(); }, title: 'business_activities_title', description: 'business_activities_description' }, { children: [_jsx(ActivityList, { data: { activityList: activityList, dataVerification: entity === null || entity === void 0 ? void 0 : entity.data_verification }, activities: activities, selectedActivities: selectedActivities, updateActivities: function (activities) {
|
|
85
|
+
setActivities(activities);
|
|
86
|
+
}, updateSelectedActivities: function (activities) {
|
|
87
|
+
setSelectedActivities(activities);
|
|
88
|
+
} }), _jsxs(BoxStyled, { children: [_jsx(FlatButtonStyled, __assign({ onClick: function () { return onBack(); }, variant: 'text' }, { children: t('cancel') })), _jsx(ContainedButtonStyled, __assign({ onClick: function () { return onSubmit(); }, variant: 'contained' }, { children: t('confirm') }))] })] })));
|
|
89
|
+
};
|
|
90
|
+
export default BusinessActivities;
|
|
@@ -16,7 +16,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
16
16
|
import { useController, useFormContext } from 'react-hook-form';
|
|
17
17
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
18
18
|
import { businessSelector, clearAOAFile, clearError, uploadingArticleStatus } from '../../../app/business/businessStore';
|
|
19
|
-
import
|
|
19
|
+
import UploadWrapper from '../../../shared/UploadFile';
|
|
20
20
|
import { FileRemoveType } from '../../../../constants';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
22
|
import { DocumentPurpose } from '../../../../@types';
|
|
@@ -19,9 +19,9 @@ import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings
|
|
|
19
19
|
import Form from '../../../../components/Form';
|
|
20
20
|
import Collapse from '../../../../components/Collapse';
|
|
21
21
|
import { useLanguage } from '../../../../hooks';
|
|
22
|
-
import
|
|
22
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
23
23
|
import { businessSelector, clearError, updateLeadBusinessType } from '../../../app/business/businessStore';
|
|
24
|
-
import { BusinessType as Type } from '../../../../@types';
|
|
24
|
+
import { DropDownMode, BusinessType as Type } from '../../../../@types';
|
|
25
25
|
import Button from '../../../shared/Button';
|
|
26
26
|
import { deepCopy, isKW, isOtherLicense, isSA } from '../../../../utils';
|
|
27
27
|
import { KWLicenseValidationSchema, LicenseValidationSchema } from './validation';
|
|
@@ -42,12 +42,14 @@ var BusinessType = function (_a) {
|
|
|
42
42
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
43
43
|
var _c = data.businessTypeData, selectedLicense = _c.selectedLicense, licenseNumber = _c.licenseNumber, entityLegalName = _c.entityLegalName, certificateId = _c.certificateId, articleId = _c.articleId, selectedEntityLicense = _c.selectedEntityLicense, responseBody = _c.responseBody;
|
|
44
44
|
var entityLicenseList = (responseBody === null || responseBody === void 0 ? void 0 : responseBody.entityLicenseList) || [];
|
|
45
|
+
var isPopupMode = settingsData.dropDownOpenMode === DropDownMode.popup;
|
|
45
46
|
var t = useTranslation().t;
|
|
46
47
|
var isAr = useLanguage().isAr;
|
|
47
48
|
var dispatch = useAppDispatch();
|
|
48
49
|
var _d = React.useState(), listActive = _d[0], setListActive = _d[1];
|
|
49
50
|
var handleMenuClick = function (flag) {
|
|
50
|
-
|
|
51
|
+
if (!isPopupMode)
|
|
52
|
+
setListActive(flag);
|
|
51
53
|
};
|
|
52
54
|
var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
53
55
|
var isKWCountry = React.useMemo(function () { return isKW(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
@@ -93,6 +95,6 @@ var BusinessType = function (_a) {
|
|
|
93
95
|
var showEntityList = isKWCountry ? hasEntityList && !isLicenseListActive && isCR : hasEntityList && !isLicenseListActive;
|
|
94
96
|
var disabled = !methods.formState.isValid || !!error || uploading || uploadingArticle;
|
|
95
97
|
var disableBack = !data.otpData.isNID;
|
|
96
|
-
return (_jsx(
|
|
98
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'business_type_title', description: 'business_type_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(LicenseType, { show: !listActive && !isSACountry }), _jsx(EntityLicenseList, { isPopupMode: isPopupMode, show: showEntityList, onListOpen: function () { return handleMenuClick(ListType.EntityLicenseList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(LicenseList, { isPopupMode: isPopupMode, show: showLicenseList && !isEntityLicenseListActive, onListOpen: function () { return handleMenuClick(ListType.LicenseList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(EntityName, { show: !isAnyListActive && !isSACountry && isCR }), _jsx(LicenseNumber, { show: !isSACountry ? !isAnyListActive && isCR : !isAnyListActive }), _jsx(LicenseCertificate, { show: !isAnyListActive && !isSACountry && isCR }), _jsx(Article, { show: !isAnyListActive && !isSACountry && isCR }), _jsx(Collapse, __assign({ in: !isAnyListActive, timeout: 500 }, { children: _jsx(Button, __assign({ disableBack: disableBack, onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) })));
|
|
97
99
|
};
|
|
98
100
|
export default React.memo(BusinessType);
|
|
@@ -4,6 +4,7 @@ interface EntityLicenseListProps {
|
|
|
4
4
|
onSelectLicense?: (number: string) => void;
|
|
5
5
|
onListOpen?: () => void;
|
|
6
6
|
onListClose?: () => void;
|
|
7
|
+
isPopupMode: boolean;
|
|
7
8
|
}
|
|
8
|
-
declare const _default: React.MemoExoticComponent<({ ...rest }: EntityLicenseListProps) => JSX.Element>;
|
|
9
|
+
declare const _default: React.MemoExoticComponent<({ isPopupMode, ...rest }: EntityLicenseListProps) => JSX.Element>;
|
|
9
10
|
export default _default;
|