@tap-payments/auth-jsconnect 2.6.3-test → 2.6.3
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/README.md +1 -1
- package/build/@types/app.d.ts +73 -15
- package/build/@types/app.js +18 -1
- package/build/@types/config.d.ts +45 -0
- package/build/@types/config.js +1 -0
- package/build/@types/form.d.ts +14 -3
- package/build/@types/index.d.ts +1 -0
- package/build/@types/index.js +1 -0
- package/build/@types/redux.d.ts +1 -0
- package/build/@types/theme.d.ts +4 -0
- package/build/@types/theme.js +5 -0
- package/build/api/account.d.ts +5 -0
- package/build/api/account.js +16 -2
- package/build/api/auth.d.ts +25 -1
- package/build/api/auth.js +18 -1
- package/build/api/availabilityServices.d.ts +1 -0
- package/build/api/country.d.ts +1 -0
- package/build/api/country.js +8 -1
- package/build/api/data.d.ts +4 -17
- package/build/api/data.js +5 -45
- package/build/api/entity.d.ts +28 -3
- package/build/api/entity.js +23 -10
- package/build/api/firebase.js +68 -8
- package/build/api/index.d.ts +19 -27
- package/build/api/lead.d.ts +25 -3
- package/build/api/lead.js +47 -1
- package/build/api/operator.d.ts +8 -3
- package/build/api/operator.js +4 -16
- package/build/app/rootReducer.d.ts +2 -0
- package/build/app/rootReducer.js +5 -1
- package/build/app/settings.d.ts +14 -3
- package/build/app/settings.js +127 -41
- package/build/app/store.d.ts +4 -0
- package/build/assets/locales/ar.json +333 -142
- package/build/assets/locales/en.json +330 -142
- package/build/components/AnimationFlow/AnimationFlow.d.ts +14 -3
- package/build/components/AnimationFlow/AnimationFlow.js +16 -5
- package/build/components/AnimationFlow/BottomSheet.d.ts +7 -2
- package/build/components/AnimationFlow/BottomSheet.js +37 -12
- package/build/components/AnimationFlow/Dialog.d.ts +11 -2
- package/build/components/AnimationFlow/Dialog.js +7 -11
- package/build/components/AnimationFlow/Loader.d.ts +6 -1
- package/build/components/AnimationFlow/Loader.js +17 -5
- package/build/components/ArabicDatePicker/ArabicDatePicker.d.ts +1 -1
- package/build/components/ArabicDatePicker/ArabicDatePicker.js +2 -2
- package/build/components/DatePicker/DatePicker.d.ts +1 -1
- package/build/components/DatePicker/DatePicker.js +2 -2
- package/build/components/ExpandIcon/ExpandIcon.d.ts +2 -0
- package/build/components/Footer/Footer.js +2 -1
- package/build/components/Providers/ThemeProvider.js +3 -3
- package/build/components/Slide/Slide.d.ts +1 -1
- package/build/components/Tooltip/Tooltip.js +1 -1
- package/build/constants/api.d.ts +9 -7
- package/build/constants/api.js +19 -15
- package/build/constants/app.d.ts +46 -0
- package/build/constants/app.js +380 -21
- package/build/constants/assets.d.ts +4 -0
- package/build/constants/assets.js +5 -1
- package/build/constants/dummy.d.ts +43 -196
- package/build/constants/dummy.js +614 -6141
- package/build/constants/validation.d.ts +5 -0
- package/build/constants/validation.js +6 -1
- package/build/features/app/auth/authStore.d.ts +103 -0
- package/build/features/app/auth/authStore.js +1179 -0
- package/build/features/app/bank/bankStore.d.ts +14 -18
- package/build/features/app/bank/bankStore.js +218 -158
- package/build/features/app/board/boardStore.d.ts +33 -0
- package/build/features/app/board/boardStore.js +269 -0
- package/build/features/app/brand/brandStore.d.ts +18 -31
- package/build/features/app/brand/brandStore.js +296 -263
- package/build/features/app/business/businessStore.d.ts +28 -10
- package/build/features/app/business/businessStore.js +361 -215
- package/build/features/app/connect/connectStore.d.ts +39 -15
- package/build/features/app/connect/connectStore.js +308 -207
- package/build/features/app/connectExpress/connectExpressStore.d.ts +63 -35
- package/build/features/app/connectExpress/connectExpressStore.js +764 -414
- package/build/features/app/entity/entityStore.d.ts +21 -34
- package/build/features/app/entity/entityStore.js +248 -246
- package/build/features/app/individual/individualStore.d.ts +24 -33
- package/build/features/app/individual/individualStore.js +336 -274
- package/build/features/app/password/passwordStore.d.ts +34 -18
- package/build/features/app/password/passwordStore.js +286 -219
- package/build/features/app/tax/taxStore.d.ts +14 -7
- package/build/features/app/tax/taxStore.js +202 -141
- package/build/features/auth/Auth.d.ts +14 -0
- package/build/features/auth/Auth.js +168 -0
- package/build/features/auth/index.d.ts +1 -0
- package/build/features/auth/index.js +1 -0
- package/build/features/auth/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +5 -0
- package/build/features/auth/screens/AccountCreatedLoader/AccountCreatedLoader.js +36 -0
- package/build/features/auth/screens/AccountCreatedLoader/index.d.ts +2 -0
- package/build/features/auth/screens/AccountCreatedLoader/index.js +2 -0
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.d.ts +5 -0
- package/build/features/auth/screens/AccountNotFound/AccountNotFound.js +71 -0
- package/build/features/auth/screens/AccountNotFound/index.d.ts +2 -0
- package/build/features/auth/screens/AccountNotFound/index.js +2 -0
- package/build/features/auth/screens/AuthMerchant/AuthMerchant.d.ts +5 -0
- package/build/features/auth/screens/AuthMerchant/AuthMerchant.js +73 -0
- package/build/features/{connectExpress/screens/AuthenticationList → auth/screens/AuthMerchant}/MerchantList.d.ts +2 -1
- package/build/features/auth/screens/AuthMerchant/MerchantList.js +64 -0
- package/build/features/auth/screens/AuthMerchant/index.d.ts +2 -0
- package/build/features/auth/screens/AuthMerchant/index.js +2 -0
- package/build/features/auth/screens/AuthMerchant/validation.d.ts +8 -0
- package/build/features/auth/screens/AuthMerchant/validation.js +4 -0
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.d.ts +5 -0
- package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +58 -0
- package/build/features/auth/screens/AuthSwitch/index.d.ts +3 -0
- package/build/features/auth/screens/AuthSwitch/index.js +2 -0
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.d.ts +5 -0
- package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +96 -0
- package/build/features/auth/screens/AuthenticationList/BrandList.d.ts +10 -0
- package/build/features/auth/screens/AuthenticationList/BrandList.js +81 -0
- package/build/features/auth/screens/AuthenticationList/EntityLegalName.d.ts +3 -0
- package/build/features/auth/screens/AuthenticationList/EntityLegalName.js +48 -0
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +31 -0
- package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +90 -0
- package/build/features/auth/screens/AuthenticationList/EntityList.d.ts +11 -0
- package/build/features/auth/screens/AuthenticationList/EntityList.js +138 -0
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
- package/build/features/auth/screens/AuthenticationList/LicenseNumber.js +36 -0
- package/build/features/auth/screens/AuthenticationList/index.d.ts +3 -0
- package/build/features/auth/screens/AuthenticationList/index.js +2 -0
- package/build/features/auth/screens/AuthenticationList/validation.d.ts +20 -0
- package/build/features/auth/screens/AuthenticationList/validation.js +68 -0
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/auth/screens/BusinessCountry/BusinessCountry.js +111 -0
- package/build/features/auth/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/auth/screens/BusinessCountry/index.js +2 -0
- package/build/features/auth/screens/CivilID/CivilID.d.ts +5 -0
- package/build/features/auth/screens/CivilID/CivilID.js +57 -0
- package/build/features/auth/screens/CivilID/IDNumber.d.ts +8 -0
- package/build/features/auth/screens/CivilID/IDNumber.js +54 -0
- package/build/features/auth/screens/CivilID/index.d.ts +3 -0
- package/build/features/auth/screens/CivilID/index.js +2 -0
- package/build/features/auth/screens/CivilID/validation.d.ts +8 -0
- package/build/features/auth/screens/CivilID/validation.js +4 -0
- package/build/features/auth/screens/DOB/DOB.js +47 -0
- package/build/features/auth/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/auth/screens/DOB/DOBForm.js +59 -0
- package/build/features/auth/screens/DOB/index.d.ts +3 -0
- package/build/features/auth/screens/DOB/index.js +2 -0
- package/build/features/auth/screens/DOB/validation.d.ts +8 -0
- package/build/features/auth/screens/DOB/validation.js +4 -0
- package/build/features/auth/screens/Email/Email.d.ts +5 -0
- package/build/features/auth/screens/Email/Email.js +57 -0
- package/build/features/auth/screens/Email/EmailField.d.ts +8 -0
- package/build/features/auth/screens/Email/EmailField.js +52 -0
- package/build/features/auth/screens/Email/index.d.ts +3 -0
- package/build/features/auth/screens/Email/index.js +2 -0
- package/build/features/auth/screens/Email/validation.d.ts +8 -0
- package/build/features/auth/screens/Email/validation.js +4 -0
- package/build/features/auth/screens/EmailSent/EmailSent.d.ts +5 -0
- package/build/features/auth/screens/EmailSent/EmailSent.js +79 -0
- package/build/features/auth/screens/EmailSent/index.d.ts +2 -0
- package/build/features/auth/screens/EmailSent/index.js +2 -0
- package/build/features/auth/screens/MigratingData/MigratingData.d.ts +5 -0
- package/build/features/auth/screens/MigratingData/MigratingData.js +44 -0
- package/build/features/auth/screens/MigratingData/index.d.ts +2 -0
- package/build/features/auth/screens/MigratingData/index.js +2 -0
- package/build/features/auth/screens/Mobile/Mobile.d.ts +5 -0
- package/build/features/auth/screens/Mobile/Mobile.js +82 -0
- package/build/features/auth/screens/Mobile/MobileNumber.d.ts +13 -0
- package/build/features/auth/screens/Mobile/MobileNumber.js +158 -0
- package/build/features/auth/screens/Mobile/index.d.ts +3 -0
- package/build/features/auth/screens/Mobile/index.js +2 -0
- package/build/features/auth/screens/Mobile/validation.d.ts +8 -0
- package/build/features/auth/screens/Mobile/validation.js +35 -0
- package/build/features/auth/screens/NID/IDNumber.d.ts +7 -0
- package/build/features/auth/screens/NID/IDNumber.js +55 -0
- package/build/features/auth/screens/NID/NID.d.ts +5 -0
- package/build/features/auth/screens/NID/NID.js +56 -0
- package/build/features/auth/screens/NID/index.d.ts +3 -0
- package/build/features/auth/screens/NID/index.js +2 -0
- package/build/features/auth/screens/NID/validation.d.ts +8 -0
- package/build/features/auth/screens/NID/validation.js +10 -0
- package/build/features/auth/screens/OTP/OTP.js +118 -0
- package/build/features/{connectExpress/screens/IdentityOTP → auth/screens/OTP}/OTPInput.js +27 -7
- package/build/features/auth/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/auth/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/auth/screens/OperatorError/index.d.ts +3 -0
- package/build/features/auth/screens/OperatorError/index.js +2 -0
- package/build/features/auth/screens/Password/Password.d.ts +5 -0
- package/build/features/auth/screens/Password/Password.js +61 -0
- package/build/features/auth/screens/Password/PasswordField.d.ts +5 -0
- package/build/features/auth/screens/Password/PasswordField.js +28 -0
- package/build/features/auth/screens/Password/index.d.ts +3 -0
- package/build/features/auth/screens/Password/index.js +2 -0
- package/build/features/auth/screens/Password/validation.d.ts +8 -0
- package/build/features/auth/screens/Password/validation.js +4 -0
- package/build/features/auth/screens/PreparingData/PreparingData.d.ts +5 -0
- package/build/features/auth/screens/PreparingData/PreparingData.js +44 -0
- package/build/features/auth/screens/PreparingData/index.d.ts +2 -0
- package/build/features/auth/screens/PreparingData/index.js +2 -0
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.d.ts +5 -0
- package/build/features/auth/screens/ResetPasswordMessage/ResetPasswordMessage.js +21 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.d.ts +3 -0
- package/build/features/auth/screens/ResetPasswordMessage/index.js +2 -0
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/auth/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/auth/screens/VerifyNafath/index.js +2 -0
- package/build/features/auth/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
- package/build/features/auth/screens/VerifyPACI/VerifyPACI.js +34 -0
- package/build/features/auth/screens/VerifyPACI/index.d.ts +3 -0
- package/build/features/auth/screens/VerifyPACI/index.js +2 -0
- package/build/features/bank/Bank.d.ts +2 -0
- package/build/features/bank/Bank.js +15 -9
- package/build/features/bank/screens/BankDetails/BankDetails.js +21 -7
- package/build/features/bank/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/bank/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/bank/screens/OperatorError/index.d.ts +3 -0
- package/build/features/bank/screens/OperatorError/index.js +2 -0
- package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/bank/screens/Verify/Verify.js +8 -7
- package/build/features/board/Board.d.ts +13 -0
- package/build/features/board/Board.js +87 -0
- package/build/features/board/index.d.ts +1 -0
- package/build/features/board/index.js +1 -0
- package/build/features/board/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/board/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/board/screens/OperatorError/index.d.ts +3 -0
- package/build/features/board/screens/OperatorError/index.js +2 -0
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/board/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/board/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/board/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
- package/build/features/board/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.d.ts +3 -0
- package/build/features/board/screens/ResetPasswordSuccess/index.js +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
- package/build/features/board/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +44 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.d.ts +2 -0
- package/build/features/board/screens/SuccessWithFlowButtons/index.js +2 -0
- package/build/features/board/screens/Verify/OTPInput.d.ts +7 -0
- package/build/features/{business/screens/OTP → board/screens/Verify}/OTPInput.js +9 -7
- package/build/features/{connectExpress/screens/IdentityOTP/OTP.js → board/screens/Verify/Verify.js} +25 -37
- package/build/features/board/screens/Verify/index.d.ts +2 -0
- package/build/features/board/screens/Verify/index.js +2 -0
- package/build/features/brand/Brand.d.ts +2 -0
- package/build/features/brand/Brand.js +15 -9
- package/build/features/brand/screens/BrandActivities/ActivitiesList.d.ts +9 -9
- package/build/features/brand/screens/BrandActivities/BrandActivities.js +49 -12
- package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +6 -6
- package/build/features/brand/screens/BrandActivities/CustomerBase.js +1 -1
- package/build/features/brand/screens/BrandActivities/ExpectedSalesRange.js +5 -2
- package/build/features/brand/screens/BrandActivities/RefundPolicy.d.ts +4 -4
- package/build/features/brand/screens/BrandActivities/RefundPolicy.js +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.d.ts +1 -1
- package/build/features/brand/screens/BrandActivities/TAC.js +1 -1
- package/build/features/brand/screens/BrandActivities/TransactionPolicy.js +1 -1
- package/build/features/brand/screens/BrandInfo/BrandInfo.js +27 -7
- package/build/features/brand/screens/BrandInfo/BrandName.js +5 -2
- package/build/features/brand/screens/BrandInfo/validation.js +2 -2
- package/build/features/brand/screens/BrandSegmentInfo/BrandSegmentInfo.js +23 -7
- package/build/features/brand/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/brand/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/brand/screens/OperatorError/index.d.ts +3 -0
- package/build/features/brand/screens/OperatorError/index.js +2 -0
- package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/brand/screens/Verify/Verify.js +4 -3
- package/build/features/business/Business.js +20 -12
- package/build/features/business/screens/Activities/Activities.js +27 -10
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +4 -4
- package/build/features/business/screens/Activities/ActivitiesList.js +1 -1
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +5 -3
- package/build/features/business/screens/Activities/OperationStartDate.js +2 -2
- package/build/features/business/screens/BrandDetails/SalesChannel.d.ts +2 -2
- package/build/features/business/screens/BusinessType/BusinessType.js +24 -8
- package/build/features/business/screens/BusinessType/EntityName.js +3 -3
- package/build/features/business/screens/BusinessType/LicenseList.js +3 -3
- package/build/features/business/screens/BusinessType/LicenseNumber.js +10 -9
- package/build/features/business/screens/BusinessType/LicenseType.d.ts +4 -4
- package/build/features/business/screens/BusinessType/validation.d.ts +10 -0
- package/build/features/business/screens/BusinessType/validation.js +16 -0
- package/build/features/business/screens/CivilID/CivilID.js +1 -1
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +14 -12
- package/build/features/business/screens/Customers/CustomerLocations.js +5 -3
- package/build/features/business/screens/Customers/Customers.js +51 -11
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +3 -1
- package/build/features/business/screens/Customers/ExpectedCustomers.js +5 -3
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +3 -1
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +10 -4
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +12 -5
- package/build/features/business/screens/Customers/RefundPolicy.js +13 -13
- package/build/features/business/screens/Customers/TransactionPolicy.d.ts +4 -1
- package/build/features/business/screens/Customers/TransactionPolicy.js +8 -5
- package/build/features/business/screens/Customers/validation.d.ts +6 -6
- package/build/features/business/screens/Customers/validation.js +3 -8
- package/build/features/business/screens/DOB/DOB.d.ts +6 -0
- package/build/features/business/screens/DOB/DOB.js +45 -0
- package/build/features/business/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/business/screens/DOB/DOBForm.js +72 -0
- package/build/features/business/screens/DOB/index.d.ts +3 -0
- package/build/features/business/screens/DOB/index.js +2 -0
- package/build/features/business/screens/DOB/validation.d.ts +8 -0
- package/build/features/business/screens/DOB/validation.js +4 -0
- package/build/features/business/screens/IDBOD/ID.js +6 -2
- package/build/features/business/screens/IDBOD/IDBOD.js +18 -19
- package/build/features/business/screens/IDBOD/validation.d.ts +7 -0
- package/build/features/business/screens/IDBOD/validation.js +4 -1
- package/build/features/business/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/business/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/business/screens/OperatorError/index.d.ts +3 -0
- package/build/features/business/screens/OperatorError/index.js +2 -0
- package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +14 -3
- package/build/features/business/screens/Verify/Verify.js +16 -5
- package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/business/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/business/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/business/screens/VerifyNafath/index.js +2 -0
- package/build/features/connect/Connect.d.ts +5 -1
- package/build/features/connect/Connect.js +48 -31
- package/build/features/connect/screens/BrandSegment/BrandSegment.js +4 -26
- package/build/features/connect/screens/BrandSegment/TeamSize.js +1 -1
- package/build/features/connect/screens/BrandSegment/validation.d.ts +0 -9
- package/build/features/connect/screens/BrandSegment/validation.js +0 -3
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connect/screens/BusinessCountry/BusinessCountry.js +113 -0
- package/build/features/connect/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connect/screens/BusinessCountry/index.js +2 -0
- package/build/features/connect/screens/CivilID/CivilID.js +12 -4
- package/build/features/{connectExpress/screens/NID → connect/screens/DOB}/DOB.d.ts +1 -2
- package/build/features/connect/screens/{NID → DOB}/DOB.js +2 -2
- package/build/features/connect/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connect/screens/DOB/DOBForm.js +59 -0
- package/build/features/connect/screens/DOB/index.d.ts +3 -0
- package/build/features/connect/screens/DOB/index.js +2 -0
- package/build/features/connect/screens/DOB/validation.d.ts +8 -0
- package/build/features/connect/screens/DOB/validation.js +4 -0
- package/build/features/connect/screens/Individual/Individual.js +12 -6
- package/build/features/connect/screens/Individual/MobileNumber.js +6 -3
- package/build/features/connect/screens/Individual/validation.js +8 -3
- package/build/features/connect/screens/Merchant/BrandList.js +3 -3
- package/build/features/connect/screens/Merchant/BrandName.js +5 -2
- package/build/features/connect/screens/Merchant/Merchant.js +1 -1
- package/build/features/connect/screens/Merchant/SalesChannels.js +1 -1
- package/build/features/connect/screens/Merchant/validation.js +2 -2
- package/build/features/connect/screens/Mobile/Mobile.js +14 -7
- package/build/features/connect/screens/Mobile/MobileNumber.js +14 -8
- package/build/features/connect/screens/Mobile/validation.js +8 -3
- package/build/features/connect/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connect/screens/NID/IDNumber.js +2 -2
- package/build/features/connect/screens/NID/NID.js +10 -13
- package/build/features/connect/screens/NID/validation.d.ts +0 -3
- package/build/features/connect/screens/NID/validation.js +0 -1
- package/build/features/connect/screens/OTP/OTP.js +7 -7
- package/build/features/connect/screens/OTP/OTPInput.js +3 -11
- package/build/features/connect/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connect/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connect/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connect/screens/OperatorError/index.js +2 -0
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/connect/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connect/screens/VerifyNafath/index.js +2 -0
- package/build/features/connectExpress/ConnectExpress.d.ts +5 -3
- package/build/features/connectExpress/ConnectExpress.js +70 -44
- package/build/features/connectExpress/screens/AccountAlreadyCreated/AccountAlreadyCreated.js +14 -2
- package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.d.ts +5 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/AccountCreatedLoader.js +36 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/index.d.ts +2 -0
- package/build/features/connectExpress/screens/AccountCreatedLoader/index.js +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.d.ts +5 -0
- package/build/features/connectExpress/screens/AuthMerchant/AuthMerchant.js +74 -0
- package/build/features/connectExpress/screens/{AuthenticationList/TerminalList.d.ts → AuthMerchant/MerchantList.d.ts} +4 -3
- package/build/features/connectExpress/screens/AuthMerchant/MerchantList.js +64 -0
- package/build/features/connectExpress/screens/AuthMerchant/index.d.ts +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/index.js +2 -0
- package/build/features/connectExpress/screens/AuthMerchant/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/AuthMerchant/validation.js +4 -0
- package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +30 -17
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLegalName.js +48 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +31 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +90 -0
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.d.ts +3 -3
- package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +52 -10
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.d.ts +3 -0
- package/build/features/connectExpress/screens/AuthenticationList/LicenseNumber.js +36 -0
- package/build/features/connectExpress/screens/AuthenticationList/validation.d.ts +13 -10
- package/build/features/connectExpress/screens/AuthenticationList/validation.js +66 -7
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.d.ts +5 -0
- package/build/features/connectExpress/screens/BusinessCountry/BusinessCountry.js +111 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.d.ts +3 -0
- package/build/features/connectExpress/screens/BusinessCountry/index.js +2 -0
- package/build/features/connectExpress/screens/CivilID/CivilID.js +16 -5
- package/build/features/connectExpress/screens/CivilID/IDNumber.js +7 -2
- package/build/features/connectExpress/screens/CivilIDMissed/CivilID.js +2 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/BrandName.js +5 -2
- package/build/features/connectExpress/screens/CollectBusinessInfo/CollectBusinessInfo.js +20 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +6 -5
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseNumber.js +9 -8
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.d.ts +4 -4
- package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseType.js +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.d.ts +13 -0
- package/build/features/connectExpress/screens/CollectBusinessInfo/validation.js +68 -1
- package/build/features/connectExpress/screens/CollectIndividualInfo/CollectIndividualInfo.js +34 -7
- package/build/features/connectExpress/screens/CollectIndividualInfo/MobileNumber.js +7 -4
- package/build/features/connectExpress/screens/CollectIndividualInfo/validation.js +8 -3
- package/build/features/connectExpress/screens/CreateAccountLoader/CreateAccountLoader.js +14 -24
- package/build/features/connectExpress/screens/DOB/DOB.d.ts +6 -0
- package/build/features/connectExpress/screens/{NID → DOB}/DOB.js +3 -3
- package/build/features/connectExpress/screens/DOB/DOBForm.d.ts +5 -0
- package/build/features/connectExpress/screens/DOB/DOBForm.js +63 -0
- package/build/features/connectExpress/screens/DOB/index.d.ts +3 -0
- package/build/features/connectExpress/screens/DOB/index.js +2 -0
- package/build/features/connectExpress/screens/DOB/validation.d.ts +8 -0
- package/build/features/connectExpress/screens/DOB/validation.js +4 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +35 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +2 -0
- package/build/features/connectExpress/screens/IdentityVerifyPACI/VerifyPACI.js +2 -2
- package/build/features/connectExpress/screens/Mobile/Mobile.js +17 -7
- package/build/features/connectExpress/screens/Mobile/MobileNumber.js +17 -11
- package/build/features/connectExpress/screens/Mobile/TAC.js +1 -1
- package/build/features/connectExpress/screens/Mobile/validation.js +16 -6
- package/build/features/connectExpress/screens/NID/IDNumber.d.ts +1 -0
- package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
- package/build/features/connectExpress/screens/NID/NID.js +15 -12
- package/build/features/connectExpress/screens/NID/TAC.d.ts +1 -1
- package/build/features/connectExpress/screens/NID/TAC.js +2 -2
- package/build/features/connectExpress/screens/NID/validation.d.ts +0 -3
- package/build/features/connectExpress/screens/NID/validation.js +0 -2
- package/build/features/connectExpress/screens/NIDMissed/IDNumber.js +6 -2
- package/build/features/connectExpress/screens/NIDMissed/NID.js +10 -8
- package/build/features/connectExpress/screens/NIDMissed/validation.d.ts +7 -0
- package/build/features/connectExpress/screens/NIDMissed/validation.js +4 -1
- package/build/features/connectExpress/screens/OTP/OTP.js +14 -16
- package/build/features/connectExpress/screens/OTP/OTPInput.js +12 -10
- package/build/features/connectExpress/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/connectExpress/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/connectExpress/screens/OperatorError/index.d.ts +3 -0
- package/build/features/connectExpress/screens/OperatorError/index.js +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.d.ts +5 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/PrepareDataLoading.js +34 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/connectExpress/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/connectExpress/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -4
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +5 -0
- package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +35 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +3 -0
- package/build/features/connectExpress/screens/VerifyNafath/index.js +2 -0
- package/build/features/entity/Entity.d.ts +2 -0
- package/build/features/entity/Entity.js +15 -9
- package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +4 -4
- package/build/features/entity/screens/EntityCapital/CapitalPaid.js +5 -3
- package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +6 -4
- package/build/features/entity/screens/EntityCapital/EntityCapital.js +34 -10
- package/build/features/entity/screens/EntityName/EntityName.js +44 -19
- package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +9 -9
- package/build/features/entity/screens/EntityName/EntityTypeList.js +2 -3
- package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/ExpiryDate.js +5 -7
- package/build/features/entity/screens/EntityName/IssuingDate.d.ts +2 -2
- package/build/features/entity/screens/EntityName/IssuingDate.js +5 -7
- package/build/features/entity/screens/EntityName/LegalName.js +1 -13
- package/build/features/entity/screens/EntityName/LicenseNumber.js +10 -11
- package/build/features/entity/screens/EntityName/UnifiedNumber.js +4 -6
- package/build/features/entity/screens/EntityName/validation.d.ts +31 -3
- package/build/features/entity/screens/EntityName/validation.js +38 -9
- package/build/features/entity/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/entity/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/entity/screens/OperatorError/index.d.ts +3 -0
- package/build/features/entity/screens/OperatorError/index.js +2 -0
- package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/entity/screens/Verify/Verify.js +4 -3
- package/build/features/featuresScreens.d.ts +2 -0
- package/build/features/featuresScreens.js +250 -16
- package/build/features/individual/Individual.d.ts +2 -0
- package/build/features/individual/Individual.js +15 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +55 -15
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.d.ts +36 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/IsAuthorizedSwitch.js +76 -0
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +5 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +4 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/ShareValue.js +7 -4
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +4 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +4 -3
- package/build/features/individual/screens/IndividualList/IndividualList.d.ts +4 -4
- package/build/features/individual/screens/IndividualList/IndividualList.js +21 -6
- package/build/features/individual/screens/IndividualList/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualList/UserList.js +13 -9
- package/build/features/individual/screens/IndividualList/validation.js +8 -3
- package/build/features/individual/screens/IndividualPersonalInfo/Gender.d.ts +4 -4
- package/build/features/individual/screens/IndividualPersonalInfo/ID.js +6 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.d.ts +2 -2
- package/build/features/individual/screens/IndividualPersonalInfo/IndividualPersonalInfo.js +79 -21
- package/build/features/individual/screens/IndividualPersonalInfo/MobileNumber.js +6 -3
- package/build/features/individual/screens/IndividualPersonalInfo/validation.d.ts +1 -1
- package/build/features/individual/screens/IndividualPersonalInfo/validation.js +72 -63
- package/build/features/individual/screens/IndividualPhoneInfo/MobileNumber.js +7 -4
- package/build/features/individual/screens/IndividualPhoneInfo/PhoneInfo.js +1 -1
- package/build/features/individual/screens/IndividualPhoneInfo/validation.js +8 -3
- package/build/features/individual/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/individual/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/individual/screens/OperatorError/index.d.ts +3 -0
- package/build/features/individual/screens/OperatorError/index.js +2 -0
- package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/individual/screens/Verify/Verify.js +4 -3
- package/build/features/password/Password.d.ts +2 -0
- package/build/features/password/Password.js +94 -32
- package/build/features/password/screens/CreatePassword/CreatePassword.js +10 -4
- package/build/features/password/screens/OTP/OTP.js +4 -4
- package/build/features/password/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/password/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/password/screens/OperatorError/index.d.ts +3 -0
- package/build/features/password/screens/OperatorError/index.js +2 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.d.ts +4 -0
- package/build/features/password/screens/PrepareDataLoading/PrepareDataLoading.js +10 -0
- package/build/features/password/screens/PrepareDataLoading/index.d.ts +2 -0
- package/build/features/password/screens/PrepareDataLoading/index.js +2 -0
- package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/password/screens/Verify/Verify.js +8 -7
- package/build/features/shared/Address/CountryList.d.ts +7 -7
- package/build/features/shared/Address/InputSelect.d.ts +7 -7
- package/build/features/shared/Background/Background.d.ts +3 -1
- package/build/features/shared/Background/Background.js +9 -11
- package/build/features/shared/BusinessCountry/BusinessCountry.d.ts +15 -0
- package/build/features/shared/BusinessCountry/BusinessCountry.js +179 -0
- package/build/features/shared/BusinessCountry/index.d.ts +2 -0
- package/build/features/shared/BusinessCountry/index.js +2 -0
- package/build/features/shared/Button/Button.js +11 -5
- package/build/features/shared/Button/EmailProvidersButtons.js +2 -0
- package/build/features/shared/Button/FlowsButtons.js +15 -3
- package/build/features/shared/Button/NafathButton.d.ts +8 -0
- package/build/features/shared/Button/{AbsherButton.js → NafathButton.js} +12 -3
- package/build/features/shared/Button/index.d.ts +2 -2
- package/build/features/shared/Button/index.js +2 -2
- package/build/features/shared/Calender/Calender.d.ts +2 -1
- package/build/features/shared/Calender/Calender.js +3 -3
- package/build/features/shared/Containers/FeatureContainer.d.ts +2 -1
- package/build/features/shared/Containers/FeatureContainer.js +3 -3
- package/build/features/shared/Containers/ScreenContainer.d.ts +1 -1
- package/build/features/shared/DataLoading/DataLoading.d.ts +4 -1
- package/build/features/shared/DataLoading/DataLoading.js +2 -2
- package/build/features/shared/Footer/Footer.js +2 -1
- package/build/features/shared/Input/Input.d.ts +2 -2
- package/build/features/shared/NafathVerification/NafathVerification.d.ts +14 -0
- package/build/features/shared/NafathVerification/NafathVerification.js +92 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +8 -0
- package/build/features/shared/NafathVerification/VerifyNafathLoading.js +53 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +5 -0
- package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +8 -0
- package/build/features/shared/NafathVerification/index.d.ts +2 -0
- package/build/features/shared/NafathVerification/index.js +2 -0
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +6 -1
- package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +10 -13
- package/build/features/shared/SuccessScreen/SuccessScreen.js +1 -1
- package/build/features/shared/UploadFile/FileUpload.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadFile/UploadWrapper.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadFile.d.ts +1 -1
- package/build/features/shared/UploadMultipleFile/UploadMultipleFile.d.ts +1 -1
- package/build/features/signIn/SignIn.js +18 -7
- package/build/features/signIn/screens/Mobile/MobileNumber.js +6 -3
- package/build/features/signIn/screens/Mobile/validation.js +8 -3
- package/build/features/signIn/screens/OTP/OTP.js +5 -4
- package/build/features/signIn/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/signIn/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/signIn/screens/OperatorError/index.d.ts +3 -0
- package/build/features/signIn/screens/OperatorError/index.js +2 -0
- package/build/features/tax/Tax.d.ts +2 -0
- package/build/features/tax/Tax.js +15 -9
- package/build/features/tax/screens/OperatorError/OperatorError.d.ts +5 -0
- package/build/features/tax/screens/OperatorError/OperatorError.js +9 -0
- package/build/features/tax/screens/OperatorError/index.d.ts +3 -0
- package/build/features/tax/screens/OperatorError/index.js +2 -0
- package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +13 -5
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +9 -3
- package/build/features/tax/screens/Verify/Verify.js +8 -7
- package/build/hooks/index.d.ts +3 -0
- package/build/hooks/index.js +3 -0
- package/build/hooks/useAppConfig.d.ts +3 -3
- package/build/hooks/useAppConfig.js +9 -6
- package/build/hooks/useAppDispatch.d.ts +2 -0
- package/build/hooks/useAppTheme.js +4 -3
- package/build/hooks/useCountDown.d.ts +10 -0
- package/build/hooks/useCountDown.js +17 -0
- package/build/hooks/useCountry.d.ts +1 -0
- package/build/hooks/useCountry.js +4 -3
- package/build/hooks/useFormDirtyCheck.d.ts +10 -0
- package/build/hooks/useFormDirtyCheck.js +66 -0
- package/build/hooks/useSanitizedTranslation.d.ts +1 -0
- package/build/hooks/useSanitizedTranslation.js +15 -0
- package/build/hooks/useVerifyToken.d.ts +5 -2
- package/build/hooks/useVerifyToken.js +10 -5
- package/build/index.css +360 -120
- package/build/index.d.ts +4 -2
- package/build/index.js +6 -2
- package/build/theme/components.js +7 -0
- package/build/theme/palette.js +4 -2
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +2 -2
- package/build/utils/array.js +2 -2
- package/build/utils/common.d.ts +3 -0
- package/build/utils/common.js +38 -2
- package/build/utils/device.d.ts +2 -0
- package/build/utils/device.js +6 -0
- package/build/utils/locale.js +2 -1
- package/build/utils/object.d.ts +1 -0
- package/build/utils/object.js +4 -1
- package/build/utils/string.d.ts +5 -2
- package/build/utils/string.js +24 -5
- package/build/utils/validation.d.ts +5 -0
- package/build/utils/validation.js +16 -0
- package/package.json +2 -2
- package/build/features/business/screens/OTP/OTP.d.ts +0 -8
- package/build/features/business/screens/OTP/OTP.js +0 -90
- package/build/features/connect/screens/BrandSegment/SegmentLocations.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentLocations.js +0 -66
- package/build/features/connect/screens/BrandSegment/SegmentProfits.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentProfits.js +0 -66
- package/build/features/connect/screens/BrandSegment/SegmentTechs.d.ts +0 -8
- package/build/features/connect/screens/BrandSegment/SegmentTechs.js +0 -66
- package/build/features/connectExpress/screens/AuthenticationList/MerchantList.js +0 -100
- package/build/features/connectExpress/screens/AuthenticationList/TerminalList.js +0 -101
- package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +0 -3
- package/build/features/connectExpress/screens/IdentityOTP/index.js +0 -2
- package/build/features/shared/Button/AbsherButton.d.ts +0 -8
- /package/build/features/{connect/screens/NID → auth/screens/DOB}/DOB.d.ts +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP → auth/screens/OTP}/OTP.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/OTPInput.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/index.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/index.js +0 -0
- /package/build/features/{business → auth}/screens/OTP/validation.d.ts +0 -0
- /package/build/features/{business → auth}/screens/OTP/validation.js +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP/OTPInput.d.ts → board/screens/Verify/Verify.d.ts} +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP → board/screens/Verify}/validation.d.ts +0 -0
- /package/build/features/{connectExpress/screens/IdentityOTP → board/screens/Verify}/validation.js +0 -0
package/build/theme/palette.js
CHANGED
|
@@ -4,7 +4,8 @@ export var lightPalette = {
|
|
|
4
4
|
primary: {
|
|
5
5
|
main: '#007aff',
|
|
6
6
|
dark: '#9CA0A94D',
|
|
7
|
-
light: '#
|
|
7
|
+
light: '#0A9A8F',
|
|
8
|
+
contrastText: '#e2e0f8'
|
|
8
9
|
},
|
|
9
10
|
success: {
|
|
10
11
|
light: '#2CCE01',
|
|
@@ -45,7 +46,8 @@ export var lightPalette = {
|
|
|
45
46
|
},
|
|
46
47
|
info: {
|
|
47
48
|
main: '#808592',
|
|
48
|
-
light: '#EAECEF'
|
|
49
|
+
light: '#EAECEF',
|
|
50
|
+
dark: '#3B4152'
|
|
49
51
|
}
|
|
50
52
|
};
|
|
51
53
|
export var darkPalette = {
|
package/build/theme/theme.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DirectionMode, ThemeMode } from '../@types';
|
|
2
|
-
export declare const appTheme: (mode: ThemeMode,
|
|
2
|
+
export declare const appTheme: (mode: ThemeMode, dir: DirectionMode, isSmallScreen: boolean) => import("@mui/material/styles").Theme;
|
package/build/theme/theme.js
CHANGED
|
@@ -3,7 +3,7 @@ import { typography } from './typography';
|
|
|
3
3
|
import { darkPalette, lightPalette } from './palette';
|
|
4
4
|
import { components } from './components';
|
|
5
5
|
import { shadows } from './shadows';
|
|
6
|
-
export var appTheme = function (mode,
|
|
6
|
+
export var appTheme = function (mode, dir, isSmallScreen) {
|
|
7
7
|
return createTheme({
|
|
8
8
|
palette: mode === 'dark' ? darkPalette : lightPalette,
|
|
9
9
|
direction: dir,
|
|
@@ -11,7 +11,7 @@ export var appTheme = function (mode, isMobile, dir) {
|
|
|
11
11
|
breakpoints: {
|
|
12
12
|
values: {
|
|
13
13
|
xs: 0,
|
|
14
|
-
sm:
|
|
14
|
+
sm: isSmallScreen ? 1536 : 600,
|
|
15
15
|
md: 900,
|
|
16
16
|
lg: 1200,
|
|
17
17
|
xl: 1536
|
package/build/utils/array.js
CHANGED
|
@@ -192,7 +192,7 @@ export var getFileDetailsFromDocument = function (documents, purpose) {
|
|
|
192
192
|
if ((documents || []).length === 0)
|
|
193
193
|
return [];
|
|
194
194
|
return documents.reduce(function (acc, document) {
|
|
195
|
-
var fileDetails = (document.file_details || []).filter(function (file) { return file.purpose
|
|
195
|
+
var fileDetails = (document.file_details || []).filter(function (file) { return purpose.includes(file.purpose); });
|
|
196
196
|
return acc.concat(fileDetails.map(function (f) { return (__assign(__assign({}, f), { docId: document.id })); }));
|
|
197
197
|
}, []);
|
|
198
198
|
};
|
|
@@ -200,7 +200,7 @@ export var getRecentDocumentBasedOnPurpose = function (documents, purpose) {
|
|
|
200
200
|
if ((documents || []).length === 0)
|
|
201
201
|
return [];
|
|
202
202
|
var filteredByPurpose = documents.filter(function (doc) {
|
|
203
|
-
return doc.type
|
|
203
|
+
return purpose.includes(doc.type);
|
|
204
204
|
});
|
|
205
205
|
if ((filteredByPurpose || []).length > 0) {
|
|
206
206
|
return filteredByPurpose.sort(function (a, b) { return b.created - a.created; })[0];
|
package/build/utils/common.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export declare const sleep: (milliseconds?: number) => Promise<unknown>;
|
|
2
2
|
export declare const dangerousMessage: (message: string, callBack?: Function) => void;
|
|
3
3
|
export declare const setBaseUrl: (publicKey: string) => void;
|
|
4
|
+
export declare const updateLocationUrlWithCountry: (countryIso2: string) => void;
|
|
5
|
+
export declare const openConnect: (pk: string, countryCode?: string) => void;
|
|
6
|
+
export declare function getMetaData(): Record<string, string> | undefined;
|
package/build/utils/common.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { axiosInstance } from '../api';
|
|
2
|
-
import { ENDPOINT_PATHS } from '../constants';
|
|
2
|
+
import { ENDPOINT_PATHS, CONNECT_SANDBOX_URL, CONNECT_PROD_URL } from '../constants';
|
|
3
|
+
import { objectHasValues } from './object';
|
|
3
4
|
export var sleep = function (milliseconds) {
|
|
4
5
|
if (milliseconds === void 0) { milliseconds = 1000; }
|
|
5
6
|
return new Promise(function (resolve) { return setTimeout(resolve, milliseconds); });
|
|
@@ -16,5 +17,40 @@ export var setBaseUrl = function (publicKey) {
|
|
|
16
17
|
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.PRODUCTION_BASE_URL;
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
|
-
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.
|
|
20
|
+
axiosInstance.defaults.baseURL = ENDPOINT_PATHS.SANDBOX_BASE_URL;
|
|
20
21
|
};
|
|
22
|
+
export var updateLocationUrlWithCountry = function (countryIso2) {
|
|
23
|
+
var country = countryIso2.toLowerCase();
|
|
24
|
+
var url = new URL(window.location.href);
|
|
25
|
+
var protocol = url.protocol;
|
|
26
|
+
var host = url.host;
|
|
27
|
+
var currentPath = url.pathname;
|
|
28
|
+
var search = url.search;
|
|
29
|
+
var hash = url.hash;
|
|
30
|
+
var updatedPath = '';
|
|
31
|
+
if (currentPath === '/')
|
|
32
|
+
updatedPath = "/".concat(country);
|
|
33
|
+
else
|
|
34
|
+
updatedPath = currentPath.replace(/\/[a-z]{2}\/?/i, "/".concat(country));
|
|
35
|
+
var newUrl = "".concat(protocol, "//").concat(host).concat(updatedPath).concat(search).concat(hash);
|
|
36
|
+
window.history.replaceState({}, '', newUrl);
|
|
37
|
+
};
|
|
38
|
+
export var openConnect = function (pk, countryCode) {
|
|
39
|
+
var newUrl = new URL(pk.includes('pk_live') ? CONNECT_PROD_URL : CONNECT_SANDBOX_URL);
|
|
40
|
+
if (countryCode) {
|
|
41
|
+
newUrl.pathname = "/".concat(countryCode.toLowerCase());
|
|
42
|
+
}
|
|
43
|
+
window.open("".concat(newUrl), '_self', '_blank');
|
|
44
|
+
};
|
|
45
|
+
export function getMetaData() {
|
|
46
|
+
var urlObj = new URL(window.location.href);
|
|
47
|
+
var paramsToExtract = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content'];
|
|
48
|
+
var meta_data = {};
|
|
49
|
+
paramsToExtract.forEach(function (param) {
|
|
50
|
+
var value = urlObj.searchParams.get(param);
|
|
51
|
+
if (value !== null && value !== '') {
|
|
52
|
+
meta_data[param] = value;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return objectHasValues(meta_data) ? meta_data : undefined;
|
|
56
|
+
}
|
package/build/utils/device.d.ts
CHANGED
|
@@ -3,3 +3,5 @@ import { GetResult } from '@fingerprintjs/fingerprintjs';
|
|
|
3
3
|
export declare const getBrowserInfo: () => DeviceDetectorResult;
|
|
4
4
|
export declare const getFingerPrint: () => Promise<GetResult>;
|
|
5
5
|
export declare const mobileOS: () => 'Windows Phone' | 'Android' | 'iOS' | 'unknown';
|
|
6
|
+
export declare function getUserLanguage(): string;
|
|
7
|
+
export declare const userTextDirection: string;
|
package/build/utils/device.js
CHANGED
|
@@ -24,3 +24,9 @@ export var mobileOS = function () {
|
|
|
24
24
|
}
|
|
25
25
|
return 'unknown';
|
|
26
26
|
};
|
|
27
|
+
export function getUserLanguage() {
|
|
28
|
+
if (!navigator.language || (navigator.language !== 'ar' && navigator.language !== 'en'))
|
|
29
|
+
return 'en';
|
|
30
|
+
return navigator.language.substring(0, 2);
|
|
31
|
+
}
|
|
32
|
+
export var userTextDirection = document.documentElement.dir;
|
package/build/utils/locale.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { initReactI18next } from 'react-i18next';
|
|
2
2
|
import i18n from '../i18n';
|
|
3
3
|
export var updateLocale = function (locale, country) {
|
|
4
|
-
var
|
|
4
|
+
var _a;
|
|
5
|
+
var data = (_a = locale[country.toUpperCase()]) !== null && _a !== void 0 ? _a : (locale['SA'] || locale['default']);
|
|
5
6
|
if (i18n.isInitialized) {
|
|
6
7
|
i18n.removeResourceBundle('*', 'translation');
|
|
7
8
|
i18n.addResourceBundle('en', 'translation', data.en.translation);
|
package/build/utils/object.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export declare const hasNoneEditableValue: (obj: any, path: string) => boolean;
|
|
|
8
8
|
export declare const hasEditableValue: (obj: any, path: string) => boolean;
|
|
9
9
|
export declare const hasVerifiedValue: (obj: any, path: string) => boolean;
|
|
10
10
|
export declare function deepCopy(obj: any): any;
|
|
11
|
+
export declare function objectHasValues(obj: Record<string, any>): boolean;
|
package/build/utils/object.js
CHANGED
|
@@ -51,7 +51,7 @@ export var hasVerifiedValue = function (obj, path) {
|
|
|
51
51
|
return hasKeyValue(obj, path, value);
|
|
52
52
|
};
|
|
53
53
|
export function deepCopy(obj) {
|
|
54
|
-
if (typeof obj !== 'object') {
|
|
54
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
55
55
|
return obj;
|
|
56
56
|
}
|
|
57
57
|
if (Array.isArray(obj)) {
|
|
@@ -64,3 +64,6 @@ export function deepCopy(obj) {
|
|
|
64
64
|
}
|
|
65
65
|
return newObj;
|
|
66
66
|
}
|
|
67
|
+
export function objectHasValues(obj) {
|
|
68
|
+
return Object.keys(obj).length > 0;
|
|
69
|
+
}
|
package/build/utils/string.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const convertNumbers2English: (str: string) => string;
|
|
|
15
15
|
export declare const getParameterByName: (name: string) => string | null;
|
|
16
16
|
export declare const getClientEmailUrl: () => string;
|
|
17
17
|
export declare const getFlowUrl: (path: string, lang: string) => string;
|
|
18
|
-
export declare const getResetFlowUrl: (path: string, lang: string, operationType: string, id: string, infoId: string) => string;
|
|
18
|
+
export declare const getResetFlowUrl: (path: string, lang: string, operationType: string, id: string, infoId: string, userId: string, userType: string) => string;
|
|
19
19
|
export declare const capitalizeTheFirstLetterOfEachWord: (words: string) => string;
|
|
20
20
|
export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
|
|
21
21
|
al: any;
|
|
@@ -42,10 +42,12 @@ export declare const getRequestHeaders: (deviceInfo: DeviceInfo) => {
|
|
|
42
42
|
};
|
|
43
43
|
export declare const removeRequestHeaders: () => void;
|
|
44
44
|
export declare const getBaseUrl: () => string;
|
|
45
|
-
export declare const getScreenNameBasedOnFlow: (flow: string, isAuthorizedUser?: boolean) => "CONNECT_NID_STEP" | "" | "BUSINESS_BUSINESS_TYPE_STEP" | "INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP" | "INDIVIDUAL_LIST_STEP" | "BANK_BANK_DETAILS_STEP" | "TAX_TAX_DETAILS_STEP" | "ENTITY_NAME_STEP" | "BRAND_INFO_STEP";
|
|
45
|
+
export declare const getScreenNameBasedOnFlow: (flow: string, isAuthorizedUser?: boolean, isOtherThanSAOrKWCountry?: boolean) => "CONNECT_NID_STEP" | "" | "BUSINESS_BUSINESS_TYPE_STEP" | "INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP" | "INDIVIDUAL_LIST_STEP" | "PASSWORD_CREATE_PASSWORD_STEP" | "BANK_BANK_DETAILS_STEP" | "TAX_TAX_DETAILS_STEP" | "ENTITY_NAME_STEP" | "BRAND_INFO_STEP";
|
|
46
46
|
export declare const getEighteenYearsAgo: () => string;
|
|
47
47
|
export declare const isKW: (flag: string) => boolean;
|
|
48
48
|
export declare const isSA: (flag: string) => boolean;
|
|
49
|
+
export declare const isOtherThanKWOrSA: (flag: string) => boolean;
|
|
50
|
+
export declare const isKWOrSA: (flag: string) => boolean;
|
|
49
51
|
export declare const isLinkedIn: (flag: string) => boolean;
|
|
50
52
|
export declare const isTwitter: (flag: string) => boolean;
|
|
51
53
|
export declare const isWebsite: (flag: string) => boolean;
|
|
@@ -72,3 +74,4 @@ export declare const getFileType: (type: string) => "" | "image/jpeg" | "image/p
|
|
|
72
74
|
export declare const isStringHasOneAsterisk: (value: string) => boolean;
|
|
73
75
|
export declare const isOtherLicense: (item?: License) => boolean;
|
|
74
76
|
export declare const formatNumberAsCurrency: (number: string) => string;
|
|
77
|
+
export declare const getCurrencyByCountryIso2: (countryCode: string) => string;
|
package/build/utils/string.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FlowsTypes } from '../@types';
|
|
2
2
|
import { concatenateObjectValues, encryptString } from '.';
|
|
3
3
|
import { removeAxiosGlobalHeaders } from '../api';
|
|
4
|
-
import { ENDPOINT_PATHS, ICONS_FULL_PATH } from '../constants';
|
|
4
|
+
import { COUNTRY_TO_CURRENCY, ENDPOINT_PATHS, ICONS_FULL_PATH } from '../constants';
|
|
5
5
|
import moment from 'moment';
|
|
6
6
|
export var maskPhone = function (str) {
|
|
7
7
|
if (str === void 0) { str = ''; }
|
|
@@ -94,9 +94,12 @@ export var getFlowUrl = function (path, lang) {
|
|
|
94
94
|
var origin = window.location.origin;
|
|
95
95
|
return origin + path + "?lang=".concat(lang, "&token=");
|
|
96
96
|
};
|
|
97
|
-
export var getResetFlowUrl = function (path, lang, operationType, id, infoId) {
|
|
97
|
+
export var getResetFlowUrl = function (path, lang, operationType, id, infoId, userId, userType) {
|
|
98
98
|
var origin = window.location.origin;
|
|
99
|
-
|
|
99
|
+
var baseUrl = origin + path + "?lang=".concat(lang, "&operation_type=").concat(operationType, "&board_id=").concat(id, "&board_info_id=").concat(infoId);
|
|
100
|
+
if (userId && userType)
|
|
101
|
+
baseUrl = baseUrl + "&user_id=".concat(userId, "&user_type=").concat(userType);
|
|
102
|
+
return baseUrl + "&token=";
|
|
100
103
|
};
|
|
101
104
|
export var capitalizeTheFirstLetterOfEachWord = function (words) {
|
|
102
105
|
var separateWord = words.toLowerCase().split(' ');
|
|
@@ -172,7 +175,7 @@ export var getBaseUrl = function () {
|
|
|
172
175
|
}
|
|
173
176
|
return ENDPOINT_PATHS.PRODUCTION_BASE_URL;
|
|
174
177
|
};
|
|
175
|
-
export var getScreenNameBasedOnFlow = function (flow, isAuthorizedUser) {
|
|
178
|
+
export var getScreenNameBasedOnFlow = function (flow, isAuthorizedUser, isOtherThanSAOrKWCountry) {
|
|
176
179
|
if (flow === FlowsTypes.BANK) {
|
|
177
180
|
return 'BANK_BANK_DETAILS_STEP';
|
|
178
181
|
}
|
|
@@ -180,7 +183,7 @@ export var getScreenNameBasedOnFlow = function (flow, isAuthorizedUser) {
|
|
|
180
183
|
return 'BUSINESS_BUSINESS_TYPE_STEP';
|
|
181
184
|
}
|
|
182
185
|
if (flow === FlowsTypes.INDIVIDUAL) {
|
|
183
|
-
return isAuthorizedUser ? 'INDIVIDUAL_LIST_STEP' : 'INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP';
|
|
186
|
+
return isAuthorizedUser || isOtherThanSAOrKWCountry ? 'INDIVIDUAL_LIST_STEP' : 'INDIVIDUAL_PERSONAL_INDIVIDUAL_INFO_STEP';
|
|
184
187
|
}
|
|
185
188
|
if (flow === FlowsTypes.CONNECT) {
|
|
186
189
|
return 'CONNECT_NID_STEP';
|
|
@@ -194,6 +197,9 @@ export var getScreenNameBasedOnFlow = function (flow, isAuthorizedUser) {
|
|
|
194
197
|
if (flow === FlowsTypes.ENTITY) {
|
|
195
198
|
return 'ENTITY_NAME_STEP';
|
|
196
199
|
}
|
|
200
|
+
if (flow === FlowsTypes.PASSWORD) {
|
|
201
|
+
return 'PASSWORD_CREATE_PASSWORD_STEP';
|
|
202
|
+
}
|
|
197
203
|
return '';
|
|
198
204
|
};
|
|
199
205
|
export var getEighteenYearsAgo = function () {
|
|
@@ -206,6 +212,12 @@ export var isKW = function (flag) {
|
|
|
206
212
|
export var isSA = function (flag) {
|
|
207
213
|
return ['sa', 'sau'].includes(flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
|
|
208
214
|
};
|
|
215
|
+
export var isOtherThanKWOrSA = function (flag) {
|
|
216
|
+
return !isKW(flag) && !isSA(flag);
|
|
217
|
+
};
|
|
218
|
+
export var isKWOrSA = function (flag) {
|
|
219
|
+
return isKW(flag) || isSA(flag);
|
|
220
|
+
};
|
|
209
221
|
export var isLinkedIn = function (flag) {
|
|
210
222
|
return 'linkedin' === (flag === null || flag === void 0 ? void 0 : flag.toLowerCase());
|
|
211
223
|
};
|
|
@@ -313,3 +325,10 @@ export var formatNumberAsCurrency = function (number) {
|
|
|
313
325
|
return '';
|
|
314
326
|
return parseInt(number).toLocaleString();
|
|
315
327
|
};
|
|
328
|
+
export var getCurrencyByCountryIso2 = function (countryCode) {
|
|
329
|
+
var _a;
|
|
330
|
+
if (!countryCode)
|
|
331
|
+
return '';
|
|
332
|
+
var currencyCode = (_a = COUNTRY_TO_CURRENCY[countryCode]) !== null && _a !== void 0 ? _a : '';
|
|
333
|
+
return currencyCode;
|
|
334
|
+
};
|
|
@@ -6,12 +6,17 @@ export declare const removeAllOtherThanAlphabetAndSpace: (str: string) => string
|
|
|
6
6
|
export declare const removeAllNumberFromChars: (str: string) => string;
|
|
7
7
|
export declare const keepEmailCharacters: (str: string) => string;
|
|
8
8
|
export declare const removeAllOtherThanCharsAndNumber: (str: string) => string;
|
|
9
|
+
export declare const cleanFLandCRNumber: (str: string) => string;
|
|
10
|
+
export declare const removeAllOtherThanCharsNumberSlashAndHyphen: (str: string) => string;
|
|
11
|
+
export declare const removeAllOtherThanCharsNumbersAtAndDot: (str: string) => string;
|
|
9
12
|
export declare const removeAllOtherThanCharsNumbersAndSpace: (str: string) => string;
|
|
13
|
+
export declare const removeLeadingSpace: (str: string) => string;
|
|
10
14
|
export declare function PasswordMatchLength(password: string): boolean;
|
|
11
15
|
export declare function isPasswordHasUpperLetter(password: string): boolean;
|
|
12
16
|
export declare function isPasswordHasLowerLetter(password: string): boolean;
|
|
13
17
|
export declare function isPasswordHasSpecialLetter(password: string): boolean;
|
|
14
18
|
export declare const keepLettersAndSpace: (str: string) => string;
|
|
19
|
+
export declare const isConnectTapDomain: (domain: string) => boolean;
|
|
15
20
|
export declare const isTapDomain: (domain: string) => boolean;
|
|
16
21
|
export declare const removeArabicWords: (str: string) => string;
|
|
17
22
|
export declare const removeAllOtherThanArabicWords: (str: string) => string;
|
|
@@ -22,9 +22,21 @@ export var keepEmailCharacters = function (str) {
|
|
|
22
22
|
export var removeAllOtherThanCharsAndNumber = function (str) {
|
|
23
23
|
return str.replace(/[^A-Za-z0-9]/g, '');
|
|
24
24
|
};
|
|
25
|
+
export var cleanFLandCRNumber = function (str) {
|
|
26
|
+
return str.replace(/[^a-zA-Z0-9_-]/g, '');
|
|
27
|
+
};
|
|
28
|
+
export var removeAllOtherThanCharsNumberSlashAndHyphen = function (str) {
|
|
29
|
+
return str.replace(/[^A-Za-z0-9/-]/g, '');
|
|
30
|
+
};
|
|
31
|
+
export var removeAllOtherThanCharsNumbersAtAndDot = function (str) {
|
|
32
|
+
return str.replace(/[^A-Za-z0-9@.]/g, '');
|
|
33
|
+
};
|
|
25
34
|
export var removeAllOtherThanCharsNumbersAndSpace = function (str) {
|
|
26
35
|
return str.replace(/[^A-Za-z0-9 ]/g, '');
|
|
27
36
|
};
|
|
37
|
+
export var removeLeadingSpace = function (str) {
|
|
38
|
+
return str.replace(/^\s+/, '');
|
|
39
|
+
};
|
|
28
40
|
export function PasswordMatchLength(password) {
|
|
29
41
|
return password.length > 7;
|
|
30
42
|
}
|
|
@@ -40,6 +52,10 @@ export function isPasswordHasSpecialLetter(password) {
|
|
|
40
52
|
export var keepLettersAndSpace = function (str) {
|
|
41
53
|
return str.replace(/[^a-zA-Z] /g, '');
|
|
42
54
|
};
|
|
55
|
+
export var isConnectTapDomain = function (domain) {
|
|
56
|
+
var regex = /^(https:\/\/)?connect(\.\w+)?\.tap\.company$/;
|
|
57
|
+
return regex.test(domain);
|
|
58
|
+
};
|
|
43
59
|
export var isTapDomain = function (domain) {
|
|
44
60
|
return domain.includes('tap.company');
|
|
45
61
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tap-payments/auth-jsconnect",
|
|
3
|
-
"version": "2.6.3
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"description": "connect library, auth",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"copy:files": "copyfiles -u 1 src/**/*.css build/",
|
|
22
22
|
"tsc:alias": "tsc-alias -p tsconfig.json",
|
|
23
23
|
"ts:build": "rm -rf build && tsc -p tsconfig.json && tsc-alias -p tsconfig.json && yarn copy:files",
|
|
24
|
-
"push": "npm publish --access public
|
|
24
|
+
"push": "npm publish --access public"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [],
|
|
27
27
|
"author": {
|
|
@@ -1,90 +0,0 @@
|
|
|
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 __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
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import * as React from 'react';
|
|
25
|
-
import { useAppDispatch, useAppSelector, useSetFromDefaultValues } from '../../../../hooks';
|
|
26
|
-
import { useTranslation } from 'react-i18next';
|
|
27
|
-
import { useForm, FormProvider } from 'react-hook-form';
|
|
28
|
-
import { yupResolver } from '@hookform/resolvers/yup';
|
|
29
|
-
import Box from '@mui/material/Box/Box';
|
|
30
|
-
import { styled } from '@mui/material/styles';
|
|
31
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
32
|
-
import { useLanguage } from '../../../../hooks';
|
|
33
|
-
import Form from '../../../../components/Form';
|
|
34
|
-
import Text from '../../../../components/Text';
|
|
35
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
36
|
-
import { businessSelector, clearError, resetOTPScreen, verifyLeadOTP } from '../../../app/business/businessStore';
|
|
37
|
-
import Button from '../../../shared/Button';
|
|
38
|
-
import { deepCopy, maskID } from '../../../../utils';
|
|
39
|
-
import { OTPValidation } from './validation';
|
|
40
|
-
import OTPInput from './OTPInput';
|
|
41
|
-
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
42
|
-
var theme = _a.theme;
|
|
43
|
-
return ({
|
|
44
|
-
background: theme.palette.common.white,
|
|
45
|
-
border: '1px solid',
|
|
46
|
-
borderColor: theme.palette.divider,
|
|
47
|
-
direction: theme.direction,
|
|
48
|
-
borderRadius: theme.spacing(0, 0, 1.25, 1.25),
|
|
49
|
-
marginBottom: theme.spacing(5.75)
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
53
|
-
var theme = _a.theme;
|
|
54
|
-
return (__assign(__assign({}, theme.typography.body1), { fontWeight: theme.typography.fontWeightLight, color: theme.palette.text.primary, marginBlock: theme.spacing(1.75), marginInline: theme.spacing(2.5), lineHeight: 1.75, whiteSpace: 'pre-line' }));
|
|
55
|
-
});
|
|
56
|
-
var FormStyled = styled(Form)(function () { return ({
|
|
57
|
-
display: 'flex',
|
|
58
|
-
flexDirection: 'column'
|
|
59
|
-
}); });
|
|
60
|
-
var OTP = function (_a) {
|
|
61
|
-
var _b = useAppSelector(businessSelector), data = _b.data, loading = _b.loading, error = _b.error;
|
|
62
|
-
var dispatch = useAppDispatch();
|
|
63
|
-
var _c = data.otpData, responseBody = _c.responseBody, defaultValues = __rest(_c, ["responseBody"]);
|
|
64
|
-
var methods = useForm({
|
|
65
|
-
resolver: yupResolver(OTPValidation),
|
|
66
|
-
defaultValues: defaultValues,
|
|
67
|
-
mode: 'onChange'
|
|
68
|
-
});
|
|
69
|
-
useSetFromDefaultValues(methods, defaultValues);
|
|
70
|
-
var t = useTranslation().t;
|
|
71
|
-
var isAr = useLanguage().isAr;
|
|
72
|
-
React.useEffect(function () {
|
|
73
|
-
if (error)
|
|
74
|
-
dispatch(clearError());
|
|
75
|
-
return function () {
|
|
76
|
-
dispatch(resetOTPScreen());
|
|
77
|
-
};
|
|
78
|
-
}, [methods.formState.isValid]);
|
|
79
|
-
var onSubmit = function (formData) {
|
|
80
|
-
dispatch(verifyLeadOTP(deepCopy(formData)));
|
|
81
|
-
};
|
|
82
|
-
var onBack = function () {
|
|
83
|
-
dispatch(handlePrevScreenStep());
|
|
84
|
-
};
|
|
85
|
-
var disabled = !methods.formState.isValid || !!error;
|
|
86
|
-
var idNumber = data.nidData.nid;
|
|
87
|
-
return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(OTPTitleContainerStyled, { children: _jsxs(OTPTitleStyled, { children: [loading ? t('ide_otp_waiting_title') : t('opt_nid_sent_title', { provider: 'ABSHER' }), ' ', !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskID(idNumber || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
|
|
88
|
-
};
|
|
89
|
-
OTP.defaultProps = {};
|
|
90
|
-
export default React.memo(OTP);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface SegmentLocationsProps {
|
|
3
|
-
show: boolean;
|
|
4
|
-
onListOpen?: () => void;
|
|
5
|
-
onListClose?: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare const SegmentLocations: ({ show, onListOpen, onListClose }: SegmentLocationsProps) => JSX.Element;
|
|
8
|
-
export default SegmentLocations;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import React from 'react';
|
|
14
|
-
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
-
import Box from '@mui/material/Box';
|
|
17
|
-
import { styled } from '@mui/material/styles';
|
|
18
|
-
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
|
-
import SimpleList from '../../../../components/SimpleList';
|
|
20
|
-
import Text from '../../../../components/Text';
|
|
21
|
-
import Collapse from '../../../../components/Collapse';
|
|
22
|
-
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
23
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
-
import InputSelect from '../../../shared/InputSelect';
|
|
25
|
-
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
|
-
import { connectSelector } from '../../../app/connect/connectStore';
|
|
27
|
-
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
28
|
-
var theme = _a.theme, isSelected = _a.isSelected;
|
|
29
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
30
|
-
});
|
|
31
|
-
var SegmentLocations = function (_a) {
|
|
32
|
-
var _b, _c, _d, _e;
|
|
33
|
-
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose;
|
|
34
|
-
var _f = React.useState([]), segmentList = _f[0], setSegmentList = _f[1];
|
|
35
|
-
var _g = React.useState(null), anchorEl = _g[0], setAnchorEl = _g[1];
|
|
36
|
-
var t = useTranslation().t;
|
|
37
|
-
var isAr = useLanguage().isAr;
|
|
38
|
-
var data = useAppSelector(connectSelector).data;
|
|
39
|
-
var control = useFormContext().control;
|
|
40
|
-
var segmentLocationList = ((_b = data.brandSegmentData.responseBody) === null || _b === void 0 ? void 0 : _b.segment_location_list) || [];
|
|
41
|
-
var segmentControl = useController({ control: control, name: 'segmentLocation' });
|
|
42
|
-
var segment = segmentControl.field.value;
|
|
43
|
-
var error = (_c = segmentControl.fieldState.error) === null || _c === void 0 ? void 0 : _c.message;
|
|
44
|
-
React.useEffect(function () {
|
|
45
|
-
if ((segmentLocationList === null || segmentLocationList === void 0 ? void 0 : segmentLocationList.length) > 0) {
|
|
46
|
-
setSegmentList(segmentLocationList);
|
|
47
|
-
}
|
|
48
|
-
}, [segmentLocationList]);
|
|
49
|
-
var onOpenList = function (event) {
|
|
50
|
-
setAnchorEl(event.currentTarget);
|
|
51
|
-
onListOpen === null || onListOpen === void 0 ? void 0 : onListOpen();
|
|
52
|
-
};
|
|
53
|
-
var onCloseList = function () {
|
|
54
|
-
setAnchorEl(null);
|
|
55
|
-
onListClose === null || onListClose === void 0 ? void 0 : onListClose();
|
|
56
|
-
};
|
|
57
|
-
var onSelectItem = function (segment) {
|
|
58
|
-
onCloseList();
|
|
59
|
-
segmentControl.field.onChange(segment);
|
|
60
|
-
};
|
|
61
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('segment_location_title'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl }), placeholder: t('choose_any_segment'), value: (isAr ? (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = segment === null || segment === void 0 ? void 0 : segment.name) === null || _e === void 0 ? void 0 : _e.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
62
|
-
var _a, _b;
|
|
63
|
-
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIcon, {})] }));
|
|
64
|
-
} }) }))] })) })));
|
|
65
|
-
};
|
|
66
|
-
export default SegmentLocations;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface SegmentProfitsProps {
|
|
3
|
-
show: boolean;
|
|
4
|
-
onListOpen?: () => void;
|
|
5
|
-
onListClose?: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare const SegmentProfits: ({ show, onListOpen, onListClose }: SegmentProfitsProps) => JSX.Element;
|
|
8
|
-
export default SegmentProfits;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import React from 'react';
|
|
14
|
-
import { useTranslation } from 'react-i18next';
|
|
15
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
16
|
-
import Box from '@mui/material/Box';
|
|
17
|
-
import { styled } from '@mui/material/styles';
|
|
18
|
-
import { useAppSelector, useLanguage } from '../../../../hooks';
|
|
19
|
-
import SimpleList from '../../../../components/SimpleList';
|
|
20
|
-
import Text from '../../../../components/Text';
|
|
21
|
-
import Collapse from '../../../../components/Collapse';
|
|
22
|
-
import { EndAdornmentExpanded } from '../../../shared/EndAdornment';
|
|
23
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
24
|
-
import InputSelect from '../../../shared/InputSelect';
|
|
25
|
-
import CheckIcon from '../../../shared/CheckIcon';
|
|
26
|
-
import { connectSelector } from '../../../app/connect/connectStore';
|
|
27
|
-
var IncomeText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
28
|
-
var theme = _a.theme, isSelected = _a.isSelected;
|
|
29
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25), textAlign: 'start' }));
|
|
30
|
-
});
|
|
31
|
-
var SegmentProfits = function (_a) {
|
|
32
|
-
var _b, _c, _d, _e;
|
|
33
|
-
var show = _a.show, onListOpen = _a.onListOpen, onListClose = _a.onListClose;
|
|
34
|
-
var _f = React.useState([]), segmentList = _f[0], setSegmentList = _f[1];
|
|
35
|
-
var _g = React.useState(null), anchorEl = _g[0], setAnchorEl = _g[1];
|
|
36
|
-
var t = useTranslation().t;
|
|
37
|
-
var isAr = useLanguage().isAr;
|
|
38
|
-
var data = useAppSelector(connectSelector).data;
|
|
39
|
-
var control = useFormContext().control;
|
|
40
|
-
var segmentProfitList = ((_b = data.brandSegmentData.responseBody) === null || _b === void 0 ? void 0 : _b.segment_profit_list) || [];
|
|
41
|
-
var segmentControl = useController({ control: control, name: 'segmentProfit' });
|
|
42
|
-
var segment = segmentControl.field.value;
|
|
43
|
-
var error = (_c = segmentControl.fieldState.error) === null || _c === void 0 ? void 0 : _c.message;
|
|
44
|
-
React.useEffect(function () {
|
|
45
|
-
if ((segmentProfitList === null || segmentProfitList === void 0 ? void 0 : segmentProfitList.length) > 0) {
|
|
46
|
-
setSegmentList(segmentProfitList);
|
|
47
|
-
}
|
|
48
|
-
}, [segmentProfitList]);
|
|
49
|
-
var onOpenList = function (event) {
|
|
50
|
-
setAnchorEl(event.currentTarget);
|
|
51
|
-
onListOpen === null || onListOpen === void 0 ? void 0 : onListOpen();
|
|
52
|
-
};
|
|
53
|
-
var onCloseList = function () {
|
|
54
|
-
setAnchorEl(null);
|
|
55
|
-
onListClose === null || onListClose === void 0 ? void 0 : onListClose();
|
|
56
|
-
};
|
|
57
|
-
var onSelectItem = function (segment) {
|
|
58
|
-
onCloseList();
|
|
59
|
-
segmentControl.field.onChange(segment);
|
|
60
|
-
};
|
|
61
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ sx: { mt: 2.5, mb: 0 } }, { children: [_jsx(InputSelect, { required: true, label: t('segment_profit_title'), onClick: !!anchorEl ? function () { return onCloseList(); } : onOpenList, endAdornment: _jsx(EndAdornmentExpanded, { anchorEl: anchorEl }), placeholder: t('choose_any_segment'), value: (isAr ? (_d = segment === null || segment === void 0 ? void 0 : segment.name) === null || _d === void 0 ? void 0 : _d.ar : (_e = segment === null || segment === void 0 ? void 0 : segment.name) === null || _e === void 0 ? void 0 : _e.en) || '', warningMessage: error && t(error) }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.en', searchValuePath: ['name.ar', 'name.en'], list: segmentList, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
62
|
-
var _a, _b;
|
|
63
|
-
return (_jsxs(_Fragment, { children: [_jsx(Box, __assign({ display: 'flex' }, { children: _jsx(IncomeText, __assign({ isSelected: item.id === (segment === null || segment === void 0 ? void 0 : segment.id) }, { children: isAr ? (_a = item === null || item === void 0 ? void 0 : item.name) === null || _a === void 0 ? void 0 : _a.ar : (_b = item === null || item === void 0 ? void 0 : item.name) === null || _b === void 0 ? void 0 : _b.en })) })), item.id === (segment === null || segment === void 0 ? void 0 : segment.id) && _jsx(CheckIcon, {})] }));
|
|
64
|
-
} }) }))] })) })));
|
|
65
|
-
};
|
|
66
|
-
export default SegmentProfits;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface SegmentTechsProps {
|
|
3
|
-
show: boolean;
|
|
4
|
-
onListOpen?: () => void;
|
|
5
|
-
onListClose?: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare const SegmentTechs: ({ show, onListOpen, onListClose }: SegmentTechsProps) => JSX.Element;
|
|
8
|
-
export default SegmentTechs;
|