@tap-payments/auth-jsconnect 2.0.54-test → 2.0.55-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 +39 -14
- package/build/@types/app.js +9 -0
- package/build/@types/form.d.ts +11 -0
- package/build/api/account.js +1 -1
- package/build/api/auth.d.ts +15 -2
- package/build/api/auth.js +25 -2
- package/build/api/availabilityServices.js +1 -1
- package/build/api/axios.js +4 -4
- package/build/api/board.js +1 -1
- package/build/api/brand.d.ts +1 -1
- package/build/api/brand.js +1 -1
- package/build/api/country.js +1 -1
- package/build/api/data.d.ts +33 -7
- package/build/api/data.js +42 -17
- package/build/api/entity.d.ts +2 -0
- package/build/api/entity.js +1 -1
- package/build/api/firebase.js +1 -1
- package/build/api/individual.d.ts +1 -1
- package/build/api/individual.js +1 -1
- package/build/api/ip.js +1 -1
- package/build/api/lead.d.ts +1 -1
- package/build/api/lead.js +1 -1
- package/build/api/operator.js +1 -1
- package/build/api/user.js +1 -1
- package/build/app/rootReducer.d.ts +10 -7
- package/build/app/rootReducer.js +14 -8
- package/build/app/settings.d.ts +2 -2
- package/build/app/settings.js +11 -5
- package/build/app/store.d.ts +6 -0
- package/build/assets/locales/ar.json +14 -4
- package/build/assets/locales/en.json +14 -4
- package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
- package/build/components/AnimationFlow/AnimationFlow.js +5 -7
- package/build/components/AnimationFlow/BottomSheet.js +2 -1
- package/build/components/AnimationFlow/Dialog.d.ts +4 -1
- package/build/components/AnimationFlow/Dialog.js +10 -5
- package/build/components/DatePicker/DatePicker.js +3 -3
- package/build/components/FileInput/DragAndDrop.d.ts +9 -1
- package/build/components/FileInput/DragAndDrop.js +115 -10
- package/build/components/FileInput/UploadInput.js +2 -2
- package/build/components/Footer/Footer.js +3 -3
- package/build/components/Input/Input.js +2 -2
- package/build/components/Lottie/Lottie.d.ts +878 -0
- package/build/components/Lottie/Lottie.js +58 -0
- package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
- package/build/components/Lottie/files/success.json +425 -0
- package/build/components/Lottie/index.d.ts +3 -0
- package/build/components/Lottie/index.js +3 -0
- package/build/components/OTPTimer/OTPTimer.js +1 -1
- package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
- package/build/components/ProgressBar/CircularProgressBar.js +48 -0
- package/build/components/ProgressBar/index.d.ts +2 -0
- package/build/components/ProgressBar/index.js +2 -0
- package/build/components/Providers/ThemeProvider.d.ts +1 -1
- package/build/components/SimpleList/SimpleList.js +1 -1
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +3 -2
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +29 -36
- package/build/constants/api.d.ts +1 -0
- package/build/constants/api.js +10 -7
- package/build/constants/app.d.ts +16 -1
- package/build/constants/app.js +76 -4
- package/build/constants/assets.d.ts +17 -1
- package/build/constants/assets.js +22 -6
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/app/auth/authStore.d.ts +35 -0
- package/build/features/app/auth/authStore.js +148 -0
- package/build/features/app/bank/bankStore.d.ts +6 -2
- package/build/features/app/bank/bankStore.js +46 -26
- package/build/features/app/business/businessStore.d.ts +2 -2
- package/build/features/app/business/businessStore.js +58 -48
- package/build/features/app/connect/connectStore.d.ts +14 -2
- package/build/features/app/connect/connectStore.js +170 -10
- package/build/features/app/entity/entityStore.d.ts +53 -0
- package/build/features/app/entity/entityStore.js +461 -0
- package/build/features/app/individual/individualStore.d.ts +2 -2
- package/build/features/app/individual/individualStore.js +23 -15
- package/build/features/app/otp/otpStore.d.ts +28 -0
- package/build/features/app/otp/otpStore.js +153 -0
- package/build/features/app/password/passwordStore.d.ts +2 -2
- package/build/features/app/password/passwordStore.js +4 -4
- package/build/features/app/signIn/signInStore.d.ts +2 -2
- package/build/features/app/signIn/signInStore.js +6 -6
- package/build/features/app/tax/taxStore.d.ts +2 -2
- package/build/features/app/tax/taxStore.js +5 -5
- package/build/features/auth/Auth.d.ts +10 -0
- package/build/features/auth/Auth.js +87 -0
- package/build/features/auth/index.d.ts +1 -0
- package/build/features/auth/index.js +1 -0
- package/build/features/auth/screens/OTP/OTP.d.ts +5 -0
- package/build/features/auth/screens/OTP/OTP.js +72 -0
- package/build/features/auth/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/auth/screens/OTP/OTPInput.js +44 -0
- package/build/features/auth/screens/OTP/index.d.ts +3 -0
- package/build/features/auth/screens/OTP/index.js +2 -0
- package/build/features/auth/screens/OTP/validation.d.ts +8 -0
- package/build/features/auth/screens/OTP/validation.js +4 -0
- package/build/features/bank/Bank.d.ts +1 -1
- package/build/features/bank/Bank.js +18 -12
- package/build/features/bank/screens/BankDetails/BankDetails.js +9 -9
- package/build/features/bank/screens/BankDetails/BankName.js +8 -8
- package/build/features/bank/screens/BankDetails/BankStatement.js +35 -10
- package/build/features/bank/screens/BankDetails/Beneficiary.js +7 -7
- package/build/features/bank/screens/BankDetails/ConfirmPolicy.js +5 -5
- package/build/features/bank/screens/BankDetails/IBAN.js +8 -8
- package/build/features/bank/screens/BankDetails/validation.js +1 -1
- package/build/features/bank/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/bank/screens/Success/Success.js +3 -3
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
- package/build/features/bank/screens/Verify/OTPInput.js +4 -4
- package/build/features/bank/screens/Verify/Verify.js +9 -9
- package/build/features/business/Business.d.ts +2 -2
- package/build/features/business/Business.js +20 -13
- package/build/features/business/screens/Activities/Activities.js +7 -7
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +2 -2
- package/build/features/business/screens/Activities/ActivitiesList.js +9 -9
- package/build/features/business/screens/Activities/LicenseName.js +6 -6
- package/build/features/business/screens/Activities/OperationStartDate.js +4 -4
- package/build/features/business/screens/Activities/SalesChannels.d.ts +1 -1
- package/build/features/business/screens/Activities/SalesChannels.js +8 -8
- package/build/features/business/screens/BusinessType/BusinessType.js +8 -8
- package/build/features/business/screens/BusinessType/LicenseList.js +10 -10
- package/build/features/business/screens/BusinessType/LicenseNumber.js +8 -8
- package/build/features/business/screens/BusinessType/SelectType.js +6 -6
- package/build/features/business/screens/BusinessType/validation.js +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +3 -3
- package/build/features/business/screens/Customers/CustomerLocations.js +33 -15
- package/build/features/business/screens/Customers/Customers.js +8 -8
- package/build/features/business/screens/Customers/ExpectedCustomers.js +22 -10
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +39 -21
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +1 -1
- package/build/features/business/screens/Customers/RefundPolicy.js +7 -7
- package/build/features/business/screens/Customers/TransactionPolicy.js +5 -5
- package/build/features/business/screens/IDBOD/DOB.js +5 -5
- package/build/features/business/screens/IDBOD/ID.js +6 -6
- package/build/features/business/screens/IDBOD/IDBOD.js +6 -6
- package/build/features/business/screens/OTP/OTP.js +9 -9
- package/build/features/business/screens/OTP/OTPInput.js +4 -4
- package/build/features/business/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/business/screens/Success/Success.js +3 -3
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
- package/build/features/business/screens/Verify/OTPInput.js +4 -4
- package/build/features/business/screens/Verify/Verify.js +9 -9
- package/build/features/connect/Connect.d.ts +3 -2
- package/build/features/connect/Connect.js +46 -16
- package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/connect/screens/CivilID/CivilID.js +85 -0
- package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
- package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
- package/build/features/connect/screens/CivilID/index.d.ts +3 -0
- package/build/features/connect/screens/CivilID/index.js +2 -0
- package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
- package/build/features/connect/screens/CivilID/validation.js +4 -0
- package/build/features/connect/screens/Individual/Email.js +7 -7
- package/build/features/connect/screens/Individual/Individual.js +14 -10
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Individual/MobileNumber.js +11 -11
- package/build/features/connect/screens/Individual/Name.js +6 -6
- package/build/features/connect/screens/Individual/validation.js +1 -1
- package/build/features/connect/screens/Merchant/BrandList.d.ts +1 -1
- package/build/features/connect/screens/Merchant/BrandList.js +8 -8
- package/build/features/connect/screens/Merchant/BrandName.js +10 -10
- package/build/features/connect/screens/Merchant/Merchant.js +42 -18
- package/build/features/connect/screens/Merchant/SalesChannels.d.ts +5 -0
- package/build/features/connect/screens/Merchant/SalesChannels.js +114 -0
- package/build/features/connect/screens/Merchant/SocialMedia.js +65 -20
- package/build/features/connect/screens/Merchant/TAC.js +7 -7
- package/build/features/connect/screens/Merchant/validation.d.ts +87 -0
- package/build/features/connect/screens/Merchant/validation.js +69 -3
- package/build/features/connect/screens/Mobile/Mobile.js +16 -13
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +1 -1
- package/build/features/connect/screens/Mobile/MobileNumber.js +12 -12
- package/build/features/connect/screens/Mobile/Title.js +2 -2
- package/build/features/connect/screens/NID/DOB.js +5 -5
- package/build/features/connect/screens/NID/IDNumber.js +8 -8
- package/build/features/connect/screens/NID/NID.js +8 -8
- package/build/features/connect/screens/OTP/OTP.js +9 -9
- package/build/features/connect/screens/OTP/OTPInput.js +4 -4
- package/build/features/connect/screens/ThankYou/ThankYou.js +1 -1
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +169 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +22 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
- package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
- package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyPACI/index.js +2 -0
- package/build/features/entity/Entity.d.ts +7 -0
- package/build/features/entity/Entity.js +70 -0
- package/build/features/entity/index.d.ts +1 -0
- package/build/features/entity/index.js +1 -0
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +54 -0
- package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +139 -0
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +56 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +17 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +28 -0
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +6 -0
- package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +38 -0
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +5 -0
- package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +112 -0
- package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +2 -0
- package/build/features/entity/screens/EntityInfoConfirm/index.js +2 -0
- package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +107 -0
- package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -0
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
- package/build/features/entity/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/entity/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/entity/screens/Success/Success.d.ts +5 -0
- package/build/features/entity/screens/Success/Success.js +16 -0
- package/build/features/entity/screens/Success/index.d.ts +3 -0
- package/build/features/entity/screens/Success/index.js +2 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +109 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/entity/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/entity/screens/Verify/OTPInput.js +47 -0
- package/build/features/entity/screens/Verify/Verify.d.ts +5 -0
- package/build/features/entity/screens/Verify/Verify.js +78 -0
- package/build/features/entity/screens/Verify/index.d.ts +2 -0
- package/build/features/entity/screens/Verify/index.js +2 -0
- package/build/features/entity/screens/Verify/validation.d.ts +8 -0
- package/build/features/entity/screens/Verify/validation.js +4 -0
- package/build/features/featuresScreens.d.ts +4 -1
- package/build/features/featuresScreens.js +88 -40
- package/build/features/individual/Individual.d.ts +2 -2
- package/build/features/individual/Individual.js +20 -13
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +9 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +23 -12
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +19 -11
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +10 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +6 -6
- package/build/features/individual/screens/ShowIndividualInfo/info.js +1 -1
- package/build/features/individual/screens/Success/Success.js +3 -3
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
- package/build/features/individual/screens/Verify/OTPInput.js +4 -4
- package/build/features/individual/screens/Verify/Verify.js +9 -9
- package/build/features/otp/OTP.d.ts +7 -0
- package/build/features/otp/OTP.js +58 -0
- package/build/features/otp/index.d.ts +0 -0
- package/build/features/otp/index.js +1 -0
- package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +6 -0
- package/build/features/otp/screens/OTPVerify/OTPInput.js +47 -0
- package/build/features/otp/screens/OTPVerify/Verify.d.ts +5 -0
- package/build/features/otp/screens/OTPVerify/Verify.js +49 -0
- package/build/features/otp/screens/OTPVerify/index.d.ts +2 -0
- package/build/features/otp/screens/OTPVerify/index.js +2 -0
- package/build/features/otp/screens/OTPVerify/validation.d.ts +8 -0
- package/build/features/otp/screens/OTPVerify/validation.js +4 -0
- package/build/features/password/Password.d.ts +2 -2
- package/build/features/password/Password.js +20 -13
- package/build/features/password/screens/CreatePassword/ConditionText.js +1 -1
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +3 -3
- package/build/features/password/screens/CreatePassword/CreatePassword.js +8 -8
- package/build/features/password/screens/CreatePassword/Password.js +6 -6
- package/build/features/password/screens/OTP/OTP.js +9 -9
- package/build/features/password/screens/OTP/OTPInput.js +4 -4
- package/build/features/password/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/password/screens/Success/Success.js +4 -4
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
- package/build/features/password/screens/Verify/OTPInput.js +4 -4
- package/build/features/password/screens/Verify/Verify.js +9 -9
- package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +4 -4
- package/build/features/shared/Background/Background.d.ts +7 -5
- package/build/features/shared/Background/Background.js +16 -5
- package/build/features/shared/Background/LogoBackground.js +3 -3
- package/build/features/shared/Button/AbsherButton.d.ts +1 -1
- package/build/features/shared/Button/AbsherButton.js +3 -3
- package/build/features/shared/Button/Button.d.ts +1 -1
- package/build/features/shared/Button/Button.js +7 -7
- package/build/features/shared/Button/EmailProvidersButtons.d.ts +1 -1
- package/build/features/shared/Button/EmailProvidersButtons.js +2 -2
- package/build/features/shared/Button/FlowsButtons.d.ts +2 -2
- package/build/features/shared/Button/FlowsButtons.js +6 -6
- package/build/features/shared/Button/MobileButton.d.ts +1 -1
- package/build/features/shared/Button/MobileButton.js +3 -3
- package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
- package/build/features/shared/Dialog/CloseDialog.js +62 -0
- package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
- package/build/features/shared/Dialog/DialogContainer.js +56 -0
- package/build/features/shared/Dialog/index.d.ts +4 -0
- package/build/features/shared/Dialog/index.js +4 -0
- package/build/features/shared/Footer/Footer.js +4 -4
- package/build/features/shared/Input/Input.d.ts +2 -2
- package/build/features/shared/Input/Input.js +4 -4
- package/build/features/shared/OTP/OTP.d.ts +1 -1
- package/build/features/shared/OTP/OTP.js +3 -3
- package/build/features/shared/Search/Search.js +1 -1
- package/build/features/shared/SearchIcon/SearchIcon.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.js +5 -5
- package/build/features/shared/UploadFile/UploadFile.d.ts +8 -3
- package/build/features/shared/UploadFile/UploadFile.js +27 -12
- package/build/features/signIn/SignIn.d.ts +2 -2
- package/build/features/signIn/SignIn.js +21 -13
- package/build/features/signIn/screens/Email/Email.js +8 -8
- package/build/features/signIn/screens/Email/EmailField.js +5 -5
- package/build/features/signIn/screens/Email/validation.js +1 -1
- package/build/features/signIn/screens/Mobile/Mobile.js +9 -9
- package/build/features/signIn/screens/Mobile/MobileNumber.d.ts +1 -1
- package/build/features/signIn/screens/Mobile/MobileNumber.js +12 -12
- package/build/features/signIn/screens/OTP/OTP.js +9 -9
- package/build/features/signIn/screens/OTP/OTPInput.js +4 -4
- package/build/features/signIn/screens/Password/Password.js +7 -7
- package/build/features/signIn/screens/Password/PasswordInput.js +3 -3
- package/build/features/tax/Tax.d.ts +2 -2
- package/build/features/tax/Tax.js +21 -13
- package/build/features/tax/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +1 -1
- package/build/features/tax/screens/Success/Success.js +3 -3
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +9 -9
- package/build/features/tax/screens/TaxDetails/ConfirmPolicy.js +5 -5
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +6 -6
- package/build/features/tax/screens/TaxDetails/VATId.js +5 -5
- package/build/features/tax/screens/Verify/OTPInput.js +4 -4
- package/build/features/tax/screens/Verify/Verify.js +9 -9
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/useAppConfig.d.ts +1 -1
- package/build/hooks/useAppConfig.js +6 -4
- package/build/hooks/useAppDispatch.d.ts +3 -0
- package/build/hooks/useAppSelector.d.ts +1 -1
- package/build/hooks/useAppTheme.d.ts +1 -1
- package/build/hooks/useAppTheme.js +3 -3
- package/build/hooks/useErrorListener.js +4 -3
- package/build/hooks/useLanguage.js +1 -1
- package/build/hooks/useRedirectionListener.js +1 -1
- package/build/hooks/useScreen.d.ts +3 -0
- package/build/hooks/useScreen.js +14 -0
- package/build/hooks/useStepStartedListener.js +1 -1
- package/build/i18n.js +1 -1
- package/build/index.d.ts +12 -9
- package/build/index.js +18 -9
- package/build/theme/theme.d.ts +1 -1
- package/build/utils/array.d.ts +1 -1
- package/build/utils/device.d.ts +1 -0
- package/build/utils/device.js +13 -0
- package/build/utils/html.d.ts +1 -0
- package/build/utils/html.js +6 -0
- package/build/utils/locale.d.ts +1 -1
- package/build/utils/locale.js +2 -2
- package/build/utils/rsa.d.ts +2 -2
- package/build/utils/rsa.js +2 -2
- package/build/utils/string.d.ts +23 -21
- package/build/utils/string.js +13 -4
- package/package.json +1 -1
- package/build/api/index.d.ts +0 -83
- package/build/components/DatePicker/customStyle.css +0 -86
- package/build/index.css +0 -140
|
@@ -15,29 +15,33 @@ import { useForm, FormProvider } from 'react-hook-form';
|
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
16
|
import Collapse from '@mui/material/Collapse';
|
|
17
17
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
|
-
import { useAppDispatch, useAppSelector } from '
|
|
19
|
-
import { handlePrevScreenStep } from '
|
|
20
|
-
import Form from '
|
|
21
|
-
import { INSTAGRAM_URL, TWITTER_URL } from '
|
|
22
|
-
import { ScreenContainer } from '
|
|
23
|
-
import Button from '
|
|
24
|
-
import { clearError, connectSelector, updateLeadBrand } from '
|
|
25
|
-
import { useLanguage } from '
|
|
18
|
+
import { useAppDispatch, useAppSelector } from '@hooks';
|
|
19
|
+
import { handlePrevScreenStep, settingsSelector } from '@app/settings';
|
|
20
|
+
import Form from '@components/Form';
|
|
21
|
+
import { INSTAGRAM_URL, TWITTER_URL } from '@constants';
|
|
22
|
+
import { ScreenContainer } from '@features/shared/Containers';
|
|
23
|
+
import Button from '@features/shared/Button';
|
|
24
|
+
import { clearError, connectSelector, updateLeadBrand } from '@features/app/connect/connectStore';
|
|
25
|
+
import { useLanguage } from '@hooks';
|
|
26
|
+
import { isKW } from '@utils';
|
|
26
27
|
import { MerchantValidationSchema, ValidationOptions } from './validation';
|
|
27
28
|
import BrandName from './BrandName';
|
|
28
29
|
import SocialMedia from './SocialMedia';
|
|
29
30
|
import TAC from './TAC';
|
|
30
31
|
import BrandList from './BrandList';
|
|
32
|
+
import SalesChannels from './SalesChannels';
|
|
31
33
|
var Merchant = function (_a) {
|
|
32
|
-
var _b, _c
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
34
|
+
var _b, _c;
|
|
35
|
+
var _d = React.useState(false), brandNameChecking = _d[0], setBrandNameChecking = _d[1];
|
|
36
|
+
var _e = React.useState(ValidationOptions.NEW_USER), userType = _e[0], setUserType = _e[1];
|
|
37
|
+
var _f = React.useState(false), listActive = _f[0], setListActive = _f[1];
|
|
38
|
+
var _g = useAppSelector(connectSelector), data = _g.data, loading = _g.loading, error = _g.error;
|
|
39
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
37
40
|
var isNewUser = (_b = data.otpData.responseBody) === null || _b === void 0 ? void 0 : _b.new_user;
|
|
38
41
|
var isAbsher = data.otpData.isAbsher;
|
|
39
|
-
var
|
|
40
|
-
var
|
|
42
|
+
var _h = data.brandData.responseBody || {}, brands = _h.brands, channelList = _h.channelList;
|
|
43
|
+
var brandList = brands || [];
|
|
44
|
+
var _j = data.brandData, brandName = _j.brandName, links = _j.links, selectedBrandItem = _j.selectedBrandItem, termAndConditionChecked = _j.termAndConditionChecked, responseBody = _j.responseBody, salesChannels = _j.salesChannels;
|
|
41
45
|
var methods = useForm({
|
|
42
46
|
resolver: yupResolver(MerchantValidationSchema(userType)),
|
|
43
47
|
defaultValues: {
|
|
@@ -56,11 +60,13 @@ var Merchant = function (_a) {
|
|
|
56
60
|
dispatch(updateLeadBrand(formData));
|
|
57
61
|
};
|
|
58
62
|
var onBack = function () {
|
|
63
|
+
var _a;
|
|
59
64
|
if (isNewUser) {
|
|
60
65
|
dispatch(handlePrevScreenStep('CONNECT_INDIVIDUAL_STEP'));
|
|
61
66
|
return;
|
|
62
67
|
}
|
|
63
|
-
|
|
68
|
+
var code = (_a = settingsData.businessCountry) === null || _a === void 0 ? void 0 : _a.iso2;
|
|
69
|
+
dispatch(handlePrevScreenStep(isKW(code) ? 'CONNECT_CIVIL_ID_STEP' : isAbsher ? 'CONNECT_NID_STEP' : 'CONNECT_MOBILE_STEP'));
|
|
64
70
|
};
|
|
65
71
|
React.useEffect(function () {
|
|
66
72
|
if (error)
|
|
@@ -82,6 +88,7 @@ var Merchant = function (_a) {
|
|
|
82
88
|
var sites = { website: '', twitter: '', instagram: '' };
|
|
83
89
|
methods.setValue('brandName', '', { shouldValidate: true });
|
|
84
90
|
methods.setValue('links', sites);
|
|
91
|
+
methods.setValue('salesChannels', []);
|
|
85
92
|
}, 100);
|
|
86
93
|
}
|
|
87
94
|
if (isNewUser === false && (brandList === null || brandList === void 0 ? void 0 : brandList.length) > 0 && (formDataSelectedBrand === null || formDataSelectedBrand === void 0 ? void 0 : formDataSelectedBrand.id) !== 'other') {
|
|
@@ -92,18 +99,35 @@ var Merchant = function (_a) {
|
|
|
92
99
|
var website = (_e = formDataSelectedBrand === null || formDataSelectedBrand === void 0 ? void 0 : formDataSelectedBrand.website) === null || _e === void 0 ? void 0 : _e.replaceAll(/(https|http):\/\//g, '');
|
|
93
100
|
var sites_1 = __assign(__assign({}, links), { website: website, twitter: twitter, instagram: instagram });
|
|
94
101
|
setTimeout(function () { return methods.setValue('links', sites_1, { shouldValidate: true }); }, 100);
|
|
102
|
+
var selectedChannels = (!!(channelList === null || channelList === void 0 ? void 0 : channelList[0]) && [channelList === null || channelList === void 0 ? void 0 : channelList[0]]) || [];
|
|
103
|
+
var _f = formDataSelectedBrand || {}, websiteUrl = _f.website, social = _f.social;
|
|
104
|
+
var isHasWebsite = (websiteUrl === null || websiteUrl === void 0 ? void 0 : websiteUrl.length) > 0;
|
|
105
|
+
var isHasTwitter = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('twitter.com'); });
|
|
106
|
+
var isHasInstagram = social === null || social === void 0 ? void 0 : social.find(function (s) { return s.includes('instagram.com'); });
|
|
107
|
+
var websiteData = channelList === null || channelList === void 0 ? void 0 : channelList.find(function (c) { return c.name.en.toLocaleLowerCase() === 'website'; });
|
|
108
|
+
var socialData = channelList === null || channelList === void 0 ? void 0 : channelList.find(function (c) { return c.name.en === 'social media'; });
|
|
109
|
+
if (isHasWebsite && (isHasTwitter || isHasInstagram))
|
|
110
|
+
selectedChannels = [websiteData, socialData];
|
|
111
|
+
else if (isHasTwitter || isHasInstagram)
|
|
112
|
+
selectedChannels = [socialData];
|
|
113
|
+
else if (isHasWebsite)
|
|
114
|
+
selectedChannels = [websiteData];
|
|
115
|
+
methods.setValue('salesChannels', selectedChannels);
|
|
95
116
|
}
|
|
96
117
|
}, [formDataSelectedBrand, isNewUser]);
|
|
97
118
|
React.useEffect(function () {
|
|
98
119
|
if (!(formDataSelectedBrand === null || formDataSelectedBrand === void 0 ? void 0 : formDataSelectedBrand.id) && (selectedBrandItem === null || selectedBrandItem === void 0 ? void 0 : selectedBrandItem.id))
|
|
99
120
|
methods.setValue('selectedBrandItem', selectedBrandItem, { shouldValidate: true });
|
|
100
121
|
}, [selectedBrandItem]);
|
|
122
|
+
React.useEffect(function () {
|
|
123
|
+
methods.setValue('salesChannels', salesChannels);
|
|
124
|
+
}, [salesChannels]);
|
|
101
125
|
var brandErrChecks = !methods.formState.isValid || !!methods.formState.errors.brandName || !!error;
|
|
102
|
-
var disabled = brandErrChecks || brandNameChecking || ((
|
|
126
|
+
var disabled = brandErrChecks || brandNameChecking || ((_c = data.brandData.responseBody) === null || _c === void 0 ? void 0 : _c.response_code) === '5';
|
|
103
127
|
var isBrandListAvailable = userType !== ValidationOptions.NEW_USER && brandList.length > 0;
|
|
104
128
|
var askingForBrandInfo = userType === ValidationOptions.NEW_USER ||
|
|
105
129
|
brandList.length === 0 ||
|
|
106
130
|
userType === ValidationOptions.EXISTING_USER_WITH_OTHER_BRAND;
|
|
107
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandList, { show: isBrandListAvailable, list: brandList, onListOpen: function () { return setListActive(true); }, onListClose: function () { return setListActive(false); } }), _jsx(BrandName, { show: !listActive && askingForBrandInfo, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking }), _jsx(SocialMedia, { show: !listActive, isNewUser: isNewUser }), _jsx(TAC, { show: !listActive && askingForBrandInfo }), _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') })) }))] })) })) }));
|
|
131
|
+
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(Form, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(BrandList, { show: isBrandListAvailable, list: brandList, onListOpen: function () { return setListActive(true); }, onListClose: function () { return setListActive(false); } }), _jsx(BrandName, { show: !listActive && askingForBrandInfo, brandNameChecking: brandNameChecking, fetchingBrandName: setBrandNameChecking }), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(SalesChannels, {}) })), _jsx(SocialMedia, { show: !listActive, isNewUser: isNewUser }), _jsx(TAC, { show: !listActive && askingForBrandInfo }), _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') })) }))] })) })) }));
|
|
108
132
|
};
|
|
109
133
|
export default React.memo(Merchant);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const MandatoryStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
3
|
+
export declare const CollapseStyled: import("@emotion/styled").StyledComponent<import("@components/Collapse").CollapseProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
4
|
+
declare const SalesChannels: () => JSX.Element;
|
|
5
|
+
export default SalesChannels;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import * as React from 'react';
|
|
23
|
+
import Box from '@mui/material/Box';
|
|
24
|
+
import { alpha, styled } from '@mui/material/styles';
|
|
25
|
+
import { useTranslation } from 'react-i18next';
|
|
26
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
27
|
+
import { useLanguage, useAppSelector, useAppDispatch } from '@hooks';
|
|
28
|
+
import Text from '@components/Text';
|
|
29
|
+
import { connectSelector, clearError } from '@features/app/connect/connectStore';
|
|
30
|
+
import CheckBox from '@components/CheckBox';
|
|
31
|
+
import Warning from '@components/Warning';
|
|
32
|
+
import Collapse from '@components/Collapse';
|
|
33
|
+
import { ScreenContainer } from '@features/shared/Containers';
|
|
34
|
+
var InputLabelStyled = styled(Text)(function (_a) {
|
|
35
|
+
var theme = _a.theme;
|
|
36
|
+
return (__assign({ margin: theme.spacing(2.5, 2.5, 0.5, 2.5), color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
37
|
+
});
|
|
38
|
+
var ContainerStyled = styled(Box)(function (_a) {
|
|
39
|
+
var theme = _a.theme;
|
|
40
|
+
return ({
|
|
41
|
+
display: 'flex',
|
|
42
|
+
flexDirection: 'row',
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
padding: theme.spacing(0, 0.5, 0, 0.5),
|
|
45
|
+
height: theme.spacing(3.625),
|
|
46
|
+
marginBlockEnd: theme.spacing(0.2)
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
var TextStyled = styled(Text)(function (_a) {
|
|
50
|
+
var theme = _a.theme;
|
|
51
|
+
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.4), fontWeight: theme.typography.fontWeightLight, whiteSpace: 'pre' }, theme.typography.body2), { marginBlockStart: theme.spacing(1.75) }));
|
|
52
|
+
});
|
|
53
|
+
var CheckBoxStyled = styled(CheckBox)(function (_a) {
|
|
54
|
+
var theme = _a.theme;
|
|
55
|
+
return ({
|
|
56
|
+
marginInlineEnd: theme.spacing(-1),
|
|
57
|
+
'& .MuiSvgIcon-root': {
|
|
58
|
+
fontSize: 30
|
|
59
|
+
},
|
|
60
|
+
'&.Mui-checked': {
|
|
61
|
+
color: theme.palette.text.primary,
|
|
62
|
+
borderRadius: theme.spacing(2.5)
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
export var MandatoryStyled = styled('span')(function (_a) {
|
|
67
|
+
var theme = _a.theme;
|
|
68
|
+
return (__assign(__assign({ color: alpha(theme.palette.error.light, 0.4) }, theme.typography.h6), { fontWeight: theme.typography.fontWeightLight, verticalAlign: 'sub' }));
|
|
69
|
+
});
|
|
70
|
+
export var CollapseStyled = styled(Collapse)(function (_a) {
|
|
71
|
+
var theme = _a.theme;
|
|
72
|
+
return ({
|
|
73
|
+
marginBlockStart: theme.spacing(2)
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
var SalesChannels = function () {
|
|
77
|
+
var _a;
|
|
78
|
+
var _b = React.useState([]), channelsMenuList = _b[0], setChannelsMenuList = _b[1];
|
|
79
|
+
var t = useTranslation().t;
|
|
80
|
+
var isAr = useLanguage().isAr;
|
|
81
|
+
var _c = useFormContext(), control = _c.control, getValues = _c.getValues;
|
|
82
|
+
var dispatch = useAppDispatch();
|
|
83
|
+
var channelsControl = useController({ name: 'salesChannels', control: control });
|
|
84
|
+
var channelsChecked = channelsControl.field.value;
|
|
85
|
+
var warningMessage = (_a = channelsControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
|
|
86
|
+
var _d = useAppSelector(connectSelector), data = _d.data, error = _d.error;
|
|
87
|
+
var channelList = (data.brandData.responseBody || {}).channelList;
|
|
88
|
+
var salesChannels = (data.brandData || {}).salesChannels;
|
|
89
|
+
var formDataSelectedBrand = getValues('selectedBrandItem');
|
|
90
|
+
React.useEffect(function () {
|
|
91
|
+
if ((channelList === null || channelList === void 0 ? void 0 : channelList.length) > 0) {
|
|
92
|
+
setChannelsMenuList(channelList);
|
|
93
|
+
}
|
|
94
|
+
}, [channelList]);
|
|
95
|
+
var handleSalesChannelChange = function (event) {
|
|
96
|
+
var selected = channelsMenuList.find(function (channel) { return channel.id === event.target.id; });
|
|
97
|
+
var isExists = channelsChecked === null || channelsChecked === void 0 ? void 0 : channelsChecked.find(function (channel) { return channel.id === (selected === null || selected === void 0 ? void 0 : selected.id); });
|
|
98
|
+
if (isExists) {
|
|
99
|
+
var updatedIdList = channelsChecked === null || channelsChecked === void 0 ? void 0 : channelsChecked.filter(function (channel) { return channel.id !== (selected === null || selected === void 0 ? void 0 : selected.id); });
|
|
100
|
+
channelsControl.field.onChange(updatedIdList);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
channelsControl.field.onChange(__spreadArray(__spreadArray([], channelsChecked, true), [selected], false));
|
|
104
|
+
if (error)
|
|
105
|
+
dispatch(clearError());
|
|
106
|
+
};
|
|
107
|
+
var getSelectedChannelsFlag = function (item) {
|
|
108
|
+
if (channelsChecked)
|
|
109
|
+
return !!(channelsChecked === null || channelsChecked === void 0 ? void 0 : channelsChecked.find(function (channel) { return channel.id === (item === null || item === void 0 ? void 0 : item.id); }));
|
|
110
|
+
};
|
|
111
|
+
var selectedBrandIsOther = (formDataSelectedBrand === null || formDataSelectedBrand === void 0 ? void 0 : formDataSelectedBrand.id) === 'other';
|
|
112
|
+
return (_jsxs(ScreenContainer, { children: [_jsxs(InputLabelStyled, { children: [t('channel_of_service'), " ", _jsx(MandatoryStyled, { children: "*" })] }), (channelsMenuList || []).map(function (channel) { return (_jsxs(ContainerStyled, { children: [_jsx(CheckBoxStyled, { id: channel.id, disableRipple: true, disableFocusRipple: true, focusRipple: false, disabled: !selectedBrandIsOther && (salesChannels === null || salesChannels === void 0 ? void 0 : salesChannels.find(function (c) { return c.id === (channel === null || channel === void 0 ? void 0 : channel.id); })) ? true : false, checked: getSelectedChannelsFlag(channel), onChange: handleSalesChannelChange }), _jsxs(TextStyled, { children: [isAr ? channel.name.ar : channel.name.en, " "] })] }, channel.id)); }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: t(warningMessage) })) }))] }));
|
|
113
|
+
};
|
|
114
|
+
export default SalesChannels;
|
|
@@ -9,21 +9,21 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useController, useFormContext } from 'react-hook-form';
|
|
16
16
|
import { styled, alpha } from '@mui/material/styles';
|
|
17
17
|
import ClearIcon from '@mui/icons-material/Clear';
|
|
18
|
-
import { SocialMediaTypes } from '
|
|
19
|
-
import Input from '
|
|
20
|
-
import Text from '
|
|
21
|
-
import Collapse from '
|
|
22
|
-
import SocialMediaGroup from '
|
|
23
|
-
import { ScreenContainer } from '
|
|
24
|
-
import CheckIcon from '
|
|
25
|
-
import { useAppSelector } from '
|
|
26
|
-
import { connectSelector } from '
|
|
18
|
+
import { SocialMediaTypes } from '@types';
|
|
19
|
+
import Input from '@components/Input';
|
|
20
|
+
import Text from '@components/Text';
|
|
21
|
+
import Collapse from '@components/Collapse';
|
|
22
|
+
import SocialMediaGroup from '@components/SocialMediaGroup';
|
|
23
|
+
import { ScreenContainer } from '@features/shared/Containers';
|
|
24
|
+
import CheckIcon from '@features/shared/CheckIcon';
|
|
25
|
+
import { useAppSelector } from '@hooks';
|
|
26
|
+
import { connectSelector } from '@features/app/connect/connectStore';
|
|
27
27
|
var SocialMediaGroupStyled = styled(SocialMediaGroup)(function (_a) {
|
|
28
28
|
var theme = _a.theme, defaultValue = _a.defaultValue;
|
|
29
29
|
return ({
|
|
@@ -37,8 +37,7 @@ var InputStyled = styled(Input)(function (_a) {
|
|
|
37
37
|
padding: theme.spacing(0, 2, 0, 0),
|
|
38
38
|
paddingInlineEnd: theme.spacing(2),
|
|
39
39
|
input: {
|
|
40
|
-
paddingInlineStart: theme.spacing(0)
|
|
41
|
-
textTransform: 'lowercase'
|
|
40
|
+
paddingInlineStart: theme.spacing(0)
|
|
42
41
|
}
|
|
43
42
|
});
|
|
44
43
|
});
|
|
@@ -58,23 +57,26 @@ var ClearIconStyled = styled(ClearIcon)(function (_a) {
|
|
|
58
57
|
});
|
|
59
58
|
});
|
|
60
59
|
var SocialMedia = function (_a) {
|
|
61
|
-
var _b, _c, _d, _e;
|
|
60
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
62
61
|
var show = _a.show, sx = _a.sx, isNewUser = _a.isNewUser;
|
|
63
|
-
var
|
|
62
|
+
var _k = React.useState(SocialMediaTypes.WEB), socialMediaType = _k[0], setSocialMediaType = _k[1];
|
|
63
|
+
var _l = React.useState([SocialMediaTypes.WEB]), selectedSocialMediaTypes = _l[0], setSelectedSocialMediaTypes = _l[1];
|
|
64
64
|
var t = useTranslation().t;
|
|
65
|
-
var
|
|
65
|
+
var _m = useFormContext(), control = _m.control, setValue = _m.setValue, watch = _m.watch;
|
|
66
66
|
var linksControl = useController({ control: control, name: 'links' });
|
|
67
67
|
var links = linksControl.field.value;
|
|
68
68
|
var brandName = watch('brandName');
|
|
69
|
+
var selectedChannels = watch('salesChannels');
|
|
69
70
|
var data = useAppSelector(connectSelector).data;
|
|
70
71
|
var brandList = ((_b = data.brandData.responseBody) === null || _b === void 0 ? void 0 : _b.brands) || [];
|
|
71
72
|
var handleChange = function (_a) {
|
|
72
73
|
var _b;
|
|
73
74
|
var target = _a.target;
|
|
74
|
-
linksControl.field.onChange(__assign(__assign({}, links), (_b = {}, _b[socialMediaType] = target.value, _b)));
|
|
75
|
+
linksControl.field.onChange(__assign(__assign({}, links), (_b = {}, _b[socialMediaType.replace(' ', '_')] = target.value, _b)));
|
|
75
76
|
};
|
|
76
|
-
var handleClear = function () {
|
|
77
|
+
var handleClear = function (e) {
|
|
77
78
|
var _a;
|
|
79
|
+
e.stopPropagation();
|
|
78
80
|
linksControl.field.onChange(__assign(__assign({}, links), (_a = {}, _a[socialMediaType] = '', _a)));
|
|
79
81
|
};
|
|
80
82
|
var handleBlueWebsite = function () {
|
|
@@ -103,15 +105,58 @@ var SocialMedia = function (_a) {
|
|
|
103
105
|
setValue('links', __assign(__assign({}, links), { website: website }));
|
|
104
106
|
}
|
|
105
107
|
}, [brandName]);
|
|
108
|
+
React.useEffect(function () {
|
|
109
|
+
var _a, _b;
|
|
110
|
+
if ((selectedChannels === null || selectedChannels === void 0 ? void 0 : selectedChannels.length) > 0) {
|
|
111
|
+
setSelectedSocialMediaTypes(selectedChannels === null || selectedChannels === void 0 ? void 0 : selectedChannels.map(function (_a) {
|
|
112
|
+
var name = _a.name;
|
|
113
|
+
return name.en.toLocaleLowerCase();
|
|
114
|
+
}));
|
|
115
|
+
var hasSelectedMediaTypeAvailable = !!(selectedChannels === null || selectedChannels === void 0 ? void 0 : selectedChannels.find(function (_a) {
|
|
116
|
+
var name = _a.name;
|
|
117
|
+
if (socialMediaType === SocialMediaTypes.TWITTER || socialMediaType === SocialMediaTypes.INSTAGRAM)
|
|
118
|
+
return name.en.toLocaleLowerCase() === SocialMediaTypes.SOCIAL;
|
|
119
|
+
if (socialMediaType === SocialMediaTypes.APPLE_STORE || socialMediaType === SocialMediaTypes.PLAY_STORE)
|
|
120
|
+
return name.en.toLocaleLowerCase() === SocialMediaTypes.APP;
|
|
121
|
+
return name.en.toLocaleLowerCase() === socialMediaType;
|
|
122
|
+
}));
|
|
123
|
+
if (!hasSelectedMediaTypeAvailable) {
|
|
124
|
+
var type = (_b = (_a = selectedChannels === null || selectedChannels === void 0 ? void 0 : selectedChannels[0]) === null || _a === void 0 ? void 0 : _a.name.en) === null || _b === void 0 ? void 0 : _b.toLocaleLowerCase();
|
|
125
|
+
if (type === SocialMediaTypes.SOCIAL)
|
|
126
|
+
setSocialMediaType(SocialMediaTypes.TWITTER);
|
|
127
|
+
else if (type === SocialMediaTypes.APP)
|
|
128
|
+
setSocialMediaType(SocialMediaTypes.APPLE_STORE);
|
|
129
|
+
else
|
|
130
|
+
setSocialMediaType(type);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}, [selectedChannels]);
|
|
106
134
|
var websiteValue = links.website || '';
|
|
107
135
|
var twitterValue = links.twitter || '';
|
|
108
136
|
var instagramValue = links.instagram || '';
|
|
137
|
+
var appleStoreValue = links.apple_store || '';
|
|
138
|
+
var playStoreValue = links.play_store || '';
|
|
139
|
+
var callCenterValue = links.call_center || '';
|
|
140
|
+
var physicalStoreValue = links.physical_store || '';
|
|
109
141
|
var errors = linksControl.fieldState.error;
|
|
110
142
|
var websiteError = (_c = errors === null || errors === void 0 ? void 0 : errors.website) === null || _c === void 0 ? void 0 : _c.message;
|
|
111
143
|
var twitterError = (_d = errors === null || errors === void 0 ? void 0 : errors.twitter) === null || _d === void 0 ? void 0 : _d.message;
|
|
112
144
|
var instagramError = (_e = errors === null || errors === void 0 ? void 0 : errors.instagram) === null || _e === void 0 ? void 0 : _e.message;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
145
|
+
var appleStoreError = (_f = errors === null || errors === void 0 ? void 0 : errors.apple_store) === null || _f === void 0 ? void 0 : _f.message;
|
|
146
|
+
var playStoreError = (_g = errors === null || errors === void 0 ? void 0 : errors.play_store) === null || _g === void 0 ? void 0 : _g.message;
|
|
147
|
+
var callCenterError = (_h = errors === null || errors === void 0 ? void 0 : errors.call_center) === null || _h === void 0 ? void 0 : _h.message;
|
|
148
|
+
var physicalStoreError = (_j = errors === null || errors === void 0 ? void 0 : errors.physical_store) === null || _j === void 0 ? void 0 : _j.message;
|
|
149
|
+
var hasWebsite = !!(selectedSocialMediaTypes === null || selectedSocialMediaTypes === void 0 ? void 0 : selectedSocialMediaTypes.find(function (s) { return s === SocialMediaTypes.WEB; }));
|
|
150
|
+
var hasSocial = !!(selectedSocialMediaTypes === null || selectedSocialMediaTypes === void 0 ? void 0 : selectedSocialMediaTypes.find(function (s) {
|
|
151
|
+
return s === SocialMediaTypes.TWITTER || s === SocialMediaTypes.INSTAGRAM || s === SocialMediaTypes.SOCIAL;
|
|
152
|
+
}));
|
|
153
|
+
var hasApp = !!(selectedSocialMediaTypes === null || selectedSocialMediaTypes === void 0 ? void 0 : selectedSocialMediaTypes.find(function (s) {
|
|
154
|
+
return s === SocialMediaTypes.APPLE_STORE || s === SocialMediaTypes.PLAY_STORE || s === SocialMediaTypes.APP;
|
|
155
|
+
}));
|
|
156
|
+
var hasCallCenter = !!(selectedSocialMediaTypes === null || selectedSocialMediaTypes === void 0 ? void 0 : selectedSocialMediaTypes.find(function (s) { return s === SocialMediaTypes.CALL_CENTER; }));
|
|
157
|
+
var hasPhysicalStore = !!(selectedSocialMediaTypes === null || selectedSocialMediaTypes === void 0 ? void 0 : selectedSocialMediaTypes.find(function (s) { return s === SocialMediaTypes.PHYSICAL_STORE; }));
|
|
158
|
+
return (_jsx(ScreenContainer, __assign({ sx: { mb: show && (selectedChannels === null || selectedChannels === void 0 ? void 0 : selectedChannels.length) === 0 ? 3 : 0 } }, { children: _jsx(Collapse, __assign({ in: show && (selectedChannels === null || selectedChannels === void 0 ? void 0 : selectedChannels.length) > 0, sx: { mb: (selectedChannels === null || selectedChannels === void 0 ? void 0 : selectedChannels.length) === 0 ? 3 : 0 } }, { children: _jsxs(ScreenContainer, __assign({ sx: __assign({ mt: 3, mb: 3, direction: 'ltr' }, sx) }, { children: [_jsx(SocialMediaGroupStyled, { defaultValue: socialMediaType, showSocialMediaTypes: selectedSocialMediaTypes, exclusive: true, onChange: function (e, value) {
|
|
159
|
+
setSocialMediaType(value);
|
|
160
|
+
} }), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.WEB && hasWebsite, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: websiteValue, onBlur: function () { return handleBlueWebsite(); }, startAdornment: _jsx(TextStyled, {}), placeholder: t('signup_website_placeholder'), warningType: 'alert', warningMessage: websiteError && t(websiteError), endAdornment: !websiteError && websiteValue ? _jsx(CheckIcon, {}) : websiteValue && _jsx(_Fragment, {}) }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.APPLE_STORE && hasApp, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: appleStoreValue, startAdornment: _jsx(TextStyled, {}), placeholder: t('apple_store_placeholder'), warningType: 'alert', warningMessage: appleStoreError && t(appleStoreError), endAdornment: !appleStoreError && appleStoreValue ? (_jsx(CheckIcon, {})) : (appleStoreValue && _jsx(ClearIconStyled, { onClick: handleClear })) }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.PLAY_STORE && hasApp, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: playStoreValue, startAdornment: _jsx(TextStyled, {}), placeholder: t('play_store_placeholder'), warningType: 'alert', warningMessage: playStoreError && t(playStoreError), endAdornment: !playStoreError && playStoreValue ? (_jsx(CheckIcon, {})) : (playStoreValue && _jsx(ClearIconStyled, { onClick: handleClear })) }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.PHYSICAL_STORE && hasPhysicalStore, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: physicalStoreValue, startAdornment: _jsx(TextStyled, {}), placeholder: t('physical_store_placeholder'), warningType: 'alert', warningMessage: physicalStoreError && t(physicalStoreError), endAdornment: !physicalStoreError && physicalStoreValue ? (_jsx(CheckIcon, {})) : (physicalStoreValue && _jsx(ClearIconStyled, { onClick: handleClear })) }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.TWITTER && hasSocial, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: twitterValue, startAdornment: _jsx(TextStyled, {}), placeholder: t('signup_twitter_placeholder'), warningType: 'alert', warningMessage: twitterError && t(twitterError), endAdornment: !twitterError && twitterValue ? (_jsx(CheckIcon, {})) : (twitterValue && _jsx(ClearIconStyled, { onClick: handleClear })) }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.INSTAGRAM && hasSocial, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: instagramValue, startAdornment: _jsx(TextStyled, {}), placeholder: t('signup_instagram_placeholder'), warningType: 'alert', warningMessage: instagramError && t(instagramError), endAdornment: !instagramError && instagramValue ? (_jsx(CheckIcon, {})) : (instagramValue && _jsx(ClearIconStyled, { onClick: handleClear })) }) })), _jsx(Collapse, __assign({ in: socialMediaType === SocialMediaTypes.CALL_CENTER && hasCallCenter, timeout: 300 }, { children: _jsx(InputStyled, { onChange: handleChange, value: callCenterValue, startAdornment: _jsx(TextStyled, {}), placeholder: t('call_center_placeholder'), warningType: 'alert', warningMessage: callCenterError && t(callCenterError), endAdornment: !callCenterError && callCenterValue ? (_jsx(CheckIcon, {})) : (callCenterValue && _jsx(ClearIconStyled, { onClick: handleClear })) }) }))] })) })) })));
|
|
116
161
|
};
|
|
117
162
|
export default React.memo(SocialMedia);
|
|
@@ -16,13 +16,13 @@ import { useController, useFormContext } from 'react-hook-form';
|
|
|
16
16
|
import Box from '@mui/material/Box';
|
|
17
17
|
import { styled, alpha } from '@mui/material/styles';
|
|
18
18
|
import Link from '@mui/material/Link';
|
|
19
|
-
import CheckBox from '
|
|
20
|
-
import { ScreenContainer } from '
|
|
21
|
-
import Text from '
|
|
22
|
-
import Warning from '
|
|
23
|
-
import { useLanguage } from '
|
|
24
|
-
import Collapse from '
|
|
25
|
-
import { EXTERNAL_LINKS } from '
|
|
19
|
+
import CheckBox from '@components/CheckBox';
|
|
20
|
+
import { ScreenContainer } from '@features/shared/Containers';
|
|
21
|
+
import Text from '@components/Text';
|
|
22
|
+
import Warning from '@components/Warning';
|
|
23
|
+
import { useLanguage } from '@hooks';
|
|
24
|
+
import Collapse from '@components/Collapse';
|
|
25
|
+
import { EXTERNAL_LINKS } from '@constants';
|
|
26
26
|
var TACContainerStyled = styled(Box)(function (_a) {
|
|
27
27
|
var theme = _a.theme;
|
|
28
28
|
return ({
|
|
@@ -7,49 +7,136 @@ export declare enum ValidationOptions {
|
|
|
7
7
|
export declare const MerchantValidationSchema: (userType: ValidationOptions) => yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
8
8
|
brandName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
9
9
|
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
|
|
10
|
+
salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
11
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
12
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
13
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
14
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
15
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
16
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
17
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
18
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
19
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
20
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
21
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
22
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
23
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
24
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
25
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
26
|
+
}>>[] | undefined>;
|
|
10
27
|
links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
11
28
|
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
12
29
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
13
30
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
31
|
+
apple_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
32
|
+
play_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
33
|
+
call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
34
|
+
physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
14
35
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
15
36
|
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
16
37
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
17
38
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
39
|
+
apple_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
40
|
+
play_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
41
|
+
call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
42
|
+
physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
18
43
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
19
44
|
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
20
45
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
21
46
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
47
|
+
apple_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
48
|
+
play_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
49
|
+
call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
50
|
+
physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
22
51
|
}>>>;
|
|
23
52
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
24
53
|
brandName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
25
54
|
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
|
|
55
|
+
salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
56
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
57
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
58
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
59
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
60
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
61
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
62
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
63
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
64
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
65
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
66
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
67
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
68
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
69
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
70
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
71
|
+
}>>[] | undefined>;
|
|
26
72
|
links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
27
73
|
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
28
74
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
29
75
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
76
|
+
apple_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
77
|
+
play_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
78
|
+
call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
79
|
+
physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
30
80
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
31
81
|
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
32
82
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
33
83
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
84
|
+
apple_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
85
|
+
play_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
86
|
+
call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
87
|
+
physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
34
88
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
35
89
|
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
36
90
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
37
91
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
92
|
+
apple_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
93
|
+
play_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
94
|
+
call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
95
|
+
physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
38
96
|
}>>>;
|
|
39
97
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
40
98
|
brandName: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
41
99
|
termAndConditionChecked: yup.BooleanSchema<boolean | undefined, import("yup/lib/types").AnyObject, boolean | undefined>;
|
|
100
|
+
salesChannels: import("yup/lib/array").RequiredArraySchema<yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
101
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
102
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
103
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
104
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
105
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
106
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
107
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
108
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
109
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
110
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
111
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
112
|
+
}>>>, import("yup/lib/types").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
113
|
+
id: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
114
|
+
name_en: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
115
|
+
name_ar: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
116
|
+
}>>[] | undefined>;
|
|
42
117
|
links: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
43
118
|
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
44
119
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
45
120
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
121
|
+
apple_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
122
|
+
play_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
123
|
+
call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
124
|
+
physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
46
125
|
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
47
126
|
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
48
127
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
49
128
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
129
|
+
apple_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
130
|
+
play_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
131
|
+
call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
132
|
+
physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
50
133
|
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
51
134
|
website: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
|
|
52
135
|
instagram: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
53
136
|
twitter: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
137
|
+
apple_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
138
|
+
play_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
139
|
+
call_center: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
140
|
+
physical_store: yup.StringSchema<string | null | undefined, import("yup/lib/types").AnyObject, string | null | undefined>;
|
|
54
141
|
}>>>;
|
|
55
142
|
}>>>;
|