@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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ExpectedSaleRange } 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 ExpectedSaleListProps {
|
|
20
|
+
data: {
|
|
21
|
+
sales: Array<ExpectedSaleRange>;
|
|
22
|
+
};
|
|
23
|
+
expectedSales: Array<ExpectedSaleRange>;
|
|
24
|
+
selectedExpectedSale?: ExpectedSaleRange;
|
|
25
|
+
updateExpectedSales: (sales: Array<ExpectedSaleRange>) => void;
|
|
26
|
+
updateSelectedExpectedSale: (sale: ExpectedSaleRange) => void;
|
|
27
|
+
}
|
|
28
|
+
declare const ExpectedSaleList: ({ data, expectedSales, selectedExpectedSale, updateExpectedSales, updateSelectedExpectedSale }: ExpectedSaleListProps) => JSX.Element;
|
|
29
|
+
export default ExpectedSaleList;
|
|
@@ -0,0 +1,136 @@
|
|
|
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 Box from '@mui/material/Box';
|
|
15
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
16
|
+
import { useLanguage } from '../../../../hooks';
|
|
17
|
+
import { ThemeMode } from '../../../../@types';
|
|
18
|
+
import SimpleList from '../../../../components/SimpleList';
|
|
19
|
+
import Collapse from '../../../../components/Collapse';
|
|
20
|
+
import Text from '../../../../components/Text';
|
|
21
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
22
|
+
import { isExist } from '../../../../utils';
|
|
23
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
+
import Search from '../../../shared/Search';
|
|
25
|
+
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
27
|
+
var ScreenContainerStyled = styled(ScreenContainer)(function (_a) {
|
|
28
|
+
var theme = _a.theme;
|
|
29
|
+
return ({
|
|
30
|
+
borderBottom: "1px solid ".concat(theme.palette.divider)
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return !['isSelected', 'isAr'].includes(prop.toString()); } })(function (_a) {
|
|
34
|
+
var theme = _a.theme, isSelected = _a.isSelected, isAr = _a.isAr;
|
|
35
|
+
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' }));
|
|
36
|
+
});
|
|
37
|
+
var ListItem = styled(Box)(function (_a) {
|
|
38
|
+
var theme = _a.theme;
|
|
39
|
+
return ({
|
|
40
|
+
display: 'flex',
|
|
41
|
+
justifyContent: 'space-between',
|
|
42
|
+
width: '100%',
|
|
43
|
+
paddingInlineStart: theme.spacing(2),
|
|
44
|
+
paddingInlineEnd: theme.spacing(2),
|
|
45
|
+
paddingTop: theme.spacing(1.25),
|
|
46
|
+
paddingBottom: theme.spacing(1.25),
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
borderBottom: "1px solid ".concat(theme.palette.divider),
|
|
49
|
+
'&:hover': {
|
|
50
|
+
backgroundColor: theme.palette.action.hover
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
var ListItemContainer = styled(Box)(function () { return ({
|
|
55
|
+
display: 'flex',
|
|
56
|
+
flexDirection: 'column',
|
|
57
|
+
width: '100%'
|
|
58
|
+
}); });
|
|
59
|
+
var SimpleListStyled = styled((SimpleList))(function () { return ({
|
|
60
|
+
height: 'fit-content',
|
|
61
|
+
maxHeight: 'calc(100vh - 355px)',
|
|
62
|
+
paddingTop: 0
|
|
63
|
+
}); });
|
|
64
|
+
var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
|
|
65
|
+
var theme = _a.theme;
|
|
66
|
+
return ({
|
|
67
|
+
width: theme.spacing(1.375),
|
|
68
|
+
height: theme.spacing(1.375)
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
var ExpectedSaleList = function (_a) {
|
|
72
|
+
var data = _a.data, expectedSales = _a.expectedSales, selectedExpectedSale = _a.selectedExpectedSale, updateExpectedSales = _a.updateExpectedSales, updateSelectedExpectedSale = _a.updateSelectedExpectedSale;
|
|
73
|
+
var _b = React.useState(''), subIndex = _b[0], setSubIndex = _b[1];
|
|
74
|
+
var isAr = useLanguage().isAr;
|
|
75
|
+
var theme = useTheme();
|
|
76
|
+
var sales = data.sales;
|
|
77
|
+
var handleOpenSubMenu = function (index) {
|
|
78
|
+
if (subIndex === index)
|
|
79
|
+
setSubIndex('');
|
|
80
|
+
else
|
|
81
|
+
setSubIndex(index);
|
|
82
|
+
};
|
|
83
|
+
var onSelectItem = function (expectedSalesRange) {
|
|
84
|
+
updateSelectedExpectedSale(expectedSalesRange);
|
|
85
|
+
};
|
|
86
|
+
var getSelectedSaleName = function (item) {
|
|
87
|
+
return isAr ? item.name.ar : item.name.en;
|
|
88
|
+
};
|
|
89
|
+
var handleSearch = function (value) {
|
|
90
|
+
var filteredList = sales === null || sales === void 0 ? void 0 : sales.filter(function (salesRange) {
|
|
91
|
+
var _a, _b, _c;
|
|
92
|
+
return salesRange.name.en.toLowerCase().includes(value.toLowerCase()) ||
|
|
93
|
+
salesRange.name.en.toLowerCase().replace(',', '').includes(value.toLowerCase()) ||
|
|
94
|
+
salesRange.name.ar.toLowerCase().includes(value.toLowerCase()) ||
|
|
95
|
+
((_a = salesRange.sub) === null || _a === void 0 ? void 0 : _a.find(function (obj) { return obj.name.en.toLowerCase().includes(value.toLowerCase()); })) ||
|
|
96
|
+
((_b = salesRange.sub) === null || _b === void 0 ? void 0 : _b.find(function (obj) { return obj.name.en.toLowerCase().replace(',', '').includes(value.toLowerCase()); })) ||
|
|
97
|
+
((_c = salesRange.sub) === null || _c === void 0 ? void 0 : _c.find(function (obj) { return obj.name.ar.toLowerCase().includes(value.toLowerCase()); }));
|
|
98
|
+
});
|
|
99
|
+
updateExpectedSales(filteredList);
|
|
100
|
+
};
|
|
101
|
+
var getSelectedSaleFlag = function (sale) {
|
|
102
|
+
var _a;
|
|
103
|
+
var findSub = (_a = sale === null || sale === void 0 ? void 0 : sale.sub) === null || _a === void 0 ? void 0 : _a.find(function (_a) {
|
|
104
|
+
var id = _a.id;
|
|
105
|
+
return id === (selectedExpectedSale === null || selectedExpectedSale === void 0 ? void 0 : selectedExpectedSale.id);
|
|
106
|
+
});
|
|
107
|
+
var findSale = (sale === null || sale === void 0 ? void 0 : sale.id) === (selectedExpectedSale === null || selectedExpectedSale === void 0 ? void 0 : selectedExpectedSale.id);
|
|
108
|
+
if (findSub || findSale)
|
|
109
|
+
return true;
|
|
110
|
+
return false;
|
|
111
|
+
};
|
|
112
|
+
React.useEffect(function () {
|
|
113
|
+
if (selectedExpectedSale) {
|
|
114
|
+
var item = isExist(sales || [], selectedExpectedSale.id);
|
|
115
|
+
if (item)
|
|
116
|
+
setSubIndex(item.id);
|
|
117
|
+
}
|
|
118
|
+
}, [selectedExpectedSale]);
|
|
119
|
+
return (_jsxs(ScreenContainerStyled, { children: [_jsx(Search, { sx: { p: 0, ml: 3, mr: 3, mt: 1 }, onSearchValue: handleSearch }), _jsx(DropDownStyle, __assign({ sx: { mt: 1, mb: 1.25, boxShadow: 'none' }, anchorEl: true }, { children: _jsx(SimpleListStyled, { space: 292, list: expectedSales, listItemProps: { sx: { padding: 0, margin: 0, '&:hover': { background: 'none' } } }, onSelectItem: function (item) {
|
|
120
|
+
var isOnlyOneItem = !item.sub || item.sub.length === 1;
|
|
121
|
+
if (isOnlyOneItem)
|
|
122
|
+
onSelectItem(item);
|
|
123
|
+
else
|
|
124
|
+
handleOpenSubMenu(item.id);
|
|
125
|
+
}, renderItem: function (item) {
|
|
126
|
+
var _a;
|
|
127
|
+
var isOnlyOneItem = !item.sub || ((_a = item.sub) === null || _a === void 0 ? void 0 : _a.length) === 1;
|
|
128
|
+
var showCheck = getSelectedSaleFlag(item) && isOnlyOneItem;
|
|
129
|
+
return (_jsxs(ListItemContainer, { children: [_jsxs(ListItem, { children: [_jsx(NameContainer, __assign({ isAr: isAr, isSelected: getSelectedSaleFlag(item) }, { children: getSelectedSaleName(item) })), showCheck ? (_jsx(CheckIcon, { sx: { width: theme.spacing(2), height: theme.spacing(2) } })) : (!isOnlyOneItem && _jsx(ExpandIconStyled, { anchorEl: subIndex === item.id }))] }), _jsx(Collapse, __assign({ in: item.id === subIndex && !isOnlyOneItem }, { children: _jsx(SimpleListStyled, { sx: { pt: 0, pb: 0 }, list: (!isOnlyOneItem && item.sub) || [], onSelectItem: onSelectItem, listItemProps: { sx: { padding: 0, margin: 0, '&:hover': { background: 'none' } } }, renderItem: function (item, idx) {
|
|
130
|
+
return (_jsxs(ListItem, { children: [_jsx(NameContainer, __assign({ sx: {
|
|
131
|
+
paddingInlineStart: theme.spacing(1)
|
|
132
|
+
}, isSelected: getSelectedSaleFlag(item) }, { children: getSelectedSaleName(item) })), getSelectedSaleFlag(item) && _jsx(CheckIcon, { sx: { width: theme.spacing(2), height: theme.spacing(2) } })] }, idx));
|
|
133
|
+
} }) }))] }));
|
|
134
|
+
} }) }))] }));
|
|
135
|
+
};
|
|
136
|
+
export default ExpectedSaleList;
|
|
@@ -0,0 +1,91 @@
|
|
|
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 { brandSelector, clearError, storeExpectedSale } from '../../../app/brand/brandStore';
|
|
20
|
+
import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
|
|
21
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
22
|
+
import ExpectedSaleList from './ExpectedSaleList';
|
|
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 ExpectedSales = function (_a) {
|
|
58
|
+
var dispatch = useAppDispatch();
|
|
59
|
+
var t = useTranslation().t;
|
|
60
|
+
var _b = React.useState([]), sales = _b[0], setSales = _b[1];
|
|
61
|
+
var _c = React.useState(), selectedSale = _c[0], setSale = _c[1];
|
|
62
|
+
var _d = useAppSelector(brandSelector), data = _d.data, error = _d.error;
|
|
63
|
+
var brandActivities = data.brandActivities;
|
|
64
|
+
var expectedSales = (brandActivities.responseBody || {}).expectedSales;
|
|
65
|
+
React.useEffect(function () {
|
|
66
|
+
if ((expectedSales === null || expectedSales === void 0 ? void 0 : expectedSales.length) > 0) {
|
|
67
|
+
setSales(expectedSales);
|
|
68
|
+
}
|
|
69
|
+
}, [expectedSales]);
|
|
70
|
+
React.useEffect(function () {
|
|
71
|
+
if (brandActivities.expectedSale) {
|
|
72
|
+
setSale(brandActivities.expectedSale);
|
|
73
|
+
}
|
|
74
|
+
}, [brandActivities.expectedSale]);
|
|
75
|
+
var onSubmit = function () {
|
|
76
|
+
if (selectedSale)
|
|
77
|
+
dispatch(storeExpectedSale(selectedSale));
|
|
78
|
+
dispatch(handleNextScreenStep());
|
|
79
|
+
};
|
|
80
|
+
var onBack = function () {
|
|
81
|
+
dispatch(handlePrevScreenStep());
|
|
82
|
+
};
|
|
83
|
+
return (_jsxs(ContainerWithHeader, __assign({ titleBoxSx: { mb: 0 }, onBack: function () { return onBack(); }, title: 'business_sales_title', description: 'business_sales_description' }, { children: [_jsx(ExpectedSaleList, { data: { sales: expectedSales }, expectedSales: sales, selectedExpectedSale: selectedSale, updateExpectedSales: function (sales) {
|
|
84
|
+
setSales(sales);
|
|
85
|
+
}, updateSelectedExpectedSale: function (sales) {
|
|
86
|
+
if (error)
|
|
87
|
+
dispatch(clearError());
|
|
88
|
+
setSale(sales);
|
|
89
|
+
} }), _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') }))] })] })));
|
|
90
|
+
};
|
|
91
|
+
export default ExpectedSales;
|
|
@@ -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 { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
7
19
|
import { maskEmail } from '../../../../utils';
|
|
8
20
|
import { brandSelector } from '../../../app/brand/brandStore';
|
|
@@ -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 SuccessScreen from '../../../shared/SuccessScreen';
|
|
5
16
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
6
18
|
import { brandSelector, updateBoardSuccess } from '../../../app/brand/brandStore';
|
|
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('brand_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: clicked && loading, error: error || '' }));
|
|
30
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'brand_success_header_title', description: 'brand_success_header_description' }, { children: _jsx(SuccessScreen, { title: t('brand_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 { brandSelector } from '../../../app/brand/brandStore';
|
|
16
16
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
17
18
|
var SuccessWithFlowButtons = function () {
|
|
18
19
|
var data = useAppSelector(brandSelector).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, boardInfoId: board_info_id, individuals: individuals, flows: flows || [] }));
|
|
21
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'brand_flows_title', description: 'brand_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, boardInfoId: board_info_id, individuals: individuals, 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 { brandSelector, clearError, resetOTPScreen, verifyBrandLeadOTP } from '../../../app/brand/brandStore';
|
|
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(verifyBrandLeadOTP(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);
|
|
@@ -32,7 +32,7 @@ var Business = memo(function (props) {
|
|
|
32
32
|
useAppConfig(__assign({ navigation: BUSINESS_SCREENS_NAVIGATION }, props));
|
|
33
33
|
useErrorListener(businessError || error);
|
|
34
34
|
useStepStartedListener();
|
|
35
|
-
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open,
|
|
35
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, isMaturityExpress = data.isMaturityExpress;
|
|
36
36
|
var verifyToken = function () {
|
|
37
37
|
var token = getParameterByName('token');
|
|
38
38
|
var lang = getParameterByName('lang');
|
|
@@ -49,11 +49,11 @@ var Business = memo(function (props) {
|
|
|
49
49
|
if (!settingLoading && open)
|
|
50
50
|
verifyToken();
|
|
51
51
|
}, [settingLoading]);
|
|
52
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name,
|
|
52
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ countries: data.tapCountries, pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, { children: businessFeatureScreens.map(function (_a, index) {
|
|
53
53
|
var Element = _a.element, name = _a.name;
|
|
54
54
|
var isActive = activeScreen.name === name;
|
|
55
55
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
56
|
-
}) })
|
|
56
|
+
}) }) })) })) })));
|
|
57
57
|
});
|
|
58
58
|
export function BusinessElement(props) {
|
|
59
59
|
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Business, __assign({}, props)) })));
|
|
@@ -12,7 +12,6 @@ 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 { styled } from '@mui/material/styles';
|
|
15
|
-
import ActivitiesList from './ActivitiesList';
|
|
16
15
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
17
16
|
import { useAppDispatch, useLanguage, useAppSelector, useSetFromDefaultValues } from '../../../../hooks';
|
|
18
17
|
import Form from '../../../../components/Form';
|
|
@@ -20,25 +19,25 @@ import { yupResolver } from '@hookform/resolvers/yup';
|
|
|
20
19
|
import { useTranslation } from 'react-i18next';
|
|
21
20
|
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
22
21
|
import Button from '../../../shared/Button';
|
|
22
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
23
23
|
import { deepCopy } from '../../../../utils';
|
|
24
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
24
|
import Collapse from '../../../../components/Collapse';
|
|
26
|
-
import OperationStartDate from './OperationStartDate';
|
|
27
25
|
import { businessSelector, clearError, updateActivitiesInfo } from '../../../app/business/businessStore';
|
|
28
26
|
import { ActivitiesValidationSchema } from './validation';
|
|
29
27
|
import LicenseName from './LicenseName';
|
|
28
|
+
import OperationStartDate from './OperationStartDate';
|
|
29
|
+
import ActivityField from './ActivityField';
|
|
30
30
|
var FormStyled = styled(Form)(function () { return ({
|
|
31
31
|
display: 'flex',
|
|
32
32
|
flexDirection: 'column'
|
|
33
33
|
}); });
|
|
34
34
|
var Activities = function () {
|
|
35
|
-
var _a = React.useState(false),
|
|
36
|
-
var _b = React.useState(false), collapse = _b[0], setCollapse = _b[1];
|
|
35
|
+
var _a = React.useState(false), collapse = _a[0], setCollapse = _a[1];
|
|
37
36
|
var dispatch = useAppDispatch();
|
|
38
37
|
var isAr = useLanguage().isAr;
|
|
39
38
|
var t = useTranslation().t;
|
|
40
|
-
var
|
|
41
|
-
var
|
|
39
|
+
var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
40
|
+
var _c = data.activitiesData, activities = _c.activities, operationStartDate = _c.operationStartDate;
|
|
42
41
|
var methods = useForm({
|
|
43
42
|
resolver: yupResolver(ActivitiesValidationSchema),
|
|
44
43
|
defaultValues: {
|
|
@@ -61,10 +60,7 @@ var Activities = function () {
|
|
|
61
60
|
if (error)
|
|
62
61
|
dispatch(clearError());
|
|
63
62
|
}, [methods.formState.isValid]);
|
|
64
|
-
var handleMenuClick = function () {
|
|
65
|
-
anchorEl ? setAnchorEl(false) : setAnchorEl(true);
|
|
66
|
-
};
|
|
67
63
|
var disabled = !methods.formState.isValid || !!error;
|
|
68
|
-
return (_jsx(
|
|
64
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'business_activity_info_title', description: 'business_activity_info_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(LicenseName, {}) })), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(ActivityField, {}) })), _jsx(OperationStartDate, { onDateClicked: handleCollapseOpenClose }), _jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] })) })) })));
|
|
69
65
|
};
|
|
70
66
|
export default Activities;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
3
|
+
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
6
|
+
gutterBottom?: boolean | undefined;
|
|
7
|
+
noWrap?: boolean | undefined;
|
|
8
|
+
paragraph?: boolean | undefined;
|
|
9
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
10
|
+
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
|
|
11
|
+
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
|
|
12
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
13
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
14
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "sx" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
15
|
+
isSelected?: boolean | undefined;
|
|
16
|
+
isAr?: boolean | undefined;
|
|
17
|
+
}, {}, {}>;
|
|
18
|
+
interface ActivityFieldProps {
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const ActivityField: ({ readOnly }: ActivityFieldProps) => JSX.Element;
|
|
22
|
+
export default ActivityField;
|
|
@@ -0,0 +1,63 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
13
|
+
import { styled } from '@mui/material/styles';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
+
import { handleCurrentActiveScreen } from '../../../../app/settings';
|
|
17
|
+
import { useLanguage, useAppDispatch } from '../../../../hooks';
|
|
18
|
+
import { ThemeMode } from '../../../../@types';
|
|
19
|
+
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
20
|
+
import Text from '../../../../components/Text';
|
|
21
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
22
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
23
|
+
var InputStyled = styled(InputSelect)(function (_a) { return ({}); });
|
|
24
|
+
var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
|
|
25
|
+
var theme = _a.theme;
|
|
26
|
+
return ({
|
|
27
|
+
transform: theme.direction === 'rtl' ? 'rotate(90deg)' : 'rotate(-90deg)'
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return !['isSelected', 'isAr'].includes(prop.toString()); } })(function (_a) {
|
|
31
|
+
var theme = _a.theme, isSelected = _a.isSelected, isAr = _a.isAr;
|
|
32
|
+
return (__assign(__assign({ color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { textAlign: isAr ? 'right' : 'left', fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
33
|
+
});
|
|
34
|
+
var ActivityField = function (_a) {
|
|
35
|
+
var readOnly = _a.readOnly;
|
|
36
|
+
var t = useTranslation().t;
|
|
37
|
+
var isAr = useLanguage().isAr;
|
|
38
|
+
var dispatch = useAppDispatch();
|
|
39
|
+
var control = useFormContext().control;
|
|
40
|
+
var activitiesControl = useController({ name: 'activities', control: control });
|
|
41
|
+
var controlValue = activitiesControl.field.value;
|
|
42
|
+
var getSelectedActivities = function () {
|
|
43
|
+
var _a, _b, _c;
|
|
44
|
+
if ((controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) > 1) {
|
|
45
|
+
return (controlValue === null || controlValue === void 0 ? void 0 : controlValue.length) + ' ' + t('activities_selected');
|
|
46
|
+
}
|
|
47
|
+
var item = (controlValue || [])[0];
|
|
48
|
+
var code = item === null || item === void 0 ? void 0 : item.isic_code;
|
|
49
|
+
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;
|
|
50
|
+
return code ? "".concat(code, " - ").concat(name) : name;
|
|
51
|
+
};
|
|
52
|
+
var openActivitiesScreen = function () {
|
|
53
|
+
if (readOnly)
|
|
54
|
+
return;
|
|
55
|
+
dispatch(handleCurrentActiveScreen('BUSINESS_ACTIVITIES_STEP'));
|
|
56
|
+
};
|
|
57
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mb: 1.5 } }, { children: _jsx(InputStyled, { label: t('activities'), InputProps: {
|
|
58
|
+
endAdornment: _jsx(ExpandIconStyled, {})
|
|
59
|
+
}, inputProps: {
|
|
60
|
+
readOnly: readOnly
|
|
61
|
+
}, value: getSelectedActivities() || '', onClick: openActivitiesScreen, placeholder: t('choose_activities') }) })));
|
|
62
|
+
};
|
|
63
|
+
export default ActivityField;
|
|
@@ -13,7 +13,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
16
|
-
import Input from '../../../shared/
|
|
16
|
+
import Input from '../../../shared/TextField';
|
|
17
17
|
import Collapse from '../../../../components/Collapse';
|
|
18
18
|
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
19
|
import { businessSelector } from '../../../app/business/businessStore';
|
|
@@ -25,6 +25,8 @@ var LicenseName = function (_a) {
|
|
|
25
25
|
var data = useAppSelector(businessSelector).data;
|
|
26
26
|
var entity = (((_b = data.verify) === null || _b === void 0 ? void 0 : _b.responseBody) || {}).entity;
|
|
27
27
|
var name = isAr ? (_c = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _c === void 0 ? void 0 : _c.ar : (_d = entity === null || entity === void 0 ? void 0 : entity.legal_name) === null || _d === void 0 ? void 0 : _d.en;
|
|
28
|
-
return (_jsx(Collapse, __assign({ in: !!name }, { children: _jsx(ScreenContainer, {
|
|
28
|
+
return (_jsx(Collapse, __assign({ in: !!name }, { children: _jsx(ScreenContainer, __assign({ sx: { mb: 1.5 } }, { children: _jsx(Input, { label: t('license_name_label'), InputProps: {
|
|
29
|
+
endAdornment: _jsx(CheckIcon, {})
|
|
30
|
+
}, inputProps: { readOnly: true }, value: name, sx: { '& .MuiInputBase-input': { cursor: 'auto' } } }) })) })));
|
|
29
31
|
};
|
|
30
32
|
export default React.memo(LicenseName);
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
14
14
|
import { useController, useFormContext } from 'react-hook-form';
|
|
15
15
|
import Text from '../../../../components/Text';
|
|
@@ -17,7 +17,7 @@ import { ScreenContainer } from '../../../shared/Containers';
|
|
|
17
17
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
18
18
|
import { businessSelector, clearError } from '../../../app/business/businessStore';
|
|
19
19
|
import { alpha, styled } from '@mui/material/styles';
|
|
20
|
-
import Calender from '../../../shared/Calender';
|
|
20
|
+
import { CustomCalender as Calender } from '../../../shared/Calender';
|
|
21
21
|
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
22
22
|
var theme = _a.theme;
|
|
23
23
|
return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.6) }, theme.typography.caption));
|
|
@@ -40,6 +40,6 @@ var OperationStartDate = function (_a) {
|
|
|
40
40
|
oDateControl.field.onChange(data);
|
|
41
41
|
};
|
|
42
42
|
var dateValue = (_b = oDateControl === null || oDateControl === void 0 ? void 0 : oDateControl.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
43
|
-
return (
|
|
43
|
+
return (_jsx(ScreenContainer, { children: _jsx(Calender, { required: true, label: t('business_start_date'), defaultValue: dateValue ? new Date(dateValue) : undefined, onDateChange: handleOperationStartDateChange }) }));
|
|
44
44
|
};
|
|
45
45
|
export default OperationStartDate;
|