@tap-payments/auth-jsconnect 2.5.22-test → 3.0.0-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +4 -0
- package/build/@types/app.js +5 -0
- package/build/api/country.d.ts +1 -0
- package/build/api/country.js +11 -1
- package/build/api/index.d.ts +1 -0
- package/build/app/settings.d.ts +5 -2
- package/build/app/settings.js +13 -3
- package/build/assets/locales/ar.json +107 -5
- package/build/assets/locales/en.json +108 -7
- package/build/components/AnimationFlow/AnimationFlow.d.ts +3 -3
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +3 -4
- package/build/components/AnimationFlow/BottomSheet.js +33 -27
- package/build/components/AnimationFlow/Dialog.d.ts +3 -4
- package/build/components/AnimationFlow/Dialog.js +17 -54
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +3 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +12 -5
- package/build/components/ArabicDatePicker/style.css +2 -0
- package/build/components/Button/Button.js +21 -10
- package/build/components/CheckBox/CheckBox.d.ts +2 -1
- package/build/components/CheckBox/CheckBox.js +41 -19
- package/build/components/DatePicker/DatePicker.d.ts +3 -1
- package/build/components/DatePicker/DatePicker.js +12 -6
- package/build/components/DatePicker/customStyle.css +1 -0
- package/build/components/ExpandIcon/ExpandIcon.js +8 -5
- package/build/components/FileInput/DragAndDrop.js +43 -39
- package/build/components/Icon/Icon.js +1 -1
- package/build/components/OTPField/OTPField.js +5 -4
- package/build/components/OTPTimer/OTPTimer.js +2 -6
- package/build/components/Popover/Popover.d.ts +6 -0
- package/build/components/Popover/Popover.js +79 -0
- package/build/components/Popover/index.d.ts +3 -0
- package/build/components/Popover/index.js +2 -0
- package/build/components/ProgressBar/CircularProgressBar.js +14 -15
- package/build/components/Radio/Radio.js +16 -6
- package/build/components/RadioLabel/RadioLabel.js +3 -2
- package/build/components/SimpleList/SimpleList.d.ts +15 -1
- package/build/components/SimpleList/SimpleList.js +48 -37
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +1 -1
- package/build/components/TextField/TextField.d.ts +17 -0
- package/build/components/TextField/TextField.js +89 -0
- package/build/components/TextField/index.d.ts +3 -0
- package/build/components/TextField/index.js +2 -0
- package/build/components/ToggleButtonGroup/ToggleButtonGroup.js +2 -1
- package/build/components/Tooltip/Tooltip.js +38 -7
- package/build/components/Warning/Warning.js +4 -4
- package/build/constants/app.js +35 -11
- package/build/constants/assets.d.ts +72 -0
- package/build/constants/assets.js +131 -59
- package/build/constants/date.d.ts +1 -0
- package/build/constants/date.js +14 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -0
- package/build/features/app/brand/brandStore.d.ts +3 -2
- package/build/features/app/brand/brandStore.js +4 -1
- package/build/features/app/business/businessStore.d.ts +4 -2
- package/build/features/app/business/businessStore.js +12 -6
- package/build/features/app/entity/entityStore.d.ts +3 -2
- package/build/features/app/entity/entityStore.js +4 -1
- package/build/features/app/individual/individualStore.d.ts +3 -2
- package/build/features/app/individual/individualStore.js +4 -1
- package/build/features/bank/Bank.js +3 -3
- package/build/features/bank/screens/BankDetails/BankDetails.js +3 -8
- package/build/features/bank/screens/BankDetails/BankName.js +7 -3
- package/build/features/bank/screens/BankDetails/BankStatement.js +1 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -3
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +7 -16
- package/build/features/bank/screens/BankDetails/IBAN.js +7 -2
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/bank/screens/Success/Success.js +14 -2
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/bank/screens/Verify/Verify.js +5 -8
- package/build/features/brand/Brand.js +3 -3
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +2 -51
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +17 -55
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +9 -7
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +2 -31
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +14 -32
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +2 -1
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +12 -13
- package/build/features/brand/screens/BrandActivities/ExpectedSaleField.d.ts +8 -0
- package/build/features/brand/screens/BrandActivities/ExpectedSaleField.js +55 -0
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +9 -16
- package/build/features/brand/screens/BrandActivities/TAC.js +8 -21
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +4 -2
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +2 -2
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandName.js +7 -51
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +8 -4
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.js +11 -5
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.js +10 -4
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.js +10 -4
- package/build/features/brand/screens/BrandSegmentInfo/TeamSize.d.ts +2 -1
- package/build/features/brand/screens/BrandSegmentInfo/TeamSize.js +10 -4
- package/build/features/brand/screens/ExpectedSales/ExpectedSaleList.d.ts +29 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSaleList.js +136 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSales.d.ts +5 -0
- package/build/features/brand/screens/ExpectedSales/ExpectedSales.js +91 -0
- package/build/features/brand/screens/ExpectedSales/index.d.ts +2 -0
- package/build/features/brand/screens/ExpectedSales/index.js +2 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/brand/screens/Success/Success.js +13 -1
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/brand/screens/Verify/Verify.js +5 -8
- package/build/features/business/Business.js +3 -3
- package/build/features/business/screens/Activities/Activities.js +7 -11
- package/build/features/business/screens/Activities/ActivityField.d.ts +22 -0
- package/build/features/business/screens/Activities/ActivityField.js +63 -0
- package/build/features/business/screens/Activities/LicenseName.js +4 -2
- package/build/features/business/screens/Activities/OperationStartDate.js +3 -3
- package/build/features/business/screens/BrandDetails/BrandDetails.js +3 -2
- package/build/features/business/screens/BrandDetails/BrandName.js +5 -9
- package/build/features/business/screens/BrandDetails/Header.js +4 -3
- package/build/features/business/screens/BrandDetails/LicenseInfo.js +5 -9
- package/build/features/business/screens/BrandDetails/SalesChannel.js +9 -5
- package/build/features/business/screens/BusinessActivities/ActivityList.d.ts +30 -0
- package/build/features/business/screens/BusinessActivities/ActivityList.js +265 -0
- package/build/features/business/screens/BusinessActivities/BusinessActivities.d.ts +5 -0
- package/build/features/business/screens/BusinessActivities/BusinessActivities.js +90 -0
- package/build/features/business/screens/BusinessActivities/index.d.ts +2 -0
- package/build/features/business/screens/BusinessActivities/index.js +2 -0
- package/build/features/business/screens/BusinessType/Article.js +1 -1
- package/build/features/business/screens/BusinessType/BusinessType.js +6 -4
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +2 -1
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +9 -11
- package/build/features/business/screens/BusinessType/EntityName.js +6 -3
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +2 -1
- package/build/features/business/screens/BusinessType/LicenseList.js +9 -6
- package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -3
- package/build/features/business/screens/BusinessType/LicenseType.js +16 -11
- package/build/features/business/screens/CivilID/CivilID.js +8 -16
- package/build/features/business/screens/CivilID/IDNumber.js +5 -18
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -18
- package/build/features/business/screens/Customers/CustomerLocations.js +11 -26
- package/build/features/business/screens/Customers/Customers.js +12 -10
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +2 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.js +10 -13
- package/build/features/business/screens/Customers/ExpectedSaleField.d.ts +6 -0
- package/build/features/business/screens/Customers/ExpectedSaleField.js +49 -0
- package/build/features/business/screens/Customers/RefundPolicy.js +8 -16
- package/build/features/business/screens/Customers/TransactionPolicy.js +4 -2
- package/build/features/business/screens/ExpectedSales/ExpectedSaleList.d.ts +29 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSaleList.js +136 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSales.d.ts +5 -0
- package/build/features/business/screens/ExpectedSales/ExpectedSales.js +91 -0
- package/build/features/business/screens/ExpectedSales/index.d.ts +2 -0
- package/build/features/business/screens/ExpectedSales/index.js +2 -0
- package/build/features/business/screens/IDBOD/DOB.js +3 -12
- package/build/features/business/screens/IDBOD/ID.js +2 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +9 -16
- package/build/features/business/screens/OTP/OTP.js +10 -22
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/business/screens/Success/Success.js +13 -1
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/business/screens/Verify/Verify.js +5 -8
- package/build/features/connect/Connect.js +3 -3
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +8 -4
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentLocations.js +9 -5
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentProfits.js +8 -4
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +8 -4
- package/build/features/connect/screens/BrandSegment/TeamSize.d.ts +2 -1
- package/build/features/connect/screens/BrandSegment/TeamSize.js +8 -4
- package/build/features/connect/screens/CivilID/CivilID.js +11 -12
- package/build/features/connect/screens/CivilID/IDNumber.js +3 -18
- package/build/features/connect/screens/Individual/Email.js +6 -2
- package/build/features/connect/screens/Individual/Individual.js +11 -9
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -0
- package/build/features/connect/screens/Individual/MobileNumber.js +29 -22
- package/build/features/connect/screens/Individual/Name.js +4 -2
- package/build/features/connect/screens/Merchant/BrandList.d.ts +2 -1
- package/build/features/connect/screens/Merchant/BrandList.js +8 -4
- package/build/features/connect/screens/Merchant/BrandName.d.ts +2 -1
- package/build/features/connect/screens/Merchant/BrandName.js +7 -42
- package/build/features/connect/screens/Merchant/Merchant.js +8 -4
- package/build/features/connect/screens/Merchant/TAC.js +12 -24
- package/build/features/connect/screens/Mobile/Mobile.js +19 -21
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -0
- package/build/features/connect/screens/Mobile/MobileNumber.js +22 -19
- package/build/features/connect/screens/NID/DOB.d.ts +1 -1
- package/build/features/connect/screens/NID/DOB.js +5 -26
- package/build/features/connect/screens/NID/IDNumber.js +3 -18
- package/build/features/connect/screens/NID/NID.js +13 -14
- package/build/features/connect/screens/OTP/OTP.js +5 -8
- package/build/features/connect/screens/ThankYou/ThankYou.js +13 -1
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +0 -61
- package/build/features/connectExpress/ConnectExpress.js +3 -3
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +13 -1
- package/build/features/connectExpress/screens/Brand/Brand.js +4 -2
- package/build/features/connectExpress/screens/CivilID/CivilID.js +7 -8
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +3 -18
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -2
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +3 -18
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -40
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +9 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +11 -6
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +8 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +9 -17
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +6 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +6 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +33 -26
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +6 -2
- package/build/features/connectExpress/screens/IdentityOTP/OTP.js +5 -8
- package/build/features/connectExpress/screens/Mobile/Mobile.js +21 -12
- package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +33 -26
- package/build/features/connectExpress/screens/Mobile/TAC.js +12 -24
- package/build/features/connectExpress/screens/NID/DOB.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/DOB.js +4 -24
- package/build/features/connectExpress/screens/NID/IDNumber.js +8 -18
- package/build/features/connectExpress/screens/NID/NID.js +7 -8
- package/build/features/connectExpress/screens/NID/TAC.js +9 -17
- package/build/features/connectExpress/screens/NIDMissed/DOB.d.ts +1 -1
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +3 -24
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +5 -18
- package/build/features/connectExpress/screens/NIDMissed/NID.js +2 -2
- package/build/features/connectExpress/screens/OTP/OTP.js +5 -8
- package/build/features/connectExpress/screens/OTP/OTPInput.js +1 -1
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/entity/Entity.js +3 -3
- package/build/features/entity/screens/EntityActivities/ActivityList.d.ts +30 -0
- package/build/features/entity/screens/EntityActivities/ActivityList.js +265 -0
- package/build/features/entity/screens/EntityActivities/EntityActivities.d.ts +5 -0
- package/build/features/entity/screens/EntityActivities/EntityActivities.js +89 -0
- package/build/features/entity/screens/EntityActivities/index.d.ts +2 -0
- package/build/features/entity/screens/EntityActivities/index.js +2 -0
- package/build/features/entity/screens/EntityCapital/ActivityField.d.ts +22 -0
- package/build/features/entity/screens/EntityCapital/ActivityField.js +63 -0
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +7 -3
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +6 -2
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +7 -3
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +10 -11
- package/build/features/entity/screens/EntityName/Article.js +1 -1
- package/build/features/entity/screens/EntityName/EntityName.js +6 -4
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +1 -50
- package/build/features/entity/screens/EntityName/EntityTypeList.js +19 -50
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -15
- package/build/features/entity/screens/EntityName/ExpiryDate.js +5 -11
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -15
- package/build/features/entity/screens/EntityName/IssuingDate.js +5 -11
- package/build/features/entity/screens/EntityName/LegalName.js +6 -2
- package/build/features/entity/screens/EntityName/LicenseNumber.js +4 -2
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +6 -2
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/entity/screens/Success/Success.js +13 -1
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/entity/screens/Verify/Verify.js +5 -8
- package/build/features/featuresScreens.js +26 -1
- package/build/features/individual/Individual.js +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +8 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +9 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +19 -100
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +14 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +6 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +7 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +9 -3
- package/build/features/individual/screens/IndividualList/CollectPhoneEmail.js +1 -1
- package/build/features/individual/screens/IndividualList/Email.js +4 -2
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +1 -27
- package/build/features/individual/screens/IndividualList/IndividualList.js +2 -21
- package/build/features/individual/screens/IndividualList/MobileNumber.js +30 -24
- package/build/features/individual/screens/IndividualList/UserList.js +36 -15
- package/build/features/individual/screens/IndividualOccupation/IndividualOccupation.d.ts +5 -0
- package/build/features/individual/screens/IndividualOccupation/IndividualOccupation.js +91 -0
- package/build/features/individual/screens/IndividualOccupation/OccupationList.d.ts +29 -0
- package/build/features/individual/screens/IndividualOccupation/OccupationList.js +136 -0
- package/build/features/individual/screens/IndividualOccupation/index.d.ts +2 -0
- package/build/features/individual/screens/IndividualOccupation/index.js +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +4 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +4 -13
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +16 -12
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +7 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +7 -4
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +10 -4
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +31 -24
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +1 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +10 -4
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +34 -30
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +10 -2
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/individual/screens/Success/Success.js +13 -1
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/individual/screens/Verify/Verify.js +5 -8
- package/build/features/password/Password.js +3 -3
- package/build/features/password/screens/CreatePassword/ConditionText.js +2 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +15 -2
- package/build/features/password/screens/CreatePassword/CreatePassword.js +3 -3
- package/build/features/password/screens/CreatePassword/Password.js +17 -9
- package/build/features/password/screens/CreatePassword/PasswordBar.js +4 -4
- package/build/features/password/screens/OTP/OTP.js +10 -22
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/password/screens/Success/Success.js +13 -1
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/password/screens/Verify/Verify.js +5 -8
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +16 -11
- package/build/features/shared/Background/Background.js +11 -2
- package/build/features/shared/Button/AbsherButton.js +12 -2
- package/build/features/shared/Button/Button.js +16 -11
- package/build/features/shared/Button/EmailProvidersButtons.js +34 -22
- package/build/features/shared/Button/FlowsButtons.d.ts +3 -1
- package/build/features/shared/Button/FlowsButtons.js +79 -69
- package/build/features/shared/Button/IndividualActionButtons.js +39 -40
- package/build/features/shared/Button/MobileButton.js +16 -2
- package/build/features/shared/Button/SuccessButton.d.ts +1 -1
- package/build/features/shared/Button/SuccessButton.js +10 -15
- package/build/features/shared/Calender/Calender.d.ts +3 -1
- package/build/features/shared/Calender/Calender.js +4 -4
- package/build/features/shared/Calender/CustomCalender.d.ts +15 -0
- package/build/features/shared/Calender/CustomCalender.js +46 -0
- package/build/features/shared/Calender/CustomDatePicker.d.ts +29 -0
- package/build/features/shared/Calender/CustomDatePicker.js +252 -0
- package/build/features/shared/Calender/CustomHijriDatePicker.d.ts +29 -0
- package/build/features/shared/Calender/CustomHijriDatePicker.js +258 -0
- package/build/features/shared/Calender/DatePicker.d.ts +29 -0
- package/build/features/shared/Calender/DatePicker.js +229 -0
- package/build/features/shared/Calender/index.d.ts +2 -0
- package/build/features/shared/Calender/index.js +2 -0
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -2
- package/build/features/shared/CheckIcon/CheckIcon.js +9 -7
- package/build/features/shared/Chip/Chip.js +2 -1
- package/build/features/shared/ClearIcon/ClearIcon.d.ts +2 -0
- package/build/features/shared/ClearIcon/ClearIcon.js +2 -1
- package/build/features/shared/Containers/ContainerWithHeader.d.ts +11 -0
- package/build/features/shared/Containers/ContainerWithHeader.js +52 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +1 -2
- package/build/features/shared/Containers/FeatureContainer.js +6 -4
- package/build/features/shared/Containers/index.d.ts +2 -1
- package/build/features/shared/Containers/index.js +2 -1
- package/build/features/shared/CountryPopup/CountryPopup.d.ts +7 -0
- package/build/features/shared/CountryPopup/CountryPopup.js +166 -0
- package/build/features/shared/CountryPopup/index.d.ts +2 -0
- package/build/features/shared/CountryPopup/index.js +2 -0
- package/build/features/shared/CreateAccountLoading/CreateAccountLoading.js +6 -6
- package/build/features/shared/DataLoading/DataLoading.js +6 -6
- package/build/features/shared/DropDownStyle/DropDownStyle.d.ts +24 -0
- package/build/features/shared/DropDownStyle/DropDownStyle.js +61 -0
- package/build/features/shared/DropDownStyle/index.d.ts +2 -0
- package/build/features/shared/DropDownStyle/index.js +2 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +2 -1
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +2 -2
- package/build/features/shared/Footer/PoweredByFooter.d.ts +1 -2
- package/build/features/shared/Footer/PoweredByFooter.js +3 -3
- package/build/features/shared/GenericError/GenericError.js +3 -2
- package/build/features/shared/Header/Header.d.ts +8 -0
- package/build/features/shared/Header/Header.js +88 -0
- package/build/features/shared/Header/index.d.ts +3 -0
- package/build/features/shared/Header/index.js +2 -0
- package/build/features/shared/InputSelect/InputSelect.js +0 -1
- package/build/features/shared/LanguagePopup/LanguagePopup.d.ts +5 -0
- package/build/features/shared/LanguagePopup/LanguagePopup.js +178 -0
- package/build/features/shared/LanguagePopup/index.d.ts +2 -0
- package/build/features/shared/LanguagePopup/index.js +2 -0
- package/build/features/shared/Mandatory/Mandatory.js +2 -2
- package/build/features/shared/OTP/OTP.js +10 -11
- package/build/features/shared/PaciVerification/PaciVerification.js +5 -4
- package/build/features/shared/PasswordIcon/PasswordIcon.js +3 -2
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +47 -22
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +13 -0
- package/build/features/shared/SalesChannels/SalesChannel.js +11 -24
- package/build/features/shared/Search/Search.d.ts +3 -1
- package/build/features/shared/Search/Search.js +39 -3
- package/build/features/shared/SearchIcon/SearchIcon.d.ts +0 -1
- package/build/features/shared/SearchIcon/SearchIcon.js +6 -7
- package/build/features/shared/SearchIcon/index.d.ts +2 -0
- package/build/features/shared/SearchIcon/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +23 -8
- package/build/features/shared/SuccessScreen/SuccessScreen.js +9 -7
- package/build/features/shared/{UploadFile/UploadFile.d.ts → TextField/TextField.d.ts} +14 -24
- package/build/features/shared/TextField/TextField.js +63 -0
- package/build/features/shared/TextField/index.d.ts +3 -0
- package/build/features/shared/TextField/index.js +2 -0
- package/build/features/shared/TextFieldSelect/TextFieldSelect.d.ts +4 -0
- package/build/features/shared/TextFieldSelect/TextFieldSelect.js +32 -0
- package/build/features/shared/TextFieldSelect/index.d.ts +2 -0
- package/build/features/shared/TextFieldSelect/index.js +2 -0
- package/build/features/shared/TitleDescription/TitleDescription.d.ts +9 -0
- package/build/features/shared/TitleDescription/TitleDescription.js +77 -0
- package/build/features/shared/TitleDescription/index.d.ts +2 -0
- package/build/features/shared/TitleDescription/index.js +2 -0
- package/build/features/shared/UploadFile/FileUpload.d.ts +8 -2
- package/build/features/shared/UploadFile/FileUpload.js +58 -31
- package/build/features/shared/UploadFile/UploadWrapper.js +7 -3
- package/build/features/shared/UploadFile/index.d.ts +1 -2
- package/build/features/shared/UploadFile/index.js +1 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +8 -2
- package/build/features/shared/UploadMultipleFile/UploadFile.js +58 -31
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +14 -9
- package/build/features/signIn/SignIn.js +3 -3
- package/build/features/signIn/screens/Mobile/MobileNumber.js +7 -4
- package/build/features/tax/Tax.js +3 -3
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +13 -1
- package/build/features/tax/screens/Success/Success.js +13 -1
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +7 -16
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +2 -2
- package/build/features/tax/screens/TaxDetails/VATId.js +7 -2
- package/build/features/tax/screens/Verify/Verify.js +9 -9
- package/build/hooks/useAppConfig.js +10 -1
- package/build/theme/palette.js +81 -27
- package/build/theme/shadows.js +7 -7
- package/build/theme/typography.js +3 -3
- package/build/utils/array.d.ts +1 -1
- package/build/utils/array.js +2 -2
- package/build/utils/string.js +14 -16
- package/package.json +3 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +0 -10
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +0 -143
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +0 -37
- package/build/features/business/screens/Activities/ActivitiesList.js +0 -292
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +0 -8
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +0 -138
- package/build/features/connect/screens/Mobile/Title.d.ts +0 -8
- package/build/features/connect/screens/Mobile/Title.js +0 -29
- package/build/features/connectExpress/screens/Mobile/Title.d.ts +0 -8
- package/build/features/connectExpress/screens/Mobile/Title.js +0 -29
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +0 -38
- package/build/features/entity/screens/EntityCapital/ActivityList.js +0 -290
- package/build/features/shared/UploadFile/UploadFile.js +0 -91
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
import { BoxProps } from '@mui/material/Box';
|
|
3
4
|
import { FileInfo, FileRemoveType } from '../../../constants';
|
|
5
|
+
interface InputContainerStyledProps extends BoxProps {
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
hasError?: boolean;
|
|
8
|
+
}
|
|
4
9
|
export declare const InputContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<Theme> & {
|
|
5
10
|
children?: React.ReactNode;
|
|
6
11
|
component?: React.ElementType<any> | undefined;
|
|
@@ -8,7 +13,7 @@ export declare const InputContainerStyled: import("@emotion/styled").StyledCompo
|
|
|
8
13
|
sx?: SxProps<Theme> | undefined;
|
|
9
14
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
10
15
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
11
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<Theme
|
|
16
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<Theme> & InputContainerStyledProps, {}, {}>;
|
|
12
17
|
export declare type FileUploadProps = {
|
|
13
18
|
key?: string;
|
|
14
19
|
show: boolean;
|
|
@@ -27,6 +32,7 @@ export declare type FileUploadProps = {
|
|
|
27
32
|
validFileFormats?: Array<string>;
|
|
28
33
|
readOnly?: boolean;
|
|
29
34
|
isVerified?: boolean;
|
|
35
|
+
label: string;
|
|
30
36
|
};
|
|
31
|
-
declare const FileUpload: ({ key, show, title, file, uploadedFile, onSuccess, onDelete, onUpdate, sx, purpose, isSubmitting, fileRemoveType, initialFileId, validFileFormats, readOnly, isVerified }: FileUploadProps) => JSX.Element;
|
|
37
|
+
declare const FileUpload: ({ key, show, title, file, uploadedFile, onSuccess, onDelete, onUpdate, sx, purpose, isSubmitting, fileRemoveType, initialFileId, validFileFormats, readOnly, isVerified, label }: FileUploadProps) => JSX.Element;
|
|
32
38
|
export default FileUpload;
|
|
@@ -57,45 +57,71 @@ import { CircularProgress } from '../../../components/ProgressBar';
|
|
|
57
57
|
import Text from '../../../components/Text';
|
|
58
58
|
import Icon from '../../../components/Icon';
|
|
59
59
|
import { maskFileName } from '../../../utils';
|
|
60
|
+
import { ThemeMode } from '../../../@types';
|
|
60
61
|
import API from '../../../api';
|
|
61
62
|
import { DeleteFileStatus, FileStatus, ICONS_NAMES, MAX_FILE_SIZE_FOUR_MB, VALID_FILE_FORMATS, FileRemoveType } from '../../../constants';
|
|
62
63
|
import CheckIcon from '../../shared/CheckIcon';
|
|
63
|
-
var BoxStyled = styled(Box
|
|
64
|
-
var theme = _a.theme
|
|
65
|
-
return (__assign(__assign(
|
|
64
|
+
var BoxStyled = styled(Box)(function (_a) {
|
|
65
|
+
var theme = _a.theme;
|
|
66
|
+
return (__assign(__assign({ direction: theme.direction }, theme.typography.subtitle2), { color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.success.dark, fontWeight: theme.typography.fontWeightRegular, width: '88%', wordBreak: 'break-all', display: 'flex', justifyContent: 'space-between', minHeight: theme.spacing(6.75) }));
|
|
66
67
|
});
|
|
67
68
|
var UploadBoxStyled = styled(Box, { shouldForwardProp: function (prop) { return !['uploading', 'readOnly'].includes(prop.toString()); } })(function (_a) {
|
|
68
69
|
var theme = _a.theme, uploading = _a.uploading, readOnly = _a.readOnly;
|
|
69
|
-
return (__assign(__assign(__assign({}, theme.typography.caption), {
|
|
70
|
+
return (__assign(__assign(__assign({}, theme.typography.caption), { color: theme.palette.common.white, fontWeight: theme.typography.fontWeightRegular, cursor: 'pointer', width: '12%', display: 'flex', justifyContent: 'center', alignItems: 'center' }), ((readOnly || uploading) && { background: alpha(theme.palette.info.light, 0.5), cursor: 'default' })));
|
|
70
71
|
});
|
|
71
72
|
var ClearIconStyled = styled(ClearIcon)(function (_a) {
|
|
72
73
|
var theme = _a.theme;
|
|
73
74
|
return ({
|
|
74
|
-
width: theme.spacing(
|
|
75
|
-
height: theme.spacing(
|
|
75
|
+
width: theme.spacing(2.25),
|
|
76
|
+
height: theme.spacing(2.25),
|
|
76
77
|
cursor: 'pointer',
|
|
77
|
-
color: theme.palette.
|
|
78
|
+
color: theme.palette.mode === ThemeMode.DARK ? theme.palette.secondary.main : theme.palette.primary.contrastText
|
|
78
79
|
});
|
|
79
80
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
var LabelStyled = styled(Text)(function (_a) {
|
|
82
|
+
var theme = _a.theme;
|
|
83
|
+
return ({
|
|
84
|
+
fontSize: theme.spacing(1.375),
|
|
85
|
+
color: theme.palette.text.secondary,
|
|
86
|
+
fontWeight: theme.typography.fontWeightRegular,
|
|
87
|
+
marginTop: theme.spacing(1)
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
export var InputContainerStyled = styled(Box, {
|
|
91
|
+
shouldForwardProp: function (prop) { return !['readOnly', 'hasError'].includes(prop); }
|
|
92
|
+
})(function (_a) {
|
|
93
|
+
var theme = _a.theme, readOnly = _a.readOnly, hasError = _a.hasError;
|
|
94
|
+
return (__assign(__assign({ display: 'flex', width: '100%', justifyContent: 'center', background: theme.palette.info.light, borderRadius: theme.spacing(1), border: "1px solid ".concat(alpha(theme.palette.text.secondary, 0.3)), paddingInlineStart: theme.spacing(1.25) }, (readOnly && { opacity: '0.6' })), (hasError && {
|
|
95
|
+
border: "1px solid ".concat(alpha(theme.palette.warning.main, 0.3)),
|
|
96
|
+
background: alpha(theme.palette.warning.main, 0.07)
|
|
97
|
+
})));
|
|
98
|
+
});
|
|
85
99
|
var ProgressBoxStyled = styled(Box)(function () { return ({
|
|
86
100
|
display: 'flex',
|
|
87
101
|
justifyContent: 'center',
|
|
88
102
|
alignItems: 'center'
|
|
89
103
|
}); });
|
|
90
|
-
var
|
|
104
|
+
var FileContainerStyled = styled(Box)(function (_a) {
|
|
91
105
|
var theme = _a.theme;
|
|
92
106
|
return ({
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
107
|
+
display: 'flex',
|
|
108
|
+
flexDirection: 'column',
|
|
109
|
+
padding: theme.spacing(1, 0, 0),
|
|
110
|
+
width: '100%'
|
|
96
111
|
});
|
|
97
112
|
});
|
|
98
|
-
var
|
|
113
|
+
var FileNameBoxStyled = styled(Box)(function (_a) {
|
|
114
|
+
var theme = _a.theme;
|
|
115
|
+
return ({
|
|
116
|
+
display: 'flex',
|
|
117
|
+
flexDirection: 'row',
|
|
118
|
+
marginInlineStart: theme.spacing(-0.25),
|
|
119
|
+
img: __assign({}, (theme.palette.mode === ThemeMode.DARK && {
|
|
120
|
+
filter: 'brightness(0) invert(1)'
|
|
121
|
+
}))
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
var WarningIconStyled = styled(Icon)(function (_a) {
|
|
99
125
|
var theme = _a.theme;
|
|
100
126
|
return ({
|
|
101
127
|
width: theme.spacing(1.625),
|
|
@@ -105,10 +131,18 @@ var ErrorIconStyled = styled(Icon)(function (_a) {
|
|
|
105
131
|
});
|
|
106
132
|
var WarningContainer = styled(Box)(function (_a) {
|
|
107
133
|
var theme = _a.theme;
|
|
108
|
-
return (
|
|
134
|
+
return ({
|
|
135
|
+
flexDirection: 'row',
|
|
136
|
+
display: 'flex',
|
|
137
|
+
justifyContent: 'start',
|
|
138
|
+
color: theme.palette.warning.main,
|
|
139
|
+
alignItems: 'center',
|
|
140
|
+
marginTop: theme.spacing(1),
|
|
141
|
+
fontSize: theme.spacing(1.25)
|
|
142
|
+
});
|
|
109
143
|
});
|
|
110
144
|
var FileUpload = function (_a) {
|
|
111
|
-
var key = _a.key, show = _a.show, title = _a.title, file = _a.file, uploadedFile = _a.uploadedFile, onSuccess = _a.onSuccess, onDelete = _a.onDelete, onUpdate = _a.onUpdate, sx = _a.sx, purpose = _a.purpose, isSubmitting = _a.isSubmitting, fileRemoveType = _a.fileRemoveType, initialFileId = _a.initialFileId, _b = _a.validFileFormats, validFileFormats = _b === void 0 ? VALID_FILE_FORMATS : _b, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
145
|
+
var key = _a.key, show = _a.show, title = _a.title, file = _a.file, uploadedFile = _a.uploadedFile, onSuccess = _a.onSuccess, onDelete = _a.onDelete, onUpdate = _a.onUpdate, sx = _a.sx, purpose = _a.purpose, isSubmitting = _a.isSubmitting, fileRemoveType = _a.fileRemoveType, initialFileId = _a.initialFileId, _b = _a.validFileFormats, validFileFormats = _b === void 0 ? VALID_FILE_FORMATS : _b, readOnly = _a.readOnly, isVerified = _a.isVerified, label = _a.label;
|
|
112
146
|
var theme = useTheme();
|
|
113
147
|
var t = useTranslation().t;
|
|
114
148
|
var _c = file || {}, name = _c.name, size = _c.size, type = _c.type;
|
|
@@ -224,8 +258,6 @@ var FileUpload = function (_a) {
|
|
|
224
258
|
onDelete();
|
|
225
259
|
};
|
|
226
260
|
var getProgressComponent = function () {
|
|
227
|
-
if (status === FileStatus.ERROR)
|
|
228
|
-
return _jsx(ErrorIconStyled, { src: ICONS_NAMES.ERROR_ICON });
|
|
229
261
|
if (status === FileStatus.SUCCESS)
|
|
230
262
|
return _jsx(CheckIcon, { isVerified: isVerified });
|
|
231
263
|
if (status === FileStatus.DOWNLOADING && !progress)
|
|
@@ -253,15 +285,10 @@ var FileUpload = function (_a) {
|
|
|
253
285
|
}, [name]);
|
|
254
286
|
var canDownloadFile = fileId && status !== FileStatus.DOWNLOADING;
|
|
255
287
|
var canDeleteFile = status !== FileStatus.UPLOADING && status !== FileStatus.DOWNLOADING;
|
|
256
|
-
return (_jsx(Collapse, __assign({ in: show }, { children:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
} }, { children: [_jsxs(Box, __assign({ sx: { display: 'flex', flexDirection: 'row', cursor: canDownloadFile ? 'pointer' : 'auto' }, onClick: canDownloadFile ? function () { return downloadFile(); } : undefined }, { children: [_jsx(Icon, { src: ICONS_NAMES.DOC_ICON }), _jsx(Text, { children: name ? maskFileName(name) : uploadedFile.fileId })] })), _jsx(Box, __assign({ sx: { display: 'flex', flexDirection: 'row', justifyContent: 'center' } }, { children: _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsxs(WarningContainer, { children: [_jsx(WarningIconStyled, { src: ICONS_NAMES.WARNING_ICON }), _jsx(Text, { children: t(error) })] }) })) }))] })), _jsx(ProgressBoxStyled, { children: getProgressComponent() })] })), _jsx(UploadBoxStyled, __assign({ readOnly: readOnly, uploading: status === FileStatus.UPLOADING || status === FileStatus.DOWNLOADING, onClick: function () {
|
|
262
|
-
if (readOnly)
|
|
263
|
-
return;
|
|
264
|
-
canDeleteFile && handleDeleteFile();
|
|
265
|
-
} }, { children: deleteStatus === DeleteFileStatus.DELETING ? (_jsx(MUICircularProgress, { size: 25, thickness: 5, sx: { color: theme.palette.common.white } })) : (_jsx(ClearIconStyled, {})) }))] })) }), key) })));
|
|
288
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(Box, __assign({ sx: { pointerEvents: isSubmitting ? 'none' : 'auto', ml: 3, mr: 3 } }, { children: [_jsxs(InputContainerStyled, __assign({ sx: sx, readOnly: readOnly }, { children: [_jsxs(BoxStyled, { children: [_jsxs(Box, __assign({ sx: { display: 'flex', flexDirection: 'column', width: '100%' } }, { children: [_jsx(LabelStyled, { children: t(label) }), _jsx(FileContainerStyled, { children: _jsxs(FileNameBoxStyled, __assign({ sx: { cursor: canDownloadFile ? 'pointer' : 'auto' }, onClick: canDownloadFile ? function () { return downloadFile(); } : undefined }, { children: [_jsx(Icon, { src: ICONS_NAMES.DOC_ICON }), _jsx(Text, { children: name ? maskFileName(name) : uploadedFile === null || uploadedFile === void 0 ? void 0 : uploadedFile.fileId })] })) })] })), _jsx(ProgressBoxStyled, { children: getProgressComponent() })] }), _jsx(UploadBoxStyled, __assign({ readOnly: readOnly, uploading: status === FileStatus.UPLOADING || status === FileStatus.DOWNLOADING, onClick: function () {
|
|
289
|
+
if (readOnly)
|
|
290
|
+
return;
|
|
291
|
+
canDeleteFile && handleDeleteFile();
|
|
292
|
+
} }, { children: deleteStatus === DeleteFileStatus.DELETING ? (_jsx(MUICircularProgress, { size: 25, thickness: 5, sx: { color: theme.palette.common.white } })) : (_jsx(ClearIconStyled, {})) }))] })), _jsx(Box, __assign({ sx: { display: 'flex', flexDirection: 'row', justifyContent: 'center' } }, { children: _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsxs(WarningContainer, { children: [_jsx(WarningIconStyled, { src: ICONS_NAMES.WARNING_INFO_ICON }), t(error)] }) })) }))] }), key) })));
|
|
266
293
|
};
|
|
267
294
|
export default FileUpload;
|
|
@@ -18,8 +18,8 @@ import Box from '@mui/material/Box';
|
|
|
18
18
|
import { DragAndDrop } from '../../../components/FileInput';
|
|
19
19
|
import Collapse from '../../../components/Collapse';
|
|
20
20
|
import { getFileType } from '../../../utils';
|
|
21
|
+
import Text from '../../../components/Text';
|
|
21
22
|
import { DeleteFileStatus, FileStatus } from '../../../constants';
|
|
22
|
-
import { InputLabelStyled } from '../../shared/Input/Input';
|
|
23
23
|
import { ScreenContainer } from '../../shared/Containers';
|
|
24
24
|
import Mandatory from '../../shared/Mandatory';
|
|
25
25
|
import FileUpload from './FileUpload';
|
|
@@ -29,12 +29,16 @@ var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
|
29
29
|
marginBlockStart: theme.spacing(0)
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
|
+
var InputLabelStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'hasError'; } })(function (_a) {
|
|
33
|
+
var theme = _a.theme, hasError = _a.hasError;
|
|
34
|
+
return (__assign({ color: hasError ? theme.palette.warning.main : theme.palette.text.secondary, fontWeight: theme.typography.fontWeightMedium, fontSize: theme.spacing(1.375) }, theme.typography.caption));
|
|
35
|
+
});
|
|
32
36
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
33
37
|
var theme = _a.theme;
|
|
34
38
|
return ({
|
|
35
39
|
display: 'flex',
|
|
36
40
|
justifyContent: 'space-between',
|
|
37
|
-
padding: theme.spacing(0,
|
|
41
|
+
padding: theme.spacing(0, 3, 1.25, 3),
|
|
38
42
|
alignItems: 'center'
|
|
39
43
|
});
|
|
40
44
|
});
|
|
@@ -110,6 +114,6 @@ var UploadWrapper = function (_a) {
|
|
|
110
114
|
var fileExists = !!fileInfo;
|
|
111
115
|
var showUploadedInputField = (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.status) === FileStatus.SUCCESS || (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.status) === FileStatus.DOWNLOADING || (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.deleteStatus) === DeleteFileStatus.DELETING;
|
|
112
116
|
var showDragAndDrop = !showUploadedInputField && !readOnly;
|
|
113
|
-
return (_jsxs(FeatureStyled, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: _jsxs(_Fragment, { children: [label, required && _jsx(Mandatory, {})] }) }) }), _jsx(Collapse, __assign({ in: showDragAndDrop }, { children: _jsx(InputContainerStyled,
|
|
117
|
+
return (_jsxs(FeatureStyled, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, __assign({ hasError: (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.error) || error }, { children: _jsxs(_Fragment, { children: [label, required && _jsx(Mandatory, {})] }) })) }), _jsx(Collapse, __assign({ in: showDragAndDrop }, { children: _jsx(InputContainerStyled, { children: _jsx(DragAndDrop, { title: title, subTitle: subTitle, description: dragDescription, fileExists: fileExists, uploadingTitle: uploadingTitle, successTitle: successTitle, progress: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.progress, uploading: (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.status) === FileStatus.UPLOADING, uploadSuccess: (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.status) === FileStatus.SUCCESS, onSuccess: handleFileChange, error: (fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.error) || error, multiple: false }) }) })), _jsx(Collapse, __assign({ in: fileExists, timeout: 300 }, { children: _jsx(FileUpload, { label: label, validFileFormats: validFileFormats, readOnly: readOnly, show: showUploadedInputField, fileRemoveType: fileRemoveType, purpose: purpose, title: fileTitle || '', isSubmitting: isSubmitting, uploadedFile: fileInfo, file: fileData, onSuccess: handleSuccess, onDelete: handleDelete, onUpdate: handleUpdate, initialFileId: defaultFile === null || defaultFile === void 0 ? void 0 : defaultFile.id, isVerified: isVerified }) }))] }));
|
|
114
118
|
};
|
|
115
119
|
export default React.memo(UploadWrapper);
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
import { BoxProps } from '@mui/material/Box';
|
|
3
4
|
import { FileInfo, FileType } from '../../../constants';
|
|
5
|
+
interface InputContainerStyledProps extends BoxProps {
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
hasError?: boolean;
|
|
8
|
+
}
|
|
4
9
|
export declare const InputContainerStyled: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<Theme> & {
|
|
5
10
|
children?: React.ReactNode;
|
|
6
11
|
component?: React.ElementType<any> | undefined;
|
|
@@ -8,7 +13,7 @@ export declare const InputContainerStyled: import("@emotion/styled").StyledCompo
|
|
|
8
13
|
sx?: SxProps<Theme> | undefined;
|
|
9
14
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
10
15
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
11
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<Theme
|
|
16
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | ("border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform") | "children" | "component" | "ref" | "sx"> & import("@mui/system").MUIStyledCommonProps<Theme> & InputContainerStyledProps, {}, {}>;
|
|
12
17
|
export declare type UploadFileProps = {
|
|
13
18
|
index: number;
|
|
14
19
|
purpose: string;
|
|
@@ -24,6 +29,7 @@ export declare type UploadFileProps = {
|
|
|
24
29
|
isSubmitting?: boolean;
|
|
25
30
|
readOnly?: boolean;
|
|
26
31
|
isVerified?: boolean;
|
|
32
|
+
label: string;
|
|
27
33
|
};
|
|
28
|
-
declare const UploadFile: ({ index, title, file, fileType, uploadedFiles, onSuccess, onDelete, onUpdate, sx, purpose, isSubmitting, readOnly, isVerified }: UploadFileProps) => JSX.Element;
|
|
34
|
+
declare const UploadFile: ({ index, title, file, fileType, uploadedFiles, onSuccess, onDelete, onUpdate, sx, purpose, isSubmitting, readOnly, isVerified, label }: UploadFileProps) => JSX.Element;
|
|
29
35
|
export default UploadFile;
|
|
@@ -60,42 +60,68 @@ import { maskFileName } from '../../../utils';
|
|
|
60
60
|
import API from '../../../api';
|
|
61
61
|
import { DeleteFileStatus, FileStatus, ICONS_NAMES, MAX_FILE_SIZE_FOUR_MB, VALID_FILE_FORMATS } from '../../../constants';
|
|
62
62
|
import CheckIcon from '../../shared/CheckIcon';
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
import { ThemeMode } from '../../../@types';
|
|
64
|
+
var BoxStyled = styled(Box)(function (_a) {
|
|
65
|
+
var theme = _a.theme;
|
|
66
|
+
return (__assign(__assign({ direction: theme.direction }, theme.typography.subtitle2), { color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.success.dark, fontWeight: theme.typography.fontWeightRegular, width: '88%', wordBreak: 'break-all', display: 'flex', justifyContent: 'space-between', minHeight: theme.spacing(6.75) }));
|
|
66
67
|
});
|
|
67
68
|
var UploadBoxStyled = styled(Box, { shouldForwardProp: function (prop) { return !['uploading', 'readOnly'].includes(prop.toString()); } })(function (_a) {
|
|
68
69
|
var theme = _a.theme, uploading = _a.uploading, readOnly = _a.readOnly;
|
|
69
|
-
return (__assign(__assign(__assign({}, theme.typography.caption), {
|
|
70
|
+
return (__assign(__assign(__assign({}, theme.typography.caption), { color: theme.palette.common.white, fontWeight: theme.typography.fontWeightRegular, cursor: 'pointer', width: '12%', display: 'flex', justifyContent: 'center', alignItems: 'center' }), ((readOnly || uploading) && { background: alpha(theme.palette.info.light, 0.5), cursor: 'default' })));
|
|
70
71
|
});
|
|
71
72
|
var ClearIconStyled = styled(ClearIcon)(function (_a) {
|
|
72
73
|
var theme = _a.theme;
|
|
73
74
|
return ({
|
|
74
|
-
width: theme.spacing(
|
|
75
|
-
height: theme.spacing(
|
|
75
|
+
width: theme.spacing(2.25),
|
|
76
|
+
height: theme.spacing(2.25),
|
|
76
77
|
cursor: 'pointer',
|
|
77
|
-
color: theme.palette.
|
|
78
|
+
color: theme.palette.mode === ThemeMode.DARK ? theme.palette.secondary.main : theme.palette.primary.contrastText
|
|
78
79
|
});
|
|
79
80
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
var LabelStyled = styled(Text)(function (_a) {
|
|
82
|
+
var theme = _a.theme;
|
|
83
|
+
return ({
|
|
84
|
+
fontSize: theme.spacing(1.375),
|
|
85
|
+
color: theme.palette.text.secondary,
|
|
86
|
+
fontWeight: theme.typography.fontWeightRegular,
|
|
87
|
+
marginTop: theme.spacing(1)
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
export var InputContainerStyled = styled(Box, {
|
|
91
|
+
shouldForwardProp: function (prop) { return !['readOnly', 'hasError'].includes(prop); }
|
|
92
|
+
})(function (_a) {
|
|
93
|
+
var theme = _a.theme, readOnly = _a.readOnly, hasError = _a.hasError;
|
|
94
|
+
return (__assign(__assign({ display: 'flex', width: '100%', justifyContent: 'center', background: theme.palette.info.light, borderRadius: theme.spacing(1), border: "1px solid ".concat(alpha(theme.palette.text.secondary, 0.3)), paddingInlineStart: theme.spacing(1.25) }, (readOnly && { opacity: '0.6' })), (hasError && {
|
|
95
|
+
border: "1px solid ".concat(alpha(theme.palette.warning.main, 0.3)),
|
|
96
|
+
background: alpha(theme.palette.warning.main, 0.07)
|
|
97
|
+
})));
|
|
98
|
+
});
|
|
85
99
|
var ProgressBoxStyled = styled(Box)(function () { return ({
|
|
86
100
|
display: 'flex',
|
|
87
101
|
justifyContent: 'center',
|
|
88
102
|
alignItems: 'center'
|
|
89
103
|
}); });
|
|
90
|
-
var
|
|
104
|
+
var FileContainerStyled = styled(Box)(function (_a) {
|
|
91
105
|
var theme = _a.theme;
|
|
92
106
|
return ({
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
107
|
+
display: 'flex',
|
|
108
|
+
flexDirection: 'column',
|
|
109
|
+
padding: theme.spacing(1, 0, 0),
|
|
110
|
+
width: '100%'
|
|
96
111
|
});
|
|
97
112
|
});
|
|
98
|
-
var
|
|
113
|
+
var FileNameBoxStyled = styled(Box)(function (_a) {
|
|
114
|
+
var theme = _a.theme;
|
|
115
|
+
return ({
|
|
116
|
+
display: 'flex',
|
|
117
|
+
flexDirection: 'row',
|
|
118
|
+
marginInlineStart: theme.spacing(-0.25),
|
|
119
|
+
img: __assign({}, (theme.palette.mode === ThemeMode.DARK && {
|
|
120
|
+
filter: 'brightness(0) invert(1)'
|
|
121
|
+
}))
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
var WarningIconStyled = styled(Icon)(function (_a) {
|
|
99
125
|
var theme = _a.theme;
|
|
100
126
|
return ({
|
|
101
127
|
width: theme.spacing(1.625),
|
|
@@ -105,10 +131,18 @@ var ErrorIconStyled = styled(Icon)(function (_a) {
|
|
|
105
131
|
});
|
|
106
132
|
var WarningContainer = styled(Box)(function (_a) {
|
|
107
133
|
var theme = _a.theme;
|
|
108
|
-
return (
|
|
134
|
+
return ({
|
|
135
|
+
flexDirection: 'row',
|
|
136
|
+
display: 'flex',
|
|
137
|
+
justifyContent: 'start',
|
|
138
|
+
color: theme.palette.warning.main,
|
|
139
|
+
alignItems: 'center',
|
|
140
|
+
marginTop: theme.spacing(1),
|
|
141
|
+
fontSize: theme.spacing(1.25)
|
|
142
|
+
});
|
|
109
143
|
});
|
|
110
144
|
var UploadFile = function (_a) {
|
|
111
|
-
var index = _a.index, title = _a.title, file = _a.file, fileType = _a.fileType, uploadedFiles = _a.uploadedFiles, onSuccess = _a.onSuccess, onDelete = _a.onDelete, onUpdate = _a.onUpdate, sx = _a.sx, purpose = _a.purpose, isSubmitting = _a.isSubmitting, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
145
|
+
var index = _a.index, title = _a.title, file = _a.file, fileType = _a.fileType, uploadedFiles = _a.uploadedFiles, onSuccess = _a.onSuccess, onDelete = _a.onDelete, onUpdate = _a.onUpdate, sx = _a.sx, purpose = _a.purpose, isSubmitting = _a.isSubmitting, readOnly = _a.readOnly, isVerified = _a.isVerified, label = _a.label;
|
|
112
146
|
var theme = useTheme();
|
|
113
147
|
var t = useTranslation().t;
|
|
114
148
|
var _b = file || {}, name = _b.name, size = _b.size, type = _b.type;
|
|
@@ -226,8 +260,6 @@ var UploadFile = function (_a) {
|
|
|
226
260
|
onDelete(index);
|
|
227
261
|
};
|
|
228
262
|
var getProgressComponent = function () {
|
|
229
|
-
if (status === FileStatus.ERROR)
|
|
230
|
-
return _jsx(ErrorIconStyled, { src: ICONS_NAMES.ERROR_ICON });
|
|
231
263
|
if (status === FileStatus.SUCCESS)
|
|
232
264
|
return _jsx(CheckIcon, { isVerified: isVerified });
|
|
233
265
|
if (status === FileStatus.DOWNLOADING && !progress)
|
|
@@ -259,15 +291,10 @@ var UploadFile = function (_a) {
|
|
|
259
291
|
}, []);
|
|
260
292
|
var canDownloadFile = uploadedFile.fileId && status !== FileStatus.DOWNLOADING;
|
|
261
293
|
var canDeleteFile = !isAnyFileDoingDeleteUploadDownload;
|
|
262
|
-
return (
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
} }, { children: [_jsxs(Box, __assign({ sx: { display: 'flex', flexDirection: 'row', cursor: canDownloadFile ? 'pointer' : 'auto' }, onClick: canDownloadFile ? function () { return downloadFile(); } : undefined }, { children: [_jsx(Icon, { src: ICONS_NAMES.DOC_ICON }), _jsx(Text, { children: name ? maskFileName(name) : uploadedFile.fileId })] })), _jsx(Box, __assign({ sx: { display: 'flex', flexDirection: 'row', justifyContent: 'center' } }, { children: _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsxs(WarningContainer, { children: [_jsx(WarningIconStyled, { src: ICONS_NAMES.WARNING_ICON }), _jsx(Text, { children: t(error) })] }) })) }))] })), _jsx(ProgressBoxStyled, { children: getProgressComponent() })] })), _jsx(UploadBoxStyled, __assign({ readOnly: readOnly, uploading: status === FileStatus.UPLOADING || (!!isAnyFileDoingDeleteUploadDownload && deleteStatus !== DeleteFileStatus.DELETING), onClick: function () {
|
|
268
|
-
if (readOnly)
|
|
269
|
-
return;
|
|
270
|
-
canDeleteFile && handleDeleteFile(index);
|
|
271
|
-
} }, { children: deleteStatus === DeleteFileStatus.DELETING ? (_jsx(MUICircularProgress, { size: 25, thickness: 5, sx: { color: theme.palette.common.white } })) : (_jsx(ClearIconStyled, {})) }))] })) }), index));
|
|
294
|
+
return (_jsxs(Box, __assign({ sx: { pointerEvents: isSubmitting ? 'none' : 'auto', ml: 3, mr: 3 } }, { children: [_jsxs(InputContainerStyled, __assign({ readOnly: readOnly, sx: sx, hasError: !!error }, { children: [_jsxs(BoxStyled, { children: [_jsxs(Box, __assign({ sx: { display: 'flex', flexDirection: 'column', width: '100%' } }, { children: [_jsx(LabelStyled, { children: t(label) }), _jsx(FileContainerStyled, { children: _jsxs(FileNameBoxStyled, __assign({ sx: { cursor: canDownloadFile ? 'pointer' : 'auto' }, onClick: canDownloadFile ? function () { return downloadFile(); } : undefined }, { children: [_jsx(Icon, { src: ICONS_NAMES.DOC_ICON }), _jsx(Text, { children: name ? maskFileName(name) : uploadedFile.fileId })] })) })] })), _jsx(ProgressBoxStyled, { children: getProgressComponent() })] }), _jsx(UploadBoxStyled, __assign({ readOnly: readOnly, uploading: status === FileStatus.UPLOADING || (!!isAnyFileDoingDeleteUploadDownload && deleteStatus !== DeleteFileStatus.DELETING), onClick: function () {
|
|
295
|
+
if (readOnly)
|
|
296
|
+
return;
|
|
297
|
+
canDeleteFile && handleDeleteFile(index);
|
|
298
|
+
} }, { children: deleteStatus === DeleteFileStatus.DELETING ? (_jsx(MUICircularProgress, { size: 25, thickness: 5, sx: { color: theme.palette.common.white } })) : (_jsx(ClearIconStyled, {})) }))] })), _jsx(Box, __assign({ sx: { display: 'flex', flexDirection: 'row', justifyContent: 'start' } }, { children: _jsx(Collapse, __assign({ in: !!error, timeout: 400 }, { children: _jsxs(WarningContainer, { children: [_jsx(WarningIconStyled, { src: ICONS_NAMES.WARNING_INFO_ICON }), t(error)] }) })) }))] }), index));
|
|
272
299
|
};
|
|
273
300
|
export default UploadFile;
|
|
@@ -22,13 +22,14 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
22
22
|
import React from 'react';
|
|
23
23
|
import { useTranslation } from 'react-i18next';
|
|
24
24
|
import { useController } from 'react-hook-form';
|
|
25
|
-
import { alpha, styled
|
|
25
|
+
import { alpha, styled } from '@mui/material/styles';
|
|
26
26
|
import Box from '@mui/material/Box';
|
|
27
27
|
import { DragAndDrop } from '../../../components/FileInput';
|
|
28
28
|
import Collapse from '../../../components/Collapse';
|
|
29
|
+
import Text from '../../../components/Text';
|
|
30
|
+
import { ThemeMode } from '../../../@types';
|
|
29
31
|
import { getFileType } from '../../../utils';
|
|
30
32
|
import { DeleteFileStatus, FileStatus } from '../../../constants';
|
|
31
|
-
import { InputLabelStyled } from '../../shared/Input/Input';
|
|
32
33
|
import { ScreenContainer } from '../../shared/Containers';
|
|
33
34
|
import Mandatory from '../../shared/Mandatory';
|
|
34
35
|
import UploadFile from './UploadFile';
|
|
@@ -38,12 +39,16 @@ var FeatureStyled = styled(ScreenContainer)(function (_a) {
|
|
|
38
39
|
marginBlockStart: theme.spacing(0)
|
|
39
40
|
});
|
|
40
41
|
});
|
|
42
|
+
var InputLabelStyled = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'hasError'; } })(function (_a) {
|
|
43
|
+
var theme = _a.theme, hasError = _a.hasError;
|
|
44
|
+
return (__assign({ color: hasError ? theme.palette.warning.main : theme.palette.text.secondary, fontWeight: theme.typography.fontWeightMedium, fontSize: theme.spacing(1.375) }, theme.typography.caption));
|
|
45
|
+
});
|
|
41
46
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
42
47
|
var theme = _a.theme;
|
|
43
48
|
return ({
|
|
44
49
|
display: 'flex',
|
|
45
50
|
justifyContent: 'space-between',
|
|
46
|
-
padding: theme.spacing(0,
|
|
51
|
+
padding: theme.spacing(0, 3, 1.25, 3),
|
|
47
52
|
alignItems: 'center'
|
|
48
53
|
});
|
|
49
54
|
});
|
|
@@ -58,13 +63,13 @@ var UploadCountBox = styled(Box)(function (_a) {
|
|
|
58
63
|
fontSize: theme.typography.overline.fontSize,
|
|
59
64
|
padding: theme.spacing(0.375, 0.75, 0.375, 0.75),
|
|
60
65
|
borderRadius: theme.spacing(5.625),
|
|
61
|
-
backgroundColor: alpha(theme.palette.secondary.main, 0.4)
|
|
66
|
+
backgroundColor: alpha(theme.palette.secondary.main, 0.4),
|
|
67
|
+
color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary
|
|
62
68
|
});
|
|
63
69
|
});
|
|
64
70
|
var UploadMultipleFile = function (_a) {
|
|
65
71
|
var id = _a.id, label = _a.label, control = _a.control, required = _a.required, fileType = _a.fileType, title = _a.title, subTitle = _a.subTitle, dragDescription = _a.dragDescription, uploadingTitle = _a.uploadingTitle, successTitle = _a.successTitle, isSubmitting = _a.isSubmitting, onFileUploaded = _a.onFileUploaded, fileUploadingStatus = _a.fileUploadingStatus, onDeleteFile = _a.onDeleteFile, maxLimit = _a.maxLimit, purpose = _a.purpose, fileTitle = _a.fileTitle, defaultFiles = _a.defaultFiles, readOnly = _a.readOnly, isVerified = _a.isVerified;
|
|
66
72
|
var t = useTranslation().t;
|
|
67
|
-
var theme = useTheme();
|
|
68
73
|
var _b = React.useState(''), error = _b[0], setError = _b[1];
|
|
69
74
|
var fileControl = useController({ name: "".concat(id, "File"), control: control });
|
|
70
75
|
var fileInfoControl = useController({ name: "".concat(id, "FileInfo"), control: control });
|
|
@@ -169,10 +174,10 @@ var UploadMultipleFile = function (_a) {
|
|
|
169
174
|
}
|
|
170
175
|
};
|
|
171
176
|
var fileExists = fileInfoArray.length > 0;
|
|
172
|
-
return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: _jsxs(_Fragment, { children: [label, required && _jsx(Mandatory, {})] }) }), _jsx(Collapse, __assign({ in: !!uploadedFileCount, timeout: 100, unmountOnExit: true }, { children: _jsx(UploadCountBox, { children: "".concat(uploadedFileCount, " ").concat(t('uploaded_file')) }) }))] }), _jsx(Collapse, __assign({ in: fileExists, timeout: 300 }, { children: (fileArray || []).map(function (file, index) {
|
|
173
|
-
return (_jsx(UploadFile, { readOnly: readOnly, required: required, purpose: purpose, fileType: fileType, title: fileTitle, isVerified: isVerified && (defaultFiles === null || defaultFiles === void 0 ? void 0 : defaultFiles.length) === uploadedFileCount, isSubmitting: isSubmitting, uploadedFiles: fileInfoArray, index: index, file: file, sx: {
|
|
174
|
-
|
|
177
|
+
return (_jsxs(FeatureStyled, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, __assign({ hasError: !!error }, { children: _jsxs(_Fragment, { children: [label, required && _jsx(Mandatory, {})] }) })), _jsx(Collapse, __assign({ in: !!uploadedFileCount, timeout: 100, unmountOnExit: true }, { children: _jsx(UploadCountBox, { children: "".concat(uploadedFileCount, " ").concat(t('uploaded_file')) }) }))] }), _jsx(Collapse, __assign({ in: fileExists, timeout: 300 }, { children: (fileArray || []).map(function (file, index) {
|
|
178
|
+
return (_jsx(UploadFile, { label: label, readOnly: readOnly, required: required, purpose: purpose, fileType: fileType, title: fileTitle, isVerified: isVerified && (defaultFiles === null || defaultFiles === void 0 ? void 0 : defaultFiles.length) === uploadedFileCount, isSubmitting: isSubmitting, uploadedFiles: fileInfoArray, index: index, file: file, sx: {
|
|
179
|
+
mb: index === fileArray.length - 1 ? 0 : 1
|
|
175
180
|
}, onSuccess: handleSuccess, onDelete: handleDelete, onUpdate: handleUpdate }, index));
|
|
176
|
-
}) })), _jsx(Collapse, __assign({ in: !readOnly }, { children: _jsx(InputContainerStyled, __assign({ sx: { mt:
|
|
181
|
+
}) })), _jsx(Collapse, __assign({ in: !readOnly }, { children: _jsx(InputContainerStyled, __assign({ sx: { mt: 1.25 } }, { children: _jsx(DragAndDrop, { title: title, subTitle: subTitle, description: dragDescription, fileExists: fileExists, uploadingTitle: uploadingTitle, successTitle: successTitle, onSuccess: handleFileChange, multiple: true, error: error }) })) }))] }));
|
|
177
182
|
};
|
|
178
183
|
export default UploadMultipleFile;
|
|
@@ -31,12 +31,12 @@ var SignIn = memo(function (props) {
|
|
|
31
31
|
useAppConfig(__assign({ navigation: SigIn_SCREENS_NAVIGATION }, props));
|
|
32
32
|
useErrorListener(signInError || error);
|
|
33
33
|
useStepStartedListener();
|
|
34
|
-
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open,
|
|
35
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: settingLoading, breakpoint: 'sm', screenId: activeScreen.name,
|
|
34
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, isMaturityExpress = data.isMaturityExpress;
|
|
35
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: settingLoading }, { children: _jsx(AnimationFlow, __assign({ countries: data.tapCountries, pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: settingLoading, breakpoint: 'sm', screenId: activeScreen.name, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, { children: signInFeatureScreens.map(function (_a, index) {
|
|
36
36
|
var Element = _a.element, name = _a.name;
|
|
37
37
|
var isActive = activeScreen.name === name;
|
|
38
38
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
39
|
-
}) })
|
|
39
|
+
}) }) })) })) })));
|
|
40
40
|
});
|
|
41
41
|
export function SignInElement(props) {
|
|
42
42
|
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(SignIn, __assign({}, props)) })));
|
|
@@ -37,6 +37,7 @@ import Input from '../../../shared/Input';
|
|
|
37
37
|
import SimpleList from '../../../../components/SimpleList';
|
|
38
38
|
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
39
39
|
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
40
|
+
import { ThemeMode } from '../../../../@types';
|
|
40
41
|
import Search from '../../../shared/Search';
|
|
41
42
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
42
43
|
var theme = _a.theme;
|
|
@@ -53,15 +54,15 @@ var CountryCodeText = styled(Text, {
|
|
|
53
54
|
shouldForwardProp: function (prop) { return prop !== 'isSelected'; }
|
|
54
55
|
})(function (_a) {
|
|
55
56
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
56
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { width: theme.spacing(10), textAlign: 'start', fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
|
|
57
|
+
return (__assign(__assign({ color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { width: theme.spacing(10), textAlign: 'start', fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight }));
|
|
57
58
|
});
|
|
58
59
|
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
59
60
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
60
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
61
|
+
return (__assign(__assign({ color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
61
62
|
});
|
|
62
63
|
var CountryCodeStyled = styled(Text)(function (_a) {
|
|
63
64
|
var theme = _a.theme;
|
|
64
|
-
return (__assign(__assign({ cursor: 'pointer' }, theme.typography.body2), { fontWeight: theme.typography.fontWeightRegular, display: 'flex', alignItems: 'center', minWidth: theme.spacing(8.75) }));
|
|
65
|
+
return (__assign(__assign({ cursor: 'pointer', color: theme.palette.mode === ThemeMode.DARK ? theme.palette.common.white : theme.palette.text.primary }, theme.typography.body2), { fontWeight: theme.typography.fontWeightRegular, display: 'flex', alignItems: 'center', minWidth: theme.spacing(8.75) }));
|
|
65
66
|
});
|
|
66
67
|
var InputLabelStyled = styled(Text)(function (_a) {
|
|
67
68
|
var theme = _a.theme;
|
|
@@ -70,7 +71,9 @@ var InputLabelStyled = styled(Text)(function (_a) {
|
|
|
70
71
|
var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
|
|
71
72
|
var theme = _a.theme;
|
|
72
73
|
return ({
|
|
73
|
-
marginInlineStart: theme.spacing(1)
|
|
74
|
+
marginInlineStart: theme.spacing(1),
|
|
75
|
+
width: theme.spacing(0.875),
|
|
76
|
+
height: theme.spacing(0.875)
|
|
74
77
|
});
|
|
75
78
|
});
|
|
76
79
|
var InputStyled = styled(Input)(function () { return ({
|
|
@@ -43,7 +43,7 @@ var Tax = memo(function (_a) {
|
|
|
43
43
|
useAppConfig(__assign(__assign({ navigation: TAX_SCREENS_NAVIGATION }, props), { disableSettingFetching: !!verifyToken }));
|
|
44
44
|
useErrorListener(taxError || error);
|
|
45
45
|
useStepStartedListener();
|
|
46
|
-
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation,
|
|
46
|
+
var activeScreen = data.activeScreen, isTapOrigin = data.isTapOrigin, open = data.open, featureScreensNavigation = data.featureScreensNavigation, isMaturityExpress = data.isMaturityExpress;
|
|
47
47
|
React.useEffect(function () {
|
|
48
48
|
sendPageView({
|
|
49
49
|
title: 'Tax'
|
|
@@ -58,11 +58,11 @@ var Tax = memo(function (_a) {
|
|
|
58
58
|
settingLoading: settingLoading
|
|
59
59
|
});
|
|
60
60
|
var initialLoading = verifyToken ? settingLoading : settingLoading || customLoading;
|
|
61
|
-
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: initialLoading, breakpoint: 'sm', screenId: activeScreen.name,
|
|
61
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Background, __assign({ open: open, isTapOrigin: isTapOrigin, loading: initialLoading }, { children: _jsx(AnimationFlow, __assign({ countries: data.tapCountries, pointerEvents: loading ? 'none' : 'auto', isTapOrigin: isTapOrigin, open: open, error: error, loading: initialLoading, breakpoint: 'sm', screenId: activeScreen.name, isMaturityExpress: isMaturityExpress }, { children: _jsx(FeatureContainer, { children: taxFeatureScreens.map(function (_a, index) {
|
|
62
62
|
var Element = _a.element, name = _a.name;
|
|
63
63
|
var isActive = activeScreen.name === name;
|
|
64
64
|
return (_jsx(Collapse, __assign({ in: isActive, timeout: { enter: 1000, exit: 800 } }, { children: _jsx(Element, {}) }), index));
|
|
65
|
-
}) })
|
|
65
|
+
}) }) })) })) })));
|
|
66
66
|
});
|
|
67
67
|
export function TaxElement(props) {
|
|
68
68
|
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Tax, __assign({}, props)) })));
|
|
@@ -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 { taxSelector } from '../../../app/tax/taxStore';
|
|
@@ -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);
|