@tap-payments/auth-jsconnect 2.8.74-development → 2.8.75-beta

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.
Files changed (104) hide show
  1. package/build/@types/form.d.ts +1 -1
  2. package/build/api/auth.d.ts +0 -13
  3. package/build/api/index.d.ts +2 -2
  4. package/build/api/lead.d.ts +0 -6
  5. package/build/assets/locales/ar.json +1 -10
  6. package/build/assets/locales/en.json +1 -10
  7. package/build/components/Tooltip/Tooltip.js +1 -1
  8. package/build/constants/api.d.ts +1 -0
  9. package/build/constants/api.js +2 -0
  10. package/build/constants/app.d.ts +2 -1
  11. package/build/constants/app.js +14 -35
  12. package/build/constants/assets.d.ts +0 -2
  13. package/build/constants/assets.js +0 -2
  14. package/build/features/app/auth/authStore.d.ts +15 -5
  15. package/build/features/app/auth/authStore.js +113 -58
  16. package/build/features/app/business/businessStore.d.ts +11 -16
  17. package/build/features/app/business/businessStore.js +44 -58
  18. package/build/features/app/connect/connectStore.d.ts +12 -19
  19. package/build/features/app/connect/connectStore.js +82 -151
  20. package/build/features/app/connectExpress/connectExpressStore.d.ts +33 -10
  21. package/build/features/app/connectExpress/connectExpressStore.js +251 -156
  22. package/build/features/app/individual/individualStore.js +2 -4
  23. package/build/features/auth/screens/AuthSwitch/AuthSwitch.js +2 -2
  24. package/build/features/auth/screens/NID/DOB.d.ts +6 -0
  25. package/build/features/auth/screens/NID/DOB.js +47 -0
  26. package/build/features/auth/screens/NID/IDNumber.js +1 -1
  27. package/build/features/auth/screens/NID/NID.js +10 -4
  28. package/build/features/auth/screens/NID/validation.d.ts +3 -0
  29. package/build/features/auth/screens/NID/validation.js +1 -0
  30. package/build/features/auth/screens/OTP/OTP.js +5 -1
  31. package/build/features/auth/screens/OTP/OTPInput.js +13 -2
  32. package/build/features/business/screens/OTP/OTP.d.ts +8 -0
  33. package/build/features/business/screens/OTP/OTP.js +90 -0
  34. package/build/features/business/screens/OTP/OTPInput.d.ts +5 -0
  35. package/build/features/business/screens/OTP/OTPInput.js +49 -0
  36. package/build/features/business/screens/OTP/index.d.ts +3 -0
  37. package/build/features/business/screens/OTP/index.js +2 -0
  38. package/build/features/business/screens/OTP/validation.d.ts +8 -0
  39. package/build/features/business/screens/OTP/validation.js +4 -0
  40. package/build/features/connect/screens/Mobile/Mobile.js +2 -2
  41. package/build/features/connect/screens/NID/DOB.d.ts +5 -0
  42. package/build/features/connect/screens/NID/DOB.js +47 -0
  43. package/build/features/connect/screens/NID/IDNumber.d.ts +0 -1
  44. package/build/features/connect/screens/NID/IDNumber.js +2 -2
  45. package/build/features/connect/screens/NID/NID.js +11 -5
  46. package/build/features/connect/screens/NID/validation.d.ts +3 -0
  47. package/build/features/connect/screens/NID/validation.js +1 -0
  48. package/build/features/connect/screens/OTP/OTPInput.js +11 -3
  49. package/build/features/{auth/screens/VerifyNafath/VerifyNafath.d.ts → connectExpress/screens/IdentityOTP/OTP.d.ts} +2 -2
  50. package/build/features/connectExpress/screens/IdentityOTP/OTP.js +88 -0
  51. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.d.ts +5 -0
  52. package/build/features/connectExpress/screens/IdentityOTP/OTPInput.js +56 -0
  53. package/build/features/connectExpress/screens/IdentityOTP/index.d.ts +3 -0
  54. package/build/features/connectExpress/screens/IdentityOTP/index.js +2 -0
  55. package/build/features/connectExpress/screens/IdentityOTP/validation.d.ts +8 -0
  56. package/build/features/connectExpress/screens/IdentityOTP/validation.js +4 -0
  57. package/build/features/connectExpress/screens/Mobile/Mobile.js +2 -2
  58. package/build/features/connectExpress/screens/NID/DOB.d.ts +6 -0
  59. package/build/features/connectExpress/screens/NID/DOB.js +47 -0
  60. package/build/features/connectExpress/screens/NID/IDNumber.d.ts +0 -1
  61. package/build/features/connectExpress/screens/NID/IDNumber.js +2 -2
  62. package/build/features/connectExpress/screens/NID/NID.js +9 -4
  63. package/build/features/connectExpress/screens/NID/validation.d.ts +3 -0
  64. package/build/features/connectExpress/screens/NID/validation.js +2 -0
  65. package/build/features/connectExpress/screens/NIDMissed/NID.js +2 -2
  66. package/build/features/connectExpress/screens/OTP/OTP.js +13 -5
  67. package/build/features/connectExpress/screens/OTP/OTPInput.js +11 -3
  68. package/build/features/entity/screens/EntityName/LicenseNumber.js +2 -2
  69. package/build/features/featuresScreens.js +6 -21
  70. package/build/features/shared/Button/AbsherButton.d.ts +7 -0
  71. package/build/features/shared/Button/{NafathButton.js → AbsherButton.js} +3 -13
  72. package/build/features/shared/Button/index.d.ts +2 -2
  73. package/build/features/shared/Button/index.js +2 -2
  74. package/build/theme/palette.js +1 -2
  75. package/build/utils/common.js +4 -4
  76. package/package.json +2 -2
  77. package/build/features/auth/screens/VerifyNafath/VerifyNafath.js +0 -34
  78. package/build/features/auth/screens/VerifyNafath/index.d.ts +0 -3
  79. package/build/features/auth/screens/VerifyNafath/index.js +0 -2
  80. package/build/features/business/screens/VerifyNafath/VerifyNafath.d.ts +0 -5
  81. package/build/features/business/screens/VerifyNafath/VerifyNafath.js +0 -34
  82. package/build/features/business/screens/VerifyNafath/index.d.ts +0 -3
  83. package/build/features/business/screens/VerifyNafath/index.js +0 -2
  84. package/build/features/connect/screens/VerifyNafath/VerifyNafath.d.ts +0 -5
  85. package/build/features/connect/screens/VerifyNafath/VerifyNafath.js +0 -34
  86. package/build/features/connect/screens/VerifyNafath/index.d.ts +0 -3
  87. package/build/features/connect/screens/VerifyNafath/index.js +0 -2
  88. package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.d.ts +0 -5
  89. package/build/features/connectExpress/screens/IdentityVerifyNafath/IdentityVerifyNafath.js +0 -34
  90. package/build/features/connectExpress/screens/IdentityVerifyNafath/index.d.ts +0 -3
  91. package/build/features/connectExpress/screens/IdentityVerifyNafath/index.js +0 -2
  92. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.d.ts +0 -5
  93. package/build/features/connectExpress/screens/VerifyNafath/VerifyNafath.js +0 -34
  94. package/build/features/connectExpress/screens/VerifyNafath/index.d.ts +0 -3
  95. package/build/features/connectExpress/screens/VerifyNafath/index.js +0 -2
  96. package/build/features/shared/Button/NafathButton.d.ts +0 -7
  97. package/build/features/shared/NafathVerification/NafathVerification.d.ts +0 -13
  98. package/build/features/shared/NafathVerification/NafathVerification.js +0 -92
  99. package/build/features/shared/NafathVerification/VerifyNafathLoading.d.ts +0 -8
  100. package/build/features/shared/NafathVerification/VerifyNafathLoading.js +0 -53
  101. package/build/features/shared/NafathVerification/VerifyNafathSuccess.d.ts +0 -5
  102. package/build/features/shared/NafathVerification/VerifyNafathSuccess.js +0 -8
  103. package/build/features/shared/NafathVerification/index.d.ts +0 -2
  104. package/build/features/shared/NafathVerification/index.js +0 -2
