@tap-payments/auth-jsconnect 2.0.88-test → 2.0.89-test

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.
@@ -79,7 +79,7 @@ export declare type LeadIdentityUpdateBody = {
79
79
  identification_id: string;
80
80
  identification_id_type?: string;
81
81
  date_of_birth?: string;
82
- step_name: string;
82
+ step_name?: string;
83
83
  encryption_contract: Array<string>;
84
84
  };
85
85
  declare const leadService: {
@@ -1,5 +1,6 @@
1
1
  import { ScreenStepNavigation, BusinessType } from '../@types';
2
2
  export declare const CLIENT_ORIGIN: string;
3
+ export declare const TAP_WEBSITE = "https://www.tap.company/";
3
4
  export declare const LOCAL_STORAGE_KEYS: {
4
5
  themeMode: string;
5
6
  languageMode: string;
@@ -1,16 +1,17 @@
1
1
  import { BusinessType } from '../@types';
2
2
  export var CLIENT_ORIGIN = window.location.origin;
3
+ export var TAP_WEBSITE = 'https://www.tap.company/';
3
4
  export var LOCAL_STORAGE_KEYS = {
4
5
  themeMode: 'themeMode',
5
6
  languageMode: 'languageMode'
6
7
  };
7
8
  export var EXTERNAL_LINKS = {
8
- TOS_EN: 'https://www.tap.company/sa/en/terms-conditions',
9
- TOS_AR: 'https://www.tap.company/sa/ar/terms-conditions',
10
- REFUND_EN: 'https://www.tap.company/sa/en/terms-conditions',
11
- REFUND_AR: 'https://www.tap.company/sa/ar/terms-conditions',
12
- TRANSACTION_EN: 'https://www.tap.company/sa/en/terms-conditions',
13
- TRANSACTION_AR: 'https://www.tap.company/sa/ar/terms-conditions'
9
+ TOS_EN: '/en/terms-conditions',
10
+ TOS_AR: '/ar/terms-conditions',
11
+ REFUND_EN: '/en/terms-conditions',
12
+ REFUND_AR: '/ar/terms-conditions',
13
+ TRANSACTION_EN: '/en/terms-conditions',
14
+ TRANSACTION_AR: '/ar/terms-conditions'
14
15
  };
15
16
  export var DIALOG_ID = 'auth-js-connect-dialog';
16
17
  export var BACKGROUND_ID = 'auth-js-connect-background';
@@ -76,32 +76,23 @@ export var verifyAuthOTP = createAsyncThunk('verifyAuthOTPKit', function (params
76
76
  });
77
77
  }); });
