@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,258 @@
|
|
|
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, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import React, { memo, useState } from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import momentHijri from 'moment-hijri';
|
|
16
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
17
|
+
import Box from '@mui/material/Box';
|
|
18
|
+
import { useLanguage } from '../../../hooks';
|
|
19
|
+
import { convertToEnglishDateFormat } from '../../../utils';
|
|
20
|
+
import Text from '../../../components/Text';
|
|
21
|
+
import SimpleList from '../../../components/SimpleList';
|
|
22
|
+
import { ThemeMode } from '../../../@types';
|
|
23
|
+
import { hijriArabicMonthNames } from '../../../constants';
|
|
24
|
+
import ExpandIcon from '../../../components/ExpandIcon';
|
|
25
|
+
import TextFieldSelect from '../TextFieldSelect';
|
|
26
|
+
import Mandatory from '../Mandatory';
|
|
27
|
+
import DropDownStyle from '../DropDownStyle';
|
|
28
|
+
import CheckIcon from '../CheckIcon';
|
|
29
|
+
var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
|
|
30
|
+
var theme = _a.theme;
|
|
31
|
+
return ({
|
|
32
|
+
width: theme.spacing(1.5),
|
|
33
|
+
height: theme.spacing(1.5)
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
var TextContainerStyled = styled(Box)(function (_a) {
|
|
37
|
+
var theme = _a.theme;
|
|
38
|
+
return ({
|
|
39
|
+
display: 'flex',
|
|
40
|
+
justifyContent: 'flex-start',
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
padding: theme.spacing(0, 3, 1, 3)
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
var InputLabelStyled = styled(Text)(function (_a) {
|
|
46
|
+
var theme = _a.theme;
|
|
47
|
+
return ({
|
|
48
|
+
color: theme.palette.text.secondary,
|
|
49
|
+
fontWeight: theme.typography.fontWeightRegular,
|
|
50
|
+
fontSize: theme.spacing(1.375)
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
var DateContainerStyled = styled(Box)(function (_a) {
|
|
54
|
+
var theme = _a.theme;
|
|
55
|
+
return ({
|
|
56
|
+
display: 'flex',
|
|
57
|
+
flexDirection: 'row',
|
|
58
|
+
padding: theme.spacing(0, 3, 0, 3)
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var DayInputStyled = styled(TextFieldSelect)(function () { return ({}); });
|
|
62
|
+
var MonthInputStyled = styled(TextFieldSelect)(function () { return ({}); });
|
|
63
|
+
var YearInputStyled = styled(TextFieldSelect)(function () { return ({}); });
|
|
64
|
+
var DayListStyled = styled((SimpleList))(function () { return ({}); });
|
|
65
|
+
var MonthListStyled = styled((SimpleList))(function () { return ({}); });
|
|
66
|
+
var YearListStyled = styled((SimpleList))(function () { return ({}); });
|
|
67
|
+
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
68
|
+
var theme = _a.theme, isSelected = _a.isSelected;
|
|
69
|
+
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, textAlign: 'center', whiteSpace: 'pre' }));
|
|
70
|
+
});
|
|
71
|
+
var CustomDatePicker = function (_a) {
|
|
72
|
+
var label = _a.label, required = _a.required, isVerified = _a.isVerified, readOnly = _a.readOnly, labelSx = _a.labelSx, defaultValue = _a.defaultValue, onDateChange = _a.onDateChange, maxDate = _a.maxDate;
|
|
73
|
+
var t = useTranslation().t;
|
|
74
|
+
var isAr = useLanguage().isAr;
|
|
75
|
+
var theme = useTheme();
|
|
76
|
+
var _b = useState(null), date = _b[0], setDate = _b[1];
|
|
77
|
+
var _c = React.useState(null), dayAnchorEl = _c[0], setDayAnchorEl = _c[1];
|
|
78
|
+
var _d = React.useState(null), monthAnchorEl = _d[0], setMonthAnchorEl = _d[1];
|
|
79
|
+
var _e = React.useState(null), yearAnchorEl = _e[0], setYearAnchorEl = _e[1];
|
|
80
|
+
var _f = useState(), day = _f[0], setDay = _f[1];
|
|
81
|
+
var _g = useState(), month = _g[0], setMonth = _g[1];
|
|
82
|
+
var _h = useState(), year = _h[0], setYear = _h[1];
|
|
83
|
+
var locale = isAr ? 'ar' : 'en';
|
|
84
|
+
var defaultMax = new Date();
|
|
85
|
+
var defaultMin = new Date('1900-01-01');
|
|
86
|
+
React.useEffect(function () {
|
|
87
|
+
if (defaultValue) {
|
|
88
|
+
var date_1 = momentHijri(defaultValue).locale(locale);
|
|
89
|
+
setDate(defaultValue);
|
|
90
|
+
setDay(date_1.iDate());
|
|
91
|
+
setMonth(date_1.iMonth());
|
|
92
|
+
setYear(date_1.iYear());
|
|
93
|
+
}
|
|
94
|
+
}, []);
|
|
95
|
+
React.useEffect(function () {
|
|
96
|
+
if (day && !getDays.includes(day)) {
|
|
97
|
+
setDay(undefined);
|
|
98
|
+
}
|
|
99
|
+
if (month && !getMonths[month]) {
|
|
100
|
+
setMonth(undefined);
|
|
101
|
+
}
|
|
102
|
+
}, [year, month, isAr]);
|
|
103
|
+
React.useEffect(function () {
|
|
104
|
+
var dateValue = date || new Date();
|
|
105
|
+
var selectedDate = dateValue;
|
|
106
|
+
if (year) {
|
|
107
|
+
selectedDate = momentHijri(selectedDate).locale('en').iYear(year).toDate();
|
|
108
|
+
}
|
|
109
|
+
if (month === null || month === void 0 ? void 0 : month.toString()) {
|
|
110
|
+
selectedDate = momentHijri(selectedDate).locale('en').iMonth(month).toDate();
|
|
111
|
+
}
|
|
112
|
+
if (day) {
|
|
113
|
+
selectedDate = momentHijri(selectedDate).locale('en').iDate(day).toDate();
|
|
114
|
+
}
|
|
115
|
+
setDate(selectedDate);
|
|
116
|
+
if (day && month !== undefined && getMonths[month] && year) {
|
|
117
|
+
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(convertToEnglishDateFormat(selectedDate));
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (defaultValue) {
|
|
121
|
+
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange('');
|
|
122
|
+
}
|
|
123
|
+
}, [day, month, year]);
|
|
124
|
+
var getMonths = React.useMemo(function () {
|
|
125
|
+
var maxDateMoment = momentHijri(maxDate || defaultMax).locale(locale);
|
|
126
|
+
var maxYear = maxDateMoment.iYear();
|
|
127
|
+
var maxMonth = 12;
|
|
128
|
+
if (year && year === maxYear) {
|
|
129
|
+
maxMonth = maxDateMoment.iMonth() + 1;
|
|
130
|
+
}
|
|
131
|
+
var hijriMonths = Array.from({ length: maxMonth }, function (_, index) {
|
|
132
|
+
if (isAr) {
|
|
133
|
+
return hijriArabicMonthNames[index];
|
|
134
|
+
}
|
|
135
|
+
return momentHijri().locale('en').iMonth(index).format('iMMMM');
|
|
136
|
+
});
|
|
137
|
+
return hijriMonths;
|
|
138
|
+
}, [year, isAr]);
|
|
139
|
+
var getDays = React.useMemo(function () {
|
|
140
|
+
var maxDateMoment = momentHijri(maxDate || defaultMax).locale(locale);
|
|
141
|
+
var maxMonth = maxDateMoment.iMonth();
|
|
142
|
+
var maxYear = maxDateMoment.iYear();
|
|
143
|
+
var selectedMonth = month ? month : 0;
|
|
144
|
+
var selectedYear = year ? year : momentHijri().locale(locale).iYear();
|
|
145
|
+
var daysInMonth = parseInt(momentHijri("".concat(selectedYear, "-").concat(selectedMonth + 1), 'iYYYY-iMM')
|
|
146
|
+
.locale('en')
|
|
147
|
+
.endOf('iMonth')
|
|
148
|
+
.format('iDD'));
|
|
149
|
+
if (selectedMonth === maxMonth && selectedYear === maxYear) {
|
|
150
|
+
daysInMonth = maxDateMoment.iDate();
|
|
151
|
+
}
|
|
152
|
+
return Array.from({ length: daysInMonth }, function (_, index) { return index + 1; });
|
|
153
|
+
}, [month, year]);
|
|
154
|
+
var getYears = React.useMemo(function () {
|
|
155
|
+
var m = momentHijri().locale(locale);
|
|
156
|
+
var minYear = m.year(momentHijri(defaultMin).year()).iYear();
|
|
157
|
+
var maxYear = m.year(momentHijri(maxDate || defaultMax).year()).iYear();
|
|
158
|
+
var years = [];
|
|
159
|
+
for (var year_1 = maxYear; year_1 >= minYear; year_1--) {
|
|
160
|
+
years.push(year_1);
|
|
161
|
+
}
|
|
162
|
+
return years;
|
|
163
|
+
}, [locale]);
|
|
164
|
+
var onOpenDayList = function (event) {
|
|
165
|
+
if (readOnly)
|
|
166
|
+
return;
|
|
167
|
+
setDayAnchorEl(event.currentTarget);
|
|
168
|
+
};
|
|
169
|
+
var onCloseDayList = function () {
|
|
170
|
+
setDayAnchorEl(null);
|
|
171
|
+
};
|
|
172
|
+
var onChangeDay = function (day) {
|
|
173
|
+
setDay(day);
|
|
174
|
+
onCloseDayList();
|
|
175
|
+
};
|
|
176
|
+
var getSelectedDayFlag = function (d) {
|
|
177
|
+
return d === day;
|
|
178
|
+
};
|
|
179
|
+
var getDay = function () {
|
|
180
|
+
return day ? day : '';
|
|
181
|
+
};
|
|
182
|
+
var onOpenMonthList = function (event) {
|
|
183
|
+
if (readOnly)
|
|
184
|
+
return;
|
|
185
|
+
setMonthAnchorEl(event.currentTarget);
|
|
186
|
+
};
|
|
187
|
+
var onCloseMonthList = function () {
|
|
188
|
+
setMonthAnchorEl(null);
|
|
189
|
+
};
|
|
190
|
+
var onChangeMonth = function (month) {
|
|
191
|
+
setMonth(getMonths.indexOf(month));
|
|
192
|
+
onCloseMonthList();
|
|
193
|
+
};
|
|
194
|
+
var getSelectedMonthFlag = function (m) {
|
|
195
|
+
return getMonths.indexOf(m) === month;
|
|
196
|
+
};
|
|
197
|
+
var getMonth = function () {
|
|
198
|
+
if ((month === 0 || month) && getMonths[month])
|
|
199
|
+
return getMonths[month];
|
|
200
|
+
return '';
|
|
201
|
+
};
|
|
202
|
+
var onOpenYearList = function (event) {
|
|
203
|
+
if (readOnly)
|
|
204
|
+
return;
|
|
205
|
+
setYearAnchorEl(event.currentTarget);
|
|
206
|
+
};
|
|
207
|
+
var onCloseYearList = function () {
|
|
208
|
+
setYearAnchorEl(null);
|
|
209
|
+
};
|
|
210
|
+
var onChangeYear = function (year) {
|
|
211
|
+
setYear(year);
|
|
212
|
+
onCloseYearList();
|
|
213
|
+
};
|
|
214
|
+
var getSelectedYearFlag = function (y) {
|
|
215
|
+
return y === year;
|
|
216
|
+
};
|
|
217
|
+
var getYear = function () {
|
|
218
|
+
return year ? year : '';
|
|
219
|
+
};
|
|
220
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TextContainerStyled, __assign({ sx: labelSx }, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {}), isVerified && (_jsx(CheckIcon, { sx: { marginInlineStart: theme.spacing(1), width: theme.spacing(2.5), height: theme.spacing(2.5) }, isVerified: isVerified }))] })), _jsxs(DateContainerStyled, { children: [_jsx(DayInputStyled, { label: t('day'), boxSx: { padding: 0, width: '25%', marginInlineEnd: theme.spacing(1) }, InputProps: {
|
|
221
|
+
endAdornment: !readOnly && _jsx(ExpandIconStyled, { anchorEl: !!dayAnchorEl })
|
|
222
|
+
}, inputProps: {
|
|
223
|
+
readOnly: readOnly
|
|
224
|
+
}, value: getDay(), onClick: !!dayAnchorEl ? function () { return onCloseDayList(); } : onOpenDayList }), _jsx(DropDownStyle, __assign({ anchorOrigin: {
|
|
225
|
+
vertical: 'bottom',
|
|
226
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
227
|
+
}, transformOrigin: {
|
|
228
|
+
vertical: 'top',
|
|
229
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
230
|
+
}, sx: { marginLeft: 0, marginRight: 0, width: theme.spacing(10.625) }, isPopupMode: true, anchorEl: dayAnchorEl, onClosePopup: onCloseDayList }, { children: _jsx(DayListStyled, { list: getDays, onSelectItem: onChangeDay, renderItem: function (day) {
|
|
231
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: getSelectedDayFlag(day) }, { children: day })) })), getSelectedDayFlag(day) && _jsx(CheckIcon, { sx: { paddingInlineStart: theme.spacing(1.25) } })] }));
|
|
232
|
+
} }) })), _jsx(MonthInputStyled, { label: t('month'), boxSx: { padding: 0, width: '47%', marginInlineEnd: theme.spacing(1) }, InputProps: {
|
|
233
|
+
endAdornment: !readOnly && _jsx(ExpandIconStyled, { anchorEl: !!monthAnchorEl })
|
|
234
|
+
}, inputProps: {
|
|
235
|
+
readOnly: readOnly
|
|
236
|
+
}, value: getMonth(), onClick: !!monthAnchorEl ? function () { return onCloseMonthList(); } : onOpenMonthList }), _jsx(DropDownStyle, __assign({ anchorOrigin: {
|
|
237
|
+
vertical: 'bottom',
|
|
238
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
239
|
+
}, transformOrigin: {
|
|
240
|
+
vertical: 'top',
|
|
241
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
242
|
+
}, sx: { marginLeft: 0, marginRight: 0, width: theme.spacing(19.375) }, isPopupMode: true, anchorEl: monthAnchorEl, onClosePopup: onCloseMonthList }, { children: _jsx(MonthListStyled, { list: getMonths, onSelectItem: onChangeMonth, renderItem: function (month) {
|
|
243
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: getSelectedMonthFlag(month) }, { children: month })) })), getSelectedMonthFlag(month) && _jsx(CheckIcon, { sx: { paddingInlineStart: theme.spacing(1.25) } })] }));
|
|
244
|
+
} }) })), _jsx(YearInputStyled, { label: t('year'), boxSx: { padding: 0, width: '28%' }, InputProps: {
|
|
245
|
+
endAdornment: !readOnly && _jsx(ExpandIconStyled, { anchorEl: !!yearAnchorEl })
|
|
246
|
+
}, inputProps: {
|
|
247
|
+
readOnly: readOnly
|
|
248
|
+
}, value: getYear(), onClick: !!yearAnchorEl ? function () { return onCloseYearList(); } : onOpenYearList }), _jsx(DropDownStyle, __assign({ anchorOrigin: {
|
|
249
|
+
vertical: 'bottom',
|
|
250
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
251
|
+
}, transformOrigin: {
|
|
252
|
+
vertical: 'top',
|
|
253
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
254
|
+
}, sx: { marginLeft: 0, marginRight: 0, width: theme.spacing(11.25) }, isPopupMode: true, anchorEl: yearAnchorEl, onClosePopup: onCloseYearList }, { children: _jsx(YearListStyled, { list: getYears, onSelectItem: onChangeYear, renderItem: function (year) {
|
|
255
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: getSelectedYearFlag(year) }, { children: year })) })), getSelectedYearFlag(year) && _jsx(CheckIcon, { sx: { paddingInlineStart: theme.spacing(1.25) } })] }));
|
|
256
|
+
} }) }))] })] }));
|
|
257
|
+
};
|
|
258
|
+
export default memo(CustomDatePicker);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
export declare const NameContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<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?: SxProps<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<Theme> & {
|
|
16
|
+
isSelected: boolean;
|
|
17
|
+
}, {}, {}>;
|
|
18
|
+
export declare type CustomDatePickerProps = {
|
|
19
|
+
label: string;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
isVerified?: boolean;
|
|
22
|
+
readOnly?: boolean;
|
|
23
|
+
labelSx?: SxProps<Theme>;
|
|
24
|
+
defaultValue?: Date;
|
|
25
|
+
onDateChange?: (date: string) => void;
|
|
26
|
+
maxDate?: Date;
|
|
27
|
+
};
|
|
28
|
+
declare const _default: React.MemoExoticComponent<({ label, required, isVerified, readOnly, labelSx, defaultValue, onDateChange, maxDate }: CustomDatePickerProps) => JSX.Element>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,229 @@
|
|
|
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, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
+
import React, { memo, useEffect, useState } from 'react';
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
|
+
import moment from 'moment';
|
|
16
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
17
|
+
import Box from '@mui/material/Box';
|
|
18
|
+
import { useAppDispatch, useAppSelector } from '../../../hooks';
|
|
19
|
+
import { handleSwitchCalender, settingsSelector } from '../../../app/settings';
|
|
20
|
+
import Text from '../../../components/Text';
|
|
21
|
+
import SimpleList from '../../../components/SimpleList';
|
|
22
|
+
import { ThemeMode } from '../../../@types';
|
|
23
|
+
import TextFieldSelect from '../TextFieldSelect';
|
|
24
|
+
import Mandatory from '../Mandatory';
|
|
25
|
+
import { EndAdornmentExpanded } from '../EndAdornment';
|
|
26
|
+
import DropDownStyle from '../DropDownStyle';
|
|
27
|
+
import CheckIcon from '../CheckIcon';
|
|
28
|
+
var TextContainerStyled = styled(Box)(function (_a) {
|
|
29
|
+
var theme = _a.theme;
|
|
30
|
+
return ({
|
|
31
|
+
display: 'flex',
|
|
32
|
+
justifyContent: 'flex-start',
|
|
33
|
+
padding: theme.spacing(0, 3, 0.5, 3)
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
var InputLabelStyled = styled(Text)(function (_a) {
|
|
37
|
+
var theme = _a.theme;
|
|
38
|
+
return ({
|
|
39
|
+
color: theme.palette.text.secondary,
|
|
40
|
+
fontWeight: theme.typography.fontWeightRegular,
|
|
41
|
+
fontSize: theme.spacing(1.375)
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
var SwitchLabelStyled = styled(Text)(function (_a) {
|
|
45
|
+
var theme = _a.theme;
|
|
46
|
+
return (__assign(__assign({ color: theme.palette.primary.main, fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { cursor: 'pointer' }));
|
|
47
|
+
});
|
|
48
|
+
var DateContainerStyled = styled(Box)(function (_a) {
|
|
49
|
+
var theme = _a.theme;
|
|
50
|
+
return ({
|
|
51
|
+
display: 'flex',
|
|
52
|
+
flexDirection: 'row',
|
|
53
|
+
padding: theme.spacing(0, 3, 0, 3)
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
var DayInputStyled = styled(TextFieldSelect)(function () { return ({}); });
|
|
57
|
+
var MonthInputStyled = styled(TextFieldSelect)(function () { return ({}); });
|
|
58
|
+
var YearInputStyled = styled(TextFieldSelect)(function () { return ({}); });
|
|
59
|
+
var DayListStyled = styled((SimpleList))(function () { return ({}); });
|
|
60
|
+
var MonthListStyled = styled((SimpleList))(function () { return ({}); });
|
|
61
|
+
var YearListStyled = styled((SimpleList))(function () { return ({}); });
|
|
62
|
+
export var NameContainer = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
63
|
+
var theme = _a.theme, isSelected = _a.isSelected;
|
|
64
|
+
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, textAlign: 'center' }));
|
|
65
|
+
});
|
|
66
|
+
var CustomDatePicker = function (_a) {
|
|
67
|
+
var label = _a.label, required = _a.required, isVerified = _a.isVerified, readOnly = _a.readOnly, labelSx = _a.labelSx, defaultValue = _a.defaultValue, onDateChange = _a.onDateChange, maxDate = _a.maxDate;
|
|
68
|
+
var t = useTranslation().t;
|
|
69
|
+
var theme = useTheme();
|
|
70
|
+
var _b = useState(null), date = _b[0], setDate = _b[1];
|
|
71
|
+
var _c = React.useState(null), dayAnchorEl = _c[0], setDayAnchorEl = _c[1];
|
|
72
|
+
var _d = React.useState(null), monthAnchorEl = _d[0], setMonthAnchorEl = _d[1];
|
|
73
|
+
var _e = React.useState(null), yearAnchorEl = _e[0], setYearAnchorEl = _e[1];
|
|
74
|
+
var _f = useState(), day = _f[0], setDay = _f[1];
|
|
75
|
+
var _g = useState(), month = _g[0], setMonth = _g[1];
|
|
76
|
+
var _h = useState(), year = _h[0], setYear = _h[1];
|
|
77
|
+
var data = useAppSelector(settingsSelector).data;
|
|
78
|
+
var dispatch = useAppDispatch();
|
|
79
|
+
var isHijriCalender = data.isHijri;
|
|
80
|
+
var defaultMax = new Date();
|
|
81
|
+
var defaultMin = new Date('1900-01-01');
|
|
82
|
+
useEffect(function () {
|
|
83
|
+
setDate(new Date());
|
|
84
|
+
if (defaultValue) {
|
|
85
|
+
setDate(defaultValue);
|
|
86
|
+
setDay(parseInt(moment(defaultValue).format('DD')));
|
|
87
|
+
setMonth(moment(date).format('MMMM'));
|
|
88
|
+
setYear(parseInt(moment(defaultValue).format('YYYY')));
|
|
89
|
+
}
|
|
90
|
+
}, []);
|
|
91
|
+
var onSwitchCalender = function () {
|
|
92
|
+
dispatch(handleSwitchCalender(!isHijriCalender));
|
|
93
|
+
};
|
|
94
|
+
React.useEffect(function () {
|
|
95
|
+
if (date) {
|
|
96
|
+
var selectedDate = date;
|
|
97
|
+
checkSelectedDayValidity();
|
|
98
|
+
if (year) {
|
|
99
|
+
selectedDate = moment(selectedDate)
|
|
100
|
+
.set('year', +year)
|
|
101
|
+
.toDate();
|
|
102
|
+
}
|
|
103
|
+
if (month) {
|
|
104
|
+
selectedDate = moment(date).month(getMonths.indexOf(month)).toDate();
|
|
105
|
+
}
|
|
106
|
+
if (day) {
|
|
107
|
+
selectedDate = moment(selectedDate)
|
|
108
|
+
.set('date', +day)
|
|
109
|
+
.toDate();
|
|
110
|
+
}
|
|
111
|
+
setDate(selectedDate);
|
|
112
|
+
if (day && month && year) {
|
|
113
|
+
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange(selectedDate.toLocaleDateString('en-CA'));
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange('');
|
|
117
|
+
}
|
|
118
|
+
}, [day, month, year]);
|
|
119
|
+
var getMonths = React.useMemo(function () {
|
|
120
|
+
return moment.months();
|
|
121
|
+
}, []);
|
|
122
|
+
var getDays = React.useMemo(function () {
|
|
123
|
+
var selectedMonth = month ? getMonths.indexOf(month) : 0;
|
|
124
|
+
var selectedYear = year ? year : moment().year();
|
|
125
|
+
var daysInMonth = moment("".concat(selectedYear, "-").concat(selectedMonth + 1), 'YYYY-MM').daysInMonth();
|
|
126
|
+
return Array.from({ length: daysInMonth }, function (_, index) { return index + 1; });
|
|
127
|
+
}, [month, year]);
|
|
128
|
+
var getYears = React.useMemo(function () {
|
|
129
|
+
var minYear = moment().year(moment(defaultMin).year()).year();
|
|
130
|
+
var maxYear = moment()
|
|
131
|
+
.year(moment(maxDate || defaultMax).year())
|
|
132
|
+
.year();
|
|
133
|
+
var years = [];
|
|
134
|
+
for (var year_1 = maxYear; year_1 >= minYear; year_1--) {
|
|
135
|
+
years.push(year_1);
|
|
136
|
+
}
|
|
137
|
+
return years;
|
|
138
|
+
}, []);
|
|
139
|
+
var checkSelectedDayValidity = function () {
|
|
140
|
+
if (day) {
|
|
141
|
+
if (!getDays.includes(day)) {
|
|
142
|
+
setDay(undefined);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
var onOpenDayList = function (event) {
|
|
147
|
+
if (readOnly)
|
|
148
|
+
return;
|
|
149
|
+
setDayAnchorEl(event.currentTarget);
|
|
150
|
+
};
|
|
151
|
+
var onCloseDayList = function () {
|
|
152
|
+
setDayAnchorEl(null);
|
|
153
|
+
};
|
|
154
|
+
var onChangeDay = function (day) {
|
|
155
|
+
setDay(day);
|
|
156
|
+
onCloseDayList();
|
|
157
|
+
};
|
|
158
|
+
var getSelectedDayFlag = function (d) {
|
|
159
|
+
return d === day;
|
|
160
|
+
};
|
|
161
|
+
var onOpenMonthList = function (event) {
|
|
162
|
+
if (readOnly)
|
|
163
|
+
return;
|
|
164
|
+
setMonthAnchorEl(event.currentTarget);
|
|
165
|
+
};
|
|
166
|
+
var onCloseMonthList = function () {
|
|
167
|
+
setMonthAnchorEl(null);
|
|
168
|
+
};
|
|
169
|
+
var onChangeMonth = function (month) {
|
|
170
|
+
setMonth(month);
|
|
171
|
+
onCloseMonthList();
|
|
172
|
+
};
|
|
173
|
+
var getSelectedMonthFlag = function (m) {
|
|
174
|
+
return m === month;
|
|
175
|
+
};
|
|
176
|
+
var onOpenYearList = function (event) {
|
|
177
|
+
if (readOnly)
|
|
178
|
+
return;
|
|
179
|
+
setYearAnchorEl(event.currentTarget);
|
|
180
|
+
};
|
|
181
|
+
var onCloseYearList = function () {
|
|
182
|
+
setYearAnchorEl(null);
|
|
183
|
+
};
|
|
184
|
+
var onChangeYear = function (year) {
|
|
185
|
+
setYear(year);
|
|
186
|
+
onCloseYearList();
|
|
187
|
+
};
|
|
188
|
+
var getSelectedYearFlag = function (y) {
|
|
189
|
+
return y === year;
|
|
190
|
+
};
|
|
191
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TextContainerStyled, __assign({ sx: labelSx }, { children: [_jsx(InputLabelStyled, { children: label }), required && _jsx(Mandatory, {})] })), _jsxs(DateContainerStyled, { children: [_jsx(DayInputStyled, { label: t('day'), boxSx: { padding: 0, width: '25%', marginInlineEnd: theme.spacing(1) }, InputProps: {
|
|
192
|
+
endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isVerified, anchorEl: dayAnchorEl })
|
|
193
|
+
}, inputProps: {
|
|
194
|
+
readOnly: readOnly
|
|
195
|
+
}, value: day ? day : '', onClick: !!dayAnchorEl ? function () { return onCloseDayList(); } : onOpenDayList }), _jsx(DropDownStyle, __assign({ anchorOrigin: {
|
|
196
|
+
vertical: 'bottom',
|
|
197
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
198
|
+
}, transformOrigin: {
|
|
199
|
+
vertical: 'top',
|
|
200
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
201
|
+
}, sx: { marginLeft: 0, marginRight: 0, width: theme.spacing(10.625) }, isPopupMode: true, anchorEl: dayAnchorEl, onClosePopup: onCloseDayList }, { children: _jsx(DayListStyled, { list: getDays, onSelectItem: onChangeDay, renderItem: function (day) {
|
|
202
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: getSelectedDayFlag(day) }, { children: day })) })), getSelectedDayFlag(day) && _jsx(CheckIcon, { sx: { paddingInlineStart: theme.spacing(1.25) } })] }));
|
|
203
|
+
} }) })), _jsx(MonthInputStyled, { label: t('month'), boxSx: { padding: 0, width: '47%', marginInlineEnd: theme.spacing(1) }, InputProps: {
|
|
204
|
+
endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isVerified, anchorEl: monthAnchorEl })
|
|
205
|
+
}, inputProps: {
|
|
206
|
+
readOnly: readOnly
|
|
207
|
+
}, value: month ? month : '', onClick: !!monthAnchorEl ? function () { return onCloseMonthList(); } : onOpenMonthList }), _jsx(DropDownStyle, __assign({ anchorOrigin: {
|
|
208
|
+
vertical: 'bottom',
|
|
209
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
210
|
+
}, transformOrigin: {
|
|
211
|
+
vertical: 'top',
|
|
212
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
213
|
+
}, sx: { marginLeft: 0, marginRight: 0, width: theme.spacing(19.375) }, isPopupMode: true, anchorEl: monthAnchorEl, onClosePopup: onCloseMonthList }, { children: _jsx(MonthListStyled, { list: getMonths, onSelectItem: onChangeMonth, renderItem: function (month) {
|
|
214
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: getSelectedMonthFlag(month) }, { children: month })) })), getSelectedMonthFlag(month) && _jsx(CheckIcon, { sx: { paddingInlineStart: theme.spacing(1.25) } })] }));
|
|
215
|
+
} }) })), _jsx(YearInputStyled, { label: t('year'), boxSx: { padding: 0, width: '28%' }, InputProps: {
|
|
216
|
+
endAdornment: _jsx(EndAdornmentExpanded, { isVerified: isVerified, anchorEl: yearAnchorEl })
|
|
217
|
+
}, inputProps: {
|
|
218
|
+
readOnly: readOnly
|
|
219
|
+
}, value: year ? year : '', onClick: !!yearAnchorEl ? function () { return onCloseYearList(); } : onOpenYearList }), _jsx(DropDownStyle, __assign({ anchorOrigin: {
|
|
220
|
+
vertical: 'bottom',
|
|
221
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
222
|
+
}, transformOrigin: {
|
|
223
|
+
vertical: 'top',
|
|
224
|
+
horizontal: theme.direction === 'rtl' ? 'left' : 'right'
|
|
225
|
+
}, sx: { marginLeft: 0, marginRight: 0, width: theme.spacing(11.25) }, isPopupMode: true, anchorEl: yearAnchorEl, onClosePopup: onCloseYearList }, { children: _jsx(YearListStyled, { list: getYears, onSelectItem: onChangeYear, renderItem: function (year) {
|
|
226
|
+
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(NameContainer, __assign({ isSelected: getSelectedYearFlag(year) }, { children: year })) })), getSelectedYearFlag(year) && _jsx(CheckIcon, { sx: { paddingInlineStart: theme.spacing(1.25) } })] }));
|
|
227
|
+
} }) }))] }), _jsx(TextContainerStyled, __assign({ sx: { pt: 1.25, pb: 0 } }, { children: _jsx(SwitchLabelStyled, __assign({ onClick: onSwitchCalender }, { children: !isHijriCalender ? t('switch_to_islamic_calendar') : t('switch_to_gregorian_calendar') })) }))] }));
|
|
228
|
+
};
|
|
229
|
+
export default memo(CustomDatePicker);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
-
|
|
3
|
+
interface CustomCheckIconProps {
|
|
4
4
|
isVerified?: boolean;
|
|
5
5
|
sx?: SxProps<Theme>;
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
7
|
export default function CustomCheckIcon({ isVerified, sx }: CustomCheckIconProps): JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import Icon from '../../../components/Icon';
|
|
4
|
+
import { ICONS_NAMES } from '../../../constants';
|
|
5
|
+
var CheckIconStyled = styled(Icon)(function (_a) {
|
|
6
|
+
var theme = _a.theme;
|
|
6
7
|
return ({
|
|
7
8
|
display: 'flex',
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
width: theme.spacing(3),
|
|
10
|
+
height: theme.spacing(3),
|
|
11
|
+
alignItems: 'flex-end'
|
|
10
12
|
});
|
|
11
13
|
});
|
|
12
14
|
export default function CustomCheckIcon(_a) {
|
|
13
15
|
var _b = _a.isVerified, isVerified = _b === void 0 ? false : _b, sx = _a.sx;
|
|
14
|
-
return _jsx(CheckIconStyled, { isVerified:
|
|
16
|
+
return _jsx(CheckIconStyled, { sx: sx, src: isVerified ? ICONS_NAMES.tick_green : ICONS_NAMES.tick_grey, alt: 'check-icon' });
|
|
15
17
|
}
|
|
@@ -12,9 +12,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { styled } from '@mui/material/styles';
|
|
14
14
|
import Chip from '@mui/material/Chip';
|
|
15
|
+
import { ThemeMode } from '../../../@types';
|
|
15
16
|
var ChipStyled = styled(Chip)(function (_a) {
|
|
16
17
|
var theme = _a.theme;
|
|
17
|
-
return (__assign(__assign({ borderRadius: theme.spacing(
|
|
18
|
+
return (__assign(__assign({ borderRadius: theme.spacing(0.75), padding: theme.spacing(0.25, 0.5, 0.25, 0.5), background: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.black : theme.palette.common.white }, theme.typography.caption), { color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.success.dark, fontWeight: theme.typography.fontWeightRegular, boxShadow: theme.shadows[2], height: theme.spacing(3.75) }));
|
|
18
19
|
});
|
|
19
20
|
export default function CustomChip(props) {
|
|
20
21
|
return _jsx(ChipStyled, __assign({}, props));
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { Theme, SxProps } from '@mui/material/styles';
|
|
2
3
|
interface CustomClearIconProps {
|
|
3
4
|
onClick: () => void;
|
|
5
|
+
sx?: SxProps<Theme>;
|
|
4
6
|
}
|
|
5
7
|
export default function CustomClearIcon(props: CustomClearIconProps): JSX.Element;
|
|
6
8
|
export {};
|
|
@@ -12,13 +12,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { styled, alpha } from '@mui/material/styles';
|
|
14
14
|
import ClearIcon from '@mui/icons-material/Clear';
|
|
15
|
+
import { ThemeMode } from '../../../@types';
|
|
15
16
|
var ClearIconStyled = styled(ClearIcon)(function (_a) {
|
|
16
17
|
var theme = _a.theme;
|
|
17
18
|
return ({
|
|
18
19
|
width: theme.spacing(2),
|
|
19
20
|
height: theme.spacing(2),
|
|
20
21
|
cursor: 'pointer',
|
|
21
|
-
color: alpha(theme.palette.text.primary, 0.4)
|
|
22
|
+
color: theme.palette.mode === ThemeMode.DARK ? alpha(theme.palette.common.white, 0.5) : alpha(theme.palette.text.primary, 0.4)
|
|
22
23
|
});
|
|
23
24
|
});
|
|
24
25
|
export default function CustomClearIcon(props) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BoxProps } from '@mui/material/Box';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
4
|
+
import { HeaderProps } from '../Header';
|
|
5
|
+
declare type ContainerWithHeaderProps = BoxProps & HeaderProps & {
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
titleBoxSx?: SxProps<Theme>;
|
|
9
|
+
};
|
|
10
|
+
declare const ContainerWithHeader: React.ForwardRefExoticComponent<Pick<ContainerWithHeaderProps, keyof import("@mui/material/OverridableComponent").CommonProps | "translate" | ("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") | "slot" | "title" | "children" | "component" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "description" | "titleBoxSx" | keyof HeaderProps> & React.RefAttributes<unknown>>;
|
|
11
|
+
export default ContainerWithHeader;
|