@tap-payments/auth-jsconnect 2.9.14-development → 2.9.16-development
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/components/AnimationFlow/BottomSheet.js +3 -3
- package/build/features/app/connect/connectStore.js +41 -29
- package/build/features/business/screens/MobileOwnership/CollectMobileOwnership.js +3 -2
- package/build/features/business/screens/MobileOwnership/MobileNumber.js +3 -3
- package/build/features/connect/screens/MobileOwnership/CollectMobileOwnership.js +3 -2
- package/build/features/connect/screens/MobileOwnership/MobileNumber.js +3 -3
- package/build/features/connectExpress/screens/MobileOwnership/CollectMobileOwnership.js +3 -2
- package/build/features/connectExpress/screens/MobileOwnership/MobileNumber.js +3 -3
- package/build/features/shared/Button/FlowsButtons.js +1 -1
- package/build/features/shared/Dialog/DialogContainer.js +3 -3
- package/package.json +1 -1
|
@@ -79,7 +79,8 @@ var CloseIconStyled = styled(Icon)(function (_a) {
|
|
|
79
79
|
var theme = _a.theme;
|
|
80
80
|
return ({
|
|
81
81
|
width: theme.spacing(3.75),
|
|
82
|
-
height: theme.spacing(3.75)
|
|
82
|
+
height: theme.spacing(3.75),
|
|
83
|
+
cursor: 'pointer'
|
|
83
84
|
});
|
|
84
85
|
});
|
|
85
86
|
var CloseBox = styled(Box)(function (_a) {
|
|
@@ -89,7 +90,6 @@ var CloseBox = styled(Box)(function (_a) {
|
|
|
89
90
|
justifyContent: 'end',
|
|
90
91
|
marginBlockStart: theme.spacing(2),
|
|
91
92
|
marginInlineEnd: theme.spacing(2),
|
|
92
|
-
cursor: 'pointer',
|
|
93
93
|
direction: theme.direction,
|
|
94
94
|
position: 'absolute',
|
|
95
95
|
right: 0,
|
|
@@ -134,6 +134,6 @@ var BottomSheetComponent = function (_a) {
|
|
|
134
134
|
return (_jsxs(BottomSheetStyled, __assign({ languageBarHeight: getLanguageBarHeight(), dialogEdgeFormat: dialogEdgeFormat, sibling: hideFooter ? (_jsx(_Fragment, {})) : (open && (_jsx(LanguageFooterStyled, { children: _jsx(CustomFooter, {}) }))), isMaturityExpress: isMaturityExpress, showPoweredBy: !hidePoweredBy, sx: { pointerEvents: pointerEvents }, ref: sheetRef, open: open, snapPoints: function (_a) {
|
|
135
135
|
var maxHeight = _a.maxHeight;
|
|
136
136
|
return [getMinHeight(maxHeight), maxHeight * 0.95];
|
|
137
|
-
} }, rest, { children: [isMaturityExpress && !hideMerchantLogo && (_jsx(LogoBadge, { src: isMaturityExpress ? logo || ICONS_NAMES.LOGO_ICON : ICONS_NAMES.LOGO_ICON })), onClose && (_jsx(CloseBox, __assign({ id: 'close-container'
|
|
137
|
+
} }, rest, { children: [isMaturityExpress && !hideMerchantLogo && (_jsx(LogoBadge, { src: isMaturityExpress ? logo || ICONS_NAMES.LOGO_ICON : ICONS_NAMES.LOGO_ICON })), onClose && (_jsx(CloseBox, __assign({ id: 'close-container' }, { children: _jsx(CloseIconStyled, { src: ICONS_NAMES.CLOSE_ICON, onClick: handleOnCloseButton }) }))), children, isMaturityExpress && !hidePoweredBy && (_jsx(FooterStyled, { children: _jsx(PoweredByFooter, { id: 'bottom-sheet-powered_by_footer', sx: { margin: '0px' }, textSx: { color: 'rgba(63, 66, 77, 0.6)' }, icon: isAr ? ICONS_NAMES.LOGO_WITH_NAME_DARK_AR_ICON : ICONS_NAMES.LOGO_WITH_NAME_DARK_EN_ICON }) }))] })));
|
|
138
138
|
};
|
|
139
139
|
export default React.memo(BottomSheetComponent);
|
|
@@ -71,7 +71,7 @@ import { handleCurrentActiveScreen, handleNextScreenStep, handleSetCountryByIso2
|
|
|
71
71
|
import { COLLECT_DOB_INFO_NAFATH, CONNECT_STEP_NAMES, defaultCountry, IDENTIFICATION_TYPE, NAFATH_VERIFICATION_FAILED, OTHER_BRAND } from '../../../constants';
|
|
72
72
|
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
|
|
73
73
|
import { AuthForType, FlowsTypes } from '../../../@types';
|
|
74
|
-
import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM, isOtherThanKWOrSA, isKW, findCountryByIso2, getMetaData, isSA } from '../../../utils';
|
|
74
|
+
import { capitalizeTheFirstLetterOfEachWord, concatenateObjectValues, findCountryByIddPrefix, fixBrandList, isTwitter, getIndividualName, isWebsite, sleep, sendCustomEventToGTM, isOtherThanKWOrSA, isKW, findCountryByIso2, getMetaData, isSA, isNetworkError } from '../../../utils';
|
|
75
75
|
export var updateBusinessCountry = createAsyncThunk('connect/updateBusinessCountry', function (countryCode, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
76
|
var connect, payload, data;
|
|
77
77
|
return __generator(this, function (_a) {
|
|
@@ -363,7 +363,7 @@ export var verifyPACI = createAsyncThunk('connect/verifyPACI', function (params,
|
|
|
363
363
|
});
|
|
364
364
|
}); });
|
|
365
365
|
export var verifyNafath = createAsyncThunk('connect/verifyNafath', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
|
|
366
|
-
var _a, settings, connect, responseBody, expiry, interval, maxCalls, count, authResponse, isSuccess, isFailed, countryCode, lead_id, leadResponse, channels, brand, err_5, brands, err_6, phone, isNextScreenDob, stepName;
|
|
366
|
+
var _a, settings, connect, responseBody, expiry, interval, maxCalls, count, authResponse, error_1, isSuccess, isFailed, countryCode, lead_id, leadResponse, channels, brand, err_5, brands, err_6, phone, isNextScreenDob, stepName;
|
|
367
367
|
var _b, _c, _d, _e, _f, _g, _h;
|
|
368
368
|
return __generator(this, function (_j) {
|
|
369
369
|
switch (_j.label) {
|
|
@@ -376,58 +376,70 @@ export var verifyNafath = createAsyncThunk('connect/verifyNafath', function (par
|
|
|
376
376
|
count = 1;
|
|
377
377
|
_j.label = 1;
|
|
378
378
|
case 1:
|
|
379
|
-
if (!(count <= maxCalls)) return [3,
|
|
379
|
+
if (!(count <= maxCalls)) return [3, 19];
|
|
380
380
|
if (thunkApi.signal.aborted) {
|
|
381
|
-
return [3,
|
|
381
|
+
return [3, 19];
|
|
382
382
|
}
|
|
383
|
-
|
|
383
|
+
authResponse = void 0;
|
|
384
|
+
_j.label = 2;
|
|
384
385
|
case 2:
|
|
386
|
+
_j.trys.push([2, 4, , 5]);
|
|
387
|
+
return [4, API.authService.getVerifyAuth(responseBody === null || responseBody === void 0 ? void 0 : responseBody.auth_token)];
|
|
388
|
+
case 3:
|
|
385
389
|
authResponse = _j.sent();
|
|
386
|
-
|
|
390
|
+
return [3, 5];
|
|
391
|
+
case 4:
|
|
392
|
+
error_1 = _j.sent();
|
|
393
|
+
if (!isNetworkError(error_1.message)) {
|
|
394
|
+
throw new Error(error_1);
|
|
395
|
+
}
|
|
396
|
+
return [3, 5];
|
|
397
|
+
case 5:
|
|
398
|
+
isSuccess = ((_b = authResponse === null || authResponse === void 0 ? void 0 : authResponse.status) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'success';
|
|
387
399
|
isFailed = ((_c = authResponse === null || authResponse === void 0 ? void 0 : authResponse.status) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === 'failed';
|
|
388
400
|
countryCode = settings.data.businessCountry;
|
|
389
401
|
if (isFailed) {
|
|
390
402
|
(_d = params.onFailure) === null || _d === void 0 ? void 0 : _d.call(params);
|
|
391
403
|
return [2, { authResponse: authResponse, countryCode: countryCode }];
|
|
392
404
|
}
|
|
393
|
-
if (!isSuccess) return [3,
|
|
405
|
+
if (!isSuccess) return [3, 16];
|
|
394
406
|
lead_id = authResponse.lead_id;
|
|
395
407
|
if (!lead_id)
|
|
396
408
|
throw new Error('Lead id is missing');
|
|
397
409
|
return [4, API.leadService.retrieveLead(lead_id)];
|
|
398
|
-
case
|
|
410
|
+
case 6:
|
|
399
411
|
leadResponse = (_j.sent()).data;
|
|
400
412
|
if ((_e = leadResponse.errors) === null || _e === void 0 ? void 0 : _e.length)
|
|
401
413
|
throw new Error(leadResponse.errors[0].description);
|
|
402
414
|
return [4, API.dataService.getChannelsOfServices({ page: 0 })];
|
|
403
|
-
case
|
|
415
|
+
case 7:
|
|
404
416
|
channels = (_j.sent()).list;
|
|
405
417
|
leadResponse.channel_list = channels;
|
|
406
|
-
_j.label =
|
|
407
|
-
case
|
|
408
|
-
_j.trys.push([
|
|
418
|
+
_j.label = 8;
|
|
419
|
+
case 8:
|
|
420
|
+
_j.trys.push([8, 10, , 11]);
|
|
409
421
|
return [4, API.brandService.retrieveBrand(leadResponse.brand.id)];
|
|
410
|
-
case
|
|
422
|
+
case 9:
|
|
411
423
|
brand = (_j.sent()).brand;
|
|
412
424
|
leadResponse.brand = __assign(__assign({}, leadResponse.brand), brand);
|
|
413
|
-
return [3,
|
|
414
|
-
case
|
|
425
|
+
return [3, 11];
|
|
426
|
+
case 10:
|
|
415
427
|
err_5 = _j.sent();
|
|
416
|
-
return [3,
|
|
417
|
-
case
|
|
418
|
-
_j.trys.push([
|
|
428
|
+
return [3, 11];
|
|
429
|
+
case 11:
|
|
430
|
+
_j.trys.push([11, 13, , 14]);
|
|
419
431
|
return [4, API.brandService.getBrandList({ individual_id: leadResponse.individual_id })];
|
|
420
|
-
case
|
|
432
|
+
case 12:
|
|
421
433
|
brands = (_j.sent()).brands;
|
|
422
434
|
leadResponse.brand_list = fixBrandList(brands, channels);
|
|
423
|
-
return [3,
|
|
424
|
-
case
|
|
435
|
+
return [3, 14];
|
|
436
|
+
case 13:
|
|
425
437
|
err_6 = _j.sent();
|
|
426
|
-
return [3,
|
|
427
|
-
case
|
|
438
|
+
return [3, 14];
|
|
439
|
+
case 14:
|
|
428
440
|
(_f = params.onSuccess) === null || _f === void 0 ? void 0 : _f.call(params);
|
|
429
441
|
return [4, sleep(3000)];
|
|
430
|
-
case
|
|
442
|
+
case 15:
|
|
431
443
|
_j.sent();
|
|
432
444
|
phone = (leadResponse.contact || {}).phone;
|
|
433
445
|
if (phone === null || phone === void 0 ? void 0 : phone.country_code)
|
|
@@ -437,14 +449,14 @@ export var verifyNafath = createAsyncThunk('connect/verifyNafath', function (par
|
|
|
437
449
|
stepName = isNextScreenDob ? 'CONNECT_DOB_STEP' : 'CONNECT_INDIVIDUAL_STEP';
|
|
438
450
|
thunkApi.dispatch(handleNextScreenStep(stepName));
|
|
439
451
|
return [2, { authResponse: authResponse, leadResponse: leadResponse, countryCode: countryCode, isNextScreenDob: isNextScreenDob }];
|
|
440
|
-
case
|
|
441
|
-
case
|
|
452
|
+
case 16: return [4, sleep(interval * 1000)];
|
|
453
|
+
case 17:
|
|
442
454
|
_j.sent();
|
|
443
|
-
_j.label =
|
|
444
|
-
case
|
|
455
|
+
_j.label = 18;
|
|
456
|
+
case 18:
|
|
445
457
|
count++;
|
|
446
458
|
return [3, 1];
|
|
447
|
-
case
|
|
459
|
+
case 19: throw new Error(NAFATH_VERIFICATION_FAILED);
|
|
448
460
|
}
|
|
449
461
|
});
|
|
450
462
|
}); });
|
|
@@ -21,7 +21,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
21
21
|
import Text from '../../../../components/Text';
|
|
22
22
|
import { Button as SharedButton } from '../../../shared/Button';
|
|
23
23
|
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
24
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
24
|
+
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
25
25
|
import { businessSelector, skipUpdateLeadMobile, updateLeadMobile } from '../../../../features/app/business/businessStore';
|
|
26
26
|
import Button from '../../../../components/Button';
|
|
27
27
|
import MobileNumber from './MobileNumber';
|
|
@@ -84,10 +84,11 @@ var CollectMobileOwnership = function () {
|
|
|
84
84
|
var dispatch = useAppDispatch();
|
|
85
85
|
var t = useTranslation().t;
|
|
86
86
|
var isAr = useLanguage().isAr;
|
|
87
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
87
88
|
var _a = useAppSelector(businessSelector), data = _a.data, loading = _a.loading, error = _a.error;
|
|
88
89
|
var methods = useForm({
|
|
89
90
|
resolver: yupResolver(PhoneValidationSchema()),
|
|
90
|
-
defaultValues: { mobile: '', countryCode:
|
|
91
|
+
defaultValues: { mobile: '', countryCode: settingsData.businessCountry },
|
|
91
92
|
mode: 'onChange'
|
|
92
93
|
});
|
|
93
94
|
var onSubmit = function (data) {
|
|
@@ -22,7 +22,7 @@ import ClearIcon from '../../../shared/ClearIcon';
|
|
|
22
22
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
23
23
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
24
24
|
import Input from '../../../shared/Input';
|
|
25
|
-
import {
|
|
25
|
+
import { settingsSelector } from '../../../../app/settings';
|
|
26
26
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
27
27
|
var theme = _a.theme;
|
|
28
28
|
return ({
|
|
@@ -45,9 +45,9 @@ var MobileNumber = function () {
|
|
|
45
45
|
var _a;
|
|
46
46
|
var t = useTranslation().t;
|
|
47
47
|
var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
|
|
48
|
-
var data = useAppSelector(
|
|
48
|
+
var data = useAppSelector(settingsSelector).data;
|
|
49
49
|
var phoneControl = useController({ name: 'mobile', control: control });
|
|
50
|
-
var countryCodeValue = data.
|
|
50
|
+
var countryCodeValue = data.businessCountry;
|
|
51
51
|
var mobileValue = phoneControl.field.value || '';
|
|
52
52
|
var error = !!mobileValue ? (_a = phoneControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message : '';
|
|
53
53
|
var isSA = countryCodeValue.iso2 === 'SA';
|
|
@@ -21,7 +21,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
21
21
|
import Text from '../../../../components/Text';
|
|
22
22
|
import { Button as SharedButton } from '../../../shared/Button';
|
|
23
23
|
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
24
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
24
|
+
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
25
25
|
import { connectSelector, skipUpdateLeadMobile, updateLeadMobile } from '../../../../features/app/connect/connectStore';
|
|
26
26
|
import Button from '../../../../components/Button';
|
|
27
27
|
import MobileNumber from './MobileNumber';
|
|
@@ -85,10 +85,11 @@ var CollectMobileOwnership = function () {
|
|
|
85
85
|
var dispatch = useAppDispatch();
|
|
86
86
|
var t = useTranslation().t;
|
|
87
87
|
var isAr = useLanguage().isAr;
|
|
88
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
88
89
|
var _a = useAppSelector(connectSelector), data = _a.data, loading = _a.loading, error = _a.error;
|
|
89
90
|
var methods = useForm({
|
|
90
91
|
resolver: yupResolver(PhoneValidationSchema()),
|
|
91
|
-
defaultValues: { mobile: '', countryCode:
|
|
92
|
+
defaultValues: { mobile: '', countryCode: settingsData.businessCountry },
|
|
92
93
|
mode: 'onChange'
|
|
93
94
|
});
|
|
94
95
|
var onSubmit = function (data) {
|
|
@@ -22,7 +22,7 @@ import ClearIcon from '../../../shared/ClearIcon';
|
|
|
22
22
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
23
23
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
24
24
|
import Input from '../../../shared/Input';
|
|
25
|
-
import {
|
|
25
|
+
import { settingsSelector } from '../../../../app/settings';
|
|
26
26
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
27
27
|
var theme = _a.theme;
|
|
28
28
|
return ({
|
|
@@ -45,9 +45,9 @@ var MobileNumber = function () {
|
|
|
45
45
|
var _a;
|
|
46
46
|
var t = useTranslation().t;
|
|
47
47
|
var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
|
|
48
|
-
var data = useAppSelector(
|
|
48
|
+
var data = useAppSelector(settingsSelector).data;
|
|
49
49
|
var phoneControl = useController({ name: 'mobile', control: control });
|
|
50
|
-
var countryCodeValue = data.
|
|
50
|
+
var countryCodeValue = data.businessCountry;
|
|
51
51
|
var mobileValue = phoneControl.field.value || '';
|
|
52
52
|
var error = !!mobileValue ? (_a = phoneControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message : '';
|
|
53
53
|
var isSA = countryCodeValue.iso2 === 'SA';
|
|
@@ -21,7 +21,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
21
21
|
import Text from '../../../../components/Text';
|
|
22
22
|
import { Button as SharedButton } from '../../../shared/Button';
|
|
23
23
|
import { useAppDispatch, useAppSelector, useLanguage } from '../../../../hooks';
|
|
24
|
-
import { handlePrevScreenStep } from '../../../../app/settings';
|
|
24
|
+
import { handlePrevScreenStep, settingsSelector } from '../../../../app/settings';
|
|
25
25
|
import { connectExpressSelector, skipUpdateLeadMobile, updateLeadMobile } from '../../../../features/app/connectExpress/connectExpressStore';
|
|
26
26
|
import { AuthForType } from '../../../../@types';
|
|
27
27
|
import Button from '../../../../components/Button';
|
|
@@ -86,11 +86,12 @@ var CollectMobileOwnership = function () {
|
|
|
86
86
|
var dispatch = useAppDispatch();
|
|
87
87
|
var t = useTranslation().t;
|
|
88
88
|
var isAr = useLanguage().isAr;
|
|
89
|
+
var settingsData = useAppSelector(settingsSelector).data;
|
|
89
90
|
var _a = useAppSelector(connectExpressSelector), data = _a.data, loading = _a.loading, error = _a.error;
|
|
90
91
|
var startWithNID = data.otpData.authFor === AuthForType.NATIONAL_ID;
|
|
91
92
|
var methods = useForm({
|
|
92
93
|
resolver: yupResolver(PhoneValidationSchema()),
|
|
93
|
-
defaultValues: { mobile: '', countryCode:
|
|
94
|
+
defaultValues: { mobile: '', countryCode: settingsData.businessCountry },
|
|
94
95
|
mode: 'onChange'
|
|
95
96
|
});
|
|
96
97
|
var onSubmit = function (data) {
|
|
@@ -22,7 +22,7 @@ import ClearIcon from '../../../shared/ClearIcon';
|
|
|
22
22
|
import CheckIcon from '../../../shared/CheckIcon';
|
|
23
23
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
24
24
|
import Input from '../../../shared/Input';
|
|
25
|
-
import {
|
|
25
|
+
import { settingsSelector } from '../../../../app/settings';
|
|
26
26
|
var LabelContainerStyled = styled(Box)(function (_a) {
|
|
27
27
|
var theme = _a.theme;
|
|
28
28
|
return ({
|
|
@@ -45,9 +45,9 @@ var MobileNumber = function () {
|
|
|
45
45
|
var _a;
|
|
46
46
|
var t = useTranslation().t;
|
|
47
47
|
var _b = useFormContext(), control = _b.control, setValue = _b.setValue;
|
|
48
|
-
var data = useAppSelector(
|
|
48
|
+
var data = useAppSelector(settingsSelector).data;
|
|
49
49
|
var phoneControl = useController({ name: 'mobile', control: control });
|
|
50
|
-
var countryCodeValue = data.
|
|
50
|
+
var countryCodeValue = data.businessCountry;
|
|
51
51
|
var mobileValue = phoneControl.field.value || '';
|
|
52
52
|
var error = !!mobileValue ? (_a = phoneControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message : '';
|
|
53
53
|
var isSA = countryCodeValue.iso2 === 'SA';
|
|
@@ -241,6 +241,6 @@ export default function FlowsButtons(_a) {
|
|
|
241
241
|
onResetPassword();
|
|
242
242
|
else
|
|
243
243
|
onRedirect({ title: title, href: href, src: src, hoverSrc: hoverSrc, isCompleted: isCompleted, name: name, status: status, token: token });
|
|
244
|
-
} }, { children: _jsx(ButtonStyled, __assign({ variant: 'outlined', disabled: isResetPassword(name, status) && loading, isCompleted: isCompleted, hasUrl: !!href, sx: __assign({ mb: isLast ? 2.5 : 1.8 }, sx), endIcon: isResetPassword(name, status) && loading ? (_jsx(_Fragment, {})) : isCompleted ? (_jsx(CheckIconStyled, {})) : (_jsxs("div", __assign({ style: { display: 'flex', alignItems: 'center' } }, { children: [name !== 'password' && _jsx(Dot, { completed:
|
|
244
|
+
} }, { children: _jsx(ButtonStyled, __assign({ variant: 'outlined', disabled: isResetPassword(name, status) && loading, isCompleted: isCompleted, hasUrl: !!href, sx: __assign({ mb: isLast ? 2.5 : 1.8 }, sx), endIcon: isResetPassword(name, status) && loading ? (_jsx(_Fragment, {})) : isCompleted ? (_jsx(CheckIconStyled, {})) : (_jsxs("div", __assign({ style: { display: 'flex', alignItems: 'center' } }, { children: [name !== 'password' && _jsx(Dot, { completed: ['complete', 'completed', 'reviewed'].includes(status === null || status === void 0 ? void 0 : status.toLowerCase()) }), _jsx(Image, { sx: { height: 15, transform: isAr ? 'scale(-1)' : 'scale(1)', marginInlineStart: 0 }, src: ICONS_NAMES.Arrow_filled_right_icon })] }))), startIcon: isResetPassword(name, status) && loading ? (_jsx(_Fragment, {})) : isBrand(name) ? (_jsx(_Fragment, { children: _jsx(BrandImage, { children: _jsx(BrandNameStyled, { children: brandName }) }) })) : (_jsx(Image, { src: src, alt: title })), type: 'button' }, { children: title })) }), idx));
|
|
245
245
|
}), onClose && (_jsx(SharedButton, __assign({ sx: { mt: 2.5, ml: 0, mr: 0 }, isAr: isAr, disableBack: true, loading: storeLoading, onClick: onClose }, { children: t('close_and_complete_later') })))] }));
|
|
246
246
|
}
|
|
@@ -21,7 +21,8 @@ var CloseIconStyled = styled(Icon)(function (_a) {
|
|
|
21
21
|
var theme = _a.theme;
|
|
22
22
|
return ({
|
|
23
23
|
width: theme.spacing(3.75),
|
|
24
|
-
height: theme.spacing(3.75)
|
|
24
|
+
height: theme.spacing(3.75),
|
|
25
|
+
cursor: 'pointer'
|
|
25
26
|
});
|
|
26
27
|
});
|
|
27
28
|
var CloseBox = styled(Box, { shouldForwardProp: function (prop) { return prop !== 'isTapOrigin'; } })(function (_a) {
|
|
@@ -31,7 +32,6 @@ var CloseBox = styled(Box, { shouldForwardProp: function (prop) { return prop !=
|
|
|
31
32
|
justifyContent: 'end',
|
|
32
33
|
marginBlockStart: theme.spacing(2),
|
|
33
34
|
marginInlineEnd: theme.spacing(2),
|
|
34
|
-
cursor: 'pointer',
|
|
35
35
|
direction: theme.direction,
|
|
36
36
|
position: isTapOrigin ? 'initial' : 'absolute',
|
|
37
37
|
right: 0,
|
|
@@ -53,5 +53,5 @@ export default function Dialog(_a) {
|
|
|
53
53
|
var handleOnCancel = function () {
|
|
54
54
|
setOpen(false);
|
|
55
55
|
};
|
|
56
|
-
return (_jsxs(_Fragment, { children: [onClose && (_jsx(CloseBox, __assign({ isTapOrigin: isTapOrigin, id: 'close-container'
|
|
56
|
+
return (_jsxs(_Fragment, { children: [onClose && (_jsx(CloseBox, __assign({ isTapOrigin: isTapOrigin, id: 'close-container' }, { children: _jsx(CloseIconStyled, { src: ICONS_NAMES.CLOSE_ICON, onClick: handleOnCloseButton }) }))), children, onClose && (_jsx(CloseDialog, { message: t('confirm_close_flow_title'), confirmTitle: t('confirm_close_flow_yes'), closeTitle: t('confirm_close_flow_no'), open: open, onConfirm: handleOnConfirm, onCancel: handleOnCancel }))] }));
|
|
57
57
|
}
|