@@ -0,0 +1,88 @@
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 * as React from 'react';
16
+ import { useTranslation } from 'react-i18next';
17
+ import Text from '../../../../components/Text';
18
+ import { clearError, connectExpressSelector, resetOTPValue, verifyNIDOtpLeadIdentityAsync } from '../../../app/connectExpress/connectExpressStore';
19
+ import Button from '../../../shared/Button';
20
+ import { ScreenContainer } from '../../../shared/Containers';
21
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
22
+ import { handlePrevScreenStep } from '../../../../app/settings';
23
+ import { useLanguage } from '../../../../hooks';
24
+ import { AuthForType } from '../../../../@types';
25
+ import { useForm, FormProvider } from 'react-hook-form';
26
+ import { yupResolver } from '@hookform/resolvers/yup';
27
+ import Form from '../../../../components/Form';
28
+ import { maskPhone, maskID, deepCopy, sendCustomEventToGTM } from '../../../../utils';
29
+ import { OTPValidation } from './validation';
30
+ import OTPInput from './OTPInput';
31
+ var OTPTitleContainerStyled = styled(Box)(function (_a) {
32
+ var theme = _a.theme;
33
+ return ({
34
+ background: theme.palette.common.white,
35
+ border: '1px solid',
36
+ borderColor: theme.palette.divider,
37
+ direction: theme.direction,
38
+ borderRadius: theme.spacing(0, 0, 1.25, 1.25),
39
+ marginBottom: theme.spacing(5.75)
40
+ });
41
+ });
42
+ var OTPTitleStyled = styled(Text)(function (_a) {
43
+ var theme = _a.theme;
44
+ return (__assign(__assign({}, theme.typography.body1), { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightLight, marginBlock: theme.spacing(1.75), marginInline: theme.spacing(2.5), lineHeight: 1.75, whiteSpace: 'pre-line' }));
45
+ });
46
+ var FormStyled = styled(Form)(function () { return ({
47
+ display: 'flex',
48
+ flexDirection: 'column'
49
+ }); });
50
+ var OTP = function () {
51
+ var _a;
52
+ var dispatch = useAppDispatch();
53
+ var _b = useAppSelector(connectExpressSelector), data = _b.data, loading = _b.loading, error = _b.error;
54
+ var t = useTranslation().t;
55
+ var isAr = useLanguage().isAr;
56
+ var methods = useForm({
57
+ resolver: yupResolver(OTPValidation),
58
+ defaultValues: data.otpData,
59
+ mode: 'onChange'
60
+ });
61
+ var isNidAuth = data.otpData.authFor === AuthForType.NATIONAL_ID_MISSED;
62
+ React.useEffect(function () {
63
+ if (error)
64
+ dispatch(clearError());
65
+ }, [methods.formState.isValid]);
66
+ React.useEffect(function () {
67
+ sendCustomEventToGTM({
68
+ event: 'Send Event',
69
+ event_category: 'User Registration Flow',
70
+ event_action: 'Absher OTP Page Viewed'
71
+ });
72
+ return function () {
73
+ dispatch(resetOTPValue());
74
+ };
75
+ }, []);
76
+ var onSubmit = function (formData) {
77
+ dispatch(verifyNIDOtpLeadIdentityAsync(deepCopy(formData)));
78
+ };
79
+ var onBack = function () {
80
+ dispatch(handlePrevScreenStep());
81
+ };
82
+ var disabled = !methods.formState.isValid;
83
+ var phone = data.mobileData.mobile ? ((_a = data.mobileData.countryCode) === null || _a === void 0 ? void 0 : _a.idd_prefix) + data.mobileData.mobile : '';
84
+ var idNumber = data.nidData.nid;
85
+ var title = isNidAuth ? t('opt_nid_sent_title', { provider: 'ABSHER' }) : t('ide_opt_sent_title');
86
+ 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') : title, !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: isNidAuth ? maskID(idNumber) : maskPhone(phone) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
87
+ };
88
+ export default React.memo(OTP);
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export interface OTPProps {
3
+ }
4
+ declare const _default: React.MemoExoticComponent<({}: OTPProps) => import("react/jsx-runtime").JSX.Element>;
5
+ export default _default;
@@ -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 } from "react/jsx-runtime";
13
+ import * as React from 'react';
14
+ import { useController, useFormContext } from 'react-hook-form';
15
+ import { useTranslation } from 'react-i18next';
16
+ import Box from '@mui/material/Box/Box';
17
+ import { styled } from '@mui/material/styles';
18
+ import OTPField from '../../../shared/OTP';
19
+ import { DEFAULT_TIMER_VALUE } from '../../../../constants';
20
+ import { resendNIDAuthIdentityOTP, connectExpressSelector, clearError } from '../../../app/connectExpress/connectExpressStore';
21
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
22
+ import { sendCustomEventToGTM } from '../../../../utils';
23
+ var BoxStyled = styled(Box)(function (_a) {
24
+ var theme = _a.theme;
25
+ return ({
26
+ display: 'flex',
27
+ flexDirection: 'column',
28
+ fontFamily: theme.typography.fontFamily
29
+ });
30
+ });
31
+ var OTPInput = function (_a) {
32
+ var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
33
+ var t = useTranslation().t;
34
+ var dispatch = useAppDispatch();
35
+ var otpControl = useController({ name: 'otp', control: control });
36
+ var _c = useAppSelector(connectExpressSelector), data = _c.data, error = _c.error;
37
+ var nidData = data.nidData;
38
+ var handleOnOTPChange = function (otp) {
39
+ if (error)
40
+ dispatch(clearError());
41
+ otpControl.field.onChange(otp);
42
+ };
43
+ var handleOnResendAbsherOTP = function () {
44
+ if (otpControl.field.value)
45
+ setValue('otp', '', { shouldValidate: true });
46
+ sendCustomEventToGTM({
47
+ event: 'Send Event',
48
+ event_category: 'User Registration Flow',
49
+ event_action: 'Another Absher OTP asked'
50
+ });
51
+ dispatch(resendNIDAuthIdentityOTP(nidData));
52
+ };
53
+ var otpValue = otpControl.field.value;
54
+ return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendAbsherOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
55
+ };
56
+ export default React.memo(OTPInput);
@@ -0,0 +1,3 @@
1
+ import OTP, { OTPProps } from './OTP';
2
+ export type { OTPProps };
3
+ export default OTP;
@@ -0,0 +1,2 @@
1
+ import OTP from './OTP';
2
+ export default OTP;
@@ -0,0 +1,8 @@
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
+ }>>>;
@@ -0,0 +1,4 @@
1
+ import * as yup from 'yup';
2
+ export var OTPValidation = yup.object().shape({
3
+ otp: yup.string().min(6, 'otp_min_length').required('otp_required')
4
+ });
@@ -18,7 +18,7 @@ import { useTranslation } from 'react-i18next';
18
18
  import { styled, alpha } from '@mui/material/styles';
