@tap-payments/auth-jsconnect 2.3.6-test → 2.3.6
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 +303 -1
- package/build/@types/app.js +17 -0
- package/build/@types/form.d.ts +10 -7
- package/build/@types/redux.d.ts +4 -0
- package/build/@types/user.d.ts +39 -3
- package/build/api/brand.d.ts +7 -0
- package/build/api/brand.js +10 -1
- package/build/api/data.d.ts +8 -0
- package/build/api/data.js +34 -2
- package/build/api/entity.d.ts +20 -5
- package/build/api/entity.js +26 -1
- package/build/api/index.d.ts +29 -5
- package/build/api/index.js +3 -1
- package/build/api/individual.d.ts +24 -6
- package/build/api/individual.js +9 -1
- package/build/api/init.d.ts +17 -0
- package/build/api/init.js +13 -0
- package/build/api/lead.d.ts +8 -1
- package/build/api/lead.js +9 -1
- package/build/app/settings.d.ts +12 -9
- package/build/app/settings.js +77 -34
- package/build/assets/locales/ar.json +28 -1
- package/build/assets/locales/en.json +28 -1
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -2
- package/build/components/AnimationFlow/AnimationFlow.js +4 -4
- package/build/components/AnimationFlow/BottomSheet.d.ts +4 -1
- package/build/components/AnimationFlow/BottomSheet.js +43 -19
- package/build/components/AnimationFlow/Dialog.d.ts +4 -2
- package/build/components/AnimationFlow/Dialog.js +30 -7
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +5 -2
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +45 -23
- package/build/components/ArabicDatePicker/arabicAr.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicAr.js +32 -0
- package/build/components/ArabicDatePicker/arabicEn.d.ts +8 -0
- package/build/components/ArabicDatePicker/arabicEn.js +32 -0
- package/build/components/ArabicDatePicker/style.css +45 -5
- package/build/components/DatePicker/DatePicker.d.ts +4 -1
- package/build/components/DatePicker/DatePicker.js +27 -17
- package/build/components/LogoBadge/LogoBadge.js +3 -0
- package/build/components/RadioGroup/RadioGroup.d.ts +5 -2
- package/build/components/RadioGroup/RadioGroup.js +5 -9
- package/build/components/RadioGroup/index.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.d.ts +5 -2
- package/build/components/SimpleList/SimpleList.js +31 -11
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/constants/api.d.ts +7 -0
- package/build/constants/api.js +14 -1
- package/build/constants/app.d.ts +45 -0
- package/build/constants/app.js +101 -52
- package/build/constants/assets.d.ts +9 -0
- package/build/constants/assets.js +9 -0
- package/build/constants/validation.d.ts +3 -2
- package/build/constants/validation.js +3 -2
- package/build/features/app/bank/bankStore.d.ts +7 -3
- package/build/features/app/bank/bankStore.js +155 -115
- package/build/features/app/brand/brandStore.d.ts +32 -12
- package/build/features/app/brand/brandStore.js +384 -203
- package/build/features/app/business/businessStore.d.ts +16 -13
- package/build/features/app/business/businessStore.js +364 -295
- package/build/features/app/connect/connectStore.d.ts +15 -1
- package/build/features/app/connect/connectStore.js +292 -95
- package/build/features/app/connectExpress/connectExpressStore.d.ts +17 -3
- package/build/features/app/connectExpress/connectExpressStore.js +232 -100
- package/build/features/app/entity/entityStore.d.ts +15 -17
- package/build/features/app/entity/entityStore.js +279 -248
- package/build/features/app/individual/individualStore.d.ts +22 -10
- package/build/features/app/individual/individualStore.js +531 -418
- package/build/features/app/password/passwordStore.d.ts +4 -0
- package/build/features/app/password/passwordStore.js +99 -43
- package/build/features/app/tax/taxStore.d.ts +6 -2
- package/build/features/app/tax/taxStore.js +143 -101
- package/build/features/bank/Bank.js +10 -6
- package/build/features/bank/screens/BankDetails/BankDetails.js +43 -17
- package/build/features/bank/screens/BankDetails/BankName.d.ts +5 -1
- package/build/features/bank/screens/BankDetails/BankName.js +9 -9
- package/build/features/bank/screens/BankDetails/BankStatement.d.ts +5 -1
- package/build/features/bank/screens/BankDetails/BankStatement.js +7 -10
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +3 -1
- package/build/features/bank/screens/BankDetails/Beneficiary.js +6 -7
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.d.ts +4 -1
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +12 -13
- package/build/features/bank/screens/BankDetails/IBAN.d.ts +3 -1
- package/build/features/bank/screens/BankDetails/IBAN.js +3 -5
- package/build/features/bank/screens/BankDetails/validation.d.ts +8 -8
- package/build/features/bank/screens/BankDetails/validation.js +6 -17
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/bank/screens/Verify/OTPInput.js +5 -3
- package/build/features/bank/screens/Verify/Verify.js +1 -5
- package/build/features/brand/Brand.js +10 -6
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +10 -27
- package/build/features/brand/screens/BrandActivities/ActivitiesList.js +45 -28
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +41 -9
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +11 -38
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +22 -31
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.d.ts +3 -1
- package/build/features/brand/screens/BrandActivities/ExpectedCustomers.js +24 -20
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.d.ts +3 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +31 -19
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +13 -6
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +23 -12
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +14 -2
- package/build/features/brand/screens/BrandActivities/TAC.js +21 -12
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.d.ts +4 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +18 -4
- package/build/features/brand/screens/BrandActivities/validation.d.ts +43 -43
- package/build/features/brand/screens/BrandActivities/validation.js +11 -25
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +40 -33
- package/build/features/brand/screens/BrandInfo/BrandLogo.d.ts +9 -0
- package/build/features/brand/screens/BrandInfo/BrandLogo.js +41 -0
- package/build/features/brand/screens/BrandInfo/BrandName.d.ts +3 -2
- package/build/features/brand/screens/BrandInfo/BrandName.js +4 -7
- package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +2 -1
- package/build/features/brand/screens/BrandInfo/SalesChannels.js +19 -25
- package/build/features/brand/screens/BrandInfo/validation.d.ts +7 -13
- package/build/features/brand/screens/BrandInfo/validation.js +43 -53
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.d.ts +5 -0
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +102 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentLocations.js +69 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentProfits.js +69 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.d.ts +10 -0
- package/build/features/brand/screens/BrandSegmentInfo/SegmentTechs.js +69 -0
- package/build/features/{connect/screens/Merchant → brand/screens/BrandSegmentInfo}/TeamSize.d.ts +3 -1
- package/build/features/brand/screens/{BrandInfo → BrandSegmentInfo}/TeamSize.js +20 -25
- package/build/features/brand/screens/BrandSegmentInfo/index.d.ts +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/index.js +2 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.d.ts +17 -0
- package/build/features/brand/screens/BrandSegmentInfo/validation.js +9 -0
- package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/brand/screens/Verify/OTPInput.js +5 -3
- package/build/features/brand/screens/Verify/Verify.js +7 -20
- package/build/features/business/Business.js +7 -5
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +15 -68
- package/build/features/business/screens/Activities/ActivitiesList.js +226 -98
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +2 -2
- package/build/features/business/screens/Activities/OperationStartDate.js +3 -3
- package/build/features/business/screens/Activities/validation.d.ts +165 -30
- package/build/features/business/screens/Activities/validation.js +5 -2
- package/build/features/business/screens/BrandDetails/BrandDetails.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/BrandDetails.js +39 -0
- package/build/features/business/screens/BrandDetails/BrandName.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/BrandName.js +36 -0
- package/build/features/business/screens/BrandDetails/Header.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/Header.js +49 -0
- package/build/features/business/screens/BrandDetails/LicenseInfo.d.ts +5 -0
- package/build/features/business/screens/BrandDetails/LicenseInfo.js +38 -0
- package/build/features/{brand/screens/BrandActivities/OperationStartDate.d.ts → business/screens/BrandDetails/SalesChannel.d.ts} +5 -7
- package/build/features/business/screens/BrandDetails/SalesChannel.js +48 -0
- package/build/features/business/screens/BrandDetails/index.d.ts +3 -0
- package/build/features/business/screens/BrandDetails/index.js +2 -0
- package/build/features/business/screens/BusinessType/Article.d.ts +3 -1
- package/build/features/business/screens/BusinessType/Article.js +19 -54
- package/build/features/business/screens/BusinessType/BusinessType.js +35 -11
- package/build/features/business/screens/BusinessType/EntityLicenseList.d.ts +9 -0
- package/build/features/business/screens/BusinessType/EntityLicenseList.js +129 -0
- package/build/features/business/screens/BusinessType/EntityName.js +6 -7
- package/build/features/business/screens/BusinessType/LicenseCertificate.js +2 -1
- package/build/features/business/screens/BusinessType/LicenseList.d.ts +1 -0
- package/build/features/business/screens/BusinessType/LicenseList.js +7 -22
- package/build/features/business/screens/BusinessType/LicenseNumber.d.ts +1 -2
- package/build/features/business/screens/BusinessType/LicenseNumber.js +7 -5
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +2 -2
- package/build/features/business/screens/BusinessType/validation.js +2 -2
- package/build/features/business/screens/CivilID/IDNumber.js +2 -3
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +44 -37
- package/build/features/business/screens/Customers/CustomerLocations.js +35 -19
- package/build/features/business/screens/Customers/Customers.js +27 -16
- package/build/features/business/screens/Customers/ExpectedCustomers.js +12 -4
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +14 -6
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +5 -5
- package/build/features/business/screens/Customers/RefundPolicy.js +15 -4
- package/build/features/business/screens/Customers/TransactionPolicy.js +19 -9
- package/build/features/business/screens/IDBOD/DOB.js +3 -3
- package/build/features/business/screens/IDBOD/ID.js +2 -3
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +8 -3
- package/build/features/business/screens/Verify/OTPInput.js +5 -3
- package/build/features/connect/Connect.d.ts +2 -0
- package/build/features/connect/Connect.js +86 -11
- package/build/features/connect/screens/BrandSegment/BrandSegment.d.ts +5 -0
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +84 -0
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +8 -0
- package/build/features/connect/screens/{Merchant/Segments.js → BrandSegment/SegmentLocations.js} +17 -25
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +8 -0
- package/build/features/{brand/screens/BrandInfo/Segments.js → connect/screens/BrandSegment/SegmentProfits.js} +18 -26
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +8 -0
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +66 -0
- package/build/features/connect/screens/{Merchant → BrandSegment}/TeamSize.js +12 -20
- package/build/features/connect/screens/BrandSegment/index.d.ts +3 -0
- package/build/features/connect/screens/BrandSegment/index.js +2 -0
- package/build/features/connect/screens/BrandSegment/validation.d.ts +17 -0
- package/build/features/connect/screens/BrandSegment/validation.js +9 -0
- package/build/features/connect/screens/CivilID/CivilID.js +5 -13
- package/build/features/connect/screens/CivilID/IDNumber.js +5 -6
- package/build/features/connect/screens/Individual/Email.js +17 -27
- package/build/features/connect/screens/Individual/Individual.js +8 -1
- package/build/features/connect/screens/Individual/MobileNumber.js +16 -15
- package/build/features/connect/screens/Individual/Name.js +11 -15
- package/build/features/connect/screens/Merchant/BrandList.js +4 -22
- package/build/features/connect/screens/Merchant/BrandName.js +4 -7
- package/build/features/connect/screens/Merchant/Merchant.js +13 -15
- package/build/features/connect/screens/Merchant/SalesChannels.js +6 -6
- package/build/features/connect/screens/Merchant/validation.d.ts +3 -6
- package/build/features/connect/screens/Merchant/validation.js +14 -17
- package/build/features/connect/screens/Mobile/Mobile.js +13 -16
- package/build/features/connect/screens/Mobile/MobileNumber.js +14 -10
- package/build/features/connect/screens/NID/DOB.js +3 -3
- package/build/features/connect/screens/NID/IDNumber.js +6 -7
- package/build/features/connect/screens/NID/NID.js +6 -0
- package/build/features/connect/screens/OTP/OTP.js +13 -15
- package/build/features/connect/screens/OTP/OTPInput.js +10 -0
- package/build/features/connect/screens/ThankYou/ThankYou.js +17 -2
- package/build/features/connectExpress/ConnectExpress.d.ts +1 -0
- package/build/features/connectExpress/ConnectExpress.js +72 -12
- package/build/features/connectExpress/screens/Brand/Brand.js +1 -1
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +6 -7
- package/build/features/connectExpress/screens/CivilIDMissed/IDNumber.js +6 -7
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -7
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +7 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +9 -14
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +4 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -3
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +4 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +14 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.js +9 -10
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +4 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +11 -6
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Email.js +6 -14
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +6 -2
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.d.ts +2 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/Name.js +3 -4
- package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +2 -2
- package/build/features/connectExpress/screens/Mobile/Mobile.js +4 -3
- package/build/features/connectExpress/screens/Mobile/MobileNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +6 -2
- package/build/features/connectExpress/screens/Mobile/TAC.d.ts +2 -1
- package/build/features/connectExpress/screens/Mobile/TAC.js +3 -1
- package/build/features/connectExpress/screens/NID/DOB.d.ts +2 -1
- package/build/features/connectExpress/screens/NID/DOB.js +3 -3
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +3 -4
- package/build/features/connectExpress/screens/NID/NID.js +4 -2
- package/build/features/connectExpress/screens/NID/TAC.d.ts +14 -1
- package/build/features/connectExpress/screens/NID/TAC.js +9 -10
- package/build/features/connectExpress/screens/NIDMissed/DOB.js +2 -2
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +2 -3
- package/build/features/connectExpress/screens/OTP/OTPInput.js +3 -3
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +2 -1
- package/build/features/entity/Entity.js +10 -6
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +16 -68
- package/build/features/entity/screens/EntityCapital/ActivityList.js +221 -106
- package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +3 -1
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +14 -15
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +3 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +10 -11
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +3 -1
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +15 -16
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +31 -20
- package/build/features/entity/screens/EntityCapital/validation.d.ts +175 -40
- package/build/features/entity/screens/EntityCapital/validation.js +9 -12
- package/build/features/entity/screens/EntityName/Article.d.ts +5 -1
- package/build/features/entity/screens/EntityName/Article.js +20 -54
- package/build/features/entity/screens/EntityName/EntityName.js +60 -16
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +11 -27
- package/build/features/entity/screens/EntityName/EntityTypeList.js +32 -43
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +5 -3
- package/build/features/entity/screens/EntityName/ExpiryDate.js +5 -5
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +5 -3
- package/build/features/entity/screens/EntityName/IssuingDate.js +4 -5
- package/build/features/entity/screens/EntityName/LegalName.d.ts +3 -1
- package/build/features/entity/screens/EntityName/LegalName.js +9 -6
- package/build/features/entity/screens/EntityName/LicenseCertificate.d.ts +4 -1
- package/build/features/entity/screens/EntityName/LicenseCertificate.js +13 -7
- package/build/features/entity/screens/EntityName/LicenseNumber.d.ts +3 -1
- package/build/features/entity/screens/EntityName/LicenseNumber.js +13 -11
- package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +3 -1
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +9 -7
- package/build/features/entity/screens/EntityName/validation.d.ts +35 -35
- package/build/features/entity/screens/EntityName/validation.js +68 -93
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/entity/screens/Verify/OTPInput.js +5 -3
- package/build/features/entity/screens/Verify/Verify.js +7 -20
- package/build/features/featuresScreens.js +13 -1
- package/build/features/individual/Individual.js +10 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +54 -23
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.d.ts +7 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/CivilIDFile.js +29 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +3 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +17 -12
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +30 -41
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +94 -55
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +5 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +17 -12
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareCount.js +9 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +13 -7
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.d.ts +4 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SignatureFile.js +14 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +2 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +32 -42
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +8 -12
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualList/MobileNumber.js +0 -1
- package/build/features/individual/screens/IndividualList/UserList.js +10 -6
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCity.js +14 -20
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/BirthCountry.js +8 -14
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/DOB.js +4 -4
- package/build/features/individual/screens/IndividualPersonalInfo/Email.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Email.js +3 -10
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ExpiryDate.js +5 -7
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +5 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.js +5 -2
- package/build/features/individual/screens/IndividualPersonalInfo/ID.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +3 -10
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +79 -36
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/IssuedCountry.js +10 -21
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +14 -16
- package/build/features/individual/screens/IndividualPersonalInfo/Name.d.ts +3 -1
- package/build/features/individual/screens/IndividualPersonalInfo/Name.js +3 -10
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.d.ts +2 -0
- package/build/features/individual/screens/IndividualPersonalInfo/Nationality.js +10 -21
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.d.ts +1 -0
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +6 -3
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +8 -3
- package/build/features/individual/screens/Verify/OTPInput.js +5 -3
- package/build/features/individual/screens/Verify/Verify.js +1 -5
- package/build/features/password/Password.js +7 -5
- package/build/features/password/screens/CreatePassword/CreatePassword.js +9 -16
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +8 -3
- package/build/features/password/screens/Verify/OTPInput.js +5 -3
- package/build/features/password/screens/Verify/Verify.js +7 -20
- package/build/features/shared/Address/CountryList.d.ts +7 -7
- package/build/features/shared/Address/CountryList.js +1 -1
- package/build/features/shared/Address/InputSelect.d.ts +7 -7
- package/build/features/shared/Address/InputSelect.js +1 -1
- package/build/features/shared/Button/Button.d.ts +3 -1
- package/build/features/shared/Button/Button.js +2 -2
- package/build/features/shared/Button/EmailProvidersButtons.js +9 -2
- package/build/features/shared/Button/FlowsButtons.js +22 -20
- package/build/features/shared/Button/IndividualActionButtons.d.ts +3 -1
- package/build/features/shared/Button/IndividualActionButtons.js +28 -4
- package/build/features/shared/Calender/Calender.d.ts +13 -0
- package/build/features/shared/Calender/Calender.js +56 -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 +7 -1
- package/build/features/shared/CheckIcon/CheckIcon.js +7 -6
- package/build/features/shared/Chip/Chip.d.ts +3 -0
- package/build/features/shared/Chip/Chip.js +21 -0
- package/build/features/shared/Chip/index.d.ts +2 -0
- package/build/features/shared/Chip/index.js +2 -0
- package/build/features/shared/Containers/FeatureContainer.d.ts +4 -1
- package/build/features/shared/Containers/FeatureContainer.js +5 -4
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/Dot/Dot.d.ts +8 -0
- package/build/features/shared/Dot/Dot.js +29 -0
- package/build/features/shared/Dot/index.d.ts +2 -0
- package/build/features/shared/Dot/index.js +2 -0
- package/build/features/shared/EndAdornment/EndAdornment.d.ts +10 -0
- package/build/features/shared/EndAdornment/EndAdornment.js +17 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.d.ts +7 -0
- package/build/features/shared/EndAdornment/EndAdornmentExpanded.js +13 -0
- package/build/features/shared/EndAdornment/index.d.ts +3 -0
- package/build/features/shared/EndAdornment/index.js +3 -0
- package/build/features/shared/Footer/Footer.js +8 -0
- package/build/features/shared/Footer/PoweredByFooter.d.ts +9 -0
- package/build/features/shared/Footer/PoweredByFooter.js +36 -0
- package/build/features/shared/Footer/index.d.ts +3 -2
- package/build/features/shared/Footer/index.js +3 -2
- package/build/features/shared/GenericError/GenericError.js +1 -1
- package/build/features/shared/Input/Input.d.ts +5 -6
- package/build/features/shared/Input/Input.js +2 -3
- package/build/features/shared/Input/index.d.ts +2 -1
- package/build/features/shared/InputSelect/InputSelect.d.ts +4 -0
- package/build/features/shared/InputSelect/InputSelect.js +33 -0
- package/build/features/shared/InputSelect/index.d.ts +2 -0
- package/build/features/shared/InputSelect/index.js +2 -0
- package/build/features/shared/OTP/OTP.d.ts +2 -1
- package/build/features/shared/OTP/OTP.js +2 -2
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.d.ts +3 -1
- package/build/features/shared/SalesChannels/SaleChannelIconsInput.js +8 -6
- package/build/features/shared/SalesChannels/SalesChannel.d.ts +3 -1
- package/build/features/shared/SalesChannels/SalesChannel.js +9 -4
- package/build/features/shared/Search/Search.d.ts +2 -1
- package/build/features/shared/Search/Search.js +2 -2
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +19 -8
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +3 -1
- package/build/features/shared/SuccessScreen/SuccessScreen.js +3 -2
- package/build/features/shared/UploadFile/FileUpload.d.ts +32 -0
- package/build/features/shared/UploadFile/FileUpload.js +267 -0
- package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadFile.js +7 -7
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +36 -0
- package/build/features/shared/UploadFile/UploadWrapper.js +115 -0
- package/build/features/shared/UploadFile/index.d.ts +2 -1
- package/build/features/shared/UploadFile/index.js +2 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +8 -27
- package/build/features/shared/UploadMultipleFile/UploadFile.js +59 -58
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +7 -3
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.js +11 -17
- package/build/features/signIn/SignIn.js +3 -4
- package/build/features/tax/Tax.js +10 -6
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -4
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.d.ts +4 -1
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +12 -12
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +23 -10
- package/build/features/tax/screens/TaxDetails/TaxDocument.d.ts +4 -1
- package/build/features/tax/screens/TaxDetails/TaxDocument.js +7 -5
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +5 -1
- package/build/features/tax/screens/TaxDetails/VATId.js +6 -10
- package/build/features/tax/screens/TaxDetails/validation.d.ts +4 -4
- package/build/features/tax/screens/TaxDetails/validation.js +2 -5
- package/build/features/tax/screens/Verify/OTPInput.js +5 -3
- package/build/features/tax/screens/Verify/Verify.js +6 -22
- package/build/hooks/index.d.ts +5 -0
- package/build/hooks/index.js +5 -0
- package/build/hooks/useAppConfig.d.ts +4 -2
- package/build/hooks/useAppConfig.js +18 -16
- package/build/hooks/useDataNoneEditable.d.ts +2 -0
- package/build/hooks/useDataNoneEditable.js +19 -0
- package/build/hooks/useDataVerified.d.ts +6 -0
- package/build/hooks/useDataVerified.js +19 -0
- package/build/hooks/useErrorListener.d.ts +2 -1
- package/build/hooks/useErrorListener.js +16 -1
- package/build/hooks/useExcludeReadOnlyFelids.d.ts +11 -0
- package/build/hooks/useExcludeReadOnlyFelids.js +33 -0
- package/build/hooks/useFormErrorAndUpdateReadOnly.d.ts +6 -0
- package/build/hooks/useFormErrorAndUpdateReadOnly.js +48 -0
- package/build/hooks/useFormReadOnly.d.ts +6 -0
- package/build/hooks/useFormReadOnly.js +40 -0
- package/build/hooks/useVerifyToken.js +1 -1
- package/build/theme/shadows.js +1 -1
- package/build/utils/array.d.ts +14 -2
- package/build/utils/array.js +196 -4
- package/build/utils/common.d.ts +1 -0
- package/build/utils/common.js +10 -0
- package/build/utils/date.d.ts +1 -0
- package/build/utils/date.js +6 -0
- package/build/utils/error.d.ts +1 -0
- package/build/utils/error.js +3 -0
- package/build/utils/gtm.d.ts +6 -0
- package/build/utils/gtm.js +29 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +1 -0
- package/build/utils/object.d.ts +4 -0
- package/build/utils/object.js +17 -0
- package/build/utils/string.d.ts +5 -2
- package/build/utils/string.js +28 -7
- package/package.json +4 -2
- package/build/features/brand/screens/BrandActivities/OperationStartDate.js +0 -45
- package/build/features/brand/screens/BrandInfo/Segments.d.ts +0 -8
- package/build/features/connect/screens/Merchant/Segments.d.ts +0 -8
- /package/build/features/{brand/screens/BrandInfo → connect/screens/BrandSegment}/TeamSize.d.ts +0 -0
|
@@ -40,7 +40,7 @@ import MobileNumber from './MobileNumber';
|
|
|
40
40
|
import { countriesCode } from '../../../../constants';
|
|
41
41
|
import { AuthForType } from '../../../../@types';
|
|
42
42
|
import Collapse from '../../../../components/Collapse';
|
|
43
|
-
import { isKW } from '../../../../utils';
|
|
43
|
+
import { isKW, sendCustomEventToGTM } from '../../../../utils';
|
|
44
44
|
var FormStyled = styled(Form)(function () { return ({
|
|
45
45
|
display: 'flex',
|
|
46
46
|
flexDirection: 'column',
|
|
@@ -67,6 +67,13 @@ var Individual = function (_a) {
|
|
|
67
67
|
mode: 'onChange'
|
|
68
68
|
});
|
|
69
69
|
useSetFromDefaultValues(methods, individualData, true);
|
|
70
|
+
React.useEffect(function () {
|
|
71
|
+
sendCustomEventToGTM({
|
|
72
|
+
event: 'Send Event',
|
|
73
|
+
event_category: 'User Registration Flow',
|
|
74
|
+
event_action: 'Name and Email Page Viewed'
|
|
75
|
+
});
|
|
76
|
+
}, []);
|
|
70
77
|
React.useEffect(function () {
|
|
71
78
|
if (defaultValues.countryCode.iso2 !== methods.getValues('countryCode.iso2'))
|
|
72
79
|
methods.setValue('countryCode', defaultValues.countryCode);
|
|
@@ -35,8 +35,9 @@ import ExpandIcon from '../../../../components/ExpandIcon';
|
|
|
35
35
|
import Input from '../../../shared/Input';
|
|
36
36
|
import SimpleList from '../../../../components/SimpleList';
|
|
37
37
|
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
38
|
-
import { useLanguage } from '../../../../hooks';
|
|
38
|
+
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
39
39
|
import Search from '../../../shared/Search';
|
|
40
|
+
import { connectSelector } from '../../../app/connect/connectStore';
|
|
40
41
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
41
42
|
var theme = _a.theme;
|
|
42
43
|
return ({
|
|
@@ -72,23 +73,21 @@ var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
|
|
|
72
73
|
marginInlineStart: theme.spacing(1)
|
|
73
74
|
});
|
|
74
75
|
});
|
|
75
|
-
var InputStyled = styled(Input)(function (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
76
|
+
var InputStyled = styled(Input)(function () { return ({
|
|
77
|
+
direction: 'ltr',
|
|
78
|
+
'& .MuiInputBase-input': {
|
|
79
|
+
cursor: 'auto'
|
|
80
|
+
}
|
|
81
|
+
}); });
|
|
84
82
|
var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
85
|
-
var _b, _c, _d;
|
|
83
|
+
var _b, _c, _d, _e, _f;
|
|
86
84
|
var countries = _a.countries, rest = __rest(_a, ["countries"]);
|
|
87
|
-
var
|
|
88
|
-
var
|
|
85
|
+
var _g = React.useState(countries || []), countriesCode = _g[0], setCountries = _g[1];
|
|
86
|
+
var _h = React.useState(null), anchorEl = _h[0], setAnchorEl = _h[1];
|
|
89
87
|
var t = useTranslation().t;
|
|
90
88
|
var isAr = useLanguage().isAr;
|
|
91
|
-
var
|
|
89
|
+
var _j = useFormContext(), control = _j.control, setValue = _j.setValue;
|
|
90
|
+
var data = useAppSelector(connectSelector).data;
|
|
92
91
|
var phoneControl = useController({ name: 'mobile', control: control });
|
|
93
92
|
var countryCodeControl = useController({ name: 'countryCode', control: control });
|
|
94
93
|
var countryCodeValue = countryCodeControl.field.value;
|
|
@@ -99,6 +98,8 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
99
98
|
var mobileLen = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.digits;
|
|
100
99
|
var isStartsWith5 = mobileValue.startsWith('5');
|
|
101
100
|
var requiredLen = isSA && isStartsWith5 ? mobileLen - 1 : mobileLen;
|
|
101
|
+
var _k = ((_f = (_e = data.otpData.responseBody) === null || _e === void 0 ? void 0 : _e.contact) === null || _f === void 0 ? void 0 : _f.phone) || {}, number = _k.number, country_code = _k.country_code;
|
|
102
|
+
var readOnly = number && country_code && !error;
|
|
102
103
|
React.useEffect(function () {
|
|
103
104
|
if (mobileValue)
|
|
104
105
|
setValue('mobile', mobileValue, { shouldValidate: true });
|
|
@@ -145,7 +146,7 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
145
146
|
});
|
|
146
147
|
setCountries(filteredCountries);
|
|
147
148
|
};
|
|
148
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { mb: 3 } }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('signup_enter_mobile') }) }), _jsx(InputStyled, { inputProps: { maxLength: requiredLen }, type: 'tel',
|
|
149
|
+
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { mb: 3 } }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('signup_enter_mobile') }) }), _jsx(InputStyled, { inputProps: { maxLength: requiredLen }, type: 'tel', readOnly: !!anchorEl || readOnly, onClick: onCloseCountryList, onChange: onPhoneNumberChange, value: !!anchorEl ? countryName : mobileValue, startAdornment: _jsxs(CountryCodeStyled, __assign({ onClick: readOnly ? undefined : function () { return toggleCountryList(); } }, { children: ["+".concat(countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix), !anchorEl && _jsx(ExpandIconStyled, { anchorEl: !!anchorEl })] })), endAdornment: !!anchorEl ? (_jsx(ExpandIconStyled, { onClick: function () { return toggleCountryList(); }, anchorEl: !!anchorEl })) : !error && mobileValue ? (_jsx(CheckIcon, {})) : (mobileValue && _jsx(ClearIcon, { onClick: clearMobileNumber })), placeholder: "".concat(isSA ? '5' : '0', "00000000"), warningType: 'alert', warningMessage: error && t(error, { length: requiredLen, number: '05|5' }) }), _jsxs(Collapse, __assign({ in: !!anchorEl }, { children: [_jsx(Search, { onSearchValue: handleSearch }), _jsx(SimpleList, { searchKeyPath: 'name.english', list: countriesCode, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
149
150
|
return (_jsxs(_Fragment, { children: [_jsxs(CountryItemContainer, { children: [_jsxs(CountryCodeText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: ["+", item.idd_prefix] })), _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english }))] }), item.idd_prefix === (countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.idd_prefix) && _jsx(CheckIcon, {})] }));
|
|
150
151
|
} })] }))] })) })));
|
|
151
152
|
});
|
|
@@ -12,22 +12,18 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
16
|
-
import Input from '../../../shared/Input';
|
|
17
|
-
import { removeAllOtherThanAlphabetAndSpace } from '../../../../utils';
|
|
18
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
19
|
-
import ClearIcon from '../../../shared/ClearIcon';
|
|
20
|
-
import CheckIcon from '../../../shared/CheckIcon';
|
|
21
|
-
import Collapse from '../../../../components/Collapse';
|
|
22
16
|
import { styled } from '@mui/material/styles';
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
import { ScreenContainer } from '../../../shared/Containers';
|
|
18
|
+
import Collapse from '../../../../components/Collapse';
|
|
19
|
+
import { removeAllOtherThanAlphabetAndSpace } from '../../../../utils';
|
|
20
|
+
import Input from '../../../shared/Input';
|
|
21
|
+
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
22
|
+
var InputStyled = styled(Input)(function () { return ({
|
|
23
|
+
input: {
|
|
24
|
+
textTransform: 'capitalize'
|
|
25
|
+
}
|
|
26
|
+
}); });
|
|
31
27
|
var Name = function (_a) {
|
|
32
28
|
var _b;
|
|
33
29
|
var show = _a.show;
|
|
@@ -43,6 +39,6 @@ var Name = function (_a) {
|
|
|
43
39
|
var clearNumber = function () {
|
|
44
40
|
nameControl.field.onChange('');
|
|
45
41
|
};
|
|
46
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mb: 3, mt: 2.5 } }, { children: _jsx(InputStyled, { label: t('signup_merchant_name_label'), value: nameValue, onChange: handleNameChange, placeholder: t('signup_merchant_name_label'), warningType: 'alert', warningMessage: error && t(error), endAdornment:
|
|
42
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsx(ScreenContainer, __assign({ sx: { mb: 3, mt: 2.5 } }, { children: _jsx(InputStyled, { label: t('signup_merchant_name_label'), value: nameValue, onChange: handleNameChange, placeholder: t('signup_merchant_name_label'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: nameValue, error: error, onClear: clearNumber }) }) })) })));
|
|
47
43
|
};
|
|
48
44
|
export default React.memo(Name);
|
|
@@ -21,26 +21,20 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import { connectSelector } from '../../../app/connect/connectStore';
|
|
25
24
|
import * as React from 'react';
|
|
26
25
|
import { useTranslation } from 'react-i18next';
|
|
27
26
|
import { useFormContext, useController } from 'react-hook-form';
|
|
28
27
|
import Box from '@mui/material/Box';
|
|
29
28
|
import { styled } from '@mui/material/styles';
|
|
30
|
-
import {
|
|
29
|
+
import { useLanguage } from '../../../../hooks';
|
|
31
30
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
32
|
-
import
|
|
31
|
+
import InputSelect from '../../../shared/InputSelect';
|
|
33
32
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
34
33
|
import SimpleList from '../../../../components/SimpleList';
|
|
35
34
|
import Text from '../../../../components/Text';
|
|
36
35
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
37
36
|
import Collapse from '../../../../components/Collapse';
|
|
38
37
|
import { mapSalesChannel } from '../../../../utils';
|
|
39
|
-
var InputStyled = styled(Input)(function () { return ({
|
|
40
|
-
'& .MuiInputBase-input': {
|
|
41
|
-
cursor: 'pointer'
|
|
42
|
-
}
|
|
43
|
-
}); });
|
|
44
38
|
var BrandContainer = styled(Box)(function () { return ({
|
|
45
39
|
display: 'flex'
|
|
46
40
|
}); });
|
|
@@ -53,9 +47,7 @@ var BrandList = function (_a) {
|
|
|
53
47
|
var _b = React.useState(null), anchorEl = _b[0], setAnchorEl = _b[1];
|
|
54
48
|
var t = useTranslation().t;
|
|
55
49
|
var isAr = useLanguage().isAr;
|
|
56
|
-
var
|
|
57
|
-
var _c = data.individualData.responseBody || {}, segments_list = _c.segments_list, team_size_list = _c.team_size_list;
|
|
58
|
-
var _d = useFormContext(), control = _d.control, setValue = _d.setValue;
|
|
50
|
+
var _c = useFormContext(), control = _c.control, setValue = _c.setValue;
|
|
59
51
|
var selectedBrandControl = useController({ control: control, name: 'selectedBrandItem' });
|
|
60
52
|
var selectedBrand = selectedBrandControl.field.value;
|
|
61
53
|
var onOpenBrandList = function (event) {
|
|
@@ -87,19 +79,9 @@ var BrandList = function (_a) {
|
|
|
87
79
|
setValue('salesChannels', [], { shouldValidate: true });
|
|
88
80
|
setValue('brandName', '');
|
|
89
81
|
}
|
|
90
|
-
setValue('segment', segments_list.find(function (_a) {
|
|
91
|
-
var _b, _c;
|
|
92
|
-
var id = _a.id;
|
|
93
|
-
return ((_c = (_b = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _b === void 0 ? void 0 : _b.type) === null || _c === void 0 ? void 0 : _c.id) === id;
|
|
94
|
-
}), { shouldValidate: true });
|
|
95
|
-
setValue('teamSize', team_size_list.find(function (_a) {
|
|
96
|
-
var _b, _c;
|
|
97
|
-
var id = _a.id;
|
|
98
|
-
return ((_c = (_b = brand === null || brand === void 0 ? void 0 : brand.segment) === null || _b === void 0 ? void 0 : _b.team) === null || _c === void 0 ? void 0 : _c.id) === id;
|
|
99
|
-
}), { shouldValidate: true });
|
|
100
82
|
onCloseBrandList();
|
|
101
83
|
};
|
|
102
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(
|
|
84
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsx(InputSelect, { label: t('select_brand_label'), onClick: !!anchorEl ? onCloseBrandList : onOpenBrandList, endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('choose_brand'), value: t(getBrandName(selectedBrand)) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'id', space: 140, list: list, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
103
85
|
return (_jsxs(_Fragment, { children: [_jsx(BrandContainer, { children: _jsx(BrandNameText, __assign({ isSelected: getBrandId(item) === getBrandId(selectedBrand) }, { children: isOtherBrand(item) ? t(getBrandName(item)) : getBrandName(item) })) }), getBrandId(item) === getBrandId(selectedBrand) && _jsx(CheckIcon, {})] }));
|
|
104
86
|
} }) }))] }) })));
|
|
105
87
|
};
|
|
@@ -55,16 +55,14 @@ import { styled, alpha } from '@mui/material/styles';
|
|
|
55
55
|
import InfoIcon from '@mui/icons-material/Info';
|
|
56
56
|
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
57
57
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
58
|
-
import CircularProgress from '@mui/material/CircularProgress';
|
|
59
58
|
import Text from '../../../../components/Text';
|
|
60
59
|
import Input from '../../../shared/Input';
|
|
61
|
-
import ClearIcon from '../../../shared/ClearIcon';
|
|
62
60
|
import Tooltip from '../../../../components/Tooltip';
|
|
63
61
|
import Collapse from '../../../../components/Collapse';
|
|
64
|
-
import CheckIcon from '../../../shared/CheckIcon';
|
|
65
62
|
import { checkBrandNameAvailability, connectSelector } from '../../../app/connect/connectStore';
|
|
66
63
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
67
64
|
import { debounce } from 'lodash-es';
|
|
65
|
+
import { EndAdornment } from '../../../shared/EndAdornment';
|
|
68
66
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
69
67
|
var theme = _a.theme;
|
|
70
68
|
return ({
|
|
@@ -124,13 +122,12 @@ var BrandName = function (_a) {
|
|
|
124
122
|
brandControl.field.onChange(target.value);
|
|
125
123
|
};
|
|
126
124
|
React.useEffect(function () {
|
|
127
|
-
var _a, _b, _c;
|
|
128
125
|
var brandList = (data.brandData.responseBody || {}).brand_list;
|
|
129
126
|
var brandListItem = getValues('selectedBrandItem');
|
|
130
127
|
var isOtherBrand = (brandList || []).length > 0 ? (brandListItem === null || brandListItem === void 0 ? void 0 : brandListItem.id) === 'other' : true;
|
|
131
128
|
var isValid = brandNameValue && !error && brandNameValue.length > 2;
|
|
132
|
-
var
|
|
133
|
-
if (isValid &&
|
|
129
|
+
var brandName = data.brandData.brandName;
|
|
130
|
+
if (isValid && brandNameValue != brandName && isOtherBrand) {
|
|
134
131
|
fetchingBrandName(true);
|
|
135
132
|
checkBrand(brandNameValue);
|
|
136
133
|
}
|
|
@@ -138,6 +135,6 @@ var BrandName = function (_a) {
|
|
|
138
135
|
var clearBrandName = function () {
|
|
139
136
|
brandControl.field.onChange('');
|
|
140
137
|
};
|
|
141
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, value: brandNameValue || '', placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment:
|
|
138
|
+
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('signup_brand_name_label') }), _jsx(Tooltip, __assign({ title: t('brand_name_hint'), onMouseOver: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, onTouchStartCapture: function () { return setIsHovered(true); } }, { children: isHovered ? _jsx(InfoIconStyled, {}) : _jsx(InfoOutlinedIconStyled, {}) }))] }), _jsx(Input, { onChange: handleBrandNameChange, value: brandNameValue || '', placeholder: t('signup_brand_name_placeholder'), warningType: 'alert', warningMessage: error && t(error), endAdornment: _jsx(EndAdornment, { value: brandNameValue, loading: brandNameChecking, error: error, onClear: clearBrandName }) })] })) })));
|
|
142
139
|
};
|
|
143
140
|
export default React.memo(BrandName);
|
|
@@ -10,7 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import TeamSize from '../../../connect/screens/Merchant/TeamSize';
|
|
14
13
|
import * as React from 'react';
|
|
15
14
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
16
15
|
import { useTranslation } from 'react-i18next';
|
|
@@ -18,6 +17,7 @@ import Collapse from '@mui/material/Collapse';
|
|
|
18
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
19
18
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
20
19
|
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
20
|
+
import { sendCustomEventToGTM } from '../../../../utils';
|
|
21
21
|
import Form from '../../../../components/Form';
|
|
22
22
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
23
23
|
import Button from '../../../shared/Button';
|
|
@@ -28,30 +28,33 @@ import BrandName from './BrandName';
|
|
|
28
28
|
import TAC from './TAC';
|
|
29
29
|
import BrandList from './BrandList';
|
|
30
30
|
import SalesChannels from './SalesChannels';
|
|
31
|
-
import Segments from './Segments';
|
|
32
31
|
var ListType;
|
|
33
32
|
(function (ListType) {
|
|
34
|
-
ListType["SegmentsList"] = "SegmentsList";
|
|
35
|
-
ListType["TeamSizeList"] = "TeamSizeList";
|
|
36
33
|
ListType["BrandList"] = "BrandList";
|
|
34
|
+
ListType["BusinessList"] = "BusinessList";
|
|
37
35
|
})(ListType || (ListType = {}));
|
|
38
36
|
var Merchant = function (_a) {
|
|
39
37
|
var _b, _c;
|
|
40
38
|
var _d = React.useState(false), brandNameChecking = _d[0], setBrandNameChecking = _d[1];
|
|
41
39
|
var _e = React.useState(false), isRequiredNewBrand = _e[0], setIsRequiredNewBrand = _e[1];
|
|
42
40
|
var _f = useAppSelector(connectSelector), data = _f.data, loading = _f.loading, error = _f.error;
|
|
43
|
-
var _g = data.brandData, brandName = _g.brandName, selectedBrandItem = _g.selectedBrandItem, termAndConditionChecked = _g.termAndConditionChecked, responseBody = _g.responseBody, salesChannels = _g.salesChannels
|
|
41
|
+
var _g = data.brandData, brandName = _g.brandName, selectedBrandItem = _g.selectedBrandItem, termAndConditionChecked = _g.termAndConditionChecked, responseBody = _g.responseBody, salesChannels = _g.salesChannels;
|
|
44
42
|
var brandList = (responseBody || {}).brand_list;
|
|
45
43
|
var _h = React.useState(), listActive = _h[0], setListActive = _h[1];
|
|
44
|
+
React.useEffect(function () {
|
|
45
|
+
sendCustomEventToGTM({
|
|
46
|
+
event: 'Send Event',
|
|
47
|
+
event_category: 'User Registration Flow',
|
|
48
|
+
event_action: 'Brand Details Step'
|
|
49
|
+
});
|
|
50
|
+
}, []);
|
|
46
51
|
var methods = useForm({
|
|
47
52
|
resolver: yupResolver(MerchantValidationSchema(isRequiredNewBrand)),
|
|
48
53
|
defaultValues: {
|
|
49
54
|
brandName: brandName || ((_b = selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.name) === null || _b === void 0 ? void 0 : _b.en),
|
|
50
55
|
selectedBrandItem: selectedBrandItem,
|
|
51
56
|
termAndConditionChecked: termAndConditionChecked,
|
|
52
|
-
salesChannels: salesChannels
|
|
53
|
-
segment: segment,
|
|
54
|
-
teamSize: teamSize
|
|
57
|
+
salesChannels: salesChannels
|
|
55
58
|
},
|
|
56
59
|
mode: 'onChange'
|
|
57
60
|
});
|
|
@@ -66,11 +69,9 @@ var Merchant = function (_a) {
|
|
|
66
69
|
dispatch(handlePrevScreenStep('CONNECT_INDIVIDUAL_STEP'));
|
|
67
70
|
};
|
|
68
71
|
React.useEffect(function () {
|
|
69
|
-
methods.setValue('segment', segment);
|
|
70
|
-
methods.setValue('teamSize', teamSize);
|
|
71
72
|
if (brandName)
|
|
72
73
|
methods.trigger('brandName');
|
|
73
|
-
}, [
|
|
74
|
+
}, [brandName]);
|
|
74
75
|
React.useEffect(function () {
|
|
75
76
|
if (error)
|
|
76
77
|
dispatch(clearError());
|
|
@@ -94,9 +95,6 @@ var Merchant = function (_a) {
|
|
|
94
95
|
var handleMenuClick = function (flag) {
|
|
95
96
|
setListActive(flag);
|
|
96
97
|
};
|
|
97
|
-
|
|
98
|
-
var isTeamSizeListActive = listActive === ListType.TeamSizeList;
|
|
99
|
-
var isBrandListActive = listActive === ListType.BrandList;
|
|
100
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandList, { show: !(isOtherBrand || isNewBrand) && !isTeamSizeListActive && !isSegmentsListActive, list: brandList, onListOpen: function () { return handleMenuClick(ListType.BrandList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(BrandName, { show: (isNewBrand || isOtherBrand) && !listActive, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking }), _jsx(Segments, { show: !isTeamSizeListActive && !isBrandListActive, onListOpen: function () { return handleMenuClick(ListType.SegmentsList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(TeamSize, { show: !isSegmentsListActive && !isBrandListActive, onListOpen: function () { return handleMenuClick(ListType.TeamSizeList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(SalesChannels, {}) })), _jsx(TAC, { show: (isNewBrand || isOtherBrand) && !listActive }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading }, { children: t('next') })) }))] })) })) }));
|
|
98
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandList, { show: hasBrandList, list: brandList, onListOpen: function () { return handleMenuClick(ListType.BrandList); }, onListClose: function () { return handleMenuClick(); } }), _jsx(BrandName, { show: (isNewBrand || isOtherBrand) && !listActive, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking }), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(SalesChannels, {}) })), _jsx(TAC, { show: (isNewBrand || isOtherBrand) && !listActive }), _jsx(Collapse, __assign({ in: !listActive, timeout: 500 }, { children: _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, error: t(error || ''), loading: loading }, { children: t('next') })) }))] })) })) }));
|
|
101
99
|
};
|
|
102
100
|
export default React.memo(Merchant);
|
|
@@ -6,12 +6,12 @@ import { connectSelector, clearError } from '../../../app/connect/connectStore';
|
|
|
6
6
|
import { mapSalesChannel } from '../../../../utils';
|
|
7
7
|
import SalesChannel from '../../../shared/SalesChannels';
|
|
8
8
|
var SalesChannels = function (_a) {
|
|
9
|
-
var _b;
|
|
10
|
-
var
|
|
9
|
+
var _b, _c;
|
|
10
|
+
var _d = useFormContext(), control = _d.control, setValue = _d.setValue, getValues = _d.getValues;
|
|
11
11
|
var dispatch = useAppDispatch();
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
var _e = useController({ control: control, name: 'salesChannels' }), fieldState = _e.fieldState, field = _e.field;
|
|
13
|
+
var _f = useAppSelector(connectSelector), data = _f.data, error = _f.error;
|
|
14
|
+
var _g = data.brandData, selectedBrandItem = _g.selectedBrandItem, responseBody = _g.responseBody, defaultSalesChannels = _g.salesChannels;
|
|
15
15
|
var channelList = (responseBody || {}).channel_list;
|
|
16
16
|
var selectedBrandControl = getValues('selectedBrandItem');
|
|
17
17
|
React.useEffect(function () {
|
|
@@ -33,6 +33,6 @@ var SalesChannels = function (_a) {
|
|
|
33
33
|
dispatch(clearError());
|
|
34
34
|
field.onChange(channels);
|
|
35
35
|
};
|
|
36
|
-
return (_jsx(SalesChannel, { error: (_b = fieldState.error) === null || _b === void 0 ? void 0 : _b.message, list: channelList, selectFirstIconListener: selectedBrandControl === null || selectedBrandControl === void 0 ? void 0 : selectedBrandControl.id, onChange: onChange, defaultValue: selectedSalesChannels }));
|
|
36
|
+
return (_jsx(SalesChannel, { error: (_c = (_b = fieldState.error) === null || _b === void 0 ? void 0 : _b.message) === null || _c === void 0 ? void 0 : _c.trim(), list: channelList, selectFirstIconListener: selectedBrandControl === null || selectedBrandControl === void 0 ? void 0 : selectedBrandControl.id, onChange: onChange, defaultValue: selectedSalesChannels }));
|
|
37
37
|
};
|
|
38
38
|
export default SalesChannels;
|
|
@@ -9,8 +9,7 @@ export declare const MerchantValidationSchema: (isNewBrand?: boolean) => yup.Obj
|
|
|
9
9
|
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
10
10
|
id: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
11
11
|
}>>[] | undefined>;
|
|
12
|
-
|
|
13
|
-
teamSize: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
12
|
+
brandName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
14
13
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
15
14
|
salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
16
15
|
id: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
@@ -21,8 +20,7 @@ export declare const MerchantValidationSchema: (isNewBrand?: boolean) => yup.Obj
|
|
|
21
20
|
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
22
21
|
id: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
23
22
|
}>>[] | undefined>;
|
|
24
|
-
|
|
25
|
-
teamSize: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
23
|
+
brandName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
26
24
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
27
25
|
salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
28
26
|
id: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
@@ -33,6 +31,5 @@ export declare const MerchantValidationSchema: (isNewBrand?: boolean) => yup.Obj
|
|
|
33
31
|
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
34
32
|
id: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
35
33
|
}>>[] | undefined>;
|
|
36
|
-
|
|
37
|
-
teamSize: import("yup/lib/object").RequiredObjectSchema<import("yup/lib/object").ObjectShape, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").ObjectShape>>;
|
|
34
|
+
brandName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
38
35
|
}>>>;
|
|
@@ -7,7 +7,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
7
7
|
}
|
|
8
8
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
9
|
};
|
|
10
|
-
import { REGEX_WEBSITE,
|
|
10
|
+
import { REGEX_WEBSITE, DIGITS_ONLY, REGEX_ALPHANUMERIC } from '../../../../constants';
|
|
11
11
|
import * as yup from 'yup';
|
|
12
12
|
var validationSalesChannels = function (channels) {
|
|
13
13
|
if (channels === void 0) { channels = []; }
|
|
@@ -31,27 +31,21 @@ var validationSalesChannels = function (channels) {
|
|
|
31
31
|
typeDic[key] = channel.address || '';
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
for (var key in dic) {
|
|
35
|
-
var values = dic[key];
|
|
36
|
-
var atLestOne = values.every(function (item) { return item === ''; });
|
|
37
|
-
if (atLestOne)
|
|
38
|
-
return "enter_at_least_one_".concat(key);
|
|
39
|
-
}
|
|
40
34
|
for (var key in typeDic) {
|
|
41
35
|
var value = typeDic[key];
|
|
42
36
|
if (key === 'website' && value && !value.match(REGEX_WEBSITE)) {
|
|
43
37
|
return 'invalid_url';
|
|
44
38
|
}
|
|
45
|
-
if (key === 'linkedin' && value && !value.
|
|
39
|
+
if (key === 'linkedin' && value && !value.trim()) {
|
|
46
40
|
return 'invalid_linkedin_profile_url';
|
|
47
41
|
}
|
|
48
|
-
if (key === 'facebook' && value && !value.
|
|
42
|
+
if (key === 'facebook' && value && !value.trim()) {
|
|
49
43
|
return 'invalid_facebook_username';
|
|
50
44
|
}
|
|
51
|
-
if (key === 'instagram' && value && !value.
|
|
45
|
+
if (key === 'instagram' && value && !value.trim()) {
|
|
52
46
|
return 'invalid_instagram_username';
|
|
53
47
|
}
|
|
54
|
-
if (key === 'twitter' && value && !value.
|
|
48
|
+
if (key === 'twitter' && value && !value.trim()) {
|
|
55
49
|
return 'invalid_twitter_username';
|
|
56
50
|
}
|
|
57
51
|
if (key === 'physical_store' && value && value.length < 3) {
|
|
@@ -67,6 +61,12 @@ var validationSalesChannels = function (channels) {
|
|
|
67
61
|
return 'invalid_call_center_number';
|
|
68
62
|
}
|
|
69
63
|
}
|
|
64
|
+
for (var key in dic) {
|
|
65
|
+
var values = dic[key];
|
|
66
|
+
var atLestOne = values.every(function (item) { return item === ''; });
|
|
67
|
+
if (atLestOne)
|
|
68
|
+
return ' ';
|
|
69
|
+
}
|
|
70
70
|
return true;
|
|
71
71
|
};
|
|
72
72
|
export var MerchantValidationSchema = function (isNewBrand) {
|
|
@@ -86,11 +86,9 @@ export var MerchantValidationSchema = function (isNewBrand) {
|
|
|
86
86
|
})
|
|
87
87
|
.required('enter_brand_name_english_chars_numbers_space'),
|
|
88
88
|
termAndConditionChecked: yup.boolean().isTrue('check_terms_cond').required('check_terms_cond'),
|
|
89
|
-
segment: yup.object().required('alert_choose_segment'),
|
|
90
|
-
teamSize: yup.object().required('alert_choose_teamSize'),
|
|
91
89
|
salesChannels: yup
|
|
92
90
|
.array()
|
|
93
|
-
.min(1, '
|
|
91
|
+
.min(1, ' ')
|
|
94
92
|
.of(yup.object().shape({
|
|
95
93
|
id: yup.string().required('choose_atleast_one_channel')
|
|
96
94
|
}))
|
|
@@ -111,7 +109,7 @@ export var MerchantValidationSchema = function (isNewBrand) {
|
|
|
111
109
|
return yup.object().shape({
|
|
112
110
|
salesChannels: yup
|
|
113
111
|
.array()
|
|
114
|
-
.min(1, '
|
|
112
|
+
.min(1, ' ')
|
|
115
113
|
.of(yup.object().shape({
|
|
116
114
|
id: yup.string().required('choose_atleast_one_channel')
|
|
117
115
|
}))
|
|
@@ -128,7 +126,6 @@ export var MerchantValidationSchema = function (isNewBrand) {
|
|
|
128
126
|
}
|
|
129
127
|
})
|
|
130
128
|
.required('choose_atleast_one_channel'),
|
|
131
|
-
|
|
132
|
-
teamSize: yup.object().required('alert_choose_teamSize')
|
|
129
|
+
brandName: yup.string().optional()
|
|
133
130
|
});
|
|
134
131
|
};
|
|
@@ -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 Box from '@mui/material/Box';
|
|
@@ -36,7 +25,7 @@ import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
|
36
25
|
import { clearError, connectSelector, createMobileAuth, resetNIDScreen, resetCivilScreen, resetOTPScreen, resetStore } from '../../../app/connect/connectStore';
|
|
37
26
|
import { useLanguage } from '../../../../hooks';
|
|
38
27
|
import Divider from '@mui/material/Divider';
|
|
39
|
-
import { isKW } from '../../../../utils';
|
|
28
|
+
import { isKW, sendCustomEventToGTM } from '../../../../utils';
|
|
40
29
|
import Text from '../../../../components/Text';
|
|
41
30
|
import MIDTitle from './Title';
|
|
42
31
|
import MobileNumber from './MobileNumber';
|
|
@@ -89,15 +78,18 @@ var Mobile = function (_a) {
|
|
|
89
78
|
var settingsStore = useAppSelector(settingsSelector);
|
|
90
79
|
var _c = useAppSelector(connectSelector), data = _c.data, loading = _c.loading, error = _c.error;
|
|
91
80
|
var _d = React.useState(), listType = _d[0], setListType = _d[1];
|
|
92
|
-
var _e = data.mobileData, countryCode = _e.countryCode, mobile = _e.mobile;
|
|
93
81
|
var dispatch = useAppDispatch();
|
|
94
|
-
var
|
|
82
|
+
var _e = data.mobileData, mobile = _e.mobile, countryCode = _e.countryCode, termAndConditionChecked = _e.termAndConditionChecked;
|
|
95
83
|
var methods = useForm({
|
|
96
84
|
resolver: yupResolver(PhoneValidationSchema),
|
|
97
|
-
defaultValues:
|
|
85
|
+
defaultValues: {
|
|
86
|
+
mobile: mobile,
|
|
87
|
+
countryCode: countryCode,
|
|
88
|
+
termAndConditionChecked: termAndConditionChecked
|
|
89
|
+
},
|
|
98
90
|
mode: 'onChange'
|
|
99
91
|
});
|
|
100
|
-
useSetFromDefaultValues(methods,
|
|
92
|
+
useSetFromDefaultValues(methods, data.mobileData);
|
|
101
93
|
var t = useTranslation().t;
|
|
102
94
|
var isAr = useLanguage().isAr;
|
|
103
95
|
var handleMenuListClick = function (flag) {
|
|
@@ -117,6 +109,11 @@ var Mobile = function (_a) {
|
|
|
117
109
|
};
|
|
118
110
|
var isKWCountry = React.useMemo(function () { var _a; return isKW((_a = settingsStore.data.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2); }, [(_b = settingsStore.data.businessCountry) === null || _b === void 0 ? void 0 : _b.iso2]);
|
|
119
111
|
var onBack = function () {
|
|
112
|
+
sendCustomEventToGTM({
|
|
113
|
+
event: 'Send Event',
|
|
114
|
+
event_category: 'User Registration Flow',
|
|
115
|
+
event_action: 'Switch to ID Login Clicked'
|
|
116
|
+
});
|
|
120
117
|
dispatch(handlePrevScreenStep(isKWCountry ? 'CONNECT_CIVIL_ID_STEP' : 'CONNECT_NID_STEP'));
|
|
121
118
|
};
|
|
122
119
|
React.useEffect(function () {
|
|
@@ -35,7 +35,7 @@ import { connectSelector } from '../../../app/connect/connectStore';
|
|
|
35
35
|
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
36
36
|
import Input from '../../../shared/Input';
|
|
37
37
|
import SimpleList from '../../../../components/SimpleList';
|
|
38
|
-
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
38
|
+
import { removeAllCharsFromNumber, sendCustomEventToGTM } from '../../../../utils';
|
|
39
39
|
import { useLanguage, useAppSelector } from '../../../../hooks';
|
|
40
40
|
import Search from '../../../shared/Search';
|
|
41
41
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
@@ -73,15 +73,12 @@ var ExpandIconStyled = styled(ExpandIcon)(function (_a) {
|
|
|
73
73
|
marginInlineStart: theme.spacing(1)
|
|
74
74
|
});
|
|
75
75
|
});
|
|
76
|
-
var InputStyled = styled(Input)(function (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
});
|
|
76
|
+
var InputStyled = styled(Input)(function () { return ({
|
|
77
|
+
direction: 'ltr',
|
|
78
|
+
'& .MuiInputBase-input': {
|
|
79
|
+
cursor: 'auto'
|
|
80
|
+
}
|
|
81
|
+
}); });
|
|
85
82
|
var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
86
83
|
var _b, _c, _d;
|
|
87
84
|
var countries = _a.countries, rest = __rest(_a, ["countries"]);
|
|
@@ -136,6 +133,13 @@ var MobileNumber = React.forwardRef(function (_a, ref) {
|
|
|
136
133
|
var onSelectItem = function (country) {
|
|
137
134
|
onCloseCountryList();
|
|
138
135
|
setValue('mobile', '');
|
|
136
|
+
var prevCountry = countryCodeValue === null || countryCodeValue === void 0 ? void 0 : countryCodeValue.iso2;
|
|
137
|
+
sendCustomEventToGTM({
|
|
138
|
+
event: 'Send Event',
|
|
139
|
+
event_category: 'User Registration Flow',
|
|
140
|
+
event_action: 'switch mobile country clicked',
|
|
141
|
+
event_label: "From ".concat(prevCountry, " to ").concat(country.iso2)
|
|
142
|
+
});
|
|
139
143
|
countryCodeControl.field.onChange(country);
|
|
140
144
|
};
|
|
141
145
|
var handleSearch = function (value) {
|
|
@@ -14,10 +14,10 @@ import { useTranslation } from 'react-i18next';
|
|
|
14
14
|
import { useController, useFormContext } from 'react-hook-form';
|
|
15
15
|
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
16
16
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
17
|
-
import DatePicker from '../../../../components/DatePicker';
|
|
18
17
|
import { alpha, styled } from '@mui/material/styles';
|
|
19
|
-
import { clearError, connectSelector } from '../../../app/connect/connectStore';
|
|
20
18
|
import Text from '../../../../components/Text';
|
|
19
|
+
import Calender from '../../../shared/Calender';
|
|
20
|
+
import { clearError, connectSelector } from '../../../app/connect/connectStore';
|
|
21
21
|
var InputLabelStyled = styled(Text)(function (_a) {
|
|
22
22
|
var theme = _a.theme;
|
|
23
23
|
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
@@ -42,6 +42,6 @@ var DOB = function (_a) {
|
|
|
42
42
|
return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
43
43
|
var spacing = _a.spacing;
|
|
44
44
|
return spacing(2.5, 2.5, 1.5, 2.5);
|
|
45
|
-
} } }, { children: t('enter_birth_date') })), _jsx(
|
|
45
|
+
} } }, { children: t('enter_birth_date') })), _jsx(Calender, { isDob: true, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleBirthDateChange })] }));
|
|
46
46
|
};
|
|
47
47
|
export default DOB;
|