@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
|
@@ -32,7 +32,7 @@ var Password = memo(function (props) {
|
|
|
32
32
|
useAppConfig(__assign({ navigation: PASSWORD_SCREENS_NAVIGATION }, props));
|
|
33
33
|
useErrorListener(passwordError || error);
|
|
34
34
|
useStepStartedListener();
|
|
35
|
-
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open,
|
|
35
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, isMaturityExpress = data.isMaturityExpress;
|
|
36
36
|
var verifyToken = function () {
|
|
37
37
|
var token = getParameterByName('token');
|
|
38
38
|
var lang = getParameterByName('lang');
|
|
@@ -56,11 +56,11 @@ var Password = memo(function (props) {
|
|
|
56
56
|
if (!settingLoading && open)
|
|
57
57
|
verifyToken();
|
|
58
58
|
}, [settingLoading]);
|
|
59
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name,
|
|
59
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading || customLoading }, { children: _jsx(AnimationFlow, __assign({ countries: data.tapCountries, pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, loading: settingLoading || customLoading, error: error, open: open, breakpoint: 'sm', screenId: activeScreen.name, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, { children: passwordFeatureScreens.map(function (_a, index) {
|
|
60
60
|
var Element = _a.element, name = _a.name;
|
|
61
61
|
var isActive = activeScreen.name === name;
|
|
62
62
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
63
|
-
}) })
|
|
63
|
+
}) }) })) })) })));
|
|
64
64
|
});
|
|
65
65
|
export function PasswordElement(props) {
|
|
66
66
|
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Password, __assign({}, props)) })));
|
|
@@ -12,11 +12,12 @@ 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 Text from '../../../../components/Text';
|
|
15
|
+
import { ThemeMode } from '../../../../@types';
|
|
15
16
|
var TextStyled = styled(Text, {
|
|
16
17
|
shouldForwardProp: function (prop) { return prop !== 'active' && prop !== 'text'; }
|
|
17
18
|
})(function (_a) {
|
|
18
19
|
var theme = _a.theme, active = _a.active;
|
|
19
|
-
return (__assign(__assign({}, theme.typography.
|
|
20
|
+
return (__assign(__assign({}, theme.typography.caption), { fontWeight: active ? theme.typography.fontWeightMedium : theme.typography.fontWeightRegular, lineHeight: 1.5, color: active ? (theme.palette.mode === ThemeMode.DARK ? theme.palette.secondary.main : theme.palette.text.primary) : theme.palette.text.secondary }));
|
|
20
21
|
});
|
|
21
22
|
export default function ConditionText(props) {
|
|
22
23
|
return _jsx(TextStyled, __assign({}, props, { children: props.text }));
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import * as React from 'react';
|
|
3
14
|
import { useTranslation } from 'react-i18next';
|
|
4
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
5
16
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
6
17
|
import PasswordIcon from '../../../shared/PasswordIcon';
|
|
7
|
-
import Input from '../../../shared/
|
|
18
|
+
import Input from '../../../shared/TextField';
|
|
8
19
|
var ConfirmPassword = function (_a) {
|
|
9
20
|
var _b;
|
|
10
21
|
var showPassword = _a.showPassword, onShowPassword = _a.onShowPassword, onHidePassword = _a.onHidePassword;
|
|
@@ -17,6 +28,8 @@ var ConfirmPassword = function (_a) {
|
|
|
17
28
|
};
|
|
18
29
|
var passwordValue = passwordControl.field.value;
|
|
19
30
|
var error = (_b = passwordControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
20
|
-
return (_jsx(ScreenContainer, {
|
|
31
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mt: 3 } }, { children: _jsx(Input, { onChange: handlePasswordChange, value: passwordValue, InputProps: {
|
|
32
|
+
endAdornment: _jsx(PasswordIcon, { show: showPassword, onShow: onShowPassword, onHide: onHidePassword })
|
|
33
|
+
}, autoComplete: 'confirm-password', placeholder: t('tap_js_confirm_password_description'), label: t('tap_js_confirm_password_description'), type: showPassword ? 'text' : 'password', helperText: error && t(error) }) })));
|
|
21
34
|
};
|
|
22
35
|
export default React.memo(ConfirmPassword);
|
|
@@ -21,7 +21,7 @@ import { handleCurrentActiveScreen, handleNextScreenStep } from '../../../../app
|
|
|
21
21
|
import Form from '../../../../components/Form';
|
|
22
22
|
import { useLanguage } from '../../../../hooks';
|
|
23
23
|
import { PASSWORD_OPERATION_TYPE } from '../../../../constants';
|
|
24
|
-
import
|
|
24
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
25
25
|
import Button from '../../../shared/Button';
|
|
26
26
|
import { PasswordValidation } from './validation';
|
|
27
27
|
import Password from './Password';
|
|
@@ -31,7 +31,7 @@ import { deepCopy } from '../../../../utils';
|
|
|
31
31
|
var InputsContainerStyled = styled(Box)(function (_a) {
|
|
32
32
|
var theme = _a.theme;
|
|
33
33
|
return ({
|
|
34
|
-
paddingBottom: theme.spacing(
|
|
34
|
+
paddingBottom: theme.spacing(2)
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
var CreatePassword = function (_a) {
|
|
@@ -62,6 +62,6 @@ var CreatePassword = function (_a) {
|
|
|
62
62
|
var onBack = function () {
|
|
63
63
|
dispatch(handleCurrentActiveScreen('PASSWORD_SUCCESS_FOUR_FLOWS_BUTTONS_STEP'));
|
|
64
64
|
};
|
|
65
|
-
return (_jsx(
|
|
65
|
+
return (_jsx(ContainerWithHeader, __assign({ onBack: (flows === null || flows === void 0 ? void 0 : flows.length) ? function () { return onBack(); } : undefined, title: 'password_info_title', description: 'password_info_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(Password, {}) }), _jsx(Button, __assign({ disableBack: true, isAr: isAr, disabled: !methods.formState.isValid, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) })));
|
|
66
66
|
};
|
|
67
67
|
export default React.memo(CreatePassword);
|
|
@@ -15,29 +15,35 @@ import { useTranslation } from 'react-i18next';
|
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
16
|
import { styled } from '@mui/material/styles';
|
|
17
17
|
import Box from '@mui/material/Box';
|
|
18
|
+
import List from '@mui/material/List';
|
|
18
19
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
19
|
-
import Input from '../../../shared/
|
|
20
|
+
import Input from '../../../shared/TextField';
|
|
20
21
|
import PasswordIcon from '../../../shared/PasswordIcon';
|
|
21
22
|
import { PasswordMatchLength, isPasswordHasUpperLetter, isPasswordHasLowerLetter, isPasswordHasSpecialLetter } from '../../../../utils';
|
|
22
23
|
import Collapse from '../../../../components/Collapse';
|
|
23
24
|
import Text from '../../../../components/Text';
|
|
24
|
-
import
|
|
25
|
+
import { ThemeMode } from '../../../../@types';
|
|
25
26
|
import PasswordBar from './PasswordBar';
|
|
26
27
|
import ConditionText from './ConditionText';
|
|
27
28
|
import ConfirmPassword from './ConfirmPassword';
|
|
28
|
-
var BarBoxStyled = styled(Box)(function () {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
var BarBoxStyled = styled(Box)(function (_a) {
|
|
30
|
+
var theme = _a.theme;
|
|
31
|
+
return ({
|
|
32
|
+
display: 'flex',
|
|
33
|
+
justifyContent: 'center',
|
|
34
|
+
marginInline: theme.spacing(3)
|
|
35
|
+
});
|
|
36
|
+
});
|
|
32
37
|
var ListStyled = styled(List)(function (_a) {
|
|
33
38
|
var theme = _a.theme;
|
|
34
39
|
return ({
|
|
35
|
-
marginInlineStart: theme.spacing(
|
|
40
|
+
marginInlineStart: theme.spacing(3),
|
|
41
|
+
paddingTop: theme.spacing(1.5)
|
|
36
42
|
});
|
|
37
43
|
});
|
|
38
44
|
var TextStyled = styled(Text)(function (_a) {
|
|
39
45
|
var theme = _a.theme;
|
|
40
|
-
return (__assign(__assign({
|
|
46
|
+
return (__assign(__assign({ marginTop: theme.spacing(1.5) }, theme.typography.caption), { color: theme.palette.mode === ThemeMode.DARK ? theme.palette.secondary.main : theme.palette.text.secondary, paddingInline: theme.spacing(3) }));
|
|
41
47
|
});
|
|
42
48
|
var Password = function (_a) {
|
|
43
49
|
var _b;
|
|
@@ -71,6 +77,8 @@ var Password = function (_a) {
|
|
|
71
77
|
isPasswordHasSpecialLetter(passwordValue)
|
|
72
78
|
];
|
|
73
79
|
var error = (_b = passwordControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
74
|
-
return (_jsxs(ScreenContainer, { children: [_jsx(Input, { label: t('tap_js_password_description'), onChange: handlePasswordChange, value: passwordValue, autoComplete: 'new-password',
|
|
80
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(Input, { label: t('tap_js_password_description'), onChange: handlePasswordChange, value: passwordValue, autoComplete: 'new-password', InputProps: {
|
|
81
|
+
endAdornment: _jsx(PasswordIcon, { show: showPassword, onShow: handleShowPassword, onHide: handleHidePassword })
|
|
82
|
+
}, placeholder: t('tap_js_password_placeholder'), type: showPassword ? 'text' : 'password', helperText: error && t(error) }), _jsxs(BarBoxStyled, { children: [_jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 1 }), _jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 2 }), _jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 3 }), _jsx(PasswordBar, { active: passwordConditions.filter(Boolean).length >= 4, sx: { marginInlineEnd: 0 } })] }), _jsx(Collapse, __assign({ in: !(passwordConditions.filter(Boolean).length >= 4), timeout: { enter: 1000, exit: 800 } }, { children: _jsxs(ListStyled, { children: [_jsx(ConditionText, { active: isPasswordMatchLength, text: '- ' + t('password_length') }), _jsx(ConditionText, { active: isPasswordHasUpper, text: '- ' + t('password_upper') }), _jsx(ConditionText, { active: isPasswordHasLower, text: '- ' + t('password_lower') }), _jsx(ConditionText, { active: isPasswordHasSpecial, text: '- ' + t('password_special') })] }) })), _jsxs(Collapse, __assign({ in: passwordConditions.filter(Boolean).length === 4, timeout: { enter: 800, exit: 1000 } }, { children: [_jsx(TextStyled, { children: t('notify_strong_password') }), _jsx(ConfirmPassword, { showPassword: showPassword, onShowPassword: handleShowPassword, onHidePassword: handleHidePassword })] }))] }));
|
|
75
83
|
};
|
|
76
84
|
export default React.memo(Password);
|
|
@@ -10,18 +10,18 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { styled } from '@mui/material/styles';
|
|
13
|
+
import { alpha, styled } from '@mui/material/styles';
|
|
14
14
|
import Divider from '@mui/material/Divider';
|
|
15
15
|
var DividerStyled = styled(Divider, { shouldForwardProp: function (prop) { return prop !== 'active'; } })(function (_a) {
|
|
16
16
|
var theme = _a.theme, active = _a.active;
|
|
17
17
|
return ({
|
|
18
18
|
maxWidth: theme.spacing(10.375),
|
|
19
|
-
height: theme.spacing(0.
|
|
20
|
-
marginTop: theme.spacing(
|
|
19
|
+
height: theme.spacing(0.25),
|
|
20
|
+
marginTop: theme.spacing(1.5),
|
|
21
21
|
marginInlineEnd: theme.spacing(0.625),
|
|
22
22
|
flex: 1,
|
|
23
23
|
border: 'none',
|
|
24
|
-
background: active ? theme.palette.success.
|
|
24
|
+
background: active ? theme.palette.success.main : alpha(theme.palette.text.secondary, 0.5)
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
27
|
export default function PasswordBar(props) {
|
|
@@ -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 { useAppDispatch, useAppSelector, useSetFromDefaultValues } from '../../../../hooks';
|
|
@@ -32,7 +21,7 @@ import { handlePrevScreenStep } from '../../../../app/settings';
|
|
|
32
21
|
import { useLanguage } from '../../../../hooks';
|
|
33
22
|
import Form from '../../../../components/Form';
|
|
34
23
|
import Text from '../../../../components/Text';
|
|
35
|
-
import {
|
|
24
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
36
25
|
import { passwordSelector, clearError, resetOTPScreen, resetPassword } from '../../../app/password/passwordStore';
|
|
37
26
|
import Button from '../../../shared/Button';
|
|
38
27
|
import { deepCopy, maskPhone } from '../../../../utils';
|
|
@@ -41,17 +30,14 @@ import OTPInput from './OTPInput';
|
|
|
41
30
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
42
31
|
var theme = _a.theme;
|
|
43
32
|
return ({
|
|
44
|
-
background: theme.palette.common.white,
|
|
45
|
-
border: '1px solid',
|
|
46
|
-
borderColor: theme.palette.divider,
|
|
47
33
|
direction: theme.direction,
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
paddingInline: theme.spacing(3),
|
|
35
|
+
paddingBottom: theme.spacing(5)
|
|
50
36
|
});
|
|
51
37
|
});
|
|
52
38
|
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
53
39
|
var theme = _a.theme;
|
|
54
|
-
return (__assign(__assign({}, theme.typography.
|
|
40
|
+
return (__assign(__assign({}, theme.typography.body2), { color: theme.palette.secondary.main, fontWeight: theme.typography.fontWeightRegular, lineHeight: '19px', whiteSpace: 'pre-line' }));
|
|
55
41
|
});
|
|
56
42
|
var FormStyled = styled(Form)(function () { return ({
|
|
57
43
|
display: 'flex',
|
|
@@ -61,13 +47,15 @@ var OTP = function (_a) {
|
|
|
61
47
|
var _b, _c;
|
|
62
48
|
var _d = useAppSelector(passwordSelector), data = _d.data, loading = _d.loading, error = _d.error;
|
|
63
49
|
var dispatch = useAppDispatch();
|
|
64
|
-
var
|
|
50
|
+
var otp = data.otpData.otp;
|
|
65
51
|
var methods = useForm({
|
|
66
52
|
resolver: yupResolver(OTPValidation),
|
|
67
|
-
defaultValues:
|
|
53
|
+
defaultValues: {
|
|
54
|
+
otp: otp
|
|
55
|
+
},
|
|
68
56
|
mode: 'onChange'
|
|
69
57
|
});
|
|
70
|
-
useSetFromDefaultValues(methods,
|
|
58
|
+
useSetFromDefaultValues(methods, data.otpData);
|
|
71
59
|
var t = useTranslation().t;
|
|
72
60
|
var isAr = useLanguage().isAr;
|
|
73
61
|
React.useEffect(function () {
|
|
@@ -85,7 +73,7 @@ var OTP = function (_a) {
|
|
|
85
73
|
};
|
|
86
74
|
var disabled = !methods.formState.isValid || !!error;
|
|
87
75
|
var phone = (_c = (_b = data.verify.responseBody) === null || _b === void 0 ? void 0 : _b.auth_info) === null || _c === void 0 ? void 0 : _c.phone;
|
|
88
|
-
return (_jsx(
|
|
76
|
+
return (_jsx(ContainerWithHeader, __assign({ onBack: function () { return onBack(); }, title: 'otp_authentication', description: 'otp_authentication_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disableBack: true, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) })));
|
|
89
77
|
};
|
|
90
78
|
OTP.defaultProps = {};
|
|
91
79
|
export default React.memo(OTP);
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import * as React from 'react';
|
|
3
14
|
import { Trans, useTranslation } from 'react-i18next';
|
|
4
15
|
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
5
16
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
6
18
|
import { useAppSelector, useAppDispatch } from '../../../../hooks';
|
|
7
19
|
import { maskEmail } from '../../../../utils';
|
|
8
20
|
import { passwordSelector } from '../../../app/password/passwordStore';
|
|
@@ -16,6 +28,6 @@ var ResetPasswordSuccess = function (_a) {
|
|
|
16
28
|
var onBack = function () {
|
|
17
29
|
dispatch(handlePrevScreenStep());
|
|
18
30
|
};
|
|
19
|
-
return (_jsx(SuccessScreen, { title: t("reset_password_success_title"), description: _jsx(Trans, { i18nKey: 'reset_password_success_description_dev', values: { email: maskedEmail } }), showEmailProviders: true, enableBack: true, onBack: function () { return onBack(); } }));
|
|
31
|
+
return (_jsx(ContainerWithHeader, __assign({ onBack: function () { return onBack(); }, title: 'reset_password_success_header_title', description: 'reset_password_success_header_description' }, { children: _jsx(SuccessScreen, { title: t("reset_password_success_title"), description: _jsx(Trans, { i18nKey: 'reset_password_success_description_dev', values: { email: maskedEmail } }), showEmailProviders: true, enableBack: true, onBack: function () { return onBack(); } }) })));
|
|
20
32
|
};
|
|
21
33
|
export default React.memo(ResetPasswordSuccess);
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
13
|
import * as React from 'react';
|
|
3
14
|
import { useTranslation } from 'react-i18next';
|
|
4
15
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
5
16
|
import { updateBoardSuccess, passwordSelector, retrieveBoardResetPasswordSuccess } from '../../../app/password/passwordStore';
|
|
6
17
|
import SuccessScreen from '../../../shared/SuccessScreen';
|
|
18
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
7
19
|
import { PASSWORD_OPERATION_TYPE } from '../../../../constants';
|
|
8
20
|
var Success = function (_a) {
|
|
9
21
|
var t = useTranslation().t;
|
|
@@ -21,6 +33,6 @@ var Success = function (_a) {
|
|
|
21
33
|
var onSuccess = function () {
|
|
22
34
|
setClicked(true);
|
|
23
35
|
};
|
|
24
|
-
return (_jsx(
|
|
36
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'password_success_header_title', description: 'password_success_header_description' }, { children: _jsx(SuccessScreen, { description: t('password_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: clicked && loading, error: error || '' }) })));
|
|
25
37
|
};
|
|
26
38
|
export default React.memo(Success);
|
|
@@ -14,9 +14,10 @@ import { memo } from 'react';
|
|
|
14
14
|
import { useAppSelector } from '../../../../hooks';
|
|
15
15
|
import { passwordSelector } from '../../../app/password/passwordStore';
|
|
16
16
|
import SuccessFlowButtons from '../../../shared/SuccessFlowButtons';
|
|
17
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
17
18
|
var SuccessWithFlowButtons = function () {
|
|
18
19
|
var data = useAppSelector(passwordSelector).data;
|
|
19
20
|
var _a = data.verify.responseBody || {}, flows = _a.flows, entity = _a.entity, brand = _a.brand, bank = _a.bank_account, merchant = _a.merchant, user = _a.user, business = _a.business, board_id = _a.board_id, board_info_id = _a.board_info_id, name = _a.name, individuals = _a.individuals;
|
|
20
|
-
return (_jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [] }));
|
|
21
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'password_flows_title', description: 'password_flows_description' }, { children: _jsx(SuccessFlowButtons, { flowName: data.flowName, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: flows || [] }) })));
|
|
21
22
|
};
|
|
22
23
|
export default memo(SuccessWithFlowButtons);
|
|
@@ -21,7 +21,7 @@ import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
|
21
21
|
import { deepCopy, maskPhone } from '../../../../utils';
|
|
22
22
|
import Form from '../../../../components/Form';
|
|
23
23
|
import Text from '../../../../components/Text';
|
|
24
|
-
import {
|
|
24
|
+
import { ContainerWithHeader } from '../../../shared/Containers';
|
|
25
25
|
import { passwordSelector, clearError, resetOTPScreen, verifyPasswordLeadOTP } from '../../../app/password/passwordStore';
|
|
26
26
|
import Button from '../../../shared/Button';
|
|
27
27
|
import { OTPValidation } from './validation';
|
|
@@ -29,17 +29,14 @@ import OTPInput from './OTPInput';
|
|
|
29
29
|
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
30
30
|
var theme = _a.theme;
|
|
31
31
|
return ({
|
|
32
|
-
background: theme.palette.common.white,
|
|
33
|
-
border: '1px solid',
|
|
34
|
-
borderColor: theme.palette.divider,
|
|
35
32
|
direction: theme.direction,
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
paddingInline: theme.spacing(3),
|
|
34
|
+
paddingBottom: theme.spacing(5)
|
|
38
35
|
});
|
|
39
36
|
});
|
|
40
37
|
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
41
38
|
var theme = _a.theme;
|
|
42
|
-
return (__assign(__assign({}, theme.typography.
|
|
39
|
+
return (__assign(__assign({}, theme.typography.body2), { color: theme.palette.secondary.main, fontWeight: theme.typography.fontWeightRegular, lineHeight: '19px', whiteSpace: 'pre-line' }));
|
|
43
40
|
});
|
|
44
41
|
var FormStyled = styled(Form)(function () { return ({
|
|
45
42
|
display: 'flex',
|
|
@@ -73,6 +70,6 @@ var VerifyNumber = function (_a) {
|
|
|
73
70
|
dispatch(verifyPasswordLeadOTP(deepCopy(formData)));
|
|
74
71
|
};
|
|
75
72
|
var disabled = !methods.formState.isValid || !!error || !phone || resendLoading;
|
|
76
|
-
return (_jsx(
|
|
73
|
+
return (_jsx(ContainerWithHeader, __assign({ title: 'otp_authentication', description: 'otp_authentication_description' }, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('ide_opt_sent_title'), !loading && phone && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, { loading: resendLoading, setLoading: setResendLoading }), _jsx(Button, __assign({ disableBack: true, disabled: disabled || resendLoading, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) })));
|
|
77
74
|
};
|
|
78
75
|
export default React.memo(VerifyNumber);
|
|
@@ -17,13 +17,18 @@ import Text from '../../../components/Text';
|
|
|
17
17
|
import { ICONS_NAMES } from '../../../constants';
|
|
18
18
|
import { useTranslation } from 'react-i18next';
|
|
19
19
|
import { useLanguage } from '../../../hooks';
|
|
20
|
+
import { ThemeMode } from '../../../@types';
|
|
20
21
|
var BoxStyled = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'enabled' && prop !== 'isAr'; } })(function (_a) {
|
|
21
22
|
var _b;
|
|
22
23
|
var theme = _a.theme, enabled = _a.enabled, isAr = _a.isAr;
|
|
23
24
|
return (_b = {
|
|
24
|
-
backgroundColor: enabled
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
backgroundColor: enabled
|
|
26
|
+
? alpha(theme.palette.success.main, 0.04)
|
|
27
|
+
: theme.palette.mode === ThemeMode.DARK
|
|
28
|
+
? theme.palette.primary.contrastText
|
|
29
|
+
: alpha(theme.palette.secondary.main, 0.05),
|
|
30
|
+
color: enabled ? theme.palette.success.main : theme.palette.mode === ThemeMode.DARK ? theme.palette.secondary.main : theme.palette.text.secondary,
|
|
31
|
+
borderRadius: theme.spacing(0.75),
|
|
27
32
|
padding: theme.spacing(0.6, 1, 0.7, 1),
|
|
28
33
|
display: 'flex',
|
|
29
34
|
minHeight: theme.spacing(3.125),
|
|
@@ -37,7 +42,7 @@ var BoxStyled = styled(Box, { shouldForwardProp: function (prop) { return prop !
|
|
|
37
42
|
});
|
|
38
43
|
var TextStyled = styled(Text)(function (_a) {
|
|
39
44
|
var theme = _a.theme;
|
|
40
|
-
return (__assign(__assign({}, theme.typography.subtitle2), { fontWeight: theme.typography.fontWeightMedium
|
|
45
|
+
return (__assign(__assign({}, theme.typography.subtitle2), { fontWeight: theme.typography.fontWeightMedium }));
|
|
41
46
|
});
|
|
42
47
|
var TextContainer = styled(Box)(function (_a) {
|
|
43
48
|
var theme = _a.theme;
|
|
@@ -49,17 +54,17 @@ var TextContainer = styled(Box)(function (_a) {
|
|
|
49
54
|
paddingInlineStart: theme.spacing(0.6)
|
|
50
55
|
});
|
|
51
56
|
});
|
|
52
|
-
var IconStyled = styled(Icon)(function (_a) {
|
|
53
|
-
var theme = _a.theme;
|
|
54
|
-
return ({
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
57
|
+
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isCompleted'; } })(function (_a) {
|
|
58
|
+
var theme = _a.theme, isCompleted = _a.isCompleted;
|
|
59
|
+
return (__assign({ width: theme.spacing(1.75), height: theme.spacing(1.75) }, (theme.palette.mode === ThemeMode.DARK &&
|
|
60
|
+
!isCompleted && {
|
|
61
|
+
filter: 'brightness(6)'
|
|
62
|
+
})));
|
|
58
63
|
});
|
|
59
64
|
var AcceptancePayouts = function (_a) {
|
|
60
65
|
var showAcceptance = _a.showAcceptance, showPayout = _a.showPayout;
|
|
61
66
|
var t = useTranslation().t;
|
|
62
67
|
var isAr = useLanguage().isAr;
|
|
63
|
-
return (_jsxs(Box, __assign({ sx: { display: 'flex' } }, { children: [_jsxs(BoxStyled, __assign({ isAr: isAr, enabled: showAcceptance, sx: { marginInlineEnd: '10px' } }, { children: [_jsx(IconStyled, { src: showAcceptance ? ICONS_NAMES.SUCCESS : ICONS_NAMES.UNFINISHED }), _jsx(TextContainer, { children: _jsxs(TextStyled, { children: [t('acceptance_btn_text'), " "] }) })] })), _jsxs(BoxStyled, __assign({ isAr: isAr, enabled: showPayout }, { children: [_jsx(IconStyled, { src: showPayout ? ICONS_NAMES.SUCCESS : ICONS_NAMES.UNFINISHED }), _jsx(TextContainer, { children: _jsxs(TextStyled, { children: [t('payouts_btn_text'), " "] }) })] }))] })));
|
|
68
|
+
return (_jsxs(Box, __assign({ sx: { display: 'flex' } }, { children: [_jsxs(BoxStyled, __assign({ isAr: isAr, enabled: showAcceptance, sx: { marginInlineEnd: '10px' } }, { children: [_jsx(IconStyled, { isCompleted: showAcceptance, src: showAcceptance ? ICONS_NAMES.SUCCESS : ICONS_NAMES.UNFINISHED }), _jsx(TextContainer, { children: _jsxs(TextStyled, { children: [t('acceptance_btn_text'), " "] }) })] })), _jsxs(BoxStyled, __assign({ isAr: isAr, enabled: showPayout }, { children: [_jsx(IconStyled, { isCompleted: showPayout, src: showPayout ? ICONS_NAMES.SUCCESS : ICONS_NAMES.UNFINISHED }), _jsx(TextContainer, { children: _jsxs(TextStyled, { children: [t('payouts_btn_text'), " "] }) })] }))] })));
|
|
64
69
|
};
|
|
65
70
|
export default AcceptancePayouts;
|
|
@@ -16,16 +16,25 @@ import Box from '@mui/material/Box';
|
|
|
16
16
|
import LogoBackground from './LogoBackground';
|
|
17
17
|
import { BACKGROUND_ID } from '../../../constants';
|
|
18
18
|
import { useScreen } from '../../../hooks';
|
|
19
|
+
import { ThemeMode } from '../../../@types';
|
|
19
20
|
var BackgroundStyled = styled(Box, {
|
|
20
21
|
shouldForwardProp: function (prop) { return !['isTapOrigin', 'open', 'isSmall'].includes(prop); }
|
|
21
22
|
})(function (_a) {
|
|
22
|
-
var isTapOrigin = _a.isTapOrigin, open = _a.open, isSmall = _a.isSmall;
|
|
23
|
+
var theme = _a.theme, isTapOrigin = _a.isTapOrigin, open = _a.open, isSmall = _a.isSmall;
|
|
23
24
|
return ({
|
|
24
25
|
width: '100vw',
|
|
25
26
|
height: '100vh',
|
|
26
27
|
zIndex: isSmall ? 'auto' : 999,
|
|
27
28
|
position: 'absolute',
|
|
28
|
-
background: !open
|
|
29
|
+
background: !open
|
|
30
|
+
? 'inherit'
|
|
31
|
+
: isTapOrigin
|
|
32
|
+
? theme.palette.mode === ThemeMode.DARK
|
|
33
|
+
? 'linear-gradient(253.55deg, #101010 0.51%, #343740 49.67%, #101010 100%)'
|
|
34
|
+
: 'linear-gradient(180deg, #98ABAF 0%, #D9D6CC 100%)'
|
|
35
|
+
: theme.palette.mode === ThemeMode.DARK
|
|
36
|
+
? 'rgba(255, 255, 255, 0.2)'
|
|
37
|
+
: 'rgba(0, 0, 0, 0.5)'
|
|
29
38
|
});
|
|
30
39
|
});
|
|
31
40
|
var Background = function (_a) {
|
|
@@ -35,12 +35,22 @@ var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop
|
|
|
35
35
|
var ButtonBoxStyled = styled(Box)(function (_a) {
|
|
36
36
|
var theme = _a.theme;
|
|
37
37
|
return ({
|
|
38
|
-
margin: theme.spacing(0,
|
|
38
|
+
margin: theme.spacing(0, 3, 3, 3)
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
var ButtonStyled = styled(Button)(function (_a) {
|
|
42
|
+
var theme = _a.theme;
|
|
43
|
+
return ({
|
|
44
|
+
'&.MuiButton-outlined': {
|
|
45
|
+
'&:hover': {
|
|
46
|
+
color: theme.palette.common.white
|
|
47
|
+
}
|
|
48
|
+
}
|
|
39
49
|
});
|
|
40
50
|
});
|
|
41
51
|
export default function AbsherButton(_a) {
|
|
42
52
|
var children = _a.children, hideIcon = _a.hideIcon, disabled = _a.disabled, props = __rest(_a, ["children", "hideIcon", "disabled"]);
|
|
43
53
|
var theme = useTheme();
|
|
44
54
|
var btnColor = theme.palette.primary.light;
|
|
45
|
-
return (_jsx(ButtonBoxStyled, { children: _jsx(
|
|
55
|
+
return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ outLineColor: btnColor, variant: 'outlined', disabled: disabled, type: 'button', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: ICONS_NAMES.ABSHER_LOGO }) }, props, { children: children })) }));
|
|
46
56
|
}
|
|
@@ -24,18 +24,19 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
24
24
|
import React, { Fragment } from 'react';
|
|
25
25
|
import Button from '../../../components/Button';
|
|
26
26
|
import Icon from '../../../components/Icon';
|
|
27
|
-
import { styled } from '@mui/material/styles';
|
|
27
|
+
import { styled, useTheme } from '@mui/material/styles';
|
|
28
28
|
import Loader from '../../../components/Loader';
|
|
29
29
|
import { ICONS_NAMES } from '../../../constants';
|
|
30
30
|
import Warning from '../../../components/Warning';
|
|
31
31
|
import Collapse from '../../../components/Collapse';
|
|
32
32
|
import Box from '@mui/material/Box';
|
|
33
33
|
import Text from '../../../components/Text';
|
|
34
|
+
import { ThemeMode } from '../../../@types';
|
|
34
35
|
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
35
36
|
var theme = _a.theme, isAr = _a.isAr;
|
|
36
37
|
return ({
|
|
37
|
-
width: theme.spacing(
|
|
38
|
-
height: theme.spacing(
|
|
38
|
+
width: theme.spacing(1.75),
|
|
39
|
+
height: theme.spacing(1.75),
|
|
39
40
|
transform: isAr ? 'scaleX(-1)' : 'scaleX(1)',
|
|
40
41
|
marginInlineEnd: theme.spacing(-0.375)
|
|
41
42
|
});
|
|
@@ -43,8 +44,8 @@ var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop
|
|
|
43
44
|
var BackIconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
44
45
|
var theme = _a.theme, isAr = _a.isAr;
|
|
45
46
|
return ({
|
|
46
|
-
width: theme.spacing(
|
|
47
|
-
height: theme.spacing(
|
|
47
|
+
width: theme.spacing(1.75),
|
|
48
|
+
height: theme.spacing(1.75),
|
|
48
49
|
transform: isAr ? 'scaleX(1)' : 'scaleX(-1)',
|
|
49
50
|
marginInlineStart: theme.spacing(-1)
|
|
50
51
|
});
|
|
@@ -52,8 +53,8 @@ var BackIconStyled = styled(Icon, { shouldForwardProp: function (prop) { return
|
|
|
52
53
|
var ButtonBoxStyled = styled(Box)(function (_a) {
|
|
53
54
|
var theme = _a.theme;
|
|
54
55
|
return ({
|
|
55
|
-
margin: theme.spacing(0,
|
|
56
|
-
marginBlockStart: theme.spacing(
|
|
56
|
+
margin: theme.spacing(0, 3, 3, 3),
|
|
57
|
+
marginBlockStart: theme.spacing(3),
|
|
57
58
|
maxHeight: theme.spacing(5.375),
|
|
58
59
|
display: 'flex',
|
|
59
60
|
alignItems: 'center',
|
|
@@ -64,13 +65,13 @@ var ButtonStyled = styled(Button, {
|
|
|
64
65
|
shouldForwardProp: function (prop) { return prop !== 'isBack' && prop !== 'isLoading'; }
|
|
65
66
|
})(function (_a) {
|
|
66
67
|
var theme = _a.theme, isBack = _a.isBack, isLoading = _a.isLoading;
|
|
67
|
-
return (__assign({ paddingInlineStart: theme.spacing(2.5), marginInlineStart: isBack ? theme.spacing(-5) : theme.spacing(0), paddingLeft: isLoading ? 8 : 'auto', paddingRight: isLoading ? 8 : 'auto', textTransform: 'none', transition: theme.transitions.create(['width', 'padding'], {
|
|
68
|
+
return (__assign({ paddingInlineStart: theme.spacing(2.5), marginInlineStart: isBack ? theme.spacing(-5) : theme.spacing(0), paddingLeft: isLoading ? 8 : 'auto', paddingRight: isLoading ? 8 : 'auto', textTransform: 'none', transition: theme.transitions.create(['width', 'padding', 'border-radius'], {
|
|
68
69
|
easing: theme.transitions.easing.easeInOut,
|
|
69
70
|
duration: theme.transitions.duration.complex * 2
|
|
70
71
|
}) }, (isLoading && {
|
|
71
72
|
minWidth: 0,
|
|
72
|
-
width: theme.spacing(6),
|
|
73
|
-
borderRadius:
|
|
73
|
+
width: theme.spacing(5.6),
|
|
74
|
+
borderRadius: '30px'
|
|
74
75
|
})));
|
|
75
76
|
});
|
|
76
77
|
var BackButtonStyled = styled(Button, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
@@ -87,6 +88,10 @@ export default function CustomButton(_a) {
|
|
|
87
88
|
var children = _a.children, disabled = _a.disabled, isAr = _a.isAr, loading = _a.loading, disableBack = _a.disableBack, onBackClicked = _a.onBackClicked, error = _a.error, hideError = _a.hideError, disableNextIcon = _a.disableNextIcon, sx = _a.sx, props = __rest(_a, ["children", "disabled", "isAr", "loading", "disableBack", "onBackClicked", "error", "hideError", "disableNextIcon", "sx"]);
|
|
88
89
|
var _b = React.useState(false), btnLoading = _b[0], setBtnLoading = _b[1];
|
|
89
90
|
var isBackEnabled = !disableBack && !btnLoading;
|
|
91
|
+
var theme = useTheme();
|
|
92
|
+
var disabledIcon = theme.palette.mode === ThemeMode.DARK ? ICONS_NAMES.expand_left_disabled_dark : ICONS_NAMES.expand_left_disabled_light;
|
|
93
|
+
var icon = theme.palette.mode === ThemeMode.DARK ? ICONS_NAMES.expand_left_dark : ICONS_NAMES.expand_left_light;
|
|
94
|
+
var loaderColor = theme.palette.mode === ThemeMode.DARK ? theme.palette.common.black : theme.palette.common.white;
|
|
90
95
|
React.useEffect(function () {
|
|
91
96
|
if (loading)
|
|
92
97
|
setBtnLoading(true);
|
|
@@ -107,5 +112,5 @@ export default function CustomButton(_a) {
|
|
|
107
112
|
}, 500);
|
|
108
113
|
};
|
|
109
114
|
}, []);
|
|
110
|
-
return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error && !hideError }, { children: _jsx(Warning, __assign({ sx: { mb:
|
|
115
|
+
return (_jsxs(Fragment, { children: [_jsx(Collapse, __assign({ in: !!error && !hideError }, { children: _jsx(Warning, __assign({ sx: { mb: 0, ml: 3, mr: 3, mt: (sx === null || sx === void 0 ? void 0 : sx.mt) || 3 }, warningType: 'error' }, { children: error })) })), _jsxs(ButtonBoxStyled, __assign({ sx: __assign(__assign({}, sx), { mt: !!error && !hideError ? 2 : (sx === null || sx === void 0 ? void 0 : sx.mt) || 3 }) }, { children: [isBackEnabled && (_jsx(BackButtonStyled, __assign({ onClick: function () { return onBackClicked === null || onBackClicked === void 0 ? void 0 : onBackClicked(); }, isAr: isAr, type: 'reset', startIcon: _jsx(BackIconStyled, { isAr: isAr, src: disabled ? disabledIcon : icon }) }, props))), _jsx(ButtonStyled, __assign({ disabled: disabled, isLoading: btnLoading, type: !btnLoading ? 'submit' : 'button', isBack: isBackEnabled, endIcon: btnLoading === false ? !disableNextIcon && _jsx(IconStyled, { isAr: isAr, src: disabled ? disabledIcon : icon }) : undefined }, props, { children: !btnLoading ? (_jsxs(Text, __assign({ sx: { marginInlineEnd: isBackEnabled ? '-24px' : '-15px' } }, { children: [" ", children] }))) : (_jsx(Loader, { innerColor: loaderColor, outerColor: loaderColor, size: 15, toggleAnimation: !!btnLoading })) }))] }))] }));
|
|
111
116
|
}
|