19
19
  import Collapse from '../../../../components/Collapse';
20
20
  import Form from '../../../../components/Form';
21
- import Button, { NafathButton, MobileButton } from '../../../shared/Button';
21
+ import Button, { AbsherButton, MobileButton } from '../../../shared/Button';
22
22
  import { useAppDispatch, useAppSelector, useCountry, useFormErrorAndUpdateReadOnly, useFormReadOnly } from '../../../../hooks';
23
23
  import { handleCurrentActiveScreen, handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
24
24
  import ScreenContainer from '../../../shared/Containers/ScreenContainer';
@@ -117,6 +117,6 @@ var Mobile = function (_a) {
117
117
  var originalReadOnly = useFormReadOnly(methods);
118
118
  var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
119
119
  var disabled = !methods.formState.isValid;
120
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { readOnly: readOnly['mobile'], show: true, countries: settingData.countries, onListOpen: handleCountryOpen, onListClose: handleCountryClose }) }), _jsxs(Collapse, __assign({ in: !anchor }, { children: [_jsx(TAC, { show: isLeadIdPassed, readOnly: readOnly['termAndConditionChecked'] }), _jsx(Button, __assign({ isAr: isAr, onBackClicked: onBackToCountryList, disableBack: !data.isStartFromBusinessCountry, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: (isLeadIdPassed ? !isLeadIdentityIdAvailable : !methods.formState.isValid) && !isOther }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), isKuwait ? (_jsx(MobileButton, __assign({ disabled: loading, onClick: function () { return onBack(); }, icon: ICONS_NAMES.PACI_ICON }, { children: t('paci_button_label') }))) : (_jsx(NafathButton, __assign({ disabled: loading, onClick: function () { return onBack(); } }, { children: t('nafath_button_label') })))] }))] }))] })) })) }));
120
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(InputsContainerStyled, { children: _jsx(MobileNumber, { readOnly: readOnly['mobile'], show: true, countries: settingData.countries, onListOpen: handleCountryOpen, onListClose: handleCountryClose }) }), _jsxs(Collapse, __assign({ in: !anchor }, { children: [_jsx(TAC, { show: isLeadIdPassed, readOnly: readOnly['termAndConditionChecked'] }), _jsx(Button, __assign({ isAr: isAr, onBackClicked: onBackToCountryList, disableBack: !data.isStartFromBusinessCountry, disabled: disabled, loading: loading, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: (isLeadIdPassed ? !isLeadIdentityIdAvailable : !methods.formState.isValid) && !isOther }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), isKuwait ? (_jsx(MobileButton, __assign({ disabled: loading, onClick: function () { return onBack(); }, icon: ICONS_NAMES.PACI_ICON }, { children: t('paci_button_label') }))) : (_jsx(AbsherButton, __assign({ disabled: loading, onClick: function () { return onBack(); } }, { children: t('absher_button_label') })))] }))] }))] })) })) }));
121
121
  };
