@tap-payments/auth-jsconnect 1.0.31 → 1.0.32
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/LICENSE +21 -21
- package/build/@types/app.d.ts +175 -175
- package/build/@types/app.js +11 -11
- package/build/@types/form.d.ts +30 -30
- package/build/@types/form.js +1 -1
- package/build/@types/index.d.ts +4 -4
- package/build/@types/index.js +4 -4
- package/build/@types/redux.d.ts +15 -15
- package/build/@types/redux.js +1 -1
- package/build/@types/theme.d.ts +14 -14
- package/build/@types/theme.js +15 -15
- package/build/api/auth.d.ts +40 -40
- package/build/api/auth.js +13 -13
- package/build/api/availabilityServices.d.ts +12 -12
- package/build/api/availabilityServices.js +13 -13
- package/build/api/axios.d.ts +2 -2
- package/build/api/axios.js +34 -34
- package/build/api/country.d.ts +5 -5
- package/build/api/country.js +13 -13
- package/build/api/firebase.d.ts +4 -4
- package/build/api/firebase.js +9 -9
- package/build/api/index.d.ts +36 -34
- package/build/api/index.js +17 -17
- package/build/api/ip.d.ts +4 -4
- package/build/api/ip.js +9 -9
- package/build/api/lead.d.ts +80 -69
- package/build/api/lead.js +25 -17
- package/build/api/operator.d.ts +12 -12
- package/build/api/operator.js +9 -9
- package/build/app/rootReducer.d.ts +6 -6
- package/build/app/rootReducer.js +9 -9
- package/build/app/settings.d.ts +36 -36
- package/build/app/settings.js +248 -258
- package/build/app/store.d.ts +13 -13
- package/build/app/store.js +11 -11
- package/build/assets/locales/ar.json +215 -215
- package/build/assets/locales/en.json +229 -229
- package/build/components/AnimationFlow/AnimationFlow.d.ts +9 -9
- package/build/components/AnimationFlow/AnimationFlow.js +28 -28
- package/build/components/AnimationFlow/BottomSheet.d.ts +9 -9
- package/build/components/AnimationFlow/BottomSheet.js +59 -59
- package/build/components/AnimationFlow/Dialog.d.ts +10 -10
- package/build/components/AnimationFlow/Dialog.js +103 -103
- package/build/components/AnimationFlow/index.d.ts +2 -2
- package/build/components/AnimationFlow/index.js +2 -2
- package/build/components/Button/Button.d.ts +9 -9
- package/build/components/Button/Button.js +63 -63
- package/build/components/Button/index.d.ts +4 -4
- package/build/components/Button/index.js +2 -2
- package/build/components/CheckBox/CheckBox.d.ts +5 -5
- package/build/components/CheckBox/CheckBox.js +39 -39
- package/build/components/CheckBox/index.d.ts +4 -4
- package/build/components/CheckBox/index.js +2 -2
- package/build/components/Collapse/Collapse.d.ts +5 -5
- package/build/components/Collapse/Collapse.js +28 -28
- package/build/components/Collapse/index.d.ts +3 -3
- package/build/components/Collapse/index.js +2 -2
- package/build/components/DatePicker/DatePicker.d.ts +14 -14
- package/build/components/DatePicker/DatePicker.js +101 -101
- package/build/components/DatePicker/index.d.ts +3 -3
- package/build/components/DatePicker/index.js +2 -2
- package/build/components/ExpandIcon/ExpandIcon.d.ts +7 -7
- package/build/components/ExpandIcon/ExpandIcon.js +24 -24
- package/build/components/ExpandIcon/index.d.ts +2 -2
- package/build/components/ExpandIcon/index.js +2 -2
- package/build/components/Footer/Footer.d.ts +15 -15
- package/build/components/Footer/Footer.js +99 -99
- package/build/components/Footer/index.d.ts +4 -4
- package/build/components/Footer/index.js +2 -2
- package/build/components/Form/Form.d.ts +11 -11
- package/build/components/Form/Form.js +38 -38
- package/build/components/Form/index.d.ts +3 -3
- package/build/components/Form/index.js +2 -2
- package/build/components/Icon/Icon.d.ts +11 -11
- package/build/components/Icon/Icon.js +26 -26
- package/build/components/Icon/index.d.ts +3 -3
- package/build/components/Icon/index.js +2 -2
- package/build/components/Input/Input.d.ts +19 -19
- package/build/components/Input/Input.js +84 -83
- package/build/components/Input/index.d.ts +3 -3
- package/build/components/Input/index.js +2 -2
- package/build/components/InputAdornment/InputAdornment.d.ts +10 -10
- package/build/components/InputAdornment/InputAdornment.js +46 -46
- package/build/components/InputAdornment/index.d.ts +3 -3
- package/build/components/InputAdornment/index.js +2 -2
- package/build/components/List/List.d.ts +5 -5
- package/build/components/List/List.js +52 -52
- package/build/components/List/index.d.ts +3 -3
- package/build/components/List/index.js +2 -2
- package/build/components/ListItem/ListItem.d.ts +5 -5
- package/build/components/ListItem/ListItem.js +35 -35
- package/build/components/ListItem/index.d.ts +3 -3
- package/build/components/ListItem/index.js +2 -2
- package/build/components/Loader/Loader.d.ts +23 -23
- package/build/components/Loader/Loader.js +41 -41
- package/build/components/Loader/index.d.ts +4 -4
- package/build/components/Loader/index.js +2 -2
- package/build/components/LogoBadge/LogoBadge.d.ts +7 -7
- package/build/components/LogoBadge/LogoBadge.js +61 -61
- package/build/components/LogoBadge/index.d.ts +3 -3
- package/build/components/LogoBadge/index.js +2 -2
- package/build/components/OTPField/OTPField.d.ts +17 -17
- package/build/components/OTPField/OTPField.js +45 -45
- package/build/components/OTPField/index.d.ts +4 -4
- package/build/components/OTPField/index.js +2 -2
- package/build/components/OTPTimer/OTPTimer.d.ts +14 -14
- package/build/components/OTPTimer/OTPTimer.js +68 -68
- package/build/components/OTPTimer/index.d.ts +4 -4
- package/build/components/OTPTimer/index.js +2 -2
- package/build/components/ProgressBar/ProgressBar.d.ts +6 -6
- package/build/components/ProgressBar/ProgressBar.js +45 -45
- package/build/components/ProgressBar/index.d.ts +4 -4
- package/build/components/ProgressBar/index.js +2 -2
- package/build/components/Providers/ReduxProvider.d.ts +7 -7
- package/build/components/Providers/ReduxProvider.js +17 -17
- package/build/components/Providers/ThemeProvider.d.ts +8 -8
- package/build/components/Providers/ThemeProvider.js +22 -22
- package/build/components/Providers/index.d.ts +3 -3
- package/build/components/Providers/index.js +3 -3
- package/build/components/Radio/Radio.d.ts +5 -5
- package/build/components/Radio/Radio.js +31 -31
- package/build/components/Radio/index.d.ts +3 -3
- package/build/components/Radio/index.js +2 -2
- package/build/components/RadioGroup/RadioGroup.d.ts +5 -5
- package/build/components/RadioGroup/RadioGroup.js +41 -41
- package/build/components/RadioGroup/index.d.ts +3 -3
- package/build/components/RadioGroup/index.js +2 -2
- package/build/components/RadioLabel/RadioLabel.d.ts +7 -7
- package/build/components/RadioLabel/RadioLabel.js +34 -34
- package/build/components/RadioLabel/index.d.ts +3 -3
- package/build/components/RadioLabel/index.js +2 -2
- package/build/components/SimpleList/SimpleList.d.ts +18 -18
- package/build/components/SimpleList/SimpleList.js +100 -100
- package/build/components/SimpleList/index.d.ts +3 -3
- package/build/components/SimpleList/index.js +2 -2
- package/build/components/Slide/Slide.d.ts +6 -6
- package/build/components/Slide/Slide.js +30 -30
- package/build/components/Slide/index.d.ts +3 -3
- package/build/components/Slide/index.js +2 -2
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +14 -14
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +86 -86
- package/build/components/SocialMediaGroup/index.d.ts +3 -3
- package/build/components/SocialMediaGroup/index.js +2 -2
- package/build/components/Text/Text.d.ts +5 -5
- package/build/components/Text/Text.js +35 -35
- package/build/components/Text/index.d.ts +3 -3
- package/build/components/Text/index.js +2 -2
- package/build/components/ToggleButton/ToggleButton.d.ts +5 -5
- package/build/components/ToggleButton/ToggleButton.js +44 -44
- package/build/components/ToggleButton/index.d.ts +3 -3
- package/build/components/ToggleButton/index.js +2 -2
- package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +5 -5
- package/build/components/ToggleButtonGroup/ToggleButtonGroup.js +37 -37
- package/build/components/ToggleButtonGroup/index.d.ts +3 -3
- package/build/components/ToggleButtonGroup/index.js +2 -2
- package/build/components/Tooltip/Tooltip.d.ts +10 -10
- package/build/components/Tooltip/Tooltip.js +44 -44
- package/build/components/Tooltip/index.d.ts +3 -3
- package/build/components/Tooltip/index.js +2 -2
- package/build/components/Warning/Warning.d.ts +13 -13
- package/build/components/Warning/Warning.js +53 -42
- package/build/components/Warning/index.d.ts +4 -4
- package/build/components/Warning/index.js +2 -2
- package/build/constants/api.d.ts +13 -13
- package/build/constants/api.js +24 -24
- package/build/constants/app.d.ts +89 -84
- package/build/constants/app.js +238 -233
- package/build/constants/assets.d.ts +36 -36
- package/build/constants/assets.js +36 -36
- package/build/constants/dummy.d.ts +343 -343
- package/build/constants/dummy.js +6434 -6434
- package/build/constants/index.d.ts +5 -5
- package/build/constants/index.js +5 -5
- package/build/constants/validation.d.ts +7 -7
- package/build/constants/validation.js +7 -7
- package/build/features/app/business/businessStore.d.ts +36 -27
- package/build/features/app/business/businessStore.js +210 -135
- package/build/features/app/connect/connectStore.d.ts +80 -78
- package/build/features/app/connect/connectStore.js +647 -621
- package/build/features/bank/Bank.d.ts +6 -6
- package/build/features/bank/Bank.js +48 -48
- package/build/features/bank/index.d.ts +1 -1
- package/build/features/bank/index.js +1 -1
- package/build/features/bank/screens/BankDetails/BankDetails.d.ts +5 -5
- package/build/features/bank/screens/BankDetails/BankDetails.js +57 -57
- package/build/features/bank/screens/BankDetails/BankName.d.ts +3 -3
- package/build/features/bank/screens/BankDetails/BankName.js +32 -32
- package/build/features/bank/screens/BankDetails/Beneficiary.d.ts +5 -5
- package/build/features/bank/screens/BankDetails/Beneficiary.js +34 -34
- package/build/features/bank/screens/BankDetails/IBAN.d.ts +5 -5
- package/build/features/bank/screens/BankDetails/IBAN.js +35 -35
- package/build/features/bank/screens/BankDetails/index.d.ts +3 -3
- package/build/features/bank/screens/BankDetails/index.js +2 -2
- package/build/features/bank/screens/BankDetails/validation.d.ts +14 -14
- package/build/features/bank/screens/BankDetails/validation.js +14 -14
- package/build/features/bank/screens/Success/Success.d.ts +5 -5
- package/build/features/bank/screens/Success/Success.js +12 -12
- package/build/features/bank/screens/Success/index.d.ts +3 -3
- package/build/features/bank/screens/Success/index.js +2 -2
- package/build/features/business/Business.d.ts +7 -7
- package/build/features/business/Business.js +70 -70
- package/build/features/business/index.d.ts +1 -1
- package/build/features/business/index.js +1 -1
- package/build/features/business/screens/Activities/Activities.d.ts +5 -5
- package/build/features/business/screens/Activities/Activities.js +64 -64
- package/build/features/business/screens/Activities/ActivitiesList.d.ts +54 -54
- package/build/features/business/screens/Activities/ActivitiesList.js +122 -122
- package/build/features/business/screens/Activities/OperationStartDate.d.ts +6 -6
- package/build/features/business/screens/Activities/OperationStartDate.js +31 -31
- package/build/features/business/screens/Activities/SalesChannels.d.ts +5 -5
- package/build/features/business/screens/Activities/SalesChannels.js +101 -101
- package/build/features/business/screens/Activities/index.d.ts +3 -3
- package/build/features/business/screens/Activities/index.js +2 -2
- package/build/features/business/screens/Activities/validation.d.ts +122 -122
- package/build/features/business/screens/Activities/validation.js +18 -18
- package/build/features/business/screens/BusinessType/BusinessType.d.ts +12 -12
- package/build/features/business/screens/BusinessType/BusinessType.js +88 -88
- package/build/features/business/screens/BusinessType/CRNumber.d.ts +6 -6
- package/build/features/business/screens/BusinessType/CRNumber.js +41 -41
- package/build/features/business/screens/BusinessType/CompanyLicense.d.ts +11 -11
- package/build/features/business/screens/BusinessType/CompanyLicense.js +109 -109
- package/build/features/business/screens/BusinessType/FLNumber.d.ts +6 -6
- package/build/features/business/screens/BusinessType/FLNumber.js +41 -41
- package/build/features/business/screens/BusinessType/FreelanceLicense.d.ts +11 -11
- package/build/features/business/screens/BusinessType/FreelanceLicense.js +112 -112
- package/build/features/business/screens/BusinessType/SelectType.d.ts +8 -8
- package/build/features/business/screens/BusinessType/SelectType.js +106 -106
- package/build/features/business/screens/BusinessType/Switch.d.ts +7 -7
- package/build/features/business/screens/BusinessType/Switch.js +35 -35
- package/build/features/business/screens/BusinessType/index.d.ts +3 -3
- package/build/features/business/screens/BusinessType/index.js +2 -2
- package/build/features/business/screens/BusinessType/validation.d.ts +15 -15
- package/build/features/business/screens/BusinessType/validation.js +8 -8
- package/build/features/business/screens/Confirm/Confirm.d.ts +5 -5
- package/build/features/business/screens/Confirm/Confirm.js +56 -56
- package/build/features/business/screens/Confirm/index.d.ts +3 -3
- package/build/features/business/screens/Confirm/index.js +2 -2
- package/build/features/business/screens/Customers/CustomerLocations.d.ts +69 -69
- package/build/features/business/screens/Customers/CustomerLocations.js +108 -108
- package/build/features/business/screens/Customers/Customers.d.ts +5 -5
- package/build/features/business/screens/Customers/Customers.js +78 -78
- package/build/features/business/screens/Customers/ExpectedCustomers.d.ts +8 -8
- package/build/features/business/screens/Customers/ExpectedCustomers.js +74 -74
- package/build/features/business/screens/Customers/ExpectedSalesRange.d.ts +8 -8
- package/build/features/business/screens/Customers/ExpectedSalesRange.js +75 -75
- package/build/features/business/screens/Customers/RefundPolicy.d.ts +36 -36
- package/build/features/business/screens/Customers/RefundPolicy.js +78 -78
- package/build/features/business/screens/Customers/TransactionPolicy.d.ts +3 -3
- package/build/features/business/screens/Customers/TransactionPolicy.js +38 -38
- package/build/features/business/screens/Customers/index.d.ts +3 -3
- package/build/features/business/screens/Customers/index.js +2 -2
- package/build/features/business/screens/Customers/validation.d.ts +20 -20
- package/build/features/business/screens/Customers/validation.js +13 -13
- package/build/features/business/screens/IDBOD/DOB.d.ts +6 -6
- package/build/features/business/screens/IDBOD/DOB.js +39 -39
- package/build/features/business/screens/IDBOD/ID.d.ts +5 -5
- package/build/features/business/screens/IDBOD/ID.js +28 -28
- package/build/features/business/screens/IDBOD/IDBOD.d.ts +5 -5
- package/build/features/business/screens/IDBOD/IDBOD.js +53 -53
- package/build/features/business/screens/IDBOD/index.d.ts +3 -3
- package/build/features/business/screens/IDBOD/index.js +2 -2
- package/build/features/business/screens/IDBOD/validation.d.ts +11 -11
- package/build/features/business/screens/IDBOD/validation.js +10 -10
- package/build/features/business/screens/OTP/OTP.d.ts +11 -11
- package/build/features/business/screens/OTP/OTP.js +72 -72
- package/build/features/business/screens/OTP/OTPInput.d.ts +5 -5
- package/build/features/business/screens/OTP/OTPInput.js +39 -39
- package/build/features/business/screens/OTP/index.d.ts +3 -3
- package/build/features/business/screens/OTP/index.js +2 -2
- package/build/features/business/screens/OTP/validation.d.ts +8 -8
- package/build/features/business/screens/OTP/validation.js +4 -4
- package/build/features/business/screens/Success/Success.d.ts +5 -5
- package/build/features/business/screens/Success/Success.js +12 -12
- package/build/features/business/screens/Success/index.d.ts +3 -3
- package/build/features/business/screens/Success/index.js +2 -2
- package/build/features/business/screens/Verify/OTPInput.d.ts +5 -5
- package/build/features/business/screens/Verify/OTPInput.js +43 -39
- package/build/features/business/screens/Verify/Verify.d.ts +3 -13
- package/build/features/business/screens/Verify/Verify.js +74 -76
- package/build/features/business/screens/Verify/index.d.ts +2 -3
- package/build/features/business/screens/Verify/index.js +2 -2
- package/build/features/business/screens/Verify/validation.d.ts +8 -8
- package/build/features/business/screens/Verify/validation.js +4 -4
- package/build/features/connect/Connect.d.ts +7 -7
- package/build/features/connect/Connect.js +51 -51
- package/build/features/connect/index.d.ts +1 -1
- package/build/features/connect/index.js +1 -1
- package/build/features/connect/screens/Individual/Email.d.ts +6 -6
- package/build/features/connect/screens/Individual/Email.js +50 -50
- package/build/features/connect/screens/Individual/Individual.d.ts +5 -5
- package/build/features/connect/screens/Individual/Individual.js +84 -84
- package/build/features/connect/screens/Individual/MobileNumber.d.ts +11 -11
- package/build/features/connect/screens/Individual/MobileNumber.js +134 -136
- package/build/features/connect/screens/Individual/Name.d.ts +6 -6
- package/build/features/connect/screens/Individual/Name.js +48 -39
- package/build/features/connect/screens/Individual/index.d.ts +3 -3
- package/build/features/connect/screens/Individual/index.js +2 -2
- package/build/features/connect/screens/Individual/validation.d.ts +24 -24
- package/build/features/connect/screens/Individual/validation.js +20 -20
- package/build/features/connect/screens/Merchant/BrandName.d.ts +5 -5
- package/build/features/connect/screens/Merchant/BrandName.js +87 -87
- package/build/features/connect/screens/Merchant/Merchant.d.ts +5 -5
- package/build/features/connect/screens/Merchant/Merchant.js +59 -59
- package/build/features/connect/screens/Merchant/SocialMedia.d.ts +5 -5
- package/build/features/connect/screens/Merchant/SocialMedia.js +84 -84
- package/build/features/connect/screens/Merchant/TAC.d.ts +5 -5
- package/build/features/connect/screens/Merchant/TAC.js +79 -79
- package/build/features/connect/screens/Merchant/index.d.ts +3 -3
- package/build/features/connect/screens/Merchant/index.js +2 -2
- package/build/features/connect/screens/Merchant/validation.d.ts +50 -50
- package/build/features/connect/screens/Merchant/validation.js +58 -58
- package/build/features/connect/screens/Mobile/BusinessCountry.d.ts +8 -8
- package/build/features/connect/screens/Mobile/BusinessCountry.js +40 -40
- package/build/features/connect/screens/Mobile/Mobile.d.ts +5 -5
- package/build/features/connect/screens/Mobile/Mobile.js +117 -116
- package/build/features/connect/screens/Mobile/MobileNumber.d.ts +12 -12
- package/build/features/connect/screens/Mobile/MobileNumber.js +134 -136
- package/build/features/connect/screens/Mobile/Title.d.ts +8 -8
- package/build/features/connect/screens/Mobile/Title.js +29 -29
- package/build/features/connect/screens/Mobile/index.d.ts +3 -3
- package/build/features/connect/screens/Mobile/index.js +2 -2
- package/build/features/connect/screens/Mobile/validation.d.ts +8 -8
- package/build/features/connect/screens/Mobile/validation.js +6 -6
- package/build/features/connect/screens/NID/DOB.d.ts +6 -6
- package/build/features/connect/screens/NID/DOB.js +48 -48
- package/build/features/connect/screens/NID/IDNumber.d.ts +7 -7
- package/build/features/connect/screens/NID/IDNumber.js +60 -60
- package/build/features/connect/screens/NID/NID.d.ts +5 -5
- package/build/features/connect/screens/NID/NID.js +93 -92
- package/build/features/connect/screens/NID/index.d.ts +3 -3
- package/build/features/connect/screens/NID/index.js +2 -2
- package/build/features/connect/screens/NID/validation.d.ts +11 -11
- package/build/features/connect/screens/NID/validation.js +9 -9
- package/build/features/connect/screens/OTP/OTP.d.ts +5 -5
- package/build/features/connect/screens/OTP/OTP.js +78 -78
- package/build/features/connect/screens/OTP/OTPInput.d.ts +5 -5
- package/build/features/connect/screens/OTP/OTPInput.js +64 -64
- package/build/features/connect/screens/OTP/index.d.ts +3 -3
- package/build/features/connect/screens/OTP/index.js +2 -2
- package/build/features/connect/screens/OTP/validation.d.ts +8 -8
- package/build/features/connect/screens/OTP/validation.js +4 -4
- package/build/features/connect/screens/Password/Password.d.ts +5 -5
- package/build/features/connect/screens/Password/Password.js +58 -58
- package/build/features/connect/screens/Password/PasswordInput.d.ts +5 -5
- package/build/features/connect/screens/Password/PasswordInput.js +39 -39
- package/build/features/connect/screens/Password/index.d.ts +3 -3
- package/build/features/connect/screens/Password/index.js +2 -2
- package/build/features/connect/screens/Password/validation.d.ts +8 -8
- package/build/features/connect/screens/Password/validation.js +4 -4
- package/build/features/connect/screens/ThankYou/ThankYou.d.ts +5 -5
- package/build/features/connect/screens/ThankYou/ThankYou.js +18 -18
- package/build/features/connect/screens/ThankYou/index.d.ts +3 -3
- package/build/features/connect/screens/ThankYou/index.js +2 -2
- package/build/features/featuresScreens.d.ts +7 -7
- package/build/features/featuresScreens.js +129 -129
- package/build/features/individual/Individual.d.ts +6 -6
- package/build/features/individual/Individual.js +50 -50
- package/build/features/individual/index.d.ts +1 -1
- package/build/features/individual/index.js +1 -1
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.d.ts +8 -8
- package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +84 -84
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.d.ts +10 -10
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerLocation.js +81 -81
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.d.ts +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/EmployerName.js +40 -40
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.d.ts +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/InfluencerSwitch.js +45 -45
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.d.ts +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +36 -36
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.d.ts +6 -6
- package/build/features/individual/screens/AdditionalIndividualInfo/PEPSwitch.js +45 -45
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.d.ts +9 -9
- package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +87 -87
- package/build/features/individual/screens/AdditionalIndividualInfo/index.d.ts +3 -3
- package/build/features/individual/screens/AdditionalIndividualInfo/index.js +2 -2
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.d.ts +25 -25
- package/build/features/individual/screens/AdditionalIndividualInfo/validation.js +35 -35
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.d.ts +19 -19
- package/build/features/individual/screens/ShowIndividualInfo/ShowOwnerInfo.js +52 -52
- package/build/features/individual/screens/ShowIndividualInfo/index.d.ts +3 -3
- package/build/features/individual/screens/ShowIndividualInfo/index.js +2 -2
- package/build/features/individual/screens/ShowIndividualInfo/info.d.ts +7 -7
- package/build/features/individual/screens/ShowIndividualInfo/info.js +28 -28
- package/build/features/individual/screens/Success/Success.d.ts +5 -5
- package/build/features/individual/screens/Success/Success.js +12 -12
- package/build/features/individual/screens/Success/index.d.ts +3 -3
- package/build/features/individual/screens/Success/index.js +2 -2
- package/build/features/password/Password.d.ts +6 -6
- package/build/features/password/Password.js +50 -50
- package/build/features/password/index.d.ts +1 -1
- package/build/features/password/index.js +1 -1
- package/build/features/password/screens/CreatePassword/ConditionText.d.ts +7 -7
- package/build/features/password/screens/CreatePassword/ConditionText.js +23 -23
- package/build/features/password/screens/CreatePassword/ConfirmPassword.d.ts +8 -8
- package/build/features/password/screens/CreatePassword/ConfirmPassword.js +22 -22
- package/build/features/password/screens/CreatePassword/CreatePassword.d.ts +5 -5
- package/build/features/password/screens/CreatePassword/CreatePassword.js +51 -51
- package/build/features/password/screens/CreatePassword/Password.d.ts +5 -5
- package/build/features/password/screens/CreatePassword/Password.js +76 -76
- package/build/features/password/screens/CreatePassword/PasswordBar.d.ts +7 -7
- package/build/features/password/screens/CreatePassword/PasswordBar.js +29 -29
- package/build/features/password/screens/CreatePassword/index.d.ts +3 -3
- package/build/features/password/screens/CreatePassword/index.js +2 -2
- package/build/features/password/screens/CreatePassword/validation.d.ts +11 -11
- package/build/features/password/screens/CreatePassword/validation.js +8 -8
- package/build/features/password/screens/Success/Success.d.ts +5 -5
- package/build/features/password/screens/Success/Success.js +12 -12
- package/build/features/password/screens/Success/index.d.ts +3 -3
- package/build/features/password/screens/Success/index.js +2 -2
- package/build/features/shared/Button/AbsherButton.d.ts +9 -9
- package/build/features/shared/Button/AbsherButton.js +69 -69
- package/build/features/shared/Button/Button.d.ts +11 -11
- package/build/features/shared/Button/Button.js +84 -84
- package/build/features/shared/Button/index.d.ts +4 -4
- package/build/features/shared/Button/index.js +4 -4
- package/build/features/shared/CheckIcon/CheckIcon.d.ts +2 -2
- package/build/features/shared/CheckIcon/CheckIcon.js +14 -14
- package/build/features/shared/CheckIcon/index.d.ts +2 -2
- package/build/features/shared/CheckIcon/index.js +2 -2
- package/build/features/shared/ClearIcon/ClearIcon.d.ts +6 -6
- package/build/features/shared/ClearIcon/ClearIcon.js +26 -26
- package/build/features/shared/ClearIcon/index.d.ts +2 -2
- package/build/features/shared/ClearIcon/index.js +2 -2
- package/build/features/shared/Containers/FeatureContainer.d.ts +4 -4
- package/build/features/shared/Containers/FeatureContainer.js +33 -33
- package/build/features/shared/Containers/ScreenContainer.d.ts +4 -4
- package/build/features/shared/Containers/ScreenContainer.js +29 -29
- package/build/features/shared/Containers/index.d.ts +3 -3
- package/build/features/shared/Containers/index.js +3 -3
- package/build/features/shared/Footer/Footer.d.ts +2 -2
- package/build/features/shared/Footer/Footer.js +16 -16
- package/build/features/shared/Footer/index.d.ts +2 -2
- package/build/features/shared/Footer/index.js +2 -2
- package/build/features/shared/Input/Input.d.ts +26 -26
- package/build/features/shared/Input/Input.js +56 -56
- package/build/features/shared/Input/index.d.ts +2 -2
- package/build/features/shared/Input/index.js +2 -2
- package/build/features/shared/Mandatory/Mandatory.d.ts +2 -2
- package/build/features/shared/Mandatory/Mandatory.js +20 -20
- package/build/features/shared/Mandatory/index.d.ts +2 -2
- package/build/features/shared/Mandatory/index.js +2 -2
- package/build/features/shared/OTP/OTP.d.ts +9 -9
- package/build/features/shared/OTP/OTP.js +85 -85
- package/build/features/shared/OTP/index.d.ts +2 -2
- package/build/features/shared/OTP/index.js +2 -2
- package/build/features/shared/PasswordIcon/PasswordIcon.d.ts +8 -8
- package/build/features/shared/PasswordIcon/PasswordIcon.js +37 -37
- package/build/features/shared/PasswordIcon/index.d.ts +2 -2
- package/build/features/shared/PasswordIcon/index.js +2 -2
- package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +7 -7
- package/build/features/shared/SuccessScreen/SuccessScreen.js +67 -67
- package/build/features/shared/SuccessScreen/index.d.ts +2 -2
- package/build/features/shared/SuccessScreen/index.js +2 -2
- package/build/features/tax/Tax.d.ts +6 -6
- package/build/features/tax/Tax.js +50 -50
- package/build/features/tax/index.d.ts +1 -1
- package/build/features/tax/index.js +1 -1
- package/build/features/tax/screens/Success/Success.d.ts +5 -5
- package/build/features/tax/screens/Success/Success.js +12 -12
- package/build/features/tax/screens/Success/index.d.ts +3 -3
- package/build/features/tax/screens/Success/index.js +2 -2
- package/build/features/tax/screens/TaxDetails/TaxDetails.d.ts +5 -5
- package/build/features/tax/screens/TaxDetails/TaxDetails.js +45 -45
- package/build/features/tax/screens/TaxDetails/VATId.d.ts +3 -3
- package/build/features/tax/screens/TaxDetails/VATId.js +26 -26
- package/build/features/tax/screens/TaxDetails/index.d.ts +3 -3
- package/build/features/tax/screens/TaxDetails/index.js +2 -2
- package/build/features/tax/screens/TaxDetails/validation.d.ts +8 -8
- package/build/features/tax/screens/TaxDetails/validation.js +4 -4
- package/build/hooks/index.d.ts +10 -10
- package/build/hooks/index.js +10 -10
- package/build/hooks/useAppConfig.d.ts +9 -9
- package/build/hooks/useAppConfig.js +62 -62
- package/build/hooks/useAppDispatch.d.ts +5 -5
- package/build/hooks/useAppDispatch.js +2 -2
- package/build/hooks/useAppSelector.d.ts +3 -3
- package/build/hooks/useAppSelector.js +2 -2
- package/build/hooks/useAppTheme.d.ts +4 -4
- package/build/hooks/useAppTheme.js +14 -14
- package/build/hooks/useContainerDimensions.d.ts +4 -4
- package/build/hooks/useContainerDimensions.js +21 -21
- package/build/hooks/useErrorListener.d.ts +1 -1
- package/build/hooks/useErrorListener.js +19 -19
- package/build/hooks/useEventListener.d.ts +5 -5
- package/build/hooks/useEventListener.js +20 -20
- package/build/hooks/useLanguage.d.ts +4 -4
- package/build/hooks/useLanguage.js +8 -8
- package/build/hooks/useThemeMode.d.ts +4 -4
- package/build/hooks/useThemeMode.js +7 -7
- package/build/i18n.d.ts +2 -2
- package/build/i18n.js +34 -34
- package/build/index.d.ts +10 -10
- package/build/index.js +23 -23
- package/build/theme/components.d.ts +2 -2
- package/build/theme/components.js +10 -10
- package/build/theme/index.d.ts +1 -1
- package/build/theme/index.js +1 -1
- package/build/theme/palette.d.ts +3 -3
- package/build/theme/palette.js +68 -64
- package/build/theme/shadows.d.ts +2 -2
- package/build/theme/shadows.js +27 -27
- package/build/theme/theme.d.ts +2 -2
- package/build/theme/theme.js +34 -34
- package/build/theme/typography.d.ts +2 -2
- package/build/theme/typography.js +31 -31
- package/build/utils/array.d.ts +8 -8
- package/build/utils/array.js +38 -38
- package/build/utils/device.d.ts +4 -4
- package/build/utils/device.js +13 -13
- package/build/utils/html.d.ts +4 -4
- package/build/utils/html.js +26 -26
- package/build/utils/index.d.ts +9 -9
- package/build/utils/index.js +9 -9
- package/build/utils/locale.d.ts +2 -2
- package/build/utils/locale.js +21 -21
- package/build/utils/object.d.ts +1 -1
- package/build/utils/object.js +7 -7
- package/build/utils/rsa.d.ts +2 -2
- package/build/utils/rsa.js +19 -19
- package/build/utils/storage.d.ts +5 -5
- package/build/utils/storage.js +21 -21
- package/build/utils/string.d.ts +11 -11
- package/build/utils/string.js +59 -59
- package/build/utils/style.d.ts +1 -1
- package/build/utils/style.js +1 -1
- package/build/utils/validation.d.ts +14 -14
- package/build/utils/validation.js +42 -42
- package/package.json +1 -1
- package/build/features/app/business/midStore.d.ts +0 -10
- package/build/features/app/business/midStore.js +0 -18
- package/build/features/app/connect/midStore.d.ts +0 -10
- package/build/features/app/connect/midStore.js +0 -18
- package/build/features/business/screens/VerifyNumber/OTPInput.d.ts +0 -5
- package/build/features/business/screens/VerifyNumber/OTPInput.js +0 -39
- package/build/features/business/screens/VerifyNumber/VerifyNumber.d.ts +0 -13
- package/build/features/business/screens/VerifyNumber/VerifyNumber.js +0 -76
- package/build/features/business/screens/VerifyNumber/index.d.ts +0 -3
- package/build/features/business/screens/VerifyNumber/index.js +0 -2
- package/build/features/business/screens/VerifyNumber/validation.d.ts +0 -8
- package/build/features/business/screens/VerifyNumber/validation.js +0 -4
- package/build/features/connect/screens/MID/BusinessCountry.d.ts +0 -11
- package/build/features/connect/screens/MID/BusinessCountry.js +0 -92
- package/build/features/connect/screens/MID/DOB.d.ts +0 -6
- package/build/features/connect/screens/MID/DOB.js +0 -38
- package/build/features/connect/screens/MID/IDNumber.d.ts +0 -7
- package/build/features/connect/screens/MID/IDNumber.js +0 -70
- package/build/features/connect/screens/MID/MID.d.ts +0 -5
- package/build/features/connect/screens/MID/MID.js +0 -87
- package/build/features/connect/screens/MID/MIDTitle.d.ts +0 -8
- package/build/features/connect/screens/MID/MIDTitle.js +0 -29
- package/build/features/connect/screens/MID/MobileNumber.d.ts +0 -12
- package/build/features/connect/screens/MID/MobileNumber.js +0 -148
- package/build/features/connect/screens/MID/index.d.ts +0 -3
- package/build/features/connect/screens/MID/index.js +0 -2
- package/build/features/connect/screens/MID/validation.d.ts +0 -18
- package/build/features/connect/screens/MID/validation.js +0 -15
- package/build/features/owner/Owner.d.ts +0 -6
- package/build/features/owner/Owner.js +0 -50
- package/build/features/owner/index.d.ts +0 -1
- package/build/features/owner/index.js +0 -1
- package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.d.ts +0 -8
- package/build/features/owner/screens/AdditionalOwnerInfo/AdditionalOwnerInfo.js +0 -77
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.d.ts +0 -10
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerLocation.js +0 -80
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.d.ts +0 -6
- package/build/features/owner/screens/AdditionalOwnerInfo/EmployerName.js +0 -40
- package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.d.ts +0 -6
- package/build/features/owner/screens/AdditionalOwnerInfo/InfluencerSwitch.js +0 -45
- package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.d.ts +0 -6
- package/build/features/owner/screens/AdditionalOwnerInfo/MonthlyIncome.js +0 -35
- package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.d.ts +0 -6
- package/build/features/owner/screens/AdditionalOwnerInfo/PEPSwitch.js +0 -45
- package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.d.ts +0 -9
- package/build/features/owner/screens/AdditionalOwnerInfo/SourceOfIncome.js +0 -85
- package/build/features/owner/screens/AdditionalOwnerInfo/index.d.ts +0 -3
- package/build/features/owner/screens/AdditionalOwnerInfo/index.js +0 -2
- package/build/features/owner/screens/AdditionalOwnerInfo/validation.d.ts +0 -25
- package/build/features/owner/screens/AdditionalOwnerInfo/validation.js +0 -35
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.d.ts +0 -19
- package/build/features/owner/screens/ShowOwnerInfo/ShowOwnerInfo.js +0 -52
- package/build/features/owner/screens/ShowOwnerInfo/index.d.ts +0 -3
- package/build/features/owner/screens/ShowOwnerInfo/index.js +0 -2
- package/build/features/owner/screens/ShowOwnerInfo/info.d.ts +0 -7
- package/build/features/owner/screens/ShowOwnerInfo/info.js +0 -28
- package/build/features/owner/screens/Success/Success.d.ts +0 -5
- package/build/features/owner/screens/Success/Success.js +0 -14
- package/build/features/owner/screens/Success/index.d.ts +0 -3
- package/build/features/owner/screens/Success/index.js +0 -2
- package/build/features/shared/ExpandIcon/ExpandIcon.d.ts +0 -7
- package/build/features/shared/ExpandIcon/ExpandIcon.js +0 -24
- package/build/features/shared/ExpandIcon/index.d.ts +0 -2
- package/build/features/shared/ExpandIcon/index.js +0 -2
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
export var isNumber = function (value) {
|
|
2
|
-
return value.match(/^[0-9]+$/g) !== null;
|
|
3
|
-
};
|
|
4
|
-
export var removeAllCharsFromNumber = function (str) {
|
|
5
|
-
return str.replace(/[^0-9]/g, '');
|
|
6
|
-
};
|
|
7
|
-
export var removeOnlyNumbers = function (str) {
|
|
8
|
-
return str.replace(/[^\D]/g, '');
|
|
9
|
-
};
|
|
10
|
-
export var removeAllOtherThanAlphabet = function (str) {
|
|
11
|
-
return str.replace(/[^[A-Za-z]/g, '');
|
|
12
|
-
};
|
|
13
|
-
export var removeAllOtherThanAlphabetAndSpace = function (str) {
|
|
14
|
-
return str.replace(/[^[A-Za-z ]/g, '');
|
|
15
|
-
};
|
|
16
|
-
export var removeAllNumberFromChars = function (str) {
|
|
17
|
-
return str.replace(/[^a-zA-Z]/g, '');
|
|
18
|
-
};
|
|
19
|
-
export var keepEmailCharacters = function (str) {
|
|
20
|
-
return str.replace(/[^a-zA-Z@.]/g, '');
|
|
21
|
-
};
|
|
22
|
-
export var removeAllOtherThanCharsAndNumber = function (str) {
|
|
23
|
-
return str.replace(/[^A-Za-z0-9]/g, '');
|
|
24
|
-
};
|
|
25
|
-
export var removeAllOtherThanCharsNumbersAndSpace = function (str) {
|
|
26
|
-
return str.replace(/[^A-Za-z0-9 ]/g, '');
|
|
27
|
-
};
|
|
28
|
-
export function PasswordMatchLength(password) {
|
|
29
|
-
return password.length > 7;
|
|
30
|
-
}
|
|
31
|
-
export function isPasswordHasUpperLetter(password) {
|
|
32
|
-
return /[A-Z]/.test(password);
|
|
33
|
-
}
|
|
34
|
-
export function isPasswordHasLowerLetter(password) {
|
|
35
|
-
return /[a-z]/.test(password);
|
|
36
|
-
}
|
|
37
|
-
export function isPasswordHasSpecialLetter(password) {
|
|
38
|
-
return /[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(password);
|
|
39
|
-
}
|
|
40
|
-
export var keepLettersAndSpace = function (str) {
|
|
41
|
-
return str.replace(/[^a-zA-Z] /g, '');
|
|
42
|
-
};
|
|
1
|
+
export var isNumber = function (value) {
|
|
2
|
+
return value.match(/^[0-9]+$/g) !== null;
|
|
3
|
+
};
|
|
4
|
+
export var removeAllCharsFromNumber = function (str) {
|
|
5
|
+
return str.replace(/[^0-9]/g, '');
|
|
6
|
+
};
|
|
7
|
+
export var removeOnlyNumbers = function (str) {
|
|
8
|
+
return str.replace(/[^\D]/g, '');
|
|
9
|
+
};
|
|
10
|
+
export var removeAllOtherThanAlphabet = function (str) {
|
|
11
|
+
return str.replace(/[^[A-Za-z]/g, '');
|
|
12
|
+
};
|
|
13
|
+
export var removeAllOtherThanAlphabetAndSpace = function (str) {
|
|
14
|
+
return str.replace(/[^[A-Za-z ]/g, '');
|
|
15
|
+
};
|
|
16
|
+
export var removeAllNumberFromChars = function (str) {
|
|
17
|
+
return str.replace(/[^a-zA-Z]/g, '');
|
|
18
|
+
};
|
|
19
|
+
export var keepEmailCharacters = function (str) {
|
|
20
|
+
return str.replace(/[^a-zA-Z@.]/g, '');
|
|
21
|
+
};
|
|
22
|
+
export var removeAllOtherThanCharsAndNumber = function (str) {
|
|
23
|
+
return str.replace(/[^A-Za-z0-9]/g, '');
|
|
24
|
+
};
|
|
25
|
+
export var removeAllOtherThanCharsNumbersAndSpace = function (str) {
|
|
26
|
+
return str.replace(/[^A-Za-z0-9 ]/g, '');
|
|
27
|
+
};
|
|
28
|
+
export function PasswordMatchLength(password) {
|
|
29
|
+
return password.length > 7;
|
|
30
|
+
}
|
|
31
|
+
export function isPasswordHasUpperLetter(password) {
|
|
32
|
+
return /[A-Z]/.test(password);
|
|
33
|
+
}
|
|
34
|
+
export function isPasswordHasLowerLetter(password) {
|
|
35
|
+
return /[a-z]/.test(password);
|
|
36
|
+
}
|
|
37
|
+
export function isPasswordHasSpecialLetter(password) {
|
|
38
|
+
return /[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(password);
|
|
39
|
+
}
|
|
40
|
+
export var keepLettersAndSpace = function (str) {
|
|
41
|
+
return str.replace(/[^a-zA-Z] /g, '');
|
|
42
|
+
};
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RootState } from '../../../app/store';
|
|
2
|
-
import { SharedState } from '../../../@types';
|
|
3
|
-
export interface MIDData {
|
|
4
|
-
}
|
|
5
|
-
export interface MIDState extends SharedState<MIDData> {
|
|
6
|
-
}
|
|
7
|
-
export declare const midSlice: import("@reduxjs/toolkit").Slice<MIDState, {}, "connect/mid">;
|
|
8
|
-
declare const _default: import("redux").Reducer<MIDState, import("redux").AnyAction>;
|
|
9
|
-
export default _default;
|
|
10
|
-
export declare const midSelector: (state: RootState) => MIDState;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
3
|
-
var initialState = {
|
|
4
|
-
error: null,
|
|
5
|
-
loading: false,
|
|
6
|
-
data: {}
|
|
7
|
-
};
|
|
8
|
-
export var midSlice = createSlice({
|
|
9
|
-
name: 'connect/mid',
|
|
10
|
-
initialState: initialState,
|
|
11
|
-
reducers: {},
|
|
12
|
-
extraReducers: function (builder) {
|
|
13
|
-
console.log(builder);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
export var _b = _a = midSlice.actions;
|
|
17
|
-
export default midSlice.reducer;
|
|
18
|
-
export var midSelector = function (state) { return state.connect; };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { RootState } from '../../../app/store';
|
|
2
|
-
import { SharedState } from '../../../@types';
|
|
3
|
-
export interface MIDData {
|
|
4
|
-
}
|
|
5
|
-
export interface MIDState extends SharedState<MIDData> {
|
|
6
|
-
}
|
|
7
|
-
export declare const midSlice: import("@reduxjs/toolkit").Slice<MIDState, {}, "connect/mid">;
|
|
8
|
-
declare const _default: import("redux").Reducer<MIDState, import("redux").AnyAction>;
|
|
9
|
-
export default _default;
|
|
10
|
-
export declare const midSelector: (state: RootState) => MIDState;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
import { createSlice } from '@reduxjs/toolkit';
|
|
3
|
-
var initialState = {
|
|
4
|
-
error: null,
|
|
5
|
-
loading: false,
|
|
6
|
-
data: {}
|
|
7
|
-
};
|
|
8
|
-
export var midSlice = createSlice({
|
|
9
|
-
name: 'connect/mid',
|
|
10
|
-
initialState: initialState,
|
|
11
|
-
reducers: {},
|
|
12
|
-
extraReducers: function (builder) {
|
|
13
|
-
console.log(builder);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
export var _b = _a = midSlice.actions;
|
|
17
|
-
export default midSlice.reducer;
|
|
18
|
-
export var midSelector = function (state) { return state.mid; };
|
|
@@ -1,39 +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 } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import Box from '@mui/material/Box/Box';
|
|
15
|
-
import { styled } from '@mui/material/styles';
|
|
16
|
-
import OTPField from '../../../../features/shared/OTP';
|
|
17
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
18
|
-
import { useTranslation } from 'react-i18next';
|
|
19
|
-
import { DEFAULT_TIMER_VALUE } from '../../../../constants';
|
|
20
|
-
var BoxStyled = styled(Box)(function (_a) {
|
|
21
|
-
var theme = _a.theme;
|
|
22
|
-
return ({
|
|
23
|
-
display: 'flex',
|
|
24
|
-
flexDirection: 'column',
|
|
25
|
-
fontFamily: theme.typography.fontFamily,
|
|
26
|
-
marginBottom: theme.spacing(5)
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
var OTPInput = function (_a) {
|
|
30
|
-
var control = useFormContext().control;
|
|
31
|
-
var t = useTranslation().t;
|
|
32
|
-
var otpControl = useController({ name: 'otp', control: control });
|
|
33
|
-
var handleOnOTPChange = function (otp) {
|
|
34
|
-
otpControl.field.onChange(otp);
|
|
35
|
-
};
|
|
36
|
-
var otpValue = otpControl.field.value;
|
|
37
|
-
return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: function () { }, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
|
|
38
|
-
};
|
|
39
|
-
export default React.memo(OTPInput);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface OTPProps {
|
|
3
|
-
phone?: string;
|
|
4
|
-
code?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const _default: React.MemoExoticComponent<{
|
|
7
|
-
({ phone, code }: OTPProps): JSX.Element;
|
|
8
|
-
defaultProps: {
|
|
9
|
-
phone: string;
|
|
10
|
-
code: string;
|
|
11
|
-
};
|
|
12
|
-
}>;
|
|
13
|
-
export default _default;
|
|
@@ -1,76 +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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import { useAppDispatch } from '../../../../hooks';
|
|
15
|
-
import { useTranslation } from 'react-i18next';
|
|
16
|
-
import { useForm, FormProvider } from 'react-hook-form';
|
|
17
|
-
import { yupResolver } from '@hookform/resolvers/yup';
|
|
18
|
-
import Box from '@mui/material/Box/Box';
|
|
19
|
-
import { styled } from '@mui/material/styles';
|
|
20
|
-
import { handleNextScreenStep, handlePrevScreenStep } from '../../../../app/settings';
|
|
21
|
-
import { useLanguage } from '../../../../hooks';
|
|
22
|
-
import Form from '../../../../components/Form';
|
|
23
|
-
import Text from '../../../../components/Text';
|
|
24
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
25
|
-
import Button from '../../../shared/Button';
|
|
26
|
-
import { maskPhone } from '../../../../utils';
|
|
27
|
-
import { OTPValidation } from './validation';
|
|
28
|
-
import OTPInput from './OTPInput';
|
|
29
|
-
var OTPTitleContainerStyled = styled(Box)(function (_a) {
|
|
30
|
-
var theme = _a.theme;
|
|
31
|
-
return ({
|
|
32
|
-
background: theme.palette.common.white,
|
|
33
|
-
border: '1px solid',
|
|
34
|
-
borderColor: theme.palette.divider,
|
|
35
|
-
direction: theme.direction,
|
|
36
|
-
borderRadius: theme.spacing(0, 0, 1.25, 1.25),
|
|
37
|
-
marginBottom: theme.spacing(5.75)
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
var OTPTitleStyled = styled(Text)(function (_a) {
|
|
41
|
-
var theme = _a.theme;
|
|
42
|
-
return (__assign(__assign({}, theme.typography.body1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightLight, marginBlock: theme.spacing(1.75), marginInlineStart: theme.spacing(2.5), lineHeight: 1.75 }));
|
|
43
|
-
});
|
|
44
|
-
var FormStyled = styled(Form)(function () { return ({
|
|
45
|
-
display: 'flex',
|
|
46
|
-
flexDirection: 'column'
|
|
47
|
-
}); });
|
|
48
|
-
var VerifyNumber = function (_a) {
|
|
49
|
-
var phone = _a.phone, code = _a.code;
|
|
50
|
-
var dispatch = useAppDispatch();
|
|
51
|
-
var methods = useForm({
|
|
52
|
-
resolver: yupResolver(OTPValidation),
|
|
53
|
-
defaultValues: {
|
|
54
|
-
otp: ''
|
|
55
|
-
},
|
|
56
|
-
mode: 'onChange'
|
|
57
|
-
});
|
|
58
|
-
var t = useTranslation().t;
|
|
59
|
-
var isAr = useLanguage().isAr;
|
|
60
|
-
var onSubmit = function (data) {
|
|
61
|
-
console.log('data', data);
|
|
62
|
-
if (data.otp === '123456')
|
|
63
|
-
return dispatch(handleNextScreenStep('BUSINESS_IDBOD_STEP'));
|
|
64
|
-
dispatch(handleNextScreenStep('BUSINESS_BUSINESS_TYPE_STEP'));
|
|
65
|
-
};
|
|
66
|
-
var onBack = function () {
|
|
67
|
-
dispatch(handlePrevScreenStep());
|
|
68
|
-
};
|
|
69
|
-
var loading = false;
|
|
70
|
-
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('ide_opt_sent_title'), _jsx("span", __assign({ dir: 'ltr' }, { children: "".concat(maskPhone(phone || '')) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ disableBack: true, onBackClicked: function () { return onBack(); }, disabled: !methods.formState.isValid, type: 'submit', isAr: isAr, loading: loading }, { children: t('next') }))] })) })) }));
|
|
71
|
-
};
|
|
72
|
-
VerifyNumber.defaultProps = {
|
|
73
|
-
phone: '564656085',
|
|
74
|
-
code: '+996'
|
|
75
|
-
};
|
|
76
|
-
export default React.memo(VerifyNumber);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as yup from 'yup';
|
|
2
|
-
export declare const OTPValidation: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
|
-
otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
|
-
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
5
|
-
otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
6
|
-
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
7
|
-
otp: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
|
-
}>>>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { CountryCode } from '../../../../@types';
|
|
3
|
-
interface BusinessCountryProps {
|
|
4
|
-
countries: Array<CountryCode>;
|
|
5
|
-
show: boolean;
|
|
6
|
-
setMobileLength?: (length: number) => void;
|
|
7
|
-
onListOpen?: () => void;
|
|
8
|
-
onListClose?: () => void;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<BusinessCountryProps & React.RefAttributes<unknown>>>;
|
|
11
|
-
export default _default;
|
|
@@ -1,92 +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, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
-
import * as React from 'react';
|
|
25
|
-
import Box from '@mui/material/Box';
|
|
26
|
-
import { styled } from '@mui/material/styles';
|
|
27
|
-
import { useTranslation } from 'react-i18next';
|
|
28
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
29
|
-
import Text from '../../../../components/Text';
|
|
30
|
-
import Collapse from '../../../../components/Collapse';
|
|
31
|
-
import CheckIcon from '@mui/icons-material/Check';
|
|
32
|
-
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
33
|
-
import Icon from '../../../../components/Icon';
|
|
34
|
-
import Input from '../../../shared/Input';
|
|
35
|
-
import ExpandIcon from '../../../../components/ExpandIcon';
|
|
36
|
-
import SimpleList from '../../../../components/SimpleList';
|
|
37
|
-
import { useLanguage } from '../../../../hooks';
|
|
38
|
-
var CountryItemContainer = styled(Box)(function () { return ({
|
|
39
|
-
display: 'flex'
|
|
40
|
-
}); });
|
|
41
|
-
var CountryNameText = styled(Text, { shouldForwardProp: function (prop) { return prop !== 'isSelected'; } })(function (_a) {
|
|
42
|
-
var theme = _a.theme, isSelected = _a.isSelected;
|
|
43
|
-
return (__assign(__assign({ color: theme.palette.text.primary }, theme.typography.body2), { fontWeight: isSelected ? theme.typography.fontWeightMedium : theme.typography.fontWeightLight, paddingInlineStart: theme.spacing(1.25) }));
|
|
44
|
-
});
|
|
45
|
-
var CheckIconStyled = styled(CheckIcon)(function (_a) {
|
|
46
|
-
var theme = _a.theme;
|
|
47
|
-
return ({
|
|
48
|
-
color: theme.palette.success.main,
|
|
49
|
-
display: 'flex',
|
|
50
|
-
alignItems: 'flex-end'
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
var CountrySpanStyled = styled(Text)(function () { return ({
|
|
54
|
-
cursor: 'pointer'
|
|
55
|
-
}); });
|
|
56
|
-
var CountryIconStyled = styled(Icon)(function (_a) {
|
|
57
|
-
var theme = _a.theme;
|
|
58
|
-
return ({
|
|
59
|
-
width: theme.spacing(2.75),
|
|
60
|
-
height: theme.spacing(2),
|
|
61
|
-
verticalAlign: 'middle'
|
|
62
|
-
});
|
|
63
|
-
});
|
|
64
|
-
var BusinessCountry = React.forwardRef(function (_a, ref) {
|
|
65
|
-
var _b, _c;
|
|
66
|
-
var countries = _a.countries, rest = __rest(_a, ["countries"]);
|
|
67
|
-
var businessCountries = React.useState(countries)[0];
|
|
68
|
-
var _d = React.useState(null), anchorEl = _d[0], setAnchorEl = _d[1];
|
|
69
|
-
var t = useTranslation().t;
|
|
70
|
-
var isAr = useLanguage().isAr;
|
|
71
|
-
var control = useFormContext().control;
|
|
72
|
-
var businessCountryControl = useController({ control: control, name: 'businessCountry' });
|
|
73
|
-
var onOpenCountrySelect = function (event) {
|
|
74
|
-
var _a;
|
|
75
|
-
setAnchorEl(event.currentTarget);
|
|
76
|
-
(_a = rest.onListOpen) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
77
|
-
};
|
|
78
|
-
var onCloseCountrySelect = function () {
|
|
79
|
-
var _a;
|
|
80
|
-
setAnchorEl(null);
|
|
81
|
-
(_a = rest.onListClose) === null || _a === void 0 ? void 0 : _a.call(rest);
|
|
82
|
-
};
|
|
83
|
-
var onSelectItem = function (country) {
|
|
84
|
-
onCloseCountrySelect();
|
|
85
|
-
businessCountryControl.field.onChange(country);
|
|
86
|
-
};
|
|
87
|
-
var businessCountry = businessCountryControl.field.value;
|
|
88
|
-
return (_jsx(Collapse, __assign({ in: rest.show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { marginBottom: '25px' } }, { children: [_jsx(Input, { label: t('signup_select_country'), readOnly: true, onClick: !!anchorEl ? function () { return onCloseCountrySelect(); } : onOpenCountrySelect, startAdornment: _jsx(CountrySpanStyled, { children: _jsx(CountryIconStyled, { src: (businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.logo) || '' }) }), endAdornment: _jsx(ExpandIcon, { anchorEl: !!anchorEl }), placeholder: t('ide_mobile_placeholder'), value: (isAr ? (_b = businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.name) === null || _b === void 0 ? void 0 : _b.arabic : (_c = businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.name) === null || _c === void 0 ? void 0 : _c.english) || '' }), _jsx(Collapse, __assign({ in: !!anchorEl }, { children: _jsx(SimpleList, { searchKeyPath: 'name.english', list: businessCountries, onSelectItem: onSelectItem, renderItem: function (item) {
|
|
89
|
-
return (_jsxs(_Fragment, { children: [_jsxs(CountryItemContainer, { children: [_jsx(CountryIconStyled, { src: item.logo, alt: item.iso3 }), _jsx(CountryNameText, __assign({ isSelected: (item === null || item === void 0 ? void 0 : item.idd_prefix) === (businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.idd_prefix) }, { children: isAr ? item.name.arabic : item.name.english }))] }), item.idd_prefix === (businessCountry === null || businessCountry === void 0 ? void 0 : businessCountry.idd_prefix) && _jsx(CheckIconStyled, {})] }));
|
|
90
|
-
} }) }))] })) })));
|
|
91
|
-
});
|
|
92
|
-
export default React.memo(BusinessCountry);
|
|
@@ -1,38 +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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { ScreenContainer } from '../../../shared/Containers';
|
|
14
|
-
import DatePicker from '../../../../components/DatePicker';
|
|
15
|
-
import { useTranslation } from 'react-i18next';
|
|
16
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
17
|
-
import { alpha, styled } from '@mui/material/styles';
|
|
18
|
-
import Text from '../../../../components/Text';
|
|
19
|
-
var InputLabelStyled = styled(Text)(function (_a) {
|
|
20
|
-
var theme = _a.theme;
|
|
21
|
-
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
22
|
-
});
|
|
23
|
-
var DOB = function (_a) {
|
|
24
|
-
var _b;
|
|
25
|
-
var onDateClicked = _a.onDateClicked;
|
|
26
|
-
var t = useTranslation().t;
|
|
27
|
-
var control = useFormContext().control;
|
|
28
|
-
var dobControl = useController({ control: control, name: 'dob' });
|
|
29
|
-
var handleBirthDateChange = function (data) {
|
|
30
|
-
dobControl.field.onChange(data);
|
|
31
|
-
};
|
|
32
|
-
var dateValue = (_b = dobControl === null || dobControl === void 0 ? void 0 : dobControl.field) === null || _b === void 0 ? void 0 : _b.value;
|
|
33
|
-
return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
34
|
-
var spacing = _a.spacing;
|
|
35
|
-
return spacing(2.5, 2.5, 1.5, 2.5);
|
|
36
|
-
} } }, { children: t('enter_birth_date') })), _jsx(DatePicker, { defaultValue: dateValue ? new Date(dateValue) : new Date(), readOnly: true, dir: 'ltr', locale: 'en', onDateChange: handleBirthDateChange, onClick: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(true); }, onDatePicked: function () { return onDateClicked === null || onDateClicked === void 0 ? void 0 : onDateClicked(false); } })] }));
|
|
37
|
-
};
|
|
38
|
-
export default DOB;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
interface IDNumberProps {
|
|
3
|
-
show: boolean;
|
|
4
|
-
onSwitchToMobileNumber?: () => void;
|
|
5
|
-
}
|
|
6
|
-
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<IDNumberProps & React.RefAttributes<unknown>>>;
|
|
7
|
-
export default _default;
|
|
@@ -1,70 +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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import Box from '@mui/material/Box';
|
|
15
|
-
import { useTranslation } from 'react-i18next';
|
|
16
|
-
import { useController, useFormContext } from 'react-hook-form';
|
|
17
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
18
|
-
import Text from '../../../../components/Text';
|
|
19
|
-
import Tooltip from '@mui/material/Tooltip';
|
|
20
|
-
import Icon from '../../../../components/Icon';
|
|
21
|
-
import Input from '../../../shared/Input';
|
|
22
|
-
import ClearIcon from '../../../shared/ClearIcon';
|
|
23
|
-
import CheckIcon from '../../../shared/CheckIcon';
|
|
24
|
-
import Collapse from '../../../../components/Collapse';
|
|
25
|
-
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
26
|
-
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
27
|
-
import { ICONS_NAMES, ID_NUMBER_LENGTH } from '../../../../constants';
|
|
28
|
-
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
29
|
-
var theme = _a.theme;
|
|
30
|
-
return ({
|
|
31
|
-
display: 'flex',
|
|
32
|
-
justifyContent: 'space-between',
|
|
33
|
-
padding: theme.spacing(0, 2.5, 1.25, 2.5)
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
var InputLabelStyled = styled(Text)(function (_a) {
|
|
37
|
-
var theme = _a.theme;
|
|
38
|
-
return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
|
|
39
|
-
});
|
|
40
|
-
var IconStyled = styled(Icon)(function (_a) {
|
|
41
|
-
var theme = _a.theme;
|
|
42
|
-
return ({
|
|
43
|
-
width: theme.spacing(2.75),
|
|
44
|
-
height: theme.spacing(2.125),
|
|
45
|
-
cursor: 'pointer'
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
var IDNumber = React.forwardRef(function (_a, ref) {
|
|
49
|
-
var _b;
|
|
50
|
-
var onSwitchToMobileNumber = _a.onSwitchToMobileNumber, show = _a.show;
|
|
51
|
-
var t = useTranslation().t;
|
|
52
|
-
var _c = useFormContext(), control = _c.control, setValue = _c.setValue;
|
|
53
|
-
var nidControl = useController({ control: control, name: 'nid' });
|
|
54
|
-
React.useEffect(function () {
|
|
55
|
-
if (nidControl.field.value)
|
|
56
|
-
setValue('nid', nidControl.field.value, { shouldValidate: true });
|
|
57
|
-
}, [show]);
|
|
58
|
-
var handleIdChange = function (_a) {
|
|
59
|
-
var target = _a.target;
|
|
60
|
-
var value = removeAllCharsFromNumber(target.value);
|
|
61
|
-
nidControl.field.onChange(value);
|
|
62
|
-
};
|
|
63
|
-
var clearIdNumber = function () {
|
|
64
|
-
nidControl.field.onChange('');
|
|
65
|
-
};
|
|
66
|
-
var nidValue = nidControl.field.value;
|
|
67
|
-
var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
|
|
68
|
-
return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsxs(LabelContainerStyled, { children: [_jsx(InputLabelStyled, { children: t('enter_national_id') }), _jsx(Tooltip, __assign({ title: t('switch_to_mobile') }, { children: _jsx(IconStyled, { onClick: onSwitchToMobileNumber, alt: 'switcher icon', src: ICONS_NAMES.MOBILE_IMAGE }) }))] }), _jsx(Input, { dir: 'ltr', inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, endAdornment: !error && nidValue ? _jsx(CheckIcon, {}) : nidValue && _jsx(ClearIcon, { onClick: clearIdNumber }), placeholder: '0000000000', warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
|
|
69
|
-
});
|
|
70
|
-
export default React.memo(IDNumber);
|
|
@@ -1,87 +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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import * as React from 'react';
|
|
14
|
-
import Box from '@mui/material/Box';
|
|
15
|
-
import { useForm, FormProvider } from 'react-hook-form';
|
|
16
|
-
import { yupResolver } from '@hookform/resolvers/yup';
|
|
17
|
-
import { useTranslation } from 'react-i18next';
|
|
18
|
-
import { styled } from '@mui/material/styles';
|
|
19
|
-
import Collapse from '../../../../components/Collapse';
|
|
20
|
-
import Form from '../../../../components/Form';
|
|
21
|
-
import Button from '../../../shared/Button';
|
|
22
|
-
import { useAppDispatch } from '../../../../hooks';
|
|
23
|
-
import { handleNextScreenStep } from '../../../../app/settings';
|
|
24
|
-
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
25
|
-
import { useLanguage } from '../../../../hooks';
|
|
26
|
-
import MIDTitle from './MIDTitle';
|
|
27
|
-
import MobileNumber from './MobileNumber';
|
|
28
|
-
import IDNumber from './IDNumber';
|
|
29
|
-
import BusinessCountry from './BusinessCountry';
|
|
30
|
-
import { NIDValidationSchema, PhoneValidationSchema } from './validation';
|
|
31
|
-
import { countriesCode, defaultCountry, businessCountries } from '../../../../constants/dummy';
|
|
32
|
-
import DOB from './DOB';
|
|
33
|
-
var FormStyled = styled(Form)(function () { return ({
|
|
34
|
-
display: 'flex',
|
|
35
|
-
flexDirection: 'column'
|
|
36
|
-
}); });
|
|
37
|
-
var InputsContainerStyled = styled(Box)(function (_a) {
|
|
38
|
-
var _b;
|
|
39
|
-
var theme = _a.theme, listActive = _a.listActive;
|
|
40
|
-
return (_b = {
|
|
41
|
-
paddingBottom: theme.spacing(listActive ? 0 : 5)
|
|
42
|
-
},
|
|
43
|
-
_b[theme.transitions.create(['padding-bottom'])] = {
|
|
44
|
-
duration: theme.transitions.duration.standard
|
|
45
|
-
},
|
|
46
|
-
_b);
|
|
47
|
-
});
|
|
48
|
-
var ListType;
|
|
49
|
-
(function (ListType) {
|
|
50
|
-
ListType["BusinessList"] = "BusinessList";
|
|
51
|
-
ListType["CountryCodeList"] = "CountryCodeList";
|
|
52
|
-
})(ListType || (ListType = {}));
|
|
53
|
-
var MID = function (_a) {
|
|
54
|
-
var _b = React.useState(false), collapse = _b[0], setCollapse = _b[1];
|
|
55
|
-
var _c = React.useState(false), isNID = _c[0], setIsNID = _c[1];
|
|
56
|
-
var _d = React.useState(10), mobileLength = _d[0], setMobileLength = _d[1];
|
|
57
|
-
var _e = React.useState(), listType = _e[0], setListType = _e[1];
|
|
58
|
-
var dispatch = useAppDispatch();
|
|
59
|
-
var methods = useForm({
|
|
60
|
-
resolver: yupResolver(isNID ? NIDValidationSchema : PhoneValidationSchema(mobileLength)),
|
|
61
|
-
defaultValues: {
|
|
62
|
-
countryCode: defaultCountry,
|
|
63
|
-
businessCountry: defaultCountry,
|
|
64
|
-
nid: '',
|
|
65
|
-
dob: '1998-08-22',
|
|
66
|
-
mobile: null
|
|
67
|
-
},
|
|
68
|
-
mode: 'onChange'
|
|
69
|
-
});
|
|
70
|
-
var t = useTranslation().t;
|
|
71
|
-
var isAr = useLanguage().isAr;
|
|
72
|
-
var handleMenuListClick = function (flag) {
|
|
73
|
-
setListType(flag);
|
|
74
|
-
};
|
|
75
|
-
var onSubmit = function (data) {
|
|
76
|
-
console.log('data', data);
|
|
77
|
-
dispatch(handleNextScreenStep());
|
|
78
|
-
};
|
|
79
|
-
var handleCollapseOpenClose = function (flag) {
|
|
80
|
-
setCollapse(flag);
|
|
81
|
-
};
|
|
82
|
-
var isBusinessListActive = listType === ListType.BusinessList;
|
|
83
|
-
var isCountryListActive = listType === ListType.CountryCodeList;
|
|
84
|
-
var listActive = isBusinessListActive || isCountryListActive;
|
|
85
|
-
return (_jsxs(ScreenContainer, { children: [_jsx(MIDTitle, { show: !listActive, title: t('join_our_community'), description: t('ide_terms_and_conditions_description') }), _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsxs(InputsContainerStyled, __assign({ listActive: listActive }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(BusinessCountry, { show: !isCountryListActive, setMobileLength: setMobileLength, countries: businessCountries, onListOpen: function () { return handleMenuListClick(ListType.BusinessList); }, onListClose: function () { return handleMenuListClick(); } }) })), _jsx(Collapse, __assign({ in: !isNID }, { children: _jsx(MobileNumber, { show: !isBusinessListActive, setMobileLength: setMobileLength, countries: countriesCode, onSwitchToIdNumber: function () { return setIsNID(true); }, onListOpen: function () { return handleMenuListClick(ListType.CountryCodeList); }, onListClose: function () { return handleMenuListClick(); } }) })), _jsxs(Collapse, __assign({ in: isNID }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !listActive, onSwitchToMobileNumber: function () { return setIsNID(false); } }) })), _jsx(Collapse, __assign({ in: !listActive }, { children: _jsx(DOB, { onDateClicked: handleCollapseOpenClose }) }))] }))] })), _jsx(Collapse, __assign({ in: !listActive && !collapse }, { children: _jsx(Button, __assign({ isAr: isAr, disabled: !methods.formState.isValid, loading: false }, { children: t('next') })) }))] })) }))] }));
|
|
86
|
-
};
|
|
87
|
-
export default React.memo(MID);
|