@tap-payments/auth-jsconnect 2.5.22-test → 3.0.0-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +4 -0
- package/build/@types/app.js +5 -0
- package/build/api/country.d.ts +1 -0
- package/build/api/country.js +11 -1
- package/build/api/index.d.ts +1 -0
- package/build/app/settings.d.ts +5 -2
- package/build/app/settings.js +13 -3
- package/build/assets/locales/ar.json +107 -5
- package/build/assets/locales/en.json +108 -7
- package/build/components/AnimationFlow/AnimationFlow.d.ts +3 -3
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +3 -4
- package/build/components/AnimationFlow/BottomSheet.js +33 -27
- package/build/components/AnimationFlow/Dialog.d.ts +3 -4
- package/build/components/AnimationFlow/Dialog.js +17 -54
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +3 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +12 -5
- package/build/components/ArabicDatePicker/style.css +2 -0
- package/build/components/Button/Button.js +21 -10
- package/build/components/CheckBox/CheckBox.d.ts +2 -1
- package/build/components/CheckBox/CheckBox.js +41 -19
- package/build/components/DatePicker/DatePicker.d.ts +3 -1
- package/build/components/DatePicker/DatePicker.js +12 -6
- package/build/components/DatePicker/customStyle.css +1 -0
- package/build/components/ExpandIcon/ExpandIcon.js +8 -5
- package/build/components/FileInput/DragAndDrop.js +43 -39
- package/build/components/Icon/Icon.js +1 -1
- package/build/components/OTPField/OTPField.js +5 -4
- package/build/components/OTPTimer/OTPTimer.js +2 -6
- package/build/components/Popover/Popover.d.ts +6 -0
- package/build/components/Popover/Popover.js +79 -0
- package/build/components/Popover/index.d.ts +3 -0
- package/build/components/Popover/index.js +2 -0
- package/build/components/ProgressBar/CircularProgressBar.js +14 -15
- package/build/components/Radio/Radio.js +16 -6
- package/build/components/RadioLabel/RadioLabel.js +3 -2
- package/build/components/SimpleList/SimpleList.d.ts +15 -1
- package/build/components/SimpleList/SimpleList.js +48 -37
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +1 -1
- package/build/components/TextField/TextField.d.ts +17 -0
- package/build/components/TextField/TextField.js +89 -0
- package/build/components/TextField/index.d.ts +3 -0
- package/build/components/TextField/index.js +2 -0
- package/build/components/ToggleButtonGroup/ToggleButtonGroup.js +2 -1
- package/build/components/Tooltip/Tooltip.js +38 -7
- package/build/components/Warning/Warning.js +4 -4
- package/build/constants/app.js +35 -11
- package/build/constants/assets.d.ts +72 -0
- package/build/constants/assets.js +131 -59
- package/build/constants/date.d.ts +1 -0
- package/build/constants/date.js +14 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/features/app/brand/brandStore.d.ts +3 -2
- package/build/features/app/brand/brandStore.js +4 -1
- package/build/features/app/business/businessStore.d.ts +4 -2
- package/build/features/app/business/businessStore.js +12 -6
- package/build/features/app/entity/entityStore.d.ts +3 -2
- package/build/features/app/entity/entityStore.js +4 -1
- package/build/features/app/individual/individualStore.d.ts +3 -2
- package/build/features/app/individual/individualStore.js +4 -1
- package/build/features/bank/Bank.js +3 -3
- package/build/features/bank/screens/BankDetails/BankDetails.js +3 -8
- package/build/features/bank/screens/BankDetails/BankName.js +7 -3
- package/build/features/bank/screens/BankDetails/BankStatement.js +1 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -3
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +7 -16
- package/build/features/bank/screens/BankDetails/IBAN.js +7 -2
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/bank/screens/Success/Success.js +14 -2
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/bank/screens/Verify/Verify.js +5 -8
- package/build/features/brand/Brand.js +3 -3
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +2 -51
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +17 -55
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +9 -7
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +2 -31
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +14 -32
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +2 -1
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +12 -13
- package/build/features/brand/screens/BrandActivities/ExpectedSaleField.d.ts +8 -0
- package/build/features/brand/screens/BrandActivities/ExpectedSaleField.js +55 -0
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +9 -16
- package/build/features/brand/screens/BrandActivities/TAC.js +8 -21
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +4 -2
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +2 -2
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandName.js +7 -51
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +8 -4
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.js +11 -5
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.js +10 -4
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.js +10 -4
- package/build/features/brand/screens/BrandSegmentInfo/TeamSize.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/TeamSize.js +10 -4
- package/build/features/brand/screens/ExpectedSales/ExpectedSaleList.d.ts +29 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSaleList.js +136 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSales.d.ts +5 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSales.js +91 -0
- package/build/features/brand/screens/ExpectedSales/index.d.ts +2 -0
- package/build/features/brand/screens/ExpectedSales/index.js +2 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/brand/screens/Success/Success.js +13 -1
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/brand/screens/Verify/Verify.js +5 -8
- package/build/features/business/Business.js +3 -3
- package/build/features/business/screens/Activities/Activities.js +7 -11
- package/build/features/business/screens/Activities/ActivityField.d.ts +22 -0
- package/build/features/business/screens/Activities/ActivityField.js +63 -0
- package/build/features/business/screens/Activities/LicenseName.js +4 -2
- package/build/features/business/screens/Activities/OperationStartDate.js +3 -3
- package/build/features/business/screens/BrandDetails/BrandDetails.js +3 -2
- package/build/features/business/screens/BrandDetails/BrandName.js +5 -9
- package/build/features/business/screens/BrandDetails/Header.js +4 -3
- package/build/features/business/screens/BrandDetails/LicenseInfo.js +5 -9
- package/build/features/business/screens/BrandDetails/SalesChannel.js +9 -5
- package/build/features/business/screens/BusinessActivities/ActivityList.d.ts +30 -0
- package/build/features/business/screens/BusinessActivities/ActivityList.js +265 -0
- package/build/features/business/screens/BusinessActivities/BusinessActivities.d.ts +5 -0
- package/build/features/business/screens/BusinessActivities/BusinessActivities.js +90 -0
- package/build/features/business/screens/BusinessActivities/index.d.ts +2 -0
- package/build/features/business/screens/BusinessActivities/index.js +2 -0
- package/build/features/business/screens/BusinessType/Article.js +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +6 -4
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +2 -1
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +9 -11
- package/build/features/business/screens/BusinessType/EntityName.js +6 -3
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +2 -1
- package/build/features/business/screens/BusinessType/LicenseList.js +9 -6
- package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -3
- package/build/features/business/screens/BusinessType/LicenseType.js +16 -11
- package/build/features/business/screens/CivilID/CivilID.js +8 -16
- package/build/features/business/screens/CivilID/IDNumber.js +5 -18
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -18
- package/build/features/business/screens/Customers/CustomerLocations.js +11 -26
- package/build/features/business/screens/Customers/Customers.js +12 -10
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +2 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.js +10 -13
- package/build/features/business/screens/Customers/ExpectedSaleField.d.ts +6 -0
- package/build/features/business/screens/Customers/ExpectedSaleField.js +49 -0
- package/build/features/business/screens/Customers/RefundPolicy.js +8 -16
- package/build/features/business/screens/Customers/TransactionPolicy.js +4 -2
- package/build/features/business/screens/ExpectedSales/ExpectedSaleList.d.ts +29 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSaleList.js +136 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSales.d.ts +5 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSales.js +91 -0
- package/build/features/business/screens/ExpectedSales/index.d.ts +2 -0
- package/build/features/business/screens/ExpectedSales/index.js +2 -0
- package/build/features/business/screens/IDBOD/DOB.js +3 -12
- package/build/features/business/screens/IDBOD/ID.js +2 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +9 -16
- package/build/features/business/screens/OTP/OTP.js +10 -22
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/business/screens/Success/Success.js +13 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/business/screens/Verify/Verify.js +5 -8
- package/build/features/connect/Connect.js +3 -3
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +8 -4
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentLocations.js +9 -5
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentProfits.js +8 -4
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +8 -4
- package/build/features/connect/screens/BrandSegment/TeamSize.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/TeamSize.js +8 -4
- package/build/features/connect/screens/CivilID/CivilID.js +11 -12
- package/build/features/connect/screens/CivilID/IDNumber.js +3 -18
- package/build/features/connect/screens/Individual/Email.js +6 -2
- package/build/features/connect/screens/Individual/Individual.js +11 -9
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -0
- package/build/features/connect/screens/Individual/MobileNumber.js +29 -22
- package/build/features/connect/screens/Individual/Name.js +4 -2
- package/build/features/connect/screens/Merchant/BrandList.d.ts +2 -1
- package/build/features/connect/screens/Merchant/BrandList.js +8 -4
- package/build/features/connect/screens/Merchant/BrandName.d.ts +2 -1
- package/build/features/connect/screens/Merchant/BrandName.js +7 -42
- package/build/features/connect/screens/Merchant/Merchant.js +8 -4
- package/build/features/connect/screens/Merchant/TAC.js +12 -24
- package/build/features/connect/screens/Mobile/Mobile.js +19 -21
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -0
- package/build/features/connect/screens/Mobile/MobileNumber.js +22 -19
- package/build/features/connect/screens/NID/DOB.d.ts +1 -1
- package/build/features/connect/screens/NID/DOB.js +5 -26
- package/build/features/connect/screens/NID/IDNumber.js +3 -18
- package/build/features/connect/screens/NID/NID.js +13 -14
- package/build/features/connect/screens/OTP/OTP.js +5 -8
- package/build/features/connect/screens/ThankYou/ThankYou.js +13 -1
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +0 -61
- package/build/features/connectExpress/ConnectExpress.js +3 -3
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +13 -1
- package/build/features/connectExpress/screens/Brand/Brand.js +4 -2
- package/build/features/connectExpress/screens/CivilID/CivilID.js +7 -8
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +3 -18
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -2
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +3 -18
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -40
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +9 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +11 -6
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +8 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +9 -17
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +6 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +6 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +33 -26
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +6 -2
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +5 -8
- package/build/features/connectExpress/screens/Mobile/Mobile.js +21 -12
- package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +33 -26
- package/build/features/connectExpress/screens/Mobile/TAC.js +12 -24
- package/build/features/connectExpress/screens/NID/DOB.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/DOB.js +4 -24
- package/build/features/connectExpress/screens/NID/IDNumber.js +8 -18
- package/build/features/connectExpress/screens/NID/NID.js +7 -8
- package/build/features/connectExpress/screens/NID/TAC.js +9 -17
- package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +1 -1
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +3 -24
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +5 -18
- package/build/features/connectExpress/screens/NIDMissed/NID.js +2 -2
- package/build/features/connectExpress/screens/OTP/OTP.js +5 -8
- package/build/features/connectExpress/screens/OTP/OTPInput.js +1 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/entity/Entity.js +3 -3
- package/build/features/entity/screens/EntityActivities/ActivityList.d.ts +30 -0
- package/build/features/entity/screens/EntityActivities/ActivityList.js +265 -0
- package/build/features/entity/screens/EntityActivities/EntityActivities.d.ts +5 -0
- package/build/features/entity/screens/EntityActivities/EntityActivities.js +89 -0
- package/build/features/entity/screens/EntityActivities/index.d.ts +2 -0
- package/build/features/entity/screens/EntityActivities/index.js +2 -0
- package/build/features/entity/screens/EntityCapital/ActivityField.d.ts +22 -0
- package/build/features/entity/screens/EntityCapital/ActivityField.js +63 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +7 -3
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +6 -2
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +7 -3
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +10 -11
- package/build/features/entity/screens/EntityName/Article.js +1 -1
- package/build/features/entity/screens/EntityName/EntityName.js +6 -4
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +1 -50
- package/build/features/entity/screens/EntityName/EntityTypeList.js +19 -50
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -15
- package/build/features/entity/screens/EntityName/ExpiryDate.js +5 -11
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -15
- package/build/features/entity/screens/EntityName/IssuingDate.js +5 -11
- package/build/features/entity/screens/EntityName/LegalName.js +6 -2
- package/build/features/entity/screens/EntityName/LicenseNumber.js +4 -2
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +6 -2
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/entity/screens/Success/Success.js +13 -1
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/entity/screens/Verify/Verify.js +5 -8
- package/build/features/featuresScreens.js +26 -1
- package/build/features/individual/Individual.js +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +8 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +9 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +19 -100
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +14 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +6 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +7 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +9 -3
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +1 -1
- package/build/features/individual/screens/IndividualList/Email.js +4 -2
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +1 -27
- package/build/features/individual/screens/IndividualList/IndividualList.js +2 -21
- package/build/features/individual/screens/IndividualList/MobileNumber.js +30 -24
- package/build/features/individual/screens/IndividualList/UserList.js +36 -15
- package/build/features/individual/screens/IndividualOccupation/IndividualOccupation.d.ts +5 -0
- package/build/features/individual/screens/IndividualOccupation/IndividualOccupation.js +91 -0
- package/build/features/individual/screens/IndividualOccupation/OccupationList.d.ts +29 -0
- package/build/features/individual/screens/IndividualOccupation/OccupationList.js +136 -0
- package/build/features/individual/screens/IndividualOccupation/index.d.ts +2 -0
- package/build/features/individual/screens/IndividualOccupation/index.js +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +4 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +4 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +16 -12
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +7 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +7 -4
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +31 -24
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +10 -4
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +34 -30
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +10 -2
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/individual/screens/Success/Success.js +13 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/individual/screens/Verify/Verify.js +5 -8
- package/build/features/password/Password.js +3 -3
- package/build/features/password/screens/CreatePassword/ConditionText.js +2 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +15 -2
- package/build/features/password/screens/CreatePassword/CreatePassword.js +3 -3
- package/build/features/password/screens/CreatePassword/Password.js +17 -9
- package/build/features/password/screens/CreatePassword/PasswordBar.js +4 -4
- package/build/features/password/screens/OTP/OTP.js +10 -22
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/password/screens/Success/Success.js +13 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/password/screens/Verify/Verify.js +5 -8
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +16 -11
- package/build/features/shared/Background/Background.js +11 -2
- package/build/features/shared/Button/AbsherButton.js +12 -2
- package/build/features/shared/Button/Button.js +16 -11
- package/build/features/shared/Button/EmailProvidersButtons.js +34 -22
- package/build/features/shared/Button/FlowsButtons.d.ts +3 -1
- package/build/features/shared/Button/FlowsButtons.js +79 -69
- package/build/features/shared/Button/IndividualActionButtons.js +39 -40
- package/build/features/shared/Button/MobileButton.js +16 -2
- package/build/features/shared/Button/SuccessButton.d.ts +1 -1
- package/build/features/shared/Button/SuccessButton.js +10 -15
- package/build/features/shared/Calender/Calender.d.ts +3 -1
- package/build/features/shared/Calender/Calender.js +4 -4
- package/build/features/shared/Calender/CustomCalender.d.ts +15 -0
- package/build/features/shared/Calender/CustomCalender.js +46 -0
- package/build/features/shared/Calender/CustomDatePicker.d.ts +29 -0
- package/build/features/shared/Calender/CustomDatePicker.js +252 -0
- package/build/features/shared/Calender/CustomHijriDatePicker.d.ts +29 -0
- package/build/features/shared/Calender/CustomHijriDatePicker.js +258 -0
- package/build/features/shared/Calender/DatePicker.d.ts +29 -0
- package/build/features/shared/Calender/DatePicker.js +229 -0
- package/build/features/shared/Calender/index.d.ts +2 -0
- package/build/features/shared/Calender/index.js +2 -0
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -2
- package/build/features/shared/CheckIcon/CheckIcon.js +9 -7
- package/build/features/shared/Chip/Chip.js +2 -1
- package/build/features/shared/ClearIcon/ClearIcon.d.ts +2 -0
- package/build/features/shared/ClearIcon/ClearIcon.js +2 -1
- package/build/features/shared/Containers/ContainerWithHeader.d.ts +11 -0
- package/build/features/shared/Containers/ContainerWithHeader.js +52 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -2
- package/build/features/shared/Containers/FeatureContainer.js +6 -4
- package/build/features/shared/Containers/index.d.ts +2 -1
- package/build/features/shared/Containers/index.js +2 -1
- package/build/features/shared/CountryPopup/CountryPopup.d.ts +7 -0
- package/build/features/shared/CountryPopup/CountryPopup.js +166 -0
- package/build/features/shared/CountryPopup/index.d.ts +2 -0
- package/build/features/shared/CountryPopup/index.js +2 -0
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +6 -6
- package/build/features/shared/DataLoading/DataLoading.js +6 -6
- package/build/features/shared/DropDownStyle/DropDownStyle.d.ts +24 -0
- package/build/features/shared/DropDownStyle/DropDownStyle.js +61 -0
- package/build/features/shared/DropDownStyle/index.d.ts +2 -0
- package/build/features/shared/DropDownStyle/index.js +2 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +2 -1
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +2 -2
- package/build/features/shared/Footer/PoweredByFooter.d.ts +1 -2
- package/build/features/shared/Footer/PoweredByFooter.js +3 -3
- package/build/features/shared/GenericError/GenericError.js +3 -2
- package/build/features/shared/Header/Header.d.ts +8 -0
- package/build/features/shared/Header/Header.js +88 -0
- package/build/features/shared/Header/index.d.ts +3 -0
- package/build/features/shared/Header/index.js +2 -0
- package/build/features/shared/InputSelect/InputSelect.js +0 -1
- package/build/features/shared/LanguagePopup/LanguagePopup.d.ts +5 -0
- package/build/features/shared/LanguagePopup/LanguagePopup.js +178 -0
- package/build/features/shared/LanguagePopup/index.d.ts +2 -0
- package/build/features/shared/LanguagePopup/index.js +2 -0
- package/build/features/shared/Mandatory/Mandatory.js +2 -2
- package/build/features/shared/OTP/OTP.js +10 -11
- package/build/features/shared/PaciVerification/PaciVerification.js +5 -4
- package/build/features/shared/PasswordIcon/PasswordIcon.js +3 -2
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +47 -22
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +13 -0
- package/build/features/shared/SalesChannels/SalesChannel.js +11 -24
- package/build/features/shared/Search/Search.d.ts +3 -1
- package/build/features/shared/Search/Search.js +39 -3
- package/build/features/shared/SearchIcon/SearchIcon.d.ts +0 -1
- package/build/features/shared/SearchIcon/SearchIcon.js +6 -7
- package/build/features/shared/SearchIcon/index.d.ts +2 -0
- package/build/features/shared/SearchIcon/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +23 -8
- package/build/features/shared/SuccessScreen/SuccessScreen.js +9 -7
- package/build/features/shared/{UploadFile/UploadFile.d.ts → TextField/TextField.d.ts} +14 -24
- package/build/features/shared/TextField/TextField.js +63 -0
- package/build/features/shared/TextField/index.d.ts +3 -0
- package/build/features/shared/TextField/index.js +2 -0
- package/build/features/shared/TextFieldSelect/TextFieldSelect.d.ts +4 -0
- package/build/features/shared/TextFieldSelect/TextFieldSelect.js +32 -0
- package/build/features/shared/TextFieldSelect/index.d.ts +2 -0
- package/build/features/shared/TextFieldSelect/index.js +2 -0
- package/build/features/shared/TitleDescription/TitleDescription.d.ts +9 -0
- package/build/features/shared/TitleDescription/TitleDescription.js +77 -0
- package/build/features/shared/TitleDescription/index.d.ts +2 -0
- package/build/features/shared/TitleDescription/index.js +2 -0
- package/build/features/shared/UploadFile/FileUpload.d.ts +8 -2
- package/build/features/shared/UploadFile/FileUpload.js +58 -31
- package/build/features/shared/UploadFile/UploadWrapper.js +7 -3
- package/build/features/shared/UploadFile/index.d.ts +1 -2
- package/build/features/shared/UploadFile/index.js +1 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +8 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.js +58 -31
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +14 -9
- package/build/features/signIn/SignIn.js +3 -3
- package/build/features/signIn/screens/Mobile/MobileNumber.js +7 -4
- package/build/features/tax/Tax.js +3 -3
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/tax/screens/Success/Success.js +13 -1
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +7 -16
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +2 -2
- package/build/features/tax/screens/TaxDetails/VATId.js +7 -2
- package/build/features/tax/screens/Verify/Verify.js +9 -9
- package/build/hooks/useAppConfig.js +10 -1
- package/build/theme/palette.js +81 -27
- package/build/theme/shadows.js +7 -7
- package/build/theme/typography.js +3 -3
- package/build/utils/array.d.ts +1 -1
- package/build/utils/array.js +2 -2
- package/build/utils/string.js +14 -16
- package/package.json +3 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +0 -10
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +0 -143
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +0 -37
- package/build/features/business/screens/Activities/ActivitiesList.js +0 -292
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +0 -8
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +0 -138
- package/build/features/connect/screens/Mobile/Title.d.ts +0 -8
- package/build/features/connect/screens/Mobile/Title.js +0 -29
- package/build/features/connectExpress/screens/Mobile/Title.d.ts +0 -8
- package/build/features/connectExpress/screens/Mobile/Title.js +0 -29
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +0 -38
- package/build/features/entity/screens/EntityCapital/ActivityList.js +0 -290
- package/build/features/shared/UploadFile/UploadFile.js +0 -91
|
@@ -27,9 +27,9 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
27
27
|
import Box from '@mui/material/Box';
|
|
28
28
|
import { styled } from '@mui/material/styles';
|
|
29
29
|
import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
|
|
30
|
-
import { BusinessType } from '../../../../@types';
|
|
30
|
+
import { BusinessType, ThemeMode } from '../../../../@types';
|
|
31
31
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
32
|
-
import InputSelect from '../../../shared/
|
|
32
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
33
33
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
34
34
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
35
|
import { businessSelector, clearError } from '../../../app/business/businessStore';
|
|
@@ -39,21 +39,17 @@ import Collapse from '../../../../components/Collapse';
|
|
|
39
39
|
import { isKW, isOtherLicense } from '../../../../utils';
|
|
40
40
|
import { settingsSelector } from '../../../../app/settings';
|
|
41
41
|
import { OTHER_CR_LICENSE } from '../../../../constants';
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return ({
|
|
45
|
-
marginBottom: theme.spacing(2.5)
|
|
46
|
-
});
|
|
47
|
-
});
|
|
42
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
43
|
+
var InputStyled = styled(InputSelect)(function () { return ({}); });
|
|
48
44
|
var LicenseContainer = styled(Box)(function () { return ({
|
|
49
45
|
display: 'flex'
|
|
50
46
|
}); });
|
|
51
47
|
var LicenseNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
52
48
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
53
|
-
return (__assign(__assign({ display: 'flex', color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
|
|
49
|
+
return (__assign(__assign({ display: 'flex', color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
|
|
54
50
|
});
|
|
55
51
|
var EntityLicenseList = function (_a) {
|
|
56
|
-
var rest = __rest(_a, []);
|
|
52
|
+
var isPopupMode = _a.isPopupMode, rest = __rest(_a, ["isPopupMode"]);
|
|
57
53
|
var _b = useAppSelector(businessSelector), data = _b.data, error = _b.error;
|
|
58
54
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
59
55
|
var businessTypeData = data.businessTypeData;
|
|
@@ -122,7 +118,9 @@ var EntityLicenseList = function (_a) {
|
|
|
122
118
|
var selected = selectedEntityLicenseControl.field.value;
|
|
123
119
|
var isCR = (selected === null || selected === void 0 ? void 0 : selected.type) === BusinessType.CR;
|
|
124
120
|
var flValue = isOtherLicense(selected) ? t(getLicenseName(selected)) : getLicenseNumber(selected);
|
|
125
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputStyled, { label: t('choose_entity_license'), onClick: !!anchorEl ? function () { return onCloseLicenseList(); } : onOpenLicenseList,
|
|
121
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputStyled, { label: t('choose_entity_license'), onClick: !!anchorEl ? function () { return onCloseLicenseList(); } : onOpenLicenseList, InputProps: {
|
|
122
|
+
endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl })
|
|
123
|
+
}, placeholder: t('choose_license_entity'), value: isCR ? t(getLicenseName(selected)) : flValue }), _jsx(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseLicenseList }, { children: _jsx(SimpleList, { isPopupMode: isPopupMode, searchKeyPath: 'legal_name?.en', list: entityLicenseList || [], onSelectItem: onSelectItem, renderItem: function (item) {
|
|
126
124
|
return (_jsxs(_Fragment, { children: [_jsx(LicenseContainer, { children: _jsx(LicenseNameText, __assign({ isSelected: getLicenseNumber(item) === getLicenseNumber(selected) }, { children: isOtherLicense(item) ? t(getLicenseName(item)) : getLicenseFullName(item) })) }), getLicenseNumber(item) === getLicenseNumber(selected) && _jsx(CheckIcon, {})] }));
|
|
127
125
|
} }) }))] }) })));
|
|
128
126
|
};
|
|
@@ -19,7 +19,7 @@ import { settingsSelector } from '../../../../app/settings';
|
|
|
19
19
|
import { isSA, removeAllOtherThanCharsNumbersAndSpace } from '../../../../utils';
|
|
20
20
|
import { useAppSelector } from '../../../../hooks';
|
|
21
21
|
import Collapse from '../../../../components/Collapse';
|
|
22
|
-
import Input from '../../../shared/
|
|
22
|
+
import Input from '../../../shared/TextField';
|
|
23
23
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
24
24
|
var BoxStyled = styled(Box)(function (_a) {
|
|
25
25
|
var theme = _a.theme;
|
|
@@ -29,7 +29,8 @@ var BoxStyled = styled(Box)(function (_a) {
|
|
|
29
29
|
direction: theme.direction,
|
|
30
30
|
fontFamily: theme.typography.fontFamily,
|
|
31
31
|
overflow: 'hidden',
|
|
32
|
-
paddingBlockEnd: theme.spacing(
|
|
32
|
+
paddingBlockEnd: theme.spacing(1.5),
|
|
33
|
+
marginTop: theme.spacing(1.5)
|
|
33
34
|
});
|
|
34
35
|
});
|
|
35
36
|
var EntityName = function (_a) {
|
|
@@ -50,6 +51,8 @@ var EntityName = function (_a) {
|
|
|
50
51
|
var clearEntityName = function () {
|
|
51
52
|
entityNameControl.field.onChange('');
|
|
52
53
|
};
|
|
53
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(BoxStyled, { children: _jsx(Input, { label: t('entity_legal_name_title'), onChange: handleChange, value: entityNameValue, required: !isSACountry,
|
|
54
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(BoxStyled, { children: _jsx(Input, { label: t('entity_legal_name_title'), onChange: handleChange, value: entityNameValue, required: !isSACountry, InputProps: {
|
|
55
|
+
endAdornment: _jsx(EndAdornment, { value: entityNameValue, error: error, onClear: clearEntityName })
|
|
56
|
+
}, placeholder: t('entity_legal_name_placeholder'), helperText: error && t(error) }) }) })));
|
|
54
57
|
};
|
|
55
58
|
export default EntityName;
|
|
@@ -4,6 +4,7 @@ interface LicenseListProps {
|
|
|
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 }: LicenseListProps) => JSX.Element>;
|
|
9
|
+
declare const _default: React.MemoExoticComponent<({ isPopupMode, ...rest }: LicenseListProps) => JSX.Element>;
|
|
9
10
|
export default _default;
|
|
@@ -27,9 +27,9 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
27
27
|
import Box from '@mui/material/Box';
|
|
28
28
|
import { styled } from '@mui/material/styles';
|
|
29
29
|
import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
|
|
30
|
-
import { BusinessType } from '../../../../@types';
|
|
30
|
+
import { BusinessType, ThemeMode } from '../../../../@types';
|
|
31
31
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
32
|
-
import InputSelect from '../../../shared/
|
|
32
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
33
33
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
34
34
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
35
|
import { businessSelector, clearError } from '../../../app/business/businessStore';
|
|
@@ -39,10 +39,11 @@ import Collapse from '../../../../components/Collapse';
|
|
|
39
39
|
import { isOtherLicense, isSA } from '../../../../utils';
|
|
40
40
|
import { OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../../constants';
|
|
41
41
|
import { settingsSelector } from '../../../../app/settings';
|
|
42
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
42
43
|
var InputStyled = styled(InputSelect)(function (_a) {
|
|
43
44
|
var theme = _a.theme;
|
|
44
45
|
return ({
|
|
45
|
-
|
|
46
|
+
marginTop: theme.spacing(1.5)
|
|
46
47
|
});
|
|
47
48
|
});
|
|
48
49
|
var LicenseContainer = styled(Box)(function () { return ({
|
|
@@ -50,10 +51,10 @@ var LicenseContainer = styled(Box)(function () { return ({
|
|
|
50
51
|
}); });
|
|
51
52
|
var LicenseNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
52
53
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
53
|
-
return (__assign(__assign({ display: 'flex', color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
|
|
54
|
+
return (__assign(__assign({ display: 'flex', color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
|
|
54
55
|
});
|
|
55
56
|
var LicenseList = function (_a) {
|
|
56
|
-
var rest = __rest(_a, []);
|
|
57
|
+
var isPopupMode = _a.isPopupMode, rest = __rest(_a, ["isPopupMode"]);
|
|
57
58
|
var _b = useAppSelector(businessSelector), data = _b.data, error = _b.error;
|
|
58
59
|
var settingsData = useAppSelector(settingsSelector).data;
|
|
59
60
|
var businessTypeData = data.businessTypeData;
|
|
@@ -126,7 +127,9 @@ var LicenseList = function (_a) {
|
|
|
126
127
|
var selected = selectedLicenseControl.field.value;
|
|
127
128
|
var isCR = (selected === null || selected === void 0 ? void 0 : selected.type) === BusinessType.CR;
|
|
128
129
|
var flValue = isOtherLicense(selected) ? t(getLicenseName(selected)) : getLicenseNumber(selected);
|
|
129
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputStyled, { label: t('choose_any_license'), onClick: !!anchorEl ? function () { return onCloseLicenseList(); } : onOpenLicenseList,
|
|
130
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputStyled, { label: t('choose_any_license'), onClick: !!anchorEl ? function () { return onCloseLicenseList(); } : onOpenLicenseList, InputProps: {
|
|
131
|
+
endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl })
|
|
132
|
+
}, placeholder: t('choose_license_cr'), value: isCR ? t(getLicenseName(selected)) : flValue }), _jsx(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseLicenseList }, { children: _jsx(SimpleList, { searchKeyPath: 'legal_name?.en', list: licenseList || [], onSelectItem: onSelectItem, renderItem: function (item) {
|
|
130
133
|
return (_jsxs(_Fragment, { children: [_jsx(LicenseContainer, { children: _jsx(LicenseNameText, __assign({ isSelected: getLicenseNumber(item) === getLicenseNumber(selected) }, { children: isOtherLicense(item) ? t(getLicenseName(item)) : getLicenseFullName(item) })) }), getLicenseNumber(item) === getLicenseNumber(selected) && _jsx(CheckIcon, {})] }));
|
|
131
134
|
} }) }))] }) })));
|
|
132
135
|
};
|
|
@@ -18,7 +18,7 @@ import { removeAllOtherThanCharsAndNumber, isSA, isOtherLicense } from '../../..
|
|
|
18
18
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
19
19
|
import ClearIcon from '../../../shared/ClearIcon';
|
|
20
20
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
21
|
-
import Input from '../../../shared/
|
|
21
|
+
import Input from '../../../shared/TextField';
|
|
22
22
|
import Collapse from '../../../../components/Collapse';
|
|
23
23
|
import { BusinessType } from '../../../../@types';
|
|
24
24
|
import { useAppSelector } from '../../../../hooks';
|
|
@@ -48,7 +48,12 @@ var LicenseNumber = function (_a) {
|
|
|
48
48
|
var length = !isSACountry ? KW_MAX_LICENSE_LENGTH : isCR ? CR_NUMBER_MAX_LENGTH : FL_NUMBER_MAX_LENGTH;
|
|
49
49
|
var minLength = !isSACountry ? KW_MIN_LICENSE_LENGTH : isCR ? CR_MIN_LICENSE_LENGTH : FL_MIN_LICENSE_LENGTH;
|
|
50
50
|
var label = isCR ? 'cr_number' : 'fl_number';
|
|
51
|
-
var showCheckIcon =
|
|
52
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer,
|
|
51
|
+
var showCheckIcon = (licenseNumberValue === null || licenseNumberValue === void 0 ? void 0 : licenseNumberValue.length) >= minLength;
|
|
52
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mt: 1.5 } }, { children: _jsx(Input, { label: t(label), required: !isSACountry, onChange: handleFLNumberChange, InputProps: {
|
|
53
|
+
endAdornment: showCheckIcon ? _jsx(CheckIcon, {}) : licenseNumberValue && _jsx(ClearIcon, { onClick: clearLicenseNumber })
|
|
54
|
+
}, inputProps: {
|
|
55
|
+
maxLength: length,
|
|
56
|
+
readOnly: readOnly
|
|
57
|
+
}, value: licenseNumberValue, placeholder: isCR ? t('cr_number_hint') : t('fl_number_hint'), helperText: error && t(error, { length: minLength }) }) })) })));
|
|
53
58
|
};
|
|
54
59
|
export default React.memo(LicenseNumber);
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import { styled
|
|
14
|
+
import { styled } from '@mui/material/styles';
|
|
15
15
|
import InfoIcon from '@mui/icons-material/Info';
|
|
16
16
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
17
17
|
import Collapse from '../../../../components/Collapse';
|
|
@@ -29,10 +29,11 @@ import { OTHER_CR_LICENSE, OTHER_FL_LICENSE } from '../../../../constants';
|
|
|
29
29
|
import { businessSelector, clearError } from '../../../app/business/businessStore';
|
|
30
30
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
31
31
|
import { isKW } from '../../../../utils';
|
|
32
|
+
import { ThemeMode } from '../../../../@types';
|
|
32
33
|
import { settingsSelector } from '../../../../app/settings';
|
|
33
34
|
var LabelTextStyled = styled(Text)(function (_a) {
|
|
34
35
|
var theme = _a.theme;
|
|
35
|
-
return (__assign(__assign({}, theme.typography.caption), { color:
|
|
36
|
+
return (__assign(__assign({}, theme.typography.caption), { color: theme.palette.text.secondary, marginBlockEnd: theme.spacing(0.625) }));
|
|
36
37
|
});
|
|
37
38
|
var RadioGroupStyled = styled(RadioGroup)(function (_a) {
|
|
38
39
|
var theme = _a.theme;
|
|
@@ -50,27 +51,31 @@ var RadioStyled = styled(Radio)(function (_a) {
|
|
|
50
51
|
}
|
|
51
52
|
});
|
|
52
53
|
});
|
|
53
|
-
var LabelStyled = styled('span')(function () {
|
|
54
|
-
|
|
55
|
-
alignItems: 'center'
|
|
56
|
-
});
|
|
54
|
+
var LabelStyled = styled('span')(function (_a) {
|
|
55
|
+
var theme = _a.theme;
|
|
56
|
+
return (__assign({ display: 'inline-flex', alignItems: 'center' }, theme.typography.subtitle2));
|
|
57
|
+
});
|
|
57
58
|
export var InfoIconStyled = styled(InfoIcon)(function (_a) {
|
|
58
59
|
var theme = _a.theme;
|
|
59
60
|
return ({
|
|
61
|
+
position: 'relative',
|
|
62
|
+
top: theme.spacing(0.125),
|
|
60
63
|
width: theme.spacing(2.75),
|
|
61
|
-
height: theme.spacing(
|
|
64
|
+
height: theme.spacing(1.75),
|
|
62
65
|
cursor: 'pointer',
|
|
63
|
-
color:
|
|
66
|
+
color: theme.palette.mode === ThemeMode.DARK ? theme.palette.text.disabled : theme.palette.primary.contrastText,
|
|
64
67
|
display: 'inline-flex'
|
|
65
68
|
});
|
|
66
69
|
});
|
|
67
70
|
export var InfoOutlinedIconStyled = styled(InfoOutlinedIcon)(function (_a) {
|
|
68
71
|
var theme = _a.theme;
|
|
69
72
|
return ({
|
|
73
|
+
position: 'relative',
|
|
74
|
+
top: theme.spacing(0.125),
|
|
70
75
|
width: theme.spacing(2.75),
|
|
71
|
-
height: theme.spacing(
|
|
76
|
+
height: theme.spacing(1.75),
|
|
72
77
|
cursor: 'pointer',
|
|
73
|
-
color:
|
|
78
|
+
color: theme.palette.mode === ThemeMode.DARK ? theme.palette.text.disabled : theme.palette.primary.contrastText,
|
|
74
79
|
display: 'inline-flex'
|
|
75
80
|
});
|
|
76
81
|
});
|
|
@@ -98,6 +103,6 @@ var LicenseType = function (_a) {
|
|
|
98
103
|
};
|
|
99
104
|
var selectedLicenseValue = selectedLicenseControl.field.value;
|
|
100
105
|
var isFL = (selectedLicenseValue === null || selectedLicenseValue === void 0 ? void 0 : selectedLicenseValue.type) === BusinessType.FL;
|
|
101
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: isFL ? 9.5 :
|
|
106
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { pb: isFL ? 9.5 : 2.5, pl: 3, pr: 3 } }, { children: [_jsxs(LabelTextStyled, { children: [t('signup_business_type_label'), _jsx(Mandatory, {})] }), _jsxs(RadioGroupStyled, __assign({ value: selectedLicenseValue != null ? ((selectedLicenseValue === null || selectedLicenseValue === void 0 ? void 0 : selectedLicenseValue.type) === BusinessType.FL ? BusinessType.FL : BusinessType.CR) : false, onChange: handleOnChange }, { children: [_jsx(RadioLabel, { value: BusinessType.FL, label: _jsxs(LabelStyled, { children: [t('homemaker_reg'), _jsx(Tooltip, __assign({ title: t('homemaker_reg_hint'), onMouseOver: function () { return setIsFLHovered(true); }, onMouseLeave: function () { return setIsFLHovered(false); }, onTouchStartCapture: function () { return setIsFLHovered(true); } }, { children: isFLHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) }), _jsx(RadioLabel, { value: BusinessType.CR, sx: { marginInlineEnd: '0px' }, label: _jsxs(LabelStyled, { children: [t('commercial_reg'), _jsx(Tooltip, __assign({ title: t('commercial_reg_hint'), onMouseOver: function () { return setIsCRHovered(true); }, onMouseLeave: function () { return setIsCRHovered(false); }, onTouchStartCapture: function () { return setIsCRHovered(true); } }, { children: isCRHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), control: _jsx(RadioStyled, { color: 'primary', disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, focusRipple: false }) })] }))] })) })));
|
|
102
107
|
};
|
|
103
108
|
export default LicenseType;
|
|
@@ -9,17 +9,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
13
|
import * as React from 'react';
|
|
25
14
|
import { useTranslation } from 'react-i18next';
|
|
@@ -32,7 +21,7 @@ import { settingsSelector } from '../../../../app/settings';
|
|
|
32
21
|
import { clearError, businessSelector, createCivilIdAuth } from '../../../app/business/businessStore';
|
|
33
22
|
import Form from '../../../../components/Form';
|
|
34
23
|
import Button from '../../../shared/Button';
|
|
35
|
-
import {
|
|
24
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
36
25
|
import { deepCopy } from '../../../../utils';
|
|
37
26
|
import IDNumber from './IDNumber';
|
|
38
27
|
var FormStyled = styled(Form)(function () { return ({
|
|
@@ -45,13 +34,16 @@ var CivilID = function (_a) {
|
|
|
45
34
|
var t = useTranslation().t;
|
|
46
35
|
var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
47
36
|
var settingsStore = useAppSelector(settingsSelector);
|
|
48
|
-
var _c = data.civilIdData,
|
|
37
|
+
var _c = data.civilIdData, civilId = _c.civilId, termAndConditionChecked = _c.termAndConditionChecked;
|
|
49
38
|
var methods = useForm({
|
|
50
39
|
resolver: yupResolver(civilIDValidationSchema),
|
|
51
|
-
defaultValues:
|
|
40
|
+
defaultValues: {
|
|
41
|
+
civilId: civilId,
|
|
42
|
+
termAndConditionChecked: termAndConditionChecked
|
|
43
|
+
},
|
|
52
44
|
mode: 'onChange'
|
|
53
45
|
});
|
|
54
|
-
useSetFromDefaultValues(methods,
|
|
46
|
+
useSetFromDefaultValues(methods, data.civilIdData);
|
|
55
47
|
React.useEffect(function () {
|
|
56
48
|
handleClearError();
|
|
57
49
|
}, [methods.formState.isValid]);
|
|
@@ -63,6 +55,6 @@ var CivilID = function (_a) {
|
|
|
63
55
|
dispatch(clearError());
|
|
64
56
|
};
|
|
65
57
|
var disabled = !methods.formState.isValid || !!error;
|
|
66
|
-
return (_jsx(
|
|
58
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'civil_id_title', description: 'civil_id_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(IDNumber, { sx: { mb: 7.5, transition: 'mb 0.3s' } }), _jsx(Button, __assign({ loading: loading, isAr: isAr, disableBack: true, disabled: disabled || settingsStore.loading, error: t(error || '') }, { children: t('next') }))] })) })) })));
|
|
67
59
|
};
|
|
68
60
|
export default React.memo(CivilID);
|
|
@@ -9,30 +9,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
|
-
import Box from '@mui/material/Box';
|
|
15
14
|
import { useTranslation } from 'react-i18next';
|
|
16
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
17
|
-
import
|
|
18
|
-
import Text from '../../../../components/Text';
|
|
19
|
-
import Input from '../../../shared/Input';
|
|
16
|
+
import Input from '../../../shared/TextField';
|
|
20
17
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
21
18
|
import { removeAllOtherThanCharsAndNumber } from '../../../../utils';
|
|
22
19
|
import { CIVIL_ID_NUMBER_LENGTH } from '../../../../constants';
|
|
23
20
|
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
24
|
-
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
25
|
-
var theme = _a.theme;
|
|
26
|
-
return ({
|
|
27
|
-
display: 'flex',
|
|
28
|
-
justifyContent: 'space-between',
|
|
29
|
-
padding: theme.spacing(0, 2.5, 1.25, 2.5)
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
var InputLabelStyled = styled(Text)(function (_a) {
|
|
33
|
-
var theme = _a.theme;
|
|
34
|
-
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
35
|
-
});
|
|
36
21
|
var IDNumber = React.forwardRef(function (_a, ref) {
|
|
37
22
|
var _b;
|
|
38
23
|
var sx = _a.sx;
|
|
@@ -53,6 +38,8 @@ var IDNumber = React.forwardRef(function (_a, ref) {
|
|
|
53
38
|
};
|
|
54
39
|
var idValue = civilIdControl.field.value;
|
|
55
40
|
var error = (_b = civilIdControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
56
|
-
return (
|
|
41
|
+
return (_jsx(ScreenContainer, __assign({ ref: ref, sx: sx }, { children: _jsx(Input, { dir: 'ltr', type: 'text', label: t('enter_civil_id'), InputProps: {
|
|
42
|
+
endAdornment: _jsx(EndAdornment, { value: idValue, error: error, onClear: clearIdNumber })
|
|
43
|
+
}, inputProps: { maxLength: CIVIL_ID_NUMBER_LENGTH }, onChange: handleIdChange, value: idValue, placeholder: t('civil_id_placeholder'), helperText: error && t(error), required: true }) })));
|
|
57
44
|
});
|
|
58
45
|
export default React.memo(IDNumber);
|
|
@@ -35,19 +35,6 @@ export declare const LabelContainerStyled: import("@emotion/styled").StyledCompo
|
|
|
35
35
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
36
36
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
37
37
|
}, 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" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
38
|
-
export declare const InputLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
39
|
-
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
40
|
-
children?: React.ReactNode;
|
|
41
|
-
classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
|
|
42
|
-
gutterBottom?: boolean | undefined;
|
|
43
|
-
noWrap?: boolean | undefined;
|
|
44
|
-
paragraph?: boolean | undefined;
|
|
45
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
46
|
-
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | undefined;
|
|
47
|
-
variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline", string>> | undefined;
|
|
48
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
49
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
50
|
-
}, 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>, {}, {}>;
|
|
51
38
|
export declare const BaseLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material/styles").Theme> & {
|
|
52
39
|
align?: "right" | "left" | "inherit" | "center" | "justify" | undefined;
|
|
53
40
|
children?: React.ReactNode;
|
|
@@ -76,14 +63,11 @@ export declare const NameContainer: import("@emotion/styled").StyledComponent<im
|
|
|
76
63
|
}, 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> & {
|
|
77
64
|
isSelected?: boolean | undefined;
|
|
78
65
|
}, {}, {}>;
|
|
79
|
-
export declare const RemainingCheck: import("@emotion/styled").StyledComponent<{
|
|
80
|
-
isVerified?: boolean | undefined;
|
|
81
|
-
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
82
|
-
} & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
83
66
|
interface CustomerLocationsProps {
|
|
84
67
|
show: boolean;
|
|
85
68
|
onListOpen?: () => void;
|
|
86
69
|
onListClose?: () => void;
|
|
70
|
+
isPopupMode: boolean;
|
|
87
71
|
}
|
|
88
|
-
declare const _default: React.MemoExoticComponent<({ ...rest }: CustomerLocationsProps) => JSX.Element>;
|
|
72
|
+
declare const _default: React.MemoExoticComponent<({ isPopupMode, ...rest }: CustomerLocationsProps) => JSX.Element>;
|
|
89
73
|
export default _default;
|
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import { jsx as _jsx,
|
|
23
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
import Box from '@mui/material/Box';
|
|
26
26
|
import { useTranslation } from 'react-i18next';
|
|
@@ -32,13 +32,14 @@ import Text from '../../../../components/Text';
|
|
|
32
32
|
import Collapse from '../../../../components/Collapse';
|
|
33
33
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
34
34
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
35
|
-
import InputSelect from '../../../shared/
|
|
36
|
-
import Tooltip from '../../../../components/Tooltip';
|
|
35
|
+
import InputSelect from '../../../shared/TextFieldSelect';
|
|
37
36
|
import SimpleList from '../../../../components/SimpleList';
|
|
38
37
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
39
38
|
import { useLanguage, useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
39
|
+
import { ThemeMode } from '../../../../@types';
|
|
40
40
|
import { businessSelector, clearError } from '../../../app/business/businessStore';
|
|
41
41
|
import Search from '../../../shared/Search';
|
|
42
|
+
import DropDownStyle from '../../../shared/DropDownStyle';
|
|
42
43
|
export var InfoOutlinedIconStyled = styled(InfoOutlinedIcon)(function (_a) {
|
|
43
44
|
var theme = _a.theme;
|
|
44
45
|
return ({
|
|
@@ -65,37 +66,20 @@ export var LabelContainerStyled = styled(Box)(function (_a) {
|
|
|
65
66
|
margin: theme.spacing(2.5, 2.5, 1.5, 2.5)
|
|
66
67
|
});
|
|
67
68
|
});
|
|
68
|
-
export var InputLabelStyled = styled(Text)(function (_a) {
|
|
69
|
-
var theme = _a.theme;
|
|
70
|
-
return (__assign({ margin: theme.spacing(2.5, 2.5, 1.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
71
|
-
});
|
|
72
69
|
export var BaseLabelStyled = styled(Text)(function (_a) {
|
|
73
70
|
var theme = _a.theme;
|
|
74
71
|
return (__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
75
72
|
});
|
|
76
|
-
var InputStyled = styled(InputSelect)(function (
|
|
77
|
-
var theme = _a.theme;
|
|
78
|
-
return ({
|
|
79
|
-
paddingInlineEnd: theme.spacing(2.5)
|
|
80
|
-
});
|
|
81
|
-
});
|
|
73
|
+
var InputStyled = styled(InputSelect)(function () { return ({}); });
|
|
82
74
|
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
83
75
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
84
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
85
|
-
});
|
|
86
|
-
export var RemainingCheck = styled(CheckIcon)(function (_a) {
|
|
87
|
-
var theme = _a.theme;
|
|
88
|
-
return ({
|
|
89
|
-
color: theme.palette.success.dark,
|
|
90
|
-
display: 'flex',
|
|
91
|
-
alignItems: 'flex-end'
|
|
92
|
-
});
|
|
76
|
+
return (__assign(__assign({ color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
93
77
|
});
|
|
94
78
|
var SimpleListStyled = styled((SimpleList))(function () { return ({
|
|
95
79
|
height: 'fit-content'
|
|
96
80
|
}); });
|
|
97
81
|
var customerLocations = function (_a) {
|
|
98
|
-
var rest = __rest(_a, []);
|
|
82
|
+
var isPopupMode = _a.isPopupMode, rest = __rest(_a, ["isPopupMode"]);
|
|
99
83
|
var _b = React.useState([]), customerLocationsList = _b[0], setCustomerLocationsList = _b[1];
|
|
100
84
|
var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
|
|
101
85
|
var t = useTranslation().t;
|
|
@@ -104,7 +88,6 @@ var customerLocations = function (_a) {
|
|
|
104
88
|
var dispatch = useAppDispatch();
|
|
105
89
|
var customerLocationsControl = useController({ name: 'customerLocations', control: control });
|
|
106
90
|
var _d = useAppSelector(businessSelector), data = _d.data, error = _d.error;
|
|
107
|
-
var _e = React.useState(false), isHovered = _e[0], setIsHovered = _e[1];
|
|
108
91
|
var activitiesData = data.activitiesData;
|
|
109
92
|
var response = activitiesData.responseBody;
|
|
110
93
|
var onOpenList = function (event) {
|
|
@@ -152,8 +135,10 @@ var customerLocations = function (_a) {
|
|
|
152
135
|
};
|
|
153
136
|
var customerLocationsValue = customerLocationsControl.field.value;
|
|
154
137
|
var customerLocationSelected = customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue[0];
|
|
155
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer,
|
|
138
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mb: 1.5 } }, { children: [_jsx(InputStyled, { label: t('select_customer_base'), placeholder: t('choose_expected_sales'), InputProps: {
|
|
139
|
+
endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl })
|
|
140
|
+
}, value: (isAr ? customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.ar : customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.name.en) || '', onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList }), _jsxs(DropDownStyle, __assign({ isPopupMode: isPopupMode, anchorEl: anchorEl, onClosePopup: onCloseList }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleListStyled, { isPopupMode: isPopupMode, searchKeyPath: 'name.en', list: customerLocationsList, placeholder: 'choose_customer_base', onSelectItem: onSelectItem, renderItem: function (item) {
|
|
156
141
|
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.id) === (customerLocationsValue === null || customerLocationsValue === void 0 ? void 0 : customerLocationsValue.id) }, { children: isAr ? item.name.ar : item.name.en })) })), item.id === (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIcon, {}), checkRemainingCondition(item) && item.id != (customerLocationSelected === null || customerLocationSelected === void 0 ? void 0 : customerLocationSelected.id) && _jsx(CheckIcon, {})] }));
|
|
157
|
-
} })] }))] }) })));
|
|
142
|
+
} })] }))] })) })));
|
|
158
143
|
};
|
|
159
144
|
export default React.memo(customerLocations);
|
|
@@ -17,17 +17,18 @@ import { useTranslation } from 'react-i18next';
|
|
|
17
17
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
18
18
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
19
19
|
import { useAppDispatch, useAppSelector, useSetFromDefaultValues } from '../../../../hooks';
|
|
20
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
20
|
+
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
21
21
|
import { CustomerInfoValidation } from './validation';
|
|
22
22
|
import Form from '../../../../components/Form';
|
|
23
23
|
import Button from '../../../shared/Button';
|
|
24
24
|
import { useLanguage } from '../../../../hooks';
|
|
25
25
|
import CustomerLocations from './CustomerLocations';
|
|
26
26
|
import ExpectedCustomers from './ExpectedCustomers';
|
|
27
|
-
import
|
|
27
|
+
import ExpectedSaleField from './ExpectedSaleField';
|
|
28
|
+
import { DropDownMode } from '../../../../@types';
|
|
28
29
|
import RefundPolicy from './RefundPolicy';
|
|
29
30
|
import TransactionPolicy from './TransactionPolicy';
|
|
30
|
-
import {
|
|
31
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
31
32
|
import Collapse from '../../../../components/Collapse';
|
|
32
33
|
import { businessSelector, clearError, updateCustomersInfo } from '../../../app/business/businessStore';
|
|
33
34
|
import { deepCopy } from '../../../../utils';
|
|
@@ -39,15 +40,16 @@ var ListType;
|
|
|
39
40
|
(function (ListType) {
|
|
40
41
|
ListType["CustomerLocationsList"] = "CustomerLocationsList";
|
|
41
42
|
ListType["ExpectedCustomersList"] = "ExpectedCustomersList";
|
|
42
|
-
ListType["ExpectedSalesList"] = "ExpectedSalesList";
|
|
43
43
|
})(ListType || (ListType = {}));
|
|
44
44
|
var Customers = function (_a) {
|
|
45
45
|
var _b, _c;
|
|
46
46
|
var _d = React.useState(), listActive = _d[0], setListActive = _d[1];
|
|
47
47
|
var dispatch = useAppDispatch();
|
|
48
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
48
49
|
var _e = useAppSelector(businessSelector), data = _e.data, loading = _e.loading, error = _e.error;
|
|
49
50
|
var _f = data.customersData, customerLocations = _f.customerLocations, expectedCustomer = _f.expectedCustomer, expectedSale = _f.expectedSale, refundPolicy = _f.refundPolicy, transactionPolicy = _f.transactionPolicy;
|
|
50
51
|
var terms = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.brand) === null || _c === void 0 ? void 0 : _c.terms;
|
|
52
|
+
var isPopupMode = settingsData.dropDownOpenMode === DropDownMode.popup;
|
|
51
53
|
var methods = useForm({
|
|
52
54
|
resolver: yupResolver(CustomerInfoValidation),
|
|
53
55
|
defaultValues: {
|
|
@@ -83,7 +85,8 @@ var Customers = function (_a) {
|
|
|
83
85
|
var t = useTranslation().t;
|
|
84
86
|
var isAr = useLanguage().isAr;
|
|
85
87
|
var handleMenuClick = function (flag) {
|
|
86
|
-
|
|
88
|
+
if (!isPopupMode)
|
|
89
|
+
setListActive(flag);
|
|
87
90
|
};
|
|
88
91
|
React.useEffect(function () {
|
|
89
92
|
if (error)
|
|
@@ -91,12 +94,11 @@ var Customers = function (_a) {
|
|
|
91
94
|
}, [methods.formState.isValid]);
|
|
92
95
|
var isCustomerLocationsListActive = listActive === ListType.CustomerLocationsList;
|
|
93
96
|
var isExpectedCustomersListActive = listActive === ListType.ExpectedCustomersList;
|
|
94
|
-
var
|
|
95
|
-
var
|
|
96
|
-
var whenNotSelectExpectedCustomers = !isCustomerLocationsListActive && !isExpectedSalesListActive;
|
|
97
|
+
var whenNotSelectCustomersLocation = !isExpectedCustomersListActive;
|
|
98
|
+
var whenNotSelectExpectedCustomers = !isCustomerLocationsListActive;
|
|
97
99
|
var whenNotSelectExpectedSales = !isCustomerLocationsListActive && !isExpectedCustomersListActive;
|
|
98
|
-
var isAnyListSelected = !isExpectedCustomersListActive && !isCustomerLocationsListActive
|
|
100
|
+
var isAnyListSelected = !isExpectedCustomersListActive && !isCustomerLocationsListActive;
|
|
99
101
|
var disabled = !methods.formState.isValid || !!error;
|
|
100
|
-
return (_jsx(
|
|
102
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'one_last_step', description: 'business_customer_description', onBack: function () { return onBack(); } }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(CustomerLocations, { isPopupMode: isPopupMode, show: whenNotSelectCustomersLocation, onListOpen: function () { return handleMenuClick(ListType.CustomerLocationsList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ExpectedCustomers, { isPopupMode: isPopupMode, show: whenNotSelectExpectedCustomers, onListOpen: function () { return handleMenuClick(ListType.ExpectedCustomersList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(ExpectedSaleField, { show: whenNotSelectExpectedSales }), _jsxs(Collapse, __assign({ in: isAnyListSelected }, { children: [_jsx(RefundPolicy, {}), _jsx(TransactionPolicy, {}), _jsx(Box, __assign({ sx: { mt: 2 } }, { children: _jsx(Button, __assign({ disableBack: true, isAr: isAr, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })) }))] }))] })) })) })));
|
|
101
103
|
};
|
|
102
104
|
export default React.memo(Customers);
|
|
@@ -3,6 +3,7 @@ interface ExpectedCustomersProps {
|
|
|
3
3
|
show: boolean;
|
|
4
4
|
onListOpen?: () => void;
|
|
5
5
|
onListClose?: () => void;
|
|
6
|
+
isPopupMode: boolean;
|
|
6
7
|
}
|
|
7
|
-
declare const ExpectedCustomers: ({ ...rest }: ExpectedCustomersProps) => JSX.Element;
|
|
8
|
+
declare const ExpectedCustomers: ({ isPopupMode, ...rest }: ExpectedCustomersProps) => JSX.Element;
|
|
8
9
|
export default ExpectedCustomers;
|