122
122
  export default React.memo(Mobile);
@@ -0,0 +1,6 @@
1
+ interface DOBProps {
2
+ onDateClicked?: (flag: boolean) => void;
3
+ readOnly?: boolean;
4
+ }
5
+ declare const DOB: ({ onDateClicked, readOnly }: DOBProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default DOB;
@@ -0,0 +1,47 @@
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 { useTranslation } from 'react-i18next';
14
+ import { useController, useFormContext } from 'react-hook-form';
15
+ import { useAppDispatch, useAppSelector } from '../../../../hooks';
16
+ import { ScreenContainer } from '../../../shared/Containers';
17
+ import { alpha, styled } from '@mui/material/styles';
18
+ import { clearError, connectExpressSelector } from '../../../app/connectExpress/connectExpressStore';
19
+ import Text from '../../../../components/Text';
20
+ import Calender from '../../../shared/Calender';
21
+ var InputLabelStyled = styled(Text)(function (_a) {
22
+ var theme = _a.theme;
23
+ return (__assign(__assign({ color: alpha(theme.palette.text.primary, 0.6), fontWeight: theme.typography.fontWeightMedium }, theme.typography.caption), { lineHeight: theme.spacing(2.5) }));
24
+ });
25
+ var DOB = function (_a) {
26
+ var _b;
27
+ var onDateClicked = _a.onDateClicked, readOnly = _a.readOnly;
28
+ var t = useTranslation().t;
29
+ var control = useFormContext().control;
30
+ var dispatch = useAppDispatch();
31
+ var dobControl = useController({ control: control, name: 'dob' });
32
+ var error = useAppSelector(connectExpressSelector).error;
33
+ var handleBirthDateChange = function (data) {
34
+ dobControl.field.onChange(data);
35
+ handleClearError();
36
+ };
37
+ var handleClearError = function () {
38
+ if (error)
39
+ dispatch(clearError());
40
+ };
41
+ var dateValue = (_b = dobControl === null || dobControl === void 0 ? void 0 : dobControl.field) === null || _b === void 0 ? void 0 : _b.value;
42
+ return (_jsxs(ScreenContainer, { children: [_jsx(InputLabelStyled, __assign({ sx: { p: function (_a) {
43
+ var spacing = _a.spacing;
44
+ return spacing(2.5, 2.5, 1.5, 2.5);
45
+ } } }, { children: t('enter_birth_date') })), _jsx(Calender, { isDob: true, disabled: readOnly, defaultValue: dateValue ? new Date(dateValue) : undefined, onDateClicked: onDateClicked, onDateChange: handleBirthDateChange })] }));
46
+ };
47
+ export default DOB;
@@ -2,7 +2,6 @@ import * as React from 'react';
2
2
  interface IDNumberProps {
3
3
  show: boolean;
4
4
  readOnly?: boolean;
5
- isValid: boolean;
6
5
  }
7
6
  declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<IDNumberProps & React.RefAttributes<unknown>>>;
8
7
  export default _default;
@@ -38,7 +38,7 @@ var InputLabelStyled = styled(Text)(function (_a) {
38
38
  });
39
39
  var IDNumber = React.forwardRef(function (_a, ref) {
40
40
  var _b, _c, _d;
41
- var show = _a.show, readOnly = _a.readOnly, isValid = _a.isValid;
41
+ var show = _a.show, readOnly = _a.readOnly;
42
42
  var t = useTranslation().t;
43
43
  var control = useFormContext().control;
44
44
  var nidControl = useController({ control: control, name: 'nid' });
@@ -55,6 +55,6 @@ var IDNumber = React.forwardRef(function (_a, ref) {
55
55
  var error = (_b = nidControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
56
56
  var isLeadIdPassed = data.isLeadIdPassed, responseData = data.responseData;
57
57
  var isLeadIdentityIdAvailable = !!((_d = (_c = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _c === void 0 ? void 0 : _c.identification) === null || _d === void 0 ? void 0 : _d.id);
58
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref, sx: { mb: isValid ? 5 : 0 } }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_national_id') }) }), _jsx(Input, { readOnly: readOnly, dir: 'ltr', type: 'tel', inputProps: { maxLength: ID_NUMBER_LENGTH }, disabled: isLeadIdPassed && isLeadIdentityIdAvailable, onChange: handleIdChange, value: nidValue, endAdornment: _jsx(EndAdornment, { value: nidValue, error: error, onClear: clearIdNumber }), placeholder: t('national_id_placeholder'), warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
58
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, __assign({ ref: ref }, { children: [_jsx(LabelContainerStyled, { children: _jsx(InputLabelStyled, { children: t('enter_national_id') }) }), _jsx(Input, { readOnly: readOnly, dir: 'ltr', type: 'tel', inputProps: { maxLength: ID_NUMBER_LENGTH }, disabled: isLeadIdPassed && isLeadIdentityIdAvailable, onChange: handleIdChange, value: nidValue, endAdornment: _jsx(EndAdornment, { value: nidValue, error: error, onClear: clearIdNumber }), placeholder: t('national_id_placeholder'), warningType: 'alert', warningMessage: error && t(error, { number: '1' }), required: true })] })) })));
59
59
  });
60
60
  export default React.memo(IDNumber);
@@ -18,7 +18,7 @@ import { yupResolver } from '@hookform/resolvers/yup';
18
18
  import { NIDValidationSchema } from './validation';
19
19
  import { useAppDispatch, useLanguage, useAppSelector, useFormReadOnly, useFormErrorAndUpdateReadOnly } from '../../../../hooks';
20
20
  import { handleCurrentActiveScreen, handlePrevScreenStep } from '../../../../app/settings';
21
- import { clearError, connectExpressSelector, createNafathAuth } from '../../../app/connectExpress/connectExpressStore';
21
+ import { clearError, connectExpressSelector, createNIDAuthAsync } from '../../../app/connectExpress/connectExpressStore';
22
22
  import Form from '../../../../components/Form';
