@tap-payments/auth-jsconnect 1.0.2 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/@types/app.d.ts +16 -0
- package/build/@types/app.js +6 -2
- package/build/@types/index.js +0 -1
- package/build/@types/redux.js +0 -1
- package/build/@types/theme.d.ts +12 -3
- package/build/@types/theme.js +15 -2
- package/build/app/rootReducer.d.ts +1 -1
- package/build/app/rootReducer.js +1 -2
- package/build/app/settings.d.ts +7 -2
- package/build/app/settings.js +21 -7
- package/build/app/store.d.ts +2 -2
- package/build/app/store.js +0 -1
- package/build/assets/locales/ar.json +22 -3
- package/build/assets/locales/en.json +20 -1
- package/build/components/AnimationFlow/AnimationFlow.js +15 -5
- package/build/components/AnimationFlow/BottomSheet.d.ts +3 -2
- package/build/components/AnimationFlow/BottomSheet.js +43 -5
- package/build/components/AnimationFlow/Dialog.d.ts +3 -2
- package/build/components/AnimationFlow/Dialog.js +35 -18
- package/build/components/AnimationFlow/index.js +0 -1
- package/build/components/Button/Button.d.ts +7 -3
- package/build/components/Button/Button.js +21 -3
- package/build/components/Button/index.js +0 -1
- package/build/components/CheckBox/CheckBox.js +2 -2
- package/build/components/CheckBox/index.js +0 -1
- package/build/components/Collapse/Collapse.d.ts +5 -0
- package/build/components/Collapse/Collapse.js +28 -0
- package/build/components/Collapse/index.d.ts +3 -0
- package/build/components/Collapse/index.js +2 -0
- package/build/components/DatePicker/DatePicker.js +10 -14
- package/build/components/DatePicker/index.js +0 -1
- package/build/components/Footer/Footer.js +2 -16
- package/build/components/Footer/index.js +0 -1
- package/build/components/Form/Form.js +2 -2
- package/build/components/Form/index.js +0 -1
- package/build/components/Icon/Icon.js +2 -2
- package/build/components/Icon/index.js +0 -1
- package/build/components/Input/Input.d.ts +4 -1
- package/build/components/Input/Input.js +8 -7
- package/build/components/Input/index.js +0 -1
- package/build/components/InputAdornment/InputAdornment.js +3 -3
- package/build/components/InputAdornment/index.js +0 -1
- package/build/components/List/List.js +2 -4
- package/build/components/List/index.js +0 -1
- package/build/components/ListItem/ListItem.js +2 -2
- package/build/components/ListItem/index.js +0 -1
- package/build/components/Loader/Loader.d.ts +10 -8
- package/build/components/Loader/Loader.js +25 -43
- package/build/components/Loader/index.js +0 -1
- package/build/components/LogoBadge/LogoBadge.js +4 -5
- package/build/components/LogoBadge/index.js +0 -1
- package/build/components/OTPField/OTPField.js +2 -2
- package/build/components/OTPField/index.js +0 -1
- package/build/components/OTPTimer/OTPTimer.d.ts +2 -1
- package/build/components/OTPTimer/OTPTimer.js +6 -8
- package/build/components/OTPTimer/index.js +0 -1
- package/build/components/ProgressBar/ProgressBar.js +2 -3
- package/build/components/ProgressBar/index.js +0 -1
- package/build/components/Providers/ReduxProvider.js +13 -3
- package/build/components/Providers/ThemeProvider.js +18 -10
- package/build/components/Providers/index.js +0 -1
- package/build/components/SimpleList/SimpleList.d.ts +10 -2
- package/build/components/SimpleList/SimpleList.js +58 -26
- package/build/components/SimpleList/index.js +0 -1
- package/build/components/Slide/Slide.d.ts +6 -0
- package/build/components/Slide/Slide.js +30 -0
- package/build/components/Slide/index.d.ts +3 -0
- package/build/components/Slide/index.js +2 -0
- package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +14 -0
- package/build/components/SocialMediaGroup/SocialMediaGroup.js +86 -0
- package/build/components/SocialMediaGroup/index.d.ts +3 -0
- package/build/components/SocialMediaGroup/index.js +2 -0
- package/build/components/Text/Text.js +2 -2
- package/build/components/Text/index.js +0 -1
- package/build/components/ToggleButton/ToggleButton.d.ts +5 -0
- package/build/components/ToggleButton/ToggleButton.js +44 -0
- package/build/components/ToggleButton/index.d.ts +3 -0
- package/build/components/ToggleButton/index.js +2 -0
- package/build/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +5 -0
- package/build/components/ToggleButtonGroup/ToggleButtonGroup.js +37 -0
- package/build/components/ToggleButtonGroup/index.d.ts +3 -0
- package/build/components/ToggleButtonGroup/index.js +2 -0
- package/build/components/Tooltip/Tooltip.d.ts +10 -0
- package/build/components/Tooltip/Tooltip.js +44 -0
- package/build/components/Tooltip/index.d.ts +3 -0
- package/build/components/Tooltip/index.js +2 -0
- package/build/components/Warning/Warning.d.ts +2 -1
- package/build/components/Warning/Warning.js +4 -3
- package/build/components/Warning/index.js +0 -1
- package/build/constants/app.d.ts +5 -4
- package/build/constants/app.js +35 -5
- package/build/constants/assets.d.ts +7 -0
- package/build/constants/assets.js +8 -2
- package/build/constants/dummy.js +0 -1
- package/build/constants/index.d.ts +1 -0
- package/build/constants/index.js +1 -1
- package/build/constants/validation.d.ts +2 -0
- package/build/constants/validation.js +2 -0
- package/build/features/app/{midStore.d.ts → business/midStore.d.ts} +2 -2
- package/build/features/app/{midStore.js → business/midStore.js} +0 -1
- package/build/features/app/connect/midStore.d.ts +10 -0
- package/build/features/app/connect/midStore.js +18 -0
- package/build/features/business/index.d.ts +0 -0
- package/build/features/business/index.js +1 -0
- package/build/features/business/screens/IDBOD/DOB.d.ts +5 -0
- package/build/features/business/screens/IDBOD/DOB.js +44 -0
- package/build/features/business/screens/IDBOD/ID.d.ts +5 -0
- package/build/features/business/screens/IDBOD/ID.js +68 -0
- package/build/features/business/screens/IDBOD/IDBOD.d.ts +5 -0
- package/build/features/business/screens/IDBOD/IDBOD.js +86 -0
- package/build/features/business/screens/IDBOD/index.d.ts +3 -0
- package/build/features/business/screens/IDBOD/index.js +2 -0
- package/build/features/business/screens/IDBOD/validation.d.ts +11 -0
- package/build/features/business/screens/IDBOD/validation.js +5 -0
- package/build/features/connect/Connect.js +31 -25
- package/build/features/connect/Footer.d.ts +4 -0
- package/build/features/connect/Footer.js +16 -0
- package/build/features/connect/index.js +0 -1
- package/build/features/connect/screens/Individual/Email.d.ts +5 -0
- package/build/features/connect/screens/Individual/Email.js +56 -0
- package/build/features/connect/screens/Individual/Individual.d.ts +5 -0
- package/build/features/connect/screens/Individual/Individual.js +86 -0
- package/build/features/connect/screens/Individual/Name.d.ts +5 -0
- package/build/features/connect/screens/Individual/Name.js +58 -0
- package/build/features/connect/screens/Individual/index.d.ts +3 -0
- package/build/features/connect/screens/Individual/index.js +2 -0
- package/build/features/connect/screens/Individual/validation.d.ts +11 -0
- package/build/features/connect/screens/Individual/validation.js +5 -0
- package/build/features/connect/screens/MID/BusinessCountry.d.ts +2 -6
- package/build/features/connect/screens/MID/BusinessCountry.js +18 -53
- package/build/features/connect/screens/MID/IDNumber.d.ts +0 -4
- package/build/features/connect/screens/MID/IDNumber.js +28 -22
- package/build/features/connect/screens/MID/MID.js +85 -27
- package/build/features/connect/screens/MID/MIDTitle.js +3 -5
- package/build/features/connect/screens/MID/MobileNumber.d.ts +2 -7
- package/build/features/connect/screens/MID/MobileNumber.js +28 -69
- package/build/features/connect/screens/MID/index.js +0 -1
- package/build/features/connect/screens/MID/validation.d.ts +18 -0
- package/build/features/connect/screens/MID/validation.js +8 -0
- package/build/features/connect/screens/Merchant/BrandName.d.ts +5 -0
- package/build/features/connect/screens/Merchant/BrandName.js +99 -0
- package/build/features/connect/screens/Merchant/Merchant.d.ts +5 -0
- package/build/features/connect/screens/Merchant/Merchant.js +94 -0
- package/build/features/connect/screens/Merchant/SocialMedia.d.ts +5 -0
- package/build/features/connect/screens/Merchant/SocialMedia.js +87 -0
- package/build/features/connect/screens/Merchant/TAC.d.ts +5 -0
- package/build/features/connect/screens/Merchant/TAC.js +88 -0
- package/build/features/connect/screens/Merchant/index.d.ts +3 -0
- package/build/features/connect/screens/Merchant/index.js +2 -0
- package/build/features/connect/screens/Merchant/validation.d.ts +50 -0
- package/build/features/connect/screens/Merchant/validation.js +23 -0
- package/build/features/connect/screens/OTP/OTP.d.ts +6 -2
- package/build/features/connect/screens/OTP/OTP.js +76 -32
- package/build/features/connect/screens/OTP/OTPInput.d.ts +5 -0
- package/build/features/connect/screens/OTP/OTPInput.js +51 -0
- package/build/features/connect/screens/OTP/OTPTimer.d.ts +5 -0
- package/build/features/connect/screens/OTP/OTPTimer.js +35 -0
- package/build/features/connect/screens/OTP/index.js +0 -1
- package/build/features/connect/screens/OTP/validation.d.ts +8 -0
- package/build/features/connect/screens/OTP/validation.js +4 -0
- package/build/features/connect/screens/Password/Password.d.ts +5 -0
- package/build/features/connect/screens/Password/Password.js +86 -0
- package/build/features/connect/screens/Password/PasswordInput.d.ts +5 -0
- package/build/features/connect/screens/Password/PasswordInput.js +73 -0
- package/build/features/connect/screens/Password/index.d.ts +3 -0
- package/build/features/connect/screens/Password/index.js +2 -0
- package/build/features/connect/screens/Password/validation.d.ts +8 -0
- package/build/features/connect/screens/Password/validation.js +4 -0
- package/build/features/connect/screens/ThankYou/ThankYou.d.ts +5 -0
- package/build/features/connect/screens/ThankYou/ThankYou.js +76 -0
- package/build/features/connect/screens/ThankYou/index.d.ts +3 -0
- package/build/features/connect/screens/ThankYou/index.js +2 -0
- package/build/features/featuresScreens.d.ts +2 -0
- package/build/features/featuresScreens.js +28 -0
- package/build/hooks/index.d.ts +4 -0
- package/build/hooks/index.js +4 -1
- package/build/hooks/useAppDispatch.d.ts +4 -0
- package/build/hooks/useAppDispatch.js +2 -0
- package/build/hooks/useAppSelector.d.ts +3 -0
- package/build/hooks/useAppSelector.js +2 -0
- package/build/hooks/useAppTheme.js +3 -3
- package/build/hooks/useEventListener.d.ts +5 -0
- package/build/hooks/useEventListener.js +20 -0
- package/build/hooks/useLanguage.d.ts +4 -0
- package/build/hooks/useLanguage.js +8 -0
- package/build/hooks/useThemeMode.js +0 -1
- package/build/i18n.js +0 -1
- package/build/index.css +5 -0
- package/build/index.js +0 -1
- package/build/theme/components.js +0 -1
- package/build/theme/index.js +0 -1
- package/build/theme/palette.js +1 -1
- package/build/theme/shadows.js +0 -1
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/theme.js +0 -2
- package/build/theme/typography.js +0 -1
- package/build/utils/array.js +0 -1
- package/build/utils/html.js +0 -1
- package/build/utils/index.js +0 -1
- package/build/utils/object.js +0 -1
- package/build/utils/storage.js +0 -1
- package/build/utils/string.d.ts +1 -1
- package/build/utils/string.js +1 -4
- package/build/utils/style.js +0 -1
- package/build/utils/validation.d.ts +4 -0
- package/build/utils/validation.js +12 -1
- package/package.json +120 -112
- package/build/@types/app.js.map +0 -1
- package/build/@types/index.js.map +0 -1
- package/build/@types/redux.js.map +0 -1
- package/build/@types/theme.js.map +0 -1
- package/build/app/hooks.d.ts +0 -7
- package/build/app/hooks.js +0 -4
- package/build/app/hooks.js.map +0 -1
- package/build/app/rootReducer.js.map +0 -1
- package/build/app/settings.js.map +0 -1
- package/build/app/store.js.map +0 -1
- package/build/components/AnimationFlow/AnimationFlow.js.map +0 -1
- package/build/components/AnimationFlow/BottomSheet.js.map +0 -1
- package/build/components/AnimationFlow/Dialog.js.map +0 -1
- package/build/components/AnimationFlow/index.js.map +0 -1
- package/build/components/Button/Button.js.map +0 -1
- package/build/components/Button/index.js.map +0 -1
- package/build/components/CheckBox/CheckBox.js.map +0 -1
- package/build/components/CheckBox/index.js.map +0 -1
- package/build/components/DatePicker/DatePicker.js.map +0 -1
- package/build/components/DatePicker/index.js.map +0 -1
- package/build/components/Footer/Footer.js.map +0 -1
- package/build/components/Footer/index.js.map +0 -1
- package/build/components/Form/Form.js.map +0 -1
- package/build/components/Form/index.js.map +0 -1
- package/build/components/Icon/Icon.js.map +0 -1
- package/build/components/Icon/index.js.map +0 -1
- package/build/components/Input/Input.js.map +0 -1
- package/build/components/Input/index.js.map +0 -1
- package/build/components/InputAdornment/InputAdornment.js.map +0 -1
- package/build/components/InputAdornment/index.js.map +0 -1
- package/build/components/List/List.js.map +0 -1
- package/build/components/List/index.js.map +0 -1
- package/build/components/ListItem/ListItem.js.map +0 -1
- package/build/components/ListItem/index.js.map +0 -1
- package/build/components/Loader/Loader.js.map +0 -1
- package/build/components/Loader/index.js.map +0 -1
- package/build/components/LogoBadge/LogoBadge.js.map +0 -1
- package/build/components/LogoBadge/index.js.map +0 -1
- package/build/components/OTPField/OTPField.js.map +0 -1
- package/build/components/OTPField/index.js.map +0 -1
- package/build/components/OTPTimer/OTPTimer.js.map +0 -1
- package/build/components/OTPTimer/index.js.map +0 -1
- package/build/components/ProgressBar/ProgressBar.js.map +0 -1
- package/build/components/ProgressBar/index.js.map +0 -1
- package/build/components/Providers/ReduxProvider.js.map +0 -1
- package/build/components/Providers/ThemeProvider.js.map +0 -1
- package/build/components/Providers/index.js.map +0 -1
- package/build/components/SimpleList/SimpleList.js.map +0 -1
- package/build/components/SimpleList/index.js.map +0 -1
- package/build/components/Text/Text.js.map +0 -1
- package/build/components/Text/index.js.map +0 -1
- package/build/components/Warning/Warning.js.map +0 -1
- package/build/components/Warning/index.js.map +0 -1
- package/build/constants/app.js.map +0 -1
- package/build/constants/assets.js.map +0 -1
- package/build/constants/dummy.js.map +0 -1
- package/build/constants/index.js.map +0 -1
- package/build/features/app/midStore.js.map +0 -1
- package/build/features/connect/Connect.js.map +0 -1
- package/build/features/connect/index.js.map +0 -1
- package/build/features/connect/screens/MID/BusinessCountry.js.map +0 -1
- package/build/features/connect/screens/MID/IDNumber.js.map +0 -1
- package/build/features/connect/screens/MID/MID.js.map +0 -1
- package/build/features/connect/screens/MID/MIDTitle.js.map +0 -1
- package/build/features/connect/screens/MID/MobileNumber.js.map +0 -1
- package/build/features/connect/screens/MID/index.js.map +0 -1
- package/build/features/connect/screens/OTP/OTP.js.map +0 -1
- package/build/features/connect/screens/OTP/index.js.map +0 -1
- package/build/hooks/index.js.map +0 -1
- package/build/hooks/useAppTheme.js.map +0 -1
- package/build/hooks/useThemeMode.js.map +0 -1
- package/build/i18n.js.map +0 -1
- package/build/index.js.map +0 -1
- package/build/theme/components.js.map +0 -1
- package/build/theme/index.js.map +0 -1
- package/build/theme/palette.js.map +0 -1
- package/build/theme/shadows.js.map +0 -1
- package/build/theme/theme.js.map +0 -1
- package/build/theme/typography.js.map +0 -1
- package/build/utils/array.js.map +0 -1
- package/build/utils/html.js.map +0 -1
- package/build/utils/index.js.map +0 -1
- package/build/utils/object.js.map +0 -1
- package/build/utils/storage.js.map +0 -1
- package/build/utils/string.js.map +0 -1
- package/build/utils/style.js.map +0 -1
- package/build/utils/validation.js.map +0 -1
|
@@ -15,10 +15,16 @@ export var ICONS_NAMES = {
|
|
|
15
15
|
DOWN_ARROW_ICON_DARK: ICONS_FULL_PATH + '/popup_arrow_dark' + ICONS_EXTENSION,
|
|
16
16
|
CLEAR_ICON: ICONS_FULL_PATH + '/clear' + ICONS_EXTENSION,
|
|
17
17
|
LOGO_ICON: ICONS_FULL_PATH + '/tap_logo_icon' + ICONS_EXTENSION,
|
|
18
|
+
WEB_ICON: ICONS_FULL_PATH + '/web' + ICONS_EXTENSION,
|
|
19
|
+
WEB_ACTIVE_ICON: ICONS_FULL_PATH + '/web-active' + ICONS_EXTENSION,
|
|
20
|
+
TWITTER_ICON: ICONS_FULL_PATH + '/twitter' + ICONS_EXTENSION,
|
|
21
|
+
TWITTER_ACTIVE_ICON: ICONS_FULL_PATH + '/twitter-active' + ICONS_EXTENSION,
|
|
22
|
+
INSTAGRAM_ICON: ICONS_FULL_PATH + '/Insta' + ICONS_EXTENSION,
|
|
23
|
+
INSTAGRAM_ACTIVE_ICON: ICONS_FULL_PATH + '/Insta-active' + ICONS_EXTENSION,
|
|
18
24
|
TAP_EN: 'https://tap-connecet.b-cdn.net/imgs/tapEN' + ICONS_EXTENSION,
|
|
19
25
|
TAP_AR: 'https://tap-connecet.b-cdn.net/imgs/tapAR' + ICONS_EXTENSION,
|
|
20
26
|
ID_IMAGE: 'https://villageofwarwick.org/wp-content/uploads/2020/02/ICON99-512-1.png',
|
|
21
27
|
MOBILE_IMAGE: 'https://image.shutterstock.com/image-vector/smartphone-icon-logo-260nw-767440327.jpg',
|
|
22
|
-
WHITE_ARROW: 'https://tap-connecet.b-cdn.net/imgs/whiteArrow.svg'
|
|
28
|
+
WHITE_ARROW: 'https://tap-connecet.b-cdn.net/imgs/whiteArrow.svg',
|
|
29
|
+
SUCCESS: 'https://tap-connecet.b-cdn.net/imgs/success.svg'
|
|
23
30
|
};
|
|
24
|
-
//# sourceMappingURL=assets.js.map
|
package/build/constants/dummy.js
CHANGED
package/build/constants/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RootState } from '
|
|
2
|
-
import { SharedState } from '
|
|
1
|
+
import { RootState } from '../../../app/store';
|
|
2
|
+
import { SharedState } from '../../../@types';
|
|
3
3
|
export interface MIDData {
|
|
4
4
|
}
|
|
5
5
|
export interface MIDState extends SharedState<MIDData> {
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,18 @@
|
|
|
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; };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,44 @@
|
|
|
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 DatePicker from '../../../../components/DatePicker';
|
|
20
|
+
var BoxStyled = styled(Box)(function () { return ({
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flexDirection: 'column'
|
|
23
|
+
}); });
|
|
24
|
+
var InputLabelStyled = styled(Text)(function (_a) {
|
|
25
|
+
var theme = _a.theme;
|
|
26
|
+
return ({
|
|
27
|
+
color: alpha(theme.palette.text.primary, 0.4),
|
|
28
|
+
fontSize: theme.spacing(1.5),
|
|
29
|
+
cursor: 'pointer'
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
var BOD = function (_a) {
|
|
33
|
+
var t = useTranslation().t;
|
|
34
|
+
var control = useFormContext().control;
|
|
35
|
+
var dobControl = useController({ control: control, name: 'dob' });
|
|
36
|
+
var handleBirthDateChange = function (data) {
|
|
37
|
+
dobControl.field.onChange(data);
|
|
38
|
+
};
|
|
39
|
+
return (_jsxs(BoxStyled, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
40
|
+
var spacing = _a.spacing;
|
|
41
|
+
return spacing(2.5, 2.5, 1.5, 2.5);
|
|
42
|
+
} } }, { children: t('date_of_birth') })), _jsx(DatePicker, { defaultValue: new Date('2000-01-01'), readOnly: true, locale: 'en', onDateChange: handleBirthDateChange })] }));
|
|
43
|
+
};
|
|
44
|
+
export default React.memo(BOD);
|
|
@@ -0,0 +1,68 @@
|
|
|
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 Input from '../../../../components/Input';
|
|
20
|
+
import ClearIcon from '@mui/icons-material/Clear';
|
|
21
|
+
import { removeAllCharsFromNumber } from '../../../../utils';
|
|
22
|
+
import { ID_NUMBER_LENGTH } from '../../../../constants';
|
|
23
|
+
var BoxStyled = styled(Box)(function () { return ({
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'column'
|
|
26
|
+
}); });
|
|
27
|
+
var InputLabelStyled = styled(Text)(function (_a) {
|
|
28
|
+
var theme = _a.theme;
|
|
29
|
+
return ({
|
|
30
|
+
color: alpha(theme.palette.text.primary, 0.4),
|
|
31
|
+
fontSize: theme.spacing(1.5)
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
var InputStyled = styled(Input)(function (_a) {
|
|
35
|
+
var theme = _a.theme;
|
|
36
|
+
return ({
|
|
37
|
+
padding: theme.spacing(0, 2, 0, 0)
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
var ClearIconStyled = styled(ClearIcon)(function (_a) {
|
|
41
|
+
var theme = _a.theme;
|
|
42
|
+
return ({
|
|
43
|
+
width: theme.spacing(2),
|
|
44
|
+
height: theme.spacing(2),
|
|
45
|
+
cursor: 'pointer',
|
|
46
|
+
color: alpha(theme.palette.text.primary, 0.4)
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
var IDNumber = function (_a) {
|
|
50
|
+
var _b;
|
|
51
|
+
var t = useTranslation().t;
|
|
52
|
+
var control = useFormContext().control;
|
|
53
|
+
var nidControl = useController({ control: control, name: 'nid' });
|
|
54
|
+
var handleIdChange = function (_a) {
|
|
55
|
+
var target = _a.target;
|
|
56
|
+
var value = removeAllCharsFromNumber(target.value);
|
|
57
|
+
nidControl.field.onChange(value);
|
|
58
|
+
};
|
|
59
|
+
var clearIdNumber = function () {
|
|
60
|
+
nidControl.field.onChange('');
|
|
61
|
+
};
|
|
62
|
+
var nidValue = nidControl.field.value;
|
|
63
|
+
return (_jsxs(BoxStyled, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
|
|
64
|
+
var spacing = _a.spacing;
|
|
65
|
+
return spacing(2.5, 2.5, 1.5, 2.5);
|
|
66
|
+
} } }, { children: t('id_number_label') })), _jsx(InputStyled, { inputProps: { maxLength: ID_NUMBER_LENGTH }, onChange: handleIdChange, value: nidValue, endAdornment: nidValue && _jsx(ClearIconStyled, { onClick: clearIdNumber }), placeholder: '0000000000', warningType: 'alert', warningMessage: (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message })] }));
|
|
67
|
+
};
|
|
68
|
+
export default React.memo(IDNumber);
|
|
@@ -0,0 +1,86 @@
|
|
|
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 { styled } from '@mui/material/styles';
|
|
17
|
+
import ID from './ID';
|
|
18
|
+
import DOB from './DOB';
|
|
19
|
+
import { useForm, FormProvider } from 'react-hook-form';
|
|
20
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
21
|
+
import { NIDValidationSchema } from './validation';
|
|
22
|
+
import Loader from '../../../../components/Loader';
|
|
23
|
+
import { ICONS_NAMES } from '../../../../constants';
|
|
24
|
+
import Button from '../../../../components/Button';
|
|
25
|
+
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
26
|
+
import Icon from '../../../../components/Icon';
|
|
27
|
+
import Form from '../../../../components/Form';
|
|
28
|
+
import { handleNextScreenStep, settingsSelector } from '../../../../app/settings';
|
|
29
|
+
var BoxStyled = styled(Box)(function (_a) {
|
|
30
|
+
var theme = _a.theme;
|
|
31
|
+
return ({
|
|
32
|
+
direction: theme.direction,
|
|
33
|
+
display: 'flex',
|
|
34
|
+
flexDirection: 'column',
|
|
35
|
+
overflow: 'hidden'
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
39
|
+
var theme = _a.theme, isAr = _a.isAr;
|
|
40
|
+
return ({
|
|
41
|
+
width: theme.spacing(3),
|
|
42
|
+
height: theme.spacing(3),
|
|
43
|
+
paddingInlineStart: theme.spacing(1.5),
|
|
44
|
+
paddingInlineEnd: theme.spacing(0.5),
|
|
45
|
+
transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
var ButtonContainer = styled(Box)(function (_a) {
|
|
49
|
+
var theme = _a.theme;
|
|
50
|
+
return ({
|
|
51
|
+
margin: theme.spacing(2.5)
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
var LoaderStyled = styled(Loader)(function (_a) {
|
|
55
|
+
var theme = _a.theme;
|
|
56
|
+
return ({
|
|
57
|
+
marginInlineStart: theme.spacing(-6.25),
|
|
58
|
+
'& .loader-box-container': {
|
|
59
|
+
marginInlineStart: theme.spacing(2.5)
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
var FormStyled = styled(Form)(function () { return ({
|
|
64
|
+
display: 'flex',
|
|
65
|
+
flexDirection: 'column'
|
|
66
|
+
}); });
|
|
67
|
+
var IDBOD = function (_a) {
|
|
68
|
+
var isAr = useLanguage().isAr;
|
|
69
|
+
var dispatch = useAppDispatch();
|
|
70
|
+
var settingStore = useAppSelector(settingsSelector);
|
|
71
|
+
var _b = useTranslation(), t = _b.t, i18n = _b.i18n;
|
|
72
|
+
var methods = useForm({
|
|
73
|
+
resolver: yupResolver(NIDValidationSchema),
|
|
74
|
+
defaultValues: {
|
|
75
|
+
nid: '',
|
|
76
|
+
dob: ''
|
|
77
|
+
},
|
|
78
|
+
mode: 'onChange'
|
|
79
|
+
});
|
|
80
|
+
var onSubmit = function (data) {
|
|
81
|
+
console.log('data', data);
|
|
82
|
+
dispatch(handleNextScreenStep(settingStore.data.activeScreen));
|
|
83
|
+
};
|
|
84
|
+
return (_jsx(BoxStyled, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(ID, {}), _jsx(DOB, {}), _jsx(ButtonContainer, { children: _jsx(Button, __assign({ disabled: !methods.formState.isValid, type: 'submit', startIcon: _jsx(LoaderStyled, { innerColor: 'white', outerColor: 'white', size: 30 }), endIcon: _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, { children: t('next') })) })] })) })) }));
|
|
85
|
+
};
|
|
86
|
+
export default React.memo(IDBOD);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as yup from 'yup';
|
|
2
|
+
export declare const NIDValidationSchema: yup.ObjectSchema<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
3
|
+
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
4
|
+
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
5
|
+
}>, import("yup/lib/object").AnyObject, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
6
|
+
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
7
|
+
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
8
|
+
}>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
|
|
9
|
+
dob: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
10
|
+
nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
|
|
11
|
+
}>>>;
|
|
@@ -9,46 +9,52 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import React, { Fragment, memo, useEffect } from 'react';
|
|
14
14
|
import { styled } from '@mui/material/styles';
|
|
15
15
|
import Box from '@mui/material/Box';
|
|
16
|
-
import
|
|
16
|
+
import Footer from './Footer';
|
|
17
|
+
import { useAppTheme, useAppDispatch, useAppSelector } from '../../hooks';
|
|
18
|
+
import { handleActiveFlowScreens, settingsSelector } from '../../app/settings';
|
|
17
19
|
import AnimationFlow from '../../components/AnimationFlow';
|
|
18
20
|
import { store } from '../../app/store';
|
|
19
21
|
import { ReduxProvider, ThemeProvider } from '../../components/Providers';
|
|
22
|
+
import Loader from '../../components/Loader';
|
|
20
23
|
import { reactElement } from '../../utils';
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
var Container = styled(Box)(function () {
|
|
24
|
-
|
|
25
|
-
}); });
|
|
26
|
-
var FooterStyled = styled(Footer)(function (_a) {
|
|
24
|
+
import { CONNECT_SCREENS_NAVIGATION } from '../../constants';
|
|
25
|
+
import { connectFeatureScreens } from '../featuresScreens';
|
|
26
|
+
var Container = styled(Box)(function (_a) {
|
|
27
|
+
var _b;
|
|
27
28
|
var theme = _a.theme;
|
|
28
|
-
return ({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
return (_b = {
|
|
30
|
+
width: '100%'
|
|
31
|
+
},
|
|
32
|
+
_b[theme.transitions.create('height')] = {
|
|
33
|
+
duration: theme.transitions.duration.enteringScreen
|
|
34
|
+
},
|
|
35
|
+
_b);
|
|
33
36
|
});
|
|
34
37
|
var Connect = memo(function (props) {
|
|
35
|
-
var theme = useAppTheme().theme;
|
|
36
|
-
var t = useTranslation().t;
|
|
37
38
|
var open = React.useState(true)[0];
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
var theme = useAppTheme().theme;
|
|
40
|
+
var dispatch = useAppDispatch();
|
|
41
|
+
var data = useAppSelector(settingsSelector).data;
|
|
42
|
+
var activeScreen = data.activeScreen;
|
|
43
|
+
useEffect(function () {
|
|
44
|
+
dispatch(handleActiveFlowScreens(CONNECT_SCREENS_NAVIGATION));
|
|
45
|
+
}, []);
|
|
46
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(AnimationFlow, __assign({ open: open, breakpoint: 'sm', footer: _jsx(Footer, {}) }, { children: _jsx(Container, { children: connectFeatureScreens.map(function (_a, index) {
|
|
47
|
+
var Element = _a.element, name = _a.name;
|
|
48
|
+
var isActive = activeScreen.name === name;
|
|
49
|
+
return (_jsx(React.Suspense, __assign({ fallback: _jsx(Loader, {}) }, { children: _jsx(Fragment, { children: isActive && _jsx(Element, {}) }) }), index));
|
|
50
|
+
}) }) })) })));
|
|
43
51
|
});
|
|
44
52
|
export function ConnectLib(props) {
|
|
45
|
-
return (
|
|
46
|
-
React.createElement(Connect, __assign({}, props))));
|
|
53
|
+
return (_jsx(ReduxProvider, __assign({ store: store }, { children: _jsx(Connect, __assign({}, props)) })));
|
|
47
54
|
}
|
|
48
55
|
export function renderConnectLib(config, elementId) {
|
|
49
|
-
reactElement(elementId).render(
|
|
56
|
+
reactElement(elementId).render(_jsx(ConnectLib, __assign({}, config)));
|
|
50
57
|
}
|
|
51
58
|
export function unmountConnectLib(elementId) {
|
|
52
59
|
reactElement(elementId).unmount();
|
|
53
60
|
}
|
|
54
|
-
//# sourceMappingURL=Connect.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { styled } from '@mui/material/styles';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import FooterComponent from '../../components/Footer';
|
|
5
|
+
var FooterStyled = styled(FooterComponent)(function (_a) {
|
|
6
|
+
var theme = _a.theme;
|
|
7
|
+
return ({
|
|
8
|
+
position: 'relative',
|
|
9
|
+
bottom: 0,
|
|
10
|
+
marginBottom: theme.spacing(-3.75)
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
export default function Footer() {
|
|
14
|
+
var t = useTranslation().t;
|
|
15
|
+
return _jsx(FooterStyled, { onSwitchLanguage: function () { }, followUsTitle: t('follow_us'), language: t('language') });
|
|
16
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 Box from '@mui/material/Box/Box';
|
|
14
|
+
import { alpha, styled } from '@mui/material/styles';
|
|
15
|
+
import * as React from 'react';
|
|
16
|
+
import { useTranslation } from 'react-i18next';
|
|
17
|
+
import Text from '../../../../components/Text';
|
|
18
|
+
import Input from '../../../../components/Input';
|
|
19
|
+
import { keepEmailCharacters } from '../../../../utils';
|
|
20
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
21
|
+
var BoxStyled = styled(Box)(function (_a) {
|
|
22
|
+
var theme = _a.theme;
|
|
23
|
+
return ({
|
|
24
|
+
direction: theme.direction
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
28
|
+
var theme = _a.theme;
|
|
29
|
+
return ({
|
|
30
|
+
padding: theme.spacing(3, 2, 1.25, 2.5)
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
var InputLabelStyled = styled(Text)(function (_a) {
|
|
34
|
+
var theme = _a.theme;
|
|
35
|
+
return (__assign({ color: alpha(theme.palette.text.primary, 0.4) }, theme.typography.caption));
|
|
36
|
+
});
|
|
37
|
+
var InputStyled = styled(Input)(function (_a) {
|
|
38
|
+
var theme = _a.theme;
|
|
39
|
+
return ({
|
|
40
|
+
padding: theme.spacing(0, 2, 0, 0),
|
|
41
|
+
direction: theme.direction
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
var Email = React.forwardRef(function (_a, ref) {
|
|
45
|
+
var _b;
|
|
46
|
+
var t = useTranslation().t;
|
|
47
|
+
var control = useFormContext().control;
|
|
48
|
+
var emailControl = useController({ name: 'email', control: control });
|
|
49
|
+
var handleEmailChange = function (event) {
|
|
50
|
+
var value = keepEmailCharacters(event.target.value);
|
|
51
|
+
emailControl.field.onChange(value);
|
|
52
|
+
};
|
|
53
|
+
var emailValue = emailControl.field.value;
|
|
54
|
+
return (_jsxs(BoxStyled, __assign({ ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('signup_enter_email') }) }), _jsx(InputStyled, { value: emailValue, onChange: handleEmailChange, type: 'email', placeholder: t('signin_email_placeholder'), warningType: 'alert', warningMessage: (_b = emailControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message })] })));
|
|
55
|
+
});
|
|
56
|
+
export default React.memo(Email);
|
|
@@ -0,0 +1,86 @@
|
|
|
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 Box from '@mui/material/Box/Box';
|
|
14
|
+
import { styled } from '@mui/material/styles';
|
|
15
|
+
import Email from './Email';
|
|
16
|
+
import Name from './Name';
|
|
17
|
+
import * as React from 'react';
|
|
18
|
+
import { useTranslation } from 'react-i18next';
|
|
19
|
+
import { useForm, FormProvider } from 'react-hook-form';
|
|
20
|
+
import { yupResolver } from '@hookform/resolvers/yup';
|
|
21
|
+
import Icon from '../../../../components/Icon';
|
|
22
|
+
import { useAppDispatch, useAppSelector } from '../../../../hooks';
|
|
23
|
+
import { handleNextScreenStep, settingsSelector } from '../../../../app/settings';
|
|
24
|
+
import { IndividualValidation } from './validation';
|
|
25
|
+
import Form from '../../../../components/Form';
|
|
26
|
+
import Button from '../../../../components/Button';
|
|
27
|
+
import { ICONS_NAMES } from '../../../../constants/assets';
|
|
28
|
+
import Loader from '../../../../components/Loader';
|
|
29
|
+
import { useLanguage } from '../../../../hooks';
|
|
30
|
+
var BoxStyled = styled(Box)(function (_a) {
|
|
31
|
+
var theme = _a.theme;
|
|
32
|
+
return ({
|
|
33
|
+
padding: theme.spacing(2.5, 0, 2.5, 0),
|
|
34
|
+
overflow: 'hidden',
|
|
35
|
+
direction: theme.direction
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
var FormStyled = styled(Form)(function () { return ({
|
|
39
|
+
display: 'flex',
|
|
40
|
+
flexDirection: 'column'
|
|
41
|
+
}); });
|
|
42
|
+
var ButtonContainer = styled(Box)(function (_a) {
|
|
43
|
+
var theme = _a.theme;
|
|
44
|
+
return ({
|
|
45
|
+
margin: theme.spacing(2.5, 2.5, 0, 2.5)
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'isAr'; } })(function (_a) {
|
|
49
|
+
var theme = _a.theme, isAr = _a.isAr;
|
|
50
|
+
return ({
|
|
51
|
+
width: theme.spacing(3),
|
|
52
|
+
height: theme.spacing(3),
|
|
53
|
+
paddingInlineStart: theme.spacing(1.5),
|
|
54
|
+
paddingInlineEnd: theme.spacing(0.5),
|
|
55
|
+
transform: isAr ? 'scaleX(-1)' : 'scaleX(1)'
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
var LoaderStyled = styled(Loader)(function (_a) {
|
|
59
|
+
var theme = _a.theme;
|
|
60
|
+
return ({
|
|
61
|
+
marginInlineStart: theme.spacing(-6.25),
|
|
62
|
+
'& .loader-box-container': {
|
|
63
|
+
marginInlineStart: theme.spacing(2.5)
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
var Individual = function (_a) {
|
|
68
|
+
var dispatch = useAppDispatch();
|
|
69
|
+
var settingStore = useAppSelector(settingsSelector);
|
|
70
|
+
var methods = useForm({
|
|
71
|
+
resolver: yupResolver(IndividualValidation),
|
|
72
|
+
defaultValues: {
|
|
73
|
+
name: '',
|
|
74
|
+
email: ''
|
|
75
|
+
},
|
|
76
|
+
mode: 'onChange'
|
|
77
|
+
});
|
|
78
|
+
var onSubmit = function (data) {
|
|
79
|
+
console.log('data', data);
|
|
80
|
+
dispatch(handleNextScreenStep(settingStore.data.activeScreen));
|
|
81
|
+
};
|
|
82
|
+
var t = useTranslation().t;
|
|
83
|
+
var isAr = useLanguage().isAr;
|
|
84
|
+
return (_jsx(BoxStyled, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Name, {}), _jsx(Email, {}), _jsx(ButtonContainer, { children: _jsx(Button, __assign({ disabled: !methods.formState.isValid, type: 'submit', startIcon: _jsx(LoaderStyled, { innerColor: 'white', outerColor: 'white', size: 30, toggleAnimation: false }), endIcon: _jsx(IconStyled, { isAr: isAr, src: ICONS_NAMES.WHITE_ARROW }) }, { children: t('next') })) })] })) })) }));
|
|
85
|
+
};
|
|
86
|
+
export default React.memo(Individual);
|