78
78
  export var resendOTP = createAsyncThunk('authResendOTP', function (params, thunkApi) { return __awaiter(void 0, void 0, void 0, function () {
79
- var _a, settings, auth, _b, nid, dob, type, countryISOCode, requestBody, data;
80
- return __generator(this, function (_c) {
81
- switch (_c.label) {
79
+ var auth, _a, nid, dob, type, countryISOCode, leadId, requestBody, data;
80
+ return __generator(this, function (_b) {
81
+ switch (_b.label) {
82
82
  case 0:
83
- _a = thunkApi.getState(), settings = _a.settings, auth = _a.auth;
84
- _b = auth.data || {}, nid = _b.nid, dob = _b.dob, type = _b.type, countryISOCode = _b.countryISOCode;
83
+ auth = thunkApi.getState().auth;
84
+ _a = auth.data || {}, nid = _a.nid, dob = _a.dob, type = _a.type, countryISOCode = _a.countryISOCode, leadId = _a.leadId;
85
85
  requestBody = {
86
- lang: settings.data.language,
87
- user_credentail: {
88
- identification_id: nid,
89
- identification_id_type: type,
90
- date_of_birth: dob,
91
- country_code: countryISOCode
92
- },
93
- sign_in: false,
94
- is_lead: false,
95
- encryption_contract: [
96
- 'user_credentail.country_code',
97
- 'user_credentail.identification_id',
98
- 'user_credentail.identification_id_type',
99
- 'user_credentail.date_of_birth'
100
- ]
86
+ id: leadId,
87
+ identification_id: nid,
88
+ identification_id_type: type,
89
+ date_of_birth: dob,
90
+ country_code: countryISOCode,
91
+ encryption_contract: ['country_code', 'identification_id', 'identification_id_type', 'date_of_birth']
101
92
  };
102
- return [4, API.authService.createAuth(requestBody)];
93
+ return [4, API.leadService.updateLead(requestBody)];
103
94
  case 1:
104
- data = (_c.sent()).data;
95
+ data = _b.sent();
105
96
  return [2, data];
106
97
  }
107
98
  });
@@ -191,15 +182,9 @@ export var authSlice = createSlice({
191
182
  state.error = null;
192
183
  })
193
184
  .addCase(resendOTP.fulfilled, function (state, action) {
194
- var _a;
195
185
  state.error = null;
196
186
  var data = action.payload;
197
- var description = (((_a = data === null || data === void 0 ? void 0 : data.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
198
- if (description) {
199
- state.error = description;
200
- return;
201
- }
202
- state.data.verifyToken = data === null || data === void 0 ? void 0 : data.auth_token;
187
+ state.data.verifyToken = data === null || data === void 0 ? void 0 : data.verify_token;
203
188
  })
204
189
  .addCase(resendOTP.rejected, function (state, action) {
205
190
  state.error = action.error.message;
@@ -22,7 +22,9 @@ import Text from '../../../../components/Text';
22
22
  import Warning from '../../../../components/Warning';
23
23
  import { useLanguage } from '../../../../hooks';
24
24
  import Collapse from '../../../../components/Collapse';
25
- import { EXTERNAL_LINKS } from '../../../../constants';
25
+ import { EXTERNAL_LINKS, TAP_WEBSITE } from '../../../../constants';
26
+ import { settingsSelector } from '../../../../app/settings';
27
+ import { useAppSelector } from '../../../../hooks';
26
28
  var TACContainerStyled = styled(Box)(function (_a) {
27
29
  var theme = _a.theme;
28
30
  return ({
@@ -68,12 +70,16 @@ var TAC = function () {
68
70
  var t = useTranslation().t;
69
71
  var isAr = useLanguage().isAr;
70
72
  var control = useFormContext().control;
73
+ var settingsData = useAppSelector(settingsSelector).data;
71
74
  var tacControl = useController({ control: control, name: 'termAndConditionChecked' });
72
75
  var tacChecked = tacControl.field.value;
73
76
  var warningMessage = (_a = tacControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
77
+ var countryCode = settingsData.businessCountry.iso2.toLowerCase();
74
78
  var handleTACCheckedChange = function (event, checked) {
75
79
  tacControl.field.onChange(checked);
76
80
  };
77
- return (_jsxs(ScreenContainer, __assign({ sx: { mt: 3, mb: 1.625 } }, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr ? EXTERNAL_LINKS.TOS_AR : EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })));
81
+ return (_jsxs(ScreenContainer, __assign({ sx: { mt: 3, mb: 1.625 } }, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr
82
+ ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR
83
+ : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })));
78
84
  };
79
85
  export default React.memo(TAC);
@@ -44,12 +44,12 @@ var ButtonGroupStyled = styled(Box)(function (_a) {
44
44
  });
45
45
  });
46
46
  var SuccessWithFlowButtons = function () {
47
- var _a, _b, _c;
47
+ var _a, _b, _c, _d;
48
48
  var t = useTranslation().t;
49
49
  var isAr = useLanguage().isAr;
50
50
  var data = useAppSelector(bankSelector).data;
51
- var _d = data.verify.responseBody || {}, flows = _d.flows, nameObj = _d.name, entity = _d.entity, brand = _d.brand, bank = _d.bank_account, merchant = _d.merchant, identification_id = _d.identification_id, user = _d.user;
52
- var _e = useState([]), buttons = _e[0], setButtons = _e[1];
51
+ var _e = data.verify.responseBody || {}, flows = _e.flows, nameObj = _e.name, entity = _e.entity, brand = _e.brand, bank = _e.bank_account, merchant = _e.merchant, identification_id = _e.identification_id, user = _e.user;
52
+ var _f = useState([]), buttons = _f[0], setButtons = _f[1];
53
53
  var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
54
54
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
55
55
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.name) || t('bank');
@@ -59,9 +59,9 @@ var SuccessWithFlowButtons = function () {
59
59
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
60
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
61
  var identification = user.identification;
62
- var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat(identification === null || identification === void 0 ? void 0 : identification.id) : '';
62
+ var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
63
63
  var settings = useAppSelector(settingsSelector);
64
- var _f = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _f.contact, board_id = _f.board_id, board_info_id = _f.board_info_id;
64
+ var _g = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _g.contact, board_id = _g.board_id, board_info_id = _g.board_info_id;
65
65
  var email = (contact || { email: '' }).email;
66
66
  var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, board_id, board_info_id);
67
67
  var reMapFlowData = function (flows) {
@@ -126,9 +126,9 @@ var ActivitiesList = function (_a) {
126
126
  };
127
127
  var handleSearch = function (value) {
128
128
  var filteredList = activities === null || activities === void 0 ? void 0 : activities.filter(function (activity) {
129
- var _a, _b;
130
- return ((_a = activity === null || activity === void 0 ? void 0 : activity.name) === null || _a === void 0 ? void 0 : _a.en.toLowerCase().startsWith(value.toLowerCase())) ||
131
- ((_b = activity === null || activity === void 0 ? void 0 : activity.name) === null || _b === void 0 ? void 0 : _b.ar.toLowerCase().startsWith(value.toLowerCase()));
129
+ var _a, _b, _c, _d;
130
+ return ((_b = (_a = activity === null || activity === void 0 ? void 0 : activity.name) === null || _a === void 0 ? void 0 : _a.en) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(value.toLowerCase())) ||
131
+ ((_d = (_c = activity === null || activity === void 0 ? void 0 : activity.name) === null || _c === void 0 ? void 0 : _c.ar) === null || _d === void 0 ? void 0 : _d.toLowerCase().includes(value.toLowerCase()));
132
132
  });
133
133
  setActivitiesMenuList(filteredList);
134
134
  };
@@ -111,11 +111,11 @@ var customerLocations = function (_a) {
111
111
  var onSelectItem = function (customerLocations) {
112
112
  onCloseList();
113
113
  var checked = customerLocationsList.filter(function (location) { return location.id === customerLocations.id; });
114
- if (customerLocations.id === 'cba_zHyD6221116meEv257b93818')
115
- customerLocationsControl.field.onChange(checked.concat(customerLocationsList.filter(function (location) { return location.id === 'cba_PKZd19221115ub9D25H493833'; })));
116
- else if (customerLocations.id === 'cba_NnUL20221116g2QG25Na9n129')
114
+ if (customerLocations.id === 'regional')
115
+ customerLocationsControl.field.onChange(checked.concat(customerLocationsList.filter(function (location) { return location.id === 'local'; })));
116
+ else if (customerLocations.id === 'global')
117
117
  customerLocationsControl.field.onChange(checked.concat(customerLocationsList.filter(function (location) { return location.id != customerLocations.id; })));
118
- else if (customerLocations.id === 'cba_PKZd19221115ub9D25H493833')
118
+ else if (customerLocations.id === 'local')
119
119
  customerLocationsControl.field.onChange(checked);
120
120
  if (error)
121
121
  dispatch(clearError());
@@ -20,8 +20,10 @@ import { useController, useFormContext } from 'react-hook-form';
20
20
  import Text from '../../../../components/Text';
21
21
  import Link from '@mui/material/Link';
22
22
  import Warning from '../../../../components/Warning';
23
- import { EXTERNAL_LINKS } from '../../../../constants';
23
+ import { EXTERNAL_LINKS, TAP_WEBSITE } from '../../../../constants';
24
24
  import { ScreenContainer } from '../../../shared/Containers';
25
+ import { settingsSelector } from '../../../../app/settings';
26
+ import { useAppSelector } from '../../../../hooks';
25
27
  export var ContainerStyled = styled(Box)(function (_a) {
26
28
  var theme = _a.theme;
27
29
  return ({
@@ -67,12 +69,16 @@ var RefundPolicy = function () {
67
69
  var t = useTranslation().t;
68
70
  var isAr = useLanguage().isAr;
69
71
  var control = useFormContext().control;
72
+ var settingsData = useAppSelector(settingsSelector).data;
70
73
  var refundControl = useController({ control: control, name: 'refundPolicy' });
71
74
  var refundChecked = refundControl.field.value;
72
75
  var warningMessage = (_a = refundControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
76
+ var countryCode = settingsData.businessCountry.iso2.toLowerCase();
73
77
  var handleRefundCheckedChange = function (event, checked) {
74
78
  refundControl.field.onChange(checked);
75
79
  };
76
- return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.75 } }, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: refundChecked, onChange: handleRefundCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_refund_policy'), _jsx(LinkStyled, __assign({ href: isAr ? EXTERNAL_LINKS.REFUND_AR : EXTERNAL_LINKS.REFUND_EN, target: '_blank', underline: 'always' }, { children: t('refund_policy_compliance') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })));
80
+ return (_jsxs(ScreenContainer, __assign({ sx: { mt: 2.75 } }, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: refundChecked, onChange: handleRefundCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_refund_policy'), _jsx(LinkStyled, __assign({ href: isAr
81
+ ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.REFUND_AR
82
+ : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.REFUND_EN, target: '_blank', underline: 'always' }, { children: t('refund_policy_compliance') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] })));
77
83
  };
78
84
  export default RefundPolicy;
@@ -16,9 +16,11 @@ import { useTranslation } from 'react-i18next';
16
16
  import { useLanguage } from '../../../../hooks';
17
17
  import { useController, useFormContext } from 'react-hook-form';
18
18
  import Warning from '../../../../components/Warning';
19
- import { EXTERNAL_LINKS } from '../../../../constants';
19
+ import { EXTERNAL_LINKS, TAP_WEBSITE } from '../../../../constants';
20
20
  import { ContainerStyled, CheckboxStyled, TextStyled, LinkStyled } from './RefundPolicy';
21
21
  import { ScreenContainer } from '../../../shared/Containers';
22
+ import { settingsSelector } from '../../../../app/settings';
23
+ import { useAppSelector } from '../../../../hooks';
22
24
  var CollapseStyled = styled(Collapse)(function () { return ({
23
25
  width: '100%'
24
26
  }); });
@@ -27,12 +29,16 @@ var TransactionPolicy = function () {
27
29
  var t = useTranslation().t;
28
30
  var isAr = useLanguage().isAr;
29
31
  var control = useFormContext().control;
32
+ var settingsData = useAppSelector(settingsSelector).data;
30
33
  var transactionControl = useController({ control: control, name: 'transactionPolicy' });
31
34
  var transactionChecked = transactionControl.field.value;
32
35
  var warningMessage = (_a = transactionControl.fieldState.error) === null || _a === void 0 ? void 0 : _a.message;
36
+ var countryCode = settingsData.businessCountry.iso2.toLowerCase();
33
37
  var handleTransactionCheckedChange = function (event, checked) {
34
38
  transactionControl.field.onChange(checked);
35
39
  };
36
- return (_jsxs(ScreenContainer, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: transactionChecked, onChange: handleTransactionCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_chargeback_policy'), _jsx(LinkStyled, __assign({ href: isAr ? EXTERNAL_LINKS.TRANSACTION_AR : EXTERNAL_LINKS.TRANSACTION_EN, target: '_blank', underline: 'always' }, { children: t('chargeback_policy') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
40
+ return (_jsxs(ScreenContainer, { children: [_jsxs(ContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: transactionChecked, onChange: handleTransactionCheckedChange }), _jsxs(TextStyled, { children: [t('agree_on_chargeback_policy'), _jsx(LinkStyled, __assign({ href: isAr
41
+ ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TRANSACTION_AR
42
+ : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TRANSACTION_EN, target: '_blank', underline: 'always' }, { children: t('chargeback_policy') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }));
37
43
  };
38
44
  export default TransactionPolicy;
@@ -58,7 +58,7 @@ var SuccessWithFlowButtons = function () {
58
58
  var brandName = (isAr ? (_b = brand === null || brand === void 0 ? void 0 : brand.name) === null || _b === void 0 ? void 0 : _b.ar : (_c = brand === null || brand === void 0 ? void 0 : brand.name) === null || _c === void 0 ? void 0 : _c.en) || '';
59
59
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
60
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
- var maskedId = !!identification_id ? " ".concat(t('masking_symbols')).concat(identification_id) : '';
61
+ var maskedId = !!identification_id ? " ".concat(t('masking_symbols')).concat(identification_id === null || identification_id === void 0 ? void 0 : identification_id.slice(-2)) : '';
62
62
  var settings = useAppSelector(settingsSelector);
63
63
  var _f = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _f.contact, board_id = _f.board_id, board_info_id = _f.board_info_id;
64
64
  var email = (contact || { email: '' }).email;
@@ -35,7 +35,8 @@ var SocialMediaGroupStyled = styled(SocialMediaGroup)(function (_a) {
35
35
  var theme = _a.theme, defaultValue = _a.defaultValue;
36
36
  return ({
37
37
  borderTop: "1px solid ".concat(alpha(theme.palette.divider, 0.8)),
38
- borderBottom: !defaultValue ? "1px solid ".concat(alpha(theme.palette.divider, 0.8)) : ''
38
+ borderBottom: !defaultValue ? "1px solid ".concat(alpha(theme.palette.divider, 0.8)) : '',
39
+ width: '100%'
39
40
  });
40
41
  });
41
42
  var InputStyled = styled(Input)(function (_a) {
@@ -22,7 +22,9 @@ import Text from '../../../../components/Text';
22
22
  import Warning from '../../../../components/Warning';
23
23
  import { useLanguage } from '../../../../hooks';
24
24
  import Collapse from '../../../../components/Collapse';
25
- import { EXTERNAL_LINKS } from '../../../../constants';
25
+ import { EXTERNAL_LINKS, TAP_WEBSITE } from '../../../../constants';
26
+ import { settingsSelector } from '../../../../app/settings';
27
+ import { useAppSelector } from '../../../../hooks';
26
28
  var TACContainerStyled = styled(Box)(function (_a) {
27
29
  var theme = _a.theme;
28
30
  return ({
@@ -69,12 +71,16 @@ var TAC = function (_a) {
69
71
  var t = useTranslation().t;
70
72
  var isAr = useLanguage().isAr;
71
73
  var control = useFormContext().control;
74
+ var settingsData = useAppSelector(settingsSelector).data;
72
75
  var tacControl = useController({ control: control, name: 'termAndConditionChecked' });
73
76
  var tacChecked = tacControl.field.value;
74
77
  var warningMessage = (_b = tacControl.fieldState.error) === null || _b === void 0 ? void 0 : _b.message;
78
+ var countryCode = settingsData.businessCountry.iso2.toLowerCase();
75
79
  var handleTACCheckedChange = function (event, checked) {
76
80
  tacControl.field.onChange(checked);
77
81
  };
78
- return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr ? EXTERNAL_LINKS.TOS_AR : EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }) })));
82
+ return (_jsx(Collapse, __assign({ in: show }, { children: _jsxs(ScreenContainer, { children: [_jsxs(TACContainerStyled, { children: [_jsx(CheckboxStyled, { disableRipple: true, disableFocusRipple: true, focusRipple: false, checked: tacChecked, onChange: handleTACCheckedChange }), _jsxs(TextStyled, { children: [t('read_agree_terms_and_conditions_message'), _jsx(LinkStyled, __assign({ href: isAr
83
+ ? TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_AR
84
+ : TAP_WEBSITE + countryCode + EXTERNAL_LINKS.TOS_EN, target: '_blank', underline: 'always' }, { children: t('terms_and_conditions_link_title') }))] })] }), _jsx(CollapseStyled, __assign({ in: !!warningMessage }, { children: _jsx(Warning, __assign({ warningType: 'alert' }, { children: warningMessage && t(warningMessage) })) }))] }) })));
79
85
  };
80
86
  export default React.memo(TAC);
@@ -44,12 +44,12 @@ var ButtonGroupStyled = styled(Box)(function (_a) {
44
44
  });
45
45
  });
46
46
  var SuccessWithFlowButtons = function () {
47
- var _a, _b, _c;
47
+ var _a, _b, _c, _d;
48
48
  var t = useTranslation().t;
49
49
  var isAr = useLanguage().isAr;
50
50
  var data = useAppSelector(entitySelector).data;
51
- var _d = data.verify.responseBody || {}, flows = _d.flows, nameObj = _d.name, entity = _d.entity, brand = _d.brand, bank = _d.bank, merchant = _d.merchant, identification_id = _d.identification_id, vatID = _d.vatID, user = _d.user;
52
- var _e = useState([]), buttons = _e[0], setButtons = _e[1];
51
+ var _e = data.verify.responseBody || {}, flows = _e.flows, nameObj = _e.name, entity = _e.entity, brand = _e.brand, bank = _e.bank, merchant = _e.merchant, identification_id = _e.identification_id, vatID = _e.vatID, user = _e.user;
52
+ var _f = useState([]), buttons = _f[0], setButtons = _f[1];
53
53
  var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
54
54
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
55
55
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
@@ -59,9 +59,9 @@ var SuccessWithFlowButtons = function () {
59
59
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
60
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
61
  var identification = user.identification;
62
- var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat(identification === null || identification === void 0 ? void 0 : identification.id) : '';
62
+ var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
63
63
  var settings = useAppSelector(settingsSelector);
64
- var _f = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _f.contact, board_id = _f.board_id, board_info_id = _f.board_info_id;
64
+ var _g = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _g.contact, board_id = _g.board_id, board_info_id = _g.board_info_id;
65
65
  var email = (contact || { email: '' }).email;
66
66
  var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, board_id, board_info_id);
67
67
  var reMapFlowData = function (flows) {
@@ -44,12 +44,12 @@ var ButtonGroupStyled = styled(Box)(function (_a) {
44
44
  });
45
45
  });
46
46
  var SuccessWithFlowButtons = function () {
47
- var _a, _b, _c;
47
+ var _a, _b, _c, _d;
48
48
  var t = useTranslation().t;
49
49
  var isAr = useLanguage().isAr;
50
50
  var data = useAppSelector(individualSelector).data;
51
- var _d = data.verify.responseBody || {}, flows = _d.flows, nameObj = _d.name, entity = _d.entity, brand = _d.brand, bank = _d.bank_account, merchant = _d.merchant, identification_id = _d.identification_id, user = _d.user;
52
- var _e = useState([]), buttons = _e[0], setButtons = _e[1];
51
+ var _e = data.verify.responseBody || {}, flows = _e.flows, nameObj = _e.name, entity = _e.entity, brand = _e.brand, bank = _e.bank_account, merchant = _e.merchant, identification_id = _e.identification_id, user = _e.user;
52
+ var _f = useState([]), buttons = _f[0], setButtons = _f[1];
53
53
  var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
54
54
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
55
55
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
@@ -59,9 +59,9 @@ var SuccessWithFlowButtons = function () {
59
59
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
60
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
61
  var identification = user.identification;
62
- var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat(identification === null || identification === void 0 ? void 0 : identification.id) : '';
62
+ var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
63
63
  var settings = useAppSelector(settingsSelector);
64
- var _f = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _f.contact, board_id = _f.board_id, board_info_id = _f.board_info_id;
64
+ var _g = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _g.contact, board_id = _g.board_id, board_info_id = _g.board_info_id;
65
65
  var email = (contact || { email: '' }).email;
66
66
  var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, board_id, board_info_id);
67
67
  var reMapFlowData = function (flows) {
@@ -44,12 +44,12 @@ var ButtonGroupStyled = styled(Box)(function (_a) {
44
44
  });
45
45
  });
46
46
  var SuccessWithFlowButtons = function () {
47
- var _a, _b, _c;
47
+ var _a, _b, _c, _d;
48
48
  var t = useTranslation().t;
49
49
  var isAr = useLanguage().isAr;
50
50
  var data = useAppSelector(passwordSelector).data;
51
- var _d = data.verify.responseBody || {}, flows = _d.flows, nameObj = _d.name, entity = _d.entity, brand = _d.brand, bank = _d.bank_account, merchant = _d.merchant, identification_id = _d.identification_id, user = _d.user;
52
- var _e = useState([]), buttons = _e[0], setButtons = _e[1];
51
+ var _e = data.verify.responseBody || {}, flows = _e.flows, nameObj = _e.name, entity = _e.entity, brand = _e.brand, bank = _e.bank_account, merchant = _e.merchant, identification_id = _e.identification_id, user = _e.user;
52
+ var _f = useState([]), buttons = _f[0], setButtons = _f[1];
53
53
  var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
54
54
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
55
55
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
@@ -59,9 +59,9 @@ var SuccessWithFlowButtons = function () {
59
59
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
60
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
61
  var identification = user.identification;
62
- var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat(identification === null || identification === void 0 ? void 0 : identification.id) : '';
62
+ var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
63
63
  var settings = useAppSelector(settingsSelector);
64
- var _f = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _f.contact, board_id = _f.board_id, board_info_id = _f.board_info_id;
64
+ var _g = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _g.contact, board_id = _g.board_id, board_info_id = _g.board_info_id;
65
65
  var email = (contact || { email: '' }).email;
66
66
  var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, board_id, board_info_id);
67
67
  var reMapFlowData = function (flows) {
@@ -44,12 +44,12 @@ var ButtonGroupStyled = styled(Box)(function (_a) {
44
44
  });
45
45
  });
46
46
  var SuccessWithFlowButtons = function () {
47
- var _a, _b, _c;
47
+ var _a, _b, _c, _d;
48
48
  var t = useTranslation().t;
49
49
  var isAr = useLanguage().isAr;
50
50
  var data = useAppSelector(taxSelector).data;
51
- var _d = data.verify.responseBody || {}, flows = _d.flows, nameObj = _d.name, entity = _d.entity, brand = _d.brand, bank = _d.bank, merchant = _d.merchant, identification_id = _d.identification_id, vatID = _d.vatID, user = _d.user;
52
- var _e = useState([]), buttons = _e[0], setButtons = _e[1];
51
+ var _e = data.verify.responseBody || {}, flows = _e.flows, nameObj = _e.name, entity = _e.entity, brand = _e.brand, bank = _e.bank, merchant = _e.merchant, identification_id = _e.identification_id, vatID = _e.vatID, user = _e.user;
52
+ var _f = useState([]), buttons = _f[0], setButtons = _f[1];
53
53
  var username = ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.first) || '') + ' ' + ((nameObj === null || nameObj === void 0 ? void 0 : nameObj.last) || '');
54
54
  var licenseNumber = ((_a = entity === null || entity === void 0 ? void 0 : entity.license) === null || _a === void 0 ? void 0 : _a.number) || '';
55
55
  var bankName = (bank === null || bank === void 0 ? void 0 : bank.bank_name) || t('bank');
@@ -59,9 +59,9 @@ var SuccessWithFlowButtons = function () {
59
59
  var isAcceptance = merchant === null || merchant === void 0 ? void 0 : merchant.is_acceptance_allowed;
60
60
  var isPayout = merchant === null || merchant === void 0 ? void 0 : merchant.is_payout_allowed;
61
61
  var identification = user.identification;
62
- var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat(identification === null || identification === void 0 ? void 0 : identification.id) : '';
62
+ var maskedId = !!(identification === null || identification === void 0 ? void 0 : identification.id) ? " ".concat(t('masking_symbols')).concat((_d = identification === null || identification === void 0 ? void 0 : identification.id) === null || _d === void 0 ? void 0 : _d.slice(-2)) : '';
63
63
  var settings = useAppSelector(settingsSelector);
64
- var _f = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _f.contact, board_id = _f.board_id, board_info_id = _f.board_info_id;
64
+ var _g = data.verify.responseBody || { contact: {}, board_id: '' }, contact = _g.contact, board_id = _g.board_id, board_info_id = _g.board_info_id;
65
65
  var email = (contact || { email: '' }).email;
66
66
  var url = getResetFlowUrl('/password', settings.data.language, PASSWORD_OPERATION_TYPE.RESET_PASSWORD, board_id, board_info_id);
67
67
  var reMapFlowData = function (flows) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.0.88-test",
3
+ "version": "2.0.89-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",