23
23
  import Button, { MobileButton } from '../../../shared/Button';
24
24
  import { ScreenContainer } from '../../../shared/Containers';
@@ -27,6 +27,7 @@ import Box from '@mui/material/Box';
27
27
  import Divider from '@mui/material/Divider';
28
28
  import Text from '../../../../components/Text';
29
29
  import IDNumber from './IDNumber';
30
+ import DOB from './DOB';
30
31
  import TAC from './TAC';
31
32
  import { deepCopy, sendCustomEventToGTM } from '../../../../utils';
32
33
  var FormStyled = styled(Form)(function () { return ({
@@ -59,10 +60,11 @@ var OrBoxStyled = styled(Box)(function (_a) {
59
60
  });
60
61
  var NID = function (_a) {
61
62
  var _b, _c;
63
+ var _d = React.useState(false), collapse = _d[0], setCollapse = _d[1];
62
64
  var isAr = useLanguage().isAr;
63
65
  var dispatch = useAppDispatch();
64
66
  var t = useTranslation().t;
65
- var _d = useAppSelector(connectExpressSelector), data = _d.data, loading = _d.loading, error = _d.error;
67
+ var _e = useAppSelector(connectExpressSelector), data = _e.data, loading = _e.loading, error = _e.error;
66
68
  var isLeadIdPassed = data.isLeadIdPassed, responseData = data.responseData;
67
69
  var methods = useForm({
68
70
  resolver: yupResolver(NIDValidationSchema(isLeadIdPassed)),
@@ -76,7 +78,10 @@ var NID = function (_a) {
76
78
  React.useEffect(function () {
77
79
  }, []);
78
80
  var onSubmit = function (data) {
79
- dispatch(createNafathAuth(deepCopy(data)));
81
+ dispatch(createNIDAuthAsync(deepCopy(data)));
82
+ };
83
+ var handleCollapseOpenClose = function (flag) {
84
+ setCollapse(flag);
80
85
  };
81
86
  var onBack = function () {
82
87
  sendCustomEventToGTM({
@@ -93,6 +98,6 @@ var NID = function (_a) {
93
98
  var readOnly = useFormErrorAndUpdateReadOnly(methods, originalReadOnly);
94
99
  var disabled = !methods.formState.isValid;
95
100
  var isLeadIdentityIdAvailable = (_c = (_b = responseData === null || responseData === void 0 ? void 0 : responseData.leadData) === null || _b === void 0 ? void 0 : _b.identification) === null || _c === void 0 ? void 0 : _c.id;
96
- return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(IDNumber, { isValid: methods.formState.isValid, show: true, readOnly: readOnly['nid'] }), _jsx(TAC, { show: isLeadIdPassed, readOnly: readOnly['termAndConditionChecked'] }), _jsx(Button, __assign({ loading: loading, isAr: isAr, onBackClicked: onBackToCountryList, disableBack: !data.isStartFromBusinessCountry, disabled: disabled, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: isLeadIdPassed ? !isLeadIdentityIdAvailable && !methods.formState.isValid : !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(MobileButton, __assign({ onClick: function () { return onBack(); }, disabled: loading }, { children: t('mobile_button_label') }))] }))] })) })) }));
101
+ return (_jsx(ScreenContainer, { children: _jsx(FormProvider, __assign({}, methods, { children: _jsxs(FormStyled, __assign({ onSubmit: methods.handleSubmit(onSubmit) }, { children: [_jsx(Collapse, __assign({ in: !collapse }, { children: _jsx(IDNumber, { show: !collapse, readOnly: readOnly['nid'] }) })), _jsx(DOB, { onDateClicked: handleCollapseOpenClose, readOnly: readOnly['dob'] }), _jsxs(Collapse, __assign({ in: !collapse }, { children: [_jsx(TAC, { show: isLeadIdPassed, readOnly: readOnly['termAndConditionChecked'] }), _jsx(Button, __assign({ loading: loading, isAr: isAr, onBackClicked: onBackToCountryList, disableBack: !data.isStartFromBusinessCountry, disabled: disabled, error: t(error || '') }, { children: t('next') })), _jsxs(Collapse, __assign({ in: isLeadIdPassed ? !isLeadIdentityIdAvailable && !methods.formState.isValid : !methods.formState.isValid }, { children: [_jsxs(OrBoxStyled, { children: [_jsx(DividerStyled, {}), _jsx(TextStyled, { children: t('or') }), _jsx(DividerStyled, {})] }), _jsx(MobileButton, __assign({ onClick: function () { return onBack(); }, disabled: loading }, { children: t('mobile_button_label') }))] }))] }))] })) })) }));
97
102
  };
98
103
  export default React.memo(NID);
@@ -1,8 +1,11 @@
1
1
  import * as yup from 'yup';
2
2
  export declare const NIDValidationSchema: (isLeadIdPassed: boolean) => 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>;
3
4
  nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
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>;
5
7
  nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
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>;
7
10
  nid: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
8
11
  }>>>;
@@ -2,6 +2,7 @@ import * as yup from 'yup';
2
2
  export var NIDValidationSchema = function (isLeadIdPassed) {
3
3
  if (isLeadIdPassed) {
4
4
  return yup.object().shape({
5
+ dob: yup.string().min(5).required('enter_valid_birth_date'),
5
6
  termAndConditionChecked: yup.boolean().isTrue('check_terms_cond').required('check_terms_cond'),
6
7
  nid: yup
7
8
  .string()
@@ -11,6 +12,7 @@ export var NIDValidationSchema = function (isLeadIdPassed) {
11
12
  });
12
13
  }
13
14
  return yup.object().shape({
15
+ dob: yup.string().min(5).required('enter_valid_birth_date'),
14
16
  nid: yup
15
17
  .string()
16
18
  .matches(/^(1|2)([0-9]{1,})$/g, 'signup_invalid_national_id_format')
@@ -18,7 +18,7 @@ import { yupResolver } from '@hookform/resolvers/yup';
18
18
  import { NIDOtherCountryValidationSchema, NIDValidationSchema } from './validation';
19
19
  import { useAppDispatch, useLanguage, useAppSelector } from '../../../../hooks';
20
20
  import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
21
- import { clearError, connectExpressSelector, createNIDNafathAuthIdentityAsync } from '../../../app/connectExpress/connectExpressStore';
21
+ import { clearError, connectExpressSelector, createNIDAuthIdentityAsync } from '../../../app/connectExpress/connectExpressStore';
22
22
  import Form from '../../../../components/Form';
23
23
  import Button from '../../../shared/Button';
24
24
  import { ScreenContainer } from '../../../shared/Containers';
@@ -48,7 +48,7 @@ var NID = function (_a) {
48
48
  dispatch(clearError());
49
49
  }, [methods.formState.isValid]);
50
50
  var onSubmit = function (data) {
51
- dispatch(createNIDNafathAuthIdentityAsync(deepCopy(data)));
51
+ dispatch(createNIDAuthIdentityAsync(deepCopy(data)));
52
52
  };
53
53
  var handleCollapseOpenClose = function (flag) {
54
54
  setCollapse(flag);
@@ -15,16 +15,17 @@ import { styled } from '@mui/material/styles';
15
15
  import * as React from 'react';
16
16
  import { useTranslation } from 'react-i18next';
17
17
  import Text from '../../../../components/Text';
18
- import { clearError, connectExpressSelector, verifyMobileOtpAsync, resetOTPValue } from '../../../app/connectExpress/connectExpressStore';
18
+ import { clearError, connectExpressSelector, verifyMobileOtpAsync, verifyNIDOtpAsync, resetOTPValue } from '../../../app/connectExpress/connectExpressStore';
19
19
  import Button from '../../../shared/Button';
20
20
  import { ScreenContainer } from '../../../shared/Containers';
21
21
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
22
22
  import { handlePrevScreenStep } from '../../../../app/settings';
23
23
  import { useLanguage } from '../../../../hooks';
24
+ import { AuthForType } from '../../../../@types';
24
25
  import { useForm, FormProvider } from 'react-hook-form';
25
26
  import { yupResolver } from '@hookform/resolvers/yup';
26
27
  import Form from '../../../../components/Form';
27
- import { maskPhone, deepCopy, sendCustomEventToGTM } from '../../../../utils';
28
+ import { maskPhone, maskID, deepCopy, sendCustomEventToGTM } from '../../../../utils';
28
29
  import { OTPValidation } from './validation';
29
30
  import OTPInput from './OTPInput';
30
31
  var OTPTitleContainerStyled = styled(Box)(function (_a) {
@@ -57,6 +58,7 @@ var OTP = function () {
57
58
  defaultValues: data.otpData,
58
59
  mode: 'onChange'
59
60
  });
61
+ var isNidAuth = data.otpData.authFor === AuthForType.NATIONAL_ID;
60
62
  React.useEffect(function () {
61
63
  if (error)
62
64
  dispatch(clearError());
@@ -72,14 +74,20 @@ var OTP = function () {
72
74
  };
73
75
  }, []);
74
76
  var onSubmit = function (formData) {
77
+ if (isNidAuth) {
78
+ dispatch(verifyNIDOtpAsync(deepCopy(formData)));
79
+ return;
80
+ }
75
81
  dispatch(verifyMobileOtpAsync(deepCopy(formData)));
76
82
  };
77
83
  var onBack = function () {
78
- dispatch(handlePrevScreenStep());
84
+ var screen = isNidAuth ? 'CONNECT_EXPRESS_NID_STEP' : 'CONNECT_EXPRESS_MOBILE_STEP';
85
+ dispatch(handlePrevScreenStep(screen));
79
86
  };
80
87
  var disabled = !methods.formState.isValid;
81
88
  var phone = data.mobileData.mobile ? ((_a = data.mobileData.countryCode) === null || _a === void 0 ? void 0 : _a.idd_prefix) + data.mobileData.mobile : '';
82
- var title = t('ide_opt_sent_title');
83
- 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') : title, !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: maskPhone(phone) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
89
+ var idNumber = data.nidData.nid;
90
+ var title = isNidAuth ? t('opt_nid_sent_title', { provider: 'ABSHER' }) : t('ide_opt_sent_title');
91
+ 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') : title, !loading && _jsx("span", __assign({ dir: 'ltr' }, { children: isNidAuth ? maskID(idNumber) : maskPhone(phone) }))] }) }), _jsx(OTPInput, {}), _jsx(Button, __assign({ onBackClicked: function () { return onBack(); }, disabled: disabled, isAr: isAr, loading: loading, error: t(error || '') }, { children: t('next') }))] })) })) }));
84
92
  };
85
93
  export default React.memo(OTP);
@@ -17,7 +17,8 @@ import Box from '@mui/material/Box/Box';
17
17
  import { styled } from '@mui/material/styles';
18
18
  import OTPField from '../../../shared/OTP';
19
19
  import { DEFAULT_TIMER_VALUE } from '../../../../constants';
20
- import { resendMobileAuthOTP, connectExpressSelector, clearError } from '../../../app/connectExpress/connectExpressStore';
20
+ import { AuthForType } from '../../../../@types';
21
+ import { resendMobileAuthOTP, resendNIDAuthOTP, connectExpressSelector, clearError } from '../../../app/connectExpress/connectExpressStore';
21
22
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
22
23
  import { sendCustomEventToGTM } from '../../../../utils';
23
24
  var BoxStyled = styled(Box)(function (_a) {
@@ -34,7 +35,8 @@ var OTPInput = function (_a) {
34
35
  var dispatch = useAppDispatch();
35
36
  var otpControl = useController({ name: 'otp', control: control });
36
37
  var _c = useAppSelector(connectExpressSelector), data = _c.data, error = _c.error;
37
- var mobileData = data.mobileData;
38
+ var mobileData = data.mobileData, nidData = data.nidData;
39
+ var isNidAuth = data.otpData.authFor === AuthForType.NATIONAL_ID;
38
40
  var sendEventAskAnotherOTP = function () {
39
41
  sendCustomEventToGTM({
40
42
  event: 'Send Event',
@@ -53,7 +55,13 @@ var OTPInput = function (_a) {
53
55
  sendEventAskAnotherOTP();
54
56
  dispatch(resendMobileAuthOTP(mobileData));
55
57
  };
58
+ var handleOnResendAbsherOTP = function () {
59
+ if (otpControl.field.value)
60
+ setValue('otp', '', { shouldValidate: true });
61
+ sendEventAskAnotherOTP();
62
+ dispatch(resendNIDAuthOTP(nidData));
63
+ };
56
64
  var otpValue = otpControl.field.value;
57
- return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
65
+ return (_jsx(BoxStyled, __assign({ dir: 'ltr' }, { children: _jsx(OTPField, { timeEndLabel: t('ide_otp_resend_label'), timerInSeconds: DEFAULT_TIMER_VALUE, onResetClick: isNidAuth ? handleOnResendAbsherOTP : handleOnResendOTP, value: otpValue, onChange: function (number) { return handleOnOTPChange(number.toString()); } }) })));
58
66
  };
59
67
  export default React.memo(OTPInput);
@@ -15,7 +15,7 @@ import { useTranslation } from 'react-i18next';
15
15
  import { useController, useFormContext } from 'react-hook-form';
16
16
  import { useAppDispatch, useAppSelector } from '../../../../hooks';
17
17
  import { BusinessType } from '../../../../@types';
18
- import { isKW, isOtherThanKWOrSA, removeAllOtherThanCharsAndNumber } from '../../../../utils';
18
+ import { isKW, isOtherThanKWOrSA, cleanFLandCRNumber } from '../../../../utils';
19
19
  import { settingsSelector } from '../../../../app/settings';
20
20
  import { CR_MIN_LICENSE_LENGTH, CR_NUMBER_MAX_LENGTH, FL_MIN_LICENSE_LENGTH, FL_NUMBER_ENTITY_LENGTH, KW_MAX_LICENSE_LENGTH, KW_MIN_LICENSE_LENGTH } from '../../../../constants';
21
21
  import Collapse from '../../../../components/Collapse';
@@ -38,7 +38,7 @@ var LicenseNumber = function (_a) {
38
38
  var target = _a.target;
39
39
  if (bckError)
40
40
  dispatch(clearError());
41
- var value = removeAllOtherThanCharsAndNumber(target.value);
41
+ var value = cleanFLandCRNumber(target.value);
42
42
  licenseNumberControl.field.onChange(value);
43
43
  };
44
44
  var licenseNumberControl = useController({ control: control, name: 'licenseNumber' });
@@ -3,7 +3,6 @@ import MobileScreen from './connect/screens/Mobile';
3
3
  import NIDScreen from './connect/screens/NID';
4
4
  import ConnectCivilIDScreen from '../features/connect/screens/CivilID';
5
5
  import ConnectVerifyPACIScreen from './connect/screens/VerifyPACI';
6
- import ConnectVerifyNafathScreen from './connect/screens/VerifyNafath';
7
6
  import IndividualScreen from './connect/screens/Individual';
8
7
  import MerchantInfoScreen from './connect/screens/Merchant';
9
8
  import BrandSegmentInfoScreen from './connect/screens/BrandSegment';
@@ -13,14 +12,13 @@ import OperatorError from './connect/screens/OperatorError';
13
12
  import ConnectExpressBusinessCountry from './connectExpress/screens/BusinessCountry/BusinessCountry';
14
13
  import ConnectExpressMobileScreen from './connectExpress/screens/Mobile';
15
14
  import ConnectExpressNIDScreen from './connectExpress/screens/NID';
16
- import ConnectExpressVerifyNafathScreen from './connectExpress/screens/VerifyNafath';
17
15
  import ConnectExpressCivilIDScreen from './connectExpress/screens/CivilID';
18
16
  import ConnectExpressVerifyPACIScreen from './connectExpress/screens/VerifyPACI';
19
17
  import ConnectExpressOTPScreen from './connectExpress/screens/OTP';
20
18
  import ConnectExpressNIDMissedScreen from './connectExpress/screens/NIDMissed';
21
19
  import ConnectExpressCivilIDMissedScreen from './connectExpress/screens/CivilIDMissed';
22
20
  import ConnectExpressIdentityVerifyPACIScreen from './connectExpress/screens/IdentityVerifyPACI';
23
- import ConnectExpressIdentityVerifyNafathScreen from './connectExpress/screens/IdentityVerifyNafath';
21
+ import ConnectExpressIdentityVerifyOTPScreen from './connectExpress/screens/IdentityOTP';
24
22
  import ConnectExpressCollectIndividualScreen from './connectExpress/screens/CollectIndividualInfo';
25
23
  import ConnectExpressCollectBusinessScreen from './connectExpress/screens/CollectBusinessInfo';
26
24
  import ConnectExpressCreateAccountLoaderScreen from './connectExpress/screens/CreateAccountLoader';
@@ -38,7 +36,6 @@ import AuthNIDScreen from './auth/screens/NID';
38
36
  import AuthEmailScreen from './auth/screens/Email';
39
37
  import AuthCivilIDScreen from './auth/screens/CivilID';
40
38
  import AuthVerifyPACIScreen from './auth/screens/VerifyPACI';
41
- import AuthVerifyNafathScreen from './auth/screens/VerifyNafath';
42
39
  import AuthOTPScreen from './auth/screens/OTP';
43
40
  import AuthPasswordScreen from './auth/screens/Password';
44
41
  import AuthResetPasswordMessageScreen from './auth/screens/ResetPasswordMessage';
@@ -53,7 +50,7 @@ import AuthOperatorError from './auth/screens/OperatorError';
53
50
  import CustomersPage from './business/screens/Customers';
54
51
  import IDBODPage from './business/screens/IDBOD';
55
52
  import BusinessVerifyPage from './business/screens/Verify';
56
- import BusinessVerifyNafathPage from './business/screens/VerifyNafath';
53
+ import BusinessOTPPage from './business/screens/OTP';
57
54
  import BusinessTypePage from './business/screens/BusinessType';
58
55
  import ActivitiesPage from './business/screens/Activities';
59
56
  import SuccessPage from './business/screens/Success';
@@ -147,10 +144,6 @@ export var connectFeatureScreens = [
147
144
  name: 'CONNECT_VERIFY_PACI_STEP',
148
145
  element: ConnectVerifyPACIScreen
149
146
  },
150
- {
151
- name: 'CONNECT_VERIFY_NAFATH_STEP',
152
- element: ConnectVerifyNafathScreen
153
- },
154
147
  {
155
148
  name: 'CONNECT_INDIVIDUAL_STEP',
156
149
  element: IndividualScreen
@@ -193,10 +186,6 @@ export var connectExpressFeatureScreens = [
193
186
  name: 'CONNECT_EXPRESS_OTP_STEP',
194
187
  element: ConnectExpressOTPScreen
195
188
  },
196
- {
197
- name: 'CONNECT_EXPRESS_VERIFY_NAFATH_STEP',
198
- element: ConnectExpressVerifyNafathScreen
199
- },
200
189
  {
201
190
  name: 'CONNECT_EXPRESS_VERIFY_PACI_STEP',
202
191
  element: ConnectExpressVerifyPACIScreen
@@ -214,8 +203,8 @@ export var connectExpressFeatureScreens = [
214
203
  element: ConnectExpressIdentityVerifyPACIScreen
215
204
  },
216
205
  {
217
- name: 'CONNECT_EXPRESS_IDENTITY_VERIFY_NAFATH_STEP',
218
- element: ConnectExpressIdentityVerifyNafathScreen
206
+ name: 'CONNECT_EXPRESS_OTP_IDENTITY_STEP',
207
+ element: ConnectExpressIdentityVerifyOTPScreen
219
208
  },
220
209
  {
221
210
  name: 'CONNECT_EXPRESS_WAITING_FOR_CREATING_ACCOUNT_STEP',
@@ -299,10 +288,6 @@ export var authFeatureScreens = [
299
288
  name: 'AUTH_VERIFY_PACI_STEP',
300
289
  element: AuthVerifyPACIScreen
301
290
  },
302
- {
303
- name: 'AUTH_NAFATH_VERIFY_STEP',
304
- element: AuthVerifyNafathScreen
305
- },
306
291
  {
307
292
  name: 'AUTH_ACCOUNT_NOT_FOUND_STEP',
308
293
  element: AccountNotFoundScreen
@@ -354,8 +339,8 @@ export var businessFeatureScreens = [
354
339
  element: BusVerifyPACIScreen
355
340
  },
356
341
  {
357
- name: 'BUSINESS_VERIFY_NAFATH_STEP',
358
- element: BusinessVerifyNafathPage
342
+ name: 'BUSINESS_OTP_STEP',
343
+ element: BusinessOTPPage
359
344
  },
360
345
  {
361
346
  name: 'BUSINESS_BUSINESS_TYPE_STEP',
@@ -0,0 +1,7 @@
1
+ import { ButtonProps } from '../../../components/Button';
2
+ interface AbsherButtonProps extends ButtonProps {
3
+ loading?: boolean;
4
+ hideIcon?: boolean;
5
+ }
6
+ export default function AbsherButton({ children, hideIcon, disabled, ...props }: AbsherButtonProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -28,7 +28,7 @@ import Box from '@mui/material/Box';
28
28
  import { ICONS_NAMES } from '../../../constants';
29
29
  var IconStyled = styled(Icon, { shouldForwardProp: function (prop) { return prop !== 'disabled'; } })(function (_a) {
30
30
  var theme = _a.theme, disabled = _a.disabled;
31
- return (__assign({ width: theme.spacing(3), height: theme.spacing(3) }, (disabled && {
31
+ return (__assign({ width: theme.spacing(3), height: theme.spacing(3), marginInlineStart: theme.spacing(0.75) }, (disabled && {
32
32
  opacity: 0.3
33
33
  })));
34
34
  });
@@ -38,19 +38,9 @@ var ButtonBoxStyled = styled(Box)(function (_a) {
38
38
  margin: theme.spacing(0, 2.5, 2.5, 2.5)
39
39
  });
40
40
  });
41
- var ButtonStyled = styled(Button)(function (_a) {
42
- var theme = _a.theme;
43
- return ({
44
- paddingInlineStart: theme.spacing(1.75),
45
- fontWeight: theme.typography.fontWeightRegular,
46
- '& .MuiButton-startIcon': {
47
- margin: theme.spacing(0)
48
- }
49
- });
50
- });
51
- export default function NafathButton(_a) {
41
+ export default function AbsherButton(_a) {
52
42
  var children = _a.children, hideIcon = _a.hideIcon, disabled = _a.disabled, props = __rest(_a, ["children", "hideIcon", "disabled"]);
53
43
  var theme = useTheme();
54
44
  var btnColor = theme.palette.primary.light;
55
- return (_jsx(ButtonBoxStyled, { children: _jsx(ButtonStyled, __assign({ outLineColor: btnColor, variant: 'outlined', disabled: disabled, type: 'button', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: ICONS_NAMES.NAFATH_LOGO }) }, props, { children: children })) }));
45
+ return (_jsx(ButtonBoxStyled, { children: _jsx(Button, __assign({ outLineColor: btnColor, variant: 'outlined', disabled: disabled, type: 'button', startIcon: !hideIcon && _jsx(IconStyled, { disabled: disabled, src: ICONS_NAMES.ABSHER_LOGO }) }, props, { children: children })) }));
56
46
  }